@ainias42/react-bootstrap-mobile 0.2.13 → 0.2.15

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.
Files changed (25) hide show
  1. package/bin/updateCopies.js +1 -0
  2. package/bootstrapReactMobile.ts +1 -0
  3. package/dist/bootstrapReactMobile.d.ts +1 -0
  4. package/dist/bootstrapReactMobile.js +201 -68
  5. package/dist/bootstrapReactMobile.js.map +1 -1
  6. package/dist/src/Components/FormElements/Button/Button.d.ts +2 -1
  7. package/dist/src/Components/FormElements/Controller/useYupResolver.d.ts +11 -0
  8. package/dist/src/Components/FormElements/SearchSelectInput/SearchSelectInput.d.ts +8 -1
  9. package/dist/src/Components/FormElements/Slider/Slider.d.ts +2 -1
  10. package/dist/src/Components/FormElements/Switch/Switch.d.ts +4 -1
  11. package/dist/src/Components/SpoilerList/Spoiler/Spoiler.d.ts +2 -1
  12. package/package.json +3 -2
  13. package/src/Components/Dialog/dialogBackground.scss +1 -0
  14. package/src/Components/FormElements/Button/Button.tsx +11 -3
  15. package/src/Components/FormElements/ColorInput/ColorInput.tsx +1 -1
  16. package/src/Components/FormElements/ColorInput/sharedSelectedColor.ts +1 -1
  17. package/src/Components/FormElements/Controller/useYupResolver.ts +53 -0
  18. package/src/Components/FormElements/SearchSelectInput/SearchSelectInput.tsx +161 -129
  19. package/src/Components/FormElements/SearchSelectInput/seachSelectInput.scss +6 -1
  20. package/src/Components/FormElements/Slider/Slider.tsx +9 -1
  21. package/src/Components/FormElements/Switch/Switch.tsx +25 -14
  22. package/src/Components/FormElements/Switch/switch.scss +18 -16
  23. package/src/Components/Icon/Icon.tsx +0 -1
  24. package/src/Components/Menu/Menu.tsx +43 -42
  25. package/src/Components/SpoilerList/Spoiler/Spoiler.tsx +24 -18
@@ -11,6 +11,7 @@ let pathsToProjects = [
11
11
  // '/home/silas/Projekte/web/react-windows',
12
12
  // '/home/silas/Projekte/web/cordova-sites',
13
13
  "/Users/sguenter/Projekte/Privat/games",
14
+ "/Users/sguenter/Projekte/Privat/geo",
14
15
  "/Users/sguenter/Projekte/Privat/dnd",
15
16
  "/Users/sguenter/Projekte/Privat/TestCapacitorElectron",
16
17
  "/Users/sguenter/Projekte/Privat/users-next",
@@ -29,6 +29,7 @@ export * from './src/Components/FormElements/Controller/SelectController';
29
29
  export * from './src/Components/FormElements/Controller/SendFormContext';
30
30
  export * from './src/Components/FormElements/Controller/SwitchController';
31
31
  export * from './src/Components/FormElements/Controller/TextareaController';
32
+ export * from './src/Components/FormElements/Controller/useYupResolver';
32
33
  export * from './src/Components/FormElements/Controller/withHookController';
33
34
  export * from './src/Components/FormElements/FormError';
34
35
  export * from './src/Components/FormElements/Input/FileInput/FileInput';
@@ -29,6 +29,7 @@ export * from './src/Components/FormElements/Controller/SelectController';
29
29
  export * from './src/Components/FormElements/Controller/SendFormContext';
30
30
  export * from './src/Components/FormElements/Controller/SwitchController';
31
31
  export * from './src/Components/FormElements/Controller/TextareaController';
32
+ export * from './src/Components/FormElements/Controller/useYupResolver';
32
33
  export * from './src/Components/FormElements/Controller/withHookController';
33
34
  export * from './src/Components/FormElements/FormError';
34
35
  export * from './src/Components/FormElements/Input/FileInput/FileInput';
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @ainias42/react-bootstrap-mobile v0.2.12
3
+ * @ainias42/react-bootstrap-mobile v0.2.14
4
4
  * git+https://github.com/Ainias/Bootstrap-React-Mobile.git
5
5
  * Copyright (c) Silas Günther and project contributors.
6
6
  * This source code is licensed under the MIT license found in the
@@ -1218,7 +1218,7 @@ var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(1354);
1218
1218
  var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
1219
1219
  var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);
1220
1220
  // Module
1221
- ___CSS_LOADER_EXPORT___.push([module.id, `@layer rbm{.dialogBackground__GkFEH{background-color:#fff;padding:.5rem;max-height:80vh;overflow:auto}.dialogBackground__GkFEH .title__ThSfn{margin:0 0 .8rem}}`, "",{"version":3,"sources":["webpack://./src/Components/Dialog/dialogBackground.scss"],"names":[],"mappings":"AACA,WACC,yBACC,qBAAA,CACA,aAAA,CACA,eAAA,CACA,aAAA,CAEA,uCACE,gBAAA,CAAA","sourcesContent":["\n@layer rbm {\n .dialogBackground {\n background-color: white;\n padding: 0.5rem;\n max-height: 80vh;\n overflow: auto;\n\n .title {\n margin: 0 0 0.8rem;\n }\n}\n \n}"],"sourceRoot":""}]);
1221
+ ___CSS_LOADER_EXPORT___.push([module.id, `@layer rbm{.dialogBackground__GkFEH{background-color:#fff;padding:.5rem;max-height:80vh;overflow:auto}.dialogBackground__GkFEH .title__ThSfn{gap:16px;margin:0 0 .8rem}}`, "",{"version":3,"sources":["webpack://./src/Components/Dialog/dialogBackground.scss"],"names":[],"mappings":"AACA,WACC,yBACC,qBAAA,CACA,aAAA,CACA,eAAA,CACA,aAAA,CAEA,uCACE,QAAA,CACA,gBAAA,CAAA","sourcesContent":["\n@layer rbm {\n .dialogBackground {\n background-color: white;\n padding: 0.5rem;\n max-height: 80vh;\n overflow: auto;\n\n .title {\n gap: 16px;\n margin: 0 0 0.8rem;\n }\n}\n \n}"],"sourceRoot":""}]);
1222
1222
  // Exports
1223
1223
  ___CSS_LOADER_EXPORT___.locals = {
1224
1224
  "dialogBackground": `dialogBackground__GkFEH`,
@@ -1375,13 +1375,14 @@ var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(1354);
1375
1375
  var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
1376
1376
  var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);
1377
1377
  // Module
