@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.
Files changed (91) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +0 -1
  3. package/dist/components/UTAvatar/constants.js +44 -1
  4. package/dist/components/UTAvatar/index.js +31 -8
  5. package/dist/components/UTAvatar/stories/UTAvatar.mdx +13 -0
  6. package/dist/components/UTAvatar/stories/UTAvatar.stories.js +38 -0
  7. package/dist/components/UTAvatar/stories/UTAvatarColors.stories.js +91 -0
  8. package/dist/components/UTAvatar/stories/UTAvatarShapes.stories.js +51 -0
  9. package/dist/components/UTAvatar/stories/UTAvatarSizes.stories.js +106 -0
  10. package/dist/components/UTAvatar/stories/UTAvatarTypes.stories.js +51 -0
  11. package/dist/components/UTAvatar/stories/storiesConstants.js +155 -0
  12. package/dist/components/UTAvatar/styles.module.scss +24 -0
  13. package/dist/components/UTBodyPlaceholder/UTBodyPlaceholder.mdx +11 -0
  14. package/dist/components/UTBodyPlaceholder/UTBodyPlaceholder.stories.js +76 -0
  15. package/dist/components/UTBodyPlaceholder/constants.js +14 -0
  16. package/dist/components/UTBodyPlaceholder/index.js +45 -0
  17. package/dist/components/UTBodyPlaceholder/styles.module.scss +34 -0
  18. package/dist/components/UTButton/constants.js +8 -5
  19. package/dist/components/UTButton/stories/UTButton.mdx +13 -0
  20. package/dist/components/UTButton/stories/UTButton.stories.js +38 -0
  21. package/dist/components/UTButton/stories/UTButtonAdornments.stories.js +52 -0
  22. package/dist/components/UTButton/stories/UTButtonColorThemes.stories.js +52 -0
  23. package/dist/components/UTButton/stories/UTButtonSizes.stories.js +40 -0
  24. package/dist/components/UTButton/stories/UTButtonStates.stories.js +34 -0
  25. package/dist/components/UTButton/stories/UTButtonVariants.stories.js +61 -0
  26. package/dist/components/UTButton/stories/storiesConstants.js +220 -0
  27. package/dist/components/UTButton/theme.js +15 -14
  28. package/dist/components/UTButton/utils.js +2 -2
  29. package/dist/components/UTDataElement/UTDataElement.stories.js +2 -1
  30. package/dist/components/UTDataElement/theme.js +2 -1
  31. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/CollapsedPanelContent/constants.js +11 -0
  32. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/CollapsedPanelContent/index.js +34 -0
  33. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/CollapsedPanelContent/layout.js +46 -0
  34. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryEmpty/index.js +36 -0
  35. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryEmpty/layout.js +50 -0
  36. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryHeader/constants.js +8 -0
  37. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryHeader/index.js +55 -0
  38. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryHeader/layout.js +78 -0
  39. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryItem/constants.js +21 -0
  40. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryItem/index.js +80 -0
  41. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/components/ExpandedPanelContentCategoryItem/layout.js +132 -0
  42. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/constants.js +7 -0
  43. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/index.js +62 -0
  44. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/layout.js +78 -0
  45. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentCategory/utils.js +23 -0
  46. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentHeader/constants.js +16 -0
  47. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentHeader/index.js +75 -0
  48. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentHeader/layout.js +136 -0
  49. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentPopper/constants.js +11 -0
  50. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentPopper/index.js +40 -0
  51. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/components/ExpandedPanelContentPopper/layout.js +55 -0
  52. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/index.js +37 -0
  53. package/dist/components/UTFilterGrouping/components/GroupingPanel/components/ExpandedPanelContent/layout.js +44 -0
  54. package/dist/components/UTFilterGrouping/components/GroupingPanel/index.js +57 -0
  55. package/dist/components/UTFilterGrouping/components/GroupingPanel/layout.js +64 -0
  56. package/dist/components/UTFilterGrouping/constants.js +10 -0
  57. package/dist/components/UTFilterGrouping/context.js +9 -0
  58. package/dist/components/UTFilterGrouping/index.js +187 -0
  59. package/dist/components/UTFilterGrouping/layout.js +43 -0
  60. package/dist/components/UTFilterGrouping/stories/UTFilterGrouping.mdx +13 -0
  61. package/dist/components/UTFilterGrouping/stories/UTFilterGrouping.stories.js +315 -0
  62. package/dist/components/UTFilterGrouping/stories/constants.json +282 -0
  63. package/dist/components/UTFilterGrouping/stories/fixtures.js +162 -0
  64. package/dist/components/UTFilterGrouping/stories/props.schema.json +163 -0
  65. package/dist/components/UTFilterGrouping/stories/styles.module.scss +19 -0
  66. package/dist/components/UTFilterGrouping/stories/tests.js +250 -0
  67. package/dist/components/UTFilterGrouping/stories/utils.js +178 -0
  68. package/dist/components/UTFilterGrouping/styles.module.scss +251 -0
  69. package/dist/components/UTFilterGrouping/theme.js +55 -0
  70. package/dist/components/UTFilterGrouping/types.js +51 -0
  71. package/dist/components/UTFilterGrouping/utils.js +27 -0
  72. package/dist/components/UTGraph/UTGraph.stories.js +1 -1
  73. package/dist/components/UTIcon/UTIcon.mdx +17 -0
  74. package/dist/components/UTIcon/UTIcon.stories.js +2 -1
  75. package/dist/components/UTIcon/index.js +2 -19
  76. package/dist/components/UTKpi/UTKpi.stories.js +2 -1
  77. package/dist/components/UTLabel/UTLabel.stories.js +2 -1
  78. package/dist/components/UTPanel/UTPanel.stories.js +2 -1
  79. package/dist/components/UTRadioGroup/UTRadioGroup.stories.js +2 -1
  80. package/dist/components/UTSearchField/index.js +8 -2
  81. package/dist/components/UTSearchField/stories/UTSearchField.mdx +11 -0
  82. package/dist/components/UTSearchField/stories/UTSearchField.stories.js +250 -0
  83. package/dist/components/UTSignature/UTSignature.stories.js +2 -1
  84. package/dist/components/UTStatus/UTStatus.stories.js +2 -1
  85. package/dist/components/UTSwitch/versions/V1/theme.js +5 -4
  86. package/dist/components/UTTable/UTTable.stories.js +2 -1
  87. package/dist/constants/Palette.js +1 -0
  88. package/dist/constants/testIds.js +53 -1
  89. package/dist/index.js +7 -0
  90. package/dist/types/iconTypes.js +25 -0
  91. package/package.json +8 -1
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.idBelongsToNonStartItem = exports.idBelongsToHoverableItem = exports.idBelongsToCollapsedItem = exports.delay = exports.createExistingIds = void 0;
7
+ var _testIds = require("../../../constants/testIds");
8
+ var _constants = _interopRequireDefault(require("./constants.json"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const {
11
+ CLIENT_FILTER,
12
+ COLLAPSE_BUTTON,
13
+ COLLAPSE_BUTTON_TOOLTIP,
14
+ CUSTOM_SEARCH_ACTION,
15
+ DELETE_BUTTON,
16
+ DELETE_BUTTON_TOOLTIP,
17
+ EDIT_BUTTON,
18
+ EDIT_BUTTON_TOOLTIP,
19
+ EXPANDED_PANEL_CONTENT_CATEGORY,
20
+ EXPANDED_PANEL_CONTENT_CATEGORY_EMPTY,
21
+ EXPAND_BUTTON,
22
+ PERSISTENT_FILTER,
23
+ POPPER,
24
+ SEARCH_BUTTON,
25
+ SEARCH_BUTTON_TOOLTIP,
26
+ SEARCH_FIELD,
27
+ USER_FILTER
28
+ } = _testIds.ID_CONSTANTS;
29
+ const {
30
+ MISC
31
+ } = _constants.default;
32
+ const {
33
+ INDEX_PLACEHOLDER
34
+ } = MISC;
35
+
36
+ /**
37
+ * @fileoverview Utility functions for UTFilterGrouping stories
38
+ * @module UTFilterGrouping/stories/utils
39
+ */
40
+
41
+ /**
42
+ * Formats a test ID string by replacing template placeholders with actual values
43
+ *
44
+ * @function testIdQuickFormat
45
+ * @param {string} testId - The test ID string containing placeholders in the format {{key}}
46
+ * @param {Object} replaceOptions - An object containing key-value pairs for replacement
47
+ * @returns {string} The formatted test ID with placeholders replaced by actual values
48
+ *
49
+ * @example
50
+ * testIdQuickFormat('filter.{{category}}.{{index}}', { category: 'energy', index: '0' })
51
+ * // Returns: 'filter.energy.0'
52
+ */
53
+ const testIdQuickFormat = (testId, replaceOptions) => {
54
+ const idElementsArray = testId.split('.');
55
+ Object.entries(replaceOptions).forEach(_ref => {
56
+ let [key, value] = _ref;
57
+ if (idElementsArray.includes("{{".concat(key, "}}"))) {
58
+ const keyIndex = idElementsArray.indexOf("{{".concat(key, "}}"));
59
+ idElementsArray.splice(keyIndex, 1, value);
60
+ }
61
+ });
62
+ const finalId = idElementsArray.join('.');
63
+ return finalId;
64
+ };
65
+
66
+ /**
67
+ * Creates a promise that resolves after a specified delay
68
+ *
69
+ * @function delay
70
+ * @param {number} ms - The number of milliseconds to delay
71
+ * @returns {Promise<void>} A promise that resolves after the specified delay
72
+ *
73
+ * @example
74
+ * await delay(1000);
75
+ */
76
+
77
+ const delay = ms => new Promise(resolve => {
78
+ setTimeout(resolve, ms);
79
+ });
80
+
81
+ /**
82
+ * Creates a flattened collection of test IDs based on categories and ID templates.
83
+ * For each category and ID template, generates IDs with filter indices. If all generated
84
+ * IDs for a template are identical (no {{index}} placeholder), returns a single ID string;
85
+ * otherwise returns an array of indexed IDs.
86
+ *
87
+ * @function createExistingIds
88
+ * @param {Array<Object>} categories - Array of category objects, each containing:
89
+ * @param {Object<string, string>} idsList - Object containing ID template strings with placeholders
90
+ * (e.g., {{category}}, {{index}})
91
+ * @returns {Array<string|Array<string>>} Flattened array containing single ID strings
92
+ *
93
+ * @example
94
+ * const categories = [
95
+ * { category: 'energy', filters: [{}, {}] },
96
+ * { category: 'water', filters: [{}] }
97
+ * ];
98
+ * const idsList = {
99
+ * checkbox: 'filter.{{category}}.checkbox.{{index}}',
100
+ * label: 'filter.{{category}}.label'
101
+ * };
102
+ * createExistingIds(categories, idsList)
103
+ * // Returns: [
104
+ * // 'filter.energy.label',
105
+ * // 'filter.water.checkbox.0',
106
+ * // 'filter.water.label'
107
+ * // ]
108
+ */
109
+ exports.delay = delay;
110
+ const createExistingIds = (categories, idsList) => {
111
+ const test = categories.map(_ref2 => {
112
+ let {
113
+ category,
114
+ filters
115
+ } = _ref2;
116
+ return Object.values(idsList).map(value => {
117
+ if (!value.includes(INDEX_PLACEHOLDER)) {
118
+ return testIdQuickFormat(value, {
119
+ category
120
+ });
121
+ }
122
+ const clientIdsWithIndex = [...filters].filter(_ref3 => {
123
+ let {
124
+ pinned
125
+ } = _ref3;
126
+ return pinned;
127
+ }).map((_, i) => value.includes(CLIENT_FILTER) ? testIdQuickFormat(value, {
128
+ category,
129
+ index: i
130
+ }) : false);
131
+ const userIdsWithIndex = [...filters].filter(_ref4 => {
132
+ let {
133
+ pinned
134
+ } = _ref4;
135
+ return !pinned;
136
+ }).map((_, i) => value.includes(USER_FILTER) ? testIdQuickFormat(value, {
137
+ category,
138
+ index: i
139
+ }) : false);
140
+ return [...clientIdsWithIndex, ...userIdsWithIndex];
141
+ });
142
+ }).flat(Infinity).filter(Boolean);
143
+ return test;
144
+ };
145
+
146
+ /**
147
+ * Determines if a test ID belongs to an item that requires hovering to be visible or interactive.
148
+ * This includes tooltips, poppers, and certain buttons that appear on hover.
149
+ *
150
+ * @function idBelongsToHoverableItem
151
+ * @param {string} item - The test ID string to check
152
+ * @returns {boolean} True if the item requires hovering, false otherwise
153
+ */
154
+ exports.createExistingIds = createExistingIds;
155
+ const idBelongsToHoverableItem = item => item.includes(POPPER) || item.includes(DELETE_BUTTON) || item.includes(EDIT_BUTTON) || item.includes(COLLAPSE_BUTTON) || item.includes(SEARCH_BUTTON) || item.includes(DELETE_BUTTON_TOOLTIP) || item.includes(EDIT_BUTTON_TOOLTIP) || item.includes(COLLAPSE_BUTTON_TOOLTIP) || item.includes(SEARCH_BUTTON_TOOLTIP) || item.includes(CUSTOM_SEARCH_ACTION) || item.includes(COLLAPSE_BUTTON) && item.includes(EXPANDED_PANEL_CONTENT_CATEGORY);
156
+
157
+ /**
158
+ * Determines if a test ID belongs to a collapsed item that needs to be expanded.
159
+ * Specifically checks for expand button elements.
160
+ *
161
+ * @function idBelongsToCollapsedItem
162
+ * @param {string} item - The test ID string to check
163
+ * @returns {boolean} True if the item is an expand button, false otherwise
164
+ */
165
+ exports.idBelongsToHoverableItem = idBelongsToHoverableItem;
166
+ const idBelongsToCollapsedItem = item => item.includes(EXPAND_BUTTON);
167
+
168
+ /**
169
+ * Determines if a test ID belongs to an item that is not in its initial/start state.
170
+ * Currently checks for search field elements which may not be visible initially.
171
+ *
172
+ * @function idBelongsToNonStartItem
173
+ * @param {string} item - The test ID string to check
174
+ * @returns {boolean} True if the item is not in start state, false otherwise
175
+ */
176
+ exports.idBelongsToCollapsedItem = idBelongsToCollapsedItem;
177
+ const idBelongsToNonStartItem = item => item.includes(SEARCH_FIELD) || item.includes(EXPANDED_PANEL_CONTENT_CATEGORY_EMPTY) || item.includes(PERSISTENT_FILTER);
178
+ exports.idBelongsToNonStartItem = idBelongsToNonStartItem;
@@ -0,0 +1,251 @@
1
+ @keyframes slideInFromRight {
2
+ 0% {
3
+ opacity: 0;
4
+ transform: translateX(20px);
5
+ }
6
+
7
+ 100% {
8
+ opacity: 1;
9
+ transform: translateX(0);
10
+ }
11
+ }
12
+
13
+ %actionsContainer {
14
+ animation-fill-mode: forwards;
15
+ display: none;
16
+ }
17
+
18
+ %animatedActionsContainer {
19
+ animation: slideInFromRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
20
+ display: flex;
21
+ grid-gap: 8px;
22
+ }
23
+
24
+ %textWithEllipsis {
25
+ overflow: hidden;
26
+ text-overflow: ellipsis;
27
+ white-space: nowrap;
28
+ }
29
+
30
+ %actionButton {
31
+ min-width: fit-content;
32
+ padding: 4px;
33
+ }
34
+
35
+ .filterGroupingContainer {
36
+ display: flex;
37
+ flex-grow: 1;
38
+ flex-shrink: 0;
39
+ height: 100%;
40
+ position: relative;
41
+ width: 100%;
42
+
43
+ .panelRoot {
44
+ &Right {
45
+ order: 1 !important;
46
+ }
47
+
48
+ &Left {
49
+ order: -1 !important;
50
+ }
51
+ }
52
+
53
+ .paper {
54
+ align-items: flex-start;
55
+ box-shadow: none !important;
56
+ box-sizing: border-box;
57
+ display: flex;
58
+ justify-content: flex-start;
59
+ order: 2 !important;
60
+ overflow: hidden !important;
61
+ padding: 24px 12px;
62
+ position: relative !important;
63
+ transition: width 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms !important;
64
+ width: 56px;
65
+
66
+ .collapsedPanelContentExpandButton {
67
+ padding: 4px !important;
68
+ }
69
+
70
+ &Open {
71
+ padding: 0;
72
+ width: 256px;
73
+ }
74
+
75
+ .expandedPanelContent {
76
+ box-sizing: border-box;
77
+ display: flex;
78
+ flex-direction: column;
79
+ padding: 0 16px;
80
+ position: relative;
81
+ width: 100%;
82
+
83
+ .expandedPanelContentHeader {
84
+ align-items: center;
85
+ display: flex;
86
+ grid-gap: 8px;
87
+ justify-content: space-between;
88
+ padding: 24px 0;
89
+ position: sticky;
90
+ top: 0;
91
+ width: 100%;
92
+ z-index: 1;
93
+
94
+ &SearchOpen {
95
+ border: 1px solid transparent;
96
+ padding: 16px 0;
97
+ }
98
+
99
+ .expandedPanelContentTitle {
100
+ @extend %textWithEllipsis;
101
+ }
102
+
103
+ .expandedPanelContentActions {
104
+ display: flex;
105
+ flex-wrap: nowrap;
106
+ grid-gap: 8px;
107
+
108
+ .expandedPanelContentActionsContainer {
109
+ @extend %actionsContainer;
110
+ }
111
+ }
112
+
113
+ &:hover,
114
+ &[data-test-hover="true"] {
115
+ .expandedPanelContentActionsContainer {
116
+ @extend %animatedActionsContainer;
117
+ }
118
+ }
119
+
120
+ .expandedPanelContentAction {
121
+ @extend %actionButton;
122
+ }
123
+ }
124
+
125
+ .expandedPanelContentCategory {
126
+ padding: 16px 0;
127
+
128
+ .expandedPanelContentCategoryHeader {
129
+ align-items: center;
130
+ border-radius: 4px;
131
+ display: flex;
132
+ grid-gap: 8px;
133
+ padding: 12px 8px;
134
+
135
+ svg {
136
+ transition: transform 0.3s ease-in-out;
137
+ }
138
+
139
+ .collapsedCategoryIcon {
140
+ transform: rotate(-90deg);
141
+ }
142
+
143
+ .ExpandedPanelContentCategoryHeaderAvatar {
144
+ border-radius: 8px;
145
+ }
146
+ }
147
+
148
+ .expandedPanelContentUserFiltersExpanded {
149
+ max-height: 1000px;
150
+ opacity: 1;
151
+ overflow: hidden;
152
+ transition: max-height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
153
+ opacity 0.2s ease-in-out;
154
+ }
155
+
156
+ .expandedPanelContentUserFiltersCollapsed {
157
+ max-height: 0;
158
+ opacity: 0;
159
+ overflow: hidden;
160
+ transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
161
+ opacity 0.2s ease-in-out;
162
+ }
163
+
164
+ .expandedPanelContentCategoryEmpty {
165
+ align-items: center;
166
+ border-radius: 8px;
167
+ display: flex;
168
+ flex-direction: column;
169
+ grid-gap: 8px;
170
+ justify-content: center;
171
+ padding: 12px 8px;
172
+
173
+ .expandedPanelContentCategoryEmptyText {
174
+ align-items: center;
175
+ display: flex;
176
+ flex-direction: column;
177
+ grid-gap: 4px;
178
+ justify-content: center;
179
+ }
180
+ }
181
+
182
+ .expandedPanelContentCategoryItem {
183
+ align-items: center;
184
+ border-radius: 4px;
185
+ box-sizing: border-box;
186
+ display: flex;
187
+ grid-gap: 8px;
188
+ justify-content: space-between;
189
+ min-height: 44px;
190
+ padding: 6px 8px;
191
+ width: 100%;
192
+
193
+ .expandedPanelContentCategoryItemTitleContainer {
194
+ align-items: center;
195
+ display: flex;
196
+ flex-grow: 1;
197
+ grid-gap: 8px;
198
+ overflow: hidden;
199
+
200
+ .hoverableContainer {
201
+ flex-grow: 1;
202
+ overflow: hidden;
203
+ }
204
+ }
205
+
206
+ .expandedPanelContentCategoryItemTitleLabel {
207
+ @extend %textWithEllipsis;
208
+ }
209
+
210
+ .expandedPanelContentCategoryItemActionsContainer {
211
+ @extend %actionsContainer;
212
+ }
213
+
214
+ &:hover,
215
+ &[data-test-hover="true"] {
216
+ .expandedPanelContentCategoryItemActionsContainer {
217
+ @extend %animatedActionsContainer;
218
+ }
219
+ }
220
+
221
+ .expandedPanelContentCategoryItemAction {
222
+ @extend %actionButton;
223
+ }
224
+ }
225
+ }
226
+ }
227
+ }
228
+ }
229
+
230
+ .popper {
231
+ max-width: 272px;
232
+ z-index: 1300;
233
+
234
+ &Right {
235
+ left: -4px !important;
236
+ }
237
+
238
+ &Left {
239
+ left: 4px !important;
240
+ }
241
+
242
+ .expandedPanelContentPopperContent {
243
+ align-items: flex-start;
244
+ border-radius: 4px;
245
+ display: flex;
246
+ flex-direction: column;
247
+ grid-gap: 4px;
248
+ justify-content: center;
249
+ padding: 16px;
250
+ }
251
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.retrieveStyle = void 0;
7
+ var _get = _interopRequireDefault(require("lodash/get"));
8
+ var _constants = require("./constants");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const retrieveStyle = _ref => {
11
+ let {
12
+ theme,
13
+ position
14
+ } = _ref;
15
+ return {
16
+ backdrop: {
17
+ backgroundColor: theme.Palette.dark['05'],
18
+ opacity: '0.25 !important'
19
+ },
20
+ expandedPanelContentCategoryEmpty: {
21
+ backgroundColor: (0, _get.default)(theme, ['UTFilterGrouping', 'expandedPanelContent', 'expandedPanelContentCategory', 'expandedPanelContentCategoryEmpty', 'backgroundColor'], "".concat(theme.Palette.light['03']))
22
+ },
23
+ expandedPanelContentCategoryHeader: {
24
+ '&:hover': {
25
+ backgroundColor: (0, _get.default)(theme, ['UTFilterGrouping', 'expandedPanelContent', 'expandedPanelContentCategory', 'expandedPanelContentCategoryHeader', 'backgroundColor', '&:hover'], "".concat(theme.Palette.light['04']))
26
+ }
27
+ },
28
+ expandedPanelContentCategoryItem: {
29
+ '&:hover': {
30
+ backgroundColor: (0, _get.default)(theme, ['UTFilterGrouping', 'expandedPanelContent', 'expandedPanelContentCategory', 'expandedPanelContentCategoryItem', 'backgroundColor', '&:hover'], "".concat(theme.Palette.light['04']))
31
+ }
32
+ },
33
+ expandedPanelContentCategoryItemSelected: {
34
+ backgroundColor: (0, _get.default)(theme, ['UTFilterGrouping', 'expandedPanelContent', 'expandedPanelContentCategory', 'expandedPanelContentCategoryItemSelected', 'backgroundColor'], "".concat(theme.Palette.accent['01'])),
35
+ '&:hover': {
36
+ backgroundColor: (0, _get.default)(theme, ['UTFilterGrouping', 'expandedPanelContent', 'expandedPanelContentCategory', 'expandedPanelContentCategoryItemSelected', 'backgroundColor', '&:hover'], "".concat(theme.Palette.accent['01'], " !important"))
37
+ }
38
+ },
39
+ expandedPanelContentHeader: {
40
+ backgroundColor: (0, _get.default)(theme, ['UTFilterGrouping', 'expandedPanelContent', 'expandedPanelContentCategory', 'expandedPanelContentCategoryHeader', 'backgroundColor'], "".concat(theme.Palette.light['01']))
41
+ },
42
+ expandedPanelContentPopperContent: {
43
+ backgroundColor: (0, _get.default)(theme, ['UTFilterGrouping', 'expandedPanelContent', 'expandedPanelContentPopperContent', 'backgroundColor'], "".concat(theme.Palette.light['01']))
44
+ },
45
+ paper: {
46
+ backgroundColor: (0, _get.default)(theme, ['UTFilterGrouping', 'closedPanelBar', 'backgroundColor'], "".concat(theme.Palette.light['01'], " !important")),
47
+ borderRight: position === _constants.PANEL_POSITIONS.LEFT ? (0, _get.default)(theme, ['UTFilterGrouping', 'borderRight'], "1px solid ".concat(theme.Palette.light['04'], " !important")) : 'none',
48
+ borderLeft: position === _constants.PANEL_POSITIONS.RIGHT ? (0, _get.default)(theme, ['UTFilterGrouping', 'borderLeft'], "1px solid ".concat(theme.Palette.light['04'], " !important")) : 'none'
49
+ },
50
+ perfectScrollbar: {
51
+ width: (0, _get.default)(theme, ['UTFilterGrouping', 'perfectScrollbar', 'width'], '100%')
52
+ }
53
+ };
54
+ };
55
+ exports.retrieveStyle = retrieveStyle;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.refType = exports.filtersType = exports.filterParamsType = exports.customSearchActionType = exports.categoryType = exports.categoryConfigType = exports.categoriesType = exports.avatarPaletteType = void 0;
7
+ var _propTypes = require("prop-types");
8
+ const customSearchActionType = exports.customSearchActionType = (0, _propTypes.shape)({
9
+ dataTestId: _propTypes.string,
10
+ Icon: _propTypes.string,
11
+ onClick: _propTypes.func,
12
+ size: _propTypes.string
13
+ });
14
+ const refType = exports.refType = (0, _propTypes.shape)({
15
+ current: (0, _propTypes.shape)({
16
+ popperInstance: (0, _propTypes.shape)({
17
+ update: _propTypes.func
18
+ })
19
+ })
20
+ });
21
+ const filterParamsType = exports.filterParamsType = (0, _propTypes.shape)({
22
+ key: _propTypes.string,
23
+ values: (0, _propTypes.arrayOf)(_propTypes.string)
24
+ });
25
+ const filtersType = exports.filtersType = (0, _propTypes.arrayOf)((0, _propTypes.shape)({
26
+ backoffice_user_id: _propTypes.string,
27
+ category: _propTypes.string,
28
+ description: _propTypes.string,
29
+ filter_params: (0, _propTypes.arrayOf)(filterParamsType),
30
+ id: _propTypes.number,
31
+ name: _propTypes.string,
32
+ order: _propTypes.number,
33
+ pinned: _propTypes.bool,
34
+ visible: _propTypes.bool
35
+ }));
36
+ const categoryType = exports.categoryType = (0, _propTypes.shape)({
37
+ category: _propTypes.string,
38
+ filters: filtersType,
39
+ id: _propTypes.number,
40
+ name: _propTypes.string
41
+ });
42
+ const categoriesType = exports.categoriesType = (0, _propTypes.arrayOf)(categoryType);
43
+ const avatarPaletteType = exports.avatarPaletteType = (0, _propTypes.shape)({
44
+ backgroundColor: _propTypes.string,
45
+ color: _propTypes.string,
46
+ colorTheme: _propTypes.string
47
+ });
48
+ const categoryConfigType = exports.categoryConfigType = (0, _propTypes.objectOf)((0, _propTypes.shape)({
49
+ avatarPalette: avatarPaletteType,
50
+ icon: _propTypes.string
51
+ }));
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.handleAnimationEnd = void 0;
7
+ /**
8
+ * Handles animation-end-event by updating Tippy popper instances.
9
+ *
10
+ * This function updates the popper instances for both the search button and collapse button
11
+ * Tippy tooltips after an animation completes. This ensures that the tooltip positions are
12
+ * recalculated and properly aligned after any layout changes caused by the animation.
13
+ *
14
+ * @param {React.MutableRefObject} searchButtonTippyRef - Reference to the search button's Tippy instance
15
+ * @param {React.MutableRefObject} collapseButtonTippyRef - Reference to the collapse button's Tippy instance
16
+ * @returns {void}
17
+ */
18
+ const handleAnimationEnd = (searchButtonTippyRef, collapseButtonTippyRef) => {
19
+ var _searchButtonTippyRef, _collapseButtonTippyR;
20
+ if ((_searchButtonTippyRef = searchButtonTippyRef.current) !== null && _searchButtonTippyRef !== void 0 && _searchButtonTippyRef.popperInstance) {
21
+ searchButtonTippyRef.current.popperInstance.update();
22
+ }
23
+ if ((_collapseButtonTippyR = collapseButtonTippyRef.current) !== null && _collapseButtonTippyR !== void 0 && _collapseButtonTippyR.popperInstance) {
24
+ collapseButtonTippyRef.current.popperInstance.update();
25
+ }
26
+ };
27
+ exports.handleAnimationEnd = handleAnimationEnd;
@@ -10,7 +10,7 @@ var _UTGraph = require("./UTGraph.storiesdata");
10
10
  var _ = _interopRequireDefault(require("."));
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  var _default = exports.default = {
13
- title: 'UTGraph',
13
+ title: 'Energy-UI/UTGraph',
14
14
  component: _.default,
15
15
  render: args => /*#__PURE__*/_react.default.createElement("div", {
16
16
  style: {
@@ -0,0 +1,17 @@
1
+ import { ArgTypes, Canvas, Description, Meta, Title } from '@storybook/addon-docs';
2
+
3
+ import * as UTIconStories from './UTIcon.stories';
4
+
5
+ <Meta of={UTIconStories} />
6
+
7
+ <Title>UTIcon</Title>
8
+
9
+ ## Deprecation Notice
10
+
11
+ The `color` prop is deprecated and will be removed in a future release. Please use `colorTheme` instead.
12
+
13
+ ## Props
14
+
15
+ <Description of={UTIconStories} />
16
+
17
+ <ArgTypes />
@@ -126,7 +126,8 @@ var _default = exports.default = {
126
126
  }
127
127
  }
128
128
  }
129
- }
129
+ },
130
+ title: 'Energy-UI/UTIcon'
130
131
  };
131
132
  const Default = exports.Default = {
132
133
  name: 'Playground',
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
- var _propTypes = require("prop-types");
9
8
  var _WithTheme = _interopRequireDefault(require("../WithTheme"));
9
+ var _iconTypes = require("../../types/iconTypes");
10
10
  var _theme = require("./theme");
11
11
  var _constants = require("./constants");
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -53,22 +53,5 @@ const UTIcon = _ref => {
53
53
  "data-testid": dataTestId
54
54
  }, iconProps));
55
55
  };
