@app-studio/web 0.3.68 → 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.
- package/dist/bot/Bot.d.ts +4 -3
- package/dist/bot/FileHandler.d.ts +5 -0
- package/dist/bot/OpenAIConnector.d.ts +2 -0
- package/dist/bot/prompt/1-project.d.ts +1 -1
- package/dist/bot/prompt/2-response.d.ts +1 -1
- package/dist/components/Form/Checkbox/Checkbox/Checkbox.props.d.ts +0 -3
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.context.d.ts +10 -0
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.props.d.ts +36 -0
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.provider.d.ts +2 -0
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.state.d.ts +2 -0
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.type.d.ts +12 -0
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.view.d.ts +4 -0
- package/dist/components/Form/ComboBox/ComboBox.d.ts +3 -0
- package/dist/components/Form/ComboBox/examples/default.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/index.d.ts +10 -0
- package/dist/components/Form/ComboBox/examples/label.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/left.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/onSelect.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/placeholder.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/right.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/searchEnabled.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/searchPlaceholder.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/showTick.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/styles.d.ts +2 -0
- package/dist/components/Form/DatePicker/DatePicker/DatePicker.props.d.ts +0 -3
- package/dist/components/Form/TextField/examples/index.d.ts +1 -1
- package/dist/components/Formik/Formik.ComboBox.d.ts +6 -0
- package/dist/components/Formik/examples/FormikComboBox.d.ts +2 -0
- package/dist/components/Formik/examples/index.d.ts +1 -0
- package/dist/components/Formik/index.d.ts +1 -0
- package/dist/components/Layout/index.d.ts +4 -0
- package/dist/components/Message/Message/Message.layout.d.ts +1 -1
- package/dist/components/Message/Message/Message.props.d.ts +31 -107
- package/dist/components/Message/Message/Message.store.d.ts +2 -8
- package/dist/components/Message/Message/Message.style.d.ts +2 -2
- package/dist/components/Message/Message/Message.view.d.ts +2 -18
- package/dist/components/Message/examples/action.d.ts +2 -0
- package/dist/components/Message/examples/default.d.ts +2 -0
- package/dist/components/Message/examples/index.d.ts +9 -0
- package/dist/components/Message/examples/isClosable.d.ts +2 -0
- package/dist/components/Message/examples/showIcon.d.ts +2 -0
- package/dist/components/Message/examples/styles.d.ts +2 -0
- package/dist/components/Message/examples/subtitle.d.ts +2 -0
- package/dist/components/Message/examples/timeout.d.ts +2 -0
- package/dist/components/Message/examples/title.d.ts +2 -0
- package/dist/components/Message/examples/variant.d.ts +2 -0
- package/dist/components/Svg/Error.d.ts +8 -0
- package/dist/components/Svg/Info.d.ts +8 -0
- package/dist/components/Svg/Plus.d.ts +8 -0
- package/dist/components/Svg/Search.d.ts +8 -0
- package/dist/components/Svg/Success.d.ts +8 -0
- package/dist/components/Svg/Tick.d.ts +8 -0
- package/dist/components/Svg/index.d.ts +3 -0
- package/dist/components/Table/Table/Table.context.d.ts +16 -0
- package/dist/components/Table/Table/Table.props.d.ts +22 -0
- package/dist/components/Table/Table/Table.state.d.ts +5 -0
- package/dist/components/Table/Table/Table.type.d.ts +19 -0
- package/dist/components/Table/Table/Table.view.d.ts +11 -0
- package/dist/components/Table/Table.d.ts +13 -0
- package/dist/components/Table/examples/caption.d.ts +2 -0
- package/dist/components/Table/examples/data.d.ts +2 -0
- package/dist/components/Table/examples/default.d.ts +2 -0
- package/dist/components/Table/examples/footer.d.ts +2 -0
- package/dist/components/Table/examples/index.d.ts +5 -0
- package/dist/components/Table/examples/styles.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/pages/comboBox.page.d.ts +3 -0
- package/dist/pages/message.page.d.ts +2 -2
- package/dist/pages/table.page.d.ts +3 -0
- package/dist/utils/componentsPageImports.d.ts +6 -0
- package/dist/web.cjs.development.js +709 -63
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +704 -64
- package/dist/web.esm.js.map +1 -1
- package/package.json +6 -5
- package/dist/components/Message/Examples/CloseButtonMessage.d.ts +0 -2
- package/dist/components/Message/Examples/DefaultMessage.d.ts +0 -2
- package/dist/components/Message/Examples/VariantMessage.d.ts +0 -2
- package/dist/components/Message/Examples/index.d.ts +0 -3
- /package/dist/components/Form/TextField/examples/{ColorScheme.d.ts → colorScheme.d.ts} +0 -0
package/dist/web.esm.js
CHANGED
|
@@ -4,7 +4,6 @@ import { Link as Link$1 } from 'react-router-dom';
|
|
|
4
4
|
import format from 'date-fns/format';
|
|
5
5
|
import { useFormikContext } from 'formik';
|
|
6
6
|
import { create } from 'zustand';
|
|
7
|
-
import { Horizontal as Horizontal$1 } from 'src/components/Layout/Horizontal/Horizontal';
|
|
8
7
|
|
|
9
8
|
var useButtonState = function useButtonState() {
|
|
10
9
|
var _React$useState = React.useState(false),
|
|
@@ -435,6 +434,101 @@ var WarningSvg = function WarningSvg(_ref) {
|
|
|
435
434
|
})))))));
|
|
436
435
|
};
|
|
437
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
|
+
|
|
438
532
|
var IconSizes = {
|
|
439
533
|
xs: 12,
|
|
440
534
|
sm: 14,
|
|
@@ -448,7 +542,7 @@ var IconSizes = {
|
|
|
448
542
|
'6xl': 64
|
|
449
543
|
};
|
|
450
544
|
|
|
451
|
-
var _excluded$
|
|
545
|
+
var _excluded$e = ["children", "href", "iconSize", "underline", "isHovered", "isExternal", "styles", "setIsHovered"];
|
|
452
546
|
var LinkView = function LinkView(_ref) {
|
|
453
547
|
var children = _ref.children,
|
|
454
548
|
_ref$href = _ref.href,
|
|
@@ -468,7 +562,7 @@ var LinkView = function LinkView(_ref) {
|
|
|
468
562
|
} : _ref$styles,
|
|
469
563
|
_ref$setIsHovered = _ref.setIsHovered,
|
|
470
564
|
setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
|
|
471
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
565
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
472
566
|
var handleHover = function handleHover() {
|
|
473
567
|
if (underline === 'hover') setIsHovered(true);
|
|
474
568
|
};
|
|
@@ -606,7 +700,7 @@ var DefaultSpeeds = {
|
|
|
606
700
|
slow: 300
|
|
607
701
|
};
|
|
608
702
|
|
|
609
|
-
var _excluded$
|
|
703
|
+
var _excluded$f = ["size", "speed", "color"],
|
|
610
704
|
_excluded2 = ["size", "speed", "color"],
|
|
611
705
|
_excluded3 = ["size", "speed", "color"],
|
|
612
706
|
_excluded4 = ["size", "children", "textColor", "loaderColor", "type", "speed", "textPosition"];
|
|
@@ -617,7 +711,7 @@ var DefaultSpinner = function DefaultSpinner(_ref) {
|
|
|
617
711
|
speed = _ref$speed === void 0 ? 'normal' : _ref$speed,
|
|
618
712
|
_ref$color = _ref.color,
|
|
619
713
|
color = _ref$color === void 0 ? 'theme.loading' : _ref$color,
|
|
620
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
714
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
621
715
|
var theme = useTheme();
|
|
622
716
|
var colorStyle = theme.getColor(color);
|
|
623
717
|
var sizeStyle = typeof size === 'number' ? size : DefaultSizes[size];
|
|
@@ -791,7 +885,7 @@ var LoaderComponent = function LoaderComponent(props) {
|
|
|
791
885
|
*/
|
|
792
886
|
var Loader = LoaderComponent;
|
|
793
887
|
|
|
794
|
-
var _excluded$
|
|
888
|
+
var _excluded$g = ["icon", "shadow", "children", "ariaLabel", "externalHref", "isAuto", "isFilled", "isIconRounded", "isLoading", "isDisabled", "size", "variant", "iconPosition", "colorScheme", "shape", "onClick", "loaderProps", "loaderPosition", "effect", "isHovered"];
|
|
795
889
|
var ButtonView = function ButtonView(_ref) {
|
|
796
890
|
var _props$onClick;
|
|
797
891
|
var icon = _ref.icon,
|
|
@@ -828,7 +922,7 @@ var ButtonView = function ButtonView(_ref) {
|
|
|
828
922
|
_ref$effect = _ref.effect,
|
|
829
923
|
effect = _ref$effect === void 0 ? 'default' : _ref$effect,
|
|
830
924
|
isHovered = _ref.isHovered,
|
|
831
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
925
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
832
926
|
var isActive = !(isDisabled || isLoading);
|
|
833
927
|
var defaultNativeProps = {
|
|
834
928
|
disabled: !isActive
|
|
@@ -972,7 +1066,7 @@ var HeadingSizes = {
|
|
|
972
1066
|
}
|
|
973
1067
|
};
|
|
974
1068
|
|
|
975
|
-
var _excluded$
|
|
1069
|
+
var _excluded$h = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size"];
|
|
976
1070
|
var LabelView = function LabelView(_ref) {
|
|
977
1071
|
var children = _ref.children,
|
|
978
1072
|
heading = _ref.heading,
|
|
@@ -986,7 +1080,7 @@ var LabelView = function LabelView(_ref) {
|
|
|
986
1080
|
weight = _ref$weight === void 0 ? 'normal' : _ref$weight,
|
|
987
1081
|
_ref$size = _ref.size,
|
|
988
1082
|
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
|
989
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1083
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
990
1084
|
var headingStyles = heading ? HeadingSizes[heading] : {};
|
|
991
1085
|
return React.createElement(Element, Object.assign({
|
|
992
1086
|
as: "label",
|
|
@@ -1058,7 +1152,7 @@ var IconSizes$2 = {
|
|
|
1058
1152
|
'6xl': 60
|
|
1059
1153
|
};
|
|
1060
1154
|
|
|
1061
|
-
var _excluded$
|
|
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"];
|
|
1062
1156
|
var CheckboxView = function CheckboxView(_ref) {
|
|
1063
1157
|
var id = _ref.id,
|
|
1064
1158
|
icon = _ref.icon,
|
|
@@ -1095,7 +1189,7 @@ var CheckboxView = function CheckboxView(_ref) {
|
|
|
1095
1189
|
checkbox: {},
|
|
1096
1190
|
label: {}
|
|
1097
1191
|
} : _ref$styles,
|
|
1098
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1192
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
1099
1193
|
var handleHover = function handleHover() {
|
|
1100
1194
|
return setIsHovered(!isHovered);
|
|
1101
1195
|
};
|
|
@@ -2669,7 +2763,7 @@ var HeadingSizes$1 = {
|
|
|
2669
2763
|
}
|
|
2670
2764
|
};
|
|
2671
2765
|
|
|
2672
|
-
var _excluded$
|
|
2766
|
+
var _excluded$j = ["children", "heading", "maxLines", "isItalic", "isUnderlined", "isSub", "isSup", "isStriked", "isTruncated", "weight", "size"];
|
|
2673
2767
|
var TextContent = function TextContent(_ref) {
|
|
2674
2768
|
var children = _ref.children,
|
|
2675
2769
|
isSub = _ref.isSub,
|
|
@@ -2733,7 +2827,7 @@ var TextView = function TextView(_ref3) {
|
|
|
2733
2827
|
weight = _ref3$weight === void 0 ? 'normal' : _ref3$weight,
|
|
2734
2828
|
_ref3$size = _ref3.size,
|
|
2735
2829
|
size = _ref3$size === void 0 ? 'md' : _ref3$size,
|
|
2736
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded$
|
|
2830
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded$j);
|
|
2737
2831
|
var headingStyles = heading ? HeadingSizes$1[heading] : {};
|
|
2738
2832
|
var noLineBreak = isSub || isSup ? {
|
|
2739
2833
|
display: 'inline'
|
|
@@ -2763,14 +2857,14 @@ var TextComponent = function TextComponent(props) {
|
|
|
2763
2857
|
*/
|
|
2764
2858
|
var Text = TextComponent;
|
|
2765
2859
|
|
|
2766
|
-
var _excluded$
|
|
2860
|
+
var _excluded$k = ["children", "styles"];
|
|
2767
2861
|
var HelperText = function HelperText(_ref) {
|
|
2768
2862
|
var children = _ref.children,
|
|
2769
2863
|
_ref$styles = _ref.styles,
|
|
2770
2864
|
styles = _ref$styles === void 0 ? {
|
|
2771
2865
|
helperText: {}
|
|
2772
2866
|
} : _ref$styles,
|
|
2773
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2867
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
2774
2868
|
return React.createElement(Text, Object.assign({
|
|
2775
2869
|
size: "xs",
|
|
2776
2870
|
marginVertical: 0,
|
|
@@ -2779,7 +2873,7 @@ var HelperText = function HelperText(_ref) {
|
|
|
2779
2873
|
}, styles['helperText'], props), children);
|
|
2780
2874
|
};
|
|
2781
2875
|
|
|
2782
|
-
var _excluded$
|
|
2876
|
+
var _excluded$l = ["children", "wrap", "justify", "isReversed"];
|
|
2783
2877
|
var VerticalView = function VerticalView(_ref) {
|
|
2784
2878
|
var children = _ref.children,
|
|
2785
2879
|
_ref$wrap = _ref.wrap,
|
|
@@ -2788,7 +2882,7 @@ var VerticalView = function VerticalView(_ref) {
|
|
|
2788
2882
|
justify = _ref$justify === void 0 ? 'flex-start' : _ref$justify,
|
|
2789
2883
|
_ref$isReversed = _ref.isReversed,
|
|
2790
2884
|
isReversed = _ref$isReversed === void 0 ? false : _ref$isReversed,
|
|
2791
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2885
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
2792
2886
|
return React.createElement(View$1, Object.assign({
|
|
2793
2887
|
display: "flex",
|
|
2794
2888
|
flexWrap: wrap,
|
|
@@ -2805,14 +2899,14 @@ var VerticalComponent = function VerticalComponent(props) {
|
|
|
2805
2899
|
};
|
|
2806
2900
|
var Vertical = VerticalComponent;
|
|
2807
2901
|
|
|
2808
|
-
var _excluded$
|
|
2902
|
+
var _excluded$m = ["children", "helperText", "error", "styles"];
|
|
2809
2903
|
var FieldContainer = function FieldContainer(_ref) {
|
|
2810
2904
|
var children = _ref.children,
|
|
2811
2905
|
helperText = _ref.helperText,
|
|
2812
2906
|
_ref$error = _ref.error,
|
|
2813
2907
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
2814
2908
|
styles = _ref.styles,
|
|
2815
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2909
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
|
|
2816
2910
|
return React.createElement(Vertical, Object.assign({
|
|
2817
2911
|
gap: 5,
|
|
2818
2912
|
position: "relative"
|
|
@@ -2871,7 +2965,7 @@ var PaddingWithoutLabel = {
|
|
|
2871
2965
|
paddingRight: 36
|
|
2872
2966
|
};
|
|
2873
2967
|
|
|
2874
|
-
var _excluded$
|
|
2968
|
+
var _excluded$n = ["label", "shadow", "children", "value", "size", "shape", "variant", "error", "isWithLabel", "isFocused", "isHovered", "isDisabled", "isReadOnly", "colorScheme", "styles"];
|
|
2875
2969
|
var FieldContent = function FieldContent(_ref) {
|
|
2876
2970
|
var shadow = _ref.shadow,
|
|
2877
2971
|
children = _ref.children,
|
|
@@ -2899,7 +2993,7 @@ var FieldContent = function FieldContent(_ref) {
|
|
|
2899
2993
|
styles = _ref$styles === void 0 ? {
|
|
2900
2994
|
pickerBox: {}
|
|
2901
2995
|
} : _ref$styles,
|
|
2902
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2996
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
2903
2997
|
var isInteractive = (isHovered || isFocused) && !isDisabled;
|
|
2904
2998
|
var color = error ? 'error' : isInteractive ? colorScheme : 'midgray';
|
|
2905
2999
|
return React.createElement(Horizontal, Object.assign({
|
|
@@ -2920,10 +3014,10 @@ var FieldContent = function FieldContent(_ref) {
|
|
|
2920
3014
|
}, isWithLabel ? PadddingWithLabel : PaddingWithoutLabel, shadow, Shapes[shape], InputVariants[variant], styles['box'], props), children);
|
|
2921
3015
|
};
|
|
2922
3016
|
|
|
2923
|
-
var _excluded$
|
|
3017
|
+
var _excluded$o = ["children"];
|
|
2924
3018
|
var FieldIcons = function FieldIcons(_ref) {
|
|
2925
3019
|
var children = _ref.children,
|
|
2926
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3020
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
2927
3021
|
return React.createElement(Center, Object.assign({
|
|
2928
3022
|
gap: 10,
|
|
2929
3023
|
right: 16,
|
|
@@ -2933,7 +3027,7 @@ var FieldIcons = function FieldIcons(_ref) {
|
|
|
2933
3027
|
}, props), children);
|
|
2934
3028
|
};
|
|
2935
3029
|
|
|
2936
|
-
var _excluded$
|
|
3030
|
+
var _excluded$p = ["children", "size", "error", "color", "styles"];
|
|
2937
3031
|
var FieldLabel = function FieldLabel(_ref) {
|
|
2938
3032
|
var children = _ref.children,
|
|
2939
3033
|
_ref$size = _ref.size,
|
|
@@ -2946,7 +3040,7 @@ var FieldLabel = function FieldLabel(_ref) {
|
|
|
2946
3040
|
styles = _ref$styles === void 0 ? {
|
|
2947
3041
|
label: {}
|
|
2948
3042
|
} : _ref$styles,
|
|
2949
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3043
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
2950
3044
|
return React.createElement(Label, Object.assign({
|
|
2951
3045
|
top: 6,
|
|
2952
3046
|
zIndex: 1000,
|
|
@@ -2959,10 +3053,10 @@ var FieldLabel = function FieldLabel(_ref) {
|
|
|
2959
3053
|
}, styles['label'], props), children);
|
|
2960
3054
|
};
|
|
2961
3055
|
|
|
2962
|
-
var _excluded$
|
|
3056
|
+
var _excluded$q = ["children"];
|
|
2963
3057
|
var FieldWrapper = function FieldWrapper(_ref) {
|
|
2964
3058
|
var children = _ref.children,
|
|
2965
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3059
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
2966
3060
|
return React.createElement(Vertical, Object.assign({
|
|
2967
3061
|
width: "100%"
|
|
2968
3062
|
}, props), children);
|
|
@@ -2976,7 +3070,7 @@ var IconSizes$3 = {
|
|
|
2976
3070
|
xl: 16
|
|
2977
3071
|
};
|
|
2978
3072
|
|
|
2979
|
-
var _excluded$
|
|
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"];
|
|
2980
3074
|
var CountryList = function CountryList(props) {
|
|
2981
3075
|
return React.createElement(Element, Object.assign({
|
|
2982
3076
|
as: "ul"
|
|
@@ -3116,7 +3210,7 @@ var CountryPickerView = function CountryPickerView(_ref3) {
|
|
|
3116
3210
|
helperText: {},
|
|
3117
3211
|
box: {}
|
|
3118
3212
|
} : _ref3$styles,
|
|
3119
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded$
|
|
3213
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded$r);
|
|
3120
3214
|
var _useTheme = useTheme(),
|
|
3121
3215
|
getColor = _useTheme.getColor;
|
|
3122
3216
|
var IconColor = getColor('color.blueGray.700');
|
|
@@ -3254,7 +3348,7 @@ var useDatePickerState = function useDatePickerState() {
|
|
|
3254
3348
|
};
|
|
3255
3349
|
};
|
|
3256
3350
|
|
|
3257
|
-
var _excluded$
|
|
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"];
|
|
3258
3352
|
var DatePickerContent = function DatePickerContent(props) {
|
|
3259
3353
|
return React.createElement(Input, Object.assign({
|
|
3260
3354
|
type: "date"
|
|
@@ -3302,7 +3396,7 @@ var DatePickerView = function DatePickerView(_ref) {
|
|
|
3302
3396
|
setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
|
|
3303
3397
|
onChange = _ref.onChange,
|
|
3304
3398
|
onChangeText = _ref.onChangeText,
|
|
3305
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3399
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
3306
3400
|
var isWithLabel = !!(isFocused && label);
|
|
3307
3401
|
var handleHover = function handleHover() {
|
|
3308
3402
|
return setIsHovered(!isHovered);
|
|
@@ -3427,7 +3521,7 @@ var usePasswordState = function usePasswordState(props) {
|
|
|
3427
3521
|
}, props, textFieldStates);
|
|
3428
3522
|
};
|
|
3429
3523
|
|
|
3430
|
-
var _excluded$
|
|
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"];
|
|
3431
3525
|
var TextFieldInput = function TextFieldInput(props) {
|
|
3432
3526
|
return React.createElement(Input, Object.assign({
|
|
3433
3527
|
type: "text"
|
|
@@ -3485,7 +3579,7 @@ var TextFieldView = function TextFieldView(_ref) {
|
|
|
3485
3579
|
onFocus = _ref.onFocus,
|
|
3486
3580
|
_ref$onBlur = _ref.onBlur,
|
|
3487
3581
|
onBlur = _ref$onBlur === void 0 ? function () {} : _ref$onBlur,
|
|
3488
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3582
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
3489
3583
|
var _useTheme = useTheme(),
|
|
3490
3584
|
getColor = _useTheme.getColor;
|
|
3491
3585
|
var IconColor = getColor('color.blueGray.700');
|
|
@@ -3593,7 +3687,7 @@ var TextFieldView = function TextFieldView(_ref) {
|
|
|
3593
3687
|
}), rightChild && React.createElement(React.Fragment, null, rightChild))));
|
|
3594
3688
|
};
|
|
3595
3689
|
|
|
3596
|
-
var _excluded$
|
|
3690
|
+
var _excluded$u = ["visibleIcon", "hiddenIcon"],
|
|
3597
3691
|
_excluded2$1 = ["isVisible", "setIsVisible"];
|
|
3598
3692
|
var PasswordComponent = function PasswordComponent(_ref) {
|
|
3599
3693
|
var _ref$visibleIcon = _ref.visibleIcon,
|
|
@@ -3604,7 +3698,7 @@ var PasswordComponent = function PasswordComponent(_ref) {
|
|
|
3604
3698
|
hiddenIcon = _ref$hiddenIcon === void 0 ? React.createElement(CloseEyeSvg, {
|
|
3605
3699
|
size: 14
|
|
3606
3700
|
}) : _ref$hiddenIcon,
|
|
3607
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3701
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
3608
3702
|
var _usePasswordState = usePasswordState(props),
|
|
3609
3703
|
isVisible = _usePasswordState.isVisible,
|
|
3610
3704
|
setIsVisible = _usePasswordState.setIsVisible,
|
|
@@ -3672,7 +3766,7 @@ var IconSizes$4 = {
|
|
|
3672
3766
|
xl: 16
|
|
3673
3767
|
};
|
|
3674
3768
|
|
|
3675
|
-
var _excluded$
|
|
3769
|
+
var _excluded$v = ["isHovered", "setIsHovered", "option", "size", "callback"],
|
|
3676
3770
|
_excluded2$2 = ["id", "name", "value", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
|
|
3677
3771
|
_excluded3$1 = ["option", "size", "removeOption"],
|
|
3678
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"];
|
|
@@ -3684,13 +3778,14 @@ var Item = function Item(_ref) {
|
|
|
3684
3778
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
3685
3779
|
_ref$callback = _ref.callback,
|
|
3686
3780
|
callback = _ref$callback === void 0 ? function () {} : _ref$callback,
|
|
3687
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3781
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
3688
3782
|
var handleOptionClick = function handleOptionClick(option) {
|
|
3689
3783
|
return callback(option);
|
|
3690
3784
|
};
|
|
3691
3785
|
var handleHover = function handleHover() {
|
|
3692
3786
|
return setIsHovered(!isHovered);
|
|
3693
3787
|
};
|
|
3788
|
+
console.log(props.name);
|
|
3694
3789
|
return React.createElement(Element, Object.assign({
|
|
3695
3790
|
as: "li",
|
|
3696
3791
|
margin: 0,
|
|
@@ -4155,7 +4250,7 @@ var SliderPadding = {
|
|
|
4155
4250
|
}
|
|
4156
4251
|
};
|
|
4157
4252
|
|
|
4158
|
-
var _excluded$
|
|
4253
|
+
var _excluded$w = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "onChange", "setValue", "setIsHovered", "styles"];
|
|
4159
4254
|
var SwitchContent = function SwitchContent(props) {
|
|
4160
4255
|
return React.createElement(Input, Object.assign({
|
|
4161
4256
|
type: "checkbox"
|
|
@@ -4194,7 +4289,7 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
4194
4289
|
circle: {},
|
|
4195
4290
|
label: {}
|
|
4196
4291
|
} : _ref$styles,
|
|
4197
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4292
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
4198
4293
|
var handleToggle = function handleToggle(event) {
|
|
4199
4294
|
if (!isReadOnly) {
|
|
4200
4295
|
setValue(!value);
|
|
@@ -4280,7 +4375,7 @@ var useTextAreaState = function useTextAreaState(_ref) {
|
|
|
4280
4375
|
};
|
|
4281
4376
|
};
|
|
4282
4377
|
|
|
4283
|
-
var _excluded$
|
|
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"];
|
|
4284
4379
|
var TextAreaView = function TextAreaView(_ref) {
|
|
4285
4380
|
var id = _ref.id,
|
|
4286
4381
|
name = _ref.name,
|
|
@@ -4335,7 +4430,7 @@ var TextAreaView = function TextAreaView(_ref) {
|
|
|
4335
4430
|
helperText: {},
|
|
4336
4431
|
field: {}
|
|
4337
4432
|
} : _ref$styles,
|
|
4338
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4433
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
4339
4434
|
var isWithLabel = !!(isFocused && label);
|
|
4340
4435
|
var fieldStyles = _extends({
|
|
4341
4436
|
margin: 0,
|
|
@@ -4503,7 +4598,7 @@ var FormikForm = function FormikForm(_ref) {
|
|
|
4503
4598
|
}, React.createElement(Form, null, children));
|
|
4504
4599
|
};
|
|
4505
4600
|
|
|
4506
|
-
var _excluded$
|
|
4601
|
+
var _excluded$y = ["name", "type"];
|
|
4507
4602
|
var getInputTypeProps = function getInputTypeProps(type) {
|
|
4508
4603
|
switch (type) {
|
|
4509
4604
|
case 'email':
|
|
@@ -4533,7 +4628,7 @@ var getInputTypeProps = function getInputTypeProps(type) {
|
|
|
4533
4628
|
var useFormikInput = function useFormikInput(_ref) {
|
|
4534
4629
|
var name = _ref.name,
|
|
4535
4630
|
type = _ref.type,
|
|
4536
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4631
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
4537
4632
|
var focus = useFormFocus();
|
|
4538
4633
|
var _useFormikContext = useFormikContext(),
|
|
4539
4634
|
touched = _useFormikContext.touched,
|
|
@@ -4580,11 +4675,11 @@ var useFormikInput = function useFormikInput(_ref) {
|
|
|
4580
4675
|
// import FormRater from 'src/Rate/Rate';
|
|
4581
4676
|
// import Upload from 'src/Upload/Upload';
|
|
4582
4677
|
|
|
4583
|
-
var _excluded$
|
|
4678
|
+
var _excluded$z = ["value"];
|
|
4584
4679
|
var CheckboxComponent$1 = function CheckboxComponent(props) {
|
|
4585
4680
|
var _useFormikInput = useFormikInput(props),
|
|
4586
4681
|
value = _useFormikInput.value,
|
|
4587
|
-
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$
|
|
4682
|
+
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$z);
|
|
4588
4683
|
formProps.isChecked = value;
|
|
4589
4684
|
var checkboxStates = useCheckboxState(props);
|
|
4590
4685
|
return React.createElement(CheckboxView, Object.assign({}, checkboxStates, formProps));
|
|
@@ -4642,11 +4737,11 @@ var TextAreaComponent$1 = function TextAreaComponent(props) {
|
|
|
4642
4737
|
*/
|
|
4643
4738
|
var FormikTextArea = TextAreaComponent$1;
|
|
4644
4739
|
|
|
4645
|
-
var _excluded$
|
|
4740
|
+
var _excluded$A = ["value"];
|
|
4646
4741
|
var TextFieldComponent$1 = function TextFieldComponent(props) {
|
|
4647
4742
|
var formProps = useFormikInput(props);
|
|
4648
4743
|
var _useTextFieldState = useTextFieldState(props),
|
|
4649
|
-
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$
|
|
4744
|
+
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$A);
|
|
4650
4745
|
return React.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
|
|
4651
4746
|
};
|
|
4652
4747
|
/**
|
|
@@ -4654,7 +4749,7 @@ var TextFieldComponent$1 = function TextFieldComponent(props) {
|
|
|
4654
4749
|
*/
|
|
4655
4750
|
var FormikTextField = TextFieldComponent$1;
|
|
4656
4751
|
|
|
4657
|
-
var _excluded$
|
|
4752
|
+
var _excluded$B = ["visibleIcon", "hiddenIcon"],
|
|
4658
4753
|
_excluded2$3 = ["isVisible", "setIsVisible"];
|
|
4659
4754
|
var PasswordComponent$1 = function PasswordComponent(_ref) {
|
|
4660
4755
|
var _ref$visibleIcon = _ref.visibleIcon,
|
|
@@ -4665,7 +4760,7 @@ var PasswordComponent$1 = function PasswordComponent(_ref) {
|
|
|
4665
4760
|
hiddenIcon = _ref$hiddenIcon === void 0 ? React.createElement(CloseEyeSvg, {
|
|
4666
4761
|
size: 14
|
|
4667
4762
|
}) : _ref$hiddenIcon,
|
|
4668
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4763
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
4669
4764
|
var formProps = useFormikInput(props);
|
|
4670
4765
|
var _usePasswordState = usePasswordState(formProps),
|
|
4671
4766
|
isVisible = _usePasswordState.isVisible,
|
|
@@ -4688,6 +4783,271 @@ var PasswordComponent$1 = function PasswordComponent(_ref) {
|
|
|
4688
4783
|
*/
|
|
4689
4784
|
var FormikPassword = PasswordComponent$1;
|
|
4690
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
|
+
|
|
4691
5051
|
var useModalStore = /*#__PURE__*/create(function (set) {
|
|
4692
5052
|
return {
|
|
4693
5053
|
modal: false,
|
|
@@ -4773,7 +5133,7 @@ var HeaderIconSizes = {
|
|
|
4773
5133
|
xl: 28
|
|
4774
5134
|
};
|
|
4775
5135
|
|
|
4776
|
-
var _excluded$
|
|
5136
|
+
var _excluded$G = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position"],
|
|
4777
5137
|
_excluded2$4 = ["children", "shadow", "isFullScreen", "shape"],
|
|
4778
5138
|
_excluded3$2 = ["children", "buttonColor", "iconSize", "buttonPosition"],
|
|
4779
5139
|
_excluded4$2 = ["children"],
|
|
@@ -4789,7 +5149,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
4789
5149
|
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
4790
5150
|
_ref$position = _ref.position,
|
|
4791
5151
|
position = _ref$position === void 0 ? 'center' : _ref$position,
|
|
4792
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5152
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
4793
5153
|
var handleClick = function handleClick() {
|
|
4794
5154
|
if (!isClosePrevented) onClose();
|
|
4795
5155
|
};
|
|
@@ -4945,12 +5305,12 @@ Modal.Body = ModalBody;
|
|
|
4945
5305
|
Modal.Footer = ModalFooter;
|
|
4946
5306
|
Modal.Layout = ModalLayout;
|
|
4947
5307
|
|
|
4948
|
-
var _excluded$
|
|
5308
|
+
var _excluded$H = ["src", "color"],
|
|
4949
5309
|
_excluded2$5 = ["path"];
|
|
4950
5310
|
var FileSVG = function FileSVG(_ref) {
|
|
4951
5311
|
var src = _ref.src,
|
|
4952
5312
|
color = _ref.color,
|
|
4953
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5313
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
4954
5314
|
var _useTheme = useTheme(),
|
|
4955
5315
|
getColor = _useTheme.getColor;
|
|
4956
5316
|
var Colorprops = color ? {
|
|
@@ -5151,12 +5511,12 @@ var AlertComponent = function AlertComponent(_ref) {
|
|
|
5151
5511
|
};
|
|
5152
5512
|
var Alert = AlertComponent;
|
|
5153
5513
|
|
|
5154
|
-
var _excluded$
|
|
5514
|
+
var _excluded$I = ["ratio", "children"];
|
|
5155
5515
|
var AspectRatioView = function AspectRatioView(_ref) {
|
|
5156
5516
|
var _ref$ratio = _ref.ratio,
|
|
5157
5517
|
ratio = _ref$ratio === void 0 ? 16 / 9 : _ref$ratio,
|
|
5158
5518
|
children = _ref.children,
|
|
5159
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5519
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
5160
5520
|
return React.createElement(Center, Object.assign({
|
|
5161
5521
|
width: '100%',
|
|
5162
5522
|
position: "relative",
|
|
@@ -5172,11 +5532,11 @@ var AspectRatioView = function AspectRatioView(_ref) {
|
|
|
5172
5532
|
}, children));
|
|
5173
5533
|
};
|
|
5174
5534
|
|
|
5175
|
-
var _excluded$
|
|
5535
|
+
var _excluded$J = ["ratio", "children"];
|
|
5176
5536
|
var AspectRatioComponent = function AspectRatioComponent(_ref) {
|
|
5177
5537
|
var ratio = _ref.ratio,
|
|
5178
5538
|
children = _ref.children,
|
|
5179
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5539
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$J);
|
|
5180
5540
|
return React.createElement(AspectRatioView, Object.assign({
|
|
5181
5541
|
ratio: ratio
|
|
5182
5542
|
}, props), children);
|
|
@@ -5289,7 +5649,6 @@ var BadgeShapes = {
|
|
|
5289
5649
|
rounded: 4,
|
|
5290
5650
|
pillShaped: 24
|
|
5291
5651
|
};
|
|
5292
|
-
// Example of how you might adjust styles based on the 'position' prop
|
|
5293
5652
|
var PositionStyles = {
|
|
5294
5653
|
'top-right': {
|
|
5295
5654
|
top: 0,
|
|
@@ -5408,7 +5767,7 @@ var ToggleShapes = {
|
|
|
5408
5767
|
pillShaped: 24
|
|
5409
5768
|
};
|
|
5410
5769
|
|
|
5411
|
-
var _excluded$
|
|
5770
|
+
var _excluded$K = ["children", "shape", "colorScheme", "variant", "isHovered", "setIsHovered", "isDisabled", "isToggle", "setIsToggled", "onToggle"];
|
|
5412
5771
|
var ToggleView = function ToggleView(_ref) {
|
|
5413
5772
|
var children = _ref.children,
|
|
5414
5773
|
_ref$shape = _ref.shape,
|
|
@@ -5423,7 +5782,7 @@ var ToggleView = function ToggleView(_ref) {
|
|
|
5423
5782
|
isToggle = _ref.isToggle,
|
|
5424
5783
|
setIsToggled = _ref.setIsToggled,
|
|
5425
5784
|
onToggle = _ref.onToggle,
|
|
5426
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5785
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$K);
|
|
5427
5786
|
var toggleColor = !isDisabled ? colorScheme : 'theme.disabled';
|
|
5428
5787
|
var isActive = !!(isToggle || isHovered);
|
|
5429
5788
|
var ToggleVariants = {
|
|
@@ -5471,7 +5830,7 @@ var ToggleView = function ToggleView(_ref) {
|
|
|
5471
5830
|
}, ToggleVariants[variant], props), children);
|
|
5472
5831
|
};
|
|
5473
5832
|
|
|
5474
|
-
var _excluded$
|
|
5833
|
+
var _excluded$L = ["children", "shape", "colorScheme", "variant", "isDisabled", "isToggled", "onToggle"];
|
|
5475
5834
|
var ToggleComponent = function ToggleComponent(_ref) {
|
|
5476
5835
|
var children = _ref.children,
|
|
5477
5836
|
shape = _ref.shape,
|
|
@@ -5481,7 +5840,7 @@ var ToggleComponent = function ToggleComponent(_ref) {
|
|
|
5481
5840
|
_ref$isToggled = _ref.isToggled,
|
|
5482
5841
|
isToggled = _ref$isToggled === void 0 ? false : _ref$isToggled,
|
|
5483
5842
|
onToggle = _ref.onToggle,
|
|
5484
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5843
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
5485
5844
|
var _useToggleState = useToggleState(isToggled),
|
|
5486
5845
|
isHovered = _useToggleState.isHovered,
|
|
5487
5846
|
setIsHovered = _useToggleState.setIsHovered,
|
|
@@ -5541,7 +5900,7 @@ var ToggleGroupView = function ToggleGroupView(_ref) {
|
|
|
5541
5900
|
return newActiveToggles;
|
|
5542
5901
|
});
|
|
5543
5902
|
}, [onToggleChange, setActiveToggles]);
|
|
5544
|
-
return React.createElement(Horizontal
|
|
5903
|
+
return React.createElement(Horizontal, {
|
|
5545
5904
|
role: "ToggleGroup",
|
|
5546
5905
|
display: "flex",
|
|
5547
5906
|
gap: 5
|
|
@@ -5583,5 +5942,286 @@ var ToggleGroupComponent = function ToggleGroupComponent(_ref) {
|
|
|
5583
5942
|
};
|
|
5584
5943
|
var ToggleGroup = ToggleGroupComponent;
|
|
5585
5944
|
|
|
5586
|
-
|
|
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 };
|
|
5587
6227
|
//# sourceMappingURL=web.esm.js.map
|