@hexure/ui 1.13.39 → 1.13.41

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 (80) hide show
  1. package/dist/cjs/index.js +1809 -1825
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/Accordion/Accordion.d.ts +1 -0
  4. package/dist/cjs/types/components/ActionDialog/ActionDialog.d.ts +2 -0
  5. package/dist/cjs/types/components/Alert/Alert.d.ts +2 -0
  6. package/dist/cjs/types/components/AppHeader/AppHeader.d.ts +2 -0
  7. package/dist/cjs/types/components/AppMenu/AppMenu.d.ts +2 -0
  8. package/dist/cjs/types/components/BulkActionBar/BulkActionBar.d.ts +2 -0
  9. package/dist/cjs/types/components/Button/Button.d.ts +2 -0
  10. package/dist/cjs/types/components/ButtonMenu/ButtonMenu.d.ts +2 -0
  11. package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +2 -0
  12. package/dist/cjs/types/components/Checklist/Checklist.d.ts +2 -0
  13. package/dist/cjs/types/components/Copy/Copy.d.ts +3 -1
  14. package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +2 -0
  15. package/dist/cjs/types/components/Drawer/Drawer.d.ts +2 -0
  16. package/dist/cjs/types/components/Field/Field.d.ts +2 -0
  17. package/dist/cjs/types/components/FieldGroup/FieldGroup.d.ts +2 -0
  18. package/dist/cjs/types/components/FileUpload/FileUpload.d.ts +2 -0
  19. package/dist/cjs/types/components/Heading/Heading.d.ts +2 -0
  20. package/dist/cjs/types/components/Input/Input.d.ts +2 -0
  21. package/dist/cjs/types/components/Link/Link.d.ts +2 -0
  22. package/dist/cjs/types/components/Loader/Loader.d.ts +5 -1
  23. package/dist/cjs/types/components/Logo/Logo.d.ts +2 -0
  24. package/dist/cjs/types/components/Modal/Modal.d.ts +2 -0
  25. package/dist/cjs/types/components/MoreMenu/MoreMenu.d.ts +2 -0
  26. package/dist/cjs/types/components/MultiSelect/MultiSelect.d.ts +2 -0
  27. package/dist/cjs/types/components/PageHeader/PageHeader.d.ts +2 -0
  28. package/dist/cjs/types/components/Pagination/Pagination.d.ts +2 -0
  29. package/dist/cjs/types/components/ProgressBar/ProgressBar.d.ts +2 -0
  30. package/dist/cjs/types/components/Radio/Radio.d.ts +2 -0
  31. package/dist/cjs/types/components/RadioList/RadioList.d.ts +2 -0
  32. package/dist/cjs/types/components/Select/Select.d.ts +2 -0
  33. package/dist/cjs/types/components/Table/Table.d.ts +2 -0
  34. package/dist/cjs/types/components/Tabs/Tabs.d.ts +2 -0
  35. package/dist/cjs/types/components/Tag/Tag.d.ts +2 -0
  36. package/dist/cjs/types/components/Toast/Toast.d.ts +2 -0
  37. package/dist/cjs/types/components/Toggle/Toggle.d.ts +2 -0
  38. package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +2 -0
  39. package/dist/cjs/types/components/ZeroState/ZeroState.d.ts +2 -0
  40. package/dist/esm/index.js +1761 -1777
  41. package/dist/esm/index.js.map +1 -1
  42. package/dist/esm/types/components/Accordion/Accordion.d.ts +1 -0
  43. package/dist/esm/types/components/ActionDialog/ActionDialog.d.ts +2 -0
  44. package/dist/esm/types/components/Alert/Alert.d.ts +2 -0
  45. package/dist/esm/types/components/AppHeader/AppHeader.d.ts +2 -0
  46. package/dist/esm/types/components/AppMenu/AppMenu.d.ts +2 -0
  47. package/dist/esm/types/components/BulkActionBar/BulkActionBar.d.ts +2 -0
  48. package/dist/esm/types/components/Button/Button.d.ts +2 -0
  49. package/dist/esm/types/components/ButtonMenu/ButtonMenu.d.ts +2 -0
  50. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +2 -0
  51. package/dist/esm/types/components/Checklist/Checklist.d.ts +2 -0
  52. package/dist/esm/types/components/Copy/Copy.d.ts +3 -1
  53. package/dist/esm/types/components/DatePicker/DatePicker.d.ts +2 -0
  54. package/dist/esm/types/components/Drawer/Drawer.d.ts +2 -0
  55. package/dist/esm/types/components/Field/Field.d.ts +2 -0
  56. package/dist/esm/types/components/FieldGroup/FieldGroup.d.ts +2 -0
  57. package/dist/esm/types/components/FileUpload/FileUpload.d.ts +2 -0
  58. package/dist/esm/types/components/Heading/Heading.d.ts +2 -0
  59. package/dist/esm/types/components/Input/Input.d.ts +2 -0
  60. package/dist/esm/types/components/Link/Link.d.ts +2 -0
  61. package/dist/esm/types/components/Loader/Loader.d.ts +5 -1
  62. package/dist/esm/types/components/Logo/Logo.d.ts +2 -0
  63. package/dist/esm/types/components/Modal/Modal.d.ts +2 -0
  64. package/dist/esm/types/components/MoreMenu/MoreMenu.d.ts +2 -0
  65. package/dist/esm/types/components/MultiSelect/MultiSelect.d.ts +2 -0
  66. package/dist/esm/types/components/PageHeader/PageHeader.d.ts +2 -0
  67. package/dist/esm/types/components/Pagination/Pagination.d.ts +2 -0
  68. package/dist/esm/types/components/ProgressBar/ProgressBar.d.ts +2 -0
  69. package/dist/esm/types/components/Radio/Radio.d.ts +2 -0
  70. package/dist/esm/types/components/RadioList/RadioList.d.ts +2 -0
  71. package/dist/esm/types/components/Select/Select.d.ts +2 -0
  72. package/dist/esm/types/components/Table/Table.d.ts +2 -0
  73. package/dist/esm/types/components/Tabs/Tabs.d.ts +2 -0
  74. package/dist/esm/types/components/Tag/Tag.d.ts +2 -0
  75. package/dist/esm/types/components/Toast/Toast.d.ts +2 -0
  76. package/dist/esm/types/components/Toggle/Toggle.d.ts +2 -0
  77. package/dist/esm/types/components/Tooltip/Tooltip.d.ts +2 -0
  78. package/dist/esm/types/components/ZeroState/ZeroState.d.ts +2 -0
  79. package/dist/index.d.ts +155 -82
  80. package/package.json +1 -1
package/dist/esm/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import React, { useState, useContext, useRef, useEffect } from 'react';
2
- import styled, { ThemeContext, keyframes } from 'styled-components';
3
- import Icon, { Icon as Icon$1 } from '@mdi/react';
4
- import { mdiChevronUp, mdiChevronDown, mdiInformationOutline, mdiLoading, mdiAlertOctagonOutline, mdiAlertOutline, mdiCheckboxMarkedCircleOutline, mdiClose, mdiChevronRight, mdiChevronLeft, mdiDotsHorizontal, mdiMinusCircle, mdiFolderPlusOutline, mdiCheck } from '@mdi/js';
5
- import dayjs from 'dayjs';
6
- import Numeral from 'numeral';
7
- import Moment from 'moment';
8
-
1
+ import React, { useState, useContext, useRef, useEffect } from 'react';
2
+ import styled, { ThemeContext, keyframes } from 'styled-components';
3
+ import Icon, { Icon as Icon$1 } from '@mdi/react';
4
+ import { mdiChevronUp, mdiChevronDown, mdiInformationOutline, mdiLoading, mdiAlertOctagonOutline, mdiAlertOutline, mdiCheckboxMarkedCircleOutline, mdiClose, mdiChevronRight, mdiChevronLeft, mdiDotsHorizontal, mdiMinusCircle, mdiFolderPlusOutline, mdiCheck } from '@mdi/js';
5
+ import dayjs from 'dayjs';
6
+ import Numeral from 'numeral';
7
+ import Moment from 'moment';
8
+
9
9
  /******************************************************************************
10
10
  Copyright (c) Microsoft Corporation.
11
11
 
@@ -19,22 +19,22 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19
19
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20
20
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
21
  PERFORMANCE OF THIS SOFTWARE.
22
- ***************************************************************************** */
23
- /* global Reflect, Promise, SuppressedError, Symbol */
24
-
25
- function __rest(s, e) {
26
- var t = {};
27
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
28
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
29
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
30
- }
31
- return t;
32
- }
33
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
34
- var e = new Error(message);
35
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
36
- };
37
-
22
+ ***************************************************************************** */
23
+ /* global Reflect, Promise, SuppressedError, Symbol */
24
+
25
+ function __rest(s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
28
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
29
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
30
+ }
31
+ return t;
32
+ }
33
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
34
+ var e = new Error(message);
35
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
36
+ };
37
+
38
38
  const Colors = {
39
39
  PRIMARY: {
40
40
  Hex: '#0193D7',
@@ -83,89 +83,71 @@ const FontSizes = {
83
83
  };
84
84
  const EditableTheme = {
85
85
  PRIMARY_COLOR: Colors.PRIMARY,
86
- };
87
-
88
- const generateUniqueId = (() => {
89
- return (prefix = 'id') => {
90
- const counterKey = `${prefix}-counter`;
91
- const idKey = `${prefix}-id`;
92
- const existingId = localStorage.getItem(idKey);
93
- if (existingId) {
94
- return existingId;
95
- }
96
- let counter = parseInt(localStorage.getItem(counterKey) || '0', 10);
97
- counter += 1;
98
- localStorage.setItem(counterKey, counter.toString());
99
- const counterString = counter.toString().padStart(4, '0');
100
- const uniqueId = `${prefix}-${counterString}`;
101
- localStorage.setItem(idKey, uniqueId);
102
- return uniqueId;
103
- };
104
- })();
105
-
106
- const Header$3 = styled.div `
107
- display: flex;
108
- align-items: center;
109
- justify-content: space-between;
110
- box-sizing: border-box;
111
- background: #f5f5f5;
112
- border: 1px solid #e5e5e5;
113
- padding: 14px 20px;
114
- height: 50px;
115
- cursor: pointer;
116
- `;
117
- const Title$2 = styled.div `
118
- font-size: ${FontSizes.DEFAULT};
119
- font-weight: 400;
120
- color: ${Colors.BLACK.Hex};
121
- line-height: 1.6em;
122
- font-family: ${FontStyles.DEFAULT};
123
- box-sizing: border-box;
86
+ };
87
+
88
+ const Header$3 = styled.div `
89
+ display: flex;
90
+ align-items: center;
91
+ justify-content: space-between;
92
+ box-sizing: border-box;
93
+ background: #f5f5f5;
94
+ border: 1px solid #e5e5e5;
95
+ padding: 14px 20px;
96
+ height: 50px;
97
+ cursor: pointer;
98
+ `;
99
+ const Title$2 = styled.div `
100
+ font-size: ${FontSizes.DEFAULT};
101
+ font-weight: 400;
102
+ color: ${Colors.BLACK.Hex};
103
+ line-height: 1.6em;
104
+ font-family: ${FontStyles.DEFAULT};
105
+ box-sizing: border-box;
124
106
  `;
125
107
  const Accordion = (_a) => {
126
- var { title, children, open, onClick } = _a, accessibleProps = __rest(_a, ["title", "children", "open", "onClick"]);
127
- const id = generateUniqueId('accordion');
108
+ var { id, title, children, open, onClick } = _a, accessibleProps = __rest(_a, ["id", "title", "children", "open", "onClick"]);
109
+ const baseId = id || 'accordion';
128
110
  return (React.createElement(React.Fragment, null,
129
- React.createElement(Header$3, Object.assign({ id: `${id}-header`, onClick: onClick }, accessibleProps),
130
- React.createElement(Title$2, { id: `${id}-title` }, title),
131
- React.createElement(Icon, { color: Colors.BLACK.Hex, id: `${id}-icon`, path: open ? mdiChevronUp : mdiChevronDown, size: '24px' })),
132
- open ? React.createElement("div", { id: `${id}-content` }, children) : null));
133
- };
134
-
135
- const StyledComponent = styled.p `
136
- color: ${props => Colors[props.$color || 'BLACK'].Hex};
137
- font-size: ${props => (props.$type === 'small' ? FontSizes.SMALL : FontSizes.DEFAULT)};
138
- line-height: ${props => (props.$type === 'small' ? '1.5em' : '1.6em')};
139
- letter-spacing: ${props => (props.$type === 'small' ? '1px' : '0px')};
140
- font-weight: ${props => (props.$type === 'bold' ? '500' : '400')};
141
- font-style: ${props => (props.$type === 'italic' ? 'italic' : 'normal')};
142
- text-decoration: ${props => ['underline', 'line-through'].includes(props.$type) ? props.$type : 'none'};
143
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
144
- margin: ${props => props.$margin || '0px'};
145
- padding: ${props => props.$padding || '0px'};
146
- text-align: ${props => props.$align || 'left'};
147
- box-sizing: border-box;
111
+ React.createElement(Header$3, Object.assign({ id: `${baseId}-header`, onClick: onClick }, accessibleProps),
112
+ React.createElement(Title$2, { id: `${baseId}-title` }, title),
113
+ React.createElement(Icon, { color: Colors.BLACK.Hex, id: `${baseId}-icon`, path: open ? mdiChevronUp : mdiChevronDown, size: '24px' })),
114
+ open ? React.createElement("div", { id: `${baseId}-content` }, children) : null));
115
+ };
116
+
117
+ const StyledComponent = styled.p `
118
+ color: ${props => Colors[props.$color || 'BLACK'].Hex};
119
+ font-size: ${props => (props.$type === 'small' ? FontSizes.SMALL : FontSizes.DEFAULT)};
120
+ line-height: ${props => (props.$type === 'small' ? '1.5em' : '1.6em')};
121
+ letter-spacing: ${props => (props.$type === 'small' ? '1px' : '0px')};
122
+ font-weight: ${props => (props.$type === 'bold' ? '500' : '400')};
123
+ font-style: ${props => (props.$type === 'italic' ? 'italic' : 'normal')};
124
+ text-decoration: ${props => ['underline', 'line-through'].includes(props.$type) ? props.$type : 'none'};
125
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
126
+ margin: ${props => props.$margin || '0px'};
127
+ padding: ${props => props.$padding || '0px'};
128
+ text-align: ${props => props.$align || 'left'};
129
+ box-sizing: border-box;
148
130
  `;
149
131
  const Copy = (_a) => {
150
- var { children, align = '', margin = '', padding = '', type = 'default', color = 'BLACK' } = _a, accessibleProps = __rest(_a, ["children", "align", "margin", "padding", "type", "color"]);
151
- const id = generateUniqueId('copy');
152
- return (React.createElement(StyledComponent, Object.assign({ "$align": align, "$color": color, "$margin": margin, "$padding": padding, "$type": type, id: `${id}-styled-component` }, accessibleProps), children));
132
+ var { children, align = '', margin = '', padding = '', type = 'default', color = 'BLACK', id } = _a, accessibleProps = __rest(_a, ["children", "align", "margin", "padding", "type", "color", "id"]);
133
+ const baseId = id || 'copy';
134
+ return (React.createElement(StyledComponent, Object.assign({ "$align": align, "$color": color, "$margin": margin, "$padding": padding, "$type": type, id: `${baseId}-styled-component` }, accessibleProps), children));
153
135
  };
154
136
  Copy.defaultProps = {
155
137
  type: 'default',
156
- };
157
-
158
- const Wrapper$h = styled.div `
159
- display: inline-block;
160
- position: relative;
161
- height: 16px;
162
- `;
163
- const StyledIcon$6 = styled(Icon) `
164
- width: 16px;
165
- height: 16px;
166
- margin: 0px 6px;
167
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
168
- cursor: pointer;
138
+ };
139
+
140
+ const Wrapper$h = styled.div `
141
+ display: inline-block;
142
+ position: relative;
143
+ height: 16px;
144
+ `;
145
+ const StyledIcon$6 = styled(Icon) `
146
+ width: 16px;
147
+ height: 16px;
148
+ margin: 0px 6px;
149
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
150
+ cursor: pointer;
169
151
  `;
170
152
  StyledIcon$6.defaultProps = { theme: EditableTheme };
171
153
  const positions = {
@@ -198,19 +180,19 @@ const positions = {
198
180
  };
199
181
  const Content$3 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: props.theme.PRIMARY_COLOR.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 9999 }, positions[props.$position])));
200
182
  Content$3.defaultProps = { theme: EditableTheme };
201
- const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
183
+ const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, id, }) => {
202
184
  const [show_content, toggleContent] = useState(false);
203
- const id = generateUniqueId('tooltip');
204
- return (React.createElement(Wrapper$h, { id: `${id}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
205
- trigger || React.createElement(StyledIcon$6, { id: `${id}-icon`, path: mdiInformationOutline }),
206
- show_content ? (React.createElement(Content$3, { "$position": position, "$width": width, id: `${id}-content` }, children && (React.createElement(Copy, { id: `${id}-copy`, type: 'small' }, children)))) : null));
207
- };
208
-
209
- const StyledButton = styled.button `
210
- height: ${props => (props.$small ? '30px' : '40px')};
211
- line-height: 1em;
212
- border-radius: ${props => (props.$small ? '15px' : '20px')};
213
- margin: ${props => props.$margin || '0px'};
185
+ const baseId = id || 'tooltip';
186
+ return (React.createElement(Wrapper$h, { id: `${baseId}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
187
+ trigger || React.createElement(StyledIcon$6, { id: `${baseId}-icon`, path: mdiInformationOutline }),
188
+ show_content ? (React.createElement(Content$3, { "$position": position, "$width": width, id: `${baseId}-content` }, children && (React.createElement(Copy, { id: `${baseId}-copy`, type: 'small' }, children)))) : null));
189
+ };
190
+
191
+ const StyledButton = styled.button `
192
+ height: ${props => (props.$small ? '30px' : '40px')};
193
+ line-height: 1em;
194
+ border-radius: ${props => (props.$small ? '15px' : '20px')};
195
+ margin: ${props => props.$margin || '0px'};
214
196
  padding: ${props => {
215
197
  if (props.$hasChildren) {
216
198
  if (props.$small) {
@@ -221,9 +203,9 @@ const StyledButton = styled.button `
221
203
  }
222
204
  }
223
205
  return '0px';
