@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
|
@@ -11,7 +11,6 @@ var reactRouterDom = require('react-router-dom');
|
|
|
11
11
|
var format = _interopDefault(require('date-fns/format'));
|
|
12
12
|
var formik = require('formik');
|
|
13
13
|
var zustand = require('zustand');
|
|
14
|
-
var Horizontal$1 = require('src/components/Layout/Horizontal/Horizontal');
|
|
15
14
|
|
|
16
15
|
var useButtonState = function useButtonState() {
|
|
17
16
|
var _React$useState = React__default.useState(false),
|
|
@@ -442,6 +441,101 @@ var WarningSvg = function WarningSvg(_ref) {
|
|
|
442
441
|
})))))));
|
|
443
442
|
};
|
|
444
443
|
|
|
444
|
+
var _excluded$b = ["size", "color"];
|
|
445
|
+
var SuccessSvg = function SuccessSvg(_ref) {
|
|
446
|
+
var _ref$size = _ref.size,
|
|
447
|
+
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
448
|
+
_ref$color = _ref.color,
|
|
449
|
+
color = _ref$color === void 0 ? 'white' : _ref$color,
|
|
450
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
451
|
+
return React__default.createElement(Center, {
|
|
452
|
+
width: size + "px",
|
|
453
|
+
height: size + "px"
|
|
454
|
+
}, React__default.createElement("svg", Object.assign({
|
|
455
|
+
height: size + "px",
|
|
456
|
+
width: size + "px",
|
|
457
|
+
version: "1.1",
|
|
458
|
+
id: "Capa_1",
|
|
459
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
460
|
+
viewBox: "0 0 484.8 484.8",
|
|
461
|
+
fill: color
|
|
462
|
+
}, props), React__default.createElement("g", {
|
|
463
|
+
id: "SVGRepo_bgCarrier"
|
|
464
|
+
}), React__default.createElement("g", {
|
|
465
|
+
id: "SVGRepo_tracerCarrier"
|
|
466
|
+
}), React__default.createElement("g", {
|
|
467
|
+
id: "SVGRepo_iconCarrier"
|
|
468
|
+
}, React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("path", {
|
|
469
|
+
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",
|
|
470
|
+
fill: color
|
|
471
|
+
}))))));
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
var _excluded$c = ["size", "color"];
|
|
475
|
+
var InfoSvg = function InfoSvg(_ref) {
|
|
476
|
+
var _ref$size = _ref.size,
|
|
477
|
+
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
478
|
+
_ref$color = _ref.color,
|
|
479
|
+
color = _ref$color === void 0 ? 'white' : _ref$color,
|
|
480
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
481
|
+
return React__default.createElement(Center, {
|
|
482
|
+
width: size + "px",
|
|
483
|
+
height: size + "px"
|
|
484
|
+
}, React__default.createElement("svg", Object.assign({
|
|
485
|
+
height: size + "px",
|
|
486
|
+
width: size + "px",
|
|
487
|
+
version: "1.1",
|
|
488
|
+
id: "Capa_1",
|
|
489
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
490
|
+
viewBox: "0 0 192.146 192.146",
|
|
491
|
+
fill: color
|
|
492
|
+
}, props), React__default.createElement("g", {
|
|
493
|
+
id: "SVGRepo_bgCarrier"
|
|
494
|
+
}), React__default.createElement("g", {
|
|
495
|
+
id: "SVGRepo_tracerCarrier"
|
|
496
|
+
}), React__default.createElement("g", {
|
|
497
|
+
id: "SVGRepo_iconCarrier"
|
|
498
|
+
}, React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("path", {
|
|
499
|
+
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"
|
|
500
|
+
})))))));
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
var _excluded$d = ["size", "color"];
|
|
504
|
+
var ErrorSvg = function ErrorSvg(_ref) {
|
|
505
|
+
var _ref$size = _ref.size,
|
|
506
|
+
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
507
|
+
_ref$color = _ref.color,
|
|
508
|
+
color = _ref$color === void 0 ? 'white' : _ref$color,
|
|
509
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
510
|
+
return React__default.createElement(Center, {
|
|
511
|
+
width: size + "px",
|
|
512
|
+
height: size + "px"
|
|
513
|
+
}, React__default.createElement("svg", Object.assign({
|
|
514
|
+
height: size + "px",
|
|
515
|
+
width: size + "px",
|
|
516
|
+
version: "1.1",
|
|
517
|
+
id: "Capa_1",
|
|
518
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
519
|
+
viewBox: "0 0 510 510",
|
|
520
|
+
fill: color
|
|
521
|
+
}, props), React__default.createElement("g", {
|
|
522
|
+
id: "SVGRepo_bgCarrier"
|
|
523
|
+
}), React__default.createElement("g", {
|
|
524
|
+
id: "SVGRepo_tracerCarrier"
|
|
525
|
+
}), React__default.createElement("g", {
|
|
526
|
+
id: "SVGRepo_iconCarrier"
|
|
527
|
+
}, React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("path", {
|
|
528
|
+
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",
|
|
529
|
+
fill: color
|
|
530
|
+
}), React__default.createElement("path", {
|
|
531
|
+
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",
|
|
532
|
+
fill: color
|
|
533
|
+
}), React__default.createElement("path", {
|
|
534
|
+
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",
|
|
535
|
+
fill: color
|
|
536
|
+
}))))));
|
|
537
|
+
};
|
|
538
|
+
|
|
445
539
|
var IconSizes = {
|
|
446
540
|
xs: 12,
|
|
447
541
|
sm: 14,
|
|
@@ -455,7 +549,7 @@ var IconSizes = {
|
|
|
455
549
|
'6xl': 64
|
|
456
550
|
};
|
|
457
551
|
|
|
458
|
-
var _excluded$
|
|
552
|
+
var _excluded$e = ["children", "href", "iconSize", "underline", "isHovered", "isExternal", "styles", "setIsHovered"];
|
|
459
553
|
var LinkView = function LinkView(_ref) {
|
|
460
554
|
var children = _ref.children,
|
|
461
555
|
_ref$href = _ref.href,
|
|
@@ -475,7 +569,7 @@ var LinkView = function LinkView(_ref) {
|
|
|
475
569
|
} : _ref$styles,
|
|
476
570
|
_ref$setIsHovered = _ref.setIsHovered,
|
|
477
571
|
setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
|
|
478
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
572
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
479
573
|
var handleHover = function handleHover() {
|
|
480
574
|
if (underline === 'hover') setIsHovered(true);
|
|
481
575
|
};
|
|
@@ -613,7 +707,7 @@ var DefaultSpeeds = {
|
|
|
613
707
|
slow: 300
|
|
614
708
|
};
|
|
615
709
|
|
|
616
|
-
var _excluded$
|
|
710
|
+
var _excluded$f = ["size", "speed", "color"],
|
|
617
711
|
_excluded2 = ["size", "speed", "color"],
|
|
618
712
|
_excluded3 = ["size", "speed", "color"],
|
|
619
713
|
_excluded4 = ["size", "children", "textColor", "loaderColor", "type", "speed", "textPosition"];
|
|
@@ -624,7 +718,7 @@ var DefaultSpinner = function DefaultSpinner(_ref) {
|
|
|
624
718
|
speed = _ref$speed === void 0 ? 'normal' : _ref$speed,
|
|
625
719
|
_ref$color = _ref.color,
|
|
626
720
|
color = _ref$color === void 0 ? 'theme.loading' : _ref$color,
|
|
627
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
721
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
628
722
|
var theme = appStudio.useTheme();
|
|
629
723
|
var colorStyle = theme.getColor(color);
|
|
630
724
|
var sizeStyle = typeof size === 'number' ? size : DefaultSizes[size];
|
|
@@ -798,7 +892,7 @@ var LoaderComponent = function LoaderComponent(props) {
|
|
|
798
892
|
*/
|
|
799
893
|
var Loader = LoaderComponent;
|
|
800
894
|
|
|
801
|
-
var _excluded$
|
|
895
|
+
var _excluded$g = ["icon", "shadow", "children", "ariaLabel", "externalHref", "isAuto", "isFilled", "isIconRounded", "isLoading", "isDisabled", "size", "variant", "iconPosition", "colorScheme", "shape", "onClick", "loaderProps", "loaderPosition", "effect", "isHovered"];
|
|
802
896
|
var ButtonView = function ButtonView(_ref) {
|
|
803
897
|
var _props$onClick;
|
|
804
898
|
var icon = _ref.icon,
|
|
@@ -835,7 +929,7 @@ var ButtonView = function ButtonView(_ref) {
|
|
|
835
929
|
_ref$effect = _ref.effect,
|
|
836
930
|
effect = _ref$effect === void 0 ? 'default' : _ref$effect,
|
|
837
931
|
isHovered = _ref.isHovered,
|
|
838
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
932
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
839
933
|
var isActive = !(isDisabled || isLoading);
|
|
840
934
|
var defaultNativeProps = {
|
|
841
935
|
disabled: !isActive
|
|
@@ -979,7 +1073,7 @@ var HeadingSizes = {
|
|
|
979
1073
|
}
|
|
980
1074
|
};
|
|
981
1075
|
|
|
982
|
-
var _excluded$
|
|
1076
|
+
var _excluded$h = ["children", "heading", "isItalic", "isUnderlined", "isStriked", "weight", "size"];
|
|
983
1077
|
var LabelView = function LabelView(_ref) {
|
|
984
1078
|
var children = _ref.children,
|
|
985
1079
|
heading = _ref.heading,
|
|
@@ -993,7 +1087,7 @@ var LabelView = function LabelView(_ref) {
|
|
|
993
1087
|
weight = _ref$weight === void 0 ? 'normal' : _ref$weight,
|
|
994
1088
|
_ref$size = _ref.size,
|
|
995
1089
|
size = _ref$size === void 0 ? 'sm' : _ref$size,
|
|
996
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1090
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
997
1091
|
var headingStyles = heading ? HeadingSizes[heading] : {};
|
|
998
1092
|
return React__default.createElement(appStudio.Element, Object.assign({
|
|
999
1093
|
as: "label",
|
|
@@ -1065,7 +1159,7 @@ var IconSizes$2 = {
|
|
|
1065
1159
|
'6xl': 60
|
|
1066
1160
|
};
|
|
1067
1161
|
|
|
1068
|
-
var _excluded$
|
|
1162
|
+
var _excluded$i = ["id", "icon", "name", "label", "isChecked", "onChange", "onValueChange", "shadow", "labelPosition", "size", "colorScheme", "error", "isSelected", "isHovered", "isDisabled", "isReadOnly", "isIndeterminate", "defaultIsSelected", "setIsSelected", "setIsHovered", "styles"];
|
|
1069
1163
|
var CheckboxView = function CheckboxView(_ref) {
|
|
1070
1164
|
var id = _ref.id,
|
|
1071
1165
|
icon = _ref.icon,
|
|
@@ -1102,7 +1196,7 @@ var CheckboxView = function CheckboxView(_ref) {
|
|
|
1102
1196
|
checkbox: {},
|
|
1103
1197
|
label: {}
|
|
1104
1198
|
} : _ref$styles,
|
|
1105
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1199
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
|
1106
1200
|
var handleHover = function handleHover() {
|
|
1107
1201
|
return setIsHovered(!isHovered);
|
|
1108
1202
|
};
|
|
@@ -2676,7 +2770,7 @@ var HeadingSizes$1 = {
|
|
|
2676
2770
|
}
|
|
2677
2771
|
};
|
|
2678
2772
|
|
|
2679
|
-
var _excluded$
|
|
2773
|
+
var _excluded$j = ["children", "heading", "maxLines", "isItalic", "isUnderlined", "isSub", "isSup", "isStriked", "isTruncated", "weight", "size"];
|
|
2680
2774
|
var TextContent = function TextContent(_ref) {
|
|
2681
2775
|
var children = _ref.children,
|
|
2682
2776
|
isSub = _ref.isSub,
|
|
@@ -2740,7 +2834,7 @@ var TextView = function TextView(_ref3) {
|
|
|
2740
2834
|
weight = _ref3$weight === void 0 ? 'normal' : _ref3$weight,
|
|
2741
2835
|
_ref3$size = _ref3.size,
|
|
2742
2836
|
size = _ref3$size === void 0 ? 'md' : _ref3$size,
|
|
2743
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded$
|
|
2837
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded$j);
|
|
2744
2838
|
var headingStyles = heading ? HeadingSizes$1[heading] : {};
|
|
2745
2839
|
var noLineBreak = isSub || isSup ? {
|
|
2746
2840
|
display: 'inline'
|
|
@@ -2770,14 +2864,14 @@ var TextComponent = function TextComponent(props) {
|
|
|
2770
2864
|
*/
|
|
2771
2865
|
var Text = TextComponent;
|
|
2772
2866
|
|
|
2773
|
-
var _excluded$
|
|
2867
|
+
var _excluded$k = ["children", "styles"];
|
|
2774
2868
|
var HelperText = function HelperText(_ref) {
|
|
2775
2869
|
var children = _ref.children,
|
|
2776
2870
|
_ref$styles = _ref.styles,
|
|
2777
2871
|
styles = _ref$styles === void 0 ? {
|
|
2778
2872
|
helperText: {}
|
|
2779
2873
|
} : _ref$styles,
|
|
2780
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2874
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$k);
|
|
2781
2875
|
return React__default.createElement(Text, Object.assign({
|
|
2782
2876
|
size: "xs",
|
|
2783
2877
|
marginVertical: 0,
|
|
@@ -2786,7 +2880,7 @@ var HelperText = function HelperText(_ref) {
|
|
|
2786
2880
|
}, styles['helperText'], props), children);
|
|
2787
2881
|
};
|
|
2788
2882
|
|
|
2789
|
-
var _excluded$
|
|
2883
|
+
var _excluded$l = ["children", "wrap", "justify", "isReversed"];
|
|
2790
2884
|
var VerticalView = function VerticalView(_ref) {
|
|
2791
2885
|
var children = _ref.children,
|
|
2792
2886
|
_ref$wrap = _ref.wrap,
|
|
@@ -2795,7 +2889,7 @@ var VerticalView = function VerticalView(_ref) {
|
|
|
2795
2889
|
justify = _ref$justify === void 0 ? 'flex-start' : _ref$justify,
|
|
2796
2890
|
_ref$isReversed = _ref.isReversed,
|
|
2797
2891
|
isReversed = _ref$isReversed === void 0 ? false : _ref$isReversed,
|
|
2798
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2892
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$l);
|
|
2799
2893
|
return React__default.createElement(appStudio.View, Object.assign({
|
|
2800
2894
|
display: "flex",
|
|
2801
2895
|
flexWrap: wrap,
|
|
@@ -2812,14 +2906,14 @@ var VerticalComponent = function VerticalComponent(props) {
|
|
|
2812
2906
|
};
|
|
2813
2907
|
var Vertical = VerticalComponent;
|
|
2814
2908
|
|
|
2815
|
-
var _excluded$
|
|
2909
|
+
var _excluded$m = ["children", "helperText", "error", "styles"];
|
|
2816
2910
|
var FieldContainer = function FieldContainer(_ref) {
|
|
2817
2911
|
var children = _ref.children,
|
|
2818
2912
|
helperText = _ref.helperText,
|
|
2819
2913
|
_ref$error = _ref.error,
|
|
2820
2914
|
error = _ref$error === void 0 ? false : _ref$error,
|
|
2821
2915
|
styles = _ref.styles,
|
|
2822
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2916
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$m);
|
|
2823
2917
|
return React__default.createElement(Vertical, Object.assign({
|
|
2824
2918
|
gap: 5,
|
|
2825
2919
|
position: "relative"
|
|
@@ -2878,7 +2972,7 @@ var PaddingWithoutLabel = {
|
|
|
2878
2972
|
paddingRight: 36
|
|
2879
2973
|
};
|
|
2880
2974
|
|
|
2881
|
-
var _excluded$
|
|
2975
|
+
var _excluded$n = ["label", "shadow", "children", "value", "size", "shape", "variant", "error", "isWithLabel", "isFocused", "isHovered", "isDisabled", "isReadOnly", "colorScheme", "styles"];
|
|
2882
2976
|
var FieldContent = function FieldContent(_ref) {
|
|
2883
2977
|
var shadow = _ref.shadow,
|
|
2884
2978
|
children = _ref.children,
|
|
@@ -2906,7 +3000,7 @@ var FieldContent = function FieldContent(_ref) {
|
|
|
2906
3000
|
styles = _ref$styles === void 0 ? {
|
|
2907
3001
|
pickerBox: {}
|
|
2908
3002
|
} : _ref$styles,
|
|
2909
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3003
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$n);
|
|
2910
3004
|
var isInteractive = (isHovered || isFocused) && !isDisabled;
|
|
2911
3005
|
var color = error ? 'error' : isInteractive ? colorScheme : 'midgray';
|
|
2912
3006
|
return React__default.createElement(Horizontal, Object.assign({
|
|
@@ -2927,10 +3021,10 @@ var FieldContent = function FieldContent(_ref) {
|
|
|
2927
3021
|
}, isWithLabel ? PadddingWithLabel : PaddingWithoutLabel, shadow, Shapes[shape], InputVariants[variant], styles['box'], props), children);
|
|
2928
3022
|
};
|
|
2929
3023
|
|
|
2930
|
-
var _excluded$
|
|
3024
|
+
var _excluded$o = ["children"];
|
|
2931
3025
|
var FieldIcons = function FieldIcons(_ref) {
|
|
2932
3026
|
var children = _ref.children,
|
|
2933
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3027
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
2934
3028
|
return React__default.createElement(Center, Object.assign({
|
|
2935
3029
|
gap: 10,
|
|
2936
3030
|
right: 16,
|
|
@@ -2940,7 +3034,7 @@ var FieldIcons = function FieldIcons(_ref) {
|
|
|
2940
3034
|
}, props), children);
|
|
2941
3035
|
};
|
|
2942
3036
|
|
|
2943
|
-
var _excluded$
|
|
3037
|
+
var _excluded$p = ["children", "size", "error", "color", "styles"];
|
|
2944
3038
|
var FieldLabel = function FieldLabel(_ref) {
|
|
2945
3039
|
var children = _ref.children,
|
|
2946
3040
|
_ref$size = _ref.size,
|
|
@@ -2953,7 +3047,7 @@ var FieldLabel = function FieldLabel(_ref) {
|
|
|
2953
3047
|
styles = _ref$styles === void 0 ? {
|
|
2954
3048
|
label: {}
|
|
2955
3049
|
} : _ref$styles,
|
|
2956
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3050
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
2957
3051
|
return React__default.createElement(Label, Object.assign({
|
|
2958
3052
|
top: 6,
|
|
2959
3053
|
zIndex: 1000,
|
|
@@ -2966,10 +3060,10 @@ var FieldLabel = function FieldLabel(_ref) {
|
|
|
2966
3060
|
}, styles['label'], props), children);
|
|
2967
3061
|
};
|
|
2968
3062
|
|
|
2969
|
-
var _excluded$
|
|
3063
|
+
var _excluded$q = ["children"];
|
|
2970
3064
|
var FieldWrapper = function FieldWrapper(_ref) {
|
|
2971
3065
|
var children = _ref.children,
|
|
2972
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3066
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
2973
3067
|
return React__default.createElement(Vertical, Object.assign({
|
|
2974
3068
|
width: "100%"
|
|
2975
3069
|
}, props), children);
|
|
@@ -2983,7 +3077,7 @@ var IconSizes$3 = {
|
|
|
2983
3077
|
xl: 16
|
|
2984
3078
|
};
|
|
2985
3079
|
|
|
2986
|
-
var _excluded$
|
|
3080
|
+
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"];
|
|
2987
3081
|
var CountryList = function CountryList(props) {
|
|
2988
3082
|
return React__default.createElement(appStudio.Element, Object.assign({
|
|
2989
3083
|
as: "ul"
|
|
@@ -3123,7 +3217,7 @@ var CountryPickerView = function CountryPickerView(_ref3) {
|
|
|
3123
3217
|
helperText: {},
|
|
3124
3218
|
box: {}
|
|
3125
3219
|
} : _ref3$styles,
|
|
3126
|
-
props = _objectWithoutPropertiesLoose(_ref3, _excluded$
|
|
3220
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded$r);
|
|
3127
3221
|
var _useTheme = appStudio.useTheme(),
|
|
3128
3222
|
getColor = _useTheme.getColor;
|
|
3129
3223
|
var IconColor = getColor('color.blueGray.700');
|
|
@@ -3261,7 +3355,7 @@ var useDatePickerState = function useDatePickerState() {
|
|
|
3261
3355
|
};
|
|
3262
3356
|
};
|
|
3263
3357
|
|
|
3264
|
-
var _excluded$
|
|
3358
|
+
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"];
|
|
3265
3359
|
var DatePickerContent = function DatePickerContent(props) {
|
|
3266
3360
|
return React__default.createElement(appStudio.Input, Object.assign({
|
|
3267
3361
|
type: "date"
|
|
@@ -3309,7 +3403,7 @@ var DatePickerView = function DatePickerView(_ref) {
|
|
|
3309
3403
|
setIsHovered = _ref$setIsHovered === void 0 ? function () {} : _ref$setIsHovered,
|
|
3310
3404
|
onChange = _ref.onChange,
|
|
3311
3405
|
onChangeText = _ref.onChangeText,
|
|
3312
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3406
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
3313
3407
|
var isWithLabel = !!(isFocused && label);
|
|
3314
3408
|
var handleHover = function handleHover() {
|
|
3315
3409
|
return setIsHovered(!isHovered);
|
|
@@ -3434,7 +3528,7 @@ var usePasswordState = function usePasswordState(props) {
|
|
|
3434
3528
|
}, props, textFieldStates);
|
|
3435
3529
|
};
|
|
3436
3530
|
|
|
3437
|
-
var _excluded$
|
|
3531
|
+
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"];
|
|
3438
3532
|
var TextFieldInput = function TextFieldInput(props) {
|
|
3439
3533
|
return React__default.createElement(appStudio.Input, Object.assign({
|
|
3440
3534
|
type: "text"
|
|
@@ -3492,7 +3586,7 @@ var TextFieldView = function TextFieldView(_ref) {
|
|
|
3492
3586
|
onFocus = _ref.onFocus,
|
|
3493
3587
|
_ref$onBlur = _ref.onBlur,
|
|
3494
3588
|
onBlur = _ref$onBlur === void 0 ? function () {} : _ref$onBlur,
|
|
3495
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3589
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
3496
3590
|
var _useTheme = appStudio.useTheme(),
|
|
3497
3591
|
getColor = _useTheme.getColor;
|
|
3498
3592
|
var IconColor = getColor('color.blueGray.700');
|
|
@@ -3600,7 +3694,7 @@ var TextFieldView = function TextFieldView(_ref) {
|
|
|
3600
3694
|
}), rightChild && React__default.createElement(React__default.Fragment, null, rightChild))));
|
|
3601
3695
|
};
|
|
3602
3696
|
|
|
3603
|
-
var _excluded$
|
|
3697
|
+
var _excluded$u = ["visibleIcon", "hiddenIcon"],
|
|
3604
3698
|
_excluded2$1 = ["isVisible", "setIsVisible"];
|
|
3605
3699
|
var PasswordComponent = function PasswordComponent(_ref) {
|
|
3606
3700
|
var _ref$visibleIcon = _ref.visibleIcon,
|
|
@@ -3611,7 +3705,7 @@ var PasswordComponent = function PasswordComponent(_ref) {
|
|
|
3611
3705
|
hiddenIcon = _ref$hiddenIcon === void 0 ? React__default.createElement(CloseEyeSvg, {
|
|
3612
3706
|
size: 14
|
|
3613
3707
|
}) : _ref$hiddenIcon,
|
|
3614
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3708
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
3615
3709
|
var _usePasswordState = usePasswordState(props),
|
|
3616
3710
|
isVisible = _usePasswordState.isVisible,
|
|
3617
3711
|
setIsVisible = _usePasswordState.setIsVisible,
|
|
@@ -3679,7 +3773,7 @@ var IconSizes$4 = {
|
|
|
3679
3773
|
xl: 16
|
|
3680
3774
|
};
|
|
3681
3775
|
|
|
3682
|
-
var _excluded$
|
|
3776
|
+
var _excluded$v = ["isHovered", "setIsHovered", "option", "size", "callback"],
|
|
3683
3777
|
_excluded2$2 = ["id", "name", "value", "onChange", "isMulti", "isDisabled", "isReadOnly", "options"],
|
|
3684
3778
|
_excluded3$1 = ["option", "size", "removeOption"],
|
|
3685
3779
|
_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"];
|
|
@@ -3691,13 +3785,14 @@ var Item = function Item(_ref) {
|
|
|
3691
3785
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
|
3692
3786
|
_ref$callback = _ref.callback,
|
|
3693
3787
|
callback = _ref$callback === void 0 ? function () {} : _ref$callback,
|
|
3694
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3788
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$v);
|
|
3695
3789
|
var handleOptionClick = function handleOptionClick(option) {
|
|
3696
3790
|
return callback(option);
|
|
3697
3791
|
};
|
|
3698
3792
|
var handleHover = function handleHover() {
|
|
3699
3793
|
return setIsHovered(!isHovered);
|
|
3700
3794
|
};
|
|
3795
|
+
console.log(props.name);
|
|
3701
3796
|
return React__default.createElement(appStudio.Element, Object.assign({
|
|
3702
3797
|
as: "li",
|
|
3703
3798
|
margin: 0,
|
|
@@ -4162,7 +4257,7 @@ var SliderPadding = {
|
|
|
4162
4257
|
}
|
|
4163
4258
|
};
|
|
4164
4259
|
|
|
4165
|
-
var _excluded$
|
|
4260
|
+
var _excluded$w = ["id", "name", "label", "inActiveChild", "activeChild", "labelPosition", "shadow", "size", "colorScheme", "value", "isHovered", "isDisabled", "isReadOnly", "onChange", "setValue", "setIsHovered", "styles"];
|
|
4166
4261
|
var SwitchContent = function SwitchContent(props) {
|
|
4167
4262
|
return React__default.createElement(appStudio.Input, Object.assign({
|
|
4168
4263
|
type: "checkbox"
|
|
@@ -4201,7 +4296,7 @@ var SwitchView = function SwitchView(_ref) {
|
|
|
4201
4296
|
circle: {},
|
|
4202
4297
|
label: {}
|
|
4203
4298
|
} : _ref$styles,
|
|
4204
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4299
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$w);
|
|
4205
4300
|
var handleToggle = function handleToggle(event) {
|
|
4206
4301
|
if (!isReadOnly) {
|
|
4207
4302
|
setValue(!value);
|
|
@@ -4287,7 +4382,7 @@ var useTextAreaState = function useTextAreaState(_ref) {
|
|
|
4287
4382
|
};
|
|
4288
4383
|
};
|
|
4289
4384
|
|
|
4290
|
-
var _excluded$
|
|
4385
|
+
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"];
|
|
4291
4386
|
var TextAreaView = function TextAreaView(_ref) {
|
|
4292
4387
|
var id = _ref.id,
|
|
4293
4388
|
name = _ref.name,
|
|
@@ -4342,7 +4437,7 @@ var TextAreaView = function TextAreaView(_ref) {
|
|
|
4342
4437
|
helperText: {},
|
|
4343
4438
|
field: {}
|
|
4344
4439
|
} : _ref$styles,
|
|
4345
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4440
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
4346
4441
|
var isWithLabel = !!(isFocused && label);
|
|
4347
4442
|
var fieldStyles = _extends({
|
|
4348
4443
|
margin: 0,
|
|
@@ -4510,7 +4605,7 @@ var FormikForm = function FormikForm(_ref) {
|
|
|
4510
4605
|
}, React__default.createElement(appStudio.Form, null, children));
|
|
4511
4606
|
};
|
|
4512
4607
|
|
|
4513
|
-
var _excluded$
|
|
4608
|
+
var _excluded$y = ["name", "type"];
|
|
4514
4609
|
var getInputTypeProps = function getInputTypeProps(type) {
|
|
4515
4610
|
switch (type) {
|
|
4516
4611
|
case 'email':
|
|
@@ -4540,7 +4635,7 @@ var getInputTypeProps = function getInputTypeProps(type) {
|
|
|
4540
4635
|
var useFormikInput = function useFormikInput(_ref) {
|
|
4541
4636
|
var name = _ref.name,
|
|
4542
4637
|
type = _ref.type,
|
|
4543
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4638
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
4544
4639
|
var focus = useFormFocus();
|
|
4545
4640
|
var _useFormikContext = formik.useFormikContext(),
|
|
4546
4641
|
touched = _useFormikContext.touched,
|
|
@@ -4587,11 +4682,11 @@ var useFormikInput = function useFormikInput(_ref) {
|
|
|
4587
4682
|
// import FormRater from 'src/Rate/Rate';
|
|
4588
4683
|
// import Upload from 'src/Upload/Upload';
|
|
4589
4684
|
|
|
4590
|
-
var _excluded$
|
|
4685
|
+
var _excluded$z = ["value"];
|
|
4591
4686
|
var CheckboxComponent$1 = function CheckboxComponent(props) {
|
|
4592
4687
|
var _useFormikInput = useFormikInput(props),
|
|
4593
4688
|
value = _useFormikInput.value,
|
|
4594
|
-
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$
|
|
4689
|
+
formProps = _objectWithoutPropertiesLoose(_useFormikInput, _excluded$z);
|
|
4595
4690
|
formProps.isChecked = value;
|
|
4596
4691
|
var checkboxStates = useCheckboxState(props);
|
|
4597
4692
|
return React__default.createElement(CheckboxView, Object.assign({}, checkboxStates, formProps));
|
|
@@ -4649,11 +4744,11 @@ var TextAreaComponent$1 = function TextAreaComponent(props) {
|
|
|
4649
4744
|
*/
|
|
4650
4745
|
var FormikTextArea = TextAreaComponent$1;
|
|
4651
4746
|
|
|
4652
|
-
var _excluded$
|
|
4747
|
+
var _excluded$A = ["value"];
|
|
4653
4748
|
var TextFieldComponent$1 = function TextFieldComponent(props) {
|
|
4654
4749
|
var formProps = useFormikInput(props);
|
|
4655
4750
|
var _useTextFieldState = useTextFieldState(props),
|
|
4656
|
-
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$
|
|
4751
|
+
textFieldStates = _objectWithoutPropertiesLoose(_useTextFieldState, _excluded$A);
|
|
4657
4752
|
return React__default.createElement(TextFieldView, Object.assign({}, textFieldStates, formProps));
|
|
4658
4753
|
};
|
|
4659
4754
|
/**
|
|
@@ -4661,7 +4756,7 @@ var TextFieldComponent$1 = function TextFieldComponent(props) {
|
|
|
4661
4756
|
*/
|
|
4662
4757
|
var FormikTextField = TextFieldComponent$1;
|
|
4663
4758
|
|
|
4664
|
-
var _excluded$
|
|
4759
|
+
var _excluded$B = ["visibleIcon", "hiddenIcon"],
|
|
4665
4760
|
_excluded2$3 = ["isVisible", "setIsVisible"];
|
|
4666
4761
|
var PasswordComponent$1 = function PasswordComponent(_ref) {
|
|
4667
4762
|
var _ref$visibleIcon = _ref.visibleIcon,
|
|
@@ -4672,7 +4767,7 @@ var PasswordComponent$1 = function PasswordComponent(_ref) {
|
|
|
4672
4767
|
hiddenIcon = _ref$hiddenIcon === void 0 ? React__default.createElement(CloseEyeSvg, {
|
|
4673
4768
|
size: 14
|
|
4674
4769
|
}) : _ref$hiddenIcon,
|
|
4675
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
4770
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$B);
|
|
4676
4771
|
var formProps = useFormikInput(props);
|
|
4677
4772
|
var _usePasswordState = usePasswordState(formProps),
|
|
4678
4773
|
isVisible = _usePasswordState.isVisible,
|
|
@@ -4695,6 +4790,271 @@ var PasswordComponent$1 = function PasswordComponent(_ref) {
|
|
|
4695
4790
|
*/
|
|
4696
4791
|
var FormikPassword = PasswordComponent$1;
|
|
4697
4792
|
|
|
4793
|
+
// Import the necessary types
|
|
4794
|
+
// Define the useComboBoxState hook properly with types
|
|
4795
|
+
var useComboBoxState = function useComboBoxState(items, placeholder, searchPlaceholder) {
|
|
4796
|
+
var _useState = React.useState(items),
|
|
4797
|
+
filteredItems = _useState[0],
|
|
4798
|
+
setFilteredItems = _useState[1];
|
|
4799
|
+
var _useState2 = React.useState(placeholder ? {
|
|
4800
|
+
value: placeholder,
|
|
4801
|
+
label: placeholder
|
|
4802
|
+
} : items[0]),
|
|
4803
|
+
selectedItem = _useState2[0],
|
|
4804
|
+
setSelectedItem = _useState2[1];
|
|
4805
|
+
var _useState3 = React.useState(0),
|
|
4806
|
+
highlightedIndex = _useState3[0],
|
|
4807
|
+
setHighlightedIndex = _useState3[1];
|
|
4808
|
+
var _useState4 = React.useState(searchPlaceholder != null ? searchPlaceholder : ''),
|
|
4809
|
+
searchQuery = _useState4[0],
|
|
4810
|
+
setSearchQuery = _useState4[1];
|
|
4811
|
+
var _useState5 = React.useState(false),
|
|
4812
|
+
isDropdownVisible = _useState5[0],
|
|
4813
|
+
setIsDropdownVisible = _useState5[1];
|
|
4814
|
+
return {
|
|
4815
|
+
filteredItems: filteredItems,
|
|
4816
|
+
setFilteredItems: setFilteredItems,
|
|
4817
|
+
selectedItem: selectedItem,
|
|
4818
|
+
setSelectedItem: setSelectedItem,
|
|
4819
|
+
highlightedIndex: highlightedIndex,
|
|
4820
|
+
setHighlightedIndex: setHighlightedIndex,
|
|
4821
|
+
searchQuery: searchQuery,
|
|
4822
|
+
setSearchQuery: setSearchQuery,
|
|
4823
|
+
isDropdownVisible: isDropdownVisible,
|
|
4824
|
+
setIsDropdownVisible: setIsDropdownVisible
|
|
4825
|
+
};
|
|
4826
|
+
};
|
|
4827
|
+
|
|
4828
|
+
var _excluded$C = ["size", "color"];
|
|
4829
|
+
var TickSvg = function TickSvg(_ref) {
|
|
4830
|
+
var _ref$size = _ref.size,
|
|
4831
|
+
size = _ref$size === void 0 ? 16 : _ref$size,
|
|
4832
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$C);
|
|
4833
|
+
return React__default.createElement(Center, {
|
|
4834
|
+
width: size + "px",
|
|
4835
|
+
height: size + "px"
|
|
4836
|
+
}, React__default.createElement("svg", Object.assign({
|
|
4837
|
+
width: size + "px",
|
|
4838
|
+
height: size + "px",
|
|
4839
|
+
viewBox: "0 -0.5 25 25",
|
|
4840
|
+
fill: "none",
|
|
4841
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
4842
|
+
}, props), React__default.createElement("g", {
|
|
4843
|
+
id: "SVGRepo_bgCarrier",
|
|
4844
|
+
strokeWidth: "0"
|
|
4845
|
+
}), React__default.createElement("g", {
|
|
4846
|
+
id: "SVGRepo_tracerCarrier",
|
|
4847
|
+
strokeLinecap: "round",
|
|
4848
|
+
strokeLinejoin: "round"
|
|
4849
|
+
}), React__default.createElement("g", {
|
|
4850
|
+
id: "SVGRepo_iconCarrier"
|
|
4851
|
+
}, ' ', React__default.createElement("path", {
|
|
4852
|
+
d: "M5.5 12.5L10.167 17L19.5 8",
|
|
4853
|
+
stroke: "#444444",
|
|
4854
|
+
strokeWidth: "1.5",
|
|
4855
|
+
strokeLinecap: "round",
|
|
4856
|
+
strokeLinejoin: "round"
|
|
4857
|
+
}), ' ')));
|
|
4858
|
+
};
|
|
4859
|
+
|
|
4860
|
+
var _excluded$D = ["size", "color"];
|
|
4861
|
+
var SearchLoopSvg = function SearchLoopSvg(_ref) {
|
|
4862
|
+
var _ref$size = _ref.size,
|
|
4863
|
+
size = _ref$size === void 0 ? 14 : _ref$size,
|
|
4864
|
+
_ref$color = _ref.color,
|
|
4865
|
+
color = _ref$color === void 0 ? '#c0c0c0' : _ref$color,
|
|
4866
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$D);
|
|
4867
|
+
return React__default.createElement(Center, {
|
|
4868
|
+
width: size + "px",
|
|
4869
|
+
height: size + "px"
|
|
4870
|
+
}, React__default.createElement("svg", Object.assign({
|
|
4871
|
+
fill: "#c0c0c0",
|
|
4872
|
+
width: size + "px",
|
|
4873
|
+
height: size + "px",
|
|
4874
|
+
version: "1.1",
|
|
4875
|
+
id: "Capa_1",
|
|
4876
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4877
|
+
viewBox: "0 0 488.4 488.4",
|
|
4878
|
+
stroke: color
|
|
4879
|
+
}, props), React__default.createElement("g", {
|
|
4880
|
+
id: "SVGRepo_bgCarrier",
|
|
4881
|
+
strokeWidth: "9.279599999999999"
|
|
4882
|
+
}), React__default.createElement("g", {
|
|
4883
|
+
id: "SVGRepo_tracerCarrier",
|
|
4884
|
+
strokeLinecap: "round",
|
|
4885
|
+
strokeLinejoin: "round"
|
|
4886
|
+
}), React__default.createElement("g", {
|
|
4887
|
+
id: "SVGRepo_iconCarrier"
|
|
4888
|
+
}, React__default.createElement("g", null, React__default.createElement("g", null, React__default.createElement("path", {
|
|
4889
|
+
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"
|
|
4890
|
+
}), ' ')))));
|
|
4891
|
+
};
|
|
4892
|
+
|
|
4893
|
+
var _excluded$E = ["placeholder", "items", "showTick", "onSelect", "searchEnabled", "left", "right", "label", "filteredItems", "setSelectedItem", "selectedItem", "highlightedIndex", "setHighlightedIndex", "searchQuery", "setSearchQuery", "setFilteredItems", "styles", "isDropdownVisible", "setIsDropdownVisible"];
|
|
4894
|
+
var ComboBoxView = function ComboBoxView(_ref) {
|
|
4895
|
+
var placeholder = _ref.placeholder,
|
|
4896
|
+
items = _ref.items,
|
|
4897
|
+
_ref$showTick = _ref.showTick,
|
|
4898
|
+
showTick = _ref$showTick === void 0 ? true : _ref$showTick,
|
|
4899
|
+
onSelect = _ref.onSelect,
|
|
4900
|
+
_ref$searchEnabled = _ref.searchEnabled,
|
|
4901
|
+
searchEnabled = _ref$searchEnabled === void 0 ? true : _ref$searchEnabled,
|
|
4902
|
+
left = _ref.left,
|
|
4903
|
+
right = _ref.right,
|
|
4904
|
+
label = _ref.label,
|
|
4905
|
+
filteredItems = _ref.filteredItems,
|
|
4906
|
+
setSelectedItem = _ref.setSelectedItem,
|
|
4907
|
+
selectedItem = _ref.selectedItem,
|
|
4908
|
+
highlightedIndex = _ref.highlightedIndex,
|
|
4909
|
+
setHighlightedIndex = _ref.setHighlightedIndex,
|
|
4910
|
+
searchQuery = _ref.searchQuery,
|
|
4911
|
+
setSearchQuery = _ref.setSearchQuery,
|
|
4912
|
+
setFilteredItems = _ref.setFilteredItems,
|
|
4913
|
+
styles = _ref.styles,
|
|
4914
|
+
isDropdownVisible = _ref.isDropdownVisible,
|
|
4915
|
+
setIsDropdownVisible = _ref.setIsDropdownVisible,
|
|
4916
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$E);
|
|
4917
|
+
React.useEffect(function () {
|
|
4918
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
4919
|
+
var path = event.composedPath();
|
|
4920
|
+
var isOutside = !path.some(function (element) {
|
|
4921
|
+
return (element == null ? void 0 : element.id) === 'combobox-dropdown';
|
|
4922
|
+
});
|
|
4923
|
+
if (isOutside) {
|
|
4924
|
+
setIsDropdownVisible(false);
|
|
4925
|
+
}
|
|
4926
|
+
};
|
|
4927
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
4928
|
+
return function () {
|
|
4929
|
+
return document.removeEventListener('mousedown', handleClickOutside);
|
|
4930
|
+
};
|
|
4931
|
+
}, []);
|
|
4932
|
+
var handleSearch = function handleSearch(query) {
|
|
4933
|
+
setSearchQuery(query);
|
|
4934
|
+
if (query === '') {
|
|
4935
|
+
setFilteredItems(items);
|
|
4936
|
+
} else {
|
|
4937
|
+
var filtered = items.filter(function (item) {
|
|
4938
|
+
return item.label.toLowerCase().includes(query.toLowerCase());
|
|
4939
|
+
});
|
|
4940
|
+
setFilteredItems(filtered);
|
|
4941
|
+
}
|
|
4942
|
+
setHighlightedIndex(0);
|
|
4943
|
+
};
|
|
4944
|
+
var handleSelect = function handleSelect(item) {
|
|
4945
|
+
setSelectedItem(item);
|
|
4946
|
+
onSelect == null || onSelect(item);
|
|
4947
|
+
setIsDropdownVisible(false);
|
|
4948
|
+
};
|
|
4949
|
+
return React__default.createElement(Horizontal, Object.assign({
|
|
4950
|
+
role: "combobox",
|
|
4951
|
+
wrap: "nowrap",
|
|
4952
|
+
gap: 15,
|
|
4953
|
+
alignItems: "center",
|
|
4954
|
+
width: "100%"
|
|
4955
|
+
}, props), label && React__default.createElement(Text, {
|
|
4956
|
+
styles: styles == null ? void 0 : styles.label,
|
|
4957
|
+
htmlFor: props.id
|
|
4958
|
+
}, label), React__default.createElement(View, {
|
|
4959
|
+
position: "relative"
|
|
4960
|
+
}, React__default.createElement(Horizontal, Object.assign({
|
|
4961
|
+
cursor: "pointer",
|
|
4962
|
+
backgroundColor: "white",
|
|
4963
|
+
boxShadow: "rgba(0, 0, 0, 0.16) 0px 1px 4px",
|
|
4964
|
+
padding: "12px",
|
|
4965
|
+
display: "flex",
|
|
4966
|
+
alignItems: "center",
|
|
4967
|
+
borderRadius: "4px",
|
|
4968
|
+
justify: "space-between",
|
|
4969
|
+
minWidth: 300,
|
|
4970
|
+
wrap: "nowrap"
|
|
4971
|
+
}, styles == null ? void 0 : styles.container), React__default.createElement(Horizontal, Object.assign({
|
|
4972
|
+
gap: 15,
|
|
4973
|
+
alignItems: "center",
|
|
4974
|
+
position: "relative",
|
|
4975
|
+
width: "100%",
|
|
4976
|
+
onClick: function onClick() {
|
|
4977
|
+
return setIsDropdownVisible(!isDropdownVisible);
|
|
4978
|
+
}
|
|
4979
|
+
}, styles == null ? void 0 : styles.labelContainer), left, React__default.createElement(Text, Object.assign({
|
|
4980
|
+
weight: "medium",
|
|
4981
|
+
flexGrow: 1
|
|
4982
|
+
}, styles == null ? void 0 : styles.label), selectedItem.label)), right, isDropdownVisible && React__default.createElement(View, Object.assign({
|
|
4983
|
+
id: "combobox-dropdown",
|
|
4984
|
+
position: "absolute",
|
|
4985
|
+
backgroundColor: "white",
|
|
4986
|
+
boxShadow: "rgba(0, 0 ,0 ,0.16) 0px 1px 4px",
|
|
4987
|
+
width: "100%",
|
|
4988
|
+
overflowY: "auto",
|
|
4989
|
+
zIndex: 10000,
|
|
4990
|
+
bottom: -8,
|
|
4991
|
+
left: 0,
|
|
4992
|
+
transform: "translateY(100%)",
|
|
4993
|
+
marginTop: "4px",
|
|
4994
|
+
borderRadius: "4px"
|
|
4995
|
+
}, styles == null ? void 0 : styles.dropdown), searchEnabled && React__default.createElement(TextFieldView, {
|
|
4996
|
+
id: props.id,
|
|
4997
|
+
name: props.name,
|
|
4998
|
+
width: "100%",
|
|
4999
|
+
type: "search",
|
|
5000
|
+
value: searchQuery,
|
|
5001
|
+
onChange: function onChange(value) {
|
|
5002
|
+
return handleSearch(value);
|
|
5003
|
+
},
|
|
5004
|
+
hint: placeholder,
|
|
5005
|
+
isClearable: false,
|
|
5006
|
+
leftChild: React__default.createElement(SearchLoopSvg, {
|
|
5007
|
+
size: 12
|
|
5008
|
+
}),
|
|
5009
|
+
styles: {
|
|
5010
|
+
box: _extends({
|
|
5011
|
+
width: '100%',
|
|
5012
|
+
padding: '6px 12px',
|
|
5013
|
+
borderBottom: filteredItems.length > 0 ? '1px solid #ccc' : '1px solid transparent'
|
|
5014
|
+
}, styles == null ? void 0 : styles.text)
|
|
5015
|
+
}
|
|
5016
|
+
}), filteredItems.length > 0 && React__default.createElement(View, {
|
|
5017
|
+
margin: 0,
|
|
5018
|
+
padding: 4
|
|
5019
|
+
}, filteredItems.map(function (item, index) {
|
|
5020
|
+
return React__default.createElement(Horizontal, Object.assign({
|
|
5021
|
+
justify: "space-between",
|
|
5022
|
+
key: item.value,
|
|
5023
|
+
padding: "12px",
|
|
5024
|
+
cursor: "pointer",
|
|
5025
|
+
borderRadius: 4,
|
|
5026
|
+
backgroundColor: index === highlightedIndex ? 'color.gray.100' : 'transparent',
|
|
5027
|
+
onMouseEnter: function onMouseEnter() {
|
|
5028
|
+
return setHighlightedIndex(index);
|
|
5029
|
+
},
|
|
5030
|
+
onClick: function onClick() {
|
|
5031
|
+
return handleSelect(item);
|
|
5032
|
+
}
|
|
5033
|
+
}, styles == null ? void 0 : styles.item), React__default.createElement(Text, null, item.label), React__default.createElement(React__default.Fragment, null, item.icon && item.icon, item.value === selectedItem.value && showTick && !item.icon && React__default.createElement(TickSvg, null)));
|
|
5034
|
+
}))))));
|
|
5035
|
+
};
|
|
5036
|
+
|
|
5037
|
+
var _excluded$F = ["items", "placeholder", "searchPlaceholder"];
|
|
5038
|
+
var ComboBoxComponent = function ComboBoxComponent(_ref) {
|
|
5039
|
+
var items = _ref.items,
|
|
5040
|
+
placeholder = _ref.placeholder,
|
|
5041
|
+
searchPlaceholder = _ref.searchPlaceholder,
|
|
5042
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$F);
|
|
5043
|
+
var formProps = useFormikInput(props);
|
|
5044
|
+
var ComboBoxStates = useComboBoxState(items, placeholder, searchPlaceholder);
|
|
5045
|
+
// Ensure the onChange function from formProps is being called when an item is selected
|
|
5046
|
+
var handleSelect = function handleSelect(item) {
|
|
5047
|
+
formProps.onChange(item);
|
|
5048
|
+
};
|
|
5049
|
+
return React__default.createElement(ComboBoxView, Object.assign({}, ComboBoxStates, formProps, {
|
|
5050
|
+
onSelect: handleSelect
|
|
5051
|
+
}));
|
|
5052
|
+
};
|
|
5053
|
+
/**
|
|
5054
|
+
* ComboBox allows users to select one or more options from a list of choices.
|
|
5055
|
+
*/
|
|
5056
|
+
var FormikComboBox = ComboBoxComponent;
|
|
5057
|
+
|
|
4698
5058
|
var useModalStore = /*#__PURE__*/zustand.create(function (set) {
|
|
4699
5059
|
return {
|
|
4700
5060
|
modal: false,
|
|
@@ -4780,7 +5140,7 @@ var HeaderIconSizes = {
|
|
|
4780
5140
|
xl: 28
|
|
4781
5141
|
};
|
|
4782
5142
|
|
|
4783
|
-
var _excluded$
|
|
5143
|
+
var _excluded$G = ["children", "blur", "isOpen", "isClosePrevented", "onClose", "position"],
|
|
4784
5144
|
_excluded2$4 = ["children", "shadow", "isFullScreen", "shape"],
|
|
4785
5145
|
_excluded3$2 = ["children", "buttonColor", "iconSize", "buttonPosition"],
|
|
4786
5146
|
_excluded4$2 = ["children"],
|
|
@@ -4796,7 +5156,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
|
|
|
4796
5156
|
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
4797
5157
|
_ref$position = _ref.position,
|
|
4798
5158
|
position = _ref$position === void 0 ? 'center' : _ref$position,
|
|
4799
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5159
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$G);
|
|
4800
5160
|
var handleClick = function handleClick() {
|
|
4801
5161
|
if (!isClosePrevented) onClose();
|
|
4802
5162
|
};
|
|
@@ -4952,12 +5312,12 @@ Modal.Body = ModalBody;
|
|
|
4952
5312
|
Modal.Footer = ModalFooter;
|
|
4953
5313
|
Modal.Layout = ModalLayout;
|
|
4954
5314
|
|
|
4955
|
-
var _excluded$
|
|
5315
|
+
var _excluded$H = ["src", "color"],
|
|
4956
5316
|
_excluded2$5 = ["path"];
|
|
4957
5317
|
var FileSVG = function FileSVG(_ref) {
|
|
4958
5318
|
var src = _ref.src,
|
|
4959
5319
|
color = _ref.color,
|
|
4960
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5320
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$H);
|
|
4961
5321
|
var _useTheme = appStudio.useTheme(),
|
|
4962
5322
|
getColor = _useTheme.getColor;
|
|
4963
5323
|
var Colorprops = color ? {
|
|
@@ -5158,12 +5518,12 @@ var AlertComponent = function AlertComponent(_ref) {
|
|
|
5158
5518
|
};
|
|
5159
5519
|
var Alert = AlertComponent;
|
|
5160
5520
|
|
|
5161
|
-
var _excluded$
|
|
5521
|
+
var _excluded$I = ["ratio", "children"];
|
|
5162
5522
|
var AspectRatioView = function AspectRatioView(_ref) {
|
|
5163
5523
|
var _ref$ratio = _ref.ratio,
|
|
5164
5524
|
ratio = _ref$ratio === void 0 ? 16 / 9 : _ref$ratio,
|
|
5165
5525
|
children = _ref.children,
|
|
5166
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5526
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$I);
|
|
5167
5527
|
return React__default.createElement(Center, Object.assign({
|
|
5168
5528
|
width: '100%',
|
|
5169
5529
|
position: "relative",
|
|
@@ -5179,11 +5539,11 @@ var AspectRatioView = function AspectRatioView(_ref) {
|
|
|
5179
5539
|
}, children));
|
|
5180
5540
|
};
|
|
5181
5541
|
|
|
5182
|
-
var _excluded$
|
|
5542
|
+
var _excluded$J = ["ratio", "children"];
|
|
5183
5543
|
var AspectRatioComponent = function AspectRatioComponent(_ref) {
|
|
5184
5544
|
var ratio = _ref.ratio,
|
|
5185
5545
|
children = _ref.children,
|
|
5186
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5546
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$J);
|
|
5187
5547
|
return React__default.createElement(AspectRatioView, Object.assign({
|
|
5188
5548
|
ratio: ratio
|
|
5189
5549
|
}, props), children);
|
|
@@ -5296,7 +5656,6 @@ var BadgeShapes = {
|
|
|
5296
5656
|
rounded: 4,
|
|
5297
5657
|
pillShaped: 24
|
|
5298
5658
|
};
|
|
5299
|
-
// Example of how you might adjust styles based on the 'position' prop
|
|
5300
5659
|
var PositionStyles = {
|
|
5301
5660
|
'top-right': {
|
|
5302
5661
|
top: 0,
|
|
@@ -5415,7 +5774,7 @@ var ToggleShapes = {
|
|
|
5415
5774
|
pillShaped: 24
|
|
5416
5775
|
};
|
|
5417
5776
|
|
|
5418
|
-
var _excluded$
|
|
5777
|
+
var _excluded$K = ["children", "shape", "colorScheme", "variant", "isHovered", "setIsHovered", "isDisabled", "isToggle", "setIsToggled", "onToggle"];
|
|
5419
5778
|
var ToggleView = function ToggleView(_ref) {
|
|
5420
5779
|
var children = _ref.children,
|
|
5421
5780
|
_ref$shape = _ref.shape,
|
|
@@ -5430,7 +5789,7 @@ var ToggleView = function ToggleView(_ref) {
|
|
|
5430
5789
|
isToggle = _ref.isToggle,
|
|
5431
5790
|
setIsToggled = _ref.setIsToggled,
|
|
5432
5791
|
onToggle = _ref.onToggle,
|
|
5433
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5792
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$K);
|
|
5434
5793
|
var toggleColor = !isDisabled ? colorScheme : 'theme.disabled';
|
|
5435
5794
|
var isActive = !!(isToggle || isHovered);
|
|
5436
5795
|
var ToggleVariants = {
|
|
@@ -5478,7 +5837,7 @@ var ToggleView = function ToggleView(_ref) {
|
|
|
5478
5837
|
}, ToggleVariants[variant], props), children);
|
|
5479
5838
|
};
|
|
5480
5839
|
|
|
5481
|
-
var _excluded$
|
|
5840
|
+
var _excluded$L = ["children", "shape", "colorScheme", "variant", "isDisabled", "isToggled", "onToggle"];
|
|
5482
5841
|
var ToggleComponent = function ToggleComponent(_ref) {
|
|
5483
5842
|
var children = _ref.children,
|
|
5484
5843
|
shape = _ref.shape,
|
|
@@ -5488,7 +5847,7 @@ var ToggleComponent = function ToggleComponent(_ref) {
|
|
|
5488
5847
|
_ref$isToggled = _ref.isToggled,
|
|
5489
5848
|
isToggled = _ref$isToggled === void 0 ? false : _ref$isToggled,
|
|
5490
5849
|
onToggle = _ref.onToggle,
|
|
5491
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
5850
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$L);
|
|
5492
5851
|
var _useToggleState = useToggleState(isToggled),
|
|
5493
5852
|
isHovered = _useToggleState.isHovered,
|
|
5494
5853
|
setIsHovered = _useToggleState.setIsHovered,
|
|
@@ -5548,7 +5907,7 @@ var ToggleGroupView = function ToggleGroupView(_ref) {
|
|
|
5548
5907
|
return newActiveToggles;
|
|
5549
5908
|
});
|
|
5550
5909
|
}, [onToggleChange, setActiveToggles]);
|
|
5551
|
-
return React__default.createElement(Horizontal
|
|
5910
|
+
return React__default.createElement(Horizontal, {
|
|
5552
5911
|
role: "ToggleGroup",
|
|
5553
5912
|
display: "flex",
|
|
5554
5913
|
gap: 5
|
|
@@ -5590,6 +5949,287 @@ var ToggleGroupComponent = function ToggleGroupComponent(_ref) {
|
|
|
5590
5949
|
};
|
|
5591
5950
|
var ToggleGroup = ToggleGroupComponent;
|
|
5592
5951
|
|
|
5952
|
+
// Create your store with the initial state and actions.
|
|
5953
|
+
var useMessageStore = /*#__PURE__*/zustand.create(function (set) {
|
|
5954
|
+
return {
|
|
5955
|
+
// initial state
|
|
5956
|
+
visible: false,
|
|
5957
|
+
title: '',
|
|
5958
|
+
subtitle: '',
|
|
5959
|
+
variant: 'info',
|
|
5960
|
+
isClosable: false,
|
|
5961
|
+
styles: {},
|
|
5962
|
+
action: function action() {},
|
|
5963
|
+
actionText: '',
|
|
5964
|
+
showIcon: false,
|
|
5965
|
+
timeout: 3000,
|
|
5966
|
+
show: function show(variant, title, subtitle, isClosable, styles, action, actionText, showIcon, timeout) {
|
|
5967
|
+
if (title === void 0) {
|
|
5968
|
+
title = '';
|
|
5969
|
+
}
|
|
5970
|
+
if (subtitle === void 0) {
|
|
5971
|
+
subtitle = '';
|
|
5972
|
+
}
|
|
5973
|
+
return set({
|
|
5974
|
+
visible: true,
|
|
5975
|
+
variant: variant,
|
|
5976
|
+
title: title,
|
|
5977
|
+
subtitle: subtitle,
|
|
5978
|
+
isClosable: isClosable,
|
|
5979
|
+
styles: styles,
|
|
5980
|
+
action: action,
|
|
5981
|
+
actionText: actionText,
|
|
5982
|
+
showIcon: showIcon,
|
|
5983
|
+
timeout: timeout
|
|
5984
|
+
});
|
|
5985
|
+
},
|
|
5986
|
+
hide: function hide() {
|
|
5987
|
+
return set({
|
|
5988
|
+
visible: false
|
|
5989
|
+
});
|
|
5990
|
+
}
|
|
5991
|
+
};
|
|
5992
|
+
});
|
|
5993
|
+
var showMessage = function showMessage(variant, title, subtitle, props) {
|
|
5994
|
+
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);
|
|
5995
|
+
};
|
|
5996
|
+
var hideMessage = function hideMessage() {
|
|
5997
|
+
useMessageStore.getState().hide();
|
|
5998
|
+
};
|
|
5999
|
+
|
|
6000
|
+
var Themes$1 = {
|
|
6001
|
+
info: {
|
|
6002
|
+
container: {
|
|
6003
|
+
backgroundColor: 'color.blue.200',
|
|
6004
|
+
border: 'color.blue.400'
|
|
6005
|
+
},
|
|
6006
|
+
icon: {
|
|
6007
|
+
color: 'color.blue.500',
|
|
6008
|
+
name: 'InformationSvg'
|
|
6009
|
+
},
|
|
6010
|
+
content: {
|
|
6011
|
+
color: 'color.blue.500'
|
|
6012
|
+
},
|
|
6013
|
+
close: {
|
|
6014
|
+
color: 'color.blue.500',
|
|
6015
|
+
name: 'CloseSvg'
|
|
6016
|
+
}
|
|
6017
|
+
},
|
|
6018
|
+
success: {
|
|
6019
|
+
container: {
|
|
6020
|
+
backgroundColor: 'color.green.200',
|
|
6021
|
+
border: 'color.green.400'
|
|
6022
|
+
},
|
|
6023
|
+
icon: {
|
|
6024
|
+
color: 'color.green.500',
|
|
6025
|
+
name: 'CheckCircleSvg'
|
|
6026
|
+
},
|
|
6027
|
+
content: {
|
|
6028
|
+
color: 'color.green.500'
|
|
6029
|
+
},
|
|
6030
|
+
close: {
|
|
6031
|
+
color: 'color.green.500',
|
|
6032
|
+
name: 'CloseSvg'
|
|
6033
|
+
}
|
|
6034
|
+
},
|
|
6035
|
+
error: {
|
|
6036
|
+
container: {
|
|
6037
|
+
backgroundColor: 'color.red.200',
|
|
6038
|
+
border: 'color.red.400'
|
|
6039
|
+
},
|
|
6040
|
+
icon: {
|
|
6041
|
+
color: 'color.red.500',
|
|
6042
|
+
name: 'ErrrorSvg'
|
|
6043
|
+
},
|
|
6044
|
+
content: {
|
|
6045
|
+
color: 'color.red.500'
|
|
6046
|
+
},
|
|
6047
|
+
close: {
|
|
6048
|
+
color: 'color.red.500',
|
|
6049
|
+
name: 'CloseSvg'
|
|
6050
|
+
}
|
|
6051
|
+
},
|
|
6052
|
+
warning: {
|
|
6053
|
+
container: {
|
|
6054
|
+
backgroundColor: 'color.orange.200',
|
|
6055
|
+
border: 'color.orange.400'
|
|
6056
|
+
},
|
|
6057
|
+
icon: {
|
|
6058
|
+
color: 'color.orange.500',
|
|
6059
|
+
name: 'ErrrorSvg'
|
|
6060
|
+
},
|
|
6061
|
+
content: {
|
|
6062
|
+
color: 'color.orange.500'
|
|
6063
|
+
},
|
|
6064
|
+
close: {
|
|
6065
|
+
color: 'color.orange.500',
|
|
6066
|
+
name: 'CloseSvg'
|
|
6067
|
+
}
|
|
6068
|
+
}
|
|
6069
|
+
};
|
|
6070
|
+
|
|
6071
|
+
var MessageView = function MessageView(_ref) {
|
|
6072
|
+
var _styles$closingIcon, _styles$closingIcon2;
|
|
6073
|
+
var variant = _ref.variant,
|
|
6074
|
+
hide = _ref.hide,
|
|
6075
|
+
title = _ref.title,
|
|
6076
|
+
subtitle = _ref.subtitle,
|
|
6077
|
+
theme = _ref.theme,
|
|
6078
|
+
action = _ref.action,
|
|
6079
|
+
actionText = _ref.actionText,
|
|
6080
|
+
_ref$showIcon = _ref.showIcon,
|
|
6081
|
+
showIcon = _ref$showIcon === void 0 ? false : _ref$showIcon,
|
|
6082
|
+
_ref$isClosable = _ref.isClosable,
|
|
6083
|
+
isClosable = _ref$isClosable === void 0 ? false : _ref$isClosable,
|
|
6084
|
+
_ref$timeout = _ref.timeout,
|
|
6085
|
+
timeout = _ref$timeout === void 0 ? 3000 : _ref$timeout,
|
|
6086
|
+
styles = _ref.styles;
|
|
6087
|
+
React.useEffect(function () {
|
|
6088
|
+
if (timeout && !isClosable) {
|
|
6089
|
+
var timeId = setTimeout(function () {
|
|
6090
|
+
// After 3 seconds set the show value to false
|
|
6091
|
+
hide();
|
|
6092
|
+
}, timeout);
|
|
6093
|
+
return function () {
|
|
6094
|
+
clearTimeout(timeId);
|
|
6095
|
+
};
|
|
6096
|
+
}
|
|
6097
|
+
return;
|
|
6098
|
+
}, []);
|
|
6099
|
+
var Theme = theme != null ? theme : Themes$1;
|
|
6100
|
+
var isWithAction = !!(action && actionText);
|
|
6101
|
+
var containerStyle = {
|
|
6102
|
+
borderWidth: 1,
|
|
6103
|
+
borderStyle: 'solid',
|
|
6104
|
+
borderRadius: 8,
|
|
6105
|
+
borderColor: "" + Theme[variant].container.border
|
|
6106
|
+
};
|
|
6107
|
+
var iconColor = {
|
|
6108
|
+
info: '#3b82f6',
|
|
6109
|
+
success: '#4ade80',
|
|
6110
|
+
warning: '#f97316',
|
|
6111
|
+
error: '#ef4444'
|
|
6112
|
+
}[variant];
|
|
6113
|
+
var iconComponent = {
|
|
6114
|
+
info: React__default.createElement(InfoSvg, Object.assign({
|
|
6115
|
+
size: 24,
|
|
6116
|
+
color: iconColor
|
|
6117
|
+
}, styles == null ? void 0 : styles.icon)),
|
|
6118
|
+
success: React__default.createElement(SuccessSvg, Object.assign({
|
|
6119
|
+
size: 24,
|
|
6120
|
+
color: iconColor
|
|
6121
|
+
}, styles == null ? void 0 : styles.icon)),
|
|
6122
|
+
warning: React__default.createElement(WarningSvg, Object.assign({
|
|
6123
|
+
size: 24,
|
|
6124
|
+
color: iconColor
|
|
6125
|
+
}, styles == null ? void 0 : styles.icon)),
|
|
6126
|
+
error: React__default.createElement(ErrorSvg, Object.assign({
|
|
6127
|
+
size: 24,
|
|
6128
|
+
color: iconColor
|
|
6129
|
+
}, styles == null ? void 0 : styles.icon))
|
|
6130
|
+
}[variant];
|
|
6131
|
+
var isShowIcon = showIcon && iconComponent;
|
|
6132
|
+
return React__default.createElement(Horizontal, Object.assign({
|
|
6133
|
+
role: "messageContent",
|
|
6134
|
+
gap: 16,
|
|
6135
|
+
width: 400,
|
|
6136
|
+
// safe={true}
|
|
6137
|
+
wrap: "nowrap",
|
|
6138
|
+
position: 'relative',
|
|
6139
|
+
alignItems: "center",
|
|
6140
|
+
padding: "14px 24px 14px 14px",
|
|
6141
|
+
color: "" + Theme[variant].content.color,
|
|
6142
|
+
backgroundColor: "" + Theme[variant].container.backgroundColor,
|
|
6143
|
+
onClick: isClosable ? function () {} : function () {
|
|
6144
|
+
hide();
|
|
6145
|
+
}
|
|
6146
|
+
}, containerStyle, styles == null ? void 0 : styles.container), isShowIcon && iconComponent, React__default.createElement(Vertical, {
|
|
6147
|
+
gap: 8,
|
|
6148
|
+
width: "100%"
|
|
6149
|
+
}, React__default.createElement(Text, Object.assign({
|
|
6150
|
+
size: "md",
|
|
6151
|
+
weight: "semiBold"
|
|
6152
|
+
}, styles == null ? void 0 : styles.title), title), subtitle && React__default.createElement(Text, Object.assign({
|
|
6153
|
+
size: "sm"
|
|
6154
|
+
}, styles == null ? void 0 : styles.subtitle), subtitle)), isWithAction && React__default.createElement(Text, Object.assign({
|
|
6155
|
+
marginRight: 10,
|
|
6156
|
+
onClick: action,
|
|
6157
|
+
padding: "6px 10px",
|
|
6158
|
+
whiteSpace: "nowrap"
|
|
6159
|
+
}, containerStyle, styles == null ? void 0 : styles.actionText), actionText), isClosable && React__default.createElement(View, Object.assign({
|
|
6160
|
+
position: "absolute",
|
|
6161
|
+
zIndex: 10000,
|
|
6162
|
+
right: 8,
|
|
6163
|
+
top: 6,
|
|
6164
|
+
onClick: function onClick() {
|
|
6165
|
+
hide();
|
|
6166
|
+
}
|
|
6167
|
+
}, styles == null || (_styles$closingIcon = styles.closingIcon) == null ? void 0 : _styles$closingIcon.container), React__default.createElement(CloseSvg, Object.assign({
|
|
6168
|
+
size: 18,
|
|
6169
|
+
color: iconColor
|
|
6170
|
+
}, styles == null || (_styles$closingIcon2 = styles.closingIcon) == null ? void 0 : _styles$closingIcon2.icon))));
|
|
6171
|
+
};
|
|
6172
|
+
|
|
6173
|
+
var MessageLayout = function MessageLayout(_ref) {
|
|
6174
|
+
var container = _ref.container,
|
|
6175
|
+
theme = _ref.theme,
|
|
6176
|
+
_ref$position = _ref.position,
|
|
6177
|
+
position = _ref$position === void 0 ? 'topRight' : _ref$position;
|
|
6178
|
+
var _useMessageStore = useMessageStore(),
|
|
6179
|
+
visible = _useMessageStore.visible,
|
|
6180
|
+
title = _useMessageStore.title,
|
|
6181
|
+
variant = _useMessageStore.variant,
|
|
6182
|
+
subtitle = _useMessageStore.subtitle,
|
|
6183
|
+
isClosable = _useMessageStore.isClosable,
|
|
6184
|
+
styles = _useMessageStore.styles,
|
|
6185
|
+
action = _useMessageStore.action,
|
|
6186
|
+
actionText = _useMessageStore.actionText,
|
|
6187
|
+
showIcon = _useMessageStore.showIcon,
|
|
6188
|
+
timeout = _useMessageStore.timeout;
|
|
6189
|
+
var toastPosition = {
|
|
6190
|
+
topLeft: {
|
|
6191
|
+
top: 6,
|
|
6192
|
+
left: 8
|
|
6193
|
+
},
|
|
6194
|
+
topRight: {
|
|
6195
|
+
top: 6,
|
|
6196
|
+
right: 8
|
|
6197
|
+
},
|
|
6198
|
+
bottomLeft: {
|
|
6199
|
+
bottom: 8,
|
|
6200
|
+
left: 6
|
|
6201
|
+
},
|
|
6202
|
+
bottomRight: {
|
|
6203
|
+
bottom: 8,
|
|
6204
|
+
right: 6
|
|
6205
|
+
}
|
|
6206
|
+
}[position];
|
|
6207
|
+
// Crée une fonction pour construire le contenu du message
|
|
6208
|
+
var renderMessageContent = function renderMessageContent() {
|
|
6209
|
+
return React__default.createElement(MessageView, {
|
|
6210
|
+
variant: variant,
|
|
6211
|
+
subtitle: subtitle,
|
|
6212
|
+
show: visible,
|
|
6213
|
+
title: title,
|
|
6214
|
+
theme: theme,
|
|
6215
|
+
isClosable: isClosable,
|
|
6216
|
+
styles: styles,
|
|
6217
|
+
action: action,
|
|
6218
|
+
actionText: actionText,
|
|
6219
|
+
showIcon: showIcon,
|
|
6220
|
+
timeout: timeout,
|
|
6221
|
+
hide: function hide() {
|
|
6222
|
+
return hideMessage();
|
|
6223
|
+
}
|
|
6224
|
+
});
|
|
6225
|
+
};
|
|
6226
|
+
var MessageContainer = container ? React__default.cloneElement(container, {}, renderMessageContent()) : React__default.createElement(View, Object.assign({
|
|
6227
|
+
position: 'absolute',
|
|
6228
|
+
zIndex: 10000
|
|
6229
|
+
}, toastPosition), renderMessageContent());
|
|
6230
|
+
return visible ? MessageContainer : null;
|
|
6231
|
+
};
|
|
6232
|
+
|
|
5593
6233
|
exports.Alert = Alert;
|
|
5594
6234
|
exports.AspectRatio = AspectRatio;
|
|
5595
6235
|
exports.Avatar = Avatar;
|
|
@@ -5603,6 +6243,7 @@ exports.DatePicker = DatePicker;
|
|
|
5603
6243
|
exports.FileImage = FileImage;
|
|
5604
6244
|
exports.FileSVG = FileSVG;
|
|
5605
6245
|
exports.FormikCheckbox = FormikCheckbox;
|
|
6246
|
+
exports.FormikComboBox = FormikComboBox;
|
|
5606
6247
|
exports.FormikCountryPicker = FormikCountryPicker;
|
|
5607
6248
|
exports.FormikDatePicker = FormikDatePicker;
|
|
5608
6249
|
exports.FormikForm = FormikForm;
|
|
@@ -5616,6 +6257,8 @@ exports.Inline = Inline;
|
|
|
5616
6257
|
exports.Left = Left;
|
|
5617
6258
|
exports.Link = Link;
|
|
5618
6259
|
exports.Loader = Loader;
|
|
6260
|
+
exports.MessageLayout = MessageLayout;
|
|
6261
|
+
exports.MessageView = MessageView;
|
|
5619
6262
|
exports.Modal = Modal;
|
|
5620
6263
|
exports.Password = Password;
|
|
5621
6264
|
exports.Right = Right;
|
|
@@ -5630,7 +6273,10 @@ exports.ToggleGroup = ToggleGroup;
|
|
|
5630
6273
|
exports.Top = Top;
|
|
5631
6274
|
exports.Vertical = Vertical;
|
|
5632
6275
|
exports.View = View;
|
|
6276
|
+
exports.hideMessage = hideMessage;
|
|
5633
6277
|
exports.hideModal = hideModal;
|
|
6278
|
+
exports.showMessage = showMessage;
|
|
5634
6279
|
exports.showModal = showModal;
|
|
6280
|
+
exports.useMessageStore = useMessageStore;
|
|
5635
6281
|
exports.useModalStore = useModalStore;
|
|
5636
6282
|
//# sourceMappingURL=web.cjs.development.js.map
|