@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
|
@@ -1,118 +1,100 @@
|
|
|
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("./Radio.css");
|
|
15
|
-
|
|
16
12
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
17
|
-
|
|
18
13
|
var _useRipple3 = _interopRequireDefault(require("../../HOCs/useRipple"));
|
|
19
|
-
|
|
20
|
-
var _excluded = ["id", "className", "disabled", "label", "onChange", "sx", "style", "styles", "onClick", "checked", "name"];
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
|
-
|
|
14
|
+
var _useFallbackId = _interopRequireDefault(require("../../utils/useFallbackId"));
|
|
15
|
+
var _excluded = ["id", "className", "disabled", "label", "onChange", "sx", "style", "styles", "onClick", "checked", "name", "ariaLabel"];
|
|
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 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; }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
+
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); }
|
|
23
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
34
24
|
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."); }
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
|
-
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
25
|
+
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; } }
|
|
26
|
+
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; }
|
|
27
|
+
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; } }
|
|
28
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
29
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) { o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } } return i; }
|
|
30
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) { if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } } return t; }
|
|
48
31
|
var Radio = function Radio(_ref) {
|
|
49
32
|
var id = _ref.id,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var _useDynamicStyles = (0, _useDynamicStyles2
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
className = _ref.className,
|
|
34
|
+
disabled = _ref.disabled,
|
|
35
|
+
label = _ref.label,
|
|
36
|
+
onChange = _ref.onChange,
|
|
37
|
+
sx = _ref.sx,
|
|
38
|
+
style = _ref.style,
|
|
39
|
+
styles = _ref.styles,
|
|
40
|
+
onClick = _ref.onClick,
|
|
41
|
+
_ref$checked = _ref.checked,
|
|
42
|
+
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
43
|
+
name = _ref.name,
|
|
44
|
+
ariaLabel = _ref.ariaLabel,
|
|
45
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
46
|
+
var _useDynamicStyles = (0, _useDynamicStyles2["default"])(sx),
|
|
47
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
48
|
+
prefixClass = _useDynamicStyles.prefixClass;
|
|
49
|
+
var _useRipple = (0, _useRipple3["default"])({
|
|
50
|
+
backgroundColor: 'var(--accent25)'
|
|
51
|
+
}, 'center'),
|
|
52
|
+
_useRipple2 = _slicedToArray(_useRipple, 2),
|
|
53
|
+
addRipple = _useRipple2[0],
|
|
54
|
+
ripples = _useRipple2[1];
|
|
55
|
+
var generatedId = (0, _useFallbackId["default"])('cbx-radio');
|
|
56
|
+
var radioId = id || generatedId;
|
|
57
|
+
var hasLabelText = !!(typeof label === 'string' && label.trim());
|
|
58
|
+
var accessibleText = ariaLabel || label || 'Selection option';
|
|
59
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
60
|
className: prefixClass("".concat(className || '', " cbx-radio-container")),
|
|
80
61
|
style: _objectSpread(_objectSpread(_objectSpread({}, styles), style), stylesInLine)
|
|
81
|
-
}, /*#__PURE__*/_react
|
|
62
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
63
|
className: prefixClass("".concat(!disabled ? 'cbx-ripple' : '', " cbx-radio-span-ripple")),
|
|
83
64
|
onClick: addRipple
|
|
84
|
-
}, !disabled && ripples, /*#__PURE__*/_react
|
|
65
|
+
}, !disabled && ripples, /*#__PURE__*/_react["default"].createElement("input", _extends({
|
|
85
66
|
type: 'radio',
|
|
86
|
-
id:
|
|
67
|
+
id: radioId,
|
|
87
68
|
className: prefixClass('cbx-radio'),
|
|
88
69
|
name: name,
|
|
89
70
|
disabled: disabled,
|
|
90
71
|
onChange: onChange,
|
|
91
|
-
checked: checked
|
|
92
|
-
|
|
72
|
+
checked: checked,
|
|
73
|
+
"aria-label": !label ? accessibleText : undefined
|
|
74
|
+
}, props)), /*#__PURE__*/_react["default"].createElement("span", {
|
|
75
|
+
"aria-hidden": "true",
|
|
93
76
|
className: prefixClass('cbx-radio-icon')
|
|
94
|
-
})), /*#__PURE__*/_react
|
|
95
|
-
htmlFor:
|
|
96
|
-
className: prefixClass(
|
|
97
|
-
}, /*#__PURE__*/_react
|
|
98
|
-
className: prefixClass('cbx-radio-labelText')
|
|
99
|
-
}, label)));
|
|
77
|
+
})), /*#__PURE__*/_react["default"].createElement("label", {
|
|
78
|
+
htmlFor: radioId,
|
|
79
|
+
className: prefixClass("cbx-radio-containerLabel ".concat(!hasLabelText ? 'cbx-radio-no-text' : ''))
|
|
80
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
81
|
+
className: prefixClass(hasLabelText ? 'cbx-radio-labelText' : 'sr-only')
|
|
82
|
+
}, hasLabelText ? label : accessibleText)));
|
|
100
83
|
};
|
|
101
|
-
|
|
102
84
|
Radio.displayName = "Radio";
|
|
103
85
|
Radio.propTypes = {
|
|
104
|
-
onChange: _propTypes
|
|
105
|
-
disabled: _propTypes
|
|
106
|
-
label: _propTypes
|
|
107
|
-
checked: _propTypes
|
|
108
|
-
id: _propTypes
|
|
86
|
+
onChange: _propTypes["default"].func,
|
|
87
|
+
disabled: _propTypes["default"].bool,
|
|
88
|
+
label: _propTypes["default"].string,
|
|
89
|
+
checked: _propTypes["default"].bool,
|
|
90
|
+
id: _propTypes["default"].string
|
|
109
91
|
};
|
|
110
92
|
Radio.defaultProps = {
|
|
111
93
|
onChange: undefined,
|
|
112
94
|
disabled: false,
|
|
113
|
-
label: '
|
|
95
|
+
label: '',
|
|
114
96
|
checked: false,
|
|
115
97
|
id: undefined
|
|
116
98
|
};
|
|
117
99
|
var _default = Radio;
|
|
118
|
-
exports
|
|
100
|
+
exports["default"] = _default;
|
|
@@ -1,62 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
4
|
-
|
|
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); }
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
9
|
-
|
|
7
|
+
exports["default"] = exports.Default = void 0;
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _Radio = _interopRequireDefault(require("./Radio"));
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
-
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) { "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); } return f; })(e, t); }
|
|
12
|
+
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); }
|
|
13
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
24
14
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
31
|
-
|
|
32
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
|
-
|
|
15
|
+
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; } }
|
|
16
|
+
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; }
|
|
17
|
+
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; } }
|
|
18
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
34
19
|
var _default = {
|
|
35
20
|
title: 'Components/Radio',
|
|
36
|
-
component: _Radio
|
|
37
|
-
argTypes: {}
|
|
21
|
+
component: _Radio["default"],
|
|
22
|
+
argTypes: {},
|
|
23
|
+
parameters: {
|
|
24
|
+
storybookCodePanel: {
|
|
25
|
+
disabled: false,
|
|
26
|
+
files: [{
|
|
27
|
+
fileName: 'Radio.js',
|
|
28
|
+
// eslint-disable-next-line import/no-webpack-loader-syntax, global-require, import/extensions, import/no-unresolved
|
|
29
|
+
code: require('!!raw-loader!./Radio.jsx')
|
|
30
|
+
}]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
38
33
|
};
|
|
39
|
-
exports
|
|
40
|
-
|
|
34
|
+
exports["default"] = _default;
|
|
41
35
|
var Template = function Template(args) {
|
|
42
36
|
var _useState = (0, _react.useState)(args.checked),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
+
checked = _useState2[0],
|
|
39
|
+
setChecked = _useState2[1];
|
|
47
40
|
var handleChange = function handleChange(event) {
|
|
48
41
|
setChecked(event.target.checked);
|
|
49
42
|
};
|
|
50
|
-
|
|
51
43
|
(0, _react.useEffect)(function () {
|
|
52
44
|
setChecked(args.checked);
|
|
53
45
|
}, [args.checked]);
|
|
54
|
-
return /*#__PURE__*/_react
|
|
46
|
+
return /*#__PURE__*/_react["default"].createElement(_Radio["default"], _extends({}, args, {
|
|
55
47
|
checked: checked,
|
|
56
48
|
onChange: handleChange
|
|
57
49
|
}));
|
|
58
50
|
};
|
|
59
|
-
|
|
60
51
|
Template.displayName = "Template";
|
|
61
52
|
var Default = Template.bind({});
|
|
62
53
|
exports.Default = Default;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
require("../../styles/main.css");
|
|
9
|
+
var _RichTextInput = _interopRequireDefault(require("./RichTextInput"));
|
|
10
|
+
var _ScrollbarNew = _interopRequireDefault(require("../ScrollbarNew/ScrollbarNew"));
|
|
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(); }
|
|
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."); }
|
|
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; }
|
|
18
|
+
var DesignRichTextInput = function DesignRichTextInput() {
|
|
19
|
+
var _React$useState = _react["default"].useState('<p>Escribe algo <strong>importante</strong>...</p>'),
|
|
20
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
21
|
+
value = _React$useState2[0],
|
|
22
|
+
setValue = _React$useState2[1];
|
|
23
|
+
var _React$useState3 = _react["default"].useState(''),
|
|
24
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
25
|
+
withTags = _React$useState4[0],
|
|
26
|
+
setWithTags = _React$useState4[1];
|
|
27
|
+
var editorRef = _react["default"].useRef(null);
|
|
28
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
29
|
+
style: {
|
|
30
|
+
height: '100%'
|
|
31
|
+
}
|
|
32
|
+
}, /*#__PURE__*/_react["default"].createElement(_ScrollbarNew["default"], {
|
|
33
|
+
sx: {
|
|
34
|
+
'.cbx-scrollbarNew-view': {
|
|
35
|
+
width: '100%'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
39
|
+
style: {
|
|
40
|
+
width: '100%'
|
|
41
|
+
}
|
|
42
|
+
}, /*#__PURE__*/_react["default"].createElement(_RichTextInput["default"], {
|
|
43
|
+
id: "story-richtext-basic",
|
|
44
|
+
floatingText: "Descripci\xF3n",
|
|
45
|
+
placeholder: "Escribe aqu\xED...",
|
|
46
|
+
value: value,
|
|
47
|
+
onChange: setValue,
|
|
48
|
+
required: true,
|
|
49
|
+
toolbarExtra: /*#__PURE__*/_react["default"].createElement("button", {
|
|
50
|
+
type: "button",
|
|
51
|
+
onMouseDown: function onMouseDown(e) {
|
|
52
|
+
return e.preventDefault();
|
|
53
|
+
}
|
|
54
|
+
}, "Tags"),
|
|
55
|
+
loadDraft: /*#__PURE__*/_react["default"].createElement("button", {
|
|
56
|
+
type: "button",
|
|
57
|
+
onMouseDown: function onMouseDown(e) {
|
|
58
|
+
return e.preventDefault();
|
|
59
|
+
}
|
|
60
|
+
}, "Cargar plantilla")
|
|
61
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
|
+
style: {
|
|
63
|
+
width: '20rem'
|
|
64
|
+
}
|
|
65
|
+
}, /*#__PURE__*/_react["default"].createElement(_RichTextInput["default"], {
|
|
66
|
+
id: "story-richtext-narrow",
|
|
67
|
+
floatingText: "Estrecho (para ver el wrap)",
|
|
68
|
+
value: value,
|
|
69
|
+
onChange: setValue,
|
|
70
|
+
toolbarExtra: /*#__PURE__*/_react["default"].createElement("button", {
|
|
71
|
+
type: "button",
|
|
72
|
+
onMouseDown: function onMouseDown(e) {
|
|
73
|
+
return e.preventDefault();
|
|
74
|
+
}
|
|
75
|
+
}, "Tags")
|
|
76
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_RichTextInput["default"], {
|
|
77
|
+
id: "story-richtext-error",
|
|
78
|
+
floatingText: "Con error",
|
|
79
|
+
errorText: "Este campo es obligatorio",
|
|
80
|
+
value: '',
|
|
81
|
+
onChange: function onChange() {},
|
|
82
|
+
maxChars: 120
|
|
83
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_RichTextInput["default"], {
|
|
84
|
+
id: "story-richtext-disabled",
|
|
85
|
+
floatingText: "Deshabilitado",
|
|
86
|
+
value: '<p>Contenido no editable</p>',
|
|
87
|
+
disabled: true
|
|
88
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_RichTextInput["default"], {
|
|
89
|
+
id: "story-richtext-hideToolbar",
|
|
90
|
+
floatingText: "Sin toolbar (modo simple)",
|
|
91
|
+
hideToolbar: true,
|
|
92
|
+
value: withTags,
|
|
93
|
+
onChange: setWithTags,
|
|
94
|
+
toolbarExtra: /*#__PURE__*/_react["default"].createElement("button", {
|
|
95
|
+
type: "button",
|
|
96
|
+
onMouseDown: function onMouseDown(e) {
|
|
97
|
+
return e.preventDefault();
|
|
98
|
+
},
|
|
99
|
+
onClick: function onClick() {
|
|
100
|
+
var _editorRef$current;
|
|
101
|
+
return (_editorRef$current = editorRef.current) === null || _editorRef$current === void 0 ? void 0 : _editorRef$current.insertHTML('<span>{{tag_ejemplo}}</span>');
|
|
102
|
+
}
|
|
103
|
+
}, "Insertar tag"),
|
|
104
|
+
ref: editorRef
|
|
105
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
|
+
style: {
|
|
107
|
+
height: '20rem'
|
|
108
|
+
}
|
|
109
|
+
}, /*#__PURE__*/_react["default"].createElement(_RichTextInput["default"], {
|
|
110
|
+
id: "story-richtext-fullHeight",
|
|
111
|
+
floatingText: "Altura completa",
|
|
112
|
+
fullHeight: true,
|
|
113
|
+
value: value,
|
|
114
|
+
onChange: setValue
|
|
115
|
+
}))));
|
|
116
|
+
};
|
|
117
|
+
DesignRichTextInput.displayName = "DesignRichTextInput";
|
|
118
|
+
var _default = DesignRichTextInput;
|
|
119
|
+
exports["default"] = _default;
|