no-frills-ui 0.0.14-rc.0 → 0.0.14-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +1 -0
  2. package/dist/index.js +389 -195
  3. package/dist/index.js.map +1 -1
  4. package/lib-esm/components/Accordion/Accordion.js +10 -1
  5. package/lib-esm/components/Accordion/Accordion.js.map +1 -1
  6. package/lib-esm/components/Accordion/AccordionStep.js +9 -9
  7. package/lib-esm/components/Accordion/AccordionStep.js.map +1 -1
  8. package/lib-esm/components/Card/Card.js +2 -2
  9. package/lib-esm/components/Card/Card.js.map +1 -1
  10. package/lib-esm/components/Chip/Chip.js +2 -2
  11. package/lib-esm/components/ChipInput/ChipInput.d.ts +1 -1
  12. package/lib-esm/components/ChipInput/ChipInput.js +14 -6
  13. package/lib-esm/components/ChipInput/ChipInput.js.map +1 -1
  14. package/lib-esm/components/DragAndDrop/DragAndDrop.js +2 -2
  15. package/lib-esm/components/DragAndDrop/DragItem.js +2 -2
  16. package/lib-esm/components/Drawer/Drawer.d.ts +1 -1
  17. package/lib-esm/components/Drawer/Drawer.js +2 -3
  18. package/lib-esm/components/Drawer/Drawer.js.map +1 -1
  19. package/lib-esm/components/Groups/Group.js +3 -3
  20. package/lib-esm/components/Groups/Group.js.map +1 -1
  21. package/lib-esm/components/Input/Checkbox.d.ts +2 -0
  22. package/lib-esm/components/Input/Checkbox.js +54 -23
  23. package/lib-esm/components/Input/Checkbox.js.map +1 -1
  24. package/lib-esm/components/Input/Dropdown.d.ts +2 -0
  25. package/lib-esm/components/Input/Dropdown.js +123 -59
  26. package/lib-esm/components/Input/Dropdown.js.map +1 -1
  27. package/lib-esm/components/Input/Input.js +17 -8
  28. package/lib-esm/components/Input/Input.js.map +1 -1
  29. package/lib-esm/components/Input/Radio.d.ts +2 -0
  30. package/lib-esm/components/Input/Radio.js +22 -10
  31. package/lib-esm/components/Input/Radio.js.map +1 -1
  32. package/lib-esm/components/Input/RadioButton.d.ts +2 -0
  33. package/lib-esm/components/Input/RadioButton.js +21 -9
  34. package/lib-esm/components/Input/RadioButton.js.map +1 -1
  35. package/lib-esm/components/Input/Select.js +21 -11
  36. package/lib-esm/components/Input/Select.js.map +1 -1
  37. package/lib-esm/components/Input/TextArea.js +17 -8
  38. package/lib-esm/components/Input/TextArea.js.map +1 -1
  39. package/lib-esm/components/Input/Toggle.d.ts +2 -0
  40. package/lib-esm/components/Input/Toggle.js +45 -15
  41. package/lib-esm/components/Input/Toggle.js.map +1 -1
  42. package/lib-esm/components/Input/index.d.ts +1 -0
  43. package/lib-esm/components/Menu/MenuItem.d.ts +1 -1
  44. package/lib-esm/components/Menu/MenuItem.js +1 -1
  45. package/lib-esm/components/Menu/MenuItem.js.map +1 -1
  46. package/lib-esm/components/Modal/Modal.d.ts +1 -1
  47. package/lib-esm/components/Modal/Modal.js +1 -2
  48. package/lib-esm/components/Modal/Modal.js.map +1 -1
  49. package/lib-esm/components/Popover/Popover.d.ts +1 -1
  50. package/lib-esm/components/Popover/Popover.js +3 -3
  51. package/lib-esm/components/Popover/Popover.js.map +1 -1
  52. package/lib-esm/components/Stepper/Stepper.js +14 -5
  53. package/lib-esm/components/Stepper/Stepper.js.map +1 -1
  54. package/lib-esm/index.js +1 -1
  55. package/lib-esm/shared/LayerManager.js +3 -15
  56. package/lib-esm/shared/LayerManager.js.map +1 -1
  57. package/lib-esm/shared/styles.d.ts +5 -1
  58. package/lib-esm/shared/styles.js +11 -7
  59. package/lib-esm/shared/styles.js.map +1 -1
  60. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -8,6 +8,15 @@ var client = require('react-dom/client');
8
8
 
