@councilbox/councilbox-ui 2.0.58 → 2.0.59
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/ScrollbarOld.js +3 -0
- package/dist/build-index.js +7 -7
- package/dist/components/1.Introduction.stories.mdx +579 -67
- package/dist/components/2.Changelog.stories.mdx +1392 -595
- package/dist/components/3.Guide.stories.mdx +570 -216
- package/dist/components/Accordion/Accordion.stories.js +55 -4
- package/dist/components/Alert/Alert.stories.js +50 -0
- package/dist/components/Avatar/Avatar.stories.js +69 -10
- package/dist/components/AvatarGroup/AvatarGroup.stories.js +51 -4
- package/dist/components/Block/Block.stories.js +23 -2
- package/dist/components/Button/Button.stories.js +47 -21
- package/dist/components/ButtonBasic/ButtonBasic.stories.js +80 -27
- package/dist/components/Checkbox/Checkbox.stories.js +73 -4
- package/dist/components/DatePicker/DatePicker.stories.js +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.stories.js +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.stories.js +1 -1
- package/dist/components/DragDrop/DragDrop.stories.js +116 -16
- package/dist/components/DrawerPanel/DrawerPanel.stories.js +227 -1
- package/dist/components/DropDown/DropDown.stories.js +198 -1
- package/dist/components/EnhancedTable/EnhancedTable.stories.js +218 -8
- package/dist/components/FabButton/FabButton.stories.js +102 -1
- package/dist/components/Grid/Grid.stories.js +178 -4
- package/dist/components/Header/Header.stories.js +588 -13
- package/dist/components/IconButton/IconButton.stories.js +167 -2
- package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +172 -2
- package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +174 -13
- package/dist/components/InputPassword/InputPassword.stories.js +114 -4
- package/dist/components/InputText/InputText.stories.js +170 -9
- package/dist/components/InputTextArea/InputTextArea.stories.js +108 -2
- package/dist/components/LoadingSection/LoadingSection.stories.js +45 -3
- package/dist/components/MenuItem/MenuItem.stories.js +92 -7
- package/dist/components/MenuLateralLeft/MenuLateralLeft.stories.js +208 -2
- package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +193 -2
- package/dist/components/Modal/Modal.stories.js +181 -19
- package/dist/components/PaginationFooter/PaginationFooter.stories.js +148 -5
- package/dist/components/RadioButton/Radio.stories.js +104 -4
- package/dist/components/RichTextInput/DesignRichTextInput.stories.js +7 -1
- package/dist/components/RichTextInput/RichTextInput.stories.js +5 -0
- package/dist/components/Ripple/Ripple.stories.js +72 -4
- package/dist/components/Scrollbar/Scrollbar.css +60 -19
- package/dist/components/Scrollbar/Scrollbar.js +386 -62
- package/dist/components/Scrollbar/Scrollbar.stories.js +5 -0
- package/dist/components/ScrollbarOld/DesignScrollbarOld.js +24 -0
- package/dist/components/ScrollbarOld/ScrollbarOld.css +38 -0
- package/dist/components/ScrollbarOld/ScrollbarOld.js +104 -0
- package/dist/components/ScrollbarOld/ScrollbarOld.stories.js +140 -0
- package/dist/components/SelectInput/SelectInput.stories.js +139 -8
- package/dist/components/Slider/Slider.stories.js +94 -3
- package/dist/components/Spacing/Spacing.stories.js +6 -1
- package/dist/components/Stars/Stars.stories.js +104 -3
- package/dist/components/Stepper/Stepper.stories.js +91 -1
- package/dist/components/Table/Table.stories.js +171 -9
- package/dist/components/Tabs/Tabs.stories.js +122 -3
- package/dist/components/Tag/Tag.stories.js +105 -2
- package/dist/components/TextInput/TextInput.stories.js +92 -4
- package/dist/components/TimePicker/TimePicker.stories.js +1 -1
- package/dist/components/Timeline/Timeline.stories.js +93 -2
- package/dist/components/Toast/Toast.stories.js +6 -0
- package/dist/components/Toggle/Toggle.stories.js +80 -4
- package/dist/components/Tooltip/Tooltip.stories.js +105 -3
- package/dist/components/Typography/Typography.stories.js +51 -10
- package/package.json +5 -5
- package/IconFont.js +0 -3
- package/dist/components/IconFont/IconFont.css +0 -0
- package/dist/components/IconFont/IconFont.js +0 -86
- package/dist/components/IconFont/IconFont.stories.js +0 -36
- package/dist/fonts/IconNames.json +0 -6848
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = exports.Default = void 0;
|
|
6
|
+
exports["default"] = exports.Design = exports.Default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _Accordion = _interopRequireDefault(require("./Accordion"));
|
|
9
9
|
var _DesignAccordion = _interopRequireDefault(require("./DesignAccordion.stories"));
|
|
@@ -11,7 +11,44 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default":
|
|
|
11
11
|
var _default = {
|
|
12
12
|
title: 'Components/Accordion',
|
|
13
13
|
component: _Accordion["default"],
|
|
14
|
-
argTypes: {
|
|
14
|
+
argTypes: {
|
|
15
|
+
title: {
|
|
16
|
+
control: 'text',
|
|
17
|
+
description: 'Título visible del acordeón.'
|
|
18
|
+
},
|
|
19
|
+
contentExpand: {
|
|
20
|
+
control: 'text',
|
|
21
|
+
description: 'Contenido que se muestra al desplegar.'
|
|
22
|
+
},
|
|
23
|
+
defaultExpanded: {
|
|
24
|
+
control: 'boolean',
|
|
25
|
+
description: 'Empieza desplegado.'
|
|
26
|
+
},
|
|
27
|
+
disabled: {
|
|
28
|
+
control: 'boolean'
|
|
29
|
+
},
|
|
30
|
+
component: {
|
|
31
|
+
control: 'select',
|
|
32
|
+
options: ['span', 'h2', 'h3', 'h4', 'p'],
|
|
33
|
+
description: 'Etiqueta HTML del título.'
|
|
34
|
+
},
|
|
35
|
+
'aria-label': {
|
|
36
|
+
control: 'text',
|
|
37
|
+
description: 'Nombre accesible del botón si no hay título.'
|
|
38
|
+
},
|
|
39
|
+
id: {
|
|
40
|
+
control: 'text'
|
|
41
|
+
},
|
|
42
|
+
className: {
|
|
43
|
+
control: 'text'
|
|
44
|
+
},
|
|
45
|
+
style: {
|
|
46
|
+
control: 'object'
|
|
47
|
+
},
|
|
48
|
+
sx: {
|
|
49
|
+
control: 'object'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
15
52
|
parameters: {
|
|
16
53
|
docs: {
|
|
17
54
|
description: {
|
|
@@ -34,11 +71,25 @@ var _default = {
|
|
|
34
71
|
};
|
|
35
72
|
exports["default"] = _default;
|
|
36
73
|
var Template = function Template(args) {
|
|
37
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
74
|
+
return /*#__PURE__*/_react["default"].createElement(_Accordion["default"], args);
|
|
38
75
|
};
|
|
39
76
|
Template.displayName = "Template";
|
|
40
77
|
var Default = Template.bind({});
|
|
41
78
|
exports.Default = Default;
|
|
42
79
|
Default.args = {
|
|
43
|
-
title: '
|
|
80
|
+
title: 'Orden del día',
|
|
81
|
+
contentExpand: 'Aprobación de las cuentas anuales del ejercicio 2025.',
|
|
82
|
+
defaultExpanded: false,
|
|
83
|
+
disabled: false,
|
|
84
|
+
component: 'span'
|
|
85
|
+
};
|
|
86
|
+
var Design = function Design() {
|
|
87
|
+
return /*#__PURE__*/_react["default"].createElement(_DesignAccordion["default"], null);
|
|
88
|
+
};
|
|
89
|
+
exports.Design = Design;
|
|
90
|
+
Design.displayName = "Design";
|
|
91
|
+
Design.parameters = {
|
|
92
|
+
controls: {
|
|
93
|
+
disable: true
|
|
94
|
+
}
|
|
44
95
|
};
|
|
@@ -16,6 +16,56 @@ var _default = {
|
|
|
16
16
|
control: {
|
|
17
17
|
type: 'radio'
|
|
18
18
|
}
|
|
19
|
+
},
|
|
20
|
+
title: {
|
|
21
|
+
control: 'text'
|
|
22
|
+
},
|
|
23
|
+
description: {
|
|
24
|
+
control: 'text',
|
|
25
|
+
description: 'Texto secundario bajo el título.'
|
|
26
|
+
},
|
|
27
|
+
icon: {
|
|
28
|
+
control: 'select',
|
|
29
|
+
options: ['', 'ri-information-line', 'ri-checkbox-circle-line', 'ri-error-warning-line', 'ri-alert-line', 'ri-lightbulb-line'],
|
|
30
|
+
description: 'Clase de icono. Vacío usa el icono del tipo.'
|
|
31
|
+
},
|
|
32
|
+
variant: {
|
|
33
|
+
control: 'select',
|
|
34
|
+
options: ['5XL', '4XL', '3XL', '2XL', 'XL', 'L', 'M', 'S', 'XS', '2XS'],
|
|
35
|
+
description: 'Variante tipográfica del título.'
|
|
36
|
+
},
|
|
37
|
+
fontWeight: {
|
|
38
|
+
control: 'select',
|
|
39
|
+
options: ['400', '500', '600', '700']
|
|
40
|
+
},
|
|
41
|
+
textAlign: {
|
|
42
|
+
control: 'select',
|
|
43
|
+
options: ['left', 'center', 'right', 'justify']
|
|
44
|
+
},
|
|
45
|
+
colorText: {
|
|
46
|
+
control: 'color'
|
|
47
|
+
},
|
|
48
|
+
secondaryFont: {
|
|
49
|
+
control: 'boolean'
|
|
50
|
+
},
|
|
51
|
+
component: {
|
|
52
|
+
control: 'select',
|
|
53
|
+
options: ['p', 'span', 'div', 'h2', 'h3']
|
|
54
|
+
},
|
|
55
|
+
typographyProps: {
|
|
56
|
+
control: 'object'
|
|
57
|
+
},
|
|
58
|
+
id: {
|
|
59
|
+
control: 'text'
|
|
60
|
+
},
|
|
61
|
+
className: {
|
|
62
|
+
control: 'text'
|
|
63
|
+
},
|
|
64
|
+
style: {
|
|
65
|
+
control: 'object'
|
|
66
|
+
},
|
|
67
|
+
sx: {
|
|
68
|
+
control: 'object'
|
|
19
69
|
}
|
|
20
70
|
},
|
|
21
71
|
parameters: {
|
|
@@ -30,19 +30,74 @@ var _default = {
|
|
|
30
30
|
imgGirl: 'Mujer',
|
|
31
31
|
imgMan: 'Hombre',
|
|
32
32
|
imgDefault: 'Default',
|
|
33
|
-
|
|
33
|
+
empty: 'Sin imagen'
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
text: {
|
|
38
|
-
control:
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
control: 'text',
|
|
39
|
+
description: 'Iniciales que se muestran sin imagen.'
|
|
40
|
+
},
|
|
41
|
+
alt: {
|
|
42
|
+
control: 'text',
|
|
43
|
+
description: 'Texto alternativo de la imagen.'
|
|
41
44
|
},
|
|
42
45
|
label: {
|
|
43
|
-
control:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
control: 'text',
|
|
47
|
+
description: 'Texto a la derecha del avatar.'
|
|
48
|
+
},
|
|
49
|
+
tooltip: {
|
|
50
|
+
control: 'text'
|
|
51
|
+
},
|
|
52
|
+
placementTooltip: {
|
|
53
|
+
control: 'select',
|
|
54
|
+
options: ['top', 'right', 'bottom', 'left']
|
|
55
|
+
},
|
|
56
|
+
backgroundColor: {
|
|
57
|
+
control: 'color'
|
|
58
|
+
},
|
|
59
|
+
sizeAvatar: {
|
|
60
|
+
control: 'select',
|
|
61
|
+
options: ['', 'SM', 'XS']
|
|
62
|
+
},
|
|
63
|
+
colorText: {
|
|
64
|
+
control: 'color'
|
|
65
|
+
},
|
|
66
|
+
variantText: {
|
|
67
|
+
control: 'select',
|
|
68
|
+
options: ['', 'L', 'M', 'S', 'XS', '2XS']
|
|
69
|
+
},
|
|
70
|
+
fontWeightText: {
|
|
71
|
+
control: 'select',
|
|
72
|
+
options: ['400', '500', '600', '700']
|
|
73
|
+
},
|
|
74
|
+
textAlignText: {
|
|
75
|
+
control: 'select',
|
|
76
|
+
options: ['left', 'center', 'right']
|
|
77
|
+
},
|
|
78
|
+
colorLabel: {
|
|
79
|
+
control: 'color'
|
|
80
|
+
},
|
|
81
|
+
variantLabel: {
|
|
82
|
+
control: 'select',
|
|
83
|
+
options: ['', 'L', 'M', 'S', 'XS', '2XS']
|
|
84
|
+
},
|
|
85
|
+
fontWeightLabel: {
|
|
86
|
+
control: 'select',
|
|
87
|
+
options: ['', '400', '500', '600', '700']
|
|
88
|
+
},
|
|
89
|
+
textAlignLabel: {
|
|
90
|
+
control: 'select',
|
|
91
|
+
options: ['', 'left', 'center', 'right']
|
|
92
|
+
},
|
|
93
|
+
sizeText: {
|
|
94
|
+
control: 'text'
|
|
95
|
+
},
|
|
96
|
+
style: {
|
|
97
|
+
control: 'object'
|
|
98
|
+
},
|
|
99
|
+
sx: {
|
|
100
|
+
control: 'object'
|
|
46
101
|
}
|
|
47
102
|
},
|
|
48
103
|
parameters: {
|
|
@@ -79,9 +134,13 @@ TemplateAvatar.displayName = "TemplateAvatar";
|
|
|
79
134
|
var Default = Template.bind({});
|
|
80
135
|
exports.Default = Default;
|
|
81
136
|
Default.args = {
|
|
82
|
-
text: '',
|
|
83
|
-
src:
|
|
84
|
-
|
|
137
|
+
text: 'MW',
|
|
138
|
+
src: 'imgDefault',
|
|
139
|
+
alt: 'María Wilson',
|
|
140
|
+
label: '',
|
|
141
|
+
tooltip: '',
|
|
142
|
+
backgroundColor: '',
|
|
143
|
+
sizeAvatar: ''
|
|
85
144
|
};
|
|
86
145
|
var DesignAvatarTemplate = TemplateAvatar.bind({});
|
|
87
146
|
exports.DesignAvatarTemplate = DesignAvatarTemplate;
|
|
@@ -3,23 +3,70 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = exports.DesignGroup = void 0;
|
|
6
|
+
exports["default"] = exports.Playground = exports.DesignGroup = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _AvatarGroup = _interopRequireDefault(require("./AvatarGroup"));
|
|
9
9
|
var _DesignAvatarGroup = _interopRequireDefault(require("./DesignAvatarGroup.stories"));
|
|
10
|
+
var _Avatar = _interopRequireDefault(require("../Avatar/Avatar"));
|
|
11
|
+
var _excluded = ["numberOfAvatars"];
|
|
10
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
11
15
|
var _default = {
|
|
12
16
|
title: 'Components/AvatarGroup',
|
|
13
17
|
component: _AvatarGroup["default"],
|
|
14
|
-
argTypes: {
|
|
18
|
+
argTypes: {
|
|
19
|
+
compressed: {
|
|
20
|
+
control: 'boolean',
|
|
21
|
+
description: 'Solapa los avatares.'
|
|
22
|
+
},
|
|
23
|
+
sizeGroup: {
|
|
24
|
+
control: 'select',
|
|
25
|
+
options: ['', 'S', 'XS'],
|
|
26
|
+
description: 'Tamaño de la separación.'
|
|
27
|
+
},
|
|
28
|
+
numberOfAvatars: {
|
|
29
|
+
control: {
|
|
30
|
+
type: 'range',
|
|
31
|
+
min: 1,
|
|
32
|
+
max: 8,
|
|
33
|
+
step: 1
|
|
34
|
+
},
|
|
35
|
+
description: 'Solo para la demo: número de avatares hijos.',
|
|
36
|
+
table: {
|
|
37
|
+
category: 'Demo'
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
15
41
|
};
|
|
16
42
|
exports["default"] = _default;
|
|
43
|
+
var PlaygroundTemplate = function PlaygroundTemplate(_ref) {
|
|
44
|
+
var numberOfAvatars = _ref.numberOfAvatars,
|
|
45
|
+
args = _objectWithoutProperties(_ref, _excluded);
|
|
46
|
+
return /*#__PURE__*/_react["default"].createElement(_AvatarGroup["default"], args, ['AB', 'CD', 'EF', 'GH', 'IJ', 'KL', 'MN', 'OP'].slice(0, numberOfAvatars).map(function (initials) {
|
|
47
|
+
return /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
48
|
+
key: initials,
|
|
49
|
+
text: initials,
|
|
50
|
+
backgroundColor: "var(--gray2)"
|
|
51
|
+
});
|
|
52
|
+
}));
|
|
53
|
+
};
|
|
54
|
+
PlaygroundTemplate.displayName = "PlaygroundTemplate";
|
|
55
|
+
var Playground = PlaygroundTemplate.bind({});
|
|
56
|
+
exports.Playground = Playground;
|
|
57
|
+
Playground.args = {
|
|
58
|
+
compressed: false,
|
|
59
|
+
sizeGroup: '',
|
|
60
|
+
numberOfAvatars: 4
|
|
61
|
+
};
|
|
17
62
|
var TemplateAvatarGroup = function TemplateAvatarGroup(args) {
|
|
18
63
|
return /*#__PURE__*/_react["default"].createElement(_DesignAvatarGroup["default"], args);
|
|
19
64
|
};
|
|
20
65
|
TemplateAvatarGroup.displayName = "TemplateAvatarGroup";
|
|
21
66
|
var DesignGroup = TemplateAvatarGroup.bind({});
|
|
22
67
|
exports.DesignGroup = DesignGroup;
|
|
23
|
-
|
|
24
|
-
|
|
68
|
+
DesignGroup.parameters = {
|
|
69
|
+
controls: {
|
|
70
|
+
disable: true
|
|
71
|
+
}
|
|
25
72
|
};
|
|
@@ -13,10 +13,27 @@ var _default = {
|
|
|
13
13
|
component: _Block["default"],
|
|
14
14
|
argTypes: {
|
|
15
15
|
variant: {
|
|
16
|
-
options: ['primary', 'secondary', '
|
|
16
|
+
options: ['default', 'primary', 'secondary', 'tertiary'],
|
|
17
17
|
control: {
|
|
18
18
|
type: 'radio'
|
|
19
19
|
}
|
|
20
|
+
},
|
|
21
|
+
children: {
|
|
22
|
+
control: 'text',
|
|
23
|
+
description: 'Contenido del bloque.'
|
|
24
|
+
},
|
|
25
|
+
component: {
|
|
26
|
+
control: 'select',
|
|
27
|
+
options: ['div', 'section', 'article', 'aside']
|
|
28
|
+
},
|
|
29
|
+
className: {
|
|
30
|
+
control: 'text'
|
|
31
|
+
},
|
|
32
|
+
style: {
|
|
33
|
+
control: 'object'
|
|
34
|
+
},
|
|
35
|
+
sx: {
|
|
36
|
+
control: 'object'
|
|
20
37
|
}
|
|
21
38
|
},
|
|
22
39
|
parameters: {
|
|
@@ -41,5 +58,9 @@ var TemplateBlock = function TemplateBlock(args) {
|
|
|
41
58
|
TemplateBlock.displayName = "TemplateBlock";
|
|
42
59
|
var DesignBlockTemplate = TemplateBlock.bind({});
|
|
43
60
|
exports.DesignBlockTemplate = DesignBlockTemplate;
|
|
44
|
-
DesignBlockTemplate.parameters = {
|
|
61
|
+
DesignBlockTemplate.parameters = {
|
|
62
|
+
controls: {
|
|
63
|
+
disable: true
|
|
64
|
+
}
|
|
65
|
+
};
|
|
45
66
|
DesignBlockTemplate.args = {};
|
|
@@ -8,12 +8,14 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _Button = _interopRequireDefault(require("./Button"));
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
var ICONS = {
|
|
11
|
-
none:
|
|
11
|
+
none: null,
|
|
12
12
|
save: /*#__PURE__*/_react["default"].createElement("i", {
|
|
13
|
-
className: "ri-save-line"
|
|
13
|
+
className: "ri-save-line",
|
|
14
|
+
"aria-hidden": "true"
|
|
14
15
|
}),
|
|
15
16
|
edit: /*#__PURE__*/_react["default"].createElement("i", {
|
|
16
|
-
className: "ri-pencil-line"
|
|
17
|
+
className: "ri-pencil-line",
|
|
18
|
+
"aria-hidden": "true"
|
|
17
19
|
}),
|
|
18
20
|
arrow: 'arrow'
|
|
19
21
|
};
|
|
@@ -21,41 +23,59 @@ var _default = {
|
|
|
21
23
|
title: 'Components/Button',
|
|
22
24
|
component: _Button["default"],
|
|
23
25
|
argTypes: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
text: {
|
|
27
|
+
control: 'text'
|
|
28
|
+
},
|
|
29
|
+
variant: {
|
|
30
|
+
options: ['primary', 'secondary', 'tertiary', 'success', 'warning', 'error', 'inversed'],
|
|
26
31
|
control: {
|
|
27
32
|
type: 'radio'
|
|
28
33
|
}
|
|
29
34
|
},
|
|
35
|
+
loading: {
|
|
36
|
+
control: 'boolean'
|
|
37
|
+
},
|
|
30
38
|
disabled: {
|
|
31
|
-
|
|
32
|
-
control: {
|
|
33
|
-
type: 'radio'
|
|
34
|
-
}
|
|
39
|
+
control: 'boolean'
|
|
35
40
|
},
|
|
36
41
|
fullWidth: {
|
|
37
|
-
|
|
38
|
-
control: {
|
|
39
|
-
type: 'radio'
|
|
40
|
-
}
|
|
42
|
+
control: 'boolean'
|
|
41
43
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
control: {
|
|
45
|
-
type: 'radio'
|
|
46
|
-
}
|
|
44
|
+
darkMode: {
|
|
45
|
+
control: 'boolean'
|
|
47
46
|
},
|
|
48
47
|
icon: {
|
|
49
48
|
control: {
|
|
50
49
|
type: 'select'
|
|
51
50
|
},
|
|
52
|
-
options: ICONS
|
|
51
|
+
options: Object.keys(ICONS),
|
|
52
|
+
mapping: ICONS
|
|
53
53
|
},
|
|
54
54
|
endIcon: {
|
|
55
55
|
control: {
|
|
56
56
|
type: 'select'
|
|
57
57
|
},
|
|
58
|
-
options: ICONS
|
|
58
|
+
options: Object.keys(ICONS),
|
|
59
|
+
mapping: ICONS
|
|
60
|
+
},
|
|
61
|
+
variantText: {
|
|
62
|
+
control: 'select',
|
|
63
|
+
options: ['', 'L', 'M', 'S', 'XS']
|
|
64
|
+
},
|
|
65
|
+
stylesButton: {
|
|
66
|
+
control: 'object'
|
|
67
|
+
},
|
|
68
|
+
stylesText: {
|
|
69
|
+
control: 'object'
|
|
70
|
+
},
|
|
71
|
+
onClick: {
|
|
72
|
+
action: 'onClick'
|
|
73
|
+
},
|
|
74
|
+
id: {
|
|
75
|
+
control: 'text'
|
|
76
|
+
},
|
|
77
|
+
'aria-label': {
|
|
78
|
+
control: 'text'
|
|
59
79
|
}
|
|
60
80
|
}
|
|
61
81
|
};
|
|
@@ -68,5 +88,11 @@ var Default = Template.bind({});
|
|
|
68
88
|
exports.Default = Default;
|
|
69
89
|
Default.args = {
|
|
70
90
|
text: 'Label',
|
|
71
|
-
variant: 'primary'
|
|
91
|
+
variant: 'primary',
|
|
92
|
+
loading: false,
|
|
93
|
+
disabled: false,
|
|
94
|
+
fullWidth: false,
|
|
95
|
+
darkMode: false,
|
|
96
|
+
icon: 'none',
|
|
97
|
+
endIcon: 'none'
|
|
72
98
|
};
|
|
@@ -8,7 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _ButtonBasic = _interopRequireDefault(require("./ButtonBasic"));
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
var ICONS = {
|
|
11
|
-
none:
|
|
11
|
+
none: undefined,
|
|
12
12
|
arrowLeft: /*#__PURE__*/_react["default"].createElement("i", {
|
|
13
13
|
className: "ri-arrow-left-s-line"
|
|
14
14
|
}),
|
|
@@ -26,53 +26,98 @@ var _default = {
|
|
|
26
26
|
title: 'Components/ButtonBasic',
|
|
27
27
|
component: _ButtonBasic["default"],
|
|
28
28
|
argTypes: {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
text: {
|
|
30
|
+
control: 'text'
|
|
31
|
+
},
|
|
32
|
+
variant: {
|
|
33
|
+
options: ['primary', 'secondary', 'secondaryDark', 'tertiary'],
|
|
31
34
|
control: {
|
|
32
35
|
type: 'radio'
|
|
33
36
|
}
|
|
34
37
|
},
|
|
38
|
+
loading: {
|
|
39
|
+
control: 'boolean'
|
|
40
|
+
},
|
|
35
41
|
disabled: {
|
|
36
|
-
|
|
37
|
-
control: {
|
|
38
|
-
type: 'radio'
|
|
39
|
-
}
|
|
42
|
+
control: 'boolean'
|
|
40
43
|
},
|
|
41
44
|
fullWidth: {
|
|
42
|
-
|
|
43
|
-
control: {
|
|
44
|
-
type: 'radio'
|
|
45
|
-
}
|
|
45
|
+
control: 'boolean'
|
|
46
46
|
},
|
|
47
47
|
success: {
|
|
48
|
-
|
|
49
|
-
control: {
|
|
50
|
-
type: 'radio'
|
|
51
|
-
}
|
|
48
|
+
control: 'boolean'
|
|
52
49
|
},
|
|
53
50
|
error: {
|
|
54
|
-
|
|
55
|
-
control: {
|
|
56
|
-
type: 'radio'
|
|
57
|
-
}
|
|
51
|
+
control: 'boolean'
|
|
58
52
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
control: {
|
|
62
|
-
type: 'radio'
|
|
63
|
-
}
|
|
53
|
+
badge: {
|
|
54
|
+
control: 'boolean'
|
|
64
55
|
},
|
|
65
56
|
startIcon: {
|
|
66
57
|
control: {
|
|
67
58
|
type: 'select'
|
|
68
59
|
},
|
|
69
|
-
options: ICONS
|
|
60
|
+
options: Object.keys(ICONS),
|
|
61
|
+
mapping: ICONS
|
|
70
62
|
},
|
|
71
63
|
endIcon: {
|
|
72
64
|
control: {
|
|
73
65
|
type: 'select'
|
|
74
66
|
},
|
|
75
|
-
options: ICONS
|
|
67
|
+
options: Object.keys(ICONS),
|
|
68
|
+
mapping: ICONS
|
|
69
|
+
},
|
|
70
|
+
variantText: {
|
|
71
|
+
control: 'select',
|
|
72
|
+
options: ['', 'L', 'M', 'S', 'XS']
|
|
73
|
+
},
|
|
74
|
+
resetDelay: {
|
|
75
|
+
control: 'number',
|
|
76
|
+
description: 'Milisegundos hasta llamar a "reset" tras success o error.'
|
|
77
|
+
},
|
|
78
|
+
reset: {
|
|
79
|
+
action: 'reset'
|
|
80
|
+
},
|
|
81
|
+
onClick: {
|
|
82
|
+
action: 'onClick'
|
|
83
|
+
},
|
|
84
|
+
component: {
|
|
85
|
+
control: 'select',
|
|
86
|
+
options: ['button', 'a', 'span']
|
|
87
|
+
},
|
|
88
|
+
badgeAriaLabel: {
|
|
89
|
+
control: 'text'
|
|
90
|
+
},
|
|
91
|
+
loadingAriaLabel: {
|
|
92
|
+
control: 'text'
|
|
93
|
+
},
|
|
94
|
+
'aria-label': {
|
|
95
|
+
control: 'text'
|
|
96
|
+
},
|
|
97
|
+
stylesButton: {
|
|
98
|
+
control: 'object'
|
|
99
|
+
},
|
|
100
|
+
id: {
|
|
101
|
+
control: 'text'
|
|
102
|
+
},
|
|
103
|
+
className: {
|
|
104
|
+
control: 'text'
|
|
105
|
+
},
|
|
106
|
+
style: {
|
|
107
|
+
control: 'object'
|
|
108
|
+
},
|
|
109
|
+
sx: {
|
|
110
|
+
control: 'object'
|
|
111
|
+
},
|
|
112
|
+
icon: {
|
|
113
|
+
table: {
|
|
114
|
+
disable: true
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
prefixClass: {
|
|
118
|
+
table: {
|
|
119
|
+
disable: true
|
|
120
|
+
}
|
|
76
121
|
}
|
|
77
122
|
},
|
|
78
123
|
parameters: {
|
|
@@ -104,5 +149,13 @@ var Default = Template.bind({});
|
|
|
104
149
|
exports.Default = Default;
|
|
105
150
|
Default.args = {
|
|
106
151
|
text: 'Action',
|
|
107
|
-
variant: 'primary'
|
|
152
|
+
variant: 'primary',
|
|
153
|
+
loading: false,
|
|
154
|
+
disabled: false,
|
|
155
|
+
fullWidth: false,
|
|
156
|
+
success: false,
|
|
157
|
+
error: false,
|
|
158
|
+
badge: false,
|
|
159
|
+
startIcon: 'none',
|
|
160
|
+
endIcon: 'none'
|
|
108
161
|
};
|