@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
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.COMMON_PARAMETERS = exports.COMMON_ARG_TYPES = exports.COMMON_ARGS = void 0;
|
|
7
|
+
var _utils = require("stories/utils");
|
|
8
|
+
var _constants = require("../constants");
|
|
9
|
+
// Common argTypes used across multiple stories files
|
|
10
|
+
const COMMON_ARG_TYPES = exports.COMMON_ARG_TYPES = {
|
|
11
|
+
children: {
|
|
12
|
+
control: 'text',
|
|
13
|
+
description: 'Contenido del botón.',
|
|
14
|
+
table: {
|
|
15
|
+
defaultValue: {
|
|
16
|
+
summary: 'undefined'
|
|
17
|
+
},
|
|
18
|
+
type: {
|
|
19
|
+
summary: 'node'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
classes: {
|
|
24
|
+
control: false,
|
|
25
|
+
description: 'Clases personalizadas para sobrescribir el tema del botón.',
|
|
26
|
+
table: {
|
|
27
|
+
defaultValue: {
|
|
28
|
+
summary: 'undefined'
|
|
29
|
+
},
|
|
30
|
+
type: {
|
|
31
|
+
summary: 'object'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
classNames: {
|
|
36
|
+
control: false,
|
|
37
|
+
description: 'Clases personalizadas para sobrescribir el tema del botón.',
|
|
38
|
+
table: {
|
|
39
|
+
defaultValue: {
|
|
40
|
+
summary: 'undefined'
|
|
41
|
+
},
|
|
42
|
+
type: {
|
|
43
|
+
summary: 'object'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
colorTheme: {
|
|
48
|
+
control: 'select',
|
|
49
|
+
description: 'Tema de color del botón.',
|
|
50
|
+
options: Object.keys(_constants.COLORS_MAPPER),
|
|
51
|
+
table: {
|
|
52
|
+
defaultValue: {
|
|
53
|
+
summary: _constants.DEFAULT_PROPS.colorTheme
|
|
54
|
+
},
|
|
55
|
+
type: {
|
|
56
|
+
summary: (0, _utils.joinArgTypes)(Object.keys(_constants.COLORS_MAPPER))
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
count: {
|
|
61
|
+
control: 'number',
|
|
62
|
+
description: 'Número a mostrar en un badge dentro del botón.',
|
|
63
|
+
table: {
|
|
64
|
+
defaultValue: {
|
|
65
|
+
summary: 'undefined'
|
|
66
|
+
},
|
|
67
|
+
type: {
|
|
68
|
+
summary: 'number'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
dataTestId: {
|
|
73
|
+
control: 'text',
|
|
74
|
+
description: 'Identificador de test para el botón.',
|
|
75
|
+
table: {
|
|
76
|
+
defaultValue: {
|
|
77
|
+
summary: 'undefined'
|
|
78
|
+
},
|
|
79
|
+
type: {
|
|
80
|
+
summary: 'string'
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
disabled: {
|
|
85
|
+
control: 'boolean',
|
|
86
|
+
description: 'Si es `true`, el botón está deshabilitado.',
|
|
87
|
+
table: {
|
|
88
|
+
defaultValue: {
|
|
89
|
+
summary: _constants.DEFAULT_PROPS.disabled
|
|
90
|
+
},
|
|
91
|
+
type: {
|
|
92
|
+
summary: 'boolean'
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
hideTextOnResponsive: {
|
|
97
|
+
control: 'boolean',
|
|
98
|
+
description: 'Si es `true` y el icono no es `null`, el contenido del botón no se muestra en dispositivos móviles.',
|
|
99
|
+
table: {
|
|
100
|
+
defaultValue: {
|
|
101
|
+
summary: _constants.DEFAULT_PROPS.hideTextOnResponsive
|
|
102
|
+
},
|
|
103
|
+
type: {
|
|
104
|
+
summary: 'boolean'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
Icon: {
|
|
109
|
+
control: 'text',
|
|
110
|
+
description: 'Icono a mostrar en el botón. Puede ser un nombre de icono de Tabler o un componente personalizado.',
|
|
111
|
+
table: {
|
|
112
|
+
defaultValue: {
|
|
113
|
+
summary: 'undefined'
|
|
114
|
+
},
|
|
115
|
+
type: {
|
|
116
|
+
summary: (0, _utils.joinArgTypes)(['string', 'ReactComponent'])
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
iconPlacement: {
|
|
121
|
+
control: 'inline-radio',
|
|
122
|
+
description: 'Posición del icono en relación al contenido del botón.',
|
|
123
|
+
options: Object.values(_constants.ICON_PLACEMENTS),
|
|
124
|
+
table: {
|
|
125
|
+
defaultValue: {
|
|
126
|
+
summary: _constants.DEFAULT_PROPS.iconPlacement
|
|
127
|
+
},
|
|
128
|
+
type: {
|
|
129
|
+
summary: (0, _utils.joinArgTypes)(Object.values(_constants.ICON_PLACEMENTS))
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
loading: {
|
|
134
|
+
control: 'boolean',
|
|
135
|
+
description: 'Si es `true`, se muestra un spinner sobre el botón.',
|
|
136
|
+
table: {
|
|
137
|
+
defaultValue: {
|
|
138
|
+
summary: _constants.DEFAULT_PROPS.loading
|
|
139
|
+
},
|
|
140
|
+
type: {
|
|
141
|
+
summary: 'boolean'
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
onClick: {
|
|
146
|
+
control: false,
|
|
147
|
+
description: 'Callback ejecutado cuando se hace clic en el botón.',
|
|
148
|
+
table: {
|
|
149
|
+
defaultValue: {
|
|
150
|
+
summary: 'undefined'
|
|
151
|
+
},
|
|
152
|
+
type: {
|
|
153
|
+
summary: 'function'
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
size: {
|
|
158
|
+
control: 'inline-radio',
|
|
159
|
+
description: 'Tamaño del botón.',
|
|
160
|
+
options: Object.values(_constants.SIZES),
|
|
161
|
+
table: {
|
|
162
|
+
defaultValue: {
|
|
163
|
+
summary: _constants.DEFAULT_PROPS.size
|
|
164
|
+
},
|
|
165
|
+
type: {
|
|
166
|
+
summary: (0, _utils.joinArgTypes)(Object.values(_constants.SIZES))
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
type: {
|
|
171
|
+
control: 'text',
|
|
172
|
+
description: 'Atributo HTML type del botón.',
|
|
173
|
+
table: {
|
|
174
|
+
defaultValue: {
|
|
175
|
+
summary: 'undefined'
|
|
176
|
+
},
|
|
177
|
+
type: {
|
|
178
|
+
summary: 'string'
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
variant: {
|
|
183
|
+
control: 'select',
|
|
184
|
+
description: 'Variante del botón.',
|
|
185
|
+
options: Object.values(_constants.VARIANTS_NAMES),
|
|
186
|
+
table: {
|
|
187
|
+
defaultValue: {
|
|
188
|
+
summary: _constants.DEFAULT_PROPS.variant
|
|
189
|
+
},
|
|
190
|
+
type: {
|
|
191
|
+
summary: (0, _utils.joinArgTypes)(Object.values(_constants.VARIANTS_NAMES))
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
// Common args used across multiple stories files
|
|
198
|
+
const COMMON_ARGS = exports.COMMON_ARGS = {
|
|
199
|
+
colorTheme: _constants.DEFAULT_PROPS.colorTheme,
|
|
200
|
+
dataTestId: 'customButtonId',
|
|
201
|
+
disabled: _constants.DEFAULT_PROPS.disabled,
|
|
202
|
+
hideTextOnResponsive: _constants.DEFAULT_PROPS.hideTextOnResponsive,
|
|
203
|
+
iconPlacement: _constants.DEFAULT_PROPS.iconPlacement,
|
|
204
|
+
loading: _constants.DEFAULT_PROPS.loading,
|
|
205
|
+
size: _constants.DEFAULT_PROPS.size,
|
|
206
|
+
type: 'button',
|
|
207
|
+
variant: _constants.DEFAULT_PROPS.variant
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
// Common parameters used across multiple stories files
|
|
211
|
+
const COMMON_PARAMETERS = exports.COMMON_PARAMETERS = {
|
|
212
|
+
controls: {
|
|
213
|
+
exclude: ['classes', 'classNames', 'onClick']
|
|
214
|
+
},
|
|
215
|
+
docs: {
|
|
216
|
+
description: {
|
|
217
|
+
component: 'Componente de botón básico que soporta múltiples variantes, temas de color, tamaños e iconos. Puede mostrar un spinner de carga, un badge con contador, y es completamente personalizable.'
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
};
|
|
@@ -15,20 +15,21 @@ const variantsColorTheme = (theme, colorTheme, variant) => {
|
|
|
15
15
|
const shadowTheme = ((_theme$Palette$shadow = theme.Palette.shadows) === null || _theme$Palette$shadow === void 0 ? void 0 : _theme$Palette$shadow[_constants.SHADOW_MAPPER[actionColorName]]) || 'transparent';
|
|
16
16
|
const negativeTheme = actionPaletteColors[_constants.COLORS_MAPPER.negative];
|
|
17
17
|
const neutralTheme = actionPaletteColors[_constants.COLORS_MAPPER.secondary];
|
|
18
|
+
const lightTheme = actionPaletteColors[_constants.COLORS_MAPPER.light];
|
|
18
19
|
const definition = {
|
|
19
20
|
[_constants.VARIANTS_NAMES.filled]: {
|
|
20
21
|
backgroundColor: actionTheme['04'],
|
|
21
22
|
border: '1px solid transparent',
|
|
22
23
|
fill: colorTheme === _constants.COLORS_MAPPER.negative ? neutralTheme['05'] : negativeTheme['05'],
|
|
23
24
|
'&:hover': {
|
|
24
|
-
backgroundColor: actionTheme['03'],
|
|
25
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? actionTheme['05'] : actionTheme['03'],
|
|
25
26
|
boxShadow: (0, _shadowUtils.getShadow)({
|
|
26
27
|
color: shadowTheme,
|
|
27
28
|
level: 2
|
|
28
29
|
})
|
|
29
30
|
},
|
|
30
31
|
'&:active': {
|
|
31
|
-
backgroundColor: actionTheme['05'],
|
|
32
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? actionTheme['04'] : actionTheme['05'],
|
|
32
33
|
boxShadow: (0, _shadowUtils.getShadow)({
|
|
33
34
|
color: shadowTheme,
|
|
34
35
|
level: 2
|
|
@@ -36,27 +37,27 @@ const variantsColorTheme = (theme, colorTheme, variant) => {
|
|
|
36
37
|
}
|
|
37
38
|
},
|
|
38
39
|
[_constants.VARIANTS_NAMES.semitransparent]: {
|
|
39
|
-
backgroundColor: actionTheme['01'],
|
|
40
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? lightTheme['03'] : actionTheme['01'],
|
|
40
41
|
border: '1px solid transparent',
|
|
41
|
-
fill: actionTheme['05'],
|
|
42
|
+
fill: colorTheme === _constants.COLORS_MAPPER.gray ? actionTheme['04'] : actionTheme['05'],
|
|
42
43
|
'&:hover': {
|
|
43
|
-
backgroundColor: actionTheme['02'],
|
|
44
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? lightTheme['04'] : actionTheme['02'],
|
|
44
45
|
boxShadow: 'none'
|
|
45
46
|
},
|
|
46
47
|
'&:active': {
|
|
47
|
-
backgroundColor: actionTheme['03'],
|
|
48
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? lightTheme['05'] : actionTheme['03'],
|
|
48
49
|
boxShadow: 'none'
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
52
|
[_constants.VARIANTS_NAMES.outlined]: {
|
|
52
|
-
border: "1px solid ".concat(actionTheme['05']),
|
|
53
|
-
fill: actionTheme['05'],
|
|
53
|
+
border: "1px solid ".concat(colorTheme === _constants.COLORS_MAPPER.gray ? actionTheme['04'] : actionTheme['05']),
|
|
54
|
+
fill: colorTheme === _constants.COLORS_MAPPER.gray ? actionTheme['04'] : actionTheme['05'],
|
|
54
55
|
'&:hover': {
|
|
55
|
-
backgroundColor: actionTheme['01'],
|
|
56
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? lightTheme['03'] : actionTheme['01'],
|
|
56
57
|
boxShadow: 'none'
|
|
57
58
|
},
|
|
58
59
|
'&:active': {
|
|
59
|
-
backgroundColor: actionTheme['02'],
|
|
60
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? lightTheme['04'] : actionTheme['02'],
|
|
60
61
|
boxShadow: 'none'
|
|
61
62
|
}
|
|
62
63
|
},
|
|
@@ -64,11 +65,11 @@ const variantsColorTheme = (theme, colorTheme, variant) => {
|
|
|
64
65
|
border: '1px solid transparent',
|
|
65
66
|
fill: actionTheme['05'],
|
|
66
67
|
'&:hover': {
|
|
67
|
-
backgroundColor: actionTheme['01'],
|
|
68
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? lightTheme['03'] : actionTheme['01'],
|
|
68
69
|
boxShadow: 'none'
|
|
69
70
|
},
|
|
70
71
|
'&:active': {
|
|
71
|
-
backgroundColor: actionTheme['02'],
|
|
72
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? lightTheme['04'] : actionTheme['02'],
|
|
72
73
|
boxShadow: 'none'
|
|
73
74
|
}
|
|
74
75
|
},
|
|
@@ -81,14 +82,14 @@ const variantsColorTheme = (theme, colorTheme, variant) => {
|
|
|
81
82
|
border: '1px solid transparent',
|
|
82
83
|
fill: actionTheme['05'],
|
|
83
84
|
'&:hover': {
|
|
84
|
-
backgroundColor: actionTheme['01'],
|
|
85
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? lightTheme['03'] : actionTheme['01'],
|
|
85
86
|
boxShadow: (0, _shadowUtils.getShadow)({
|
|
86
87
|
color: shadowTheme,
|
|
87
88
|
level: 2
|
|
88
89
|
})
|
|
89
90
|
},
|
|
90
91
|
'&:active': {
|
|
91
|
-
backgroundColor: actionTheme['02'],
|
|
92
|
+
backgroundColor: colorTheme === _constants.COLORS_MAPPER.gray ? lightTheme['04'] : actionTheme['02'],
|
|
92
93
|
boxShadow: (0, _shadowUtils.getShadow)({
|
|
93
94
|
color: shadowTheme,
|
|
94
95
|
level: 2
|
|
@@ -10,7 +10,7 @@ var _UTIcon = _interopRequireDefault(require("../UTIcon"));
|
|
|
10
10
|
var _constants = require("./constants");
|
|
11
11
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
const getButtonElementColorTheme = (buttonColorTheme, buttonVariant) => buttonVariant === _constants.VARIANTS_NAMES.filled ? buttonColorTheme === _constants.COLORS_MAPPER.negative ? _Palette.COLOR_THEMES.neutral : _Palette.COLOR_THEMES.
|
|
13
|
+
const getButtonElementColorTheme = (buttonColorTheme, buttonVariant) => buttonVariant === _constants.VARIANTS_NAMES.filled ? buttonColorTheme === _constants.COLORS_MAPPER.negative ? _Palette.COLOR_THEMES.neutral : _Palette.COLOR_THEMES.negative : _constants.COLORS_MAPPER[buttonColorTheme];
|
|
14
14
|
const getIconProps = _ref => {
|
|
15
15
|
let {
|
|
16
16
|
className,
|
|
@@ -37,5 +37,5 @@ const getLabelProps = (buttonColorTheme, buttonVariant, buttonSize) => ({
|
|
|
37
37
|
weight: 'medium'
|
|
38
38
|
});
|
|
39
39
|
exports.getLabelProps = getLabelProps;
|
|
40
|
-
const getCounterColorTheme = (colorTheme, variant) => variant === _constants.VARIANTS_NAMES.filled ? colorTheme === _Palette.COLOR_THEMES.negative ? 'dark' : 'negative' : _constants.COLORS_MAPPER[colorTheme];
|
|
40
|
+
const getCounterColorTheme = (colorTheme, variant) => variant === _constants.VARIANTS_NAMES.filled ? colorTheme === _Palette.COLOR_THEMES.negative ? 'dark' : 'negative' : variant === _constants.VARIANTS_NAMES.outlined ? colorTheme === _Palette.COLOR_THEMES.negative ? 'negative' : colorTheme === _Palette.COLOR_THEMES.primary ? _constants.COLORS_MAPPER[colorTheme] : colorTheme === _Palette.COLOR_THEMES.gray ? 'gray' : 'dark' : colorTheme === _Palette.COLOR_THEMES.gray ? 'gray' : _constants.COLORS_MAPPER[colorTheme];
|
|
41
41
|
exports.getCounterColorTheme = getCounterColorTheme;
|
|
@@ -306,7 +306,8 @@ var _default = exports.default = {
|
|
|
306
306
|
component: 'Componente para mostrar elementos de datos de forma estructurada. Permite mostrar título, prefijo, datos, iconos, badges y contenido expandible. Ideal para mostrar información clave de manera organizada.'
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
}
|
|
309
|
+
},
|
|
310
|
+
title: 'Energy-UI/UTDataElement'
|
|
310
311
|
}; // Basic Stories
|
|
311
312
|
const Default = exports.Default = {
|
|
312
313
|
args: {
|
|
@@ -9,7 +9,8 @@ const backgroundColor = (theme, area) => {
|
|
|
9
9
|
var _theme$Palette;
|
|
10
10
|
const colorTheme = _Palette.COLOR_THEMES.light;
|
|
11
11
|
const actionPaletteColors = ((_theme$Palette = theme.Palette) === null || _theme$Palette === void 0 ? void 0 : _theme$Palette.actions) || theme.Palette;
|
|
12
|
-
const
|
|
12
|
+
const paletteColors = theme.Palette;
|
|
13
|
+
const areaColor = actionPaletteColors[colorTheme] || paletteColors[colorTheme];
|
|
13
14
|
return {
|
|
14
15
|
backgroundColor: area ? areaColor['03'] : 'transparent'
|
|
15
16
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ICON_BY_POSITION = void 0;
|
|
7
|
+
var _constants = require("../../../../constants");
|
|
8
|
+
const ICON_BY_POSITION = exports.ICON_BY_POSITION = {
|
|
9
|
+
[_constants.PANEL_POSITIONS.LEFT]: 'IconChevronsRight',
|
|
10
|
+
[_constants.PANEL_POSITIONS.RIGHT]: 'IconChevronsLeft'
|
|
11
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _propTypes = require("prop-types");
|
|
9
|
+
var _context = _interopRequireDefault(require("../../../../context"));
|
|
10
|
+
var _layout = _interopRequireDefault(require("./layout"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
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); }
|
|
13
|
+
const CollapsedPanelContentContainer = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
dataTestId
|
|
16
|
+
} = _ref;
|
|
17
|
+
const {
|
|
18
|
+
classes,
|
|
19
|
+
handleTogglePanel,
|
|
20
|
+
iconProps,
|
|
21
|
+
position
|
|
22
|
+
} = (0, _react.useContext)(_context.default);
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_layout.default, {
|
|
24
|
+
classes: classes,
|
|
25
|
+
dataTestId: dataTestId,
|
|
26
|
+
iconProps: iconProps,
|
|
27
|
+
onClick: handleTogglePanel,
|
|
28
|
+
position: position
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
CollapsedPanelContentContainer.propTypes = {
|
|
32
|
+
dataTestId: _propTypes.string
|
|
33
|
+
};
|
|
34
|
+
var _default = exports.default = CollapsedPanelContentContainer;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = require("prop-types");
|
|
9
|
+
var _UTIcon = _interopRequireDefault(require("../../../../../UTIcon"));
|
|
10
|
+
var _UTTouchableWithoutFeedback = _interopRequireDefault(require("../../../../../UTTouchableWithoutFeedback"));
|
|
11
|
+
var _iconTypes = require("../../../../../../types/iconTypes");
|
|
12
|
+
var _testIds = require("../../../../../../constants/testIds");
|
|
13
|
+
var _constants = require("./constants");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
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); }
|
|
16
|
+
const {
|
|
17
|
+
EXPAND_BUTTON,
|
|
18
|
+
COLLAPSED_PANEL_CONTENT
|
|
19
|
+
} = _testIds.ID_CONSTANTS;
|
|
20
|
+
const {
|
|
21
|
+
filterGrouping
|
|
22
|
+
} = _testIds.TEST_IDS;
|
|
23
|
+
const CollapsedPanelContent = _ref => {
|
|
24
|
+
let {
|
|
25
|
+
classes,
|
|
26
|
+
dataTestId,
|
|
27
|
+
iconProps,
|
|
28
|
+
onClick,
|
|
29
|
+
position
|
|
30
|
+
} = _ref;
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_UTTouchableWithoutFeedback.default, {
|
|
32
|
+
className: classes.collapsedPanelContentExpandButton,
|
|
33
|
+
dataTestId: dataTestId ? "".concat(dataTestId, ".").concat(COLLAPSED_PANEL_CONTENT, ".").concat(EXPAND_BUTTON) : filterGrouping.groupingPanel.collapsedPanelContent.expandButton,
|
|
34
|
+
onClick: onClick
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_UTIcon.default, _extends({
|
|
36
|
+
name: _constants.ICON_BY_POSITION[position]
|
|
37
|
+
}, iconProps)));
|
|
38
|
+
};
|
|
39
|
+
CollapsedPanelContent.propTypes = {
|
|
40
|
+
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
41
|
+
dataTestId: _propTypes.string,
|
|
42
|
+
iconProps: _iconTypes.iconPropTypes,
|
|
43
|
+
onClick: _propTypes.func,
|
|
44
|
+
position: _propTypes.string
|
|
45
|
+
};
|
|
46
|
+
var _default = exports.default = CollapsedPanelContent;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _propTypes = require("prop-types");
|
|
9
|
+
var _context = _interopRequireDefault(require("../../../../../../../../context"));
|
|
10
|
+
var _testIds = require("../../../../../../../../../../constants/testIds");
|
|
11
|
+
var _layout = _interopRequireDefault(require("./layout"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
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); }
|
|
14
|
+
const {
|
|
15
|
+
EXPANDED_PANEL_CONTENT_CATEGORY_EMPTY
|
|
16
|
+
} = _testIds.ID_CONSTANTS;
|
|
17
|
+
const ExpandedPanelContentCategoryEmptyContainer = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
dataTestId
|
|
20
|
+
} = _ref;
|
|
21
|
+
const {
|
|
22
|
+
classes,
|
|
23
|
+
noFiltersText,
|
|
24
|
+
noFiltersTitle
|
|
25
|
+
} = (0, _react.useContext)(_context.default);
|
|
26
|
+
return /*#__PURE__*/_react.default.createElement(_layout.default, {
|
|
27
|
+
classes: classes,
|
|
28
|
+
dataTestId: "".concat(dataTestId, ".").concat(EXPANDED_PANEL_CONTENT_CATEGORY_EMPTY),
|
|
29
|
+
noFiltersText: noFiltersText,
|
|
30
|
+
noFiltersTitle: noFiltersTitle
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
ExpandedPanelContentCategoryEmptyContainer.propTypes = {
|
|
34
|
+
dataTestId: _propTypes.string
|
|
35
|
+
};
|
|
36
|
+
var _default = exports.default = ExpandedPanelContentCategoryEmptyContainer;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = require("prop-types");
|
|
9
|
+
var _UTIcon = _interopRequireDefault(require("../../../../../../../../../UTIcon"));
|
|
10
|
+
var _UTLabel = _interopRequireDefault(require("../../../../../../../../../UTLabel"));
|
|
11
|
+
var _testIds = require("../../../../../../../../../../constants/testIds");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const {
|
|
14
|
+
DESCRIPTION,
|
|
15
|
+
ICON,
|
|
16
|
+
TITLE
|
|
17
|
+
} = _testIds.ID_CONSTANTS;
|
|
18
|
+
const ExpandedPanelContentCategoryEmpty = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
classes,
|
|
21
|
+
dataTestId,
|
|
22
|
+
noFiltersText,
|
|
23
|
+
noFiltersTitle
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("section", {
|
|
26
|
+
className: classes.expandedPanelContentCategoryEmpty
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement(_UTIcon.default, {
|
|
28
|
+
colorTheme: "gray",
|
|
29
|
+
dataTestId: "".concat(dataTestId, ".").concat(ICON),
|
|
30
|
+
name: "IconBookmarks"
|
|
31
|
+
}), (noFiltersTitle || noFiltersText) && /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: classes.expandedPanelContentCategoryEmptyText
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
34
|
+
align: "center",
|
|
35
|
+
dataTestId: "".concat(dataTestId, ".").concat(TITLE),
|
|
36
|
+
variant: "small"
|
|
37
|
+
}, noFiltersTitle), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
38
|
+
align: "center",
|
|
39
|
+
colorTheme: "gray",
|
|
40
|
+
dataTestId: "".concat(dataTestId, ".").concat(DESCRIPTION),
|
|
41
|
+
variant: "small"
|
|
42
|
+
}, noFiltersText)));
|
|
43
|
+
};
|
|
44
|
+
ExpandedPanelContentCategoryEmpty.propTypes = {
|
|
45
|
+
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
46
|
+
dataTestId: _propTypes.string,
|
|
47
|
+
noFiltersText: _propTypes.string,
|
|
48
|
+
noFiltersTitle: _propTypes.string
|
|
49
|
+
};
|
|
50
|
+
var _default = exports.default = ExpandedPanelContentCategoryEmpty;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _propTypes = require("prop-types");
|
|
9
|
+
var _context = _interopRequireDefault(require("../../../../../../../../context"));
|
|
10
|
+
var _layout = _interopRequireDefault(require("./layout"));
|
|
11
|
+
var _constants = require("./constants");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
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); }
|
|
14
|
+
const ExpandedPanelContentCategoryHeaderContainer = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
category,
|
|
17
|
+
categoryConfig,
|
|
18
|
+
collapsedCategory,
|
|
19
|
+
dataTestId,
|
|
20
|
+
handleToggleCollapsedCategory
|
|
21
|
+
} = _ref;
|
|
22
|
+
const {
|
|
23
|
+
classes
|
|
24
|
+
} = (0, _react.useContext)(_context.default);
|
|
25
|
+
const {
|
|
26
|
+
name
|
|
27
|
+
} = category;
|
|
28
|
+
const {
|
|
29
|
+
avatarPalette,
|
|
30
|
+
icon
|
|
31
|
+
} = categoryConfig;
|
|
32
|
+
const [hoverMode, setHoverMode] = (0, _react.useState)(false);
|
|
33
|
+
const handleHeaderHover = action => {
|
|
34
|
+
setHoverMode(action === _constants.MOUSE_ENTER);
|
|
35
|
+
};
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement(_layout.default, {
|
|
37
|
+
title: name,
|
|
38
|
+
icon: icon,
|
|
39
|
+
hoverMode: hoverMode,
|
|
40
|
+
handleToggleCollapsedCategory: handleToggleCollapsedCategory,
|
|
41
|
+
handleHeaderHover: handleHeaderHover,
|
|
42
|
+
dataTestId: dataTestId,
|
|
43
|
+
collapsedCategory: collapsedCategory,
|
|
44
|
+
classes: classes,
|
|
45
|
+
avatarPalette: avatarPalette
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
ExpandedPanelContentCategoryHeaderContainer.propTypes = {
|
|
49
|
+
category: _propTypes.object,
|
|
50
|
+
categoryConfig: _propTypes.object,
|
|
51
|
+
collapsedCategory: _propTypes.bool,
|
|
52
|
+
dataTestId: _propTypes.string,
|
|
53
|
+
handleToggleCollapsedCategory: _propTypes.func
|
|
54
|
+
};
|
|
55
|
+
var _default = exports.default = ExpandedPanelContentCategoryHeaderContainer;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = require("prop-types");
|
|
9
|
+
var _UTAvatar = _interopRequireDefault(require("../../../../../../../../../UTAvatar"));
|
|
10
|
+
var _UTIcon = _interopRequireDefault(require("../../../../../../../../../UTIcon"));
|
|
11
|
+
var _UTLabel = _interopRequireDefault(require("../../../../../../../../../UTLabel"));
|
|
12
|
+
var _UTTouchableWithoutFeedback = _interopRequireDefault(require("../../../../../../../../../UTTouchableWithoutFeedback"));
|
|
13
|
+
var _testIds = require("../../../../../../../../../../constants/testIds");
|
|
14
|
+
var _constants = require("./constants");
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
const {
|
|
17
|
+
AVATAR,
|
|
18
|
+
COLLAPSE_BUTTON,
|
|
19
|
+
LABEL
|
|
20
|
+
} = _testIds.ID_CONSTANTS;
|
|
21
|
+
const ExpandedPanelContentCategoryHeader = _ref => {
|
|
22
|
+
let {
|
|
23
|
+
avatarPalette,
|
|
24
|
+
classes,
|
|
25
|
+
collapsedCategory,
|
|
26
|
+
dataTestId,
|
|
27
|
+
handleHeaderHover,
|
|
28
|
+
handleToggleCollapsedCategory,
|
|
29
|
+
hoverMode,
|
|
30
|
+
icon,
|
|
31
|
+
title
|
|
32
|
+
} = _ref;
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement("header", {
|
|
34
|
+
className: classes.expandedPanelContentCategoryHeader,
|
|
35
|
+
onMouseEnter: () => handleHeaderHover(_constants.MOUSE_ENTER),
|
|
36
|
+
onMouseLeave: () => handleHeaderHover(_constants.MOUSE_LEAVE)
|
|
37
|
+
}, hoverMode ? /*#__PURE__*/_react.default.createElement(_UTTouchableWithoutFeedback.default, {
|
|
38
|
+
dataTestId: "".concat(dataTestId, ".").concat(COLLAPSE_BUTTON),
|
|
39
|
+
onClick: handleToggleCollapsedCategory
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_UTIcon.default, {
|
|
41
|
+
className: collapsedCategory ? classes.collapsedCategoryIcon : '',
|
|
42
|
+
colorTheme: "gray",
|
|
43
|
+
name: "IconChevronDown",
|
|
44
|
+
size: "24"
|
|
45
|
+
})) : /*#__PURE__*/_react.default.createElement(_UTAvatar.default, {
|
|
46
|
+
areaShape: "rounded",
|
|
47
|
+
className: classes.ExpandedPanelContentCategoryHeaderAvatar,
|
|
48
|
+
dataTestId: "".concat(dataTestId, ".").concat(AVATAR),
|
|
49
|
+
iconProps: {
|
|
50
|
+
name: icon
|
|
51
|
+
},
|
|
52
|
+
palette: avatarPalette,
|
|
53
|
+
size: "small",
|
|
54
|
+
type: "icon"
|
|
55
|
+
}), /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
|
|
56
|
+
className: classes.ExpandedPanelContentCategoryHeaderLabel,
|
|
57
|
+
colorTheme: hoverMode ? 'dark' : 'gray',
|
|
58
|
+
dataTestId: "".concat(dataTestId, ".").concat(LABEL),
|
|
59
|
+
variant: "small",
|
|
60
|
+
weight: "medium"
|
|
61
|
+
}, title));
|
|
62
|
+
};
|
|
63
|
+
ExpandedPanelContentCategoryHeader.propTypes = {
|
|
64
|
+
avatarPalette: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
|
|
65
|
+
backgroundColor: _propTypes.string,
|
|
66
|
+
color: _propTypes.string,
|
|
67
|
+
colorTheme: _propTypes.string
|
|
68
|
+
})),
|
|
69
|
+
classes: (0, _propTypes.objectOf)(_propTypes.string),
|
|
70
|
+
collapsedCategory: _propTypes.bool,
|
|
71
|
+
dataTestId: _propTypes.string,
|
|
72
|
+
handleHeaderHover: _propTypes.func,
|
|
73
|
+
handleToggleCollapsedCategory: _propTypes.func,
|
|
74
|
+
hoverMode: _propTypes.bool,
|
|
75
|
+
icon: _propTypes.string,
|
|
76
|
+
title: _propTypes.string
|
|
77
|
+
};
|
|
78
|
+
var _default = exports.default = ExpandedPanelContentCategoryHeader;
|