56
- UTIcon.propTypes = {
57
- area: _propTypes.bool,
58
- classes: (0, _propTypes.objectOf)(_propTypes.string),
59
- className: _propTypes.string,
60
- /**
61
- * @deprecated The "color" prop is deprecated and will be removed in a future release. Please use "colorTheme" instead.
62
- */
63
- color: _propTypes.string,
64
- colorTheme: _propTypes.string,
65
- dataTestId: _propTypes.string,
66
- fillShade: _propTypes.string,
67
- fillTheme: _propTypes.string,
68
- name: _propTypes.string,
69
- shade: _propTypes.string,
70
- size: _propTypes.number,
71
- theme: _propTypes.object,
72
- variant: _propTypes.string
73
- };
56
+ UTIcon.propTypes = _iconTypes.iconPropTypes;
74
57
  var _default = exports.default = (0, _WithTheme.default)(_theme.retrieveStyle)(UTIcon);
@@ -201,7 +201,8 @@ var _default = exports.default = {
201
201
  component: 'Este componente se usa para mostrar KPIs con un título, un valor principal y un valor secundario. También puede mostrar un estado con un icono, una variante y un texto.'
202
202
  }
203
203
  }
204
- }
204
+ },
205
+ title: 'Energy-UI/UTKpi'
205
206
  };
