@councilbox/councilbox-ui 2.0.53 → 2.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/HOCs/overlayA11yStack.js +47 -0
- package/dist/HOCs/useA11yGuard.js +38 -0
- package/dist/HOCs/useDynamicStyles.js +18 -38
- package/dist/HOCs/useMenuNavigation.js +110 -0
- package/dist/HOCs/useOverlay.js +87 -0
- package/dist/HOCs/usePopoverPosition.js +228 -0
- package/dist/HOCs/useRipple.js +17 -35
- package/dist/HOCs/useWindowSize.js +24 -42
- package/dist/build-index.js +49 -99
- package/dist/components/1.Introduction.stories.mdx +1 -1
- package/dist/components/2.Changelog.stories.mdx +42 -0
- package/dist/components/3.Guide.stories.mdx +1 -1
- package/dist/components/Accordion/Accordion.css +7 -0
- package/dist/components/Accordion/Accordion.js +97 -102
- package/dist/components/Accordion/Accordion.stories.js +10 -12
- package/dist/components/Accordion/AccordionOld.js +32 -56
- package/dist/components/Accordion/DesignAccordion.stories.js +10 -21
- package/dist/components/Alert/Alert.js +55 -55
- package/dist/components/Alert/Alert.stories.js +10 -11
- package/dist/components/Avatar/Avatar.js +82 -74
- package/dist/components/Avatar/Avatar.stories.js +19 -23
- package/dist/components/Avatar/AvatarOld.js +46 -60
- package/dist/components/Avatar/DesignAvatar.stories.js +18 -26
- package/dist/components/Avatar/DesignAvatarText.stories.js +31 -40
- package/dist/components/AvatarGroup/AvatarGroup.js +7 -14
- package/dist/components/AvatarGroup/AvatarGroup.stories.js +6 -13
- package/dist/components/AvatarGroup/DesignAvatarGroup.stories.js +34 -45
- package/dist/components/Block/Block.css +3 -3
- package/dist/components/Block/Block.js +31 -45
- package/dist/components/Block/Block.stories.js +5 -12
- package/dist/components/Block/DesignBlock.stories.js +7 -13
- package/dist/components/Button/Button.js +44 -66
- package/dist/components/Button/Button.stories.js +8 -14
- package/dist/components/Button/button.css +1 -1
- package/dist/components/ButtonBasic/ButtonBasic.css +6 -1
- package/dist/components/ButtonBasic/ButtonBasic.js +96 -118
- package/dist/components/ButtonBasic/ButtonBasic.stories.js +14 -15
- package/dist/components/ButtonBasic/ButtonBasicOld.js +57 -77
- package/dist/components/Checkbox/Checkbox.css +6 -0
- package/dist/components/Checkbox/Checkbox.js +81 -100
- package/dist/components/Checkbox/Checkbox.stories.js +10 -11
- package/dist/components/Checkbox/CheckboxOld.js +19 -35
- package/dist/components/DragDrop/DragDrop.css +20 -9
- package/dist/components/DragDrop/DragDrop.js +80 -76
- package/dist/components/DragDrop/DragDrop.stories.js +9 -16
- package/dist/components/DrawerPanel/DesignDrawerPanel.js +35 -53
- package/dist/components/DrawerPanel/DrawerPanel.js +157 -146
- package/dist/components/DrawerPanel/DrawerPanel.stories.js +10 -12
- package/dist/components/DrawerPanel/DrawerPanelOld.js +76 -98
- package/dist/components/DropDown/DesignDropDown.stories.js +79 -97
- package/dist/components/DropDown/DropDown.js +168 -342
- package/dist/components/DropDown/DropDown.stories.js +6 -12
- package/dist/components/DropDown/DropDownOld.js +57 -89
- package/dist/components/DropDown/PopoverPlayground.js +68 -98
- package/dist/components/EnhancedTable/DesignEnhancedTable.stories.js +26 -36
- package/dist/components/EnhancedTable/EnhancedMyTable.js +16 -19
- package/dist/components/EnhancedTable/EnhancedTable.js +77 -136
- package/dist/components/EnhancedTable/EnhancedTable.stories.js +5 -12
- package/dist/components/EnhancedTable/EnhancedTableBody.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableCell.js +25 -34
- package/dist/components/EnhancedTable/EnhancedTableContainer.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableHead.js +11 -14
- package/dist/components/EnhancedTable/EnhancedTableRow.js +15 -18
- package/dist/components/EnhancedTable/EnhancedTableSortLabel.js +15 -18
- package/dist/components/FabButton/DesignFabButton.stories.js +9 -16
- package/dist/components/FabButton/FabButton.js +51 -54
- package/dist/components/FabButton/FabButton.stories.js +10 -12
- package/dist/components/Grid/DesignGrid.stories.js +7 -14
- package/dist/components/Grid/Grid.js +38 -46
- package/dist/components/Grid/Grid.stories.js +6 -13
- package/dist/components/Grid/GridItem.js +37 -39
- package/dist/components/Grid/GridItemOld.js +13 -18
- package/dist/components/Grid/GridOld.js +14 -21
- package/dist/components/Header/DesignHeader.stories.js +20 -24
- package/dist/components/Header/Header.js +201 -242
- package/dist/components/Header/Header.stories.js +9 -21
- package/dist/components/Header/header.css +10 -5
- package/dist/components/IconButton/DesignIconButton.stories.js +31 -36
- package/dist/components/IconButton/IconButton.css +6 -1
- package/dist/components/IconButton/IconButton.js +132 -138
- package/dist/components/IconButton/IconButton.stories.js +12 -13
- package/dist/components/IconButton/IconButtonOld.js +41 -57
- package/dist/components/IconButtonSquare/DesignIconButtonSquare.stories.js +5 -11
- package/dist/components/IconButtonSquare/IconButtonSquare.js +11 -25
- package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +7 -13
- package/dist/components/IconButtonSquare/IconButtonSquareOld.js +44 -62
- package/dist/components/IconFont/IconFont.js +27 -48
- package/dist/components/IconFont/IconFont.stories.js +5 -11
- package/dist/components/InputAutocomplete/InputAutocomplete.css +6 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.js +184 -260
- package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +5 -11
- package/dist/components/InputAutocomplete/InputAutocompleteOld.js +43 -62
- package/dist/components/InputPassword/InputPassword.css +0 -6
- package/dist/components/InputPassword/InputPassword.js +58 -73
- package/dist/components/InputPassword/InputPassword.stories.js +5 -11
- package/dist/components/InputText/InputText.css +86 -78
- package/dist/components/InputText/InputText.js +207 -211
- package/dist/components/InputText/InputText.stories.js +11 -11
- package/dist/components/InputText/InputTextOld.js +48 -74
- package/dist/components/InputTextArea/DesignInputTextArea.stories.js +38 -51
- package/dist/components/InputTextArea/InputTextArea.js +84 -93
- package/dist/components/InputTextArea/InputTextArea.stories.js +5 -12
- package/dist/components/LoadingSection/LoadingSection.js +44 -51
- package/dist/components/LoadingSection/LoadingSection.stories.js +5 -11
- package/dist/components/MenuItem/DesignMenuItem.stories.js +20 -34
- package/dist/components/MenuItem/MenuItem.css +7 -2
- package/dist/components/MenuItem/MenuItem.js +100 -113
- package/dist/components/MenuItem/MenuItem.stories.js +6 -15
- package/dist/components/MenuItem/MenuItemOld.js +40 -56
- package/dist/components/MenuLateralLeft/MenuLateralLeft.css +24 -0
- package/dist/components/MenuLateralLeft/MenuLateralLeft.js +120 -157
- package/dist/components/MenuLateralLeft/MenuLateralLeft.stories.js +5 -12
- package/dist/components/MenuLateralRight/MenuLateralRight.css +2 -2
- package/dist/components/MenuLateralRight/MenuLateralRight.js +73 -77
- package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +5 -12
- package/dist/components/Modal/DesignModal.stories.js +15 -30
- package/dist/components/Modal/Modal.css +35 -15
- package/dist/components/Modal/Modal.js +154 -145
- package/dist/components/Modal/Modal.stories.js +7 -16
- package/dist/components/Modal/ModalOld.js +73 -90
- package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +4 -10
- package/dist/components/PaginationFooter/PaginationFooter.css +10 -0
- package/dist/components/PaginationFooter/PaginationFooter.js +99 -91
- package/dist/components/PaginationFooter/PaginationFooter.stories.js +5 -12
- package/dist/components/RadioButton/Radio.css +19 -18
- package/dist/components/RadioButton/Radio.js +65 -83
- package/dist/components/RadioButton/Radio.stories.js +27 -36
- package/dist/components/RadioButton/RadioOld.js +23 -39
- package/dist/components/Ripple/DesignRipple.js +25 -41
- package/dist/components/Ripple/Ripple.stories.js +5 -11
- package/dist/components/Scrollbar/DesignScrollbar.js +5 -10
- package/dist/components/Scrollbar/Scrollbar.js +37 -56
- package/dist/components/Scrollbar/Scrollbar.stories.js +5 -12
- package/dist/components/SelectInput/DesignSelectInput.js +22 -45
- package/dist/components/SelectInput/SelectInput.js +101 -155
- package/dist/components/SelectInput/SelectInput.stories.js +6 -15
- package/dist/components/SelectInput/SelectInputOld.js +52 -81
- package/dist/components/Slider/DesignSlider.js +8 -14
- package/dist/components/Slider/Slider.css +57 -37
- package/dist/components/Slider/Slider.js +85 -84
- package/dist/components/Slider/Slider.stories.js +5 -12
- package/dist/components/Spacing/Spacing.js +38 -45
- package/dist/components/Spacing/Spacing.stories.js +5 -11
- package/dist/components/Stars/DesignStars.js +17 -30
- package/dist/components/Stars/Stars.css +55 -104
- package/dist/components/Stars/Stars.js +89 -73
- package/dist/components/Stars/Stars.stories.js +5 -12
- package/dist/components/Stepper/DesignStepper.stories.js +16 -30
- package/dist/components/Stepper/Stepper.css +46 -10
- package/dist/components/Stepper/Stepper.js +118 -134
- package/dist/components/Stepper/Stepper.stories.js +5 -12
- package/dist/components/Table/DesignTable.stories.js +200 -211
- package/dist/components/Table/Table.css +33 -2
- package/dist/components/Table/Table.js +30 -38
- package/dist/components/Table/Table.stories.js +5 -12
- package/dist/components/Table/TableBody.js +22 -34
- package/dist/components/Table/TableCell.js +71 -61
- package/dist/components/Table/TableContainer.js +22 -34
- package/dist/components/Table/TableHead.js +22 -34
- package/dist/components/Table/TableOld.js +52 -84
- package/dist/components/Table/TableRow.js +33 -37
- package/dist/components/Table/TableSortLabel.js +42 -52
- package/dist/components/Tabs/DesignTabs.js +14 -28
- package/dist/components/Tabs/Tabs.css +30 -11
- package/dist/components/Tabs/Tabs.js +151 -137
- package/dist/components/Tabs/Tabs.stories.js +5 -12
- package/dist/components/Tabs/TabsOld.js +28 -42
- package/dist/components/Tag/DesignTags.stories.js +24 -39
- package/dist/components/Tag/Tag.css +61 -42
- package/dist/components/Tag/Tag.js +93 -91
- package/dist/components/Tag/Tag.stories.js +5 -12
- package/dist/components/TextInput/TextInput.js +38 -54
- package/dist/components/TextInput/TextInput.stories.js +5 -11
- package/dist/components/ThemeProvider/Colors.js +2 -2
- package/dist/components/ThemeProvider/CouncilboxThemeContext.js +7 -10
- package/dist/components/ThemeProvider/ThemeProvider.js +34 -52
- package/dist/components/Timeline/DesignTimeline.stories.js +4 -10
- package/dist/components/Timeline/Timeline.js +66 -46
- package/dist/components/Timeline/Timeline.stories.js +5 -12
- package/dist/components/Toggle/Toggle.css +10 -0
- package/dist/components/Toggle/Toggle.js +115 -98
- package/dist/components/Toggle/Toggle.stories.js +10 -11
- package/dist/components/Tooltip/DesignTooltip.stories.js +10 -16
- package/dist/components/Tooltip/Tooltip.css +17 -1
- package/dist/components/Tooltip/Tooltip.js +190 -366
- package/dist/components/Tooltip/Tooltip.stories.js +5 -12
- package/dist/components/Typography/Typography.css +57 -6
- package/dist/components/Typography/Typography.js +44 -97
- package/dist/components/Typography/Typography.stories.js +5 -11
- package/dist/components/Typography/TypographyOld.js +29 -42
- package/dist/index.js +2 -6
- package/dist/reportWebVitals.js +8 -14
- package/dist/storybook.test.js +2 -4
- package/dist/styles/colorConsts.css +4 -4
- package/dist/styles/main.css +16 -0
- package/dist/styles/stylesheet.js +10 -22
- package/dist/testing/TestAutocomplete.js +74 -97
- package/dist/testing/TestComponents.js +5 -10
- package/dist/testing/TestDropdown.js +33 -41
- package/dist/utils/autoDetectScroll.js +12 -35
- package/dist/utils/index.js +37 -63
- package/dist/utils/useFallbackId.js +19 -0
- package/package.json +5 -2
|
@@ -3,17 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
6
|
+
exports["default"] = exports.Success = exports.Helper = exports.ErrorTemplate = exports.Disabled = exports.Default = void 0;
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _InputText = _interopRequireDefault(require("./InputText"));
|
|
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/InputText',
|
|
16
|
-
component: _InputText
|
|
12
|
+
component: _InputText["default"],
|
|
17
13
|
argTypes: {
|
|
18
14
|
variant: {
|
|
19
15
|
options: ['outlined', 'filled', 'standard'],
|
|
@@ -29,6 +25,11 @@ var _default = {
|
|
|
29
25
|
}
|
|
30
26
|
},
|
|
31
27
|
parameters: {
|
|
28
|
+
docs: {
|
|
29
|
+
description: {
|
|
30
|
+
component: "\n## InputText\n\nComponente de entrada de texto que permite la inserci\xF3n de datos alfanum\xE9ricos mediante teclado. Soporta campos multil\xEDnea (`textarea`), tipos de entrada personalizados, estados de validaci\xF3n (`error` y `success`), textos de ayuda y adornos visuales (`startAdornment` y `endAdornment`).\n\nEl componente implementa el est\xE1ndar HTML nativo de entradas de formulario vinculadas a etiquetas y textos descriptivos ARIA.\n\n## Accesibilidad\n\n### Identificaci\xF3n y etiqueta accesible\n\n- **Vinculaci\xF3n mediante `label`**:\n - Renderiza una etiqueta visual expl\xEDcita vinculada al control de entrada mediante el atributo `htmlFor` con el `id` del campo (`inputId`).\n - La etiqueta se genera autom\xE1ticamente mediante el gancho `useFallbackId` si no se proporciona un `id` expl\xEDcito.\n- **Asignaci\xF3n sin etiqueta visible**:\n - En ausencia de la propiedad `label`, el control asocia de forma din\xE1mica un atributo `aria-label` evaluando la prop `aria-label`, el `placeholder` o un texto gen\xE9rico de respaldo (\"Campo de texto\").\n\n### Control mediante `useA11yGuard`\n\n- Integra la guardia `useA11yGuard` para prevenir la renderizaci\xF3n de entradas de texto sin identificaci\xF3n.\n- Exige la presencia obligatoria de al menos una de las tres propiedades: `label`, `aria-label` o `placeholder`.\n- En caso de omisi\xF3n, la guardia lanza una excepci\xF3n detallada en modo desarrollo notificando el requerimiento de un nombre accesible.\n\n### Mensajes de estado, error y ayuda (`aria-describedby` y `aria-invalid`)\n\n- **Asociaci\xF3n de textos descriptivos (`aria-describedby`)**:\n - Concatena e informa de forma autom\xE1tica los identificadores de los textos adicionales disponibles:\n - Texto secundario superior (`helperTextId`).\n - Texto de error prioritario (`errorId`).\n - Mensaje de ayuda gen\xE9rico (`helperMsgId`).\n- **Estado de validaci\xF3n de error (`aria-invalid`)**:\n - Aplica `aria-invalid=\"true\"` cuando la propiedad `error` contiene un mensaje o estado activo.\n - El mensaje de error se anuncia inmediatamente en lectores de pantalla mediante la asignaci\xF3n de `role=\"alert\"`.\n\n### Adornos visuales e iconograf\xEDa\n\n- Los elementos de adorno iniciales (`startAdornment`) y finales (`endAdornment`), as\xED como los iconos de estado de \xE9xito o informaci\xF3n, se marcan con `aria-hidden=\"true\"` y `tabIndex=\"-1\"` para no interferir en el flujo de tabulaci\xF3n por teclado.\n- En el caso de variante `autocomplete`, el bot\xF3n de apertura del men\xFA desplegable incluye el atributo `aria-haspopup=\"listbox\"` y la etiqueta accesible `aria-label=\"Open options\"`.\n\n### Navegaci\xF3n mediante teclado y campos requeridos\n\n- Permite la interacci\xF3n est\xE1ndar recibiendo el foco con la tecla **Tab**.\n- Bloquea la interacci\xF3n cuando la propiedad `disabled` se encuentra activa.\n- Marca la obligaci\xF3n del campo tanto visualmente mediante un asterisco decorativo (`aria-hidden=\"true\"`) como sem\xE1nticamente aplicando el atributo HTML `required`.\n\n## Recomendaciones de uso\n\n- Proporcionar siempre un texto claro e identificativo en la propiedad `label` en lugar de depender \xFAnicamente del `placeholder`.\n- Asegurar que los mensajes de la propiedad `error` sean descriptivos para explicar al usuario c\xF3mo corregir el valor introducido.\n\n## Consideraciones\n\nEl componente gestiona internamente la generaci\xF3n de identificadores din\xE1micos para vincular los mensajes de error y ayuda mediante `aria-describedby`.\nNo es necesario a\xF1adir marcas ARIA adicionales salvo configuraciones complejas con men\xFAs desplegables o autocompletado personalizado."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
32
33
|
storybookCodePanel: {
|
|
33
34
|
disabled: false,
|
|
34
35
|
files: [{
|
|
@@ -43,12 +44,10 @@ var _default = {
|
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
};
|
|
46
|
-
exports
|
|
47
|
-
|
|
47
|
+
exports["default"] = _default;
|
|
48
48
|
var Template = function Template(args) {
|
|
49
|
-
return /*#__PURE__*/_react
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement(_InputText["default"], args);
|
|
50
50
|
};
|
|
51
|
-
|
|
52
51
|
Template.displayName = "Template";
|
|
53
52
|
var Default = Template.bind({});
|
|
54
53
|
exports.Default = Default;
|
|
@@ -82,5 +81,6 @@ exports.ErrorTemplate = ErrorTemplate;
|
|
|
82
81
|
ErrorTemplate.args = {
|
|
83
82
|
label: 'hola',
|
|
84
83
|
value: 'Occaecat',
|
|
84
|
+
// placeholder: 'Occaecat',
|
|
85
85
|
error: 'Error'
|
|
86
86
|
};
|
|
@@ -1,41 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
13
|
-
|
|
14
11
|
require("../../styles/main.css");
|
|
15
|
-
|
|
16
12
|
require("./InputTextOld.css");
|
|
17
|
-
|
|
18
13
|
var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
19
|
-
|
|
20
14
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
21
|
-
|
|
22
15
|
var _excluded = ["id", "className", "onChange", "label", "disabled", "error", "helper", "success", "width", "helperText", "fullWidth", "sx", "endAdornment", "variant", "value", "multiline"];
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
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; }
|
|
37
|
-
|
|
38
|
-
var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
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 _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; }
|
|
24
|
+
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; }
|
|
25
|
+
var CssTextField = (0, _styled["default"])(_TextField["default"])(function () {
|
|
39
26
|
return {
|
|
40
27
|
'& label.Mui-focused': {
|
|
41
28
|
color: 'var(--primary)',
|
|
@@ -199,77 +186,65 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
|
199
186
|
}
|
|
200
187
|
};
|
|
201
188
|
});
|
|
202
|
-
|
|
203
189
|
var InputTextOld = function InputTextOld(_ref) {
|
|
204
190
|
var id = _ref.id,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
191
|
+
className = _ref.className,
|
|
192
|
+
onChange = _ref.onChange,
|
|
193
|
+
label = _ref.label,
|
|
194
|
+
disabled = _ref.disabled,
|
|
195
|
+
error = _ref.error,
|
|
196
|
+
helper = _ref.helper,
|
|
197
|
+
success = _ref.success,
|
|
198
|
+
width = _ref.width,
|
|
199
|
+
helperText = _ref.helperText,
|
|
200
|
+
fullWidth = _ref.fullWidth,
|
|
201
|
+
sx = _ref.sx,
|
|
202
|
+
endAdornment = _ref.endAdornment,
|
|
203
|
+
variant = _ref.variant,
|
|
204
|
+
value = _ref.value,
|
|
205
|
+
multiline = _ref.multiline,
|
|
206
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
222
207
|
var getIcon = function getIcon() {
|
|
223
|
-
var icon = endAdornment ? /*#__PURE__*/_react
|
|
208
|
+
var icon = endAdornment ? /*#__PURE__*/_react["default"].createElement("i", {
|
|
224
209
|
className: "cbx-inputText-endAdornment ".concat(endAdornment)
|
|
225
210
|
}) : '';
|
|
226
|
-
|
|
227
211
|
if (success) {
|
|
228
|
-
icon = /*#__PURE__*/_react
|
|
212
|
+
icon = /*#__PURE__*/_react["default"].createElement("i", {
|
|
229
213
|
className: "cbx-inputText-endAdornment ri-check-line",
|
|
230
214
|
style: {
|
|
231
215
|
color: 'var(--success)'
|
|
232
216
|
}
|
|
233
217
|
});
|
|
234
218
|
}
|
|
235
|
-
|
|
236
219
|
if (error) {
|
|
237
|
-
icon = /*#__PURE__*/_react
|
|
220
|
+
icon = /*#__PURE__*/_react["default"].createElement("i", {
|
|
238
221
|
className: 'cbx-inputText-endAdornment ri-information-line',
|
|
239
222
|
style: {
|
|
240
223
|
color: 'var(--error)'
|
|
241
224
|
}
|
|
242
225
|
});
|
|
243
226
|
}
|
|
244
|
-
|
|
245
227
|
if (helper) {
|
|
246
|
-
icon = /*#__PURE__*/_react
|
|
228
|
+
icon = /*#__PURE__*/_react["default"].createElement("i", {
|
|
247
229
|
className: 'cbx-inputText-endAdornment ri-information-line'
|
|
248
230
|
});
|
|
249
231
|
}
|
|
250
|
-
|
|
251
232
|
return icon;
|
|
252
233
|
};
|
|
253
|
-
|
|
254
234
|
var getVariant = function getVariant() {
|
|
255
235
|
var variantInput = 'outlined';
|
|
256
|
-
|
|
257
236
|
if (variant === 'outlined') {
|
|
258
237
|
variantInput = variant;
|
|
259
238
|
}
|
|
260
|
-
|
|
261
239
|
if (variant === 'filled') {
|
|
262
240
|
variantInput = variant;
|
|
263
241
|
}
|
|
264
|
-
|
|
265
242
|
if (variant === 'standard') {
|
|
266
243
|
variantInput = variant;
|
|
267
244
|
}
|
|
268
|
-
|
|
269
245
|
return variantInput;
|
|
270
246
|
};
|
|
271
|
-
|
|
272
|
-
return /*#__PURE__*/_react.default.createElement(CssTextField, _extends({
|
|
247
|
+
return /*#__PURE__*/_react["default"].createElement(CssTextField, _extends({
|
|
273
248
|
id: id,
|
|
274
249
|
className: className,
|
|
275
250
|
sx: _objectSpread(_objectSpread({
|
|
@@ -292,14 +267,14 @@ var InputTextOld = function InputTextOld(_ref) {
|
|
|
292
267
|
error: error,
|
|
293
268
|
value: value || '',
|
|
294
269
|
multiline: multiline,
|
|
295
|
-
helperText: /*#__PURE__*/_react
|
|
270
|
+
helperText: /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, helperText, error ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
296
271
|
className: "cbx-inputText-items-center"
|
|
297
|
-
}, /*#__PURE__*/_react
|
|
272
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
298
273
|
variant: "XS",
|
|
299
274
|
color: 'var(--error)!important'
|
|
300
|
-
}, error)) : helper && /*#__PURE__*/_react
|
|
275
|
+
}, error)) : helper && /*#__PURE__*/_react["default"].createElement("div", {
|
|
301
276
|
className: "cbx-inputText-items-center"
|
|
302
|
-
}, /*#__PURE__*/_react
|
|
277
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
303
278
|
color: !disabled ? 'var(--gray4)' : 'var(--gray3)',
|
|
304
279
|
variant: "XS"
|
|
305
280
|
}, helper))),
|
|
@@ -308,19 +283,18 @@ var InputTextOld = function InputTextOld(_ref) {
|
|
|
308
283
|
}
|
|
309
284
|
}, props));
|
|
310
285
|
};
|
|
311
|
-
|
|
312
286
|
InputTextOld.displayName = "InputTextOld";
|
|
313
287
|
InputTextOld.propTypes = {
|
|
314
|
-
label: _propTypes
|
|
315
|
-
helper: _propTypes
|
|
316
|
-
width: _propTypes
|
|
317
|
-
id: _propTypes
|
|
318
|
-
className: _propTypes
|
|
319
|
-
onChange: _propTypes
|
|
320
|
-
disabled: _propTypes
|
|
321
|
-
error: _propTypes
|
|
322
|
-
success: _propTypes
|
|
323
|
-
fullWidth: _propTypes
|
|
288
|
+
label: _propTypes["default"].string,
|
|
289
|
+
helper: _propTypes["default"].string,
|
|
290
|
+
width: _propTypes["default"].string,
|
|
291
|
+
id: _propTypes["default"].string,
|
|
292
|
+
className: _propTypes["default"].string,
|
|
293
|
+
onChange: _propTypes["default"].func,
|
|
294
|
+
disabled: _propTypes["default"].bool,
|
|
295
|
+
error: _propTypes["default"].node,
|
|
296
|
+
success: _propTypes["default"].bool,
|
|
297
|
+
fullWidth: _propTypes["default"].bool
|
|
324
298
|
};
|
|
325
299
|
InputTextOld.defaultProps = {
|
|
326
300
|
label: '',
|
|
@@ -337,4 +311,4 @@ InputTextOld.defaultProps = {
|
|
|
337
311
|
helperText: ''
|
|
338
312
|
};
|
|
339
313
|
var _default = InputTextOld;
|
|
340
|
-
exports
|
|
314
|
+
exports["default"] = _default;
|
|
@@ -1,61 +1,48 @@
|
|
|
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
|
require("../../styles/main.css");
|
|
11
|
-
|
|
12
10
|
var _InputTextArea = _interopRequireDefault(require("./InputTextArea"));
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
23
|
-
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); }
|
|
17
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
24
18
|
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
|
-
|
|
19
|
+
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; } }
|
|
20
|
+
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; }
|
|
21
|
+
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; } }
|
|
22
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
34
23
|
var DesignInputTextArea = function DesignInputTextArea(_ref) {
|
|
35
24
|
var variant = _ref.variant;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
+
var _React$useState = _react["default"].useState({
|
|
26
|
+
textArea0: '',
|
|
27
|
+
textArea1: '',
|
|
28
|
+
textArea2: '',
|
|
29
|
+
textArea3: '',
|
|
30
|
+
textArea4: ''
|
|
31
|
+
}),
|
|
32
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
33
|
+
state = _React$useState2[0],
|
|
34
|
+
setState = _React$useState2[1];
|
|
35
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
49
36
|
style: {}
|
|
50
|
-
}, /*#__PURE__*/_react
|
|
37
|
+
}, /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_InputTextArea["default"], {
|
|
51
38
|
id: "id-reason-text-area",
|
|
52
39
|
label: 'translate.reason',
|
|
53
40
|
required: true,
|
|
54
41
|
maxSize: 200,
|
|
55
42
|
value: 'sdzfgsgsdfg',
|
|
56
43
|
variant: 'standard'
|
|
57
|
-
})), /*#__PURE__*/_react
|
|
58
|
-
id: '
|
|
44
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_InputTextArea["default"], {
|
|
45
|
+
id: 'hola1',
|
|
59
46
|
label: 'label',
|
|
60
47
|
name: "observation",
|
|
61
48
|
value: state.textArea0,
|
|
@@ -63,11 +50,12 @@ var DesignInputTextArea = function DesignInputTextArea(_ref) {
|
|
|
63
50
|
setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
64
51
|
textArea0: data
|
|
65
52
|
}));
|
|
66
|
-
}
|
|
53
|
+
}
|
|
54
|
+
// rows={1}
|
|
67
55
|
,
|
|
68
56
|
variant: variant
|
|
69
|
-
})), /*#__PURE__*/_react
|
|
70
|
-
id: '
|
|
57
|
+
})), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_InputTextArea["default"], {
|
|
58
|
+
id: 'hola2',
|
|
71
59
|
label: 'label',
|
|
72
60
|
name: "observation",
|
|
73
61
|
value: state.textArea1,
|
|
@@ -78,9 +66,9 @@ var DesignInputTextArea = function DesignInputTextArea(_ref) {
|
|
|
78
66
|
},
|
|
79
67
|
rows: 1,
|
|
80
68
|
variant: variant
|
|
81
|
-
})), /*#__PURE__*/_react
|
|
69
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
82
70
|
style: {}
|
|
83
|
-
}, /*#__PURE__*/_react
|
|
71
|
+
}, /*#__PURE__*/_react["default"].createElement(_InputTextArea["default"], {
|
|
84
72
|
label: 'label',
|
|
85
73
|
name: "observation",
|
|
86
74
|
value: state.textArea2,
|
|
@@ -92,9 +80,9 @@ var DesignInputTextArea = function DesignInputTextArea(_ref) {
|
|
|
92
80
|
},
|
|
93
81
|
error: 'Error text',
|
|
94
82
|
variant: variant
|
|
95
|
-
})), /*#__PURE__*/_react
|
|
83
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
84
|
style: {}
|
|
97
|
-
}, /*#__PURE__*/_react
|
|
85
|
+
}, /*#__PURE__*/_react["default"].createElement(_InputTextArea["default"], {
|
|
98
86
|
hideCount: true,
|
|
99
87
|
disabled: true,
|
|
100
88
|
label: 'label',
|
|
@@ -107,11 +95,11 @@ var DesignInputTextArea = function DesignInputTextArea(_ref) {
|
|
|
107
95
|
},
|
|
108
96
|
variant: variant,
|
|
109
97
|
rows: 3
|
|
110
|
-
})), /*#__PURE__*/_react
|
|
98
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
111
99
|
style: {
|
|
112
100
|
marginTop: '.5rem'
|
|
113
101
|
}
|
|
114
|
-
}, /*#__PURE__*/_react
|
|
102
|
+
}, /*#__PURE__*/_react["default"].createElement(_InputTextArea["default"], {
|
|
115
103
|
label: 'label',
|
|
116
104
|
variant: variant || 'standard',
|
|
117
105
|
name: "observation",
|
|
@@ -123,7 +111,6 @@ var DesignInputTextArea = function DesignInputTextArea(_ref) {
|
|
|
123
111
|
}
|
|
124
112
|
})));
|
|
125
113
|
};
|
|
126
|
-
|
|
127
114
|
DesignInputTextArea.displayName = "DesignInputTextArea";
|
|
128
115
|
var _default = DesignInputTextArea;
|
|
129
|
-
exports
|
|
116
|
+
exports["default"] = _default;
|