@hexure/ui 1.13.30 → 1.13.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -1,13 +1,13 @@
1
- 'use strict';
2
-
3
- var React = require('react');
4
- var styled = require('styled-components');
5
- var Icon = require('@mdi/react');
6
- var js = require('@mdi/js');
7
- var dayjs = require('dayjs');
8
- var Numeral = require('numeral');
9
- var Moment = require('moment');
10
-
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var styled = require('styled-components');
5
+ var Icon = require('@mdi/react');
6
+ var js = require('@mdi/js');
7
+ var dayjs = require('dayjs');
8
+ var Numeral = require('numeral');
9
+ var Moment = require('moment');
10
+
11
11
  /******************************************************************************
12
12
  Copyright (c) Microsoft Corporation.
13
13
 
@@ -21,22 +21,22 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
21
21
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
22
22
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23
23
  PERFORMANCE OF THIS SOFTWARE.
24
- ***************************************************************************** */
25
- /* global Reflect, Promise, SuppressedError, Symbol */
26
-
27
- function __rest(s, e) {
28
- var t = {};
29
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
30
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
32
- }
33
- return t;
34
- }
35
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
36
- var e = new Error(message);
37
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
38
- };
39
-
24
+ ***************************************************************************** */
25
+ /* global Reflect, Promise, SuppressedError, Symbol */
26
+
27
+ function __rest(s, e) {
28
+ var t = {};
29
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
30
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
32
+ }
33
+ return t;
34
+ }
35
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
36
+ var e = new Error(message);
37
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
38
+ };
39
+
40
40
  const Colors = {
41
41
  PRIMARY: {
42
42
  Hex: '#0193D7',
@@ -85,68 +85,80 @@ const FontSizes = {
85
85
  };
86
86
  const EditableTheme = {
87
87
  PRIMARY_COLOR: Colors.PRIMARY,
88
- };
89
-
90
- const Header$3 = styled.div `
91
- display: flex;
92
- align-items: center;
93
- justify-content: space-between;
94
- box-sizing: border-box;
95
- background: #f5f5f5;
96
- border: 1px solid #e5e5e5;
97
- padding: 14px 20px;
98
- height: 50px;
99
- cursor: pointer;
100
- `;
101
- const Title$2 = styled.div `
102
- font-size: ${FontSizes.DEFAULT};
103
- font-weight: 400;
104
- color: ${Colors.BLACK.Hex};
105
- line-height: 1.6em;
106
- font-family: ${FontStyles.DEFAULT};
107
- box-sizing: border-box;
88
+ };
89
+
90
+ //function to generate unique ids
91
+ const generateUniqueId = (() => {
92
+ let counter = 0;
93
+ return (prefix = 'id') => {
94
+ counter += 1;
95
+ return `${prefix}-${counter}`;
96
+ };
97
+ })();
98
+
99
+ const Header$3 = styled.div `
100
+ display: flex;
101
+ align-items: center;
102
+ justify-content: space-between;
103
+ box-sizing: border-box;
104
+ background: #f5f5f5;
105
+ border: 1px solid #e5e5e5;
106
+ padding: 14px 20px;
107
+ height: 50px;
108
+ cursor: pointer;
109
+ `;
110
+ const Title$2 = styled.div `
111
+ font-size: ${FontSizes.DEFAULT};
112
+ font-weight: 400;
113
+ color: ${Colors.BLACK.Hex};
114
+ line-height: 1.6em;
115
+ font-family: ${FontStyles.DEFAULT};
116
+ box-sizing: border-box;
108
117
  `;
109
118
  const Accordion = (_a) => {
110
119
  var { title, children, open, onClick } = _a, accessibleProps = __rest(_a, ["title", "children", "open", "onClick"]);
120
+ const id = generateUniqueId('accordion');
111
121
  return (React.createElement(React.Fragment, null,
112
- React.createElement(Header$3, Object.assign({ onClick: onClick }, accessibleProps),
113
- React.createElement(Title$2, null, title),
114
- React.createElement(Icon, { color: Colors.BLACK.Hex, path: open ? js.mdiChevronUp : js.mdiChevronDown, size: '24px' })),
115
- open ? children : null));
116
- };
117
-
118
- const StyledComponent = styled.p `
119
- color: ${props => Colors[props.$color || 'BLACK'].Hex};
120
- font-size: ${props => (props.$type === 'small' ? FontSizes.SMALL : FontSizes.DEFAULT)};
121
- line-height: ${props => (props.$type === 'small' ? '1.5em' : '1.6em')};
122
- letter-spacing: ${props => (props.$type === 'small' ? '1px' : '0px')};
123
- font-weight: ${props => (props.$type === 'bold' ? '500' : '400')};
124
- font-style: ${props => (props.$type === 'italic' ? 'italic' : 'normal')};
125
- text-decoration: ${props => ['underline', 'line-through'].includes(props.$type) ? props.$type : 'none'};
126
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
127
- margin: ${props => props.$margin || '0px'};
128
- padding: ${props => props.$padding || '0px'};
129
- text-align: ${props => props.$align || 'left'};
130
- box-sizing: border-box;
131
- `;
132
- const Copy = ({ children, align = '', margin = '', padding = '', type = 'default', color = 'BLACK', }) => {
133
- return (React.createElement(StyledComponent, { "$align": align, "$color": color, "$margin": margin, "$padding": padding, "$type": type }, children));
122
+ React.createElement(Header$3, Object.assign({ id: `${id}-header`, onClick: onClick }, accessibleProps),
123
+ React.createElement(Title$2, { id: `${id}-title` }, title),
124
+ React.createElement(Icon, { color: Colors.BLACK.Hex, id: `${id}-icon`, path: open ? js.mdiChevronUp : js.mdiChevronDown, size: '24px' })),
125
+ open ? React.createElement("div", { id: `${id}-content` }, children) : null));
126
+ };
127
+
128
+ const StyledComponent = styled.p `
129
+ color: ${props => Colors[props.$color || 'BLACK'].Hex};
130
+ font-size: ${props => (props.$type === 'small' ? FontSizes.SMALL : FontSizes.DEFAULT)};
131
+ line-height: ${props => (props.$type === 'small' ? '1.5em' : '1.6em')};
132
+ letter-spacing: ${props => (props.$type === 'small' ? '1px' : '0px')};
133
+ font-weight: ${props => (props.$type === 'bold' ? '500' : '400')};
134
+ font-style: ${props => (props.$type === 'italic' ? 'italic' : 'normal')};
135
+ text-decoration: ${props => ['underline', 'line-through'].includes(props.$type) ? props.$type : 'none'};
136
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
137
+ margin: ${props => props.$margin || '0px'};
138
+ padding: ${props => props.$padding || '0px'};
139
+ text-align: ${props => props.$align || 'left'};
140
+ box-sizing: border-box;
141
+ `;
142
+ const Copy = (_a) => {
143
+ var { children, align = '', margin = '', padding = '', type = 'default', color = 'BLACK' } = _a, accessibleProps = __rest(_a, ["children", "align", "margin", "padding", "type", "color"]);
144
+ const id = generateUniqueId('copy');
145
+ return (React.createElement(StyledComponent, Object.assign({ "$align": align, "$color": color, "$margin": margin, "$padding": padding, "$type": type, id: `${id}-styled-component` }, accessibleProps), children));
134
146
  };
135
147
  Copy.defaultProps = {
136
148
  type: 'default',
137
- };
138
-
139
- const Wrapper$h = styled.div `
140
- display: inline-block;
141
- position: relative;
142
- height: 16px;
143
- `;
144
- const StyledIcon$6 = styled(Icon) `
145
- width: 16px;
146
- height: 16px;
147
- margin: 0px 6px;
148
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
149
- cursor: pointer;
149
+ };
150
+
151
+ const Wrapper$h = styled.div `
152
+ display: inline-block;
153
+ position: relative;
154
+ height: 16px;
155
+ `;
156
+ const StyledIcon$6 = styled(Icon) `
157
+ width: 16px;
158
+ height: 16px;
159
+ margin: 0px 6px;
160
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
161
+ cursor: pointer;
150
162
  `;
151
163
  StyledIcon$6.defaultProps = { theme: EditableTheme };
152
164
  const positions = {
@@ -181,16 +193,17 @@ const Content$3 = styled.div(props => (Object.assign({ position: 'absolute', bor
181
193
  Content$3.defaultProps = { theme: EditableTheme };
182
194
  const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
183
195
  const [show_content, toggleContent] = React.useState(false);
184
- return (React.createElement(Wrapper$h, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
185
- trigger || React.createElement(StyledIcon$6, { path: js.mdiInformationOutline }),
186
- show_content ? (React.createElement(Content$3, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
187
- };
188
-
189
- const StyledButton = styled.button `
190
- height: ${props => (props.$small ? '30px' : '40px')};
191
- line-height: 1em;
192
- border-radius: ${props => (props.$small ? '15px' : '20px')};
193
- margin: ${props => props.$margin || '0px'};
196
+ const id = generateUniqueId('tooltip');
197
+ return (React.createElement(Wrapper$h, { id: `${id}-wrapper`, onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
198
+ trigger || React.createElement(StyledIcon$6, { id: `${id}-icon`, path: js.mdiInformationOutline }),
199
+ show_content ? (React.createElement(Content$3, { "$position": position, "$width": width, id: `${id}-content` }, children && (React.createElement(Copy, { id: `${id}-copy`, type: 'small' }, children)))) : null));
200
+ };
201
+
202
+ const StyledButton = styled.button `
203
+ height: ${props => (props.$small ? '30px' : '40px')};
204
+ line-height: 1em;
205
+ border-radius: ${props => (props.$small ? '15px' : '20px')};
206
+ margin: ${props => props.$margin || '0px'};
194
207
  padding: ${props => {
195
208
  if (props.$hasChildren) {
196
209
  if (props.$small) {
@@ -201,9 +214,9 @@ const StyledButton = styled.button `
201
214
  }
202
215
  }
203
216
  return '0px';
204
- }};
205
- outline: none;
206
- background: ${props => props.$bg_color || props.theme.PRIMARY_COLOR.Hex};
217
+ }};
218
+ outline: none;
219
+ background: ${props => props.$bg_color || props.theme.PRIMARY_COLOR.Hex};
207
220
  width: ${props => {
208
221
  if (props.$hasChildren) {
209
222
  return 'auto';
@@ -212,56 +225,58 @@ const StyledButton = styled.button `
212
225
  return '30px';
213
226
  }
214
227
  return '40px';
215
- }};
216
- cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
217
- display: flex;
218
- align-items: center;
219
- justify-content: center;
220
- opacity: ${props => (props.$disabled ? 0.6 : 0.9)};
221
- border-width: 1px;
222
- border-style: solid;
223
- border-color: ${props => props.$border_color || props.theme.PRIMARY_COLOR.Hex};
224
- box-sizing: border-box;
225
-
226
- &:active,
227
- &:focus,
228
- &:hover {
229
- opacity: ${props => (props.$disabled ? 0.6 : 1)};
230
- }
231
- `;
232
- const Label$5 = styled.span `
233
- color: ${props => props.$content_color || '#fff'};
234
- font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
235
- font-family: ${FontStyles.DEFAULT};
236
- font-weight: 500;
237
- line-height: 1;
238
- `;
239
- const StyledIcon$5 = styled.span `
240
- margin-left: ${props => (props.$hasChildren ? '6px' : '0px')};
241
- margin-right: ${props => (props.$hasChildren ? '-4px' : '0px')};
242
- display: flex;
243
- align-items: center;
244
- box-sizing: border-box;
245
- `;
246
- const Badge$1 = styled.span `
247
- width: ${props => (props.$small ? '20px' : '24px')};
248
- height: ${props => (props.$small ? '20px' : '24px')};
249
- line-height: 1;
250
- display: flex;
251
- align-items: center;
252
- justify-content: center;
253
- border-radius: 100%;
254
- background-color: ${props => props.$bg_color || '#fff'};
255
- color: ${props => props.$content_color || props.theme.PRIMARY_COLOR.Hex};
256
- font-size: ${props => (props.$small ? '10px' : '12px')};
257
- font-weight: 600;
258
- font-family: ${FontStyles.DEFAULT};
259
- letter-spacing: -1px;
260
- margin-left: ${props => (props.$small ? '5px' : '10px')};
261
- margin-right: ${props => (props.$small ? '-5px' : '-10px')};
228
+ }};
229
+ cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
230
+ display: flex;
231
+ align-items: center;
232
+ justify-content: center;
233
+ gap: ${props => (props.$iconPosition === 'before' ? '8px' : '0px')};
234
+ flex-direction: ${props => (props.$iconPosition === 'before' ? 'row-reverse' : 'row')};
235
+ opacity: ${props => (props.$disabled ? 0.6 : 0.9)};
236
+ border-width: 1px;
237
+ border-style: solid;
238
+ border-color: ${props => props.$border_color || props.theme.PRIMARY_COLOR.Hex};
239
+ box-sizing: border-box;
240
+
241
+ &:active,
242
+ &:focus,
243
+ &:hover {
244
+ opacity: ${props => (props.$disabled ? 0.6 : 1)};
245
+ }
246
+ `;
247
+ const Label$5 = styled.span `
248
+ color: ${props => props.$content_color || '#fff'};
249
+ font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
250
+ font-family: ${FontStyles.DEFAULT};
251
+ font-weight: 500;
252
+ line-height: 1;
253
+ `;
254
+ const StyledIcon$5 = styled.span `
255
+ margin-left: ${props => (props.$hasChildren ? '6px' : '0px')};
256
+ margin-right: ${props => (props.$hasChildren ? '-4px' : '0px')};
257
+ display: flex;
258
+ align-items: center;
259
+ box-sizing: border-box;
260
+ `;
261
+ const Badge$1 = styled.span `
262
+ width: ${props => (props.$small ? '20px' : '24px')};
263
+ height: ${props => (props.$small ? '20px' : '24px')};
264
+ line-height: 1;
265
+ display: flex;
266
+ align-items: center;
267
+ justify-content: center;
268
+ border-radius: 100%;
269
+ background-color: ${props => props.$bg_color || '#fff'};
270
+ color: ${props => props.$content_color || props.theme.PRIMARY_COLOR.Hex};
271
+ font-size: ${props => (props.$small ? '10px' : '12px')};
272
+ font-weight: 600;
273
+ font-family: ${FontStyles.DEFAULT};
274
+ letter-spacing: -1px;
275
+ margin-left: ${props => (props.$small ? '5px' : '10px')};
276
+ margin-right: ${props => (props.$small ? '-5px' : '-10px')};
262
277
  `;
263
278
  const Button = (_a) => {
264
- var { badge, children, disabled = false, icon, isForm = false, loading = false, margin = '', onClick, small = false, format = 'primary', toolTip, title = '' } = _a, accessibleProps = __rest(_a, ["badge", "children", "disabled", "icon", "isForm", "loading", "margin", "onClick", "small", "format", "toolTip", "title"]);
279
+ 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"]);
265
280
  const theme = React.useContext(styled.ThemeContext) || EditableTheme;
266
281
  const has_children = children && children.length > 0;
267
282
  const button_type_mapping = {
@@ -295,126 +310,130 @@ const Button = (_a) => {
295
310
  },
296
311
  };
297
312
  const format_styles = button_type_mapping[format];
298
- 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, "$margin": margin, "$small": small, disabled: disabled || loading, onClick: disabled || loading ? undefined : onClick, title: title, type: isForm ? 'submit' : undefined }, accessibleProps),
299
- children ? (React.createElement(Label$5, { "$content_color": format_styles.content_color, "$small": small }, children)) : null,
300
- icon && !badge ? (React.createElement(StyledIcon$5, { "$hasChildren": !!has_children },
301
- React.createElement(Icon, { color: format ? format_styles.content_color : '#fff', path: loading ? js.mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
302
- badge && !icon ? (React.createElement(Badge$1, { "$bg_color": format_styles.badge_bg_color, "$content_color": format_styles.badge_content_color, "$small": small }, badge)) : null));
313
+ const id = generateUniqueId('button');
314
+ 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` }),
315
+ children ? (React.createElement(Label$5, { "$content_color": format_styles.content_color, "$small": small, id: `${id}-label` }, children)) : null,
316
+ icon && !badge ? (React.createElement(StyledIcon$5, { "$hasChildren": !!has_children, id: `${id}-icon` },
317
+ 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 ? js.mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
318
+ 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));
303
319
  if (toolTip && Object.keys(toolTip).length) {
304
320
  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));
305
321
  }
306
322
  return button_view;
307
- };
308
-
309
- const H1 = styled.h1 `
310
- color: ${Colors.BLACK.Hex};
311
- font-size: 30px;
312
- font-weight: ${props => (props.$bold ? '500' : '400')};
313
- line-height: 1.4em;
314
- font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
315
- margin: ${props => props.$margin || '0px'};
316
- padding: ${props => props.$padding || '0px'};
317
- box-sizing: border-box;
318
- `;
319
- const H2 = styled.h2 `
320
- color: ${Colors.BLACK.Hex};
321
- font-size: 24px;
322
- font-weight: ${props => (props.$bold ? '500' : '400')};
323
- line-height: 1.33em;
324
- font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
325
- margin: ${props => props.$margin || '0px'};
326
- padding: ${props => props.$padding || '0px'};
327
- box-sizing: border-box;
328
- `;
329
- const H3 = styled.h3 `
330
- color: ${Colors.BLACK.Hex};
331
- font-size: 18px;
332
- font-weight: ${props => (props.$bold ? '500' : '400')};
333
- line-height: 1.33em;
334
- font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
335
- margin: ${props => props.$margin || '0px'};
336
- padding: ${props => props.$padding || '0px'};
337
- box-sizing: border-box;
323
+ };
324
+
325
+ const H1 = styled.h1 `
326
+ color: ${Colors.BLACK.Hex};
327
+ font-size: 30px;
328
+ font-weight: ${props => (props.$bold ? '500' : '400')};
329
+ line-height: 1.4em;
330
+ font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
331
+ margin: ${props => props.$margin || '0px'};
332
+ padding: ${props => props.$padding || '0px'};
333
+ box-sizing: border-box;
334
+ `;
335
+ const H2 = styled.h2 `
336
+ color: ${Colors.BLACK.Hex};
337
+ font-size: 24px;
338
+ font-weight: ${props => (props.$bold ? '500' : '400')};
339
+ line-height: 1.33em;
340
+ font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
341
+ margin: ${props => props.$margin || '0px'};
342
+ padding: ${props => props.$padding || '0px'};
343
+ box-sizing: border-box;
344
+ `;
345
+ const H3 = styled.h3 `
346
+ color: ${Colors.BLACK.Hex};
347
+ font-size: 18px;
348
+ font-weight: ${props => (props.$bold ? '500' : '400')};
349
+ line-height: 1.33em;
350
+ font-family: 'Roboto Slab', Roboto, Helvetica, Arial, sans-serif;
351
+ margin: ${props => props.$margin || '0px'};
352
+ padding: ${props => props.$padding || '0px'};
353
+ box-sizing: border-box;
338
354
  `;
339
355
  const Heading = (_a) => {
340
356
  var { bold, children, margin, padding, type } = _a, accessibleProps = __rest(_a, ["bold", "children", "margin", "padding", "type"]);
357
+ const id = generateUniqueId('heading');
341
358
  switch (type) {
342
359
  case 'secondary': {
343
- return (React.createElement(H2, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps), children));
360
+ return (React.createElement(H2, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { id: `${id}-h2` }), children));
344
361
  }
345
362
  case 'tertiary': {
346
- return (React.createElement(H3, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps), children));
363
+ return (React.createElement(H3, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { id: `${id}-h3` }), children));
347
364
  }
348
365
  default: {
349
- return (React.createElement(H1, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps), children));
366
+ return (React.createElement(H1, Object.assign({ "$bold": bold, "$margin": margin, "$padding": padding }, accessibleProps, { id: `${id}-h1` }), children));
350
367
  }
351
368
  }
352
369
  };
353
370
  Heading.defaultProps = {
354
371
  bold: false,
355
372
  type: 'primary',
356
- };
357
-
358
- const Wrapper$g = styled.div `
359
- position: fixed;
360
- top: 0;
361
- right: 0;
362
- bottom: 0;
363
- left: 0;
364
- z-index: 9999;
365
- background: rgba(0, 0, 0, 0.8);
366
- display: flex;
367
- align-items: center;
368
- justify-content: center;
369
- box-sizing: border-box;
373
+ };
374
+
375
+ const Wrapper$g = styled.div `
376
+ position: fixed;
377
+ top: 0;
378
+ right: 0;
379
+ bottom: 0;
380
+ left: 0;
381
+ z-index: 9999;
382
+ background: rgba(0, 0, 0, 0.8);
383
+ display: flex;
384
+ align-items: center;
385
+ justify-content: center;
386
+ box-sizing: border-box;
370
387
  `;
371
388
  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)));