9
9
  function Accordion(props) {
10
10
  const [active, setActive] = React.useState(props.active);
11
+ const prevActive = React.useRef(props.active);
12
+ React.useEffect(()=>{
13
+ if (props.active !== undefined && props.active !== prevActive.current) {
14
+ setActive(props.active);
15
+ prevActive.current = props.active;
16
+ }
17
+ }, [
18
+ props.active
19
+ ]);
11
20
  const onStepClick = (index, disabled)=>()=>{
12
21
  if (disabled) {
13
22
  return;
@@ -243,21 +252,25 @@ const getThemeValue = (key)=>{
243
252
  };
244
253
 
245
254
  const Ellipsis = /*#__PURE__*/ styled("span", {
246
- target: "e126ntv90",
255
+ target: "eot8j4m0",
247
256
  label: "Ellipsis"
248
257
  })("white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:1;");
249
- const Header$1 = /*#__PURE__*/ styled("h1", {
250
- target: "e126ntv91",
258
+ const Header$1 = /*#__PURE__*/ styled("div", {
259
+ target: "eot8j4m1",
251
260
  label: "Header"
252
261
  })("padding:10px 15px;line-height:26px;border-bottom:1px solid ", getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR), ";font-size:16px;font-weight:bold;");
253
262
  const Body$1 = /*#__PURE__*/ styled("div", {
254
- target: "e126ntv92",
263
+ target: "eot8j4m2",
255
264
  label: "Body"
256
- })("padding:20px 15px;flex:1;overflow:auto;");
265
+ })("padding:0 15px;margin:20px 0;flex:1;overflow:visible;");
257
266
  const Footer$1 = /*#__PURE__*/ styled("div", {
258
- target: "e126ntv93",
267
+ target: "eot8j4m3",
259
268
  label: "Footer"
260
269
  })("padding:10px 15px;border-top:1px solid ", getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR), ";display:flex;justify-content:flex-end;");
270
+ const ErrorContainer$7 = /*#__PURE__*/ styled("div", {
271
+ target: "eot8j4m4",
272
+ label: "ErrorContainer"
273
+ })("color:", getThemeValue(THEME_NAME.ERROR), ";padding-top:3px;font-size:12px;line-height:14px;");
261
274
 
262
275
  var BADGE_TYPE = /*#__PURE__*/ function(BADGE_TYPE) {
263
276
  BADGE_TYPE["PRIMARY"] = "primary";
@@ -297,13 +310,13 @@ const BadgeSpan = /*#__PURE__*/ styled("span", {
297
310
  const Badge = /*#__PURE__*/ React.forwardRef(BadgeComponent);
298
311
 
299
312
  const StyledCard = /*#__PURE__*/ styled("div", {
300
- target: "ebufzie0",
313
+ target: "e9lfq9w0",
301
314
  label: "StyledCard"
302
315
  })("border-radius:10px;background-color:", getThemeValue(THEME_NAME.BACKGROUND), ";", (props)=>props.elevated ? `box-shadow: ${getThemeValue(THEME_NAME.MODAL_SHADOW)};` : `box-shadow: ${getThemeValue(THEME_NAME.SHADOW)};`, " margin:5px;overflow:auto;position:relative;");
303
316
  /**
304
317
  * Card Component
305
318
  * @param props - Component props
306
- * @param ref - Ref forwarded to the underlying HTMLDivElement
319
+ * @param ref - Ref forwarded to the underlying HTMLAr
307
320
  */ function CardComponent(props, ref) {
308
321
  return /*#__PURE__*/ jsxRuntime.jsx(StyledCard, {
309
322
  ...props,
@@ -313,35 +326,35 @@ const StyledCard = /*#__PURE__*/ styled("div", {
313
326
  const Card = /*#__PURE__*/ React.forwardRef(CardComponent);
314
327
 
315
328
  const Step$1 = /*#__PURE__*/ styled(Card, {
316
- target: "e14f46gi0",
329
+ target: "e1l2mhfb0",
317
330
  label: "Step"
318
331
  })("transition:all 0.6s ease;overflow:visible;", (props)=>props.open && `margin: 20px 5px;`);
319
332
  const StepHeader = /*#__PURE__*/ styled("button", {
320
- target: "e14f46gi1",
333
+ target: "e1l2mhfb1",
321
334
  label: "StepHeader"
322
- })("padding:20px 15px;display:flex;justify-content:space-between;background:none;border:none;border-radius:10px;width:100%;font-size:inherit;color:", getThemeValue(THEME_NAME.TEXT_COLOR_DARK), ";&:focus-visible{box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}& input{appearance:none;margin:0;}", (props)=>props.open && `border-bottom: 1px solid ${getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR)};`, " ", (props)=>props.disabled && `color: ${getThemeValue(THEME_NAME.DISABLED)};`);
335
+ })("padding:20px 15px;display:flex;justify-content:space-between;background:none;border:none;border-radius:10px;width:100%;font-size:inherit;color:", getThemeValue(THEME_NAME.TEXT_COLOR_DARK), ";&:focus-visible{box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}& input{appearance:none;margin:0;}", (props)=>props.open && `border-bottom: 1px solid ${getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR)};`, " ", (props)=>props.open && `border-radius: 10px 10px 0 0;`, " ", (props)=>props.disabled && `color: ${getThemeValue(THEME_NAME.DISABLED)};`);
323
336
  const HeaderContainer = /*#__PURE__*/ styled("div", {
324
- target: "e14f46gi2",
337
+ target: "e1l2mhfb2",
325
338
  label: "HeaderContainer"
326
339
  })("display:flex;align-items:center;min-width:40px;& svg{vertical-align:top;margin-right:10px;fill:", (props)=>props.open ? getThemeValue(THEME_NAME.PRIMARY) : props.completed ? getThemeValue(THEME_NAME.SUCCESS) : getThemeValue(THEME_NAME.LIGHT_GREY), ";transform:", (props)=>props.open ? 'scale(0.8)' : 'scale(0.6)', ";transition:all 0.3s ease;min-width:24px;}");
327
340
  const ExpandContainer = /*#__PURE__*/ styled("div", {
328
- target: "e14f46gi3",
341
+ target: "e1l2mhfb3",
329
342
  label: "ExpandContainer"
330
343
  })("display:flex;align-items:center;& svg{vertical-align:top;margin-right:10px;transition:all 0.6s ease;fill:currentColor;}", (props)=>props.open ? `& svg { transform: rotate(180deg); }` : '');
331
344
  const StepBody = /*#__PURE__*/ styled("div", {
332
- target: "e14f46gi4",
345
+ target: "e1l2mhfb4",
333
346
  label: "StepBody"
334
347
  })("transition:all 0.6s ease;overflow:hidden;height:", (props)=>props.height || 0, "px;");
335
348
  const AccordionBadge = /*#__PURE__*/ styled(Badge, {
336
- target: "e14f46gi5",
349
+ target: "e1l2mhfb5",
337
350
  label: "AccordionBadge"
338
351
  })("margin-right:15px;");
339
352
  const AccordionStepBody = /*#__PURE__*/ styled("div", {
340
- target: "e14f46gi6",
353
+ target: "e1l2mhfb6",
341
354
  label: "AccordionStepBody"
342
355
  })("padding:20px 15px;");
343
356
  const AccordionStepFooter = /*#__PURE__*/ styled("div", {
344
- target: "e14f46gi7",
357
+ target: "e1l2mhfb7",
345
358
  label: "AccordionStepFooter"
346
359
  })("display:flex;justify-content:flex-end;padding:10px 15px;border-top:1px solid ", getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR), ";");
347
360
  /**
@@ -509,7 +522,7 @@ const StyledIconButton = /*#__PURE__*/ styled("button", {
509
522
  }
510
523
  const IconButton = /*#__PURE__*/ React.forwardRef(IconButtonComponent);
511
524
 
512
- const Container$8 = /*#__PURE__*/ styled("span", {
525
+ const Container$a = /*#__PURE__*/ styled("span", {
513
526
  target: "eg8hsap0",
514
527
  label: "Container"
515
528
  })("padding:5px;padding-left:15px;border-radius:16px;background-color:", getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR), ";display:inline-flex;margin:5px;line-height:20px;align-items:center;");
@@ -534,7 +547,7 @@ const Button$1 = /*#__PURE__*/ styled("button", {
534
547
  e.stopPropagation();
535
548
  }
536
549
  };
537
- return /*#__PURE__*/ jsxRuntime.jsxs(Container$8, {
550
+ return /*#__PURE__*/ jsxRuntime.jsxs(Container$a, {
538
551
  ...rest,
539
552
  ref: ref,
540
553
  onKeyUp: keyUpHandler,
@@ -569,7 +582,7 @@ const DragContext = React.createContext(null);
569
582
  target: "ertl9d71",
570
583
  label: "DragKnob"
571
584
  })("padding-top:8px;cursor:move;touch-action:none;color:", getThemeValue(THEME_NAME.DISABLED), ";");
572
- /** Container for the children */ const Container$7 = /*#__PURE__*/ styled("div", {
585
+ /** Container for the children */ const Container$9 = /*#__PURE__*/ styled("div", {
573
586
  target: "ertl9d72",
574
587
  label: "Container"
575
588
  })("flex:1;");
@@ -811,14 +824,14 @@ const DragContext = React.createContext(null);
811
824
  tabIndex: -1,
812
825
  children: /*#__PURE__*/ jsxRuntime.jsx(CheckCircle, {})
813
826
  }),
814
- /*#__PURE__*/ jsxRuntime.jsx(Container$7, {
827
+ /*#__PURE__*/ jsxRuntime.jsx(Container$9, {
815
828
  children: children
816
829
  })
817
830
  ]
818
831
  });
819
832
  }
820
833
 
821
- /** Container Component */ const Container$6 = /*#__PURE__*/ styled("div", {
834
+ /** Container Component */ const Container$8 = /*#__PURE__*/ styled("div", {
822
835
  target: "e18d6tqk0",
823
836
  label: "Container"
824
837
  })("flex:1;display:flex;position:relative;flex-wrap:wrap;flex-direction:", (props)=>props.orientation === ORIENTATION.HORIZONTAL ? 'row' : 'column', ";");
@@ -921,7 +934,7 @@ const DragContext = React.createContext(null);
921
934
  setDragOver,
922
935
  i18n
923
936
  },
924
- children: /*#__PURE__*/ jsxRuntime.jsx(Container$6, {
937
+ children: /*#__PURE__*/ jsxRuntime.jsx(Container$8, {
925
938
  ...rest,
926
939
  ref: ref,
927
940
  orientation: orientation,
@@ -950,9 +963,9 @@ const DragAndDrop = /*#__PURE__*/ React.forwardRef(DragAndDropComponent);
950
963
 
951
964
  // Label component for the ChipInput
952
965
  const Label$6 = /*#__PURE__*/ styled("label", {
953
- target: "e12jan4z0",
966
+ target: "e1pr4bi70",
954
967
  label: "Label"
955
- })("display:inline-flex;flex-direction:column;flex:1;position:relative;margin:10px 5px;color:inherit;padding:0 8px;width:250px;border-radius:3px;border:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";background-color:", getThemeValue(THEME_NAME.BACKGROUND), ";&:has(:focus),&:has(:active){border-color:", getThemeValue(THEME_NAME.PRIMARY), ";box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}&:has(:focus) > span,&:has(:active) > span{color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:has(:disabled){border-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";background-color:", getThemeValue(THEME_NAME.DISABLED_BACKGROUND), ";}&:has(:disabled) > span{color:", getThemeValue(THEME_NAME.DISABLED), ";}&:has(:focus:invalid){border-color:", getThemeValue(THEME_NAME.ERROR), ";box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.ERROR_LIGHT), ";}", (props)=>props.touched ? `
968
+ })("display:inline-flex;flex-direction:column;flex:1;position:relative;margin:10px 5px;color:inherit;padding:0 8px;border-radius:3px;border:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";background-color:", getThemeValue(THEME_NAME.BACKGROUND), ";width:", (props)=>typeof props.width === 'number' ? `${props.width}px` : props.width || '250px', ";max-width:100%;&:has(:focus),&:has(:active){border-color:", getThemeValue(THEME_NAME.PRIMARY), ";box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}&:has(:focus) > span,&:has(:active) > span{color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:has(:disabled){border-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";background-color:", getThemeValue(THEME_NAME.DISABLED_BACKGROUND), ";}&:has(:disabled) > span{color:", getThemeValue(THEME_NAME.DISABLED), ";}&:has(:focus:invalid){border-color:", getThemeValue(THEME_NAME.ERROR), ";box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.ERROR_LIGHT), ";}", (props)=>props.touched ? `
956
969
  &:has(:invalid) {
957
970
  border-color: ${getThemeValue(THEME_NAME.ERROR)};
958
971
  }
@@ -979,13 +992,13 @@ const Label$6 = /*#__PURE__*/ styled("label", {
979
992
  }
980
993
  ` : '');
981
994
  // Error message container
982
- const ErrorContainer$4 = /*#__PURE__*/ styled("div", {
983
- target: "e12jan4z1",
995
+ const ErrorContainer$6 = /*#__PURE__*/ styled("div", {
996
+ target: "e1pr4bi71",
984
997
  label: "ErrorContainer"
985
998
  })("color:", getThemeValue(THEME_NAME.ERROR), ";padding-top:3px;font-size:12px;line-height:14px;margin-left:3px;");
986
999
  // Visually hidden but accessible to screen readers
987
1000
  const VisuallyHidden$1 = /*#__PURE__*/ styled("ul", {
988
- target: "e12jan4z2",
1001
+ target: "e1pr4bi72",
989
1002
  label: "VisuallyHidden"
990
1003
  })("position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;& li{list-style:none;}");
991
1004
  /**
@@ -1030,6 +1043,13 @@ const VisuallyHidden$1 = /*#__PURE__*/ styled("ul", {
1030
1043
  }, [
1031
1044
  propValue
1032
1045
  ]);
1046
+ React.useEffect(()=>{
1047
+ if (InputRef.current) {
1048
+ InputRef.current.setCustomValidity(props.errorText || '');
1049
+ }
1050
+ }, [
1051
+ props.errorText
1052
+ ]);
1033
1053
  /**
1034
1054
  * Update the chip values and notify changes.
1035
1055
  * @param newValue The new array of chip values
@@ -1099,6 +1119,7 @@ const VisuallyHidden$1 = /*#__PURE__*/ styled("ul", {
1099
1119
  touched: touched,
1100
1120
  errorText: props.errorText,
1101
1121
  required: props.required,
1122
+ width: props.width,
1102
1123
  children: [
1103
1124
  /*#__PURE__*/ jsxRuntime.jsx("input", {
1104
1125
  ...props,
@@ -1126,7 +1147,7 @@ const VisuallyHidden$1 = /*#__PURE__*/ styled("ul", {
1126
1147
  /*#__PURE__*/ jsxRuntime.jsx("span", {
1127
1148
  children: props.label
1128
1149
  }),
1129
- props.errorText && /*#__PURE__*/ jsxRuntime.jsx(ErrorContainer$4, {
1150
+ props.errorText && /*#__PURE__*/ jsxRuntime.jsx(ErrorContainer$6, {
1130
1151
  id: errorId,
1131
1152
  children: props.errorText
1132
1153
  })
@@ -1170,8 +1191,8 @@ const ChipInput = /*#__PURE__*/ React.forwardRef(ChipInputComponent);
1170
1191
  [5]: 'bottom: 0; right: 0; justify-content: flex-end;',
1171
1192
  [6]: 'top: 0; left: 0; justify-content: center; align-items: center;'
1172
1193
  };
1173
- /** Layer container component. */ const Container$5 = /*#__PURE__*/ styled("div", {
1174
- target: "erw6k0c0",
1194
+ /** Layer container component. */ const Container$7 = /*#__PURE__*/ styled("div", {
1195
+ target: "e1at2bda0",
1175
1196
  label: "Container"
1176
1197
  })("position:fixed;display:flex;opacity:0;transition:opacity 0.3s ease;", (props)=>POSITION_STYLE[props.position], " ", (props)=>props.overlay && `
1177
1198
  width: 100%;
@@ -1335,9 +1356,6 @@ const ChipInput = /*#__PURE__*/ React.forwardRef(ChipInputComponent);
1335
1356
  // Track elements modified for accessibility
1336
1357
  const modifiedElements = [];
1337
1358
  let originalBodyOverflow = null;
1338
- let originalBodyPosition = null;
1339
- let originalBodyWidth = null;
1340
- let originalBodyTop = null;
1341
1359
  let scrollY = 0;
1342
1360
  // Apply aria-hidden to siblings and body scroll lock for overlay modals
1343
1361
  if (layerConfig.overlay) {
@@ -1361,13 +1379,7 @@ const ChipInput = /*#__PURE__*/ React.forwardRef(ChipInputComponent);
1361
1379
  // Prevent body scroll on iOS
1362
1380
  scrollY = window.scrollY;
1363
1381
  originalBodyOverflow = document.body.style.overflow;
1364
- originalBodyPosition = document.body.style.position;
1365
- originalBodyWidth = document.body.style.width;
1366
- originalBodyTop = document.body.style.top;
1367
1382
  document.body.style.overflow = 'hidden';
1368
- document.body.style.position = 'fixed';
1369
- document.body.style.width = '100%';
1370
- document.body.style.top = `-${scrollY}px`;
1371
1383
  }
1372
1384
  // Cleanup function - remove div when component unmounts
1373
1385
  return ()=>{
@@ -1384,9 +1396,6 @@ const ChipInput = /*#__PURE__*/ React.forwardRef(ChipInputComponent);
1384
1396
  // Restore body scroll
1385
1397
  if (layerConfig.overlay) {
1386
1398
  document.body.style.overflow = originalBodyOverflow || '';
1387
- document.body.style.position = originalBodyPosition || '';
1388
- document.body.style.width = originalBodyWidth || '';
1389
- document.body.style.top = originalBodyTop || '';
1390
1399
  window.scrollTo(0, scrollY);
1391
1400
  }
1392
1401
  if (document.body.contains(div)) {
@@ -1402,7 +1411,7 @@ const ChipInput = /*#__PURE__*/ React.forwardRef(ChipInputComponent);
1402
1411
  if (!divElement) {
1403
1412
  return null;
1404
1413
  }
1405
- return /*#__PURE__*/ reactDom.createPortal(/*#__PURE__*/ jsxRuntime.jsx(Container$5, {
1414
+ return /*#__PURE__*/ reactDom.createPortal(/*#__PURE__*/ jsxRuntime.jsx(Container$7, {
1406
1415
  ...props,
1407
1416
  ref: ref,
1408
1417
  onClick: overlayClickHandler,
@@ -1675,11 +1684,11 @@ ConfirmDialog.defaultProps = {
1675
1684
  };
1676
1685
 
1677
1686
  const Label$5 = /*#__PURE__*/ styled("label", {
1678
- target: "el9i5v60",
1687
+ target: "e1g8e2pu0",
1679
1688
  label: "Label"
1680
1689
  })("display:inline-flex;flex-direction:column;position:relative;margin:10px 5px;");
1681
1690
  const TextField$1 = /*#__PURE__*/ styled("input", {
1682
- target: "el9i5v61",
1691
+ target: "e1g8e2pu1",
1683
1692
  label: "TextField"
1684
1693
  })("outline:none;color:inherit;padding:0 8px;line-height:30px;min-height:30px;width:250px;border-radius:3px;border:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";display:inline-block;background-color:", getThemeValue(THEME_NAME.BACKGROUND), ";&:focus,&:active{border-color:", getThemeValue(THEME_NAME.PRIMARY), ";box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}&:focus + span,&:active + span{color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:disabled{border-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";background-color:", getThemeValue(THEME_NAME.DISABLED_BACKGROUND), ";padding:0 8px;}&:disabled + span{color:", getThemeValue(THEME_NAME.DISABLED), ";}&:focus:invalid{border-color:", getThemeValue(THEME_NAME.ERROR), ";box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.ERROR_LIGHT), ";}", (props)=>props.touched ? `
1685
1694
  &:invalid {
@@ -1703,19 +1712,21 @@ const TextField$1 = /*#__PURE__*/ styled("input", {
1703
1712
  line-height: 14px;
1704
1713
  }
1705
1714
  ` : '', " &:focus + span,&:placeholder-shown + span{top:-8px;background:", getThemeValue(THEME_NAME.BACKGROUND), ";font-size:12px;line-height:14px;}");
1706
- const ErrorContainer$3 = /*#__PURE__*/ styled("div", {
1707
- target: "el9i5v62",
1715
+ const ErrorContainer$5 = /*#__PURE__*/ styled("div", {
1716
+ target: "e1g8e2pu2",
1708
1717
  label: "ErrorContainer"
1709
1718
  })("color:", getThemeValue(THEME_NAME.ERROR), ";padding-top:3px;font-size:12px;line-height:14px;margin-left:3px;");
1710
1719
  /**
1711
1720
  * Input Component
1712
1721
  * @param props - Component props
1713
1722
  * @param ref - Ref forwarded to the underlying HTMLInputElement
1714
- */ const Input$2 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
1723
+ */ const Input$2 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
1715
1724
  const [touched, setTouched] = React.useState(false);
1716
1725
  const [value, setValue] = React.useState(props.value || '');
1717
1726
  const errorId = React.useId();
1718
1727
  const prevValueRef = React.useRef(undefined);
1728
+ const internalRef = React.useRef(null);
1729
+ React.useImperativeHandle(forwardedRef, ()=>internalRef.current);
1719
1730
  React.useEffect(()=>{
1720
1731
  if (props.value !== undefined && props.value !== prevValueRef.current) {
1721
1732
  setValue(props.value);
@@ -1724,6 +1735,13 @@ const ErrorContainer$3 = /*#__PURE__*/ styled("div", {
1724
1735
  }, [
1725
1736
  props.value
1726
1737
  ]);
1738
+ React.useEffect(()=>{
1739
+ if (internalRef.current) {
1740
+ internalRef.current.setCustomValidity(props.errorText || '');
1741
+ }
1742
+ }, [
1743
+ props.errorText
1744
+ ]);
1727
1745
  const handleFocus = (e)=>{
1728
1746
  setTouched(true);
1729
1747
  if (props.onFocus) {
@@ -1742,7 +1760,7 @@ const ErrorContainer$3 = /*#__PURE__*/ styled("div", {
1742
1760
  children: [
1743
1761
  /*#__PURE__*/ jsxRuntime.jsx(TextField$1, {
1744
1762
  ...props,
1745
- ref: ref,
1763
+ ref: internalRef,
1746
1764
  value: value,
1747
1765
  onChange: onChangeHandler,
1748
1766
  onFocus: handleFocus,
@@ -1754,7 +1772,7 @@ const ErrorContainer$3 = /*#__PURE__*/ styled("div", {
1754
1772
  /*#__PURE__*/ jsxRuntime.jsx("span", {
1755
1773
  children: props.label
1756
1774
  }),
1757
- props.errorText && /*#__PURE__*/ jsxRuntime.jsx(ErrorContainer$3, {
1775
+ props.errorText && /*#__PURE__*/ jsxRuntime.jsx(ErrorContainer$5, {
1758
1776
  id: errorId,
1759
1777
  children: props.errorText
1760
1778
  })
@@ -1764,11 +1782,11 @@ const ErrorContainer$3 = /*#__PURE__*/ styled("div", {
1764
1782
  Input$2.displayName = 'Input';
1765
1783
 
1766
1784
  const Label$4 = /*#__PURE__*/ styled("label", {
1767
- target: "e1j32tnv0",
1785
+ target: "e1towgf50",
1768
1786
  label: "Label"
1769
1787
  })("display:inline-flex;flex-direction:column;position:relative;margin:10px 5px;");
1770
1788
  const TextField = /*#__PURE__*/ styled("textarea", {
1771
- target: "e1j32tnv1",
1789
+ target: "e1towgf51",
1772
1790
  label: "TextField"
1773
1791
  })("border:none;color:inherit;padding:8px;min-height:150px;min-width:250px;border-radius:3px;border:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";display:inline-block;background-color:", getThemeValue(THEME_NAME.BACKGROUND), ";&:focus,&:active{border-color:", getThemeValue(THEME_NAME.PRIMARY), ";box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}&:focus + span,&:active + span{color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:disabled{border-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";background-color:", getThemeValue(THEME_NAME.DISABLED_BACKGROUND), ";}&:disabled + span{color:", getThemeValue(THEME_NAME.DISABLED), ";}&:focus:invalid{border-color:", getThemeValue(THEME_NAME.ERROR), ";box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.ERROR_LIGHT), ";}", (props)=>props.touched ? `
1774
1792
  &:invalid {
@@ -1792,20 +1810,22 @@ const TextField = /*#__PURE__*/ styled("textarea", {
1792
1810
  line-height: 14px;
1793
1811
  }
1794
1812
  ` : '', " &:focus + span,&:placeholder-shown + span{top:-8px;background:", getThemeValue(THEME_NAME.BACKGROUND), ";font-size:12px;line-height:14px;}");
1795
- const ErrorContainer$2 = /*#__PURE__*/ styled("div", {
1796
- target: "e1j32tnv2",
1813
+ const ErrorContainer$4 = /*#__PURE__*/ styled("div", {
1814
+ target: "e1towgf52",
1797
1815
  label: "ErrorContainer"
1798
1816
  })("color:", getThemeValue(THEME_NAME.ERROR), ";padding-top:3px;font-size:12px;line-height:14px;margin-left:3px;");
1799
1817
  /**
1800
1818
  * TextArea Component
1801
1819
  * @param props - Component props
1802
1820
  * @param ref - Ref forwarded to the underlying HTMLTextAreaElement
1803
- */ function TextAreaComponent(props, ref) {
1821
+ */ function TextAreaComponent(props, forwardedRef) {
1804
1822
  const { label, errorText, value: propsValue, required, ...rest } = props;
1805
1823
  const [touched, setTouched] = React.useState(false);
1806
1824
  const [value, setValue] = React.useState(propsValue || '');
1807
1825
  const errorId = React.useId();
1808
1826
  const prevValueRef = React.useRef(undefined);
1827
+ const internalRef = React.useRef(null);
1828
+ React.useImperativeHandle(forwardedRef, ()=>internalRef.current);
1809
1829
  React.useEffect(()=>{
1810
1830
  if (propsValue !== undefined && propsValue !== prevValueRef.current) {
1811
1831
  setValue(propsValue);
@@ -1814,6 +1834,13 @@ const ErrorContainer$2 = /*#__PURE__*/ styled("div", {
1814
1834
  }, [
1815
1835
  propsValue
1816
1836
  ]);
1837
+ React.useEffect(()=>{
1838
+ if (internalRef.current) {
1839
+ internalRef.current.setCustomValidity(errorText || '');
1840
+ }
1841
+ }, [
1842
+ errorText
1843
+ ]);
1817
1844
  const handleFocus = (e)=>{
1818
1845
  setTouched(true);
1819
1846
  if (props.onFocus) {
@@ -1832,7 +1859,7 @@ const ErrorContainer$2 = /*#__PURE__*/ styled("div", {
1832
1859
  children: [
1833
1860
  /*#__PURE__*/ jsxRuntime.jsx(TextField, {
1834
1861
  ...rest,
1835
- ref: ref,
1862
+ ref: internalRef,
1836
1863
  value: value,
1837
1864
  onChange: onChangeHandler,
1838
1865
  onFocus: handleFocus,
@@ -1845,7 +1872,7 @@ const ErrorContainer$2 = /*#__PURE__*/ styled("div", {
1845
1872
  /*#__PURE__*/ jsxRuntime.jsx("span", {
1846
1873
  children: label
1847
1874
  }),
1848
- errorText && /*#__PURE__*/ jsxRuntime.jsx(ErrorContainer$2, {
1875
+ errorText && /*#__PURE__*/ jsxRuntime.jsx(ErrorContainer$4, {
1849
1876
  id: errorId,
1850
1877
  children: errorText
1851
1878
  })
@@ -1855,11 +1882,11 @@ const ErrorContainer$2 = /*#__PURE__*/ styled("div", {
1855
1882
  const TextArea = /*#__PURE__*/ React.forwardRef(TextAreaComponent);
1856
1883
 
1857
1884
  const Label$3 = /*#__PURE__*/ styled("label", {
1858
- target: "e13b7jm0",
1885
+ target: "e1trg58l0",
1859
1886
  label: "Label"
1860
1887
  })("display:inline-flex;flex-direction:column;position:relative;margin:10px 5px;pointer-events:none;max-width:268px;& svg{fill:currentColor;}");
1861
1888
  const SelectField = /*#__PURE__*/ styled("select", {
1862
- target: "e13b7jm1",
1889
+ target: "e1trg58l1",
1863
1890
  label: "SelectField"
1864
1891
  })("border:none;color:inherit;padding:0 8px;line-height:30px;min-height:32px;width:268px;border-radius:3px;border:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";display:inline-block;background-color:", getThemeValue(THEME_NAME.BACKGROUND), ";pointer-events:auto;appearance:none;&:focus,&:active{border-color:", getThemeValue(THEME_NAME.PRIMARY), ";box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}&:focus ~ span,&:active ~ span{color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:disabled{border-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";background-color:", getThemeValue(THEME_NAME.DISABLED_BACKGROUND), ";}&:disabled ~ span{color:", getThemeValue(THEME_NAME.DISABLED), ";}&:focus:invalid{border-color:", getThemeValue(THEME_NAME.ERROR), ";box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.ERROR_LIGHT), ";}", (props)=>props.touched ? `
1865
1892
  &:invalid {
@@ -1883,31 +1910,41 @@ const SelectField = /*#__PURE__*/ styled("select", {
1883
1910
  line-height: 14px;
1884
1911
  }
1885
1912
  ` : '', " &:focus + span,&:placeholder-shown + span{top:-8px;background:", getThemeValue(THEME_NAME.BACKGROUND), ";font-size:12px;line-height:14px;}");
1886
- const ErrorContainer$1 = /*#__PURE__*/ styled("div", {
1887
- target: "e13b7jm2",
1913
+ const ErrorContainer$3 = /*#__PURE__*/ styled("div", {
1914
+ target: "e1trg58l2",
1888
1915
  label: "ErrorContainer"
1889
1916
  })("color:", getThemeValue(THEME_NAME.ERROR), ";padding-top:3px;font-size:12px;line-height:14px;margin-left:3px;");
1890
1917
  const ArrowContainer$1 = /*#__PURE__*/ styled("span", {
1891
- target: "e13b7jm3",
1918
+ target: "e1trg58l3",
1892
1919
  label: "ArrowContainer"
1893
1920
  })("position:absolute;right:8px;top:8px;");
1894
1921
  /**
1895
1922
  * Select Component
1896
1923
  * @param props - Component props
1897
1924
  * @param ref - Ref forwarded to the underlying HTMLSelectElement
1898
- */ function SelectComponent(props, ref) {
1925
+ */ function SelectComponent(props, forwardedRef) {
1899
1926
  const [touched, setTouched] = React.useState(false);
1900
1927
  const [value, setValue] = React.useState(props.value || '');
1901
1928
  const errorId = React.useId();
1902
1929
  const prevValueRef = React.useRef(undefined);
1930
+ const internalRef = React.useRef(null);
1931
+ React.useImperativeHandle(forwardedRef, ()=>internalRef.current);
1932
+ // Sync prop value with state
1903
1933
  React.useEffect(()=>{
1904
- if (props.value !== undefined && props.value !== prevValueRef.current) {
1905
- setValue(props.value);
1934
+ if (props.value !== prevValueRef.current) {
1935
+ setValue(props.value || '');
1906
1936
  prevValueRef.current = props.value;
1907
1937
  }
1908
1938
  }, [
1909
1939
  props.value
1910
1940
  ]);
1941
+ React.useEffect(()=>{
1942
+ if (internalRef.current) {
1943
+ internalRef.current.setCustomValidity(props.errorText || '');
1944
+ }
1945
+ }, [
1946
+ props.errorText
1947
+ ]);
1911
1948
  const handleFocus = (e)=>{
1912
1949
  setTouched(true);
1913
1950
  if (props.onFocus) {
@@ -1926,7 +1963,7 @@ const ArrowContainer$1 = /*#__PURE__*/ styled("span", {
1926
1963
  children: [
1927
1964
  /*#__PURE__*/ jsxRuntime.jsxs(SelectField, {
1928
1965
  ...props,
1929
- ref: ref,
1966
+ ref: internalRef,
1930
1967
  multiple: false,
1931
1968
  value: value,
1932
1969
  onChange: onChangeHandler,
@@ -1947,7 +1984,7 @@ const ArrowContainer$1 = /*#__PURE__*/ styled("span", {
1947
1984
  "aria-hidden": "true",
1948
1985
  children: /*#__PURE__*/ jsxRuntime.jsx(ExpandMore, {})
1949
1986
  }),
1950
- props.errorText && /*#__PURE__*/ jsxRuntime.jsx(ErrorContainer$1, {
1987
+ props.errorText && /*#__PURE__*/ jsxRuntime.jsx(ErrorContainer$3, {
1951
1988
  id: errorId,
1952
1989
  children: props.errorText
1953
1990
  })
@@ -1957,50 +1994,81 @@ const ArrowContainer$1 = /*#__PURE__*/ styled("span", {
1957
1994
  const Select = /*#__PURE__*/ React.forwardRef(SelectComponent);
1958
1995
 
1959
1996
  const Label$2 = /*#__PURE__*/ styled("label", {
1960
- target: "e10ud8wb0",
1997
+ target: "e74kvzt0",
1961
1998
  label: "Label"
1962
1999
  })("margin:5px 0;position:relative;display:inline-flex;align-items:center;cursor:pointer;");
1963
2000
  const StyledCheckmark = /*#__PURE__*/ styled("span", {
1964
- target: "e10ud8wb1",
2001
+ target: "e74kvzt1",
1965
2002
  label: "StyledCheckmark"
1966
2003
  })("width:16px;height:16px;border:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";display:inline-block;border-radius:3px;margin-right:5px;background-color:", getThemeValue(THEME_NAME.BACKGROUND), ";transition:all 0.3s ease;position:relative;flex-shrink:0;&::after{content:'';width:3px;height:10px;border-right:2px solid ", getThemeValue(THEME_NAME.TEXT_COLOR_LIGHT), ";border-bottom:2px solid ", getThemeValue(THEME_NAME.TEXT_COLOR_LIGHT), ";position:absolute;top:1px;left:6px;opacity:0;transform:rotate(45deg) scale(0);transition:all 0.2s ease;}");
1967
2004
  const HiddenInput$1 = /*#__PURE__*/ styled("input", {
1968
- target: "e10ud8wb2",
2005
+ target: "e74kvzt2",
1969
2006
  label: "HiddenInput"
1970
2007
  })("opacity:0;width:0;height:0;position:absolute;margin:0;&:checked + ", StyledCheckmark, "{background-color:", getThemeValue(THEME_NAME.PRIMARY), ";border-color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:checked + ", StyledCheckmark, "::after{opacity:1;transform:rotate(45deg) scale(1);}&:indeterminate + ", StyledCheckmark, "{background-color:", getThemeValue(THEME_NAME.PRIMARY), ";border-color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:indeterminate + ", StyledCheckmark, "::after{opacity:1;height:0;width:8px;border-right:none;border-bottom:2px solid ", getThemeValue(THEME_NAME.TEXT_COLOR_LIGHT), ";transform:rotate(0deg) scale(1);top:7px;left:4px;}&:enabled:active + ", StyledCheckmark, ",&:focus + ", StyledCheckmark, "{border-color:", getThemeValue(THEME_NAME.PRIMARY), ";box-shadow:0 0 0 3px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}&:enabled:active ~ span,&:focus ~ span{color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:enabled:hover + ", StyledCheckmark, "{border-color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:enabled:hover ~ span{color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:disabled + ", StyledCheckmark, "{border-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";cursor:not-allowed;}&:disabled ~ span{color:", getThemeValue(THEME_NAME.DISABLED), ";cursor:not-allowed;}&:checked:disabled + ", StyledCheckmark, ",&:indeterminate:disabled + ", StyledCheckmark, "{background-color:", getThemeValue(THEME_NAME.DISABLED), ";}");
2008
+ const ErrorContainer$2 = /*#__PURE__*/ styled("div", {
2009
+ target: "e74kvzt3",
2010
+ label: "ErrorContainer"
2011
+ })("color:", getThemeValue(THEME_NAME.ERROR), ";padding-top:3px;font-size:12px;line-height:14px;");
2012
+ const Container$6 = /*#__PURE__*/ styled("div", {
2013
+ target: "e74kvzt4",
2014
+ label: "Container"
2015
+ })("display:inline-flex;flex-direction:column;");
1971
2016
  /**
1972
2017
  * Checkbox Component
1973
2018
  * @param props - Component props
1974
2019
  * @param fwdRef - Ref forwarded to the underlying HTMLInputElement
1975
2020
  */ function CheckboxComponent(props, fwdRef) {
1976
- const { label = '', indeterminate = false, checked, ...rest } = props;
2021
+ const { label = '', indeterminate = false, checked, errorText, ...rest } = props;
2022
+ const internalRef = React.useRef(null);
2023
+ const errorId = React.useId();
2024
+ React.useImperativeHandle(fwdRef, ()=>internalRef.current);
2025
+ React.useEffect(()=>{
2026
+ if (internalRef.current) {
2027
+ internalRef.current.setCustomValidity(errorText || '');
2028
+ }
2029
+ }, [
2030
+ errorText
2031
+ ]);
1977
2032
  const ref = React.useCallback((node)=>{
2033
+ internalRef.current = node;
1978
2034
  // Ensure the DOM `indeterminate` flag always matches the prop
1979
2035
  if (node) {
1980
2036
  node.indeterminate = !!indeterminate;
1981
2037
  }
1982
- // Forward the node (or null) to the parent ref (supports function or ref object)
1983
- if (typeof fwdRef === 'function') {
1984
- fwdRef(node);
1985
- } else if (fwdRef) {
1986
- fwdRef.current = node;
1987
- }
2038
+ // Forward the node (or null) to the parent ref (supports function or ref object)
2039
+ // Note: Since we use useImperativeHandle now, we don't technically need to manually forward here
2040
+ // if we weren't doing the ref callback pattern for indeterminate.
2041
+ // However, useImperativeHandle handles the forwarding.
2042
+ // BUT, our local ref callback `ref` is passed to the input `ref={ref}`.
2043
+ // React will call this callback with the node.
2044
+ // Inside this callback, we set internalRef.current.
2045
+ // useImperativeHandle exposes internalRef.current to fwdRef.
2046
+ // So we don't need manual forwarding logic here anymore!
1988
2047
  }, [
1989
- indeterminate,
1990
- fwdRef
2048
+ indeterminate
1991
2049
  ]);
1992
- return /*#__PURE__*/ jsxRuntime.jsxs(Label$2, {
2050
+ return /*#__PURE__*/ jsxRuntime.jsxs(Container$6, {
1993
2051
  children: [
1994
- /*#__PURE__*/ jsxRuntime.jsx(HiddenInput$1, {
1995
- ...rest,
1996
- ref: ref,
1997
- type: "checkbox",
1998
- checked: checked,
1999
- "aria-checked": indeterminate ? 'mixed' : checked
2052
+ /*#__PURE__*/ jsxRuntime.jsxs(Label$2, {
2053
+ children: [
2054
+ /*#__PURE__*/ jsxRuntime.jsx(HiddenInput$1, {
2055
+ ...rest,
2056
+ ref: ref,
2057
+ type: "checkbox",
2058
+ checked: checked,
2059
+ "aria-checked": indeterminate ? 'mixed' : checked,
2060
+ "aria-invalid": !!errorText,
2061
+ "aria-describedby": errorText ? errorId : undefined
2062
+ }),
2063
+ /*#__PURE__*/ jsxRuntime.jsx(StyledCheckmark, {}),
2064
+ /*#__PURE__*/ jsxRuntime.jsx("span", {
2065
+ children: label
2066
+ })
2067
+ ]
2000
2068
  }),
2001
- /*#__PURE__*/ jsxRuntime.jsx(StyledCheckmark, {}),
2002
- /*#__PURE__*/ jsxRuntime.jsx("span", {
2003
- children: label
2069
+ errorText && /*#__PURE__*/ jsxRuntime.jsx(ErrorContainer$2, {
2070
+ id: errorId,
2071
+ children: errorText
2004
2072
  })
2005
2073
  ]
2006
2074
  });
@@ -2008,30 +2076,60 @@ const HiddenInput$1 = /*#__PURE__*/ styled("input", {
2008
2076
  const Checkbox = /*#__PURE__*/ React.forwardRef(CheckboxComponent);
2009
2077
 
2010
2078
  const Switch = /*#__PURE__*/ styled("label", {
2011
- target: "e185uavx0",
2079
+ target: "ecxpw850",
2012
2080
  label: "Switch"
2013
2081
  })("position:relative;display:inline-flex;margin:5px 0;");
2014
2082
  const Input$1 = /*#__PURE__*/ styled("input", {
2015
- target: "e185uavx1",
2083
+ target: "ecxpw851",
2016
2084
  label: "Input"
2017
2085
  })("position:absolute;width:0;height:0;appearance:none;margin:0;& + span{position:relative;cursor:pointer;width:30px;height:18px;background-color:", getThemeValue(THEME_NAME.LIGHT_GREY), ";transition:0.4s;border-radius:10px;padding:0 3px;margin:0 10px 0 5px;}& + span:before{position:absolute;content:'';height:14px;width:14px;left:1px;top:1px;border:1px solid ", getThemeValue(THEME_NAME.DISABLED_BORDER), ";border-radius:50%;background-color:", getThemeValue(THEME_NAME.BACKGROUND), ";transition:0.4s;}&:checked + span{background-color:", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}&:checked + span:before{transform:translateX(18px);border-color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:enabled:focus + span:before{box-shadow:0 0 0 3px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";border-color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:enabled:hover ~ span{cursor:pointer;color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:disabled ~ span{color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";}&:disabled + span{background-color:", getThemeValue(THEME_NAME.LIGHT_GREY), ";cursor:not-allowed;}&:disabled + span:before{background-color:", getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR), ";border-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";}");
2086
+ const ErrorContainer$1 = /*#__PURE__*/ styled("div", {
2087
+ target: "ecxpw852",
2088
+ label: "ErrorContainer"
2089
+ })("color:", getThemeValue(THEME_NAME.ERROR), ";padding-top:3px;font-size:12px;line-height:14px;");
2090
+ const Container$5 = /*#__PURE__*/ styled("div", {
2091
+ target: "ecxpw853",
2092
+ label: "Container"
2093
+ })("display:inline-flex;flex-direction:column;");
2018
2094
  /**
2019
2095
  * Toggle Component
2020
2096
  * @param props - Component props
2021
- * @param ref - Ref forwarded to the underlying HTMLInputElement
2022
- */ function ToggleComponent(props, ref) {
2023
- return /*#__PURE__*/ jsxRuntime.jsxs(Switch, {
2097
+ * @param forwardedRef - Ref forwarded to the underlying HTMLInputElement
2098
+ */ function ToggleComponent(props, forwardedRef) {
2099
+ const { label, errorText, ...rest } = props;
2100
+ const internalRef = React.useRef(null);
2101
+ const errorId = React.useId();
2102
+ React.useImperativeHandle(forwardedRef, ()=>internalRef.current);
2103
+ React.useEffect(()=>{
2104
+ if (internalRef.current) {
2105
+ internalRef.current.setCustomValidity(errorText || '');
2106
+ }
2107
+ }, [
2108
+ errorText
2109
+ ]);
2110
+ return /*#__PURE__*/ jsxRuntime.jsxs(Container$5, {
2024
2111
  children: [
2025
- /*#__PURE__*/ jsxRuntime.jsx(Input$1, {
2026
- ...props,
2027
- ref: ref,
2028
- type: "checkbox",
2029
- role: "switch",
2030
- "aria-checked": props.checked
2112
+ /*#__PURE__*/ jsxRuntime.jsxs(Switch, {
2113
+ children: [
2114
+ /*#__PURE__*/ jsxRuntime.jsx(Input$1, {
2115
+ ...rest,
2116
+ ref: internalRef,
2117
+ type: "checkbox",
2118
+ role: "switch",
2119
+ "aria-checked": props.checked,
2120
+ "aria-invalid": !!errorText,
2121
+ "aria-label": label,
2122
+ "aria-describedby": errorText ? errorId : undefined
2123
+ }),
2124
+ /*#__PURE__*/ jsxRuntime.jsx("span", {}),
2125
+ /*#__PURE__*/ jsxRuntime.jsx("span", {
2126
+ children: label
2127
+ })
2128
+ ]
2031
2129
  }),
2032
- /*#__PURE__*/ jsxRuntime.jsx("span", {}),
2033
- /*#__PURE__*/ jsxRuntime.jsx("span", {
2034
- children: props.label
2130
+ errorText && /*#__PURE__*/ jsxRuntime.jsx(ErrorContainer$1, {
2131
+ id: errorId,
2132
+ children: errorText
2035
2133
  })
2036
2134
  ]
2037
2135
  });
@@ -2039,29 +2137,41 @@ const Input$1 = /*#__PURE__*/ styled("input", {
2039
2137
  const Toggle = /*#__PURE__*/ React.forwardRef(ToggleComponent);
2040
2138
 
2041
2139
  const Label$1 = /*#__PURE__*/ styled("label", {
2042
- target: "e12cx2u30",
2140
+ target: "edovkv60",
2043
2141
  label: "Label"
2044
- })("display:inline-flex;align-items:center;margin:5px 0;cursor:pointer;position:relative;");
2142
+ })("display:inline-flex;align-items:center;margin:5px 10px 5px 0;cursor:pointer;position:relative;");
2045
2143
  const StyledRadio = /*#__PURE__*/ styled("span", {
2046
- target: "e12cx2u31",
2144
+ target: "edovkv61",
2047
2145
  label: "StyledRadio"
2048
2146
  })("width:16px;height:16px;margin-right:5px;border:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";border-radius:50%;display:block;transition:background-color 0.3s ease;position:relative;flex-shrink:0;&::after{content:'';width:100%;height:100%;border-radius:50%;position:absolute;top:0;left:0;box-shadow:inset 0 0 0 3px ", getThemeValue(THEME_NAME.BACKGROUND), ";opacity:0;transition:opacity 0.2s ease;}");
2049
2147
  const HiddenInput = /*#__PURE__*/ styled("input", {
2050
- target: "e12cx2u32",
2148
+ target: "edovkv62",
2051
2149
  label: "HiddenInput"
2052
2150
  })("opacity:0;width:0;height:0;position:absolute;margin:0;&:checked + ", StyledRadio, "{border-color:", getThemeValue(THEME_NAME.PRIMARY), ";background-color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:checked + ", StyledRadio, "::after{opacity:1;}&:enabled:focus + ", StyledRadio, "{border-color:", getThemeValue(THEME_NAME.PRIMARY), ";box-shadow:0 0 0 3px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}&:enabled:checked:focus + ", StyledRadio, "{border-color:", getThemeValue(THEME_NAME.PRIMARY), ";box-shadow:0 0 0 3px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}&:enabled:hover + ", StyledRadio, "{border-color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:enabled:hover ~ span{color:", getThemeValue(THEME_NAME.PRIMARY), ";}&:disabled + ", StyledRadio, "{border-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";background-color:", getThemeValue(THEME_NAME.LIGHT_GREY), ";cursor:not-allowed;}&:disabled:checked + ", StyledRadio, "{border-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";background-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";}&:disabled ~ span{color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";cursor:not-allowed;}");
2053
2151
  /**
2054
2152
  * Radio Component
2055
2153
  * @param props - Component props
2056
- * @param ref - Ref forwarded to the underlying HTMLInputElement
2057
- */ function RadioComponent(props, ref) {
2058
- const { label, ...rest } = props;
2154
+ * @param forwardedRef - Ref forwarded to the underlying HTMLInputElement
2155
+ */ function RadioComponent(props, forwardedRef) {
2156
+ const { label, errorText, ...rest } = props;
2157
+ const internalRef = React.useRef(null);
2158
+ const errorId = React.useId();
2159
+ React.useImperativeHandle(forwardedRef, ()=>internalRef.current);
2160
+ React.useEffect(()=>{
2161
+ if (internalRef.current) {
2162
+ internalRef.current.setCustomValidity(errorText || '');
2163
+ }
2164
+ }, [
2165
+ errorText
2166
+ ]);
2059
2167
  return /*#__PURE__*/ jsxRuntime.jsxs(Label$1, {
2060
2168
  children: [
2061
2169
  /*#__PURE__*/ jsxRuntime.jsx(HiddenInput, {
2062
2170
  ...rest,
2063
- ref: ref,
2064
- type: "radio"
2171
+ ref: internalRef,
2172
+ type: "radio",
2173
+ "aria-invalid": !!errorText,
2174
+ "aria-describedby": errorText ? errorId : undefined
2065
2175
  }),
2066
2176
  /*#__PURE__*/ jsxRuntime.jsx(StyledRadio, {}),
2067
2177
  /*#__PURE__*/ jsxRuntime.jsx("span", {
@@ -2073,29 +2183,41 @@ const HiddenInput = /*#__PURE__*/ styled("input", {
2073
2183
  const Radio = /*#__PURE__*/ React.forwardRef(RadioComponent);
2074
2184
 
2075
2185
  const Input = /*#__PURE__*/ styled("input", {
2076
- target: "e1yp0s5y0",
2186
+ target: "e76n0060",
2077
2187
  label: "Input"
2078
2188
  })("appearance:none;margin:0;width:0;& + span{color:", getThemeValue(THEME_NAME.PRIMARY), ";padding:6px 12px;border:none;border:1px solid ", getThemeValue(THEME_NAME.PRIMARY), ";cursor:pointer;margin-right:-1px;line-height:18px;}&:enabled:focus + span{box-shadow:0 0 0 4px ", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";}&:enabled:hover + span{background-color:", getThemeValue(THEME_NAME.PRIMARY_LIGHT), ";color:", getThemeValue(THEME_NAME.TEXT_COLOR_LIGHT), ";}&:enabled:checked + span{background-color:", getThemeValue(THEME_NAME.PRIMARY), ";color:", getThemeValue(THEME_NAME.TEXT_COLOR_LIGHT), ";}&:disabled + span{background-color:", getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR), ";color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";}&:disabled:checked + span{background-color:", getThemeValue(THEME_NAME.DISABLED_BORDER), ";color:", getThemeValue(THEME_NAME.TEXT_COLOR_LIGHT), ";}");
2079
2189
  const Label = /*#__PURE__*/ styled("label", {
2080
- target: "e1yp0s5y1",
2190
+ target: "e76n0061",
2081
2191
  label: "Label"
2082
2192
  })("display:inline-flex;&:focus-within{z-index:1;}");
2083
2193
  const RadioGroup = /*#__PURE__*/ styled("div", {
2084
- target: "e1yp0s5y2",
2194
+ target: "e76n0062",
2085
2195
  label: "RadioGroup"
2086
- })("display:inline-flex;align-items:center;border-radius:3px;margin:5px 0;& ", Label, ":first-child > span{border-radius:3px 0 0 3px;}& ", Label, ":last-child > span{border-radius:0 3px 3px 0;}");
2196
+ })("display:inline-flex;align-items:center;border-radius:3px;margin:5px 0;& > ", Label, ":first-of-type > span{border-radius:3px 0 0 3px;}& > ", Label, ":last-of-type > span{border-radius:0 3px 3px 0;}");
2087
2197
  /**
2088
2198
  * RadioButton Component
2089
2199
  * @param props - Component props
2090
- * @param ref - Ref forwarded to the underlying HTMLInputElement
2091
- */ function RadioButtonComponent(props, ref) {
2092
- const { label, ...rest } = props;
2200
+ * @param forwardedRef - Ref forwarded to the underlying HTMLInputElement
2201
+ */ function RadioButtonComponent(props, forwardedRef) {
2202
+ const { label, errorText, ...rest } = props;
2203
+ const internalRef = React.useRef(null);
2204
+ const errorId = React.useId();
2205
+ React.useImperativeHandle(forwardedRef, ()=>internalRef.current);
2206
+ React.useEffect(()=>{
2207
+ if (internalRef.current) {
2208
+ internalRef.current.setCustomValidity(errorText || '');
2209
+ }
2210
+ }, [
2211
+ errorText
2212
+ ]);
2093
2213
  return /*#__PURE__*/ jsxRuntime.jsxs(Label, {
2094
2214
  children: [
2095
2215
  /*#__PURE__*/ jsxRuntime.jsx(Input, {
2096
2216
  ...rest,
2097
2217
  type: "radio",
2098
- ref: ref
2218
+ ref: internalRef,
2219
+ "aria-invalid": !!errorText,
2220
+ "aria-describedby": errorText ? errorId : undefined
2099
2221
  }),
2100
2222
  /*#__PURE__*/ jsxRuntime.jsx("span", {
2101
2223
  children: label
@@ -2236,7 +2358,7 @@ const MenuContainer = /*#__PURE__*/ styled("div", {
2236
2358
  const Menu = /*#__PURE__*/ React.forwardRef(MenuInner);
2237
2359
 
2238
2360
  const Container$4 = /*#__PURE__*/ styled("button", {
2239
- target: "ebwocs30",
2361
+ target: "e1u7wt750",
2240
2362
  label: "Container"
2241
2363
  })("font-weight:", (props)=>props.selected ? 'bold' : 'normal', ";padding:8px;border:none;border-left:4px solid\n ", (props)=>props.selected && !props.multiselect ? getThemeValue(THEME_NAME.TEXT_COLOR_DARK) : 'transparent', ";background-color:transparent;font-size:16px;border-bottom:1px solid ", getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR), ";min-height:41px;display:flex;align-items:center;cursor:pointer;position:relative;color:", getThemeValue(THEME_NAME.TEXT_COLOR_DARK), ";&:hover,&:focus,&:focus-within{background-color:", getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR), ";}& > label{margin:0 4px 0 0;}");
2242
2364
  /**
@@ -2309,11 +2431,11 @@ const positionMap$2 = {
2309
2431
  `
2310
2432
  };
2311
2433
  const PopoverDiv = /*#__PURE__*/ styled("div", {
2312
- target: "ejcb1ps0",
2434
+ target: "e13swao70",
2313
2435
  label: "PopoverDiv"
2314
2436
  })("position:relative;display:inline-flex;");
2315
2437
  const Popper = /*#__PURE__*/ styled(Card, {
2316
- target: "ejcb1ps1",
2438
+ target: "e13swao71",
2317
2439
  label: "Popper"
2318
2440
  })("position:absolute;width:100%;min-width:200px;overflow:auto;animation:enter 0.3s linear;border-radius:3px;z-index:1;transform:translate(", (props)=>props.translateX, "px,", (props)=>props.translateY, "px);", (props)=>positionMap$2[props.position], " &.closing{animation:exit 0.3s linear;}@keyframes enter{from{max-height:0px;opacity:1;overflow:hidden;}to{max-height:300px;opacity:1;overflow:hidden;}}@keyframes exit{to{max-height:0px;opacity:1;overflow:hidden;}from{max-height:300px;opacity:1;overflow:hidden;}}");
2319
2441
  const KEY_CODES = {
@@ -2492,7 +2614,7 @@ const KEY_CODES = {
2492
2614
  ref: forwardRef,
2493
2615
  ...rest,
2494
2616
  children: [
2495
- /*#__PURE__*/ React.createElement(element, {
2617
+ /*#__PURE__*/ React.cloneElement(element, {
2496
2618
  ref: triggerRef,
2497
2619
  id: triggerId,
2498
2620
  'aria-expanded': open,
@@ -2522,9 +2644,63 @@ const KEY_CODES = {
2522
2644
  const Popover = /*#__PURE__*/ React.forwardRef(PopoverComponent);
2523
2645
 
2524
2646
  const ArrowContainer = /*#__PURE__*/ styled("span", {
2525
- target: "e1d5dyoc0",
2647
+ target: "eph6dat0",
2526
2648
  label: "ArrowContainer"
2527
2649
  })("position:absolute;right:12px;top:16px;pointer-events:none;");
2650
+ /**
2651
+ * DropdownTrigger Component
2652
+ */ const DropdownTrigger = /*#__PURE__*/ React.forwardRef((props, ref)=>{
2653
+ const { displayValue, label, errorText, open, menuId, toggleOpen, onKeyDown, forwardedRef, ...rest } = props;
2654
+ const triggerRef = React.useRef(null);
2655
+ // Helper to assign both internal triggerRef and external forwarded ref
2656
+ const assignRefs = React.useCallback((node)=>{
2657
+ triggerRef.current = node;
2658
+ if (!forwardedRef) return;
2659
+ if (typeof forwardedRef === 'function') {
2660
+ forwardedRef(node);
2661
+ } else {
2662
+ forwardedRef.current = node;
2663
+ }
2664
+ }, [
2665
+ forwardedRef
2666
+ ]);
2667
+ // Combine the ref passed by parent with our assignRefs so both are updated
2668
+ const combinedRef = React.useCallback((node)=>{
2669
+ assignRefs(node);
2670
+ if (typeof ref === 'function') {
2671
+ ref(node);
2672
+ } else if (ref) {
2673
+ ref.current = node;
2674
+ }
2675
+ }, [
2676
+ assignRefs,
2677
+ ref
2678
+ ]);
2679
+ return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
2680
+ children: [
2681
+ /*#__PURE__*/ jsxRuntime.jsx(Input$2, {
2682
+ ...rest,
2683
+ ref: combinedRef,
2684
+ type: "text",
2685
+ value: displayValue,
2686
+ label: label,
2687
+ errorText: errorText,
2688
+ onClick: toggleOpen,
2689
+ onKeyDown: onKeyDown,
2690
+ inputMode: "none",
2691
+ role: "combobox",
2692
+ "aria-haspopup": "listbox",
2693
+ "aria-expanded": open,
2694
+ "aria-controls": menuId
2695
+ }),
2696
+ /*#__PURE__*/ jsxRuntime.jsx(ArrowContainer, {
2697
+ "aria-hidden": "true",
2698
+ children: /*#__PURE__*/ jsxRuntime.jsx(ExpandMore, {})
2699
+ })
2700
+ ]
2701
+ });
2702
+ });
2703
+ DropdownTrigger.displayName = 'DropdownTrigger';
2528
2704
  /**
2529
2705
  * Dropdown component that allows selection from a list of options.
2530
2706
  * Supports single and multi-select modes.
@@ -2532,11 +2708,6 @@ const ArrowContainer = /*#__PURE__*/ styled("span", {
2532
2708
  * @template T - The type of the value(s) in the dropdown.
2533
2709
  * @param props - The properties for the Dropdown component.
2534
2710
  * @returns The rendered Dropdown component.
2535
- */ /**
2536
- * Dropdown Component
2537
- * @template T - The type of value(s) in the dropdown.
2538
- * @param props - Component props
2539
- * @param outerRef - Ref forwarded to the underlying HTMLInputElement
2540
2711
  */ function DropdownComponent(props, outerRef) {
2541
2712
  const { multiSelect = false, onChange, children, value: propValue, label, errorText, required, disabled, ...rest } = props;
2542
2713
  const [open, setOpen] = React.useState(false);
@@ -2545,6 +2716,42 @@ const ArrowContainer = /*#__PURE__*/ styled("span", {
2545
2716
  const menuId = `${id}-menu`;
2546
2717
  const menuRef = React.useRef(null);
2547
2718
  const triggerRef = React.useRef(null);
2719
+ /**
2720
+ * Gets the display value for the dropdown based on the current value and children.
2721
+ *
2722
+ * @param currentValue - The current value of the dropdown.
2723
+ * @param currentChildren - The children of the dropdown.
2724
+ * @returns The display value.
2725
+ */ const getDisplayValue = (currentValue, currentChildren)=>{
2726
+ if (currentValue === undefined || currentValue === null) return '';
2727
+ const findLabel = (val)=>{
2728
+ let label = '';
2729
+ React.Children.forEach(currentChildren, (child)=>{
2730
+ if (/*#__PURE__*/ React.isValidElement(child)) {
2731
+ const props = child.props;
2732
+ if ('value' in props && props.value === val) {
2733
+ label = String(props.children);
2734
+ }
2735
+ }
2736
+ });
2737
+ return label;
2738
+ };
2739
+ if (Array.isArray(currentValue)) {
2740
+ return currentValue.map(findLabel).filter(Boolean).join(', ');
2741
+ }
2742
+ return findLabel(currentValue);
2743
+ };
2744
+ const displayValue = getDisplayValue(value, children) || (value ? String(value) : '');
2745
+ // Sync prop value with state
2746
+ const prevValueRef = React.useRef(undefined);
2747
+ React.useEffect(()=>{
2748
+ if (propValue !== prevValueRef.current) {
2749
+ setValue(propValue);
2750
+ prevValueRef.current = propValue;
2751
+ }
2752
+ }, [
2753
+ propValue
2754
+ ]);
2548
2755
  // Focus menu when opened
2549
2756
  React.useEffect(()=>{
2550
2757
  if (open) {
@@ -2566,7 +2773,7 @@ const ArrowContainer = /*#__PURE__*/ styled("span", {
2566
2773
  * Opens the menu on 'Enter', 'Space', 'ArrowDown', or 'ArrowUp'.
2567
2774
  *
2568
2775
  * @param {React.KeyboardEvent<HTMLInputElement>} e - The keyboard event.
2569
- */ const onKeyDown = (e)=>{
2776
+ */ const onKeyDown = React.useCallback((e)=>{
2570
2777
  if ([
2571
2778
  'ArrowDown',
2572
2779
  'ArrowUp',
@@ -2575,8 +2782,11 @@ const ArrowContainer = /*#__PURE__*/ styled("span", {
2575
2782
  ].includes(e.key)) {
2576
2783
  e.preventDefault();
2577
2784
  setOpen(true);
2785
+ } else if (e.key !== 'Tab') {
2786
+ // Prevent typing to mimic readOnly behavior while allowing native validation
2787
+ e.preventDefault();
2578
2788
  }
2579
- };
2789
+ }, []);
2580
2790
  /**
2581
2791
  * Handles changes to the dropdown value.
2582
2792
  * Updates local state and calls the external onChange handler.
@@ -2594,59 +2804,35 @@ const ArrowContainer = /*#__PURE__*/ styled("span", {
2594
2804
  };
2595
2805
  /**
2596
2806
  * Toggles the dropdown open state on click.
2597
- */ const clickHandler = ()=>setOpen(true);
2598
- const TriggerElement = /*#__PURE__*/ React.forwardRef((passedProps, ref)=>{
2599
- // Helper to assign both internal triggerRef and external forwarded ref
2600
- const assignRefs = (node)=>{
2601
- triggerRef.current = node;
2602
- if (!outerRef) return;
2603
- if (typeof outerRef === 'function') {
2604
- outerRef(node);
2605
- } else {
2606
- outerRef.current = node;
2607
- }
2608
- };
2609
- // Combine the ref passed by parent with our assignRefs so both are updated
2610
- const combinedRef = (node)=>{
2611
- assignRefs(node);
2612
- if (typeof ref === 'function') {
2613
- ref(node);
2614
- } else if (ref) {
2615
- ref.current = node;
2616
- }
2617
- };
2618
- return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
2619
- children: [
2620
- /*#__PURE__*/ jsxRuntime.jsx(Input$2, {
2621
- ...rest,
2622
- ...passedProps,
2623
- ref: combinedRef,
2624
- type: "text",
2625
- value: value && String(value),
2626
- label: label,
2627
- errorText: errorText,
2628
- onClick: clickHandler,
2629
- onKeyDown: onKeyDown,
2630
- required: required,
2631
- disabled: disabled,
2632
- readOnly: true,
2633
- role: "combobox",
2634
- "aria-haspopup": "listbox",
2635
- "aria-expanded": open,
2636
- "aria-controls": menuId
2637
- }),
2638
- /*#__PURE__*/ jsxRuntime.jsx(ArrowContainer, {
2639
- "aria-hidden": "true",
2640
- children: /*#__PURE__*/ jsxRuntime.jsx(ExpandMore, {})
2641
- })
2642
- ]
2643
- });
2644
- });
2645
- TriggerElement.displayName = 'DropdownTrigger';
2807
+ */ const clickHandler = React.useCallback(()=>setOpen(true), []);
2808
+ /**
2809
+ * Forwarded ref handler for the trigger input.
2810
+ */ const handleForwardedRef = React.useCallback((node)=>{
2811
+ triggerRef.current = node;
2812
+ if (typeof outerRef === 'function') {
2813
+ outerRef(node);
2814
+ } else if (outerRef) {
2815
+ outerRef.current = node;
2816
+ }
2817
+ }, [
2818
+ outerRef
2819
+ ]);
2646
2820
  return /*#__PURE__*/ jsxRuntime.jsx(Popover, {
2647
2821
  position: POPOVER_POSITION.BOTTOM_LEFT,
2648
2822
  open: open,
2649
- element: TriggerElement,
2823
+ element: /*#__PURE__*/ jsxRuntime.jsx(DropdownTrigger, {
2824
+ ...rest,
2825
+ displayValue: displayValue,
2826
+ label: label,
2827
+ errorText: errorText,
2828
+ open: open,
2829
+ menuId: menuId,
2830
+ toggleOpen: clickHandler,
2831
+ onKeyDown: onKeyDown,
2832
+ required: required,
2833
+ disabled: disabled,
2834
+ forwardedRef: handleForwardedRef
2835
+ }),
2650
2836
  onClose: ()=>{
2651
2837
  setOpen(false);
2652
2838
  triggerRef.current?.focus();
@@ -2783,7 +2969,7 @@ const positionStyle$1 = (size)=>({
2783
2969
  }
2784
2970
  });
2785
2971
  const DrawerDiv = /*#__PURE__*/ styled("div", {
2786
- target: "e1topccf0",
2972
+ target: "e1qyfyr80",
2787
2973
  label: "DrawerDiv"
2788
2974
  })("display:flex;flex-direction:column;background-color:", getThemeValue(THEME_NAME.BACKGROUND), ";transition:transform 0.3s ease;box-shadow:", getThemeValue(THEME_NAME.MODAL_SHADOW), ";", (props)=>positionStyle$1(props.size)[props.position].before, " .nf-layer-enter &{transform:translateX(0%);", (props)=>positionStyle$1(props.size)[props.position].after, "}");
2789
2975
  const positionMap$1 = {
@@ -2821,7 +3007,7 @@ class Drawer extends React.Component {
2821
3007
  /**
2822
3008
  * Lifecycle method to handle Drawer updates.
2823
3009
  * Manages opening/closing logic via LayerManager and focus preservation.
2824
- */ getSnapshotBeforeUpdate(prevProps) {
3010
+ */ componentDidUpdate(prevProps) {
2825
3011
  const { open } = this.props;
2826
3012
  if (prevProps.open && !open) {
2827
3013
  this.closeCallback?.();
@@ -2832,7 +3018,6 @@ class Drawer extends React.Component {
2832
3018
  this.lastFocusedElement = document.activeElement;
2833
3019
  this.handleOpen();
2834
3020
  }
2835
- return null;
2836
3021
  }
2837
3022
  /**
2838
3023
  * Renders the Drawer component via the LayerManager portal.
@@ -2976,9 +3161,9 @@ Drawer.defaultProps = {
2976
3161
  };
2977
3162
 
2978
3163
  const Container$3 = /*#__PURE__*/ styled("div", {
2979
- target: "eahc3qe0",
3164
+ target: "e1m58trk0",
2980
3165
  label: "Container"
2981
- })("display:inline-flex;border:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";border-radius:3px;margin:5px;& button,& label{margin:0;border:none;border-radius:0;border-left:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";box-shadow:none;height:32px;}& > div button{border-left:none;}& input,& select{border:none;height:32px;}& input,& select{border-radius:0;}& input:active,& select:active{box-shadow:none;}& > div > span{top:8px;}& > *:first-child,& > label:first-child input,& > label:first-child select,& > *:first-child label,& > *:first-child input{border-left:none;border-radius:2px 0 0 2px;}& > *:last-child,& > label:last-child input,& > label:last-child select,& > *:last-child label,& > *:last-child input{border-radius:0 2px 2px 0;}& *:focus,& *:focus + span{z-index:1;}&:focus-within,&:hover{box-shadow:", getThemeValue(THEME_NAME.HOVER_SHADOW), ";}", (props)=>props.errorText ? `
3166
+ })("display:inline-flex;border:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";border-radius:3px;margin:5px;& button,& label{margin:0;border:none;border-radius:0;border-left:1px solid ", getThemeValue(THEME_NAME.BORDER_COLOR), ";box-shadow:none;height:32px;}& > div button{border-left:none;}& input,& select{border:none;height:32px;}& input,& select{border-radius:0;}& input:active,& select:active{box-shadow:none;}& > div > span{top:8px;}& > *:first-of-type,& > label:first-of-type input,& > label:first-of-type select,& > *:first-of-type label,& > *:first-of-type input{border-left:none;border-radius:2px 0 0 2px;}& > *:last-child,& > label:last-child input,& > label:last-child select,& > *:last-child label,& > *:last-child input{border-radius:0 2px 2px 0;}& *:focus,& *:focus + span{z-index:1;}&:focus-within,&:hover{box-shadow:", getThemeValue(THEME_NAME.HOVER_SHADOW), ";}", (props)=>props.errorText ? `
2982
3167
  border-color: ${getThemeValue(THEME_NAME.ERROR)};
2983
3168
 
2984
3169
  & > button, & > label {
@@ -2986,7 +3171,7 @@ const Container$3 = /*#__PURE__*/ styled("div", {
2986
3171
  }
2987
3172
  ` : '');
2988
3173
  const ErrorContainer = /*#__PURE__*/ styled("div", {
2989
- target: "eahc3qe1",
3174
+ target: "e1m58trk1",
2990
3175
  label: "ErrorContainer"
2991
3176
  })("color:", getThemeValue(THEME_NAME.ERROR), ";margin-left:8px;font-size:12px;");
2992
3177
  /**
@@ -3053,7 +3238,7 @@ class Modal extends React.Component {
3053
3238
  /**
3054
3239
  * Lifecycle method to handle Modal updates.
3055
3240
  * Manages opening/closing logic via LayerManager and focus preservation.
3056
- */ getSnapshotBeforeUpdate(prevProps) {
3241
+ */ componentDidUpdate(prevProps) {
3057
3242
  const { open } = this.props;
3058
3243
  if (prevProps.open && !open) {
3059
3244
  this.closeCallback?.();
@@ -3064,7 +3249,6 @@ class Modal extends React.Component {
3064
3249
  this.lastFocusedElement = document.activeElement;
3065
3250
  this.handleOpen();
3066
3251
  }
3067
- return null;
3068
3252
  }
3069
3253
  /**
3070
3254
  * Renders the Modal component via the LayerManager portal.
@@ -3632,19 +3816,19 @@ const SpinnerDiv = /*#__PURE__*/ styled("div", {
3632
3816
  const Spinner = /*#__PURE__*/ React.forwardRef(SpinnerComponent);
3633
3817
 
3634
3818
  const Container$1 = /*#__PURE__*/ styled("div", {
3635
- target: "e14em2c80",
3819
+ target: "er9cpfq0",
3636
3820
  label: "Container"
3637
3821
  })("flex:1;display:flex;flex-direction:column;min-height:400px;");
3638
3822
  const Header = /*#__PURE__*/ styled("div", {
3639
- target: "e14em2c81",
3823
+ target: "er9cpfq1",
3640
3824
  label: "Header"
3641
3825
  })("display:flex;flex-direction:row;justify-content:space-between;border-bottom:1px solid ", getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR), ";@media (min-width:601px){&::before{position:absolute;top:25px;left:0;right:0;height:2px;background-color:", getThemeValue(THEME_NAME.LIGHT_GREY), ";content:' ';z-index:0;}}& > *{z-index:1;}");
3642
3826
  const HeaderButton = /*#__PURE__*/ styled("button", {
3643
- target: "e14em2c82",
3827
+ target: "er9cpfq2",
3644
3828
  label: "HeaderButton"
3645
3829
  })("border:none;padding:16px 24px 16px 16px;font-size:16px;cursor:pointer;background-color:", (props)=>props.active ? getThemeValue(THEME_NAME.BORDER_LIGHT_COLOR) : getThemeValue(THEME_NAME.BACKGROUND), ";font-weight:", (props)=>props.active ? 'bold' : 'normal', ";overflow:hidden;display:flex;align-items:center;color:", getThemeValue(THEME_NAME.TEXT_COLOR_DARK), ";&:disabled{cursor:not-allowed;background-color:", getThemeValue(THEME_NAME.DISABLED_BACKGROUND), ";}&:enabled:hover,&:focus{background-color:", getThemeValue(THEME_NAME.PRIMARY_LIGHTER), ";}@media (max-width:600px){&{display:none;}}");
3646
3830
  const MobileHeader = /*#__PURE__*/ styled("div", {
3647
- target: "e14em2c83",
3831
+ target: "er9cpfq3",
3648
3832
  label: "MobileHeader"
3649
3833
  })("padding:16px;font-size:16px;line-height:18px;align-items:center;font-weight:bold;flex:1;display:flex;flex-direction:row;justify-content:space-between;@media (min-width:601px){&{display:none;}}");
3650
3834
  /**
@@ -3656,6 +3840,15 @@ const MobileHeader = /*#__PURE__*/ styled("div", {
3656
3840
  const [active, setActive] = React.useState(propsActive);
3657
3841
  const childrenArray = React.Children.toArray(children);
3658
3842
  const stepRefs = [];
3843
+ const prevActiveRef = React.useRef(null);
3844
+ React.useEffect(()=>{
3845
+ if (prevActiveRef.current !== propsActive) {
3846
+ setActive(propsActive);
3847
+ }
3848
+ prevActiveRef.current = propsActive;
3849
+ }, [
3850
+ propsActive
3851
+ ]);
3659
3852
  const stepClickHandler = (index)=>()=>{
3660
3853
  setActive(index);
3661
3854
  onStepClick?.(index);
@@ -4190,6 +4383,7 @@ exports.DrawerBody = Body$1;
4190
4383
  exports.DrawerFooter = Footer$1;
4191
4384
  exports.DrawerHeader = Header$1;
4192
4385
  exports.Dropdown = Dropdown;
4386
+ exports.ErrorContainer = ErrorContainer$7;
4193
4387
  exports.Group = Group;
4194
4388
  exports.GroupLabel = GroupLabel;
4195
4389
  exports.IconButton = IconButton;