@typeolymp/ui-components 1.16.0 → 1.16.1
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/build/index.es.js +358 -8
- package/build/index.es.js.map +1 -1
- package/build/index.js +353 -3
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.es.js
CHANGED
|
@@ -2,9 +2,6 @@ import { jsx as jsx$1, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as React$3 from 'react';
|
|
3
3
|
import React__default, { useLayoutEffect, useContext, forwardRef, createElement, createContext, Fragment, useRef, useState, useEffect, useImperativeHandle } from 'react';
|
|
4
4
|
import styled, { keyframes as keyframes$1 } from 'styled-components';
|
|
5
|
-
import { getCountryCodeByLocale, getNativeLanguageByLocale } from '@typeolymp/utils/parsers';
|
|
6
|
-
import { hasCapitalLetter, hasNumber, hasSpecialCharacter } from '@typeolymp/utils/expressions';
|
|
7
|
-
import { Medal as Medal$1 } from '@typeolymp/utils/enums';
|
|
8
5
|
|
|
9
6
|
var theme = {
|
|
10
7
|
colors: {
|
|
@@ -3599,6 +3596,266 @@ var Wrapper$a = styled.div(templateObject_1$Q || (templateObject_1$Q = __makeTem
|
|
|
3599
3596
|
});
|
|
3600
3597
|
var templateObject_1$Q;
|
|
3601
3598
|
|
|
3599
|
+
var parsers = {};
|
|
3600
|
+
|
|
3601
|
+
var getCountryByLocale$1 = {};
|
|
3602
|
+
|
|
3603
|
+
var enums = {};
|
|
3604
|
+
|
|
3605
|
+
var Color = {};
|
|
3606
|
+
|
|
3607
|
+
(function (exports) {
|
|
3608
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3609
|
+
exports.Color = void 0;
|
|
3610
|
+
(function (Color) {
|
|
3611
|
+
Color["RED"] = "red";
|
|
3612
|
+
Color["YELLOW"] = "yellow";
|
|
3613
|
+
Color["BLUE"] = "blue";
|
|
3614
|
+
Color["GREEN"] = "green";
|
|
3615
|
+
Color["PURPLE"] = "purple";
|
|
3616
|
+
Color["PINK"] = "pink";
|
|
3617
|
+
Color["ORANGE"] = "orange";
|
|
3618
|
+
Color["DARK_GRAY"] = "darkGray";
|
|
3619
|
+
Color["LIGHT_GRAY"] = "lightGray";
|
|
3620
|
+
})(exports.Color || (exports.Color = {}));
|
|
3621
|
+
|
|
3622
|
+
}(Color));
|
|
3623
|
+
|
|
3624
|
+
var Country = {};
|
|
3625
|
+
|
|
3626
|
+
(function (exports) {
|
|
3627
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3628
|
+
exports.Country = void 0;
|
|
3629
|
+
(function (Country) {
|
|
3630
|
+
Country["NL"] = "Nederland";
|
|
3631
|
+
Country["BE"] = "Belgi\u00EB";
|
|
3632
|
+
})(exports.Country || (exports.Country = {}));
|
|
3633
|
+
|
|
3634
|
+
}(Country));
|
|
3635
|
+
|
|
3636
|
+
var CourseTranslation = {};
|
|
3637
|
+
|
|
3638
|
+
(function (exports) {
|
|
3639
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3640
|
+
exports.CourseTranslation = void 0;
|
|
3641
|
+
(function (CourseTranslation) {
|
|
3642
|
+
CourseTranslation["NL_NL"] = "nl-NL";
|
|
3643
|
+
// EN_GB = "en-GB",
|
|
3644
|
+
})(exports.CourseTranslation || (exports.CourseTranslation = {}));
|
|
3645
|
+
|
|
3646
|
+
}(CourseTranslation));
|
|
3647
|
+
|
|
3648
|
+
var KeyboardLayout = {};
|
|
3649
|
+
|
|
3650
|
+
(function (exports) {
|
|
3651
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3652
|
+
exports.KeyboardLayout = void 0;
|
|
3653
|
+
(function (KeyboardLayout) {
|
|
3654
|
+
KeyboardLayout["QWERTY_NL"] = "qwerty-nl";
|
|
3655
|
+
// QWERTY_UK = "qwerty-uk",
|
|
3656
|
+
// QWERTY_US = "qwerty-us",
|
|
3657
|
+
// QWERTY_TR = "qwerty-tr",
|
|
3658
|
+
KeyboardLayout["AZERTY_BE"] = "azerty-be";
|
|
3659
|
+
// AZERTY_FR = "azerty-fr",
|
|
3660
|
+
// QWERTZ_DE = "qwertz-de",
|
|
3661
|
+
})(exports.KeyboardLayout || (exports.KeyboardLayout = {}));
|
|
3662
|
+
|
|
3663
|
+
}(KeyboardLayout));
|
|
3664
|
+
|
|
3665
|
+
var Locale = {};
|
|
3666
|
+
|
|
3667
|
+
(function (exports) {
|
|
3668
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3669
|
+
exports.Locale = void 0;
|
|
3670
|
+
(function (Locale) {
|
|
3671
|
+
Locale["NL_NL"] = "nl-NL";
|
|
3672
|
+
Locale["NL_BE"] = "nl-BE";
|
|
3673
|
+
// EN_GB = "en-GB",
|
|
3674
|
+
// FR_FR = "fr-FR",
|
|
3675
|
+
// FR_BE = "fr-BE",
|
|
3676
|
+
// DE_DE = "de-DE",
|
|
3677
|
+
})(exports.Locale || (exports.Locale = {}));
|
|
3678
|
+
|
|
3679
|
+
}(Locale));
|
|
3680
|
+
|
|
3681
|
+
var Plan = {};
|
|
3682
|
+
|
|
3683
|
+
(function (exports) {
|
|
3684
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3685
|
+
exports.Plan = void 0;
|
|
3686
|
+
(function (Plan) {
|
|
3687
|
+
Plan["HOBBY"] = "hobby";
|
|
3688
|
+
Plan["PROFESSIONAL"] = "professional";
|
|
3689
|
+
})(exports.Plan || (exports.Plan = {}));
|
|
3690
|
+
|
|
3691
|
+
}(Plan));
|
|
3692
|
+
|
|
3693
|
+
var TextTopic = {};
|
|
3694
|
+
|
|
3695
|
+
(function (exports) {
|
|
3696
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3697
|
+
exports.TextTopic = void 0;
|
|
3698
|
+
(function (TextTopic) {
|
|
3699
|
+
TextTopic["SPORT"] = "sport";
|
|
3700
|
+
TextTopic["MUSIC"] = "music";
|
|
3701
|
+
TextTopic["TECHNIC"] = "technic";
|
|
3702
|
+
TextTopic["MOVIES"] = "movies";
|
|
3703
|
+
TextTopic["NATURE"] = "nature";
|
|
3704
|
+
TextTopic["HISTORY"] = "history";
|
|
3705
|
+
TextTopic["ART"] = "art";
|
|
3706
|
+
TextTopic["FASHION"] = "fashion";
|
|
3707
|
+
TextTopic["OTHER"] = "other";
|
|
3708
|
+
})(exports.TextTopic || (exports.TextTopic = {}));
|
|
3709
|
+
|
|
3710
|
+
}(TextTopic));
|
|
3711
|
+
|
|
3712
|
+
var Medal$1 = {};
|
|
3713
|
+
|
|
3714
|
+
(function (exports) {
|
|
3715
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3716
|
+
exports.Medal = void 0;
|
|
3717
|
+
(function (Medal) {
|
|
3718
|
+
Medal["GOLD"] = "gold";
|
|
3719
|
+
Medal["SILVER"] = "silver";
|
|
3720
|
+
Medal["BRONZE"] = "bronze";
|
|
3721
|
+
})(exports.Medal || (exports.Medal = {}));
|
|
3722
|
+
|
|
3723
|
+
}(Medal$1));
|
|
3724
|
+
|
|
3725
|
+
(function (exports) {
|
|
3726
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3727
|
+
if (k2 === undefined) k2 = k;
|
|
3728
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3729
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3730
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
3731
|
+
}
|
|
3732
|
+
Object.defineProperty(o, k2, desc);
|
|
3733
|
+
}) : (function(o, m, k, k2) {
|
|
3734
|
+
if (k2 === undefined) k2 = k;
|
|
3735
|
+
o[k2] = m[k];
|
|
3736
|
+
}));
|
|
3737
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
3738
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
3739
|
+
};
|
|
3740
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3741
|
+
__exportStar(Color, exports);
|
|
3742
|
+
__exportStar(Country, exports);
|
|
3743
|
+
__exportStar(CourseTranslation, exports);
|
|
3744
|
+
__exportStar(KeyboardLayout, exports);
|
|
3745
|
+
__exportStar(Locale, exports);
|
|
3746
|
+
__exportStar(Plan, exports);
|
|
3747
|
+
__exportStar(TextTopic, exports);
|
|
3748
|
+
__exportStar(Medal$1, exports);
|
|
3749
|
+
|
|
3750
|
+
}(enums));
|
|
3751
|
+
|
|
3752
|
+
Object.defineProperty(getCountryByLocale$1, "__esModule", { value: true });
|
|
3753
|
+
getCountryByLocale$1.getCountryByLocale = void 0;
|
|
3754
|
+
var enums_1$2 = enums;
|
|
3755
|
+
var getCountryByLocale = function (locale) {
|
|
3756
|
+
var countries = {
|
|
3757
|
+
"nl-NL": enums_1$2.Country.NL,
|
|
3758
|
+
"nl-BE": enums_1$2.Country.BE,
|
|
3759
|
+
};
|
|
3760
|
+
return countries[locale];
|
|
3761
|
+
};
|
|
3762
|
+
getCountryByLocale$1.getCountryByLocale = getCountryByLocale;
|
|
3763
|
+
|
|
3764
|
+
var getCourseTranslationByLocale$1 = {};
|
|
3765
|
+
|
|
3766
|
+
Object.defineProperty(getCourseTranslationByLocale$1, "__esModule", { value: true });
|
|
3767
|
+
getCourseTranslationByLocale$1.getCourseTranslationByLocale = void 0;
|
|
3768
|
+
var enums_1$1 = enums;
|
|
3769
|
+
var getCourseTranslationByLocale = function (locale) {
|
|
3770
|
+
var courseTranslations = {
|
|
3771
|
+
"nl-NL": enums_1$1.CourseTranslation.NL_NL,
|
|
3772
|
+
"nl-BE": enums_1$1.CourseTranslation.NL_NL,
|
|
3773
|
+
// "en-GB": KeyboardLayout.QWERTY_UK,
|
|
3774
|
+
// "en-US": KeyboardLayout.QWERTY_US,
|
|
3775
|
+
// "fr-BE": KeyboardLayout.AZERTY_FR,
|
|
3776
|
+
// "fr-FR": KeyboardLayout.AZERTY_FR,
|
|
3777
|
+
// "de-DE": KeyboardLayout.QWERTZ_DE,
|
|
3778
|
+
};
|
|
3779
|
+
return courseTranslations[locale];
|
|
3780
|
+
};
|
|
3781
|
+
getCourseTranslationByLocale$1.getCourseTranslationByLocale = getCourseTranslationByLocale;
|
|
3782
|
+
|
|
3783
|
+
var getKeyboardLayoutByLocale$1 = {};
|
|
3784
|
+
|
|
3785
|
+
Object.defineProperty(getKeyboardLayoutByLocale$1, "__esModule", { value: true });
|
|
3786
|
+
getKeyboardLayoutByLocale$1.getKeyboardLayoutByLocale = void 0;
|
|
3787
|
+
var enums_1 = enums;
|
|
3788
|
+
var getKeyboardLayoutByLocale = function (locale) {
|
|
3789
|
+
var keyboardLayouts = {
|
|
3790
|
+
"nl-NL": enums_1.KeyboardLayout.QWERTY_NL,
|
|
3791
|
+
"nl-BE": enums_1.KeyboardLayout.AZERTY_BE,
|
|
3792
|
+
// "en-GB": KeyboardLayout.QWERTY_UK,
|
|
3793
|
+
// "en-US": KeyboardLayout.QWERTY_US,
|
|
3794
|
+
// "fr-BE": KeyboardLayout.AZERTY_FR,
|
|
3795
|
+
// "fr-FR": KeyboardLayout.AZERTY_FR,
|
|
3796
|
+
// "de-DE": KeyboardLayout.QWERTZ_DE,
|
|
3797
|
+
};
|
|
3798
|
+
return keyboardLayouts[locale];
|
|
3799
|
+
};
|
|
3800
|
+
getKeyboardLayoutByLocale$1.getKeyboardLayoutByLocale = getKeyboardLayoutByLocale;
|
|
3801
|
+
|
|
3802
|
+
var getLanguageCodeByLocale$1 = {};
|
|
3803
|
+
|
|
3804
|
+
Object.defineProperty(getLanguageCodeByLocale$1, "__esModule", { value: true });
|
|
3805
|
+
getLanguageCodeByLocale$1.getLanguageCodeByLocale = void 0;
|
|
3806
|
+
var getLanguageCodeByLocale = function (locale) { return locale.split("-")[0]; };
|
|
3807
|
+
getLanguageCodeByLocale$1.getLanguageCodeByLocale = getLanguageCodeByLocale;
|
|
3808
|
+
|
|
3809
|
+
var getCountryCodeByLocale$1 = {};
|
|
3810
|
+
|
|
3811
|
+
Object.defineProperty(getCountryCodeByLocale$1, "__esModule", { value: true });
|
|
3812
|
+
getCountryCodeByLocale$1.getCountryCodeByLocale = void 0;
|
|
3813
|
+
var getCountryCodeByLocale = function (locale) { return locale.split("-")[1]; };
|
|
3814
|
+
getCountryCodeByLocale$1.getCountryCodeByLocale = getCountryCodeByLocale;
|
|
3815
|
+
|
|
3816
|
+
var getNativeLanguageByLocale$1 = {};
|
|
3817
|
+
|
|
3818
|
+
Object.defineProperty(getNativeLanguageByLocale$1, "__esModule", { value: true });
|
|
3819
|
+
getNativeLanguageByLocale$1.getNativeLanguageByLocale = void 0;
|
|
3820
|
+
var getNativeLanguageByLocale = function (locale) {
|
|
3821
|
+
var nativeLanguages = {
|
|
3822
|
+
"nl-NL": "Nederlands",
|
|
3823
|
+
"nl-BE": "Nederlands (BE)",
|
|
3824
|
+
// "en-GB": "English (UK)",
|
|
3825
|
+
// "en-US": "English (US)",
|
|
3826
|
+
// "fr-BE": "Français (BE)",
|
|
3827
|
+
// "fr-FR": "Français",
|
|
3828
|
+
// "de-DE": "Deutsch",
|
|
3829
|
+
};
|
|
3830
|
+
return nativeLanguages[locale];
|
|
3831
|
+
};
|
|
3832
|
+
getNativeLanguageByLocale$1.getNativeLanguageByLocale = getNativeLanguageByLocale;
|
|
3833
|
+
|
|
3834
|
+
(function (exports) {
|
|
3835
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3836
|
+
if (k2 === undefined) k2 = k;
|
|
3837
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
3838
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
3839
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
3840
|
+
}
|
|
3841
|
+
Object.defineProperty(o, k2, desc);
|
|
3842
|
+
}) : (function(o, m, k, k2) {
|
|
3843
|
+
if (k2 === undefined) k2 = k;
|
|
3844
|
+
o[k2] = m[k];
|
|
3845
|
+
}));
|
|
3846
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
3847
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
3848
|
+
};
|
|
3849
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3850
|
+
__exportStar(getCountryByLocale$1, exports);
|
|
3851
|
+
__exportStar(getCourseTranslationByLocale$1, exports);
|
|
3852
|
+
__exportStar(getKeyboardLayoutByLocale$1, exports);
|
|
3853
|
+
__exportStar(getLanguageCodeByLocale$1, exports);
|
|
3854
|
+
__exportStar(getCountryCodeByLocale$1, exports);
|
|
3855
|
+
__exportStar(getNativeLanguageByLocale$1, exports);
|
|
3856
|
+
|
|
3857
|
+
}(parsers));
|
|
3858
|
+
|
|
3602
3859
|
var flags = {
|
|
3603
3860
|
NL: (jsxs("svg", __assign$2({ viewBox: "0 0 22 18", xmlSpace: "preserve" }, { children: [jsx$1("path", { d: "M0 1c0-.6.4-1 1-1h20c.6 0 1 .4 1 1v5H0V1z", fill: "#e62743" }), jsx$1("path", { fill: "#fff", d: "M0 6H22V12H0z" }), jsx$1("path", { d: "M0 12h22v5c0 .6-.4 1-1 1H1c-.6 0-1-.4-1-1v-5z", fill: "#148cc6" })] }))),
|
|
3604
3861
|
BE: (jsxs("svg", __assign$2({ viewBox: "0 0 22 18", xmlSpace: "preserve" }, { children: [jsx$1("path", { d: "M15 0h6c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1h-6V0z", fill: "#e62743" }), jsx$1("path", { fill: "#ffd800", d: "M7 0H15V18H7z" }), jsx$1("path", { d: "M0 1c0-.6.4-1 1-1h6v18H1c-.6 0-1-.4-1-1V1z", fill: "#23292f" })] }))),
|
|
@@ -3606,7 +3863,7 @@ var flags = {
|
|
|
3606
3863
|
FR: (jsxs("svg", __assign$2({ viewBox: "0 0 22 18", xmlSpace: "preserve" }, { children: [jsx$1("path", { d: "M15 0h6c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1h-6V0z", fill: "#148cc6" }), jsx$1("path", { fill: "#fff", d: "M7 0H15V18H7z" }), jsx$1("path", { d: "M0 1c0-.6.4-1 1-1h6v18H1c-.6 0-1-.4-1-1V1z", fill: "#e62743" })] }))),
|
|
3607
3864
|
DE: (jsxs("svg", __assign$2({ viewBox: "0 0 22 18", xmlSpace: "preserve" }, { children: [jsx$1("path", { d: "M0 1c0-.6.4-1 1-1h20c.6 0 1 .4 1 1v5H0V1z", fill: "#000" }), jsx$1("path", { fill: "#e62743", d: "M0 6H22V12H0z" }), jsx$1("path", { d: "M0 12h22v5c0 .6-.4 1-1 1H1c-.6 0-1-.4-1-1v-5z", fill: "#ffd800" })] }))),
|
|
3608
3865
|
};
|
|
3609
|
-
var Flag = function (props) { return (jsx$1(Wrapper$a, __assign$2({}, props, { children: flags[getCountryCodeByLocale(props.locale)] }))); };
|
|
3866
|
+
var Flag = function (props) { return (jsx$1(Wrapper$a, __assign$2({}, props, { children: flags[parsers.getCountryCodeByLocale(props.locale)] }))); };
|
|
3610
3867
|
|
|
3611
3868
|
var StyledHeading = styled.span(templateObject_1$P || (templateObject_1$P = __makeTemplateObject$1(["\n font-family: ", ";\n font-size: ", ";\n font-weight: 700;\n font-style: normal;\n line-height: ", ";\n letter-spacing: ", ";\n margin: 0;\n color: ", ";\n text-align: ", ";\n"], ["\n font-family: ", ";\n font-size: ", ";\n font-weight: 700;\n font-style: normal;\n line-height: ", ";\n letter-spacing: ", ";\n margin: 0;\n color: ", ";\n text-align: ", ";\n"])), theme.fonts.heading, function (_a) {
|
|
3612
3869
|
var type = _a.type;
|
|
@@ -3830,6 +4087,99 @@ var Helper = styled(StyledParagraph)(templateObject_6$3 || (templateObject_6$3 =
|
|
|
3830
4087
|
}, fadeIn);
|
|
3831
4088
|
var templateObject_1$L, templateObject_2$x, templateObject_3$b, templateObject_4$7, templateObject_5$3, templateObject_6$3;
|
|
3832
4089
|
|
|
4090
|
+
var expressions = {};
|
|
4091
|
+
|
|
4092
|
+
var hasCapitalLetter$1 = {};
|
|
4093
|
+
|
|
4094
|
+
Object.defineProperty(hasCapitalLetter$1, "__esModule", { value: true });
|
|
4095
|
+
hasCapitalLetter$1.hasCapitalLetter = void 0;
|
|
4096
|
+
var hasCapitalLetter = function (input) {
|
|
4097
|
+
var regex = new RegExp(/[A-Z]/g);
|
|
4098
|
+
return regex.test(input);
|
|
4099
|
+
};
|
|
4100
|
+
hasCapitalLetter$1.hasCapitalLetter = hasCapitalLetter;
|
|
4101
|
+
|
|
4102
|
+
var hasNumber$1 = {};
|
|
4103
|
+
|
|
4104
|
+
Object.defineProperty(hasNumber$1, "__esModule", { value: true });
|
|
4105
|
+
hasNumber$1.hasNumber = void 0;
|
|
4106
|
+
var hasNumber = function (input) {
|
|
4107
|
+
var regex = new RegExp(/\d/g);
|
|
4108
|
+
return regex.test(input);
|
|
4109
|
+
};
|
|
4110
|
+
hasNumber$1.hasNumber = hasNumber;
|
|
4111
|
+
|
|
4112
|
+
var hasSpecialCharacter$1 = {};
|
|
4113
|
+
|
|
4114
|
+
Object.defineProperty(hasSpecialCharacter$1, "__esModule", { value: true });
|
|
4115
|
+
hasSpecialCharacter$1.hasSpecialCharacter = void 0;
|
|
4116
|
+
var hasSpecialCharacter = function (input) {
|
|
4117
|
+
var regex = new RegExp(/`|~|!|"|-|_|@|#|\$|%|\^|&|\*|\(|\)|\+|=|\[|\{|\]|\}|\||\\|'|<|,|\.|>|\?|\/|""|;|:|\s/g);
|
|
4118
|
+
return regex.test(input);
|
|
4119
|
+
};
|
|
4120
|
+
hasSpecialCharacter$1.hasSpecialCharacter = hasSpecialCharacter;
|
|
4121
|
+
|
|
4122
|
+
var isValidEmail$1 = {};
|
|
4123
|
+
|
|
4124
|
+
Object.defineProperty(isValidEmail$1, "__esModule", { value: true });
|
|
4125
|
+
isValidEmail$1.isValidEmail = void 0;
|
|
4126
|
+
var isValidEmail = function (email) {
|
|
4127
|
+
var regex = new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
|
|
4128
|
+
return regex.test(email);
|
|
4129
|
+
};
|
|
4130
|
+
isValidEmail$1.isValidEmail = isValidEmail;
|
|
4131
|
+
|
|
4132
|
+
var isValidUsername$1 = {};
|
|
4133
|
+
|
|
4134
|
+
Object.defineProperty(isValidUsername$1, "__esModule", { value: true });
|
|
4135
|
+
isValidUsername$1.isValidUsername = void 0;
|
|
4136
|
+
var isValidEmail_1 = isValidEmail$1;
|
|
4137
|
+
var isValidUsername = function (username) {
|
|
4138
|
+
return username.length >= 5 &&
|
|
4139
|
+
username.length <= 15 &&
|
|
4140
|
+
username.indexOf(" ") < 0 &&
|
|
4141
|
+
!(0, isValidEmail_1.isValidEmail)(username);
|
|
4142
|
+
};
|
|
4143
|
+
isValidUsername$1.isValidUsername = isValidUsername;
|
|
4144
|
+
|
|
4145
|
+
var isStrongPassword$1 = {};
|
|
4146
|
+
|
|
4147
|
+
Object.defineProperty(isStrongPassword$1, "__esModule", { value: true });
|
|
4148
|
+
isStrongPassword$1.isStrongPassword = void 0;
|
|
4149
|
+
var _1 = expressions;
|
|
4150
|
+
var isStrongPassword = function (password) {
|
|
4151
|
+
return password.length >= 8 &&
|
|
4152
|
+
(0, _1.hasNumber)(password) &&
|
|
4153
|
+
(0, _1.hasSpecialCharacter)(password) &&
|
|
4154
|
+
(0, _1.hasCapitalLetter)(password);
|
|
4155
|
+
};
|
|
4156
|
+
isStrongPassword$1.isStrongPassword = isStrongPassword;
|
|
4157
|
+
|
|
4158
|
+
(function (exports) {
|
|
4159
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4160
|
+
if (k2 === undefined) k2 = k;
|
|
4161
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4162
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
4163
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
4164
|
+
}
|
|
4165
|
+
Object.defineProperty(o, k2, desc);
|
|
4166
|
+
}) : (function(o, m, k, k2) {
|
|
4167
|
+
if (k2 === undefined) k2 = k;
|
|
4168
|
+
o[k2] = m[k];
|
|
4169
|
+
}));
|
|
4170
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
4171
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
4172
|
+
};
|
|
4173
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4174
|
+
__exportStar(hasCapitalLetter$1, exports);
|
|
4175
|
+
__exportStar(hasNumber$1, exports);
|
|
4176
|
+
__exportStar(hasSpecialCharacter$1, exports);
|
|
4177
|
+
__exportStar(isValidEmail$1, exports);
|
|
4178
|
+
__exportStar(isValidUsername$1, exports);
|
|
4179
|
+
__exportStar(isStrongPassword$1, exports);
|
|
4180
|
+
|
|
4181
|
+
}(expressions));
|
|
4182
|
+
|
|
3833
4183
|
var password_helper_capital_letter = "Minimaal 1 hoofdletter";
|
|
3834
4184
|
var password_helper_number = "Minimaal 1 getal";
|
|
3835
4185
|
var password_helper_special_character = "Minimaal 1 leesteken";
|
|
@@ -3866,7 +4216,7 @@ var PasswordInput = function (props) {
|
|
|
3866
4216
|
if (props.onKeyPress)
|
|
3867
4217
|
props.onKeyPress(e);
|
|
3868
4218
|
};
|
|
3869
|
-
return (jsxs(Container$m, { children: [jsxs(InputIconWrapper, __assign$2({ disabled: props.disabled }, { children: [jsx$1(Icon, { type: isVisible ? "eyeInvisible" : "eye", color: "gray", size: "small", onClick: toggle }), jsx$1(StyledInput, __assign$2({ type: isVisible ? "text" : "password" }, props, { onChange: onChange, onKeyPress: onKeyPress }))] })), props.helperLocale && value.length ? (jsxs(HelperContainer, { children: [jsxs(Helper, __assign$2({ isOk: hasCapitalLetter(value) }, { children: ["\u2022 ", translations[props.helperLocale].password_helper_capital_letter] })), jsxs(Helper, __assign$2({ isOk: hasNumber(value) }, { children: ["\u2022 ", translations[props.helperLocale].password_helper_number] })), jsxs(Helper, __assign$2({ isOk: hasSpecialCharacter(value) }, { children: ["\u2022 ", translations[props.helperLocale].password_helper_special_character] })), jsxs(Helper, __assign$2({ isOk: value.length >= 8 }, { children: ["\u2022 ", translations[props.helperLocale].password_helper_password_length] }))] })) : null] }));
|
|
4219
|
+
return (jsxs(Container$m, { children: [jsxs(InputIconWrapper, __assign$2({ disabled: props.disabled }, { children: [jsx$1(Icon, { type: isVisible ? "eyeInvisible" : "eye", color: "gray", size: "small", onClick: toggle }), jsx$1(StyledInput, __assign$2({ type: isVisible ? "text" : "password" }, props, { onChange: onChange, onKeyPress: onKeyPress }))] })), props.helperLocale && value.length ? (jsxs(HelperContainer, { children: [jsxs(Helper, __assign$2({ isOk: expressions.hasCapitalLetter(value) }, { children: ["\u2022 ", translations[props.helperLocale].password_helper_capital_letter] })), jsxs(Helper, __assign$2({ isOk: expressions.hasNumber(value) }, { children: ["\u2022 ", translations[props.helperLocale].password_helper_number] })), jsxs(Helper, __assign$2({ isOk: expressions.hasSpecialCharacter(value) }, { children: ["\u2022 ", translations[props.helperLocale].password_helper_special_character] })), jsxs(Helper, __assign$2({ isOk: value.length >= 8 }, { children: ["\u2022 ", translations[props.helperLocale].password_helper_password_length] }))] })) : null] }));
|
|
3870
4220
|
};
|
|
3871
4221
|
|
|
3872
4222
|
function requiredArgs(required, args) {
|
|
@@ -11130,15 +11480,15 @@ var LocaleSelect = function (props) {
|
|
|
11130
11480
|
setLocale(locale);
|
|
11131
11481
|
props.onChange(locale);
|
|
11132
11482
|
};
|
|
11133
|
-
return (jsxs(Container$d, __assign$2({ color: props.color || "light", dropdownIsVisible: dropdownIsVisible, onClick: function () { return setDropdownIsVisible(!dropdownIsVisible); }, onMouseLeave: function () { return setDropdownIsVisible(false); } }, { children: [jsxs(SelectedLocaleWrapper, { children: [jsxs("div", { children: [jsx$1(Flag, { locale: locale }), jsx$1(Spacer, { horizontal: 10 }), jsx$1(Heading, __assign$2({ type: "h6" }, { children: getNativeLanguageByLocale(locale) }))] }), dropdownIsVisible ? (jsx$1(Icon, { type: "chevronUp", size: "small", color: "darkGray" })) : (jsx$1(Icon, { type: "chevronDown", size: "small", color: "darkGray" }))] }), dropdownIsVisible && (jsx$1(DropdownContainer, __assign$2({ color: props.color || "light" }, { children: props.locales
|
|
11483
|
+
return (jsxs(Container$d, __assign$2({ color: props.color || "light", dropdownIsVisible: dropdownIsVisible, onClick: function () { return setDropdownIsVisible(!dropdownIsVisible); }, onMouseLeave: function () { return setDropdownIsVisible(false); } }, { children: [jsxs(SelectedLocaleWrapper, { children: [jsxs("div", { children: [jsx$1(Flag, { locale: locale }), jsx$1(Spacer, { horizontal: 10 }), jsx$1(Heading, __assign$2({ type: "h6" }, { children: parsers.getNativeLanguageByLocale(locale) }))] }), dropdownIsVisible ? (jsx$1(Icon, { type: "chevronUp", size: "small", color: "darkGray" })) : (jsx$1(Icon, { type: "chevronDown", size: "small", color: "darkGray" }))] }), dropdownIsVisible && (jsx$1(DropdownContainer, __assign$2({ color: props.color || "light" }, { children: props.locales
|
|
11134
11484
|
.filter(function (l) { return l !== locale; })
|
|
11135
|
-
.map(function (locale) { return (jsxs(LocaleWrapper, __assign$2({ onClick: function () { return onSelectLocale(locale); } }, { children: [jsxs("div", { children: [jsx$1(Flag, { locale: locale }), jsx$1(Spacer, { horizontal: 10 }), jsx$1(Paragraph, __assign$2({ size: "small", weight: "regular", color: "darkGray" }, { children: getNativeLanguageByLocale(locale) }))] }), jsx$1(Icon, { type: "chevronRight", size: "small", color: "darkGray" })] }), locale)); }) })))] })));
|
|
11485
|
+
.map(function (locale) { return (jsxs(LocaleWrapper, __assign$2({ onClick: function () { return onSelectLocale(locale); } }, { children: [jsxs("div", { children: [jsx$1(Flag, { locale: locale }), jsx$1(Spacer, { horizontal: 10 }), jsx$1(Paragraph, __assign$2({ size: "small", weight: "regular", color: "darkGray" }, { children: parsers.getNativeLanguageByLocale(locale) }))] }), jsx$1(Icon, { type: "chevronRight", size: "small", color: "darkGray" })] }), locale)); }) })))] })));
|
|
11136
11486
|
};
|
|
11137
11487
|
|
|
11138
11488
|
var Wrapper$1 = styled.div(templateObject_1$o || (templateObject_1$o = __makeTemplateObject$1(["\n width: 100%;\n min-width: 200px;\n display: flex;\n justify-content: space-between;\n\n > div {\n display: flex;\n align-items: center;\n }\n"], ["\n width: 100%;\n min-width: 200px;\n display: flex;\n justify-content: space-between;\n\n > div {\n display: flex;\n align-items: center;\n }\n"])));
|
|
11139
11489
|
var templateObject_1$o;
|
|
11140
11490
|
|
|
11141
|
-
var Medals = function (props) { return (jsxs(Wrapper$1, { children: [jsxs("div", { children: [jsx$1(Medal, { type: Medal
|
|
11491
|
+
var Medals = function (props) { return (jsxs(Wrapper$1, { children: [jsxs("div", { children: [jsx$1(Medal, { type: enums.Medal.GOLD }), jsx$1(Spacer, { horizontal: 5 }), jsxs(Heading, __assign$2({ type: "h6" }, { children: ["x ", props.gold || 0] }))] }), jsxs("div", { children: [jsx$1(Medal, { type: enums.Medal.SILVER }), jsx$1(Spacer, { horizontal: 5 }), jsxs(Heading, __assign$2({ type: "h6" }, { children: ["x ", props.silver || 0] }))] }), jsxs("div", { children: [jsx$1(Medal, { type: enums.Medal.BRONZE }), jsx$1(Spacer, { horizontal: 5 }), jsxs(Heading, __assign$2({ type: "h6" }, { children: ["x ", props.bronze || 0] }))] })] })); };
|
|
11142
11492
|
|
|
11143
11493
|
var NotificationContainer = styled.div(templateObject_1$n || (templateObject_1$n = __makeTemplateObject$1(["\n width: fit-content;\n max-width: 460px;\n padding: 15px;\n border-radius: 6px;\n background-color: ", ";\n box-shadow: 0px 2px 0px rgb(0 0 0 / 20%);\n\n > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 15px;\n }\n"], ["\n width: fit-content;\n max-width: 460px;\n padding: 15px;\n border-radius: 6px;\n background-color: ", ";\n box-shadow: 0px 2px 0px rgb(0 0 0 / 20%);\n\n > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 15px;\n }\n"])), function (_a) {
|
|
11144
11494
|
var contrast = _a.contrast;
|