224
- }};
225
- outline: none;
226
- background: ${props => props.$bg_color || props.theme.PRIMARY_COLOR.Hex};
206
+ }};
207
+ outline: none;
208
+ background: ${props => props.$bg_color || props.theme.PRIMARY_COLOR.Hex};
227
209
  width: ${props => {
228
210
  if (props.$hasChildren) {
229
211
  return 'auto';
@@ -232,58 +214,58 @@ const StyledButton = styled.button `
232
214
  return '30px';
233
215
  }
234
216
  return '40px';
235
- }};
236
- cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
237
- display: flex;
238
- align-items: center;
239
- justify-content: center;
240
- gap: ${props => (props.$iconPosition === 'before' ? '8px' : '0px')};
241
- flex-direction: ${props => (props.$iconPosition === 'before' ? 'row-reverse' : 'row')};
242
- opacity: ${props => (props.$disabled ? 0.6 : 0.9)};
243
- border-width: 1px;
244
- border-style: solid;
245
- border-color: ${props => props.$border_color || props.theme.PRIMARY_COLOR.Hex};
246
- box-sizing: border-box;
247
-
248
- &:active,
249
- &:focus,
250
- &:hover {
251
- opacity: ${props => (props.$disabled ? 0.6 : 1)};
252
- }
253
- `;
254
- const Label$5 = styled.span `
255
- color: ${props => props.$content_color || '#fff'};
256
- font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
257
- font-family: ${FontStyles.DEFAULT};
258
- font-weight: 500;
259
- line-height: 1;
260
- `;
261
- const StyledIcon$5 = styled.span `
262
- margin-left: ${props => (props.$hasChildren ? '6px' : '0px')};
263
- margin-right: ${props => (props.$hasChildren ? '-4px' : '0px')};
264
- display: flex;
265
- align-items: center;
266
- box-sizing: border-box;
267
- `;
268
- const Badge$1 = styled.span `
269
- width: ${props => (props.$small ? '20px' : '24px')};
270
- height: ${props => (props.$small ? '20px' : '24px')};
271
- line-height: 1;
272
- display: flex;
273
- align-items: center;
274
- justify-content: center;
275
- border-radius: 100%;
276
- background-color: ${props => props.$bg_color || '#fff'};
277
- color: ${props => props.$content_color || props.theme.PRIMARY_COLOR.Hex};
278
- font-size: ${props => (props.$small ? '10px' : '12px')};
279
- font-weight: 600;
280
- font-family: ${FontStyles.DEFAULT};
281
- letter-spacing: -1px;
282
- margin-left: ${props => (props.$small ? '5px' : '10px')};
283
- margin-right: ${props => (props.$small ? '-5px' : '-10px')};
217
+ }};
218
+ cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
219
+ display: flex;
220
+ align-items: center;
221
+ justify-content: center;
222
+ gap: ${props => (props.$iconPosition === 'before' ? '8px' : '0px')};
223
+ flex-direction: ${props => (props.$iconPosition === 'before' ? 'row-reverse' : 'row')};
224
+ opacity: ${props => (props.$disabled ? 0.6 : 0.9)};
225
+ border-width: 1px;
226
+ border-style: solid;
227
+ border-color: ${props => props.$border_color || props.theme.PRIMARY_COLOR.Hex};
228
+ box-sizing: border-box;
229
+
230
+ &:active,
231
+ &:focus,
232
+ &:hover {
233
+ opacity: ${props => (props.$disabled ? 0.6 : 1)};
234
+ }
235
+ `;
236
+ const Label$5 = styled.span `
237
+ color: ${props => props.$content_color || '#fff'};
238
+ font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
239
+ font-family: ${FontStyles.DEFAULT};
240
+ font-weight: 500;
241
+ line-height: 1;
242
+ `;
243
+ const StyledIcon$5 = styled.span `
244
+ margin-left: ${props => (props.$hasChildren ? '6px' : '0px')};
245
+ margin-right: ${props => (props.$hasChildren ? '-4px' : '0px')};
246
+ display: flex;
247
+ align-items: center;
248
+ box-sizing: border-box;
249
+ `;
250
+ const Badge$1 = styled.span `
251
+ width: ${props => (props.$small ? '20px' : '24px')};
252
+ height: ${props => (props.$small ? '20px' : '24px')};
253
+ line-height: 1;
254
+ display: flex;
255
+ align-items: center;
256
+ justify-content: center;
257
+ border-radius: 100%;
258
+ background-color: ${props => props.$bg_color || '#fff'};
259
+ color: ${props => props.$content_color || props.theme.PRIMARY_COLOR.Hex};
260
+ font-size: ${props => (props.$small ? '10px' : '12px')};
261
+ font-weight: 600;
262
+ font-family: ${FontStyles.DEFAULT};
263
+ letter-spacing: -1px;
264
+ margin-left: ${props => (props.$small ? '5px' : '10px')};
265
+ margin-right: ${props => (props.$small ? '-5px' : '-10px')};
284
266
  `;
285
267
  const Button = (_a) => {
286
- var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary', iconPosition = 'after', toolTip, title = '' } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format", "iconPosition", "toolTip", "title"]);
268
+ var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary', iconPosition = 'after', toolTip, title = '', id } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format", "iconPosition", "toolTip", "title", "id"]);
287
269
  const theme = useContext(ThemeContext) || EditableTheme;
288
270
  const has_children = children && children.length > 0;
289
271
  const button_type_mapping = {
@@ -317,130 +299,130 @@ const Button = (_a) => {
317
299
  },
318
300
  };
319
301
  const format_styles = button_type_mapping[format];
320
- const id = generateUniqueId('button');
321
- const button_view = (React.createElement(StyledButton, Object.assign({ "$bg_color": format_styles.background_color, "$border_color": format_styles.border_color, "$disabled": disabled || loading, "$hasChildren": !!has_children, "$iconPosition": iconPosition, "$margin": margin, "$small": small, disabled: disabled || loading, onClick: disabled || loading ? undefined : onClick, title: title, type: isForm ? 'submit' : undefined }, accessibleProps, { id: `${id}-styled-button` }),
322
- children ? (React.createElement(Label$5, { "$content_color": format_styles.content_color, "$small": small, id: `${id}-label` }, children)) : null,
323
- icon && !badge ? (React.createElement(StyledIcon$5, { "$hasChildren": !!has_children, id: `${id}-icon` },
324
- React.createElement(Icon, { color: format ? format_styles === null || format_styles === void 0 ? void 0 : format_styles.content_color : '#fff', id: `${id}-icon-svg`, path: loading ? mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
325
- badge && !icon ? (React.createElement(Badge$1, { "$bg_color": format_styles.badge_bg_color, "$content_color": format_styles.badge_content_color, "$small": small, id: `${id}-badge` }, badge)) : null));
302
+ const baseId = id || 'button';
303
+ const button_view = (React.createElement(StyledButton, Object.assign({ "$bg_color": format_styles.background_color, "$border_color": format_styles.border_color, "$disabled": disabled || loading, "$hasChildren": !!has_children, "$iconPosition": iconPosition, "$margin": margin, "$small": small, disabled: disabled || loading, onClick: disabled || loading ? undefined : onClick, title: title, type: isForm ? 'submit' : undefined }, accessibleProps, { id: `${baseId}-styled-button` }),
304
+ children ? (React.createElement(Label$5, { "$content_color": format_styles.content_color, "$small": small, id: `${baseId}-label` }, children)) : null,
305
+ icon && !badge ? (React.createElement(StyledIcon$5, { "$hasChildren": !!has_children, id: `${baseId}-icon` },
306
+ React.createElement(Icon, { color: format ? format_styles === null || format_styles === void 0 ? void 0 : format_styles.content_color : '#fff', id: `${baseId}-icon-svg`, path: loading ? mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
307
+ badge && !icon ? (React.createElement(Badge$1, { "$bg_color": format_styles.badge_bg_color, "$content_color": format_styles.badge_content_color, "$small": small, id: `${baseId}-badge` }, badge)) : null));
326
308
  if (toolTip && Object.keys(toolTip).length) {
327
309
  return (React.createElement(Tooltip, Object.assign({}, toolTip, { trigger: (toolTip === null || toolTip === void 0 ? void 0 : toolTip.trigger) || button_view }), toolTip === null || toolTip === void 0 ? void 0 : toolTip.children));
328
310
  }
329
311
  return button_view;
330
- };
331
-
332
- const H1 = styled.h1 `
333
- color: ${Colors.BLACK.Hex};
334
- font-size: 30px;
335
- font-weight: ${props => (props.$bold ? '500' : '400')};
336
- line-height: 1.4em;
337
- font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
338
- margin: ${props => props.$margin || '0px'};
339
- padding: ${props => props.$padding || '0px'};
340
- box-sizing: border-box;
341
- `;
342
- const H2 = styled.h2 `
343
- color: ${Colors.BLACK.Hex};
344
- font-size: 24px;
345
- font-weight: ${props => (props.$bold ? '500' : '400')};
346
- line-height: 1.33em;
347
- font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
348
- margin: ${props => props.$margin || '0px'};
349
- padding: ${props => props.$padding || '0px'};
350
- box-sizing: border-box;
351
- `;
352
- const H3 = styled.h3 `
353
- color: ${Colors.BLACK.Hex};
354
- font-size: 18px;
355
- font-weight: ${props => (props.$bold ? '500' : '400')};
356
- line-height: 1.33em;
357
- font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
358
- margin: ${props => props.$margin || '0px'};
359
- padding: ${props => props.$padding || '0px'};
360
- box-sizing: border-box;
312
+ };
313
+
314
+ const H1 = styled.h1 `
315
+ color: ${Colors.BLACK.Hex};
316
+ font-size: 30px;
317
+ font-weight: ${props => (props.$bold ? '500' : '400')};
318
+ line-height: 1.4em;
319
+ font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
320
+ margin: ${props => props.$margin || '0px'};
321
+ padding: ${props => props.$padding || '0px'};
322
+ box-sizing: border-box;
323
+ `;
324
+ const H2 = styled.h2 `
325
+ color: ${Colors.BLACK.Hex};
326
+ font-size: 24px;
327
+ font-weight: ${props => (props.$bold ? '500' : '400')};
328
+ line-height: 1.33em;
329
+ font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
330
+ margin: ${props => props.$margin || '0px'};
331
+ padding: ${props => props.$padding || '0px'};
332
+ box-sizing: border-box;
333
+ `;
334
+ const H3 = styled.h3 `
335
+ color: ${Colors.BLACK.Hex};
336
+ font-size: 18px;
337
+ font-weight: ${props => (props.$bold ? '500' : '400')};
338
+ line-height: 1.33em;
339
+ font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
340
+ margin: ${props => props.$margin || '0px'};
341
+ padding: ${props => props.$padding || '0px'};
342
+ box-sizing: border-box;
361
343
  `;
362
344
  const Heading = (_a) => {
363
- var { bold, children, margin, padding, type } = _a, accessibleProps = __rest(_a, ["bold", "children", "margin", "padding", "type"]);
364
- const id = generateUniqueId('heading');
345
+ var { bold, children, margin, padding, type, id } = _a, accessibleProps = __rest(_a, ["bold", "children", "margin", "padding", "type", "id"]);
346
+ const baseId = id || 'heading';
365
347
  switch (type) {
366
348
  case 'secondary': {
367
- return (React.createElement(H2, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { id: `${id}-h2` }), children));
349
+ return (React.createElement(H2, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { id: `${baseId}-h2` }), children));
368
350
  }
369
351
  case 'tertiary': {
370
- return (React.createElement(H3, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { id: `${id}-h3` }), children));
352
+ return (React.createElement(H3, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { id: `${baseId}-h3` }), children));
371
353
  }
372
354
  default: {
373
- return (React.createElement(H1, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { id: `${id}-h1` }), children));
355
+ return (React.createElement(H1, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { id: `${baseId}-h1` }), children));
374
356
  }
375
357
  }
376
358
  };
377
359
  Heading.defaultProps = {
378
360
  bold: false,
379
361
  type: 'primary',
380
- };
381
-
382
- const Wrapper$g = styled.div `
383
- position: fixed;
384
- top: 0;
385
- right: 0;
386
- bottom: 0;
387
- left: 0;
388
- z-index: 9999;
389
- background: rgba(0, 0, 0, 0.8);
390
- display: flex;
391
- align-items: center;
392
- justify-content: center;
393
- box-sizing: border-box;
362
+ };
363
+
364
+ const Wrapper$g = styled.div `
365
+ position: fixed;
366
+ top: 0;
367
+ right: 0;
368
+ bottom: 0;
369
+ left: 0;
370
+ z-index: 9999;
371
+ background: rgba(0, 0, 0, 0.8);
372
+ display: flex;
373
+ align-items: center;
374
+ justify-content: center;
375
+ box-sizing: border-box;
394
376
  `;
395
377
  const Container$4 = styled.dialog(props => (Object.assign({ maxWidth: '600px', width: 'auto', borderRadius: '8px', overflow: 'hidden', boxShadow: '0px 10px 30px -15px rgba(0, 0, 0, 0.2)', outline: 'none', border: 'none', position: 'relative', padding: '40px', textAlign: 'center', boxSizing: 'border-box', wordWrap: 'break-word' }, props.$customStyle)));
396
- const Buttons$1 = styled.div `
397
- display: flex;
398
- gap: 10px;
399
- align-items: center;
400
- justify-content: center;
401
- margin-top: 30px;
402
- box-sizing: border-box;
378
+ const Buttons$1 = styled.div `
379
+ display: flex;
380
+ gap: 10px;
381
+ align-items: center;
382
+ justify-content: center;
383
+ margin-top: 30px;
384
+ box-sizing: border-box;
403
385
  `;
404
386
  const ActionDialog = (_a) => {
405
- var { description, title, primaryButton, secondaryButton, tertiaryButton, style = {} } = _a, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton", "style"]);
406
- const id = generateUniqueId('action-dialog');
407
- return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps, { id: `${id}-wrapper` }),
408
- React.createElement(Container$4, { "$customStyle": style, id: `${id}-container`, open: true },
409
- title ? (React.createElement(Heading, { id: `${id}-title`, margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
410
- description ? (React.createElement(Copy, { align: 'center', id: `${id}-description` }, description)) : null,
411
- primaryButton || secondaryButton || tertiaryButton ? (React.createElement(Buttons$1, { id: `${id}-buttons` },
412
- tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary', id: `${id}-tertiary-button` }))) : null,
413
- secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary', id: `${id}-secondary-button` }))) : null,
414
- primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary', id: `${id}-primary-button` }))) : null)) : null)));
415
- };
416
-
417
- const Wrapper$f = styled.div `
418
- border: 1px solid #f1f1f1;
419
- border-radius: 4px;
420
- border-left-width: 4px;
421
- box-shadow: 0px 4px 12px -6px rgba(0, 0, 0, 0.2);
422
- display: flex;
423
- align-items: flex-start;
424
- gap: ${({ $small }) => ($small ? '8px' : '20px')};
425
- padding: ${({ $small }) => ($small ? '11px' : '20px')};
426
- box-sizing: border-box;
427
- `;
428
- const StyledIcon$4 = styled(Icon) `
429
- flex-shrink: 0;
430
- `;
431
- const Action$1 = styled.div `
432
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
433
- font-size: ${FontSizes.DEFAULT};
434
- font-family: ${FontStyles.DEFAULT};
435
- font-weight: 500;
436
- cursor: pointer;
437
- margin-top: 6px;
387
+ var { description, title, primaryButton, secondaryButton, tertiaryButton, style = {}, id } = _a, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton", "style", "id"]);
388
+ const baseId = id || 'action-dialog';
389
+ return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps, { id: `${baseId}-wrapper` }),
390
+ React.createElement(Container$4, { "$customStyle": style, id: `${baseId}-container`, open: true },
391
+ title ? (React.createElement(Heading, { id: `${baseId}-title`, margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
392
+ description ? (React.createElement(Copy, { align: 'center', id: `${baseId}-description` }, description)) : null,
393
+ primaryButton || secondaryButton || tertiaryButton ? (React.createElement(Buttons$1, { id: `${baseId}-buttons` },
394
+ tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary', id: `${baseId}-tertiary-button` }))) : null,
395
+ secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary', id: `${baseId}-secondary-button` }))) : null,
396
+ primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary', id: `${baseId}-primary-button` }))) : null)) : null)));
397
+ };
398
+
399
+ const Wrapper$f = styled.div `
400
+ border: 1px solid #f1f1f1;
401
+ border-radius: 4px;
402
+ border-left-width: 4px;
403
+ box-shadow: 0px 4px 12px -6px rgba(0, 0, 0, 0.2);
404
+ display: flex;
405
+ align-items: flex-start;
406
+ gap: ${({ $small }) => ($small ? '8px' : '20px')};
407
+ padding: ${({ $small }) => ($small ? '11px' : '20px')};
408
+ box-sizing: border-box;
409
+ `;
410
+ const StyledIcon$4 = styled(Icon) `
411
+ flex-shrink: 0;
412
+ `;
413
+ const Action$1 = styled.div `
414
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
415
+ font-size: ${FontSizes.DEFAULT};
416
+ font-family: ${FontStyles.DEFAULT};
417
+ font-weight: 500;
418
+ cursor: pointer;
419
+ margin-top: 6px;
438
420
  `;
439
421
  Action$1.defaultProps = { theme: EditableTheme };
440
422
  const Alert = (_a) => {
441
- var { action, type = 'info', title, description, small = false } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description", "small"]);
423
+ var { action, type = 'info', title, description, small = false, id } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description", "small", "id"]);
442
424
  const theme = useContext(ThemeContext) || EditableTheme;
443
- const id = generateUniqueId('alert');
425
+ const baseId = id || 'alert';
444
426
  const type_mapping = {
445
427
  info: {
446
428
  color: theme.PRIMARY_COLOR.Hex,
@@ -459,14 +441,14 @@ const Alert = (_a) => {
459
441
  icon: mdiCheckboxMarkedCircleOutline,
460
442
  },
461
443
  };
462
- return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps, { "$small": small, id: `${id}-wrapper`, style: { borderLeftColor: type_mapping[type].color } }),
463
- React.createElement(StyledIcon$4, { color: type_mapping[type].color, id: `${id}-icon`, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
464
- React.createElement("div", { id: `${id}-content` },
465
- title && !small ? (React.createElement(Heading, { bold: true, id: `${id}-title`, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
466
- description ? (React.createElement(Copy, { id: `${id}-description`, margin: small ? '' : '6px 0 0 0 !important' }, description)) : null,
467
- action && !small ? (React.createElement(Action$1, { id: `${id}-action`, onClick: action.onClick }, action.label)) : null)));
468
- };
469
-
444
+ return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps, { "$small": small, id: `${baseId}-wrapper`, style: { borderLeftColor: type_mapping[type].color } }),
445
+ React.createElement(StyledIcon$4, { color: type_mapping[type].color, id: `${baseId}-icon`, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
446
+ React.createElement("div", { id: `${baseId}-content` },
447
+ title && !small ? (React.createElement(Heading, { bold: true, id: `${baseId}-title`, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
448
+ description ? (React.createElement(Copy, { id: `${baseId}-description`, margin: small ? '' : '6px 0 0 0 !important' }, description)) : null,
449
+ action && !small ? (React.createElement(Action$1, { id: `${baseId}-action`, onClick: action.onClick }, action.label)) : null)));
450
+ };
451
+
470
452
  const colorMapping = {
471
453
  black: {
472
454
  fill_1: '#000000',
@@ -490,364 +472,364 @@ const colorMapping = {
490
472
  },
491
473
  };
492
474
  const Logo = (_a) => {
493
- var { type = 'standard_full', height = '50px' } = _a, accessibleProps = __rest(_a, ["type", "height"]);
475
+ var { type = 'standard_full', height = '50px', id } = _a, accessibleProps = __rest(_a, ["type", "height", "id"]);
494
476
  const type_parts = type.split('_');
495
- const id = generateUniqueId('logo');
477
+ const baseId = id || 'logo';
496
478
  switch (type_parts[0]) {
497
479
  case 'mark':
498
- return (React.createElement("svg", Object.assign({ fill: 'none', height: height, viewBox: '0 0 58 51', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps, { id: `${id}-svg` }),
499
- React.createElement("path", { d: 'M43.9348 -1.14441e-05H13.3724L0 25.2376L7.27148 38.0136L14.1215 50.0487H43.1856L57.3077 25.2376L43.9348 -1.14441e-05ZM38.206 9.49903L46.459 25.0743L37.6507 40.5497H19.6567L15.5417 33.3199L10.8487 25.0743L19.1013 9.49903H38.206Z', fill: type_parts[1], id: `${id}-path` })));
480
+ return (React.createElement("svg", Object.assign({ fill: 'none', height: height, viewBox: '0 0 58 51', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps, { id: `${baseId}-svg` }),
481
+ React.createElement("path", { d: 'M43.9348 -1.14441e-05H13.3724L0 25.2376L7.27148 38.0136L14.1215 50.0487H43.1856L57.3077 25.2376L43.9348 -1.14441e-05ZM38.206 9.49903L46.459 25.0743L37.6507 40.5497H19.6567L15.5417 33.3199L10.8487 25.0743L19.1013 9.49903H38.206Z', fill: type_parts[1], id: `${baseId}-path` })));
500
482
  default:
501
- return (React.createElement("svg", Object.assign({ fill: 'none', height: height, preserveAspectRatio: 'xMidYMid meet', viewBox: '0 0 236 50', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps, { id: `${id}-svg` }),
502
- React.createElement("path", { d: 'M230.794 29.59H219.306L214.279 39.0907L217.012 43.9001L219.587 48.4308H230.512L235.821 39.0907L230.794 29.59V29.59ZM228.641 33.1659L231.743 39.0292L228.432 44.8549H221.668L220.121 42.1332L218.356 39.0292L221.459 33.1659H228.641Z', fill: colorMapping[type_parts[1]].fill_3, id: `${id}-path-1` }),
503
- React.createElement("path", { d: 'M211.662 42.6033L199.206 42.6319C196.339 42.6319 193.862 41.6095 191.846 39.5923C189.828 37.5755 188.805 35.0985 188.805 32.2321C188.805 29.3656 189.828 26.8886 191.846 24.8718C193.848 22.8332 196.325 21.7975 199.206 21.7975C202.072 21.7975 204.549 22.8199 206.566 24.8374C207.613 25.8847 208.391 27.093 208.944 28.5312L209.253 29.3327H197.87L196.325 32.2579L197.921 35.0969H211.458L215.015 28.6192C214.296 25.5702 212.835 22.9293 210.672 20.7657C207.531 17.6257 203.674 16.0333 199.206 16.0333C194.737 16.0333 190.88 17.6257 187.739 20.7657C184.555 23.9501 183.007 27.7011 183.007 32.2321C183.007 36.7001 184.599 40.5577 187.739 43.6981C190.88 46.8384 194.737 48.4308 199.206 48.4308H210.095L214.745 48.3297L211.662 42.6033', fill: colorMapping[type_parts[1]].fill_1, id: `${id}-path-2` }),
504
- React.createElement("path", { d: 'M160.945 19.133L158.826 20.8384C155.734 23.9359 154.141 27.8058 154.141 32.2967L154.141 47.7903L156.985 49.407L159.939 47.8778L159.94 32.2967C159.94 29.6632 160.778 27.3706 162.432 25.4846C162.615 25.2739 162.811 25.0666 163.018 24.8639C163.074 24.8155 164.138 24.0061 164.811 23.5592C166.321 22.5576 168.076 21.9876 170.024 21.8632L170.166 21.8621C172.923 21.8621 175.32 22.7325 177.301 24.4494L180.146 23.0088L180.246 19.3426C177.44 17.1664 174.132 16.0633 170.408 16.0633C166.909 16.0633 163.725 17.0962 160.945 19.133', fill: colorMapping[type_parts[1]].fill_1, id: `${id}-path-3` }),
505
- React.createElement("path", { d: 'M131.392 50C135.884 50 139.753 48.4076 142.893 45.2676C146.033 42.1269 147.626 38.2581 147.626 33.7668V18.1124L144.782 16.4964L141.827 18.0251V33.7668C141.827 36.6932 140.792 39.1936 138.745 41.2034C136.684 43.1927 134.128 44.2013 131.151 44.2013L131.01 44.2002H131.81L131.669 44.2013C128.692 44.2013 126.136 43.1927 124.074 41.2034C122.028 39.1936 120.993 36.6932 120.993 33.7668V18.0251L118.038 16.4964L115.194 18.1124V33.7668C115.194 38.2581 116.786 42.1269 119.926 45.2676C123.067 48.4076 126.936 50 131.427 50H131.392Z', fill: colorMapping[type_parts[1]].fill_1, id: `${id}-path-4` }),
506
- React.createElement("path", { d: 'M93.8353 26.9933L97.8468 31.2421L100.788 28.1521L107.791 20.4534L106.753 17.3567L103.584 16.5678', fill: colorMapping[type_parts[1]].fill_2, id: `${id}-path-5` }),
507
- React.createElement("path", { d: 'M80.7509 16.5677L77.5821 17.3564L76.5441 20.4534L83.5514 28.1568L88.1484 32.9862L76.5412 45.2133L77.5187 48.3175C79.525 48.9571 80.359 49.1805 80.6985 49.2584L92.195 37.238L103.636 49.2584C103.976 49.1805 104.81 48.9571 106.817 48.3175L107.794 45.2133L80.7509 16.5677', fill: colorMapping[type_parts[1]].fill_1, id: `${id}-path-6` }),
508
- React.createElement("path", { d: 'M67.8498 45.479C67.5109 44.893 66.7322 43.5486 66.2043 42.6319H55.1965C52.3299 42.6319 49.8532 41.6095 47.8364 39.5923C45.819 37.5755 44.7966 35.0985 44.7966 32.2321C44.7966 29.3656 45.819 26.8886 47.8364 24.8718C49.8388 22.8332 52.316 21.7975 55.1965 21.7975C58.0632 21.7975 60.5398 22.8199 62.5565 24.8374C63.6038 25.8847 64.3824 27.093 64.9357 28.5312L65.2435 29.3327H53.8141C53.231 30.2171 52.5673 31.6476 52.303 32.2354L53.912 35.0969H67.474L71.0059 28.6192C70.2872 25.5702 68.8261 22.9293 66.6625 20.7657C63.5219 17.6257 59.6649 16.0333 55.1965 16.0333C50.7283 16.0333 46.8708 17.6257 43.7303 20.7657C40.546 23.9501 38.9979 27.7011 38.9979 32.2321C38.9979 36.7001 40.5903 40.5577 43.7303 43.6981C46.8708 46.8384 50.7283 48.4308 55.1965 48.4308H66.0873C66.9322 47.0737 67.5668 45.977 67.8498 45.479', fill: colorMapping[type_parts[1]].fill_1, id: `${id}-path-7` }),
509
- React.createElement("path", { d: 'M27.6655 20.7443C26.9235 20.002 26.2307 19.4097 25.608 18.9831C22.7338 17.0113 19.5684 16.0117 16.1992 16.0117C13.6229 16.0117 11.1676 16.5943 8.9002 17.7442C8.1016 18.1264 7.38657 18.6118 6.73074 19.0799L5.88805 19.6819C5.85364 19.711 5.81716 19.7449 5.78223 19.7749L5.77618 17.9067C5.78246 17.9022 5.7892 17.8965 5.79554 17.8921L5.72168 1.52402L2.84058 1.54784e-05L0 1.6145V24.9966V30.8918C0.0184614 30.8508 0.0393993 30.8108 0.0580857 30.7698C0.0216133 31.2417 0 31.7206 0 32.2105V47.6757L2.84688 49.2499C4.7412 48.3293 5.4988 47.9164 5.79866 47.7385V32.2105C5.79866 29.3439 6.82128 26.8672 8.83853 24.8504C10.8415 22.8118 13.319 21.7759 16.1992 21.7759C19.0796 21.7759 21.557 22.8118 23.5635 24.8538C25.3441 26.6351 26.3374 28.7976 26.5963 31.4625C26.6263 31.6669 26.6339 40.3058 26.6339 47.6694C27.2825 48.0147 28.6127 48.8167 29.5141 49.3059C29.9448 49.0814 32.0589 47.8425 32.3979 47.6669V32.2105C32.3979 27.6795 30.8499 23.9285 27.6655 20.7443Z', fill: colorMapping[type_parts[1]].fill_1, id: `${id}-path-8` })));
483
+ return (React.createElement("svg", Object.assign({ fill: 'none', height: height, preserveAspectRatio: 'xMidYMid meet', viewBox: '0 0 236 50', width: '100%', xmlns: 'http://www.w3.org/2000/svg' }, accessibleProps, { id: `${baseId}-svg` }),
484
+ React.createElement("path", { d: 'M230.794 29.59H219.306L214.279 39.0907L217.012 43.9001L219.587 48.4308H230.512L235.821 39.0907L230.794 29.59V29.59ZM228.641 33.1659L231.743 39.0292L228.432 44.8549H221.668L220.121 42.1332L218.356 39.0292L221.459 33.1659H228.641Z', fill: colorMapping[type_parts[1]].fill_3, id: `${baseId}-path-1` }),
485
+ React.createElement("path", { d: 'M211.662 42.6033L199.206 42.6319C196.339 42.6319 193.862 41.6095 191.846 39.5923C189.828 37.5755 188.805 35.0985 188.805 32.2321C188.805 29.3656 189.828 26.8886 191.846 24.8718C193.848 22.8332 196.325 21.7975 199.206 21.7975C202.072 21.7975 204.549 22.8199 206.566 24.8374C207.613 25.8847 208.391 27.093 208.944 28.5312L209.253 29.3327H197.87L196.325 32.2579L197.921 35.0969H211.458L215.015 28.6192C214.296 25.5702 212.835 22.9293 210.672 20.7657C207.531 17.6257 203.674 16.0333 199.206 16.0333C194.737 16.0333 190.88 17.6257 187.739 20.7657C184.555 23.9501 183.007 27.7011 183.007 32.2321C183.007 36.7001 184.599 40.5577 187.739 43.6981C190.88 46.8384 194.737 48.4308 199.206 48.4308H210.095L214.745 48.3297L211.662 42.6033', fill: colorMapping[type_parts[1]].fill_1, id: `${baseId}-path-2` }),
486
+ React.createElement("path", { d: 'M160.945 19.133L158.826 20.8384C155.734 23.9359 154.141 27.8058 154.141 32.2967L154.141 47.7903L156.985 49.407L159.939 47.8778L159.94 32.2967C159.94 29.6632 160.778 27.3706 162.432 25.4846C162.615 25.2739 162.811 25.0666 163.018 24.8639C163.074 24.8155 164.138 24.0061 164.811 23.5592C166.321 22.5576 168.076 21.9876 170.024 21.8632L170.166 21.8621C172.923 21.8621 175.32 22.7325 177.301 24.4494L180.146 23.0088L180.246 19.3426C177.44 17.1664 174.132 16.0633 170.408 16.0633C166.909 16.0633 163.725 17.0962 160.945 19.133', fill: colorMapping[type_parts[1]].fill_1, id: `${baseId}-path-3` }),
487
+ React.createElement("path", { d: 'M131.392 50C135.884 50 139.753 48.4076 142.893 45.2676C146.033 42.1269 147.626 38.2581 147.626 33.7668V18.1124L144.782 16.4964L141.827 18.0251V33.7668C141.827 36.6932 140.792 39.1936 138.745 41.2034C136.684 43.1927 134.128 44.2013 131.151 44.2013L131.01 44.2002H131.81L131.669 44.2013C128.692 44.2013 126.136 43.1927 124.074 41.2034C122.028 39.1936 120.993 36.6932 120.993 33.7668V18.0251L118.038 16.4964L115.194 18.1124V33.7668C115.194 38.2581 116.786 42.1269 119.926 45.2676C123.067 48.4076 126.936 50 131.427 50H131.392Z', fill: colorMapping[type_parts[1]].fill_1, id: `${baseId}-path-4` }),
488
+ React.createElement("path", { d: 'M93.8353 26.9933L97.8468 31.2421L100.788 28.1521L107.791 20.4534L106.753 17.3567L103.584 16.5678', fill: colorMapping[type_parts[1]].fill_2, id: `${baseId}-path-5` }),
489
+ React.createElement("path", { d: 'M80.7509 16.5677L77.5821 17.3564L76.5441 20.4534L83.5514 28.1568L88.1484 32.9862L76.5412 45.2133L77.5187 48.3175C79.525 48.9571 80.359 49.1805 80.6985 49.2584L92.195 37.238L103.636 49.2584C103.976 49.1805 104.81 48.9571 106.817 48.3175L107.794 45.2133L80.7509 16.5677', fill: colorMapping[type_parts[1]].fill_1, id: `${baseId}-path-6` }),
490
+ React.createElement("path", { d: 'M67.8498 45.479C67.5109 44.893 66.7322 43.5486 66.2043 42.6319H55.1965C52.3299 42.6319 49.8532 41.6095 47.8364 39.5923C45.819 37.5755 44.7966 35.0985 44.7966 32.2321C44.7966 29.3656 45.819 26.8886 47.8364 24.8718C49.8388 22.8332 52.316 21.7975 55.1965 21.7975C58.0632 21.7975 60.5398 22.8199 62.5565 24.8374C63.6038 25.8847 64.3824 27.093 64.9357 28.5312L65.2435 29.3327H53.8141C53.231 30.2171 52.5673 31.6476 52.303 32.2354L53.912 35.0969H67.474L71.0059 28.6192C70.2872 25.5702 68.8261 22.9293 66.6625 20.7657C63.5219 17.6257 59.6649 16.0333 55.1965 16.0333C50.7283 16.0333 46.8708 17.6257 43.7303 20.7657C40.546 23.9501 38.9979 27.7011 38.9979 32.2321C38.9979 36.7001 40.5903 40.5577 43.7303 43.6981C46.8708 46.8384 50.7283 48.4308 55.1965 48.4308H66.0873C66.9322 47.0737 67.5668 45.977 67.8498 45.479', fill: colorMapping[type_parts[1]].fill_1, id: `${baseId}-path-7` }),
491
+ React.createElement("path", { d: 'M27.6655 20.7443C26.9235 20.002 26.2307 19.4097 25.608 18.9831C22.7338 17.0113 19.5684 16.0117 16.1992 16.0117C13.6229 16.0117 11.1676 16.5943 8.9002 17.7442C8.1016 18.1264 7.38657 18.6118 6.73074 19.0799L5.88805 19.6819C5.85364 19.711 5.81716 19.7449 5.78223 19.7749L5.77618 17.9067C5.78246 17.9022 5.7892 17.8965 5.79554 17.8921L5.72168 1.52402L2.84058 1.54784e-05L0 1.6145V24.9966V30.8918C0.0184614 30.8508 0.0393993 30.8108 0.0580857 30.7698C0.0216133 31.2417 0 31.7206 0 32.2105V47.6757L2.84688 49.2499C4.7412 48.3293 5.4988 47.9164 5.79866 47.7385V32.2105C5.79866 29.3439 6.82128 26.8672 8.83853 24.8504C10.8415 22.8118 13.319 21.7759 16.1992 21.7759C19.0796 21.7759 21.557 22.8118 23.5635 24.8538C25.3441 26.6351 26.3374 28.7976 26.5963 31.4625C26.6263 31.6669 26.6339 40.3058 26.6339 47.6694C27.2825 48.0147 28.6127 48.8167 29.5141 49.3059C29.9448 49.0814 32.0589 47.8425 32.3979 47.6669V32.2105C32.3979 27.6795 30.8499 23.9285 27.6655 20.7443Z', fill: colorMapping[type_parts[1]].fill_1, id: `${baseId}-path-8` })));
510
492
  }
511
- };
512
-
513
- const Container$3 = styled.header `
514
- width: 100%;
515
- display: flex;
516
- padding: 20px;
517
- box-sizing: border-box;
518
- border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
519
- background: '#fff';
520
- justify-content: space-between;
521
- `;
522
- const LogoWrapper = styled.div `
523
- display: flex;
524
- align-items: center;
525
- `;
526
- const Image = styled.img `
527
- height: 30px !important;
528
- width: auto !important;
529
- `;
530
- const Buttons = styled.div `
531
- display: flex;
532
- flex-direction: row;
533
- column-gap: 10px;
534
- flex-direction: reverse;
535
- `;
536
- const AppHeader = ({ logoUrl, buttons = [] }) => {
537
- const id = generateUniqueId('app-header');
538
- return (React.createElement(Container$3, { id: `${id}-container` },
539
- React.createElement(LogoWrapper, { id: `${id}-logo-wrapper` }, logoUrl ? (React.createElement(Image, { id: `${id}-logo`, src: logoUrl })) : (React.createElement(Logo, { height: '30px', id: `${id}-default-logo` }))),
540
- React.createElement(Buttons, { id: `${id}-buttons` }, buttons.map((b, i) => (React.createElement(Button, Object.assign({ key: i }, b, { id: `${id}-button-${i}` })))))));
541
- };
542
-
543
- const Wrapper$e = styled.div `
544
- display: inline-block;
545
- border-radius: 4px;
546
- padding: 4px 6px;
547
- background: ${props => Colors[props.$color].Hex};
548
- color: #ffffff;
549
- box-sizing: border-box;
550
- cursor: ${props => (props.$removable ? 'pointer' : 'default')};
551
- `;
552
- const Content$2 = styled.div `
553
- display: flex;
554
- align-items: center;
555
- `;
556
- const Label$4 = styled.div `
557
- color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
558
- font-size: ${FontSizes.SMALL};
559
- font-weight: 500;
560
- font-family: ${FontStyles.DEFAULT};
561
- line-height: 1.2em;
562
- `;
563
- const Remove$1 = styled.div `
564
- margin-left: 10px;
565
- display: flex;
566
- align-items: center;
493
+ };
494
+
495
+ const Container$3 = styled.header `
496
+ width: 100%;
497
+ display: flex;
498
+ padding: 20px;
499
+ box-sizing: border-box;
500
+ border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
501
+ background: '#fff';
502
+ justify-content: space-between;
503
+ `;
504
+ const LogoWrapper = styled.div `
505
+ display: flex;
506
+ align-items: center;
507
+ `;
508
+ const Image = styled.img `
509
+ height: 30px !important;
510
+ width: auto !important;
511
+ `;
512
+ const Buttons = styled.div `
513
+ display: flex;
514
+ flex-direction: row;
515
+ column-gap: 10px;
516
+ flex-direction: reverse;
517
+ `;
518
+ const AppHeader = ({ logoUrl, buttons = [], id }) => {
519
+ const baseId = id || 'app-header';
520
+ return (React.createElement(Container$3, { id: `${baseId}-container` },
521
+ React.createElement(LogoWrapper, { id: `${baseId}-logo-wrapper` }, logoUrl ? (React.createElement(Image, { id: `${baseId}-logo`, src: logoUrl })) : (React.createElement(Logo, { height: '30px', id: `${baseId}-default-logo` }))),
522
+ React.createElement(Buttons, { id: `${baseId}-buttons` }, buttons.map((b, i) => (React.createElement(Button, Object.assign({ key: i }, b, { id: `${baseId}-button-${i}` })))))));
523
+ };
524
+
525
+ const Wrapper$e = styled.div `
526
+ display: inline-block;
527
+ border-radius: 4px;
528
+ padding: 4px 6px;
529
+ background: ${props => Colors[props.$color].Hex};
530
+ color: #ffffff;
531
+ box-sizing: border-box;
532
+ cursor: ${props => (props.$removable ? 'pointer' : 'default')};
533
+ `;
534
+ const Content$2 = styled.div `
535
+ display: flex;
536
+ align-items: center;
537
+ `;
538
+ const Label$4 = styled.div `
539
+ color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
540
+ font-size: ${FontSizes.SMALL};
541
+ font-weight: 500;
542
+ font-family: ${FontStyles.DEFAULT};
543
+ line-height: 1.2em;
544
+ `;
545
+ const Remove$1 = styled.div `
546
+ margin-left: 10px;
547
+ display: flex;
548
+ align-items: center;
567
549
  `;
568
550
  const Tag = (_a) => {
569
- var { children, color = 'PRIMARY', removable, onClick } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
570
- const id = generateUniqueId('tag');
571
- return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps, { id: `${id}-wrapper` }),
572
- React.createElement(Content$2, { id: `${id}-content` },
573
- React.createElement(Label$4, { "$color": color, id: `${id}-label` }, children),
574
- removable ? (React.createElement(Remove$1, { id: `${id}-remove` },
575
- React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', id: `${id}-icon`, path: mdiClose, size: '15px' }))) : null)));
576
- };
577
-
578
- const SidebarContainer = styled.div `
579
- border-right: 1px solid ${Colors.LIGHT_GRAY.Hex};
580
- display: flex;
581
- flex-direction: column;
582
- height: 100%;
583
- padding: 12px 0px;
584
- width: ${props => (props.$isOpen ? props.$width : '60px')};
585
- `;
586
- const MenuWrapper$1 = styled.button `
587
- display: flex;
588
- align-items: center;
589
- border: 0px;
590
- background-color: transparent;
591
- padding-left: 0px;
592
- border-left-width: 4px;
593
- border-left-style: solid;
594
- border-left-color: ${props => (props.$active ? props.$color.Hex : 'transparent')};
595
- cursor: pointer;
596
- height: 40px;
597
-
598
- &:hover > div {
599
- color: ${props => props.$color.Hex};
600
- }
601
-
602
- &:hover > svg > path {
603
- fill: ${Colors.BLACK.Hex} !important;
604
- }
605
- `;
606
- const MenuIcon = styled(Icon) `
607
- width: 20px;
608
- height: 20px;
609
- margin: 0px 16px;
610
- flex-shrink: 0;
611
-
612
- > path {
613
- fill: ${({ $active }) => ($active ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex)} !important;
614
- }
615
- `;
616
- const MenuLabel = styled.div `
617
- color: ${props => (props.$active ? props.$color.Hex : Colors.BLACK.Hex)};
618
- flex: 1;
619
- font-size: 12px;
620
- font-style: normal;
621
- font-weight: 600;
622
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
623
- line-height: 16px;
624
- padding: 12px 0px;
625
- letter-spacing: 1px;
626
- `;
627
- const SubMenu = styled.div `
628
- overflow-y: auto;
629
- padding-left: 44px;
630
- padding-right: 20px;
631
- padding-bottom: 10px;
632
- `;
633
- const SubMenuItem = styled.a `
634
- display: block;
635
- padding: 8px 12px;
636
- border-radius: 8px;
637
- font-size: 13px;
638
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
639
- line-height: 20px;
640
- text-decoration: none;
641
- font-weight: ${({ $active }) => ($active ? '500' : '400')};
642
- color: ${({ $active }) => ($active ? Colors.BLACK.Hex : Colors.GRAY.Hex)};
643
- background: ${props => (props.$active ? `rgba(${props.$color.Rgb}, 0.1)` : '#fff')};
644
- cursor: pointer;
645
-
646
- &:hover {
647
- color: ${props => props.$color.Hex};
648
- font-weight: 500;
649
- }
650
- `;
651
- const Footer = styled.div `
652
- padding: 20px 14px 0px;
653
- display: flex;
654
- align-items: center;
655
- `;
656
- const FooterInfo = styled.div `
657
- display: flex;
658
- flex-direction: column;
659
- flex: 1;
660
- align-items: flex-start;
661
- `;
662
- const SidebarMenuContainer = styled.div `
663
- flex-grow: 1;
664
- `;
665
- const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px' }) => {
551
+ var { children, color = 'PRIMARY', removable, onClick, id } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick", "id"]);
552
+ const baseId = id || 'tag';
553
+ return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps, { id: `${baseId}-wrapper` }),
554
+ React.createElement(Content$2, { id: `${baseId}-content` },
555
+ React.createElement(Label$4, { "$color": color, id: `${baseId}-label` }, children),
556
+ removable ? (React.createElement(Remove$1, { id: `${baseId}-remove` },
557
+ React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', id: `${baseId}-icon`, path: mdiClose, size: '15px' }))) : null)));
558
+ };
559
+
560
+ const SidebarContainer = styled.div `
561
+ border-right: 1px solid ${Colors.LIGHT_GRAY.Hex};
562
+ display: flex;
563
+ flex-direction: column;
564
+ height: 100%;
565
+ padding: 12px 0px;
566
+ width: ${props => (props.$isOpen ? props.$width : '60px')};
567
+ `;
568
+ const MenuWrapper$1 = styled.button `
569
+ display: flex;
570
+ align-items: center;
571
+ border: 0px;
572
+ background-color: transparent;
573
+ padding-left: 0px;
574
+ border-left-width: 4px;
575
+ border-left-style: solid;
576
+ border-left-color: ${props => (props.$active ? props.$color.Hex : 'transparent')};
577
+ cursor: pointer;
578
+ height: 40px;
579
+
580
+ &:hover > div {
581
+ color: ${props => props.$color.Hex};
582
+ }
583
+
584
+ &:hover > svg > path {
585
+ fill: ${Colors.BLACK.Hex} !important;
586
+ }
587
+ `;
588
+ const MenuIcon = styled(Icon) `
589
+ width: 20px;
590
+ height: 20px;
591
+ margin: 0px 16px;
592
+ flex-shrink: 0;
593
+
594
+ > path {
595
+ fill: ${({ $active }) => ($active ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex)} !important;
596
+ }
597
+ `;
598
+ const MenuLabel = styled.div `
599
+ color: ${props => (props.$active ? props.$color.Hex : Colors.BLACK.Hex)};
600
+ flex: 1;
601
+ font-size: 12px;
602
+ font-style: normal;
603
+ font-weight: 600;
604
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
605
+ line-height: 16px;
606
+ padding: 12px 0px;
607
+ letter-spacing: 1px;
608
+ `;
609
+ const SubMenu = styled.div `
610
+ overflow-y: auto;
611
+ padding-left: 44px;
612
+ padding-right: 20px;
613
+ padding-bottom: 10px;
614
+ `;
615
+ const SubMenuItem = styled.a `
616
+ display: block;
617
+ padding: 8px 12px;
618
+ border-radius: 8px;
619
+ font-size: 13px;
620
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
621
+ line-height: 20px;
622
+ text-decoration: none;
623
+ font-weight: ${({ $active }) => ($active ? '500' : '400')};
624
+ color: ${({ $active }) => ($active ? Colors.BLACK.Hex : Colors.GRAY.Hex)};
625
+ background: ${props => (props.$active ? `rgba(${props.$color.Rgb}, 0.1)` : '#fff')};
626
+ cursor: pointer;
627
+
628
+ &:hover {
629
+ color: ${props => props.$color.Hex};
630
+ font-weight: 500;
631
+ }
632
+ `;
633
+ const Footer = styled.div `
634
+ padding: 20px 14px 0px;
635
+ display: flex;
636
+ align-items: center;
637
+ `;
638
+ const FooterInfo = styled.div `
639
+ display: flex;
640
+ flex-direction: column;
641
+ flex: 1;
642
+ align-items: flex-start;
643
+ `;
644
+ const SidebarMenuContainer = styled.div `
645
+ flex-grow: 1;
646
+ `;
647
+ const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px', id, }) => {
666
648
  const theme = useContext(ThemeContext) || EditableTheme;
667
649
  const [collapsed, toggleCollapse] = useState(isCollapsed);
668
- const id = generateUniqueId('app-menu');
669
- return (React.createElement(SidebarContainer, { "$isOpen": !collapsed, "$width": defaultWidth, id: `${id}-sidebar-container` },
670
- React.createElement(SidebarMenuContainer, { id: `${id}-sidebar-menu-container` }, menu.map((nav_item, navIndex) => {
671
- const navItemId = generateUniqueId(`nav-item-${navIndex}`);
650
+ const baseId = id || 'app-menu';
651
+ return (React.createElement(SidebarContainer, { "$isOpen": !collapsed, "$width": defaultWidth, id: `${baseId}-sidebar-container` },
652
+ React.createElement(SidebarMenuContainer, { id: `${baseId}-sidebar-menu-container` }, menu.map((nav_item, navIndex) => {
653
+ const navItemId = `${baseId}-nav-item-${navIndex}`;
672
654
  return (React.createElement(React.Fragment, { key: navItemId },
673
655
  React.createElement(MenuWrapper$1, { "$active": !!nav_item.is_active, "$color": theme.PRIMARY_COLOR, id: `${navItemId}-menu-wrapper`, onClick: nav_item.onClick, title: collapsed ? (nav_item === null || nav_item === void 0 ? void 0 : nav_item.title) || nav_item.label : '' },
674
656
  React.createElement(MenuIcon, { "$active": !!nav_item.is_active, id: `${navItemId}-menu-icon`, path: nav_item.icon }),
675
657
  collapsed ? null : (React.createElement(MenuLabel, { "$active": nav_item.is_active, "$color": theme.PRIMARY_COLOR, id: `${navItemId}-menu-label` }, nav_item.label))),
676
658
  nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, { id: `${navItemId}-sub-menu` }, nav_item.menu.map((menu_item, menuIndex) => {
677
- const menuItemId = generateUniqueId(`menu-item-${menuIndex}`);
659
+ const menuItemId = `${navItemId}-menu-item-${menuIndex}`;
678
660
  return (React.createElement(SubMenuItem, { "$active": menu_item.is_active, "$color": theme.PRIMARY_COLOR, id: `${menuItemId}-sub-menu-item`, key: menuItemId, onClick: menu_item.onClick }, menu_item.label));
679
661
  }))) : null));
680
662
  })),
681
- React.createElement(Footer, { id: `${id}-footer` },
682
- collapsed ? null : (React.createElement(FooterInfo, { id: `${id}-footer-info` },
683
- footerTag ? React.createElement(Tag, { id: `${id}-footer-tag` }, footerTag) : null,
684
- React.createElement(Copy, { id: `${id}-footer-copy`, margin: '8px 0 0 0', type: 'small' },
663
+ React.createElement(Footer, { id: `${baseId}-footer` },
664
+ collapsed ? null : (React.createElement(FooterInfo, { id: `${baseId}-footer-info` },
665
+ footerTag ? React.createElement(Tag, { id: `${baseId}-footer-tag` }, footerTag) : null,
666
+ React.createElement(Copy, { id: `${baseId}-footer-copy`, margin: '8px 0 0 0', type: 'small' },
685
667
  "\u00A9 ",
686
668
  new Date().getFullYear(),
687
669
  " Hexure"))),
688
- React.createElement(Button, { icon: collapsed ? mdiChevronRight : mdiChevronLeft, id: `${id}-collapse-button`, onClick: (e) => {
670
+ React.createElement(Button, { icon: collapsed ? mdiChevronRight : mdiChevronLeft, id: `${baseId}-collapse-button`, onClick: (e) => {
689
671
  e.preventDefault();
690
672
  toggleCollapse(!collapsed);
691
673
  }, small: true }))));
692
- };
693
-
694
- const Wrapper$d = styled.div `
695
- border: 1px solid ${props => props.theme.PRIMARY_COLOR.Hex};
696
- border-radius: 8px;
697
- box-sizing: border-box;
698
- display: flex;
699
- align-items: center;
700
- justify-content: space-between;
701
- padding: 16px 20px;
674
+ };
675
+
676
+ const Wrapper$d = styled.div `
677
+ border: 1px solid ${props => props.theme.PRIMARY_COLOR.Hex};
678
+ border-radius: 8px;
679
+ box-sizing: border-box;
680
+ display: flex;
681
+ align-items: center;
682
+ justify-content: space-between;
683
+ padding: 16px 20px;
702
684
  `;
703
685
  Wrapper$d.defaultProps = { theme: EditableTheme };
704
- const Left = styled.div `
705
- box-sizing: border-box;
706
- display: flex;
707
- align-items: center;
708
- justify-content: space-between;
709
- flex-shrink: 0;
710
- `;
711
- const Info$1 = styled.div `
712
- box-sizing: border-box;
713
- display: flex;
714
- align-items: center;
715
- margin-right: 30px;
716
- `;
717
- const Selected = styled.span `
718
- font-size: 14px;
719
- font-weight: 400;
720
- font-family: ${FontStyles.DEFAULT};
721
- color: ${Colors.BLACK.Hex};
722
- line-height: 1;
723
- `;
724
- const Clear = styled.span `
725
- font-size: 14px;
726
- font-weight: 400;
727
- font-family: ${FontStyles.DEFAULT};
728
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
729
- line-height: 1;
730
- cursor: pointer;
731
- padding-left: 10px;
732
- margin-left: 10px;
733
- border-left: 1px solid #ccc;
686
+ const Left = styled.div `
687
+ box-sizing: border-box;
688
+ display: flex;
689
+ align-items: center;
690
+ justify-content: space-between;
691
+ flex-shrink: 0;
692
+ `;
693
+ const Info$1 = styled.div `
694
+ box-sizing: border-box;
695
+ display: flex;
696
+ align-items: center;
697
+ margin-right: 30px;
698
+ `;
699
+ const Selected = styled.span `
700
+ font-size: 14px;
701
+ font-weight: 400;
702
+ font-family: ${FontStyles.DEFAULT};
703
+ color: ${Colors.BLACK.Hex};
704
+ line-height: 1;
705
+ `;
706
+ const Clear = styled.span `
707
+ font-size: 14px;
708
+ font-weight: 400;
709
+ font-family: ${FontStyles.DEFAULT};
710
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
711
+ line-height: 1;
712
+ cursor: pointer;
713
+ padding-left: 10px;
714
+ margin-left: 10px;
715
+ border-left: 1px solid #ccc;
734
716
  `;
735
717
  Clear.defaultProps = { theme: EditableTheme };
736
- const Actions$1 = styled.div `
737
- box-sizing: border-box;
738
- display: flex;
739
- align-items: center;
740
- column-gap: 10px;
741
- `;
742
- const Error$1 = styled.div `
743
- box-sizing: border-box;
744
- display: flex;
745
- align-items: center;
746
- background: rgba(${Colors.RED.Rgb}, 0.1);
747
- border-radius: 4px;
748
- padding: 6px 8px;
749
- text-overflow: ellipsis;
750
- white-space: nowrap;
751
- overflow: hidden;
752
- margin-left: 30px;
753
- `;
754
- const ErrorMsg = styled.span `
755
- font-size: 14px;
756
- font-weight: 500;
757
- font-family: ${FontStyles.DEFAULT};
758
- line-height: 1em;
759
- color: ${Colors.RED.Hex};
760
- margin-left: 8px;
718
+ const Actions$1 = styled.div `
719
+ box-sizing: border-box;
720
+ display: flex;
721
+ align-items: center;
722
+ column-gap: 10px;
723
+ `;
724
+ const Error$1 = styled.div `
725
+ box-sizing: border-box;
726
+ display: flex;
727
+ align-items: center;
728
+ background: rgba(${Colors.RED.Rgb}, 0.1);
729
+ border-radius: 4px;
730
+ padding: 6px 8px;
731
+ text-overflow: ellipsis;
732
+ white-space: nowrap;
733
+ overflow: hidden;
734
+ margin-left: 30px;
735
+ `;
736
+ const ErrorMsg = styled.span `
737
+ font-size: 14px;
738
+ font-weight: 500;
739
+ font-family: ${FontStyles.DEFAULT};
740
+ line-height: 1em;
741
+ color: ${Colors.RED.Hex};
742
+ margin-left: 8px;
761
743
  `;
762
744
  const BulkActionBar = (_a) => {
763
- var { actions = [], errorMsg, onClear, selectedCount = 0 } = _a, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount"]);
764
- const id = generateUniqueId('bulk-action-bar');
765
- return (React.createElement(Wrapper$d, Object.assign({}, accessibleProps, { id: `${id}-wrapper` }),
766
- React.createElement(Left, { id: `${id}-left` },
767
- React.createElement(Info$1, { id: `${id}-info` },
768
- React.createElement(Selected, { id: `${id}-selected` },
745
+ var { actions = [], errorMsg, onClear, selectedCount = 0, id } = _a, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount", "id"]);
746
+ const baseId = id || 'bulk-action-bar';
747
+ return (React.createElement(Wrapper$d, Object.assign({}, accessibleProps, { id: `${baseId}-wrapper` }),
748
+ React.createElement(Left, { id: `${baseId}-left` },
749
+ React.createElement(Info$1, { id: `${baseId}-info` },
750
+ React.createElement(Selected, { id: `${baseId}-selected` },
769
751
  selectedCount,
770
752
  " Selected"),
771
- onClear ? (React.createElement(Clear, { id: `${id}-clear`, onClick: onClear }, "Clear")) : null),
772
- React.createElement(Actions$1, { id: `${id}-actions` }, actions.map((action, i) => (React.createElement(Button, Object.assign({}, action, { id: `${id}-action-${i}`, key: i, small: true })))))),
773
- errorMsg ? (React.createElement(Error$1, { id: `${id}-error` },
774
- React.createElement(Icon, { color: Colors.RED.Hex, id: `${id}-error-icon`, path: mdiInformationOutline, size: '20px' }),
775
- React.createElement(ErrorMsg, { id: `${id}-error-msg` }, errorMsg))) : null));
776
- };
777
-
778
- const Wrapper$c = styled.div `
779
- background: #fff;
780
- border-radius: 8px;
781
- box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
782
- display: flex;
783
- flex-direction: column;
784
- gap: 4px;
785
- max-height: ${props => props.$maxHeight || '312px'};
786
- padding: 10px;
787
- width: 200px;
788
- `;
789
- const MenuItem = styled.div `
790
- align-items: center;
791
- border-radius: 8px;
792
- border: 1px solid transparent;
793
- display: flex;
794
- gap: 8px;
795
- height: 38px;
796
- padding: 8px;
797
- &:hover {
798
- background: rgba(1, 147, 215, 0.1);
799
- cursor: pointer;
800
-
801
- svg,
802
- path {
803
- fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
804
- }
805
- }
753
+ onClear ? (React.createElement(Clear, { id: `${baseId}-clear`, onClick: onClear }, "Clear")) : null),
754
+ React.createElement(Actions$1, { id: `${baseId}-actions` }, actions.map((action, i) => (React.createElement(Button, Object.assign({}, action, { id: `${baseId}-action-${i}`, key: i, small: true })))))),
755
+ errorMsg ? (React.createElement(Error$1, { id: `${baseId}-error` },
756
+ React.createElement(Icon, { color: Colors.RED.Hex, id: `${baseId}-error-icon`, path: mdiInformationOutline, size: '20px' }),
757
+ React.createElement(ErrorMsg, { id: `${baseId}-error-msg` }, errorMsg))) : null));
758
+ };
759
+
760
+ const Wrapper$c = styled.div `
761
+ background: #fff;
762
+ border-radius: 8px;
763
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
764
+ display: flex;
765
+ flex-direction: column;
766
+ gap: 4px;
767
+ max-height: ${props => props.$maxHeight || '312px'};
768
+ padding: 10px;
769
+ width: 200px;
770
+ `;
771
+ const MenuItem = styled.div `
772
+ align-items: center;
773
+ border-radius: 8px;
774
+ border: 1px solid transparent;
775
+ display: flex;
776
+ gap: 8px;
777
+ height: 38px;
778
+ padding: 8px;
779
+ &:hover {
780
+ background: rgba(1, 147, 215, 0.1);
781
+ cursor: pointer;
782
+
783
+ svg,
784
+ path {
785
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
786
+ }
787
+ }
806
788
  `;
807
789
  MenuItem.defaultProps = { theme: EditableTheme };
808
- const Title$1 = styled.span `
809
- font-family: Roboto;
810
- font-size: 14px;
811
- font-weight: 400;
812
- height: auto;
813
- letter-spacing: 0px;
814
- line-height: 22px;
815
- text-align: left;
816
- color: ${({ disabled }) => (disabled ? Colors.LIGHT_GRAY.Hex : 'inherit')};
817
- pointer-events: ${({ disabled }) => (disabled ? 'none' : 'auto')};
790
+ const Title$1 = styled.span `
791
+ font-family: Roboto;
792
+ font-size: 14px;
793
+ font-weight: 400;
794
+ height: auto;
795
+ letter-spacing: 0px;
796
+ line-height: 22px;
797
+ text-align: left;
798
+ color: ${({ disabled }) => (disabled ? Colors.LIGHT_GRAY.Hex : 'inherit')};
799
+ pointer-events: ${({ disabled }) => (disabled ? 'none' : 'auto')};
818
800
  `;
819
801
  Title$1.defaultProps = {
820
802
  disabled: false,
821
803
  };
822
804
  const MoreMenu = (_a) => {
823
- var { maxHeight, menuItems = [] } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems"]);
824
- const id = generateUniqueId('more-menu');
825
- return (React.createElement(Wrapper$c, Object.assign({ "$maxHeight": maxHeight }, accessibleProps, { id: `${id}-wrapper` }), menuItems.map((item, i) => {
805
+ var { maxHeight, menuItems = [], id } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems", "id"]);
806
+ const baseId = id || 'more-menu';
807
+ return (React.createElement(Wrapper$c, Object.assign({ "$maxHeight": maxHeight }, accessibleProps, { id: `${baseId}-wrapper` }), menuItems.map((item, i) => {
826
808
  var _a;
827
- const itemId = generateUniqueId(`menu-item-${i}`);
809
+ const itemId = `${baseId}-menu-item-${i}`;
828
810
  return (React.createElement(MenuItem, { id: `${itemId}-menu-item`, key: i, onClick: item.onClick },
829
811
  item.icon ? (React.createElement(Icon, { color: item.disabled ? Colors.LIGHT_GRAY.Hex : Colors.MEDIUM_GRAY.Hex, id: `${itemId}-icon`, path: item.icon, size: '20px' })) : null,
830
812
  React.createElement(Title$1, { disabled: (_a = item.disabled) !== null && _a !== void 0 ? _a : false, id: `${itemId}-title` }, item.label)));
831
813
  })));
832
- };
833
-
834
- const MenuWrapper = styled.div `
835
- position: relative;
836
- display: inline-block;
837
- `;
838
- const StyledMoreMenu = styled(MoreMenu) `
839
- position: absolute;
840
- top: ${props => props.$top};
841
- left: ${props => props.$left};
842
- width: ${props => props.$menuWidth};
843
- max-height: ${props => props.maxHeight};
844
- z-index: 10;
845
- `;
846
- const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'bottomLeft', format = 'primary', menuWidth = '200px', enableHover = true, enableClick = false, show = false, }) => {
814
+ };
815
+
816
+ const MenuWrapper = styled.div `
817
+ position: relative;
818
+ display: inline-block;
819
+ `;
820
+ const StyledMoreMenu = styled(MoreMenu) `
821
+ position: absolute;
822
+ top: ${props => props.$top};
823
+ left: ${props => props.$left};
824
+ width: ${props => props.$menuWidth};
825
+ max-height: ${props => props.maxHeight};
826
+ z-index: 10;
827
+ `;
828
+ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'bottomLeft', format = 'primary', menuWidth = '200px', enableHover = true, enableClick = false, show = false, id, }) => {
847
829
  const [showMenu, toggleMenu] = useState(false);
848
830
  const [menuPosition, setMenuPosition] = useState({ top: '0px', left: '0px' });
849
831
  const menuWrapperRef = useRef(null);
850
- const id = generateUniqueId('button-menu');
832
+ const baseId = id || 'button-menu';
851
833
  useEffect(() => {
852
834
  toggleMenu(show);
853
835
  }, [show]);
@@ -913,113 +895,114 @@ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = '
913
895
  setMenuPosition({ top: `${top}px`, left: `${left}px` });
914
896
  }
915
897
  }, [showMenu, position, menuWidth]);
916
- return (React.createElement(MenuWrapper, { id: `${id}-menu-wrapper`, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: menuWrapperRef },
917
- React.createElement(Button, { disabled: disabled, format: format, icon: mdiDotsHorizontal, id: `${id}-button`, small: small }, label),
918
- showMenu && (React.createElement(StyledMoreMenu, { "$left": menuPosition.left, "$menuWidth": menuWidth, "$top": menuPosition.top, id: `${id}-more-menu`, maxHeight: maxHeight, menuItems: menuItems }))));
919
- };
920
-
921
- const Wrapper$b = styled.label `
922
- border-radius: 4px;
923
- padding: 4px 0px 4px 6px;
924
- margin-left: -6px;
925
- cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
926
- display: flex;
927
- align-items: center;
928
- font-size: ${FontSizes.DEFAULT};
929
- line-height: 1.6em;
930
- box-sizing: border-box;
931
- position: relative;
932
-
933
- &:focus-within {
934
- background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
935
- }
898
+ return (React.createElement(MenuWrapper, { id: `${baseId}-menu-wrapper`, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: menuWrapperRef },
899
+ React.createElement(Button, { disabled: disabled, format: format, icon: mdiDotsHorizontal, id: `${baseId}-button`, small: small }, label),
900
+ showMenu && (React.createElement(StyledMoreMenu, { "$left": menuPosition.left, "$menuWidth": menuWidth, "$top": menuPosition.top, id: `${baseId}-more-menu`, maxHeight: maxHeight, menuItems: menuItems }))));
901
+ };
902
+
903
+ const Wrapper$b = styled.label `
904
+ border-radius: 4px;
905
+ padding: 4px 0px 4px 6px;
906
+ margin-left: -6px;
907
+ cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
908
+ display: flex;
909
+ align-items: center;
910
+ font-size: ${FontSizes.DEFAULT};
911
+ line-height: 1.6em;
912
+ box-sizing: border-box;
913
+ position: relative;
914
+
915
+ &:focus-within {
916
+ background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
917
+ }
936
918
  `;
937
919
  Wrapper$b.defaultProps = { theme: EditableTheme };
938
- const Input$2 = styled.input `
939
- font-size: 20px;
940
- margin: 0px;
941
- line-height: 1.1em;
942
- box-sizing: border-box;
943
- position: absolute;
944
- opacity: 0;
945
- cursor: pointer;
946
- height: 0;
947
- width: 0;
948
- &:checked + span {
949
- background-color: ${Colors.PRIMARY.Hex};
950
- border-color: ${Colors.PRIMARY.Hex};
951
- }
952
- &:checked:disabled + span {
953
- background-color: ${Colors.MEDIUM_GRAY.Hex};
954
- border-color: ${Colors.MEDIUM_GRAY.Hex};
955
- }
956
- &:disabled + span {
957
- background-color: #d3d3d3;
958
- border-color: #d3d3d3;
959
- }
960
- &:checked + span:after {
961
- display: block;
962
- }
963
- `;
964
- const Check$1 = styled.span `
965
- height: 17px;
966
- width: 17px;
967
- min-width: 17px;
968
- background-color: #fff;
969
- border-width: 2px;
970
- border-style: solid;
971
- border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
972
- box-sizing: border-box;
973
- position: relative;
974
- &:after {
975
- content: '';
976
- position: absolute;
977
- left: 3px;
978
- top: 0px;
979
- width: 7px;
980
- height: 12px;
981
- border: solid white;
982
- border-width: 0 3px 3px 0;
983
- -webkit-transform: rotate(45deg);
984
- -ms-transform: rotate(45deg);
985
- transform: rotate(45deg);
986
- box-sizing: border-box;
987
- display: none;
988
- }
989
- `;
990
- const Label$3 = styled.span `
991
- font-family: ${FontStyles.DEFAULT};
992
- font-size: ${FontSizes.DEFAULT};
993
- font-weight: 400;
994
- line-height: 1.6em;
995
- color: ${props => props.color || Colors.BLACK.Hex};
996
- margin-left: 6px;
997
- box-sizing: border-box;
920
+ const Input$2 = styled.input `
921
+ font-size: 20px;
922
+ margin: 0px;
923
+ line-height: 1.1em;
924
+ box-sizing: border-box;
925
+ position: absolute;
926
+ opacity: 0;
927
+ cursor: pointer;
928
+ height: 0;
929
+ width: 0;
930
+ &:checked + span {
931
+ background-color: ${Colors.PRIMARY.Hex};
932
+ border-color: ${Colors.PRIMARY.Hex};
933
+ }
934
+ &:checked:disabled + span {
935
+ background-color: ${Colors.MEDIUM_GRAY.Hex};
936
+ border-color: ${Colors.MEDIUM_GRAY.Hex};
937
+ }
938
+ &:disabled + span {
939
+ background-color: #d3d3d3;
940
+ border-color: #d3d3d3;
941
+ }
942
+ &:checked + span:after {
943
+ display: block;
944
+ }
945
+ `;
946
+ const Check$1 = styled.span `
947
+ height: 17px;
948
+ width: 17px;
949
+ min-width: 17px;
950
+ background-color: #fff;
951
+ border-width: 2px;
952
+ border-style: solid;
953
+ border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
954
+ box-sizing: border-box;
955
+ position: relative;
956
+ &:after {
957
+ content: '';
958
+ position: absolute;
959
+ left: 3px;
960
+ top: 0px;
961
+ width: 7px;
962
+ height: 12px;
963
+ border: solid white;
964
+ border-width: 0 3px 3px 0;
965
+ -webkit-transform: rotate(45deg);
966
+ -ms-transform: rotate(45deg);
967
+ transform: rotate(45deg);
968
+ box-sizing: border-box;
969
+ display: none;
970
+ }
971
+ `;
972
+ const Label$3 = styled.span `
973
+ font-family: ${FontStyles.DEFAULT};
974
+ font-size: ${FontSizes.DEFAULT};
975
+ font-weight: 400;
976
+ line-height: 1.6em;
977
+ color: ${props => props.color || Colors.BLACK.Hex};
978
+ margin-left: 6px;
979
+ box-sizing: border-box;
998
980
  `;
999
981
  const Checkbox = (_a) => {
1000
- var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex"]);
1001
- const id = generateUniqueId('checkbox');
1002
- return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps, { id: `${id}-wrapper` }),
1003
- React.createElement(Input$2, { checked: checked, disabled: disabled, id: `${id}-input`, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
1004
- React.createElement(Check$1, { "$invalid": invalid, id: `${id}-check` }),
1005
- children ? (React.createElement(Label$3, { color: color, id: `${id}-label` },
982
+ var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, id } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "id"]);
983
+ const baseId = id || 'checkbox';
984
+ return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps, { id: `${baseId}-wrapper` }),
985
+ React.createElement(Input$2, { checked: checked, disabled: disabled, id: `${baseId}-input`, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
986
+ React.createElement(Check$1, { "$invalid": invalid, id: `${baseId}-check` }),
987
+ children ? (React.createElement(Label$3, { color: color, id: `${baseId}-label` },
1006
988
  children,
1007
989
  tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)) : null));
1008
- };
1009
-
1010
- const SelectAll = styled.div `
1011
- padding: 8px 12px;
1012
- border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
1013
- box-sizing: border-box;
990
+ };
991
+
992
+ const SelectAll = styled.div `
993
+ padding: 8px 12px;
994
+ border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
995
+ box-sizing: border-box;
1014
996
  `;
1015
- const Options$1 = styled.div `
1016
- padding: 12px;
1017
- box-sizing: border-box;
997
+ const Options$1 = styled.div `
998
+ padding: 12px;
999
+ box-sizing: border-box;
1018
1000
  `;
1019
1001
  const Checklist = (_a) => {
1020
- var { disabled, onChange, options, selected = [], showSelectAll } = _a, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "selected", "showSelectAll"]);
1002
+ var { disabled, onChange, options, selected = [], showSelectAll, id } = _a, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "selected", "showSelectAll", "id"]);
1021
1003
  const values = options.map((option) => option.value);
1022
1004
  const selected_options = options.filter(o => selected.includes(o.value));
1005
+ const baseId = id || 'checklist';
1023
1006
  const handleToggleAll = () => {
1024
1007
  if (selected_options.length === options.length) {
1025
1008
  triggerChange([]);
@@ -1043,86 +1026,85 @@ const Checklist = (_a) => {
1043
1026
  },
1044
1027
  });
1045
1028
  };
1046
- const id = generateUniqueId('checklist');
1047
1029
  return (React.createElement(React.Fragment, null,
1048
- showSelectAll && values.length ? (React.createElement(SelectAll, { id: `${id}-select-all` },
1049
- React.createElement(Checkbox, { checked: selected.length === values.length, disabled: disabled, id: `${id}-checkbox-select-all`, onChange: handleToggleAll }, "Select All"))) : null,
1050
- React.createElement(Options$1, { id: `${id}-options` }, options.map((option, i) => {
1030
+ showSelectAll && values.length ? (React.createElement(SelectAll, { id: `${baseId}-select-all` },
1031
+ React.createElement(Checkbox, { checked: selected.length === values.length, disabled: disabled, id: `${baseId}-checkbox-select-all`, onChange: handleToggleAll }, "Select All"))) : null,
1032
+ React.createElement(Options$1, { id: `${baseId}-options` }, options.map((option, i) => {
1051
1033
  const label = `${option.label || option.value}`;
1052
1034
  const checked = selected.includes(option.value);
1053
- const optionId = generateUniqueId('option');
1035
+ const optionId = `${baseId}-option-${i}`;
1054
1036
  return (React.createElement(Checkbox, Object.assign({ id: `${optionId}-checkbox`, key: i }, accessibleProps, { checked: checked, color: option.color, disabled: disabled, onChange: handleChange.bind(null, option) }), label));
1055
1037
  }))));
1056
- };
1057
-
1058
- const Wrapper$a = styled.div `
1059
- border-radius: 4px;
1060
- height: 40px;
1061
- background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1062
- position: relative;
1063
- cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};
1064
- border-width: 1px;
1065
- border-style: solid;
1066
- border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
1067
- border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
1068
- flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
1069
- box-sizing: border-box;
1070
- padding: 10px 0px;
1071
- display: flex;
1072
- align-items: center;
1073
- width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1074
-
1075
- &:focus-within {
1076
- border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1077
- }
1038
+ };
1039
+
1040
+ const Wrapper$a = styled.div `
1041
+ border-radius: 4px;
1042
+ height: 40px;
1043
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1044
+ position: relative;
1045
+ cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};
1046
+ border-width: 1px;
1047
+ border-style: solid;
1048
+ border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
1049
+ border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
1050
+ flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
1051
+ box-sizing: border-box;
1052
+ padding: 10px 0px;
1053
+ display: flex;
1054
+ align-items: center;
1055
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1056
+
1057
+ &:focus-within {
1058
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1059
+ }
1078
1060
  `;
1079
1061
  Wrapper$a.defaultProps = { theme: EditableTheme };
1080
- const Trigger$1 = styled.select `
1081
- appearance: none;
1082
- box-shadow: none;
1083
- outline: none;
1084
- border: none;
1085
- color: ${Colors.BLACK.Hex};
1086
- font-size: ${FontSizes.DEFAULT};
1087
- font-weight: 400;
1088
- font-family: ${FontStyles.DEFAULT};
1089
- line-height: 3.1em;
1090
- background-color: transparent;
1091
- background-image: none;
1092
- width: 100%;
1093
- box-sizing: border-box;
1094
- padding: 0px 30px 0px 10px;
1095
- box-sizing: border-box;
1096
- position: relative;
1097
- z-index: 2;
1098
- `;
1099
- const IconWrapper$2 = styled(Icon) `
1100
- position: absolute;
1101
- right: 9px;
1102
- z-index: 1;
1103
- `;
1104
- const SearchInput$1 = styled.input `
1105
- position: absolute;
1106
- left: 2px;
1107
- top: 2px;
1108
- z-index: 999;
1109
- width: 90%;
1110
- height: 30px;
1111
- border: none;
1112
- outline: none;
1113
- color: ${Colors.BLACK.Hex};
1114
- font-family: ${FontStyles.DEFAULT};
1115
- font-size: ${FontSizes.DEFAULT};
1116
- font-weight: 400;
1117
- line-height: 2.9em;
1118
- overflow: hidden;
1119
- white-space: nowrap;
1062
+ const Trigger$1 = styled.select `
1063
+ appearance: none;
1064
+ box-shadow: none;
1065
+ outline: none;
1066
+ border: none;
1067
+ color: ${Colors.BLACK.Hex};
1068
+ font-size: ${FontSizes.DEFAULT};
1069
+ font-weight: 400;
1070
+ font-family: ${FontStyles.DEFAULT};
1071
+ line-height: 3.1em;
1072
+ background-color: transparent;
1073
+ background-image: none;
1074
+ width: 100%;
1075
+ box-sizing: border-box;
1076
+ padding: 0px 30px 0px 10px;
1077
+ box-sizing: border-box;
1078
+ position: relative;
1079
+ z-index: 2;
1080
+ `;
1081
+ const IconWrapper$2 = styled(Icon) `
1082
+ position: absolute;
1083
+ right: 9px;
1084
+ z-index: 1;
1085
+ `;
1086
+ const SearchInput$1 = styled.input `
1087
+ position: absolute;
1088
+ left: 2px;
1089
+ top: 2px;
1090
+ z-index: 999;
1091
+ width: 90%;
1092
+ height: 30px;
1093
+ border: none;
1094
+ outline: none;
1095
+ color: ${Colors.BLACK.Hex};
1096
+ font-family: ${FontStyles.DEFAULT};
1097
+ font-size: ${FontSizes.DEFAULT};
1098
+ font-weight: 400;
1099
+ line-height: 2.9em;
1100
+ overflow: hidden;
1101
+ white-space: nowrap;
1120
1102
  `;
1121
1103
  const Select = (_a) => {
1122
- var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex"]);
1104
+ var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, id } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "id"]);
1123
1105
  const [searchTerm, setSearchTerm] = useState('');
1124
1106
  const [value, setValue] = useState(propValue || '');
1125
- const id = generateUniqueId('select');
1107
+ const baseId = id || 'select';
1126
1108
  // Update the value when the prop changes
1127
1109
  useEffect(() => {
1128
1110
  setValue(propValue || '');
@@ -1142,28 +1124,28 @@ const Select = (_a) => {
1142
1124
  const filteredOptionGroups = searchable
1143
1125
  ? optionGroups === null || optionGroups === void 0 ? void 0 : optionGroups.map(group => (Object.assign(Object.assign({}, group), { options: group.options.filter(option => { var _a; return (_a = option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase()); }) })))
1144
1126
  : optionGroups;
1145
- return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, id: `${id}-wrapper` },
1146
- searchable && (React.createElement(SearchInput$1, Object.assign({ id: `${id}-search-input`, onChange: handleSearch, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, type: 'text', value: searchTerm }, accessibleProps))),
1147
- React.createElement(Trigger$1, Object.assign({ disabled: readOnly, id: `${id}-trigger`, onChange: handleChange, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),
1148
- placeholder && !value && (React.createElement("option", { disabled: true, id: `${id}-placeholder`, value: '' }, placeholder)),
1127
+ return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, id: `${baseId}-wrapper` },
1128
+ searchable && (React.createElement(SearchInput$1, Object.assign({ id: `${baseId}-search-input`, onChange: handleSearch, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, type: 'text', value: searchTerm }, accessibleProps))),
1129
+ React.createElement(Trigger$1, Object.assign({ disabled: readOnly, id: `${baseId}-trigger`, onChange: handleChange, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),
1130
+ placeholder && !value && (React.createElement("option", { disabled: true, id: `${baseId}-placeholder`, value: '' }, placeholder)),
1149
1131
  filteredOptionGroups &&
1150
- filteredOptionGroups.map((group, i) => (React.createElement("optgroup", { id: `${id}-optgroup-${i}`, key: i, label: group.label || `Group ${i}` }, group.options.map((option, j) => (React.createElement("option", { id: `${id}-option-${i}-${j}`, key: j, style: { color: option.color }, value: option.value }, option.label || option.value)))))),
1132
+ filteredOptionGroups.map((group, i) => (React.createElement("optgroup", { id: `${baseId}-optgroup-${i}`, key: i, label: group.label || `Group ${i}` }, group.options.map((option, j) => (React.createElement("option", { id: `${baseId}-option-${i}-${j}`, key: j, style: { color: option.color }, value: option.value }, option.label || option.value)))))),
1151
1133
  filteredOptions &&
1152
- filteredOptions.map((option, i) => (React.createElement("option", { id: `${id}-option-${i}`, key: i, style: { color: option.color }, value: option.value }, option.label || option.value)))),
1153
- React.createElement(IconWrapper$2, { color: Colors.BLACK.Hex, id: `${id}-icon`, path: mdiChevronDown, size: '22px' })));
1154
- };
1155
-
1156
- const DatePickerWrapper = styled.div `
1157
- display: flex;
1158
- width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1159
- `;
1160
- const Middle = styled.div `
1161
- margin: 0px -1px;
1162
- flex-grow: 1;
1134
+ filteredOptions.map((option, i) => (React.createElement("option", { id: `${baseId}-option-${i}`, key: i, style: { color: option.color }, value: option.value }, option.label || option.value)))),
1135
+ React.createElement(IconWrapper$2, { color: Colors.BLACK.Hex, id: `${baseId}-icon`, path: mdiChevronDown, size: '22px' })));
1136
+ };
1137
+
1138
+ const DatePickerWrapper = styled.div `
1139
+ display: flex;
1140
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1141
+ `;
1142
+ const Middle = styled.div `
1143
+ margin: 0px -1px;
1144
+ flex-grow: 1;
1163
1145
  `;
1164
1146
  const DatePicker = ({ readOnly = false, invalid = false, maxDate = null, minDate = null, date,
1165
1147
  // eslint-disable-next-line @typescript-eslint/no-empty-function
1166
- onChange = () => { }, style, }) => {
1148
+ onChange = () => { }, style, id, }) => {
1167
1149
  const [selectedDay, setSelectedDay] = useState(date ? dayjs(date).date().toString() : '');
1168
1150
  const [selectedMonth, setSelectedMonth] = useState(date ? (dayjs(date).month() + 1).toString() : '');
1169
1151
  const [selectedYear, setSelectedYear] = useState(date ? dayjs(date).year().toString() : '');
@@ -1240,76 +1222,76 @@ onChange = () => { }, style, }) => {
1240
1222
  setSelectedYear(e.target.value);
1241
1223
  setDDate(new_date);
1242
1224
  };
1243
- const id = generateUniqueId('date-picker');
1225
+ const baseId = id || 'date-picker';
1244
1226
  return (React.createElement(React.Fragment, null,
1245
- React.createElement(DatePickerWrapper, { "$style": style, id: `${id}-wrapper` },
1246
- React.createElement(Select, { id: `${id}-month-select`, invalid: invalid, onChange: handleMonthChange, options: months, placeholder: 'Select Month', readOnly: readOnly, style: { borderRadius: '4px 0px 0px 4px', flexGrow: 3 }, value: selectedMonth }),
1247
- React.createElement(Middle, { id: `${id}-middle` },
1248
- React.createElement(Select, { id: `${id}-day-select`, invalid: invalid, onChange: handleDayChange, options: dayOptions, placeholder: 'Select Day', readOnly: readOnly, style: { borderRadius: '0px' }, value: selectedDay })),
1249
- React.createElement(Select, { id: `${id}-year-select`, invalid: invalid, onChange: handleYearChange, options: years, placeholder: 'Select Year', readOnly: readOnly, style: { borderRadius: '0px 4px 4px 0px', flexGrow: 2 }, value: selectedYear }))));
1250
- };
1251
-
1252
- const Scrim$1 = styled.div `
1253
- position: ${({ $position }) => $position};
1254
- top: 0;
1255
- right: 0;
1256
- bottom: 0;
1257
- left: 0;
1258
- z-index: ${({ $position }) => ($position === 'fixed' ? 9998 : 10)};
1259
- background: ${({ $scrim }) => ($scrim === 'dark' ? 'rgba(0,0,0,0.8)' : 'transparent')};
1260
- `;
1261
- const Container$2 = styled.div `
1262
- z-index: ${({ $position }) => ($position === 'fixed' ? 9999 : 11)};
1263
- min-width: 400px;
1264
- width: ${({ $width }) => $width || '400px'};
1265
- overflow: hidden;
1266
- box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
1267
- outline: none;
1268
- border: none;
1269
- position: ${({ $position }) => $position};
1270
- top: 0;
1271
- right: 0;
1272
- bottom: 0;
1273
- padding: 0px;
1274
- display: flex;
1275
- flex-direction: column;
1276
- box-sizing: border-box;
1277
- background: #fff;
1278
- `;
1279
- const Header$2 = styled.div `
1280
- padding: 30px 20px;
1281
- display: flex;
1282
- align-items: flex-start;
1283
- box-sizing: border-box;
1284
- flex-shrink: 0;
1285
- background: #fff;
1286
- `;
1287
- const Close$1 = styled.div `
1288
- margin-left: auto;
1289
- display: flex;
1290
- align-items: center;
1291
- padding-left: 20px;
1292
- cursor: pointer;
1293
- `;
1294
- const ContentWrapper$1 = styled.div `
1295
- overflow-x: hidden;
1296
- overflow-y: auto;
1297
- box-sizing: border-box;
1298
- flex: 1;
1299
- background: #fff;
1300
- `;
1301
- const ButtonBar$1 = styled.div `
1302
- padding: 20px;
1303
- display: flex;
1304
- align-items: center;
1305
- justify-content: flex-end;
1306
- box-sizing: border-box;
1307
- gap: 10px;
1308
- flex-shrink: 0;
1309
- background: #fff;
1227
+ React.createElement(DatePickerWrapper, { "$style": style, id: `${baseId}-wrapper` },
1228
+ React.createElement(Select, { id: `${baseId}-month-select`, invalid: invalid, onChange: handleMonthChange, options: months, placeholder: 'Select Month', readOnly: readOnly, style: { borderRadius: '4px 0px 0px 4px', flexGrow: 3 }, value: selectedMonth }),
1229
+ React.createElement(Middle, { id: `${baseId}-middle` },
1230
+ React.createElement(Select, { id: `${baseId}-day-select`, invalid: invalid, onChange: handleDayChange, options: dayOptions, placeholder: 'Select Day', readOnly: readOnly, style: { borderRadius: '0px' }, value: selectedDay })),
1231
+ React.createElement(Select, { id: `${baseId}-year-select`, invalid: invalid, onChange: handleYearChange, options: years, placeholder: 'Select Year', readOnly: readOnly, style: { borderRadius: '0px 4px 4px 0px', flexGrow: 2 }, value: selectedYear }))));
1232
+ };
1233
+
1234
+ const Scrim$1 = styled.div `
1235
+ position: ${({ $position }) => $position};
1236
+ top: 0;
1237
+ right: 0;
1238
+ bottom: 0;
1239
+ left: 0;
1240
+ z-index: ${({ $position }) => ($position === 'fixed' ? 9998 : 10)};
1241
+ background: ${({ $scrim }) => ($scrim === 'dark' ? 'rgba(0,0,0,0.8)' : 'transparent')};
1242
+ `;
1243
+ const Container$2 = styled.div `
1244
+ z-index: ${({ $position }) => ($position === 'fixed' ? 9999 : 11)};
1245
+ min-width: 400px;
1246
+ width: ${({ $width }) => $width || '400px'};
1247
+ overflow: hidden;
1248
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
1249
+ outline: none;
1250
+ border: none;
1251
+ position: ${({ $position }) => $position};
1252
+ top: 0;
1253
+ right: 0;
1254
+ bottom: 0;
1255
+ padding: 0px;
1256
+ display: flex;
1257
+ flex-direction: column;
1258
+ box-sizing: border-box;
1259
+ background: #fff;
1260
+ `;
1261
+ const Header$2 = styled.div `
1262
+ padding: 30px 20px;
1263
+ display: flex;
1264
+ align-items: flex-start;
1265
+ box-sizing: border-box;
1266
+ flex-shrink: 0;
1267
+ background: #fff;
1268
+ `;
1269
+ const Close$1 = styled.div `
1270
+ margin-left: auto;
1271
+ display: flex;
1272
+ align-items: center;
1273
+ padding-left: 20px;
1274
+ cursor: pointer;
1275
+ `;
1276
+ const ContentWrapper$1 = styled.div `
1277
+ overflow-x: hidden;
1278
+ overflow-y: auto;
1279
+ box-sizing: border-box;
1280
+ flex: 1;
1281
+ background: #fff;
1282
+ `;
1283
+ const ButtonBar$1 = styled.div `
1284
+ padding: 20px;
1285
+ display: flex;
1286
+ align-items: center;
1287
+ justify-content: flex-end;
1288
+ box-sizing: border-box;
1289
+ gap: 10px;
1290
+ flex-shrink: 0;
1291
+ background: #fff;
1310
1292
  `;
1311
1293
  const Drawer = (_a) => {
1312
- var { children, description, title, onClose, primaryButton, position = 'fixed', secondaryButton, tertiaryButton, scrim = 'dark', width } = _a, accessibleProps = __rest(_a, ["children", "description", "title", "onClose", "primaryButton", "position", "secondaryButton", "tertiaryButton", "scrim", "width"]);
1294
+ var { children, description, title, onClose, primaryButton, position = 'fixed', secondaryButton, tertiaryButton, scrim = 'dark', width, id } = _a, accessibleProps = __rest(_a, ["children", "description", "title", "onClose", "primaryButton", "position", "secondaryButton", "tertiaryButton", "scrim", "width", "id"]);
1313
1295
  useEffect(() => {
1314
1296
  document.onkeydown = e => {
1315
1297
  if (e.key === 'Escape') {
@@ -1319,195 +1301,195 @@ const Drawer = (_a) => {
1319
1301
  return function cleanup() {
1320
1302
  document.onkeydown = null;
1321
1303
  };
1322
- }, []);
1323
- const id = generateUniqueId('drawer');
1304
+ }, [onClose]);
1305
+ const baseId = id || 'drawer';
1324
1306
  return (React.createElement(React.Fragment, null,
1325
- React.createElement(Container$2, Object.assign({}, accessibleProps, { "$position": position, "$width": width, id: `${id}-container` }),
1326
- React.createElement(Header$2, { id: `${id}-header` },
1327
- React.createElement("div", { id: `${id}-header-content` },
1328
- title ? (React.createElement(Heading, { id: `${id}-title`, type: 'secondary' }, title)) : null,
1329
- description ? (React.createElement(Copy, { color: 'GRAY', id: `${id}-description` }, description)) : null),
1330
- React.createElement(Close$1, { id: `${id}-close`, onClick: onClose },
1331
- React.createElement(Button, { format: 'secondary', icon: mdiClose, id: `${id}-close-button`, small: true }))),
1332
- React.createElement(ContentWrapper$1, { id: `${id}-content-wrapper` }, children),
1333
- primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, { id: `${id}-button-bar` },
1334
- tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary', id: `${id}-tertiary-button` }))) : null,
1335
- secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary', id: `${id}-secondary-button` }))) : null,
1336
- primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary', id: `${id}-primary-button` }))) : null)) : null),
1337
- scrim ? (React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, id: `${id}-scrim`, onClick: onClose })) : null));
1338
- };
1339
-
1307
+ React.createElement(Container$2, Object.assign({}, accessibleProps, { "$position": position, "$width": width, id: `${baseId}-container` }),
1308
+ React.createElement(Header$2, { id: `${baseId}-header` },
1309
+ React.createElement("div", { id: `${baseId}-header-content` },
1310
+ title ? (React.createElement(Heading, { id: `${baseId}-title`, type: 'secondary' }, title)) : null,
1311
+ description ? (React.createElement(Copy, { color: 'GRAY', id: `${baseId}-description` }, description)) : null),
1312
+ React.createElement(Close$1, { id: `${baseId}-close`, onClick: onClose },
1313
+ React.createElement(Button, { format: 'secondary', icon: mdiClose, id: `${baseId}-close-button`, small: true }))),
1314
+ React.createElement(ContentWrapper$1, { id: `${baseId}-content-wrapper` }, children),
1315
+ primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, { id: `${baseId}-button-bar` },
1316
+ tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary', id: `${baseId}-tertiary-button` }))) : null,
1317
+ secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary', id: `${baseId}-secondary-button` }))) : null,
1318
+ primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary', id: `${baseId}-primary-button` }))) : null)) : null),
1319
+ scrim ? (React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, id: `${baseId}-scrim`, onClick: onClose })) : null));
1320
+ };
1321
+
1340
1322
  const Wrapper$9 = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.$customStyle)));
1341
- const LabelRow = styled.div `
1342
- display: flex;
1343
- align-items: center;
1344
- justify-content: space-between;
1345
- margin: 0 0 4px 0;
1346
- box-sizing: border-box;
1347
- `;
1348
- const Label$2 = styled.label `
1349
- font-size: ${FontSizes.DEFAULT};
1350
- font-weight: 500;
1351
- line-height: 1.3em;
1352
- font-family: ${FontStyles.DEFAULT};
1353
- color: ${Colors.BLACK.Hex};
1354
- display: flex;
1355
- align-items: center;
1356
- `;
1357
- const Required = styled.span `
1358
- color: ${Colors.RED.Hex};
1359
- margin-left: 4px;
1360
- `;
1361
- const Action = styled.span `
1362
- font-size: ${FontSizes.DEFAULT};
1363
- font-weight: 500;
1364
- line-height: 1em;
1365
- font-family: ${FontStyles.DEFAULT};
1366
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
1367
- cursor: pointer;
1323
+ const LabelRow = styled.div `
1324
+ display: flex;
1325
+ align-items: center;
1326
+ justify-content: space-between;
1327
+ margin: 0 0 4px 0;
1328
+ box-sizing: border-box;
1329
+ `;
1330
+ const Label$2 = styled.label `
1331
+ font-size: ${FontSizes.DEFAULT};
1332
+ font-weight: 500;
1333
+ line-height: 1.3em;
1334
+ font-family: ${FontStyles.DEFAULT};
1335
+ color: ${Colors.BLACK.Hex};
1336
+ display: flex;
1337
+ align-items: center;
1338
+ `;
1339
+ const Required = styled.span `
1340
+ color: ${Colors.RED.Hex};
1341
+ margin-left: 4px;
1342
+ `;
1343
+ const Action = styled.span `
1344
+ font-size: ${FontSizes.DEFAULT};
1345
+ font-weight: 500;
1346
+ line-height: 1em;
1347
+ font-family: ${FontStyles.DEFAULT};
1348
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
1349
+ cursor: pointer;
1368
1350
  `;
1369
1351
  Action.defaultProps = { theme: EditableTheme };
1370
- const Description = styled.div `
1371
- font-size: ${FontSizes.SMALL};
1372
- font-weight: 400;
1373
- line-height: 1.3em;
1374
- font-family: ${FontStyles.DEFAULT};
1375
- color: ${Colors.BLACK.Hex};
1376
- margin: 0 0 8px 0;
1377
- box-sizing: border-box;
1378
- `;
1379
- const Validation = styled.div `
1380
- font-size: ${FontSizes.SMALL};
1381
- font-weight: 400;
1382
- line-height: 1.3em;
1383
- font-family: ${FontStyles.DEFAULT};
1384
- color: ${Colors.RED.Hex};
1385
- margin: 4px 0 0 0;
1386
- box-sizing: border-box;
1352
+ const Description = styled.div `
1353
+ font-size: ${FontSizes.SMALL};
1354
+ font-weight: 400;
1355
+ line-height: 1.3em;
1356
+ font-family: ${FontStyles.DEFAULT};
1357
+ color: ${Colors.BLACK.Hex};
1358
+ margin: 0 0 8px 0;
1359
+ box-sizing: border-box;
1360
+ `;
1361
+ const Validation = styled.div `
1362
+ font-size: ${FontSizes.SMALL};
1363
+ font-weight: 400;
1364
+ line-height: 1.3em;
1365
+ font-family: ${FontStyles.DEFAULT};
1366
+ color: ${Colors.RED.Hex};
1367
+ margin: 4px 0 0 0;
1368
+ box-sizing: border-box;
1387
1369
  `;
1388
1370
  const Field = (_a) => {
1389
- var { action, children, validationText, label, description, required, htmlFor, style = {}, tooltip } = _a, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip"]);
1390
- const id = generateUniqueId('field');
1391
- return (React.createElement(Wrapper$9, Object.assign({ "$customStyle": style }, accessibleProps, { id: `${id}-wrapper` }),
1392
- React.createElement(LabelRow, { id: `${id}-label-row` },
1393
- label || required || tooltip ? (React.createElement(Label$2, { htmlFor: htmlFor, id: `${id}-label` },
1371
+ var { action, children, validationText, label, description, required, htmlFor, style = {}, tooltip, id } = _a, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip", "id"]);
1372
+ const baseId = id || 'field';
1373
+ return (React.createElement(Wrapper$9, Object.assign({ "$customStyle": style }, accessibleProps, { id: `${baseId}-wrapper` }),
1374
+ React.createElement(LabelRow, { id: `${baseId}-label-row` },
1375
+ label || required || tooltip ? (React.createElement(Label$2, { htmlFor: htmlFor, id: `${baseId}-label` },
1394
1376
  label,
1395
- required ? React.createElement(Required, { id: `${id}-required` }, "*") : null,
1377
+ required ? React.createElement(Required, { id: `${baseId}-required` }, "*") : null,
1396
1378
  tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)) : null,
1397
- action ? (React.createElement(Action, { id: action.id || `${id}-action`, onClick: action.onClick }, action.label)) : null),
1398
- description ? React.createElement(Description, { id: `${id}-description` }, description) : null,
1399
- React.createElement("div", { id: `${id}-children` }, children),
1400
- validationText ? React.createElement(Validation, { id: `${id}-validation` }, validationText) : null));
1401
- };
1402
-
1403
- const Wrapper$8 = styled.fieldset `
1404
- margin-inline-start: 0px;
1405
- margin-inline-end: 0px;
1406
- padding-block-start: 0px;
1407
- padding-inline-start: 0px;
1408
- padding-inline-end: 0px;
1409
- padding-block-end: 0px;
1410
- min-inline-size: min-content;
1411
- border-width: 0px;
1412
- border-style: none;
1413
- border-color: transparent;
1414
- border-image: none;
1415
- `;
1416
- const Label$1 = styled.legend `
1417
- padding-inline-start: 0px;
1418
- padding-inline-end: 0px;
1419
-
1420
- color: ${Colors.BLACK.Hex};
1421
- font-family: ${FontStyles.DEFAULT};
1422
- font-size: ${FontSizes.DEFAULT};
1423
- font-weight: 500;
1424
- line-height: 22px;
1425
- margin-bottom: 6px;
1426
- `;
1427
- const Content$1 = styled.div `
1428
- padding: 20px;
1429
- border-radius: 8px;
1430
- background: #fcfcfc;
1431
- `;
1432
- const FieldGroup = ({ children, label }) => {
1433
- const id = generateUniqueId('field-group');
1434
- return (React.createElement(Wrapper$8, { id: `${id}-wrapper` },
1435
- React.createElement(Label$1, { id: `${id}-label` }, label),
1436
- React.createElement(Content$1, { id: `${id}-content` }, children)));
1437
- };
1438
-
1439
- const Dropzone = styled.div `
1440
- border-radius: 8px;
1441
- border-width: 1px;
1442
- border-style: dashed;
1443
- border-color: ${props => (props.$dragging ? props.theme.PRIMARY_COLOR.Hex : '#cccccc')};
1444
- background: ${props => props.$dragging ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)` : '#ffffff'};
1445
- cursor: copy;
1379
+ action ? (React.createElement(Action, { id: action.id || `${baseId}-action`, onClick: action.onClick }, action.label)) : null),
1380
+ description ? React.createElement(Description, { id: `${baseId}-description` }, description) : null,
1381
+ React.createElement("div", { id: `${baseId}-children` }, children),
1382
+ React.createElement(Validation, { className: 'field-validation-wrapper', id: `${baseId}-validation`, title: validationText }, validationText ? validationText : '\u00A0')));
1383
+ };
1384
+
1385
+ const Wrapper$8 = styled.fieldset `
1386
+ margin-inline-start: 0px;
1387
+ margin-inline-end: 0px;
1388
+ padding-block-start: 0px;
1389
+ padding-inline-start: 0px;
1390
+ padding-inline-end: 0px;
1391
+ padding-block-end: 0px;
1392
+ min-inline-size: min-content;
1393
+ border-width: 0px;
1394
+ border-style: none;
1395
+ border-color: transparent;
1396
+ border-image: none;
1397
+ `;
1398
+ const Label$1 = styled.legend `
1399
+ padding-inline-start: 0px;
1400
+ padding-inline-end: 0px;
1401
+
1402
+ color: ${Colors.BLACK.Hex};
1403
+ font-family: ${FontStyles.DEFAULT};
1404
+ font-size: ${FontSizes.DEFAULT};
1405
+ font-weight: 500;
1406
+ line-height: 22px;
1407
+ margin-bottom: 6px;
1408
+ `;
1409
+ const Content$1 = styled.div `
1410
+ padding: 20px;
1411
+ border-radius: 8px;
1412
+ background: #fcfcfc;
1413
+ `;
1414
+ const FieldGroup = ({ children, label, id }) => {
1415
+ const baseId = id || 'field-group';
1416
+ return (React.createElement(Wrapper$8, { id: `${baseId}-wrapper` },
1417
+ React.createElement(Label$1, { id: `${baseId}-label` }, label),
1418
+ React.createElement(Content$1, { id: `${baseId}-content` }, children)));
1419
+ };
1420
+
1421
+ const Dropzone = styled.div `
1422
+ border-radius: 8px;
1423
+ border-width: 1px;
1424
+ border-style: dashed;
1425
+ border-color: ${props => (props.$dragging ? props.theme.PRIMARY_COLOR.Hex : '#cccccc')};
1426
+ background: ${props => props.$dragging ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)` : '#ffffff'};
1427
+ cursor: copy;
1446
1428
  `;
1447
1429
  Dropzone.defaultProps = { theme: EditableTheme };
1448
- const IconWrapper$1 = styled.div `
1449
- width: 80px;
1450
- height: 80px;
1451
- border-radius: 40px;
1452
- background: ${props => (props.$dragging ? '#ffffff' : '#f5f5f5')};
1453
- display: flex;
1454
- align-items: center;
1455
- justify-content: center;
1456
- `;
1457
- const StyledIcon$3 = styled(Icon) `
1458
- width: 40px !important;
1459
- height: 40px !important;
1460
-
1461
- > path {
1462
- fill: ${Colors.GRAY.Hex} !important;
1463
- }
1464
- `;
1465
- const ClickZone = styled.div `
1466
- margin: 40px 20px;
1467
- display: flex;
1468
- flex-direction: column;
1469
- align-items: center;
1470
- gap: 16px;
1471
- `;
1472
- const Content = styled.div `
1473
- display: flex;
1474
- flex-direction: column;
1475
- align-items: center;
1476
- z-index: 99999;
1477
- gap: 2px;
1478
- `;
1479
- const Files = styled.div `
1480
- display: flex;
1481
- flex-direction: column;
1482
- align-self: stretch;
1483
- gap: 10px;
1484
- margin: 20px;
1485
- `;
1486
- const MessageDiv = styled.div `
1487
- display: flex;
1488
- align-items: center;
1489
- justify-content: center;
1490
- `;
1491
- const File = styled.div `
1492
- display: flex;
1493
- padding: 10px;
1494
- align-items: center;
1495
- justify-content: space-between;
1496
- gap: 10px;
1497
- border-radius: 4px;
1498
- border: 1px solid #cccccc;
1499
- background: #ffffff;
1500
- `;
1501
- const Remove = styled(Icon) `
1502
- width: 24px;
1503
- height: 24px;
1504
- cursor: pointer;
1505
-
1506
- > path {
1507
- fill: ${Colors.RED.Hex} !important;
1508
- }
1509
- `;
1510
- const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, value = [], message, tooltipInfo = '', validateFile, }) => {
1430
+ const IconWrapper$1 = styled.div `
1431
+ width: 80px;
1432
+ height: 80px;
1433
+ border-radius: 40px;
1434
+ background: ${props => (props.$dragging ? '#ffffff' : '#f5f5f5')};
1435
+ display: flex;
1436
+ align-items: center;
1437
+ justify-content: center;
1438
+ `;
1439
+ const StyledIcon$3 = styled(Icon) `
1440
+ width: 40px !important;
1441
+ height: 40px !important;
1442
+
1443
+ > path {
1444
+ fill: ${Colors.GRAY.Hex} !important;
1445
+ }
1446
+ `;
1447
+ const ClickZone = styled.div `
1448
+ margin: 40px 20px;
1449
+ display: flex;
1450
+ flex-direction: column;
1451
+ align-items: center;
1452
+ gap: 16px;
1453
+ `;
1454
+ const Content = styled.div `
1455
+ display: flex;
1456
+ flex-direction: column;
1457
+ align-items: center;
1458
+ z-index: 99999;
1459
+ gap: 2px;
1460
+ `;
1461
+ const Files = styled.div `
1462
+ display: flex;
1463
+ flex-direction: column;
1464
+ align-self: stretch;
1465
+ gap: 10px;
1466
+ margin: 20px;
1467
+ `;
1468
+ const MessageDiv = styled.div `
1469
+ display: flex;
1470
+ align-items: center;
1471
+ justify-content: center;
1472
+ `;
1473
+ const File = styled.div `
1474
+ display: flex;
1475
+ padding: 10px;
1476
+ align-items: center;
1477
+ justify-content: space-between;
1478
+ gap: 10px;
1479
+ border-radius: 4px;
1480
+ border: 1px solid #cccccc;
1481
+ background: #ffffff;
1482
+ `;
1483
+ const Remove = styled(Icon) `
1484
+ width: 24px;
1485
+ height: 24px;
1486
+ cursor: pointer;
1487
+
1488
+ > path {
1489
+ fill: ${Colors.RED.Hex} !important;
1490
+ }
1491
+ `;
1492
+ const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, value = [], message, tooltipInfo = '', validateFile, id, }) => {
1511
1493
  const inputRef = useRef(null);
1512
1494
  const [files, setFiles] = useState(value || []);
1513
1495
  const [dragging, setDragging] = useState(false);
@@ -1606,27 +1588,27 @@ const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, val
1606
1588
  setAllowMoreFiles(false);
1607
1589
  }
1608
1590
  }, [files]);
1609
- const id = generateUniqueId('file-upload');
1591
+ const baseId = id || 'file-upload';
1610
1592
  return (React.createElement(React.Fragment, null,
1611
- React.createElement("input", { accept: accept, id: `${id}-input`, multiple: true, onChange: allowMoreFiles ? handleChange : undefined, ref: inputRef, style: { display: 'none' }, type: 'file' }),
1612
- React.createElement(Dropzone, { "$dragging": dragging, id: `${id}-dropzone`, onDragEnter: allowMoreFiles ? handleDrag : undefined, onDragLeave: allowMoreFiles ? handleDrag : undefined, onDragOver: allowMoreFiles ? handleDrag : undefined, onDrop: allowMoreFiles ? handleDrop : undefined, value: files ? files : [] },
1613
- files.length ? (React.createElement(Files, { id: `${id}-files` }, files.map(file => {
1614
- const fileId = generateUniqueId('file');
1593
+ React.createElement("input", { accept: accept, id: `${baseId}-input`, multiple: true, onChange: allowMoreFiles ? handleChange : undefined, ref: inputRef, style: { display: 'none' }, type: 'file' }),
1594
+ React.createElement(Dropzone, { "$dragging": dragging, id: `${baseId}-dropzone`, onDragEnter: allowMoreFiles ? handleDrag : undefined, onDragLeave: allowMoreFiles ? handleDrag : undefined, onDragOver: allowMoreFiles ? handleDrag : undefined, onDrop: allowMoreFiles ? handleDrop : undefined, value: files ? files : [] },
1595
+ files.length ? (React.createElement(Files, { id: `${baseId}-files` }, files.map((file, index) => {
1596
+ const fileId = `${baseId}-file-${index}`;
1615
1597
  return (React.createElement(File, { id: `${fileId}-file`, key: file.name },
1616
1598
  React.createElement(Copy, { id: `${fileId}-file-name`, type: 'bold' }, file.name),
1617
1599
  React.createElement(Remove, { id: `${fileId}-remove`, onClick: handleRemove.bind(null, file), path: mdiMinusCircle })));
1618
1600
  }))) : null,
1619
- allowMoreFiles ? (React.createElement(ClickZone, { id: `${id}-click-zone`, onClick: triggerFileExplorer },
1620
- files.length ? null : (React.createElement(IconWrapper$1, { "$dragging": dragging, id: `${id}-icon-wrapper` },
1621
- React.createElement(StyledIcon$3, { id: `${id}-icon`, path: mdiFolderPlusOutline }))),
1622
- React.createElement(Content, { id: `${id}-content` },
1623
- React.createElement(Copy, { align: 'center', id: `${id}-copy`, type: 'bold' }, "Drag & drop files here or click to select files"),
1624
- message ? (React.createElement(MessageDiv, { id: `${id}-message-div` },
1625
- React.createElement(Copy, { align: 'center', color: 'GRAY', id: `${id}-message` }, message),
1626
- tooltipInfo && (React.createElement("span", { id: `${id}-tooltip` },
1601
+ allowMoreFiles ? (React.createElement(ClickZone, { id: `${baseId}-click-zone`, onClick: triggerFileExplorer },
1602
+ files.length ? null : (React.createElement(IconWrapper$1, { "$dragging": dragging, id: `${baseId}-icon-wrapper` },
1603
+ React.createElement(StyledIcon$3, { id: `${baseId}-icon`, path: mdiFolderPlusOutline }))),
1604
+ React.createElement(Content, { id: `${baseId}-content` },
1605
+ React.createElement(Copy, { align: 'center', id: `${baseId}-copy`, type: 'bold' }, "Drag & drop files here or click to select files"),
1606
+ message ? (React.createElement(MessageDiv, { id: `${baseId}-message-div` },
1607
+ React.createElement(Copy, { align: 'center', color: 'GRAY', id: `${baseId}-message` }, message),
1608
+ tooltipInfo && (React.createElement("span", { id: `${baseId}-tooltip` },
1627
1609
  React.createElement(Tooltip, { children: tooltipInfo, position: 'left-center' }))))) : null))) : null)));
1628
- };
1629
-
1610
+ };
1611
+
1630
1612
  const getAgesFromDob = (dob) => {
1631
1613
  let calculated_current_age = null;
1632
1614
  let calculated_nearest_age = null;
@@ -1699,154 +1681,154 @@ const formatAsSsn = (number) => {
1699
1681
  formatted_value = `${formatted_value.substring(0, 3)}-${formatted_value.substring(3, 5)}-${formatted_value.substring(5, 9)}`;
1700
1682
  }
1701
1683
  return formatted_value;
1702
- };
1703
-
1704
- const StyledInput = styled.input `
1705
- border: none !important;
1706
- background: none !important;
1707
- font-size: ${FontSizes.DEFAULT};
1708
- font-weight: 400;
1709
- font-family: ${FontStyles.DEFAULT};
1710
- line-height: 1.28em;
1684
+ };
1685
+
1686
+ const StyledInput = styled.input `
1687
+ border: none !important;
1688
+ background: none !important;
1689
+ font-size: ${FontSizes.DEFAULT};
1690
+ font-weight: 400;
1691
+ font-family: ${FontStyles.DEFAULT};
1692
+ line-height: 1.28em;
1711
1693
  color: ${props => props.$showErrorTextColor && props.$invalid && !props.$readOnly
1712
1694
  ? Colors.RED.Hex
1713
- : Colors.BLACK.Hex};
1714
- position: relative;
1715
- height: ${props => props.$height || 'auto'};
1716
- padding: 10px;
1717
- opacity: ${props => (props.$readOnly ? 0.6 : 1)};
1718
- box-shadow: none;
1719
- outline: none;
1720
- margin: 0px;
1721
- text-indent: 0px;
1722
- --webkit-appearance: none;
1723
- box-sizing: border-box;
1724
- display: block;
1725
- width: 100%;
1726
- `;
1727
- const StyledTextArea = styled.textarea `
1728
- border: none !important;
1729
- background: none !important;
1730
- overflow-y: scroll !important;
1731
- font-size: 14px;
1732
- font-weight: 400;
1733
- height: ${props => props.$height || 'auto'};
1734
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
1735
- line-height: 1.28em;
1695
+ : Colors.BLACK.Hex};
1696
+ position: relative;
1697
+ height: ${props => props.$height || 'auto'};
1698
+ padding: 10px;
1699
+ opacity: ${props => (props.$readOnly ? 0.6 : 1)};
1700
+ box-shadow: none;
1701
+ outline: none;
1702
+ margin: 0px;
1703
+ text-indent: 0px;
1704
+ --webkit-appearance: none;
1705
+ box-sizing: border-box;
1706
+ display: block;
1707
+ width: 100%;
1708
+ `;
1709
+ const StyledTextArea = styled.textarea `
1710
+ border: none !important;
1711
+ background: none !important;
1712
+ overflow-y: scroll !important;
1713
+ font-size: 14px;
1714
+ font-weight: 400;
1715
+ height: ${props => props.$height || 'auto'};
1716
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
1717
+ line-height: 1.28em;
1736
1718
  color: ${props => props.$showErrorTextColor && props.$invalid && !props.$readOnly
1737
1719
  ? Colors.RED.Hex
1738
- : Colors.BLACK.Hex};
1739
- position: relative;
1740
- padding: 10px;
1741
- opacity: 1;
1742
- box-shadow: none;
1743
- outline: none;
1744
- margin: 0px;
1745
- text-indent: 0px;
1746
- --webkit-appearance: none;
1747
- overflow-wrap: break-word;
1748
- box-sizing: border-box;
1749
- display: block;
1750
- width: 100%;
1720
+ : Colors.BLACK.Hex};
1721
+ position: relative;
1722
+ padding: 10px;
1723
+ opacity: 1;
1724
+ box-shadow: none;
1725
+ outline: none;
1726
+ margin: 0px;
1727
+ text-indent: 0px;
1728
+ --webkit-appearance: none;
1729
+ overflow-wrap: break-word;
1730
+ box-sizing: border-box;
1731
+ display: block;
1732
+ width: 100%;
1751
1733
  ${({ $readOnly }) => $readOnly &&
1752
- `
1753
- background-color: #f0f0f0;
1754
- color: #999999;
1755
- overflow-y: scroll;
1756
- `}
1757
- `;
1758
- const StyledSuffix = styled.div `
1759
- box-sizing: border-box;
1760
- border-radius: 0px 4px 4px 0px;
1761
- display: flex;
1762
- justify-content: center;
1763
- align-items: center;
1764
- padding: 10px;
1765
- height: auto;
1766
- background: #f5f5f5;
1767
- border-width: 0px 0px 0px 1px;
1768
- border-style: solid;
1769
- border-color: #cccccc;
1770
- font-family: ${FontStyles.DEFAULT};
1771
- font-style: normal;
1772
- font-weight: 400;
1773
- font-size: ${FontSizes.DEFAULT};
1774
- color: ${Colors.BLACK.Hex};
1775
- `;
1776
- const StyledWrapper = styled.div `
1777
- display: flex;
1778
- width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1779
- background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1780
- position: relative;
1781
- border-width: 1px;
1782
- border-style: solid;
1783
- border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
1784
- border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
1785
-
1786
- &:focus-within {
1787
- border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1788
- }
1734
+ `
1735
+ background-color: #f0f0f0;
1736
+ color: #999999;
1737
+ overflow-y: scroll;
1738
+ `}
1739
+ `;
1740
+ const StyledSuffix = styled.div `
1741
+ box-sizing: border-box;
1742
+ border-radius: 0px 4px 4px 0px;
1743
+ display: flex;
1744
+ justify-content: center;
1745
+ align-items: center;
1746
+ padding: 10px;
1747
+ height: auto;
1748
+ background: #f5f5f5;
1749
+ border-width: 0px 0px 0px 1px;
1750
+ border-style: solid;
1751
+ border-color: #cccccc;
1752
+ font-family: ${FontStyles.DEFAULT};
1753
+ font-style: normal;
1754
+ font-weight: 400;
1755
+ font-size: ${FontSizes.DEFAULT};
1756
+ color: ${Colors.BLACK.Hex};
1757
+ `;
1758
+ const StyledWrapper = styled.div `
1759
+ display: flex;
1760
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1761
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1762
+ position: relative;
1763
+ border-width: 1px;
1764
+ border-style: solid;
1765
+ border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
1766
+ border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
1767
+
1768
+ &:focus-within {
1769
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1770
+ }
1789
1771
  `;
1790
1772
  StyledWrapper.defaultProps = { theme: EditableTheme };
1791
- const SuggestedValues = styled.div `
1792
- background: #fff;
1793
- box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
1794
- border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
1795
- border-radius: 0px 0px 4px 4px;
1796
- border-style: solid;
1797
- border-top: none;
1798
- border-width: 1px;
1799
- left: -1px;
1800
- position: absolute;
1801
- right: -1px;
1802
- top: 39px;
1803
- z-index: 9999;
1804
- max-height: 220px;
1805
- overflow: auto;
1773
+ const SuggestedValues = styled.div `
1774
+ background: #fff;
1775
+ box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
1776
+ border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
1777
+ border-radius: 0px 0px 4px 4px;
1778
+ border-style: solid;
1779
+ border-top: none;
1780
+ border-width: 1px;
1781
+ left: -1px;
1782
+ position: absolute;
1783
+ right: -1px;
1784
+ top: 39px;
1785
+ z-index: 9999;
1786
+ max-height: 220px;
1787
+ overflow: auto;
1806
1788
  `;
1807
1789
  SuggestedValues.defaultProps = { theme: EditableTheme };
1808
- const SuggestedSummary = styled.div `
1809
- color: ${Colors.MEDIUM_GRAY.Hex};
1810
- font-size: 12px;
1811
- font-family: ${FontStyles.DEFAULT};
1812
- font-weight: 500;
1813
- line-height: 18px;
1814
- padding: 10px 12px;
1815
- border-bottom: 1px solid #e5e5e5;
1816
- background: #fff;
1817
- z-index: 1;
1818
- position: sticky;
1819
- top: 0px;
1820
- `;
1821
- const SuggestedValue = styled.div `
1822
- cursor: pointer;
1823
- padding: 8px 12px;
1824
- font-size: ${FontSizes.DEFAULT};
1825
- font-family: ${FontStyles.DEFAULT};
1826
- font-weight: 400;
1827
- line-height: 1.6em;
1828
- color: ${Colors.BLACK.Hex};
1829
-
1830
- &:hover {
1831
- background: rgba(${props => props.theme.PRIMARY_COLOR.Rgb}, 0.05);
1832
- }
1790
+ const SuggestedSummary = styled.div `
1791
+ color: ${Colors.MEDIUM_GRAY.Hex};
1792
+ font-size: 12px;
1793
+ font-family: ${FontStyles.DEFAULT};
1794
+ font-weight: 500;
1795
+ line-height: 18px;
1796
+ padding: 10px 12px;
1797
+ border-bottom: 1px solid #e5e5e5;
1798
+ background: #fff;
1799
+ z-index: 1;
1800
+ position: sticky;
1801
+ top: 0px;
1802
+ `;
1803
+ const SuggestedValue = styled.div `
1804
+ cursor: pointer;
1805
+ padding: 8px 12px;
1806
+ font-size: ${FontSizes.DEFAULT};
1807
+ font-family: ${FontStyles.DEFAULT};
1808
+ font-weight: 400;
1809
+ line-height: 1.6em;
1810
+ color: ${Colors.BLACK.Hex};
1811
+
1812
+ &:hover {
1813
+ background: rgba(${props => props.theme.PRIMARY_COLOR.Rgb}, 0.05);
1814
+ }
1833
1815
  `;
1834
1816
  SuggestedValue.defaultProps = { theme: EditableTheme };
1835
- const CharacterCount = styled.div `
1836
- font-family: ${FontStyles.DEFAULT};
1837
- font-size: ${FontSizes.SMALL};
1838
- color: ${Colors.MEDIUM_GRAY.Hex};
1839
- padding: 10px;
1817
+ const CharacterCount = styled.div `
1818
+ font-family: ${FontStyles.DEFAULT};
1819
+ font-size: ${FontSizes.SMALL};
1820
+ color: ${Colors.MEDIUM_GRAY.Hex};
1821
+ padding: 10px;
1840
1822
  `;
1841
- const Loader$1 = styled.div `
1842
- padding: 0px 10px;
1843
- display: flex;
1844
- align-items: center;
1823
+ const Loader$1 = styled.div `
1824
+ padding: 0px 10px;
1825
+ display: flex;
1826
+ align-items: center;
1845
1827
  `;
1846
1828
  const Input$1 = (_a) => {
1847
1829
  var { format, suffix, height, invalid, loading, max, maxLength, min, onBlur, onChange, onFocus, onKeyDown,
1848
1830
  // eslint-disable-next-line @typescript-eslint/no-empty-function
1849
- onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete"]);
1831
+ onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, id } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete", "id"]);
1850
1832
  const [show_options, setShowOptions] = useState(false);
1851
1833
  const [internalValue, setInternalValue] = useState(value);
1852
1834
  const [internalSuggestedValues, setInternalSuggestedValues] = useState(suggestedValues || []);
@@ -1918,8 +1900,8 @@ const Input$1 = (_a) => {
1918
1900
  if (format === 'ssn' && type !== 'password') {
1919
1901
  formatted_value = formatAsSsn(internalValue);
1920
1902
  }
1921
- const id = generateUniqueId('input');
1922
- return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, id: `${id}-wrapper` },
1903
+ const baseId = id || 'input';
1904
+ return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, id: `${baseId}-wrapper` },
1923
1905
  React.createElement(StyledTextArea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, maxLength: maxLength, onBlur: readOnly
1924
1906
  ? e => e.preventDefault()
1925
1907
  : e => {
@@ -1934,12 +1916,12 @@ const Input$1 = (_a) => {
1934
1916
  setShowOptions(true);
1935
1917
  if (onFocus)
1936
1918
  onFocus(e);
1937
- }, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, tabIndex: readOnly ? -1 : tabIndex, value: formatted_value }, accessibleProps, { id: `${id}-textarea` })),
1938
- loading ? (React.createElement(Loader$1, { id: `${id}-loader` },
1919
+ }, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, tabIndex: readOnly ? -1 : tabIndex, value: formatted_value }, accessibleProps, { id: `${baseId}-textarea` })),
1920
+ loading ? (React.createElement(Loader$1, { id: `${baseId}-loader` },
1939
1921
  React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: mdiLoading, size: '20px', spin: true }))) : null,
1940
- showCharCount ? (React.createElement(CharacterCount, { id: `${id}-char-count` },
1922
+ showCharCount ? (React.createElement(CharacterCount, { id: `${baseId}-char-count` },
1941
1923
  internalValue.length,
1942
- maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, id: `${id}-wrapper` },
1924
+ maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, id: `${baseId}-wrapper` },
1943
1925
  React.createElement(StyledInput, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, max: max, maxLength: maxLength, min: min, onBlur: readOnly
1944
1926
  ? e => e.preventDefault()
1945
1927
  : e => {
@@ -1956,216 +1938,216 @@ const Input$1 = (_a) => {
1956
1938
  setIsFocused(true);
1957
1939
  if (onFocus)
1958
1940
  onFocus(e);
1959
- }, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, step: step, tabIndex: readOnly ? -1 : tabIndex, type: type, value: format === 'currency_decimal' && internalValue ? `$${formatted_value}` : formatted_value }, accessibleProps, { id: `${id}-input` })),
1960
- loading ? (React.createElement(Loader$1, { id: `${id}-loader` },
1941
+ }, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, step: step, tabIndex: readOnly ? -1 : tabIndex, type: type, value: format === 'currency_decimal' && internalValue ? `$${formatted_value}` : formatted_value }, accessibleProps, { id: `${baseId}-input` })),
1942
+ loading ? (React.createElement(Loader$1, { id: `${baseId}-loader` },
1961
1943
  React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: mdiLoading, size: '20px', spin: true }))) : null,