206
207
  const Default = exports.Default = {
207
208
  name: 'Playground',
@@ -126,7 +126,8 @@ var _default = exports.default = {
126
126
  component: 'Este componente se usa para renderizar texto. Consume la paleta de colores. Acepta markdown para formatear texto.'
127
127
  }
128
128
  }
129
- }
129
+ },
130
+ title: 'Energy-UI/UTLabel'
130
131
  };
131
132
  const Default = exports.Default = {
132
133
  args: {
@@ -389,7 +389,8 @@ var _default = exports.default = {
389
389
  component: 'Componente Panel con dos versiones disponibles. V0 es una versión básica con funcionalidad de drawer. V1 es una versión avanzada con múltiples características como workflow, header items, botones de acción, etc.'
390
390
  }
391
391
  }
392
- }
392
+ },
393
+ title: 'Energy-UI/UTPanel'
393
394
  }; // V0 Stories
394
395
  const V0Default = exports.V0Default = {
395
396
  args: {
@@ -215,7 +215,8 @@ var _default = exports.default = {
215
215
  component: 'UTRadioGroup es un componente personalizable que renderiza un grupo de botones de radio, permitiendo a los usuarios seleccionar una sola opción de una lista proporcionada. Soporta características como visualización de errores, opciones dinámicas y diferentes variantes. Además, permite agrupar opciones por categoría, con las opciones sin agrupar apareciendo primero.'
216
216
  }
217
217
  }
218
- }
218
+ },
219
+ title: 'Energy-UI/UTRadioGroup'
219
220
  };
220
221
  const Default = exports.Default = {
221
222
  render: args => {