372
- const Buttons$1 = styled.div `
373
- display: flex;
374
- gap: 10px;
375
- align-items: center;
376
- justify-content: center;
377
- margin-top: 30px;
378
- box-sizing: border-box;
389
+ const Buttons$1 = styled.div `
390
+ display: flex;
391
+ gap: 10px;
392
+ align-items: center;
393
+ justify-content: center;
394
+ margin-top: 30px;
395
+ box-sizing: border-box;
379
396
  `;
380
397
  const ActionDialog = (_a) => {
381
398
  var { description, title, primaryButton, secondaryButton, tertiaryButton, style = {} } = _a, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton", "style"]);
382
- return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps),
383
- React.createElement(Container$4, { "$customStyle": style, open: true },
384
- title ? (React.createElement(Heading, { margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
385
- description ? React.createElement(Copy, { align: 'center' }, description) : null,
386
- primaryButton || secondaryButton || tertiaryButton ? (React.createElement(Buttons$1, null,
387
- tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary' }))) : null,
388
- secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary' }))) : null,
389
- primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary' }))) : null)) : null)));
390
- };
391
-
392
- const Wrapper$f = styled.div `
393
- border: 1px solid #f1f1f1;
394
- border-radius: 4px;
395
- border-left-width: 4px;
396
- box-shadow: 0px 4px 12px -6px rgba(0, 0, 0, 0.2);
397
- display: flex;
398
- align-items: flex-start;
399
- gap: ${({ $small }) => ($small ? '8px' : '20px')};
400
- padding: ${({ $small }) => ($small ? '11px' : '20px')};
401
- box-sizing: border-box;
402
- `;
403
- const StyledIcon$4 = styled(Icon) `
404
- flex-shrink: 0;
405
- `;
406
- const Action$1 = styled.div `
407
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
408
- font-size: ${FontSizes.DEFAULT};
409
- font-family: ${FontStyles.DEFAULT};
410
- font-weight: 500;
411
- cursor: pointer;
412
- margin-top: 6px;
399
+ const id = generateUniqueId('action-dialog');
400
+ return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps, { id: `${id}-wrapper` }),
401
+ React.createElement(Container$4, { "$customStyle": style, id: `${id}-container`, open: true },
402
+ title ? (React.createElement(Heading, { id: `${id}-title`, margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
403
+ description ? (React.createElement(Copy, { align: 'center', id: `${id}-description` }, description)) : null,
404
+ primaryButton || secondaryButton || tertiaryButton ? (React.createElement(Buttons$1, { id: `${id}-buttons` },
405
+ tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary', id: `${id}-tertiary-button` }))) : null,
406
+ secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary', id: `${id}-secondary-button` }))) : null,
407
+ primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary', id: `${id}-primary-button` }))) : null)) : null)));
408
+ };
409
+
410
+ const Wrapper$f = styled.div `
411
+ border: 1px solid #f1f1f1;
412
+ border-radius: 4px;
413
+ border-left-width: 4px;
414
+ box-shadow: 0px 4px 12px -6px rgba(0, 0, 0, 0.2);
415
+ display: flex;
416
+ align-items: flex-start;
417
+ gap: ${({ $small }) => ($small ? '8px' : '20px')};
418
+ padding: ${({ $small }) => ($small ? '11px' : '20px')};
419
+ box-sizing: border-box;
420
+ `;
421
+ const StyledIcon$4 = styled(Icon) `
422
+ flex-shrink: 0;
423
+ `;
424
+ const Action$1 = styled.div `
425
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
426
+ font-size: ${FontSizes.DEFAULT};
427
+ font-family: ${FontStyles.DEFAULT};
428
+ font-weight: 500;
429
+ cursor: pointer;
430
+ margin-top: 6px;
413
431
  `;
414
432
  Action$1.defaultProps = { theme: EditableTheme };
415
433
  const Alert = (_a) => {
416
434
  var { action, type = 'info', title, description, small = false } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description", "small"]);
417
435
  const theme = React.useContext(styled.ThemeContext) || EditableTheme;
436
+ const id = generateUniqueId('alert');
418
437
  const type_mapping = {
419
438
  info: {
420
439
  color: theme.PRIMARY_COLOR.Hex,
@@ -433,14 +452,14 @@ const Alert = (_a) => {
433
452
  icon: js.mdiCheckboxMarkedCircleOutline,
434
453
  },
435
454
  };
436
- return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps, { "$small": small, style: { borderLeftColor: type_mapping[type].color } }),
437
- React.createElement(StyledIcon$4, { color: type_mapping[type].color, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
438
- React.createElement("div", null,
439
- title && !small ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
440
- description ? (React.createElement(Copy, { margin: small ? '' : '6px 0 0 0 !important' }, description)) : null,
441
- action && !small ? React.createElement(Action$1, { onClick: action.onClick }, action.label) : null)));
442
- };
443
-
455
+ return (React.createElement(Wrapper$f, Object.assign({}, accessibleProps, { "$small": small, id: `${id}-wrapper`, style: { borderLeftColor: type_mapping[type].color } }),
456
+ React.createElement(StyledIcon$4, { color: type_mapping[type].color, id: `${id}-icon`, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
457
+ React.createElement("div", { id: `${id}-content` },
458
+ title && !small ? (React.createElement(Heading, { bold: true, id: `${id}-title`, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
459
+ description ? (React.createElement(Copy, { id: `${id}-description`, margin: small ? '' : '6px 0 0 0 !important' }, description)) : null,
460
+ action && !small ? (React.createElement(Action$1, { id: `${id}-action`, onClick: action.onClick }, action.label)) : null)));
461
+ };
462
+
444
463
  const colorMapping = {
445
464
  black: {
446
465
  fill_1: '#000000',
@@ -466,350 +485,362 @@ const colorMapping = {
466
485
  const Logo = (_a) => {
467
486
  var { type = 'standard_full', height = '50px' } = _a, accessibleProps = __rest(_a, ["type", "height"]);
468
487
  const type_parts = type.split('_');
488
+ const id = generateUniqueId('logo');
469
489
  switch (type_parts[0]) {
470
490
  case 'mark':
471
- 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),
472
- 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] })));
491
+ 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` }),
492
+ 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` })));
473
493
  default:
474
- 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),
475
- 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 }),
476
- 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 }),
477
- 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 }),
478
- 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 }),
479
- 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 }),
480
- 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 }),
481
- 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 }),
482
- 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 })));
494
+ 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` }),
495
+ 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` }),
496
+ 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` }),
497
+ 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` }),
498
+ 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` }),
499
+ 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` }),
500
+ 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` }),
501
+ 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` }),
502
+ 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
503
  }
484
- };
485
-
486
- const Container$3 = styled.header `
487
- width: 100%;
488
- display: flex;
489
- padding: 20px;
490
- box-sizing: border-box;
491
- border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
492
- background: '#fff';
493
- justify-content: space-between;
494
- `;
495
- const LogoWrapper = styled.div `
496
- display: flex;
497
- align-items: center;
498
- `;
499
- const Image = styled.img `
500
- height: 30px !important;
501
- width: auto !important;
502
- `;
503
- const Buttons = styled.div `
504
- display: flex;
505
- flex-direction: row;
506
- column-gap: 10px;
507
- flex-direction: reverse;
504
+ };
505
+
506
+ const Container$3 = styled.header `
507
+ width: 100%;
508
+ display: flex;
509
+ padding: 20px;
510
+ box-sizing: border-box;
511
+ border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
512
+ background: '#fff';
513
+ justify-content: space-between;
514
+ `;
515
+ const LogoWrapper = styled.div `
516
+ display: flex;
517
+ align-items: center;
518
+ `;
519
+ const Image = styled.img `
520
+ height: 30px !important;
521
+ width: auto !important;
522
+ `;
523
+ const Buttons = styled.div `
524
+ display: flex;
525
+ flex-direction: row;
526
+ column-gap: 10px;
527
+ flex-direction: reverse;
508
528
  `;
509
529
  const AppHeader = ({ logoUrl, buttons = [] }) => {
510
- return (React.createElement(Container$3, null,
511
- React.createElement(LogoWrapper, null, logoUrl ? React.createElement(Image, { src: logoUrl }) : React.createElement(Logo, { height: '30px' })),
512
- React.createElement(Buttons, null, buttons.map((b, i) => (React.createElement(Button, Object.assign({ key: i }, b)))))));
513
- };
514
-
515
- const Wrapper$e = styled.div `
516
- display: inline-block;
517
- border-radius: 4px;
518
- padding: 4px 6px;
519
- background: ${props => Colors[props.$color].Hex};
520
- color: #ffffff;
521
- box-sizing: border-box;
522
- cursor: ${props => (props.$removable ? 'pointer' : 'default')};
523
- `;
524
- const Content$2 = styled.div `
525
- display: flex;
526
- align-items: center;
527
- `;
528
- const Label$4 = styled.div `
529
- color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
530
- font-size: ${FontSizes.SMALL};
531
- font-weight: 500;
532
- font-family: ${FontStyles.DEFAULT};
533
- line-height: 1.2em;
534
- `;
535
- const Remove$1 = styled.div `
536
- margin-left: 10px;
537
- display: flex;
538
- align-items: center;
530
+ const id = generateUniqueId('app-header');
531
+ return (React.createElement(Container$3, { id: `${id}-container` },
532
+ 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` }))),
533
+ React.createElement(Buttons, { id: `${id}-buttons` }, buttons.map((b, i) => (React.createElement(Button, Object.assign({ key: i }, b, { id: `${id}-button-${i}` })))))));
534
+ };
535
+
536
+ const Wrapper$e = styled.div `
537
+ display: inline-block;
538
+ border-radius: 4px;
539
+ padding: 4px 6px;
540
+ background: ${props => Colors[props.$color].Hex};
541
+ color: #ffffff;
542
+ box-sizing: border-box;
543
+ cursor: ${props => (props.$removable ? 'pointer' : 'default')};
544
+ `;
545
+ const Content$2 = styled.div `
546
+ display: flex;
547
+ align-items: center;
548
+ `;
549
+ const Label$4 = styled.div `
550
+ color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
551
+ font-size: ${FontSizes.SMALL};
552
+ font-weight: 500;
553
+ font-family: ${FontStyles.DEFAULT};
554
+ line-height: 1.2em;
555
+ `;
556
+ const Remove$1 = styled.div `
557
+ margin-left: 10px;
558
+ display: flex;
559
+ align-items: center;
539
560
  `;
540
561
  const Tag = (_a) => {
541
562
  var { children, color = 'PRIMARY', removable, onClick } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
542
- return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
543
- React.createElement(Content$2, null,
544
- React.createElement(Label$4, { "$color": color }, children),
545
- removable ? (React.createElement(Remove$1, null,
546
- React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', path: js.mdiClose, size: '15px' }))) : null)));
547
- };
548
-
549
- const SidebarContainer = styled.div `
550
- border-right: 1px solid ${Colors.LIGHT_GRAY.Hex};
551
- display: flex;
552
- flex-direction: column;
553
- height: 100%;
554
- padding: 12px 0px;
555
- width: ${props => (props.$isOpen ? props.$width : '60px')};
556
- `;
557
- const MenuWrapper$1 = styled.button `
558
- display: flex;
559
- align-items: center;
560
- border: 0px;
561
- background-color: transparent;
562
- padding-left: 0px;
563
- border-left-width: 4px;
564
- border-left-style: solid;
565
- border-left-color: ${props => (props.$active ? props.$color.Hex : 'transparent')};
566
- cursor: pointer;
567
- height: 40px;
568
-
569
- &:hover > div {
570
- color: ${props => props.$color.Hex};
571
- }
572
-
573
- &:hover > svg > path {
574
- fill: ${Colors.BLACK.Hex} !important;
575
- }
576
- `;
577
- const MenuIcon = styled(Icon) `
578
- width: 20px;
579
- height: 20px;
580
- margin: 0px 16px;
581
- flex-shrink: 0;
582
-
583
- > path {
584
- fill: ${({ $active }) => ($active ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex)} !important;
585
- }
586
- `;
587
- const MenuLabel = styled.div `
588
- color: ${props => (props.$active ? props.$color.Hex : Colors.BLACK.Hex)};
589
- flex: 1;
590
- font-size: 12px;
591
- font-style: normal;
592
- font-weight: 600;
593
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
594
- line-height: 16px;
595
- padding: 12px 0px;
596
- letter-spacing: 1px;
597
- `;
598
- const SubMenu = styled.div `
599
- overflow-y: auto;
600
- padding-left: 44px;
601
- padding-right: 20px;
602
- padding-bottom: 10px;
603
- `;
604
- const SubMenuItem = styled.a `
605
- display: block;
606
- padding: 8px 12px;
607
- border-radius: 8px;
608
- font-size: 13px;
609
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
610
- line-height: 20px;
611
- text-decoration: none;
612
- font-weight: ${({ $active }) => ($active ? '500' : '400')};
613
- color: ${({ $active }) => ($active ? Colors.BLACK.Hex : Colors.GRAY.Hex)};
614
- background: ${props => (props.$active ? `rgba(${props.$color.Rgb}, 0.1)` : '#fff')};
615
- cursor: pointer;
616
-
617
- &:hover {
618
- color: ${props => props.$color.Hex};
619
- font-weight: 500;
620
- }
621
- `;
622
- const Footer = styled.div `
623
- padding: 20px 14px 0px;
624
- display: flex;
625
- align-items: center;
626
- `;
627
- const FooterInfo = styled.div `
628
- display: flex;
629
- flex-direction: column;
630
- flex: 1;
631
- align-items: flex-start;
632
- `;
633
- const SidebarMenuContainer = styled.div `
634
- flex-grow: 1;
563
+ const id = generateUniqueId('tag');
564
+ return (React.createElement(Wrapper$e, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps, { id: `${id}-wrapper` }),
565
+ React.createElement(Content$2, { id: `${id}-content` },
566
+ React.createElement(Label$4, { "$color": color, id: `${id}-label` }, children),
567
+ removable ? (React.createElement(Remove$1, { id: `${id}-remove` },
568
+ React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', id: `${id}-icon`, path: js.mdiClose, size: '15px' }))) : null)));
569
+ };
570
+
571
+ const SidebarContainer = styled.div `
572
+ border-right: 1px solid ${Colors.LIGHT_GRAY.Hex};
573
+ display: flex;
574
+ flex-direction: column;
575
+ height: 100%;
576
+ padding: 12px 0px;
577
+ width: ${props => (props.$isOpen ? props.$width : '60px')};
578
+ `;
579
+ const MenuWrapper$1 = styled.button `
580
+ display: flex;
581
+ align-items: center;
582
+ border: 0px;
583
+ background-color: transparent;
584
+ padding-left: 0px;
585
+ border-left-width: 4px;
586
+ border-left-style: solid;
587
+ border-left-color: ${props => (props.$active ? props.$color.Hex : 'transparent')};
588
+ cursor: pointer;
589
+ height: 40px;
590
+
591
+ &:hover > div {
592
+ color: ${props => props.$color.Hex};
593
+ }
594
+
595
+ &:hover > svg > path {
596
+ fill: ${Colors.BLACK.Hex} !important;
597
+ }
598
+ `;
599
+ const MenuIcon = styled(Icon) `
600
+ width: 20px;
601
+ height: 20px;
602
+ margin: 0px 16px;
603
+ flex-shrink: 0;
604
+
605
+ > path {
606
+ fill: ${({ $active }) => ($active ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex)} !important;
607
+ }
608
+ `;
609
+ const MenuLabel = styled.div `
610
+ color: ${props => (props.$active ? props.$color.Hex : Colors.BLACK.Hex)};
611
+ flex: 1;
612
+ font-size: 12px;
613
+ font-style: normal;
614
+ font-weight: 600;
615
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
616
+ line-height: 16px;
617
+ padding: 12px 0px;
618
+ letter-spacing: 1px;
619
+ `;
620
+ const SubMenu = styled.div `
621
+ overflow-y: auto;
622
+ padding-left: 44px;
623
+ padding-right: 20px;
624
+ padding-bottom: 10px;
625
+ `;
626
+ const SubMenuItem = styled.a `
627
+ display: block;
628
+ padding: 8px 12px;
629
+ border-radius: 8px;
630
+ font-size: 13px;
631
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
632
+ line-height: 20px;
633
+ text-decoration: none;
634
+ font-weight: ${({ $active }) => ($active ? '500' : '400')};
635
+ color: ${({ $active }) => ($active ? Colors.BLACK.Hex : Colors.GRAY.Hex)};
636
+ background: ${props => (props.$active ? `rgba(${props.$color.Rgb}, 0.1)` : '#fff')};
637
+ cursor: pointer;
638
+
639
+ &:hover {
640
+ color: ${props => props.$color.Hex};
641
+ font-weight: 500;
642
+ }
643
+ `;
644
+ const Footer = styled.div `
645
+ padding: 20px 14px 0px;
646
+ display: flex;
647
+ align-items: center;
648
+ `;
649
+ const FooterInfo = styled.div `
650
+ display: flex;
651
+ flex-direction: column;
652
+ flex: 1;
653
+ align-items: flex-start;
654
+ `;
655
+ const SidebarMenuContainer = styled.div `
656
+ flex-grow: 1;
635
657
  `;
636
658
  const AppMenu = ({ menu, isCollapsed, footerTag, defaultWidth = '280px' }) => {
637
659
  const theme = React.useContext(styled.ThemeContext) || EditableTheme;
638
660
  const [collapsed, toggleCollapse] = React.useState(isCollapsed);
639
- return (React.createElement(SidebarContainer, { "$isOpen": !collapsed, "$width": defaultWidth },
640
- React.createElement(SidebarMenuContainer, null, menu.map(nav_item => {
641
- return (React.createElement(React.Fragment, { key: nav_item.label },
642
- React.createElement(MenuWrapper$1, { "$active": !!nav_item.is_active, "$color": theme.PRIMARY_COLOR, onClick: nav_item.onClick, title: collapsed ? (nav_item === null || nav_item === void 0 ? void 0 : nav_item.title) || nav_item.label : '' },
643
- React.createElement(MenuIcon, { "$active": !!nav_item.is_active, path: nav_item.icon }),
644
- collapsed ? null : (React.createElement(MenuLabel, { "$active": nav_item.is_active, "$color": theme.PRIMARY_COLOR }, nav_item.label))),
645
- nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, null, nav_item.menu.map(menu_item => (React.createElement(SubMenuItem, { "$active": menu_item.is_active, "$color": theme.PRIMARY_COLOR, key: menu_item.label, onClick: menu_item.onClick }, menu_item.label))))) : null));
661
+ const id = generateUniqueId('app-menu');
662
+ return (React.createElement(SidebarContainer, { "$isOpen": !collapsed, "$width": defaultWidth, id: `${id}-sidebar-container` },
663
+ React.createElement(SidebarMenuContainer, { id: `${id}-sidebar-menu-container` }, menu.map((nav_item, navIndex) => {
664
+ const navItemId = generateUniqueId(`nav-item-${navIndex}`);
665
+ return (React.createElement(React.Fragment, { key: navItemId },
666
+ 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 : '' },
667
+ React.createElement(MenuIcon, { "$active": !!nav_item.is_active, id: `${navItemId}-menu-icon`, path: nav_item.icon }),
668
+ collapsed ? null : (React.createElement(MenuLabel, { "$active": nav_item.is_active, "$color": theme.PRIMARY_COLOR, id: `${navItemId}-menu-label` }, nav_item.label))),
669
+ nav_item.is_active && nav_item.menu && !collapsed ? (React.createElement(SubMenu, { id: `${navItemId}-sub-menu` }, nav_item.menu.map((menu_item, menuIndex) => {
670
+ const menuItemId = generateUniqueId(`menu-item-${menuIndex}`);
671
+ 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));
672
+ }))) : null));
646
673
  })),
647
- React.createElement(Footer, null,
648
- collapsed ? null : (React.createElement(FooterInfo, null,
649
- footerTag ? React.createElement(Tag, null, footerTag) : null,
650
- React.createElement(Copy, { margin: '8px 0 0 0', type: 'small' },
674
+ React.createElement(Footer, { id: `${id}-footer` },
675
+ collapsed ? null : (React.createElement(FooterInfo, { id: `${id}-footer-info` },
676
+ footerTag ? React.createElement(Tag, { id: `${id}-footer-tag` }, footerTag) : null,
677
+ React.createElement(Copy, { id: `${id}-footer-copy`, margin: '8px 0 0 0', type: 'small' },
651
678
  "\u00A9 ",
652
679
  new Date().getFullYear(),
653
680
  " Hexure"))),
654
- React.createElement(Button, { icon: collapsed ? js.mdiChevronRight : js.mdiChevronLeft, onClick: (e) => {
681
+ React.createElement(Button, { icon: collapsed ? js.mdiChevronRight : js.mdiChevronLeft, id: `${id}-collapse-button`, onClick: (e) => {
655
682
  e.preventDefault();
656
683
  toggleCollapse(!collapsed);
657
684
  }, small: true }))));
658
- };
659
-
660
- const Wrapper$d = styled.div `
661
- border: 1px solid ${props => props.theme.PRIMARY_COLOR.Hex};
662
- border-radius: 8px;
663
- box-sizing: border-box;
664
- display: flex;
665
- align-items: center;
666
- justify-content: space-between;
667
- padding: 16px 20px;
685
+ };
686
+
687
+ const Wrapper$d = styled.div `
688
+ border: 1px solid ${props => props.theme.PRIMARY_COLOR.Hex};
689
+ border-radius: 8px;
690
+ box-sizing: border-box;
691
+ display: flex;
692
+ align-items: center;
693
+ justify-content: space-between;
694
+ padding: 16px 20px;
668
695
  `;
669
696
  Wrapper$d.defaultProps = { theme: EditableTheme };
670
- const Left = styled.div `
671
- box-sizing: border-box;
672
- display: flex;
673
- align-items: center;
674
- justify-content: space-between;
675
- flex-shrink: 0;
676
- `;
677
- const Info$1 = styled.div `
678
- box-sizing: border-box;
679
- display: flex;
680
- align-items: center;
681
- margin-right: 30px;
682
- `;
683
- const Selected = styled.span `
684
- font-size: 14px;
685
- font-weight: 400;
686
- font-family: ${FontStyles.DEFAULT};
687
- color: ${Colors.BLACK.Hex};
688
- line-height: 1;
689
- `;
690
- const Clear = styled.span `
691
- font-size: 14px;
692
- font-weight: 400;
693
- font-family: ${FontStyles.DEFAULT};
694
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
695
- line-height: 1;
696
- cursor: pointer;
697
- padding-left: 10px;
698
- margin-left: 10px;
699
- border-left: 1px solid #ccc;
697
+ const Left = styled.div `
698
+ box-sizing: border-box;
699
+ display: flex;
700
+ align-items: center;
701
+ justify-content: space-between;
702
+ flex-shrink: 0;
703
+ `;
704
+ const Info$1 = styled.div `
705
+ box-sizing: border-box;
706
+ display: flex;
707
+ align-items: center;
708
+ margin-right: 30px;
709
+ `;
710
+ const Selected = styled.span `
711
+ font-size: 14px;
712
+ font-weight: 400;
713
+ font-family: ${FontStyles.DEFAULT};
714
+ color: ${Colors.BLACK.Hex};
715
+ line-height: 1;
716
+ `;
717
+ const Clear = styled.span `
718
+ font-size: 14px;
719
+ font-weight: 400;
720
+ font-family: ${FontStyles.DEFAULT};
721
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
722
+ line-height: 1;
723
+ cursor: pointer;
724
+ padding-left: 10px;
725
+ margin-left: 10px;
726
+ border-left: 1px solid #ccc;
700
727
  `;
701
728
  Clear.defaultProps = { theme: EditableTheme };
702
- const Actions$1 = styled.div `
703
- box-sizing: border-box;
704
- display: flex;
705
- align-items: center;
706
- column-gap: 10px;
707
- `;
708
- const Error$1 = styled.div `
709
- box-sizing: border-box;
710
- display: flex;
711
- align-items: center;
712
- background: rgba(${Colors.RED.Rgb}, 0.1);
713
- border-radius: 4px;
714
- padding: 6px 8px;
715
- text-overflow: ellipsis;
716
- white-space: nowrap;
717
- overflow: hidden;
718
- margin-left: 30px;
719
- `;
720
- const ErrorMsg = styled.span `
721
- font-size: 14px;
722
- font-weight: 500;
723
- font-family: ${FontStyles.DEFAULT};
724
- line-height: 1em;
725
- color: ${Colors.RED.Hex};
726
- margin-left: 8px;
729
+ const Actions$1 = styled.div `
730
+ box-sizing: border-box;
731
+ display: flex;
732
+ align-items: center;
733
+ column-gap: 10px;
734
+ `;
735
+ const Error$1 = styled.div `
736
+ box-sizing: border-box;
737
+ display: flex;
738
+ align-items: center;
739
+ background: rgba(${Colors.RED.Rgb}, 0.1);
740
+ border-radius: 4px;
741
+ padding: 6px 8px;
742
+ text-overflow: ellipsis;
743
+ white-space: nowrap;
744
+ overflow: hidden;
745
+ margin-left: 30px;
746
+ `;
747
+ const ErrorMsg = styled.span `
748
+ font-size: 14px;
749
+ font-weight: 500;
750
+ font-family: ${FontStyles.DEFAULT};
751
+ line-height: 1em;
752
+ color: ${Colors.RED.Hex};
753
+ margin-left: 8px;
727
754
  `;
728
755
  const BulkActionBar = (_a) => {
729
756
  var { actions = [], errorMsg, onClear, selectedCount = 0 } = _a, accessibleProps = __rest(_a, ["actions", "errorMsg", "onClear", "selectedCount"]);
730
- return (React.createElement(Wrapper$d, Object.assign({}, accessibleProps),
731
- React.createElement(Left, null,
732
- React.createElement(Info$1, null,
733
- React.createElement(Selected, null,
757
+ const id = generateUniqueId('bulk-action-bar');
758
+ return (React.createElement(Wrapper$d, Object.assign({}, accessibleProps, { id: `${id}-wrapper` }),
759
+ React.createElement(Left, { id: `${id}-left` },
760
+ React.createElement(Info$1, { id: `${id}-info` },
761
+ React.createElement(Selected, { id: `${id}-selected` },
734
762
  selectedCount,
735
763
  " Selected"),
736
- onClear ? React.createElement(Clear, { onClick: onClear }, "Clear") : null),
737
- React.createElement(Actions$1, null, actions.map((action, i) => (React.createElement(Button, Object.assign({}, action, { key: i, small: true })))))),
738
- errorMsg ? (React.createElement(Error$1, null,
739
- React.createElement(Icon, { color: Colors.RED.Hex, path: js.mdiInformationOutline, size: '20px' }),
740
- React.createElement(ErrorMsg, null, errorMsg))) : null));
741
- };
742
-
743
- const Wrapper$c = styled.div `
744
- background: #fff;
745
- border-radius: 8px;
746
- box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
747
- display: flex;
748
- flex-direction: column;
749
- gap: 4px;
750
- max-height: ${props => props.$maxHeight || '312px'};
751
- padding: 10px;
752
- width: 200px;
753
- `;
754
- const MenuItem = styled.div `
755
- align-items: center;
756
- border-radius: 8px;
757
- border: 1px solid transparent;
758
- display: flex;
759
- gap: 8px;
760
- height: 38px;
761
- padding: 8px;
762
- &:hover {
763
- background: rgba(1, 147, 215, 0.1);
764
- cursor: pointer;
765
-
766
- svg,
767
- path {
768
- fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
769
- }
770
- }
764
+ onClear ? (React.createElement(Clear, { id: `${id}-clear`, onClick: onClear }, "Clear")) : null),
765
+ 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 })))))),
766
+ errorMsg ? (React.createElement(Error$1, { id: `${id}-error` },
767
+ React.createElement(Icon, { color: Colors.RED.Hex, id: `${id}-error-icon`, path: js.mdiInformationOutline, size: '20px' }),
768
+ React.createElement(ErrorMsg, { id: `${id}-error-msg` }, errorMsg))) : null));
769
+ };
770
+
771
+ const Wrapper$c = styled.div `
772
+ background: #fff;
773
+ border-radius: 8px;
774
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
775
+ display: flex;
776
+ flex-direction: column;
777
+ gap: 4px;
778
+ max-height: ${props => props.$maxHeight || '312px'};
779
+ padding: 10px;
780
+ width: 200px;
781
+ `;
782
+ const MenuItem = styled.div `
783
+ align-items: center;
784
+ border-radius: 8px;
785
+ border: 1px solid transparent;
786
+ display: flex;
787
+ gap: 8px;
788
+ height: 38px;
789
+ padding: 8px;
790
+ &:hover {
791
+ background: rgba(1, 147, 215, 0.1);
792
+ cursor: pointer;
793
+
794
+ svg,
795
+ path {
796
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
797
+ }
798
+ }
771
799
  `;