1378
- ___CSS_LOADER_EXPORT___.push([module.id, `@layer rbm{.input__sEopK{display:inline-block;width:100%;position:relative;padding-bottom:.1rem}.input__sEopK:focus-within .selectableOptionContainer__kutkQ{display:inherit}.material-design .input__sEopK{background-image:linear-gradient(to top, transparent 1px, #afafaf 1px);background-size:100% 2px;background-repeat:no-repeat;background-position:center bottom;padding-bottom:2px}.material-design .input__sEopK:focus{background-image:linear-gradient(var(--flavor-accent), var(--flavor-accent)),linear-gradient(to top, transparent 1px, #afafaf 1px)}.flat-design .input__sEopK,.flat-design .input__sEopK:focus{border-bottom:1px solid var(--border-light)}.input__sEopK .label__jJsSu{display:block;font-weight:bold}.input__sEopK .text__v0KcT{width:100%;background-color:rgba(0,0,0,0);border:0;outline:none;padding:0;background-image:none}.material-design .input__sEopK .text__v0KcT{color:#212121}.flat-design .input__sEopK .text__v0KcT{color:#1f1f21}.inputContainer__R_CDq{display:flex}.tag__BTX7E{--text-primary-default-color: white;color:#fff;background-color:var(--flavor-accent);padding:.1rem .2rem;margin-right:.1rem;margin-bottom:.1rem;border-radius:4px}.selectableOptionContainer__kutkQ{display:none;position:fixed;background-color:#fff;z-index:1100;border:1px solid var(--border-light)}.selectableOptionContainer__kutkQ .selectableOption__HHU91{padding-left:.2rem;padding-right:.2rem;cursor:pointer}.selectableOptionContainer__kutkQ .selectableOption__HHU91.active__JedWZ{--text-primary-default-color: white;color:#fff;background-color:var(--flavor-accent)}}`, "",{"version":3,"sources":["webpack://./src/Components/FormElements/SearchSelectInput/seachSelectInput.scss","webpack://./src/scss/_designMixin.scss"],"names":[],"mappings":"AACA,WAIA,cACE,oBAAA,CACA,UAAA,CACA,iBAAA,CACA,oBAAA,CAGE,6DACE,eAAA,CCTO,+BDcT,sEAAA,CACA,wBAAA,CACA,2BAAA,CACA,iCAAA,CACA,kBAAA,CAEA,qCACE,kIAAA,CAMF,4DACE,2CAAA,CAIJ,4BACE,aAAA,CACA,gBAAA,CAGF,2BACE,UAAA,CACA,8BAAA,CACA,QAAA,CACA,YAAA,CACA,SAAA,CACA,qBAAA,CC3CS,4CD8CP,aAAA,CC9CO,wCDkDP,aAAA,CAKN,uBACE,YAAA,CAIF,YACE,mCAAA,CACA,UAAA,CACA,qCAAA,CACA,mBAAA,CACA,kBAAA,CACA,mBAAA,CACA,iBAAA,CAGF,kCACE,YAAA,CACA,cAAA,CACA,qBAAA,CACA,YAAA,CACA,oCAAA,CAGA,2DACE,kBAAA,CACA,mBAAA,CACA,cAAA,CAEA,yEACE,mCAAA,CACA,UAAA,CACA,qCAAA,CAAA","sourcesContent":["\n@layer rbm {\n @import \"../../../scss/variables\";\n@import \"../../../scss/designMixin\";\n\n.input {\n display: inline-block;\n width: 100%;\n position: relative;\n padding-bottom: 0.1rem;\n\n &:focus-within {\n .selectableOptionContainer {\n display: inherit;\n }\n }\n\n @include design($material) {\n background-image: linear-gradient(to top, transparent 1px, #afafaf 1px);\n background-size: 100% 2px;\n background-repeat: no-repeat;\n background-position: center bottom;\n padding-bottom: 2px;\n\n &:focus {\n background-image: linear-gradient(var(--flavor-accent), var(--flavor-accent)),\n linear-gradient(to top, transparent 1px, #afafaf 1px);\n }\n }\n\n @include design($flat) {\n &, &:focus {\n border-bottom: 1px solid var(--border-light);\n }\n }\n\n .label {\n display: block;\n font-weight: bold;\n }\n\n .text {\n width: 100%;\n background-color: transparent;\n border: 0;\n outline: none;\n padding: 0;\n background-image: none;\n\n @include design($material) {\n color: #212121;\n }\n\n @include design($flat) {\n color: #1f1f21;\n }\n }\n}\n\n.inputContainer {\n display: flex;\n\n}\n\n.tag {\n --text-primary-default-color: white;\n color: white;\n background-color: var(--flavor-accent);\n padding: 0.1rem 0.2rem;\n margin-right: 0.1rem;\n margin-bottom: 0.1rem;\n border-radius: 4px;\n}\n\n.selectableOptionContainer {\n display: none;\n position: fixed;\n background-color: white;\n z-index: 1100;\n border: 1px solid var(--border-light);\n\n\n .selectableOption {\n padding-left: 0.2rem;\n padding-right: 0.2rem;\n cursor: pointer;\n\n &.active {\n --text-primary-default-color: white;\n color: white;\n background-color: var(--flavor-accent);\n }\n }\n}\n \n}","@use 'sass:selector';\n\n@mixin design($designName) {\n @if & {\n @at-root #{selector.nest(':global(.'+$designName+\")\", &)} {\n @content\n }\n } @else {\n :global(.#{$designName}) {\n @content\n }\n }\n}\n"],"sourceRoot":""}]);
1378
+ ___CSS_LOADER_EXPORT___.push([module.id, `@layer rbm{.input__sEopK{display:inline-block;width:100%;position:relative;padding-bottom:.1rem}.input__sEopK:focus-within .selectableOptionContainer__kutkQ{display:inherit}.material-design .input__sEopK{background-image:linear-gradient(to top, transparent 1px, #afafaf 1px);background-size:100% 2px;background-repeat:no-repeat;background-position:center bottom;padding-bottom:2px}.material-design .input__sEopK:focus{background-image:linear-gradient(var(--flavor-accent), var(--flavor-accent)),linear-gradient(to top, transparent 1px, #afafaf 1px)}.flat-design .input__sEopK,.flat-design .input__sEopK:focus{border-bottom:1px solid var(--border-light)}.input__sEopK .label__jJsSu{display:block;font-weight:var(--label-font-weight, bold)}.input__sEopK .text__v0KcT{width:100%;background-color:rgba(0,0,0,0);border:0;outline:none;padding:0;background-image:none}.input__sEopK .text__v0KcT.disabled__M6sE8{caret-color:rgba(0,0,0,0);cursor:pointer}.material-design .input__sEopK .text__v0KcT{color:#212121}.flat-design .input__sEopK .text__v0KcT{color:#1f1f21}.inputContainer__R_CDq{display:flex}.tag__BTX7E{--text-primary-default-color: white;color:#fff;background-color:var(--flavor-accent);padding:.1rem .2rem;margin-right:.1rem;margin-bottom:.1rem;border-radius:4px}.selectableOptionContainer__kutkQ{display:none;position:fixed;background-color:#fff;z-index:1100;border:1px solid var(--border-light)}.selectableOptionContainer__kutkQ .selectableOption__HHU91{padding-left:.2rem;padding-right:.2rem;cursor:pointer}.selectableOptionContainer__kutkQ .selectableOption__HHU91.active__JedWZ{--text-primary-default-color: white;color:#fff;background-color:var(--flavor-accent)}}`, "",{"version":3,"sources":["webpack://./src/Components/FormElements/SearchSelectInput/seachSelectInput.scss","webpack://./src/scss/_designMixin.scss"],"names":[],"mappings":"AACA,WAIA,cACE,oBAAA,CACA,UAAA,CACA,iBAAA,CACA,oBAAA,CAGE,6DACE,eAAA,CCTO,+BDcT,sEAAA,CACA,wBAAA,CACA,2BAAA,CACA,iCAAA,CACA,kBAAA,CAEA,qCACE,kIAAA,CAMF,4DACE,2CAAA,CAIJ,4BACE,aAAA,CACA,0CAAA,CAGF,2BAME,UAAA,CACA,8BAAA,CACA,QAAA,CACA,YAAA,CACA,SAAA,CACA,qBAAA,CAVA,2CACE,yBAAA,CACA,cAAA,CCxCO,4CDmDP,aAAA,CCnDO,wCDuDP,aAAA,CAKN,uBACE,YAAA,CAIF,YACE,mCAAA,CACA,UAAA,CACA,qCAAA,CACA,mBAAA,CACA,kBAAA,CACA,mBAAA,CACA,iBAAA,CAGF,kCACE,YAAA,CACA,cAAA,CACA,qBAAA,CACA,YAAA,CACA,oCAAA,CAGA,2DACE,kBAAA,CACA,mBAAA,CACA,cAAA,CAEA,yEACE,mCAAA,CACA,UAAA,CACA,qCAAA,CAAA","sourcesContent":["\n@layer rbm {\n @import \"../../../scss/variables\";\n@import \"../../../scss/designMixin\";\n\n.input {\n display: inline-block;\n width: 100%;\n position: relative;\n padding-bottom: 0.1rem;\n\n &:focus-within {\n .selectableOptionContainer {\n display: inherit;\n }\n }\n\n @include design($material) {\n background-image: linear-gradient(to top, transparent 1px, #afafaf 1px);\n background-size: 100% 2px;\n background-repeat: no-repeat;\n background-position: center bottom;\n padding-bottom: 2px;\n\n &:focus {\n background-image: linear-gradient(var(--flavor-accent), var(--flavor-accent)),\n linear-gradient(to top, transparent 1px, #afafaf 1px);\n }\n }\n\n @include design($flat) {\n &, &:focus {\n border-bottom: 1px solid var(--border-light);\n }\n }\n\n .label {\n display: block;\n font-weight: var(--label-font-weight, bold);\n }\n\n .text {\n &.disabled {\n caret-color: transparent;\n cursor: pointer;\n }\n\n width: 100%;\n background-color: transparent;\n border: 0;\n outline: none;\n padding: 0;\n background-image: none;\n\n @include design($material) {\n color: #212121;\n }\n\n @include design($flat) {\n color: #1f1f21;\n }\n }\n}\n\n.inputContainer {\n display: flex;\n\n}\n\n.tag {\n --text-primary-default-color: white;\n color: white;\n background-color: var(--flavor-accent);\n padding: 0.1rem 0.2rem;\n margin-right: 0.1rem;\n margin-bottom: 0.1rem;\n border-radius: 4px;\n}\n\n.selectableOptionContainer {\n display: none;\n position: fixed;\n background-color: white;\n z-index: 1100;\n border: 1px solid var(--border-light);\n\n\n .selectableOption {\n padding-left: 0.2rem;\n padding-right: 0.2rem;\n cursor: pointer;\n\n &.active {\n --text-primary-default-color: white;\n color: white;\n background-color: var(--flavor-accent);\n }\n }\n}\n \n}","@use 'sass:selector';\n\n@mixin design($designName) {\n @if & {\n @at-root #{selector.nest(':global(.'+$designName+\")\", &)} {\n @content\n }\n } @else {\n :global(.#{$designName}) {\n @content\n }\n }\n}\n"],"sourceRoot":""}]);
1379
1379
  // Exports
