@app-studio/web 0.3.69 → 0.5.0

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 (82) hide show
  1. package/dist/bot/Bot.d.ts +4 -3
  2. package/dist/bot/FileHandler.d.ts +5 -0
  3. package/dist/bot/OpenAIConnector.d.ts +2 -0
  4. package/dist/bot/prompt/1-project.d.ts +1 -1
  5. package/dist/bot/prompt/2-response.d.ts +1 -1
  6. package/dist/components/Form/Checkbox/Checkbox/Checkbox.props.d.ts +0 -3
  7. package/dist/components/Form/ComboBox/ComboBox/ComboBox.context.d.ts +10 -0
  8. package/dist/components/Form/ComboBox/ComboBox/ComboBox.props.d.ts +36 -0
  9. package/dist/components/Form/ComboBox/ComboBox/ComboBox.provider.d.ts +2 -0
  10. package/dist/components/Form/ComboBox/ComboBox/ComboBox.state.d.ts +2 -0
  11. package/dist/components/Form/ComboBox/ComboBox/ComboBox.type.d.ts +12 -0
  12. package/dist/components/Form/ComboBox/ComboBox/ComboBox.view.d.ts +4 -0
  13. package/dist/components/Form/ComboBox/ComboBox.d.ts +3 -0
  14. package/dist/components/Form/ComboBox/examples/default.d.ts +2 -0
  15. package/dist/components/Form/ComboBox/examples/index.d.ts +10 -0
  16. package/dist/components/Form/ComboBox/examples/label.d.ts +2 -0
  17. package/dist/components/Form/ComboBox/examples/left.d.ts +2 -0
  18. package/dist/components/Form/ComboBox/examples/onSelect.d.ts +2 -0
  19. package/dist/components/Form/ComboBox/examples/placeholder.d.ts +2 -0
  20. package/dist/components/Form/ComboBox/examples/right.d.ts +2 -0
  21. package/dist/components/Form/ComboBox/examples/searchEnabled.d.ts +2 -0
  22. package/dist/components/Form/ComboBox/examples/searchPlaceholder.d.ts +2 -0
  23. package/dist/components/Form/ComboBox/examples/showTick.d.ts +2 -0
  24. package/dist/components/Form/ComboBox/examples/styles.d.ts +2 -0
  25. package/dist/components/Form/DatePicker/DatePicker/DatePicker.props.d.ts +0 -3
  26. package/dist/components/Form/TextField/examples/index.d.ts +1 -1
  27. package/dist/components/Formik/Formik.ComboBox.d.ts +6 -0
  28. package/dist/components/Formik/examples/FormikComboBox.d.ts +2 -0
  29. package/dist/components/Formik/examples/index.d.ts +1 -0
  30. package/dist/components/Formik/index.d.ts +1 -0
  31. package/dist/components/Layout/index.d.ts +4 -0
  32. package/dist/components/Message/Message/Message.layout.d.ts +1 -1
  33. package/dist/components/Message/Message/Message.props.d.ts +31 -107
  34. package/dist/components/Message/Message/Message.store.d.ts +2 -8
  35. package/dist/components/Message/Message/Message.style.d.ts +2 -2
  36. package/dist/components/Message/Message/Message.view.d.ts +2 -18
  37. package/dist/components/Message/examples/action.d.ts +2 -0
  38. package/dist/components/Message/examples/default.d.ts +2 -0
  39. package/dist/components/Message/examples/index.d.ts +9 -0
  40. package/dist/components/Message/examples/isClosable.d.ts +2 -0
  41. package/dist/components/Message/examples/showIcon.d.ts +2 -0
  42. package/dist/components/Message/examples/styles.d.ts +2 -0
  43. package/dist/components/Message/examples/subtitle.d.ts +2 -0
  44. package/dist/components/Message/examples/timeout.d.ts +2 -0
  45. package/dist/components/Message/examples/title.d.ts +2 -0
  46. package/dist/components/Message/examples/variant.d.ts +2 -0
  47. package/dist/components/Svg/Error.d.ts +8 -0
  48. package/dist/components/Svg/Info.d.ts +8 -0
  49. package/dist/components/Svg/Plus.d.ts +8 -0
  50. package/dist/components/Svg/Search.d.ts +8 -0
  51. package/dist/components/Svg/Success.d.ts +8 -0
  52. package/dist/components/Svg/Tick.d.ts +8 -0
  53. package/dist/components/Svg/index.d.ts +3 -0
  54. package/dist/components/Table/Table/Table.context.d.ts +16 -0
  55. package/dist/components/Table/Table/Table.props.d.ts +22 -0
  56. package/dist/components/Table/Table/Table.state.d.ts +5 -0
  57. package/dist/components/Table/Table/Table.type.d.ts +19 -0
  58. package/dist/components/Table/Table/Table.view.d.ts +11 -0
  59. package/dist/components/Table/Table.d.ts +13 -0
  60. package/dist/components/Table/examples/caption.d.ts +2 -0
  61. package/dist/components/Table/examples/data.d.ts +2 -0
  62. package/dist/components/Table/examples/default.d.ts +2 -0
  63. package/dist/components/Table/examples/footer.d.ts +2 -0
  64. package/dist/components/Table/examples/index.d.ts +5 -0
  65. package/dist/components/Table/examples/styles.d.ts +2 -0
  66. package/dist/components/index.d.ts +1 -0
  67. package/dist/pages/comboBox.page.d.ts +3 -0
  68. package/dist/pages/message.page.d.ts +2 -2
  69. package/dist/pages/table.page.d.ts +3 -0
  70. package/dist/utils/componentsPageImports.d.ts +6 -0
  71. package/dist/web.cjs.development.js +708 -61
  72. package/dist/web.cjs.development.js.map +1 -1
  73. package/dist/web.cjs.production.min.js +1 -1
  74. package/dist/web.cjs.production.min.js.map +1 -1
  75. package/dist/web.esm.js +703 -62
  76. package/dist/web.esm.js.map +1 -1
  77. package/package.json +6 -5
  78. package/dist/components/Message/Examples/CloseButtonMessage.d.ts +0 -2
  79. package/dist/components/Message/Examples/DefaultMessage.d.ts +0 -2
  80. package/dist/components/Message/Examples/VariantMessage.d.ts +0 -2
  81. package/dist/components/Message/Examples/index.d.ts +0 -3
  82. /package/dist/components/Form/TextField/examples/{ColorScheme.d.ts → colorScheme.d.ts} +0 -0
package/dist/web.esm.js CHANGED
@@ -434,6 +434,101 @@ var WarningSvg = function WarningSvg(_ref) {
434
434
  })))))));
435
435
  };
436
436
 
