@councilbox/councilbox-ui 1.0.1 → 2.0.1

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.
Files changed (137) hide show
  1. package/dist/HOCs/useDynamicStyles.js +99 -0
  2. package/dist/HOCs/useRipple.js +91 -0
  3. package/dist/build-index.js +8 -0
  4. package/dist/components/1.Introduction.stories.mdx +2 -1
  5. package/dist/components/2.Changelog.stories.mdx +3 -0
  6. package/dist/components/3.Guide.stories.mdx +56 -0
  7. package/dist/components/Accordion/Accordion.css +39 -1
  8. package/dist/components/Accordion/Accordion.js +84 -45
  9. package/dist/components/Accordion/Accordion.stories.js +4 -2
  10. package/dist/components/Accordion/AccordionOld.css +16 -0
  11. package/dist/components/Accordion/AccordionOld.js +115 -0
  12. package/dist/components/Accordion/DesignAccordion.stories.js +38 -0
  13. package/dist/components/Alert/Alert.css +5 -0
  14. package/dist/components/Alert/Alert.js +17 -6
  15. package/dist/components/Avatar/Avatar.css +3 -3
  16. package/dist/components/Avatar/Avatar.js +36 -20
  17. package/dist/components/Avatar/AvatarOld.js +138 -0
  18. package/dist/components/Avatar/DesignAvatar.stories.js +1 -1
  19. package/dist/components/Block/Block.js +17 -2
  20. package/dist/components/ButtonBasic/ButtonBasic.css +264 -20
  21. package/dist/components/ButtonBasic/ButtonBasic.js +85 -110
  22. package/dist/components/ButtonBasic/ButtonBasicOld.css +41 -0
  23. package/dist/components/ButtonBasic/ButtonBasicOld.js +231 -0
  24. package/dist/components/Checkbox/Checkbox.css +101 -22
  25. package/dist/components/Checkbox/Checkbox.js +119 -63
  26. package/dist/components/Checkbox/CheckboxOld.css +31 -0
  27. package/dist/components/Checkbox/CheckboxOld.js +112 -0
  28. package/dist/components/DragDrop/DragDrop.js +24 -9
  29. package/dist/components/DrawerPanel/DesignDrawerPanel.js +4 -2
  30. package/dist/components/DrawerPanel/DrawerPanel.css +76 -36
  31. package/dist/components/DrawerPanel/DrawerPanel.js +137 -115
  32. package/dist/components/DrawerPanel/DrawerPanelOld.css +56 -0
  33. package/dist/components/DrawerPanel/DrawerPanelOld.js +233 -0
  34. package/dist/components/DropDown/DesignDropDown.stories.js +146 -17
  35. package/dist/components/DropDown/DropDown.css +96 -1
  36. package/dist/components/DropDown/DropDown.js +308 -82
  37. package/dist/components/DropDown/DropDown.stories.js +1 -0
  38. package/dist/components/DropDown/DropDownOld.css +3 -0
  39. package/dist/components/DropDown/DropDownOld.js +186 -0
  40. package/dist/components/DropDown/PopoverPlayground.css +22 -0
  41. package/dist/components/DropDown/PopoverPlayground.js +235 -0
  42. package/dist/components/EnhancedTable/EnhancedTable.js +5 -6
  43. package/dist/components/FabButton/DesignFabButton.stories.js +3 -1
  44. package/dist/components/FabButton/FabButton.js +25 -5
  45. package/dist/components/Grid/DesignGrid.stories.js +9 -3
  46. package/dist/components/Grid/Grid.css +325 -0
  47. package/dist/components/Grid/Grid.js +57 -16
  48. package/dist/components/Grid/GridItem.js +31 -13
  49. package/dist/components/Grid/GridItemOld.js +43 -0
  50. package/dist/components/Grid/GridOld.css +0 -0
  51. package/dist/components/Grid/GridOld.js +53 -0
  52. package/dist/components/Header/Header.js +95 -116
  53. package/dist/components/IconButton/DesignIconButton.stories.js +22 -2
  54. package/dist/components/IconButton/IconButton.css +121 -1
  55. package/dist/components/IconButton/IconButton.js +98 -53
  56. package/dist/components/IconButton/IconButtonOld.css +0 -0
  57. package/dist/components/IconButton/IconButtonOld.js +138 -0
  58. package/dist/components/IconButtonSquare/IconButtonSquare.js +20 -90
  59. package/dist/components/IconButtonSquare/IconButtonSquareOld.css +43 -0
  60. package/dist/components/IconButtonSquare/IconButtonSquareOld.js +133 -0
  61. package/dist/components/InputAutocomplete/InputAutocomplete.css +109 -0
  62. package/dist/components/InputAutocomplete/InputAutocomplete.js +382 -76
  63. package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +118 -6
  64. package/dist/components/InputAutocomplete/InputAutocompleteOld.css +5 -0
  65. package/dist/components/InputAutocomplete/InputAutocompleteOld.js +178 -0
  66. package/dist/components/InputPassword/InputPassword.js +10 -20
  67. package/dist/components/InputText/InputText.css +442 -1
  68. package/dist/components/InputText/InputText.js +298 -239
  69. package/dist/components/InputText/InputText.stories.js +12 -3
  70. package/dist/components/InputText/InputTextOld.css +10 -0
  71. package/dist/components/InputText/InputTextOld.js +340 -0
  72. package/dist/components/InputTextArea/DesignInputTextArea.stories.js +30 -4
  73. package/dist/components/InputTextArea/InputTextArea.js +13 -6
  74. package/dist/components/LoadingSection/LoadingSection.css +44 -2
  75. package/dist/components/LoadingSection/LoadingSection.js +63 -9
  76. package/dist/components/MenuItem/DesignMenuItem.stories.js +1 -0
  77. package/dist/components/MenuItem/MenuItem.css +35 -6
  78. package/dist/components/MenuItem/MenuItem.js +99 -50
  79. package/dist/components/MenuItem/MenuItemOld.js +139 -0
  80. package/dist/components/MenuLateralLeft/MenuLateralLeft.js +60 -40
  81. package/dist/components/MenuLateralRight/MenuLateralRight.js +23 -8
  82. package/dist/components/Modal/DesignModal.stories.js +54 -0
  83. package/dist/components/Modal/Modal.css +81 -2
  84. package/dist/components/Modal/Modal.js +112 -80
  85. package/dist/components/Modal/Modal.stories.js +13 -2
  86. package/dist/components/Modal/ModalOld.css +3 -0
  87. package/dist/components/Modal/ModalOld.js +230 -0
  88. package/dist/components/PaginationFooter/DesignPaginationFooter.stories.js +9 -1
  89. package/dist/components/PaginationFooter/PaginationFooter.css +73 -0
  90. package/dist/components/PaginationFooter/PaginationFooter.js +45 -87
  91. package/dist/components/RadioButton/Radio.css +115 -16
  92. package/dist/components/RadioButton/Radio.js +70 -94
  93. package/dist/components/RadioButton/Radio.stories.js +42 -18
  94. package/dist/components/RadioButton/RadioOld.css +31 -0
  95. package/dist/components/RadioButton/RadioOld.js +142 -0
  96. package/dist/components/Ripple/DesignRipple.js +77 -0
  97. package/dist/components/Ripple/Ripple.stories.js +45 -0
  98. package/dist/components/Scrollbar/Scrollbar.js +21 -6
  99. package/dist/components/SelectInput/DesignSelectInput.js +62 -23
  100. package/dist/components/SelectInput/SelectInput.css +128 -10
  101. package/dist/components/SelectInput/SelectInput.js +265 -244
  102. package/dist/components/SelectInput/SelectInputOld.css +17 -0
  103. package/dist/components/SelectInput/SelectInputOld.js +325 -0
  104. package/dist/components/Stars/Stars.css +28 -28
  105. package/dist/components/Stars/Stars.js +22 -12
  106. package/dist/components/Stepper/Stepper.css +1 -0
  107. package/dist/components/Stepper/Stepper.js +81 -24
  108. package/dist/components/Table/DesignTable.stories.js +1 -0
  109. package/dist/components/Table/Table.css +56 -53
  110. package/dist/components/Table/Table.js +55 -75
  111. package/dist/components/Table/TableOld.css +79 -0
  112. package/dist/components/Table/TableOld.js +165 -0
  113. package/dist/components/Tabs/DesignTabs.js +37 -12
  114. package/dist/components/Tabs/Tabs.css +39 -4
  115. package/dist/components/Tabs/Tabs.js +194 -30
  116. package/dist/components/Tabs/Tabs.stories.js +8 -1
  117. package/dist/components/Tabs/TabsOld.js +92 -0
  118. package/dist/components/Tag/Tag.js +19 -9
  119. package/dist/components/Toggle/Toggle.css +122 -3
  120. package/dist/components/Toggle/Toggle.js +95 -68
  121. package/dist/components/Tooltip/DesignTooltip.stories.js +48 -0
  122. package/dist/components/Tooltip/Tooltip.css +75 -0
  123. package/dist/components/Tooltip/Tooltip.js +126 -0
  124. package/dist/components/Tooltip/Tooltip.stories.js +40 -0
  125. package/dist/components/Typography/Typography.css +9 -0
  126. package/dist/components/Typography/Typography.js +30 -21
  127. package/dist/components/Typography/TypographyOld.js +132 -0
  128. package/dist/styles/colorConsts.css +24 -0
  129. package/dist/styles/main.css +41 -49
  130. package/dist/styles/scpacingConsts.css +26 -0
  131. package/dist/styles/zIndexConsts.css +9 -0
  132. package/dist/testing/TestAutocomplete.js +369 -0
  133. package/dist/testing/TestComponents.js +3 -114
  134. package/dist/testing/TestDropdown.js +225 -0
  135. package/dist/utils/autoDetectScroll.js +127 -0
  136. package/dist/utils/index.js +141 -0
  137. package/package.json +2 -1
