@widergy/energy-ui 3.121.3 → 3.122.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.
- package/CHANGELOG.md +20 -0
- package/README.md +0 -1
- package/dist/components/UTAvatar/constants.js +44 -1
- package/dist/components/UTAvatar/index.js +31 -8
- package/dist/components/UTAvatar/stories/UTAvatar.mdx +13 -0
- package/dist/components/UTAvatar/stories/UTAvatar.stories.js +38 -0
- package/dist/components/UTAvatar/stories/UTAvatarColors.stories.js +91 -0
- package/dist/components/UTAvatar/stories/UTAvatarShapes.stories.js +51 -0
- package/dist/components/UTAvatar/stories/UTAvatarSizes.stories.js +106 -0
- package/dist/components/UTAvatar/stories/UTAvatarTypes.stories.js +51 -0
- package/dist/components/UTAvatar/stories/storiesConstants.js +155 -0
- package/dist/components/UTAvatar/styles.module.scss +24 -0
- package/dist/components/UTBodyPlaceholder/UTBodyPlaceholder.mdx +11 -0
- package/dist/components/UTBodyPlaceholder/UTBodyPlaceholder.stories.js +76 -0
- package/dist/components/UTBodyPlaceholder/constants.js +14 -0
- package/dist/components/UTBodyPlaceholder/index.js +45 -0
- package/dist/components/UTBodyPlaceholder/styles.module.scss +34 -0
- package/dist/components/UTButton/constants.js +8 -5
- package/dist/components/UTButton/stories/UTButton.mdx +13 -0
- package/dist/components/UTButton/stories/UTButton.stories.js +38 -0
- package/dist/components/UTButton/stories/UTButtonAdornments.stories.js +52 -0
- package/dist/components/UTButton/stories/UTButtonColorThemes.stories.js +52 -0
- package/dist/components/UTButton/stories/UTButtonSizes.stories.js +40 -0
- package/dist/components/UTButton/stories/UTButtonStates.stories.js +34 -0
- package/dist/components/UTButton/stories/UTButtonVariants.stories.js +61 -0
- package/dist/components/UTButton/stories/storiesConstants.js +220 -0
- package/dist/components/UTButton/theme.js +15 -14
- package/dist/components/UTButton/utils.js +2 -2
- package/dist/components/UTDataElement/UTDataElement.stories.js +2 -1
- package/dist/components/UTDataElement/theme.js +2 -1
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/CollapsedPanelContent/constants.js +11 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/CollapsedPanelContent/index.js +34 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/CollapsedPanelContent/layout.js +46 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryEmpty/index.js +36 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryEmpty/layout.js +50 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryHeader/constants.js +8 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryHeader/index.js +55 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryHeader/layout.js +78 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryItem/constants.js +21 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryItem/index.js +80 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryItem/layout.js +132 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/constants.js +7 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/index.js +62 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/layout.js +78 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/utils.js +23 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentHeader/constants.js +16 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentHeader/index.js +75 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentHeader/layout.js +136 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentPopper/constants.js +11 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentPopper/index.js +40 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentPopper/layout.js +55 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/index.js +37 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/layout.js +44 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/index.js +57 -0
- package/dist/components/UTFilterGrouping/components/GroupingPanel/layout.js +64 -0
- package/dist/components/UTFilterGrouping/constants.js +10 -0
- package/dist/components/UTFilterGrouping/context.js +9 -0
- package/dist/components/UTFilterGrouping/index.js +187 -0
- package/dist/components/UTFilterGrouping/layout.js +43 -0
- package/dist/components/UTFilterGrouping/stories/UTFilterGrouping.mdx +13 -0
- package/dist/components/UTFilterGrouping/stories/UTFilterGrouping.stories.js +315 -0
- package/dist/components/UTFilterGrouping/stories/constants.json +282 -0
- package/dist/components/UTFilterGrouping/stories/fixtures.js +162 -0
- package/dist/components/UTFilterGrouping/stories/props.schema.json +163 -0
- package/dist/components/UTFilterGrouping/stories/styles.module.scss +19 -0
- package/dist/components/UTFilterGrouping/stories/tests.js +250 -0
- package/dist/components/UTFilterGrouping/stories/utils.js +178 -0
- package/dist/components/UTFilterGrouping/styles.module.scss +251 -0
- package/dist/components/UTFilterGrouping/theme.js +55 -0
- package/dist/components/UTFilterGrouping/types.js +51 -0
- package/dist/components/UTFilterGrouping/utils.js +27 -0
- package/dist/components/UTGraph/UTGraph.stories.js +1 -1
- package/dist/components/UTIcon/UTIcon.mdx +17 -0
- package/dist/components/UTIcon/UTIcon.stories.js +2 -1
- package/dist/components/UTIcon/index.js +2 -19
- package/dist/components/UTKpi/UTKpi.stories.js +2 -1
- package/dist/components/UTLabel/UTLabel.stories.js +2 -1
- package/dist/components/UTPanel/UTPanel.stories.js +2 -1
- package/dist/components/UTRadioGroup/UTRadioGroup.stories.js +2 -1
- package/dist/components/UTSearchField/index.js +8 -2
- package/dist/components/UTSearchField/stories/UTSearchField.mdx +11 -0
- package/dist/components/UTSearchField/stories/UTSearchField.stories.js +250 -0
- package/dist/components/UTSignature/UTSignature.stories.js +2 -1
- package/dist/components/UTStatus/UTStatus.stories.js +2 -1
- package/dist/components/UTSwitch/versions/V1/theme.js +5 -4
- package/dist/components/UTTable/UTTable.stories.js +2 -1
- package/dist/constants/Palette.js +1 -0
- package/dist/constants/testIds.js +53 -1
- package/dist/index.js +7 -0
- package/dist/types/iconTypes.js +25 -0
- package/package.json +8 -1
|
@@ -16,6 +16,7 @@ const UTSearchField = _ref => {
|
|
|
16
16
|
let {
|
|
17
17
|
classes,
|
|
18
18
|
className,
|
|
19
|
+
customAction,
|
|
19
20
|
dataKeyboard,
|
|
20
21
|
dataTestId,
|
|
21
22
|
disabled,
|
|
@@ -45,10 +46,10 @@ const UTSearchField = _ref => {
|
|
|
45
46
|
shade: '02'
|
|
46
47
|
}
|
|
47
48
|
}];
|
|
48
|
-
const rightAdornments = value ? [{
|
|
49
|
+
const rightAdornments = value || customAction ? [{
|
|
49
50
|
name: _constants.COMPONENT_KEYS.ACTION,
|
|
50
51
|
props: {
|
|
51
|
-
action
|
|
52
|
+
action: customAction || action
|
|
52
53
|
}
|
|
53
54
|
}] : [];
|
|
54
55
|
return /*#__PURE__*/_react.default.createElement(_UTBaseInputField.default, {
|
|
@@ -76,6 +77,11 @@ const UTSearchField = _ref => {
|
|
|
76
77
|
const propTypes = exports.propTypes = {
|
|
77
78
|
className: _propTypes.string,
|
|
78
79
|
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
80
|
+
customAction: (0, _propTypes.shape)({
|
|
81
|
+
Icon: _propTypes.string,
|
|
82
|
+
onClick: _propTypes.func,
|
|
83
|
+
size: _propTypes.string
|
|
84
|
+
}),
|
|
79
85
|
dataKeyboard: _propTypes.string,
|
|
80
86
|
dataTestId: _propTypes.string,
|
|
81
87
|
disabled: _propTypes.bool,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ArgTypes, Canvas, Description, Meta, Title } from '@storybook/addon-docs';
|
|
2
|
+
|
|
3
|
+
import * as UTSearchFieldStories from './UTSearchField.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={UTSearchFieldStories} />
|
|
6
|
+
|
|
7
|
+
<Title>UTSearchField</Title>
|
|
8
|
+
|
|
9
|
+
<Description of={UTSearchFieldStories} />
|
|
10
|
+
|
|
11
|
+
<ArgTypes />
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.WithValue = exports.WithCustomAction = exports.Playground = exports.Disabled = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _ = _interopRequireDefault(require(".."));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (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 (const 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); }
|
|
11
|
+
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); }
|
|
12
|
+
const PlaygroundTemplate = args => {
|
|
13
|
+
const [value, setValue] = (0, _react.useState)(args.value);
|
|
14
|
+
const handleChange = searchValue => {
|
|
15
|
+
setValue(searchValue);
|
|
16
|
+
console.log('Search value:', searchValue);
|
|
17
|
+
};
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement(_.default, _extends({}, args, {
|
|
19
|
+
value: value,
|
|
20
|
+
onChange: handleChange
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
var _default = exports.default = {
|
|
24
|
+
args: {
|
|
25
|
+
placeholder: 'Buscar...',
|
|
26
|
+
disabled: false,
|
|
27
|
+
variant: 'gray'
|
|
28
|
+
},
|
|
29
|
+
argTypes: {
|
|
30
|
+
className: {
|
|
31
|
+
control: 'text',
|
|
32
|
+
description: 'Clase CSS personalizada para el contenedor.',
|
|
33
|
+
table: {
|
|
34
|
+
defaultValue: {
|
|
35
|
+
summary: 'undefined'
|
|
36
|
+
},
|
|
37
|
+
type: {
|
|
38
|
+
summary: 'string'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
classes: {
|
|
43
|
+
control: 'none',
|
|
44
|
+
description: 'Clases personalizadas para elementos internos.',
|
|
45
|
+
table: {
|
|
46
|
+
defaultValue: {
|
|
47
|
+
summary: 'undefined'
|
|
48
|
+
},
|
|
49
|
+
type: {
|
|
50
|
+
summary: 'Record<string, string>'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
customAction: {
|
|
55
|
+
control: 'none',
|
|
56
|
+
description: 'Acción personalizada para el botón derecho.',
|
|
57
|
+
table: {
|
|
58
|
+
defaultValue: {
|
|
59
|
+
summary: 'undefined'
|
|
60
|
+
},
|
|
61
|
+
type: {
|
|
62
|
+
summary: 'shape({ Icon: string, onClick: func, size: string })'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
dataKeyboard: {
|
|
67
|
+
control: 'text',
|
|
68
|
+
description: 'Identificador para teclado virtual.',
|
|
69
|
+
table: {
|
|
70
|
+
defaultValue: {
|
|
71
|
+
summary: 'search'
|
|
72
|
+
},
|
|
73
|
+
type: {
|
|
74
|
+
summary: 'string'
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
dataTestId: {
|
|
79
|
+
control: 'text',
|
|
80
|
+
description: 'Identificador para testing.',
|
|
81
|
+
table: {
|
|
82
|
+
defaultValue: {
|
|
83
|
+
summary: 'undefined'
|
|
84
|
+
},
|
|
85
|
+
type: {
|
|
86
|
+
summary: 'string'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
disabled: {
|
|
91
|
+
control: 'boolean',
|
|
92
|
+
description: 'Deshabilita el campo de búsqueda.',
|
|
93
|
+
table: {
|
|
94
|
+
defaultValue: {
|
|
95
|
+
summary: 'false'
|
|
96
|
+
},
|
|
97
|
+
type: {
|
|
98
|
+
summary: 'boolean'
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
id: {
|
|
103
|
+
control: 'text',
|
|
104
|
+
description: 'Identificador HTML del elemento.',
|
|
105
|
+
table: {
|
|
106
|
+
defaultValue: {
|
|
107
|
+
summary: 'undefined'
|
|
108
|
+
},
|
|
109
|
+
type: {
|
|
110
|
+
summary: 'string'
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
onBlur: {
|
|
115
|
+
control: 'none',
|
|
116
|
+
description: 'Callback ejecutado cuando el campo pierde el foco.',
|
|
117
|
+
table: {
|
|
118
|
+
defaultValue: {
|
|
119
|
+
summary: 'undefined'
|
|
120
|
+
},
|
|
121
|
+
type: {
|
|
122
|
+
summary: 'function'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
onChange: {
|
|
127
|
+
control: 'none',
|
|
128
|
+
description: 'Callback ejecutado cuando cambia el valor del campo.',
|
|
129
|
+
table: {
|
|
130
|
+
defaultValue: {
|
|
131
|
+
summary: '() => {}'
|
|
132
|
+
},
|
|
133
|
+
type: {
|
|
134
|
+
summary: 'function'
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
onFocus: {
|
|
139
|
+
control: 'none',
|
|
140
|
+
description: 'Callback ejecutado cuando el campo recibe el foco.',
|
|
141
|
+
table: {
|
|
142
|
+
defaultValue: {
|
|
143
|
+
summary: 'undefined'
|
|
144
|
+
},
|
|
145
|
+
type: {
|
|
146
|
+
summary: 'function'
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
placeholder: {
|
|
151
|
+
control: 'text',
|
|
152
|
+
description: 'Texto de placeholder del campo de búsqueda.',
|
|
153
|
+
table: {
|
|
154
|
+
defaultValue: {
|
|
155
|
+
summary: 'undefined'
|
|
156
|
+
},
|
|
157
|
+
type: {
|
|
158
|
+
summary: 'string'
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
size: {
|
|
163
|
+
control: 'text',
|
|
164
|
+
description: 'Tamaño del campo de entrada.',
|
|
165
|
+
table: {
|
|
166
|
+
defaultValue: {
|
|
167
|
+
summary: 'undefined'
|
|
168
|
+
},
|
|
169
|
+
type: {
|
|
170
|
+
summary: 'string'
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
type: {
|
|
175
|
+
control: 'text',
|
|
176
|
+
description: 'Tipo de entrada HTML.',
|
|
177
|
+
table: {
|
|
178
|
+
defaultValue: {
|
|
179
|
+
summary: 'undefined'
|
|
180
|
+
},
|
|
181
|
+
type: {
|
|
182
|
+
summary: 'string'
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
value: {
|
|
187
|
+
control: 'text',
|
|
188
|
+
description: 'Valor actual del campo de búsqueda.',
|
|
189
|
+
table: {
|
|
190
|
+
defaultValue: {
|
|
191
|
+
summary: 'null'
|
|
192
|
+
},
|
|
193
|
+
type: {
|
|
194
|
+
summary: 'string'
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
variant: {
|
|
199
|
+
control: 'text',
|
|
200
|
+
description: 'Variante de estilo del campo.',
|
|
201
|
+
table: {
|
|
202
|
+
defaultValue: {
|
|
203
|
+
summary: 'gray'
|
|
204
|
+
},
|
|
205
|
+
type: {
|
|
206
|
+
summary: 'string'
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
component: _.default,
|
|
212
|
+
parameters: {
|
|
213
|
+
docs: {
|
|
214
|
+
description: {
|
|
215
|
+
component: 'Campo de búsqueda con icono de lupa y botón de limpiar.'
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
title: 'Energy-UI/UTSearchField'
|
|
220
|
+
};
|
|
221
|
+
const Playground = exports.Playground = {
|
|
222
|
+
name: 'Playground',
|
|
223
|
+
render: PlaygroundTemplate
|
|
224
|
+
};
|
|
225
|
+
const WithValue = exports.WithValue = {
|
|
226
|
+
name: 'Con valor',
|
|
227
|
+
args: {
|
|
228
|
+
value: 'Texto de búsqueda'
|
|
229
|
+
},
|
|
230
|
+
render: PlaygroundTemplate
|
|
231
|
+
};
|
|
232
|
+
const Disabled = exports.Disabled = {
|
|
233
|
+
name: 'Deshabilitado',
|
|
234
|
+
args: {
|
|
235
|
+
disabled: true,
|
|
236
|
+
placeholder: 'Campo deshabilitado'
|
|
237
|
+
},
|
|
238
|
+
render: PlaygroundTemplate
|
|
239
|
+
};
|
|
240
|
+
const WithCustomAction = exports.WithCustomAction = {
|
|
241
|
+
name: 'Con acción personalizada',
|
|
242
|
+
args: {
|
|
243
|
+
customAction: {
|
|
244
|
+
Icon: 'IconFilter',
|
|
245
|
+
onClick: () => console.log('Custom action clicked'),
|
|
246
|
+
size: 'small'
|
|
247
|
+
},
|
|
248
|
+
value: 'Búsqueda con filtro'
|
|
249
|
+
}
|
|
250
|
+
};
|
|
@@ -202,7 +202,8 @@ var _default = exports.default = {
|
|
|
202
202
|
component: 'Este componente se usa para mostrar estados con o sin iconos asociados. Soporta diferentes variantes de color, tipos de tema y tamaños. Incluye funcionalidad de tooltip y puede personalizarse con iconos personalizados.'
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
}
|
|
205
|
+
},
|
|
206
|
+
title: 'Energy-UI/UTStatus'
|
|
206
207
|
};
|
|
207
208
|
const Default = exports.Default = {
|
|
208
209
|
args: {
|
|
@@ -10,10 +10,11 @@ const retrieveStyle = _ref => {
|
|
|
10
10
|
theme
|
|
11
11
|
} = _ref;
|
|
12
12
|
const actionPaletteColors = ((_theme$Palette = theme.Palette) === null || _theme$Palette === void 0 ? void 0 : _theme$Palette.actions) || theme.Palette;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
13
|
+
const paletteColors = theme.Palette;
|
|
14
|
+
const actionTheme = actionPaletteColors.accent || paletteColors.accent;
|
|
15
|
+
const grayTheme = actionPaletteColors.gray || paletteColors.gray;
|
|
16
|
+
const neutralTheme = actionPaletteColors.neutral || paletteColors.neutral;
|
|
17
|
+
const lightTheme = actionPaletteColors.light || paletteColors.light;
|
|
17
18
|
return {
|
|
18
19
|
sliderContainer: {
|
|
19
20
|
'&:hover > $sliderBack': {
|
|
@@ -583,7 +583,8 @@ var _default = exports.default = {
|
|
|
583
583
|
component: 'Componente de tabla avanzado con soporte para paginación, ordenamiento, selección de filas, filtros y acciones personalizadas. Incluye versión responsiva y múltiples opciones de configuración.'
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
}
|
|
586
|
+
},
|
|
587
|
+
title: 'Energy-UI/UTTable'
|
|
587
588
|
}; // Basic Stories
|
|
588
589
|
const Basic = exports.Basic = {
|
|
589
590
|
args: {
|
|
@@ -6,23 +6,55 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.TEST_IDS = exports.ID_CONSTANTS = void 0;
|
|
7
7
|
const ID_CONSTANTS = exports.ID_CONSTANTS = {
|
|
8
8
|
ACTIONS: 'actions',
|
|
9
|
+
ADD_FILTER_BUTTON: 'addFilterButton',
|
|
10
|
+
AVATAR: 'avatar',
|
|
9
11
|
BOTTOM_NAV: 'bottomNav',
|
|
10
12
|
CANVAS: 'canvas',
|
|
11
13
|
CELL: 'cell',
|
|
12
14
|
CLEAR_BUTTON: 'clearButton',
|
|
15
|
+
CLIENT_FILTER: 'clientFilter',
|
|
16
|
+
COLLAPSED_PANEL_CONTENT: 'collapsedPanelContent',
|
|
17
|
+
COLLAPSE_BUTTON: 'collapseButton',
|
|
18
|
+
COLLAPSE_BUTTON_TOOLTIP: 'collapseButtonTooltip',
|
|
13
19
|
CREDIT_CARD: 'creditCard',
|
|
20
|
+
CUSTOM_SEARCH_ACTION: 'customSearchAction',
|
|
14
21
|
DATA_CATEGORY: 'dataCategory',
|
|
15
22
|
DATA_ELEMENT: 'dataElement',
|
|
23
|
+
DELETE_BUTTON: 'deleteButton',
|
|
24
|
+
DELETE_BUTTON_TOOLTIP: 'deleteButtonTooltip',
|
|
25
|
+
DESCRIPTION: 'description',
|
|
16
26
|
DIALOG: 'dialog',
|
|
27
|
+
EDIT_BUTTON: 'editButton',
|
|
28
|
+
EDIT_BUTTON_TOOLTIP: 'editButtonTooltip',
|
|
29
|
+
EXPANDED_PANEL_CONTENT: 'expandedPanelContent',
|
|
30
|
+
EXPANDED_PANEL_CONTENT_CATEGORY: 'expandedPanelContentCategory',
|
|
31
|
+
EXPANDED_PANEL_CONTENT_CATEGORY_EMPTY: 'expandedPanelContentCategoryEmpty',
|
|
32
|
+
EXPANDED_PANEL_CONTENT_CATEGORY_HEADER: 'expandedPanelContentCategoryHeader',
|
|
33
|
+
EXPANDED_PANEL_CONTENT_CATEGORY_ITEM: 'expandedPanelContentCategoryItem',
|
|
34
|
+
EXPANDED_PANEL_CONTENT_HEADER: 'expandedPanelContentHeader',
|
|
35
|
+
EXPAND_BUTTON: 'expandButton',
|
|
36
|
+
FILTER_GROUPING: 'filterGrouping',
|
|
37
|
+
GROUPING_PANEL: 'groupingPanel',
|
|
17
38
|
HEADER: 'header',
|
|
18
39
|
HELP_TEXT: 'helpText',
|
|
40
|
+
ICON: 'icon',
|
|
41
|
+
LABEL: 'label',
|
|
42
|
+
NAME: 'name',
|
|
43
|
+
NAME_CONTAINER: 'nameContainer',
|
|
19
44
|
ONBOARDING: 'onboarding',
|
|
20
45
|
PANEL: 'panel',
|
|
46
|
+
PERSISTENT_FILTER: 'persistentFilter',
|
|
47
|
+
PINNED: 'pinned',
|
|
48
|
+
POPPER: 'popper',
|
|
49
|
+
SEARCH_BUTTON: 'searchButton',
|
|
50
|
+
SEARCH_BUTTON_TOOLTIP: 'searchButtonTooltip',
|
|
51
|
+
SEARCH_FIELD: 'searchField',
|
|
21
52
|
SELECTION_COMPONENT: 'selectionComponent',
|
|
22
53
|
STATUS_MESSAGE: 'statusMessage',
|
|
23
|
-
TABLE_ROW: 'tableRow',
|
|
24
54
|
TABLE: 'table',
|
|
55
|
+
TABLE_ROW: 'tableRow',
|
|
25
56
|
TITLE: 'title',
|
|
57
|
+
USER_FILTER: 'userFilter',
|
|
26
58
|
VALIDATION_DATA: 'validationData',
|
|
27
59
|
WORKFLOW_CONTAINER: 'workflowContainer'
|
|
28
60
|
};
|
|
@@ -62,6 +94,26 @@ const TEST_IDS = exports.TEST_IDS = {
|
|
|
62
94
|
closeButton: "".concat(ID_CONSTANTS.DIALOG, ".closeButton"),
|
|
63
95
|
title: "".concat(ID_CONSTANTS.DIALOG, ".title")
|
|
64
96
|
},
|
|
97
|
+
filterGrouping: {
|
|
98
|
+
groupingPanel: {
|
|
99
|
+
collapsedPanelContent: {
|
|
100
|
+
expandButton: "".concat(ID_CONSTANTS.FILTER_GROUPING, ".").concat(ID_CONSTANTS.GROUPING_PANEL, ".").concat(ID_CONSTANTS.COLLAPSED_PANEL_CONTENT, ".").concat(ID_CONSTANTS.EXPAND_BUTTON)
|
|
101
|
+
},
|
|
102
|
+
expandedPanelContent: {
|
|
103
|
+
expandedPanelContentCategory: "".concat(ID_CONSTANTS.FILTER_GROUPING, ".").concat(ID_CONSTANTS.GROUPING_PANEL, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_CATEGORY),
|
|
104
|
+
expandedPanelContentHeader: {
|
|
105
|
+
addFilterButton: "".concat(ID_CONSTANTS.FILTER_GROUPING, ".").concat(ID_CONSTANTS.GROUPING_PANEL, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER, ".").concat(ID_CONSTANTS.ADD_FILTER_BUTTON),
|
|
106
|
+
collapseButton: "".concat(ID_CONSTANTS.FILTER_GROUPING, ".").concat(ID_CONSTANTS.GROUPING_PANEL, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER, ".").concat(ID_CONSTANTS.COLLAPSE_BUTTON),
|
|
107
|
+
collapseButtonTooltip: "".concat(ID_CONSTANTS.FILTER_GROUPING, ".").concat(ID_CONSTANTS.GROUPING_PANEL, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER, ".").concat(ID_CONSTANTS.COLLAPSE_BUTTON_TOOLTIP),
|
|
108
|
+
customSearchAction: "".concat(ID_CONSTANTS.FILTER_GROUPING, ".").concat(ID_CONSTANTS.GROUPING_PANEL, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER, ".").concat(ID_CONSTANTS.CUSTOM_SEARCH_ACTION),
|
|
109
|
+
searchButton: "".concat(ID_CONSTANTS.FILTER_GROUPING, ".").concat(ID_CONSTANTS.GROUPING_PANEL, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER, ".").concat(ID_CONSTANTS.SEARCH_BUTTON),
|
|
110
|
+
searchButtonTooltip: "".concat(ID_CONSTANTS.FILTER_GROUPING, ".").concat(ID_CONSTANTS.GROUPING_PANEL, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER, ".").concat(ID_CONSTANTS.SEARCH_BUTTON_TOOLTIP),
|
|
111
|
+
searchField: "".concat(ID_CONSTANTS.FILTER_GROUPING, ".").concat(ID_CONSTANTS.GROUPING_PANEL, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER, ".").concat(ID_CONSTANTS.SEARCH_FIELD),
|
|
112
|
+
title: "".concat(ID_CONSTANTS.FILTER_GROUPING, ".").concat(ID_CONSTANTS.GROUPING_PANEL, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT, ".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER, ".").concat(ID_CONSTANTS.TITLE)
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
65
117
|
onboarding: {
|
|
66
118
|
close: "".concat(ID_CONSTANTS.ONBOARDING, ".close"),
|
|
67
119
|
description: "".concat(ID_CONSTANTS.ONBOARDING, ".description"),
|
package/dist/index.js
CHANGED
|
@@ -189,6 +189,12 @@ Object.defineProperty(exports, "UTFileInput", {
|
|
|
189
189
|
return _UTFileInput.default;
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
|
+
Object.defineProperty(exports, "UTFilterGrouping", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function () {
|
|
195
|
+
return _UTFilterGrouping.default;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
192
198
|
Object.defineProperty(exports, "UTGoogleAutocomplete", {
|
|
193
199
|
enumerable: true,
|
|
194
200
|
get: function () {
|
|
@@ -540,6 +546,7 @@ var _UTDotMenu = _interopRequireDefault(require("./components/UTDotMenu"));
|
|
|
540
546
|
var _UTEmojiPicker = _interopRequireDefault(require("./components/UTEmojiPicker"));
|
|
541
547
|
var _UTExternalLink = _interopRequireDefault(require("./components/UTExternalLink"));
|
|
542
548
|
var _UTFileInput = _interopRequireDefault(require("./components/UTFileInput"));
|
|
549
|
+
var _UTFilterGrouping = _interopRequireDefault(require("./components/UTFilterGrouping"));
|
|
543
550
|
var _UTGoogleAutocomplete = _interopRequireDefault(require("./components/UTGoogleAutocomplete"));
|
|
544
551
|
var _UTGraph = _interopRequireDefault(require("./components/UTGraph"));
|
|
545
552
|
var _UTIcon = _interopRequireDefault(require("./components/UTIcon"));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.iconPropTypes = void 0;
|
|
7
|
+
var _propTypes = require("prop-types");
|
|
8
|
+
const iconPropTypes = exports.iconPropTypes = (0, _propTypes.shape)({
|
|
9
|
+
area: _propTypes.bool,
|
|
10
|
+
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
11
|
+
className: _propTypes.string,
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated The "color" prop is deprecated and will be removed in a future release. Please use "colorTheme" instead.
|
|
14
|
+
*/
|
|
15
|
+
color: _propTypes.string,
|
|
16
|
+
colorTheme: _propTypes.string,
|
|
17
|
+
dataTestId: _propTypes.string,
|
|
18
|
+
fillShade: _propTypes.string,
|
|
19
|
+
fillTheme: _propTypes.string,
|
|
20
|
+
name: _propTypes.string,
|
|
21
|
+
shade: _propTypes.string,
|
|
22
|
+
size: _propTypes.number,
|
|
23
|
+
theme: _propTypes.object,
|
|
24
|
+
variant: _propTypes.string
|
|
25
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widergy/energy-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.122.1",
|
|
4
4
|
"description": "Widergy Web Components",
|
|
5
5
|
"author": "widergy",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,11 +19,14 @@
|
|
|
19
19
|
"prebuild": "rimraf dist",
|
|
20
20
|
"build": "NODE_ENV=production babel src/lib --out-dir dist --copy-files",
|
|
21
21
|
"sass-lint": "./node_modules/sass-lint/bin/sass-lint.js -v -q",
|
|
22
|
+
"prepare": "husky install",
|
|
22
23
|
"prepublishOnly": "npm run build",
|
|
23
24
|
"dev": "nodemon -e scss,js -x yalc publish --push",
|
|
24
25
|
"storybook": "storybook dev -p 6006",
|
|
25
26
|
"build-storybook": "storybook build",
|
|
26
27
|
"deploy-storybook": "node scripts/deployStorybook.js",
|
|
28
|
+
"test-storybook": "test-storybook --testTimeout=60000",
|
|
29
|
+
"run-and-test-storybook": "yarn playwright install --with-deps chromium 2>/dev/null || true && concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn storybook\" \"wait-on http://localhost:6006 && test-storybook --testTimeout=60000\"",
|
|
27
30
|
"aws-configure": "bash scripts/aws-configure.sh"
|
|
28
31
|
},
|
|
29
32
|
"dependencies": {
|
|
@@ -88,8 +91,10 @@
|
|
|
88
91
|
"@storybook/react": "^8.0.9",
|
|
89
92
|
"@storybook/react-webpack5": "^8.0.9",
|
|
90
93
|
"@storybook/test": "^8.0.9",
|
|
94
|
+
"@storybook/test-runner": "^0.19.1",
|
|
91
95
|
"@widergy/semantic-release-package-config": "^1.0.0",
|
|
92
96
|
"babel-preset-react-app": "^10.0.1",
|
|
97
|
+
"concurrently": "^9.2.1",
|
|
93
98
|
"cross-env": "^7.0.3",
|
|
94
99
|
"eslint-config-airbnb": "^19.0.4",
|
|
95
100
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -104,11 +109,13 @@
|
|
|
104
109
|
"prettier-eslint": "^15.0.1",
|
|
105
110
|
"prop-types": ">=15.5.10",
|
|
106
111
|
"react": "^18.2.0",
|
|
112
|
+
"react-css-vars": "^1.2.1",
|
|
107
113
|
"react-dom": "^18.2.0",
|
|
108
114
|
"react-scripts": "^5.0.1",
|
|
109
115
|
"sass-lint": "^1.12.1",
|
|
110
116
|
"semantic-release": "^15.13.31",
|
|
111
117
|
"storybook": "^8.0.9",
|
|
118
|
+
"wait-on": "^9.0.3",
|
|
112
119
|
"webpack": "^5.90.1"
|
|
113
120
|
},
|
|
114
121
|
"release": {
|