772
800
  MenuItem.defaultProps = { theme: EditableTheme };
773
- const Title$1 = styled.span `
774
- font-family: Roboto;
775
- font-size: 14px;
776
- font-weight: 400;
777
- height: auto;
778
- letter-spacing: 0px;
779
- line-height: 22px;
780
- text-align: left;
781
- color: ${({ disabled }) => (disabled ? Colors.LIGHT_GRAY.Hex : 'inherit')};
782
- pointer-events: ${({ disabled }) => (disabled ? 'none' : 'auto')};
801
+ const Title$1 = styled.span `
802
+ font-family: Roboto;
803
+ font-size: 14px;
804
+ font-weight: 400;
805
+ height: auto;
806
+ letter-spacing: 0px;
807
+ line-height: 22px;
808
+ text-align: left;
809
+ color: ${({ disabled }) => (disabled ? Colors.LIGHT_GRAY.Hex : 'inherit')};
810
+ pointer-events: ${({ disabled }) => (disabled ? 'none' : 'auto')};
783
811
  `;
784
812
  Title$1.defaultProps = {
785
813
  disabled: false,
786
814
  };
787
815
  const MoreMenu = (_a) => {
788
816
  var { maxHeight, menuItems = [] } = _a, accessibleProps = __rest(_a, ["maxHeight", "menuItems"]);
789
- return (React.createElement(Wrapper$c, Object.assign({ "$maxHeight": maxHeight }, accessibleProps), menuItems.map((item, i) => {
817
+ const id = generateUniqueId('more-menu');
818
+ return (React.createElement(Wrapper$c, Object.assign({ "$maxHeight": maxHeight }, accessibleProps, { id: `${id}-wrapper` }), menuItems.map((item, i) => {
790
819
  var _a;
791
- return (React.createElement(MenuItem, { key: i, onClick: item.onClick },
792
- item.icon ? (React.createElement(Icon, { color: item.disabled ? Colors.LIGHT_GRAY.Hex : Colors.MEDIUM_GRAY.Hex, path: item.icon, size: '20px' })) : null,
793
- React.createElement(Title$1, { disabled: (_a = item.disabled) !== null && _a !== void 0 ? _a : false }, item.label)));
820
+ const itemId = generateUniqueId(`menu-item-${i}`);
821
+ return (React.createElement(MenuItem, { id: `${itemId}-menu-item`, key: i, onClick: item.onClick },
822
+ 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,
823
+ React.createElement(Title$1, { disabled: (_a = item.disabled) !== null && _a !== void 0 ? _a : false, id: `${itemId}-title` }, item.label)));
794
824
  })));
795
- };
796
-
797
- const MenuWrapper = styled.div `
798
- position: relative; // Ensure this is relative
799
- display: inline-block;
800
- `;
801
- const StyledMoreMenu = styled(MoreMenu) `
802
- position: absolute; // Changed from fixed to absolute
803
- top: ${props => props.$top};
804
- left: ${props => props.$left};
805
- width: ${props => props.$menuWidth};
806
- max-height: ${props => props.maxHeight};
807
- z-index: 10;
825
+ };
826
+
827
+ const MenuWrapper = styled.div `
828
+ position: relative;
829
+ display: inline-block;
830
+ `;
831
+ const StyledMoreMenu = styled(MoreMenu) `
832
+ position: absolute;
833
+ top: ${props => props.$top};
834
+ left: ${props => props.$left};
835
+ width: ${props => props.$menuWidth};
836
+ max-height: ${props => props.maxHeight};
837
+ z-index: 10;
808
838
  `;
809
839
  const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = 'bottomLeft', format = 'primary', menuWidth = '200px', enableHover = true, enableClick = false, show = false, }) => {
810
840
  const [showMenu, toggleMenu] = React.useState(false);
811
841
  const [menuPosition, setMenuPosition] = React.useState({ top: '0px', left: '0px' });
812
842
  const menuWrapperRef = React.useRef(null);
843
+ const id = generateUniqueId('button-menu');
813
844
  React.useEffect(() => {
814
845
  toggleMenu(show);
815
846
  }, [show]);
@@ -875,107 +906,108 @@ const ButtonMenu = ({ disabled, label, maxHeight, menuItems, small, position = '
875
906
  setMenuPosition({ top: `${top}px`, left: `${left}px` });
876
907
  }
877
908
  }, [showMenu, position, menuWidth]);
878
- return (React.createElement(MenuWrapper, { onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: menuWrapperRef },
879
- React.createElement(Button, { disabled: disabled, format: format, icon: js.mdiDotsHorizontal, small: small }, label),
880
- showMenu && (React.createElement(StyledMoreMenu, { "$left": menuPosition.left, "$menuWidth": menuWidth, "$top": menuPosition.top, maxHeight: maxHeight, menuItems: menuItems }))));
881
- };
882
-
883
- const Wrapper$b = styled.label `
884
- border-radius: 4px;
885
- padding: 4px 0px 4px 6px;
886
- margin-left: -6px;
887
- cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
888
- display: flex;
889
- align-items: center;
890
- font-size: ${FontSizes.DEFAULT};
891
- line-height: 1.6em;
892
- box-sizing: border-box;
893
- position: relative;
894
-
895
- &:focus-within {
896
- background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
897
- }
909
+ return (React.createElement(MenuWrapper, { id: `${id}-menu-wrapper`, onClick: handleClick, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ref: menuWrapperRef },
910
+ React.createElement(Button, { disabled: disabled, format: format, icon: js.mdiDotsHorizontal, id: `${id}-button`, small: small }, label),
911
+ showMenu && (React.createElement(StyledMoreMenu, { "$left": menuPosition.left, "$menuWidth": menuWidth, "$top": menuPosition.top, id: `${id}-more-menu`, maxHeight: maxHeight, menuItems: menuItems }))));
912
+ };
913
+
914
+ const Wrapper$b = styled.label `
915
+ border-radius: 4px;
916
+ padding: 4px 0px 4px 6px;
917
+ margin-left: -6px;
918
+ cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
919
+ display: flex;
920
+ align-items: center;
921
+ font-size: ${FontSizes.DEFAULT};
922
+ line-height: 1.6em;
923
+ box-sizing: border-box;
924
+ position: relative;
925
+
926
+ &:focus-within {
927
+ background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
928
+ }
898
929
  `;
899
930
  Wrapper$b.defaultProps = { theme: EditableTheme };
900
- const Input$2 = styled.input `
901
- font-size: 20px;
902
- margin: 0px;
903
- line-height: 1.1em;
904
- box-sizing: border-box;
905
- position: absolute;
906
- opacity: 0;
907
- cursor: pointer;
908
- height: 0;
909
- width: 0;
910
- &:checked + span {
911
- background-color: ${Colors.PRIMARY.Hex};
912
- border-color: ${Colors.PRIMARY.Hex};
913
- }
914
- &:checked:disabled + span {
915
- background-color: ${Colors.MEDIUM_GRAY.Hex};
916
- border-color: ${Colors.MEDIUM_GRAY.Hex};
917
- }
918
- &:disabled + span {
919
- background-color: #d3d3d3;
920
- border-color: #d3d3d3;
921
- }
922
- &:checked + span:after {
923
- display: block;
924
- }
925
- `;
926
- const Check$1 = styled.span `
927
- height: 17px;
928
- width: 17px;
929
- min-width: 17px;
930
- background-color: #fff;
931
- border-width: 2px;
932
- border-style: solid;
933
- border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
934
- box-sizing: border-box;
935
- position: relative;
936
- &:after {
937
- content: '';
938
- position: absolute;
939
- left: 3px;
940
- top: 0px;
941
- width: 7px;
942
- height: 12px;
943
- border: solid white;
944
- border-width: 0 3px 3px 0;
945
- -webkit-transform: rotate(45deg);
946
- -ms-transform: rotate(45deg);
947
- transform: rotate(45deg);
948
- box-sizing: border-box;
949
- display: none;
950
- }
951
- `;
952
- const Label$3 = styled.span `
953
- font-family: ${FontStyles.DEFAULT};
954
- font-size: ${FontSizes.DEFAULT};
955
- font-weight: 400;
956
- line-height: 1.6em;
957
- color: ${props => props.color || Colors.BLACK.Hex};
958
- margin-left: 6px;
959
- box-sizing: border-box;
931
+ const Input$2 = styled.input `
932
+ font-size: 20px;
933
+ margin: 0px;
934
+ line-height: 1.1em;
935
+ box-sizing: border-box;
936
+ position: absolute;
937
+ opacity: 0;
938
+ cursor: pointer;
939
+ height: 0;
940
+ width: 0;
941
+ &:checked + span {
942
+ background-color: ${Colors.PRIMARY.Hex};
943
+ border-color: ${Colors.PRIMARY.Hex};
944
+ }
945
+ &:checked:disabled + span {
946
+ background-color: ${Colors.MEDIUM_GRAY.Hex};
947
+ border-color: ${Colors.MEDIUM_GRAY.Hex};
948
+ }
949
+ &:disabled + span {
950
+ background-color: #d3d3d3;
951
+ border-color: #d3d3d3;
952
+ }
953
+ &:checked + span:after {
954
+ display: block;
955
+ }
956
+ `;
957
+ const Check$1 = styled.span `
958
+ height: 17px;
959
+ width: 17px;
960
+ min-width: 17px;
961
+ background-color: #fff;
962
+ border-width: 2px;
963
+ border-style: solid;
964
+ border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
965
+ box-sizing: border-box;
966
+ position: relative;
967
+ &:after {
968
+ content: '';
969
+ position: absolute;
970
+ left: 3px;
971
+ top: 0px;
972
+ width: 7px;
973
+ height: 12px;
974
+ border: solid white;
975
+ border-width: 0 3px 3px 0;
976
+ -webkit-transform: rotate(45deg);
977
+ -ms-transform: rotate(45deg);
978
+ transform: rotate(45deg);
979
+ box-sizing: border-box;
980
+ display: none;
981
+ }
982
+ `;
983
+ const Label$3 = styled.span `
984
+ font-family: ${FontStyles.DEFAULT};
985
+ font-size: ${FontSizes.DEFAULT};
986
+ font-weight: 400;
987
+ line-height: 1.6em;
988
+ color: ${props => props.color || Colors.BLACK.Hex};
989
+ margin-left: 6px;
990
+ box-sizing: border-box;
960
991
  `;
961
992
  const Checkbox = (_a) => {
962
- var { children, color, disabled, checked, onChange, invalid, tooltip } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip"]);
963
- return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps),
964
- React.createElement(Input$2, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'checkbox' }),
965
- React.createElement(Check$1, { "$invalid": invalid }),
966
- children ? (React.createElement(Label$3, { color: color },
993
+ var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex"]);
994
+ const id = generateUniqueId('checkbox');
995
+ return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps, { id: `${id}-wrapper` }),
996
+ React.createElement(Input$2, { checked: checked, disabled: disabled, id: `${id}-input`, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
997
+ React.createElement(Check$1, { "$invalid": invalid, id: `${id}-check` }),
998
+ children ? (React.createElement(Label$3, { color: color, id: `${id}-label` },
967
999
  children,
968
1000
  tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)) : null));
969
- };
970
-
971
- const SelectAll = styled.div `
972
- padding: 8px 12px;
973
- border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
974
- box-sizing: border-box;
1001
+ };
1002
+
1003
+ const SelectAll = styled.div `
1004
+ padding: 8px 12px;
1005
+ border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
1006
+ box-sizing: border-box;
975
1007
  `;
976
- const Options$1 = styled.div `
977
- padding: 12px;
978
- box-sizing: border-box;
1008
+ const Options$1 = styled.div `
1009
+ padding: 12px;
1010
+ box-sizing: border-box;
979
1011
  `;
980
1012
  const Checklist = (_a) => {
981
1013
  var { disabled, onChange, options, selected = [], showSelectAll } = _a, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "selected", "showSelectAll"]);
@@ -1004,83 +1036,86 @@ const Checklist = (_a) => {
1004
1036
  },
1005
1037
  });
1006
1038
  };
1039
+ const id = generateUniqueId('checklist');
1007
1040
  return (React.createElement(React.Fragment, null,
1008
- showSelectAll && values.length ? (React.createElement(SelectAll, null,
1009
- React.createElement(Checkbox, { checked: selected.length === values.length, disabled: disabled, onChange: handleToggleAll }, "Select All"))) : null,
1010
- React.createElement(Options$1, null, options.map((option, i) => {
1041
+ showSelectAll && values.length ? (React.createElement(SelectAll, { id: `${id}-select-all` },
1042
+ React.createElement(Checkbox, { checked: selected.length === values.length, disabled: disabled, id: `${id}-checkbox-select-all`, onChange: handleToggleAll }, "Select All"))) : null,
1043
+ React.createElement(Options$1, { id: `${id}-options` }, options.map((option, i) => {
1011
1044
  const label = `${option.label || option.value}`;
1012
1045
  const checked = selected.includes(option.value);
1013
- return (React.createElement(Checkbox, Object.assign({ key: i }, accessibleProps, { checked: checked, color: option.color, disabled: disabled, onChange: handleChange.bind(null, option) }), label));
1046
+ const optionId = generateUniqueId('option');
1047
+ 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));
1014
1048
  }))));
1015
- };
1016
-
1017
- const Wrapper$a = styled.div `
1018
- border-radius: 4px;
1019
- height: 40px;
1020
- background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1021
- position: relative;
1022
- cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};
1023
- border-width: 1px;
1024
- border-style: solid;
1025
- border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
1026
- border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
1027
- flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
1028
- box-sizing: border-box;
1029
- padding: 10px 0px;
1030
- display: flex;
1031
- align-items: center;
1032
- width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1033
-
1034
- &:focus-within {
1035
- border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1036
- }
1049
+ };
1050
+
1051
+ const Wrapper$a = styled.div `
1052
+ border-radius: 4px;
1053
+ height: 40px;
1054
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1055
+ position: relative;
1056
+ cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};
1057
+ border-width: 1px;
1058
+ border-style: solid;
1059
+ border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
1060
+ border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
1061
+ flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
1062
+ box-sizing: border-box;
1063
+ padding: 10px 0px;
1064
+ display: flex;
1065
+ align-items: center;
1066
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1067
+
1068
+ &:focus-within {
1069
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1070
+ }
1037
1071
  `;
1038
1072
  Wrapper$a.defaultProps = { theme: EditableTheme };
1039
- const Trigger$1 = styled.select `
1040
- appearance: none;
1041
- box-shadow: none;
1042
- outline: none;
1043
- border: none;
1044
- color: ${Colors.BLACK.Hex};
1045
- font-size: ${FontSizes.DEFAULT};
1046
- font-weight: 400;
1047
- font-family: ${FontStyles.DEFAULT};
1048
- line-height: 2.9em;
1049
- background-color: transparent;
1050
- background-image: none;
1051
- width: 100%;
1052
- box-sizing: border-box;
1053
- padding: 0px 30px 0px 10px;
1054
- box-sizing: border-box;
1055
- position: relative;
1056
- z-index: 2;
1057
- `;
1058
- const IconWrapper$2 = styled(Icon) `
1059
- position: absolute;
1060
- right: 9px;
1061
- z-index: 1;
1062
- `;
1063
- const SearchInput$1 = styled.input `
1064
- position: absolute;
1065
- left: 2px;
1066
- top: 2px;
1067
- z-index: 999;
1068
- width: 90%;
1069
- height: 30px;
1070
- border: none;
1071
- outline: none;
1072
- color: ${Colors.BLACK.Hex};
1073
- font-family: ${FontStyles.DEFAULT};
1074
- font-size: ${FontSizes.DEFAULT};
1075
- font-weight: 400;
1076
- line-height: 2.9em;
1077
- overflow: hidden;
1078
- white-space: nowrap;
1073
+ const Trigger$1 = styled.select `
1074
+ appearance: none;
1075
+ box-shadow: none;
1076
+ outline: none;
1077
+ border: none;
1078
+ color: ${Colors.BLACK.Hex};
1079
+ font-size: ${FontSizes.DEFAULT};
1080
+ font-weight: 400;
1081
+ font-family: ${FontStyles.DEFAULT};
1082
+ line-height: 3.1em;
1083
+ background-color: transparent;
1084
+ background-image: none;
1085
+ width: 100%;
1086
+ box-sizing: border-box;
1087
+ padding: 0px 30px 0px 10px;
1088
+ box-sizing: border-box;
1089
+ position: relative;
1090
+ z-index: 2;
1091
+ `;
1092
+ const IconWrapper$2 = styled(Icon) `
1093
+ position: absolute;
1094
+ right: 9px;
1095
+ z-index: 1;
1096
+ `;
1097
+ const SearchInput$1 = styled.input `
1098
+ position: absolute;
1099
+ left: 2px;
1100
+ top: 2px;
1101
+ z-index: 999;
1102
+ width: 90%;
1103
+ height: 30px;
1104
+ border: none;
1105
+ outline: none;
1106
+ color: ${Colors.BLACK.Hex};
1107
+ font-family: ${FontStyles.DEFAULT};
1108
+ font-size: ${FontSizes.DEFAULT};
1109
+ font-weight: 400;
1110
+ line-height: 2.9em;
1111
+ overflow: hidden;
1112
+ white-space: nowrap;
1079
1113
  `;
