@councilbox/councilbox-ui 2.0.53 → 2.0.55
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/Accordion.js +3 -0
- package/Alert.js +3 -0
- package/Avatar.js +3 -0
- package/AvatarGroup.js +3 -0
- package/Block.js +3 -0
- package/Button.js +3 -0
- package/ButtonBasic.js +3 -0
- package/Checkbox.js +3 -0
- package/DatePicker.js +3 -0
- package/DateRangePicker.js +3 -0
- package/DateTimePicker.js +3 -0
- package/DragDrop.js +3 -0
- package/DrawerPanel.js +3 -0
- package/DropDown.js +3 -0
- package/EnhancedTable.js +3 -0
- package/FabButton.js +3 -0
- package/Grid.js +3 -0
- package/Header.js +3 -0
- package/IconButton.js +3 -0
- package/IconButtonSquare.js +3 -0
- package/IconFont.js +3 -0
- package/InputAutocomplete.js +3 -0
- package/InputPassword.js +3 -0
- package/InputText.js +3 -0
- package/InputTextArea.js +3 -0
- package/LoadingSection.js +3 -0
- package/MenuItem.js +3 -0
- package/MenuLateralLeft.js +3 -0
- package/MenuLateralRight.js +3 -0
- package/Modal.js +3 -0
- package/Radio.js +3 -0
- package/RichTextInput.js +3 -0
- package/Scrollbar.js +3 -0
- package/ScrollbarNew.js +3 -0
- package/SelectInput.js +3 -0
- package/Slider.js +3 -0
- package/Spacing.js +3 -0
- package/Stars.js +3 -0
- package/Stepper.js +3 -0
- package/Table.js +3 -0
- package/TableBody.js +3 -0
- package/TableCell.js +3 -0
- package/TableContainer.js +3 -0
- package/TableHead.js +3 -0
- package/TableRow.js +3 -0
- package/TableSortLabel.js +3 -0
- package/Tabs.js +3 -0
- package/Tag.js +3 -0
- package/TextInput.js +3 -0
- package/ThemeProvider.js +3 -0
- package/TimePicker.js +3 -0
- package/Timeline.js +3 -0
- package/ToastProvider.js +3 -0
- package/Toggle.js +3 -0
- package/Tooltip.js +3 -0
- package/Typography.js +3 -0
- package/dist/HOCs/overlayA11yStack.js +47 -0
- package/dist/HOCs/useA11yGuard.js +38 -0
- package/dist/HOCs/useDynamicStyles.js +41 -60
- 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 +119 -99
- package/dist/components/1.Introduction.stories.mdx +4 -1
- package/dist/components/2.Changelog.stories.mdx +54 -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/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/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/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/DatePicker/Calendar.js +243 -0
- package/dist/components/DatePicker/DatePicker.css +197 -0
- package/dist/components/DatePicker/DatePicker.js +384 -0
- package/dist/components/DatePicker/DatePicker.stories.js +180 -0
- package/dist/components/DatePicker/dateUtils.js +478 -0
- package/dist/components/DateRangePicker/DateRangePicker.css +41 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +435 -0
- package/dist/components/DateRangePicker/DateRangePicker.stories.js +147 -0
- package/dist/components/DateRangePicker/RangeCalendar.js +188 -0
- package/dist/components/DateTimePicker/DateTimePicker.css +4 -0
- package/dist/components/DateTimePicker/DateTimePicker.js +481 -0
- package/dist/components/DateTimePicker/DateTimePicker.stories.js +144 -0
- package/dist/components/DateTimePicker/TimeColumns.css +46 -0
- package/dist/components/DateTimePicker/TimeColumns.js +175 -0
- package/dist/components/DragDrop/DragDrop.css +20 -9
- package/dist/components/DragDrop/DragDrop.js +83 -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/DropDown/DesignDropDown.stories.js +87 -97
- package/dist/components/DropDown/DropDown.js +179 -343
- package/dist/components/DropDown/DropDown.stories.js +6 -12
- 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/Header/DesignHeader.stories.js +20 -24
- package/dist/components/Header/Header.js +227 -246
- 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 +135 -140
- package/dist/components/IconButton/IconButton.stories.js +12 -13
- package/dist/components/IconButtonSquare/DesignIconButtonSquare.stories.js +5 -11
- package/dist/components/IconButtonSquare/IconButtonSquare.js +14 -28
- package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +7 -13
- 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/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 +96 -83
- package/dist/components/InputText/InputText.js +211 -215
- package/dist/components/InputText/InputText.stories.js +11 -11
- 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 +131 -140
- package/dist/components/MenuItem/MenuItem.stories.js +6 -15
- 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 +91 -79
- 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 +156 -145
- package/dist/components/Modal/Modal.stories.js +7 -16
- 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/RichTextInput/DesignRichTextInput.stories.js +119 -0
- package/dist/components/RichTextInput/RichTextInput.css +309 -0
- package/dist/components/RichTextInput/RichTextInput.js +851 -0
- package/dist/components/RichTextInput/RichTextInput.stories.js +33 -0
- package/dist/components/Ripple/DesignRipple.js +42 -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/ScrollbarNew/DesignScrollbarNew.js +24 -0
- package/dist/components/ScrollbarNew/ScrollbarNew.css +79 -0
- package/dist/components/ScrollbarNew/ScrollbarNew.js +426 -0
- package/dist/components/ScrollbarNew/ScrollbarNew.stories.js +37 -0
- package/dist/components/SelectInput/DesignSelectInput.js +22 -45
- package/dist/components/SelectInput/SelectInput.js +171 -218
- package/dist/components/SelectInput/SelectInput.stories.js +6 -15
- 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/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 -138
- package/dist/components/Tabs/Tabs.stories.js +5 -12
- 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/TimePicker/TimePicker.css +3 -0
- package/dist/components/TimePicker/TimePicker.js +359 -0
- package/dist/components/TimePicker/TimePicker.stories.js +132 -0
- 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/Toast/DesignToast.stories.js +174 -0
- package/dist/components/Toast/Toast.css +154 -0
- package/dist/components/Toast/Toast.js +165 -0
- package/dist/components/Toast/Toast.stories.js +33 -0
- package/dist/components/Toast/ToastProvider.js +33 -0
- package/dist/components/Toast/ToastRoot.js +89 -0
- package/dist/components/Toast/toastStore.js +127 -0
- package/dist/components/Toast/useToast.js +42 -0
- package/dist/components/Toggle/Toggle.css +10 -0
- package/dist/components/Toggle/Toggle.js +123 -100
- 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 +195 -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/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/styleFont.css +1 -1
- package/dist/styles/stylesheet.js +10 -22
- package/dist/styles/zIndexConsts.css +2 -0
- 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 +67 -4
- package/toast.js +7 -0
- package/useCouncilboxTheme.js +7 -0
- package/useToast.js +7 -0
- package/dist/components/Accordion/AccordionOld.css +0 -16
- package/dist/components/Accordion/AccordionOld.js +0 -115
- package/dist/components/Avatar/AvatarOld.js +0 -138
- package/dist/components/ButtonBasic/ButtonBasicOld.css +0 -41
- package/dist/components/ButtonBasic/ButtonBasicOld.js +0 -231
- package/dist/components/Checkbox/CheckboxOld.css +0 -31
- package/dist/components/Checkbox/CheckboxOld.js +0 -112
- package/dist/components/DrawerPanel/DrawerPanelOld.css +0 -56
- package/dist/components/DrawerPanel/DrawerPanelOld.js +0 -233
- package/dist/components/DropDown/DropDownOld.css +0 -3
- package/dist/components/DropDown/DropDownOld.js +0 -186
- package/dist/components/Grid/GridItemOld.js +0 -43
- package/dist/components/Grid/GridOld.css +0 -0
- package/dist/components/Grid/GridOld.js +0 -53
- package/dist/components/IconButton/IconButtonOld.css +0 -0
- package/dist/components/IconButton/IconButtonOld.js +0 -138
- package/dist/components/IconButtonSquare/IconButtonSquareOld.css +0 -43
- package/dist/components/IconButtonSquare/IconButtonSquareOld.js +0 -133
- package/dist/components/InputAutocomplete/InputAutocompleteOld.css +0 -5
- package/dist/components/InputAutocomplete/InputAutocompleteOld.js +0 -178
- package/dist/components/InputText/InputTextOld.css +0 -10
- package/dist/components/InputText/InputTextOld.js +0 -340
- package/dist/components/MenuItem/MenuItemOld.js +0 -139
- package/dist/components/Modal/ModalOld.css +0 -3
- package/dist/components/Modal/ModalOld.js +0 -230
- package/dist/components/RadioButton/RadioOld.css +0 -31
- package/dist/components/RadioButton/RadioOld.js +0 -142
- package/dist/components/SelectInput/SelectInputOld.css +0 -17
- package/dist/components/SelectInput/SelectInputOld.js +0 -325
- package/dist/components/Table/TableOld.css +0 -79
- package/dist/components/Table/TableOld.js +0 -165
- package/dist/components/Tabs/TabsOld.js +0 -92
- package/dist/components/Typography/TypographyOld.js +0 -132
|
@@ -3,32 +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 _LoadingSection = _interopRequireDefault(require("../LoadingSection/LoadingSection"));
|
|
11
|
-
|
|
12
9
|
var _GridItem = _interopRequireDefault(require("../Grid/GridItem"));
|
|
13
|
-
|
|
14
10
|
var _MenuItem = _interopRequireDefault(require("../MenuItem/MenuItem"));
|
|
15
|
-
|
|
16
11
|
var _SelectInput = _interopRequireDefault(require("../SelectInput/SelectInput"));
|
|
17
|
-
|
|
18
12
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); } // importante revisar que funcione bien el loading
|
|
20
|
+
// importante revisar que funcione bien el input select
|
|
28
21
|
var hasMorePages = function hasMorePages(page, total, limit) {
|
|
29
22
|
return page * limit < total;
|
|
30
23
|
};
|
|
31
|
-
|
|
32
24
|
var paginationButtonActiveStyle = {
|
|
33
25
|
borderRadius: '50%',
|
|
34
26
|
width: '1.62rem',
|
|
@@ -36,12 +28,13 @@ var paginationButtonActiveStyle = {
|
|
|
36
28
|
backgroundColor: 'var(--disabled)',
|
|
37
29
|
textAlign: 'center',
|
|
38
30
|
alignItems: 'center',
|
|
39
|
-
paddingTop: '2px',
|
|
31
|
+
// paddingTop: '2px',
|
|
40
32
|
color: 'var(--primary)',
|
|
41
33
|
fontSize: '0.87rem',
|
|
42
34
|
fontWeight: 'bold',
|
|
43
35
|
cursor: 'pointer',
|
|
44
|
-
transition: '.2s'
|
|
36
|
+
transition: '.2s',
|
|
37
|
+
border: 'none'
|
|
45
38
|
};
|
|
46
39
|
var paginationButtonStyle = {
|
|
47
40
|
borderRadius: '50%',
|
|
@@ -49,42 +42,44 @@ var paginationButtonStyle = {
|
|
|
49
42
|
height: '1.62rem',
|
|
50
43
|
textAlign: 'center',
|
|
51
44
|
alignItems: 'center',
|
|
52
|
-
paddingTop: '2px',
|
|
45
|
+
// paddingTop: '2px',
|
|
53
46
|
fontSize: '0.87rem',
|
|
54
47
|
cursor: 'pointer',
|
|
55
|
-
transition: '.2s'
|
|
48
|
+
transition: '.2s',
|
|
49
|
+
border: 'none',
|
|
50
|
+
background: 'transparent'
|
|
56
51
|
};
|
|
57
|
-
|
|
58
|
-
var showPages = function showPages(numPages, active, changePage, classes, isChangingPage, prefixClass) {
|
|
52
|
+
var showPages = function showPages(numPages, active, changePage, classes, isChangingPage, prefixClass, ariaLabelPage, ariaLabelSelectPage) {
|
|
59
53
|
var pages = [];
|
|
60
|
-
|
|
61
54
|
var _loop = function _loop(_i) {
|
|
62
55
|
var index = _i;
|
|
63
|
-
pages.push(
|
|
56
|
+
pages.push(/*#__PURE__*/_react["default"].createElement("button", {
|
|
57
|
+
type: "button",
|
|
64
58
|
key: "page_".concat(index),
|
|
65
59
|
onClick: active !== index ? function () {
|
|
66
60
|
return changePage(index);
|
|
67
|
-
} :
|
|
61
|
+
} : undefined,
|
|
62
|
+
disabled: isChangingPage,
|
|
63
|
+
"aria-current": active === index ? 'page' : undefined,
|
|
64
|
+
"aria-label": ariaLabelPage ? ariaLabelPage(index) : "P\xE1gina ".concat(index),
|
|
68
65
|
style: active === index ? _objectSpread({}, paginationButtonActiveStyle) : _objectSpread({}, paginationButtonStyle)
|
|
69
66
|
}, index));
|
|
70
|
-
|
|
71
67
|
if (_i === 3 && numPages > 6) {
|
|
72
68
|
var options = [];
|
|
73
|
-
|
|
74
69
|
for (var j = 4; j < numPages - 2; j++) {
|
|
75
70
|
options.push(j);
|
|
76
71
|
}
|
|
77
|
-
|
|
78
|
-
pages.push( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
72
|
+
pages.push(/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
73
|
style: {
|
|
80
74
|
width: '3rem'
|
|
81
75
|
}
|
|
82
|
-
}, /*#__PURE__*/_react
|
|
76
|
+
}, /*#__PURE__*/_react["default"].createElement(_SelectInput["default"], {
|
|
83
77
|
variant: "standard",
|
|
84
78
|
autoWidth: true,
|
|
85
79
|
prefixClass: prefixClass,
|
|
86
80
|
disabled: isChangingPage,
|
|
87
81
|
value: active,
|
|
82
|
+
"aria-label": ariaLabelSelectPage || 'Ir a otra página',
|
|
88
83
|
renderValue: function renderValue() {
|
|
89
84
|
var checkActive = false;
|
|
90
85
|
Array.from(options).map(function (page) {
|
|
@@ -93,16 +88,13 @@ var showPages = function showPages(numPages, active, changePage, classes, isChan
|
|
|
93
88
|
i = _i;
|
|
94
89
|
return checkActive;
|
|
95
90
|
}
|
|
96
|
-
|
|
97
91
|
i = _i;
|
|
98
92
|
return checkActive;
|
|
99
93
|
});
|
|
100
|
-
|
|
101
94
|
if (checkActive) {
|
|
102
95
|
i = _i;
|
|
103
96
|
return active;
|
|
104
97
|
}
|
|
105
|
-
|
|
106
98
|
i = _i;
|
|
107
99
|
return '...';
|
|
108
100
|
},
|
|
@@ -116,29 +108,25 @@ var showPages = function showPages(numPages, active, changePage, classes, isChan
|
|
|
116
108
|
width: '3rem'
|
|
117
109
|
}
|
|
118
110
|
}, Array.from(options).map(function (page) {
|
|
119
|
-
return /*#__PURE__*/_react
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
120
112
|
value: page,
|
|
121
113
|
key: page
|
|
122
114
|
}, page);
|
|
123
115
|
})))));
|
|
124
116
|
_i = numPages - 3;
|
|
125
117
|
}
|
|
126
|
-
|
|
127
118
|
i = _i;
|
|
128
119
|
};
|
|
129
|
-
|
|
130
120
|
for (var i = 1; i <= numPages; i++) {
|
|
131
121
|
_loop(i);
|
|
132
122
|
}
|
|
133
|
-
|
|
134
123
|
return pages;
|
|
135
124
|
};
|
|
136
|
-
|
|
137
|
-
var showPagesMobile = function showPagesMobile(numPages, active, changePage, prefixClass) {
|
|
125
|
+
var showPagesMobile = function showPagesMobile(numPages, active, changePage, prefixClass, ariaLabelSelectPage) {
|
|
138
126
|
if (numPages > 1) {
|
|
139
|
-
return /*#__PURE__*/_react
|
|
127
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
140
128
|
style: {}
|
|
141
|
-
}, /*#__PURE__*/_react
|
|
129
|
+
}, /*#__PURE__*/_react["default"].createElement(_SelectInput["default"], {
|
|
142
130
|
prefixClass: prefixClass,
|
|
143
131
|
value: active,
|
|
144
132
|
onChange: function onChange(event) {
|
|
@@ -148,68 +136,72 @@ var showPagesMobile = function showPagesMobile(numPages, active, changePage, pre
|
|
|
148
136
|
marginTop: '0',
|
|
149
137
|
marginLeft: '2px'
|
|
150
138
|
},
|
|
151
|
-
variant: "standard"
|
|
139
|
+
variant: "standard",
|
|
140
|
+
"aria-label": ariaLabelSelectPage || 'Ir a otra página'
|
|
152
141
|
}, Array.from(Array(numPages).keys()).map(function (page) {
|
|
153
|
-
return /*#__PURE__*/_react
|
|
142
|
+
return /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
154
143
|
value: page + 1,
|
|
155
144
|
key: page + 1
|
|
156
145
|
}, page + 1);
|
|
157
146
|
})));
|
|
158
147
|
}
|
|
159
148
|
};
|
|
160
|
-
|
|
161
149
|
var PaginationFooter = function PaginationFooter(_ref) {
|
|
162
150
|
var page = _ref.page,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
151
|
+
translate = _ref.translate,
|
|
152
|
+
length = _ref.length,
|
|
153
|
+
total = _ref.total,
|
|
154
|
+
limit = _ref.limit,
|
|
155
|
+
lg = _ref.lg,
|
|
156
|
+
md = _ref.md,
|
|
157
|
+
xs = _ref.xs,
|
|
158
|
+
changePage = _ref.changePage,
|
|
159
|
+
isChangingPage = _ref.isChangingPage,
|
|
160
|
+
isMobile = _ref.isMobile,
|
|
161
|
+
sx = _ref.sx,
|
|
162
|
+
propPrefixClass = _ref.prefixClass,
|
|
163
|
+
ariaLabelNav = _ref.ariaLabelNav,
|
|
164
|
+
ariaLabelPrevious = _ref.ariaLabelPrevious,
|
|
165
|
+
ariaLabelNext = _ref.ariaLabelNext,
|
|
166
|
+
ariaLabelPage = _ref.ariaLabelPage,
|
|
167
|
+
ariaLabelSelectPage = _ref.ariaLabelSelectPage;
|
|
168
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
169
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
170
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
180
171
|
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
181
172
|
var totalPages = Math.ceil(total / limit);
|
|
182
|
-
|
|
183
|
-
var footerLength = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, total && length > 0 && "".concat((page - 1) * limit + 1, " ", '-', " ").concat((page - 1) * limit + length, " ").concat(translate === null || translate === void 0 ? void 0 : translate.of, " ").concat(total), length < 1 && " - ".concat(translate === null || translate === void 0 ? void 0 : translate.table_no_results));
|
|
184
|
-
|
|
173
|
+
var footerLength = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, total && length > 0 && "".concat((page - 1) * limit + 1, " ", '-', " ").concat((page - 1) * limit + length, " ").concat(translate === null || translate === void 0 ? void 0 : translate.of, " ").concat(total), length < 1 && " - ".concat(translate === null || translate === void 0 ? void 0 : translate.table_no_results));
|
|
185
174
|
if (isMobile) {
|
|
186
|
-
return /*#__PURE__*/_react
|
|
175
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
187
176
|
style: _objectSpread({}, stylesInLine)
|
|
188
|
-
}, /*#__PURE__*/_react
|
|
177
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, footerLength), /*#__PURE__*/_react["default"].createElement("div", {
|
|
189
178
|
style: {
|
|
190
179
|
marginTop: '0.6em',
|
|
191
180
|
display: 'flex',
|
|
192
181
|
alignItems: 'center',
|
|
193
182
|
justifyContent: 'center'
|
|
194
183
|
}
|
|
195
|
-
}, /*#__PURE__*/_react
|
|
184
|
+
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, page > 1 && /*#__PURE__*/_react["default"].createElement("button", {
|
|
185
|
+
type: "button",
|
|
196
186
|
onClick: function onClick() {
|
|
197
187
|
return changePage(page - 1);
|
|
198
188
|
},
|
|
189
|
+
disabled: isChangingPage,
|
|
199
190
|
style: paginationButtonStyle
|
|
200
|
-
}, translate === null || translate === void 0 ? void 0 : translate.table_button_previous), hasMorePages(page, total, limit) && /*#__PURE__*/_react
|
|
191
|
+
}, translate === null || translate === void 0 ? void 0 : translate.table_button_previous), hasMorePages(page, total, limit) && /*#__PURE__*/_react["default"].createElement("button", {
|
|
192
|
+
type: "button",
|
|
201
193
|
onClick: function onClick() {
|
|
202
194
|
changePage(page + 1);
|
|
203
195
|
},
|
|
196
|
+
disabled: isChangingPage,
|
|
204
197
|
style: paginationButtonStyle
|
|
205
|
-
}, translate === null || translate === void 0 ? void 0 : translate.table_button_next), /*#__PURE__*/_react
|
|
198
|
+
}, translate === null || translate === void 0 ? void 0 : translate.table_button_next), /*#__PURE__*/_react["default"].createElement("div", {
|
|
206
199
|
style: {
|
|
207
200
|
display: 'flex'
|
|
208
201
|
}
|
|
209
|
-
}, showPagesMobile(totalPages, page, changePage, prefixClass)))));
|
|
202
|
+
}, showPagesMobile(totalPages, page, changePage, prefixClass, ariaLabelSelectPage)))));
|
|
210
203
|
}
|
|
211
|
-
|
|
212
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_GridItem.default, {
|
|
204
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_GridItem["default"], {
|
|
213
205
|
prefixClass: prefixClass,
|
|
214
206
|
xs: window.innerWidth < 480 ? 12 : xs || 12,
|
|
215
207
|
lg: lg || 12,
|
|
@@ -218,7 +210,7 @@ var PaginationFooter = function PaginationFooter(_ref) {
|
|
|
218
210
|
fontSize: '0.7rem',
|
|
219
211
|
paddingLeft: '.5rem'
|
|
220
212
|
}
|
|
221
|
-
}, /*#__PURE__*/_react
|
|
213
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
222
214
|
className: "flex justify-around",
|
|
223
215
|
style: {
|
|
224
216
|
width: 'fit-content',
|
|
@@ -226,11 +218,11 @@ var PaginationFooter = function PaginationFooter(_ref) {
|
|
|
226
218
|
overflow: 'hidden',
|
|
227
219
|
textOverflow: 'ellipsis'
|
|
228
220
|
}
|
|
229
|
-
}, footerLength, isChangingPage && /*#__PURE__*/_react
|
|
221
|
+
}, footerLength, isChangingPage && /*#__PURE__*/_react["default"].createElement("div", {
|
|
230
222
|
className: "ml-4"
|
|
231
|
-
}, /*#__PURE__*/_react
|
|
223
|
+
}, /*#__PURE__*/_react["default"].createElement(_LoadingSection["default"], {
|
|
232
224
|
size: 16
|
|
233
|
-
})))), totalPages > 1 && /*#__PURE__*/_react
|
|
225
|
+
})))), totalPages > 1 && /*#__PURE__*/_react["default"].createElement(_GridItem["default"], {
|
|
234
226
|
prefixClass: prefixClass,
|
|
235
227
|
xs: window.innerWidth < 480 ? 12 : xs || 12,
|
|
236
228
|
lg: lg || 12,
|
|
@@ -239,53 +231,69 @@ var PaginationFooter = function PaginationFooter(_ref) {
|
|
|
239
231
|
display: 'flex',
|
|
240
232
|
justifyContent: 'center'
|
|
241
233
|
}, stylesInLine)
|
|
242
|
-
}, /*#__PURE__*/_react
|
|
234
|
+
}, /*#__PURE__*/_react["default"].createElement("nav", {
|
|
235
|
+
className: prefixClass('cbx-PaginationFooter-nav'),
|
|
236
|
+
"aria-label": ariaLabelNav || 'Paginación de resultados',
|
|
243
237
|
style: {
|
|
244
238
|
display: 'flex',
|
|
245
239
|
justifyContent: 'center',
|
|
246
240
|
alignItems: 'center'
|
|
247
241
|
}
|
|
248
|
-
}, page > 1 && /*#__PURE__*/_react
|
|
242
|
+
}, page > 1 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
249
243
|
style: {
|
|
250
244
|
display: 'flex',
|
|
251
245
|
alignItems: 'center',
|
|
252
246
|
paddingTop: '3px'
|
|
253
247
|
}
|
|
254
|
-
}, /*#__PURE__*/_react
|
|
248
|
+
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
249
|
+
type: "button",
|
|
255
250
|
onClick: function onClick() {
|
|
256
251
|
return changePage(page - 1);
|
|
257
252
|
},
|
|
253
|
+
disabled: isChangingPage,
|
|
254
|
+
"aria-label": ariaLabelPrevious || 'Página anterior',
|
|
258
255
|
style: {
|
|
259
256
|
fontSize: '1.5rem',
|
|
260
|
-
|
|
257
|
+
cursor: 'pointer',
|
|
258
|
+
color: 'var(--primary)',
|
|
259
|
+
border: 0,
|
|
260
|
+
background: 'transparent',
|
|
261
|
+
padding: 0
|
|
261
262
|
}
|
|
262
|
-
}, /*#__PURE__*/_react
|
|
263
|
-
className: "ri-arrow-left-s-line"
|
|
264
|
-
|
|
263
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
264
|
+
className: "ri-arrow-left-s-line",
|
|
265
|
+
"aria-hidden": "true"
|
|
266
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
265
267
|
style: {
|
|
266
268
|
display: 'flex',
|
|
267
269
|
alignItems: 'center'
|
|
268
270
|
}
|
|
269
|
-
}, showPages(totalPages, page, changePage, '', isChangingPage, prefixClass)), hasMorePages(page, total, limit) && /*#__PURE__*/_react
|
|
271
|
+
}, showPages(totalPages, page, changePage, '', isChangingPage, prefixClass, ariaLabelPage, ariaLabelSelectPage)), hasMorePages(page, total, limit) && /*#__PURE__*/_react["default"].createElement("div", {
|
|
270
272
|
style: {
|
|
271
273
|
display: 'flex',
|
|
272
274
|
alignItems: 'center',
|
|
273
275
|
paddingTop: '3px'
|
|
274
276
|
}
|
|
275
|
-
}, /*#__PURE__*/_react
|
|
277
|
+
}, /*#__PURE__*/_react["default"].createElement("button", {
|
|
278
|
+
type: "button",
|
|
276
279
|
onClick: function onClick() {
|
|
277
280
|
return changePage(page + 1);
|
|
278
281
|
},
|
|
282
|
+
disabled: isChangingPage,
|
|
283
|
+
"aria-label": ariaLabelNext || 'Página siguiente',
|
|
279
284
|
style: {
|
|
280
285
|
fontSize: '1.5rem',
|
|
281
286
|
cursor: 'pointer',
|
|
282
|
-
color: 'var(--primary)'
|
|
287
|
+
color: 'var(--primary)',
|
|
288
|
+
border: 0,
|
|
289
|
+
background: 'transparent',
|
|
290
|
+
padding: 0
|
|
283
291
|
}
|
|
284
|
-
}, /*#__PURE__*/_react
|
|
285
|
-
className: "ri-arrow-right-s-line"
|
|
292
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
293
|
+
className: "ri-arrow-right-s-line",
|
|
294
|
+
"aria-hidden": "true"
|
|
286
295
|
}))))));
|
|
287
296
|
};
|
|
288
|
-
|
|
289
297
|
PaginationFooter.displayName = "PaginationFooter";
|
|
290
298
|
var _default = PaginationFooter;
|
|
291
|
-
exports
|
|
299
|
+
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.DesignTemplatePaginationFooter = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _PaginationFooter = _interopRequireDefault(require("./PaginationFooter"));
|
|
11
|
-
|
|
12
9
|
var _DesignPaginationFooter = _interopRequireDefault(require("./DesignPaginationFooter.stories"));
|
|
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/PaginationFooter',
|
|
18
|
-
component: _PaginationFooter
|
|
13
|
+
component: _PaginationFooter["default"],
|
|
19
14
|
argTypes: {
|
|
20
15
|
text: {
|
|
21
16
|
control: {
|
|
@@ -39,12 +34,10 @@ var _default = {
|
|
|
39
34
|
}
|
|
40
35
|
}
|
|
41
36
|
};
|
|
42
|
-
exports
|
|
43
|
-
|
|
37
|
+
exports["default"] = _default;
|
|
44
38
|
var TemplatePaginationFooter = function TemplatePaginationFooter(args) {
|
|
45
|
-
return /*#__PURE__*/_react
|
|
39
|
+
return /*#__PURE__*/_react["default"].createElement(_DesignPaginationFooter["default"], args);
|
|
46
40
|
};
|
|
47
|
-
|
|
48
41
|
TemplatePaginationFooter.displayName = "TemplatePaginationFooter";
|
|
49
42
|
var DesignTemplatePaginationFooter = TemplatePaginationFooter.bind({});
|
|
50
43
|
exports.DesignTemplatePaginationFooter = DesignTemplatePaginationFooter;
|
|
@@ -5,7 +5,15 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.cbx-radio {
|
|
8
|
-
|
|
8
|
+
position: absolute;
|
|
9
|
+
width: 1px;
|
|
10
|
+
height: 1px;
|
|
11
|
+
padding: 0;
|
|
12
|
+
margin: -1px;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
clip: rect(0, 0, 0, 0);
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
border: 0;
|
|
9
17
|
}
|
|
10
18
|
|
|
11
19
|
.cbx-radio-containerLabel {
|
|
@@ -20,28 +28,16 @@
|
|
|
20
28
|
cursor: default;
|
|
21
29
|
}
|
|
22
30
|
|
|
23
|
-
.cbx-radio:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
background-image: linear-gradient(180deg, hsla(0, 0%, 100%, 0.1), hsla(0, 0%, 100%, 0));
|
|
31
|
+
.cbx-radio:focus-visible ~ .cbx-radio-icon {
|
|
32
|
+
outline: 2px solid var(--accent);
|
|
33
|
+
outline-offset: 2px;
|
|
27
34
|
}
|
|
28
35
|
|
|
29
|
-
.cbx-radio:checked.cbx-radio:disabled ~ .cbx-radio-
|
|
36
|
+
.cbx-radio:checked.cbx-radio:disabled ~ .cbx-radio-icon {
|
|
30
37
|
background-color: var(--gray3);
|
|
31
38
|
}
|
|
32
39
|
|
|
33
|
-
.cbx-radio:
|
|
34
|
-
display: block;
|
|
35
|
-
width: 1.25rem;
|
|
36
|
-
height: 1.25rem;
|
|
37
|
-
background-image: radial-gradient(#fff, #fff 28%, transparent 32%);
|
|
38
|
-
content: "";
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: 0;
|
|
41
|
-
left: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.cbx-radio:disabled ~ .cbx-radio-containerLabel .cbx-radio-icon {
|
|
40
|
+
.cbx-radio:disabled ~ .cbx-radio-icon {
|
|
45
41
|
box-shadow: inset 0 0 0 0.125rem var(--gray3);
|
|
46
42
|
background-image: linear-gradient(180deg, hsla(0, 0%, 100%, 0.1), hsla(0, 0%, 100%, 0));
|
|
47
43
|
}
|
|
@@ -127,4 +123,9 @@
|
|
|
127
123
|
box-shadow: inset 0 0 0 0.125rem var(--gray3);
|
|
128
124
|
background-color: #e0e0e0;
|
|
129
125
|
background-image: linear-gradient(180deg, hsla(0, 0%, 100%, 0.1), hsla(0, 0%, 100%, 0));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.cbx-radio-containerLabel.cbx-radio-no-text {
|
|
129
|
+
width: 22px;
|
|
130
|
+
height: 24px;
|
|
130
131
|
}
|