@@ -0,0 +1,369 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _InputAutocomplete = _interopRequireDefault(require("../components/InputAutocomplete/InputAutocomplete"));
11
+
12
+ var _SelectInput = _interopRequireDefault(require("../components/SelectInput/SelectInput"));
13
+
14
+ var _material = require("@mui/material");
15
+
16
+ var _MenuItem = _interopRequireDefault(require("../components/MenuItem/MenuItem"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23
+
24
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25
+
26
+ 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; }
27
+
28
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
29
+
30
+ 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 _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
33
+
34
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
35
+
36
+ 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; }
37
+
38
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
+
40
+ var options = [{
41
+ label: 'uno',
42
+ value: 1,
43
+ optionLabel: 'UNO - 1'
44
+ }, {
45
+ label: 'uno2',
46
+ value: 4,
47
+ optionLabel: 'UNO - 2'
48
+ }, {
49
+ label: 'dos',
50
+ value: 2,
51
+ optionLabel: 'DOS - 2'
52
+ }, {
53
+ label: 'dos',
54
+ value: 2,
55
+ optionLabel: 'DOS - 2'
56
+ }, {
57
+ label: 'dos',
58
+ value: 2,
59
+ optionLabel: 'DOS - 2'
60
+ }, {
61
+ label: 'dos',
62
+ value: 2,
63
+ optionLabel: 'DOS - 2'
64
+ }, {
65
+ label: 'dos',
66
+ value: 2,
67
+ optionLabel: 'DOS - 2'
68
+ }, {
69
+ label: 'dos',
70
+ value: 2,
71
+ optionLabel: 'DOS - 2'
72
+ }, {
73
+ label: 'dos',
74
+ value: 2,
75
+ optionLabel: 'DOS - 2'
76
+ }, {
77
+ label: 'dos',
78
+ value: 2,
79
+ optionLabel: 'DOS - 2'
80
+ }, {
81
+ label: 'dos',
82
+ value: 2,
83
+ optionLabel: 'DOS - 2'
84
+ }, {
85
+ label: 'dos',
86
+ value: 2,
87
+ optionLabel: 'DOS - 2'
88
+ }, {
89
+ label: 'dos',
90
+ value: 2,
91
+ optionLabel: 'DOS - 2'
92
+ }, {
93
+ label: 'dos',
94
+ value: 2,
95
+ optionLabel: 'DOS - 2'
96
+ }, {
97
+ label: 'dos',
98
+ value: 2,
99
+ optionLabel: 'DOS - 2'
100
+ }, {
101
+ label: 'dos',
102
+ value: 2,
103
+ optionLabel: 'DOS - 2'
104
+ }, {
105
+ label: 'dos',
106
+ value: 2,
107
+ optionLabel: 'DOS - 2'
108
+ }, {
109
+ label: 'dos',
110
+ value: 2,
111
+ optionLabel: 'DOS - 2'
112
+ }, {
113
+ label: 'dos',
114
+ value: 2,
115
+ optionLabel: 'DOS - 2'
116
+ }, {
117
+ label: 'dos',
118
+ value: 2,
119
+ optionLabel: 'DOS - 2'
120
+ }, {
121
+ label: 'dos',
122
+ value: 2,
123
+ optionLabel: 'DOS - 2'
124
+ }, {
125
+ label: 'dos',
126
+ value: 2,
127
+ optionLabel: 'DOS - 2'
128
+ }, {
129
+ label: 'dos',
130
+ value: 2,
131
+ optionLabel: 'DOS - 2'
132
+ }, {
133
+ label: 'dos',
134
+ value: 2,
135
+ optionLabel: 'DOS - 2'
136
+ }, {
137
+ label: 'dos',
138
+ value: 2,
139
+ optionLabel: 'DOS - 2'
140
+ }, {
141
+ label: 'dos',
142
+ value: 2,
143
+ optionLabel: 'DOS - 2'
144
+ }, {
145
+ label: 'dos',
146
+ value: 2,
147
+ optionLabel: 'DOS - 2'
148
+ }, {
149
+ label: 'prueba default',
150
+ value: 3,
151
+ optionLabel: 'Vacío'
152
+ }];
153
+
154
+ var TestAutocomplete = function TestAutocomplete() {
155
+ var _React$useState = _react.default.useState(options[0]),
156
+ _React$useState2 = _slicedToArray(_React$useState, 2),
157
+ state = _React$useState2[0],
158
+ setState = _React$useState2[1];
159
+
160
+ var _React$useState3 = _react.default.useState(options[0]),
161
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
162
+ state2 = _React$useState4[0],
163
+ setState2 = _React$useState4[1];
164
+
165
+ var _React$useState5 = _react.default.useState(options[0]),
166
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
167
+ state3 = _React$useState6[0],
168
+ setState3 = _React$useState6[1];
169
+
170
+ var _React$useState7 = _react.default.useState(options[0]),
171
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
172
+ state4 = _React$useState8[0],
173
+ setState4 = _React$useState8[1];
174
+
175
+ var _React$useState9 = _react.default.useState(options[0].label),
176
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
177
+ input = _React$useState10[0],
178
+ setInput = _React$useState10[1];
179
+
180
+ var _React$useState11 = _react.default.useState(options[0].label),
181
+ _React$useState12 = _slicedToArray(_React$useState11, 2),
182
+ input2 = _React$useState12[0],
183
+ setInput2 = _React$useState12[1];
184
+
185
+ var _React$useState13 = _react.default.useState(options[0].label),
186
+ _React$useState14 = _slicedToArray(_React$useState13, 2),
187
+ input3 = _React$useState14[0],
188
+ setInput3 = _React$useState14[1];
189
+
190
+ var _React$useState15 = _react.default.useState(options[0].label),
191
+ _React$useState16 = _slicedToArray(_React$useState15, 2),
192
+ input4 = _React$useState16[0],
193
+ setInput4 = _React$useState16[1];
194
+
195
+ console.log('S', state, input);
196
+ return /*#__PURE__*/_react.default.createElement("div", {
197
+ style: {
198
+ paddingLeft: '8px',
199
+ height: '100vh',
200
+ overflow: 'scroll'
201
+ }
202
+ }, /*#__PURE__*/_react.default.createElement("div", {
203
+ style: {
204
+ width: '100%',
205
+ height: '30vh',
206
+ justifyContent: 'space-between',
207
+ display: 'flex'
208
+ }
209
+ }, /*#__PURE__*/_react.default.createElement(_InputAutocomplete.default, {
210
+ variant: 'standard',
211
+ disablePortal: false,
212
+ noOptionsText: 'No hay opciones',
213
+ options: options,
214
+ id: "select-entity-filter",
215
+ value: state //freeSolo
216
+ ,
217
+ clearable: true // loading
218
+ ,
219
+ clearOnBlur: true,
220
+ inputValue: input,
221
+ onInputChange: function onInputChange(_event, value) {
222
+ console.log('LIBRERÍA INPUT', value);
223
+ setInput(value);
224
+ },
225
+ onChange: function onChange(_event, option) {
226
+ console.log('LIBRERÍA CHANGE', option);
227
+
228
+ if (option !== null) {
229
+ setState(option);
230
+ } else {//setState(options[options.length - 1]);
231
+ }
232
+ },
233
+ getOptionLabel: function getOptionLabel(option) {
234
+ if (typeof option === 'string') {
235
+ return option;
236
+ }
237
+
238
+ return (option === null || option === void 0 ? void 0 : option.label) || '';
239
+ },
240
+ label: 'Prueba'
241
+ })), /*#__PURE__*/_react.default.createElement("div", {
242
+ style: {
243
+ width: '100%',
244
+ height: '40vh',
245
+ justifyContent: 'center',
246
+ alignItems: 'center',
247
+ display: 'flex'
248
+ }
249
+ }, /*#__PURE__*/_react.default.createElement(_SelectInput.default, {
250
+ value: state3,
251
+ onChange: function onChange(event, option) {
252
+ console.log('MUI CLEAR ON CHANGE', option);
253
+
254
+ if (option !== null) {
255
+ setState3(event.target.value);
256
+ } else {//setState3(options[options.length - 1]);
257
+ }
258
+ },
259
+ styles: {
260
+ marginTop: '0',
261
+ marginLeft: '2px'
262
+ }
263
+ }, options.map(function (option) {
264
+ return /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
265
+ value: option.label,
266
+ key: option.label
267
+ }, option.label);
268
+ }))), /*#__PURE__*/_react.default.createElement("div", {
269
+ style: {
270
+ width: '100%',
271
+ height: '30vh',
272
+ justifyContent: 'space-between',
273
+ alignItems: 'flex-end',
274
+ display: 'flex'
275
+ }
276
+ }, /*#__PURE__*/_react.default.createElement(_material.Autocomplete, {
277
+ options: options,
278
+ disableClearable: false,
279
+ value: state3,
280
+ onChange: function onChange(_event, option) {
281
+ console.log('MUI CLEAR ON CHANGE', option);
282
+
283
+ if (option !== null) {
284
+ setState3(option);
285
+ } else {//setState3(options[options.length - 1]);
286
+ }
287
+ },
288
+ getOptionLabel: function getOptionLabel(option) {
289
+ if (typeof option === 'string') {
290
+ return option;
291
+ }
292
+
293
+ return (option === null || option === void 0 ? void 0 : option.label) || '';
294
+ },
295
+ inputValue: input3,
296
+ onInputChange: function onInputChange(_event, value) {
297
+ console.log('MUI CLEAR INPUT', value);
298
+ setInput3(value);
299
+ } // getOptionSelected={getOptionSelected}
300
+ ,
301
+ clearText: 'Borrar',
302
+ noOptionsText: 'No hay opciones',
303
+ renderInput: function renderInput(params) {
304
+ return /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({}, params, {
305
+ className: "autocomplete ".concat('autocomplete-error'),
306
+ margin: "normal",
307
+ InputLabelProps: {
308
+ style: {
309
+ display: 'flex'
310
+ }
311
+ },
312
+ inputProps: _objectSpread(_objectSpread({}, params.inputProps), {}, {
313
+ style: _objectSpread(_objectSpread({}, params.inputProps.style), {}, {
314
+ fontSize: '15px'
315
+ })
316
+ })
317
+ }));
318
+ }
319
+ }), /*#__PURE__*/_react.default.createElement(_material.Autocomplete, {
320
+ options: options,
321
+ disableClearable: false,
322
+ value: state4,
323
+ freeSolo: true,
324
+ clearOnBlur: true,
325
+ onChange: function onChange(_event, option) {
326
+ console.log('MUI FREE SOLO CLEAR ON CHANGE', option);
327
+
328
+ if (option !== null) {
329
+ setState4(option);
330
+ } else {//setState4(options[options.length - 1]);
331
+ }
332
+ },
333
+ getOptionLabel: function getOptionLabel(option) {
334
+ if (typeof option === 'string') {
335
+ return option;
336
+ }
337
+
338
+ return (option === null || option === void 0 ? void 0 : option.label) || '';
339
+ },
340
+ inputValue: input4,
341
+ onInputChange: function onInputChange(_event, value) {
342
+ console.log('MUI FREE SOLO CLEAR INPUT', value);
343
+ setInput4(value);
344
+ } // getOptionSelected={getOptionSelected}
345
+ ,
346
+ clearText: 'Borrar',
347
+ noOptionsText: 'No hay opciones',
348
+ renderInput: function renderInput(params) {
349
+ return /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({}, params, {
350
+ className: "autocomplete ".concat('autocomplete-error'),
351
+ margin: "normal",
352
+ InputLabelProps: {
353
+ style: {
354
+ display: 'flex'
355
+ }
356
+ },
357
+ inputProps: _objectSpread(_objectSpread({}, params.inputProps), {}, {
358
+ style: _objectSpread(_objectSpread({}, params.inputProps.style), {}, {
359
+ fontSize: '15px'
360
+ })
361
+ })
362
+ }));
363
+ }
364
+ })));
365
+ };
366
+
367
+ TestAutocomplete.displayName = "TestAutocomplete";
368
+ var _default = TestAutocomplete;
369
+ exports.default = _default;
@@ -9,124 +9,13 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _ThemeProvider = _interopRequireDefault(require("../components/ThemeProvider/ThemeProvider"));
11
11
 
