@councilbox/councilbox-ui 2.0.53 → 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 +42 -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 +120 -157
- 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
|
@@ -3,24 +3,18 @@
|
|
|
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
|
require("../../styles/main.css");
|
|
11
|
-
|
|
12
9
|
var _Grid = _interopRequireDefault(require("./Grid"));
|
|
13
|
-
|
|
14
10
|
var _GridItem = _interopRequireDefault(require("./GridItem"));
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
12
|
var DesignGrid = function DesignGrid() {
|
|
19
|
-
return /*#__PURE__*/_react
|
|
13
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
20
14
|
style: {
|
|
21
15
|
marginBottom: '2rem'
|
|
22
16
|
}
|
|
23
|
-
}, /*#__PURE__*/_react
|
|
17
|
+
}, /*#__PURE__*/_react["default"].createElement(_Grid["default"], null, /*#__PURE__*/_react["default"].createElement(_GridItem["default"], {
|
|
24
18
|
xs: 12,
|
|
25
19
|
md: 8,
|
|
26
20
|
lg: 1,
|
|
@@ -28,7 +22,7 @@ var DesignGrid = function DesignGrid() {
|
|
|
28
22
|
style: {
|
|
29
23
|
border: '2px solid var(--success)'
|
|
30
24
|
}
|
|
31
|
-
}, "1111"), /*#__PURE__*/_react
|
|
25
|
+
}, "1111"), /*#__PURE__*/_react["default"].createElement(_GridItem["default"], {
|
|
32
26
|
xs: 12,
|
|
33
27
|
md: 1,
|
|
34
28
|
lg: 8,
|
|
@@ -36,7 +30,7 @@ var DesignGrid = function DesignGrid() {
|
|
|
36
30
|
style: {
|
|
37
31
|
border: '2px solid var(--error)'
|
|
38
32
|
}
|
|
39
|
-
}, "2222"), /*#__PURE__*/_react
|
|
33
|
+
}, "2222"), /*#__PURE__*/_react["default"].createElement(_GridItem["default"], {
|
|
40
34
|
xs: 12,
|
|
41
35
|
md: 3,
|
|
42
36
|
lg: 3,
|
|
@@ -46,7 +40,6 @@ var DesignGrid = function DesignGrid() {
|
|
|
46
40
|
}
|
|
47
41
|
}, "333"))));
|
|
48
42
|
};
|
|
49
|
-
|
|
50
43
|
DesignGrid.displayName = "DesignGrid";
|
|
51
44
|
var _default = DesignGrid;
|
|
52
|
-
exports
|
|
45
|
+
exports["default"] = _default;
|
|
@@ -3,92 +3,84 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
require("../../styles/main.css");
|
|
13
|
-
|
|
14
10
|
require("./Grid.css");
|
|
15
|
-
|
|
16
11
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
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
|
-
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
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); }
|
|
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); }
|
|
26
19
|
var Grid = function Grid(_ref) {
|
|
27
20
|
var children = _ref.children,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
43
|
-
|
|
21
|
+
alignItems = _ref.alignItems,
|
|
22
|
+
alignContent = _ref.alignContent,
|
|
23
|
+
style = _ref.style,
|
|
24
|
+
spacing = _ref.spacing,
|
|
25
|
+
className = _ref.className,
|
|
26
|
+
onClick = _ref.onClick,
|
|
27
|
+
justify = _ref.justify,
|
|
28
|
+
id = _ref.id,
|
|
29
|
+
onKeyUp = _ref.onKeyUp,
|
|
30
|
+
sx = _ref.sx,
|
|
31
|
+
propPrefixClass = _ref.prefixClass;
|
|
32
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
33
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
34
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
44
35
|
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
45
36
|
var spacingValues = [null, 4, 8, 16, 32, 64];
|
|
46
37
|
var spacingValue = spacingValues[spacing] || 0;
|
|
47
|
-
|
|
48
38
|
var containerStyle = _objectSpread(_objectSpread({
|
|
49
39
|
marginTop: spacingValue > 0 && "-".concat(spacingValue / 2, "px"),
|
|
50
40
|
marginLeft: spacingValue > 0 && "-".concat(spacingValue / 2, "px"),
|
|
51
41
|
width: spacingValue > 0 && "calc(100% + ".concat(spacingValue / 2, "px)")
|
|
52
42
|
}, style), stylesInLine);
|
|
53
|
-
|
|
54
43
|
var itemSpacingStyle = {
|
|
55
44
|
paddingTop: spacingValue > 0 && "".concat(spacingValue / 2, "px"),
|
|
56
45
|
paddingLeft: spacingValue > 0 && "".concat(spacingValue / 2, "px")
|
|
57
46
|
};
|
|
58
|
-
|
|
59
47
|
var applySpacingStyle = function applySpacingStyle(child) {
|
|
60
|
-
if (
|
|
61
|
-
if (child.type === _react
|
|
62
|
-
return /*#__PURE__*/_react
|
|
48
|
+
if (/*#__PURE__*/_react["default"].isValidElement(child)) {
|
|
49
|
+
if (child.type === _react["default"].Fragment) {
|
|
50
|
+
return /*#__PURE__*/_react["default"].cloneElement(child, {}, _react["default"].Children.map(child.props.children, applySpacingStyle));
|
|
63
51
|
}
|
|
64
|
-
|
|
65
|
-
return /*#__PURE__*/_react.default.cloneElement(child, {
|
|
52
|
+
return /*#__PURE__*/_react["default"].cloneElement(child, {
|
|
66
53
|
spacingStyle: child.props.spacingStyle || itemSpacingStyle
|
|
67
54
|
});
|
|
68
55
|
}
|
|
69
|
-
|
|
70
56
|
return child;
|
|
71
57
|
};
|
|
72
|
-
|
|
73
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
74
59
|
id: id,
|
|
75
60
|
className: prefixClass("cbx-grid-container ".concat(className)),
|
|
76
61
|
onClick: onClick,
|
|
62
|
+
onKeyDown: onClick ? function (e) {
|
|
63
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
onClick(e);
|
|
66
|
+
}
|
|
67
|
+
} : undefined,
|
|
68
|
+
role: onClick ? 'button' : undefined,
|
|
69
|
+
tabIndex: onClick ? 0 : undefined,
|
|
77
70
|
onKeyUp: onKeyUp,
|
|
78
71
|
style: _objectSpread({
|
|
79
72
|
justifyContent: justify,
|
|
80
73
|
alignItems: alignItems,
|
|
81
74
|
alignContent: alignContent
|
|
82
75
|
}, containerStyle)
|
|
83
|
-
}, _react
|
|
76
|
+
}, _react["default"].Children.map(children, applySpacingStyle));
|
|
84
77
|
};
|
|
85
|
-
|
|
86
78
|
Grid.displayName = "Grid";
|
|
87
79
|
Grid.propTypes = {
|
|
88
|
-
spacing: _propTypes
|
|
80
|
+
spacing: _propTypes["default"].number
|
|
89
81
|
};
|
|
90
82
|
Grid.defaultProps = {
|
|
91
83
|
spacing: 3
|
|
92
84
|
};
|
|
93
85
|
var _default = Grid;
|
|
94
|
-
exports
|
|
86
|
+
exports["default"] = _default;
|
|
@@ -3,19 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = exports.DesignGrids = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _DesignGrid = _interopRequireDefault(require("./DesignGrid.stories"));
|
|
11
|
-
|
|
12
9
|
var _Grid = _interopRequireDefault(require("./Grid"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
11
|
var _default = {
|
|
17
12
|
title: 'Components/Grid',
|
|
18
|
-
component: _Grid
|
|
13
|
+
component: _Grid["default"],
|
|
19
14
|
argTypes: {},
|
|
20
15
|
parameters: {
|
|
21
16
|
storybookCodePanel: {
|
|
@@ -28,17 +23,15 @@ var _default = {
|
|
|
28
23
|
}
|
|
29
24
|
}
|
|
30
25
|
}; // const Template = args => <Grid {...args} />;
|
|
31
|
-
|
|
32
|
-
exports.default = _default;
|
|
33
|
-
|
|
26
|
+
exports["default"] = _default;
|
|
34
27
|
var TemplateGrid = function TemplateGrid(args) {
|
|
35
|
-
return /*#__PURE__*/_react
|
|
28
|
+
return /*#__PURE__*/_react["default"].createElement(_DesignGrid["default"], args);
|
|
36
29
|
};
|
|
37
|
-
|
|
38
30
|
TemplateGrid.displayName = "TemplateGrid";
|
|
39
31
|
// export const Default = Template.bind({});
|
|
40
32
|
// Default.args = {
|
|
41
33
|
// };
|
|
34
|
+
|
|
42
35
|
var DesignGrids = TemplateGrid.bind({});
|
|
43
36
|
exports.DesignGrids = DesignGrids;
|
|
44
37
|
DesignGrids.args = {};
|
|
@@ -3,59 +3,57 @@
|
|
|
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
|
require("../../styles/main.css");
|
|
11
|
-
|
|
12
9
|
require("./Grid.css");
|
|
13
|
-
|
|
14
10
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
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
|
-
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
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); }
|
|
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); }
|
|
26
19
|
var GridItem = function GridItem(_ref) {
|
|
27
20
|
var children = _ref.children,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
46
|
-
|
|
21
|
+
lg = _ref.lg,
|
|
22
|
+
md = _ref.md,
|
|
23
|
+
xs = _ref.xs,
|
|
24
|
+
sm = _ref.sm,
|
|
25
|
+
xl = _ref.xl,
|
|
26
|
+
style = _ref.style,
|
|
27
|
+
onClick = _ref.onClick,
|
|
28
|
+
_ref$className = _ref.className,
|
|
29
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
30
|
+
alignContent = _ref.alignContent,
|
|
31
|
+
propPrefixClass = _ref.prefixClass,
|
|
32
|
+
sx = _ref.sx,
|
|
33
|
+
spacingStyle = _ref.spacingStyle,
|
|
34
|
+
props = _ref.props;
|
|
35
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
36
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
37
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
47
38
|
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
48
|
-
return /*#__PURE__*/_react
|
|
39
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
49
40
|
className: prefixClass("cbx-grid-container-item xs-".concat(xs, " sm-").concat(sm, " md-").concat(md, " lg-").concat(lg, " xl-").concat(xl, " ").concat(className)),
|
|
50
41
|
style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, spacingStyle), style), stylesInLine), {}, {
|
|
51
42
|
alignContent: alignContent
|
|
52
43
|
}),
|
|
53
|
-
onClick: onClick
|
|
44
|
+
onClick: onClick,
|
|
45
|
+
onKeyDown: onClick ? function (e) {
|
|
46
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
onClick(e);
|
|
49
|
+
}
|
|
50
|
+
} : undefined,
|
|
51
|
+
role: onClick ? 'button' : undefined,
|
|
52
|
+
tabIndex: onClick ? 0 : undefined
|
|
54
53
|
}, props), children);
|
|
55
54
|
};
|
|
56
|
-
|
|
57
55
|
GridItem.displayName = "GridItem";
|
|
58
56
|
GridItem.propTypes = {};
|
|
59
57
|
GridItem.defaultProps = {};
|
|
60
58
|
var _default = GridItem;
|
|
61
|
-
exports
|
|
59
|
+
exports["default"] = _default;
|
|
@@ -3,28 +3,24 @@
|
|
|
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
|
require("../../styles/main.css");
|
|
11
|
-
|
|
12
9
|
var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
11
|
// import PropTypes from 'prop-types';
|
|
12
|
+
|
|
17
13
|
var GridItem = function GridItem(_ref) {
|
|
18
14
|
var children = _ref.children,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return /*#__PURE__*/_react
|
|
15
|
+
lg = _ref.lg,
|
|
16
|
+
md = _ref.md,
|
|
17
|
+
xs = _ref.xs,
|
|
18
|
+
style = _ref.style,
|
|
19
|
+
onClick = _ref.onClick,
|
|
20
|
+
_ref$className = _ref.className,
|
|
21
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
22
|
+
alignContent = _ref.alignContent;
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
28
24
|
item: true,
|
|
29
25
|
xs: xs,
|
|
30
26
|
md: md,
|
|
@@ -35,9 +31,8 @@ var GridItem = function GridItem(_ref) {
|
|
|
35
31
|
alignContent: alignContent
|
|
36
32
|
}, children);
|
|
37
33
|
};
|
|
38
|
-
|
|
39
34
|
GridItem.displayName = "GridItem";
|
|
40
35
|
GridItem.propTypes = {};
|
|
41
36
|
GridItem.defaultProps = {};
|
|
42
37
|
var _default = GridItem;
|
|
43
|
-
exports
|
|
38
|
+
exports["default"] = _default;
|
|
@@ -3,30 +3,24 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
|
|
13
|
-
|
|
14
10
|
require("../../styles/main.css");
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
12
|
var Grid = function Grid(_ref) {
|
|
19
13
|
var children = _ref.children,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return /*#__PURE__*/_react
|
|
14
|
+
alignItems = _ref.alignItems,
|
|
15
|
+
alignContent = _ref.alignContent,
|
|
16
|
+
style = _ref.style,
|
|
17
|
+
spacing = _ref.spacing,
|
|
18
|
+
className = _ref.className,
|
|
19
|
+
onClick = _ref.onClick,
|
|
20
|
+
justify = _ref.justify,
|
|
21
|
+
id = _ref.id,
|
|
22
|
+
onKeyUp = _ref.onKeyUp;
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
|
|
30
24
|
id: id,
|
|
31
25
|
classes: {
|
|
32
26
|
container: className
|
|
@@ -41,13 +35,12 @@ var Grid = function Grid(_ref) {
|
|
|
41
35
|
spacing: spacing
|
|
42
36
|
}, children);
|
|
43
37
|
};
|
|
44
|
-
|
|
45
38
|
Grid.displayName = "Grid";
|
|
46
39
|
Grid.propTypes = {
|
|
47
|
-
spacing: _propTypes
|
|
40
|
+
spacing: _propTypes["default"].number
|
|
48
41
|
};
|
|
49
42
|
Grid.defaultProps = {
|
|
50
43
|
spacing: 2
|
|
51
44
|
};
|
|
52
45
|
var _default = Grid;
|
|
53
|
-
exports
|
|
46
|
+
exports["default"] = _default;
|
|
@@ -3,67 +3,63 @@
|
|
|
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
|
require("../../styles/main.css");
|
|
11
|
-
|
|
12
9
|
var _Header = _interopRequireDefault(require("./Header"));
|
|
13
|
-
|
|
14
10
|
var _MenuItem = _interopRequireDefault(require("../MenuItem/MenuItem"));
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
12
|
// import ButtonBasic from '../ButtonBasic/ButtonBasic';
|
|
13
|
+
|
|
19
14
|
var DesignHeader = function DesignHeader() {
|
|
20
|
-
return /*#__PURE__*/_react
|
|
15
|
+
return /*#__PURE__*/_react["default"].createElement(_Header["default"], {
|
|
21
16
|
title: 'título aquí',
|
|
22
17
|
companyName: 'Compañía.con.nombre.muy.largo',
|
|
23
|
-
itemsDropDownUser: /*#__PURE__*/_react
|
|
18
|
+
itemsDropDownUser: /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
24
19
|
key: "1"
|
|
25
|
-
}, "Loremq ipsum dolor"), /*#__PURE__*/_react
|
|
20
|
+
}, "Loremq ipsum dolor"), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
26
21
|
key: "2"
|
|
27
|
-
}, "Lorem ipsum dolor"), /*#__PURE__*/_react
|
|
22
|
+
}, "Lorem ipsum dolor"), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
28
23
|
key: "3"
|
|
29
24
|
}, "Lorem ipsum dolor"))),
|
|
30
|
-
buttonNotificationIconItems: /*#__PURE__*/_react
|
|
25
|
+
buttonNotificationIconItems: /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
31
26
|
key: "1"
|
|
32
|
-
}, "Lorem ipsum dolor"), /*#__PURE__*/_react
|
|
27
|
+
}, "Lorem ipsum dolor"), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
33
28
|
key: "2"
|
|
34
|
-
}, "Lorem ipsum dolor"), /*#__PURE__*/_react
|
|
29
|
+
}, "Lorem ipsum dolor"), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
35
30
|
key: "3"
|
|
36
31
|
}, "Lorem ipsum dolor"))),
|
|
37
32
|
buttonNotificationBadge: true,
|
|
38
33
|
buttonNotificationProps: {
|
|
39
34
|
ringing: true,
|
|
40
35
|
animateRinging: true
|
|
41
|
-
}
|
|
36
|
+
}
|
|
37
|
+
// onClickButtonNotification={() => console.log('click')}
|
|
42
38
|
,
|
|
43
|
-
tooltipThirdDropdownUser: /*#__PURE__*/_react
|
|
39
|
+
tooltipThirdDropdownUser: /*#__PURE__*/_react["default"].createElement("div", {
|
|
44
40
|
className: "flex flex-col items-end gap-2"
|
|
45
|
-
}, /*#__PURE__*/_react
|
|
41
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
46
42
|
style: {
|
|
47
43
|
fontSize: '0.8rem'
|
|
48
44
|
}
|
|
49
|
-
}, "Lore"), /*#__PURE__*/_react
|
|
45
|
+
}, "Lore"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
50
46
|
style: {
|
|
51
47
|
fontSize: '0.7rem'
|
|
52
48
|
}
|
|
53
49
|
}, "cosas")),
|
|
54
|
-
logoAndDropdownSeparate: true
|
|
50
|
+
logoAndDropdownSeparate: true
|
|
51
|
+
// logoAndDropdownSeparate={false}
|
|
55
52
|
,
|
|
56
53
|
lock: false,
|
|
57
|
-
sectionCenter: true
|
|
54
|
+
sectionCenter: true
|
|
55
|
+
// thirdBlockActions={
|
|
58
56
|
// <div style={{ display: 'flex' }}>
|
|
59
57
|
// <div><ButtonBasic></ButtonBasic></div>
|
|
60
58
|
// <div><ButtonBasic></ButtonBasic></div>
|
|
61
59
|
// </div>
|
|
62
60
|
// }
|
|
63
|
-
|
|
64
61
|
});
|
|
65
62
|
};
|
|
66
|
-
|
|
67
63
|
DesignHeader.displayName = "DesignHeader";
|
|
68
64
|
var _default = DesignHeader;
|
|
69
|
-
exports
|
|
65
|
+
exports["default"] = _default;
|