1080
1114
  const Select = (_a) => {
1081
- var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style"]);
1115
+ 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"]);
1082
1116
  const [searchTerm, setSearchTerm] = React.useState('');
1083
1117
  const [value, setValue] = React.useState(propValue || '');
1118
+ const id = generateUniqueId('select');
1084
1119
  // Update the value when the prop changes
1085
1120
  React.useEffect(() => {
1086
1121
  setValue(propValue || '');
@@ -1100,24 +1135,24 @@ const Select = (_a) => {
1100
1135
  const filteredOptionGroups = searchable
1101
1136
  ? 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()); }) })))
1102
1137
  : optionGroups;
1103
- return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style },
1104
- searchable && (React.createElement(SearchInput$1, Object.assign({ onChange: handleSearch, placeholder: placeholder, type: 'text', value: searchTerm }, accessibleProps))),
1105
- React.createElement(Trigger$1, Object.assign({ disabled: readOnly, onChange: handleChange, placeholder: placeholder, value: value }, accessibleProps),
1106
- placeholder && !value && (React.createElement("option", { disabled: true, value: '' }, placeholder)),
1138
+ return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, id: `${id}-wrapper` },
1139
+ searchable && (React.createElement(SearchInput$1, Object.assign({ id: `${id}-search-input`, onChange: handleSearch, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, type: 'text', value: searchTerm }, accessibleProps))),
1140
+ React.createElement(Trigger$1, Object.assign({ disabled: readOnly, id: `${id}-trigger`, onChange: handleChange, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),
1141
+ placeholder && !value && (React.createElement("option", { disabled: true, id: `${id}-placeholder`, value: '' }, placeholder)),
1107
1142
  filteredOptionGroups &&
1108
- filteredOptionGroups.map((group, i) => (React.createElement("optgroup", { key: i, label: group.label || `Group ${i}` }, group.options.map((option, i) => (React.createElement("option", { key: i, style: { color: option.color }, value: option.value }, option.label || option.value)))))),
1143
+ 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)))))),
1109
1144
  filteredOptions &&
1110
- filteredOptions.map((option, i) => (React.createElement("option", { key: i, style: { color: option.color }, value: option.value }, option.label || option.value)))),
1111
- React.createElement(IconWrapper$2, { color: Colors.BLACK.Hex, path: js.mdiChevronDown, size: '22px' })));
1112
- };
1113
-
1114
- const DatePickerWrapper = styled.div `
1115
- display: flex;
1116
- width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1117
- `;
1118
- const Middle = styled.div `
1119
- margin: 0px -1px;
1120
- flex-grow: 1;
1145
+ filteredOptions.map((option, i) => (React.createElement("option", { id: `${id}-option-${i}`, key: i, style: { color: option.color }, value: option.value }, option.label || option.value)))),
1146
+ React.createElement(IconWrapper$2, { color: Colors.BLACK.Hex, id: `${id}-icon`, path: js.mdiChevronDown, size: '22px' })));
1147
+ };
1148
+
1149
+ const DatePickerWrapper = styled.div `
1150
+ display: flex;
1151
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1152
+ `;
1153
+ const Middle = styled.div `
1154
+ margin: 0px -1px;
1155
+ flex-grow: 1;
1121
1156
  `;
1122
1157
  const DatePicker = ({ readOnly = false, invalid = false, maxDate = null, minDate = null, date,
1123
1158
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -1192,72 +1227,73 @@ onChange = () => { }, style, }) => {
1192
1227
  setSelectedYear(e.target.value);
1193
1228
  setDDate(new_date);
1194
1229
  };
1230
+ const id = generateUniqueId('date-picker');
1195
1231
  return (React.createElement(React.Fragment, null,
1196
- React.createElement(DatePickerWrapper, { "$style": style },
1197
- React.createElement(Select, { invalid: invalid, onChange: handleMonthChange, options: months, placeholder: 'Select Month', readOnly: readOnly, style: { borderRadius: '4px 0px 0px 4px', flexGrow: 3 }, value: selectedMonth }),
1198
- React.createElement(Middle, null,
1199
- React.createElement(Select, { invalid: invalid, onChange: handleDayChange, options: dayOptions, placeholder: 'Select Day', readOnly: readOnly, style: { borderRadius: '0px' }, value: selectedDay })),
1200
- React.createElement(Select, { invalid: invalid, onChange: handleYearChange, options: years, placeholder: 'Select Year', readOnly: readOnly, style: { borderRadius: '0px 4px 4px 0px', flexGrow: 2 }, value: selectedYear }))));
1201
- };
1202
-
1203
- const Scrim$1 = styled.div `
1204
- position: ${({ $position }) => $position};
1205
- top: 0;
1206
- right: 0;
1207
- bottom: 0;
1208
- left: 0;
1209
- z-index: ${({ $position }) => ($position === 'fixed' ? 9998 : 10)};
1210
- background: ${({ $scrim }) => ($scrim === 'dark' ? 'rgba(0,0,0,0.8)' : 'transparent')};
1211
- `;
1212
- const Container$2 = styled.div `
1213
- z-index: ${({ $position }) => ($position === 'fixed' ? 9999 : 11)};
1214
- min-width: 400px;
1215
- width: ${({ $width }) => $width || '400px'};
1216
- overflow: hidden;
1217
- box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
1218
- outline: none;
1219
- border: none;
1220
- position: ${({ $position }) => $position};
1221
- top: 0;
1222
- right: 0;
1223
- bottom: 0;
1224
- padding: 0px;
1225
- display: flex;
1226
- flex-direction: column;
1227
- box-sizing: border-box;
1228
- background: #fff;
1229
- `;
1230
- const Header$2 = styled.div `
1231
- padding: 30px 20px;
1232
- display: flex;
1233
- align-items: flex-start;
1234
- box-sizing: border-box;
1235
- flex-shrink: 0;
1236
- background: #fff;
1237
- `;
1238
- const Close$1 = styled.div `
1239
- margin-left: auto;
1240
- display: flex;
1241
- align-items: center;
1242
- padding-left: 20px;
1243
- cursor: pointer;
1244
- `;
1245
- const ContentWrapper$1 = styled.div `
1246
- overflow-x: hidden;
1247
- overflow-y: auto;
1248
- box-sizing: border-box;
1249
- flex: 1;
1250
- background: #fff;
1251
- `;
1252
- const ButtonBar$1 = styled.div `
1253
- padding: 20px;
1254
- display: flex;
1255
- align-items: center;
1256
- justify-content: flex-end;
1257
- box-sizing: border-box;
1258
- gap: 10px;
1259
- flex-shrink: 0;
1260
- background: #fff;
1232
+ React.createElement(DatePickerWrapper, { "$style": style, id: `${id}-wrapper` },
1233
+ 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 }),
1234
+ React.createElement(Middle, { id: `${id}-middle` },
1235
+ React.createElement(Select, { id: `${id}-day-select`, invalid: invalid, onChange: handleDayChange, options: dayOptions, placeholder: 'Select Day', readOnly: readOnly, style: { borderRadius: '0px' }, value: selectedDay })),
1236
+ 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 }))));
1237
+ };
1238
+
1239
+ const Scrim$1 = styled.div `
1240
+ position: ${({ $position }) => $position};
1241
+ top: 0;
1242
+ right: 0;
1243
+ bottom: 0;
1244
+ left: 0;
1245
+ z-index: ${({ $position }) => ($position === 'fixed' ? 9998 : 10)};
1246
+ background: ${({ $scrim }) => ($scrim === 'dark' ? 'rgba(0,0,0,0.8)' : 'transparent')};
1247
+ `;
1248
+ const Container$2 = styled.div `
1249
+ z-index: ${({ $position }) => ($position === 'fixed' ? 9999 : 11)};
1250
+ min-width: 400px;
1251
+ width: ${({ $width }) => $width || '400px'};
1252
+ overflow: hidden;
1253
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
1254
+ outline: none;
1255
+ border: none;
1256
+ position: ${({ $position }) => $position};
1257
+ top: 0;
1258
+ right: 0;
1259
+ bottom: 0;
1260
+ padding: 0px;
1261
+ display: flex;
1262
+ flex-direction: column;
1263
+ box-sizing: border-box;
1264
+ background: #fff;
1265
+ `;
1266
+ const Header$2 = styled.div `
1267
+ padding: 30px 20px;
1268
+ display: flex;
1269
+ align-items: flex-start;
1270
+ box-sizing: border-box;
1271
+ flex-shrink: 0;
1272
+ background: #fff;
1273
+ `;
1274
+ const Close$1 = styled.div `
1275
+ margin-left: auto;
1276
+ display: flex;
1277
+ align-items: center;
1278
+ padding-left: 20px;
1279
+ cursor: pointer;
1280
+ `;
1281
+ const ContentWrapper$1 = styled.div `
1282
+ overflow-x: hidden;
1283
+ overflow-y: auto;
1284
+ box-sizing: border-box;
1285
+ flex: 1;
1286
+ background: #fff;
1287
+ `;
1288
+ const ButtonBar$1 = styled.div `
1289
+ padding: 20px;
1290
+ display: flex;
1291
+ align-items: center;
1292
+ justify-content: flex-end;
1293
+ box-sizing: border-box;
1294
+ gap: 10px;
1295
+ flex-shrink: 0;
1296
+ background: #fff;
1261
1297
  `;
1262
1298
  const Drawer = (_a) => {
1263
1299
  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"]);
@@ -1271,189 +1307,192 @@ const Drawer = (_a) => {
1271
1307
  document.onkeydown = null;
1272
1308
  };
1273
1309
  }, []);
