@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,140 +1,113 @@
|
|
|
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
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
var _Tooltip = _interopRequireDefault(require("../Tooltip/Tooltip"));
|
|
13
|
-
|
|
14
11
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
15
|
-
|
|
16
12
|
var _ButtonBasic = _interopRequireDefault(require("../ButtonBasic/ButtonBasic"));
|
|
17
|
-
|
|
18
13
|
var _useWindowSize2 = _interopRequireDefault(require("../../HOCs/useWindowSize"));
|
|
19
|
-
|
|
20
14
|
require("./header.css");
|
|
21
|
-
|
|
22
15
|
var _DropDown = _interopRequireDefault(require("../DropDown/DropDown"));
|
|
23
|
-
|
|
24
16
|
var _IconButton = _interopRequireDefault(require("../IconButton/IconButton"));
|
|
25
|
-
|
|
26
17
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
39
|
-
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
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; }
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
24
|
+
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); }
|
|
25
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
40
26
|
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."); }
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
48
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
|
-
|
|
27
|
+
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; } }
|
|
28
|
+
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; }
|
|
29
|
+
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; } }
|
|
30
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
50
31
|
var Header = function Header(_ref) {
|
|
51
32
|
var back = _ref.back,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
115
|
-
|
|
33
|
+
dropdownLeft = _ref.dropdownLeft,
|
|
34
|
+
logoLeft = _ref.logoLeft,
|
|
35
|
+
logoLeftXS = _ref.logoLeftXS,
|
|
36
|
+
title = _ref.title,
|
|
37
|
+
lock = _ref.lock,
|
|
38
|
+
itemsDropDownMore = _ref.itemsDropDownMore,
|
|
39
|
+
logoRight = _ref.logoRight,
|
|
40
|
+
logoRightXS = _ref.logoRightXS,
|
|
41
|
+
finish = _ref.finish,
|
|
42
|
+
textFinishButton = _ref.textFinishButton,
|
|
43
|
+
companyName = _ref.companyName,
|
|
44
|
+
moreIcon = _ref.moreIcon,
|
|
45
|
+
iconButtonRight = _ref.iconButtonRight,
|
|
46
|
+
sectionCenter = _ref.sectionCenter,
|
|
47
|
+
itemsDropDownUser = _ref.itemsDropDownUser,
|
|
48
|
+
lockIcon = _ref.lockIcon,
|
|
49
|
+
logoAndDropdownSeparate = _ref.logoAndDropdownSeparate,
|
|
50
|
+
backgroundIconButtonRight = _ref.backgroundIconButtonRight,
|
|
51
|
+
onClickIconButtonRight = _ref.onClickIconButtonRight,
|
|
52
|
+
colorNoLogo = _ref.colorNoLogo,
|
|
53
|
+
actionLogoLeft = _ref.actionLogoLeft,
|
|
54
|
+
backIcon = _ref.backIcon,
|
|
55
|
+
dropdownLeftIcon = _ref.dropdownLeftIcon,
|
|
56
|
+
finishButtonVariant = _ref.finishButtonVariant,
|
|
57
|
+
finishButtonIcon = _ref.finishButtonIcon,
|
|
58
|
+
iconButtonBackProps = _ref.iconButtonBackProps,
|
|
59
|
+
iconButtonDropdownLeftProps = _ref.iconButtonDropdownLeftProps,
|
|
60
|
+
dropdownLeftProps = _ref.dropdownLeftProps,
|
|
61
|
+
typographyLogoLeftProps = _ref.typographyLogoLeftProps,
|
|
62
|
+
typographySectionCenterProps = _ref.typographySectionCenterProps,
|
|
63
|
+
itemsDropDownMoreIconButtonProps = _ref.itemsDropDownMoreIconButtonProps,
|
|
64
|
+
itemsDropDownMoreProps = _ref.itemsDropDownMoreProps,
|
|
65
|
+
finishIconButtonProps = _ref.finishIconButtonProps,
|
|
66
|
+
finishButtonBasicProps = _ref.finishButtonBasicProps,
|
|
67
|
+
iconButtonRightProps = _ref.iconButtonRightProps,
|
|
68
|
+
itemsDropDownUserProps = _ref.itemsDropDownUserProps,
|
|
69
|
+
demoMode = _ref.demoMode,
|
|
70
|
+
onClickButtonNotification = _ref.onClickButtonNotification,
|
|
71
|
+
buttonNotificationIcon = _ref.buttonNotificationIcon,
|
|
72
|
+
buttonNotificationProps = _ref.buttonNotificationProps,
|
|
73
|
+
buttonNotificationBadge = _ref.buttonNotificationBadge,
|
|
74
|
+
styleIconButtonRightContainer = _ref.styleIconButtonRightContainer,
|
|
75
|
+
styleIconButtonRight = _ref.styleIconButtonRight,
|
|
76
|
+
placementTooltipThirdDropdownUser = _ref.placementTooltipThirdDropdownUser,
|
|
77
|
+
tooltipThirdDropdownUser = _ref.tooltipThirdDropdownUser,
|
|
78
|
+
onClickButtonFileManager = _ref.onClickButtonFileManager,
|
|
79
|
+
buttonFileManagerIcon = _ref.buttonFileManagerIcon,
|
|
80
|
+
buttonFileManagerProgressAutoDownload = _ref.buttonFileManagerProgressAutoDownload,
|
|
81
|
+
buttonFileManagerProgressDownload = _ref.buttonFileManagerProgressDownload,
|
|
82
|
+
buttonFileManagerBadge = _ref.buttonFileManagerBadge,
|
|
83
|
+
buttonFileManagerItems = _ref.buttonFileManagerItems,
|
|
84
|
+
buttonFileManagerProps = _ref.buttonFileManagerProps,
|
|
85
|
+
buttonFileManagerDropDownProps = _ref.buttonFileManagerDropDownProps,
|
|
86
|
+
sx = _ref.sx,
|
|
87
|
+
propPrefixClass = _ref.prefixClass,
|
|
88
|
+
showTypographyLogoLeft = _ref.showTypographyLogoLeft,
|
|
89
|
+
buttonNotificationIconItems = _ref.buttonNotificationIconItems,
|
|
90
|
+
buttonNotificationIconDropDownProps = _ref.buttonNotificationIconDropDownProps,
|
|
91
|
+
thirdBlockActions = _ref.thirdBlockActions;
|
|
92
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
93
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
94
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
116
95
|
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
isEllipsisActive = _React$useState2[0],
|
|
127
|
-
setIsEllipsisActive = _React$useState2[1];
|
|
128
|
-
|
|
129
|
-
_react.default.useEffect(function () {
|
|
96
|
+
var _useWindowSize = (0, _useWindowSize2["default"])(),
|
|
97
|
+
innerWidth = _useWindowSize.innerWidth,
|
|
98
|
+
breakpoints = _useWindowSize.breakpoints;
|
|
99
|
+
var companyNameRef = _react["default"].useRef(null);
|
|
100
|
+
var _React$useState = _react["default"].useState(false),
|
|
101
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
102
|
+
isEllipsisActive = _React$useState2[0],
|
|
103
|
+
setIsEllipsisActive = _React$useState2[1];
|
|
104
|
+
_react["default"].useEffect(function () {
|
|
130
105
|
if (!companyNameRef.current) return;
|
|
131
106
|
var element = companyNameRef.current;
|
|
132
|
-
|
|
133
107
|
var checkEllipsis = function checkEllipsis() {
|
|
134
108
|
var hasEllipsis = element.scrollWidth > element.clientWidth;
|
|
135
109
|
setIsEllipsisActive(hasEllipsis);
|
|
136
110
|
};
|
|
137
|
-
|
|
138
111
|
requestAnimationFrame(checkEllipsis);
|
|
139
112
|
var resizeObserver = new ResizeObserver(checkEllipsis);
|
|
140
113
|
resizeObserver.observe(element);
|
|
@@ -142,36 +115,27 @@ var Header = function Header(_ref) {
|
|
|
142
115
|
return resizeObserver.disconnect();
|
|
143
116
|
};
|
|
144
117
|
}, [companyName]);
|
|
145
|
-
|
|
146
118
|
var getWidthBlockFirst = function getWidthBlockFirst() {
|
|
147
119
|
var width = '11.563rem';
|
|
148
|
-
|
|
149
120
|
if (innerWidth < breakpoints.md) {
|
|
150
121
|
width = '5.8rem';
|
|
151
|
-
|
|
152
122
|
if ((logoLeft || logoLeftXS || logoLeft === '') && !back && !dropdownLeft) {
|
|
153
123
|
width = '3rem';
|
|
154
124
|
}
|
|
155
125
|
}
|
|
156
|
-
|
|
157
126
|
if (logoLeft === 'noLogo') {
|
|
158
127
|
width = 'var(--spacing40)';
|
|
159
128
|
}
|
|
160
|
-
|
|
161
129
|
return width;
|
|
162
130
|
};
|
|
163
|
-
|
|
164
131
|
var getWidthBlockThird = function getWidthBlockThird() {
|
|
165
132
|
var width = '11.563rem';
|
|
166
|
-
|
|
167
133
|
if (innerWidth < breakpoints.md) {
|
|
168
134
|
width = '5.7rem';
|
|
169
|
-
|
|
170
135
|
if (logoRight && logoRightXS && logoAndDropdownSeparate && !iconButtonRight && !itemsDropDownUser) {
|
|
171
136
|
width = '3rem';
|
|
172
137
|
}
|
|
173
138
|
}
|
|
174
|
-
|
|
175
139
|
if (!logoRight && !logoRightXS) {
|
|
176
140
|
if (onClickButtonFileManager || onClickButtonNotification) {
|
|
177
141
|
width = '9.375rem';
|
|
@@ -179,15 +143,13 @@ var Header = function Header(_ref) {
|
|
|
179
143
|
width = '2.5rem';
|
|
180
144
|
}
|
|
181
145
|
}
|
|
182
|
-
|
|
183
146
|
return width;
|
|
184
147
|
};
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
148
|
+
var renderlogoAndDropdownUnited = _react["default"].useMemo(function () {
|
|
149
|
+
return /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
188
150
|
title: tooltipThirdDropdownUser || '',
|
|
189
151
|
placement: placementTooltipThirdDropdownUser
|
|
190
|
-
}, /*#__PURE__*/_react
|
|
152
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_ButtonBasic["default"], _extends({
|
|
191
153
|
id: 'cbx-header-third-dropdown-user',
|
|
192
154
|
variant: 'tertiary',
|
|
193
155
|
"aria-label": 'Actions Button',
|
|
@@ -195,54 +157,52 @@ var Header = function Header(_ref) {
|
|
|
195
157
|
paddingRight: '0.125rem'
|
|
196
158
|
},
|
|
197
159
|
prefixClass: prefixClass,
|
|
198
|
-
text: /*#__PURE__*/_react
|
|
160
|
+
text: /*#__PURE__*/_react["default"].createElement("div", {
|
|
199
161
|
className: prefixClass('cbx-header-third-button-container')
|
|
200
|
-
}, logoRight && /*#__PURE__*/_react
|
|
162
|
+
}, logoRight && /*#__PURE__*/_react["default"].createElement("div", {
|
|
201
163
|
className: prefixClass('cbx-header-third-container-logo-right')
|
|
202
|
-
}, /*#__PURE__*/_react
|
|
164
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
203
165
|
id: 'cbx-header-third-logo-right',
|
|
204
166
|
className: prefixClass('cbx-header-third-logo-right'),
|
|
205
167
|
src: innerWidth < breakpoints.md ? logoRightXS || logoRight : logoRight,
|
|
206
|
-
alt: "logo"
|
|
207
|
-
})), /*#__PURE__*/_react
|
|
168
|
+
alt: "Secondary logo"
|
|
169
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
208
170
|
className: prefixClass('cbx-header-third-button-user-logo'),
|
|
209
171
|
style: _objectSpread({}, styleIconButtonRightContainer)
|
|
210
|
-
}, iconButtonRight || /*#__PURE__*/_react
|
|
172
|
+
}, iconButtonRight || /*#__PURE__*/_react["default"].createElement("i", {
|
|
211
173
|
className: "ri-user-3-line",
|
|
212
174
|
style: _objectSpread({}, styleIconButtonRight)
|
|
213
175
|
})))
|
|
214
176
|
}, iconButtonRightProps))));
|
|
215
177
|
}, [tooltipThirdDropdownUser, placementTooltipThirdDropdownUser, logoRightXS, logoRight, breakpoints, innerWidth, styleIconButtonRightContainer, styleIconButtonRight, iconButtonRightProps]);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, iconButtonRight && /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
178
|
+
var renderlogoAndDropdownSeparated = _react["default"].useMemo(function () {
|
|
179
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, iconButtonRight && /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
219
180
|
prefixClass: prefixClass,
|
|
220
181
|
"aria-label": "Button user",
|
|
221
182
|
id: 'cbx-header-third-button-user',
|
|
222
183
|
className: prefixClass('cbx-header-third-button-user cbx-header-button'),
|
|
223
184
|
styles: _objectSpread({}, styleIconButtonRightContainer),
|
|
224
|
-
icon: iconButtonRight || /*#__PURE__*/_react
|
|
185
|
+
icon: iconButtonRight || /*#__PURE__*/_react["default"].createElement("i", {
|
|
225
186
|
className: "ri-user-3-line",
|
|
226
187
|
style: _objectSpread({}, styleIconButtonRight)
|
|
227
188
|
})
|
|
228
|
-
}, iconButtonRightProps)), (logoRight || logoRightXS) && !iconButtonRight && /*#__PURE__*/_react
|
|
189
|
+
}, iconButtonRightProps)), (logoRight || logoRightXS) && !iconButtonRight && /*#__PURE__*/_react["default"].createElement("img", {
|
|
229
190
|
style: {
|
|
230
191
|
cursor: 'pointer'
|
|
231
192
|
},
|
|
232
193
|
id: 'cbx-header-third-logo-right',
|
|
233
194
|
className: prefixClass('cbx-header-third-logo-right'),
|
|
234
195
|
src: innerWidth < breakpoints.md ? logoRightXS || logoRight : logoRight,
|
|
235
|
-
alt: "logo"
|
|
196
|
+
alt: "Secondary logo"
|
|
236
197
|
}));
|
|
237
198
|
}, [styleIconButtonRightContainer, styleIconButtonRight, iconButtonRightProps, logoRight, logoRightXS, innerWidth, breakpoints]);
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
199
|
+
var getCompanyName = _react["default"].useCallback(function () {
|
|
200
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
241
201
|
className: prefixClass('cbx-header-first-container-app-logo-text-empty')
|
|
242
|
-
}, /*#__PURE__*/_react
|
|
202
|
+
}, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
243
203
|
title: isEllipsisActive ? companyName : '',
|
|
244
204
|
placement: "bottom"
|
|
245
|
-
}, /*#__PURE__*/_react
|
|
205
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], _extends({
|
|
246
206
|
prefixClass: prefixClass,
|
|
247
207
|
ref: companyNameRef,
|
|
248
208
|
color: logoLeft ? 'var(--gray4)' : 'var(--primary)',
|
|
@@ -260,124 +220,124 @@ var Header = function Header(_ref) {
|
|
|
260
220
|
}
|
|
261
221
|
}), companyName)));
|
|
262
222
|
}, [companyName, prefixClass, typographyLogoLeftProps, isEllipsisActive]);
|
|
263
|
-
|
|
264
|
-
return /*#__PURE__*/_react.default.createElement("header", {
|
|
223
|
+
return /*#__PURE__*/_react["default"].createElement("header", {
|
|
265
224
|
id: 'cbx-header-app-header',
|
|
266
225
|
className: prefixClass('App-header'),
|
|
267
226
|
style: _objectSpread({}, stylesInLine)
|
|
268
|
-
}, /*#__PURE__*/_react
|
|
227
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
269
228
|
className: prefixClass('cbx-header-first-block'),
|
|
270
229
|
style: {
|
|
271
230
|
minWidth: getWidthBlockFirst(),
|
|
272
231
|
marginRight: innerWidth < breakpoints.md ? 'var(--spacing8)' : 'var(--spacing24)'
|
|
273
232
|
}
|
|
274
|
-
}, back && /*#__PURE__*/_react
|
|
233
|
+
}, back && /*#__PURE__*/_react["default"].createElement("div", {
|
|
275
234
|
className: prefixClass('cbx-header-first-container-button-dropdown-left')
|
|
276
|
-
}, /*#__PURE__*/_react
|
|
235
|
+
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
277
236
|
prefixClass: prefixClass,
|
|
278
237
|
"aria-label": "Button Left",
|
|
279
238
|
id: 'cbx-header-first-button-left',
|
|
280
239
|
className: prefixClass('cbx-header-first-button-left cbx-header-button'),
|
|
281
240
|
onClick: back,
|
|
282
|
-
icon: backIcon || /*#__PURE__*/_react
|
|
241
|
+
icon: backIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
283
242
|
className: "ri-arrow-left-line"
|
|
284
243
|
})
|
|
285
|
-
}, iconButtonBackProps))), dropdownLeft && /*#__PURE__*/_react
|
|
244
|
+
}, iconButtonBackProps))), dropdownLeft && /*#__PURE__*/_react["default"].createElement("div", {
|
|
286
245
|
className: prefixClass('cbx-header-first-container-button-dropdown-left')
|
|
287
|
-
}, /*#__PURE__*/_react
|
|
246
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDown["default"], _extends({
|
|
288
247
|
prefixClass: prefixClass,
|
|
289
248
|
color: "transparent",
|
|
290
249
|
Component: function Component() {
|
|
291
|
-
return /*#__PURE__*/_react
|
|
250
|
+
return /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
292
251
|
prefixClass: prefixClass,
|
|
293
252
|
"aria-label": "Drop Down Button Left",
|
|
294
253
|
id: 'cbx-header-button-more',
|
|
295
254
|
className: prefixClass('cbx-header-first-button-left cbx-header-button'),
|
|
296
|
-
icon: dropdownLeftIcon || /*#__PURE__*/_react
|
|
255
|
+
icon: dropdownLeftIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
297
256
|
className: "ri-arrow-down-s-line"
|
|
298
257
|
})
|
|
299
258
|
}, iconButtonDropdownLeftProps));
|
|
300
259
|
},
|
|
301
260
|
items: dropdownLeft,
|
|
302
261
|
closeOnOptionClick: true
|
|
303
|
-
}, dropdownLeftProps))), logoLeft ? logoLeft !== 'noLogo' && /*#__PURE__*/_react
|
|
262
|
+
}, dropdownLeftProps))), logoLeft ? logoLeft !== 'noLogo' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
304
263
|
className: prefixClass("cbx-header-first-container-app-logo".concat(showTypographyLogoLeft ? '-empty' : '')),
|
|
305
264
|
onClick: actionLogoLeft,
|
|
306
265
|
style: {
|
|
307
266
|
cursor: actionLogoLeft ? 'pointer' : 'auto'
|
|
308
267
|
}
|
|
309
|
-
}, /*#__PURE__*/_react
|
|
268
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
310
269
|
id: 'cbx-header-first-app-logo',
|
|
311
270
|
src: innerWidth < breakpoints.md ? logoLeftXS || logoLeft : logoLeft,
|
|
312
271
|
className: prefixClass('App-logo-header-ui'),
|
|
313
|
-
alt: "logo"
|
|
314
|
-
}), showTypographyLogoLeft && getCompanyName()) : /*#__PURE__*/_react
|
|
272
|
+
alt: "Main logo"
|
|
273
|
+
}), showTypographyLogoLeft && getCompanyName()) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
315
274
|
className: prefixClass('cbx-header-first-container-app-logo-empty'),
|
|
316
275
|
onClick: actionLogoLeft,
|
|
317
276
|
style: {
|
|
318
277
|
cursor: actionLogoLeft ? 'pointer' : 'auto'
|
|
319
278
|
}
|
|
320
|
-
}, /*#__PURE__*/_react
|
|
279
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
321
280
|
style: _objectSpread({}, colorNoLogo),
|
|
322
281
|
alt: "logo",
|
|
323
282
|
id: 'cbx-header-first-app-logo',
|
|
324
283
|
className: prefixClass('cbx-header-first-app-logo-empty')
|
|
325
|
-
}, /*#__PURE__*/_react
|
|
284
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
326
285
|
className: "ri-building-2-line"
|
|
327
|
-
})), (showTypographyLogoLeft || innerWidth > breakpoints.md) && getCompanyName())), sectionCenter === true && /*#__PURE__*/_react
|
|
286
|
+
})), (showTypographyLogoLeft || innerWidth > breakpoints.md) && getCompanyName())), sectionCenter === true && /*#__PURE__*/_react["default"].createElement("div", {
|
|
328
287
|
className: prefixClass('cbx-header-second-block')
|
|
329
|
-
}, lock && /*#__PURE__*/_react
|
|
288
|
+
}, lock && /*#__PURE__*/_react["default"].createElement("div", {
|
|
330
289
|
className: prefixClass('cbx-header-second-container-lock')
|
|
331
|
-
}, lockIcon || /*#__PURE__*/_react
|
|
290
|
+
}, lockIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
332
291
|
className: "ri-lock-line"
|
|
333
|
-
})), /*#__PURE__*/_react
|
|
292
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
334
293
|
className: prefixClass('cbx-header-second-container-text'),
|
|
335
294
|
style: {
|
|
336
295
|
minWidth: innerWidth < breakpoints.md ? '5rem' : '7.5rem'
|
|
337
296
|
}
|
|
338
|
-
}, /*#__PURE__*/_react
|
|
297
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], _extends({
|
|
339
298
|
prefixClass: prefixClass,
|
|
340
299
|
color: 'var(--gray5)',
|
|
341
300
|
fontWeight: '700',
|
|
342
|
-
component: 'span'
|
|
301
|
+
component: 'span',
|
|
302
|
+
componet: 'h1'
|
|
343
303
|
}, typographySectionCenterProps, {
|
|
344
304
|
styles: {
|
|
345
305
|
fontSize: '1.125rem',
|
|
346
306
|
lineHeight: '1.375rem'
|
|
347
307
|
}
|
|
348
|
-
}), title)), itemsDropDownMore && /*#__PURE__*/_react
|
|
308
|
+
}), title)), itemsDropDownMore && /*#__PURE__*/_react["default"].createElement("div", {
|
|
349
309
|
className: prefixClass('cbx-header-second-container-more'),
|
|
350
310
|
style: {
|
|
351
311
|
margin: innerWidth > breakpoints.md && '0 1rem'
|
|
352
312
|
}
|
|
353
|
-
}, /*#__PURE__*/_react
|
|
313
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDown["default"], _extends({
|
|
354
314
|
prefixClass: prefixClass,
|
|
355
315
|
color: "transparent",
|
|
356
316
|
Component: function Component() {
|
|
357
|
-
return /*#__PURE__*/_react
|
|
317
|
+
return /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
358
318
|
prefixClass: prefixClass,
|
|
359
319
|
"aria-label": "Drop Down Button More",
|
|
360
320
|
id: 'cbx-header-button-more',
|
|
361
321
|
className: prefixClass('cbx-header-second-button-more cbx-header-button'),
|
|
362
|
-
icon: moreIcon || /*#__PURE__*/_react
|
|
322
|
+
icon: moreIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
363
323
|
className: "ri-more-2-fill"
|
|
364
324
|
})
|
|
365
325
|
}, itemsDropDownMoreIconButtonProps));
|
|
366
326
|
},
|
|
367
327
|
items: itemsDropDownMore,
|
|
368
328
|
closeOnOptionClick: true
|
|
369
|
-
}, itemsDropDownMoreProps))), !!finish && /*#__PURE__*/_react
|
|
329
|
+
}, itemsDropDownMoreProps))), !!finish && /*#__PURE__*/_react["default"].createElement("div", {
|
|
370
330
|
className: prefixClass('cbx-header-second-container-finish')
|
|
371
|
-
}, innerWidth < breakpoints.md ? /*#__PURE__*/_react
|
|
331
|
+
}, innerWidth < breakpoints.md ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
372
332
|
prefixClass: prefixClass,
|
|
373
|
-
"aria-label":
|
|
333
|
+
"aria-label": textFinishButton || 'Cerrar sesión',
|
|
374
334
|
id: 'cbx-header-button-logout',
|
|
375
335
|
className: prefixClass('cbx-header-second-button-icon-logout cbx-header-button'),
|
|
376
336
|
onClick: finish,
|
|
377
|
-
icon: finishButtonIcon || /*#__PURE__*/_react
|
|
337
|
+
icon: finishButtonIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
378
338
|
className: "ri-logout-circle-r-line"
|
|
379
339
|
})
|
|
380
|
-
}, finishIconButtonProps)) : /*#__PURE__*/_react
|
|
340
|
+
}, finishIconButtonProps)) : /*#__PURE__*/_react["default"].createElement(_ButtonBasic["default"], _extends({
|
|
381
341
|
prefixClass: prefixClass,
|
|
382
342
|
id: 'cbx-header-button-logout',
|
|
383
343
|
variant: finishButtonVariant || 'secondary',
|
|
@@ -388,13 +348,13 @@ var Header = function Header(_ref) {
|
|
|
388
348
|
text: textFinishButton,
|
|
389
349
|
onClick: finish,
|
|
390
350
|
"aria-label": 'Actions Button'
|
|
391
|
-
}, finishButtonBasicProps)))), /*#__PURE__*/_react
|
|
351
|
+
}, finishButtonBasicProps)))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
392
352
|
className: prefixClass('cbx-header-third-block'),
|
|
393
353
|
style: {
|
|
394
354
|
minWidth: getWidthBlockThird(),
|
|
395
355
|
marginLeft: innerWidth < breakpoints.md ? 'var(--spacing8)' : 'var(--spacing24)'
|
|
396
356
|
}
|
|
397
|
-
}, demoMode && /*#__PURE__*/_react
|
|
357
|
+
}, demoMode && /*#__PURE__*/_react["default"].createElement("div", {
|
|
398
358
|
style: {
|
|
399
359
|
alignSelf: 'top',
|
|
400
360
|
textAlign: 'center',
|
|
@@ -406,21 +366,21 @@ var Header = function Header(_ref) {
|
|
|
406
366
|
bottom: '22px',
|
|
407
367
|
width: '3.93rem'
|
|
408
368
|
}
|
|
409
|
-
}, "DEMO"), logoAndDropdownSeparate ? /*#__PURE__*/_react
|
|
369
|
+
}, "DEMO"), logoAndDropdownSeparate ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
410
370
|
className: prefixClass('cbx-header-third-container')
|
|
411
|
-
}, thirdBlockActions, !!onClickButtonFileManager && /*#__PURE__*/_react
|
|
371
|
+
}, thirdBlockActions, !!onClickButtonFileManager && /*#__PURE__*/_react["default"].createElement("div", {
|
|
412
372
|
className: prefixClass('cbx-header-third-button-notification-container-noSeparate')
|
|
413
|
-
}, /*#__PURE__*/_react
|
|
373
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDown["default"], _extends({
|
|
414
374
|
prefixClass: prefixClass,
|
|
415
375
|
color: "transparent",
|
|
416
376
|
Component: function Component() {
|
|
417
|
-
return /*#__PURE__*/_react
|
|
377
|
+
return /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
418
378
|
prefixClass: prefixClass,
|
|
419
|
-
"aria-label": "",
|
|
379
|
+
"aria-label": "Gestor de archivos",
|
|
420
380
|
id: 'cbx-header-third-button-buttonFileManager',
|
|
421
381
|
className: prefixClass('cbx-header-third-button-buttonFileManager'),
|
|
422
382
|
onClick: onClickButtonFileManager,
|
|
423
|
-
icon: buttonFileManagerIcon || /*#__PURE__*/_react
|
|
383
|
+
icon: buttonFileManagerIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
424
384
|
className: "ri-swap-line"
|
|
425
385
|
}),
|
|
426
386
|
progressAuto: buttonFileManagerProgressAutoDownload,
|
|
@@ -429,19 +389,19 @@ var Header = function Header(_ref) {
|
|
|
429
389
|
}, buttonFileManagerProps));
|
|
430
390
|
},
|
|
431
391
|
items: buttonFileManagerItems
|
|
432
|
-
}, buttonFileManagerDropDownProps))), buttonNotificationIconItems ? /*#__PURE__*/_react
|
|
392
|
+
}, buttonFileManagerDropDownProps))), buttonNotificationIconItems ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
433
393
|
className: prefixClass('cbx-header-third-button-notification-container')
|
|
434
|
-
}, /*#__PURE__*/_react
|
|
394
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDown["default"], _extends({
|
|
435
395
|
prefixClass: prefixClass,
|
|
436
396
|
color: "transparent",
|
|
437
397
|
Component: function Component() {
|
|
438
|
-
return /*#__PURE__*/_react
|
|
398
|
+
return /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
439
399
|
prefixClass: prefixClass,
|
|
440
|
-
"aria-label": "",
|
|
400
|
+
"aria-label": "Notificaciones",
|
|
441
401
|
id: 'cbx-header-third-button-notification',
|
|
442
402
|
className: prefixClass('cbx-header-third-button-notification'),
|
|
443
403
|
onClick: onClickButtonNotification,
|
|
444
|
-
icon: buttonNotificationIcon || /*#__PURE__*/_react
|
|
404
|
+
icon: buttonNotificationIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
445
405
|
className: "ri-notification-3-line"
|
|
446
406
|
}),
|
|
447
407
|
badge: buttonNotificationBadge
|
|
@@ -449,22 +409,22 @@ var Header = function Header(_ref) {
|
|
|
449
409
|
},
|
|
450
410
|
items: buttonNotificationIconItems,
|
|
451
411
|
closeOnOptionClick: true
|
|
452
|
-
}, buttonNotificationIconDropDownProps))) : onClickButtonNotification && /*#__PURE__*/_react
|
|
412
|
+
}, buttonNotificationIconDropDownProps))) : onClickButtonNotification && /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
453
413
|
prefixClass: prefixClass,
|
|
454
414
|
"aria-label": "",
|
|
455
415
|
id: 'cbx-header-third-button-notification',
|
|
456
416
|
className: prefixClass('cbx-header-third-button-notification'),
|
|
457
417
|
onClick: onClickButtonNotification,
|
|
458
|
-
icon: buttonNotificationIcon || /*#__PURE__*/_react
|
|
418
|
+
icon: buttonNotificationIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
459
419
|
className: "ri-notification-3-line"
|
|
460
420
|
}),
|
|
461
421
|
badge: buttonNotificationBadge
|
|
462
|
-
}, buttonNotificationProps)), (logoRight || logoRightXS) && (!itemsDropDownUser || iconButtonRight) && /*#__PURE__*/_react
|
|
422
|
+
}, buttonNotificationProps)), (logoRight || logoRightXS) && (!itemsDropDownUser || iconButtonRight) && /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("img", {
|
|
463
423
|
id: 'cbx-header-third-logo-right',
|
|
464
424
|
className: prefixClass('cbx-header-third-logo-right'),
|
|
465
425
|
src: innerWidth < breakpoints.md ? logoRightXS || logoRight : logoRight,
|
|
466
|
-
alt: "logo"
|
|
467
|
-
})), !!iconButtonRight && !itemsDropDownUser && /*#__PURE__*/_react
|
|
426
|
+
alt: "Secondary logo"
|
|
427
|
+
})), !!iconButtonRight && !itemsDropDownUser && /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
468
428
|
prefixClass: prefixClass,
|
|
469
429
|
"aria-label": "Button user",
|
|
470
430
|
id: 'cbx-header-third-button-user',
|
|
@@ -477,11 +437,11 @@ var Header = function Header(_ref) {
|
|
|
477
437
|
background: backgroundIconButtonRight
|
|
478
438
|
},
|
|
479
439
|
onClick: onClickIconButtonRight
|
|
480
|
-
}, iconButtonRightProps)), itemsDropDownUser && /*#__PURE__*/_react
|
|
440
|
+
}, iconButtonRightProps)), itemsDropDownUser && /*#__PURE__*/_react["default"].createElement("div", {
|
|
481
441
|
style: {
|
|
482
442
|
marginLeft: 'var(--spacing4)'
|
|
483
443
|
}
|
|
484
|
-
}, /*#__PURE__*/_react
|
|
444
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDown["default"], _extends({
|
|
485
445
|
prefixClass: prefixClass,
|
|
486
446
|
color: "transparent",
|
|
487
447
|
anchorOrigin: {
|
|
@@ -495,21 +455,21 @@ var Header = function Header(_ref) {
|
|
|
495
455
|
Component: renderlogoAndDropdownSeparated,
|
|
496
456
|
items: itemsDropDownUser,
|
|
497
457
|
closeOnOptionClick: true
|
|
498
|
-
}, itemsDropDownUserProps)))) : /*#__PURE__*/_react
|
|
458
|
+
}, itemsDropDownUserProps)))) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
499
459
|
className: prefixClass('cbx-header-third-container')
|
|
500
|
-
}, thirdBlockActions, !!onClickButtonFileManager && /*#__PURE__*/_react
|
|
460
|
+
}, thirdBlockActions, !!onClickButtonFileManager && /*#__PURE__*/_react["default"].createElement("div", {
|
|
501
461
|
className: prefixClass('cbx-header-third-button-notification-container-noSeparate')
|
|
502
|
-
}, /*#__PURE__*/_react
|
|
462
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDown["default"], _extends({
|
|
503
463
|
prefixClass: prefixClass,
|
|
504
464
|
color: "transparent",
|
|
505
465
|
Component: function Component() {
|
|
506
|
-
return /*#__PURE__*/_react
|
|
466
|
+
return /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
507
467
|
prefixClass: prefixClass,
|
|
508
468
|
"aria-label": "",
|
|
509
469
|
id: 'cbx-header-third-button-buttonFileManager',
|
|
510
470
|
className: prefixClass('cbx-header-third-button-buttonFileManager'),
|
|
511
471
|
onClick: onClickButtonFileManager,
|
|
512
|
-
icon: buttonFileManagerIcon || /*#__PURE__*/_react
|
|
472
|
+
icon: buttonFileManagerIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
513
473
|
className: "ri-swap-line"
|
|
514
474
|
}),
|
|
515
475
|
progressAuto: buttonFileManagerProgressAutoDownload,
|
|
@@ -518,19 +478,19 @@ var Header = function Header(_ref) {
|
|
|
518
478
|
}, buttonFileManagerProps));
|
|
519
479
|
},
|
|
520
480
|
items: buttonFileManagerItems
|
|
521
|
-
}, buttonFileManagerDropDownProps))), buttonNotificationIconItems ? /*#__PURE__*/_react
|
|
481
|
+
}, buttonFileManagerDropDownProps))), buttonNotificationIconItems ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
522
482
|
className: prefixClass('cbx-header-third-button-notification-container-noSeparate')
|
|
523
|
-
}, /*#__PURE__*/_react
|
|
483
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDown["default"], _extends({
|
|
524
484
|
prefixClass: prefixClass,
|
|
525
485
|
color: "transparent",
|
|
526
486
|
Component: function Component() {
|
|
527
|
-
return /*#__PURE__*/_react
|
|
487
|
+
return /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
528
488
|
prefixClass: prefixClass,
|
|
529
489
|
"aria-label": "",
|
|
530
490
|
id: 'cbx-header-third-button-notification',
|
|
531
491
|
className: prefixClass('cbx-header-third-button-notification'),
|
|
532
492
|
onClick: onClickButtonNotification,
|
|
533
|
-
icon: buttonNotificationIcon || /*#__PURE__*/_react
|
|
493
|
+
icon: buttonNotificationIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
534
494
|
className: "ri-notification-3-line",
|
|
535
495
|
style: {
|
|
536
496
|
fontSize: '1.5rem'
|
|
@@ -541,20 +501,20 @@ var Header = function Header(_ref) {
|
|
|
541
501
|
},
|
|
542
502
|
items: buttonNotificationIconItems,
|
|
543
503
|
closeOnOptionClick: true
|
|
544
|
-
}, buttonNotificationIconDropDownProps))) : onClickButtonNotification && /*#__PURE__*/_react
|
|
504
|
+
}, buttonNotificationIconDropDownProps))) : onClickButtonNotification && /*#__PURE__*/_react["default"].createElement(_IconButton["default"], _extends({
|
|
545
505
|
prefixClass: prefixClass,
|
|
546
506
|
"aria-label": "",
|
|
547
507
|
id: 'cbx-header-third-button-notification',
|
|
548
508
|
className: prefixClass('cbx-header-third-button-notification'),
|
|
549
509
|
onClick: onClickButtonNotification,
|
|
550
|
-
icon: buttonNotificationIcon || /*#__PURE__*/_react
|
|
510
|
+
icon: buttonNotificationIcon || /*#__PURE__*/_react["default"].createElement("i", {
|
|
551
511
|
className: "ri-notification-3-line",
|
|
552
512
|
style: {
|
|
553
513
|
fontSize: '1.5rem'
|
|
554
514
|
}
|
|
555
515
|
}),
|
|
556
516
|
badge: buttonNotificationBadge
|
|
557
|
-
}, buttonNotificationProps)), /*#__PURE__*/_react
|
|
517
|
+
}, buttonNotificationProps)), /*#__PURE__*/_react["default"].createElement(_DropDown["default"], _extends({
|
|
558
518
|
prefixClass: prefixClass,
|
|
559
519
|
color: "transparent",
|
|
560
520
|
anchorOrigin: {
|
|
@@ -570,43 +530,42 @@ var Header = function Header(_ref) {
|
|
|
570
530
|
closeOnOptionClick: true
|
|
571
531
|
}, itemsDropDownUserProps)))));
|
|
572
532
|
};
|
|
573
|
-
|
|
574
533
|
Header.displayName = "Header";
|
|
575
534
|
Header.propTypes = {
|
|
576
|
-
back: _propTypes
|
|
577
|
-
onClickIconButtonRight: _propTypes
|
|
578
|
-
dropdownLeft: _propTypes
|
|
579
|
-
logoLeft: _propTypes
|
|
580
|
-
logoLeftXS: _propTypes
|
|
581
|
-
title: _propTypes
|
|
582
|
-
lock: _propTypes
|
|
583
|
-
more: _propTypes
|
|
584
|
-
logoAndDropdownSeparate: _propTypes
|
|
585
|
-
sectionCenter: _propTypes
|
|
586
|
-
logoRight: _propTypes
|
|
587
|
-
logoRightXS: _propTypes
|
|
588
|
-
finish: _propTypes
|
|
589
|
-
onChangeSearch: _propTypes
|
|
590
|
-
textFinishButton: _propTypes
|
|
591
|
-
companyName: _propTypes
|
|
592
|
-
iconButtonRight: _propTypes
|
|
593
|
-
lockIcon: _propTypes
|
|
594
|
-
titleDropdownSearch: _propTypes
|
|
595
|
-
backgroundIconButtonRight: _propTypes
|
|
596
|
-
itemsDropDownUser: _propTypes
|
|
597
|
-
itemsDropDownSearch: _propTypes
|
|
598
|
-
itemsDropDownMore: _propTypes
|
|
599
|
-
dropdownLeftIcon: _propTypes
|
|
600
|
-
finishButtonVariant: _propTypes
|
|
601
|
-
finishButtonIcon: _propTypes
|
|
602
|
-
actionLogoLeft: _propTypes
|
|
603
|
-
demoMode: _propTypes
|
|
604
|
-
buttonNotificationIcon: _propTypes
|
|
605
|
-
buttonNotificationProps: _propTypes
|
|
606
|
-
buttonNotificationBadge: _propTypes
|
|
607
|
-
tooltipThirdDropdownUser: _propTypes
|
|
608
|
-
placementTooltipThirdDropdownUser: _propTypes
|
|
609
|
-
showTypographyLogoLeft: _propTypes
|
|
535
|
+
back: _propTypes["default"].any,
|
|
536
|
+
onClickIconButtonRight: _propTypes["default"].any,
|
|
537
|
+
dropdownLeft: _propTypes["default"].node,
|
|
538
|
+
logoLeft: _propTypes["default"].string,
|
|
539
|
+
logoLeftXS: _propTypes["default"].string,
|
|
540
|
+
title: _propTypes["default"].string,
|
|
541
|
+
lock: _propTypes["default"].bool,
|
|
542
|
+
more: _propTypes["default"].bool,
|
|
543
|
+
logoAndDropdownSeparate: _propTypes["default"].bool,
|
|
544
|
+
sectionCenter: _propTypes["default"].any,
|
|
545
|
+
logoRight: _propTypes["default"].string,
|
|
546
|
+
logoRightXS: _propTypes["default"].string,
|
|
547
|
+
finish: _propTypes["default"].any,
|
|
548
|
+
onChangeSearch: _propTypes["default"].func,
|
|
549
|
+
textFinishButton: _propTypes["default"].string,
|
|
550
|
+
companyName: _propTypes["default"].string,
|
|
551
|
+
iconButtonRight: _propTypes["default"].any,
|
|
552
|
+
lockIcon: _propTypes["default"].string,
|
|
553
|
+
titleDropdownSearch: _propTypes["default"].string,
|
|
554
|
+
backgroundIconButtonRight: _propTypes["default"].string,
|
|
555
|
+
itemsDropDownUser: _propTypes["default"].node,
|
|
556
|
+
itemsDropDownSearch: _propTypes["default"].node,
|
|
557
|
+
itemsDropDownMore: _propTypes["default"].node,
|
|
558
|
+
dropdownLeftIcon: _propTypes["default"].node,
|
|
559
|
+
finishButtonVariant: _propTypes["default"].node,
|
|
560
|
+
finishButtonIcon: _propTypes["default"].node,
|
|
561
|
+
actionLogoLeft: _propTypes["default"].func,
|
|
562
|
+
demoMode: _propTypes["default"].bool,
|
|
563
|
+
buttonNotificationIcon: _propTypes["default"].any,
|
|
564
|
+
buttonNotificationProps: _propTypes["default"].any,
|
|
565
|
+
buttonNotificationBadge: _propTypes["default"].bool,
|
|
566
|
+
tooltipThirdDropdownUser: _propTypes["default"].string,
|
|
567
|
+
placementTooltipThirdDropdownUser: _propTypes["default"].string,
|
|
568
|
+
showTypographyLogoLeft: _propTypes["default"].bool
|
|
610
569
|
};
|
|
611
570
|
Header.defaultProps = {
|
|
612
571
|
back: '',
|
|
@@ -645,4 +604,4 @@ Header.defaultProps = {
|
|
|
645
604
|
showTypographyLogoLeft: false
|
|
646
605
|
};
|
|
647
606
|
var _default = Header;
|
|
648
|
-
exports
|
|
607
|
+
exports["default"] = _default;
|