1380
1380
  ___CSS_LOADER_EXPORT___.locals = {
1381
1381
  "input": `input__sEopK`,
1382
1382
  "selectableOptionContainer": `selectableOptionContainer__kutkQ`,
1383
1383
  "label": `label__jJsSu`,
1384
1384
  "text": `text__v0KcT`,
1385
+ "disabled": `disabled__M6sE8`,
1385
1386
  "inputContainer": `inputContainer__R_CDq`,
1386
1387
  "tag": `tag__BTX7E`,
1387
1388
  "selectableOption": `selectableOption__HHU91`,
@@ -1442,7 +1443,7 @@ var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(1354);
1442
1443
  var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
1443
1444
  var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);
1444
1445
  // Module
1445
- ___CSS_LOADER_EXPORT___.push([module.id, `@layer rbm{.switch__xNNFS{cursor:pointer;position:relative;display:inline-block}.switch__xNNFS>label{display:flex;cursor:pointer;align-items:center}.switch__xNNFS .label__ZYi_R:not(:empty){margin-left:.2rem;margin-right:.2rem}.switch__xNNFS input{display:none}.switch__xNNFS .toggle__N3rdq{width:40px;display:inline-block;position:relative;transition-property:all;transition-duration:.35s;transition-timing-function:ease-out;border-radius:30px}.switch__xNNFS .toggle__N3rdq .handle__KTnkl{transition-property:all;transition-duration:.35s;transition-timing-function:cubic-bezier(0.59, 0.01, 0.5, 0.99);border-radius:100%;background-clip:padding-box;position:absolute;content:""}.material-design .switch__xNNFS.dual__Ufzsw .toggle__N3rdq .handle__KTnkl,.material-design .switch__xNNFS input:checked+.toggle__N3rdq .handle__KTnkl{background-color:var(--flavor-accent);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.flat-design .switch__xNNFS.dual__Ufzsw .toggle__N3rdq,.flat-design .switch__xNNFS input:checked+.toggle__N3rdq{background-color:#44db5e;box-shadow:inset 0 0 0 2px #44db5e}.flat-design .switch__xNNFS.dual__Ufzsw .toggle__N3rdq .handle__KTnkl,.flat-design .switch__xNNFS input:checked+.toggle__N3rdq .handle__KTnkl{background-color:#fff;top:2px;box-shadow:0 3px 2px rgba(0,0,0,.25)}.material-design .switch__xNNFS input:checked+.toggle__N3rdq .handle__KTnkl{left:18px}.material-design .switch__xNNFS .toggle__N3rdq{background-color:rgba(55,71,79,.5);margin-top:4px;height:15px}.material-design .switch__xNNFS .toggle__N3rdq .handle__KTnkl{margin-top:-4px;width:22px;height:22px;background-color:#f1f1f1;left:0;box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4)}.material-design .switch__xNNFS .toggle__N3rdq .handle__KTnkl:before{background:rgba(0,0,0,0);content:"";display:block;width:100%;height:100%;border-radius:50%;z-index:0;box-shadow:0 0 0 0 rgba(0,0,0,.12);transition:box-shadow .1s linear}.flat-design .switch__xNNFS input:checked+.toggle__N3rdq .handle__KTnkl{left:19px}.flat-design .switch__xNNFS .toggle__N3rdq{height:23px;background-color:#fff;box-shadow:inset 0 0 0 2px #e5e5e5}.flat-design .switch__xNNFS .toggle__N3rdq .handle__KTnkl{height:19px;width:19px;background-color:#fff;left:2px;top:2px;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25)}}`, "",{"version":3,"sources":["webpack://./src/Components/FormElements/Switch/switch.scss"],"names":[],"mappings":"AACA,WAIA,eACE,cAAA,CACA,iBAAA,CACA,oBAAA,CAEA,qBACE,YAAA,CACA,cAAA,CACA,kBAAA,CAIA,yCACE,iBAAA,CACA,kBAAA,CAIJ,qBACE,YAAA,CAGF,8BACE,UAAA,CACA,oBAAA,CACA,iBAAA,CACA,uBAAA,CACA,wBAAA,CACA,mCAAA,CACA,kBAAA,CAEA,6CACE,uBAAA,CACA,wBAAA,CACA,8DAAA,CACA,kBAAA,CACA,2BAAA,CACA,iBAAA,CACA,UAAA,CAIJ,sJACE,qCAAA,CACA,gGAAA,CAGF,gHACE,wBAAA,CACA,kCAAA,CAGF,8IACE,qBAAA,CACA,OAAA,CACA,oCAAA,CAQI,4EAEE,SAAA,CAKN,+CACE,kCAAA,CAEA,cAAA,CACA,WAAA,CAEA,8DACE,eAAA,CACA,UAAA,CACA,WAAA,CACA,wBAAA,CACA,MAAA,CACA,iGAAA,CAEA,qEACE,wBAAA,CACA,UAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,SAAA,CACA,kCAAA,CACA,gCAAA,CAWF,wEAEE,SAAA,CAKN,2CACE,WAAA,CAEA,qBAAA,CACA,kCAAA,CAEA,0DACE,WAAA,CACA,UAAA,CACA,qBAAA,CACA,QAAA,CACA,OAAA,CACA,8DAAA,CAAA","sourcesContent":["\n@layer rbm {\n @import \"../../../scss/variables\";\n@import \"../../../scss/designMixin\";\n\n.switch {\n cursor: pointer;\n position: relative;\n display: inline-block;\n\n > label {\n display: flex;\n cursor: pointer;\n align-items: center;\n }\n\n .label {\n &:not(:empty) {\n margin-left: 0.2rem;\n margin-right: 0.2rem;\n }\n }\n\n input {\n display: none;\n }\n\n .toggle {\n width: 40px;\n display: inline-block;\n position: relative;\n transition-property: all;\n transition-duration: 0.35s;\n transition-timing-function: ease-out;\n border-radius: 30px;\n\n .handle {\n transition-property: all;\n transition-duration: 0.35s;\n transition-timing-function: cubic-bezier(.59, .01, .5, .99);\n border-radius: 100%;\n background-clip: padding-box;\n position: absolute;\n content: '';\n }\n }\n\n %dual-handle-material {\n background-color: var(--flavor-accent);\n box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%), 0 3px 1px -2px rgb(0 0 0 / 20%);\n }\n\n %dual-toggle-flat {\n background-color: #44db5e;\n box-shadow: inset 0 0 0 2px #44db5e;\n }\n\n %dual-handle-flat {\n background-color: #ffffff;\n top: 2px;\n box-shadow: 0 3px 2px rgb(0 0 0 / 25%);\n }\n\n @include design($material) {\n input:checked + {\n .toggle {\n //box-shadow: none;\n\n .handle {\n @extend %dual-handle-material;\n left: 18px;\n }\n }\n }\n\n .toggle {\n background-color: rgba(55, 71, 79, 0.5);\n\n margin-top: 4px;\n height: 15px;\n\n .handle {\n margin-top: -4px;\n width: 22px;\n height: 22px;\n background-color: #f1f1f1;\n left: 0;\n box-shadow: 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%), 0 2px 4px -1px rgb(0 0 0 / 40%);\n\n &:before {\n background: transparent;\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n z-index: 0;\n box-shadow: 0 0 0 0 rgb(0 0 0 / 12%);\n transition: box-shadow 0.1s linear;\n }\n }\n }\n }\n\n @include design($flat) {\n input:checked + {\n .toggle {\n @extend %dual-toggle-flat;\n\n .handle {\n @extend %dual-handle-flat;\n left: 19px\n }\n }\n }\n\n .toggle {\n height: 23px;\n\n background-color: white;\n box-shadow: inset 0 0 0 2px #e5e5e5;\n\n .handle {\n height: 19px;\n width: 19px;\n background-color: #ffffff;\n left: 2px;\n top: 2px;\n box-shadow: 0 0 1px 0 rgb(0 0 0 / 25%), 0 3px 2px rgb(0 0 0 / 25%);\n }\n }\n }\n\n &.dual {\n @include design($material) {\n .toggle {\n .handle {\n @extend %dual-handle-material;\n }\n }\n }\n @include design($flat) {\n .toggle {\n @extend %dual-toggle-flat;\n\n .handle {\n @extend %dual-handle-flat;\n }\n }\n }\n }\n}\n \n}"],"sourceRoot":""}]);
1446
+ ___CSS_LOADER_EXPORT___.push([module.id, `@layer rbm{.switch__xNNFS{cursor:pointer;position:relative;display:inline-block}.switch__xNNFS>label{display:flex;cursor:pointer;align-items:center}.switch__xNNFS .label__ZYi_R:not(:empty){margin-left:.2rem;margin-right:.2rem}.switch__xNNFS input{display:none}.switch__xNNFS .toggle__N3rdq{flex-shrink:0;width:40px;display:inline-block;position:relative;transition-property:all;transition-duration:.35s;transition-timing-function:ease-out;border-radius:30px}.switch__xNNFS .toggle__N3rdq .handle__KTnkl{left:var(--switch-handle-offset, 0);transition-property:all;transition-duration:.35s;transition-timing-function:cubic-bezier(0.59, 0.01, 0.5, 0.99);border-radius:100%;background-clip:padding-box;position:absolute;content:""}.material-design .switch__xNNFS.dual__Ufzsw .toggle__N3rdq .handle__KTnkl,.material-design .switch__xNNFS input:checked+.toggle__N3rdq .handle__KTnkl{background-color:var(--flavor-accent);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.flat-design .switch__xNNFS.dual__Ufzsw .toggle__N3rdq,.flat-design .switch__xNNFS input:checked+.toggle__N3rdq{background-color:#44db5e;box-shadow:inset 0 0 0 2px #44db5e}.flat-design .switch__xNNFS.dual__Ufzsw .toggle__N3rdq .handle__KTnkl,.flat-design .switch__xNNFS input:checked+.toggle__N3rdq .handle__KTnkl{background-color:#fff;top:2px;box-shadow:0 3px 2px rgba(0,0,0,.25)}.material-design .switch__xNNFS{--switch-handle-checked-offset: 18px;--switch-handle-offset: 0px}.material-design .switch__xNNFS input:checked+.toggle__N3rdq{--switch-handle-offset: var(--switch-handle-checked-offset)}.material-design .switch__xNNFS .toggle__N3rdq{background-color:rgba(55,71,79,.5);margin-top:4px;height:15px}.material-design .switch__xNNFS .toggle__N3rdq .handle__KTnkl{margin-top:-4px;width:22px;height:22px;background-color:#f1f1f1;box-shadow:0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12),0 2px 4px -1px rgba(0,0,0,.4)}.material-design .switch__xNNFS .toggle__N3rdq .handle__KTnkl:before{background:rgba(0,0,0,0);content:"";display:block;width:100%;height:100%;border-radius:50%;z-index:0;box-shadow:0 0 0 0 rgba(0,0,0,.12);transition:box-shadow .1s linear}.flat-design .switch__xNNFS{--switch-handle-offset: 2px;--switch-handle-checked-offset: 19px}.flat-design .switch__xNNFS input:checked+.toggle__N3rdq{--switch-handle-offset: var(--switch-handle-checked-offset)}.flat-design .switch__xNNFS .toggle__N3rdq{height:23px;background-color:#fff;box-shadow:inset 0 0 0 2px #e5e5e5}.flat-design .switch__xNNFS .toggle__N3rdq .handle__KTnkl{height:19px;width:19px;background-color:#fff;top:2px;box-shadow:0 0 1px 0 rgba(0,0,0,.25),0 3px 2px rgba(0,0,0,.25)}}`, "",{"version":3,"sources":["webpack://./src/Components/FormElements/Switch/switch.scss","webpack://./src/scss/_designMixin.scss"],"names":[],"mappings":"AACA,WAIA,eACE,cAAA,CACA,iBAAA,CACA,oBAAA,CAEA,qBACE,YAAA,CACA,cAAA,CACA,kBAAA,CAIA,yCACE,iBAAA,CACA,kBAAA,CAIJ,qBACE,YAAA,CAGF,8BACE,aAAA,CACA,UAAA,CACA,oBAAA,CACA,iBAAA,CACA,uBAAA,CACA,wBAAA,CACA,mCAAA,CACA,kBAAA,CAEA,6CACE,mCAAA,CACA,uBAAA,CACA,wBAAA,CACA,8DAAA,CACA,kBAAA,CACA,2BAAA,CACA,iBAAA,CACA,UAAA,CAIJ,sJACE,qCAAA,CACA,gGAAA,CAGF,gHACE,wBAAA,CACA,kCAAA,CAGF,8IACE,qBAAA,CACA,OAAA,CACA,oCAAA,CC1DS,gCD8DT,oCAAA,CACA,2BAAA,CAEA,6DACE,2DAAA,CAOF,+CACE,kCAAA,CAEA,cAAA,CACA,WAAA,CAEA,8DACE,eAAA,CACA,UAAA,CACA,WAAA,CACA,wBAAA,CACA,iGAAA,CAEA,qEACE,wBAAA,CACA,UAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,SAAA,CACA,kCAAA,CACA,gCAAA,CC/FG,4BDsGT,2BAAA,CACA,oCAAA,CAEA,yDAEE,2DAAA,CAQF,2CACE,WAAA,CAEA,qBAAA,CACA,kCAAA,CAEA,0DACE,WAAA,CACA,UAAA,CACA,qBAAA,CACA,OAAA,CACA,8DAAA,CAAA","sourcesContent":["\n@layer rbm {\n @import \"../../../scss/variables\";\n@import \"../../../scss/designMixin\";\n\n.switch {\n cursor: pointer;\n position: relative;\n display: inline-block;\n\n > label {\n display: flex;\n cursor: pointer;\n align-items: center;\n }\n\n .label {\n &:not(:empty) {\n margin-left: 0.2rem;\n margin-right: 0.2rem;\n }\n }\n\n input {\n display: none;\n }\n\n .toggle {\n flex-shrink: 0;\n width: 40px;\n display: inline-block;\n position: relative;\n transition-property: all;\n transition-duration: 0.35s;\n transition-timing-function: ease-out;\n border-radius: 30px;\n\n .handle {\n left: var(--switch-handle-offset, 0);\n transition-property: all;\n transition-duration: 0.35s;\n transition-timing-function: cubic-bezier(.59, .01, .5, .99);\n border-radius: 100%;\n background-clip: padding-box;\n position: absolute;\n content: '';\n }\n }\n\n %dual-handle-material {\n background-color: var(--flavor-accent);\n box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%), 0 3px 1px -2px rgb(0 0 0 / 20%);\n }\n\n %dual-toggle-flat {\n background-color: #44db5e;\n box-shadow: inset 0 0 0 2px #44db5e;\n }\n\n %dual-handle-flat {\n background-color: #ffffff;\n top: 2px;\n box-shadow: 0 3px 2px rgb(0 0 0 / 25%);\n }\n\n @include design($material) {\n --switch-handle-checked-offset: 18px;\n --switch-handle-offset: 0px;\n\n input:checked + .toggle {\n --switch-handle-offset: var(--switch-handle-checked-offset);\n\n .handle {\n @extend %dual-handle-material;\n }\n }\n\n .toggle {\n background-color: rgba(55, 71, 79, 0.5);\n\n margin-top: 4px;\n height: 15px;\n\n .handle {\n margin-top: -4px;\n width: 22px;\n height: 22px;\n background-color: #f1f1f1;\n box-shadow: 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%), 0 2px 4px -1px rgb(0 0 0 / 40%);\n\n &:before {\n background: transparent;\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n z-index: 0;\n box-shadow: 0 0 0 0 rgb(0 0 0 / 12%);\n transition: box-shadow 0.1s linear;\n }\n }\n }\n }\n\n @include design($flat) {\n --switch-handle-offset: 2px;\n --switch-handle-checked-offset: 19px;\n\n input:checked + .toggle {\n @extend %dual-toggle-flat;\n --switch-handle-offset: var(--switch-handle-checked-offset);\n\n .handle {\n @extend %dual-handle-flat;\n }\n\n }\n\n .toggle {\n height: 23px;\n\n background-color: white;\n box-shadow: inset 0 0 0 2px #e5e5e5;\n\n .handle {\n height: 19px;\n width: 19px;\n background-color: #ffffff;\n top: 2px;\n box-shadow: 0 0 1px 0 rgb(0 0 0 / 25%), 0 3px 2px rgb(0 0 0 / 25%);\n }\n }\n }\n\n &.dual {\n @include design($material) {\n .toggle {\n .handle {\n @extend %dual-handle-material;\n }\n }\n }\n @include design($flat) {\n .toggle {\n @extend %dual-toggle-flat;\n\n .handle {\n @extend %dual-handle-flat;\n }\n }\n }\n }\n}\n \n}","@use 'sass:selector';\n\n@mixin design($designName) {\n @if & {\n @at-root #{selector.nest(':global(.'+$designName+\")\", &)} {\n @content\n }\n } @else {\n :global(.#{$designName}) {\n @content\n }\n }\n}\n"],"sourceRoot":""}]);
1446
1447
  // Exports