1310
+ const id = generateUniqueId('drawer');
1274
1311
  return (React.createElement(React.Fragment, null,
1275
- React.createElement(Container$2, Object.assign({}, accessibleProps, { "$position": position, "$width": width }),
1276
- React.createElement(Header$2, null,
1277
- React.createElement("div", null,
1278
- title ? React.createElement(Heading, { type: 'secondary' }, title) : null,
1279
- description ? React.createElement(Copy, { color: 'GRAY' }, description) : null),
1280
- React.createElement(Close$1, { onClick: onClose },
1281
- React.createElement(Button, { format: 'secondary', icon: js.mdiClose, small: true }))),
1282
- React.createElement(ContentWrapper$1, null, children),
1283
- primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, null,
1284
- tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary' }))) : null,
1285
- secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary' }))) : null,
1286
- primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary' }))) : null)) : null),
1287
- scrim ? React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, onClick: onClose }) : null));
1288
- };
1289
-
1312
+ React.createElement(Container$2, Object.assign({}, accessibleProps, { "$position": position, "$width": width, id: `${id}-container` }),
1313
+ React.createElement(Header$2, { id: `${id}-header` },
1314
+ React.createElement("div", { id: `${id}-header-content` },
1315
+ title ? (React.createElement(Heading, { id: `${id}-title`, type: 'secondary' }, title)) : null,
1316
+ description ? (React.createElement(Copy, { color: 'GRAY', id: `${id}-description` }, description)) : null),
1317
+ React.createElement(Close$1, { id: `${id}-close`, onClick: onClose },
1318
+ React.createElement(Button, { format: 'secondary', icon: js.mdiClose, id: `${id}-close-button`, small: true }))),
1319
+ React.createElement(ContentWrapper$1, { id: `${id}-content-wrapper` }, children),
1320
+ primaryButton || secondaryButton || tertiaryButton ? (React.createElement(ButtonBar$1, { id: `${id}-button-bar` },
1321
+ tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary', id: `${id}-tertiary-button` }))) : null,
1322
+ secondaryButton ? (React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary', id: `${id}-secondary-button` }))) : null,
1323
+ primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary', id: `${id}-primary-button` }))) : null)) : null),
1324
+ scrim ? (React.createElement(Scrim$1, { "$position": position, "$scrim": scrim, id: `${id}-scrim`, onClick: onClose })) : null));
1325
+ };
1326
+
1290
1327
  const Wrapper$9 = styled.div(props => (Object.assign({ margin: '0px 0px 18px 0px' }, props.$customStyle)));
1291
- const LabelRow = styled.div `
1292
- display: flex;
1293
- align-items: center;
1294
- justify-content: space-between;
1295
- margin: 0 0 4px 0;
1296
- box-sizing: border-box;
1297
- `;
1298
- const Label$2 = styled.label `
1299
- font-size: ${FontSizes.DEFAULT};
1300
- font-weight: 500;
1301
- line-height: 1.3em;
1302
- font-family: ${FontStyles.DEFAULT};
1303
- color: ${Colors.BLACK.Hex};
1304
- display: flex;
1305
- align-items: center;
1306
- `;
1307
- const Required = styled.span `
1308
- color: ${Colors.RED.Hex};
1309
- margin-left: 4px;
1310
- `;
1311
- const Action = styled.span `
1312
- font-size: ${FontSizes.DEFAULT};
1313
- font-weight: 500;
1314
- line-height: 1em;
1315
- font-family: ${FontStyles.DEFAULT};
1316
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
1317
- cursor: pointer;
1328
+ const LabelRow = styled.div `
1329
+ display: flex;
1330
+ align-items: center;
1331
+ justify-content: space-between;
1332
+ margin: 0 0 4px 0;
1333
+ box-sizing: border-box;
1334
+ `;
1335
+ const Label$2 = styled.label `
1336
+ font-size: ${FontSizes.DEFAULT};
1337
+ font-weight: 500;
1338
+ line-height: 1.3em;
1339
+ font-family: ${FontStyles.DEFAULT};
1340
+ color: ${Colors.BLACK.Hex};
1341
+ display: flex;
1342
+ align-items: center;
1343
+ `;
1344
+ const Required = styled.span `
1345
+ color: ${Colors.RED.Hex};
1346
+ margin-left: 4px;
1347
+ `;
1348
+ const Action = styled.span `
1349
+ font-size: ${FontSizes.DEFAULT};
1350
+ font-weight: 500;
1351
+ line-height: 1em;
1352
+ font-family: ${FontStyles.DEFAULT};
1353
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
1354
+ cursor: pointer;
1318
1355
  `;
1319
1356
  Action.defaultProps = { theme: EditableTheme };
1320
- const Description = styled.div `
1321
- font-size: ${FontSizes.SMALL};
1322
- font-weight: 400;
1323
- line-height: 1.3em;
1324
- font-family: ${FontStyles.DEFAULT};
1325
- color: ${Colors.BLACK.Hex};
1326
- margin: 0 0 8px 0;
1327
- box-sizing: border-box;
1328
- `;
1329
- const Validation = styled.div `
1330
- font-size: ${FontSizes.SMALL};
1331
- font-weight: 400;
1332
- line-height: 1.3em;
1333
- font-family: ${FontStyles.DEFAULT};
1334
- color: ${Colors.RED.Hex};
1335
- margin: 4px 0 0 0;
1336
- box-sizing: border-box;
1357
+ const Description = styled.div `
1358
+ font-size: ${FontSizes.SMALL};
1359
+ font-weight: 400;
1360
+ line-height: 1.3em;
1361
+ font-family: ${FontStyles.DEFAULT};
1362
+ color: ${Colors.BLACK.Hex};
1363
+ margin: 0 0 8px 0;
1364
+ box-sizing: border-box;
1365
+ `;
1366
+ const Validation = styled.div `
1367
+ font-size: ${FontSizes.SMALL};
1368
+ font-weight: 400;
1369
+ line-height: 1.3em;
1370
+ font-family: ${FontStyles.DEFAULT};
1371
+ color: ${Colors.RED.Hex};
1372
+ margin: 4px 0 0 0;
1373
+ box-sizing: border-box;
1337
1374
  `;
1338
1375
  const Field = (_a) => {
1339
1376
  var { action, children, validationText, label, description, required, htmlFor, style = {}, tooltip } = _a, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip"]);
1340
- return (React.createElement(Wrapper$9, Object.assign({ "$customStyle": style }, accessibleProps),
1341
- React.createElement(LabelRow, null,
1342
- React.createElement(Label$2, { htmlFor: htmlFor },
1377
+ const id = generateUniqueId('field');
1378
+ return (React.createElement(Wrapper$9, Object.assign({ "$customStyle": style }, accessibleProps, { id: `${id}-wrapper` }),
1379
+ React.createElement(LabelRow, { id: `${id}-label-row` },
1380
+ React.createElement(Label$2, { htmlFor: htmlFor, id: `${id}-label` },
1343
1381
  label,
1344
- required ? React.createElement(Required, null, "*") : null,
1382
+ required ? React.createElement(Required, { id: `${id}-required` }, "*") : null,
1345
1383
  tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null),
1346
- action ? (React.createElement(Action, { id: action.id, onClick: action.onClick }, action.label)) : null),
1347
- description ? React.createElement(Description, null, description) : null,
1348
- children,
1349
- validationText ? React.createElement(Validation, null, validationText) : null));
1350
- };
1351
-
1352
- const Wrapper$8 = styled.fieldset `
1353
- margin-inline-start: 0px;
1354
- margin-inline-end: 0px;
1355
- padding-block-start: 0px;
1356
- padding-inline-start: 0px;
1357
- padding-inline-end: 0px;
1358
- padding-block-end: 0px;
1359
- min-inline-size: min-content;
1360
- border-width: 0px;
1361
- border-style: none;
1362
- border-color: transparent;
1363
- border-image: none;
1364
- `;
1365
- const Label$1 = styled.legend `
1366
- padding-inline-start: 0px;
1367
- padding-inline-end: 0px;
1368
-
1369
- color: ${Colors.BLACK.Hex};
1370
- font-family: ${FontStyles.DEFAULT};
1371
- font-size: ${FontSizes.DEFAULT};
1372
- font-weight: 500;
1373
- line-height: 22px;
1374
- margin-bottom: 6px;
1375
- `;
1376
- const Content$1 = styled.div `
1377
- padding: 20px;
1378
- border-radius: 8px;
1379
- background: #fcfcfc;
1384
+ action ? (React.createElement(Action, { id: action.id || `${id}-action`, onClick: action.onClick }, action.label)) : null),
1385
+ description ? React.createElement(Description, { id: `${id}-description` }, description) : null,
1386
+ React.createElement("div", { id: `${id}-children` }, children),
1387
+ validationText ? React.createElement(Validation, { id: `${id}-validation` }, validationText) : null));
1388
+ };
1389
+
1390
+ const Wrapper$8 = styled.fieldset `
1391
+ margin-inline-start: 0px;
1392
+ margin-inline-end: 0px;
1393
+ padding-block-start: 0px;
1394
+ padding-inline-start: 0px;
1395
+ padding-inline-end: 0px;
1396
+ padding-block-end: 0px;
1397
+ min-inline-size: min-content;
1398
+ border-width: 0px;
1399
+ border-style: none;
1400
+ border-color: transparent;
1401
+ border-image: none;
1402
+ `;
1403
+ const Label$1 = styled.legend `
1404
+ padding-inline-start: 0px;
1405
+ padding-inline-end: 0px;
1406
+
1407
+ color: ${Colors.BLACK.Hex};
1408
+ font-family: ${FontStyles.DEFAULT};
1409
+ font-size: ${FontSizes.DEFAULT};
1410
+ font-weight: 500;
1411
+ line-height: 22px;
1412
+ margin-bottom: 6px;
1413
+ `;
1414
+ const Content$1 = styled.div `
1415
+ padding: 20px;
1416
+ border-radius: 8px;
1417
+ background: #fcfcfc;
1380
1418
  `;
1381
1419
  const FieldGroup = ({ children, label }) => {
1382
- return (React.createElement(Wrapper$8, null,
1383
- React.createElement(Label$1, null, label),
1384
- React.createElement(Content$1, null, children)));
1385
- };
1386
-
1387
- const Dropzone = styled.div `
1388
- border-radius: 8px;
1389
- border-width: 1px;
1390
- border-style: dashed;
1391
- border-color: ${props => (props.$dragging ? props.theme.PRIMARY_COLOR.Hex : '#cccccc')};
1392
- background: ${props => props.$dragging ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)` : '#ffffff'};
1393
- cursor: copy;
1420
+ const id = generateUniqueId('field-group');
1421
+ return (React.createElement(Wrapper$8, { id: `${id}-wrapper` },
1422
+ React.createElement(Label$1, { id: `${id}-label` }, label),
1423
+ React.createElement(Content$1, { id: `${id}-content` }, children)));
1424
+ };
1425
+
1426
+ const Dropzone = styled.div `
1427
+ border-radius: 8px;
1428
+ border-width: 1px;
1429
+ border-style: dashed;
1430
+ border-color: ${props => (props.$dragging ? props.theme.PRIMARY_COLOR.Hex : '#cccccc')};
1431
+ background: ${props => props.$dragging ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)` : '#ffffff'};
1432
+ cursor: copy;
1394
1433
  `;
1395
1434
  Dropzone.defaultProps = { theme: EditableTheme };
1396
- const IconWrapper$1 = styled.div `
1397
- width: 80px;
1398
- height: 80px;
1399
- border-radius: 40px;
1400
- background: ${props => (props.$dragging ? '#ffffff' : '#f5f5f5')};
1401
- display: flex;
1402
- align-items: center;
1403
- justify-content: center;
1404
- `;
1405
- const StyledIcon$3 = styled(Icon) `
1406
- width: 40px !important;
1407
- height: 40px !important;
1408
-
1409
- > path {
1410
- fill: ${Colors.GRAY.Hex} !important;
1411
- }
1412
- `;
1413
- const ClickZone = styled.div `
1414
- margin: 40px 20px;
1415
- display: flex;
1416
- flex-direction: column;
1417
- align-items: center;
1418
- gap: 16px;
1419
- `;
1420
- const Content = styled.div `
1421
- display: flex;
1422
- flex-direction: column;
1423
- align-items: center;
1424
- z-index: 99999;
1425
- gap: 2px;
1426
- `;
1427
- const Files = styled.div `
1428
- display: flex;
1429
- flex-direction: column;
1430
- align-self: stretch;
1431
- gap: 10px;
1432
- margin: 20px;
1433
- `;
1434
- const MessageDiv = styled.div `
1435
- display: flex;
1436
- align-items: center;
1437
- justify-content: center;
1438
- `;
1439
- const File = styled.div `
1440
- display: flex;
1441
- padding: 10px;
1442
- align-items: center;
1443
- justify-content: space-between;
1444
- gap: 10px;
1445
- border-radius: 4px;
1446
- border: 1px solid #cccccc;
1447
- background: #ffffff;
1448
- `;
1449
- const Remove = styled(Icon) `
1450
- width: 24px;
1451
- height: 24px;
1452
- cursor: pointer;
1453
-
1454
- > path {
1455
- fill: ${Colors.RED.Hex} !important;
1456
- }
1435
+ const IconWrapper$1 = styled.div `
1436
+ width: 80px;
1437
+ height: 80px;
1438
+ border-radius: 40px;
1439
+ background: ${props => (props.$dragging ? '#ffffff' : '#f5f5f5')};
1440
+ display: flex;
1441
+ align-items: center;
1442
+ justify-content: center;
1443
+ `;
1444
+ const StyledIcon$3 = styled(Icon) `
1445
+ width: 40px !important;
1446
+ height: 40px !important;
1447
+
1448
+ > path {
1449
+ fill: ${Colors.GRAY.Hex} !important;
1450
+ }
1451
+ `;
1452
+ const ClickZone = styled.div `
1453
+ margin: 40px 20px;
1454
+ display: flex;
1455
+ flex-direction: column;
1456
+ align-items: center;
1457
+ gap: 16px;
1458
+ `;
1459
+ const Content = styled.div `
1460
+ display: flex;
1461
+ flex-direction: column;
1462
+ align-items: center;
1463
+ z-index: 99999;
1464
+ gap: 2px;
1465
+ `;
1466
+ const Files = styled.div `
1467
+ display: flex;
1468
+ flex-direction: column;
1469
+ align-self: stretch;
1470
+ gap: 10px;
1471
+ margin: 20px;
1472
+ `;
1473
+ const MessageDiv = styled.div `
1474
+ display: flex;
1475
+ align-items: center;
1476
+ justify-content: center;
1477
+ `;
1478
+ const File = styled.div `
1479
+ display: flex;
1480
+ padding: 10px;
1481
+ align-items: center;
1482
+ justify-content: space-between;
1483
+ gap: 10px;
1484
+ border-radius: 4px;
1485
+ border: 1px solid #cccccc;
1486
+ background: #ffffff;
1487
+ `;
1488
+ const Remove = styled(Icon) `
1489
+ width: 24px;
1490
+ height: 24px;
1491
+ cursor: pointer;
1492
+
1493
+ > path {
1494
+ fill: ${Colors.RED.Hex} !important;
1495
+ }
1457
1496
  `;
1458
1497
  const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, value = [], message, tooltipInfo = '', validateFile, }) => {
1459
1498
  const inputRef = React.useRef(null);
@@ -1554,25 +1593,27 @@ const FileUpload = ({ accept, onChange, onError, maxFiles = 10, maxSize = 2, val
1554
1593
  setAllowMoreFiles(false);
1555
1594
  }
1556
1595
  }, [files]);
1596
+ const id = generateUniqueId('file-upload');
1557
1597
  return (React.createElement(React.Fragment, null,
1558
- React.createElement("input", { accept: accept, multiple: true, onChange: allowMoreFiles ? handleChange : undefined, ref: inputRef, style: { display: 'none' }, type: 'file' }),
1559
- React.createElement(Dropzone, { "$dragging": dragging, onDragEnter: allowMoreFiles ? handleDrag : undefined, onDragLeave: allowMoreFiles ? handleDrag : undefined, onDragOver: allowMoreFiles ? handleDrag : undefined, onDrop: allowMoreFiles ? handleDrop : undefined, value: files ? files : [] },
1560
- files.length ? (React.createElement(Files, null, files.map(file => {
1561
- return (React.createElement(File, { key: file.name },
1562
- React.createElement(Copy, { type: 'bold' }, file.name),
1563
- React.createElement(Remove, { onClick: handleRemove.bind(null, file), path: js.mdiMinusCircle })));
1598
+ React.createElement("input", { accept: accept, id: `${id}-input`, multiple: true, onChange: allowMoreFiles ? handleChange : undefined, ref: inputRef, style: { display: 'none' }, type: 'file' }),
1599
+ 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 : [] },
1600
+ files.length ? (React.createElement(Files, { id: `${id}-files` }, files.map(file => {
1601
+ const fileId = generateUniqueId('file');
1602
+ return (React.createElement(File, { id: `${fileId}-file`, key: file.name },
1603
+ React.createElement(Copy, { id: `${fileId}-file-name`, type: 'bold' }, file.name),
1604
+ React.createElement(Remove, { id: `${fileId}-remove`, onClick: handleRemove.bind(null, file), path: js.mdiMinusCircle })));
1564
1605
  }))) : null,
1565
- allowMoreFiles ? (React.createElement(ClickZone, { onClick: triggerFileExplorer },
1566
- files.length ? null : (React.createElement(IconWrapper$1, { "$dragging": dragging },
1567
- React.createElement(StyledIcon$3, { path: js.mdiFolderPlusOutline }))),
1568
- React.createElement(Content, null,
1569
- React.createElement(Copy, { align: 'center', type: 'bold' }, "Drag & drop files here or click to select files"),
1570
- message ? (React.createElement(MessageDiv, null,
1571
- React.createElement(Copy, { align: 'center', color: 'GRAY' }, message),
1572
- tooltipInfo && (React.createElement("span", null,
1606
+ allowMoreFiles ? (React.createElement(ClickZone, { id: `${id}-click-zone`, onClick: triggerFileExplorer },
1607
+ files.length ? null : (React.createElement(IconWrapper$1, { "$dragging": dragging, id: `${id}-icon-wrapper` },
1608
+ React.createElement(StyledIcon$3, { id: `${id}-icon`, path: js.mdiFolderPlusOutline }))),
1609
+ React.createElement(Content, { id: `${id}-content` },
1610
+ React.createElement(Copy, { align: 'center', id: `${id}-copy`, type: 'bold' }, "Drag & drop files here or click to select files"),
1611
+ message ? (React.createElement(MessageDiv, { id: `${id}-message-div` },
1612
+ React.createElement(Copy, { align: 'center', color: 'GRAY', id: `${id}-message` }, message),
1613
+ tooltipInfo && (React.createElement("span", { id: `${id}-tooltip` },
1573
1614
  React.createElement(Tooltip, { children: tooltipInfo, position: 'left-center' }))))) : null))) : null)));
1574
- };
1575
-
1615
+ };
1616
+
1576
1617
  const getAgesFromDob = (dob) => {
1577
1618
  let calculated_current_age = null;
1578
1619
  let calculated_nearest_age = null;
@@ -1645,154 +1686,154 @@ const formatAsSsn = (number) => {
1645
1686
  formatted_value = `${formatted_value.substring(0, 3)}-${formatted_value.substring(3, 5)}-${formatted_value.substring(5, 9)}`;
1646
1687
  }
1647
1688
  return formatted_value;
1648
- };
1649
-
1650
- const StyledInput = styled.input `
1651
- border: none !important;
1652
- background: none !important;
1653
- font-size: ${FontSizes.DEFAULT};
1654
- font-weight: 400;
1655
- font-family: ${FontStyles.DEFAULT};
1656
- line-height: 1.28em;
1689
+ };
1690
+
1691
+ const StyledInput = styled.input `
1692
+ border: none !important;
1693
+ background: none !important;
1694
+ font-size: ${FontSizes.DEFAULT};
1695
+ font-weight: 400;
1696
+ font-family: ${FontStyles.DEFAULT};
1697
+ line-height: 1.28em;
1657
1698
  color: ${props => props.$showErrorTextColor && props.$invalid && !props.$readOnly
1658
1699
  ? Colors.RED.Hex
1659
- : Colors.BLACK.Hex};
1660
- position: relative;
1661
- height: ${props => props.$height || 'auto'};
1662
- padding: 10px;
1663
- opacity: ${props => (props.$readOnly ? 0.6 : 1)};
1664
- box-shadow: none;
1665
- outline: none;
1666
- margin: 0px;
1667
- text-indent: 0px;
1668
- --webkit-appearance: none;
1669
- box-sizing: border-box;
1670
- display: block;
1671
- width: 100%;
1672
- `;
1673
- const StyledTextArea = styled.textarea `
1674
- border: none !important;
1675
- background: none !important;
1676
- overflow-y: scroll !important;
1677
- font-size: 14px;
1678
- font-weight: 400;
1679
- height: ${props => props.$height || 'auto'};
1680
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
1681
- line-height: 1.28em;
1700
+ : Colors.BLACK.Hex};
1701
+ position: relative;
1702
+ height: ${props => props.$height || 'auto'};
1703
+ padding: 10px;
1704
+ opacity: ${props => (props.$readOnly ? 0.6 : 1)};
1705
+ box-shadow: none;
1706
+ outline: none;
1707
+ margin: 0px;
1708
+ text-indent: 0px;
1709
+ --webkit-appearance: none;
1710
+ box-sizing: border-box;
1711
+ display: block;
1712
+ width: 100%;
1713
+ `;
1714
+ const StyledTextArea = styled.textarea `
1715
+ border: none !important;
1716
+ background: none !important;
1717
+ overflow-y: scroll !important;
1718
+ font-size: 14px;
1719
+ font-weight: 400;
1720
+ height: ${props => props.$height || 'auto'};
1721
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
1722
+ line-height: 1.28em;
1682
1723
  color: ${props => props.$showErrorTextColor && props.$invalid && !props.$readOnly
1683
1724
  ? Colors.RED.Hex
1684
- : Colors.BLACK.Hex};
1685
- position: relative;
1686
- padding: 10px;
1687
- opacity: 1;
1688
- box-shadow: none;
1689
- outline: none;
1690
- margin: 0px;
1691
- text-indent: 0px;
1692
- --webkit-appearance: none;
1693
- overflow-wrap: break-word;
1694
- box-sizing: border-box;
1695
- display: block;
1696
- width: 100%;
1725
+ : Colors.BLACK.Hex};
1726
+ position: relative;
1727
+ padding: 10px;
1728
+ opacity: 1;
1729
+ box-shadow: none;
1730
+ outline: none;
1731
+ margin: 0px;
1732
+ text-indent: 0px;
1733
+ --webkit-appearance: none;
1734
+ overflow-wrap: break-word;
1735
+ box-sizing: border-box;
1736
+ display: block;
1737
+ width: 100%;
1697
1738
  ${({ $readOnly }) => $readOnly &&
1698
- `
1699
- background-color: #f0f0f0;
1700
- color: #999999;
1701
- overflow-y: scroll;
1702
- `}
1703
- `;
1704
- const StyledSuffix = styled.div `
1705
- box-sizing: border-box;
1706
- border-radius: 0px 4px 4px 0px;
1707
- display: flex;
1708
- justify-content: center;
1709
- align-items: center;
1710
- padding: 10px;
1711
- height: auto;
1712
- background: #f5f5f5;
1713
- border-width: 0px 0px 0px 1px;
1714
- border-style: solid;
1715
- border-color: #cccccc;
1716
- font-family: ${FontStyles.DEFAULT};
1717
- font-style: normal;
1718
- font-weight: 400;
1719
- font-size: ${FontSizes.DEFAULT};
1720
- color: ${Colors.BLACK.Hex};
1721
- `;
1722
- const StyledWrapper = styled.div `
1723
- display: flex;
1724
- width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1725
- background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1726
- position: relative;
1727
- border-width: 1px;
1728
- border-style: solid;
1729
- border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
1730
- border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
1731
-
1732
- &:focus-within {
1733
- border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1734
- }
1739
+ `
1740
+ background-color: #f0f0f0;
1741
+ color: #999999;
1742
+ overflow-y: scroll;
1743
+ `}
1744
+ `;
1745
+ const StyledSuffix = styled.div `
1746
+ box-sizing: border-box;
1747
+ border-radius: 0px 4px 4px 0px;
1748
+ display: flex;
1749
+ justify-content: center;
1750
+ align-items: center;
1751
+ padding: 10px;
1752
+ height: auto;
1753
+ background: #f5f5f5;
1754
+ border-width: 0px 0px 0px 1px;
1755
+ border-style: solid;
1756
+ border-color: #cccccc;
1757
+ font-family: ${FontStyles.DEFAULT};
1758
+ font-style: normal;
1759
+ font-weight: 400;
1760
+ font-size: ${FontSizes.DEFAULT};
1761
+ color: ${Colors.BLACK.Hex};
1762
+ `;
1763
+ const StyledWrapper = styled.div `
1764
+ display: flex;
1765
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
1766
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
1767
+ position: relative;
1768
+ border-width: 1px;
1769
+ border-style: solid;
1770
+ border-color: ${props => (props.$invalid && !props.$readOnly ? Colors.RED.Hex : '#cccccc')};
1771
+ border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
1772
+
1773
+ &:focus-within {
1774
+ border-color: ${props => (props.$readOnly ? '#cccccc' : props.theme.PRIMARY_COLOR.Hex)};
1775
+ }
1735
1776
  `;
1736
1777
  StyledWrapper.defaultProps = { theme: EditableTheme };
1737
- const SuggestedValues = styled.div `
1738
- background: #fff;
1739
- box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
1740
- border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
1741
- border-radius: 0px 0px 4px 4px;
1742
- border-style: solid;
1743
- border-top: none;
1744
- border-width: 1px;
1745
- left: -1px;
1746
- position: absolute;
1747
- right: -1px;
1748
- top: 39px;
1749
- z-index: 9999;
1750
- max-height: 220px;
1751
- overflow: auto;
1778
+ const SuggestedValues = styled.div `
1779
+ background: #fff;
1780
+ box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
1781
+ border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
1782
+ border-radius: 0px 0px 4px 4px;
1783
+ border-style: solid;
1784
+ border-top: none;
1785
+ border-width: 1px;
1786
+ left: -1px;
1787
+ position: absolute;
1788
+ right: -1px;
1789
+ top: 39px;
1790
+ z-index: 9999;
1791
+ max-height: 220px;
1792
+ overflow: auto;
1752
1793
  `;
1753
1794
  SuggestedValues.defaultProps = { theme: EditableTheme };
1754
- const SuggestedSummary = styled.div `
1755
- color: ${Colors.MEDIUM_GRAY.Hex};
1756
- font-size: 12px;
1757
- font-family: ${FontStyles.DEFAULT};
1758
- font-weight: 500;
1759
- line-height: 18px;
1760
- padding: 10px 12px;
1761
- border-bottom: 1px solid #e5e5e5;
1762
- background: #fff;
1763
- z-index: 1;
1764
- position: sticky;
1765
- top: 0px;
1766
- `;
1767
- const SuggestedValue = styled.div `
1768
- cursor: pointer;
1769
- padding: 8px 12px;
1770
- font-size: ${FontSizes.DEFAULT};
1771
- font-family: ${FontStyles.DEFAULT};
1772
- font-weight: 400;
1773
- line-height: 1.6em;
1774
- color: ${Colors.BLACK.Hex};
1775
-
1776
- &:hover {
1777
- background: rgba(${props => props.theme.PRIMARY_COLOR.Rgb}, 0.05);
1778
- }
1795
+ const SuggestedSummary = styled.div `
1796
+ color: ${Colors.MEDIUM_GRAY.Hex};
1797
+ font-size: 12px;
1798
+ font-family: ${FontStyles.DEFAULT};
1799
+ font-weight: 500;
1800
+ line-height: 18px;
1801
+ padding: 10px 12px;
1802
+ border-bottom: 1px solid #e5e5e5;
1803
+ background: #fff;
1804
+ z-index: 1;
1805
+ position: sticky;
1806
+ top: 0px;
1807
+ `;
1808
+ const SuggestedValue = styled.div `
1809
+ cursor: pointer;
1810
+ padding: 8px 12px;
1811
+ font-size: ${FontSizes.DEFAULT};
1812
+ font-family: ${FontStyles.DEFAULT};
1813
+ font-weight: 400;
1814
+ line-height: 1.6em;
1815
+ color: ${Colors.BLACK.Hex};
1816
+
1817
+ &:hover {
1818
+ background: rgba(${props => props.theme.PRIMARY_COLOR.Rgb}, 0.05);
1819
+ }
1779
1820
  `;
1780
1821
  SuggestedValue.defaultProps = { theme: EditableTheme };
1781
- const CharacterCount = styled.div `
1782
- font-family: ${FontStyles.DEFAULT};
1783
- font-size: ${FontSizes.SMALL};
1784
- color: ${Colors.MEDIUM_GRAY.Hex};
1785
- padding: 10px;
1822
+ const CharacterCount = styled.div `
1823
+ font-family: ${FontStyles.DEFAULT};
1824
+ font-size: ${FontSizes.SMALL};
1825
+ color: ${Colors.MEDIUM_GRAY.Hex};
1826
+ padding: 10px;
1786
1827
  `;
1787
- const Loader$1 = styled.div `
1788
- padding: 0px 10px;
1789
- display: flex;
1790
- align-items: center;
1828
+ const Loader$1 = styled.div `
1829
+ padding: 0px 10px;
1830
+ display: flex;
1831
+ align-items: center;
1791
1832
  `;
1792
1833
  const Input$1 = (_a) => {
1793
1834
  var { format, suffix, height, invalid, loading, max, maxLength, min, onBlur, onChange, onFocus, onKeyDown,
1794
1835
  // eslint-disable-next-line @typescript-eslint/no-empty-function
1795
- onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null } = _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"]);
1836
+ onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex } = _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"]);
1796
1837
  const [show_options, setShowOptions] = React.useState(false);
1797
1838
  const [internalValue, setInternalValue] = React.useState(value);
1798
1839
  const [internalSuggestedValues, setInternalSuggestedValues] = React.useState(suggestedValues || []);
@@ -1858,7 +1899,8 @@ const Input$1 = (_a) => {
1858
1899
  if (format === 'ssn' && type !== 'password') {
1859
1900
  formatted_value = formatAsSsn(internalValue);
1860
1901
  }
1861
- return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length },
1902
+ const id = generateUniqueId('input');
1903
+ return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, id: `${id}-wrapper` },
1862
1904
  React.createElement(StyledTextArea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, maxLength: maxLength, onBlur: readOnly
1863
1905
  ? e => e.preventDefault()
1864
1906
  : e => {
@@ -1873,12 +1915,12 @@ const Input$1 = (_a) => {
1873
1915
  setShowOptions(true);
1874
1916
  if (onFocus)
1875
1917
  onFocus(e);
1876
- }, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, ref: innerRef, value: formatted_value }, accessibleProps)),
1877
- loading ? (React.createElement(Loader$1, null,
1918
+ }, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, readOnly: readOnly, ref: innerRef, tabIndex: readOnly ? -1 : tabIndex, value: formatted_value }, accessibleProps, { id: `${id}-textarea` })),
1919
+ loading ? (React.createElement(Loader$1, { id: `${id}-loader` },
1878
1920
  React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
1879
- showCharCount ? (React.createElement(CharacterCount, null,
1921
+ showCharCount ? (React.createElement(CharacterCount, { id: `${id}-char-count` },
1880
1922
  internalValue.length,
1881
- maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length },
1923
+ maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, id: `${id}-wrapper` },
1882
1924
  React.createElement(StyledInput, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, max: max, maxLength: maxLength, min: min, onBlur: readOnly
1883
1925
  ? e => e.preventDefault()
1884
1926
  : e => {
@@ -1893,209 +1935,213 @@ const Input$1 = (_a) => {
1893
1935
  setShowOptions(true);
1894
1936
  if (onFocus)
1895
1937
  onFocus(e);
1896
- }, onKeyDown: readOnly ? e => e.preventDefault() : onKeyDown, placeholder: placeholder, ref: innerRef, step: step, type: type, value: format === 'currency_decimal' && internalValue ? `$${formatted_value}` : formatted_value }, accessibleProps)),
1897
- loading ? (React.createElement(Loader$1, null,
1938
+ }, 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` })),
1939
+ loading ? (React.createElement(Loader$1, { id: `${id}-loader` },
1898
1940
  React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
1899
- showCharCount ? (React.createElement(CharacterCount, null,
1941
+ showCharCount ? (React.createElement(CharacterCount, { id: `${id}-char-count` },
1900
1942
  internalValue.length,
1901
1943
  maxLength ? ` / ${maxLength}` : null)) : null,
1902
- suffix && React.createElement(StyledSuffix, null, suffix),
1903
- show_options && internalSuggestedValues.length ? (React.createElement(SuggestedValues, null,
1904
- React.createElement(SuggestedSummary, null,
1944
+ suffix && React.createElement(StyledSuffix, { id: `${id}-suffix` }, suffix),
1945
+ show_options && internalSuggestedValues.length ? (React.createElement(SuggestedValues, { id: `${id}-suggested-values` },
1946
+ React.createElement(SuggestedSummary, { id: `${id}-suggested-summary` },
1905
1947
  internalSuggestedValues.length,
1906
1948
  " Results Match \"",
1907
1949
  internalValue,
1908
1950
  "\""),
1909
- internalSuggestedValues.map((suggestedValue, index) => (React.createElement(SuggestedValue, { key: index, onClick: () => {
1951
+ internalSuggestedValues.map((suggestedValue, index) => (React.createElement(SuggestedValue, { id: `${id}-suggested-value-${index}`, key: index, onClick: () => {
1910
1952
  handleInputChange({ target: { value: suggestedValue } });
1911
1953
  onSuggestedSelect();
1912
1954
  setShowOptions(false);
1913
1955
  } }, suggestedValue))))) : null));
1914
- };
1915
-
1916
- const Wrapper$7 = styled.a `
1917
- color: ${props => props.theme.PRIMARY_COLOR.Hex};
1918
- font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
1919
- line-height: ${props => (props.$small ? '1.5em' : '1.6em')};
1920
- letter-spacing: ${props => (props.$small ? '1px' : '0px')};
1921
- font-weight: 500;
1922
- font-style: normal;
1923
- text-decoration: 'none';
1924
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
1925
- margin: 0px;
1926
- padding: 0px;
1927
- box-sizing: border-box;
1928
- cursor: pointer;
1956
+ };
1957
+
1958
+ const Wrapper$7 = styled.a `
1959
+ color: ${props => props.theme.PRIMARY_COLOR.Hex};
1960
+ font-size: ${props => (props.$small ? FontSizes.SMALL : FontSizes.DEFAULT)};
1961
+ line-height: ${props => (props.$small ? '1.5em' : '1.6em')};
1962
+ letter-spacing: ${props => (props.$small ? '1px' : '0px')};
1963
+ font-weight: 500;
1964
+ font-style: normal;
1965
+ text-decoration: 'none';
1966
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
1967
+ margin: 0px;
1968
+ padding: 0px;
1969
+ box-sizing: border-box;
1970
+ cursor: pointer;
1929
1971
  `;
1930
1972
  Wrapper$7.defaultProps = { theme: EditableTheme };
1931
1973
  const Link = (_a) => {
1932
1974
  var { children, onClick, small } = _a, accessibleProps = __rest(_a, ["children", "onClick", "small"]);
1933
- return (React.createElement(Wrapper$7, Object.assign({ "$small": small, onClick: onClick }, accessibleProps), children));
1934
- };
1935
-
1936
- const dash = styled.keyframes `
1937
- 0% {
1938
- stroke-dasharray: 1, 160;
1939
- stroke-dashoffset: 0;
1940
- }
1941
- 50% {
1942
- stroke-dasharray: 80, 160;
1943
- stroke-dashoffset: -32;
1944
- }
1945
- 100% {
1946
- stroke-dasharray: 80, 160;
1947
- stroke-dashoffset: -124;
1948
- }
1949
- `;
1950
- const Spinner = styled.svg `
1951
- z-index: 2;
1952
- position: absolute;
1953
- top: 50%;
1954
- left: 50%;
1955
- transform: translate(-50%, -50%);
1956
- margin: 0 auto;
1957
- width: 40px;
1958
- height: 40px;
1959
- `;
1960
- const Path = styled.path `
1961
- stroke: #0193d7;
1962
- stroke-linecap: round;
1963
- -webkit-animation: ${dash} 1.1s ease-in-out infinite;
1964
- animation: ${dash} 1.1s ease-in-out infinite;
1975
+ const id = generateUniqueId('link');
1976
+ return (React.createElement(Wrapper$7, Object.assign({ "$small": small, onClick: onClick }, accessibleProps, { id: `${id}-wrapper` }), children));
1977
+ };
1978
+
1979
+ const dash = styled.keyframes `
1980
+ 0% {
1981
+ stroke-dasharray: 1, 160;
1982
+ stroke-dashoffset: 0;
1983
+ }
1984
+ 50% {
1985
+ stroke-dasharray: 80, 160;
1986
+ stroke-dashoffset: -32;
1987
+ }
1988
+ 100% {
1989
+ stroke-dasharray: 80, 160;
1990
+ stroke-dashoffset: -124;
1991
+ }
1992
+ `;
1993
+ const Spinner = styled.svg `
1994
+ z-index: 2;
1995
+ position: absolute;
1996
+ top: 50%;
1997
+ left: 50%;
1998
+ transform: translate(-50%, -50%);
1999
+ margin: 0 auto;
2000
+ width: 40px;
2001
+ height: 40px;
2002
+ `;
2003
+ const Path = styled.path `
2004
+ stroke: #0193d7;
2005
+ stroke-linecap: round;
2006
+ -webkit-animation: ${dash} 1.1s ease-in-out infinite;
2007
+ animation: ${dash} 1.1s ease-in-out infinite;
1965
2008
  `;
1966
2009
  const Loader = () => {
1967
- return (React.createElement(Spinner, { viewBox: '0 0 16 18' },
1968
- 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', strokeWidth: '2' })));
1969
- };
1970
-
1971
- const Steps = styled.div `
1972
- padding: 20px;
1973
- border-bottom: 1px solid #e7e6e6;
1974
- background: #f5f5f5;
1975
- display: flex;
1976
- gap: 30px;
1977
- align-items: center;
1978
- `;
1979
- const Step = styled.div `
1980
- display: flex;
1981
- align-items: center;
1982
- gap: 8px;
1983
- `;
1984
- const StyledIcon$2 = styled(Icon) `
1985
- > path {
1986
- fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
1987
- }
2010
+ const id = generateUniqueId('loader');
2011
+ return (React.createElement(Spinner, { id: `${id}-spinner`, viewBox: '0 0 16 18' },
2012
+ 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' })));
2013
+ };
2014
+
2015
+ const Steps = styled.div `
2016
+ padding: 20px;
2017
+ border-bottom: 1px solid #e7e6e6;
2018
+ background: #f5f5f5;
2019
+ display: flex;
2020
+ gap: 30px;
2021
+ align-items: center;
2022
+ `;
2023
+ const Step = styled.div `
2024
+ display: flex;
2025
+ align-items: center;
2026
+ gap: 8px;
2027
+ `;
2028
+ const StyledIcon$2 = styled(Icon) `
2029
+ > path {
2030
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2031
+ }
1988
2032
  `;
1989
2033
  StyledIcon$2.defaultProps = { theme: EditableTheme };
1990
- const StepIndicator = styled.div `
1991
- width: 30px;
1992
- height: 30px;
1993
- border-radius: 15px;
1994
- background: ${props => (props.$active ? props.theme.PRIMARY_COLOR.Hex : Colors.LIGHT_GRAY.Hex)};
1995
- color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
1996
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
1997
- font-size: 14px;
1998
- font-weight: 500;
1999
- line-height: 1;
2000
- display: flex;
2001
- align-items: center;
2002
- justify-content: center;
2003
- flex-shrink: 0;
2034
+ const StepIndicator = styled.div `
2035
+ width: 30px;
2036
+ height: 30px;
2037
+ border-radius: 15px;
2038
+ background: ${props => (props.$active ? props.theme.PRIMARY_COLOR.Hex : Colors.LIGHT_GRAY.Hex)};
2039
+ color: ${props => (props.$active ? '#fff' : Colors.MEDIUM_GRAY.Hex)};
2040
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
2041
+ font-size: 14px;
2042
+ font-weight: 500;
2043
+ line-height: 1;
2044
+ display: flex;
2045
+ align-items: center;
2046
+ justify-content: center;
2047
+ flex-shrink: 0;
2004
2048
  `;
2005
2049
  StepIndicator.defaultProps = { theme: EditableTheme };
2006
- const StepLabel = styled.div `
2007
- color: #000;
2008
- font-family: 'Roboto', Helvetica, Arial, sans-serif;
2009
- font-size: 14px;
2010
- font-weight: 500;
2011
- line-height: 1;
2012
- `;
2013
- const StepLine = styled.div `
2014
- height: 2px;
2015
- flex-grow: 1;
2016
- background-color: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.MEDIUM_GRAY.Hex)};
2017
- transition: background-color 0.5s ease-in-out;
2050
+ const StepLabel = styled.div `
2051
+ color: #000;
2052
+ font-family: 'Roboto', Helvetica, Arial, sans-serif;
2053
+ font-size: 14px;
2054
+ font-weight: 500;
2055
+ line-height: 1;
2056
+ `;
2057
+ const StepLine = styled.div `
2058
+ height: 2px;
2059
+ flex-grow: 1;
2060
+ background-color: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.MEDIUM_GRAY.Hex)};
2061
+ transition: background-color 0.5s ease-in-out;
2018
2062
  `;
2019
2063
  const ProgressBar = ({ steps, showStepLine = false }) => {
2020
- return (React.createElement(Steps, null, steps.map((step, i) => {
2064
+ const id = generateUniqueId('progress-bar');
2065
+ return (React.createElement(Steps, { id: `${id}-steps` }, steps.map((step, i) => {
2066
+ const stepId = generateUniqueId(`step-${i}`);
2021
2067
  return (React.createElement(React.Fragment, { key: i },
2022
- i !== 0 && showStepLine && React.createElement(StepLine, { "$active": step.active }),
2023
- React.createElement(Step, null,
2024
- step.complete ? (React.createElement(StyledIcon$2, { path: js.mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active }, i + 1)),
2025
- React.createElement(StepLabel, null, step.label))));
2068
+ i !== 0 && showStepLine && React.createElement(StepLine, { "$active": step.active, id: `${stepId}-line` }),
2069
+ React.createElement(Step, { id: `${stepId}-step` },
2070
+ step.complete ? (React.createElement(StyledIcon$2, { id: `${stepId}-icon`, path: js.mdiCheckboxMarkedCircleOutline, size: '32px' })) : (React.createElement(StepIndicator, { "$active": step.active, id: `${stepId}-indicator` }, i + 1)),
2071
+ React.createElement(StepLabel, { id: `${stepId}-label` }, step.label))));
2026
2072
  })));
2027
- };
2028
-
2029
- const Wrapper$6 = styled.div `
2030
- position: fixed;
2031
- top: 0;
2032
- right: 0;
2033
- bottom: 0;
2034
- left: 0;
2035
- z-index: 9999;
2036
- background: rgba(0, 0, 0, 0.8);
2037
- display: flex;
2038
- align-items: center;
2039
- justify-content: center;
2040
- `;
2041
- const Container$1 = styled.dialog `
2042
- width: ${props => (props.$fullscreen ? 'calc(100vw - 80px)' : props.$maxWidth || '900px')};
2043
- max-width: calc(100vw - 80px);
2044
- height: ${props => (props.$fullscreen ? 'calc(100vh - 80px)' : 'auto')};
2045
- max-height: calc(100vh - 80px);
2046
- border-radius: 8px;
2047
- overflow: hidden;
2048
- box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2049
- outline: none;
2050
- border: none;
2051
- position: relative;
2052
- padding: 0px;
2053
- box-sizing: border-box;
2054
- display: flex;
2055
- flex-direction: column;
2056
- `;
2057
- const Header$1 = styled.div `
2058
- flex-shrink: 0;
2059
- padding: 20px;
2060
- border-bottom: 1px solid #e7e6e6;
2061
- display: flex;
2062
- align-items: center;
2063
- background: #ffffff;
2064
- box-sizing: border-box;
2065
- `;
2066
- const Close = styled.div `
2067
- margin-left: auto;
2068
- display: flex;
2069
- align-items: center;
2070
- padding-left: 20px;
2071
- cursor: pointer;
2072
- `;
2073
- const CloseMsg = styled.span `
2074
- font-size: ${FontSizes.SMALL};
2075
- font-weight: 400;
2076
- font-family: ${FontStyles.DEFAULT};
2077
- line-height: 1em;
2078
- color: ${Colors.MEDIUM_GRAY.Hex};
2079
- `;
2080
- const ContentWrapper = styled.div `
2081
- overflow-x: hidden;
2082
- overflow-y: auto;
2083
- background: #ffffff;
2084
- flex: 1;
2085
- box-sizing: border-box;
2086
- `;
2087
- const ButtonBar = styled.div `
2088
- flex-shrink: 0;
2089
- background: #ffffff;
2090
- padding: 20px;
2091
- border-top: 1px solid #e7e6e6;
2092
- display: flex;
2093
- align-items: center;
2094
- justify-self: flex-end;
2095
- box-sizing: border-box;
2096
- `;
2097
- const ButtonContainer = styled.div `
2098
- margin: 0 10px;
2073
+ };
2074
+
2075
+ const Wrapper$6 = styled.div `
2076
+ position: fixed;
2077
+ top: 0;
2078
+ right: 0;
2079
+ bottom: 0;
2080
+ left: 0;
2081
+ z-index: 9999;
2082
+ background: rgba(0, 0, 0, 0.8);
2083
+ display: flex;
2084
+ align-items: center;
2085
+ justify-content: center;
2086
+ `;
2087
+ const Container$1 = styled.dialog `
2088
+ width: ${props => (props.$fullscreen ? 'calc(100vw - 80px)' : props.$maxWidth || '900px')};
2089
+ max-width: calc(100vw - 80px);
2090
+ height: ${props => (props.$fullscreen ? 'calc(100vh - 80px)' : 'auto')};
2091
+ max-height: calc(100vh - 80px);
2092
+ border-radius: 8px;
2093
+ overflow: hidden;
2094
+ box-shadow: 0px 10px 30px -15px rgba(0, 0, 0, 0.2);
2095
+ outline: none;
2096
+ border: none;
2097
+ position: relative;
2098
+ padding: 0px;
2099
+ box-sizing: border-box;
2100
+ display: flex;
2101
+ flex-direction: column;
2102
+ `;
2103
+ const Header$1 = styled.div `
2104
+ flex-shrink: 0;
2105
+ padding: 20px;
2106
+ border-bottom: 1px solid #e7e6e6;
2107
+ display: flex;
2108
+ align-items: center;
2109
+ background: #ffffff;
2110
+ box-sizing: border-box;
2111
+ `;
2112
+ const Close = styled.div `
2113
+ margin-left: auto;
2114
+ display: flex;
2115
+ align-items: center;
2116
+ padding-left: 20px;
2117
+ cursor: pointer;
2118
+ `;
2119
+ const CloseMsg = styled.span `
2120
+ font-size: ${FontSizes.SMALL};
2121
+ font-weight: 400;
2122
+ font-family: ${FontStyles.DEFAULT};
2123
+ line-height: 1em;
2124
+ color: ${Colors.MEDIUM_GRAY.Hex};
2125
+ `;
2126
+ const ContentWrapper = styled.div `
2127
+ overflow-x: hidden;
2128
+ overflow-y: auto;
2129
+ background: #ffffff;
2130
+ flex: 1;
2131
+ box-sizing: border-box;
2132
+ `;
2133
+ const ButtonBar = styled.div `
2134
+ flex-shrink: 0;
2135
+ background: #ffffff;
2136
+ padding: 20px;
2137
+ border-top: 1px solid #e7e6e6;
2138
+ display: flex;
2139
+ align-items: center;
2140
+ justify-self: flex-end;
2141
+ box-sizing: border-box;
2142
+ `;
2143
+ const ButtonContainer = styled.div `
2144
+ margin: 0 10px;
2099
2145
  `;
2100
2146
  const Modal = (_a) => {
2101
2147
  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"]);
@@ -2109,49 +2155,50 @@ const Modal = (_a) => {
2109
2155
  document.onkeydown = null;
2110
2156
  };
2111
2157
  }, []);
2112
- return (React.createElement(Wrapper$6, null,
2113
- React.createElement(Container$1, Object.assign({ "$fullscreen": fullscreen, "$maxWidth": maxWidth, open: true }, accessibleProps),
2114
- React.createElement(Header$1, null,
2115
- title ? React.createElement(Heading, { type: 'secondary' }, title) : null,
2116
- React.createElement(Close, { onClick: onClose },
2117
- React.createElement(CloseMsg, null, "(Esc)"),
2118
- React.createElement(Icon, { color: Colors.BLACK.Hex, path: js.mdiClose, size: '24px' }))),
2158
+ const id = generateUniqueId('modal');
2159
+ return (React.createElement(Wrapper$6, { id: `${id}-wrapper` },
2160
+ React.createElement(Container$1, Object.assign({ "$fullscreen": fullscreen, "$maxWidth": maxWidth, open: true }, accessibleProps, { id: `${id}-container` }),
2161
+ React.createElement(Header$1, { id: `${id}-header` },
2162
+ title ? (React.createElement(Heading, { id: `${id}-title`, type: 'secondary' }, title)) : null,
2163
+ React.createElement(Close, { id: `${id}-close`, onClick: onClose },
2164
+ React.createElement(CloseMsg, { id: `${id}-close-msg` }, "(Esc)"),
2165
+ React.createElement(Icon, { color: Colors.BLACK.Hex, id: `${id}-close-icon`, path: js.mdiClose, size: '24px' }))),
2119
2166
  steps ? React.createElement(ProgressBar, { steps: steps }) : null,
2120
- React.createElement(ContentWrapper, null, children),
2121
- primaryButton || secondaryButton || tertiaryButton || quarternaryButton ? (React.createElement(ButtonBar, null,
2122
- tertiaryButton || quarternaryButton ? (React.createElement("div", { style: {
2167
+ React.createElement(ContentWrapper, { id: `${id}-content-wrapper` }, children),
2168
+ primaryButton || secondaryButton || tertiaryButton || quarternaryButton ? (React.createElement(ButtonBar, { id: `${id}-button-bar` },
2169
+ tertiaryButton || quarternaryButton ? (React.createElement("div", { id: `${id}-left-buttons`, style: {
2123
2170
  marginRight: 'auto',
2124
2171
  paddingRight: 40,
2125
2172
  display: 'flex',
2126
2173
  alignItems: 'center',
2127
2174
  } },
2128
- tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary' }))) : null,
2129
- quarternaryButton ? (React.createElement(ButtonContainer, null,
2130
- React.createElement(Button, Object.assign({}, quarternaryButton, { format: quarternaryButton.format || 'secondary' })))) : null)) : null,
2131
- primaryButton || secondaryButton ? (React.createElement("div", { style: {
2175
+ tertiaryButton ? (React.createElement(Button, Object.assign({}, tertiaryButton, { format: tertiaryButton.format || 'secondary', id: `${id}-tertiary-button` }))) : null,
2176
+ quarternaryButton ? (React.createElement(ButtonContainer, { id: `${id}-quarternary-button-container` },
2177
+ React.createElement(Button, Object.assign({}, quarternaryButton, { format: quarternaryButton.format || 'secondary', id: `${id}-quarternary-button` })))) : null)) : null,
2178
+ primaryButton || secondaryButton ? (React.createElement("div", { id: `${id}-right-buttons`, style: {
2132
2179
  marginLeft: 'auto',
2133
2180
  paddingLeft: 40,
2134
2181
  display: 'flex',
2135
2182
  alignItems: 'center',
2136
2183
  } },
2137
- secondaryButton ? (React.createElement(ButtonContainer, null,
2138
- React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary' })))) : null,
2139
- primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary' }))) : null)) : null)) : null)));
2140
- };
2141
-
2142
- const Wrapper$5 = styled.div `
2143
- position: relative;
2144
- width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
2145
- `;
2146
- const Trigger = styled.div `
2147
- box-sizing: border-box;
2148
- border-radius: ${props => (props.$showOptions ? '4px 4px 0px 0px' : '4px')};
2149
- height: 40px;
2150
- padding: 0 10px;
2151
- position: relative;
2152
- cursor: pointer;
2153
- border-width: 1px;
2154
- border-style: solid;
2184
+ secondaryButton ? (React.createElement(ButtonContainer, { id: `${id}-secondary-button-container` },
2185
+ React.createElement(Button, Object.assign({}, secondaryButton, { format: secondaryButton.format || 'secondary', id: `${id}-secondary-button` })))) : null,
2186
+ primaryButton ? (React.createElement(Button, Object.assign({}, primaryButton, { format: primaryButton.format || 'primary', id: `${id}-primary-button` }))) : null)) : null)) : null)));
2187
+ };
2188
+
2189
+ const Wrapper$5 = styled.div `
2190
+ position: relative;
2191
+ width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
2192
+ `;
2193
+ const Trigger = styled.div `
2194
+ box-sizing: border-box;
2195
+ border-radius: ${props => (props.$showOptions ? '4px 4px 0px 0px' : '4px')};
2196
+ height: 40px;
2197
+ padding: 0 10px;
2198
+ position: relative;
2199
+ cursor: pointer;
2200
+ border-width: 1px;
2201
+ border-style: solid;
2155
2202
  border-color: ${props => {
2156
2203
  if (props.$invalid) {
2157
2204
  return Colors.RED.Hex;
@@ -2162,142 +2209,146 @@ const Trigger = styled.div `
2162
2209
  else {
2163
2210
  return '#cccccc';
2164
2211
  }
