contentoh-components-library 21.0.71 → 21.0.74
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/.env.development +20 -5
- package/.env.production +18 -3
- package/CHANGELOG.md +31 -33
- package/dist/assets/images/generalButton/downloadIcon.svg +3 -0
- package/dist/assets/images/genericModal/closeWhite.svg +3 -0
- package/dist/assets/images/genericModal/errorModal.svg +3 -0
- package/dist/assets/images/genericModal/yellowAlert.svg +12 -0
- package/dist/assets/images/modalsSVGs/attributesSent.svg +208 -0
- package/dist/assets/images/modalsSVGs/descriptionSent.svg +237 -0
- package/dist/assets/images/modalsSVGs/providerSent.svg +445 -0
- package/dist/assets/images/modalsSVGs/uploadingImages.svg +148 -0
- package/dist/components/atoms/AsignationOption/index.js +9 -5
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/{molecules/SignInLogin/SignInLogin.stories.js → atoms/CharCounter/CharCounter.stories.js} +10 -7
- package/dist/components/atoms/CharCounter/index.js +22 -0
- package/dist/components/{molecules/LogoLoading → atoms/CharCounter}/styles.js +3 -1
- package/dist/components/atoms/CheckBox/index.js +4 -2
- package/dist/components/atoms/Commentary/Commentary.stories.js +1 -0
- package/dist/components/atoms/Commentary/index.js +23 -0
- package/dist/components/{organisms/ChangePassword → atoms/Commentary}/styles.js +6 -1
- package/dist/components/atoms/GeneralButton/index.js +5 -0
- package/dist/components/atoms/GeneralButton/styles.js +4 -2
- package/dist/components/atoms/GeneralInput/index.js +72 -25
- package/dist/components/atoms/GeneralInput/styles.js +7 -1
- package/dist/components/atoms/GenericModal/index.js +4 -2
- package/dist/components/atoms/GenericModal/styles.js +1 -1
- package/dist/components/atoms/GradientPanel/styles.js +1 -1
- package/dist/components/atoms/Input/index.js +26 -0
- package/dist/components/atoms/Input/style.js +26 -0
- package/dist/components/{organisms/ChangePassword/ChangePassword.stories.js → atoms/InputFormatter/Wysiwyg.stories.js} +9 -7
- package/dist/components/atoms/InputFormatter/index.js +184 -0
- package/dist/components/atoms/InputFormatter/styles.js +33 -0
- package/dist/components/atoms/LabelToInput/index.js +53 -0
- package/dist/components/atoms/LabelToInput/style.js +22 -0
- package/dist/components/atoms/Loading/index.js +0 -1
- package/dist/components/atoms/LogoImage/index.js +0 -1
- package/dist/components/atoms/Percent/Percent.stories.js +39 -0
- package/dist/components/atoms/Percent/index.js +39 -0
- package/dist/components/atoms/Percent/styles.js +20 -0
- package/dist/components/atoms/PriorityFlag/index.js +1 -1
- package/dist/components/atoms/ProductImage/styles.js +1 -1
- package/dist/components/atoms/ProgressBar/index.js +2 -2
- package/dist/components/atoms/ProgressBar/styles.js +3 -5
- package/dist/components/atoms/ScreenHeader/index.js +1 -1
- package/dist/components/atoms/ScreenHeader/styles.js +1 -1
- package/dist/components/atoms/Select/index.js +39 -0
- package/dist/components/atoms/Select/style.js +32 -0
- package/dist/components/atoms/StatusTag/index.js +37 -2
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/atoms/ValidationPanel/index.js +5 -3
- package/dist/components/molecules/AvatarAndValidation/index.js +17 -7
- package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +42 -40
- package/dist/components/molecules/FeaturesBar/index.js +1 -1
- package/dist/components/molecules/GalleryElement/index.js +80 -21
- package/dist/components/molecules/GalleryElement/styles.js +1 -1
- package/dist/components/molecules/GalleryHeader/index.js +28 -6
- package/dist/components/molecules/GalleryHeader/styles.js +1 -1
- package/dist/components/molecules/ImageSelector/index.js +2 -4
- package/dist/components/molecules/LoginPasswordStrength/index.js +9 -9
- package/dist/components/molecules/LoginPasswordStrength/styles.js +1 -1
- package/dist/components/molecules/ProductNameHeader/index.js +1 -2
- package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +48 -0
- package/dist/components/molecules/RetailerSelector/index.js +74 -0
- package/dist/components/{atoms/MenuCommercialRetailers → molecules/RetailerSelector}/styles.js +1 -1
- package/dist/components/molecules/StatusAsignationInfo/index.js +46 -28
- package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
- package/dist/components/molecules/TableHeader/index.js +12 -5
- package/dist/components/molecules/TableHeader/styles.js +1 -1
- package/dist/components/molecules/TagAndInput/index.js +24 -2
- package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +31 -0
- package/dist/components/molecules/TextAndGradient/index.js +36 -0
- package/dist/components/molecules/TextAndGradient/styles.js +18 -0
- package/dist/components/organisms/FullProductNameHeader/index.js +31 -9
- package/dist/components/organisms/FullTabsMenu/index.js +18 -5
- package/dist/components/organisms/GlobalModal/index.js +73 -0
- package/dist/components/organisms/GlobalModal/styles.js +66 -0
- package/dist/components/organisms/ImageDataTable/index.js +90 -14
- package/dist/components/organisms/InputGroup/index.js +34 -13
- package/dist/components/organisms/InputGroup/styles.js +1 -1
- package/dist/components/organisms/ProductImageModal/index.js +13 -10
- package/dist/components/organisms/ProductImageModal/styles.js +1 -1
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +135 -0
- package/dist/components/pages/ProviderProductEdition/index.js +1979 -0
- package/dist/components/pages/ProviderProductEdition/styles.js +23 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +91 -347
- package/dist/components/pages/RetailerProductEdition/index.js +1610 -60
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +213 -53
- package/dist/global-files/global-styles.css +1 -0
- package/dist/global-files/variables.js +1 -0
- package/dist/index.js +34 -268
- package/package.json +17 -18
- package/src/assets/images/generalButton/downloadIcon.svg +3 -0
- package/src/assets/images/genericModal/closeWhite.svg +3 -0
- package/src/assets/images/genericModal/errorModal.svg +3 -0
- package/src/assets/images/genericModal/yellowAlert.svg +12 -0
- package/src/assets/images/modalsSVGs/attributesSent.svg +208 -0
- package/src/assets/images/modalsSVGs/descriptionSent.svg +237 -0
- package/src/assets/images/modalsSVGs/providerSent.svg +445 -0
- package/src/assets/images/modalsSVGs/uploadingImages.svg +148 -0
- package/src/components/atoms/AsignationOption/index.js +7 -5
- package/src/components/atoms/AsignationOption/styles.js +9 -1
- package/src/components/atoms/CharCounter/CharCounter.stories.js +11 -0
- package/src/components/atoms/CharCounter/index.js +13 -0
- package/src/components/atoms/CharCounter/styles.js +10 -0
- package/src/components/atoms/CheckBox/index.js +8 -2
- package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
- package/src/components/atoms/Commentary/index.js +9 -0
- package/src/components/atoms/Commentary/styles.js +16 -0
- package/src/components/atoms/GeneralButton/index.js +9 -2
- package/src/components/atoms/GeneralButton/styles.js +23 -0
- package/src/components/atoms/GeneralInput/index.js +71 -23
- package/src/components/atoms/GeneralInput/styles.js +11 -1
- package/src/components/atoms/GenericModal/index.js +2 -2
- package/src/components/atoms/GenericModal/styles.js +10 -2
- package/src/components/atoms/GradientPanel/styles.js +0 -1
- package/src/components/atoms/Input/index.js +15 -0
- package/src/components/atoms/Input/style.js +31 -0
- package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +12 -0
- package/src/components/atoms/InputFormatter/index.js +144 -0
- package/src/components/atoms/InputFormatter/styles.js +40 -0
- package/src/components/atoms/LabelToInput/index.js +26 -0
- package/src/components/atoms/LabelToInput/style.js +41 -0
- package/src/components/atoms/Loading/index.js +2 -3
- package/src/components/atoms/LogoImage/index.js +1 -1
- package/src/components/atoms/PriorityFlag/index.js +1 -1
- package/src/components/atoms/ProductImage/styles.js +1 -1
- package/src/components/atoms/ProgressBar/index.js +2 -2
- package/src/components/atoms/ProgressBar/styles.js +54 -3
- package/src/components/atoms/ScreenHeader/index.js +7 -3
- package/src/components/atoms/ScreenHeader/styles.js +9 -2
- package/src/components/atoms/Select/index.js +35 -0
- package/src/components/atoms/Select/style.js +76 -0
- package/src/components/atoms/StatusTag/index.js +30 -2
- package/src/components/atoms/StatusTag/styles.js +15 -3
- package/src/components/atoms/ValidationPanel/index.js +4 -3
- package/src/components/molecules/AvatarAndValidation/index.js +23 -6
- package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/src/components/molecules/CarouselImagesLogin/index.js +37 -34
- package/src/components/molecules/FeaturesBar/index.js +10 -7
- package/src/components/molecules/GalleryElement/index.js +75 -36
- package/src/components/molecules/GalleryElement/styles.js +38 -11
- package/src/components/molecules/GalleryHeader/index.js +14 -8
- package/src/components/molecules/GalleryHeader/styles.js +16 -0
- package/src/components/molecules/ImageSelector/index.js +2 -3
- package/src/components/molecules/LoginPasswordStrength/index.js +6 -11
- package/src/components/molecules/LoginPasswordStrength/styles.js +1 -5
- package/src/components/molecules/ProductNameHeader/index.js +1 -2
- package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +35 -0
- package/src/components/molecules/RetailerSelector/index.js +63 -0
- package/src/components/molecules/RetailerSelector/styles.js +18 -0
- package/src/components/molecules/StatusAsignationInfo/index.js +64 -39
- package/src/components/molecules/StatusAsignationInfo/styles.js +12 -2
- package/src/components/molecules/TableHeader/index.js +16 -3
- package/src/components/molecules/TableHeader/styles.js +5 -0
- package/src/components/molecules/TagAndInput/index.js +24 -2
- package/src/components/organisms/FullProductNameHeader/index.js +38 -8
- package/src/components/organisms/FullTabsMenu/index.js +15 -3
- package/src/components/organisms/GlobalModal/index.js +68 -0
- package/src/components/organisms/GlobalModal/styles.js +113 -0
- package/src/components/organisms/ImageDataTable/index.js +89 -11
- package/src/components/organisms/InputGroup/index.js +46 -11
- package/src/components/organisms/InputGroup/styles.js +3 -0
- package/src/components/organisms/ProductImageModal/index.js +19 -12
- package/src/components/organisms/ProductImageModal/styles.js +3 -0
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +123 -0
- package/src/components/pages/ProviderProductEdition/index.js +1493 -0
- package/src/components/pages/ProviderProductEdition/styles.js +118 -0
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +91 -343
- package/src/components/pages/RetailerProductEdition/index.js +1245 -48
- package/src/components/pages/RetailerProductEdition/styles.js +67 -4
- package/src/global-files/data.js +158 -57
- package/src/global-files/global-styles.css +1 -0
- package/src/global-files/variables.js +1 -0
- package/src/index.js +2 -20
- package/dist/assets/images/editField/showPassword.png +0 -0
- package/dist/assets/images/sliderToolTip/infoIcon.svg +0 -4
- package/dist/assets/images/sliderToolTip/slide1.svg +0 -5
- package/dist/assets/images/sliderToolTip/slide2.svg +0 -9
- package/dist/assets/images/sliderToolTip/slide3.svg +0 -9
- package/dist/assets/images/sliderToolTip/slide4.svg +0 -9
- package/dist/assets/images/sliderToolTip/slide5.svg +0 -40
- package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +0 -36
- package/dist/components/atoms/ListCommercialRetailers/index.js +0 -64
- package/dist/components/atoms/ListCommercialRetailers/styles.js +0 -20
- package/dist/components/atoms/Loading/Loading.stories.js +0 -28
- package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +0 -37
- package/dist/components/atoms/MenuCommercialRetailers/index.js +0 -25
- package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +0 -28
- package/dist/components/atoms/MenuProductImage/index.js +0 -88
- package/dist/components/atoms/MenuProductImage/styles.js +0 -20
- package/dist/components/atoms/SliderToolTip/SliderToolTip.stories.js +0 -47
- package/dist/components/atoms/SliderToolTip/index.js +0 -200
- package/dist/components/atoms/SliderToolTip/styles.js +0 -24
- package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +0 -28
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +0 -94
- package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +0 -24
- package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +0 -25
- package/dist/components/molecules/ApproveRejetPanel/index.js +0 -49
- package/dist/components/molecules/ApproveRejetPanel/styles.js +0 -18
- package/dist/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +0 -28
- package/dist/components/molecules/EmailResetPasswordLogin/index.js +0 -153
- package/dist/components/molecules/EmailResetPasswordLogin/styles.js +0 -20
- package/dist/components/molecules/LogoLoading/Loading.stories.js +0 -28
- package/dist/components/molecules/LogoLoading/index.js +0 -22
- package/dist/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +0 -28
- package/dist/components/molecules/RegistrationFirstStep/index.js +0 -308
- package/dist/components/molecules/RegistrationFirstStep/styles.js +0 -20
- package/dist/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +0 -28
- package/dist/components/molecules/RegistrationSecondStep/index.js +0 -173
- package/dist/components/molecules/RegistrationSecondStep/styles.js +0 -20
- package/dist/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +0 -28
- package/dist/components/molecules/RegistrationThirdStep/index.js +0 -155
- package/dist/components/molecules/RegistrationThirdStep/styles.js +0 -20
- package/dist/components/molecules/SignInLogin/index.js +0 -315
- package/dist/components/molecules/SignInLogin/styles.js +0 -20
- package/dist/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +0 -28
- package/dist/components/molecules/SignInLoginCreationApp/index.js +0 -270
- package/dist/components/molecules/SignInLoginCreationApp/styles.js +0 -20
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +0 -28
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +0 -211
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +0 -20
- package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +0 -69
- package/dist/components/organisms/ChangePassword/index.js +0 -124
- package/src/assets/images/editField/showPassword.png +0 -0
- package/src/assets/images/sliderToolTip/infoIcon.svg +0 -4
- package/src/assets/images/sliderToolTip/slide1.svg +0 -5
- package/src/assets/images/sliderToolTip/slide2.svg +0 -9
- package/src/assets/images/sliderToolTip/slide3.svg +0 -9
- package/src/assets/images/sliderToolTip/slide4.svg +0 -9
- package/src/assets/images/sliderToolTip/slide5.svg +0 -40
- package/src/assets/images/verticalSideMenuMainPage/closeMenu.svg +0 -4
- package/src/assets/images/verticalSideMenuMainPage/iconFAQS.svg +0 -12
- package/src/assets/images/verticalSideMenuMainPage/iconGroup.svg +0 -3
- package/src/assets/images/verticalSideMenuMainPage/iconLogo.svg +0 -12
- package/src/assets/images/verticalSideMenuMainPage/iconLogoContentoh.svg +0 -15
- package/src/assets/images/verticalSideMenuMainPage/iconProduct.svg +0 -3
- package/src/assets/images/verticalSideMenuMainPage/iconSpeedometer.svg +0 -12
- package/src/assets/images/verticalSideMenuMainPage/iconTask.svg +0 -10
- package/src/assets/images/verticalSideMenuMainPage/openMenu.svg +0 -4
- package/src/components/atoms/Loading/Loading.stories.js +0 -10
- package/src/components/atoms/SliderToolTip/SliderToolTip.stories.js +0 -23
- package/src/components/atoms/SliderToolTip/index.js +0 -182
- package/src/components/atoms/SliderToolTip/styles.js +0 -168
- package/src/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +0 -12
- package/src/components/atoms/VerticalSideMenuMainPage/index.js +0 -51
- package/src/components/atoms/VerticalSideMenuMainPage/styles.js +0 -44
- package/src/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +0 -11
- package/src/components/molecules/EmailResetPasswordLogin/index.js +0 -85
- package/src/components/molecules/EmailResetPasswordLogin/styles.js +0 -23
- package/src/components/molecules/LogoLoading/Loading.stories.js +0 -10
- package/src/components/molecules/LogoLoading/index.js +0 -12
- package/src/components/molecules/LogoLoading/styles.js +0 -16
- package/src/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +0 -11
- package/src/components/molecules/RegistrationFirstStep/index.js +0 -227
- package/src/components/molecules/RegistrationFirstStep/styles.js +0 -87
- package/src/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +0 -11
- package/src/components/molecules/RegistrationSecondStep/index.js +0 -136
- package/src/components/molecules/RegistrationSecondStep/styles.js +0 -64
- package/src/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +0 -11
- package/src/components/molecules/RegistrationThirdStep/index.js +0 -130
- package/src/components/molecules/RegistrationThirdStep/styles.js +0 -44
- package/src/components/molecules/SignInLogin/SignInLogin.stories.js +0 -11
- package/src/components/molecules/SignInLogin/index.js +0 -226
- package/src/components/molecules/SignInLogin/styles.js +0 -120
- package/src/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +0 -11
- package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +0 -171
- package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +0 -54
- package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +0 -54
- package/src/components/organisms/ChangePassword/ChangePassword.stories.js +0 -11
- package/src/components/organisms/ChangePassword/index.js +0 -77
- package/src/components/organisms/ChangePassword/styles.js +0 -13
|
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n }\n &.home-panel {\n text-align: center;\n h2 {\n & + * {\n margin-top: 20px;\n }\n }\n p {\n font-family: ", ";\n color: ", ";\n font-size: 18px;\n line-height: 21px;\n letter-spacing: -0.015em;\n & + * {\n margin-top: 20px;\n }\n }\n }\n\n &.home-login {\n
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n }\n &.home-panel {\n text-align: center;\n h2 {\n & + * {\n margin-top: 20px;\n }\n }\n p {\n font-family: ", ";\n color: ", ";\n font-size: 18px;\n line-height: 21px;\n letter-spacing: -0.015em;\n & + * {\n margin-top: 20px;\n }\n }\n }\n\n &.home-login {\n .credenciales {\n & + * {\n margin-top: 30px;\n }\n }\n .user {\n & + * {\n margin-top: 20px;\n }\n }\n .password {\n & + * {\n margin-top: 20px;\n }\n }\n .select {\n display: flex;\n justify-content: space-between;\n .active-right {\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n letter-spacing: -0.015em;\n color: ", ";\n }\n & + * {\n margin-top: 50px;\n }\n }\n .button-right {\n text-align: right;\n & + * {\n margin-top: 55px;\n }\n }\n .new-login {\n p {\n font-family: ", ";\n text-align: right;\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n color: ", ";\n span {\n color: ", ";\n }\n }\n }\n }\n &.home-card {\n position: relative;\n .plan {\n text-align: center;\n & + * {\n margin-top: 40px;\n }\n }\n .arrowimage {\n position: absolute;\n top: 50px;\n left: 40px;\n }\n .general-text {\n font-family: ", ";\n font-size: 14px;\n line-height: 19px;\n text-align: center;\n letter-spacing: -0.015em;\n & + * {\n margin-top: 50px;\n }\n }\n .payment-register {\n & + * {\n margin-top: 50px;\n }\n }\n .button-continuar {\n text-align: center;\n & + * {\n margin-top: 35px;\n }\n }\n .continue {\n text-align: center;\n font-family: ", ";\n font-size: 14px;\n line-height: 19px;\n letter-spacing: -0.015em;\n text-decoration-line: underline;\n color: ", ";\n }\n }\n .main-container{\n max-width: 80%;\n max-height: 80%;\n }\n"])), function (_ref) {
|
|
19
19
|
var panelColor = _ref.panelColor;
|
|
20
20
|
return panelColor ? panelColor : "linear-gradient(180deg, #E33AA9 0%, #3B1366 100%)";
|
|
21
21
|
}, _variables.FontFamily.Raleway_700, _variables.FontFamily.AvenirNext, function (_ref2) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = Input;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _style = require("./style");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
function Input(props) {
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.MainContainer, {
|
|
18
|
+
error: props.error,
|
|
19
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.InputCustom, (0, _objectSpread2.default)({
|
|
20
|
+
autoFocus: true,
|
|
21
|
+
onChange: function onChange(event) {
|
|
22
|
+
return props.onChange && props.onChange(event.target.value);
|
|
23
|
+
}
|
|
24
|
+
}, props))
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.MainContainer = exports.InputCustom = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject, _templateObject2;
|
|
17
|
+
|
|
18
|
+
var MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n width: fit-content;\n height: 20px;\n padding: 0 5px;\n box-sizing: border-box;\n background: #fafafa;\n border-radius: 2px;\n border: ", ";\n"])), function (props) {
|
|
19
|
+
return props.error && "1px solid red";
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.MainContainer = MainContainer;
|
|
23
|
+
|
|
24
|
+
var InputCustom = _styledComponents.default.input(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n border-width: 0;\n width: 100%;\n font-family: ", ";\n font-weight: 400;\n font-size: 11px;\n line-height: 19px;\n border-width: 0;\n color: ", ";\n background-color: ", ";\n outline: none;\n &::placeholder {\n font-size: 12px;\n color: #d4d1d7;\n }\n"])), _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.s2);
|
|
25
|
+
|
|
26
|
+
exports.InputCustom = InputCustom;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = exports.
|
|
8
|
+
exports.default = exports.DefaultInputFormatter = void 0;
|
|
9
9
|
|
|
10
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
11
|
|
|
@@ -14,15 +14,17 @@ var _index = require("./index");
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
|
|
16
16
|
var _default = {
|
|
17
|
-
title: "Components/
|
|
18
|
-
component: _index.
|
|
17
|
+
title: "Components/atoms/InputFormatter",
|
|
18
|
+
component: _index.InputFormatter
|
|
19
19
|
};
|
|
20
20
|
exports.default = _default;
|
|
21
21
|
|
|
22
22
|
var Template = function Template(args) {
|
|
23
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.InputFormatter, (0, _objectSpread2.default)({}, args));
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
exports.
|
|
28
|
-
|
|
26
|
+
var DefaultInputFormatter = Template.bind({});
|
|
27
|
+
exports.DefaultInputFormatter = DefaultInputFormatter;
|
|
28
|
+
DefaultInputFormatter.args = {
|
|
29
|
+
text: "hola mundo"
|
|
30
|
+
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.InputFormatter = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _reactQuill = _interopRequireDefault(require("react-quill"));
|
|
13
|
+
|
|
14
|
+
require("react-quill/dist/quill.snow.css");
|
|
15
|
+
|
|
16
|
+
var _react = require("react");
|
|
17
|
+
|
|
18
|
+
var _styles = require("./styles");
|
|
19
|
+
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
22
|
+
var InputFormatter = function InputFormatter(_ref) {
|
|
23
|
+
var _ref$mainValue = _ref.mainValue,
|
|
24
|
+
mainValue = _ref$mainValue === void 0 ? "" : _ref$mainValue,
|
|
25
|
+
inputId = _ref.inputId,
|
|
26
|
+
articleId = _ref.articleId,
|
|
27
|
+
updatedDescriptions = _ref.updatedDescriptions,
|
|
28
|
+
setUpdatedDescriptions = _ref.setUpdatedDescriptions,
|
|
29
|
+
addTextAreaToArray = _ref.addTextAreaToArray,
|
|
30
|
+
name = _ref.name,
|
|
31
|
+
isRequired = _ref.isRequired,
|
|
32
|
+
maxChar = _ref.maxChar;
|
|
33
|
+
|
|
34
|
+
var _useState = (0, _react.useState)(mainValue),
|
|
35
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
36
|
+
inputValue = _useState2[0],
|
|
37
|
+
setInputValue = _useState2[1];
|
|
38
|
+
|
|
39
|
+
var _useState3 = (0, _react.useState)(false),
|
|
40
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
41
|
+
selection = _useState4[0],
|
|
42
|
+
setSelection = _useState4[1];
|
|
43
|
+
|
|
44
|
+
var _useState5 = (0, _react.useState)({
|
|
45
|
+
left: 0,
|
|
46
|
+
top: 0
|
|
47
|
+
}),
|
|
48
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
49
|
+
position = _useState6[0],
|
|
50
|
+
setPosition = _useState6[1];
|
|
51
|
+
|
|
52
|
+
var _useState7 = (0, _react.useState)(0),
|
|
53
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
54
|
+
charsCounter = _useState8[0],
|
|
55
|
+
setCharsCounter = _useState8[1];
|
|
56
|
+
|
|
57
|
+
var _useState9 = (0, _react.useState)({}),
|
|
58
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
59
|
+
quillState = _useState10[0],
|
|
60
|
+
setQuillState = _useState10[1];
|
|
61
|
+
|
|
62
|
+
var maxLength = maxChar ? maxChar : 999;
|
|
63
|
+
|
|
64
|
+
var getValue = function getValue(value) {
|
|
65
|
+
var temp = value.replace(/\n/gm, "<br>");
|
|
66
|
+
return temp;
|
|
67
|
+
}; //const quillRef = useRef();
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
var setQuill = function setQuill(ref) {
|
|
71
|
+
if (!ref || ref === null) return;
|
|
72
|
+
if (typeof ref.getEditor !== "function") return;
|
|
73
|
+
setQuillState(ref.getEditor());
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
var valueFormater = function valueFormater(value) {
|
|
77
|
+
return value.replace(/<\/p><p>/gm, "\n").replace(/<\/?br>|<\/?p>/gm, "");
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var _onChange = function onChange(valueInput, delta, user, h) {
|
|
81
|
+
var value = "";
|
|
82
|
+
|
|
83
|
+
try {
|
|
84
|
+
if (h.getLength() - 1 <= maxLength) {
|
|
85
|
+
var unformattedText = valueInput.replace(/<li.*?>/gm, " - ").replace(/<\/li>/gm, "\n").replace(/<\/p><p>/gm, "\n").replaceAll(/<\/?(?!\/?strong).*?>/gm, "");
|
|
86
|
+
setInputValue(valueInput);
|
|
87
|
+
value = unformattedText;
|
|
88
|
+
} else {
|
|
89
|
+
quillState.deleteText(maxLength, quillState.getLength());
|
|
90
|
+
setInputValue(function (val) {
|
|
91
|
+
return val = quillState.getText();
|
|
92
|
+
});
|
|
93
|
+
value = quillState.getText();
|
|
94
|
+
}
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.log(error);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
setCharsCounter(h.getLength() - 1);
|
|
100
|
+
value = valueFormater(value);
|
|
101
|
+
var idInput = inputId;
|
|
102
|
+
var dataSave = updatedDescriptions.slice();
|
|
103
|
+
|
|
104
|
+
if (dataSave.length > 0) {
|
|
105
|
+
if (dataSave.filter(function (e) {
|
|
106
|
+
return e.attributeId === idInput;
|
|
107
|
+
}).length > 0) {
|
|
108
|
+
dataSave.forEach(function (e) {
|
|
109
|
+
if (e.attributeId === idInput) {
|
|
110
|
+
e.value = value;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
} else {
|
|
114
|
+
dataSave.push({
|
|
115
|
+
articleId: articleId,
|
|
116
|
+
attributeId: idInput,
|
|
117
|
+
value: value
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
dataSave.push({
|
|
122
|
+
articleId: articleId,
|
|
123
|
+
attributeId: idInput,
|
|
124
|
+
value: value
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
setUpdatedDescriptions(dataSave);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
var getSelection = function getSelection(range, a, b) {
|
|
132
|
+
//getBounds(index,length)
|
|
133
|
+
var selected = b.getSelection();
|
|
134
|
+
var bounds = b.getBounds((selected === null || selected === void 0 ? void 0 : selected.index) || 0, (selected === null || selected === void 0 ? void 0 : selected.length) || 0);
|
|
135
|
+
|
|
136
|
+
if (a === "user") {
|
|
137
|
+
setPosition({
|
|
138
|
+
left: bounds.left,
|
|
139
|
+
top: bounds.top
|
|
140
|
+
});
|
|
141
|
+
setSelection((selected === null || selected === void 0 ? void 0 : selected.length) > 0);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
146
|
+
isRequired: isRequired && (inputValue.replace(/<.*?>/gm, "").length === 0 || !inputValue),
|
|
147
|
+
selection: selection,
|
|
148
|
+
position: position,
|
|
149
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactQuill.default, {
|
|
150
|
+
id: inputId + "",
|
|
151
|
+
ref: function ref(el) {
|
|
152
|
+
return setQuill(el);
|
|
153
|
+
},
|
|
154
|
+
value: getValue(inputValue) //disabled={!props.enableInputs}
|
|
155
|
+
,
|
|
156
|
+
modules: {
|
|
157
|
+
toolbar: ["bold"]
|
|
158
|
+
},
|
|
159
|
+
onKeyPress: function onKeyPress(e) {
|
|
160
|
+
if (charsCounter >= maxLength && e.key !== "Backspace") {
|
|
161
|
+
e.preventDefault();
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
onKeyDown: function onKeyDown(e) {
|
|
165
|
+
var keysArray = ["Backspace", "Meta", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"];
|
|
166
|
+
|
|
167
|
+
if (charsCounter >= maxLength && keysArray.every(function (key) {
|
|
168
|
+
return e.key !== key;
|
|
169
|
+
})) {
|
|
170
|
+
e.preventDefault();
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
onChange: function onChange(valueInput, user, range, h) {
|
|
174
|
+
_onChange(valueInput, user, range, h);
|
|
175
|
+
},
|
|
176
|
+
onChangeSelection: getSelection
|
|
177
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
|
|
178
|
+
className: "description-limit",
|
|
179
|
+
children: [charsCounter, "/", maxLength]
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
exports.InputFormatter = InputFormatter;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .quill {\n border: 1px solid\n ", ";\n position: relative;\n border-radius: 2px;\n\n .ql-toolbar {\n background-color: ", ";\n position: absolute;\n z-index: 10;\n border: 1px solid ", ";\n width: 45px;\n height: 45px;\n border-radius: 4px;\n visibility: ", ";\n top: ", "px;\n left: ", "px;\n }\n\n .ql-container {\n border: none;\n font-family: ", ";\n color: ", ";\n strong {\n font-family: ", ";\n }\n }\n }\n .description-limit {\n font-size: 12px;\n font-family: ", ";\n color: ", ";\n text-align: right;\n }\n"])), function (_ref) {
|
|
19
|
+
var focus = _ref.focus,
|
|
20
|
+
isRequired = _ref.isRequired;
|
|
21
|
+
return focus ? _variables.GlobalColors.magenta_s2 : isRequired ? "red" : _variables.GlobalColors.s3;
|
|
22
|
+
}, _variables.GlobalColors.s2, _variables.GlobalColors.s3, function (_ref2) {
|
|
23
|
+
var selection = _ref2.selection;
|
|
24
|
+
return selection ? "visible" : "hidden";
|
|
25
|
+
}, function (_ref3) {
|
|
26
|
+
var position = _ref3.position;
|
|
27
|
+
return position.top;
|
|
28
|
+
}, function (_ref4) {
|
|
29
|
+
var position = _ref4.position;
|
|
30
|
+
return position.left;
|
|
31
|
+
}, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4, _variables.FontFamily.Raleway_900, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4);
|
|
32
|
+
|
|
33
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.default = LabelToInput;
|
|
11
|
+
|
|
12
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
13
|
+
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _style = require("./style");
|
|
19
|
+
|
|
20
|
+
var _Input = _interopRequireDefault(require("../Input"));
|
|
21
|
+
|
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
+
|
|
24
|
+
function LabelToInput(props) {
|
|
25
|
+
var _useState = (0, _react.useState)(false),
|
|
26
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
27
|
+
isActive = _useState2[0],
|
|
28
|
+
setIsActive = _useState2[1];
|
|
29
|
+
|
|
30
|
+
var _useState3 = (0, _react.useState)(""),
|
|
31
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
32
|
+
defaultValue = _useState4[0],
|
|
33
|
+
setDefaultValue = _useState4[1];
|
|
34
|
+
|
|
35
|
+
(0, _react.useEffect)(function () {
|
|
36
|
+
setDefaultValue(props.defaultValue === "" ? "-" : props.defaultValue);
|
|
37
|
+
}, [props.defaultValue]);
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.MainContainer, {
|
|
39
|
+
width: props.width,
|
|
40
|
+
error: !isActive && props.error,
|
|
41
|
+
children: !isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
42
|
+
onClick: function onClick() {
|
|
43
|
+
return setIsActive(true);
|
|
44
|
+
},
|
|
45
|
+
children: defaultValue
|
|
46
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
47
|
+
onBlur: function onBlur() {
|
|
48
|
+
props.onBlur && props.onBlur();
|
|
49
|
+
setIsActive(false);
|
|
50
|
+
}
|
|
51
|
+
}))
|
|
52
|
+
});
|
|
53
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.MainContainer = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
var MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n width: fit-content;\n height: 20px;\n box-sizing: border-box;\n border-radius: 2px;\n margin-left: auto;\n white-space: nowrap;\n overflow-x: auto;\n overflow-y: hidden;\n\n & > p {\n font-family: ", ";\n font-weight: 400;\n font-size: 11px;\n line-height: 19px;\n color: ", ";\n background-color: ", ";\n padding: 1px 3px;\n border-radius: 3px;\n min-width: 50px;\n height: 21px;\n text-align: center;\n }\n border: ", ";\n ::-webkit-scrollbar {\n width: 3px;\n height: 3px;\n }\n ::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n ::-webkit-scrollbar-thumb {\n background: #d4d1d7;\n border-radius: 3px;\n }\n"])), _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.s2, function (props) {
|
|
19
|
+
return props.error && "1px solid red";
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.MainContainer = MainContainer;
|
|
@@ -11,7 +11,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
11
11
|
|
|
12
12
|
var Loading = function Loading() {
|
|
13
13
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
14
|
-
className: "loading",
|
|
15
14
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Loader, {
|
|
16
15
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
17
16
|
className: "first"
|
|
@@ -15,7 +15,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
15
15
|
|
|
16
16
|
var LogoImage = function LogoImage() {
|
|
17
17
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
18
|
-
className: "logo",
|
|
19
18
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
20
19
|
src: _logoLogin.default,
|
|
21
20
|
alt: "logo"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.PercentDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _index = require("./index");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
var status = ["-", "Pr", "Rc", "As", "P", "QF", "AF", "AA", "AP", "AC", "RA", "RF", "RP", "RC", "Ex"];
|
|
17
|
+
var _default = {
|
|
18
|
+
title: "Components/atoms/Percent",
|
|
19
|
+
component: _index.Percent,
|
|
20
|
+
argTypes: {
|
|
21
|
+
statusType: {
|
|
22
|
+
options: status,
|
|
23
|
+
control: {
|
|
24
|
+
type: "select"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.default = _default;
|
|
30
|
+
|
|
31
|
+
var Template = function Template(args) {
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Percent, (0, _objectSpread2.default)({}, args));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var PercentDefault = Template.bind({});
|
|
36
|
+
exports.PercentDefault = PercentDefault;
|
|
37
|
+
PercentDefault.args = {
|
|
38
|
+
statusType: "-"
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Percent = void 0;
|
|
9
|
+
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
|
|
12
|
+
var _polygon = _interopRequireDefault(require("../../../assets/images/arrow/polygon.svg"));
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
var Percent = function Percent(_ref) {
|
|
17
|
+
var statusType = _ref.statusType;
|
|
18
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
19
|
+
className: "status-".concat(statusType),
|
|
20
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
21
|
+
className: "text",
|
|
22
|
+
children: "Productos en proceso"
|
|
23
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
24
|
+
className: "percent-text",
|
|
25
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
26
|
+
className: "number",
|
|
27
|
+
children: "20"
|
|
28
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
29
|
+
src: _polygon.default,
|
|
30
|
+
alt: ""
|
|
31
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
32
|
+
className: "span",
|
|
33
|
+
children: "1%"
|
|
34
|
+
})]
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
exports.Percent = Percent;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 7px;\n width: 97px;\n height: 83px;\n text-align: center;\n padding: 15px;\n\n &.status-Pr,\n &.status-Rc {\n border: 1px solid ", ";\n .span {\n color: ", ";\n }\n }\n &.status-- {\n border: 1px solid ", ";\n .span {\n color: ", ";\n }\n }\n\n &.status-As,\n &.status-P,\n &.status-QF {\n border: 1px solid ", ";\n .span {\n color: ", ";\n }\n }\n\n &.status-AF,\n &.status-AA,\n &.status-AP,\n &.status-AC {\n border: 1px solid ", ";\n .span {\n color: ", ";\n }\n }\n\n &.status-RA,\n &.status-RF,\n &.status-RP,\n &.status-RC {\n border: 1px solid #d74ded;\n .span {\n color: #d74ded;\n }\n }\n\n &.status-Ex {\n border: 1px solid ", ";\n .span {\n color: ", ";\n }\n }\n\n .text {\n color: ", ";\n font-size: 12px;\n font-family: ", ";\n line-height: 14px;\n }\n .percent-text {\n display: flex;\n .number {\n font-family: ", ";\n font-size: 28px;\n color: ", ";\n }\n .span{\n padding-top: 8px;\n font-size: 18px;\n }\n }\n"])), _variables.GlobalColors.reception, _variables.GlobalColors.reception, _variables.GlobalColors.s3, _variables.GlobalColors.s3, _variables.GlobalColors.in_progress, _variables.GlobalColors.in_progress, _variables.GlobalColors.finished, _variables.GlobalColors.finished, _variables.GlobalColors.exported, _variables.GlobalColors.exported, _variables.GlobalColors.s4, _variables.FontFamily.Raleway, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -25,7 +25,7 @@ var PriorityFlag = function PriorityFlag(_ref) {
|
|
|
25
25
|
var _PriorityFlags;
|
|
26
26
|
|
|
27
27
|
var priority = _ref.priority;
|
|
28
|
-
var PriorityFlags = (_PriorityFlags = {}, (0, _defineProperty2.default)(_PriorityFlags, "
|
|
28
|
+
var PriorityFlags = (_PriorityFlags = {}, (0, _defineProperty2.default)(_PriorityFlags, "none", _noPriority.default), (0, _defineProperty2.default)(_PriorityFlags, "low", _lowPriority.default), (0, _defineProperty2.default)(_PriorityFlags, "medium", _mediumPriority.default), (0, _defineProperty2.default)(_PriorityFlags, "high", _highPriority.default), _PriorityFlags);
|
|
29
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
30
30
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
31
31
|
src: PriorityFlags[priority],
|
|
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n\n img {\n object-fit:
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n\n img {\n object-fit: contain;\n }\n\n &.carousel-image {\n img {\n width: 85px;\n height: 55px;\n cursor: pointer;\n }\n\n & + * {\n margin-left: 1px;\n }\n }\n\n &.main-image {\n img {\n width: 340px;\n height: 295px;\n }\n }\n\n &.catalogue-image-big-size {\n img {\n width: 179px;\n height: 179px;\n }\n }\n\n &.catalogue-image-small-size {\n img {\n width: 60px;\n height: 60px;\n }\n }\n\n &.catalogue-modal-image {\n flex: 1 0 50%;\n cursor: pointer;\n\n img {\n width: 168px;\n height: 108px;\n }\n }\n\n &.expanded-modal-image {\n width: 710px;\n height: 710px;\n\n img {\n width: 710px;\n height: 710px;\n }\n }\n"])));
|
|
17
17
|
|
|
18
18
|
exports.Container = Container;
|
|
@@ -11,9 +11,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
11
11
|
|
|
12
12
|
var ProgressBar = function ProgressBar(_ref) {
|
|
13
13
|
var percent = _ref.percent,
|
|
14
|
-
|
|
14
|
+
progressBarType = _ref.progressBarType;
|
|
15
15
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
16
|
-
|
|
16
|
+
className: "status-".concat(progressBarType),
|
|
17
17
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
|
|
18
18
|
children: [percent, "%"]
|
|
19
19
|
})
|
|
@@ -15,10 +15,8 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n width: fit-content;\n height: 27px;\n padding: 4px;\n border-radius: 15px;\n font-family: ", ";\n font-weight: 600;\n font-size: 14px;\n line-height: 19px;\n color: ", ";\n"])), function (
|
|
19
|
-
return _variables.GlobalColors
|
|
20
|
-
}, _variables.
|
|
21
|
-
return props.backgroundColor === "s2" || props.backgroundColor === "s1" ? _variables.GlobalColors.s4 : _variables.GlobalColors.white;
|
|
22
|
-
});
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n width: fit-content;\n height: 27px;\n padding: 4px;\n border-radius: 15px;\n font-family: ", ";\n font-weight: 600;\n font-size: 14px;\n line-height: 19px;\n color: ", ";\n\n &.status-As,\n &.status-P {\n background-color: ", ";\n }\n\n &.status-Pr,\n &.status-Rr {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP,\n &.status-AC,\n &.status-AF {\n background-color: ", ";\n }\n\n &.status-RA,\n &.status-RF,\n &.status-RP,\n &.status-RC {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n"])), _variables.GlobalColors.s3, _variables.FontFamily.AvenirNext, function (backgroundColor) {
|
|
19
|
+
return backgroundColor === "s2" || backgroundColor === "s1" ? _variables.GlobalColors.s4 : _variables.GlobalColors.white;
|
|
20
|
+
}, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
|
|
23
21
|
|
|
24
22
|
exports.Container = Container;
|
|
@@ -24,7 +24,7 @@ var ScreenHeader = function ScreenHeader(_ref) {
|
|
|
24
24
|
className: headerType,
|
|
25
25
|
children: [text, " ", boldText && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
26
26
|
children: [" ", boldText]
|
|
27
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
27
|
+
}), Paragraph && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
28
28
|
children: Paragraph
|
|
29
29
|
})]
|
|
30
30
|
}, "title-".concat(text));
|
|
@@ -15,7 +15,7 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.h2(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: ", ";\n font-style: normal;\n font-size: 36px;\n line-height: 42px;\n font-feature-settings: \"pnum\" on, \"lnum\" on;\n color: ", ";\n\n &.with-bold-text {\n span {\n font-family: ", ";\n }\n }\n\n &.product-name-header {\n font-size: 24px;\n line-height: 36px;\n font-weight: 500;\n letter-spacing: -0.015em;\n color: ", ";\n }\n\n &.retailer-name-header {\n font-size: 18px;\n font-weight: 400;\n line-height: 19px;\n color: ", ";\n }\n\n &.input-name-header {\n font-size: 14px;\n line-height: 19px;\n font-weight: 400;\n color: ", ";\n }\n\n &.date-header {\n font-family: ", ";\n color: ", ";\n font-size: 13px;\n font-weight: 400;\n line-height: 18px;\n }\n\n &.table-row-text {\n font-family: ", ";\n color: ", ";\n font-weight: 400;\n font-size: 11px;\n line-height: 18px;\n }\n\n &.gray-table-row {\n font-family: ", ";\n font-weight: 400;\n font-size: 11px;\n line-height: 19px;\n color: ", ";\n background-color: ", ";\n padding: 1px 3px;\n border-radius: 3px;\n }\n &.header-and-paragraph{\n font-family: ", ";\n font-size: 36px;\n color: ", ";\n p{\n font-family: ", ";\n font-size: 14px;\n color: ", ";\n letter-spacing: -0.015em;\n }\n }\n"])), function (props) {
|
|
18
|
+
var Container = _styledComponents.default.h2(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: ", ";\n font-style: normal;\n font-size: 36px;\n line-height: 42px;\n font-feature-settings: \"pnum\" on, \"lnum\" on;\n color: ", ";\n\n &.with-bold-text {\n span {\n font-family: ", ";\n }\n }\n\n &.product-name-header {\n font-size: 24px;\n line-height: 36px;\n font-weight: 500;\n letter-spacing: -0.015em;\n color: ", ";\n }\n\n &.retailer-name-header {\n font-size: 18px;\n font-weight: 400;\n line-height: 19px;\n color: ", ";\n }\n\n &.input-name-header {\n font-size: 14px;\n line-height: 19px;\n font-weight: 400;\n color: ", ";\n }\n\n &.date-header {\n font-family: ", ";\n color: ", ";\n font-size: 13px;\n font-weight: 400;\n line-height: 18px;\n }\n\n &.table-row-text {\n font-family: ", ";\n color: ", ";\n font-weight: 400;\n font-size: 11px;\n line-height: 18px;\n\n &:last-child {\n min-width: 50px;\n text-align: center;\n }\n }\n\n &.gray-table-row {\n font-family: ", ";\n font-weight: 400;\n font-size: 11px;\n line-height: 19px;\n color: ", ";\n background-color: ", ";\n padding: 1px 3px;\n border-radius: 3px;\n min-width: 50px;\n text-align: center;\n }\n &.header-and-paragraph {\n font-family: ", ";\n font-size: 36px;\n color: ", ";\n p {\n font-family: ", ";\n font-size: 14px;\n color: ", ";\n letter-spacing: -0.015em;\n }\n }\n"])), function (props) {
|
|
19
19
|
return props.fontFamily;
|
|
20
20
|
}, function (props) {
|
|
21
21
|
return props.color;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = Select;
|
|
7
|
+
|
|
8
|
+
var _style = require("./style");
|
|
9
|
+
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
|
|
12
|
+
function Select(props) {
|
|
13
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_style.Container, {
|
|
14
|
+
width: props.width,
|
|
15
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_style.SelectCustom, {
|
|
16
|
+
id: props.id,
|
|
17
|
+
width: props.width,
|
|
18
|
+
onChange: props.onChange,
|
|
19
|
+
defaultValue: props.valueSelected ? props.valueSelected : "",
|
|
20
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("option", {
|
|
21
|
+
value: "",
|
|
22
|
+
disabled: true,
|
|
23
|
+
children: props.placeholder
|
|
24
|
+
}), props.options && props.options.map(function (item, i) {
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("option", {
|
|
26
|
+
className: item.required ? "option-required" : "" //className={ ? "option-required" : ""}
|
|
27
|
+
,
|
|
28
|
+
value: item.value ? item.value : item // selected={
|
|
29
|
+
// item.value
|
|
30
|
+
// ? item.value == props.valueSelected && "selected"
|
|
31
|
+
// : item === props.valueSelected && "selected"
|
|
32
|
+
// }
|
|
33
|
+
,
|
|
34
|
+
children: [item.name ? item.name : item, " ", item !== null && item !== void 0 && item.required ? "*" : ""]
|
|
35
|
+
}, "select-" + item.value ? item.value : item + "-" + i);
|
|
36
|
+
})]
|
|
37
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_style.BackgroundEnd, {})]
|
|
38
|
+
});
|
|
39
|
+
}
|