437
+ var _excluded$b = ["size", "color"];
438
+ var SuccessSvg = function SuccessSvg(_ref) {
439
+ var _ref$size = _ref.size,
440
+ size = _ref$size === void 0 ? 64 : _ref$size,
441
+ _ref$color = _ref.color,
442
+ color = _ref$color === void 0 ? 'white' : _ref$color,
443
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
444
+ return React.createElement(Center, {
445
+ width: size + "px",
446
+ height: size + "px"
447
+ }, React.createElement("svg", Object.assign({
448
+ height: size + "px",
449
+ width: size + "px",
450
+ version: "1.1",
451
+ id: "Capa_1",
452
+ xmlns: "http://www.w3.org/2000/svg",
453
+ viewBox: "0 0 484.8 484.8",
454
+ fill: color
455
+ }, props), React.createElement("g", {
456
+ id: "SVGRepo_bgCarrier"
457
+ }), React.createElement("g", {
458
+ id: "SVGRepo_tracerCarrier"
459
+ }), React.createElement("g", {
460
+ id: "SVGRepo_iconCarrier"
461
+ }, React.createElement("g", null, React.createElement("g", null, React.createElement("path", {
462
+ d: "M242.4,0C108.6,0,0,108.6,0,242.4S108.6,484.8,242.4,484.8S484.8,376.2,484.8,242.4S376.2,0,242.4,0z M198.4,358.8l-120-120L84,228l114.4,114.4l188-188l28.8,28.8L198.4,358.8z",
463
+ fill: color
464
+ }))))));
465
+ };
466
+
467
+ var _excluded$c = ["size", "color"];
468
+ var InfoSvg = function InfoSvg(_ref) {
469
+ var _ref$size = _ref.size,
470
+ size = _ref$size === void 0 ? 64 : _ref$size,
471
+ _ref$color = _ref.color,
472
+ color = _ref$color === void 0 ? 'white' : _ref$color,
473
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
474
+ return React.createElement(Center, {
475
+ width: size + "px",
476
+ height: size + "px"
477
+ }, React.createElement("svg", Object.assign({
478
+ height: size + "px",
479
+ width: size + "px",
480
+ version: "1.1",
481
+ id: "Capa_1",
482
+ xmlns: "http://www.w3.org/2000/svg",
483
+ viewBox: "0 0 192.146 192.146",
484
+ fill: color
485
+ }, props), React.createElement("g", {
486
+ id: "SVGRepo_bgCarrier"
487
+ }), React.createElement("g", {
488
+ id: "SVGRepo_tracerCarrier"
489
+ }), React.createElement("g", {
490
+ id: "SVGRepo_iconCarrier"
491
+ }, React.createElement("g", null, React.createElement("g", null, React.createElement("g", null, React.createElement("path", {
492
+ d: "M96.073,3.515C43.19,3.515,0,46.705,0,99.587s43.19,96.072,96.073,96.072s96.073-43.19,96.073-96.072 S148.955,3.515,96.073,3.515z M101.468,154.072h-15.447V120.57h15.447V154.072z M101.468,111.875h-15.447V49.54h15.447V111.875z"
493
+ })))))));
494
+ };
495
+
496
+ var _excluded$d = ["size", "color"];
497
+ var ErrorSvg = function ErrorSvg(_ref) {
498
+ var _ref$size = _ref.size,
499
+ size = _ref$size === void 0 ? 64 : _ref$size,
500
+ _ref$color = _ref.color,
501
+ color = _ref$color === void 0 ? 'white' : _ref$color,
502
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
503
+ return React.createElement(Center, {
504
+ width: size + "px",
505
+ height: size + "px"
506
+ }, React.createElement("svg", Object.assign({
507
+ height: size + "px",
508
+ width: size + "px",
509
+ version: "1.1",
510
+ id: "Capa_1",
511
+ xmlns: "http://www.w3.org/2000/svg",
512
+ viewBox: "0 0 510 510",
513
+ fill: color
514
+ }, props), React.createElement("g", {
515
+ id: "SVGRepo_bgCarrier"
516
+ }), React.createElement("g", {
517
+ id: "SVGRepo_tracerCarrier"
518
+ }), React.createElement("g", {
519
+ id: "SVGRepo_iconCarrier"
520
+ }, React.createElement("g", null, React.createElement("g", null, React.createElement("path", {
521
+ d: "M255,0C114.615,0,0,114.615,0,255s114.615,255,255,255s255-114.615,255-255S395.385,0,255,0z M255,459c-114.75,0-207-92.25-207-207c0-114.75,92.25-207,207-207c114.75,0,207,92.25,207,207C462,366.75,369.75,459,255,459z",
522
+ fill: color
523
+ }), React.createElement("path", {
524
+ d: "M255,140.25c11.05,0,20-8.95,20-20s-8.95-20-20-20s-20,8.95-20,20S243.95,140.25,255,140.25z",
525
+ fill: color
526
+ }), React.createElement("path", {
527
+ d: "M265,357c0,11.05-8.95,20-20,20s-20-8.95-20-20v-175c0-11.05,8.95-20,20-20s20,8.95,20,20V357z",
528
+ fill: color
529
+ }))))));
530
+ };
531
+
437
532
  var IconSizes = {
438
533
  xs: 12,
439
534
  sm: 14,
@@ -447,7 +542,7 @@ var IconSizes = {
447
542
  '6xl': 64
448
543
  };
449
544
 
450
- var _excluded$b = ["children", "href", "iconSize", "underline", "isHovered", "isExternal", "styles", "setIsHovered"];
545
+ var _excluded$e = ["children", "href", "iconSize", "underline", "isHovered", "isExternal", "styles", "setIsHovered"];
451
546
  var LinkView = function LinkView(_ref) {
452
547
  var children = _ref.children,
453
548
  _ref$href = _ref.href,
@@ -467,7 +562,7 @@ var LinkView = function LinkView(_ref) {
467
562
  } : _ref$styles,
468
563
  _ref$setIsHovered = _ref.setIsHovered,
469
564
  setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
470
- props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
565
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
471
566
  var handleHover = function handleHover() {
472
567
  if (underline === 'hover') setIsHovered(true);
473
568
  };
@@ -605,7 +700,7 @@ var DefaultSpeeds = {
605
700
  slow: 300
606
701
  };
607
702
 
608
- var _excluded$c = ["size", "speed", "color"],
703
+ var _excluded$f = ["size", "speed", "color"],
609
704
  _excluded2 = ["size", "speed", "color"],
610
705
  _excluded3 = ["size", "speed", "color"],
611
706
  _excluded4 = ["size", "children", "textColor", "loaderColor", "type", "speed", "textPosition"];
@@ -616,7 +711,7 @@ var DefaultSpinner = function DefaultSpinner(_ref) {
616
711
  speed = _ref$speed === void 0 ? 'normal' : _ref$speed,
617
712
  _ref$color = _ref.color,
618
713
  color = _ref$color === void 0 ? 'theme.loading' : _ref$color,
619
- props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
714
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
620
715
  var theme = useTheme();
621
716
  var colorStyle = theme.getColor(color);
622
717
  var sizeStyle = typeof size === 'number' ? size : DefaultSizes[size];
@@ -790,7 +885,7 @@ var LoaderComponent = function LoaderComponent(props) {
790
885
  */
791
886
  var Loader = LoaderComponent;
792
887
 
793
- var _excluded$d = ["icon", "shadow", "children", "ariaLabel", "externalHref", "isAuto", "isFilled", "isIconRounded", "isLoading", "isDisabled", "size", "variant", "iconPosition", "colorScheme", "shape", "onClick", "loaderProps", "loaderPosition", "effect", "isHovered"];
888
+ var _excluded$g = ["icon", "shadow", "children", "ariaLabel", "externalHref", "isAuto", "isFilled", "isIconRounded", "isLoading", "isDisabled", "size", "variant", "iconPosition", "colorScheme", "shape", "onClick", "loaderProps", "loaderPosition", "effect", "isHovered"];
794
889
  var ButtonView = function ButtonView(_ref) {
795
890
  var _props$onClick;
796
891
  var icon = _ref.icon,
@@ -827,7 +922,7 @@ var ButtonView = function ButtonView(_ref) {
827
922
  _ref$effect = _ref.effect,
828
923
  effect = _ref$effect === void 0 ? 'default' : _ref$effect,
829
924
  isHovered = _ref.isHovered,
830
- props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
925
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
831
926
  var isActive = !(isDisabled || isLoading);
832
927
  var defaultNativeProps = {
833
928
  disabled: !isActive
@@ -971,7 +1066,7 @@ var HeadingSizes = {
971
1066
  }
972
1067
  };
973
1068
 
974
- var _excluded$e = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size"];
1069
+ var _excluded$h = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size"];
975
1070
  var LabelView = function LabelView(_ref) {
976
1071
  var children = _ref.children,
977
1072
  heading = _ref.heading,
@@ -985,7 +1080,7 @@ var LabelView = function LabelView(_ref) {
985
1080
  weight = _ref$weight === void 0 ? 'normal' : _ref$weight,
986
1081
  _ref$size = _ref.size,
987
1082
  size = _ref$size === void 0 ? 'sm' : _ref$size,
988
- props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
1083
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
989
1084
  var headingStyles = heading ? HeadingSizes[heading] : {};
990
1085
  return React.createElement(Element, Object.assign({
991
1086
  as: "label",
@@ -1057,7 +1152,7 @@ var IconSizes$2 = {
1057
1152
  '6xl': 60
1058
1153
  };
1059
1154
 
1060
- var _excluded$f = ["id", "icon", "name", "label", "isChecked", "onChange", "onValueChange", "shadow", "labelPosition", "size", "colorScheme", "error", "isSelected", "isHovered", "isDisabled", "isReadOnly", "isIndeterminate", "defaultIsSelected", "setIsSelected", "setIsHovered", "styles"];
1155
+ var _excluded$i = ["id", "icon", "name", "label", "isChecked", "onChange", "onValueChange", "shadow", "labelPosition", "size", "colorScheme", "error", "isSelected", "isHovered", "isDisabled", "isReadOnly", "isIndeterminate", "defaultIsSelected", "setIsSelected", "setIsHovered", "styles"];
1061
1156
  var CheckboxView = function CheckboxView(_ref) {
1062
1157
  var id = _ref.id,
1063
1158
  icon = _ref.icon,
@@ -1094,7 +1189,7 @@ var CheckboxView = function CheckboxView(_ref) {
1094
1189
  checkbox: {},
1095
1190
  label: {}
1096
1191
  } : _ref$styles,
1097
- props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
1192
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
1098
1193
  var handleHover = function handleHover() {
1099
1194
  return setIsHovered(!isHovered);
1100
1195
  };
@@ -2668,7 +2763,7 @@ var HeadingSizes$1 = {
2668
2763
  }
2669
2764
  };
2670
2765
 
2671
- var _excluded$g = ["children", "heading", "maxLines", "isItalic", "isUnderlined", "isSub", "isSup", "isStriked", "isTruncated", "weight", "size"];
2766
+ var _excluded$j = ["children", "heading", "maxLines", "isItalic", "isUnderlined", "isSub", "isSup", "isStriked", "isTruncated", "weight", "size"];
2672
2767
  var TextContent = function TextContent(_ref) {
2673
2768
  var children = _ref.children,
2674
2769
  isSub = _ref.isSub,
@@ -2732,7 +2827,7 @@ var TextView = function TextView(_ref3) {
2732
2827
  weight = _ref3$weight === void 0 ? 'normal' : _ref3$weight,
2733
2828
  _ref3$size = _ref3.size,
2734
2829
  size = _ref3$size === void 0 ? 'md' : _ref3$size,
2735
- props = _objectWithoutPropertiesLoose(_ref3, _excluded$g);
2830
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded$j);
2736
2831
  var headingStyles = heading ? HeadingSizes$1[heading] : {};
2737
2832
  var noLineBreak = isSub || isSup ? {
2738
2833
  display: 'inline'
@@ -2762,14 +2857,14 @@ var TextComponent = function TextComponent(props) {
2762
2857
  */
2763
2858
  var Text = TextComponent;
2764
2859
 
2765
- var _excluded$h = ["children", "styles"];
2860
+ var _excluded$k = ["children", "styles"];
2766
2861
  var HelperText = function HelperText(_ref) {
2767
2862
  var children = _ref.children,
2768
2863
  _ref$styles = _ref.styles,
2769
2864
  styles = _ref$styles === void 0 ? {
2770
2865
  helperText: {}
2771
2866
  } : _ref$styles,
2772
- props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
2867
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
2773
2868
  return React.createElement(Text, Object.assign({
2774
2869
  size: "xs",
2775
2870
  marginVertical: 0,
@@ -2778,7 +2873,7 @@ var HelperText = function HelperText(_ref) {
2778
2873
  }, styles['helperText'], props), children);
2779
2874
  };
2780
2875
 
2781
- var _excluded$i = ["children", "wrap", "justify", "isReversed"];
2876
+ var _excluded$l = ["children", "wrap", "justify", "isReversed"];
2782
2877
  var VerticalView = function VerticalView(_ref) {
2783
2878
  var children = _ref.children,
2784
2879
  _ref$wrap = _ref.wrap,
@@ -2787,7 +2882,7 @@ var VerticalView = function VerticalView(_ref) {
2787
2882
  justify = _ref$justify === void 0 ? 'flex-start' : _ref$justify,
2788
2883
  _ref$isReversed = _ref.isReversed,
2789
2884
  isReversed = _ref$isReversed === void 0 ? false : _ref$isReversed,
2790
- props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
2885
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
2791
2886
  return React.createElement(View$1, Object.assign({
2792
2887
  display: "flex",
2793
2888
  flexWrap: wrap,
@@ -2804,14 +2899,14 @@ var VerticalComponent = function VerticalComponent(props) {
2804
2899
  };
2805
2900
  var Vertical = VerticalComponent;
2806
2901
 
2807
- var _excluded$j = ["children", "helperText", "error", "styles"];
2902
+ var _excluded$m = ["children", "helperText", "error", "styles"];
2808
2903
  var FieldContainer = function FieldContainer(_ref) {
2809
2904
  var children = _ref.children,
2810
2905
  helperText = _ref.helperText,
2811
2906
  _ref$error = _ref.error,
2812
2907
  error = _ref$error === void 0 ? false : _ref$error,
2813
2908
  styles = _ref.styles,
2814
- props = _objectWithoutPropertiesLoose(_ref, _excluded$j);
2909
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
2815
2910
  return React.createElement(Vertical, Object.assign({
2816
2911
  gap: 5,
2817
2912
  position: "relative"
@@ -2870,7 +2965,7 @@ var PaddingWithoutLabel = {
2870
2965
  paddingRight: 36
2871
2966
  };
2872
2967
 
2873
- var _excluded$k = ["label", "shadow", "children", "value", "size", "shape", "variant", "error", "isWithLabel", "isFocused", "isHovered", "isDisabled", "isReadOnly", "colorScheme", "styles"];
2968
+ var _excluded$n = ["label", "shadow", "children", "value", "size", "shape", "variant", "error", "isWithLabel", "isFocused", "isHovered", "isDisabled", "isReadOnly", "colorScheme", "styles"];
2874
2969
  var FieldContent = function FieldContent(_ref) {
2875
2970
  var shadow = _ref.shadow,
2876
2971
  children = _ref.children,
@@ -2898,7 +2993,7 @@ var FieldContent = function FieldContent(_ref) {
2898
2993
  styles = _ref$styles === void 0 ? {
2899
2994
  pickerBox: {}
2900
2995
  } : _ref$styles,
2901
- props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
2996
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
2902
2997
  var isInteractive = (isHovered || isFocused) && !isDisabled;
2903
2998
  var color = error ? 'error' : isInteractive ? colorScheme : 'midgray';
2904
2999
  return React.createElement(Horizontal, Object.assign({
@@ -2919,10 +3014,10 @@ var FieldContent = function FieldContent(_ref) {
2919
3014
  }, isWithLabel ? PadddingWithLabel : PaddingWithoutLabel, shadow, Shapes[shape], InputVariants[variant], styles['box'], props), children);
2920
3015
  };
2921
3016
 
2922
- var _excluded$l = ["children"];
3017
+ var _excluded$o = ["children"];
2923
3018
  var FieldIcons = function FieldIcons(_ref) {
2924
3019
  var children = _ref.children,
2925
- props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
3020
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
2926
3021
  return React.createElement(Center, Object.assign({
2927
3022
  gap: 10,
2928
3023
  right: 16,
@@ -2932,7 +3027,7 @@ var FieldIcons = function FieldIcons(_ref) {
2932
3027
  }, props), children);
2933
3028
  };
2934
3029
 
2935
- var _excluded$m = ["children", "size", "error", "color", "styles"];
3030
+ var _excluded$p = ["children", "size", "error", "color", "styles"];
2936
3031
  var FieldLabel = function FieldLabel(_ref) {
2937
3032
  var children = _ref.children,
2938
3033
  _ref$size = _ref.size,
@@ -2945,7 +3040,7 @@ var FieldLabel = function FieldLabel(_ref) {
2945
3040
  styles = _ref$styles === void 0 ? {
2946
3041
  label: {}
2947
3042
  } : _ref$styles,
2948
- props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
3043
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
2949
3044
  return React.createElement(Label, Object.assign({
2950
3045
  top: 6,
2951
3046
  zIndex: 1000,
@@ -2958,10 +3053,10 @@ var FieldLabel = function FieldLabel(_ref) {
2958
3053
  }, styles['label'], props), children);
2959
3054
  };
2960
3055
 
2961
- var _excluded$n = ["children"];
3056
+ var _excluded$q = ["children"];
2962
3057
  var FieldWrapper = function FieldWrapper(_ref) {
2963
3058
  var children = _ref.children,
2964
- props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
3059
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
2965
3060
  return React.createElement(Vertical, Object.assign({
2966
3061
  width: "100%"
2967
3062
  }, props), children);
@@ -2975,7 +3070,7 @@ var IconSizes$3 = {
2975
3070
  xl: 16
2976
3071
  };
2977
3072
 
2978
- var _excluded$o = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isHovered", "isFocused", "isAutoFocus", "isDisabled", "isReadOnly", "shadow", "newOptions", "size", "variant", "shape", "colorScheme", "onChange", "onBlur", "setHide", "setNewOptions", "setIsHovered", "setIsFocused", "setValue", "styles"];
3073
+ var _excluded$r = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isHovered", "isFocused", "isAutoFocus", "isDisabled", "isReadOnly", "shadow", "newOptions", "size", "variant", "shape", "colorScheme", "onChange", "onBlur", "setHide", "setNewOptions", "setIsHovered", "setIsFocused", "setValue", "styles"];
2979
3074
  var CountryList = function CountryList(props) {
2980
3075
  return React.createElement(Element, Object.assign({
2981
3076
  as: "ul"
@@ -3115,7 +3210,7 @@ var CountryPickerView = function CountryPickerView(_ref3) {
3115
3210
  helperText: {},
3116
3211
  box: {}
3117
3212
  } : _ref3$styles,
3118
- props = _objectWithoutPropertiesLoose(_ref3, _excluded$o);
3213
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded$r);
3119
3214
  var _useTheme = useTheme(),
3120
3215
  getColor = _useTheme.getColor;
3121
3216
  var IconColor = getColor('color.blueGray.700');
@@ -3253,7 +3348,7 @@ var useDatePickerState = function useDatePickerState() {
3253
3348
  };
3254
3349
  };
3255
3350
 
3256
- var _excluded$p = ["id", "icon", "name", "label", "date", "children", "helperText", "shadow", "size", "variant", "shape", "colorScheme", "styles", "error", "isHovered", "isFocused", "isDisabled", "isReadOnly", "setDate", "setIsFocused", "setIsHovered", "onChange", "onChangeText"];
3351
+ var _excluded$s = ["id", "icon", "name", "label", "date", "children", "helperText", "shadow", "size", "variant", "shape", "colorScheme", "styles", "error", "isHovered", "isFocused", "isDisabled", "isReadOnly", "setDate", "setIsFocused", "setIsHovered", "onChange", "onChangeText"];
3257
3352
  var DatePickerContent = function DatePickerContent(props) {
3258
3353
  return React.createElement(Input, Object.assign({
3259
3354
  type: "date"
@@ -3301,7 +3396,7 @@ var DatePickerView = function DatePickerView(_ref) {
3301
3396
  setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
3302
3397
  onChange = _ref.onChange,
3303
3398
  onChangeText = _ref.onChangeText,
3304
- props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
3399
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
3305
3400
  var isWithLabel = !!(isFocused && label);
3306
3401
  var handleHover = function handleHover() {
3307
3402
  return setIsHovered(!isHovered);
@@ -3426,7 +3521,7 @@ var usePasswordState = function usePasswordState(props) {
3426
3521
  }, props, textFieldStates);
3427
3522
  };
3428
3523
 
3429
- var _excluded$q = ["id", "name", "label", "hint", "value", "onChange", "leftChild", "rightChild", "helperText", "placeholder", "onChangeText", "shadow", "styles", "size", "shape", "variant", "colorScheme", "error", "isFocused", "isHovered", "isDisabled", "isReadOnly", "isClearable", "isAutoFocus", "setHint", "setIsFocused", "setIsHovered", "setValue", "onClick", "onFocus", "onBlur"];
3524
+ var _excluded$t = ["id", "name", "label", "hint", "value", "onChange", "leftChild", "rightChild", "helperText", "placeholder", "onChangeText", "shadow", "styles", "size", "shape", "variant", "colorScheme", "error", "isFocused", "isHovered", "isDisabled", "isReadOnly", "isClearable", "isAutoFocus", "setHint", "setIsFocused", "setIsHovered", "setValue", "onClick", "onFocus", "onBlur"];
3430
3525
  var TextFieldInput = function TextFieldInput(props) {
3431
3526
  return React.createElement(Input, Object.assign({
3432
3527
  type: "text"
@@ -3484,7 +3579,7 @@ var TextFieldView = function TextFieldView(_ref) {
3484
3579
  onFocus = _ref.onFocus,
3485
3580
  _ref$onBlur = _ref.onBlur,
3486
3581
  onBlur = _ref$onBlur === void 0 ? function () {} : _ref$onBlur,
3487
- props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
3582
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
3488
3583
  var _useTheme = useTheme(),
3489
3584
  getColor = _useTheme.getColor;
3490
3585
  var IconColor = getColor('color.blueGray.700');
@@ -3592,7 +3687,7 @@ var TextFieldView = function TextFieldView(_ref) {
3592
3687
  }), rightChild && React.createElement(React.Fragment, null, rightChild))));
3593
3688
  };
3594
3689
 
3595
- var _excluded$r = ["visibleIcon", "hiddenIcon"],
3690
+ var _excluded$u = ["visibleIcon", "hiddenIcon"],
3596
3691
  _excluded2$1 = ["isVisible", "setIsVisible"];
3597
3692
  var PasswordComponent = function PasswordComponent(_ref) {
3598
3693
  var _ref$visibleIcon = _ref.visibleIcon,
@@ -3603,7 +3698,7 @@ var PasswordComponent = function PasswordComponent(_ref) {
3603
3698
  hiddenIcon = _ref$hiddenIcon === void 0 ? React.createElement(CloseEyeSvg, {
3604
3699
  size: 14
3605
3700
  }) : _ref$hiddenIcon,
3606
- props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
3701
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
3607
3702
  var _usePasswordState = usePasswordState(props),
3608
3703
  isVisible = _usePasswordState.isVisible,
3609
3704
  setIsVisible = _usePasswordState.setIsVisible,
@@ -3671,7 +3766,7 @@ var IconSizes$4 = {
3671
3766
  xl: 16
3672
3767
  };
3673
3768
 
3674
- var _excluded$s = ["isHovered", "setIsHovered", "option", "size", "callback"],
3769
+ var _excluded$v = ["isHovered", "setIsHovered", "option", "size", "callback"],
3675
3770
  _excluded2$2 = ["id", "name", "value", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
3676
3771
  _excluded3$1 = ["option", "size", "removeOption"],
3677
3772
  _excluded4$1 = ["id", "name", "label", "value", "placeholder", "helperText", "hide", "error", "isMulti", "isFocused", "isHovered", "isDisabled", "isReadOnly", "options", "shadow", "size", "colorScheme", "shape", "variant", "styles", "onChange", "setHide", "setValue", "setIsHovered", "setIsFocused"];
@@ -3683,13 +3778,14 @@ var Item = function Item(_ref) {
3683
3778
  size = _ref$size === void 0 ? 'md' : _ref$size,
3684
3779
  _ref$callback = _ref.callback,
3685
3780
  callback = _ref$callback === void 0 ? function () {} : _ref$callback,
3686
- props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
3781
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
3687
3782
  var handleOptionClick = function handleOptionClick(option) {
3688
3783
  return callback(option);
3689
3784
  };
3690
3785
  var handleHover = function handleHover() {
3691
3786
  return setIsHovered(!isHovered);
3692
3787
  };
3788
+ console.log(props.name);
3693
3789
  return React.createElement(Element, Object.assign({
3694
3790
  as: "li",
3695
3791
  margin: 0,
@@ -4154,7 +4250,7 @@ var SliderPadding = {
4154
4250
  }
4155
4251
  };
4156
4252
 
4157
- var _excluded$t = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "onChange", "setValue", "setIsHovered", "styles"];
4253
+ var _excluded$w = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "onChange", "setValue", "setIsHovered", "styles"];
4158
4254
  var SwitchContent = function SwitchContent(props) {
4159
4255
  return React.createElement(Input, Object.assign({
4160
4256
  type: "checkbox"
@@ -4193,7 +4289,7 @@ var SwitchView = function SwitchView(_ref) {
4193
4289
  circle: {},
4194
4290
  label: {}
4195
4291
  } : _ref$styles,
4196
- props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
4292
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
4197
4293
  var handleToggle = function handleToggle(event) {
4198
4294
  if (!isReadOnly) {
4199
4295
  setValue(!value);
@@ -4279,7 +4375,7 @@ var useTextAreaState = function useTextAreaState(_ref) {
4279
4375
  };
4280
4376
  };
4281
4377
 
4282
- var _excluded$u = ["id", "name", "hint", "error", "value", "label", "shadow", "helperText", "placeholder", "size", "shape", "variant", "colorScheme", "isHovered", "isFocused", "isEditable", "isReadOnly", "isDisabled", "isAutoFocus", "isMultiline", "maxRows", "maxCols", "onBlur", "onChange", "onFocus", "onChangeText", "setHint", "setValue", "setIsFocused", "setIsHovered", "styles"];
4378
+ var _excluded$x = ["id", "name", "hint", "error", "value", "label", "shadow", "helperText", "placeholder", "size", "shape", "variant", "colorScheme", "isHovered", "isFocused", "isEditable", "isReadOnly", "isDisabled", "isAutoFocus", "isMultiline", "maxRows", "maxCols", "onBlur", "onChange", "onFocus", "onChangeText", "setHint", "setValue", "setIsFocused", "setIsHovered", "styles"];
4283
4379
  var TextAreaView = function TextAreaView(_ref) {
4284
4380
  var id = _ref.id,
4285
4381
  name = _ref.name,
@@ -4334,7 +4430,7 @@ var TextAreaView = function TextAreaView(_ref) {
4334
4430
  helperText: {},
4335
4431
  field: {}
4336
4432
  } : _ref$styles,
4337
- props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
4433
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
4338
4434
  var isWithLabel = !!(isFocused && label);
4339
4435
  var fieldStyles = _extends({
4340
4436
  margin: 0,
@@ -4502,7 +4598,7 @@ var FormikForm = function FormikForm(_ref) {
4502
4598
  }, React.createElement(Form, null, children));
4503
4599
  };
4504
4600
 
4505
- var _excluded$v = ["name", "type"];
4601
+ var _excluded$y = ["name", "type"];
4506
4602
  var getInputTypeProps = function getInputTypeProps(type) {
4507
4603
  switch (type) {
4508
4604
  case 'email':
@@ -4532,7 +4628,7 @@ var getInputTypeProps = function getInputTypeProps(type) {
4532
4628
  var useFormikInput = function useFormikInput(_ref) {
4533
4629
  var name = _ref.name,
4534
4630
  type = _ref.type,
4535
- props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
4631
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
4536
4632
  var focus = useFormFocus();
4537
4633
  var _useFormikContext = useFormikContext(),
4538
4634
  touched = _useFormikContext.touched,
@@ -4579,11 +4675,11 @@ var useFormikInput = function useFormikInput(_ref) {
4579
4675
  // import FormRater from 'src/Rate/Rate';
4580
4676
  // import Upload from 'src/Upload/Upload';
4581
4677
 
4582
- var _excluded$w = ["value"];
4678
+ var _excluded$z = ["value"];
4583
4679
  var CheckboxComponent$1 = function CheckboxComponent(props) {
4584
4680
  var _useFormikInput = useFormikInput(props),
4585
4681
  value = _useFormikInput.value,
4586
- formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$w);
4682
+ formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$z);
4587
4683
  formProps.isChecked = value;
4588
4684
  var checkboxStates = useCheckboxState(props);
4589
4685
  return React.createElement(CheckboxView, Object.assign({}, checkboxStates, formProps));
@@ -4641,11 +4737,11 @@ var TextAreaComponent$1 = function TextAreaComponent(props) {
4641
4737
  */
4642
4738
  var FormikTextArea = TextAreaComponent$1;
4643
4739
 
4644
- var _excluded$x = ["value"];
4740
+ var _excluded$A = ["value"];
4645
4741
  var TextFieldComponent$1 = function TextFieldComponent(props) {
4646
4742
  var formProps = useFormikInput(props);
4647
4743
  var _useTextFieldState = useTextFieldState(props),
4648
- textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$x);
4744
+ textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$A);
4649
4745
  return React.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
4650
4746
  };
4651
4747
  /**
@@ -4653,7 +4749,7 @@ var TextFieldComponent$1 = function TextFieldComponent(props) {
4653
4749
  */
4654
4750
  var FormikTextField = TextFieldComponent$1;
4655
4751
 
4656
- var _excluded$y = ["visibleIcon", "hiddenIcon"],
4752
+ var _excluded$B = ["visibleIcon", "hiddenIcon"],
4657
4753
  _excluded2$3 = ["isVisible", "setIsVisible"];
4658
4754
  var PasswordComponent$1 = function PasswordComponent(_ref) {
4659
4755
  var _ref$visibleIcon = _ref.visibleIcon,
@@ -4664,7 +4760,7 @@ var PasswordComponent$1 = function PasswordComponent(_ref) {
4664
4760
  hiddenIcon = _ref$hiddenIcon === void 0 ? React.createElement(CloseEyeSvg, {
4665
4761
  size: 14
4666
4762
  }) : _ref$hiddenIcon,
4667
- props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
4763
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
4668
4764
  var formProps = useFormikInput(props);
4669
4765
  var _usePasswordState = usePasswordState(formProps),
4670
4766
  isVisible = _usePasswordState.isVisible,
@@ -4687,6 +4783,271 @@ var PasswordComponent$1 = function PasswordComponent(_ref) {
4687
4783
  */
4688
4784
  var FormikPassword = PasswordComponent$1;
4689
4785
 
4786
+ // Import the necessary types
4787
+ // Define the useComboBoxState hook properly with types
4788
+ var useComboBoxState = function useComboBoxState(items, placeholder, searchPlaceholder) {
4789
+ var _useState = useState(items),
4790
+ filteredItems = _useState[0],
4791
+ setFilteredItems = _useState[1];
4792
+ var _useState2 = useState(placeholder ? {
4793
+ value: placeholder,
4794
+ label: placeholder
4795
+ } : items[0]),
4796
+ selectedItem = _useState2[0],
4797
+ setSelectedItem = _useState2[1];
4798
+ var _useState3 = useState(0),
4799
+ highlightedIndex = _useState3[0],
4800
+ setHighlightedIndex = _useState3[1];
4801
+ var _useState4 = useState(searchPlaceholder != null ? searchPlaceholder : ''),
4802
+ searchQuery = _useState4[0],
4803
+ setSearchQuery = _useState4[1];
4804
+ var _useState5 = useState(false),
4805
+ isDropdownVisible = _useState5[0],
4806
+ setIsDropdownVisible = _useState5[1];
4807
+ return {
4808
+ filteredItems: filteredItems,
4809
+ setFilteredItems: setFilteredItems,
4810
+ selectedItem: selectedItem,
4811
+ setSelectedItem: setSelectedItem,
4812
+ highlightedIndex: highlightedIndex,
4813
+ setHighlightedIndex: setHighlightedIndex,
4814
+ searchQuery: searchQuery,
4815
+ setSearchQuery: setSearchQuery,
4816
+ isDropdownVisible: isDropdownVisible,
4817
+ setIsDropdownVisible: setIsDropdownVisible
4818
+ };
4819
+ };
4820
+
4821
+ var _excluded$C = ["size", "color"];
4822
+ var TickSvg = function TickSvg(_ref) {
4823
+ var _ref$size = _ref.size,
4824
+ size = _ref$size === void 0 ? 16 : _ref$size,
4825
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
4826
+ return React.createElement(Center, {
4827
+ width: size + "px",
4828
+ height: size + "px"
4829
+ }, React.createElement("svg", Object.assign({
4830
+ width: size + "px",
4831
+ height: size + "px",
4832
+ viewBox: "0 -0.5 25 25",
4833
+ fill: "none",
4834
+ xmlns: "http://www.w3.org/2000/svg"
4835
+ }, props), React.createElement("g", {
4836
+ id: "SVGRepo_bgCarrier",
4837
+ strokeWidth: "0"
4838
+ }), React.createElement("g", {
4839
+ id: "SVGRepo_tracerCarrier",
4840
+ strokeLinecap: "round",
4841
+ strokeLinejoin: "round"
4842
+ }), React.createElement("g", {
4843
+ id: "SVGRepo_iconCarrier"
4844
+ }, ' ', React.createElement("path", {
4845
+ d: "M5.5 12.5L10.167 17L19.5 8",
4846
+ stroke: "#444444",
4847
+ strokeWidth: "1.5",
4848
+ strokeLinecap: "round",
4849
+ strokeLinejoin: "round"
4850
+ }), ' ')));
4851
+ };
4852
+
4853
+ var _excluded$D = ["size", "color"];
4854
+ var SearchLoopSvg = function SearchLoopSvg(_ref) {
4855
+ var _ref$size = _ref.size,
4856
+ size = _ref$size === void 0 ? 14 : _ref$size,
4857
+ _ref$color = _ref.color,
4858
+ color = _ref$color === void 0 ? '#c0c0c0' : _ref$color,
4859
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
4860
+ return React.createElement(Center, {
4861
+ width: size + "px",
4862
+ height: size + "px"
4863
+ }, React.createElement("svg", Object.assign({
4864
+ fill: "#c0c0c0",
4865
+ width: size + "px",
4866
+ height: size + "px",
4867
+ version: "1.1",
4868
+ id: "Capa_1",
4869
+ xmlns: "http://www.w3.org/2000/svg",
4870
+ viewBox: "0 0 488.4 488.4",
4871
+ stroke: color
4872
+ }, props), React.createElement("g", {
4873
+ id: "SVGRepo_bgCarrier",
4874
+ strokeWidth: "9.279599999999999"
4875
+ }), React.createElement("g", {
4876
+ id: "SVGRepo_tracerCarrier",
4877
+ strokeLinecap: "round",
4878
+ strokeLinejoin: "round"
4879
+ }), React.createElement("g", {
4880
+ id: "SVGRepo_iconCarrier"
4881
+ }, React.createElement("g", null, React.createElement("g", null, React.createElement("path", {
4882
+ d: "M0,203.25c0,112.1,91.2,203.2,203.2,203.2c51.6,0,98.8-19.4,134.7-51.2l129.5,129.5c2.4,2.4,5.5,3.6,8.7,3.6 s6.3-1.2,8.7-3.6c4.8-4.8,4.8-12.5,0-17.3l-129.6-129.5c31.8-35.9,51.2-83,51.2-134.7c0-112.1-91.2-203.2-203.2-203.2 S0,91.15,0,203.25z M381.9,203.25c0,98.5-80.2,178.7-178.7,178.7s-178.7-80.2-178.7-178.7s80.2-178.7,178.7-178.7 S381.9,104.65,381.9,203.25z"
4883
+ }), ' ')))));
4884
+ };
4885
+
4886
+ var _excluded$E = ["placeholder", "items", "showTick", "onSelect", "searchEnabled", "left", "right", "label", "filteredItems", "setSelectedItem", "selectedItem", "highlightedIndex", "setHighlightedIndex", "searchQuery", "setSearchQuery", "setFilteredItems", "styles", "isDropdownVisible", "setIsDropdownVisible"];
4887
+ var ComboBoxView = function ComboBoxView(_ref) {
4888
+ var placeholder = _ref.placeholder,
4889
+ items = _ref.items,
4890
+ _ref$showTick = _ref.showTick,
4891
+ showTick = _ref$showTick === void 0 ? true : _ref$showTick,
4892
+ onSelect = _ref.onSelect,
4893
+ _ref$searchEnabled = _ref.searchEnabled,
4894
+ searchEnabled = _ref$searchEnabled === void 0 ? true : _ref$searchEnabled,
4895
+ left = _ref.left,
4896
+ right = _ref.right,
4897
+ label = _ref.label,
4898
+ filteredItems = _ref.filteredItems,
4899
+ setSelectedItem = _ref.setSelectedItem,
4900
+ selectedItem = _ref.selectedItem,
4901
+ highlightedIndex = _ref.highlightedIndex,
4902
+ setHighlightedIndex = _ref.setHighlightedIndex,
4903
+ searchQuery = _ref.searchQuery,
4904
+ setSearchQuery = _ref.setSearchQuery,
4905
+ setFilteredItems = _ref.setFilteredItems,
4906
+ styles = _ref.styles,
4907
+ isDropdownVisible = _ref.isDropdownVisible,
4908
+ setIsDropdownVisible = _ref.setIsDropdownVisible,
4909
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$E);
4910
+ useEffect(function () {
4911
+ var handleClickOutside = function handleClickOutside(event) {
4912
+ var path = event.composedPath();
4913
+ var isOutside = !path.some(function (element) {
4914
+ return (element == null ? void 0 : element.id) === 'combobox-dropdown';
4915
+ });
4916
+ if (isOutside) {
4917
+ setIsDropdownVisible(false);
4918
+ }
4919
+ };
4920
+ document.addEventListener('mousedown', handleClickOutside);
4921
+ return function () {
4922
+ return document.removeEventListener('mousedown', handleClickOutside);
4923
+ };
4924
+ }, []);
4925
+ var handleSearch = function handleSearch(query) {
4926
+ setSearchQuery(query);
4927
+ if (query === '') {
4928
+ setFilteredItems(items);
4929
+ } else {
4930
+ var filtered = items.filter(function (item) {
4931
+ return item.label.toLowerCase().includes(query.toLowerCase());
4932
+ });
4933
+ setFilteredItems(filtered);
4934
+ }
4935
+ setHighlightedIndex(0);
4936
+ };
4937
+ var handleSelect = function handleSelect(item) {
4938
+ setSelectedItem(item);
4939
+ onSelect == null || onSelect(item);
4940
+ setIsDropdownVisible(false);
4941
+ };
4942
+ return React.createElement(Horizontal, Object.assign({
4943
+ role: "combobox",
4944
+ wrap: "nowrap",
4945
+ gap: 15,
4946
+ alignItems: "center",
4947
+ width: "100%"
4948
+ }, props), label && React.createElement(Text, {
4949
+ styles: styles == null ? void 0 : styles.label,
4950
+ htmlFor: props.id
4951
+ }, label), React.createElement(View, {
4952
+ position: "relative"
4953
+ }, React.createElement(Horizontal, Object.assign({
4954
+ cursor: "pointer",
4955
+ backgroundColor: "white",
4956
+ boxShadow: "rgba(0, 0, 0, 0.16) 0px 1px 4px",
4957
+ padding: "12px",
4958
+ display: "flex",
4959
+ alignItems: "center",
4960
+ borderRadius: "4px",
4961
+ justify: "space-between",
4962
+ minWidth: 300,
4963
+ wrap: "nowrap"
4964
+ }, styles == null ? void 0 : styles.container), React.createElement(Horizontal, Object.assign({
4965
+ gap: 15,
4966
+ alignItems: "center",
4967
+ position: "relative",
4968
+ width: "100%",
4969
+ onClick: function onClick() {
4970
+ return setIsDropdownVisible(!isDropdownVisible);
4971
+ }
4972
+ }, styles == null ? void 0 : styles.labelContainer), left, React.createElement(Text, Object.assign({
4973
+ weight: "medium",
4974
+ flexGrow: 1
4975
+ }, styles == null ? void 0 : styles.label), selectedItem.label)), right, isDropdownVisible && React.createElement(View, Object.assign({
4976
+ id: "combobox-dropdown",
4977
+ position: "absolute",
4978
+ backgroundColor: "white",
4979
+ boxShadow: "rgba(0, 0 ,0 ,0.16) 0px 1px 4px",
4980
+ width: "100%",
4981
+ overflowY: "auto",
4982
+ zIndex: 10000,
4983
+ bottom: -8,
4984
+ left: 0,
4985
+ transform: "translateY(100%)",
4986
+ marginTop: "4px",
4987
+ borderRadius: "4px"
4988
+ }, styles == null ? void 0 : styles.dropdown), searchEnabled && React.createElement(TextFieldView, {
4989
+ id: props.id,
4990
+ name: props.name,
4991
+ width: "100%",
4992
+ type: "search",
4993
+ value: searchQuery,
4994
+ onChange: function onChange(value) {
4995
+ return handleSearch(value);
4996
+ },
4997
+ hint: placeholder,
4998
+ isClearable: false,
4999
+ leftChild: React.createElement(SearchLoopSvg, {
5000
+ size: 12
5001
+ }),
5002
+ styles: {
5003
+ box: _extends({
5004
+ width: '100%',
5005
+ padding: '6px 12px',
5006
+ borderBottom: filteredItems.length > 0 ? '1px solid #ccc' : '1px solid transparent'
5007
+ }, styles == null ? void 0 : styles.text)
5008
+ }
5009
+ }), filteredItems.length > 0 && React.createElement(View, {
5010
+ margin: 0,
5011
+ padding: 4
5012
+ }, filteredItems.map(function (item, index) {
5013
+ return React.createElement(Horizontal, Object.assign({
5014
+ justify: "space-between",
5015
+ key: item.value,
5016
+ padding: "12px",
5017
+ cursor: "pointer",
5018
+ borderRadius: 4,
5019
+ backgroundColor: index === highlightedIndex ? 'color.gray.100' : 'transparent',
5020
+ onMouseEnter: function onMouseEnter() {
5021
+ return setHighlightedIndex(index);
5022
+ },
5023
+ onClick: function onClick() {
5024
+ return handleSelect(item);
5025
+ }
5026
+ }, styles == null ? void 0 : styles.item), React.createElement(Text, null, item.label), React.createElement(React.Fragment, null, item.icon && item.icon, item.value === selectedItem.value && showTick && !item.icon && React.createElement(TickSvg, null)));
5027
+ }))))));
5028
+ };
5029
+
5030
+ var _excluded$F = ["items", "placeholder", "searchPlaceholder"];
5031
+ var ComboBoxComponent = function ComboBoxComponent(_ref) {
5032
+ var items = _ref.items,
5033
+ placeholder = _ref.placeholder,
5034
+ searchPlaceholder = _ref.searchPlaceholder,
5035
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
5036
+ var formProps = useFormikInput(props);
5037
+ var ComboBoxStates = useComboBoxState(items, placeholder, searchPlaceholder);
5038
+ // Ensure the onChange function from formProps is being called when an item is selected
5039
+ var handleSelect = function handleSelect(item) {
5040
+ formProps.onChange(item);
5041
+ };
5042
+ return React.createElement(ComboBoxView, Object.assign({}, ComboBoxStates, formProps, {
5043
+ onSelect: handleSelect
5044
+ }));
5045
+ };
5046
+ /**
5047
+ * ComboBox allows users to select one or more options from a list of choices.
5048
+ */
5049
+ var FormikComboBox = ComboBoxComponent;
5050
+
4690
5051
  var useModalStore = /*#__PURE__*/create(function (set) {
4691
5052
  return {
4692
5053
  modal: false,
@@ -4772,7 +5133,7 @@ var HeaderIconSizes = {
4772
5133
  xl: 28
4773
5134
  };
4774
5135
 
4775
- var _excluded$z = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position"],
5136
+ var _excluded$G = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position"],
4776
5137
  _excluded2$4 = ["children", "shadow", "isFullScreen", "shape"],
4777
5138
  _excluded3$2 = ["children", "buttonColor", "iconSize", "buttonPosition"],
4778
5139
  _excluded4$2 = ["children"],
@@ -4788,7 +5149,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
4788
5149
  onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
4789
5150
  _ref$position = _ref.position,
4790
5151
  position = _ref$position === void 0 ? 'center' : _ref$position,
4791
- props = _objectWithoutPropertiesLoose(_ref, _excluded$z);
5152
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$G);
4792
5153
  var handleClick = function handleClick() {
4793
5154
  if (!isClosePrevented) onClose();
4794
5155
  };
@@ -4944,12 +5305,12 @@ Modal.Body = ModalBody;
4944
5305
  Modal.Footer = ModalFooter;
4945
5306
  Modal.Layout = ModalLayout;
4946
5307
 
4947
- var _excluded$A = ["src", "color"],
5308
+ var _excluded$H = ["src", "color"],
4948
5309
  _excluded2$5 = ["path"];
4949
5310
  var FileSVG = function FileSVG(_ref) {
4950
5311
  var src = _ref.src,
4951
5312
  color = _ref.color,
4952
- props = _objectWithoutPropertiesLoose(_ref, _excluded$A);
5313
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
4953
5314
  var _useTheme = useTheme(),
4954
5315
  getColor = _useTheme.getColor;
4955
5316
  var Colorprops = color ? {
@@ -5150,12 +5511,12 @@ var AlertComponent = function AlertComponent(_ref) {
5150
5511
  };
5151
5512
  var Alert = AlertComponent;
5152
5513
 
5153
- var _excluded$B = ["ratio", "children"];
5514
+ var _excluded$I = ["ratio", "children"];
5154
5515
  var AspectRatioView = function AspectRatioView(_ref) {
5155
5516
  var _ref$ratio = _ref.ratio,
5156
5517
  ratio = _ref$ratio === void 0 ? 16 / 9 : _ref$ratio,
5157
5518
  children = _ref.children,
5158
- props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
5519
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
5159
5520
  return React.createElement(Center, Object.assign({
5160
5521
  width: '100%',
5161
5522
  position: "relative",
@@ -5171,11 +5532,11 @@ var AspectRatioView = function AspectRatioView(_ref) {
5171
5532
  }, children));
5172
5533
  };
5173
5534
 
5174
- var _excluded$C = ["ratio", "children"];
5535
+ var _excluded$J = ["ratio", "children"];
5175
5536
  var AspectRatioComponent = function AspectRatioComponent(_ref) {
5176
5537
  var ratio = _ref.ratio,
5177
5538
  children = _ref.children,
5178
- props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
5539
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$J);
5179
5540
  return React.createElement(AspectRatioView, Object.assign({
5180
5541
  ratio: ratio
5181
5542
  }, props), children);
@@ -5288,7 +5649,6 @@ var BadgeShapes = {
5288
5649
  rounded: 4,
5289
5650
  pillShaped: 24
5290
5651
  };
5291
- // Example of how you might adjust styles based on the 'position' prop
5292
5652
  var PositionStyles = {
5293
5653
  'top-right': {
5294
5654
  top: 0,
@@ -5407,7 +5767,7 @@ var ToggleShapes = {
5407
5767
  pillShaped: 24
5408
5768
  };
5409
5769
 
5410
- var _excluded$D = ["children", "shape", "colorScheme", "variant", "isHovered", "setIsHovered", "isDisabled", "isToggle", "setIsToggled", "onToggle"];
5770
+ var _excluded$K = ["children", "shape", "colorScheme", "variant", "isHovered", "setIsHovered", "isDisabled", "isToggle", "setIsToggled", "onToggle"];
5411
5771
  var ToggleView = function ToggleView(_ref) {
5412
5772
  var children = _ref.children,
5413
5773
  _ref$shape = _ref.shape,
@@ -5422,7 +5782,7 @@ var ToggleView = function ToggleView(_ref) {
5422
5782
  isToggle = _ref.isToggle,
5423
5783
  setIsToggled = _ref.setIsToggled,
5424
5784
  onToggle = _ref.onToggle,
5425
- props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
5785
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$K);
5426
5786
  var toggleColor = !isDisabled ? colorScheme : 'theme.disabled';
5427
5787
  var isActive = !!(isToggle || isHovered);
5428
5788
  var ToggleVariants = {
@@ -5470,7 +5830,7 @@ var ToggleView = function ToggleView(_ref) {
5470
5830
  }, ToggleVariants[variant], props), children);
5471
5831
  };
5472
5832
 
5473
- var _excluded$E = ["children", "shape", "colorScheme", "variant", "isDisabled", "isToggled", "onToggle"];
5833
+ var _excluded$L = ["children", "shape", "colorScheme", "variant", "isDisabled", "isToggled", "onToggle"];
5474
5834
  var ToggleComponent = function ToggleComponent(_ref) {
5475
5835
  var children = _ref.children,
5476
5836
  shape = _ref.shape,
@@ -5480,7 +5840,7 @@ var ToggleComponent = function ToggleComponent(_ref) {
5480
5840
  _ref$isToggled = _ref.isToggled,
5481
5841
  isToggled = _ref$isToggled === void 0 ? false : _ref$isToggled,
5482
5842
  onToggle = _ref.onToggle,
5483
- props = _objectWithoutPropertiesLoose(_ref, _excluded$E);
5843
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$L);
5484
5844
  var _useToggleState = useToggleState(isToggled),
5485
5845
  isHovered = _useToggleState.isHovered,
5486
5846
  setIsHovered = _useToggleState.setIsHovered,
@@ -5582,5 +5942,286 @@ var ToggleGroupComponent = function ToggleGroupComponent(_ref) {
5582
5942
  };
5583
5943
  var ToggleGroup = ToggleGroupComponent;
5584
5944
 
5585
- export { Alert, AspectRatio, Avatar, Badge, Bottom, Button, Center, Checkbox, CountryPicker, DatePicker, FileImage, FileSVG, FormikCheckbox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikPassword, FormikSelect, FormikSwitch, FormikTextArea, FormikTextField, Horizontal, Inline, Left, Link, Loader, Modal, Password, Right, Select, Switch, Tabs, Text, TextArea, TextField, Toggle, ToggleGroup, Top, Vertical, View, hideModal, showModal, useModalStore };
5945
+ // Create your store with the initial state and actions.
5946
+ var useMessageStore = /*#__PURE__*/create(function (set) {
5947
+ return {
5948
+ // initial state
5949
+ visible: false,
5950
+ title: '',
5951
+ subtitle: '',
5952
+ variant: 'info',
5953
+ isClosable: false,
5954
+ styles: {},
5955
+ action: function action() {},
5956
+ actionText: '',
5957
+ showIcon: false,
5958
+ timeout: 3000,
5959
+ show: function show(variant, title, subtitle, isClosable, styles, action, actionText, showIcon, timeout) {
5960
+ if (title === void 0) {
5961
+ title = '';
5962
+ }
5963
+ if (subtitle === void 0) {
5964
+ subtitle = '';
5965
+ }
5966
+ return set({
5967
+ visible: true,
5968
+ variant: variant,
5969
+ title: title,
5970
+ subtitle: subtitle,
5971
+ isClosable: isClosable,
5972
+ styles: styles,
5973
+ action: action,
5974
+ actionText: actionText,
5975
+ showIcon: showIcon,
5976
+ timeout: timeout
5977
+ });
5978
+ },
5979
+ hide: function hide() {
5980
+ return set({
5981
+ visible: false
5982
+ });
5983
+ }
5984
+ };
5985
+ });
5986
+ var showMessage = function showMessage(variant, title, subtitle, props) {
5987
+ useMessageStore.getState().show(variant, title, subtitle, props == null ? void 0 : props.isClosable, props == null ? void 0 : props.styles, props == null ? void 0 : props.action, props == null ? void 0 : props.actionText, props == null ? void 0 : props.showIcon, props == null ? void 0 : props.timeout);
5988
+ };
5989
+ var hideMessage = function hideMessage() {
5990
+ useMessageStore.getState().hide();
5991
+ };
5992
+
5993
+ var Themes$1 = {
5994
+ info: {
5995
+ container: {
5996
+ backgroundColor: 'color.blue.200',
5997
+ border: 'color.blue.400'
5998
+ },
5999
+ icon: {
6000
+ color: 'color.blue.500',
6001
+ name: 'InformationSvg'
6002
+ },
6003
+ content: {
6004
+ color: 'color.blue.500'
6005
+ },
6006
+ close: {
6007
+ color: 'color.blue.500',
6008
+ name: 'CloseSvg'
6009
+ }
6010
+ },
6011
+ success: {
6012
+ container: {
6013
+ backgroundColor: 'color.green.200',
6014
+ border: 'color.green.400'
6015
+ },
6016
+ icon: {
6017
+ color: 'color.green.500',
6018
+ name: 'CheckCircleSvg'
6019
+ },
6020
+ content: {
6021
+ color: 'color.green.500'
6022
+ },
6023
+ close: {
6024
+ color: 'color.green.500',
6025
+ name: 'CloseSvg'
6026
+ }
6027
+ },
6028
+ error: {
6029
+ container: {
6030
+ backgroundColor: 'color.red.200',
6031
+ border: 'color.red.400'
6032
+ },
6033
+ icon: {
6034
+ color: 'color.red.500',
6035
+ name: 'ErrrorSvg'
6036
+ },
6037
+ content: {
6038
+ color: 'color.red.500'
6039
+ },
6040
+ close: {
6041
+ color: 'color.red.500',
6042
+ name: 'CloseSvg'
6043
+ }
6044
+ },
6045
+ warning: {
6046
+ container: {
6047
+ backgroundColor: 'color.orange.200',
6048
+ border: 'color.orange.400'
6049
+ },
6050
+ icon: {
6051
+ color: 'color.orange.500',
6052
+ name: 'ErrrorSvg'
6053
+ },
6054
+ content: {
6055
+ color: 'color.orange.500'
6056
+ },
6057
+ close: {
6058
+ color: 'color.orange.500',
6059
+ name: 'CloseSvg'
6060
+ }
6061
+ }
6062
+ };
6063
+
6064
+ var MessageView = function MessageView(_ref) {
6065
+ var _styles$closingIcon, _styles$closingIcon2;
6066
+ var variant = _ref.variant,
6067
+ hide = _ref.hide,
6068
+ title = _ref.title,
6069
+ subtitle = _ref.subtitle,
6070
+ theme = _ref.theme,
6071
+ action = _ref.action,
6072
+ actionText = _ref.actionText,
6073
+ _ref$showIcon = _ref.showIcon,
6074
+ showIcon = _ref$showIcon === void 0 ? false : _ref$showIcon,
6075
+ _ref$isClosable = _ref.isClosable,
6076
+ isClosable = _ref$isClosable === void 0 ? false : _ref$isClosable,
6077
+ _ref$timeout = _ref.timeout,
6078
+ timeout = _ref$timeout === void 0 ? 3000 : _ref$timeout,
6079
+ styles = _ref.styles;
6080
+ useEffect(function () {
6081
+ if (timeout && !isClosable) {
6082
+ var timeId = setTimeout(function () {
6083
+ // After 3 seconds set the show value to false
6084
+ hide();
6085
+ }, timeout);
6086
+ return function () {
6087
+ clearTimeout(timeId);
6088
+ };
6089
+ }
6090
+ return;
6091
+ }, []);
6092
+ var Theme = theme != null ? theme : Themes$1;
6093
+ var isWithAction = !!(action && actionText);
6094
+ var containerStyle = {
6095
+ borderWidth: 1,
6096
+ borderStyle: 'solid',
6097
+ borderRadius: 8,
6098
+ borderColor: "" + Theme[variant].container.border
6099
+ };
6100
+ var iconColor = {
6101
+ info: '#3b82f6',
6102
+ success: '#4ade80',
6103
+ warning: '#f97316',
6104
+ error: '#ef4444'
6105
+ }[variant];
6106
+ var iconComponent = {
6107
+ info: React.createElement(InfoSvg, Object.assign({
6108
+ size: 24,
6109
+ color: iconColor
6110
+ }, styles == null ? void 0 : styles.icon)),
6111
+ success: React.createElement(SuccessSvg, Object.assign({
6112
+ size: 24,
6113
+ color: iconColor
6114
+ }, styles == null ? void 0 : styles.icon)),
6115
+ warning: React.createElement(WarningSvg, Object.assign({
6116
+ size: 24,
6117
+ color: iconColor
6118
+ }, styles == null ? void 0 : styles.icon)),
6119
+ error: React.createElement(ErrorSvg, Object.assign({
6120
+ size: 24,
6121
+ color: iconColor
6122
+ }, styles == null ? void 0 : styles.icon))
6123
+ }[variant];
6124
+ var isShowIcon = showIcon && iconComponent;
6125
+ return React.createElement(Horizontal, Object.assign({
6126
+ role: "messageContent",
6127
+ gap: 16,
6128
+ width: 400,
6129
+ // safe={true}
6130
+ wrap: "nowrap",
6131
+ position: 'relative',
6132
+ alignItems: "center",
6133
+ padding: "14px 24px 14px 14px",
6134
+ color: "" + Theme[variant].content.color,
6135
+ backgroundColor: "" + Theme[variant].container.backgroundColor,
6136
+ onClick: isClosable ? function () {} : function () {
6137
+ hide();
6138
+ }
6139
+ }, containerStyle, styles == null ? void 0 : styles.container), isShowIcon && iconComponent, React.createElement(Vertical, {
6140
+ gap: 8,
6141
+ width: "100%"
6142
+ }, React.createElement(Text, Object.assign({
6143
+ size: "md",
6144
+ weight: "semiBold"
6145
+ }, styles == null ? void 0 : styles.title), title), subtitle && React.createElement(Text, Object.assign({
6146
+ size: "sm"
6147
+ }, styles == null ? void 0 : styles.subtitle), subtitle)), isWithAction && React.createElement(Text, Object.assign({
6148
+ marginRight: 10,
6149
+ onClick: action,
6150
+ padding: "6px 10px",
6151
+ whiteSpace: "nowrap"
6152
+ }, containerStyle, styles == null ? void 0 : styles.actionText), actionText), isClosable && React.createElement(View, Object.assign({
6153
+ position: "absolute",
6154
+ zIndex: 10000,
6155
+ right: 8,
6156
+ top: 6,
6157
+ onClick: function onClick() {
6158
+ hide();
6159
+ }
6160
+ }, styles == null || (_styles$closingIcon = styles.closingIcon) == null ? void 0 : _styles$closingIcon.container), React.createElement(CloseSvg, Object.assign({
6161
+ size: 18,
6162
+ color: iconColor
6163
+ }, styles == null || (_styles$closingIcon2 = styles.closingIcon) == null ? void 0 : _styles$closingIcon2.icon))));
6164
+ };
6165
+
6166
+ var MessageLayout = function MessageLayout(_ref) {
6167
+ var container = _ref.container,
6168
+ theme = _ref.theme,
6169
+ _ref$position = _ref.position,
6170
+ position = _ref$position === void 0 ? 'topRight' : _ref$position;
6171
+ var _useMessageStore = useMessageStore(),
6172
+ visible = _useMessageStore.visible,
6173
+ title = _useMessageStore.title,
6174
+ variant = _useMessageStore.variant,
6175
+ subtitle = _useMessageStore.subtitle,
6176
+ isClosable = _useMessageStore.isClosable,
6177
+ styles = _useMessageStore.styles,
6178
+ action = _useMessageStore.action,
6179
+ actionText = _useMessageStore.actionText,
6180
+ showIcon = _useMessageStore.showIcon,
6181
+ timeout = _useMessageStore.timeout;
6182
+ var toastPosition = {
6183
+ topLeft: {
6184
+ top: 6,
6185
+ left: 8
6186
+ },
6187
+ topRight: {
6188
+ top: 6,
6189
+ right: 8
6190
+ },
6191
+ bottomLeft: {
6192
+ bottom: 8,
6193
+ left: 6
6194
+ },
6195
+ bottomRight: {
6196
+ bottom: 8,
6197
+ right: 6
6198
+ }
6199
+ }[position];
6200
+ // Crée une fonction pour construire le contenu du message
6201
+ var renderMessageContent = function renderMessageContent() {
6202
+ return React.createElement(MessageView, {
6203
+ variant: variant,
6204
+ subtitle: subtitle,
6205
+ show: visible,
6206
+ title: title,
6207
+ theme: theme,
6208
+ isClosable: isClosable,
6209
+ styles: styles,
6210
+ action: action,
6211
+ actionText: actionText,
6212
+ showIcon: showIcon,
6213
+ timeout: timeout,
6214
+ hide: function hide() {
6215
+ return hideMessage();
6216
+ }
6217
+ });
6218
+ };
6219
+ var MessageContainer = container ? React.cloneElement(container, {}, renderMessageContent()) : React.createElement(View, Object.assign({
6220
+ position: 'absolute',
6221
+ zIndex: 10000
6222
+ }, toastPosition), renderMessageContent());
6223
+ return visible ? MessageContainer : null;
6224
+ };
6225
+
6226
+ export { Alert, AspectRatio, Avatar, Badge, Bottom, Button, Center, Checkbox, CountryPicker, DatePicker, FileImage, FileSVG, FormikCheckbox, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikPassword, FormikSelect, FormikSwitch, FormikTextArea, FormikTextField, Horizontal, Inline, Left, Link, Loader, MessageLayout, MessageView, Modal, Password, Right, Select, Switch, Tabs, Text, TextArea, TextField, Toggle, ToggleGroup, Top, Vertical, View, hideMessage, hideModal, showMessage, showModal, useMessageStore, useModalStore };
5586
6227
  //# sourceMappingURL=web.esm.js.map