2165
- }};
2166
- background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
2167
- background-image: none;
2168
- display: flex;
2169
- width: 100%;
2170
- align-items: center;
2171
- justify-content: space-between;
2172
- z-index: 1;
2212
+ }};
2213
+ background-color: ${props => (props.$readOnly ? '#f5f5f5' : '#ffffff')};
2214
+ background-image: none;
2215
+ display: flex;
2216
+ width: 100%;
2217
+ align-items: center;
2218
+ justify-content: space-between;
2219
+ z-index: 1;
2173
2220
  `;
2174
2221
  Trigger.defaultProps = { theme: EditableTheme };
2175
- const Value = styled.div `
2176
- color: ${Colors.BLACK.Hex};
2177
- font-family: ${FontStyles.DEFAULT};
2178
- font-size: ${FontSizes.DEFAULT};
2179
- font-weight: 400;
2180
- line-height: 2.9em;
2181
- overflow: hidden;
2182
- text-overflow: ellipsis;
2183
- white-space: nowrap;
2184
- width: 100%;
2185
- `;
2186
- const Options = styled.div `
2187
- background: #fff;
2188
- box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
2189
- border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
2190
- border-radius: 0px 0px 4px 4px;
2191
- border-style: solid;
2192
- border-top: none;
2193
- border-width: 1px;
2194
- left: 0;
2195
- position: relative;
2196
- right: 0;
2197
- z-index: 10;
2198
- max-height: 220px;
2199
- overflow: auto;
2222
+ const Value = styled.div `
2223
+ color: ${Colors.BLACK.Hex};
2224
+ font-family: ${FontStyles.DEFAULT};
2225
+ font-size: ${FontSizes.DEFAULT};
2226
+ font-weight: 400;
2227
+ line-height: 2.9em;
2228
+ overflow: hidden;
2229
+ text-overflow: ellipsis;
2230
+ white-space: nowrap;
2231
+ width: 100%;
2232
+ `;
2233
+ const Options = styled.div `
2234
+ background: #fff;
2235
+ box-shadow: 0px 5px 30px -15px rgba(0, 0, 0, 0.2);
2236
+ border-color: ${props => props.theme.PRIMARY_COLOR.Hex};
2237
+ border-radius: 0px 0px 4px 4px;
2238
+ border-style: solid;
2239
+ border-top: none;
2240
+ border-width: 1px;
2241
+ left: 0;
2242
+ position: absolute;
2243
+ right: 0;
2244
+ z-index: 10;
2245
+ max-height: 220px;
2246
+ overflow: auto;
2200
2247
  `;
