@typeolymp/ui-components 1.16.0 → 1.16.2

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.js CHANGED
@@ -5,9 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React$3 = require('react');
7
7
  var styled = require('styled-components');
8
- var parsers = require('@typeolymp/utils/parsers');
9
- var expressions = require('@typeolymp/utils/expressions');
10
- var enums = require('@typeolymp/utils/enums');
11
8
 
12
9
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
10
 
@@ -3518,7 +3515,11 @@ var Button = React$3.forwardRef(function (_a, ref) {
3518
3515
  var buttonRef = React$3.useRef(null);
3519
3516
  var _b = React$3.useState(false), isLoading = _b[0], setIsLoading = _b[1];
3520
3517
  var as = href || asAnchor ? "a" : "button";
3521
- var onClick = function () {
3518
+ var onClick = function (e) {
3519
+ if (props.onClickAsync || props.onClick) {
3520
+ e.stopPropagation();
3521
+ e.preventDefault();
3522
+ }
3522
3523
  if (props.onClickAsync) {
3523
3524
  setIsLoading(true);
3524
3525
  new Promise(function (resolve) {
@@ -3626,6 +3627,266 @@ var Wrapper$a = styled__default["default"].div(templateObject_1$Q || (templateOb
3626
3627
  });
3627
3628
  var templateObject_1$Q;
3628
3629
 
3630
+ var parsers = {};
3631
+
3632
+ var getCountryByLocale$1 = {};
3633
+
3634
+ var enums = {};
3635
+
3636
+ var Color = {};
3637
+
3638
+ (function (exports) {
3639
+ Object.defineProperty(exports, "__esModule", { value: true });
3640
+ exports.Color = void 0;
3641
+ (function (Color) {
3642
+ Color["RED"] = "red";
3643
+ Color["YELLOW"] = "yellow";
3644
+ Color["BLUE"] = "blue";
3645
+ Color["GREEN"] = "green";
3646
+ Color["PURPLE"] = "purple";
3647
+ Color["PINK"] = "pink";
3648
+ Color["ORANGE"] = "orange";
3649
+ Color["DARK_GRAY"] = "darkGray";
3650
+ Color["LIGHT_GRAY"] = "lightGray";
3651
+ })(exports.Color || (exports.Color = {}));
3652
+
3653
+ }(Color));
3654
+
3655
+ var Country = {};
3656
+
3657
+ (function (exports) {
3658
+ Object.defineProperty(exports, "__esModule", { value: true });
3659
+ exports.Country = void 0;
3660
+ (function (Country) {
3661
+ Country["NL"] = "Nederland";
3662
+ Country["BE"] = "Belgi\u00EB";
3663
+ })(exports.Country || (exports.Country = {}));
3664
+
3665
+ }(Country));
3666
+
3667
+ var CourseTranslation = {};
3668
+
3669
+ (function (exports) {
3670
+ Object.defineProperty(exports, "__esModule", { value: true });
3671
+ exports.CourseTranslation = void 0;
3672
+ (function (CourseTranslation) {
3673
+ CourseTranslation["NL_NL"] = "nl-NL";
3674
+ // EN_GB = "en-GB",
3675
+ })(exports.CourseTranslation || (exports.CourseTranslation = {}));
3676
+
3677
+ }(CourseTranslation));
3678
+
3679
+ var KeyboardLayout = {};
3680
+
3681
+ (function (exports) {
3682
+ Object.defineProperty(exports, "__esModule", { value: true });
3683
+ exports.KeyboardLayout = void 0;
3684
+ (function (KeyboardLayout) {
3685
+ KeyboardLayout["QWERTY_NL"] = "qwerty-nl";
3686
+ // QWERTY_UK = "qwerty-uk",
3687
+ // QWERTY_US = "qwerty-us",
3688
+ // QWERTY_TR = "qwerty-tr",
3689
+ KeyboardLayout["AZERTY_BE"] = "azerty-be";
3690
+ // AZERTY_FR = "azerty-fr",
3691
+ // QWERTZ_DE = "qwertz-de",
3692
+ })(exports.KeyboardLayout || (exports.KeyboardLayout = {}));
3693
+
3694
+ }(KeyboardLayout));
3695
+
3696
+ var Locale = {};
3697
+
3698
+ (function (exports) {
3699
+ Object.defineProperty(exports, "__esModule", { value: true });
3700
+ exports.Locale = void 0;
3701
+ (function (Locale) {
3702
+ Locale["NL_NL"] = "nl-NL";
3703
+ Locale["NL_BE"] = "nl-BE";
3704
+ // EN_GB = "en-GB",
3705
+ // FR_FR = "fr-FR",
3706
+ // FR_BE = "fr-BE",
3707
+ // DE_DE = "de-DE",
3708
+ })(exports.Locale || (exports.Locale = {}));
3709
+
3710
+ }(Locale));
3711
+
3712
+ var Plan = {};
3713
+
3714
+ (function (exports) {
3715
+ Object.defineProperty(exports, "__esModule", { value: true });
3716
+ exports.Plan = void 0;
3717
+ (function (Plan) {
3718
+ Plan["HOBBY"] = "hobby";
3719
+ Plan["PROFESSIONAL"] = "professional";
3720
+ })(exports.Plan || (exports.Plan = {}));
3721
+
3722
+ }(Plan));
3723
+
3724
+ var TextTopic = {};
3725
+
3726
+ (function (exports) {
3727
+ Object.defineProperty(exports, "__esModule", { value: true });
3728
+ exports.TextTopic = void 0;
3729
+ (function (TextTopic) {
3730
+ TextTopic["SPORT"] = "sport";
3731
+ TextTopic["MUSIC"] = "music";
3732
+ TextTopic["TECHNIC"] = "technic";
3733
+ TextTopic["MOVIES"] = "movies";
3734
+ TextTopic["NATURE"] = "nature";
3735
+ TextTopic["HISTORY"] = "history";
3736
+ TextTopic["ART"] = "art";
3737
+ TextTopic["FASHION"] = "fashion";
3738
+ TextTopic["OTHER"] = "other";
3739
+ })(exports.TextTopic || (exports.TextTopic = {}));
3740
+
3741
+ }(TextTopic));
3742
+
3743
+ var Medal$1 = {};
3744
+
3745
+ (function (exports) {
3746
+ Object.defineProperty(exports, "__esModule", { value: true });
3747
+ exports.Medal = void 0;
3748
+ (function (Medal) {
3749
+ Medal["GOLD"] = "gold";
3750
+ Medal["SILVER"] = "silver";
3751
+ Medal["BRONZE"] = "bronze";
3752
+ })(exports.Medal || (exports.Medal = {}));
3753
+
3754
+ }(Medal$1));
3755
+
3756
+ (function (exports) {
3757
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3758
+ if (k2 === undefined) k2 = k;
3759
+ var desc = Object.getOwnPropertyDescriptor(m, k);
3760
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
3761
+ desc = { enumerable: true, get: function() { return m[k]; } };
3762
+ }
3763
+ Object.defineProperty(o, k2, desc);
3764
+ }) : (function(o, m, k, k2) {
3765
+ if (k2 === undefined) k2 = k;
3766
+ o[k2] = m[k];
3767
+ }));
3768
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
3769
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
3770
+ };
3771
+ Object.defineProperty(exports, "__esModule", { value: true });
3772
+ __exportStar(Color, exports);
3773
+ __exportStar(Country, exports);
3774
+ __exportStar(CourseTranslation, exports);
3775
+ __exportStar(KeyboardLayout, exports);
3776
+ __exportStar(Locale, exports);
3777
+ __exportStar(Plan, exports);
3778
+ __exportStar(TextTopic, exports);
3779
+ __exportStar(Medal$1, exports);
3780
+
3781
+ }(enums));
3782
+
3783
+ Object.defineProperty(getCountryByLocale$1, "__esModule", { value: true });
3784
+ getCountryByLocale$1.getCountryByLocale = void 0;
3785
+ var enums_1$2 = enums;
3786
+ var getCountryByLocale = function (locale) {
3787
+ var countries = {
3788
+ "nl-NL": enums_1$2.Country.NL,
3789
+ "nl-BE": enums_1$2.Country.BE,
3790
+ };
3791
+ return countries[locale];
3792
+ };
3793
+ getCountryByLocale$1.getCountryByLocale = getCountryByLocale;
3794
+
3795
+ var getCourseTranslationByLocale$1 = {};
3796
+
3797
+ Object.defineProperty(getCourseTranslationByLocale$1, "__esModule", { value: true });
3798
+ getCourseTranslationByLocale$1.getCourseTranslationByLocale = void 0;
3799
+ var enums_1$1 = enums;
3800
+ var getCourseTranslationByLocale = function (locale) {
3801
+ var courseTranslations = {
3802
+ "nl-NL": enums_1$1.CourseTranslation.NL_NL,
3803
+ "nl-BE": enums_1$1.CourseTranslation.NL_NL,
3804
+ // "en-GB": KeyboardLayout.QWERTY_UK,
3805
+ // "en-US": KeyboardLayout.QWERTY_US,
3806
+ // "fr-BE": KeyboardLayout.AZERTY_FR,
3807
+ // "fr-FR": KeyboardLayout.AZERTY_FR,
3808
+ // "de-DE": KeyboardLayout.QWERTZ_DE,
3809
+ };
3810
+ return courseTranslations[locale];
3811
+ };
3812
+ getCourseTranslationByLocale$1.getCourseTranslationByLocale = getCourseTranslationByLocale;
3813
+
3814
+ var getKeyboardLayoutByLocale$1 = {};
3815
+
3816
+ Object.defineProperty(getKeyboardLayoutByLocale$1, "__esModule", { value: true });
3817
+ getKeyboardLayoutByLocale$1.getKeyboardLayoutByLocale = void 0;
3818
+ var enums_1 = enums;
3819
+ var getKeyboardLayoutByLocale = function (locale) {
3820
+ var keyboardLayouts = {
3821
+ "nl-NL": enums_1.KeyboardLayout.QWERTY_NL,
3822
+ "nl-BE": enums_1.KeyboardLayout.AZERTY_BE,
3823
+ // "en-GB": KeyboardLayout.QWERTY_UK,
3824
+ // "en-US": KeyboardLayout.QWERTY_US,
3825
+ // "fr-BE": KeyboardLayout.AZERTY_FR,
3826
+ // "fr-FR": KeyboardLayout.AZERTY_FR,
3827
+ // "de-DE": KeyboardLayout.QWERTZ_DE,
3828
+ };
3829
+ return keyboardLayouts[locale];
3830
+ };
3831
+ getKeyboardLayoutByLocale$1.getKeyboardLayoutByLocale = getKeyboardLayoutByLocale;
3832
+
3833
+ var getLanguageCodeByLocale$1 = {};
3834
+
3835
+ Object.defineProperty(getLanguageCodeByLocale$1, "__esModule", { value: true });
3836
+ getLanguageCodeByLocale$1.getLanguageCodeByLocale = void 0;
3837
+ var getLanguageCodeByLocale = function (locale) { return locale.split("-")[0]; };
3838
+ getLanguageCodeByLocale$1.getLanguageCodeByLocale = getLanguageCodeByLocale;
3839
+
3840
+ var getCountryCodeByLocale$1 = {};
3841
+
3842
+ Object.defineProperty(getCountryCodeByLocale$1, "__esModule", { value: true });
3843
+ getCountryCodeByLocale$1.getCountryCodeByLocale = void 0;
3844
+ var getCountryCodeByLocale = function (locale) { return locale.split("-")[1]; };
3845
+ getCountryCodeByLocale$1.getCountryCodeByLocale = getCountryCodeByLocale;
3846
+
3847
+ var getNativeLanguageByLocale$1 = {};
3848
+
3849
+ Object.defineProperty(getNativeLanguageByLocale$1, "__esModule", { value: true });
3850
+ getNativeLanguageByLocale$1.getNativeLanguageByLocale = void 0;
3851
+ var getNativeLanguageByLocale = function (locale) {
3852
+ var nativeLanguages = {
3853
+ "nl-NL": "Nederlands",
3854
+ "nl-BE": "Nederlands (BE)",
3855
+ // "en-GB": "English (UK)",
3856
+ // "en-US": "English (US)",
3857
+ // "fr-BE": "Français (BE)",
3858
+ // "fr-FR": "Français",
3859
+ // "de-DE": "Deutsch",
3860
+ };
3861
+ return nativeLanguages[locale];
3862
+ };
3863
+ getNativeLanguageByLocale$1.getNativeLanguageByLocale = getNativeLanguageByLocale;
3864
+
3865
+ (function (exports) {
3866
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3867
+ if (k2 === undefined) k2 = k;
3868
+ var desc = Object.getOwnPropertyDescriptor(m, k);
3869
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
3870
+ desc = { enumerable: true, get: function() { return m[k]; } };
3871
+ }
3872
+ Object.defineProperty(o, k2, desc);
3873
+ }) : (function(o, m, k, k2) {
3874
+ if (k2 === undefined) k2 = k;
3875
+ o[k2] = m[k];
3876
+ }));
3877
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
3878
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
3879
+ };
3880
+ Object.defineProperty(exports, "__esModule", { value: true });
3881
+ __exportStar(getCountryByLocale$1, exports);
3882
+ __exportStar(getCourseTranslationByLocale$1, exports);
3883
+ __exportStar(getKeyboardLayoutByLocale$1, exports);
3884
+ __exportStar(getLanguageCodeByLocale$1, exports);
3885
+ __exportStar(getCountryCodeByLocale$1, exports);
3886
+ __exportStar(getNativeLanguageByLocale$1, exports);
3887
+
3888
+ }(parsers));
3889
+
3629
3890
  var flags = {
3630
3891
  NL: (jsxRuntime.jsxs("svg", __assign$2({ viewBox: "0 0 22 18", xmlSpace: "preserve" }, { children: [jsxRuntime.jsx("path", { d: "M0 1c0-.6.4-1 1-1h20c.6 0 1 .4 1 1v5H0V1z", fill: "#e62743" }), jsxRuntime.jsx("path", { fill: "#fff", d: "M0 6H22V12H0z" }), jsxRuntime.jsx("path", { d: "M0 12h22v5c0 .6-.4 1-1 1H1c-.6 0-1-.4-1-1v-5z", fill: "#148cc6" })] }))),
3631
3892
  BE: (jsxRuntime.jsxs("svg", __assign$2({ viewBox: "0 0 22 18", xmlSpace: "preserve" }, { children: [jsxRuntime.jsx("path", { d: "M15 0h6c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1h-6V0z", fill: "#e62743" }), jsxRuntime.jsx("path", { fill: "#ffd800", d: "M7 0H15V18H7z" }), jsxRuntime.jsx("path", { d: "M0 1c0-.6.4-1 1-1h6v18H1c-.6 0-1-.4-1-1V1z", fill: "#23292f" })] }))),
@@ -3857,6 +4118,99 @@ var Helper = styled__default["default"](StyledParagraph)(templateObject_6$3 || (
3857
4118
  }, fadeIn);
3858
4119
  var templateObject_1$L, templateObject_2$x, templateObject_3$b, templateObject_4$7, templateObject_5$3, templateObject_6$3;
3859
4120
 
4121
+ var expressions = {};
4122
+
4123
+ var hasCapitalLetter$1 = {};
4124
+
4125
+ Object.defineProperty(hasCapitalLetter$1, "__esModule", { value: true });
4126
+ hasCapitalLetter$1.hasCapitalLetter = void 0;
4127
+ var hasCapitalLetter = function (input) {
4128
+ var regex = new RegExp(/[A-Z]/g);
4129
+ return regex.test(input);
4130
+ };
4131
+ hasCapitalLetter$1.hasCapitalLetter = hasCapitalLetter;
4132
+
4133
+ var hasNumber$1 = {};
4134
+
4135
+ Object.defineProperty(hasNumber$1, "__esModule", { value: true });
4136
+ hasNumber$1.hasNumber = void 0;
4137
+ var hasNumber = function (input) {
4138
+ var regex = new RegExp(/\d/g);
4139
+ return regex.test(input);
4140
+ };
4141
+ hasNumber$1.hasNumber = hasNumber;
4142
+
4143
+ var hasSpecialCharacter$1 = {};
4144
+
4145
+ Object.defineProperty(hasSpecialCharacter$1, "__esModule", { value: true });
4146
+ hasSpecialCharacter$1.hasSpecialCharacter = void 0;
4147
+ var hasSpecialCharacter = function (input) {
4148
+ var regex = new RegExp(/`|~|!|"|-|_|@|#|\$|%|\^|&|\*|\(|\)|\+|=|\[|\{|\]|\}|\||\\|'|<|,|\.|>|\?|\/|""|;|:|\s/g);
4149
+ return regex.test(input);
4150
+ };
4151
+ hasSpecialCharacter$1.hasSpecialCharacter = hasSpecialCharacter;
4152
+
4153
+ var isValidEmail$1 = {};
4154
+
4155
+ Object.defineProperty(isValidEmail$1, "__esModule", { value: true });
4156
+ isValidEmail$1.isValidEmail = void 0;
4157
+ var isValidEmail = function (email) {
4158
+ 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,}))$/);
4159
+ return regex.test(email);
4160
+ };
4161
+ isValidEmail$1.isValidEmail = isValidEmail;
4162
+
4163
+ var isValidUsername$1 = {};
4164
+
4165
+ Object.defineProperty(isValidUsername$1, "__esModule", { value: true });
4166
+ isValidUsername$1.isValidUsername = void 0;
4167
+ var isValidEmail_1 = isValidEmail$1;
4168
+ var isValidUsername = function (username) {
4169
+ return username.length >= 5 &&
4170
+ username.length <= 15 &&
4171
+ username.indexOf(" ") < 0 &&
4172
+ !(0, isValidEmail_1.isValidEmail)(username);
4173
+ };
4174
+ isValidUsername$1.isValidUsername = isValidUsername;
4175
+
4176
+ var isStrongPassword$1 = {};
4177
+
4178
+ Object.defineProperty(isStrongPassword$1, "__esModule", { value: true });
4179
+ isStrongPassword$1.isStrongPassword = void 0;
4180
+ var _1 = expressions;
4181
+ var isStrongPassword = function (password) {
4182
+ return password.length >= 8 &&
4183
+ (0, _1.hasNumber)(password) &&
4184
+ (0, _1.hasSpecialCharacter)(password) &&
4185
+ (0, _1.hasCapitalLetter)(password);
4186
+ };
4187
+ isStrongPassword$1.isStrongPassword = isStrongPassword;
4188
+
4189
+ (function (exports) {
4190
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4191
+ if (k2 === undefined) k2 = k;
4192
+ var desc = Object.getOwnPropertyDescriptor(m, k);
4193
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
4194
+ desc = { enumerable: true, get: function() { return m[k]; } };
4195
+ }
4196
+ Object.defineProperty(o, k2, desc);
4197
+ }) : (function(o, m, k, k2) {
4198
+ if (k2 === undefined) k2 = k;
4199
+ o[k2] = m[k];
4200
+ }));
4201
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
4202
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
4203
+ };
4204
+ Object.defineProperty(exports, "__esModule", { value: true });
4205
+ __exportStar(hasCapitalLetter$1, exports);
4206
+ __exportStar(hasNumber$1, exports);
4207
+ __exportStar(hasSpecialCharacter$1, exports);
4208
+ __exportStar(isValidEmail$1, exports);
4209
+ __exportStar(isValidUsername$1, exports);
4210
+ __exportStar(isStrongPassword$1, exports);
4211
+
4212
+ }(expressions));
4213
+
3860
4214
  var password_helper_capital_letter = "Minimaal 1 hoofdletter";
3861
4215
  var password_helper_number = "Minimaal 1 getal";
3862
4216
  var password_helper_special_character = "Minimaal 1 leesteken";
@@ -10911,7 +11265,7 @@ var Checkboxes = function (props) {
10911
11265
  };
10912
11266
 
10913
11267
  var Container$i = styled__default["default"].div(templateObject_1$x || (templateObject_1$x = __makeTemplateObject$1(["\n width: 100%;\n background-color: ", ";\n box-shadow: 0px 4px 0px rgba(0, 0, 0, 20%);\n border-radius: 6px;\n padding: 10px 20px;\n"], ["\n width: 100%;\n background-color: ", ";\n box-shadow: 0px 4px 0px rgba(0, 0, 0, 20%);\n border-radius: 6px;\n padding: 10px 20px;\n"])), theme.colors.lightGray.light);
10914
- var Item = styled__default["default"].div(templateObject_2$s || (templateObject_2$s = __makeTemplateObject$1(["\n padding: 10px 0;\n cursor: pointer;\n\n > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 5px;\n }\n\n p {\n display: ", ";\n }\n\n :not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n"], ["\n padding: 10px 0;\n cursor: pointer;\n\n > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 5px;\n }\n\n p {\n display: ", ";\n }\n\n :not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n"])), function (_a) {
11268
+ var Item = styled__default["default"].div(templateObject_2$s || (templateObject_2$s = __makeTemplateObject$1(["\n padding: 10px 0;\n cursor: pointer;\n\n > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 5px;\n }\n\n p, > div:last-child {\n display: ", ";\n margin: 0;\n }\n\n :not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n"], ["\n padding: 10px 0;\n cursor: pointer;\n\n > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 5px;\n }\n\n p, > div:last-child {\n display: ", ";\n margin: 0;\n }\n\n :not(:last-child) {\n border-bottom: 1px solid ", ";\n }\n"])), function (_a) {
10915
11269
  var isOpen = _a.isOpen;
10916
11270
  return (isOpen ? "" : "none");
10917
11271
  }, theme.colors.lightGray.dark);
@@ -10929,7 +11283,7 @@ var Collapse = function (props) {
10929
11283
  };
10930
11284
  return (jsxRuntime.jsx(Container$i, __assign$2({}, props, { children: props.items.map(function (item, index) {
10931
11285
  var isOpen = openItems.includes(index);
10932
- return (jsxRuntime.jsxs(Item, __assign$2({ isOpen: isOpen, onClick: function () { return onClickItem(index, isOpen); } }, { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Heading, __assign$2({ type: "h6" }, { children: item.title })), jsxRuntime.jsx(Icon, { type: isOpen ? "chevronUp" : "chevronDown", color: "blue" })] }), jsxRuntime.jsx(Paragraph, __assign$2({ weight: "regular" }, { children: item.content }))] }), "".concat(item.title, "-").concat(index)));
11286
+ return (jsxRuntime.jsxs(Item, __assign$2({ isOpen: isOpen, onClick: function () { return onClickItem(index, isOpen); } }, { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Heading, __assign$2({ type: "h6" }, { children: item.title })), jsxRuntime.jsx(Icon, { type: isOpen ? "chevronUp" : "chevronDown", color: "blue" })] }), jsxRuntime.jsx(Paragraph, __assign$2({ weight: "regular", as: typeof item.content !== "string" ? "div" : undefined }, { children: item.content }))] }), "".concat(item.title, "-").concat(index)));
10933
11287
  }) })));
10934
11288
  };
10935
11289
 
@@ -11779,7 +12133,7 @@ var Form = React$3.forwardRef(function (props, ref) {
11779
12133
  props.onError(feedback);
11780
12134
  }
11781
12135
  };
11782
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [props.title && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Heading, __assign$2({ type: "h4" }, { children: props.title })), jsxRuntime.jsx(Spacer, { vertical: 15 })] })), props.description && (jsxRuntime.jsx(DescriptionWrapper, { children: jsxRuntime.jsx(Paragraph, __assign$2({ color: "darkGray", weight: "regular" }, { children: htmlReactParser(props.description) })) })), jsxRuntime.jsx(FormWrapper, { children: props.fields.map(function (field, index) {
12136
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [props.title && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Heading, __assign$2({ type: "h4" }, { children: props.title })), jsxRuntime.jsx(Spacer, { vertical: 15 })] })), props.description && (jsxRuntime.jsx(DescriptionWrapper, { children: typeof props.description === "string" ? (jsxRuntime.jsx(Paragraph, __assign$2({ color: "darkGray", weight: "regular" }, { children: htmlReactParser(props.description) }))) : (props.description) })), jsxRuntime.jsx(FormWrapper, { children: props.fields.map(function (field, index) {
11783
12137
  switch (field.type) {
11784
12138
  case "text":
11785
12139
  return (React$3.createElement(WithValidation, __assign$2({}, feedback[field.name], { key: "field-".concat(index) }),