1962
- showCharCount ? (React.createElement(CharacterCount, { id: `${id}-char-count` },
1944
+ showCharCount ? (React.createElement(CharacterCount, { id: `${baseId}-char-count` },
1963
1945
  internalValue.length,
1964
1946
  maxLength ? ` / ${maxLength}` : null)) : null,
1965
- suffix && React.createElement(StyledSuffix, { id: `${id}-suffix` }, suffix),
1966
- show_options && internalSuggestedValues.length ? (React.createElement(SuggestedValues, { id: `${id}-suggested-values` },
1967
- isAutoComplete ? null : (React.createElement(SuggestedSummary, { id: `${id}-suggested-summary` },
1947
+ suffix && React.createElement(StyledSuffix, { id: `${baseId}-suffix` }, suffix),
1948
+ show_options && internalSuggestedValues.length ? (React.createElement(SuggestedValues, { id: `${baseId}-suggested-values` },
1949
+ isAutoComplete ? null : (React.createElement(SuggestedSummary, { id: `${baseId}-suggested-summary` },
1968
1950
  internalSuggestedValues.length,
1969
1951
  " Results Match \"",
1970
1952
  internalValue,
1971
1953
  "\"")),
1972
- internalSuggestedValues.map((suggestedValue, index) => (React.createElement(SuggestedValue, { id: `${id}-suggested-value-${index}`, key: index, onClick: () => {
1954
+ internalSuggestedValues.map((suggestedValue, index) => (React.createElement(SuggestedValue, { id: `${baseId}-suggested-value-${index}`, key: index, onClick: () => {
1973
1955
  handleInputChange({ target: { value: suggestedValue } });
1974
1956
  onSuggestedSelect();
1975
1957
  setShowOptions(false);
1976
1958
  } }, suggestedValue))))) : null));
1977
- };
1978
-
1979
- const Wrapper$7 = styled.a `
1980
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
1981
- font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
1982
- line-height: ${props => (props.$small ? '1.5em' : '1.6em')};
1983
- letter-spacing: ${props => (props.$small ? '1px' : '0px')};
1984
- font-weight: 500;
1985
- font-style: normal;
1986
- text-decoration: 'none';
1987
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
1988
- margin: 0px;
1989
- padding: 0px;
1990
- box-sizing: border-box;
1991
- cursor: pointer;
1959
+ };
1960
+
1961
+ const Wrapper$7 = styled.a `
1962
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
1963
+ font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
1964
+ line-height: ${props => (props.$small ? '1.5em' : '1.6em')};
1965
+ letter-spacing: ${props => (props.$small ? '1px' : '0px')};
1966
+ font-weight: 500;
1967
+ font-style: normal;
1968
+ text-decoration: none;
1969
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
1970
+ margin: 0px;
1971
+ padding: 0px;
1972
+ box-sizing: border-box;
1973
+ cursor: pointer;
1992
1974
  `;
1993
1975
  Wrapper$7.defaultProps = { theme: EditableTheme };
1994
1976
  const Link = (_a) => {
1995
- var { children, onClick, small } = _a, accessibleProps = __rest(_a, ["children", "onClick", "small"]);
1996
- const id = generateUniqueId('link');
1997
- return (React.createElement(Wrapper$7, Object.assign({ "$small": small, onClick: onClick }, accessibleProps, { id: `${id}-wrapper` }), children));
1998
- };
1999
-
2000
- const dash = keyframes `
2001
- 0% {
2002
- stroke-dasharray: 1, 160;
2003
- stroke-dashoffset: 0;
2004
- }
2005
- 50% {
2006
- stroke-dasharray: 80, 160;
2007
- stroke-dashoffset: -32;
2008
- }
2009
- 100% {
2010
- stroke-dasharray: 80, 160;
2011
- stroke-dashoffset: -124;
2012
- }
2013
- `;
2014
- const Spinner = styled.svg `
2015
- z-index: 2;
2016
- position: absolute;
2017
- top: 50%;
2018
- left: 50%;
2019
- transform: translate(-50%, -50%);
2020
- margin: 0 auto;
2021
- width: 40px;
2022
- height: 40px;
2023
- `;
2024
- const Path = styled.path `
2025
- stroke: #0193d7;
2026
- stroke-linecap: round;
2027
- -webkit-animation: ${dash} 1.1s ease-in-out infinite;
2028
- animation: ${dash} 1.1s ease-in-out infinite;
2029
- `;
2030
- const Loader = () => {
2031
- const id = generateUniqueId('loader');
2032
- return (React.createElement(Spinner, { id: `${id}-spinner`, viewBox: '0 0 16 18' },
2033
- React.createElement(Path, { d: 'M7.21487 1.2868C7.88431 0.9044 8.73031 0.9044 9.39974 1.2868L9.40283 1.28856L14.4613 4.20761C15.1684 4.598 15.5746 5.33558 15.5746 6.11465V8.99996V11.8853C15.5746 12.6507 15.1632 13.3848 14.4617 13.7721L9.37973 16.7132C8.71029 17.0956 7.86428 17.0956 7.19485 16.7132L7.19088 16.7109L2.11279 13.772C1.40602 13.3816 1 12.6441 1 11.8653V8.98995V6.11465C1 5.31458 1.44381 4.59039 2.10827 4.21051L7.21487 1.2868Z', fill: 'none', id: `${id}-path`, strokeWidth: '2' })));
2034
- };
2035
-
2036
- const Steps = styled.div `
2037
- padding: 20px;
2038
- border-bottom: 1px solid #e7e6e6;
2039
- background: #f5f5f5;
2040
- display: flex;
2041
- gap: 30px;
2042
- align-items: center;
2043
- `;
2044
- const Step = styled.div `
2045
- display: flex;
2046
- align-items: center;
2047
- gap: 8px;
2048
- `;
2049
- const StyledIcon$2 = styled(Icon) `
2050
- > path {
2051
- fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2052
- }
1977
+ var { children, onClick, small, id } = _a, accessibleProps = __rest(_a, ["children", "onClick", "small", "id"]);
1978
+ const baseId = id || 'link';
1979
+ return (React.createElement(Wrapper$7, Object.assign({ "$small": small, onClick: onClick }, accessibleProps, { id: `${baseId}-wrapper` }), children));
1980
+ };
1981
+
1982
+ const dash = keyframes `
1983
+ 0% {
1984
+ stroke-dasharray: 1, 160;
1985
+ stroke-dashoffset: 0;
1986
+ }
1987
+ 50% {
1988
+ stroke-dasharray: 80, 160;
1989
+ stroke-dashoffset: -32;
1990
+ }
1991
+ 100% {
1992
+ stroke-dasharray: 80, 160;
1993
+ stroke-dashoffset: -124;
1994
+ }
1995
+ `;
1996
+ const Spinner = styled.svg `
1997
+ z-index: 2;
1998
+ position: absolute;
1999
+ top: 50%;
2000
+ left: 50%;
2001
+ transform: translate(-50%, -50%);
2002
+ margin: 0 auto;
2003
+ width: 40px;
2004
+ height: 40px;
2005
+ `;
2006
+ const Path = styled.path `
2007
+ stroke: #0193d7;
2008
+ stroke-linecap: round;
2009
+ -webkit-animation: ${dash} 1.1s ease-in-out infinite;
2010
+ animation: ${dash} 1.1s ease-in-out infinite;
2011
+ `;
2012
+ const Loader = ({ id }) => {
2013
+ const baseId = id || 'loader';
2014
+ return (React.createElement(Spinner, { id: `${baseId}-spinner`, viewBox: '0 0 16 18' },
2015
+ React.createElement(Path, { d: 'M7.21487 1.2868C7.88431 0.9044 8.73031 0.9044 9.39974 1.2868L9.40283 1.28856L14.4613 4.20761C15.1684 4.598 15.5746 5.33558 15.5746 6.11465V8.99996V11.8853C15.5746 12.6507 15.1632 13.3848 14.4617 13.7721L9.37973 16.7132C8.71029 17.0956 7.86428 17.0956 7.19485 16.7132L7.19088 16.7109L2.11279 13.772C1.40602 13.3816 1 12.6441 1 11.8653V8.98995V6.11465C1 5.31458 1.44381 4.59039 2.10827 4.21051L7.21487 1.2868Z', fill: 'none', id: `${baseId}-path`, strokeWidth: '2' })));
2016
+ };
2017
+
2018
+ const Steps = styled.div `
2019
+ padding: 20px;
2020
+ border-bottom: 1px solid #e7e6e6;
2021
+ background: #f5f5f5;
2022
+ display: flex;
2023
+ gap: 30px;
2024
+ align-items: center;
2025
+ `;
2026
+ const Step = styled.div `
2027
+ display: flex;
2028
+ align-items: center;
2029
+ gap: 8px;
2030
+ `;
2031
+ const StyledIcon$2 = styled(Icon) `
2032
+ > path {
2033
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2034
+ }
2053
2035
  `;
2054
2036
  StyledIcon$2.defaultProps = { theme: EditableTheme };
2055
- const StepIndicator = styled.div `
2056
- width: 30px;
2057
- height: 30px;
2058
- border-radius: 15px;
2059
- background: ${props => (props.$active ? props.theme.PRIMARY_COLOR.Hex : Colors.LIGHT_GRAY.Hex)};
2060
- color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
2061
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
2062
- font-size: 14px;
2063
- font-weight: 500;
2064
- line-height: 1;
2065
- display: flex;
2066
- align-items: center;
2067
- justify-content: center;
2068
- flex-shrink: 0;
2037
+ const StepIndicator = styled.div `
2038
+ width: 30px;
2039
+ height: 30px;
2040
+ border-radius: 15px;
2041
+ background: ${props => (props.$active ? props.theme.PRIMARY_COLOR.Hex : Colors.LIGHT_GRAY.Hex)};
2042
+ color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
2043
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
2044
+ font-size: 14px;
2045
+ font-weight: 500;
2046
+ line-height: 1;
2047
+ display: flex;
2048
+ align-items: center;
2049
+ justify-content: center;
2050
+ flex-shrink: 0;
2069
2051
  `;
2070
2052
  StepIndicator.defaultProps = { theme: EditableTheme };
2071
- const StepLabel = styled.div `
2072
- color: #000;
2073
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
2074
- font-size: 14px;
2075
- font-weight: 500;
2076
- line-height: 1;
2077
- `;
2078
- const StepLine = styled.div `
2079
- height: 2px;
2080
- flex-grow: 1;
2081
- background-color: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.MEDIUM_GRAY.Hex)};
2082
- transition: background-color 0.5s ease-in-out;
2083
- `;
2084
- const ProgressBar = ({ steps, showStepLine = false }) => {
2085
- const id = generateUniqueId('progress-bar');
2086
- return (React.createElement(Steps, { id: `${id}-steps` }, steps.map((step, i) => {
2087
- const stepId = generateUniqueId(`step-${i}`);
2053
+ const StepLabel = styled.div `
2054
+ color: #000;
2055
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
2056
+ font-size: 14px;
2057
+ font-weight: 500;
2058
+ line-height: 1;
2059
+ `;
2060
+ const StepLine = styled.div `
2061
+ height: 2px;
2062
+ flex-grow: 1;
2063
+ background-color: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.MEDIUM_GRAY.Hex)};
2064
+ transition: background-color 0.5s ease-in-out;
2065
+ `;
2066
+ const ProgressBar = ({ steps, showStepLine = false, id }) => {
2067
+ const baseId = id || 'progress-bar';
2068
+ return (React.createElement(Steps, { id: `${baseId}-steps` }, steps.map((step, i) => {
2069
+ const stepId = `${baseId}-step-${i}`;
2088
2070
  return (React.createElement(React.Fragment, { key: i },
2089
2071
  i !== 0 && showStepLine && React.createElement(StepLine, { "$active": step.active, id: `${stepId}-line` }),
2090
2072
  React.createElement(Step, { id: `${stepId}-step` },
2091
2073
  step.complete ? (React.createElement(StyledIcon$2, { id: `${stepId}-icon`, path: mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active, id: `${stepId}-indicator` }, i + 1)),
2092
2074
  React.createElement(StepLabel, { id: `${stepId}-label` }, step.label))));
2093
2075
  })));
2094
- };
2095
-
2096
- const Wrapper$6 = styled.div `
2097
- position: fixed;
2098
- top: 0;
2099
- right: 0;
2100
- bottom: 0;
2101
- left: 0;
2102
- z-index: 9999;
2103
- background: rgba(0, 0, 0, 0.8);
2104
- display: flex;
2105
- align-items: center;
2106
- justify-content: center;
2107
- `;
2108
- const Container$1 = styled.dialog `
2109
- width: ${props => (props.$fullscreen ? 'calc(100vw - 80px)' : props.$maxWidth || '900px')};
2110
- max-width: calc(100vw - 80px);
2111
- height: ${props => (props.$fullscreen ? 'calc(100vh - 80px)' : 'auto')};
2112
- max-height: calc(100vh - 80px);
2113
- border-radius: 8px;
2114
- overflow: hidden;
2115
- box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2116
- outline: none;
2117
- border: none;
2118
- position: relative;
2119
- padding: 0px;
2120
- box-sizing: border-box;
2121
- display: flex;
2122
- flex-direction: column;
2123
- `;
2124
- const Header$1 = styled.div `
2125
- flex-shrink: 0;
2126
- padding: 20px;
2127
- border-bottom: 1px solid #e7e6e6;
2128
- display: flex;
2129
- align-items: center;
2130
- background: #ffffff;
2131
- box-sizing: border-box;
2132
- `;
2133
- const Close = styled.div `
2134
- margin-left: auto;
2135
- display: flex;
2136
- align-items: center;
2137
- padding-left: 20px;
2138
- cursor: pointer;
2139
- `;
2140
- const CloseMsg = styled.span `
2141
- font-size: ${FontSizes.SMALL};
2142
- font-weight: 400;
2143
- font-family: ${FontStyles.DEFAULT};
2144
- line-height: 1em;
2145
- color: ${Colors.MEDIUM_GRAY.Hex};
2146
- `;
2147
- const ContentWrapper = styled.div `
2148
- overflow-x: hidden;
2149
- overflow-y: auto;
2150
- background: #ffffff;
2151
- flex: 1;
2152
- box-sizing: border-box;
2153
- `;
2154
- const ButtonBar = styled.div `
2155
- flex-shrink: 0;
2156
- background: #ffffff;
2157
- padding: 20px;
2158
- border-top: 1px solid #e7e6e6;
2159
- display: flex;
2160
- align-items: center;
2161
- justify-self: flex-end;
2162
- box-sizing: border-box;
2163
- `;
2164
- const ButtonContainer = styled.div `
2165
- margin: 0 10px;
2076
+ };
2077
+
2078
+ const Wrapper$6 = styled.div `
2079
+ position: fixed;
2080
+ top: 0;
2081
+ right: 0;
2082
+ bottom: 0;
2083
+ left: 0;
2084
+ z-index: 9999;
2085
+ background: rgba(0, 0, 0, 0.8);
2086
+ display: flex;
2087
+ align-items: center;
2088
+ justify-content: center;
2089
+ `;
2090
+ const Container$1 = styled.dialog `
2091
+ width: ${props => (props.$fullscreen ? 'calc(100vw - 80px)' : props.$maxWidth || '900px')};
2092
+ max-width: calc(100vw - 80px);
2093
+ height: ${props => (props.$fullscreen ? 'calc(100vh - 80px)' : 'auto')};
2094
+ max-height: calc(100vh - 80px);
2095
+ border-radius: 8px;
2096
+ overflow: hidden;
2097
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2098
+ outline: none;
2099
+ border: none;
2100
+ position: relative;
2101
+ padding: 0px;
2102
+ box-sizing: border-box;
2103
+ display: flex;
2104
+ flex-direction: column;
2105
+ `;
2106
+ const Header$1 = styled.div `
2107
+ flex-shrink: 0;
2108
+ padding: 20px;
2109
+ border-bottom: 1px solid #e7e6e6;
2110
+ display: flex;
2111
+ align-items: center;
2112
+ background: #ffffff;
2113
+ box-sizing: border-box;
2114
+ `;
2115
+ const Close = styled.div `
2116
+ margin-left: auto;
2117
+ display: flex;
2118
+ align-items: center;
2119
+ padding-left: 20px;
2120
+ cursor: pointer;
2121
+ `;
2122
+ const CloseMsg = styled.span `
2123
+ font-size: ${FontSizes.SMALL};
2124
+ font-weight: 400;
2125
+ font-family: ${FontStyles.DEFAULT};
2126
+ line-height: 1em;
2127
+ color: ${Colors.MEDIUM_GRAY.Hex};
2128
+ `;
2129
+ const ContentWrapper = styled.div `
2130
+ overflow-x: hidden;
2131
+ overflow-y: auto;
2132
+ background: #ffffff;
2133
+ flex: 1;
2134
+ box-sizing: border-box;
2135
+ `;
2136
+ const ButtonBar = styled.div `
2137
+ flex-shrink: 0;
2138
+ background: #ffffff;
2139
+ padding: 20px;
2140
+ border-top: 1px solid #e7e6e6;
2141
+ display: flex;
2142
+ align-items: center;
2143
+ justify-self: flex-end;
2144
+ box-sizing: border-box;
2145
+ `;
2146
+ const ButtonContainer = styled.div `
2147
+ margin: 0 10px;
2166
2148
  `;
2167
2149
  const Modal = (_a) => {
2168
- var { children, title, onClose, maxWidth, fullscreen, steps, primaryButton, secondaryButton, tertiaryButton, quarternaryButton } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "fullscreen", "steps", "primaryButton", "secondaryButton", "tertiaryButton", "quarternaryButton"]);
2150
+ var { children, title, onClose, maxWidth, fullscreen, steps, primaryButton, secondaryButton, tertiaryButton, quarternaryButton, id } = _a, accessibleProps = __rest(_a, ["children", "title", "onClose", "maxWidth", "fullscreen", "steps", "primaryButton", "secondaryButton", "tertiaryButton", "quarternaryButton", "id"]);
2169
2151
  useEffect(() => {
2170
2152
  document.onkeydown = e => {
2171
2153
  if (e.key === 'Escape') {
@@ -2175,51 +2157,51 @@ const Modal = (_a) => {
2175
2157
  return function cleanup() {
2176
2158
  document.onkeydown = null;
2177
2159
  };
2178
- }, []);
2179
- const id = generateUniqueId('modal');
2180
- return (React.createElement(Wrapper$6, { id: `${id}-wrapper` },
2181
- React.createElement(Container$1, Object.assign({ "$fullscreen": fullscreen, "$maxWidth": maxWidth, open: true }, accessibleProps, { id: `${id}-container` }),
2182
- React.createElement(Header$1, { id: `${id}-header` },
2183
- title ? (React.createElement(Heading, { id: `${id}-title`, type: 'secondary' }, title)) : null,
2184
- React.createElement(Close, { id: `${id}-close`, onClick: onClose },
2185
- React.createElement(CloseMsg, { id: `${id}-close-msg` }, "(Esc)"),
2186
- React.createElement(Icon, { color: Colors.BLACK.Hex, id: `${id}-close-icon`, path: mdiClose, size: '24px' }))),
2160
+ }, [onClose]);
2161
+ const baseId = id || 'modal';
2162
+ return (React.createElement(Wrapper$6, { id: `${baseId}-wrapper` },
2163
+ React.createElement(Container$1, Object.assign({ "$fullscreen": fullscreen, "$maxWidth": maxWidth, open: true }, accessibleProps, { id: `${baseId}-container` }),
2164
+ React.createElement(Header$1, { id: `${baseId}-header` },
2165
+ title ? (React.createElement(Heading, { id: `${baseId}-title`, type: 'secondary' }, title)) : null,
2166
+ React.createElement(Close, { id: `${baseId}-close`, onClick: onClose },
2167
+ React.createElement(CloseMsg, { id: `${baseId}-close-msg` }, "(Esc)"),
2168
+ React.createElement(Icon, { color: Colors.BLACK.Hex, id: `${baseId}-close-icon`, path: mdiClose, size: '24px' }))),
2187
2169
  steps ? React.createElement(ProgressBar, { steps: steps }) : null,
2188
- React.createElement(ContentWrapper, { id: `${id}-content-wrapper` }, children),
2189
- primaryButton || secondaryButton || tertiaryButton || quarternaryButton ? (React.createElement(ButtonBar, { id: `${id}-button-bar` },
2190
- tertiaryButton || quarternaryButton ? (React.createElement("div", { id: `${id}-left-buttons`, style: {
2170
+ React.createElement(ContentWrapper, { id: `${baseId}-content-wrapper` }, children),
2171
+ primaryButton || secondaryButton || tertiaryButton || quarternaryButton ? (React.createElement(ButtonBar, { id: `${baseId}-button-bar` },
2172
+ tertiaryButton || quarternaryButton ? (React.createElement("div", { id: `${baseId}-left-buttons`, style: {
2191
2173
  marginRight: 'auto',
2192
2174
  paddingRight: 40,
2193
2175
  display: 'flex',
2194
2176
  alignItems: 'center',
2195
2177
  } },
2196
- tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary', id: `${id}-tertiary-button` }))) : null,
2197
- quarternaryButton ? (React.createElement(ButtonContainer, { id: `${id}-quarternary-button-container` },
2198
- React.createElement(Button, Object.assign({}, quarternaryButton, { format: quarternaryButton.format || 'secondary', id: `${id}-quarternary-button` })))) : null)) : null,
2199
- primaryButton || secondaryButton ? (React.createElement("div", { id: `${id}-right-buttons`, style: {
2178
+ tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary', id: `${baseId}-tertiary-button` }))) : null,
2179
+ quarternaryButton ? (React.createElement(ButtonContainer, { id: `${baseId}-quarternary-button-container` },
2180
+ React.createElement(Button, Object.assign({}, quarternaryButton, { format: quarternaryButton.format || 'secondary', id: `${baseId}-quarternary-button` })))) : null)) : null,
2181
+ primaryButton || secondaryButton ? (React.createElement("div", { id: `${baseId}-right-buttons`, style: {
2200
2182
  marginLeft: 'auto',
2201
2183
  paddingLeft: 40,
2202
2184
  display: 'flex',
2203
2185
  alignItems: 'center',
2204
2186
  } },
2205
- secondaryButton ? (React.createElement(ButtonContainer, { id: `${id}-secondary-button-container` },
2206
- React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary', id: `${id}-secondary-button` })))) : null,
2207
- primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary', id: `${id}-primary-button` }))) : null)) : null)) : null)));
2208
- };
2209
-
2210
- const Wrapper$5 = styled.div `
2211
- position: relative;
2212
- width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
2213
- `;
2214
- const Trigger = styled.div `
2215
- box-sizing: border-box;
2216
- border-radius: ${props => (props.$showOptions ? '4px 4px 0px 0px' : '4px')};
2217
- height: 40px;
2218
- padding: 0 10px;
2219
- position: relative;
2220
- cursor: pointer;
2221
- border-width: 1px;
2222
- border-style: solid;
2187
+ secondaryButton ? (React.createElement(ButtonContainer, { id: `${baseId}-secondary-button-container` },
2188
+ React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary', id: `${baseId}-secondary-button` })))) : null,
2189
+ primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary', id: `${baseId}-primary-button` }))) : null)) : null)) : null)));
2190
+ };
2191
+
2192
+ const Wrapper$5 = styled.div `
2193
+ position: relative;
2194
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
2195
+ `;
2196
+ const Trigger = styled.div `
2197
+ box-sizing: border-box;
2198
+ border-radius: ${props => (props.$showOptions ? '4px 4px 0px 0px' : '4px')};
2199
+ height: 40px;
2200
+ padding: 0 10px;
2201
+ position: relative;
2202
+ cursor: pointer;
2203
+ border-width: 1px;
2204
+ border-style: solid;
2223
2205
  border-color: ${props => {
2224
2206
  if (props.$invalid) {
2225
2207
  return Colors.RED.Hex;
@@ -2230,149 +2212,149 @@ const Trigger = styled.div `
2230
2212
  else {
2231
2213
  return '#cccccc';
2232
2214
  }
2233
- }};
2234
- background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
2235
- background-image: none;
2236
- display: flex;
2237
- width: 100%;
2238
- align-items: center;
2239
- justify-content: space-between;
2240
- z-index: 1;
2215
+ }};
2216
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
2217
+ background-image: none;
2218
+ display: flex;
2219
+ width: 100%;
2220
+ align-items: center;
2221
+ justify-content: space-between;
2222
+ z-index: 1;
2241
2223
  `;
2242
2224
  Trigger.defaultProps = { theme: EditableTheme };
2243
- const Value = styled.div `
2244
- color: ${Colors.BLACK.Hex};
2245
- font-family: ${FontStyles.DEFAULT};
2246
- font-size: ${FontSizes.DEFAULT};
2247
- font-weight: 400;
2248
- line-height: 2.9em;
2249
- overflow: hidden;
2250
- text-overflow: ellipsis;
2251
- white-space: nowrap;
2252
- width: 100%;
2253
- `;
2254
- const Options = styled.div `
2255
- background: #fff;
2256
- box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
2257
- border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
2258
- border-radius: 0px 0px 4px 4px;
2259
- border-style: solid;
2260
- border-top: none;
2261
- border-width: 1px;
2262
- left: 0;
2263
- position: absolute;
2264
- right: 0;
2265
- z-index: 10;
2266
- max-height: 220px;
2267
- overflow: auto;
2225
+ const Value = styled.div `
2226
+ color: ${Colors.BLACK.Hex};
2227
+ font-family: ${FontStyles.DEFAULT};
2228
+ font-size: ${FontSizes.DEFAULT};
2229
+ font-weight: 400;
2230
+ line-height: 2.9em;
2231
+ overflow: hidden;
2232
+ text-overflow: ellipsis;
2233
+ white-space: nowrap;
2234
+ width: 100%;
2235
+ `;
2236
+ const Options = styled.div `
2237
+ background: #fff;
2238
+ box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
2239
+ border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
2240
+ border-radius: 0px 0px 4px 4px;
2241
+ border-style: solid;
2242
+ border-top: none;
2243
+ border-width: 1px;
2244
+ left: 0;
2245
+ position: absolute;
2246
+ right: 0;
2247
+ z-index: 10;
2248
+ max-height: 220px;
2249
+ overflow: auto;
2268
2250
  `;
2269
2251
  Options.defaultProps = { theme: EditableTheme };
2270
- const Scrim = styled.div `
2271
- bottom: 0;
2272
- left: 0;
2273
- position: fixed;
2274
- right: 0;
2275
- top: 0;
2276
- z-index: 9;
2277
- `;
2278
- const SearchInput = styled.input `
2279
- position: absolute;
2280
- left: 2px;
2281
- top: 2px;
2282
- z-index: 999;
2283
- width: 90%;
2284
- height: 30px;
2285
- border: none;
2286
- outline: none;
2287
- color: ${Colors.BLACK.Hex};
2288
- font-family: ${FontStyles.DEFAULT};
2289
- font-size: ${FontSizes.DEFAULT};
2290
- font-weight: 400;
2291
- line-height: 2.9em;
2292
- overflow: hidden;
2293
- white-space: nowrap;
2252
+ const Scrim = styled.div `
2253
+ bottom: 0;
2254
+ left: 0;
2255
+ position: fixed;
2256
+ right: 0;
2257
+ top: 0;
2258
+ z-index: 9;
2259
+ `;
2260
+ const SearchInput = styled.input `
2261
+ position: absolute;
2262
+ left: 2px;
2263
+ top: 2px;
2264
+ z-index: 999;
2265
+ width: 90%;
2266
+ height: 30px;
2267
+ border: none;
2268
+ outline: none;
2269
+ color: ${Colors.BLACK.Hex};
2270
+ font-family: ${FontStyles.DEFAULT};
2271
+ font-size: ${FontSizes.DEFAULT};
2272
+ font-weight: 400;
2273
+ line-height: 2.9em;
2274
+ overflow: hidden;
2275
+ white-space: nowrap;
2294
2276
  `;
2295
2277
  const MultiSelect = (_a) => {
2296
- var { readOnly, displayCount = 3, invalid, onChange, options = [], selected = [], showSelectAll, searchable = false, style } = _a, accessibleProps = __rest(_a, ["readOnly", "displayCount", "invalid", "onChange", "options", "selected", "showSelectAll", "searchable", "style"]);
2278
+ var { readOnly, displayCount = 3, invalid, onChange, options = [], selected = [], showSelectAll, searchable = false, style, id } = _a, accessibleProps = __rest(_a, ["readOnly", "displayCount", "invalid", "onChange", "options", "selected", "showSelectAll", "searchable", "style", "id"]);
2297
2279
  const [showOptions, setShowOptions] = useState(false);
2298
2280
  const selected_options = options.filter(o => selected.includes(o.value));
2299
2281
  const [filter, setFilter] = useState('');
2300
- const id = generateUniqueId('multiselect');
2282
+ const baseId = id || 'multiselect';
2301
2283
  // Filter the options based on the filter state
2302
2284
  const filteredOptions = options.filter(o => { var _a, _b; return ((_a = o.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(filter)) || ((_b = o.value) === null || _b === void 0 ? void 0 : _b.toString().toLowerCase().includes(filter)); });
2303
- return (React.createElement(Wrapper$5, { "$style": style, id: `${id}-wrapper` },
2304
- searchable && (React.createElement(SearchInput, { id: `${id}-search-input`, onChange: e => setFilter(e.target.value), onClick: () => setShowOptions(!showOptions), placeholder: `${showSelectAll ? options.length : selected_options.length} Selected`, type: 'text', value: filter })),
2305
- React.createElement(Trigger, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, "$showOptions": showOptions, id: `${id}-trigger`, onClick: readOnly ? undefined : setShowOptions.bind(null, !showOptions) }, accessibleProps),
2306
- React.createElement(Value, { id: `${id}-value` }, selected.length > 0 && selected.length <= displayCount
2285
+ return (React.createElement(Wrapper$5, { "$style": style, id: `${baseId}-wrapper` },
2286
+ searchable && (React.createElement(SearchInput, { id: `${baseId}-search-input`, onChange: e => setFilter(e.target.value), onClick: () => setShowOptions(!showOptions), placeholder: `${showSelectAll ? options.length : selected_options.length} Selected`, type: 'text', value: filter })),
2287
+ React.createElement(Trigger, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, "$showOptions": showOptions, id: `${baseId}-trigger`, onClick: readOnly ? undefined : setShowOptions.bind(null, !showOptions) }, accessibleProps),
2288
+ React.createElement(Value, { id: `${baseId}-value` }, selected.length > 0 && selected.length <= displayCount
2307
2289
  ? selected_options.map(o => o.label || o.value).join(', ')
2308
2290
  : `${selected_options.length} Selected`),
2309
- React.createElement(Icon, { color: Colors.BLACK.Hex, id: `${id}-icon`, path: showOptions ? mdiChevronUp : mdiChevronDown, size: '22px' })),
2310
- showOptions ? (React.createElement(Options, { id: `${id}-options` },
2311
- React.createElement(Checklist, { id: `${id}-checklist`, onChange: onChange, options: filteredOptions, selected: selected, showSelectAll: showSelectAll }))) : null,
2312
- showOptions ? (React.createElement(Scrim, { id: `${id}-scrim`, onClick: setShowOptions.bind(null, !showOptions) })) : null));
2313
- };
2314
-
2315
- const Wrapper$4 = styled.div `
2316
- display: flex;
2317
- padding: 16px 30px;
2318
- align-items: center;
2319
- gap: 20px;
2320
- align-self: stretch;
2321
- border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
2322
- `;
2323
- const Title = styled.div `
2324
- display: flex;
2325
- align-items: center;
2326
- gap: 20px;
2327
- `;
2328
- const Info = styled.div `
2329
- display: flex;
2330
- flex-direction: column;
2331
- align-items: flex-start;
2332
- gap: 4px;
2333
- flex: 1 0 0;
2334
- `;
2335
- const Breadcrumbs = styled.div `
2336
- display: flex;
2337
- align-items: center;
2338
- gap: 4px;
2339
- `;
2340
- const Actions = styled.div `
2341
- display: flex;
2342
- align-items: center;
2343
- gap: 8px;
2344
- `;
2345
- const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu, tag }) => {
2291
+ React.createElement(Icon, { color: Colors.BLACK.Hex, id: `${baseId}-icon`, path: showOptions ? mdiChevronUp : mdiChevronDown, size: '22px' })),
2292
+ showOptions ? (React.createElement(Options, { id: `${baseId}-options` },
2293
+ React.createElement(Checklist, { id: `${baseId}-checklist`, onChange: onChange, options: filteredOptions, selected: selected, showSelectAll: showSelectAll }))) : null,
2294
+ showOptions ? (React.createElement(Scrim, { id: `${baseId}-scrim`, onClick: setShowOptions.bind(null, !showOptions) })) : null));
2295
+ };
2296
+
2297
+ const Wrapper$4 = styled.div `
2298
+ display: flex;
2299
+ padding: 16px 30px;
2300
+ align-items: center;
2301
+ gap: 20px;
2302
+ align-self: stretch;
2303
+ border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
2304
+ `;
2305
+ const Title = styled.div `
2306
+ display: flex;
2307
+ align-items: center;
2308
+ gap: 20px;
2309
+ `;
2310
+ const Info = styled.div `
2311
+ display: flex;
2312
+ flex-direction: column;
2313
+ align-items: flex-start;
2314
+ gap: 4px;
2315
+ flex: 1 0 0;
2316
+ `;
2317
+ const Breadcrumbs = styled.div `
2318
+ display: flex;
2319
+ align-items: center;
2320
+ gap: 4px;
2321
+ `;
2322
+ const Actions = styled.div `
2323
+ display: flex;
2324
+ align-items: center;
2325
+ gap: 8px;
2326
+ `;
2327
+ const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu, tag, id, }) => {
2346
2328
  const { format = 'primary', menuItems = [], label = '', enableHover = true, enableClick = false, show = false, } = buttonMenu || {};
2347
- const id = generateUniqueId('page-header');
2348
- return (React.createElement(Wrapper$4, { id: `${id}-wrapper` },
2349
- React.createElement(Info, { id: `${id}-info` },
2350
- React.createElement(Title, { id: `${id}-title` },
2351
- React.createElement(Heading, { id: `${id}-heading`, type: 'secondary' }, title),
2352
- tag ? React.createElement(Tag, Object.assign({}, tag, { id: `${id}-tag` })) : null),
2353
- breadcrumbs ? (React.createElement(Breadcrumbs, { id: `${id}-breadcrumbs` }, breadcrumbs.map((crumb, i) => {
2354
- const crumbId = generateUniqueId(`breadcrumb-${i}`);
2329
+ const baseId = id || 'page-header';
2330
+ return (React.createElement(Wrapper$4, { id: `${baseId}-wrapper` },
2331
+ React.createElement(Info, { id: `${baseId}-info` },
2332
+ React.createElement(Title, { id: `${baseId}-title` },
2333
+ React.createElement(Heading, { id: `${baseId}-heading`, type: 'secondary' }, title),
2334
+ tag ? React.createElement(Tag, Object.assign({}, tag, { id: `${baseId}-tag` })) : null),
2335
+ breadcrumbs ? (React.createElement(Breadcrumbs, { id: `${baseId}-breadcrumbs` }, breadcrumbs.map((crumb, i) => {
2336
+ const crumbId = `${baseId}-breadcrumb-${i}`;
2355
2337
  return (React.createElement(React.Fragment, { key: i },
2356
2338
  crumb.onClick ? (React.createElement(Link, { id: `${crumbId}-link`, onClick: crumb.onClick, small: true }, crumb.label)) : (React.createElement(Copy, { id: `${crumbId}-copy`, type: 'small' }, crumb.label)),
2357
2339
  i + 1 < breadcrumbs.length ? (React.createElement(Icon$1, { id: `${crumbId}-icon`, path: mdiChevronRight, size: '14px' })) : null));
2358
2340
  }))) : null),
2359
- actions ? (React.createElement(Actions, { id: `${id}-actions` },
2341
+ actions ? (React.createElement(Actions, { id: `${baseId}-actions` },
2360
2342
  actions.map((action, i) => {
2361
2343
  const { label } = action, buttonProps = __rest(action, ["label"]);
2362
- const actionId = generateUniqueId(`action-${i}`);
2344
+ const actionId = `${baseId}-action-${i}`;
2363
2345
  return (React.createElement(Button, Object.assign({}, buttonProps, { id: `${actionId}-button`, key: i, small: true }), label));
2364
2346
  }),
2365
- menuItems.length ? (React.createElement(ButtonMenu, { enableClick: enableClick, enableHover: enableHover, format: format, label: label, menuItems: menuItems, show: show, small: true })) : null)) : null));
2366
- };
2367
-
2368
- const Wrapper$3 = styled.nav `
2369
- box-sizing: border-box;
2370
- display: flex;
2371
- align-items: center;
2372
- column-gap: 10px;
2347
+ menuItems.length ? (React.createElement(ButtonMenu, { enableClick: enableClick, enableHover: enableHover, format: format, id: `${baseId}-button-menu`, label: label, menuItems: menuItems, show: show, small: true })) : null)) : null));
2348
+ };
2349
+
2350
+ const Wrapper$3 = styled.nav `
2351
+ box-sizing: border-box;
2352
+ display: flex;
2353
+ align-items: center;
2354
+ column-gap: 10px;
2373
2355
  `;
2374
2356
  const Pagination = (_a) => {
2375
- var { currentPage = 1, onClick, pageCount = 0 } = _a, accessibleProps = __rest(_a, ["currentPage", "onClick", "pageCount"]);
2357
+ var { currentPage = 1, onClick, pageCount = 0, id } = _a, accessibleProps = __rest(_a, ["currentPage", "onClick", "pageCount", "id"]);
2376
2358
  const is_first_page = currentPage === 1;
2377
2359
  const is_last_page = currentPage === pageCount;
2378
2360
  const handlePrevClick = () => {
@@ -2391,324 +2373,326 @@ const Pagination = (_a) => {
2391
2373
  onClick(new_page);
2392
2374
  }
2393
2375
  };
2394
- const id = generateUniqueId('pagination');
2395
- return (React.createElement(Wrapper$3, Object.assign({}, accessibleProps, { id: `${id}-wrapper` }),
2396
- React.createElement(Button, { disabled: is_first_page, icon: mdiChevronLeft, id: `${id}-prev-button`, onClick: handlePrevClick, small: true }),
2397
- React.createElement(Select, { id: `${id}-select`, onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), p => p + 1).map(p => ({
2376
+ const baseId = id || 'pagination';
2377
+ return (React.createElement(Wrapper$3, Object.assign({}, accessibleProps, { id: `${baseId}-wrapper` }),
2378
+ React.createElement(Button, { disabled: is_first_page, icon: mdiChevronLeft, id: `${baseId}-prev-button`, onClick: handlePrevClick, small: true }),
2379
+ React.createElement(Select, { id: `${baseId}-select`, onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), p => p + 1).map(p => ({
2398
2380
  label: `Page ${p}`,
2399
2381
  value: `${p}`,
2400
2382
  })), value: `${currentPage}` }),
2401
- React.createElement(Button, { disabled: is_last_page, icon: mdiChevronRight, id: `${id}-next-button`, onClick: handleNextClick, small: true })));
2402
- };
2403
-
2404
- const Wrapper$2 = styled.label `
2405
- border-radius: 4px;
2406
- padding: 4px 0px 4px 6px;
2407
- margin-left: -6px;
2408
- cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
2409
- display: flex;
2410
- align-items: center;
2411
- font-size: ${FontSizes.DEFAULT};
2412
- line-height: 1.6em;
2413
- box-sizing: border-box;
2414
- position: relative;
2415
-
2416
- &:focus-within {
2417
- background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
2418
- }
2383
+ React.createElement(Button, { disabled: is_last_page, icon: mdiChevronRight, id: `${baseId}-next-button`, onClick: handleNextClick, small: true })));
2384
+ };
2385
+
2386
+ const Wrapper$2 = styled.label `
2387
+ border-radius: 4px;
2388
+ padding: 4px 0px 4px 6px;
2389
+ margin-left: -6px;
2390
+ cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
2391
+ display: flex;
2392
+ align-items: center;
2393
+ font-size: ${FontSizes.DEFAULT};
2394
+ line-height: 1.6em;
2395
+ box-sizing: border-box;
2396
+ position: relative;
2397
+
2398
+ &:focus-within {
2399
+ background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
2400
+ }
2419
2401
  `;
2420
2402
  Wrapper$2.defaultProps = { theme: EditableTheme };
2421
- const Input = styled.input `
2422
- font-size: 20px;
2423
- margin: 0px;
2424
- line-height: 1.6em;
2425
- box-sizing: border-box;
2426
- position: absolute;
2427
- opacity: 0;
2428
- cursor: pointer;
2429
- height: 0;
2430
- width: 0;
2431
- &:checked + span {
2432
- border-color: ${Colors.PRIMARY.Hex};
2433
- }
2434
- &:checked + span:after {
2435
- background-color: ${Colors.PRIMARY.Hex};
2436
- display: block;
2437
- }
2438
- &:disabled + span {
2439
- background-color: #d3d3d3;
2440
- border-color: #d3d3d3;
2441
- }
2442
- &:disabled + span:after {
2443
- background-color: #fff;
2444
- }
2445
- &:checked:disabled + span:after {
2446
- background-color: ${Colors.MEDIUM_GRAY.Hex};
2447
- }
2448
- `;
2449
- const Check = styled.span `
2450
- height: 17px;
2451
- width: 17px;
2452
- border-radius: 50%;
2453
- background-color: #fff;
2454
- border-width: 2px;
2455
- border-style: solid;
2456
- border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
2457
- box-sizing: border-box;
2458
- position: relative;
2459
- &:after {
2460
- content: '';
2461
- position: absolute;
2462
- top: 2px;
2463
- left: 2px;
2464
- width: 9px;
2465
- height: 9px;
2466
- border-radius: 50%;
2467
- box-sizing: border-box;
2468
- display: none;
2469
- }
2470
- `;
2471
- const Label = styled.span `
2472
- font-family: ${FontStyles.DEFAULT};
2473
- font-size: ${FontSizes.DEFAULT};
2474
- font-weight: 400;
2475
- color: ${Colors.BLACK.Hex};
2476
- line-height: 1.6em;
2477
- margin-left: 6px;
2403
+ const Input = styled.input `
2404
+ font-size: 20px;
2405
+ margin: 0px;
2406
+ line-height: 1.6em;
2407
+ box-sizing: border-box;
2408
+ position: absolute;
2409
+ opacity: 0;
2410
+ cursor: pointer;
2411
+ height: 0;
2412
+ width: 0;
2413
+ &:checked + span {
2414
+ border-color: ${Colors.PRIMARY.Hex};
2415
+ }
2416
+ &:checked + span:after {
2417
+ background-color: ${Colors.PRIMARY.Hex};
2418
+ display: block;
2419
+ }
2420
+ &:disabled + span {
2421
+ background-color: #d3d3d3;
2422
+ border-color: #d3d3d3;
2423
+ }
2424
+ &:disabled + span:after {
2425
+ background-color: #fff;
2426
+ }
2427
+ &:checked:disabled + span:after {
2428
+ background-color: ${Colors.MEDIUM_GRAY.Hex};
2429
+ }
2430
+ `;
2431
+ const Check = styled.span `
2432
+ height: 17px;
2433
+ width: 17px;
2434
+ border-radius: 50%;
2435
+ background-color: #fff;
2436
+ border-width: 2px;
2437
+ border-style: solid;
2438
+ border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
2439
+ box-sizing: border-box;
2440
+ position: relative;
2441
+ &:after {
2442
+ content: '';
2443
+ position: absolute;
2444
+ top: 2px;
2445
+ left: 2px;
2446
+ width: 9px;
2447
+ height: 9px;
2448
+ border-radius: 50%;
2449
+ box-sizing: border-box;
2450
+ display: none;
2451
+ }
2452
+ `;
2453
+ const Label = styled.span `
2454
+ font-family: ${FontStyles.DEFAULT};
2455
+ font-size: ${FontSizes.DEFAULT};
2456
+ font-weight: 400;
2457
+ color: ${Colors.BLACK.Hex};
2458
+ line-height: 1.6em;
2459
+ margin-left: 6px;
2478
2460
  `;
2479
2461
  const Radio = (_a) => {
2480
- var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex"]);
2481
- const id = generateUniqueId('radio');
2482
- return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps, { id: `${id}-wrapper` }),
2483
- React.createElement(Input, { checked: checked, disabled: disabled, id: `${id}-input`, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'radio', value: value }),
2484
- React.createElement(Check, { "$invalid": invalid, id: `${id}-check` }),
2485
- React.createElement(Label, { id: `${id}-label` },
2462
+ var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex, id } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex", "id"]);
2463
+ const baseId = id || 'radio';
2464
+ return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps, { id: `${baseId}-wrapper` }),
2465
+ React.createElement(Input, { checked: checked, disabled: disabled, id: `${baseId}-input`, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'radio', value: value }),
2466
+ React.createElement(Check, { "$invalid": invalid, id: `${baseId}-check` }),
2467
+ React.createElement(Label, { id: `${baseId}-label` },
2486
2468
  children,
2487
2469
  tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)));
2488
- };
2489
-
2470
+ };
2471
+
2490
2472
  const RadioList = (_a) => {
2491
- var { disabled, onChange, options, value } = _a, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "value"]);
2492
- return (React.createElement(React.Fragment, null, options.map((option) => {
2473
+ var { disabled, onChange, options, value, id } = _a, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "value", "id"]);
2474
+ const baseId = id || 'radio-list';
2475
+ return (React.createElement(React.Fragment, null, options.map((option, index) => {
2493
2476
  const label = option.label || option.value;
2494
- return (React.createElement(Radio, Object.assign({ checked: value === option.value, disabled: disabled, onChange: onChange, value: option.value }, accessibleProps), label));
2477
+ const optionId = `${baseId}-option-${index}`;
2478
+ return (React.createElement(Radio, Object.assign({ checked: value === option.value, disabled: disabled, id: optionId, key: option.value, onChange: onChange, value: option.value }, accessibleProps), label));
2495
2479
  })));
2496
- };
2497
-
2498
- const StyledTable = styled.table `
2499
- width: 100%;
2500
- margin-top: 1px;
2501
- table-layout: ${props => props.$tableLayout || 'auto'};
2502
- border-collapse: collapse;
2503
- text-indent: 0px;
2504
- border-spacing: 0px;
2505
- border-color: none;
2506
- box-sizing: border-box;
2507
- `;
2508
- const Header = styled.th `
2509
- padding: 12px !important;
2510
- text-align: left;
2511
- font-weight: 500;
2512
- border-bottom: 1px solid #e5e5e5;
2513
- border-top: 1px solid #e5e5e5;
2514
- text-transform: uppercase;
2515
- font-size: 12px;
2516
- font-family: ${FontStyles.DEFAULT};
2517
- letter-spacing: 1px;
2518
- white-space: nowrap;
2519
- line-height: 1;
2520
- position: relative;
2521
- box-sizing: border-box;
2522
- width: ${props => props.$width || 'auto'};
2523
- cursor: ${props => (props.$isSortable ? 'pointer' : 'default')};
2524
- color: ${props => (props.$isSortable ? props.theme.PRIMARY_COLOR.Hex : Colors.BLACK.Hex)};
2480
+ };
2481
+
2482
+ const StyledTable = styled.table `
2483
+ width: 100%;
2484
+ margin-top: 1px;
2485
+ table-layout: ${props => props.$tableLayout || 'auto'};
2486
+ border-collapse: collapse;
2487
+ text-indent: 0px;
2488
+ border-spacing: 0px;
2489
+ border-color: none;
2490
+ box-sizing: border-box;
2491
+ `;
2492
+ const Header = styled.th `
2493
+ padding: 12px !important;
2494
+ text-align: left;
2495
+ font-weight: 500;
2496
+ border-bottom: 1px solid #e5e5e5;
2497
+ border-top: 1px solid #e5e5e5;
2498
+ text-transform: uppercase;
2499
+ font-size: 12px;
2500
+ font-family: ${FontStyles.DEFAULT};
2501
+ letter-spacing: 1px;
2502
+ white-space: nowrap;
2503
+ line-height: 1;
2504
+ position: relative;
2505
+ box-sizing: border-box;
2506
+ width: ${props => props.$width || 'auto'};
2507
+ cursor: ${props => (props.$isSortable ? 'pointer' : 'default')};
2508
+ color: ${props => (props.$isSortable ? props.theme.PRIMARY_COLOR.Hex : Colors.BLACK.Hex)};
2525
2509
  `;
2526
2510
  Header.defaultProps = { theme: EditableTheme };
2527
- const Row = styled.tr `
2528
- cursor: ${props => (props.$isClickable ? 'pointer' : 'default')};
2529
- transition: all 0.2s;
2530
- background-color: ${props => props.$bgColor};
2531
- box-sizing: border-box;
2532
- &:hover {
2533
- background-color: ${props => props.$isClickable ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.1)` : props.$bgColor};
2534
- }
2511
+ const Row = styled.tr `
2512
+ cursor: ${props => (props.$isClickable ? 'pointer' : 'default')};
2513
+ transition: all 0.2s;
2514
+ background-color: ${props => props.$bgColor};
2515
+ box-sizing: border-box;
2516
+ &:hover {
2517
+ background-color: ${props => props.$isClickable ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.1)` : props.$bgColor};
2518
+ }
2535
2519
  `;
2536
2520
  Row.defaultProps = { theme: EditableTheme };
2537
- const Column = styled.td `
2538
- padding: 16px 12px !important;
2539
- font-size: ${FontSizes.DEFAULT} !important;
2540
- font-weight: 400 !important;
2541
- font-family: ${FontStyles.DEFAULT};
2542
- border: none !important;
2543
- word-break: break-word;
2544
- line-height: 1.4em;
2545
- box-sizing: border-box;
2546
- text-align: ${props => props.$align || 'left'};
2547
- width: ${props => props.$width || 'auto'};
2548
- `;
2549
- const IconWrapper = styled.span `
2550
- position: absolute;
2551
- top: 50%;
2552
- transform: translateY(-50%);
2553
- margin-left: 2px;
2554
- `;
2555
- const StyledIcon$1 = styled(Icon) `
2556
- > path {
2557
- fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2558
- }
2521
+ const Column = styled.td `
2522
+ padding: 16px 12px !important;
2523
+ font-size: ${FontSizes.DEFAULT} !important;
2524
+ font-weight: 400 !important;
2525
+ font-family: ${FontStyles.DEFAULT};
2526
+ border: none !important;
2527
+ word-break: break-word;
2528
+ line-height: 1.4em;
2529
+ box-sizing: border-box;
2530
+ text-align: ${props => props.$align || 'left'};
2531
+ width: ${props => props.$width || 'auto'};
2532
+ `;
2533
+ const IconWrapper = styled.span `
2534
+ position: absolute;
2535
+ top: 50%;
2536
+ transform: translateY(-50%);
2537
+ margin-left: 2px;
2538
+ `;
2539
+ const StyledIcon$1 = styled(Icon) `
2540
+ > path {
2541
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2542
+ }
2559
2543
  `;
2560
2544
  StyledIcon$1.defaultProps = { theme: EditableTheme };
2561
2545
  const Table = (_a) => {
2562
- var { columns = [], data = [], sortBy, sortDirection, hideHeaders, onRowClick, onSortChange, tableLayout } = _a, accessibleProps = __rest(_a, ["columns", "data", "sortBy", "sortDirection", "hideHeaders", "onRowClick", "onSortChange", "tableLayout"]);
2563
- const id = generateUniqueId('table');
2564
- return (React.createElement(StyledTable, Object.assign({ "$tableLayout": tableLayout }, accessibleProps, { id: `${id}-styled-table` }),
2565
- hideHeaders ? null : (React.createElement("thead", { id: `${id}-thead` },
2566
- React.createElement("tr", { id: `${id}-header-row` }, columns.map((column, i) => {
2567
- const columnId = generateUniqueId(`column-${i}`);
2546
+ var { columns = [], data = [], sortBy, sortDirection, hideHeaders, onRowClick, onSortChange, tableLayout, id } = _a, accessibleProps = __rest(_a, ["columns", "data", "sortBy", "sortDirection", "hideHeaders", "onRowClick", "onSortChange", "tableLayout", "id"]);
2547
+ const baseId = id || 'table';
2548
+ return (React.createElement(StyledTable, Object.assign({ "$tableLayout": tableLayout }, accessibleProps, { id: `${baseId}-styled-table` }),
2549
+ hideHeaders ? null : (React.createElement("thead", { id: `${baseId}-thead` },
2550
+ React.createElement("tr", { id: `${baseId}-header-row` }, columns.map((column, i) => {
2551
+ const columnId = `${baseId}-column-${i}`;
2568
2552
  return (React.createElement(Header, { "$isSortable": column.isSortable, "$width": column.width, id: `${columnId}-header`, key: i, onClick: onSortChange === null || onSortChange === void 0 ? void 0 : onSortChange.bind(null, column.id) },
2569
2553
  column.label,
2570
2554
  column.isSortable && sortBy === column.id ? (React.createElement(IconWrapper, { id: `${columnId}-icon-wrapper` },
2571
2555
  React.createElement(StyledIcon$1, { id: `${columnId}-icon`, path: sortDirection === 'asc' ? mdiChevronUp : mdiChevronDown, size: '20px' }))) : null));
2572
2556
  })))),
2573
- data.length ? (React.createElement("tbody", { id: `${id}-tbody` }, data.map((row, i) => {
2574
- const rowId = generateUniqueId(`row-${i}`);
2557
+ data.length ? (React.createElement("tbody", { id: `${baseId}-tbody` }, data.map((row, i) => {
2558
+ const rowId = `${baseId}-row-${i}`;
2575
2559
  return (React.createElement(Row, { "$bgColor": i % 2 === 0 ? '#ffffff' : '#f9f9f9', "$isClickable": !!onRowClick, id: `${rowId}-row`, key: i, onClick: onRowClick ? onRowClick.bind(null, row) : undefined }, columns.map((column, j) => {
2576
- const columnId = generateUniqueId(`column-${j}`);
2560
+ const columnId = `${baseId}-column-${j}`;
2577
2561
  return (React.createElement(Column, { "$align": columns[j].align, "$width": columns[j].width, id: `${columnId}-column`, key: j }, column.render ? column.render(row) : row[column.id] || 'N/A'));
2578
2562
  })));
2579
2563
  }))) : null));
2580
- };
2581
-
2582
- const Wrapper$1 = styled.div `
2583
- display: flex;
2584
- box-sizing: border-box;
2585
- align-items: flex-end;
2586
- border-top: 1px solid #e5e5e5;
2587
- border-bottom: 1px solid #e5e5e5;
2588
- flex-shrink: 0;
2589
- align-self: stretch;
2590
- padding: 0;
2591
- margin: 0;
2592
- `;
2593
- const Tab = styled.div `
2594
- display: flex;
2595
- align-items: center;
2596
- gap: 6px;
2597
- font-size: ${FontSizes.DEFAULT};
2598
- font-family: ${FontStyles.DEFAULT};
2599
- font-weight: ${props => (props.$isActive ? 500 : 400)};
2600
- color: ${props => (props.$isActive ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex)};
2601
- line-height: 1em;
2602
- padding: 16px 30px 12px;
2603
- margin: 0 0 -1px 0;
2604
- border-bottom-width: 4px;
2605
- border-bottom-style: solid;
2606
- border-bottom-color: ${props => props.$isActive ? props.theme.PRIMARY_COLOR.Hex : 'transparent'};
2607
- cursor: ${props => (props.$isActive ? 'default' : 'pointer')};
2608
- box-sizing: border-box;
2609
- &:hover {
2610
- color: ${props => (props.$isActive ? Colors.BLACK.Hex : props.theme.PRIMARY_COLOR.Hex)};
2611
- font-weight: 500;
2612
- }
2564
+ };
2565
+
2566
+ const Wrapper$1 = styled.div `
2567
+ display: flex;
2568
+ box-sizing: border-box;
2569
+ align-items: flex-end;
2570
+ border-top: 1px solid #e5e5e5;
2571
+ border-bottom: 1px solid #e5e5e5;
2572
+ flex-shrink: 0;
2573
+ align-self: stretch;
2574
+ padding: 0;
2575
+ margin: 0;
2576
+ `;
2577
+ const Tab = styled.div `
2578
+ display: flex;
2579
+ align-items: center;
2580
+ gap: 6px;
2581
+ font-size: ${FontSizes.DEFAULT};
2582
+ font-family: ${FontStyles.DEFAULT};
2583
+ font-weight: ${props => (props.$isActive ? 500 : 400)};
2584
+ color: ${props => (props.$isActive ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex)};
2585
+ line-height: 1em;
2586
+ padding: 16px 30px 12px;
2587
+ margin: 0 0 -1px 0;
2588
+ border-bottom-width: 4px;
2589
+ border-bottom-style: solid;
2590
+ border-bottom-color: ${props => props.$isActive ? props.theme.PRIMARY_COLOR.Hex : 'transparent'};
2591
+ cursor: ${props => (props.$isActive ? 'default' : 'pointer')};
2592
+ box-sizing: border-box;
2593
+ &:hover {
2594
+ color: ${props => (props.$isActive ? Colors.BLACK.Hex : props.theme.PRIMARY_COLOR.Hex)};
2595
+ font-weight: 500;
2596
+ }
2613
2597
  `;
2614
2598
  Tab.defaultProps = { theme: EditableTheme };
2615
- const Badge = styled.div `
2616
- display: flex;
2617
- width: 18px;
2618
- height: 18px;
2619
- justify-content: center;
2620
- align-items: center;
2621
- border-radius: 9px;
2622
- background: ${props => (props.$isError ? Colors.RED.Hex : props.theme.PRIMARY_COLOR.Hex)};
2623
- color: #fff;
2624
- font-family: ${FontStyles.DEFAULT};
2625
- font-size: 12px;
2626
- font-weight: 500;
2627
- line-height: 1;
2628
- letter-spacing: 1px;
2599
+ const Badge = styled.div `
2600
+ display: flex;
2601
+ width: 18px;
2602
+ height: 18px;
2603
+ justify-content: center;
2604
+ align-items: center;
2605
+ border-radius: 9px;
2606
+ background: ${props => (props.$isError ? Colors.RED.Hex : props.theme.PRIMARY_COLOR.Hex)};
2607
+ color: #fff;
2608
+ font-family: ${FontStyles.DEFAULT};
2609
+ font-size: 12px;
2610
+ font-weight: 500;
2611
+ line-height: 1;
2612
+ letter-spacing: 1px;
2629
2613
  `;
2630
2614
  Badge.defaultProps = { theme: EditableTheme };
2631
2615
  const Tabs = (_a) => {
2632
- var { tabs } = _a, accessibleProps = __rest(_a, ["tabs"]);
2633
- const id = generateUniqueId('tabs');
2634
- return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps, { id: `${id}-wrapper` }), tabs.map((_a, i) => {
2616
+ var { tabs, id } = _a, accessibleProps = __rest(_a, ["tabs", "id"]);
2617
+ const baseId = id || 'tabs';
2618
+ return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps, { id: `${baseId}-wrapper` }), tabs.map((_a, i) => {
2635
2619
  var { isActive, label, badgeCount, errorBadge, onClick } = _a, accessibleProps = __rest(_a, ["isActive", "label", "badgeCount", "errorBadge", "onClick"]);
2636
- const tabId = generateUniqueId(`tab-${i}`);
2620
+ const tabId = `${baseId}-tab-${i}`;
2637
2621
  return (React.createElement(Tab, Object.assign({ "$isActive": isActive || false, key: i, onClick: isActive ? undefined : onClick }, accessibleProps, { id: `${tabId}-tab` }),
2638
2622
  badgeCount ? (React.createElement(Badge, { "$isError": errorBadge || false, id: `${tabId}-badge` }, badgeCount)) : null,
2639
2623
  label));
2640
2624
  })));
2641
2625
  };
2642
- Tabs.defaultProps = {};
2643
-
2644
- const Track = styled.div `
2645
- height: 24px;
2646
- border-radius: 12px;
2647
- background: ${props => (props.$on ? Colors.GREEN.Hex : Colors.BLACK.Hex)};
2648
- display: flex;
2649
- align-items: center;
2650
- cursor: pointer;
2651
- width: 40px;
2652
- padding: 2px;
2653
- box-sizing: border-box;
2654
- `;
2655
- const Handle = styled.div `
2656
- width: 20px;
2657
- height: 20px;
2658
- border-radius: 10px;
2659
- background: #ffffff;
2660
- margin-left: ${props => (props.$on ? 'auto' : '0px')};
2661
- display: flex;
2662
- align-items: center;
2663
- justify-content: center;
2664
- box-sizing: border-box;
2626
+ Tabs.defaultProps = {};
2627
+
2628
+ const Track = styled.div `
2629
+ height: 24px;
2630
+ border-radius: 12px;
2631
+ background: ${props => (props.$on ? Colors.GREEN.Hex : Colors.BLACK.Hex)};
2632
+ display: flex;
2633
+ align-items: center;
2634
+ cursor: pointer;
2635
+ width: 40px;
2636
+ padding: 2px;
2637
+ box-sizing: border-box;
2638
+ `;
2639
+ const Handle = styled.div `
2640
+ width: 20px;
2641
+ height: 20px;
2642
+ border-radius: 10px;
2643
+ background: #ffffff;
2644
+ margin-left: ${props => (props.$on ? 'auto' : '0px')};
2645
+ display: flex;
2646
+ align-items: center;
2647
+ justify-content: center;
2648
+ box-sizing: border-box;
2665
2649
  `;
2666
2650
  const Toggle = (_a) => {
2667
- var { onClick, on } = _a, accessibleProps = __rest(_a, ["onClick", "on"]);
2668
- const id = generateUniqueId('toggle');
2669
- return (React.createElement(Track, Object.assign({ "$on": on, onClick: onClick }, accessibleProps, { id: `${id}-track` }),
2670
- React.createElement("input", { checked: on, id: `${id}-input`, name: accessibleProps.name, type: 'hidden' }),
2671
- React.createElement(Handle, { "$on": on, id: `${id}-handle` },
2672
- React.createElement(Icon, { color: on ? Colors.GREEN.Hex : Colors.BLACK.Hex, id: `${id}-icon`, path: on ? mdiCheck : mdiClose, size: '16px' }))));
2651
+ var { onClick, on, id } = _a, accessibleProps = __rest(_a, ["onClick", "on", "id"]);
2652
+ const baseId = id || 'toggle';
2653
+ return (React.createElement(Track, Object.assign({ "$on": on, onClick: onClick }, accessibleProps, { id: `${baseId}-track` }),
2654
+ React.createElement("input", { checked: on, id: `${baseId}-input`, name: accessibleProps.name, type: 'hidden' }),
2655
+ React.createElement(Handle, { "$on": on, id: `${baseId}-handle` },
2656
+ React.createElement(Icon, { color: on ? Colors.GREEN.Hex : Colors.BLACK.Hex, id: `${baseId}-icon`, path: on ? mdiCheck : mdiClose, size: '16px' }))));
2673
2657
  };
2674
- Toggle.defaultProps = {};
2675
-
2676
- const Container = styled.div `
2677
- width: 100%;
2678
- padding: 40px auto;
2679
- gap: 20px;
2680
- display: flex;
2681
- flex-direction: column;
2682
- justify-items: center;
2683
- align-items: center;
2684
- `;
2685
- const Wrapper = styled.div `
2686
- gap: 10px;
2687
- display: flex;
2688
- flex-direction: column;
2689
- justify-items: center;
2690
- align-items: center;
2691
- `;
2692
- const StyledIcon = styled.div `
2693
- display: flex;
2694
- align-items: center;
2695
- justify-content: center;
2696
- width: 80px;
2697
- height: 80px;
2698
- border-radius: 40px;
2699
- background: #f5f5f5;
2658
+ Toggle.defaultProps = {};
2659
+
2660
+ const Container = styled.div `
2661
+ width: 100%;
2662
+ padding: 40px auto;
2663
+ gap: 20px;
2664
+ display: flex;
2665
+ flex-direction: column;
2666
+ justify-items: center;
2667
+ align-items: center;
2668
+ `;
2669
+ const Wrapper = styled.div `
2670
+ gap: 10px;
2671
+ display: flex;
2672
+ flex-direction: column;
2673
+ justify-items: center;
2674
+ align-items: center;
2675
+ `;
2676
+ const StyledIcon = styled.div `
2677
+ display: flex;
2678
+ align-items: center;
2679
+ justify-content: center;
2680
+ width: 80px;
2681
+ height: 80px;
2682
+ border-radius: 40px;
2683
+ background: #f5f5f5;
2700
2684
  `;
2701
2685
  const ZeroState = (_a) => {
2702
- var { icon, title, description, action } = _a, accessibleProps = __rest(_a, ["icon", "title", "description", "action"]);
2703
- const id = generateUniqueId('zero-state');
2704
- return (React.createElement(Container, Object.assign({}, accessibleProps, { id: `${id}-container` }),
2705
- React.createElement(StyledIcon, { id: `${id}-icon-wrapper` },
2706
- React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, id: `${id}-icon`, path: icon, size: '40px' })),
2707
- React.createElement(Wrapper, { id: `${id}-wrapper` },
2708
- React.createElement(Heading, { children: title, id: `${id}-heading`, type: 'tertiary' }),
2709
- description && (React.createElement(Copy, { align: 'center', children: description, color: 'GRAY', id: `${id}-description`, type: 'default' }))),
2710
- action && (React.createElement(Button, { children: action.children, disabled: action.disabled, format: action.format, icon: action.icon, id: `${id}-button`, onClick: action.onClick }))));
2711
- };
2712
-
2713
- export { Accordion, ActionDialog, Alert, AppHeader, AppMenu, BulkActionBar, Button, ButtonMenu, Checkbox, Checklist, Colors, Copy, DatePicker, Drawer, EditableTheme, Field, FieldGroup, FileUpload, FontSizes, FontStyles, Heading, Input$1 as Input, Link, Loader, Logo, Modal, MoreMenu, MultiSelect, PageHeader, Pagination, ProgressBar, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, Tooltip, ZeroState, formatAsPhone, formatAsSsn, getAgesFromDob, getDaysForMonth, getYears, validateEmail, validatePhone };
2714
- //# sourceMappingURL=index.js.map
2686
+ var { icon, title, description, action, id } = _a, accessibleProps = __rest(_a, ["icon", "title", "description", "action", "id"]);
2687
+ const baseId = id || 'zero-state';
2688
+ return (React.createElement(Container, Object.assign({}, accessibleProps, { id: `${baseId}-container` }),
2689
+ React.createElement(StyledIcon, { id: `${baseId}-icon-wrapper` },
2690
+ React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, id: `${baseId}-icon`, path: icon, size: '40px' })),
2691
+ React.createElement(Wrapper, { id: `${baseId}-wrapper` },
2692
+ React.createElement(Heading, { children: title, id: `${baseId}-heading`, type: 'tertiary' }),
2693
+ description && (React.createElement(Copy, { align: 'center', children: description, color: 'GRAY', id: `${baseId}-description`, type: 'default' }))),
2694
+ action && (React.createElement(Button, { children: action.children, disabled: action.disabled, format: action.format, icon: action.icon, id: `${baseId}-button`, onClick: action.onClick }))));
2695
+ };
2696
+
2697
+ export { Accordion, ActionDialog, Alert, AppHeader, AppMenu, BulkActionBar, Button, ButtonMenu, Checkbox, Checklist, Colors, Copy, DatePicker, Drawer, EditableTheme, Field, FieldGroup, FileUpload, FontSizes, FontStyles, Heading, Input$1 as Input, Link, Loader, Logo, Modal, MoreMenu, MultiSelect, PageHeader, Pagination, ProgressBar, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, Tooltip, ZeroState, formatAsPhone, formatAsSsn, getAgesFromDob, getDaysForMonth, getYears, validateEmail, validatePhone };
2698
+ //# sourceMappingURL=index.js.map