2201
2248
  Options.defaultProps = { theme: EditableTheme };
2202
- const Scrim = styled.div `
2203
- bottom: 0;
2204
- left: 0;
2205
- position: fixed;
2206
- right: 0;
2207
- top: 0;
2208
- z-index: 9;
2209
- `;
2210
- const SearchInput = styled.input `
2211
- position: absolute;
2212
- left: 2px;
2213
- top: 2px;
2214
- z-index: 999;
2215
- width: 90%;
2216
- height: 30px;
2217
- border: none;
2218
- outline: none;
2219
- color: ${Colors.BLACK.Hex};
2220
- font-family: ${FontStyles.DEFAULT};
2221
- font-size: ${FontSizes.DEFAULT};
2222
- font-weight: 400;
2223
- line-height: 2.9em;
2224
- overflow: hidden;
2225
- white-space: nowrap;
2249
+ const Scrim = styled.div `
2250
+ bottom: 0;
2251
+ left: 0;
2252
+ position: fixed;
2253
+ right: 0;
2254
+ top: 0;
2255
+ z-index: 9;
2256
+ `;
2257
+ const SearchInput = styled.input `
2258
+ position: absolute;
2259
+ left: 2px;
2260
+ top: 2px;
2261
+ z-index: 999;
2262
+ width: 90%;
2263
+ height: 30px;
2264
+ border: none;
2265
+ outline: none;
2266
+ color: ${Colors.BLACK.Hex};
2267
+ font-family: ${FontStyles.DEFAULT};
2268
+ font-size: ${FontSizes.DEFAULT};
2269
+ font-weight: 400;
2270
+ line-height: 2.9em;
2271
+ overflow: hidden;
2272
+ white-space: nowrap;
2226
2273
  `;
2227
2274
  const MultiSelect = (_a) => {
2228
2275
  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"]);
2229
2276
  const [showOptions, setShowOptions] = React.useState(false);
2230
2277
  const selected_options = options.filter(o => selected.includes(o.value));
2231
2278
  const [filter, setFilter] = React.useState('');
2279
+ const id = generateUniqueId('multiselect');
2232
2280
  // Filter the options based on the filter state
2233
2281
  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)); });
2234
- return (React.createElement(Wrapper$5, { "$style": style },
2235
- searchable && (React.createElement(SearchInput, { onChange: e => setFilter(e.target.value), onClick: () => setShowOptions(!showOptions), placeholder: `${showSelectAll ? options.length : selected_options.length} Selected`, type: 'text', value: filter })),
2236
- React.createElement(Trigger, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, "$showOptions": showOptions, onClick: readOnly ? undefined : setShowOptions.bind(null, !showOptions) }, accessibleProps),
2237
- React.createElement(Value, null, selected.length > 0 && selected.length <= displayCount
2282
+ return (React.createElement(Wrapper$5, { "$style": style, id: `${id}-wrapper` },
2283
+ 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 })),
2284
+ React.createElement(Trigger, Object.assign({ "$invalid": invalid, "$readOnly": readOnly, "$showOptions": showOptions, id: `${id}-trigger`, onClick: readOnly ? undefined : setShowOptions.bind(null, !showOptions) }, accessibleProps),
2285
+ React.createElement(Value, { id: `${id}-value` }, selected.length > 0 && selected.length <= displayCount
2238
2286
  ? selected_options.map(o => o.label || o.value).join(', ')
2239
2287
  : `${selected_options.length} Selected`),
2240
- React.createElement(Icon, { color: Colors.BLACK.Hex, path: showOptions ? js.mdiChevronUp : js.mdiChevronDown, size: '22px' })),
2241
- showOptions ? (React.createElement(Options, null,
2242
- React.createElement(Checklist, { onChange: onChange, options: filteredOptions, selected: selected, showSelectAll: showSelectAll }))) : null,
2243
- showOptions ? React.createElement(Scrim, { onClick: setShowOptions.bind(null, !showOptions) }) : null));
2244
- };
2245
-
2246
- const Wrapper$4 = styled.div `
2247
- display: flex;
2248
- padding: 16px 30px;
2249
- align-items: center;
2250
- gap: 20px;
2251
- align-self: stretch;
2252
- border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
2253
- `;
2254
- const Title = styled.div `
2255
- display: flex;
2256
- align-items: center;
2257
- gap: 20px;
2258
- `;
2259
- const Info = styled.div `
2260
- display: flex;
2261
- flex-direction: column;
2262
- align-items: flex-start;
2263
- gap: 4px;
2264
- flex: 1 0 0;
2265
- `;
2266
- const Breadcrumbs = styled.div `
2267
- display: flex;
2268
- align-items: center;
2269
- gap: 4px;
2270
- `;
2271
- const Actions = styled.div `
2272
- display: flex;
2273
- align-items: center;
2274
- gap: 8px;
2288
+ React.createElement(Icon, { color: Colors.BLACK.Hex, id: `${id}-icon`, path: showOptions ? js.mdiChevronUp : js.mdiChevronDown, size: '22px' })),
2289
+ showOptions ? (React.createElement(Options, { id: `${id}-options` },
2290
+ React.createElement(Checklist, { id: `${id}-checklist`, onChange: onChange, options: filteredOptions, selected: selected, showSelectAll: showSelectAll }))) : null,
2291
+ showOptions ? (React.createElement(Scrim, { id: `${id}-scrim`, onClick: setShowOptions.bind(null, !showOptions) })) : null));
2292
+ };
2293
+
2294
+ const Wrapper$4 = styled.div `
2295
+ display: flex;
2296
+ padding: 16px 30px;
2297
+ align-items: center;
2298
+ gap: 20px;
2299
+ align-self: stretch;
2300
+ border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
2301
+ `;
2302
+ const Title = styled.div `
2303
+ display: flex;
2304
+ align-items: center;
2305
+ gap: 20px;
2306
+ `;
2307
+ const Info = styled.div `
2308
+ display: flex;
2309
+ flex-direction: column;
2310
+ align-items: flex-start;
2311
+ gap: 4px;
2312
+ flex: 1 0 0;
2313
+ `;
2314
+ const Breadcrumbs = styled.div `
2315
+ display: flex;
2316
+ align-items: center;
2317
+ gap: 4px;
2318
+ `;
2319
+ const Actions = styled.div `
2320
+ display: flex;
2321
+ align-items: center;
2322
+ gap: 8px;
2275
2323
  `;
2276
2324
  const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu, tag }) => {
2277
2325
  const { format = 'primary', menuItems = [], label = '', enableHover = true, enableClick = false, show = false, } = buttonMenu || {};
2278
- return (React.createElement(Wrapper$4, null,
2279
- React.createElement(Info, null,
2280
- React.createElement(Title, null,
2281
- React.createElement(Heading, { type: 'secondary' }, title),
2282
- tag ? React.createElement(Tag, Object.assign({}, tag)) : null),
2283
- breadcrumbs ? (React.createElement(Breadcrumbs, null, breadcrumbs.map((crumb, i) => {
2326
+ const id = generateUniqueId('page-header');
2327
+ return (React.createElement(Wrapper$4, { id: `${id}-wrapper` },
2328
+ React.createElement(Info, { id: `${id}-info` },
2329
+ React.createElement(Title, { id: `${id}-title` },
2330
+ React.createElement(Heading, { id: `${id}-heading`, type: 'secondary' }, title),
2331
+ tag ? React.createElement(Tag, Object.assign({}, tag, { id: `${id}-tag` })) : null),
2332
+ breadcrumbs ? (React.createElement(Breadcrumbs, { id: `${id}-breadcrumbs` }, breadcrumbs.map((crumb, i) => {
2333
+ const crumbId = generateUniqueId(`breadcrumb-${i}`);
2284
2334
  return (React.createElement(React.Fragment, { key: i },
2285
- crumb.onClick ? (React.createElement(Link, { onClick: crumb.onClick, small: true }, crumb.label)) : (React.createElement(Copy, { type: 'small' }, crumb.label)),
2286
- i + 1 < breadcrumbs.length ? React.createElement(Icon.Icon, { path: js.mdiChevronRight, size: '14px' }) : null));
2335
+ 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)),
2336
+ i + 1 < breadcrumbs.length ? (React.createElement(Icon.Icon, { id: `${crumbId}-icon`, path: js.mdiChevronRight, size: '14px' })) : null));
2287
2337
  }))) : null),
2288
- actions ? (React.createElement(Actions, null,
2338
+ actions ? (React.createElement(Actions, { id: `${id}-actions` },
2289
2339
  actions.map((action, i) => {
2290
2340
  const { label } = action, buttonProps = __rest(action, ["label"]);
2291
- return (React.createElement(Button, Object.assign({}, buttonProps, { key: i, small: true }), label));
2341
+ const actionId = generateUniqueId(`action-${i}`);
2342
+ return (React.createElement(Button, Object.assign({}, buttonProps, { id: `${actionId}-button`, key: i, small: true }), label));
2292
2343
  }),
2293
2344
  menuItems.length ? (React.createElement(ButtonMenu, { enableClick: enableClick, enableHover: enableHover, format: format, label: label, menuItems: menuItems, show: show, small: true })) : null)) : null));
2294
- };
2295
-
2296
- const Wrapper$3 = styled.nav `
2297
- box-sizing: border-box;
2298
- display: flex;
2299
- align-items: center;
2300
- column-gap: 10px;
2345
+ };
2346
+
2347
+ const Wrapper$3 = styled.nav `
2348
+ box-sizing: border-box;
2349
+ display: flex;
2350
+ align-items: center;
2351
+ column-gap: 10px;
2301
2352
  `;
2302
2353
  const Pagination = (_a) => {
2303
2354
  var { currentPage = 1, onClick, pageCount = 0 } = _a, accessibleProps = __rest(_a, ["currentPage", "onClick", "pageCount"]);
@@ -2319,360 +2370,370 @@ const Pagination = (_a) => {
2319
2370
  onClick(new_page);
2320
2371
  }
2321
2372
  };
2322
- return (React.createElement(Wrapper$3, Object.assign({}, accessibleProps),
2323
- React.createElement(Button, { disabled: is_first_page, icon: js.mdiChevronLeft, onClick: handlePrevClick, small: true }),
2324
- React.createElement(Select, { onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), p => p + 1).map(p => ({
2373
+ const id = generateUniqueId('pagination');
2374
+ return (React.createElement(Wrapper$3, Object.assign({}, accessibleProps, { id: `${id}-wrapper` }),
2375
+ React.createElement(Button, { disabled: is_first_page, icon: js.mdiChevronLeft, id: `${id}-prev-button`, onClick: handlePrevClick, small: true }),
2376
+ React.createElement(Select, { id: `${id}-select`, onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), p => p + 1).map(p => ({
2325
2377
  label: `Page ${p}`,
2326
2378
  value: `${p}`,
2327
2379
  })), value: `${currentPage}` }),
2328
- React.createElement(Button, { disabled: is_last_page, icon: js.mdiChevronRight, onClick: handleNextClick, small: true })));
2329
- };
2330
-
2331
- const Wrapper$2 = styled.label `
2332
- border-radius: 4px;
2333
- padding: 4px 0px 4px 6px;
2334
- margin-left: -6px;
2335
- cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
2336
- display: flex;
2337
- align-items: center;
2338
- font-size: ${FontSizes.DEFAULT};
2339
- line-height: 1.6em;
2340
- box-sizing: border-box;
2341
- position: relative;
2342
-
2343
- &:focus-within {
2344
- background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
2345
- }
2380
+ React.createElement(Button, { disabled: is_last_page, icon: js.mdiChevronRight, id: `${id}-next-button`, onClick: handleNextClick, small: true })));
2381
+ };
2382
+
2383
+ const Wrapper$2 = styled.label `
2384
+ border-radius: 4px;
2385
+ padding: 4px 0px 4px 6px;
2386
+ margin-left: -6px;
2387
+ cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
2388
+ display: flex;
2389
+ align-items: center;
2390
+ font-size: ${FontSizes.DEFAULT};
2391
+ line-height: 1.6em;
2392
+ box-sizing: border-box;
2393
+ position: relative;
2394
+
2395
+ &:focus-within {
2396
+ background: ${props => `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.05)`};
2397
+ }
2346
2398
  `;
2347
2399
  Wrapper$2.defaultProps = { theme: EditableTheme };
2348
- const Input = styled.input `
2349
- font-size: 20px;
2350
- margin: 0px;
2351
- line-height: 1.6em;
2352
- box-sizing: border-box;
2353
- position: absolute;
2354
- opacity: 0;
2355
- cursor: pointer;
2356
- height: 0;
2357
- width: 0;
2358
- &:checked + span {
2359
- border-color: ${Colors.PRIMARY.Hex};
2360
- }
2361
- &:checked + span:after {
2362
- background-color: ${Colors.PRIMARY.Hex};
2363
- display: block;
2364
- }
2365
- &:disabled + span {
2366
- background-color: #d3d3d3;
2367
- border-color: #d3d3d3;
2368
- }
2369
- &:disabled + span:after {
2370
- background-color: #fff;
2371
- }
2372
- &:checked:disabled + span:after {
2373
- background-color: ${Colors.MEDIUM_GRAY.Hex};
2374
- }
2375
- `;
2376
- const Check = styled.span `
2377
- height: 17px;
2378
- width: 17px;
2379
- border-radius: 50%;
2380
- background-color: #fff;
2381
- border-width: 2px;
2382
- border-style: solid;
2383
- border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
2384
- box-sizing: border-box;
2385
- position: relative;
2386
- &:after {
2387
- content: '';
2388
- position: absolute;
2389
- top: 2px;
2390
- left: 2px;
2391
- width: 9px;
2392
- height: 9px;
2393
- border-radius: 50%;
2394
- box-sizing: border-box;
2395
- display: none;
2396
- }
2397
- `;
2398
- const Label = styled.span `
2399
- font-family: ${FontStyles.DEFAULT};
2400
- font-size: ${FontSizes.DEFAULT};
2401
- font-weight: 400;
2402
- color: ${Colors.BLACK.Hex};
2403
- line-height: 1.6em;
2404
- margin-left: 6px;
2400
+ const Input = styled.input `
2401
+ font-size: 20px;
2402
+ margin: 0px;
2403
+ line-height: 1.6em;
2404
+ box-sizing: border-box;
2405
+ position: absolute;
2406
+ opacity: 0;
2407
+ cursor: pointer;
2408
+ height: 0;
2409
+ width: 0;
2410
+ &:checked + span {
2411
+ border-color: ${Colors.PRIMARY.Hex};
2412
+ }
2413
+ &:checked + span:after {
2414
+ background-color: ${Colors.PRIMARY.Hex};
2415
+ display: block;
2416
+ }
2417
+ &:disabled + span {
2418
+ background-color: #d3d3d3;
2419
+ border-color: #d3d3d3;
2420
+ }
2421
+ &:disabled + span:after {
2422
+ background-color: #fff;
2423
+ }
2424
+ &:checked:disabled + span:after {
2425
+ background-color: ${Colors.MEDIUM_GRAY.Hex};
2426
+ }
2427
+ `;
2428
+ const Check = styled.span `
2429
+ height: 17px;
2430
+ width: 17px;
2431
+ border-radius: 50%;
2432
+ background-color: #fff;
2433
+ border-width: 2px;
2434
+ border-style: solid;
2435
+ border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
2436
+ box-sizing: border-box;
2437
+ position: relative;
2438
+ &:after {
2439
+ content: '';
2440
+ position: absolute;
2441
+ top: 2px;
2442
+ left: 2px;
2443
+ width: 9px;
2444
+ height: 9px;
2445
+ border-radius: 50%;
2446
+ box-sizing: border-box;
2447
+ display: none;
2448
+ }
2449
+ `;
2450
+ const Label = styled.span `
2451
+ font-family: ${FontStyles.DEFAULT};
2452
+ font-size: ${FontSizes.DEFAULT};
2453
+ font-weight: 400;
2454
+ color: ${Colors.BLACK.Hex};
2455
+ line-height: 1.6em;
2456
+ margin-left: 6px;
2405
2457
  `;
2406
2458
  const Radio = (_a) => {
2407
- var { children, disabled, checked, onChange, value, invalid, tooltip } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip"]);
2408
- return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps),
2409
- React.createElement(Input, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'radio', value: value }),
2410
- React.createElement(Check, { "$invalid": invalid }),
2411
- React.createElement(Label, null,
2459
+ var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex"]);
2460
+ const id = generateUniqueId('radio');
2461
+ return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps, { id: `${id}-wrapper` }),
2462
+ 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 }),
2463
+ React.createElement(Check, { "$invalid": invalid, id: `${id}-check` }),
2464
+ React.createElement(Label, { id: `${id}-label` },
2412
2465
  children,
2413
2466
  tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)));
2414
- };
2415
-
2467
+ };
2468
+
2416
2469
  const RadioList = (_a) => {
2417
2470
  var { disabled, onChange, options, value } = _a, accessibleProps = __rest(_a, ["disabled", "onChange", "options", "value"]);
2418
2471
  return (React.createElement(React.Fragment, null, options.map((option) => {
2419
2472
  const label = option.label || option.value;
2420
2473
  return (React.createElement(Radio, Object.assign({ checked: value === option.value, disabled: disabled, onChange: onChange, value: option.value }, accessibleProps), label));
2421
2474
  })));
2422
- };
2423
-
2424
- const StyledTable = styled.table `
2425
- width: 100%;
2426
- margin-top: 1px;
2427
- table-layout: ${props => props.$tableLayout || 'auto'};
2428
- border-collapse: collapse;
2429
- text-indent: 0px;
2430
- border-spacing: 0px;
2431
- border-color: none;
2432
- box-sizing: border-box;
2433
- `;
2434
- const Header = styled.th `
2435
- padding: 12px !important;
2436
- text-align: left;
2437
- font-weight: 500;
2438
- border-bottom: 1px solid #e5e5e5;
2439
- border-top: 1px solid #e5e5e5;
2440
- text-transform: uppercase;
2441
- font-size: 12px;
2442
- font-family: ${FontStyles.DEFAULT};
2443
- letter-spacing: 1px;
2444
- white-space: nowrap;
2445
- line-height: 1;
2446
- position: relative;
2447
- box-sizing: border-box;
2448
- width: ${props => props.$width || 'auto'};
2449
- cursor: ${props => (props.$isSortable ? 'pointer' : 'default')};
2450
- color: ${props => (props.$isSortable ? props.theme.PRIMARY_COLOR.Hex : Colors.BLACK.Hex)};
2475
+ };
2476
+
2477
+ const StyledTable = styled.table `
2478
+ width: 100%;
2479
+ margin-top: 1px;
2480
+ table-layout: ${props => props.$tableLayout || 'auto'};
2481
+ border-collapse: collapse;
2482
+ text-indent: 0px;
2483
+ border-spacing: 0px;
2484
+ border-color: none;
2485
+ box-sizing: border-box;
2486
+ `;
2487
+ const Header = styled.th `
2488
+ padding: 12px !important;
2489
+ text-align: left;
2490
+ font-weight: 500;
2491
+ border-bottom: 1px solid #e5e5e5;
2492
+ border-top: 1px solid #e5e5e5;
2493
+ text-transform: uppercase;
2494
+ font-size: 12px;
2495
+ font-family: ${FontStyles.DEFAULT};
2496
+ letter-spacing: 1px;
2497
+ white-space: nowrap;
2498
+ line-height: 1;
2499
+ position: relative;
2500
+ box-sizing: border-box;
2501
+ width: ${props => props.$width || 'auto'};
2502
+ cursor: ${props => (props.$isSortable ? 'pointer' : 'default')};
2503
+ color: ${props => (props.$isSortable ? props.theme.PRIMARY_COLOR.Hex : Colors.BLACK.Hex)};
2451
2504
  `;
2452
2505
  Header.defaultProps = { theme: EditableTheme };
