@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
|
@@ -3,99 +3,80 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
require("../../styles/main.css");
|
|
13
|
-
|
|
14
10
|
require("./InputTextArea.css");
|
|
15
|
-
|
|
16
11
|
var _InputText = _interopRequireDefault(require("../InputText/InputText"));
|
|
17
|
-
|
|
18
12
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
19
|
-
|
|
20
13
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
21
|
-
|
|
14
|
+
var _useFallbackId = _interopRequireDefault(require("../../utils/useFallbackId"));
|
|
22
15
|
var _excluded = ["value", "onChange", "label", "maxSize", "hideCount", "disabled", "autoComplete", "placeholder", "error", "rows", "variant", "id", "helper", "helperText", "sx"];
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
|
-
|
|
28
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
|
-
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
|
+
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); }
|
|
18
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
30
19
|
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."); }
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
-
|
|
40
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
41
|
-
|
|
42
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
43
|
-
|
|
20
|
+
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; } }
|
|
21
|
+
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; }
|
|
22
|
+
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; } }
|
|
23
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
24
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
|
|
25
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
|
|
44
26
|
var InputTextArea = function InputTextArea(_ref) {
|
|
45
27
|
var value = _ref.value,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
28
|
+
_onChange = _ref.onChange,
|
|
29
|
+
label = _ref.label,
|
|
30
|
+
_ref$maxSize = _ref.maxSize,
|
|
31
|
+
maxSize = _ref$maxSize === void 0 ? 500 : _ref$maxSize,
|
|
32
|
+
_ref$hideCount = _ref.hideCount,
|
|
33
|
+
hideCount = _ref$hideCount === void 0 ? false : _ref$hideCount,
|
|
34
|
+
_ref$disabled = _ref.disabled,
|
|
35
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
36
|
+
_ref$autoComplete = _ref.autoComplete,
|
|
37
|
+
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
38
|
+
placeholder = _ref.placeholder,
|
|
39
|
+
error = _ref.error,
|
|
40
|
+
rows = _ref.rows,
|
|
41
|
+
variant = _ref.variant,
|
|
42
|
+
id = _ref.id,
|
|
43
|
+
helper = _ref.helper,
|
|
44
|
+
helperText = _ref.helperText,
|
|
45
|
+
sx = _ref.sx,
|
|
46
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
47
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
48
|
+
prefixClass = _useDynamicStyles.prefixClass;
|
|
49
|
+
var _React$useState = _react["default"].useState(value === null || value === void 0 ? void 0 : value.length),
|
|
50
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
51
|
+
characterCount = _React$useState2[0],
|
|
52
|
+
setCharacterCount = _React$useState2[1];
|
|
53
|
+
var _React$useState3 = _react["default"].useState(false),
|
|
54
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
55
|
+
focus = _React$useState4[0],
|
|
56
|
+
setFocus = _React$useState4[1];
|
|
57
|
+
var fallbackId = (0, _useFallbackId["default"])('cbx-inputTextArea-id');
|
|
58
|
+
var textareaId = id || fallbackId;
|
|
59
|
+
var messageId = "".concat(textareaId, "-message");
|
|
60
|
+
var countId = "".concat(textareaId, "-count");
|
|
61
|
+
var describedBy = [error || helper ? messageId : null, !hideCount ? countId : null].filter(Boolean).join(' ') || undefined;
|
|
79
62
|
var onFocus = function onFocus(event) {
|
|
80
63
|
if (autoComplete === 'off' && event.target.autocomplete) {
|
|
81
64
|
event.target.autocomplete = 'nothing';
|
|
82
65
|
}
|
|
83
|
-
|
|
84
66
|
setFocus(true);
|
|
85
67
|
};
|
|
86
|
-
|
|
87
68
|
var onBlur = function onBlur() {
|
|
88
69
|
setFocus(false);
|
|
89
70
|
};
|
|
90
|
-
|
|
91
|
-
_react.default.useEffect(function () {
|
|
71
|
+
_react["default"].useEffect(function () {
|
|
92
72
|
if (focus || disabled) {
|
|
93
73
|
setCharacterCount(value === null || value === void 0 ? void 0 : value.length);
|
|
94
74
|
}
|
|
95
75
|
}, [value, focus]);
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
76
|
+
var remaining = maxSize - (characterCount || 0);
|
|
77
|
+
var isNearLimit = !hideCount && remaining <= 10 && remaining >= 0;
|
|
78
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_InputText["default"], _extends({
|
|
79
|
+
id: textareaId,
|
|
99
80
|
prefixClass: prefixClass,
|
|
100
81
|
size: "small",
|
|
101
82
|
fullWidth: true,
|
|
@@ -116,50 +97,60 @@ var InputTextArea = function InputTextArea(_ref) {
|
|
|
116
97
|
placeholder: placeholder,
|
|
117
98
|
autoComplete: autoComplete,
|
|
118
99
|
disabled: disabled,
|
|
100
|
+
"aria-invalid": !!error,
|
|
101
|
+
"aria-describedby": describedBy,
|
|
119
102
|
error: !!error,
|
|
120
103
|
rows: rows,
|
|
121
|
-
helperText: /*#__PURE__*/_react
|
|
104
|
+
helperText: /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
105
|
style: {
|
|
123
106
|
display: 'flex',
|
|
124
107
|
justifyContent: 'space-between'
|
|
125
108
|
}
|
|
126
|
-
}, /*#__PURE__*/_react
|
|
127
|
-
|
|
128
|
-
|
|
109
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, helperText, error ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
110
|
+
id: messageId,
|
|
111
|
+
className: prefixClass('cbx-inputText-items-center'),
|
|
112
|
+
role: "alert"
|
|
113
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
129
114
|
variant: "XS",
|
|
130
115
|
color: 'var(--error)'
|
|
131
|
-
}, error)) : helper && /*#__PURE__*/_react
|
|
116
|
+
}, error)) : helper && /*#__PURE__*/_react["default"].createElement("div", {
|
|
117
|
+
id: messageId,
|
|
132
118
|
className: prefixClass('cbx-inputText-items-center')
|
|
133
|
-
}, /*#__PURE__*/_react
|
|
119
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
134
120
|
color: !disabled ? 'var(--gray4)' : 'var(--gray3)',
|
|
135
121
|
variant: "XS"
|
|
136
|
-
}, helper))), /*#__PURE__*/_react
|
|
122
|
+
}, helper))), /*#__PURE__*/_react["default"].createElement("div", null, !hideCount && /*#__PURE__*/_react["default"].createElement("div", {
|
|
137
123
|
style: {
|
|
138
124
|
textAlign: 'right'
|
|
139
125
|
}
|
|
140
|
-
}, /*#__PURE__*/_react
|
|
126
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
127
|
+
id: countId,
|
|
141
128
|
color: error ? 'var(--error)' : '',
|
|
142
129
|
secondaryFont: true,
|
|
143
130
|
fontWeight: '600',
|
|
144
|
-
component: 'span'
|
|
145
|
-
|
|
131
|
+
component: 'span',
|
|
132
|
+
"aria-live": isNearLimit ? 'polite' : 'off'
|
|
133
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
134
|
+
className: "sr-only"
|
|
135
|
+
}, "Caracteres usados: "), characterCount, "/", maxSize, isNearLimit && /*#__PURE__*/_react["default"].createElement("span", {
|
|
136
|
+
className: "sr-only"
|
|
137
|
+
}, ", quedan ", remaining, " caracteres")))))
|
|
146
138
|
}, props)));
|
|
147
139
|
};
|
|
148
|
-
|
|
149
140
|
InputTextArea.displayName = "InputTextArea";
|
|
150
141
|
InputTextArea.propTypes = {
|
|
151
|
-
value: _propTypes
|
|
152
|
-
onChange: _propTypes
|
|
153
|
-
maxSize: _propTypes
|
|
154
|
-
rows: _propTypes
|
|
155
|
-
hideCount: _propTypes
|
|
156
|
-
disabled: _propTypes
|
|
157
|
-
id: _propTypes
|
|
158
|
-
autoComplete: _propTypes
|
|
159
|
-
type: _propTypes
|
|
160
|
-
placeholder: _propTypes
|
|
161
|
-
error: _propTypes
|
|
162
|
-
variant: _propTypes
|
|
142
|
+
value: _propTypes["default"].string,
|
|
143
|
+
onChange: _propTypes["default"].func,
|
|
144
|
+
maxSize: _propTypes["default"].number,
|
|
145
|
+
rows: _propTypes["default"].number,
|
|
146
|
+
hideCount: _propTypes["default"].bool,
|
|
147
|
+
disabled: _propTypes["default"].bool,
|
|
148
|
+
id: _propTypes["default"].string,
|
|
149
|
+
autoComplete: _propTypes["default"].string,
|
|
150
|
+
type: _propTypes["default"].string,
|
|
151
|
+
placeholder: _propTypes["default"].string,
|
|
152
|
+
error: _propTypes["default"].any,
|
|
153
|
+
variant: _propTypes["default"].string
|
|
163
154
|
};
|
|
164
155
|
InputTextArea.defaultProps = {
|
|
165
156
|
value: '',
|
|
@@ -176,4 +167,4 @@ InputTextArea.defaultProps = {
|
|
|
176
167
|
variant: ''
|
|
177
168
|
};
|
|
178
169
|
var _default = InputTextArea;
|
|
179
|
-
exports
|
|
170
|
+
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.DesignInputTextAreaTemplate = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _InputTextArea = _interopRequireDefault(require("./InputTextArea"));
|
|
11
|
-
|
|
12
9
|
var _DesignInputTextArea = _interopRequireDefault(require("./DesignInputTextArea.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/InputTextArea',
|
|
18
|
-
component: _InputTextArea
|
|
13
|
+
component: _InputTextArea["default"],
|
|
19
14
|
argTypes: {
|
|
20
15
|
variant: {
|
|
21
16
|
options: ['outlined', 'filled', 'standard'],
|
|
@@ -35,12 +30,10 @@ var _default = {
|
|
|
35
30
|
}
|
|
36
31
|
}
|
|
37
32
|
};
|
|
38
|
-
exports
|
|
39
|
-
|
|
33
|
+
exports["default"] = _default;
|
|
40
34
|
var TemplateIconButton = function TemplateIconButton(args) {
|
|
41
|
-
return /*#__PURE__*/_react
|
|
35
|
+
return /*#__PURE__*/_react["default"].createElement(_DesignInputTextArea["default"], args);
|
|
42
36
|
};
|
|
43
|
-
|
|
44
37
|
TemplateIconButton.displayName = "TemplateIconButton";
|
|
45
38
|
var DesignInputTextAreaTemplate = TemplateIconButton.bind({});
|
|
46
39
|
exports.DesignInputTextAreaTemplate = DesignInputTextAreaTemplate;
|
|
@@ -1,69 +1,61 @@
|
|
|
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
|
require("../../styles/main.css");
|
|
13
|
-
|
|
14
11
|
require("./LoadingSection.css");
|
|
15
|
-
|
|
16
12
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
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; }
|
|
29
|
-
|
|
30
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
-
|
|
32
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
33
|
-
|
|
13
|
+
var _excluded = ["size", "color", "thickness", "style", "sx", "id", "prefixClass", "label"];
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
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); }
|
|
21
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
|
|
22
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
|
|
34
23
|
var LoadingSection = function LoadingSection(_ref) {
|
|
35
24
|
var _ref$size = _ref.size,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
25
|
+
size = _ref$size === void 0 ? 60 : _ref$size,
|
|
26
|
+
_ref$color = _ref.color,
|
|
27
|
+
color = _ref$color === void 0 ? 'var(--primary)' : _ref$color,
|
|
28
|
+
_ref$thickness = _ref.thickness,
|
|
29
|
+
thickness = _ref$thickness === void 0 ? 7 : _ref$thickness,
|
|
30
|
+
style = _ref.style,
|
|
31
|
+
sx = _ref.sx,
|
|
32
|
+
id = _ref.id,
|
|
33
|
+
propPrefixClass = _ref.prefixClass,
|
|
34
|
+
_ref$label = _ref.label,
|
|
35
|
+
label = _ref$label === void 0 ? 'Cargando' : _ref$label,
|
|
36
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
38
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
39
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
51
40
|
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
52
|
-
return /*#__PURE__*/_react
|
|
41
|
+
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
53
42
|
id: id,
|
|
54
43
|
className: prefixClass('cbx-LoadingSection-container'),
|
|
55
44
|
style: _objectSpread(_objectSpread({}, style), stylesInLine)
|
|
56
|
-
}, props), /*#__PURE__*/_react
|
|
45
|
+
}, props), /*#__PURE__*/_react["default"].createElement("div", {
|
|
57
46
|
className: prefixClass('cbx-LoadingSection-block'),
|
|
58
47
|
role: "progressbar",
|
|
48
|
+
"aria-label": label,
|
|
49
|
+
"aria-busy": "true",
|
|
59
50
|
style: {
|
|
60
51
|
color: color,
|
|
61
52
|
width: size,
|
|
62
53
|
height: size
|
|
63
54
|
}
|
|
64
|
-
}, /*#__PURE__*/_react
|
|
65
|
-
viewBox: "22 22 44 44"
|
|
66
|
-
|
|
55
|
+
}, /*#__PURE__*/_react["default"].createElement("svg", {
|
|
56
|
+
viewBox: "22 22 44 44",
|
|
57
|
+
"aria-hidden": "true"
|
|
58
|
+
}, /*#__PURE__*/_react["default"].createElement("circle", {
|
|
67
59
|
className: prefixClass('cbx-LoadingSection-circle'),
|
|
68
60
|
cx: "44",
|
|
69
61
|
cy: "44",
|
|
@@ -72,21 +64,22 @@ var LoadingSection = function LoadingSection(_ref) {
|
|
|
72
64
|
strokeWidth: thickness
|
|
73
65
|
}))));
|
|
74
66
|
};
|
|
75
|
-
|
|
76
67
|
LoadingSection.displayName = "LoadingSection";
|
|
77
68
|
LoadingSection.propTypes = {
|
|
78
|
-
id: _propTypes
|
|
79
|
-
size: _propTypes
|
|
80
|
-
color: _propTypes
|
|
81
|
-
thickness: _propTypes
|
|
82
|
-
style: _propTypes
|
|
69
|
+
id: _propTypes["default"].string,
|
|
70
|
+
size: _propTypes["default"].number,
|
|
71
|
+
color: _propTypes["default"].string,
|
|
72
|
+
thickness: _propTypes["default"].number,
|
|
73
|
+
style: _propTypes["default"].node,
|
|
74
|
+
label: _propTypes["default"].string
|
|
83
75
|
};
|
|
84
76
|
LoadingSection.defaultProps = {
|
|
85
77
|
id: '',
|
|
86
78
|
size: 60,
|
|
87
79
|
color: 'var(--primary)',
|
|
88
80
|
thickness: 7,
|
|
89
|
-
style: null
|
|
81
|
+
style: null,
|
|
82
|
+
label: 'Cargando'
|
|
90
83
|
};
|
|
91
84
|
var _default = LoadingSection;
|
|
92
|
-
exports
|
|
85
|
+
exports["default"] = _default;
|
|
@@ -3,17 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = exports.Default = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _LoadingSection = _interopRequireDefault(require("./LoadingSection"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
10
|
var _default = {
|
|
15
11
|
title: 'Components/LoadingSection',
|
|
16
|
-
component: _LoadingSection
|
|
12
|
+
component: _LoadingSection["default"],
|
|
17
13
|
argTypes: {
|
|
18
14
|
text: {
|
|
19
15
|
control: {
|
|
@@ -36,12 +32,10 @@ var _default = {
|
|
|
36
32
|
}
|
|
37
33
|
}
|
|
38
34
|
};
|
|
39
|
-
exports
|
|
40
|
-
|
|
35
|
+
exports["default"] = _default;
|
|
41
36
|
var Template = function Template(args) {
|
|
42
|
-
return /*#__PURE__*/_react
|
|
37
|
+
return /*#__PURE__*/_react["default"].createElement(_LoadingSection["default"], args);
|
|
43
38
|
};
|
|
44
|
-
|
|
45
39
|
Template.displayName = "Template";
|
|
46
40
|
var Default = Template.bind({});
|
|
47
41
|
exports.Default = Default;
|
|
@@ -3,66 +3,52 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
require("../../styles/main.css");
|
|
11
|
-
|
|
12
9
|
var _DropDown = _interopRequireDefault(require("../DropDown/DropDown"));
|
|
13
|
-
|
|
14
10
|
var _MenuItem = _interopRequireDefault(require("./MenuItem"));
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
|
-
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
20
13
|
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."); }
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
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; }
|
|
27
|
-
|
|
28
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
|
-
|
|
14
|
+
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; } }
|
|
15
|
+
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; }
|
|
16
|
+
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; } }
|
|
17
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
30
18
|
var DesignMenuItem = function DesignMenuItem() {
|
|
31
|
-
var _React$useState = _react
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_DropDown.default, {
|
|
19
|
+
var _React$useState = _react["default"].useState(false),
|
|
20
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
21
|
+
close = _React$useState2[0],
|
|
22
|
+
setClose = _React$useState2[1];
|
|
23
|
+
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_DropDown["default"], {
|
|
37
24
|
forceClose: close,
|
|
38
25
|
color: "transparent",
|
|
39
26
|
type: "text",
|
|
40
27
|
text: 'Click',
|
|
41
28
|
variantButton: 'tertiary',
|
|
42
|
-
items: /*#__PURE__*/_react
|
|
29
|
+
items: /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], null, "1111"), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
43
30
|
endIcon: 'ri-align-bottom'
|
|
44
|
-
}, "Lorem ipsum dolor sit amet"), /*#__PURE__*/_react
|
|
45
|
-
menuItems: /*#__PURE__*/_react
|
|
31
|
+
}, "Lorem ipsum dolor sit amet"), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
32
|
+
menuItems: /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
46
33
|
badge: true,
|
|
47
34
|
setOpen: function setOpen() {
|
|
48
35
|
return setClose(!close);
|
|
49
36
|
}
|
|
50
|
-
}, " AAA "), /*#__PURE__*/_react
|
|
37
|
+
}, " AAA "), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
51
38
|
setOpen: function setOpen() {
|
|
52
39
|
return setClose(!close);
|
|
53
40
|
}
|
|
54
41
|
}, " BBB "))
|
|
55
|
-
}, "222"), /*#__PURE__*/_react
|
|
42
|
+
}, "222"), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
56
43
|
badge: true,
|
|
57
44
|
icon: 'ri-aliens-fill'
|
|
58
|
-
}, "3333"), /*#__PURE__*/_react
|
|
45
|
+
}, "3333"), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
|
|
59
46
|
badge: true,
|
|
60
|
-
menuItems: /*#__PURE__*/_react
|
|
47
|
+
menuItems: /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], null, " AAA "), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], null, " BBB ")),
|
|
61
48
|
icon: 'ri-admin-fill'
|
|
62
49
|
}, "3333"))
|
|
63
50
|
})));
|
|
64
51
|
};
|
|
65
|
-
|
|
66
52
|
DesignMenuItem.displayName = "DesignMenuItem";
|
|
67
53
|
var _default = DesignMenuItem;
|
|
68
|
-
exports
|
|
54
|
+
exports["default"] = _default;
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
background-color: var(--gray1);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.cbx-menuItem:focus {
|
|
39
|
-
outline: none
|
|
38
|
+
.cbx-menuItem:focus:not(:focus-visible) {
|
|
39
|
+
outline: none;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.cbx-menuItem-container {
|
|
@@ -104,4 +104,9 @@
|
|
|
104
104
|
|
|
105
105
|
.cbx-menuItem-combinedDropdown {
|
|
106
106
|
width: 100%;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.cbx-menuItem:focus-visible {
|
|
110
|
+
outline: 2px solid var(--accent);
|
|
111
|
+
outline-offset: 2px;
|
|
107
112
|
}
|