1447
1448
  ___CSS_LOADER_EXPORT___.locals = {
1448
1449
  "switch": `switch__xNNFS`,
@@ -4310,6 +4311,7 @@ __webpack_require__.d(__webpack_exports__, {
4310
4311
  useToast: () => (/* reexport */ useToast),
4311
4312
  useWindow: () => (/* reexport */ useWindow),
4312
4313
  useWindowDimensions: () => (/* reexport */ useWindowDimensions),
4314
+ useYupResolver: () => (/* reexport */ useYupResolver),
4313
4315
  withForwardRef: () => (/* reexport */ withForwardRef),
4314
4316
  withHookController: () => (/* reexport */ withHookController),
4315
4317
  withMemo: () => (/* reexport */ withMemo),
@@ -5777,6 +5779,7 @@ var Button_rest = undefined && undefined.__rest || function (s, e) {
5777
5779
 
5778
5780
 
5779
5781
 
5782
+
5780
5783
  const Button = withMemo(function Button(_a) {
5781
5784
  var {
5782
5785
  children,
@@ -5785,10 +5788,17 @@ const Button = withMemo(function Button(_a) {
5785
5788
  size,
5786
5789
  fullWidth = false,
5787
5790
  flavor = Flavor.Accent,
5788
- type = ButtonType.Primary
5791
+ type = ButtonType.Primary,
5792
+ stopPropagation = true
5789
5793
  } = _a,
5790
- props = Button_rest(_a, ["children", "className", "disabled", "size", "fullWidth", "flavor", "type"]);
5794
+ props = Button_rest(_a, ["children", "className", "disabled", "size", "fullWidth", "flavor", "type", "stopPropagation"]);
5791
5795
  const [onClick, otherProps] = useListenerWithExtractedProps('onClick', props);
5796
+ const realOnClick = (0,external_react_.useCallback)(ev => {
5797
+ if (stopPropagation) {
5798
+ ev.stopPropagation();
5799
+ }
5800
+ onClick === null || onClick === void 0 ? void 0 : onClick(ev);
5801
+ }, [onClick, stopPropagation]);
5792
5802
  const classes = {
5793
5803
  [(button_default()).primary]: type === ButtonType.Primary,
5794
5804
  [(button_default()).secondary]: type === ButtonType.Secondary,
@@ -5798,7 +5808,7 @@ const Button = withMemo(function Button(_a) {
5798
5808
  return /*#__PURE__*/external_react_.createElement("button", Button_extends({}, otherProps, {
5799
5809
  disabled: disabled,
5800
5810
  type: "button",
5801
- onClick: onClick,
5811
+ onClick: realOnClick,
5802
5812
  className: classnames_default()((button_default()).button, {
5803
5813
  [(button_default()).fullWidth]: fullWidth
5804
5814
  }, classes, flavor, className)
@@ -7331,7 +7341,7 @@ function useSharedSelectedColor(key, predefinedColors = [], numberSavedColors =
7331
7341
  }
7332
7342
  // triggers rerender
7333
7343
  sharedSelectedColor[realKey].updateFunctions.forEach(u => u());
7334
- }, [numberSavedColors, realKey, shouldSaveToLocalStorage]);
7344
+ }, [numberSavedColors, predefinedColors, realKey, shouldSaveToLocalStorage]);
7335
7345
  (0,external_react_.useLayoutEffect)(() => {
7336
7346
  if (shouldSaveToLocalStorage) {
7337
7347
  const savedColors = localStorage.getItem(localStorageKey(realKey));
@@ -7571,35 +7581,35 @@ const Menu = withMemo(withRenderBrowserOnly(function Menu({
7571
7581
  elem === null || elem === void 0 ? void 0 : elem.appendChild(portalContainer);
7572
7582
  }, [isOpen, portalContainer, window === null || window === void 0 ? void 0 : window.document.body]);
7573
7583
  useClientLayoutEffect(() => {
7574
- var _a;
7575
- if (!menuRef.current) {
7576
- return;
7577
- }
7578
- const width = parseFloat(getComputedStyle(menuRef.current).width);
7579
- let newX = x;
7580
- if (newX > ((_a = window === null || window === void 0 ? void 0 : window.innerWidth) !== null && _a !== void 0 ? _a : 0) - width) {
7581
- newX -= width + offsetX;
7582
- }
7583
- if (newX < 0) {
7584
- newX = 0;
7585
- }
7586
- setInnerX(newX);
7587
- }, [offsetX, window === null || window === void 0 ? void 0 : window.innerWidth, x]);
7588
- useClientLayoutEffect(() => {
7589
- var _a;
7590
7584
  if (!menuRef.current) {
7591
- return;
7592
- }
7593
- const height = parseFloat(getComputedStyle(menuRef.current).height);
7594
- let newY = y;
7595
- if (newY > ((_a = window === null || window === void 0 ? void 0 : window.innerHeight) !== null && _a !== void 0 ? _a : 0) - height) {
7596
- newY -= height + offsetY;
7597
- }
7598
- if (newY < 0) {
7599
- newY = 0;
7585
+ return undefined;
7600
7586
  }
7601
- setInnerY(newY);
7602
- }, [offsetY, window === null || window === void 0 ? void 0 : window.innerHeight, y]);
7587
+ const menuElement = menuRef.current;
7588
+ const updateInnerPositions = () => {
7589
+ var _a, _b;
7590
+ const computedStyle = getComputedStyle(menuElement);
7591
+ const height = parseFloat(computedStyle.height);
7592
+ let newY = y;
7593
+ if (newY > ((_a = window === null || window === void 0 ? void 0 : window.innerHeight) !== null && _a !== void 0 ? _a : 0) - height) {
7594
+ newY -= height + offsetY;
7595
+ }
7596
+ setInnerY(Math.max(0, newY));
7597
+ const width = parseFloat(computedStyle.width);
7598
+ let newX = x;
7599
+ if (newX > ((_b = window === null || window === void 0 ? void 0 : window.innerWidth) !== null && _b !== void 0 ? _b : 0) - width) {
7600
+ newX -= width + offsetX;
7601
+ }
7602
+ setInnerX(Math.max(0, newX));
7603
+ };
7604
+ const observer = new ResizeObserver(() => {
7605
+ updateInnerPositions();
7606
+ });
7607
+ observer.observe(menuElement);
7608
+ updateInnerPositions();
7609
+ return () => {
7610
+ observer.disconnect();
7611
+ };
7612
+ }, [window, x, y, offsetX, offsetY]);
7603
7613
  // Other
7604
7614
  // Render Functions
7605
7615
  if (!isOpen) {
@@ -8705,13 +8715,16 @@ const Switch = withMemo(function Switch(_a) {
8705
8715
  preLabel = '',
8706
8716
  isLabelBeforeSwitch = false,
8707
8717
  isDual = undefined,
8718
+ stopPropagation = true,
8708
8719
  id,
8709
8720
  className,
8721
+ classNamePreLabel,
8722
+ classNameLabel,
8710
8723
  style,
8711
8724
  error,
8712
8725
  onChange
8713
8726
  } = _a,
8714
- props = Switch_rest(_a, ["children", "label", "preLabel", "isLabelBeforeSwitch", "isDual", "id", "className", "style", "error", "onChange"]);
8727
+ props = Switch_rest(_a, ["children", "label", "preLabel", "isLabelBeforeSwitch", "isDual", "stopPropagation", "id", "className", "classNamePreLabel", "classNameLabel", "style", "error", "onChange"]);
8715
8728
  // States
8716
8729
  // Refs
8717
8730
  // Callbacks
@@ -8720,6 +8733,12 @@ const Switch = withMemo(function Switch(_a) {
8720
8733
  onChange === null || onChange === void 0 ? void 0 : onChange(e);
8721
8734
  onChangeChecked(e.target.checked);
8722
8735
  }, [onChange, onChangeChecked]);
8736
+ const checkStopPropagation = (0,external_react_.useCallback)(ev => {
8737
+ if (stopPropagation) {
8738
+ ev.stopPropagation();
8739
+ ev.nativeEvent.stopPropagation();
8740
+ }
8741
+ }, [stopPropagation]);
8723
8742
  // Effects
8724
8743
  // Other
8725
8744
  // Render Functions
@@ -8736,12 +8755,13 @@ const Switch = withMemo(function Switch(_a) {
8736
8755
  className: classnames_default()((switch_default())["switch"], {
8737
8756
  [(switch_default()).dual]: isDual
8738
8757
  }, className),
8739
- style: style
8758
+ style: style,
8759
+ onClick: checkStopPropagation
8740
8760
  }, /*#__PURE__*/external_react_.createElement("label", {
8741
8761
  htmlFor: id,
8742
8762
  key: id
8743
8763
  }, /*#__PURE__*/external_react_.createElement("span", {
8744
- className: (switch_default()).label
8764
+ className: classnames_default()((switch_default()).label, classNamePreLabel)
8745
8765
  }, preLabel), /*#__PURE__*/external_react_.createElement("input", Switch_extends({}, otherProps, {
8746
8766
  type: "checkbox",
8747
8767
  id: id,
@@ -8751,7 +8771,7 @@ const Switch = withMemo(function Switch(_a) {
8751
8771
  }, /*#__PURE__*/external_react_.createElement("span", {
8752
8772
  className: (switch_default()).handle
8753
8773
  })), /*#__PURE__*/external_react_.createElement("span", {
8754
- className: (switch_default()).label
8774
+ className: classnames_default()((switch_default()).label, classNameLabel)
8755
8775
  }, label), /*#__PURE__*/external_react_.createElement(FormError, {
8756
8776
  error: error
8757
8777
  })));
@@ -8846,6 +8866,71 @@ const Textarea = withForwardRef(function Textarea(_a, ref) {
8846
8866
 
8847
8867
 
8848
8868
  const TextareaController = withHookController(Textarea, 'onChangeText');
8869
+ ;// CONCATENATED MODULE: ./src/Components/FormElements/Controller/useYupResolver.ts
8870
+ var useYupResolver_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
8871
+ function adopt(value) {
8872
+ return value instanceof P ? value : new P(function (resolve) {
8873
+ resolve(value);
8874
+ });
8875
+ }
8876
+ return new (P || (P = Promise))(function (resolve, reject) {
8877
+ function fulfilled(value) {
8878
+ try {
8879
+ step(generator.next(value));
8880
+ } catch (e) {
8881
+ reject(e);
8882
+ }
8883
+ }
8884
+ function rejected(value) {
8885
+ try {
8886
+ step(generator["throw"](value));
8887
+ } catch (e) {
8888
+ reject(e);
8889
+ }
8890
+ }
8891
+ function step(result) {
8892
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
8893
+ }
8894
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8895
+ });
8896
+ };
8897
+
8898
+ // TODO set translate function from somewhere else
8899
+ function useYupResolver(validationSchema, translate) {
8900
+ return (0,external_react_.useCallback)(data => useYupResolver_awaiter(this, void 0, void 0, function* () {
8901
+ try {
8902
+ const values = yield validationSchema.validate(data, {
8903
+ abortEarly: false
8904
+ });
8905
+ return {
8906
+ values,
8907
+ errors: {}
8908
+ };
8909
+ } catch (errors) {
8910
+ const reducedErrors = errors.inner.reduce((allErrors, currentError) => {
8911
+ var _a;
8912
+ if (currentError.path === undefined) {
8913
+ return allErrors;
8914
+ }
8915
+ let message = currentError.message;
8916
+ if (typeof message === 'object') {
8917
+ message = translate(message.key, message.args);
8918
+ } else {
8919
+ message = translate(message);
8920
+ }
8921
+ allErrors[currentError.path] = {
8922
+ type: (_a = currentError.type) !== null && _a !== void 0 ? _a : 'validation',
8923
+ message
8924
+ };
8925
+ return allErrors;
8926
+ }, {});
8927
+ return {
8928
+ values: {},
8929
+ errors: reducedErrors
8930
+ };
8931
+ }
8932
+ }), [translate, validationSchema]);
8933
+ }
8849
8934
  ;// CONCATENATED MODULE: ./src/Components/FormElements/Input/HiddenInput.tsx
8850
8935
  function HiddenInput_extends() { return HiddenInput_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, HiddenInput_extends.apply(null, arguments); }
8851
8936
  var HiddenInput_rest = undefined && undefined.__rest || function (s, e) {
@@ -8886,6 +8971,7 @@ const HiddenInput_tmp = withMemo(HiddenInput);
8886
8971
  var seachSelectInput = __webpack_require__(3459);
8887
8972
  var seachSelectInput_default = /*#__PURE__*/__webpack_require__.n(seachSelectInput);
8888
8973
  ;// CONCATENATED MODULE: ./src/Components/FormElements/SearchSelectInput/SearchSelectInput.tsx
8974
+ function SearchSelectInput_extends() { return SearchSelectInput_extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, SearchSelectInput_extends.apply(null, arguments); }
8889
8975
 
8890
8976
 
8891
8977
 
@@ -8905,12 +8991,19 @@ const SearchSelectInput = withMemo(function SearchSelectInput({
8905
8991
  values,
8906
8992
  onChangeValue,
8907
8993
  className,
8994
+ renderSelectableOptions,
8995
+ renderSelectedOption,
8996
+ showSelectedOptions = false,
8997
+ closeOnSelect = false,
8998
+ enableSearch = true,
8999
+ allowDeselect = true,
8908
9000
  style
8909
9001
  }) {
8910
9002
  // Variables
8911
9003
  const indexedOptions = (0,external_react_.useMemo)(() => js_helper.ArrayHelper.arrayToObject(options, opt => opt.value), [options]);
8912
9004
  // Refs
8913
9005
  const containerRef = (0,external_react_.useRef)(null);
9006
+ const inputRef = (0,external_react_.useRef)(null);
8914
9007
  const window = useWindow();
8915
9008
  // States
8916
9009
  const [searchText, setSearchText] = (0,external_react_.useState)('');
@@ -8920,8 +9013,8 @@ const SearchSelectInput = withMemo(function SearchSelectInput({
8920
9013
  if (!suggestionsPosition) {
8921
9014
  return [];
8922
9015
  }
8923
- return options.filter(option => !values.includes(option.value) && option.label.toLowerCase().includes(searchText.toLowerCase()));
8924
- }, [suggestionsPosition, options, searchText, values]);
9016
+ return options.filter(option => (showSelectedOptions || !values.includes(option.value)) && (!enableSearch || option.label.toLowerCase().includes(searchText.toLowerCase())));
9017
+ }, [suggestionsPosition, options, showSelectedOptions, values, enableSearch, searchText]);
8925
9018
  // Selectors
8926
9019
  // Callbacks
8927
9020
  const updateSuggestionPosition = (0,external_react_.useCallback)(() => {
@@ -8941,11 +9034,15 @@ const SearchSelectInput = withMemo(function SearchSelectInput({
8941
9034
  });
8942
9035
  }, [window === null || window === void 0 ? void 0 : window.innerWidth]);
8943
9036
  const onChange = (0,external_react_.useCallback)(ev => {
9037
+ if (!enableSearch) {
9038
+ return;
9039
+ }
8944
9040
  setSearchText(ev.target.value);
8945
9041
  setSelectedIndex(0);
8946
- }, []);
9042
+ }, [enableSearch]);
8947
9043
  const onFocus = (0,external_react_.useCallback)(() => updateSuggestionPosition(), [updateSuggestionPosition]);
8948
9044
  const toggleOption = (0,external_react_.useCallback)((_, value) => {
9045
+ var _a, _b;
8949
9046
  const newValues = [...values];
8950
9047
  const index = values.indexOf(value);
8951
9048
  if (index === -1) {
@@ -8956,9 +9053,17 @@ const SearchSelectInput = withMemo(function SearchSelectInput({
8956
9053
  setSearchText('');
8957
9054
  setSelectedIndex(0);
8958
9055
  onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(newValues);
8959
- }, [onChangeValue, values]);
9056
+ if (closeOnSelect) {
9057
+ if ((_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement)) {
9058
+ (_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.focus();
9059
+ requestAnimationFrame(() => {
9060
+ var _a;
9061
+ (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
9062
+ });
9063
+ }
9064
+ }
9065
+ }, [closeOnSelect, onChangeValue, values]);
8960
9066
  const onKeyPress = (0,external_react_.useCallback)(e => {
8961
- console.log('Keypress', e.key);
8962
9067
  if (e.key === 'Enter' && !e.defaultPrevented) {
8963
9068
  if (selectedIndex < selectableOptions.length) {
8964
9069
  toggleOption(undefined, selectableOptions[selectedIndex].value);
@@ -8984,28 +9089,39 @@ const SearchSelectInput = withMemo(function SearchSelectInput({
8984
9089
  // Render Functions
8985
9090
  const renderOption = value => {
8986
9091
  var _a, _b;
8987
- if (!indexedOptions[value]) {
9092
+ const option = indexedOptions[value];
9093
+ if (!option) {
8988
9094
  return null;
8989
9095
  }
8990
- return /*#__PURE__*/external_react_.createElement(ClickableMemo, {
8991
- onClick: toggleOption,
8992
- onClickData: value,
8993
- key: (_a = indexedOptions[value]) === null || _a === void 0 ? void 0 : _a.key
8994
- }, /*#__PURE__*/external_react_.createElement(InlineBlockMemo, {
9096
+ const element = (_a = renderSelectedOption === null || renderSelectedOption === void 0 ? void 0 : renderSelectedOption(option)) !== null && _a !== void 0 ? _a : /*#__PURE__*/external_react_.createElement(InlineBlockMemo, {
8995
9097
  className: (seachSelectInput_default()).tag
8996
9098
  }, /*#__PURE__*/external_react_.createElement(tmp, {
8997
9099
  size: TEXT_SIZE.xSmall
8998
- }, (_b = indexedOptions[value]) === null || _b === void 0 ? void 0 : _b.label)));
9100
+ }, (_b = indexedOptions[value]) === null || _b === void 0 ? void 0 : _b.label));
9101
+ const onClickProps = allowDeselect ? {
9102
+ onClick: toggleOption,
9103
+ onClickData: value
9104
+ } : {};
9105
+ return /*#__PURE__*/external_react_.createElement(ClickableMemo, SearchSelectInput_extends({}, onClickProps, {
9106
+ key: option.key,
9107
+ __allowChildren: "all"
9108
+ }), element);
9109
+ };
9110
+ const renderSelectableOption = (opt, index) => {
9111
+ var _a;
9112
+ const isActive = index === selectedIndex;
9113
+ const element = (_a = renderSelectableOptions === null || renderSelectableOptions === void 0 ? void 0 : renderSelectableOptions(opt, isActive, index, selectedIndex)) !== null && _a !== void 0 ? _a : /*#__PURE__*/external_react_.createElement(BlockMemo, {
9114
+ className: classnames_default()((seachSelectInput_default()).selectableOption, {
9115
+ [(seachSelectInput_default()).active]: index === selectedIndex
9116
+ })
9117
+ }, /*#__PURE__*/external_react_.createElement(tmp, null, opt.label));
9118
+ return /*#__PURE__*/external_react_.createElement(ClickableMemo, {
9119
+ onClick: toggleOption,
9120
+ onClickData: opt.value,
9121
+ key: opt.key,
9122
+ __allowChildren: "all"
9123
+ }, element);
8999
9124
  };
9000
- const renderSelectableOption = (opt, index) => /*#__PURE__*/external_react_.createElement(ClickableMemo, {
9001
- onClick: toggleOption,
9002
- onClickData: opt.value,
9003
- key: opt.key
9004
- }, /*#__PURE__*/external_react_.createElement(BlockMemo, {
9005
- className: classnames_default()((seachSelectInput_default()).selectableOption, {
9006
- [(seachSelectInput_default()).active]: index === selectedIndex
9007
- })
9008
- }, /*#__PURE__*/external_react_.createElement(tmp, null, opt.label)));
9009
9125
  return (
9010
9126
  /*#__PURE__*/
9011
9127
  // eslint-disable-next-line jsx-a11y/label-has-associated-control
@@ -9021,7 +9137,10 @@ const SearchSelectInput = withMemo(function SearchSelectInput({
9021
9137
  }, /*#__PURE__*/external_react_.createElement(InlineBlockMemo, null, values.map(renderOption)), /*#__PURE__*/external_react_.createElement(Grow, {
9022
9138
  __allowChildren: "html"
9023
9139
  }, /*#__PURE__*/external_react_.createElement("input", {
9024
- className: (seachSelectInput_default()).text,
9140
+ ref: inputRef,
9141
+ className: classnames_default()((seachSelectInput_default()).text, {
9142
+ [(seachSelectInput_default()).disabled]: !enableSearch
9143
+ }),
9025
9144
  value: searchText,
9026
9145
  onChange: onChange,
9027
9146
  onKeyDown: onKeyPress,
@@ -9056,9 +9175,10 @@ const Slider = withMemo(function Slider(_a) {
9056
9175
  // Variables
9057
9176
  var {
9058
9177
  className,
9059
- style
9178
+ style,
9179
+ stopPropagation = true
9060
9180
  } = _a,
9061
- props = Slider_rest(_a, ["className", "style"]);
9181
+ props = Slider_rest(_a, ["className", "style", "stopPropagation"]);
9062
9182
  // Refs
9063
9183
  // States
9064
9184
  // Selectors
@@ -9070,6 +9190,11 @@ const Slider = withMemo(function Slider(_a) {
9070
9190
  onChangeValue(Number(e.target.value));
9071
9191
  onChange(e);
9072
9192
  }, [onChange, onChangeValue]);
9193
+ const checkStopPropagation = (0,external_react_.useCallback)(ev => {
9194
+ if (stopPropagation) {
9195
+ ev.stopPropagation();
9196
+ }
9197
+ }, [stopPropagation]);
9073
9198
  // Effects
9074
9199
  const innerRef = useOnChangeDone(onChangeDone);
9075
9200
  // Other
@@ -9079,7 +9204,8 @@ const Slider = withMemo(function Slider(_a) {
9079
9204
  // eslint-disable-next-line jsx-a11y/label-has-associated-control
9080
9205
  external_react_.createElement("label", {
9081
9206
  className: classnames_default()((slider_default()).slider, className),
9082
- style: style
9207
+ style: style,
9208
+ onClick: checkStopPropagation
9083
9209
  }, /*#__PURE__*/external_react_.createElement("input", Slider_extends({
9084
9210
  type: "range"
9085
9211
  }, otherPropsWithoutData, {
@@ -12921,10 +13047,11 @@ function Spoiler(_a) {
12921
13047
  openIcon = free_solid_svg_icons_namespaceObject.faChevronDown,
12922
13048
  closeIcon = free_solid_svg_icons_namespaceObject.faChevronUp,
12923
13049
  className,
13050
+ onlyTitleToggles = false,
12924
13051
  style,
12925
13052
  open
12926
13053
  } = _a,
12927
- listenerProps = Spoiler_rest(_a, ["title", "children", "initialOpen", "noClosingAnimation", "openIcon", "closeIcon", "className", "style", "open"]);
13054
+ listenerProps = Spoiler_rest(_a, ["title", "children", "initialOpen", "noClosingAnimation", "openIcon", "closeIcon", "className", "onlyTitleToggles", "style", "open"]);
12928
13055
  // Refs
12929
13056
  // States
12930
13057
  const [isOpen, setIsOpen] = (0,external_react_.useState)(open !== null && open !== void 0 ? open : initialOpen);
@@ -12933,12 +13060,14 @@ function Spoiler(_a) {
12933
13060
  // Selectors
12934
13061
  // Callbacks
12935
13062
  const onClickListener = useListener('onClick', listenerProps);
12936
- const toggleOpen = (0,external_react_.useCallback)(() => {
13063
+ const toggleOpen = (0,external_react_.useCallback)(ev => {
13064
+ console.log("LOG-d target", ev.target);
12937
13065
  if (open !== undefined) {
12938
13066
  onClickListener === null || onClickListener === void 0 ? void 0 : onClickListener(!open);
12939
13067
  } else {
12940
13068
  setIsInitialValue(false);
12941
13069
  setIsOpen(old => {
13070
+ console.log("LOG-d toggleOpen", !old);
12942
13071
  onClickListener === null || onClickListener === void 0 ? void 0 : onClickListener(!old);
12943
13072
  return !old;
12944
13073
  });
@@ -12957,13 +13086,15 @@ function Spoiler(_a) {
12957
13086
  // Render Functions
12958
13087
  const icon = (open !== null && open !== void 0 ? open : isOpen) ? closeIcon : openIcon;
12959
13088
  return /*#__PURE__*/external_react_.createElement(ClickableMemo, {
12960
- onClick: toggleOpen,
13089
+ onClick: onlyTitleToggles ? undefined : toggleOpen,
12961
13090
  className: classnames_default()(className, (spoiler_default()).spoiler, {
12962
13091
  [(spoiler_default()).open]: open !== null && open !== void 0 ? open : isOpen,
12963
13092
  [(spoiler_default()).noAnimation]: isInitialValue,
12964
13093
  [(spoiler_default()).noClosingAnimation]: noClosingAnimation
12965
13094
  }),
12966
13095
  style: style
13096
+ }, /*#__PURE__*/external_react_.createElement(ClickableMemo, {
13097
+ onClick: toggleOpen
12967
13098
  }, /*#__PURE__*/external_react_.createElement(Flex_tmp, {
12968
13099
  horizontal: true
12969
13100
  }, /*#__PURE__*/external_react_.createElement(Grow, {
@@ -12971,7 +13102,7 @@ function Spoiler(_a) {
12971
13102
  }, titleComponent), icon ? /*#__PURE__*/external_react_.createElement(Icon, {
12972
13103
  icon: icon,
12973
13104
  className: (spoiler_default()).icon
12974
- }) : null), /*#__PURE__*/external_react_.createElement(BlockMemo, {
13105
+ }) : null)), /*#__PURE__*/external_react_.createElement(BlockMemo, {
12975
13106
  className: (spoiler_default()).bodyContainer
12976
13107
  }, /*#__PURE__*/external_react_.createElement(BlockMemo, {
12977
13108
  __allowChildren: "all",
@@ -13821,6 +13952,7 @@ function nonEmptyString(str, other = Characters.NBSP) {
13821
13952
 
13822
13953
 
13823
13954
 
13955
+
13824
13956
 
13825
13957
 
13826
13958
  })();
@@ -13950,6 +14082,7 @@ exports.useStrictEnabled = __webpack_exports__.useStrictEnabled;
13950
14082
  exports.useToast = __webpack_exports__.useToast;
13951
14083
  exports.useWindow = __webpack_exports__.useWindow;
13952
14084
  exports.useWindowDimensions = __webpack_exports__.useWindowDimensions;
14085
+ exports.useYupResolver = __webpack_exports__.useYupResolver;
13953
14086
  exports.withForwardRef = __webpack_exports__.withForwardRef;
13954
14087
  exports.withHookController = __webpack_exports__.withHookController;
13955
14088
  exports.withMemo = __webpack_exports__.withMemo;