2453
- const Row = styled.tr `
2454
- cursor: ${props => (props.$isClickable ? 'pointer' : 'default')};
2455
- transition: all 0.2s;
2456
- background-color: ${props => props.$bgColor};
2457
- box-sizing: border-box;
2458
- &:hover {
2459
- background-color: ${props => props.$isClickable ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.1)` : props.$bgColor};
2460
- }
2506
+ const Row = styled.tr `
2507
+ cursor: ${props => (props.$isClickable ? 'pointer' : 'default')};
2508
+ transition: all 0.2s;
2509
+ background-color: ${props => props.$bgColor};
2510
+ box-sizing: border-box;
2511
+ &:hover {
2512
+ background-color: ${props => props.$isClickable ? `rgba(${props.theme.PRIMARY_COLOR.Rgb}, 0.1)` : props.$bgColor};
2513
+ }
2461
2514
  `;
2462
2515
  Row.defaultProps = { theme: EditableTheme };
2463
- const Column = styled.td `
2464
- padding: 16px 12px !important;
2465
- font-size: ${FontSizes.DEFAULT} !important;
2466
- font-weight: 400 !important;
2467
- font-family: ${FontStyles.DEFAULT};
2468
- border: none !important;
2469
- word-break: break-word;
2470
- line-height: 1.4em;
2471
- box-sizing: border-box;
2472
- text-align: ${props => props.$align || 'left'};
2473
- width: ${props => props.$width || 'auto'};
2474
- `;
2475
- const IconWrapper = styled.span `
2476
- position: absolute;
2477
- top: 50%;
2478
- transform: translateY(-50%);
2479
- margin-left: 2px;
2480
- `;
2481
- const StyledIcon$1 = styled(Icon) `
2482
- > path {
2483
- fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2484
- }
2516
+ const Column = styled.td `
2517
+ padding: 16px 12px !important;
2518
+ font-size: ${FontSizes.DEFAULT} !important;
2519
+ font-weight: 400 !important;
2520
+ font-family: ${FontStyles.DEFAULT};
2521
+ border: none !important;
2522
+ word-break: break-word;
2523
+ line-height: 1.4em;
2524
+ box-sizing: border-box;
2525
+ text-align: ${props => props.$align || 'left'};
2526
+ width: ${props => props.$width || 'auto'};
2527
+ `;
2528
+ const IconWrapper = styled.span `
2529
+ position: absolute;
2530
+ top: 50%;
2531
+ transform: translateY(-50%);
2532
+ margin-left: 2px;
2533
+ `;
2534
+ const StyledIcon$1 = styled(Icon) `
2535
+ > path {
2536
+ fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
2537
+ }
2485
2538
  `;
2486
2539
  StyledIcon$1.defaultProps = { theme: EditableTheme };
2487
2540
  const Table = (_a) => {
2488
2541
  var { columns = [], data = [], sortBy, sortDirection, hideHeaders, onRowClick, onSortChange, tableLayout } = _a, accessibleProps = __rest(_a, ["columns", "data", "sortBy", "sortDirection", "hideHeaders", "onRowClick", "onSortChange", "tableLayout"]);
2489
- return (React.createElement(StyledTable, Object.assign({ "$tableLayout": tableLayout }, accessibleProps),
2490
- hideHeaders ? null : (React.createElement("thead", null,
2491
- React.createElement("tr", null, columns.map((column, i) => {
2492
- return (React.createElement(Header, { "$isSortable": column.isSortable, "$width": column.width, key: i, onClick: onSortChange === null || onSortChange === void 0 ? void 0 : onSortChange.bind(null, column.id) },
2542
+ const id = generateUniqueId('table');
2543
+ return (React.createElement(StyledTable, Object.assign({ "$tableLayout": tableLayout }, accessibleProps, { id: `${id}-styled-table` }),
2544
+ hideHeaders ? null : (React.createElement("thead", { id: `${id}-thead` },
2545
+ React.createElement("tr", { id: `${id}-header-row` }, columns.map((column, i) => {
2546
+ const columnId = generateUniqueId(`column-${i}`);
2547
+ 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) },
2493
2548
  column.label,
2494
- column.isSortable && sortBy === column.id ? (React.createElement(IconWrapper, null,
2495
- React.createElement(StyledIcon$1, { path: sortDirection === 'asc' ? js.mdiChevronUp : js.mdiChevronDown, size: '20px' }))) : null));
2549
+ column.isSortable && sortBy === column.id ? (React.createElement(IconWrapper, { id: `${columnId}-icon-wrapper` },
2550
+ React.createElement(StyledIcon$1, { id: `${columnId}-icon`, path: sortDirection === 'asc' ? js.mdiChevronUp : js.mdiChevronDown, size: '20px' }))) : null));
2496
2551
  })))),
2497
- data.length ? (React.createElement("tbody", null, data.map((row, i) => {
2498
- return (React.createElement(Row, { "$bgColor": i % 2 === 0 ? '#ffffff' : '#f9f9f9', "$isClickable": !!onRowClick, key: i, onClick: onRowClick ? onRowClick.bind(null, row) : undefined }, columns.map((column, i) => {
2499
- return (React.createElement(Column, { "$align": columns[i].align, "$width": columns[i].width, key: i }, column.render ? column.render(row) : row[column.id] || 'N/A'));
2552
+ data.length ? (React.createElement("tbody", { id: `${id}-tbody` }, data.map((row, i) => {
2553
+ const rowId = generateUniqueId(`row-${i}`);
2554
+ 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) => {
2555
+ const columnId = generateUniqueId(`column-${j}`);
2556
+ 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'));
2500
2557
  })));
2501
2558
  }))) : null));
2502
- };
2503
-
2504
- const Wrapper$1 = styled.div `
2505
- display: flex;
2506
- box-sizing: border-box;
2507
- align-items: flex-end;
2508
- border-top: 1px solid #e5e5e5;
2509
- border-bottom: 1px solid #e5e5e5;
2510
- flex-shrink: 0;
2511
- align-self: stretch;
2512
- padding: 0;
2513
- margin: 0;
2514
- `;
2515
- const Tab = styled.div `
2516
- display: flex;
2517
- align-items: center;
2518
- gap: 6px;
2519
- font-size: ${FontSizes.DEFAULT};
2520
- font-family: ${FontStyles.DEFAULT};
2521
- font-weight: ${props => (props.$isActive ? 500 : 400)};
2522
- color: ${props => (props.$isActive ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex)};
2523
- line-height: 1em;
2524
- padding: 16px 30px 12px;
2525
- margin: 0 0 -1px 0;
2526
- border-bottom-width: 4px;
2527
- border-bottom-style: solid;
2528
- border-bottom-color: ${props => props.$isActive ? props.theme.PRIMARY_COLOR.Hex : 'transparent'};
2529
- cursor: ${props => (props.$isActive ? 'default' : 'pointer')};
2530
- box-sizing: border-box;
2531
- &:hover {
2532
- color: ${props => (props.$isActive ? Colors.BLACK.Hex : props.theme.PRIMARY_COLOR.Hex)};
2533
- font-weight: 500;
2534
- }
2559
+ };
2560
+
2561
+ const Wrapper$1 = styled.div `
2562
+ display: flex;
2563
+ box-sizing: border-box;
2564
+ align-items: flex-end;
2565
+ border-top: 1px solid #e5e5e5;
2566
+ border-bottom: 1px solid #e5e5e5;
2567
+ flex-shrink: 0;
2568
+ align-self: stretch;
2569
+ padding: 0;
2570
+ margin: 0;
2571
+ `;
2572
+ const Tab = styled.div `
2573
+ display: flex;
2574
+ align-items: center;
2575
+ gap: 6px;
2576
+ font-size: ${FontSizes.DEFAULT};
2577
+ font-family: ${FontStyles.DEFAULT};
2578
+ font-weight: ${props => (props.$isActive ? 500 : 400)};
2579
+ color: ${props => (props.$isActive ? Colors.BLACK.Hex : Colors.MEDIUM_GRAY.Hex)};
2580
+ line-height: 1em;
2581
+ padding: 16px 30px 12px;
2582
+ margin: 0 0 -1px 0;
2583
+ border-bottom-width: 4px;
2584
+ border-bottom-style: solid;
2585
+ border-bottom-color: ${props => props.$isActive ? props.theme.PRIMARY_COLOR.Hex : 'transparent'};
2586
+ cursor: ${props => (props.$isActive ? 'default' : 'pointer')};
2587
+ box-sizing: border-box;
2588
+ &:hover {
2589
+ color: ${props => (props.$isActive ? Colors.BLACK.Hex : props.theme.PRIMARY_COLOR.Hex)};
2590
+ font-weight: 500;
2591
+ }
2535
2592
  `;
2536
2593
  Tab.defaultProps = { theme: EditableTheme };
2537
- const Badge = styled.div `
2538
- display: flex;
2539
- width: 18px;
2540
- height: 18px;
2541
- justify-content: center;
2542
- align-items: center;
2543
- border-radius: 9px;
2544
- background: ${props => (props.$isError ? Colors.RED.Hex : props.theme.PRIMARY_COLOR.Hex)};
2545
- color: #fff;
2546
- font-family: ${FontStyles.DEFAULT};
2547
- font-size: 12px;
2548
- font-weight: 500;
2549
- line-height: 1;
2550
- letter-spacing: 1px;
2594
+ const Badge = styled.div `
2595
+ display: flex;
2596
+ width: 18px;
2597
+ height: 18px;
2598
+ justify-content: center;
2599
+ align-items: center;
2600
+ border-radius: 9px;
2601
+ background: ${props => (props.$isError ? Colors.RED.Hex : props.theme.PRIMARY_COLOR.Hex)};
2602
+ color: #fff;
2603
+ font-family: ${FontStyles.DEFAULT};
2604
+ font-size: 12px;
2605
+ font-weight: 500;
2606
+ line-height: 1;
2607
+ letter-spacing: 1px;
2551
2608
  `;
2552
2609
  Badge.defaultProps = { theme: EditableTheme };
2553
2610
  const Tabs = (_a) => {
2554
2611
  var { tabs } = _a, accessibleProps = __rest(_a, ["tabs"]);
2555
- return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps), tabs.map((_a, i) => {
2612
+ const id = generateUniqueId('tabs');
2613
+ return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps, { id: `${id}-wrapper` }), tabs.map((_a, i) => {
2556
2614
  var { isActive, label, badgeCount, errorBadge, onClick } = _a, accessibleProps = __rest(_a, ["isActive", "label", "badgeCount", "errorBadge", "onClick"]);
2557
- return (React.createElement(Tab, Object.assign({ "$isActive": isActive || false, key: i, onClick: isActive ? undefined : onClick }, accessibleProps),
2558
- badgeCount ? React.createElement(Badge, { "$isError": errorBadge || false }, badgeCount) : null,
2615
+ const tabId = generateUniqueId(`tab-${i}`);
2616
+ return (React.createElement(Tab, Object.assign({ "$isActive": isActive || false, key: i, onClick: isActive ? undefined : onClick }, accessibleProps, { id: `${tabId}-tab` }),
2617
+ badgeCount ? (React.createElement(Badge, { "$isError": errorBadge || false, id: `${tabId}-badge` }, badgeCount)) : null,
2559
2618
  label));
2560
2619
  })));
2561
2620
  };
2562
- Tabs.defaultProps = {};
2563
-
2564
- const Track = styled.div `
2565
- height: 24px;
2566
- border-radius: 12px;
2567
- background: ${props => (props.$on ? Colors.GREEN.Hex : Colors.BLACK.Hex)};
2568
- display: flex;
2569
- align-items: center;
2570
- cursor: pointer;
2571
- width: 40px;
2572
- padding: 2px;
2573
- box-sizing: border-box;
2574
- `;
2575
- const Handle = styled.div `
2576
- width: 20px;
2577
- height: 20px;
2578
- border-radius: 10px;
2579
- background: #ffffff;
2580
- margin-left: ${props => (props.$on ? 'auto' : '0px')};
2581
- display: flex;
2582
- align-items: center;
2583
- justify-content: center;
2584
- box-sizing: border-box;
2621
+ Tabs.defaultProps = {};
2622
+
2623
+ const Track = styled.div `
2624
+ height: 24px;
2625
+ border-radius: 12px;
2626
+ background: ${props => (props.$on ? Colors.GREEN.Hex : Colors.BLACK.Hex)};
2627
+ display: flex;
2628
+ align-items: center;
2629
+ cursor: pointer;
2630
+ width: 40px;
2631
+ padding: 2px;
2632
+ box-sizing: border-box;
2633
+ `;
2634
+ const Handle = styled.div `
2635
+ width: 20px;
2636
+ height: 20px;
2637
+ border-radius: 10px;
2638
+ background: #ffffff;
2639
+ margin-left: ${props => (props.$on ? 'auto' : '0px')};
2640
+ display: flex;
2641
+ align-items: center;
2642
+ justify-content: center;
2643
+ box-sizing: border-box;
2585
2644
  `;
2586
2645
  const Toggle = (_a) => {
2587
2646
  var { onClick, on } = _a, accessibleProps = __rest(_a, ["onClick", "on"]);
2588
- return (React.createElement(Track, Object.assign({ "$on": on, onClick: onClick }, accessibleProps),
2589
- React.createElement("input", { checked: on, name: accessibleProps.name, type: 'hidden' }),
2590
- React.createElement(Handle, { "$on": on },
2591
- React.createElement(Icon, { color: on ? Colors.GREEN.Hex : Colors.BLACK.Hex, path: on ? js.mdiCheck : js.mdiClose, size: '16px' }))));
2647
+ const id = generateUniqueId('toggle');
2648
+ return (React.createElement(Track, Object.assign({ "$on": on, onClick: onClick }, accessibleProps, { id: `${id}-track` }),
2649
+ React.createElement("input", { checked: on, id: `${id}-input`, name: accessibleProps.name, type: 'hidden' }),
2650
+ React.createElement(Handle, { "$on": on, id: `${id}-handle` },
2651
+ React.createElement(Icon, { color: on ? Colors.GREEN.Hex : Colors.BLACK.Hex, id: `${id}-icon`, path: on ? js.mdiCheck : js.mdiClose, size: '16px' }))));
2592
2652
  };
2593
- Toggle.defaultProps = {};
2594
-
2595
- const Container = styled.div `
2596
- width: 100%;
2597
- padding: 40px auto;
2598
- gap: 20px;
2599
- display: flex;
2600
- flex-direction: column;
2601
- justify-items: center;
2602
- align-items: center;
2603
- `;
2604
- const Wrapper = styled.div `
2605
- gap: 10px;
2606
- display: flex;
2607
- flex-direction: column;
2608
- justify-items: center;
2609
- align-items: center;
2610
- `;
2611
- const StyledIcon = styled.div `
2612
- display: flex;
2613
- align-items: center;
2614
- justify-content: center;
2615
- width: 80px;
2616
- height: 80px;
2617
- border-radius: 40px;
2618
- background: #f5f5f5;
2653
+ Toggle.defaultProps = {};
2654
+
2655
+ const Container = styled.div `
2656
+ width: 100%;
2657
+ padding: 40px auto;
2658
+ gap: 20px;
2659
+ display: flex;
2660
+ flex-direction: column;
2661
+ justify-items: center;
2662
+ align-items: center;
2663
+ `;
2664
+ const Wrapper = styled.div `
2665
+ gap: 10px;
2666
+ display: flex;
2667
+ flex-direction: column;
2668
+ justify-items: center;
2669
+ align-items: center;
2670
+ `;
2671
+ const StyledIcon = styled.div `
2672
+ display: flex;
2673
+ align-items: center;
2674
+ justify-content: center;
2675
+ width: 80px;
2676
+ height: 80px;
2677
+ border-radius: 40px;
2678
+ background: #f5f5f5;
2619
2679
  `;
2620
2680
  const ZeroState = (_a) => {
2621
2681
  var { icon, title, description, action } = _a, accessibleProps = __rest(_a, ["icon", "title", "description", "action"]);
2622
- return (React.createElement(Container, Object.assign({}, accessibleProps),
2623
- React.createElement(StyledIcon, null,
2624
- React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: icon, size: '40px' })),
2625
- React.createElement(Wrapper, null,
2626
- React.createElement(Heading, { children: title, type: 'tertiary' }),
2627
- description && React.createElement(Copy, { align: 'center', children: description, color: 'GRAY', type: 'default' })),
2628
- action && (React.createElement(Button, { children: action.children, disabled: action.disabled, format: action.format, icon: action.icon, onClick: action.onClick }))));
2629
- };
2630
-
2631
- exports.Accordion = Accordion;
2632
- exports.ActionDialog = ActionDialog;
2633
- exports.Alert = Alert;
2634
- exports.AppHeader = AppHeader;
2635
- exports.AppMenu = AppMenu;
2636
- exports.BulkActionBar = BulkActionBar;
2637
- exports.Button = Button;
2638
- exports.ButtonMenu = ButtonMenu;
2639
- exports.Checkbox = Checkbox;
2640
- exports.Checklist = Checklist;
2641
- exports.Colors = Colors;
2642
- exports.Copy = Copy;
2643
- exports.DatePicker = DatePicker;
2644
- exports.Drawer = Drawer;
2645
- exports.EditableTheme = EditableTheme;
2646
- exports.Field = Field;
2647
- exports.FieldGroup = FieldGroup;
2648
- exports.FileUpload = FileUpload;
2649
- exports.FontSizes = FontSizes;
2650
- exports.FontStyles = FontStyles;
2651
- exports.Heading = Heading;
2652
- exports.Input = Input$1;
2653
- exports.Link = Link;
2654
- exports.Loader = Loader;
2655
- exports.Logo = Logo;
2656
- exports.Modal = Modal;
2657
- exports.MoreMenu = MoreMenu;
2658
- exports.MultiSelect = MultiSelect;
2659
- exports.PageHeader = PageHeader;
2660
- exports.Pagination = Pagination;
2661
- exports.ProgressBar = ProgressBar;
2662
- exports.Radio = Radio;
2663
- exports.RadioList = RadioList;
2664
- exports.Select = Select;
2665
- exports.Table = Table;
2666
- exports.Tabs = Tabs;
2667
- exports.Tag = Tag;
2668
- exports.Toggle = Toggle;
2669
- exports.Tooltip = Tooltip;
2670
- exports.ZeroState = ZeroState;
2671
- exports.formatAsPhone = formatAsPhone;
2672
- exports.formatAsSsn = formatAsSsn;
2673
- exports.getAgesFromDob = getAgesFromDob;
2674
- exports.getDaysForMonth = getDaysForMonth;
2675
- exports.getYears = getYears;
2676
- exports.validateEmail = validateEmail;
2677
- exports.validatePhone = validatePhone;
2678
- //# sourceMappingURL=index.js.map
2682
+ const id = generateUniqueId('zero-state');
2683
+ return (React.createElement(Container, Object.assign({}, accessibleProps, { id: `${id}-container` }),
2684
+ React.createElement(StyledIcon, { id: `${id}-icon-wrapper` },
2685
+ React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, id: `${id}-icon`, path: icon, size: '40px' })),
2686
+ React.createElement(Wrapper, { id: `${id}-wrapper` },
2687
+ React.createElement(Heading, { children: title, id: `${id}-heading`, type: 'tertiary' }),
2688
+ description && (React.createElement(Copy, { align: 'center', children: description, color: 'GRAY', id: `${id}-description`, type: 'default' }))),
2689
+ action && (React.createElement(Button, { children: action.children, disabled: action.disabled, format: action.format, icon: action.icon, id: `${id}-button`, onClick: action.onClick }))));
2690
+ };
2691
+
2692
+ exports.Accordion = Accordion;
2693
+ exports.ActionDialog = ActionDialog;
2694
+ exports.Alert = Alert;
2695
+ exports.AppHeader = AppHeader;
2696
+ exports.AppMenu = AppMenu;
2697
+ exports.BulkActionBar = BulkActionBar;
2698
+ exports.Button = Button;
2699
+ exports.ButtonMenu = ButtonMenu;
2700
+ exports.Checkbox = Checkbox;
2701
+ exports.Checklist = Checklist;
2702
+ exports.Colors = Colors;
2703
+ exports.Copy = Copy;
2704
+ exports.DatePicker = DatePicker;
2705
+ exports.Drawer = Drawer;
2706
+ exports.EditableTheme = EditableTheme;
2707
+ exports.Field = Field;
2708
+ exports.FieldGroup = FieldGroup;
2709
+ exports.FileUpload = FileUpload;
2710
+ exports.FontSizes = FontSizes;
2711
+ exports.FontStyles = FontStyles;
2712
+ exports.Heading = Heading;
2713
+ exports.Input = Input$1;
2714
+ exports.Link = Link;
2715
+ exports.Loader = Loader;
2716
+ exports.Logo = Logo;
2717
+ exports.Modal = Modal;
2718
+ exports.MoreMenu = MoreMenu;
2719
+ exports.MultiSelect = MultiSelect;
2720
+ exports.PageHeader = PageHeader;
2721
+ exports.Pagination = Pagination;
2722
+ exports.ProgressBar = ProgressBar;
2723
+ exports.Radio = Radio;
2724
+ exports.RadioList = RadioList;
2725
+ exports.Select = Select;
2726
+ exports.Table = Table;
2727
+ exports.Tabs = Tabs;
2728
+ exports.Tag = Tag;
2729
+ exports.Toggle = Toggle;
2730
+ exports.Tooltip = Tooltip;
2731
+ exports.ZeroState = ZeroState;
2732
+ exports.formatAsPhone = formatAsPhone;
2733
+ exports.formatAsSsn = formatAsSsn;
2734
+ exports.getAgesFromDob = getAgesFromDob;
2735
+ exports.getDaysForMonth = getDaysForMonth;
2736
+ exports.getYears = getYears;
2737
+ exports.validateEmail = validateEmail;
2738
+ exports.validatePhone = validatePhone;
2739
+ //# sourceMappingURL=index.js.map