@typeolymp/ui-components 1.9.11 → 1.9.13
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/components/atoms/Button/index.d.ts +1 -1
- package/build/components/atoms/Flag/index.d.ts +2 -2
- package/build/components/atoms/Flag/stories.d.ts +2 -1
- package/build/components/atoms/Medal/index.d.ts +2 -2
- package/build/components/atoms/Medal/stories.d.ts +2 -1
- package/build/components/molecules/Card/index.d.ts +2 -2
- package/build/components/molecules/Loading/index.d.ts +2 -2
- package/build/components/molecules/LocaleSelect/index.d.ts +4 -4
- package/build/components/molecules/LocaleSelect/styles.d.ts +1 -1
- package/build/components/molecules/PasswordInputField/index.d.ts +2 -2
- package/build/components/molecules/PasswordInputField/translations.d.ts +2 -2
- package/build/components/organisms/Keyboard/stories.d.ts +2 -1
- package/build/index.es.js +246 -31
- package/build/index.es.js.map +1 -1
- package/build/index.js +246 -31
- package/build/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@ export declare type PropsType = {
|
|
|
10
10
|
href?: string;
|
|
11
11
|
asAnchor?: boolean;
|
|
12
12
|
onClick?(): void;
|
|
13
|
-
onClickAsync?(resolve:
|
|
13
|
+
onClickAsync?(resolve: (value: void) => void): void;
|
|
14
14
|
};
|
|
15
15
|
declare const Button: React.ForwardRefExoticComponent<PropsType & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
16
16
|
export default Button;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Locale } from "@typeolymp/utility/build/enums";
|
|
3
3
|
export declare type PropsType = {
|
|
4
|
-
locale:
|
|
4
|
+
locale: Locale;
|
|
5
5
|
size?: "small" | "medium" | "large";
|
|
6
6
|
};
|
|
7
7
|
declare const Flag: FC<PropsType>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { Locale } from "@typeolymp/utility/build/enums";
|
|
2
3
|
import { PropsType } from ".";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
@@ -14,7 +15,7 @@ export declare const Playground: {
|
|
|
14
15
|
};
|
|
15
16
|
argTypes: {
|
|
16
17
|
locale: {
|
|
17
|
-
options:
|
|
18
|
+
options: Locale[];
|
|
18
19
|
control: {
|
|
19
20
|
type: string;
|
|
20
21
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Medal as MedalEnum } from "@typeolymp/utility/build/enums";
|
|
3
3
|
export declare type PropsType = {
|
|
4
|
-
type:
|
|
4
|
+
type: MedalEnum;
|
|
5
5
|
size?: "small" | "large";
|
|
6
6
|
};
|
|
7
7
|
declare const Medal: FC<PropsType>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { Medal as MedalEnum } from "@typeolymp/utility/build/enums";
|
|
2
3
|
import { PropsType } from ".";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
@@ -14,7 +15,7 @@ export declare const Playground: {
|
|
|
14
15
|
};
|
|
15
16
|
argTypes: {
|
|
16
17
|
type: {
|
|
17
|
-
options:
|
|
18
|
+
options: MedalEnum[];
|
|
18
19
|
control: {
|
|
19
20
|
type: string;
|
|
20
21
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC, ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Color } from "@typeolymp/utility/build/enums";
|
|
3
3
|
export declare type PropsType = {
|
|
4
|
-
ellipse?:
|
|
4
|
+
ellipse?: Color;
|
|
5
5
|
id?: string;
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Color } from "@typeolymp/utility/build/enums";
|
|
3
3
|
export declare type PropsType = {
|
|
4
|
-
color:
|
|
4
|
+
color: Color;
|
|
5
5
|
text?: string;
|
|
6
6
|
textColor?: "black" | "white";
|
|
7
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Locale } from "@typeolymp/utility/build/enums";
|
|
3
3
|
export declare type PropsType = {
|
|
4
4
|
color?: "light" | "dark";
|
|
5
|
-
locales:
|
|
6
|
-
defaultValue:
|
|
7
|
-
onChange(locale:
|
|
5
|
+
locales: Locale[];
|
|
6
|
+
defaultValue: Locale;
|
|
7
|
+
onChange(locale: Locale): void;
|
|
8
8
|
};
|
|
9
9
|
declare const LocaleSelect: FC<PropsType>;
|
|
10
10
|
export default LocaleSelect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Locale } from "@typeolymp/utility/build/enums";
|
|
3
3
|
export declare type PropsType = {
|
|
4
4
|
name: string;
|
|
5
5
|
label: string | JSX.Element;
|
|
@@ -8,7 +8,7 @@ export declare type PropsType = {
|
|
|
8
8
|
autoFocus?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
placeholder?: string;
|
|
11
|
-
helperLocale?:
|
|
11
|
+
helperLocale?: Locale;
|
|
12
12
|
onChange?(fieldName: string, value: string): void;
|
|
13
13
|
onKeyPress?(e: KeyboardEvent): void;
|
|
14
14
|
onBlur?(fieldName: string): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Locale } from "@typeolymp/utility/build/enums";
|
|
2
2
|
declare type TranslationsType = {
|
|
3
3
|
capitalLetter: string;
|
|
4
4
|
number: string;
|
|
@@ -6,6 +6,6 @@ declare type TranslationsType = {
|
|
|
6
6
|
length: string;
|
|
7
7
|
};
|
|
8
8
|
declare const translations: {
|
|
9
|
-
[key in
|
|
9
|
+
[key in Locale]: TranslationsType;
|
|
10
10
|
};
|
|
11
11
|
export default translations;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PropsType } from ".";
|
|
3
|
+
import { KeyboardLayout } from "@typeolymp/utility/build/enums";
|
|
3
4
|
declare const _default: {
|
|
4
5
|
title: string;
|
|
5
6
|
component: React.FC<PropsType>;
|
|
@@ -13,7 +14,7 @@ export declare const Playground: {
|
|
|
13
14
|
};
|
|
14
15
|
argTypes: {
|
|
15
16
|
layout: {
|
|
16
|
-
options:
|
|
17
|
+
options: KeyboardLayout[];
|
|
17
18
|
control: {
|
|
18
19
|
type: string;
|
|
19
20
|
};
|
package/build/index.es.js
CHANGED
|
@@ -393,15 +393,240 @@ var Wrapper$9 = styled.div(templateObject_1$L || (templateObject_1$L = __makeTem
|
|
|
393
393
|
});
|
|
394
394
|
var templateObject_1$L;
|
|
395
395
|
|
|
396
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
397
|
+
|
|
396
398
|
var parsers = {};
|
|
397
399
|
|
|
400
|
+
var enums = {};
|
|
401
|
+
|
|
402
|
+
var AchievementType$1 = {};
|
|
403
|
+
|
|
404
|
+
Object.defineProperty(AchievementType$1, "__esModule", { value: true });
|
|
405
|
+
var AchievementType;
|
|
406
|
+
(function (AchievementType) {
|
|
407
|
+
AchievementType["PRACTICE_TIME"] = "practiceTime";
|
|
408
|
+
AchievementType["PRACTICE_STREAK"] = "practiceStreak";
|
|
409
|
+
AchievementType["MEDALS"] = "medals";
|
|
410
|
+
})(AchievementType || (AchievementType = {}));
|
|
411
|
+
AchievementType$1.default = AchievementType;
|
|
412
|
+
|
|
413
|
+
var ChartDataType$1 = {};
|
|
414
|
+
|
|
415
|
+
Object.defineProperty(ChartDataType$1, "__esModule", { value: true });
|
|
416
|
+
var ChartDataType;
|
|
417
|
+
(function (ChartDataType) {
|
|
418
|
+
ChartDataType["PROGRESS"] = "progress";
|
|
419
|
+
ChartDataType["TIME_PRACTISED"] = "timePractised";
|
|
420
|
+
ChartDataType["RESULTS"] = "results";
|
|
421
|
+
ChartDataType["HITS"] = "hits";
|
|
422
|
+
ChartDataType["KPM"] = "kpm";
|
|
423
|
+
ChartDataType["ACCURACY"] = "accuracy";
|
|
424
|
+
})(ChartDataType || (ChartDataType = {}));
|
|
425
|
+
ChartDataType$1.default = ChartDataType;
|
|
426
|
+
|
|
427
|
+
var Color$1 = {};
|
|
428
|
+
|
|
429
|
+
Object.defineProperty(Color$1, "__esModule", { value: true });
|
|
430
|
+
var Color;
|
|
431
|
+
(function (Color) {
|
|
432
|
+
Color["RED"] = "red";
|
|
433
|
+
Color["YELLOW"] = "yellow";
|
|
434
|
+
Color["BLUE"] = "blue";
|
|
435
|
+
Color["GREEN"] = "green";
|
|
436
|
+
Color["PURPLE"] = "purple";
|
|
437
|
+
Color["PINK"] = "pink";
|
|
438
|
+
Color["ORANGE"] = "orange";
|
|
439
|
+
Color["DARK_GRAY"] = "darkGray";
|
|
440
|
+
Color["LIGHT_GRAY"] = "lightGray";
|
|
441
|
+
})(Color || (Color = {}));
|
|
442
|
+
Color$1.default = Color;
|
|
443
|
+
|
|
444
|
+
var CourseTranslation$1 = {};
|
|
445
|
+
|
|
446
|
+
Object.defineProperty(CourseTranslation$1, "__esModule", { value: true });
|
|
447
|
+
var CourseTranslation;
|
|
448
|
+
(function (CourseTranslation) {
|
|
449
|
+
CourseTranslation["NL_NL"] = "nl-NL";
|
|
450
|
+
// EN_GB = "en-GB",
|
|
451
|
+
})(CourseTranslation || (CourseTranslation = {}));
|
|
452
|
+
CourseTranslation$1.default = CourseTranslation;
|
|
453
|
+
|
|
454
|
+
var Currency$1 = {};
|
|
455
|
+
|
|
456
|
+
Object.defineProperty(Currency$1, "__esModule", { value: true });
|
|
457
|
+
var Currency;
|
|
458
|
+
(function (Currency) {
|
|
459
|
+
Currency["EUR"] = "EUR";
|
|
460
|
+
Currency["GBP"] = "GBP";
|
|
461
|
+
Currency["USD"] = "USD";
|
|
462
|
+
})(Currency || (Currency = {}));
|
|
463
|
+
Currency$1.default = Currency;
|
|
464
|
+
|
|
465
|
+
var ExerciseType$1 = {};
|
|
466
|
+
|
|
467
|
+
Object.defineProperty(ExerciseType$1, "__esModule", { value: true });
|
|
468
|
+
var ExerciseType;
|
|
469
|
+
(function (ExerciseType) {
|
|
470
|
+
ExerciseType["KEYS"] = "keys";
|
|
471
|
+
ExerciseType["DRILLS"] = "drills";
|
|
472
|
+
ExerciseType["WORDS"] = "words";
|
|
473
|
+
ExerciseType["TEXT"] = "text";
|
|
474
|
+
})(ExerciseType || (ExerciseType = {}));
|
|
475
|
+
ExerciseType$1.default = ExerciseType;
|
|
476
|
+
|
|
477
|
+
var KeyboardLayout$1 = {};
|
|
478
|
+
|
|
479
|
+
Object.defineProperty(KeyboardLayout$1, "__esModule", { value: true });
|
|
480
|
+
var KeyboardLayout;
|
|
481
|
+
(function (KeyboardLayout) {
|
|
482
|
+
KeyboardLayout["QWERTY_NL"] = "qwerty-nl";
|
|
483
|
+
// QWERTY_UK = "qwerty-uk",
|
|
484
|
+
// QWERTY_US = "qwerty-us",
|
|
485
|
+
// QWERTY_TR = "qwerty-tr",
|
|
486
|
+
KeyboardLayout["AZERTY_BE"] = "azerty-be";
|
|
487
|
+
// AZERTY_FR = "azerty-fr",
|
|
488
|
+
// QWERTZ_DE = "qwertz-de",
|
|
489
|
+
})(KeyboardLayout || (KeyboardLayout = {}));
|
|
490
|
+
KeyboardLayout$1.default = KeyboardLayout;
|
|
491
|
+
|
|
492
|
+
var Locale$1 = {};
|
|
493
|
+
|
|
494
|
+
Object.defineProperty(Locale$1, "__esModule", { value: true });
|
|
495
|
+
var Locale;
|
|
496
|
+
(function (Locale) {
|
|
497
|
+
Locale["NL_NL"] = "nl-NL";
|
|
498
|
+
Locale["NL_BE"] = "nl-BE";
|
|
499
|
+
// EN_GB = "en-GB",
|
|
500
|
+
// FR_FR = "fr-FR",
|
|
501
|
+
// FR_BE = "fr-BE",
|
|
502
|
+
// DE_DE = "de-DE",
|
|
503
|
+
})(Locale || (Locale = {}));
|
|
504
|
+
Locale$1.default = Locale;
|
|
505
|
+
|
|
506
|
+
var Medal$2 = {};
|
|
507
|
+
|
|
508
|
+
Object.defineProperty(Medal$2, "__esModule", { value: true });
|
|
509
|
+
var Medal$1;
|
|
510
|
+
(function (Medal) {
|
|
511
|
+
Medal["GOLD"] = "gold";
|
|
512
|
+
Medal["SILVER"] = "silver";
|
|
513
|
+
Medal["BRONZE"] = "bronze";
|
|
514
|
+
})(Medal$1 || (Medal$1 = {}));
|
|
515
|
+
Medal$2.default = Medal$1;
|
|
516
|
+
|
|
517
|
+
var PaymentStatus$1 = {};
|
|
518
|
+
|
|
519
|
+
Object.defineProperty(PaymentStatus$1, "__esModule", { value: true });
|
|
520
|
+
var PaymentStatus;
|
|
521
|
+
(function (PaymentStatus) {
|
|
522
|
+
PaymentStatus["OPEN"] = "open";
|
|
523
|
+
PaymentStatus["PAID"] = "paid";
|
|
524
|
+
})(PaymentStatus || (PaymentStatus = {}));
|
|
525
|
+
PaymentStatus$1.default = PaymentStatus;
|
|
526
|
+
|
|
527
|
+
var PaymentType$1 = {};
|
|
528
|
+
|
|
529
|
+
Object.defineProperty(PaymentType$1, "__esModule", { value: true });
|
|
530
|
+
var PaymentType;
|
|
531
|
+
(function (PaymentType) {
|
|
532
|
+
PaymentType["REGISTRATION"] = "registration";
|
|
533
|
+
PaymentType["UPGRADE"] = "upgrade";
|
|
534
|
+
})(PaymentType || (PaymentType = {}));
|
|
535
|
+
PaymentType$1.default = PaymentType;
|
|
536
|
+
|
|
537
|
+
var Plan$1 = {};
|
|
538
|
+
|
|
539
|
+
Object.defineProperty(Plan$1, "__esModule", { value: true });
|
|
540
|
+
var Plan;
|
|
541
|
+
(function (Plan) {
|
|
542
|
+
Plan["HOBBY"] = "hobby";
|
|
543
|
+
Plan["PROFESSIONAL"] = "professional";
|
|
544
|
+
})(Plan || (Plan = {}));
|
|
545
|
+
Plan$1.default = Plan;
|
|
546
|
+
|
|
547
|
+
var RankingType$1 = {};
|
|
548
|
+
|
|
549
|
+
Object.defineProperty(RankingType$1, "__esModule", { value: true });
|
|
550
|
+
var RankingType;
|
|
551
|
+
(function (RankingType) {
|
|
552
|
+
RankingType["SPEED"] = "speed";
|
|
553
|
+
RankingType["ACCURACY"] = "accuracy";
|
|
554
|
+
RankingType["EXERCISES"] = "exercises";
|
|
555
|
+
})(RankingType || (RankingType = {}));
|
|
556
|
+
RankingType$1.default = RankingType;
|
|
557
|
+
|
|
558
|
+
var Role$1 = {};
|
|
559
|
+
|
|
560
|
+
Object.defineProperty(Role$1, "__esModule", { value: true });
|
|
561
|
+
var Role;
|
|
562
|
+
(function (Role) {
|
|
563
|
+
Role["ADMIN"] = "admin";
|
|
564
|
+
Role["STUDENT"] = "student";
|
|
565
|
+
})(Role || (Role = {}));
|
|
566
|
+
Role$1.default = Role;
|
|
567
|
+
|
|
568
|
+
var TextTopic$1 = {};
|
|
569
|
+
|
|
570
|
+
Object.defineProperty(TextTopic$1, "__esModule", { value: true });
|
|
571
|
+
var TextTopic;
|
|
572
|
+
(function (TextTopic) {
|
|
573
|
+
TextTopic["SPORT"] = "sport";
|
|
574
|
+
TextTopic["MUSIC"] = "music";
|
|
575
|
+
TextTopic["TECHNIC"] = "technic";
|
|
576
|
+
TextTopic["MOVIES"] = "movies";
|
|
577
|
+
TextTopic["NATURE"] = "nature";
|
|
578
|
+
TextTopic["HISTORY"] = "history";
|
|
579
|
+
TextTopic["ART"] = "art";
|
|
580
|
+
TextTopic["FASHION"] = "fashion";
|
|
581
|
+
TextTopic["OTHER"] = "other";
|
|
582
|
+
})(TextTopic || (TextTopic = {}));
|
|
583
|
+
TextTopic$1.default = TextTopic;
|
|
584
|
+
|
|
585
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
586
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
587
|
+
};
|
|
588
|
+
Object.defineProperty(enums, "__esModule", { value: true });
|
|
589
|
+
enums.TextTopic = enums.Role = enums.RankingType = enums.Plan = enums.PaymentType = enums.PaymentStatus = enums.Medal = enums.Locale = enums.KeyboardLayout = enums.ExerciseType = enums.Currency = enums.CourseTranslation = enums.Color = enums.ChartDataType = enums.AchievementType = void 0;
|
|
590
|
+
var AchievementType_1 = __importDefault(AchievementType$1);
|
|
591
|
+
enums.AchievementType = AchievementType_1.default;
|
|
592
|
+
var ChartDataType_1 = __importDefault(ChartDataType$1);
|
|
593
|
+
enums.ChartDataType = ChartDataType_1.default;
|
|
594
|
+
var Color_1 = __importDefault(Color$1);
|
|
595
|
+
enums.Color = Color_1.default;
|
|
596
|
+
var CourseTranslation_1 = __importDefault(CourseTranslation$1);
|
|
597
|
+
enums.CourseTranslation = CourseTranslation_1.default;
|
|
598
|
+
var Currency_1 = __importDefault(Currency$1);
|
|
599
|
+
enums.Currency = Currency_1.default;
|
|
600
|
+
var ExerciseType_1 = __importDefault(ExerciseType$1);
|
|
601
|
+
enums.ExerciseType = ExerciseType_1.default;
|
|
602
|
+
var KeyboardLayout_1 = __importDefault(KeyboardLayout$1);
|
|
603
|
+
enums.KeyboardLayout = KeyboardLayout_1.default;
|
|
604
|
+
var Locale_1 = __importDefault(Locale$1);
|
|
605
|
+
enums.Locale = Locale_1.default;
|
|
606
|
+
var Medal_1 = __importDefault(Medal$2);
|
|
607
|
+
enums.Medal = Medal_1.default;
|
|
608
|
+
var PaymentStatus_1 = __importDefault(PaymentStatus$1);
|
|
609
|
+
enums.PaymentStatus = PaymentStatus_1.default;
|
|
610
|
+
var PaymentType_1 = __importDefault(PaymentType$1);
|
|
611
|
+
enums.PaymentType = PaymentType_1.default;
|
|
612
|
+
var Plan_1 = __importDefault(Plan$1);
|
|
613
|
+
enums.Plan = Plan_1.default;
|
|
614
|
+
var RankingType_1 = __importDefault(RankingType$1);
|
|
615
|
+
enums.RankingType = RankingType_1.default;
|
|
616
|
+
var Role_1 = __importDefault(Role$1);
|
|
617
|
+
enums.Role = Role_1.default;
|
|
618
|
+
var TextTopic_1 = __importDefault(TextTopic$1);
|
|
619
|
+
enums.TextTopic = TextTopic_1.default;
|
|
620
|
+
|
|
398
621
|
Object.defineProperty(parsers, "__esModule", { value: true });
|
|
399
622
|
parsers.getKeyboardLayoutByLocale = getCountryCodeByLocale_1 = parsers.getCountryCodeByLocale = parsers.getLanguageCodeByLocale = getNativeLanguageByLocale_1 = parsers.getNativeLanguageByLocale = void 0;
|
|
623
|
+
var enums_1 = enums;
|
|
400
624
|
var getNativeLanguageByLocale = function (locale) {
|
|
401
625
|
var nativeLanguages = {
|
|
402
|
-
"en-GB": "English (UK)",
|
|
403
626
|
"nl-NL": "Nederlands",
|
|
404
627
|
"nl-BE": "Nederlands (BE)",
|
|
628
|
+
// "en-GB": "English (UK)",
|
|
629
|
+
// "en-US": "English (US)",
|
|
405
630
|
// "fr-BE": "Français (BE)",
|
|
406
631
|
// "fr-FR": "Français",
|
|
407
632
|
// "de-DE": "Deutsch",
|
|
@@ -409,22 +634,19 @@ var getNativeLanguageByLocale = function (locale) {
|
|
|
409
634
|
return nativeLanguages[locale];
|
|
410
635
|
};
|
|
411
636
|
var getNativeLanguageByLocale_1 = parsers.getNativeLanguageByLocale = getNativeLanguageByLocale;
|
|
412
|
-
var getLanguageCodeByLocale = function (locale) {
|
|
413
|
-
return locale.split("-")[0];
|
|
414
|
-
};
|
|
637
|
+
var getLanguageCodeByLocale = function (locale) { return locale.split("-")[0]; };
|
|
415
638
|
parsers.getLanguageCodeByLocale = getLanguageCodeByLocale;
|
|
416
|
-
var getCountryCodeByLocale = function (locale) {
|
|
417
|
-
return locale.split("-")[1];
|
|
418
|
-
};
|
|
639
|
+
var getCountryCodeByLocale = function (locale) { return locale.split("-")[1]; };
|
|
419
640
|
var getCountryCodeByLocale_1 = parsers.getCountryCodeByLocale = getCountryCodeByLocale;
|
|
420
641
|
var getKeyboardLayoutByLocale = function (locale) {
|
|
421
642
|
var keyboardLayouts = {
|
|
422
|
-
"
|
|
423
|
-
"nl-
|
|
424
|
-
"
|
|
425
|
-
// "
|
|
426
|
-
// "fr-
|
|
427
|
-
// "
|
|
643
|
+
"nl-NL": enums_1.KeyboardLayout.QWERTY_NL,
|
|
644
|
+
"nl-BE": enums_1.KeyboardLayout.AZERTY_BE,
|
|
645
|
+
// "en-GB": KeyboardLayout.QWERTY_UK,
|
|
646
|
+
// "en-US": KeyboardLayout.QWERTY_US,
|
|
647
|
+
// "fr-BE": KeyboardLayout.AZERTY_FR,
|
|
648
|
+
// "fr-FR": KeyboardLayout.AZERTY_FR,
|
|
649
|
+
// "de-DE": KeyboardLayout.QWERTZ_DE,
|
|
428
650
|
};
|
|
429
651
|
return keyboardLayouts[locale];
|
|
430
652
|
};
|
|
@@ -1395,7 +1617,7 @@ var DropdownContainer = styled.div(templateObject_3$7 || (templateObject_3$7 = _
|
|
|
1395
1617
|
return theme.colors.lightGray.dark;
|
|
1396
1618
|
}
|
|
1397
1619
|
});
|
|
1398
|
-
var
|
|
1620
|
+
var LocaleWrapper = styled.div(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 10px 15px;\n\n :not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n\n > div:first-child {\n display: flex;\n align-items: center;\n margin-right: 10px;\n }\n\n p {\n white-space: nowrap;\n }\n\n :hover {\n cursor: pointer;\n background-color: ", ";\n\n p {\n color: ", ";\n }\n svg {\n fill: ", ";\n }\n }\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 10px 15px;\n\n :not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n\n > div:first-child {\n display: flex;\n align-items: center;\n margin-right: 10px;\n }\n\n p {\n white-space: nowrap;\n }\n\n :hover {\n cursor: pointer;\n background-color: ", ";\n\n p {\n color: ", ";\n }\n svg {\n fill: ", ";\n }\n }\n"])), theme.colors.lightGray.darker, theme.colors.lightGray.base, theme.colors.blue.base, theme.colors.blue.base);
|
|
1399
1621
|
var templateObject_1$l, templateObject_2$h, templateObject_3$7, templateObject_4$5;
|
|
1400
1622
|
|
|
1401
1623
|
var LocaleSelect = function (props) {
|
|
@@ -1407,7 +1629,7 @@ var LocaleSelect = function (props) {
|
|
|
1407
1629
|
};
|
|
1408
1630
|
return (jsxs(Container$b, __assign({ color: props.color || "light", dropdownIsVisible: dropdownIsVisible, onClick: function () { return setDropdownIsVisible(!dropdownIsVisible); }, onMouseLeave: function () { return setDropdownIsVisible(false); } }, { children: [jsxs(SelectedLocaleWrapper, { children: [jsxs("div", { children: [jsx(Flag, { locale: locale }), jsx(Spacer, { horizontal: 10 }), jsx(Heading, __assign({ type: "h6" }, { children: getNativeLanguageByLocale_1(locale) }))] }), dropdownIsVisible ? (jsx(Icon, { type: "chevronUp", size: "small", color: "darkGray" })) : (jsx(Icon, { type: "chevronDown", size: "small", color: "darkGray" }))] }), dropdownIsVisible && (jsx(DropdownContainer, __assign({ color: props.color || "light" }, { children: props.locales
|
|
1409
1631
|
.filter(function (l) { return l !== locale; })
|
|
1410
|
-
.map(function (locale) { return (jsxs(
|
|
1632
|
+
.map(function (locale) { return (jsxs(LocaleWrapper, __assign({ onClick: function () { return onSelectLocale(locale); } }, { children: [jsxs("div", { children: [jsx(Flag, { locale: locale }), jsx(Spacer, { horizontal: 10 }), jsx(Paragraph, __assign({ size: "small", weight: "regular", color: "darkGray" }, { children: getNativeLanguageByLocale_1(locale) }))] }), jsx(Icon, { type: "chevronRight", size: "small", color: "darkGray" })] }), locale)); }) })))] })));
|
|
1411
1633
|
};
|
|
1412
1634
|
|
|
1413
1635
|
var Wrapper$1 = styled.div(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\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"])));
|
|
@@ -1470,24 +1692,17 @@ var isValidEmail = function (email) {
|
|
|
1470
1692
|
};
|
|
1471
1693
|
exports.isValidEmail = isValidEmail;
|
|
1472
1694
|
var isValidUsername = function (username) {
|
|
1473
|
-
|
|
1695
|
+
return username.length > 5 &&
|
|
1474
1696
|
username.length <= 15 &&
|
|
1475
1697
|
username.indexOf(" ") < 0 &&
|
|
1476
|
-
!(0, exports.isValidEmail)(username)
|
|
1477
|
-
return true;
|
|
1478
|
-
}
|
|
1479
|
-
else {
|
|
1480
|
-
return false;
|
|
1481
|
-
}
|
|
1698
|
+
!(0, exports.isValidEmail)(username);
|
|
1482
1699
|
};
|
|
1483
1700
|
exports.isValidUsername = isValidUsername;
|
|
1484
1701
|
var isStrongPassword = function (password) {
|
|
1485
1702
|
return password.length >= 8 &&
|
|
1486
1703
|
(0, exports.hasNumber)(password) &&
|
|
1487
1704
|
(0, exports.hasSpecialCharacter)(password) &&
|
|
1488
|
-
(0, exports.hasCapitalLetter)(password)
|
|
1489
|
-
? true
|
|
1490
|
-
: false;
|
|
1705
|
+
(0, exports.hasCapitalLetter)(password);
|
|
1491
1706
|
};
|
|
1492
1707
|
exports.isStrongPassword = isStrongPassword;
|
|
1493
1708
|
}(expressions));
|
|
@@ -1515,12 +1730,12 @@ var translations = {
|
|
|
1515
1730
|
specialCharacter: "Minimaal 1 leesteken",
|
|
1516
1731
|
length: "Minimaal 8 karakters",
|
|
1517
1732
|
},
|
|
1518
|
-
"en-GB": {
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
},
|
|
1733
|
+
// "en-GB": {
|
|
1734
|
+
// capitalLetter: "At least 1 capital letter",
|
|
1735
|
+
// number: "At least 1 number",
|
|
1736
|
+
// specialCharacter: "At least 1 special character",
|
|
1737
|
+
// length: "At least 8 characters",
|
|
1738
|
+
// },
|
|
1524
1739
|
// "fr-FR": {
|
|
1525
1740
|
// capitalLetter: "Au moins une lettre majuscule",
|
|
1526
1741
|
// number: "Au moins un chiffre",
|