12
- var _Button = _interopRequireDefault(require("../components/Button/Button"));
12
+ var _TestAutocomplete = _interopRequireDefault(require("./TestAutocomplete"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
17
-
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."); }
19
-
20
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
21
-
22
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
23
-
24
- 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; }
25
-
26
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
-
28
- var Body = function Body() {
29
- var _React$useState = _react.default.useState(false),
30
- _React$useState2 = _slicedToArray(_React$useState, 2),
31
- loading = _React$useState2[0],
32
- setLoading = _React$useState2[1];
33
-
34
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
35
- style: {
36
- backgroundColor: 'var(--gray3)',
37
- paddingLeft: '8px'
38
- }
39
- }, /*#__PURE__*/_react.default.createElement(_Button.default, {
40
- text: "texto",
41
- variant: "primary" // disabled
42
- // darkMode
43
-
44
- }), /*#__PURE__*/_react.default.createElement("div", {
45
- style: {
46
- padding: '1.5em'
47
- }
48
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
49
- text: "texto",
50
- variant: "primary",
51
- endIcon: /*#__PURE__*/_react.default.createElement("i", {
52
- className: "ri-check-fill"
53
- }),
54
- darkMode: true
55
- }), /*#__PURE__*/_react.default.createElement("div", {
56
- style: {
57
- padding: '1.5em'
58
- }
59
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
60
- text: "texto",
61
- variant: "primary",
62
- endIcon: /*#__PURE__*/_react.default.createElement("i", {
63
- className: "ri-check-fill"
64
- }),
65
- darkMode: true,
66
- onClick: function onClick() {
67
- return setLoading(!loading);
68
- },
69
- loading: loading
70
- }), /*#__PURE__*/_react.default.createElement("div", {
71
- style: {
72
- padding: '1.5em'
73
- }
74
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
75
- text: "texto",
76
- variant: "primary",
77
- onClick: function onClick() {
78
- return setLoading(!loading);
79
- },
80
- darkMode: true
81
- }), /*#__PURE__*/_react.default.createElement("div", {
82
- style: {
83
- padding: '1.5em'
84
- }
85
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
86
- text: "texto",
87
- variant: "success",
88
- loading: true // darkMode
89
-
90
- }), /*#__PURE__*/_react.default.createElement("div", {
91
- style: {
92
- padding: '1.5em'
93
- }
94
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
95
- text: "texto",
96
- variant: "primary",
97
- darkMode: true,
98
- loading: true
99
- }), /*#__PURE__*/_react.default.createElement("div", {
100
- style: {
101
- padding: '1.5em'
102
- }
103
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
104
- text: "texto",
105
- variant: "error"
106
- }), /*#__PURE__*/_react.default.createElement("div", {
107
- style: {
108
- padding: '1.5em'
109
- }
110
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
111
- text: "texto",
112
- variant: "secondary",
113
- darkMode: true,
114
- icon: /*#__PURE__*/_react.default.createElement("i", {
115
- className: "ri-save-line"
116
- })
117
- }), /*#__PURE__*/_react.default.createElement("div", {
118
- style: {
119
- padding: '1.5em'
120
- }
121
- }), /*#__PURE__*/_react.default.createElement(_Button.default, {
122
- text: "texto",
123
- variant: "secondary",
124
- darkMode: true
125
- })));
126
- };
127
-
16
+ // import TestDropdown from './TestDropdown';
128
17
  var TestComponents = function TestComponents() {
129
- return /*#__PURE__*/_react.default.createElement(_ThemeProvider.default, null, /*#__PURE__*/_react.default.createElement(Body, null));
18
+ return /*#__PURE__*/_react.default.createElement(_ThemeProvider.default, null, /*#__PURE__*/_react.default.createElement(_TestAutocomplete.default, null));
130
19
  };
131
20
 
132
21
  TestComponents.displayName = "TestComponents";