@hbuesing/ui-library 1.3.1 → 1.4.0

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.
@@ -1,10 +1,11 @@
1
- import { ComponentPropsWithoutRef } from 'react';
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import './checkbox.scss';
3
3
  interface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {
4
4
  checked: boolean;
5
- label: string;
5
+ label?: string;
6
6
  onCheck: (value: boolean) => void;
7
7
  checkColor?: string;
8
+ children?: ReactNode;
8
9
  }
9
10
  export declare function CustomCheckBox(props: ICustomCheckbox): import("react/jsx-runtime").JSX.Element;
10
11
  export {};
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var e=require("react/jsx-runtime"),s=require("react");function r(){return r=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var r=arguments[s];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(null,arguments)}function n(e,s){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(s.indexOf(n)>=0)continue;r[n]=e[n]}return r}var t=["disabled","label","small","theme"];function l(s){var l=s.disabled,i=void 0!==l&&l,o=s.label,a=s.small,c=void 0!==a&&a,u=s.theme,d=n(s,t),p={color:function(e){if(!u||i)return null;var s="#"===e.charAt(0)?e.substring(1,7):e,r=[parseInt(s.substring(0,2),16)/255,parseInt(s.substring(2,4),16)/255,parseInt(s.substring(4,6),16)/255].map(function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179?"#000000":"#ffffff"}(u),backgroundColor:i?null:u,border:u?"none":null};return e.jsx("button",r({className:"uil-button "+(i?"uil-disabled":"")+" "+(c?"uil-small":""),style:p,disabled:i},d,{children:o}))}var i=["checkColor","checked","onCheck","label"];function o(s){var r=s.src,n=s.color,t=s.height,l=s.width;if(!r.includes(".svg"))throw new Error("Provided src is not an svg image");return e.jsx("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:n,height:t+"px",width:l+"px"},children:e.jsx("use",{href:r})})}var a=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function c(s){var t=s.iconColor,l=s.iconSrc,i=s.inputColor,c=s.label,u=s.toggle,d=s.valueChanged,p=n(s,a);return e.jsxs("label",{className:"uil-input-wrapper",htmlFor:p.id,children:[e.jsx("input",r({className:"uil-input",onChange:function(e){return d(e.target.value)},placeholder:c,style:{color:i}},p)),l&&e.jsx("div",{className:"uil-icon",onClick:u,children:e.jsx(o,{src:l,width:24,height:24,color:t})}),e.jsx("span",{className:"uil-label",style:{color:i},children:c})]})}function u(e){var r=s.useRef(null);return s.useEffect(function(){function s(s){r.current&&!r.current.contains(s.target)&&e()}return document.addEventListener("click",s),document.addEventListener("touchend",s),function(){document.removeEventListener("click",s),document.removeEventListener("touchend",s)}},[e]),r}var d,p=["tooltipClose","tooltipIcon","tooltipText"];function h(t){var l=t.tooltipClose,i=t.tooltipIcon,a=t.tooltipText,d=n(t,p),h=s.useState(!1),x=h[0],m=h[1],f=u(v);function v(){m(!1)}return e.jsx(e.Fragment,{children:i?e.jsxs("div",{className:"uil-tooltip-wrapper",children:[x&&e.jsxs("div",{className:"uil-tooltip",ref:f,children:[l&&e.jsx("button",{className:"uil-tooltip-button",onClick:v,children:l}),e.jsx("span",{children:a})]}),e.jsx("div",{className:"uil-tooltip-icon",onClick:function(){return m(!x)},children:e.jsx(o,{src:i,height:16,width:16})}),e.jsx(c,r({},d))]}):e.jsx(c,r({},d))})}exports.PasswordRuleTypes=void 0,(d=exports.PasswordRuleTypes||(exports.PasswordRuleTypes={}))[d.minLength=0]="minLength",d[d.maxLength=1]="maxLength",d[d.letters=2]="letters",d[d.numbers=3]="numbers",d[d.special=4]="special",d[d.upper=5]="upper";var x,m=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function f(r){var n=r.cancelLabel,t=void 0===n?"":n,i=r.closeLabel,o=r.confirm,a=r.confirmLabel,c=void 0===a?"":a,u=r.message,d=r.timeout,p=r.title,h=r.type,m=s.useState(!0),f=m[0],v=m[1];return s.useEffect(function(){d&&setTimeout(function(){v(!1)},d)},[]),f?e.jsx("div",{className:"uil-modal-wrapper",children:e.jsxs("div",{className:"uil-modal",children:[e.jsx("div",{className:"uil-header "+(h==x.success?"uil-success":"")+" "+(h==x.error?"uil-error":""),children:p}),d&&e.jsx("div",{className:"uil-progress-wrapper",children:e.jsx("div",{className:"uil-progress-bar",style:{animationDuration:r.timeout/1e3+1+"s"}})}),e.jsxs("div",{className:"uil-content",children:[e.jsx("div",{children:Array.isArray(u)?u.map(function(s,r){return e.jsx("p",{className:"uil-modal-text",children:s},r)}):e.jsx("p",{className:"uil-modal-text",children:u})}),e.jsxs("div",{className:"uil-button-wrapper "+(h!==x.question?"uil-single":""),children:[h!==x.question&&e.jsx(l,{label:i,small:!0,onClick:function(){return v(!1)},type:"button"}),h==x.question&&r.confirm&&e.jsxs(e.Fragment,{children:[e.jsx(l,{label:c,theme:"#00416A",small:!0,onClick:function(){return o},type:"button"}),e.jsx(l,{label:t,small:!0,onClick:function(){return v(!1)},type:"button"})]})]})]})]})}):e.jsx(e.Fragment,{})}!function(e){e[e.error=0]="error",e[e.question=1]="question",e[e.success=2]="success"}(x||(x={}));var v=["isSuccess"];exports.CustomButton=l,exports.CustomCheckBox=function(s){var t=s.checkColor,l=s.checked,o=s.onCheck,a=s.label,c=n(s,i);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"uil-check-wrapper",children:[e.jsxs("label",{className:"uil-checkbox",children:[e.jsx("input",r({type:"checkbox",checked:l,onChange:function(){o(!l)}},c)),e.jsx("div",{className:"uil-checkmark",style:{backgroundColor:t}})]}),e.jsx("span",{children:a})]})})},exports.CustomInput=h,exports.NotifyModal=function(s){var t=s.isSuccess,l=n(s,v);return e.jsx(f,r({type:t?x.success:x.error},l))},exports.PasswordInput=function(t){var l=t.capsLockWarning,i=t.rules,a=t.ruleChecked,c=t.ruleUnchecked,u=t.setFailedRules,d=n(t,m),p=s.useState(!1),x=p[0],f=p[1];function v(e){var s;switch(e.type){case exports.PasswordRuleTypes.minLength:s="[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case exports.PasswordRuleTypes.maxLength:s="^[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,"+e.count+"}$";break;case exports.PasswordRuleTypes.letters:s="[a-zA-ZßÄäÖöÜü]{"+e.count+",}";break;case exports.PasswordRuleTypes.numbers:s="[0-9]{"+e.count+",}";break;case exports.PasswordRuleTypes.special:s="[._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case exports.PasswordRuleTypes.upper:s="[A-ZÄÖÜ]{"+e.count+",}";break;default:s=e.pattern?e.pattern:""}return""!==s&&new RegExp(s).test(t.value)}return s.useEffect(function(){var e;e=[],i.forEach(function(s){v(s)||e.push(s)}),u(e)},[t.value]),s.useEffect(function(){function e(e){f(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[]),e.jsx(e.Fragment,{children:e.jsxs("div",{children:[e.jsx(h,r({},d)),e.jsxs("div",{className:"uil-password-rules",children:[x&&e.jsx("div",{className:"uil-password-rule",children:l}),i.map(function(s,r){return e.jsxs("div",{className:"uil-password-rule",children:[e.jsx(o,{src:v(s)?a:c,height:12,width:12}),e.jsx("span",{children:s.label})]},r)})]})]})})},exports.QuestionModal=function(s){var n=r({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(s),s));return e.jsx(f,r({type:x.question},n))},exports.SVG=o,exports.useOutsideClick=u;
1
+ var e=require("react/jsx-runtime"),s=require("react");function r(){return r=Object.assign?Object.assign.bind():function(e){for(var s=1;s<arguments.length;s++){var r=arguments[s];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(null,arguments)}function n(e,s){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(s.indexOf(n)>=0)continue;r[n]=e[n]}return r}var t=["disabled","label","small","theme"];function l(s){var l=s.disabled,i=void 0!==l&&l,o=s.label,c=s.small,a=void 0!==c&&c,u=s.theme,d=n(s,t),p={color:function(e){if(!u||i)return null;var s="#"===e.charAt(0)?e.substring(1,7):e,r=[parseInt(s.substring(0,2),16)/255,parseInt(s.substring(2,4),16)/255,parseInt(s.substring(4,6),16)/255].map(function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179?"#000000":"#ffffff"}(u),backgroundColor:i?null:u,border:u?"none":null};return e.jsx("button",r({className:"uil-button "+(i?"uil-disabled":"")+" "+(a?"uil-small":""),style:p,disabled:i},d,{children:o}))}var i=["checkColor","checked","onCheck","label","children"];function o(s){var r=s.src,n=s.color,t=s.height,l=s.width;if(!r.includes(".svg"))throw new Error("Provided src is not an svg image");return e.jsx("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:n,height:t+"px",width:l+"px"},children:e.jsx("use",{href:r})})}var c=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function a(s){var t=s.iconColor,l=s.iconSrc,i=s.inputColor,a=s.label,u=s.toggle,d=s.valueChanged,p=n(s,c);return e.jsxs("label",{className:"uil-input-wrapper",htmlFor:p.id,children:[e.jsx("input",r({className:"uil-input",onChange:function(e){return d(e.target.value)},placeholder:a,style:{color:i}},p)),l&&e.jsx("div",{className:"uil-icon",onClick:u,children:e.jsx(o,{src:l,width:24,height:24,color:t})}),e.jsx("span",{className:"uil-label",style:{color:i},children:a})]})}function u(e){var r=s.useRef(null);return s.useEffect(function(){function s(s){r.current&&!r.current.contains(s.target)&&e()}return document.addEventListener("click",s),document.addEventListener("touchend",s),function(){document.removeEventListener("click",s),document.removeEventListener("touchend",s)}},[e]),r}var d,p=["tooltipClose","tooltipIcon","tooltipText"];function h(t){var l=t.tooltipClose,i=t.tooltipIcon,c=t.tooltipText,d=n(t,p),h=s.useState(!1),x=h[0],m=h[1],f=u(v);function v(){m(!1)}return e.jsx(e.Fragment,{children:i?e.jsxs("div",{className:"uil-tooltip-wrapper",children:[x&&e.jsxs("div",{className:"uil-tooltip",ref:f,children:[l&&e.jsx("button",{className:"uil-tooltip-button",onClick:v,children:l}),e.jsx("span",{children:c})]}),e.jsx("div",{className:"uil-tooltip-icon",onClick:function(){return m(!x)},children:e.jsx(o,{src:i,height:16,width:16})}),e.jsx(a,r({},d))]}):e.jsx(a,r({},d))})}exports.PasswordRuleTypes=void 0,(d=exports.PasswordRuleTypes||(exports.PasswordRuleTypes={}))[d.minLength=0]="minLength",d[d.maxLength=1]="maxLength",d[d.letters=2]="letters",d[d.numbers=3]="numbers",d[d.special=4]="special",d[d.upper=5]="upper";var x,m=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function f(r){var n=r.cancelLabel,t=void 0===n?"":n,i=r.closeLabel,o=r.confirm,c=r.confirmLabel,a=void 0===c?"":c,u=r.message,d=r.timeout,p=r.title,h=r.type,m=s.useState(!0),f=m[0],v=m[1];return s.useEffect(function(){d&&setTimeout(function(){v(!1)},d)},[]),f?e.jsx("div",{className:"uil-modal-wrapper",children:e.jsxs("div",{className:"uil-modal",children:[e.jsx("div",{className:"uil-header "+(h==x.success?"uil-success":"")+" "+(h==x.error?"uil-error":""),children:p}),d&&e.jsx("div",{className:"uil-progress-wrapper",children:e.jsx("div",{className:"uil-progress-bar",style:{animationDuration:r.timeout/1e3+1+"s"}})}),e.jsxs("div",{className:"uil-content",children:[e.jsx("div",{children:Array.isArray(u)?u.map(function(s,r){return e.jsx("p",{className:"uil-modal-text",children:s},r)}):e.jsx("p",{className:"uil-modal-text",children:u})}),e.jsxs("div",{className:"uil-button-wrapper "+(h!==x.question?"uil-single":""),children:[h!==x.question&&e.jsx(l,{label:i,small:!0,onClick:function(){return v(!1)},type:"button"}),h==x.question&&r.confirm&&e.jsxs(e.Fragment,{children:[e.jsx(l,{label:a,theme:"#00416A",small:!0,onClick:function(){return o},type:"button"}),e.jsx(l,{label:t,small:!0,onClick:function(){return v(!1)},type:"button"})]})]})]})]})}):e.jsx(e.Fragment,{})}!function(e){e[e.error=0]="error",e[e.question=1]="question",e[e.success=2]="success"}(x||(x={}));var v=["isSuccess"];exports.CustomButton=l,exports.CustomCheckBox=function(s){var t=s.checkColor,l=s.checked,o=s.onCheck,c=s.label,a=s.children,u=n(s,i);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"uil-check-wrapper",children:[e.jsxs("label",{className:"uil-checkbox",children:[e.jsx("input",r({type:"checkbox",checked:l,onChange:function(){o(!l)}},u)),e.jsx("div",{className:"uil-checkmark",style:{backgroundColor:t}})]}),a||e.jsx("span",{children:c})]})})},exports.CustomInput=h,exports.NotifyModal=function(s){var t=s.isSuccess,l=n(s,v);return e.jsx(f,r({type:t?x.success:x.error},l))},exports.PasswordInput=function(t){var l=t.capsLockWarning,i=t.rules,c=t.ruleChecked,a=t.ruleUnchecked,u=t.setFailedRules,d=n(t,m),p=s.useState(!1),x=p[0],f=p[1];function v(e){var s;switch(e.type){case exports.PasswordRuleTypes.minLength:s="[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case exports.PasswordRuleTypes.maxLength:s="^[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,"+e.count+"}$";break;case exports.PasswordRuleTypes.letters:s="[a-zA-ZßÄäÖöÜü]{"+e.count+",}";break;case exports.PasswordRuleTypes.numbers:s="[0-9]{"+e.count+",}";break;case exports.PasswordRuleTypes.special:s="[._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case exports.PasswordRuleTypes.upper:s="[A-ZÄÖÜ]{"+e.count+",}";break;default:s=e.pattern?e.pattern:""}return""!==s&&new RegExp(s).test(t.value)}return s.useEffect(function(){var e;e=[],i.forEach(function(s){v(s)||e.push(s)}),u(e)},[t.value]),s.useEffect(function(){function e(e){f(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[]),e.jsx(e.Fragment,{children:e.jsxs("div",{children:[e.jsx(h,r({},d)),e.jsxs("div",{className:"uil-password-rules",children:[x&&e.jsx("div",{className:"uil-password-rule",children:l}),i.map(function(s,r){return e.jsxs("div",{className:"uil-password-rule",children:[e.jsx(o,{src:v(s)?c:a,height:12,width:12}),e.jsx("span",{children:s.label})]},r)})]})]})})},exports.QuestionModal=function(s){var n=r({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(s),s));return e.jsx(f,r({type:x.question},n))},exports.SVG=o,exports.useOutsideClick=u;
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/components/button/customButton.tsx","../src/components/images/svgIcon.tsx","../src/components/input/baseInput.tsx","../src/hooks/clickOutside.ts","../src/enums/passwordRuleTypes.ts","../src/components/input/customInput.tsx","../src/enums/ModalType.ts","../src/components/modal/baseModal.tsx","../src/components/checkbox/customCheckBox.tsx","../src/components/modal/notifyModal.tsx","../src/components/input/passwordInput.tsx","../src/components/modal/questionModal.tsx"],"sourcesContent":["import React, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './button.scss';\n\ninterface ICustomButton extends ComponentPropsWithoutRef<'button'> {\n label : string;\n disabled?: boolean;\n small? : boolean;\n theme? : string;\n}\n\nexport function CustomButton(props: ICustomButton) {\n const {\n disabled = false,\n label,\n small = false,\n theme,\n ...buttonProps\n } = props;\n\n function setColor(bgColor: string) {\n if (!theme || disabled) return null;\n\n const color = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;\n const uiColors = [\n parseInt(color.substring(0, 2), 16) / 255,\n parseInt(color.substring(2, 4), 16) / 255,\n parseInt(color.substring(4, 6), 16) / 255\n ];\n const c = uiColors.map(col => {\n return col <= 0.03928? (col / 12.92) : Math.pow((col + 0.055) / 1.055, 2.4);\n });\n const L = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);\n\n return L > 0.179 ? '#000000' : '#ffffff';\n }\n\n const style: CSSProperties = {\n color: setColor(theme),\n backgroundColor: disabled? null : theme,\n border: theme? 'none': null,\n }\n\n return (\n <button className={`uil-button ${disabled ? 'uil-disabled' : ''} ${small ? 'uil-small' : ''}`} style={style} disabled={disabled} {...buttonProps}>\n {label}\n </button>\n );\n}","import React, {CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon {\n src : string;\n color? : string;\n height?: number;\n width? : number;\n}\n\nexport function SVG(props: ISvgIcon) {\n const {\n src,\n color,\n height,\n width\n } = props;\n\n if (!src.includes('.svg')) {\n throw new Error('Provided src is not an svg image');\n }\n\n const style: CSSProperties = {\n fill: color,\n height: `${height}px`,\n width: `${width}px`\n }\n\n return (\n <svg aria-hidden={true} className={'uil-svg'} style={style}>\n <use href={src}/>\n </svg>\n );\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport {SVG} from 'components/images/svgIcon';\nimport './input.scss';\n\nexport interface IBaseInput extends ComponentPropsWithoutRef<'input'> {\n label : string;\n value : string;\n valueChanged: (value: string) => void;\n iconColor? : string;\n iconSrc? : string;\n inputColor? : string;\n toggle? : () => void;\n}\n\nexport function BaseInput(props: IBaseInput) {\n const {\n iconColor,\n iconSrc,\n inputColor,\n label,\n toggle,\n valueChanged,\n ...inputProps\n } = props;\n\n return (\n <label className={'uil-input-wrapper'} htmlFor={inputProps.id}>\n <input\n className={'uil-input'}\n onChange={(e) => valueChanged(e.target.value)}\n placeholder={label}\n style={{color: inputColor}}\n {...inputProps}\n />\n\n {iconSrc &&\n <div className={'uil-icon'} onClick={toggle}>\n <SVG src={iconSrc} width={24} height={24} color={iconColor}/>\n </div>\n }\n\n <span className={'uil-label'} style={{color: inputColor}}>{label}</span>\n </label>\n );\n}","import {useEffect, useRef} from 'react';\n\nexport function useOutsideClick (callback: () => void) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function handleClickOutside (event: MouseEvent | TouchEvent) {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n callback();\n }\n }\n\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('touchend', handleClickOutside);\n\n\n return () => {\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('touchend', handleClickOutside);\n };\n }, [callback]);\n\n return ref;\n}","export enum PasswordRuleTypes {\n minLength,\n maxLength,\n letters,\n numbers,\n special,\n upper\n}","import React, {useState} from 'react';\nimport {BaseInput, IBaseInput} from './baseInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {useOutsideClick} from 'hooks/clickOutside';\nimport './input.scss';\n\nexport interface ICustomInput extends IBaseInput {\n tooltipClose?: string;\n tooltipIcon? : string;\n tooltipText? : string;\n}\n\nexport function CustomInput(props: ICustomInput) {\n const {\n tooltipClose,\n tooltipIcon,\n tooltipText,\n ...inputProps\n } = props;\n\n const [tooltipVisible, setTooltipVisible] = useState(false);\n const ref = useOutsideClick(closeTooltip);\n\n function closeTooltip() {\n setTooltipVisible(false);\n }\n\n return (\n <>\n {tooltipIcon ?\n <div className={'uil-tooltip-wrapper'}>\n {tooltipVisible &&\n <div className={'uil-tooltip'} ref={ref}>\n {tooltipClose &&\n <button className={'uil-tooltip-button'} onClick={closeTooltip}>\n {tooltipClose}\n </button>\n }\n\n <span>{tooltipText}</span>\n </div>\n }\n\n <div className={'uil-tooltip-icon'} onClick={() => setTooltipVisible(!tooltipVisible)}>\n <SVG src={tooltipIcon} height={16} width={16}/>\n </div>\n\n <BaseInput {...inputProps}/>\n </div> :\n\n <BaseInput {...inputProps}/>\n }\n </>\n );\n}","export enum ModalType {\n error,\n question,\n success\n}","import React, {useEffect, useState} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button';\nimport './modal.scss';\n\ninterface IBaseModal {\n message : string | string[];\n title : string;\n type : ModalType;\n cancelLabel? : string;\n closeLabel? : string;\n confirm? : () => void;\n confirmLabel?: string;\n timeout? : number;\n}\n\nexport function BaseModal(props: IBaseModal) {\n const {\n cancelLabel = '',\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if (!timeout) return;\n\n setTimeout(() => {\n setVisible(false);\n }, timeout);\n },[]);\n\n return visible ?\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={`uil-header ${type == ModalType.success ? 'uil-success' : ''} ${type == ModalType.error ? 'uil-error' : ''}`}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(props.timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) =>\n <p key={idx} className={'uil-modal-text'}>{m}</p>\n ) : <p className={'uil-modal-text'}>{message}</p>\n }\n </div>\n\n <div className={`uil-button-wrapper ${type !== ModalType.question ? 'uil-single' : ''}`}>\n {type !== ModalType.question &&\n <CustomButton label={closeLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n }\n\n {type == ModalType.question && props.confirm &&\n <>\n <CustomButton label={confirmLabel} theme={'#00416A'} small={true} onClick={() => confirm} type={'button'}/>\n <CustomButton label={cancelLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div> : <></>;\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport './checkbox.scss';\n\ninterface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {\n checked : boolean;\n label : string;\n onCheck : (value: boolean) => void;\n checkColor? : string;\n}\n\nexport function CustomCheckBox(props: ICustomCheckbox) {\n const {\n checkColor,\n checked,\n onCheck,\n label,\n ...checkProps\n } = props;\n\n return (\n <>\n <div className={'uil-check-wrapper'}>\n <label className={'uil-checkbox'}>\n <input type={'checkbox'} checked={checked} onChange={() => {onCheck(!checked)}} {...checkProps}/>\n <div className={'uil-checkmark'} style={{backgroundColor: checkColor}}/>\n </label>\n\n <span>{label}</span>\n </div>\n </>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n closeLabel: string;\n isSuccess : boolean;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n isSuccess,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={isSuccess? ModalType.success : ModalType.error} {...modalProps}/>\n );\n}","import React, {useEffect, useState} from 'react';\nimport {CustomInput, ICustomInput} from './customInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {PasswordRuleTypes} from 'enums/passwordRuleTypes';\nimport './input.scss';\n\ninterface IPasswordInput extends ICustomInput {\n capsLockWarning: string;\n setFailedRules : (value: PasswordRule[]) => void;\n ruleChecked : string;\n rules : PasswordRule[];\n ruleUnchecked : string;\n}\n\nexport interface PasswordRule {\n count : number;\n label : string;\n type : PasswordRuleTypes | string;\n pattern?: string;\n}\n\nexport function PasswordInput(props: IPasswordInput) {\n const {\n capsLockWarning,\n rules,\n ruleChecked,\n ruleUnchecked,\n setFailedRules,\n ...inputProps\n } = props;\n\n const [capsLock, setCapsLock] = useState(false);\n\n useEffect(() => {\n validateInput();\n },[props.value]);\n\n useEffect(() => {\n function setCapsLockState(event: globalThis.KeyboardEvent) {\n setCapsLock(event.getModifierState && event.getModifierState('CapsLock'));\n }\n\n document.addEventListener('keydown', setCapsLockState);\n\n return () => {\n document.removeEventListener('keydown', setCapsLockState);\n };\n },[]);\n\n function validateInput() {\n const failedRules: PasswordRule[] = [];\n \n rules.forEach(rule => {\n if (!checkRule(rule)) {\n failedRules.push(rule);\n }\n });\n\n setFailedRules(failedRules);\n }\n\n function checkRule(rule: PasswordRule) {\n let pattern: string;\n\n switch (rule.type) {\n case PasswordRuleTypes.minLength:\n pattern = `[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.maxLength:\n pattern = `^[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{0,${rule.count}}$`;\n break;\n case PasswordRuleTypes.letters:\n pattern = `[a-zA-ZßÄäÖöÜü]{${rule.count},}`;\n break;\n case PasswordRuleTypes.numbers:\n pattern = `[0-9]{${rule.count},}`;\n break;\n case PasswordRuleTypes.special:\n pattern = `[._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.upper:\n pattern = `[A-ZÄÖÜ]{${rule.count},}`;\n break;\n default:\n rule.pattern? pattern = rule.pattern : pattern = '';\n }\n\n if (pattern === '') return false;\n\n const reg = new RegExp(pattern);\n return reg.test(props.value);\n }\n\n return (\n <>\n <div>\n <CustomInput {...inputProps}/>\n\n <div className={'uil-password-rules'}>\n {capsLock &&\n <div className={'uil-password-rule'}>{capsLockWarning}</div>\n }\n\n {rules.map((rule, idx) =>\n <div key={idx} className={'uil-password-rule'}>\n <SVG src={checkRule(rule)? ruleChecked : ruleUnchecked} height={12} width={12}/>\n\n <span>{rule.label}</span>\n </div>\n )}\n </div>\n </div>\n </>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} {...modalProps}/>\n );\n}"],"names":["CustomButton","props","_props$disabled","disabled","label","_props$small","small","theme","buttonProps","_objectWithoutPropertiesLoose","_excluded","style","color","bgColor","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","border","_jsx","jsx","_extends","className","SVG","src","height","width","includes","Error","fill","children","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","_jsxs","htmlFor","id","onChange","e","target","value","placeholder","onClick","useOutsideClick","callback","ref","useRef","useEffect","handleClickOutside","event","current","contains","document","addEventListener","removeEventListener","PasswordRuleTypes","CustomInput","tooltipClose","tooltipIcon","tooltipText","_useState","useState","tooltipVisible","setTooltipVisible","closeTooltip","_Fragment","Fragment","jsxs","ModalType","BaseModal","_props$cancelLabel","cancelLabel","closeLabel","confirm","_props$confirmLabel","confirmLabel","message","timeout","title","type","visible","setVisible","setTimeout","success","error","animationDuration","Array","isArray","m","idx","question","checkColor","checked","onCheck","checkProps","isSuccess","modalProps","capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules","capsLock","setCapsLock","checkRule","rule","pattern","minLength","count","maxLength","letters","numbers","special","upper","RegExp","test","failedRules","forEach","push","setCapsLockState","getModifierState","_objectDestructuringEmpty"],"mappings":"ocAUM,SAAUA,EAAaC,GAC3B,IAAAC,EAMID,EALFE,SAAAA,WAAQD,GAAQA,EAChBE,EAIEH,EAJFG,MAAKC,EAIHJ,EAHFK,MAAAA,OAAQ,IAAH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,wEAAAyG,CACXnI,GAAAA,IAEJ,OACEwB,EAAAC,IAACsD,EAASrD,EAAA,CAAC+D,KAAMX,EAAUsB,UAAcM,GAE7C"}
1
+ {"version":3,"file":"index.js","sources":["../src/components/button/customButton.tsx","../src/components/images/svgIcon.tsx","../src/components/input/baseInput.tsx","../src/hooks/clickOutside.ts","../src/enums/passwordRuleTypes.ts","../src/components/input/customInput.tsx","../src/enums/ModalType.ts","../src/components/modal/baseModal.tsx","../src/components/checkbox/customCheckBox.tsx","../src/components/modal/notifyModal.tsx","../src/components/input/passwordInput.tsx","../src/components/modal/questionModal.tsx"],"sourcesContent":["import React, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './button.scss';\n\ninterface ICustomButton extends ComponentPropsWithoutRef<'button'> {\n label : string;\n disabled?: boolean;\n small? : boolean;\n theme? : string;\n}\n\nexport function CustomButton(props: ICustomButton) {\n const {\n disabled = false,\n label,\n small = false,\n theme,\n ...buttonProps\n } = props;\n\n function setColor(bgColor: string) {\n if (!theme || disabled) return null;\n\n const color = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;\n const uiColors = [\n parseInt(color.substring(0, 2), 16) / 255,\n parseInt(color.substring(2, 4), 16) / 255,\n parseInt(color.substring(4, 6), 16) / 255\n ];\n const c = uiColors.map(col => {\n return col <= 0.03928? (col / 12.92) : Math.pow((col + 0.055) / 1.055, 2.4);\n });\n const L = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);\n\n return L > 0.179 ? '#000000' : '#ffffff';\n }\n\n const style: CSSProperties = {\n color: setColor(theme),\n backgroundColor: disabled? null : theme,\n border: theme? 'none': null,\n }\n\n return (\n <button className={`uil-button ${disabled ? 'uil-disabled' : ''} ${small ? 'uil-small' : ''}`} style={style} disabled={disabled} {...buttonProps}>\n {label}\n </button>\n );\n}","import React, {CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon {\n src : string;\n color? : string;\n height?: number;\n width? : number;\n}\n\nexport function SVG(props: ISvgIcon) {\n const {\n src,\n color,\n height,\n width\n } = props;\n\n if (!src.includes('.svg')) {\n throw new Error('Provided src is not an svg image');\n }\n\n const style: CSSProperties = {\n fill: color,\n height: `${height}px`,\n width: `${width}px`\n }\n\n return (\n <svg aria-hidden={true} className={'uil-svg'} style={style}>\n <use href={src}/>\n </svg>\n );\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport {SVG} from 'components/images/svgIcon';\nimport './input.scss';\n\nexport interface IBaseInput extends ComponentPropsWithoutRef<'input'> {\n label : string;\n value : string;\n valueChanged: (value: string) => void;\n iconColor? : string;\n iconSrc? : string;\n inputColor? : string;\n toggle? : () => void;\n}\n\nexport function BaseInput(props: IBaseInput) {\n const {\n iconColor,\n iconSrc,\n inputColor,\n label,\n toggle,\n valueChanged,\n ...inputProps\n } = props;\n\n return (\n <label className={'uil-input-wrapper'} htmlFor={inputProps.id}>\n <input\n className={'uil-input'}\n onChange={(e) => valueChanged(e.target.value)}\n placeholder={label}\n style={{color: inputColor}}\n {...inputProps}\n />\n\n {iconSrc &&\n <div className={'uil-icon'} onClick={toggle}>\n <SVG src={iconSrc} width={24} height={24} color={iconColor}/>\n </div>\n }\n\n <span className={'uil-label'} style={{color: inputColor}}>{label}</span>\n </label>\n );\n}","import {useEffect, useRef} from 'react';\n\nexport function useOutsideClick (callback: () => void) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function handleClickOutside (event: MouseEvent | TouchEvent) {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n callback();\n }\n }\n\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('touchend', handleClickOutside);\n\n\n return () => {\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('touchend', handleClickOutside);\n };\n }, [callback]);\n\n return ref;\n}","export enum PasswordRuleTypes {\n minLength,\n maxLength,\n letters,\n numbers,\n special,\n upper\n}","import React, {useState} from 'react';\nimport {BaseInput, IBaseInput} from './baseInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {useOutsideClick} from 'hooks/clickOutside';\nimport './input.scss';\n\nexport interface ICustomInput extends IBaseInput {\n tooltipClose?: string;\n tooltipIcon? : string;\n tooltipText? : string;\n}\n\nexport function CustomInput(props: ICustomInput) {\n const {\n tooltipClose,\n tooltipIcon,\n tooltipText,\n ...inputProps\n } = props;\n\n const [tooltipVisible, setTooltipVisible] = useState(false);\n const ref = useOutsideClick(closeTooltip);\n\n function closeTooltip() {\n setTooltipVisible(false);\n }\n\n return (\n <>\n {tooltipIcon ?\n <div className={'uil-tooltip-wrapper'}>\n {tooltipVisible &&\n <div className={'uil-tooltip'} ref={ref}>\n {tooltipClose &&\n <button className={'uil-tooltip-button'} onClick={closeTooltip}>\n {tooltipClose}\n </button>\n }\n\n <span>{tooltipText}</span>\n </div>\n }\n\n <div className={'uil-tooltip-icon'} onClick={() => setTooltipVisible(!tooltipVisible)}>\n <SVG src={tooltipIcon} height={16} width={16}/>\n </div>\n\n <BaseInput {...inputProps}/>\n </div> :\n\n <BaseInput {...inputProps}/>\n }\n </>\n );\n}","export enum ModalType {\n error,\n question,\n success\n}","import React, {useEffect, useState} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button';\nimport './modal.scss';\n\ninterface IBaseModal {\n message : string | string[];\n title : string;\n type : ModalType;\n cancelLabel? : string;\n closeLabel? : string;\n confirm? : () => void;\n confirmLabel?: string;\n timeout? : number;\n}\n\nexport function BaseModal(props: IBaseModal) {\n const {\n cancelLabel = '',\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if (!timeout) return;\n\n setTimeout(() => {\n setVisible(false);\n }, timeout);\n },[]);\n\n return visible ?\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={`uil-header ${type == ModalType.success ? 'uil-success' : ''} ${type == ModalType.error ? 'uil-error' : ''}`}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(props.timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) =>\n <p key={idx} className={'uil-modal-text'}>{m}</p>\n ) : <p className={'uil-modal-text'}>{message}</p>\n }\n </div>\n\n <div className={`uil-button-wrapper ${type !== ModalType.question ? 'uil-single' : ''}`}>\n {type !== ModalType.question &&\n <CustomButton label={closeLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n }\n\n {type == ModalType.question && props.confirm &&\n <>\n <CustomButton label={confirmLabel} theme={'#00416A'} small={true} onClick={() => confirm} type={'button'}/>\n <CustomButton label={cancelLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div> : <></>;\n}","import React, {ComponentPropsWithoutRef, ReactNode} from 'react';\nimport './checkbox.scss';\n\ninterface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {\n checked : boolean;\n label? : string;\n onCheck : (value: boolean) => void;\n checkColor? : string;\n children? : ReactNode;\n}\n\nexport function CustomCheckBox(props: ICustomCheckbox) {\n const {\n checkColor,\n checked,\n onCheck,\n label,\n children,\n ...checkProps\n } = props;\n\n return (\n <>\n <div className={'uil-check-wrapper'}>\n <label className={'uil-checkbox'}>\n <input type={'checkbox'} checked={checked} onChange={() => {onCheck(!checked)}} {...checkProps}/>\n <div className={'uil-checkmark'} style={{backgroundColor: checkColor}}/>\n </label>\n\n {children ? children : <span>{label}</span>}\n </div>\n </>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n closeLabel: string;\n isSuccess : boolean;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n isSuccess,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={isSuccess? ModalType.success : ModalType.error} {...modalProps}/>\n );\n}","import React, {useEffect, useState} from 'react';\nimport {CustomInput, ICustomInput} from './customInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {PasswordRuleTypes} from 'enums/passwordRuleTypes';\nimport './input.scss';\n\ninterface IPasswordInput extends ICustomInput {\n capsLockWarning: string;\n setFailedRules : (value: PasswordRule[]) => void;\n ruleChecked : string;\n rules : PasswordRule[];\n ruleUnchecked : string;\n}\n\nexport interface PasswordRule {\n count : number;\n label : string;\n type : PasswordRuleTypes | string;\n pattern?: string;\n}\n\nexport function PasswordInput(props: IPasswordInput) {\n const {\n capsLockWarning,\n rules,\n ruleChecked,\n ruleUnchecked,\n setFailedRules,\n ...inputProps\n } = props;\n\n const [capsLock, setCapsLock] = useState(false);\n\n useEffect(() => {\n validateInput();\n },[props.value]);\n\n useEffect(() => {\n function setCapsLockState(event: globalThis.KeyboardEvent) {\n setCapsLock(event.getModifierState && event.getModifierState('CapsLock'));\n }\n\n document.addEventListener('keydown', setCapsLockState);\n\n return () => {\n document.removeEventListener('keydown', setCapsLockState);\n };\n },[]);\n\n function validateInput() {\n const failedRules: PasswordRule[] = [];\n \n rules.forEach(rule => {\n if (!checkRule(rule)) {\n failedRules.push(rule);\n }\n });\n\n setFailedRules(failedRules);\n }\n\n function checkRule(rule: PasswordRule) {\n let pattern: string;\n\n switch (rule.type) {\n case PasswordRuleTypes.minLength:\n pattern = `[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.maxLength:\n pattern = `^[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{0,${rule.count}}$`;\n break;\n case PasswordRuleTypes.letters:\n pattern = `[a-zA-ZßÄäÖöÜü]{${rule.count},}`;\n break;\n case PasswordRuleTypes.numbers:\n pattern = `[0-9]{${rule.count},}`;\n break;\n case PasswordRuleTypes.special:\n pattern = `[._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.upper:\n pattern = `[A-ZÄÖÜ]{${rule.count},}`;\n break;\n default:\n rule.pattern? pattern = rule.pattern : pattern = '';\n }\n\n if (pattern === '') return false;\n\n const reg = new RegExp(pattern);\n return reg.test(props.value);\n }\n\n return (\n <>\n <div>\n <CustomInput {...inputProps}/>\n\n <div className={'uil-password-rules'}>\n {capsLock &&\n <div className={'uil-password-rule'}>{capsLockWarning}</div>\n }\n\n {rules.map((rule, idx) =>\n <div key={idx} className={'uil-password-rule'}>\n <SVG src={checkRule(rule)? ruleChecked : ruleUnchecked} height={12} width={12}/>\n\n <span>{rule.label}</span>\n </div>\n )}\n </div>\n </div>\n </>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} {...modalProps}/>\n );\n}"],"names":["CustomButton","props","_props$disabled","disabled","label","_props$small","small","theme","buttonProps","_objectWithoutPropertiesLoose","_excluded","style","color","bgColor","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","border","_jsx","jsx","_extends","className","SVG","src","height","width","includes","Error","fill","children","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","_jsxs","htmlFor","id","onChange","e","target","value","placeholder","onClick","useOutsideClick","callback","ref","useRef","useEffect","handleClickOutside","event","current","contains","document","addEventListener","removeEventListener","PasswordRuleTypes","CustomInput","tooltipClose","tooltipIcon","tooltipText","_useState","useState","tooltipVisible","setTooltipVisible","closeTooltip","_Fragment","Fragment","jsxs","ModalType","BaseModal","_props$cancelLabel","cancelLabel","closeLabel","confirm","_props$confirmLabel","confirmLabel","message","timeout","title","type","visible","setVisible","setTimeout","success","error","animationDuration","Array","isArray","m","idx","question","checkColor","checked","onCheck","checkProps","isSuccess","modalProps","capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules","capsLock","setCapsLock","checkRule","rule","pattern","minLength","count","maxLength","letters","numbers","special","upper","RegExp","test","failedRules","forEach","push","setCapsLockState","getModifierState","_objectDestructuringEmpty"],"mappings":"ocAUM,SAAUA,EAAaC,GAC3B,IAAAC,EAMID,EALFE,SAAAA,WAAQD,GAAQA,EAChBE,EAIEH,EAJFG,MAAKC,EAIHJ,EAHFK,MAAAA,OAAQ,IAAHD,GAAQA,EACbE,EAEEN,EAFFM,MACGC,EAAWC,EACZR,EAAKS,GAmBHC,EAAuB,CAC3BC,MAlBF,SAAkBC,GAChB,IAAKN,GAASJ,EAAU,OAAW,KAEnC,IAAMS,EAA+B,MAAtBC,EAAQC,OAAO,GAAcD,EAAQE,UAAU,EAAG,GAAKF,EAMhEG,EALW,CACfC,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,KAErBG,IAAI,SAAAC,GACrB,OAAOA,GAAO,OAAUA,EAAM,MAASC,KAAKC,KAAKF,EAAM,MAAS,MAAO,IACzE,GAGA,MAFW,MAASH,EAAE,GAAO,MAASA,EAAE,GAAO,MAASA,EAAE,GAE/C,KAAQ,UAAY,SACjC,CAGSM,CAASf,GAChBgB,gBAAiBpB,EAAU,KAAOI,EAClCiB,OAAQjB,EAAO,OAAQ,MAGzB,OACEkB,EAAQC,IAAA,SAAAC,GAAAC,UAAS,eAAgBzB,EAA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iE,EAC1C,CACF,EAAE,IA+CAzG,EAAAC,IAAAkD,EAAAC,SAAA,CAAAzC,SACES,EAAAA,KACE,MAAA,CAAAT,SAAA,CAAAX,EAAAC,IAACyC,EAAWxC,EAAKiB,GAAAA,IAEjBC,EAAAA,KAAK,MAAA,CAAAjB,UAAW,+BACbqF,GACCxF,EAAAC,IAAA,MAAA,CAAKE,UAAW,oBAAmBQ,SAAGwE,IAGvCC,EAAM3F,IAAI,SAACkG,EAAMhB,GAAG,OACnBvD,EAAeiC,KAAA,MAAA,CAAAlD,UAAW,oBACxBQ,SAAA,CAAAX,EAAAA,IAACI,EAAG,CAACC,IAAKqF,EAAUC,GAAON,EAAcC,EAAehF,OAAQ,GAAIC,MAAO,KAE3EP,EAAAA,IAAO,OAAA,CAAAW,SAAAgF,EAAKhH,UAHJgG,EAIJ,UAMlB,wBCrGM,SAAwBnG,GAC5B,IACK0G,EAAUhF,EAAA,wEAAAyG,CACXnI,GAAAA,IAEJ,OACEwB,EAAAC,IAACsD,EAASrD,EAAA,CAAC+D,KAAMX,EAAUsB,UAAcM,GAE7C"}
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{jsx as e,Fragment as n,jsxs as r}from"react/jsx-runtime";import{useRef as t,useEffect as i,useState as l}from"react";function c(){return c=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},c.apply(null,arguments)}function a(e,n){if(null==e)return{};var r={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(n.indexOf(t)>=0)continue;r[t]=e[t]}return r}var o=["disabled","label","small","theme"];function u(n){var r=n.disabled,t=void 0!==r&&r,i=n.label,l=n.small,u=void 0!==l&&l,s=n.theme,d=a(n,o),h={color:function(e){if(!s||t)return null;var n="#"===e.charAt(0)?e.substring(1,7):e,r=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179?"#000000":"#ffffff"}(s),backgroundColor:t?null:s,border:s?"none":null};return e("button",c({className:"uil-button "+(t?"uil-disabled":"")+" "+(u?"uil-small":""),style:h,disabled:t},d,{children:i}))}var s=["checkColor","checked","onCheck","label"];function d(t){var i=t.checkColor,l=t.checked,o=t.onCheck,u=t.label,d=a(t,s);return e(n,{children:r("div",{className:"uil-check-wrapper",children:[r("label",{className:"uil-checkbox",children:[e("input",c({type:"checkbox",checked:l,onChange:function(){o(!l)}},d)),e("div",{className:"uil-checkmark",style:{backgroundColor:i}})]}),e("span",{children:u})]})})}function h(n){var r=n.src,t=n.color,i=n.height,l=n.width;if(!r.includes(".svg"))throw new Error("Provided src is not an svg image");return e("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:t,height:i+"px",width:l+"px"},children:e("use",{href:r})})}var p=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function m(n){var t=n.iconColor,i=n.iconSrc,l=n.inputColor,o=n.label,u=n.toggle,s=n.valueChanged,d=a(n,p);return r("label",{className:"uil-input-wrapper",htmlFor:d.id,children:[e("input",c({className:"uil-input",onChange:function(e){return s(e.target.value)},placeholder:o,style:{color:l}},d)),i&&e("div",{className:"uil-icon",onClick:u,children:e(h,{src:i,width:24,height:24,color:t})}),e("span",{className:"uil-label",style:{color:l},children:o})]})}function f(e){var n=t(null);return i(function(){function r(r){n.current&&!n.current.contains(r.target)&&e()}return document.addEventListener("click",r),document.addEventListener("touchend",r),function(){document.removeEventListener("click",r),document.removeEventListener("touchend",r)}},[e]),n}var v,b=["tooltipClose","tooltipIcon","tooltipText"];function g(t){var i=t.tooltipClose,o=t.tooltipIcon,u=t.tooltipText,s=a(t,b),d=l(!1),p=d[0],v=d[1],g=f(k);function k(){v(!1)}return e(n,{children:o?r("div",{className:"uil-tooltip-wrapper",children:[p&&r("div",{className:"uil-tooltip",ref:g,children:[i&&e("button",{className:"uil-tooltip-button",onClick:k,children:i}),e("span",{children:u})]}),e("div",{className:"uil-tooltip-icon",onClick:function(){return v(!p)},children:e(h,{src:o,height:16,width:16})}),e(m,c({},s))]}):e(m,c({},s))})}!function(e){e[e.minLength=0]="minLength",e[e.maxLength=1]="maxLength",e[e.letters=2]="letters",e[e.numbers=3]="numbers",e[e.special=4]="special",e[e.upper=5]="upper"}(v||(v={}));var k,C=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function w(t){var o=t.capsLockWarning,u=t.rules,s=t.ruleChecked,d=t.ruleUnchecked,p=t.setFailedRules,m=a(t,C),f=l(!1),b=f[0],k=f[1];function w(e){var n;switch(e.type){case v.minLength:n="[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case v.maxLength:n="^[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,"+e.count+"}$";break;case v.letters:n="[a-zA-ZßÄäÖöÜü]{"+e.count+",}";break;case v.numbers:n="[0-9]{"+e.count+",}";break;case v.special:n="[._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case v.upper:n="[A-ZÄÖÜ]{"+e.count+",}";break;default:n=e.pattern?e.pattern:""}return""!==n&&new RegExp(n).test(t.value)}return i(function(){var e;e=[],u.forEach(function(n){w(n)||e.push(n)}),p(e)},[t.value]),i(function(){function e(e){k(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[]),e(n,{children:r("div",{children:[e(g,c({},m)),r("div",{className:"uil-password-rules",children:[b&&e("div",{className:"uil-password-rule",children:o}),u.map(function(n,t){return r("div",{className:"uil-password-rule",children:[e(h,{src:w(n)?s:d,height:12,width:12}),e("span",{children:n.label})]},t)})]})]})})}function N(t){var c=t.cancelLabel,a=void 0===c?"":c,o=t.closeLabel,s=t.confirm,d=t.confirmLabel,h=void 0===d?"":d,p=t.message,m=t.timeout,f=t.title,v=t.type,b=l(!0),g=b[0],C=b[1];return i(function(){m&&setTimeout(function(){C(!1)},m)},[]),g?e("div",{className:"uil-modal-wrapper",children:r("div",{className:"uil-modal",children:[e("div",{className:"uil-header "+(v==k.success?"uil-success":"")+" "+(v==k.error?"uil-error":""),children:f}),m&&e("div",{className:"uil-progress-wrapper",children:e("div",{className:"uil-progress-bar",style:{animationDuration:t.timeout/1e3+1+"s"}})}),r("div",{className:"uil-content",children:[e("div",{children:Array.isArray(p)?p.map(function(n,r){return e("p",{className:"uil-modal-text",children:n},r)}):e("p",{className:"uil-modal-text",children:p})}),r("div",{className:"uil-button-wrapper "+(v!==k.question?"uil-single":""),children:[v!==k.question&&e(u,{label:o,small:!0,onClick:function(){return C(!1)},type:"button"}),v==k.question&&t.confirm&&r(n,{children:[e(u,{label:h,theme:"#00416A",small:!0,onClick:function(){return s},type:"button"}),e(u,{label:a,small:!0,onClick:function(){return C(!1)},type:"button"})]})]})]})]})}):e(n,{})}!function(e){e[e.error=0]="error",e[e.question=1]="question",e[e.success=2]="success"}(k||(k={}));var y=["isSuccess"];function L(n){var r=n.isSuccess,t=a(n,y);return e(N,c({type:r?k.success:k.error},t))}function x(n){var r=c({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(n),n));return e(N,c({type:k.question},r))}export{u as CustomButton,d as CustomCheckBox,g as CustomInput,L as NotifyModal,w as PasswordInput,v as PasswordRuleTypes,x as QuestionModal,h as SVG,f as useOutsideClick};
1
+ import{jsx as e,Fragment as n,jsxs as r}from"react/jsx-runtime";import{useRef as t,useEffect as i,useState as l}from"react";function c(){return c=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},c.apply(null,arguments)}function a(e,n){if(null==e)return{};var r={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(n.indexOf(t)>=0)continue;r[t]=e[t]}return r}var o=["disabled","label","small","theme"];function u(n){var r=n.disabled,t=void 0!==r&&r,i=n.label,l=n.small,u=void 0!==l&&l,s=n.theme,d=a(n,o),h={color:function(e){if(!s||t)return null;var n="#"===e.charAt(0)?e.substring(1,7):e,r=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return.2126*r[0]+.7152*r[1]+.0722*r[2]>.179?"#000000":"#ffffff"}(s),backgroundColor:t?null:s,border:s?"none":null};return e("button",c({className:"uil-button "+(t?"uil-disabled":"")+" "+(u?"uil-small":""),style:h,disabled:t},d,{children:i}))}var s=["checkColor","checked","onCheck","label","children"];function d(t){var i=t.checkColor,l=t.checked,o=t.onCheck,u=t.label,d=t.children,h=a(t,s);return e(n,{children:r("div",{className:"uil-check-wrapper",children:[r("label",{className:"uil-checkbox",children:[e("input",c({type:"checkbox",checked:l,onChange:function(){o(!l)}},h)),e("div",{className:"uil-checkmark",style:{backgroundColor:i}})]}),d||e("span",{children:u})]})})}function h(n){var r=n.src,t=n.color,i=n.height,l=n.width;if(!r.includes(".svg"))throw new Error("Provided src is not an svg image");return e("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:t,height:i+"px",width:l+"px"},children:e("use",{href:r})})}var p=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function m(n){var t=n.iconColor,i=n.iconSrc,l=n.inputColor,o=n.label,u=n.toggle,s=n.valueChanged,d=a(n,p);return r("label",{className:"uil-input-wrapper",htmlFor:d.id,children:[e("input",c({className:"uil-input",onChange:function(e){return s(e.target.value)},placeholder:o,style:{color:l}},d)),i&&e("div",{className:"uil-icon",onClick:u,children:e(h,{src:i,width:24,height:24,color:t})}),e("span",{className:"uil-label",style:{color:l},children:o})]})}function f(e){var n=t(null);return i(function(){function r(r){n.current&&!n.current.contains(r.target)&&e()}return document.addEventListener("click",r),document.addEventListener("touchend",r),function(){document.removeEventListener("click",r),document.removeEventListener("touchend",r)}},[e]),n}var v,b=["tooltipClose","tooltipIcon","tooltipText"];function g(t){var i=t.tooltipClose,o=t.tooltipIcon,u=t.tooltipText,s=a(t,b),d=l(!1),p=d[0],v=d[1],g=f(k);function k(){v(!1)}return e(n,{children:o?r("div",{className:"uil-tooltip-wrapper",children:[p&&r("div",{className:"uil-tooltip",ref:g,children:[i&&e("button",{className:"uil-tooltip-button",onClick:k,children:i}),e("span",{children:u})]}),e("div",{className:"uil-tooltip-icon",onClick:function(){return v(!p)},children:e(h,{src:o,height:16,width:16})}),e(m,c({},s))]}):e(m,c({},s))})}!function(e){e[e.minLength=0]="minLength",e[e.maxLength=1]="maxLength",e[e.letters=2]="letters",e[e.numbers=3]="numbers",e[e.special=4]="special",e[e.upper=5]="upper"}(v||(v={}));var k,C=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function w(t){var o=t.capsLockWarning,u=t.rules,s=t.ruleChecked,d=t.ruleUnchecked,p=t.setFailedRules,m=a(t,C),f=l(!1),b=f[0],k=f[1];function w(e){var n;switch(e.type){case v.minLength:n="[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case v.maxLength:n="^[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,"+e.count+"}$";break;case v.letters:n="[a-zA-ZßÄäÖöÜü]{"+e.count+",}";break;case v.numbers:n="[0-9]{"+e.count+",}";break;case v.special:n="[._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case v.upper:n="[A-ZÄÖÜ]{"+e.count+",}";break;default:n=e.pattern?e.pattern:""}return""!==n&&new RegExp(n).test(t.value)}return i(function(){var e;e=[],u.forEach(function(n){w(n)||e.push(n)}),p(e)},[t.value]),i(function(){function e(e){k(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[]),e(n,{children:r("div",{children:[e(g,c({},m)),r("div",{className:"uil-password-rules",children:[b&&e("div",{className:"uil-password-rule",children:o}),u.map(function(n,t){return r("div",{className:"uil-password-rule",children:[e(h,{src:w(n)?s:d,height:12,width:12}),e("span",{children:n.label})]},t)})]})]})})}function N(t){var c=t.cancelLabel,a=void 0===c?"":c,o=t.closeLabel,s=t.confirm,d=t.confirmLabel,h=void 0===d?"":d,p=t.message,m=t.timeout,f=t.title,v=t.type,b=l(!0),g=b[0],C=b[1];return i(function(){m&&setTimeout(function(){C(!1)},m)},[]),g?e("div",{className:"uil-modal-wrapper",children:r("div",{className:"uil-modal",children:[e("div",{className:"uil-header "+(v==k.success?"uil-success":"")+" "+(v==k.error?"uil-error":""),children:f}),m&&e("div",{className:"uil-progress-wrapper",children:e("div",{className:"uil-progress-bar",style:{animationDuration:t.timeout/1e3+1+"s"}})}),r("div",{className:"uil-content",children:[e("div",{children:Array.isArray(p)?p.map(function(n,r){return e("p",{className:"uil-modal-text",children:n},r)}):e("p",{className:"uil-modal-text",children:p})}),r("div",{className:"uil-button-wrapper "+(v!==k.question?"uil-single":""),children:[v!==k.question&&e(u,{label:o,small:!0,onClick:function(){return C(!1)},type:"button"}),v==k.question&&t.confirm&&r(n,{children:[e(u,{label:h,theme:"#00416A",small:!0,onClick:function(){return s},type:"button"}),e(u,{label:a,small:!0,onClick:function(){return C(!1)},type:"button"})]})]})]})]})}):e(n,{})}!function(e){e[e.error=0]="error",e[e.question=1]="question",e[e.success=2]="success"}(k||(k={}));var y=["isSuccess"];function L(n){var r=n.isSuccess,t=a(n,y);return e(N,c({type:r?k.success:k.error},t))}function x(n){var r=c({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(n),n));return e(N,c({type:k.question},r))}export{u as CustomButton,d as CustomCheckBox,g as CustomInput,L as NotifyModal,w as PasswordInput,v as PasswordRuleTypes,x as QuestionModal,h as SVG,f as useOutsideClick};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/components/button/customButton.tsx","../src/components/checkbox/customCheckBox.tsx","../src/components/images/svgIcon.tsx","../src/components/input/baseInput.tsx","../src/hooks/clickOutside.ts","../src/enums/passwordRuleTypes.ts","../src/components/input/customInput.tsx","../src/enums/ModalType.ts","../src/components/input/passwordInput.tsx","../src/components/modal/baseModal.tsx","../src/components/modal/notifyModal.tsx","../src/components/modal/questionModal.tsx"],"sourcesContent":["import React, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './button.scss';\n\ninterface ICustomButton extends ComponentPropsWithoutRef<'button'> {\n label : string;\n disabled?: boolean;\n small? : boolean;\n theme? : string;\n}\n\nexport function CustomButton(props: ICustomButton) {\n const {\n disabled = false,\n label,\n small = false,\n theme,\n ...buttonProps\n } = props;\n\n function setColor(bgColor: string) {\n if (!theme || disabled) return null;\n\n const color = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;\n const uiColors = [\n parseInt(color.substring(0, 2), 16) / 255,\n parseInt(color.substring(2, 4), 16) / 255,\n parseInt(color.substring(4, 6), 16) / 255\n ];\n const c = uiColors.map(col => {\n return col <= 0.03928? (col / 12.92) : Math.pow((col + 0.055) / 1.055, 2.4);\n });\n const L = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);\n\n return L > 0.179 ? '#000000' : '#ffffff';\n }\n\n const style: CSSProperties = {\n color: setColor(theme),\n backgroundColor: disabled? null : theme,\n border: theme? 'none': null,\n }\n\n return (\n <button className={`uil-button ${disabled ? 'uil-disabled' : ''} ${small ? 'uil-small' : ''}`} style={style} disabled={disabled} {...buttonProps}>\n {label}\n </button>\n );\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport './checkbox.scss';\n\ninterface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {\n checked : boolean;\n label : string;\n onCheck : (value: boolean) => void;\n checkColor? : string;\n}\n\nexport function CustomCheckBox(props: ICustomCheckbox) {\n const {\n checkColor,\n checked,\n onCheck,\n label,\n ...checkProps\n } = props;\n\n return (\n <>\n <div className={'uil-check-wrapper'}>\n <label className={'uil-checkbox'}>\n <input type={'checkbox'} checked={checked} onChange={() => {onCheck(!checked)}} {...checkProps}/>\n <div className={'uil-checkmark'} style={{backgroundColor: checkColor}}/>\n </label>\n\n <span>{label}</span>\n </div>\n </>\n );\n}","import React, {CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon {\n src : string;\n color? : string;\n height?: number;\n width? : number;\n}\n\nexport function SVG(props: ISvgIcon) {\n const {\n src,\n color,\n height,\n width\n } = props;\n\n if (!src.includes('.svg')) {\n throw new Error('Provided src is not an svg image');\n }\n\n const style: CSSProperties = {\n fill: color,\n height: `${height}px`,\n width: `${width}px`\n }\n\n return (\n <svg aria-hidden={true} className={'uil-svg'} style={style}>\n <use href={src}/>\n </svg>\n );\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport {SVG} from 'components/images/svgIcon';\nimport './input.scss';\n\nexport interface IBaseInput extends ComponentPropsWithoutRef<'input'> {\n label : string;\n value : string;\n valueChanged: (value: string) => void;\n iconColor? : string;\n iconSrc? : string;\n inputColor? : string;\n toggle? : () => void;\n}\n\nexport function BaseInput(props: IBaseInput) {\n const {\n iconColor,\n iconSrc,\n inputColor,\n label,\n toggle,\n valueChanged,\n ...inputProps\n } = props;\n\n return (\n <label className={'uil-input-wrapper'} htmlFor={inputProps.id}>\n <input\n className={'uil-input'}\n onChange={(e) => valueChanged(e.target.value)}\n placeholder={label}\n style={{color: inputColor}}\n {...inputProps}\n />\n\n {iconSrc &&\n <div className={'uil-icon'} onClick={toggle}>\n <SVG src={iconSrc} width={24} height={24} color={iconColor}/>\n </div>\n }\n\n <span className={'uil-label'} style={{color: inputColor}}>{label}</span>\n </label>\n );\n}","import {useEffect, useRef} from 'react';\n\nexport function useOutsideClick (callback: () => void) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function handleClickOutside (event: MouseEvent | TouchEvent) {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n callback();\n }\n }\n\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('touchend', handleClickOutside);\n\n\n return () => {\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('touchend', handleClickOutside);\n };\n }, [callback]);\n\n return ref;\n}","export enum PasswordRuleTypes {\n minLength,\n maxLength,\n letters,\n numbers,\n special,\n upper\n}","import React, {useState} from 'react';\nimport {BaseInput, IBaseInput} from './baseInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {useOutsideClick} from 'hooks/clickOutside';\nimport './input.scss';\n\nexport interface ICustomInput extends IBaseInput {\n tooltipClose?: string;\n tooltipIcon? : string;\n tooltipText? : string;\n}\n\nexport function CustomInput(props: ICustomInput) {\n const {\n tooltipClose,\n tooltipIcon,\n tooltipText,\n ...inputProps\n } = props;\n\n const [tooltipVisible, setTooltipVisible] = useState(false);\n const ref = useOutsideClick(closeTooltip);\n\n function closeTooltip() {\n setTooltipVisible(false);\n }\n\n return (\n <>\n {tooltipIcon ?\n <div className={'uil-tooltip-wrapper'}>\n {tooltipVisible &&\n <div className={'uil-tooltip'} ref={ref}>\n {tooltipClose &&\n <button className={'uil-tooltip-button'} onClick={closeTooltip}>\n {tooltipClose}\n </button>\n }\n\n <span>{tooltipText}</span>\n </div>\n }\n\n <div className={'uil-tooltip-icon'} onClick={() => setTooltipVisible(!tooltipVisible)}>\n <SVG src={tooltipIcon} height={16} width={16}/>\n </div>\n\n <BaseInput {...inputProps}/>\n </div> :\n\n <BaseInput {...inputProps}/>\n }\n </>\n );\n}","export enum ModalType {\n error,\n question,\n success\n}","import React, {useEffect, useState} from 'react';\nimport {CustomInput, ICustomInput} from './customInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {PasswordRuleTypes} from 'enums/passwordRuleTypes';\nimport './input.scss';\n\ninterface IPasswordInput extends ICustomInput {\n capsLockWarning: string;\n setFailedRules : (value: PasswordRule[]) => void;\n ruleChecked : string;\n rules : PasswordRule[];\n ruleUnchecked : string;\n}\n\nexport interface PasswordRule {\n count : number;\n label : string;\n type : PasswordRuleTypes | string;\n pattern?: string;\n}\n\nexport function PasswordInput(props: IPasswordInput) {\n const {\n capsLockWarning,\n rules,\n ruleChecked,\n ruleUnchecked,\n setFailedRules,\n ...inputProps\n } = props;\n\n const [capsLock, setCapsLock] = useState(false);\n\n useEffect(() => {\n validateInput();\n },[props.value]);\n\n useEffect(() => {\n function setCapsLockState(event: globalThis.KeyboardEvent) {\n setCapsLock(event.getModifierState && event.getModifierState('CapsLock'));\n }\n\n document.addEventListener('keydown', setCapsLockState);\n\n return () => {\n document.removeEventListener('keydown', setCapsLockState);\n };\n },[]);\n\n function validateInput() {\n const failedRules: PasswordRule[] = [];\n \n rules.forEach(rule => {\n if (!checkRule(rule)) {\n failedRules.push(rule);\n }\n });\n\n setFailedRules(failedRules);\n }\n\n function checkRule(rule: PasswordRule) {\n let pattern: string;\n\n switch (rule.type) {\n case PasswordRuleTypes.minLength:\n pattern = `[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.maxLength:\n pattern = `^[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{0,${rule.count}}$`;\n break;\n case PasswordRuleTypes.letters:\n pattern = `[a-zA-ZßÄäÖöÜü]{${rule.count},}`;\n break;\n case PasswordRuleTypes.numbers:\n pattern = `[0-9]{${rule.count},}`;\n break;\n case PasswordRuleTypes.special:\n pattern = `[._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.upper:\n pattern = `[A-ZÄÖÜ]{${rule.count},}`;\n break;\n default:\n rule.pattern? pattern = rule.pattern : pattern = '';\n }\n\n if (pattern === '') return false;\n\n const reg = new RegExp(pattern);\n return reg.test(props.value);\n }\n\n return (\n <>\n <div>\n <CustomInput {...inputProps}/>\n\n <div className={'uil-password-rules'}>\n {capsLock &&\n <div className={'uil-password-rule'}>{capsLockWarning}</div>\n }\n\n {rules.map((rule, idx) =>\n <div key={idx} className={'uil-password-rule'}>\n <SVG src={checkRule(rule)? ruleChecked : ruleUnchecked} height={12} width={12}/>\n\n <span>{rule.label}</span>\n </div>\n )}\n </div>\n </div>\n </>\n );\n}","import React, {useEffect, useState} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button';\nimport './modal.scss';\n\ninterface IBaseModal {\n message : string | string[];\n title : string;\n type : ModalType;\n cancelLabel? : string;\n closeLabel? : string;\n confirm? : () => void;\n confirmLabel?: string;\n timeout? : number;\n}\n\nexport function BaseModal(props: IBaseModal) {\n const {\n cancelLabel = '',\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if (!timeout) return;\n\n setTimeout(() => {\n setVisible(false);\n }, timeout);\n },[]);\n\n return visible ?\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={`uil-header ${type == ModalType.success ? 'uil-success' : ''} ${type == ModalType.error ? 'uil-error' : ''}`}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(props.timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) =>\n <p key={idx} className={'uil-modal-text'}>{m}</p>\n ) : <p className={'uil-modal-text'}>{message}</p>\n }\n </div>\n\n <div className={`uil-button-wrapper ${type !== ModalType.question ? 'uil-single' : ''}`}>\n {type !== ModalType.question &&\n <CustomButton label={closeLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n }\n\n {type == ModalType.question && props.confirm &&\n <>\n <CustomButton label={confirmLabel} theme={'#00416A'} small={true} onClick={() => confirm} type={'button'}/>\n <CustomButton label={cancelLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div> : <></>;\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n closeLabel: string;\n isSuccess : boolean;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n isSuccess,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={isSuccess? ModalType.success : ModalType.error} {...modalProps}/>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} {...modalProps}/>\n );\n}"],"names":["CustomButton","props","_props$disabled","disabled","label","_props$small","small","theme","buttonProps","_objectWithoutPropertiesLoose","_excluded","style","color","bgColor","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","border","_jsx","_extends","className","CustomCheckBox","checkColor","checked","onCheck","checkProps","_Fragment","children","_jsxs","type","onChange","SVG","src","height","width","includes","Error","fill","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","htmlFor","id","e","target","value","placeholder","onClick","useOutsideClick","callback","ref","useRef","useEffect","handleClickOutside","event","current","contains","document","addEventListener","removeEventListener","PasswordRuleTypes","CustomInput","tooltipClose","tooltipIcon","tooltipText","_useState","useState","tooltipVisible","setTooltipVisible","closeTooltip","ModalType","PasswordInput","capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules","capsLock","setCapsLock","checkRule","rule","pattern","minLength","count","maxLength","letters","numbers","special","upper","RegExp","test","failedRules","forEach","push","setCapsLockState","getModifierState","idx","BaseModal","_props$cancelLabel","cancelLabel","closeLabel","confirm","_props$confirmLabel","confirmLabel","message","timeout","title","visible","setVisible","setTimeout","success","error","animationDuration","Array","isArray","m","question","NotifyModal","isSuccess","modalProps","QuestionModal","_objectDestructuringEmpty"],"mappings":"0gBAUM,SAAUA,EAAaC,GAC3B,IAAAC,EAMID,EALFE,SAAAA,WAAQD,GAAQA,EAChBE,EAIEH,EAJFG,MAAKC,EAIHJ,EAHFK,MAAAA,OAAQ,IAAHD,GAAQA,EACbE,EAEEN,EAFFM,MACGC,EAAWC,EACZR,EAAKS,GAmBHC,EAAuB,CAC3BC,MAlBF,SAAkBC,GAChB,IAAKN,GAASJ,EAAU,OAAW,KAEnC,IAAMS,EAA+B,MAAtBC,EAAQC,OAAO,GAAcD,EAAQE,UAAU,EAAG,GAAKF,EAMhEG,EALW,CACfC,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,KAErBG,IAAI,SAAAC,GACrB,OAAOA,GAAO,OAAUA,EAAM,MAASC,KAAKC,KAAKF,EAAM,MAAS,MAAO,IACzE,GAGA,MAFW,MAASH,EAAE,GAAO,MAASA,EAAE,GAAO,MAASA,EAAE,GAE/C,KAAQ,UAAY,SACjC,CAGSM,CAASf,GACh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A,EAAA,QAAA,GAAA,SACD,CAJD,CAAYA,IAAAA,EAIX,CAAA,wBGQe,SAAA+C,EAAYhI,GAC1B,IACEiI,EAEEjI,EAFFiI,UACGC,EAAU1H,EACXR,EAAKS,GAET,OACEe,EAACoF,EAASnF,EAACU,CAAAA,KAAM8F,EAAWhD,EAAUwC,QAAUxC,EAAUyC,OAAWQ,GAEzE,CCRM,SAAUC,EAAcnI,GAC5B,IACKkI,EAAUzG,EAAA,wEAAA2G,CACXpI,GAAAA,IAEJ,OACEwB,EAACoF,EAASnF,EAAA,CAACU,KAAM8C,EAAU8C,UAAcG,GAE7C"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/components/button/customButton.tsx","../src/components/checkbox/customCheckBox.tsx","../src/components/images/svgIcon.tsx","../src/components/input/baseInput.tsx","../src/hooks/clickOutside.ts","../src/enums/passwordRuleTypes.ts","../src/components/input/customInput.tsx","../src/enums/ModalType.ts","../src/components/input/passwordInput.tsx","../src/components/modal/baseModal.tsx","../src/components/modal/notifyModal.tsx","../src/components/modal/questionModal.tsx"],"sourcesContent":["import React, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './button.scss';\n\ninterface ICustomButton extends ComponentPropsWithoutRef<'button'> {\n label : string;\n disabled?: boolean;\n small? : boolean;\n theme? : string;\n}\n\nexport function CustomButton(props: ICustomButton) {\n const {\n disabled = false,\n label,\n small = false,\n theme,\n ...buttonProps\n } = props;\n\n function setColor(bgColor: string) {\n if (!theme || disabled) return null;\n\n const color = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;\n const uiColors = [\n parseInt(color.substring(0, 2), 16) / 255,\n parseInt(color.substring(2, 4), 16) / 255,\n parseInt(color.substring(4, 6), 16) / 255\n ];\n const c = uiColors.map(col => {\n return col <= 0.03928? (col / 12.92) : Math.pow((col + 0.055) / 1.055, 2.4);\n });\n const L = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);\n\n return L > 0.179 ? '#000000' : '#ffffff';\n }\n\n const style: CSSProperties = {\n color: setColor(theme),\n backgroundColor: disabled? null : theme,\n border: theme? 'none': null,\n }\n\n return (\n <button className={`uil-button ${disabled ? 'uil-disabled' : ''} ${small ? 'uil-small' : ''}`} style={style} disabled={disabled} {...buttonProps}>\n {label}\n </button>\n );\n}","import React, {ComponentPropsWithoutRef, ReactNode} from 'react';\nimport './checkbox.scss';\n\ninterface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {\n checked : boolean;\n label? : string;\n onCheck : (value: boolean) => void;\n checkColor? : string;\n children? : ReactNode;\n}\n\nexport function CustomCheckBox(props: ICustomCheckbox) {\n const {\n checkColor,\n checked,\n onCheck,\n label,\n children,\n ...checkProps\n } = props;\n\n return (\n <>\n <div className={'uil-check-wrapper'}>\n <label className={'uil-checkbox'}>\n <input type={'checkbox'} checked={checked} onChange={() => {onCheck(!checked)}} {...checkProps}/>\n <div className={'uil-checkmark'} style={{backgroundColor: checkColor}}/>\n </label>\n\n {children ? children : <span>{label}</span>}\n </div>\n </>\n );\n}","import React, {CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon {\n src : string;\n color? : string;\n height?: number;\n width? : number;\n}\n\nexport function SVG(props: ISvgIcon) {\n const {\n src,\n color,\n height,\n width\n } = props;\n\n if (!src.includes('.svg')) {\n throw new Error('Provided src is not an svg image');\n }\n\n const style: CSSProperties = {\n fill: color,\n height: `${height}px`,\n width: `${width}px`\n }\n\n return (\n <svg aria-hidden={true} className={'uil-svg'} style={style}>\n <use href={src}/>\n </svg>\n );\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport {SVG} from 'components/images/svgIcon';\nimport './input.scss';\n\nexport interface IBaseInput extends ComponentPropsWithoutRef<'input'> {\n label : string;\n value : string;\n valueChanged: (value: string) => void;\n iconColor? : string;\n iconSrc? : string;\n inputColor? : string;\n toggle? : () => void;\n}\n\nexport function BaseInput(props: IBaseInput) {\n const {\n iconColor,\n iconSrc,\n inputColor,\n label,\n toggle,\n valueChanged,\n ...inputProps\n } = props;\n\n return (\n <label className={'uil-input-wrapper'} htmlFor={inputProps.id}>\n <input\n className={'uil-input'}\n onChange={(e) => valueChanged(e.target.value)}\n placeholder={label}\n style={{color: inputColor}}\n {...inputProps}\n />\n\n {iconSrc &&\n <div className={'uil-icon'} onClick={toggle}>\n <SVG src={iconSrc} width={24} height={24} color={iconColor}/>\n </div>\n }\n\n <span className={'uil-label'} style={{color: inputColor}}>{label}</span>\n </label>\n );\n}","import {useEffect, useRef} from 'react';\n\nexport function useOutsideClick (callback: () => void) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function handleClickOutside (event: MouseEvent | TouchEvent) {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n callback();\n }\n }\n\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('touchend', handleClickOutside);\n\n\n return () => {\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('touchend', handleClickOutside);\n };\n }, [callback]);\n\n return ref;\n}","export enum PasswordRuleTypes {\n minLength,\n maxLength,\n letters,\n numbers,\n special,\n upper\n}","import React, {useState} from 'react';\nimport {BaseInput, IBaseInput} from './baseInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {useOutsideClick} from 'hooks/clickOutside';\nimport './input.scss';\n\nexport interface ICustomInput extends IBaseInput {\n tooltipClose?: string;\n tooltipIcon? : string;\n tooltipText? : string;\n}\n\nexport function CustomInput(props: ICustomInput) {\n const {\n tooltipClose,\n tooltipIcon,\n tooltipText,\n ...inputProps\n } = props;\n\n const [tooltipVisible, setTooltipVisible] = useState(false);\n const ref = useOutsideClick(closeTooltip);\n\n function closeTooltip() {\n setTooltipVisible(false);\n }\n\n return (\n <>\n {tooltipIcon ?\n <div className={'uil-tooltip-wrapper'}>\n {tooltipVisible &&\n <div className={'uil-tooltip'} ref={ref}>\n {tooltipClose &&\n <button className={'uil-tooltip-button'} onClick={closeTooltip}>\n {tooltipClose}\n </button>\n }\n\n <span>{tooltipText}</span>\n </div>\n }\n\n <div className={'uil-tooltip-icon'} onClick={() => setTooltipVisible(!tooltipVisible)}>\n <SVG src={tooltipIcon} height={16} width={16}/>\n </div>\n\n <BaseInput {...inputProps}/>\n </div> :\n\n <BaseInput {...inputProps}/>\n }\n </>\n );\n}","export enum ModalType {\n error,\n question,\n success\n}","import React, {useEffect, useState} from 'react';\nimport {CustomInput, ICustomInput} from './customInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {PasswordRuleTypes} from 'enums/passwordRuleTypes';\nimport './input.scss';\n\ninterface IPasswordInput extends ICustomInput {\n capsLockWarning: string;\n setFailedRules : (value: PasswordRule[]) => void;\n ruleChecked : string;\n rules : PasswordRule[];\n ruleUnchecked : string;\n}\n\nexport interface PasswordRule {\n count : number;\n label : string;\n type : PasswordRuleTypes | string;\n pattern?: string;\n}\n\nexport function PasswordInput(props: IPasswordInput) {\n const {\n capsLockWarning,\n rules,\n ruleChecked,\n ruleUnchecked,\n setFailedRules,\n ...inputProps\n } = props;\n\n const [capsLock, setCapsLock] = useState(false);\n\n useEffect(() => {\n validateInput();\n },[props.value]);\n\n useEffect(() => {\n function setCapsLockState(event: globalThis.KeyboardEvent) {\n setCapsLock(event.getModifierState && event.getModifierState('CapsLock'));\n }\n\n document.addEventListener('keydown', setCapsLockState);\n\n return () => {\n document.removeEventListener('keydown', setCapsLockState);\n };\n },[]);\n\n function validateInput() {\n const failedRules: PasswordRule[] = [];\n \n rules.forEach(rule => {\n if (!checkRule(rule)) {\n failedRules.push(rule);\n }\n });\n\n setFailedRules(failedRules);\n }\n\n function checkRule(rule: PasswordRule) {\n let pattern: string;\n\n switch (rule.type) {\n case PasswordRuleTypes.minLength:\n pattern = `[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.maxLength:\n pattern = `^[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{0,${rule.count}}$`;\n break;\n case PasswordRuleTypes.letters:\n pattern = `[a-zA-ZßÄäÖöÜü]{${rule.count},}`;\n break;\n case PasswordRuleTypes.numbers:\n pattern = `[0-9]{${rule.count},}`;\n break;\n case PasswordRuleTypes.special:\n pattern = `[._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.upper:\n pattern = `[A-ZÄÖÜ]{${rule.count},}`;\n break;\n default:\n rule.pattern? pattern = rule.pattern : pattern = '';\n }\n\n if (pattern === '') return false;\n\n const reg = new RegExp(pattern);\n return reg.test(props.value);\n }\n\n return (\n <>\n <div>\n <CustomInput {...inputProps}/>\n\n <div className={'uil-password-rules'}>\n {capsLock &&\n <div className={'uil-password-rule'}>{capsLockWarning}</div>\n }\n\n {rules.map((rule, idx) =>\n <div key={idx} className={'uil-password-rule'}>\n <SVG src={checkRule(rule)? ruleChecked : ruleUnchecked} height={12} width={12}/>\n\n <span>{rule.label}</span>\n </div>\n )}\n </div>\n </div>\n </>\n );\n}","import React, {useEffect, useState} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button';\nimport './modal.scss';\n\ninterface IBaseModal {\n message : string | string[];\n title : string;\n type : ModalType;\n cancelLabel? : string;\n closeLabel? : string;\n confirm? : () => void;\n confirmLabel?: string;\n timeout? : number;\n}\n\nexport function BaseModal(props: IBaseModal) {\n const {\n cancelLabel = '',\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if (!timeout) return;\n\n setTimeout(() => {\n setVisible(false);\n }, timeout);\n },[]);\n\n return visible ?\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={`uil-header ${type == ModalType.success ? 'uil-success' : ''} ${type == ModalType.error ? 'uil-error' : ''}`}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(props.timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) =>\n <p key={idx} className={'uil-modal-text'}>{m}</p>\n ) : <p className={'uil-modal-text'}>{message}</p>\n }\n </div>\n\n <div className={`uil-button-wrapper ${type !== ModalType.question ? 'uil-single' : ''}`}>\n {type !== ModalType.question &&\n <CustomButton label={closeLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n }\n\n {type == ModalType.question && props.confirm &&\n <>\n <CustomButton label={confirmLabel} theme={'#00416A'} small={true} onClick={() => confirm} type={'button'}/>\n <CustomButton label={cancelLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div> : <></>;\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n closeLabel: string;\n isSuccess : boolean;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n isSuccess,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={isSuccess? ModalType.success : ModalType.error} {...modalProps}/>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} {...modalProps}/>\n );\n}"],"names":["CustomButton","props","_props$disabled","disabled","label","_props$small","small","theme","buttonProps","_objectWithoutPropertiesLoose","_excluded","style","color","bgColor","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","border","_jsx","_extends","className","CustomCheckBox","checkColor","checked","onCheck","children","checkProps","_Fragment","_jsxs","type","onChange","SVG","src","height","width","includes","Error","fill","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","htmlFor","id","e","target","value","placeholder","onClick","useOutsideClick","callback","ref","useRef","useEffect","handleClickOutside","event","current","contains","document","addEventListener","removeEventListener","PasswordRuleTypes","CustomInput","tooltipClose","tooltipIcon","tooltipText","_useState","useState","tooltipVisible","setTooltipVisible","closeTooltip","ModalType","PasswordInput","capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules","capsLock","setCapsLock","checkRule","rule","pattern","minLength","count","maxLength","letters","numbers","special","upper","RegExp","test","failedRules","forEach","push","setCapsLockState","getModifierState","idx","BaseModal","_props$cancelLabel","cancelLabel","closeLabel","confirm","_props$confirmLabel","confirmLabel","message","timeout","title","visible","setVisible","setTimeout","success","error","animationDuration","Array","isArray","m","question","NotifyModal","isSuccess","modalProps","QuestionModal","_objectDestructuringEmpty"],"mappings":"0gBAUM,SAAUA,EAAaC,GAC3B,IAAAC,EAMID,EALFE,SAAAA,WAAQD,GAAQA,EAChBE,EAIEH,EAJFG,MAAKC,EAIHJ,EAHFK,MAAAA,OAAQ,IAAHD,GAAQA,EACbE,EAEEN,EAFFM,MACGC,EAAWC,EACZR,EAAKS,GAmBHC,EAAuB,CAC3BC,MAlBF,SAAkBC,GAChB,IAAKN,GAASJ,EAAU,OAAW,KAEnC,IAAMS,EAA+B,MAAtBC,EAAQC,OAAO,GAAcD,EAAQE,UAAU,EAAG,GAAKF,EAMhEG,EALW,CACfC,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,KAErBG,IAAI,SAAAC,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AAY,CAACI,MAAO2G,EAAazG,OAAO,EAAMqD,QAAS,WAAM,OAAA6D,GAAW,EAAM,EAAEpF,KAAM,yBAM1FX,OACb,EF3EA,SAAYyD,GACVA,EAAAA,EAAA,MAAA,GAAA,QACAA,EAAAA,EAAA,SAAA,GAAA,WACAA,EAAAA,EAAA,QAAA,GAAA,SACD,CAJD,CAAYA,IAAAA,EAIX,CAAA,wBGQe,SAAA+C,EAAYhI,GAC1B,IACEiI,EAEEjI,EAFFiI,UACGC,EAAU1H,EACXR,EAAKS,GAET,OACEe,EAACoF,EAASnF,EAACU,CAAAA,KAAM8F,EAAWhD,EAAUwC,QAAUxC,EAAUyC,OAAWQ,GAEzE,CCRM,SAAUC,EAAcnI,GAC5B,IACKkI,EAAUzG,EAAA,wEAAA2G,CACXpI,GAAAA,IAEJ,OACEwB,EAACoF,EAASnF,EAAA,CAACU,KAAM8C,EAAU8C,UAAcG,GAE7C"}
@@ -1,2 +1,2 @@
1
- import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import{useRef as l,useEffect as r,useState as c}from"react";function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(null,arguments)}function s(e,n){if(null==e)return{};var t={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(n.indexOf(l)>=0)continue;t[l]=e[l]}return t}const o=["disabled","label","small","theme"];function a(n){const{disabled:t=!1,label:l,small:r=!1,theme:c}=n,a=s(n,o),u={color:function(e){if(!c||t)return null;const n="#"===e.charAt(0)?e.substring(1,7):e,l=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return.2126*l[0]+.7152*l[1]+.0722*l[2]>.179?"#000000":"#ffffff"}(c),backgroundColor:t?null:c,border:c?"none":null};return e("button",i({className:`uil-button ${t?"uil-disabled":""} ${r?"uil-small":""}`,style:u,disabled:t},a,{children:l}))}const u=["checkColor","checked","onCheck","label"];function d(l){const{checkColor:r,checked:c,onCheck:o,label:a}=l,d=s(l,u);return e(n,{children:t("div",{className:"uil-check-wrapper",children:[t("label",{className:"uil-checkbox",children:[e("input",i({type:"checkbox",checked:c,onChange:()=>{o(!c)}},d)),e("div",{className:"uil-checkmark",style:{backgroundColor:r}})]}),e("span",{children:a})]})})}function h(n){const{src:t,color:l,height:r,width:c}=n;if(!t.includes(".svg"))throw new Error("Provided src is not an svg image");return e("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:l,height:`${r}px`,width:`${c}px`},children:e("use",{href:t})})}const p=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function m(n){const{iconColor:l,iconSrc:r,inputColor:c,label:o,toggle:a,valueChanged:u}=n,d=s(n,p);return t("label",{className:"uil-input-wrapper",htmlFor:d.id,children:[e("input",i({className:"uil-input",onChange:e=>u(e.target.value),placeholder:o,style:{color:c}},d)),r&&e("div",{className:"uil-icon",onClick:a,children:e(h,{src:r,width:24,height:24,color:l})}),e("span",{className:"uil-label",style:{color:c},children:o})]})}function b(e){const n=l(null);return r(()=>{function t(t){n.current&&!n.current.contains(t.target)&&e()}return document.addEventListener("click",t),document.addEventListener("touchend",t),()=>{document.removeEventListener("click",t),document.removeEventListener("touchend",t)}},[e]),n}const f=["tooltipClose","tooltipIcon","tooltipText"];function g(l){const{tooltipClose:r,tooltipIcon:o,tooltipText:a}=l,u=s(l,f),[d,p]=c(!1),g=b(v);function v(){p(!1)}return e(n,{children:o?t("div",{className:"uil-tooltip-wrapper",children:[d&&t("div",{className:"uil-tooltip",ref:g,children:[r&&e("button",{className:"uil-tooltip-button",onClick:v,children:r}),e("span",{children:a})]}),e("div",{className:"uil-tooltip-icon",onClick:()=>p(!d),children:e(h,{src:o,height:16,width:16})}),e(m,i({},u))]}):e(m,i({},u))})}var v;!function(e){e[e.minLength=0]="minLength",e[e.maxLength=1]="maxLength",e[e.letters=2]="letters",e[e.numbers=3]="numbers",e[e.special=4]="special",e[e.upper=5]="upper"}(v||(v={}));const k=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function C(l){const{capsLockWarning:o,rules:a,ruleChecked:u,ruleUnchecked:d,setFailedRules:p}=l,m=s(l,k),[b,f]=c(!1);function C(e){let n;switch(e.type){case v.minLength:n=`[a-zA-Z0-9ßÄäÖöÜü._!"\`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{${e.count},}`;break;case v.maxLength:n=`^[a-zA-Z0-9ßÄäÖöÜü._!"\`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,${e.count}}$`;break;case v.letters:n=`[a-zA-ZßÄäÖöÜü]{${e.count},}`;break;case v.numbers:n=`[0-9]{${e.count},}`;break;case v.special:n=`[._!"\`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{${e.count},}`;break;case v.upper:n=`[A-ZÄÖÜ]{${e.count},}`;break;default:n=e.pattern?e.pattern:""}return""!==n&&new RegExp(n).test(l.value)}return r(()=>{!function(){const e=[];a.forEach(n=>{C(n)||e.push(n)}),p(e)}()},[l.value]),r(()=>{function e(e){f(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[]),e(n,{children:t("div",{children:[e(g,i({},m)),t("div",{className:"uil-password-rules",children:[b&&e("div",{className:"uil-password-rule",children:o}),a.map((n,l)=>t("div",{className:"uil-password-rule",children:[e(h,{src:C(n)?u:d,height:12,width:12}),e("span",{children:n.label})]},l))]})]})})}var w;function N(l){const{cancelLabel:i="",closeLabel:s,confirm:o,confirmLabel:u="",message:d,timeout:h,title:p,type:m}=l,[b,f]=c(!0);return r(()=>{h&&setTimeout(()=>{f(!1)},h)},[]),b?e("div",{className:"uil-modal-wrapper",children:t("div",{className:"uil-modal",children:[e("div",{className:`uil-header ${m==w.success?"uil-success":""} ${m==w.error?"uil-error":""}`,children:p}),h&&e("div",{className:"uil-progress-wrapper",children:e("div",{className:"uil-progress-bar",style:{animationDuration:l.timeout/1e3+1+"s"}})}),t("div",{className:"uil-content",children:[e("div",{children:Array.isArray(d)?d.map((n,t)=>e("p",{className:"uil-modal-text",children:n},t)):e("p",{className:"uil-modal-text",children:d})}),t("div",{className:"uil-button-wrapper "+(m!==w.question?"uil-single":""),children:[m!==w.question&&e(a,{label:s,small:!0,onClick:()=>f(!1),type:"button"}),m==w.question&&l.confirm&&t(n,{children:[e(a,{label:u,theme:"#00416A",small:!0,onClick:()=>o,type:"button"}),e(a,{label:i,small:!0,onClick:()=>f(!1),type:"button"})]})]})]})]})}):e(n,{})}!function(e){e[e.error=0]="error",e[e.question=1]="question",e[e.success=2]="success"}(w||(w={}));const y=["isSuccess"];function L(n){const{isSuccess:t}=n,l=s(n,y);return e(N,i({type:t?w.success:w.error},l))}function $(n){const t=i({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(n),n));return e(N,i({type:w.question},t))}export{a as CustomButton,d as CustomCheckBox,g as CustomInput,L as NotifyModal,C as PasswordInput,v as PasswordRuleTypes,$ as QuestionModal,h as SVG,b as useOutsideClick};
1
+ import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import{useRef as l,useEffect as r,useState as c}from"react";function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(null,arguments)}function s(e,n){if(null==e)return{};var t={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(n.indexOf(l)>=0)continue;t[l]=e[l]}return t}const o=["disabled","label","small","theme"];function a(n){const{disabled:t=!1,label:l,small:r=!1,theme:c}=n,a=s(n,o),u={color:function(e){if(!c||t)return null;const n="#"===e.charAt(0)?e.substring(1,7):e,l=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return.2126*l[0]+.7152*l[1]+.0722*l[2]>.179?"#000000":"#ffffff"}(c),backgroundColor:t?null:c,border:c?"none":null};return e("button",i({className:`uil-button ${t?"uil-disabled":""} ${r?"uil-small":""}`,style:u,disabled:t},a,{children:l}))}const u=["checkColor","checked","onCheck","label","children"];function d(l){const{checkColor:r,checked:c,onCheck:o,label:a,children:d}=l,h=s(l,u);return e(n,{children:t("div",{className:"uil-check-wrapper",children:[t("label",{className:"uil-checkbox",children:[e("input",i({type:"checkbox",checked:c,onChange:()=>{o(!c)}},h)),e("div",{className:"uil-checkmark",style:{backgroundColor:r}})]}),d||e("span",{children:a})]})})}function h(n){const{src:t,color:l,height:r,width:c}=n;if(!t.includes(".svg"))throw new Error("Provided src is not an svg image");return e("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:l,height:`${r}px`,width:`${c}px`},children:e("use",{href:t})})}const p=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function m(n){const{iconColor:l,iconSrc:r,inputColor:c,label:o,toggle:a,valueChanged:u}=n,d=s(n,p);return t("label",{className:"uil-input-wrapper",htmlFor:d.id,children:[e("input",i({className:"uil-input",onChange:e=>u(e.target.value),placeholder:o,style:{color:c}},d)),r&&e("div",{className:"uil-icon",onClick:a,children:e(h,{src:r,width:24,height:24,color:l})}),e("span",{className:"uil-label",style:{color:c},children:o})]})}function b(e){const n=l(null);return r(()=>{function t(t){n.current&&!n.current.contains(t.target)&&e()}return document.addEventListener("click",t),document.addEventListener("touchend",t),()=>{document.removeEventListener("click",t),document.removeEventListener("touchend",t)}},[e]),n}const f=["tooltipClose","tooltipIcon","tooltipText"];function g(l){const{tooltipClose:r,tooltipIcon:o,tooltipText:a}=l,u=s(l,f),[d,p]=c(!1),g=b(v);function v(){p(!1)}return e(n,{children:o?t("div",{className:"uil-tooltip-wrapper",children:[d&&t("div",{className:"uil-tooltip",ref:g,children:[r&&e("button",{className:"uil-tooltip-button",onClick:v,children:r}),e("span",{children:a})]}),e("div",{className:"uil-tooltip-icon",onClick:()=>p(!d),children:e(h,{src:o,height:16,width:16})}),e(m,i({},u))]}):e(m,i({},u))})}var v;!function(e){e[e.minLength=0]="minLength",e[e.maxLength=1]="maxLength",e[e.letters=2]="letters",e[e.numbers=3]="numbers",e[e.special=4]="special",e[e.upper=5]="upper"}(v||(v={}));const k=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function C(l){const{capsLockWarning:o,rules:a,ruleChecked:u,ruleUnchecked:d,setFailedRules:p}=l,m=s(l,k),[b,f]=c(!1);function C(e){let n;switch(e.type){case v.minLength:n=`[a-zA-Z0-9ßÄäÖöÜü._!"\`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{${e.count},}`;break;case v.maxLength:n=`^[a-zA-Z0-9ßÄäÖöÜü._!"\`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,${e.count}}$`;break;case v.letters:n=`[a-zA-ZßÄäÖöÜü]{${e.count},}`;break;case v.numbers:n=`[0-9]{${e.count},}`;break;case v.special:n=`[._!"\`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{${e.count},}`;break;case v.upper:n=`[A-ZÄÖÜ]{${e.count},}`;break;default:n=e.pattern?e.pattern:""}return""!==n&&new RegExp(n).test(l.value)}return r(()=>{!function(){const e=[];a.forEach(n=>{C(n)||e.push(n)}),p(e)}()},[l.value]),r(()=>{function e(e){f(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[]),e(n,{children:t("div",{children:[e(g,i({},m)),t("div",{className:"uil-password-rules",children:[b&&e("div",{className:"uil-password-rule",children:o}),a.map((n,l)=>t("div",{className:"uil-password-rule",children:[e(h,{src:C(n)?u:d,height:12,width:12}),e("span",{children:n.label})]},l))]})]})})}var w;function N(l){const{cancelLabel:i="",closeLabel:s,confirm:o,confirmLabel:u="",message:d,timeout:h,title:p,type:m}=l,[b,f]=c(!0);return r(()=>{h&&setTimeout(()=>{f(!1)},h)},[]),b?e("div",{className:"uil-modal-wrapper",children:t("div",{className:"uil-modal",children:[e("div",{className:`uil-header ${m==w.success?"uil-success":""} ${m==w.error?"uil-error":""}`,children:p}),h&&e("div",{className:"uil-progress-wrapper",children:e("div",{className:"uil-progress-bar",style:{animationDuration:l.timeout/1e3+1+"s"}})}),t("div",{className:"uil-content",children:[e("div",{children:Array.isArray(d)?d.map((n,t)=>e("p",{className:"uil-modal-text",children:n},t)):e("p",{className:"uil-modal-text",children:d})}),t("div",{className:"uil-button-wrapper "+(m!==w.question?"uil-single":""),children:[m!==w.question&&e(a,{label:s,small:!0,onClick:()=>f(!1),type:"button"}),m==w.question&&l.confirm&&t(n,{children:[e(a,{label:u,theme:"#00416A",small:!0,onClick:()=>o,type:"button"}),e(a,{label:i,small:!0,onClick:()=>f(!1),type:"button"})]})]})]})]})}):e(n,{})}!function(e){e[e.error=0]="error",e[e.question=1]="question",e[e.success=2]="success"}(w||(w={}));const y=["isSuccess"];function L(n){const{isSuccess:t}=n,l=s(n,y);return e(N,i({type:t?w.success:w.error},l))}function $(n){const t=i({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(n),n));return e(N,i({type:w.question},t))}export{a as CustomButton,d as CustomCheckBox,g as CustomInput,L as NotifyModal,C as PasswordInput,v as PasswordRuleTypes,$ as QuestionModal,h as SVG,b as useOutsideClick};
2
2
  //# sourceMappingURL=index.modern.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.modern.mjs","sources":["../src/components/button/customButton.tsx","../src/components/checkbox/customCheckBox.tsx","../src/components/images/svgIcon.tsx","../src/components/input/baseInput.tsx","../src/hooks/clickOutside.ts","../src/components/input/customInput.tsx","../src/enums/passwordRuleTypes.ts","../src/components/input/passwordInput.tsx","../src/enums/ModalType.ts","../src/components/modal/baseModal.tsx","../src/components/modal/notifyModal.tsx","../src/components/modal/questionModal.tsx"],"sourcesContent":["import React, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './button.scss';\n\ninterface ICustomButton extends ComponentPropsWithoutRef<'button'> {\n label : string;\n disabled?: boolean;\n small? : boolean;\n theme? : string;\n}\n\nexport function CustomButton(props: ICustomButton) {\n const {\n disabled = false,\n label,\n small = false,\n theme,\n ...buttonProps\n } = props;\n\n function setColor(bgColor: string) {\n if (!theme || disabled) return null;\n\n const color = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;\n const uiColors = [\n parseInt(color.substring(0, 2), 16) / 255,\n parseInt(color.substring(2, 4), 16) / 255,\n parseInt(color.substring(4, 6), 16) / 255\n ];\n const c = uiColors.map(col => {\n return col <= 0.03928? (col / 12.92) : Math.pow((col + 0.055) / 1.055, 2.4);\n });\n const L = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);\n\n return L > 0.179 ? '#000000' : '#ffffff';\n }\n\n const style: CSSProperties = {\n color: setColor(theme),\n backgroundColor: disabled? null : theme,\n border: theme? 'none': null,\n }\n\n return (\n <button className={`uil-button ${disabled ? 'uil-disabled' : ''} ${small ? 'uil-small' : ''}`} style={style} disabled={disabled} {...buttonProps}>\n {label}\n </button>\n );\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport './checkbox.scss';\n\ninterface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {\n checked : boolean;\n label : string;\n onCheck : (value: boolean) => void;\n checkColor? : string;\n}\n\nexport function CustomCheckBox(props: ICustomCheckbox) {\n const {\n checkColor,\n checked,\n onCheck,\n label,\n ...checkProps\n } = props;\n\n return (\n <>\n <div className={'uil-check-wrapper'}>\n <label className={'uil-checkbox'}>\n <input type={'checkbox'} checked={checked} onChange={() => {onCheck(!checked)}} {...checkProps}/>\n <div className={'uil-checkmark'} style={{backgroundColor: checkColor}}/>\n </label>\n\n <span>{label}</span>\n </div>\n </>\n );\n}","import React, {CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon {\n src : string;\n color? : string;\n height?: number;\n width? : number;\n}\n\nexport function SVG(props: ISvgIcon) {\n const {\n src,\n color,\n height,\n width\n } = props;\n\n if (!src.includes('.svg')) {\n throw new Error('Provided src is not an svg image');\n }\n\n const style: CSSProperties = {\n fill: color,\n height: `${height}px`,\n width: `${width}px`\n }\n\n return (\n <svg aria-hidden={true} className={'uil-svg'} style={style}>\n <use href={src}/>\n </svg>\n );\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport {SVG} from 'components/images/svgIcon';\nimport './input.scss';\n\nexport interface IBaseInput extends ComponentPropsWithoutRef<'input'> {\n label : string;\n value : string;\n valueChanged: (value: string) => void;\n iconColor? : string;\n iconSrc? : string;\n inputColor? : string;\n toggle? : () => void;\n}\n\nexport function BaseInput(props: IBaseInput) {\n const {\n iconColor,\n iconSrc,\n inputColor,\n label,\n toggle,\n valueChanged,\n ...inputProps\n } = props;\n\n return (\n <label className={'uil-input-wrapper'} htmlFor={inputProps.id}>\n <input\n className={'uil-input'}\n onChange={(e) => valueChanged(e.target.value)}\n placeholder={label}\n style={{color: inputColor}}\n {...inputProps}\n />\n\n {iconSrc &&\n <div className={'uil-icon'} onClick={toggle}>\n <SVG src={iconSrc} width={24} height={24} color={iconColor}/>\n </div>\n }\n\n <span className={'uil-label'} style={{color: inputColor}}>{label}</span>\n </label>\n );\n}","import {useEffect, useRef} from 'react';\n\nexport function useOutsideClick (callback: () => void) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function handleClickOutside (event: MouseEvent | TouchEvent) {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n callback();\n }\n }\n\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('touchend', handleClickOutside);\n\n\n return () => {\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('touchend', handleClickOutside);\n };\n }, [callback]);\n\n return ref;\n}","import React, {useState} from 'react';\nimport {BaseInput, IBaseInput} from './baseInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {useOutsideClick} from 'hooks/clickOutside';\nimport './input.scss';\n\nexport interface ICustomInput extends IBaseInput {\n tooltipClose?: string;\n tooltipIcon? : string;\n tooltipText? : string;\n}\n\nexport function CustomInput(props: ICustomInput) {\n const {\n tooltipClose,\n tooltipIcon,\n tooltipText,\n ...inputProps\n } = props;\n\n const [tooltipVisible, setTooltipVisible] = useState(false);\n const ref = useOutsideClick(closeTooltip);\n\n function closeTooltip() {\n setTooltipVisible(false);\n }\n\n return (\n <>\n {tooltipIcon ?\n <div className={'uil-tooltip-wrapper'}>\n {tooltipVisible &&\n <div className={'uil-tooltip'} ref={ref}>\n {tooltipClose &&\n <button className={'uil-tooltip-button'} onClick={closeTooltip}>\n {tooltipClose}\n </button>\n }\n\n <span>{tooltipText}</span>\n </div>\n }\n\n <div className={'uil-tooltip-icon'} onClick={() => setTooltipVisible(!tooltipVisible)}>\n <SVG src={tooltipIcon} height={16} width={16}/>\n </div>\n\n <BaseInput {...inputProps}/>\n </div> :\n\n <BaseInput {...inputProps}/>\n }\n </>\n );\n}","export enum PasswordRuleTypes {\n minLength,\n maxLength,\n letters,\n numbers,\n special,\n upper\n}","import React, {useEffect, useState} from 'react';\nimport {CustomInput, ICustomInput} from './customInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {PasswordRuleTypes} from 'enums/passwordRuleTypes';\nimport './input.scss';\n\ninterface IPasswordInput extends ICustomInput {\n capsLockWarning: string;\n setFailedRules : (value: PasswordRule[]) => void;\n ruleChecked : string;\n rules : PasswordRule[];\n ruleUnchecked : string;\n}\n\nexport interface PasswordRule {\n count : number;\n label : string;\n type : PasswordRuleTypes | string;\n pattern?: string;\n}\n\nexport function PasswordInput(props: IPasswordInput) {\n const {\n capsLockWarning,\n rules,\n ruleChecked,\n ruleUnchecked,\n setFailedRules,\n ...inputProps\n } = props;\n\n const [capsLock, setCapsLock] = useState(false);\n\n useEffect(() => {\n validateInput();\n },[props.value]);\n\n useEffect(() => {\n function setCapsLockState(event: globalThis.KeyboardEvent) {\n setCapsLock(event.getModifierState && event.getModifierState('CapsLock'));\n }\n\n document.addEventListener('keydown', setCapsLockState);\n\n return () => {\n document.removeEventListener('keydown', setCapsLockState);\n };\n },[]);\n\n function validateInput() {\n const failedRules: PasswordRule[] = [];\n \n rules.forEach(rule => {\n if (!checkRule(rule)) {\n failedRules.push(rule);\n }\n });\n\n setFailedRules(failedRules);\n }\n\n function checkRule(rule: PasswordRule) {\n let pattern: string;\n\n switch (rule.type) {\n case PasswordRuleTypes.minLength:\n pattern = `[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.maxLength:\n pattern = `^[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{0,${rule.count}}$`;\n break;\n case PasswordRuleTypes.letters:\n pattern = `[a-zA-ZßÄäÖöÜü]{${rule.count},}`;\n break;\n case PasswordRuleTypes.numbers:\n pattern = `[0-9]{${rule.count},}`;\n break;\n case PasswordRuleTypes.special:\n pattern = `[._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.upper:\n pattern = `[A-ZÄÖÜ]{${rule.count},}`;\n break;\n default:\n rule.pattern? pattern = rule.pattern : pattern = '';\n }\n\n if (pattern === '') return false;\n\n const reg = new RegExp(pattern);\n return reg.test(props.value);\n }\n\n return (\n <>\n <div>\n <CustomInput {...inputProps}/>\n\n <div className={'uil-password-rules'}>\n {capsLock &&\n <div className={'uil-password-rule'}>{capsLockWarning}</div>\n }\n\n {rules.map((rule, idx) =>\n <div key={idx} className={'uil-password-rule'}>\n <SVG src={checkRule(rule)? ruleChecked : ruleUnchecked} height={12} width={12}/>\n\n <span>{rule.label}</span>\n </div>\n )}\n </div>\n </div>\n </>\n );\n}","export enum ModalType {\n error,\n question,\n success\n}","import React, {useEffect, useState} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button';\nimport './modal.scss';\n\ninterface IBaseModal {\n message : string | string[];\n title : string;\n type : ModalType;\n cancelLabel? : string;\n closeLabel? : string;\n confirm? : () => void;\n confirmLabel?: string;\n timeout? : number;\n}\n\nexport function BaseModal(props: IBaseModal) {\n const {\n cancelLabel = '',\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if (!timeout) return;\n\n setTimeout(() => {\n setVisible(false);\n }, timeout);\n },[]);\n\n return visible ?\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={`uil-header ${type == ModalType.success ? 'uil-success' : ''} ${type == ModalType.error ? 'uil-error' : ''}`}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(props.timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) =>\n <p key={idx} className={'uil-modal-text'}>{m}</p>\n ) : <p className={'uil-modal-text'}>{message}</p>\n }\n </div>\n\n <div className={`uil-button-wrapper ${type !== ModalType.question ? 'uil-single' : ''}`}>\n {type !== ModalType.question &&\n <CustomButton label={closeLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n }\n\n {type == ModalType.question && props.confirm &&\n <>\n <CustomButton label={confirmLabel} theme={'#00416A'} small={true} onClick={() => confirm} type={'button'}/>\n <CustomButton label={cancelLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div> : <></>;\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n closeLabel: string;\n isSuccess : boolean;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n isSuccess,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={isSuccess? ModalType.success : ModalType.error} {...modalProps}/>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} {...modalProps}/>\n );\n}"],"names":["CustomButton","props","disabled","label","small","theme","buttonProps","_objectWithoutPropertiesLoose","_excluded","style","color","bgColor","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","border","_jsx","_extends","className","CustomCheckBox","checkColor","checked","onCheck","checkProps","_Fragment","children","_jsxs","type","onChange","SVG","src","height","width","includes","Error","fill","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","htmlFor","id","e","target","value","placeholder","onClick","useOutsideClick","callback","ref","useRef","useEffect","handleClickOutside","event","current","contains","document","addEventListener","removeEventListener","CustomInput","tooltipClose","tooltipIcon","tooltipText","tooltipVisible","setTooltipVisible","useState","closeTooltip","PasswordRuleTypes","PasswordInput","capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules","capsLock","setCapsLock","checkRule","rule","pattern","minLength","count","maxLength","letters","numbers","special","upper","RegExp","test","failedRules","forEach","push","validateInput","setCapsLockState","getModifierState","idx","ModalType","BaseModal","cancelLabel","closeLabel","confirm","confirmLabel","message","timeout","title","visible","setVisible","setTimeout","success","error","animationDuration","Array","isArray","m","question","NotifyModal","isSuccess","modalProps","QuestionModal","_objectDestructuringEmpty"],"mappings":"4gBAUM,SAAUA,EAAaC,GAC3B,MAAMC,SACJA,GAAW,EAAKC,MAChBA,EAAKC,MACLA,GAAQ,EAAKC,MACbA,GAEEJ,EADCK,EAAWC,EACZN,EAAKO,GAmBHC,EAAuB,CAC3BC,MAlBF,SAAkBC,GAChB,IAAKN,GAASH,EAAU,OAAW,KAEnC,MAAMQ,EAA+B,MAAtBC,EAAQC,OAAO,GAAcD,EAAQE,UAAU,EAAG,GAAKF,EAMhEG,EALW,CACfC,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,KAErBG,IAAIC,GACdA,GAAO,OAAUA,EAAM,MAASC,KAAKC,KAAKF,EAAM,MAAS,MAAO,MAIzE,MAFW,MAASH,EAAE,GAAO,MAASA,EAAE,GAAO,MAASA,EAAE,GAE/C,KAAQ,UAAY,SACjC,CAGSM,CAASf,GAChBgB,gBAAiBnB,EAAU,KAAOG,EAClCiB,OAAQjB,EAAO,OAAQ,MAGzB,OACEkB,EAAQ,SAAAC,EAAAC,CAAAA,UAAW,cAAcvB,EAAW,eAAiB,MAAME,EAAQ,YAAc,KAAMK,MAAOA,EAAOP,SAAUA,GAAcI,YAClIH,IAGP,oDCrCgB,SAAAuB,EAAezB,GAC7B,MAAM0B,WACJA,EAAUC,QACVA,EAAOC,QACPA,EAAO1B,MACPA,GAEEF,EADC6B,EAAUvB,EACXN,EAAKO,GAET,OACEe,EACEQ,EAAA,CAAAC,SAAAC,EAAA,MAAA,CAAKR,UAAW,oBAAmBO,SAAA,CACjCC,EAAO,QAAA,CAAAR,UAAW,eAChBO,SAAA,CAAAT,EAAA,QAAAC,EAAA,CAAOU,KAA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,KAAM,WAChGX,EAACvB,EAAY,CAACG,MAAOyG,EAAaxG,OAAO,EAAMqD,QAASA,IAAM2D,GAAW,GAAQlF,KAAM,yBAM1FX,OACb,ED3EA,SAAYmF,GACVA,EAAAA,EAAA,MAAA,GAAA,QACAA,EAAAA,EAAA,SAAA,GAAA,WACAA,EAAAA,EAAA,QAAA,GAAA,SACD,CAJD,CAAYA,IAAAA,EAIX,CAAA,0BEQe,SAAAmB,EAAY5H,GAC1B,MAAM6H,UACJA,GAEE7H,EADC8H,EAAUxH,EACXN,EAAKO,GAET,OACEe,EAACoF,EAASnF,EAACU,CAAAA,KAAM4F,EAAWpB,EAAUY,QAAUZ,EAAUa,OAAWQ,GAEzE,CCRM,SAAUC,EAAc/H,GAC5B,MACK8H,EAAUvG,EAAA,wEAAAyG,CACXhI,GAAAA,IAEJ,OACEsB,EAACoF,EAASnF,EAAA,CAACU,KAAMwE,EAAUkB,UAAcG,GAE7C"}
1
+ {"version":3,"file":"index.modern.mjs","sources":["../src/components/button/customButton.tsx","../src/components/checkbox/customCheckBox.tsx","../src/components/images/svgIcon.tsx","../src/components/input/baseInput.tsx","../src/hooks/clickOutside.ts","../src/components/input/customInput.tsx","../src/enums/passwordRuleTypes.ts","../src/components/input/passwordInput.tsx","../src/enums/ModalType.ts","../src/components/modal/baseModal.tsx","../src/components/modal/notifyModal.tsx","../src/components/modal/questionModal.tsx"],"sourcesContent":["import React, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './button.scss';\n\ninterface ICustomButton extends ComponentPropsWithoutRef<'button'> {\n label : string;\n disabled?: boolean;\n small? : boolean;\n theme? : string;\n}\n\nexport function CustomButton(props: ICustomButton) {\n const {\n disabled = false,\n label,\n small = false,\n theme,\n ...buttonProps\n } = props;\n\n function setColor(bgColor: string) {\n if (!theme || disabled) return null;\n\n const color = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;\n const uiColors = [\n parseInt(color.substring(0, 2), 16) / 255,\n parseInt(color.substring(2, 4), 16) / 255,\n parseInt(color.substring(4, 6), 16) / 255\n ];\n const c = uiColors.map(col => {\n return col <= 0.03928? (col / 12.92) : Math.pow((col + 0.055) / 1.055, 2.4);\n });\n const L = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);\n\n return L > 0.179 ? '#000000' : '#ffffff';\n }\n\n const style: CSSProperties = {\n color: setColor(theme),\n backgroundColor: disabled? null : theme,\n border: theme? 'none': null,\n }\n\n return (\n <button className={`uil-button ${disabled ? 'uil-disabled' : ''} ${small ? 'uil-small' : ''}`} style={style} disabled={disabled} {...buttonProps}>\n {label}\n </button>\n );\n}","import React, {ComponentPropsWithoutRef, ReactNode} from 'react';\nimport './checkbox.scss';\n\ninterface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {\n checked : boolean;\n label? : string;\n onCheck : (value: boolean) => void;\n checkColor? : string;\n children? : ReactNode;\n}\n\nexport function CustomCheckBox(props: ICustomCheckbox) {\n const {\n checkColor,\n checked,\n onCheck,\n label,\n children,\n ...checkProps\n } = props;\n\n return (\n <>\n <div className={'uil-check-wrapper'}>\n <label className={'uil-checkbox'}>\n <input type={'checkbox'} checked={checked} onChange={() => {onCheck(!checked)}} {...checkProps}/>\n <div className={'uil-checkmark'} style={{backgroundColor: checkColor}}/>\n </label>\n\n {children ? children : <span>{label}</span>}\n </div>\n </>\n );\n}","import React, {CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon {\n src : string;\n color? : string;\n height?: number;\n width? : number;\n}\n\nexport function SVG(props: ISvgIcon) {\n const {\n src,\n color,\n height,\n width\n } = props;\n\n if (!src.includes('.svg')) {\n throw new Error('Provided src is not an svg image');\n }\n\n const style: CSSProperties = {\n fill: color,\n height: `${height}px`,\n width: `${width}px`\n }\n\n return (\n <svg aria-hidden={true} className={'uil-svg'} style={style}>\n <use href={src}/>\n </svg>\n );\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport {SVG} from 'components/images/svgIcon';\nimport './input.scss';\n\nexport interface IBaseInput extends ComponentPropsWithoutRef<'input'> {\n label : string;\n value : string;\n valueChanged: (value: string) => void;\n iconColor? : string;\n iconSrc? : string;\n inputColor? : string;\n toggle? : () => void;\n}\n\nexport function BaseInput(props: IBaseInput) {\n const {\n iconColor,\n iconSrc,\n inputColor,\n label,\n toggle,\n valueChanged,\n ...inputProps\n } = props;\n\n return (\n <label className={'uil-input-wrapper'} htmlFor={inputProps.id}>\n <input\n className={'uil-input'}\n onChange={(e) => valueChanged(e.target.value)}\n placeholder={label}\n style={{color: inputColor}}\n {...inputProps}\n />\n\n {iconSrc &&\n <div className={'uil-icon'} onClick={toggle}>\n <SVG src={iconSrc} width={24} height={24} color={iconColor}/>\n </div>\n }\n\n <span className={'uil-label'} style={{color: inputColor}}>{label}</span>\n </label>\n );\n}","import {useEffect, useRef} from 'react';\n\nexport function useOutsideClick (callback: () => void) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function handleClickOutside (event: MouseEvent | TouchEvent) {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n callback();\n }\n }\n\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('touchend', handleClickOutside);\n\n\n return () => {\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('touchend', handleClickOutside);\n };\n }, [callback]);\n\n return ref;\n}","import React, {useState} from 'react';\nimport {BaseInput, IBaseInput} from './baseInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {useOutsideClick} from 'hooks/clickOutside';\nimport './input.scss';\n\nexport interface ICustomInput extends IBaseInput {\n tooltipClose?: string;\n tooltipIcon? : string;\n tooltipText? : string;\n}\n\nexport function CustomInput(props: ICustomInput) {\n const {\n tooltipClose,\n tooltipIcon,\n tooltipText,\n ...inputProps\n } = props;\n\n const [tooltipVisible, setTooltipVisible] = useState(false);\n const ref = useOutsideClick(closeTooltip);\n\n function closeTooltip() {\n setTooltipVisible(false);\n }\n\n return (\n <>\n {tooltipIcon ?\n <div className={'uil-tooltip-wrapper'}>\n {tooltipVisible &&\n <div className={'uil-tooltip'} ref={ref}>\n {tooltipClose &&\n <button className={'uil-tooltip-button'} onClick={closeTooltip}>\n {tooltipClose}\n </button>\n }\n\n <span>{tooltipText}</span>\n </div>\n }\n\n <div className={'uil-tooltip-icon'} onClick={() => setTooltipVisible(!tooltipVisible)}>\n <SVG src={tooltipIcon} height={16} width={16}/>\n </div>\n\n <BaseInput {...inputProps}/>\n </div> :\n\n <BaseInput {...inputProps}/>\n }\n </>\n );\n}","export enum PasswordRuleTypes {\n minLength,\n maxLength,\n letters,\n numbers,\n special,\n upper\n}","import React, {useEffect, useState} from 'react';\nimport {CustomInput, ICustomInput} from './customInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {PasswordRuleTypes} from 'enums/passwordRuleTypes';\nimport './input.scss';\n\ninterface IPasswordInput extends ICustomInput {\n capsLockWarning: string;\n setFailedRules : (value: PasswordRule[]) => void;\n ruleChecked : string;\n rules : PasswordRule[];\n ruleUnchecked : string;\n}\n\nexport interface PasswordRule {\n count : number;\n label : string;\n type : PasswordRuleTypes | string;\n pattern?: string;\n}\n\nexport function PasswordInput(props: IPasswordInput) {\n const {\n capsLockWarning,\n rules,\n ruleChecked,\n ruleUnchecked,\n setFailedRules,\n ...inputProps\n } = props;\n\n const [capsLock, setCapsLock] = useState(false);\n\n useEffect(() => {\n validateInput();\n },[props.value]);\n\n useEffect(() => {\n function setCapsLockState(event: globalThis.KeyboardEvent) {\n setCapsLock(event.getModifierState && event.getModifierState('CapsLock'));\n }\n\n document.addEventListener('keydown', setCapsLockState);\n\n return () => {\n document.removeEventListener('keydown', setCapsLockState);\n };\n },[]);\n\n function validateInput() {\n const failedRules: PasswordRule[] = [];\n \n rules.forEach(rule => {\n if (!checkRule(rule)) {\n failedRules.push(rule);\n }\n });\n\n setFailedRules(failedRules);\n }\n\n function checkRule(rule: PasswordRule) {\n let pattern: string;\n\n switch (rule.type) {\n case PasswordRuleTypes.minLength:\n pattern = `[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.maxLength:\n pattern = `^[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{0,${rule.count}}$`;\n break;\n case PasswordRuleTypes.letters:\n pattern = `[a-zA-ZßÄäÖöÜü]{${rule.count},}`;\n break;\n case PasswordRuleTypes.numbers:\n pattern = `[0-9]{${rule.count},}`;\n break;\n case PasswordRuleTypes.special:\n pattern = `[._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.upper:\n pattern = `[A-ZÄÖÜ]{${rule.count},}`;\n break;\n default:\n rule.pattern? pattern = rule.pattern : pattern = '';\n }\n\n if (pattern === '') return false;\n\n const reg = new RegExp(pattern);\n return reg.test(props.value);\n }\n\n return (\n <>\n <div>\n <CustomInput {...inputProps}/>\n\n <div className={'uil-password-rules'}>\n {capsLock &&\n <div className={'uil-password-rule'}>{capsLockWarning}</div>\n }\n\n {rules.map((rule, idx) =>\n <div key={idx} className={'uil-password-rule'}>\n <SVG src={checkRule(rule)? ruleChecked : ruleUnchecked} height={12} width={12}/>\n\n <span>{rule.label}</span>\n </div>\n )}\n </div>\n </div>\n </>\n );\n}","export enum ModalType {\n error,\n question,\n success\n}","import React, {useEffect, useState} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button';\nimport './modal.scss';\n\ninterface IBaseModal {\n message : string | string[];\n title : string;\n type : ModalType;\n cancelLabel? : string;\n closeLabel? : string;\n confirm? : () => void;\n confirmLabel?: string;\n timeout? : number;\n}\n\nexport function BaseModal(props: IBaseModal) {\n const {\n cancelLabel = '',\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if (!timeout) return;\n\n setTimeout(() => {\n setVisible(false);\n }, timeout);\n },[]);\n\n return visible ?\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={`uil-header ${type == ModalType.success ? 'uil-success' : ''} ${type == ModalType.error ? 'uil-error' : ''}`}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(props.timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) =>\n <p key={idx} className={'uil-modal-text'}>{m}</p>\n ) : <p className={'uil-modal-text'}>{message}</p>\n }\n </div>\n\n <div className={`uil-button-wrapper ${type !== ModalType.question ? 'uil-single' : ''}`}>\n {type !== ModalType.question &&\n <CustomButton label={closeLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n }\n\n {type == ModalType.question && props.confirm &&\n <>\n <CustomButton label={confirmLabel} theme={'#00416A'} small={true} onClick={() => confirm} type={'button'}/>\n <CustomButton label={cancelLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div> : <></>;\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n closeLabel: string;\n isSuccess : boolean;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n isSuccess,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={isSuccess? ModalType.success : ModalType.error} {...modalProps}/>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} {...modalProps}/>\n );\n}"],"names":["CustomButton","props","disabled","label","small","theme","buttonProps","_objectWithoutPropertiesLoose","_excluded","style","color","bgColor","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","border","_jsx","_extends","className","CustomCheckBox","checkColor","checked","onCheck","children","checkProps","_Fragment","_jsxs","type","onChange","SVG","src","height","width","includes","Error","fill","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","htmlFor","id","e","target","value","placeholder","onClick","useOutsideClick","callback","ref","useRef","useEffect","handleClickOutside","event","current","contains","document","addEventListener","removeEventListener","CustomInput","tooltipClose","tooltipIcon","tooltipText","tooltipVisible","setTooltipVisible","useState","closeTooltip","PasswordRuleTypes","PasswordInput","capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules","capsLock","setCapsLock","checkRule","rule","pattern","minLength","count","maxLength","letters","numbers","special","upper","RegExp","test","failedRules","forEach","push","validateInput","setCapsLockState","getModifierState","idx","ModalType","BaseModal","cancelLabel","closeLabel","confirm","confirmLabel","message","timeout","title","visible","setVisible","setTimeout","success","error","animationDuration","Array","isArray","m","question","NotifyModal","isSuccess","modalProps","QuestionModal","_objectDestructuringEmpty"],"mappings":"4gBAUM,SAAUA,EAAaC,GAC3B,MAAMC,SACJA,GAAW,EAAKC,MAChBA,EAAKC,MACLA,GAAQ,EAAKC,MACbA,GAEEJ,EADCK,EAAWC,EACZN,EAAKO,GAmBHC,EAAuB,CAC3BC,MAlBF,SAAkBC,GAChB,IAAKN,GAASH,EAAU,OAAW,KAEnC,MAAMQ,EAA+B,MAAtBC,EAAQC,OAAO,GAAcD,EAAQE,UAAU,EAAG,GAAKF,EAMhEG,EALW,CACfC,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,I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K8H,EAAUvG,EAAA,wEAAAyG,CACXhI,GAAAA,IAEJ,OACEsB,EAACoF,EAASnF,EAAA,CAACU,KAAMwE,EAAUkB,UAAcG,GAE7C"}
package/dist/index.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react/jsx-runtime"),require("react")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","react"],n):n((e||self).uiLibrary={},e.jsxRuntime,e.react)}(this,function(e,n,s){function t(){return t=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var t in s)({}).hasOwnProperty.call(s,t)&&(e[t]=s[t])}return e},t.apply(null,arguments)}function r(e,n){if(null==e)return{};var s={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(n.indexOf(t)>=0)continue;s[t]=e[t]}return s}var i=["disabled","label","small","theme"];function l(e){var s=e.disabled,l=void 0!==s&&s,c=e.label,o=e.small,a=void 0!==o&&o,u=e.theme,d=r(e,i),p={color:function(e){if(!u||l)return null;var n="#"===e.charAt(0)?e.substring(1,7):e,s=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return.2126*s[0]+.7152*s[1]+.0722*s[2]>.179?"#000000":"#ffffff"}(u),backgroundColor:l?null:u,border:u?"none":null};return n.jsx("button",t({className:"uil-button "+(l?"uil-disabled":"")+" "+(a?"uil-small":""),style:p,disabled:l},d,{children:c}))}var c=["checkColor","checked","onCheck","label"];function o(e){var s=e.src,t=e.color,r=e.height,i=e.width;if(!s.includes(".svg"))throw new Error("Provided src is not an svg image");return n.jsx("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:t,height:r+"px",width:i+"px"},children:n.jsx("use",{href:s})})}var a=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function u(e){var s=e.iconColor,i=e.iconSrc,l=e.inputColor,c=e.label,u=e.toggle,d=e.valueChanged,p=r(e,a);return n.jsxs("label",{className:"uil-input-wrapper",htmlFor:p.id,children:[n.jsx("input",t({className:"uil-input",onChange:function(e){return d(e.target.value)},placeholder:c,style:{color:l}},p)),i&&n.jsx("div",{className:"uil-icon",onClick:u,children:n.jsx(o,{src:i,width:24,height:24,color:s})}),n.jsx("span",{className:"uil-label",style:{color:l},children:c})]})}function d(e){var n=s.useRef(null);return s.useEffect(function(){function s(s){n.current&&!n.current.contains(s.target)&&e()}return document.addEventListener("click",s),document.addEventListener("touchend",s),function(){document.removeEventListener("click",s),document.removeEventListener("touchend",s)}},[e]),n}var p,h=["tooltipClose","tooltipIcon","tooltipText"];function f(e){var i=e.tooltipClose,l=e.tooltipIcon,c=e.tooltipText,a=r(e,h),p=s.useState(!1),f=p[0],m=p[1],x=d(v);function v(){m(!1)}return n.jsx(n.Fragment,{children:l?n.jsxs("div",{className:"uil-tooltip-wrapper",children:[f&&n.jsxs("div",{className:"uil-tooltip",ref:x,children:[i&&n.jsx("button",{className:"uil-tooltip-button",onClick:v,children:i}),n.jsx("span",{children:c})]}),n.jsx("div",{className:"uil-tooltip-icon",onClick:function(){return m(!f)},children:n.jsx(o,{src:l,height:16,width:16})}),n.jsx(u,t({},a))]}):n.jsx(u,t({},a))})}e.PasswordRuleTypes=void 0,(p=e.PasswordRuleTypes||(e.PasswordRuleTypes={}))[p.minLength=0]="minLength",p[p.maxLength=1]="maxLength",p[p.letters=2]="letters",p[p.numbers=3]="numbers",p[p.special=4]="special",p[p.upper=5]="upper";var m,x=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function v(e){var t=e.cancelLabel,r=void 0===t?"":t,i=e.closeLabel,c=e.confirm,o=e.confirmLabel,a=void 0===o?"":o,u=e.message,d=e.timeout,p=e.title,h=e.type,f=s.useState(!0),x=f[0],v=f[1];return s.useEffect(function(){d&&setTimeout(function(){v(!1)},d)},[]),x?n.jsx("div",{className:"uil-modal-wrapper",children:n.jsxs("div",{className:"uil-modal",children:[n.jsx("div",{className:"uil-header "+(h==m.success?"uil-success":"")+" "+(h==m.error?"uil-error":""),children:p}),d&&n.jsx("div",{className:"uil-progress-wrapper",children:n.jsx("div",{className:"uil-progress-bar",style:{animationDuration:e.timeout/1e3+1+"s"}})}),n.jsxs("div",{className:"uil-content",children:[n.jsx("div",{children:Array.isArray(u)?u.map(function(e,s){return n.jsx("p",{className:"uil-modal-text",children:e},s)}):n.jsx("p",{className:"uil-modal-text",children:u})}),n.jsxs("div",{className:"uil-button-wrapper "+(h!==m.question?"uil-single":""),children:[h!==m.question&&n.jsx(l,{label:i,small:!0,onClick:function(){return v(!1)},type:"button"}),h==m.question&&e.confirm&&n.jsxs(n.Fragment,{children:[n.jsx(l,{label:a,theme:"#00416A",small:!0,onClick:function(){return c},type:"button"}),n.jsx(l,{label:r,small:!0,onClick:function(){return v(!1)},type:"button"})]})]})]})]})}):n.jsx(n.Fragment,{})}!function(e){e[e.error=0]="error",e[e.question=1]="question",e[e.success=2]="success"}(m||(m={}));var b=["isSuccess"];e.CustomButton=l,e.CustomCheckBox=function(e){var s=e.checkColor,i=e.checked,l=e.onCheck,o=e.label,a=r(e,c);return n.jsx(n.Fragment,{children:n.jsxs("div",{className:"uil-check-wrapper",children:[n.jsxs("label",{className:"uil-checkbox",children:[n.jsx("input",t({type:"checkbox",checked:i,onChange:function(){l(!i)}},a)),n.jsx("div",{className:"uil-checkmark",style:{backgroundColor:s}})]}),n.jsx("span",{children:o})]})})},e.CustomInput=f,e.NotifyModal=function(e){var s=e.isSuccess,i=r(e,b);return n.jsx(v,t({type:s?m.success:m.error},i))},e.PasswordInput=function(i){var l=i.capsLockWarning,c=i.rules,a=i.ruleChecked,u=i.ruleUnchecked,d=i.setFailedRules,p=r(i,x),h=s.useState(!1),m=h[0],v=h[1];function b(n){var s;switch(n.type){case e.PasswordRuleTypes.minLength:s="[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+n.count+",}";break;case e.PasswordRuleTypes.maxLength:s="^[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,"+n.count+"}$";break;case e.PasswordRuleTypes.letters:s="[a-zA-ZßÄäÖöÜü]{"+n.count+",}";break;case e.PasswordRuleTypes.numbers:s="[0-9]{"+n.count+",}";break;case e.PasswordRuleTypes.special:s="[._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+n.count+",}";break;case e.PasswordRuleTypes.upper:s="[A-ZÄÖÜ]{"+n.count+",}";break;default:s=n.pattern?n.pattern:""}return""!==s&&new RegExp(s).test(i.value)}return s.useEffect(function(){var e;e=[],c.forEach(function(n){b(n)||e.push(n)}),d(e)},[i.value]),s.useEffect(function(){function e(e){v(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[]),n.jsx(n.Fragment,{children:n.jsxs("div",{children:[n.jsx(f,t({},p)),n.jsxs("div",{className:"uil-password-rules",children:[m&&n.jsx("div",{className:"uil-password-rule",children:l}),c.map(function(e,s){return n.jsxs("div",{className:"uil-password-rule",children:[n.jsx(o,{src:b(e)?a:u,height:12,width:12}),n.jsx("span",{children:e.label})]},s)})]})]})})},e.QuestionModal=function(e){var s=t({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return n.jsx(v,t({type:m.question},s))},e.SVG=o,e.useOutsideClick=d});
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react/jsx-runtime"),require("react")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","react"],n):n((e||self).uiLibrary={},e.jsxRuntime,e.react)}(this,function(e,n,s){function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},r.apply(null,arguments)}function t(e,n){if(null==e)return{};var s={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(n.indexOf(r)>=0)continue;s[r]=e[r]}return s}var i=["disabled","label","small","theme"];function l(e){var s=e.disabled,l=void 0!==s&&s,c=e.label,o=e.small,a=void 0!==o&&o,u=e.theme,d=t(e,i),h={color:function(e){if(!u||l)return null;var n="#"===e.charAt(0)?e.substring(1,7):e,s=[parseInt(n.substring(0,2),16)/255,parseInt(n.substring(2,4),16)/255,parseInt(n.substring(4,6),16)/255].map(function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return.2126*s[0]+.7152*s[1]+.0722*s[2]>.179?"#000000":"#ffffff"}(u),backgroundColor:l?null:u,border:u?"none":null};return n.jsx("button",r({className:"uil-button "+(l?"uil-disabled":"")+" "+(a?"uil-small":""),style:h,disabled:l},d,{children:c}))}var c=["checkColor","checked","onCheck","label","children"];function o(e){var s=e.src,r=e.color,t=e.height,i=e.width;if(!s.includes(".svg"))throw new Error("Provided src is not an svg image");return n.jsx("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:r,height:t+"px",width:i+"px"},children:n.jsx("use",{href:s})})}var a=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function u(e){var s=e.iconColor,i=e.iconSrc,l=e.inputColor,c=e.label,u=e.toggle,d=e.valueChanged,h=t(e,a);return n.jsxs("label",{className:"uil-input-wrapper",htmlFor:h.id,children:[n.jsx("input",r({className:"uil-input",onChange:function(e){return d(e.target.value)},placeholder:c,style:{color:l}},h)),i&&n.jsx("div",{className:"uil-icon",onClick:u,children:n.jsx(o,{src:i,width:24,height:24,color:s})}),n.jsx("span",{className:"uil-label",style:{color:l},children:c})]})}function d(e){var n=s.useRef(null);return s.useEffect(function(){function s(s){n.current&&!n.current.contains(s.target)&&e()}return document.addEventListener("click",s),document.addEventListener("touchend",s),function(){document.removeEventListener("click",s),document.removeEventListener("touchend",s)}},[e]),n}var h,p=["tooltipClose","tooltipIcon","tooltipText"];function f(e){var i=e.tooltipClose,l=e.tooltipIcon,c=e.tooltipText,a=t(e,p),h=s.useState(!1),f=h[0],m=h[1],x=d(v);function v(){m(!1)}return n.jsx(n.Fragment,{children:l?n.jsxs("div",{className:"uil-tooltip-wrapper",children:[f&&n.jsxs("div",{className:"uil-tooltip",ref:x,children:[i&&n.jsx("button",{className:"uil-tooltip-button",onClick:v,children:i}),n.jsx("span",{children:c})]}),n.jsx("div",{className:"uil-tooltip-icon",onClick:function(){return m(!f)},children:n.jsx(o,{src:l,height:16,width:16})}),n.jsx(u,r({},a))]}):n.jsx(u,r({},a))})}e.PasswordRuleTypes=void 0,(h=e.PasswordRuleTypes||(e.PasswordRuleTypes={}))[h.minLength=0]="minLength",h[h.maxLength=1]="maxLength",h[h.letters=2]="letters",h[h.numbers=3]="numbers",h[h.special=4]="special",h[h.upper=5]="upper";var m,x=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function v(e){var r=e.cancelLabel,t=void 0===r?"":r,i=e.closeLabel,c=e.confirm,o=e.confirmLabel,a=void 0===o?"":o,u=e.message,d=e.timeout,h=e.title,p=e.type,f=s.useState(!0),x=f[0],v=f[1];return s.useEffect(function(){d&&setTimeout(function(){v(!1)},d)},[]),x?n.jsx("div",{className:"uil-modal-wrapper",children:n.jsxs("div",{className:"uil-modal",children:[n.jsx("div",{className:"uil-header "+(p==m.success?"uil-success":"")+" "+(p==m.error?"uil-error":""),children:h}),d&&n.jsx("div",{className:"uil-progress-wrapper",children:n.jsx("div",{className:"uil-progress-bar",style:{animationDuration:e.timeout/1e3+1+"s"}})}),n.jsxs("div",{className:"uil-content",children:[n.jsx("div",{children:Array.isArray(u)?u.map(function(e,s){return n.jsx("p",{className:"uil-modal-text",children:e},s)}):n.jsx("p",{className:"uil-modal-text",children:u})}),n.jsxs("div",{className:"uil-button-wrapper "+(p!==m.question?"uil-single":""),children:[p!==m.question&&n.jsx(l,{label:i,small:!0,onClick:function(){return v(!1)},type:"button"}),p==m.question&&e.confirm&&n.jsxs(n.Fragment,{children:[n.jsx(l,{label:a,theme:"#00416A",small:!0,onClick:function(){return c},type:"button"}),n.jsx(l,{label:t,small:!0,onClick:function(){return v(!1)},type:"button"})]})]})]})]})}):n.jsx(n.Fragment,{})}!function(e){e[e.error=0]="error",e[e.question=1]="question",e[e.success=2]="success"}(m||(m={}));var b=["isSuccess"];e.CustomButton=l,e.CustomCheckBox=function(e){var s=e.checkColor,i=e.checked,l=e.onCheck,o=e.label,a=e.children,u=t(e,c);return n.jsx(n.Fragment,{children:n.jsxs("div",{className:"uil-check-wrapper",children:[n.jsxs("label",{className:"uil-checkbox",children:[n.jsx("input",r({type:"checkbox",checked:i,onChange:function(){l(!i)}},u)),n.jsx("div",{className:"uil-checkmark",style:{backgroundColor:s}})]}),a||n.jsx("span",{children:o})]})})},e.CustomInput=f,e.NotifyModal=function(e){var s=e.isSuccess,i=t(e,b);return n.jsx(v,r({type:s?m.success:m.error},i))},e.PasswordInput=function(i){var l=i.capsLockWarning,c=i.rules,a=i.ruleChecked,u=i.ruleUnchecked,d=i.setFailedRules,h=t(i,x),p=s.useState(!1),m=p[0],v=p[1];function b(n){var s;switch(n.type){case e.PasswordRuleTypes.minLength:s="[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+n.count+",}";break;case e.PasswordRuleTypes.maxLength:s="^[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,"+n.count+"}$";break;case e.PasswordRuleTypes.letters:s="[a-zA-ZßÄäÖöÜü]{"+n.count+",}";break;case e.PasswordRuleTypes.numbers:s="[0-9]{"+n.count+",}";break;case e.PasswordRuleTypes.special:s="[._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+n.count+",}";break;case e.PasswordRuleTypes.upper:s="[A-ZÄÖÜ]{"+n.count+",}";break;default:s=n.pattern?n.pattern:""}return""!==s&&new RegExp(s).test(i.value)}return s.useEffect(function(){var e;e=[],c.forEach(function(n){b(n)||e.push(n)}),d(e)},[i.value]),s.useEffect(function(){function e(e){v(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[]),n.jsx(n.Fragment,{children:n.jsxs("div",{children:[n.jsx(f,r({},h)),n.jsxs("div",{className:"uil-password-rules",children:[m&&n.jsx("div",{className:"uil-password-rule",children:l}),c.map(function(e,s){return n.jsxs("div",{className:"uil-password-rule",children:[n.jsx(o,{src:b(e)?a:u,height:12,width:12}),n.jsx("span",{children:e.label})]},s)})]})]})})},e.QuestionModal=function(e){var s=r({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return n.jsx(v,r({type:m.question},s))},e.SVG=o,e.useOutsideClick=d});
2
2
  //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/components/button/customButton.tsx","../src/components/images/svgIcon.tsx","../src/components/input/baseInput.tsx","../src/hooks/clickOutside.ts","../src/enums/passwordRuleTypes.ts","../src/components/input/customInput.tsx","../src/enums/ModalType.ts","../src/components/modal/baseModal.tsx","../src/components/checkbox/customCheckBox.tsx","../src/components/modal/notifyModal.tsx","../src/components/input/passwordInput.tsx","../src/components/modal/questionModal.tsx"],"sourcesContent":["import React, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './button.scss';\n\ninterface ICustomButton extends ComponentPropsWithoutRef<'button'> {\n label : string;\n disabled?: boolean;\n small? : boolean;\n theme? : string;\n}\n\nexport function CustomButton(props: ICustomButton) {\n const {\n disabled = false,\n label,\n small = false,\n theme,\n ...buttonProps\n } = props;\n\n function setColor(bgColor: string) {\n if (!theme || disabled) return null;\n\n const color = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;\n const uiColors = [\n parseInt(color.substring(0, 2), 16) / 255,\n parseInt(color.substring(2, 4), 16) / 255,\n parseInt(color.substring(4, 6), 16) / 255\n ];\n const c = uiColors.map(col => {\n return col <= 0.03928? (col / 12.92) : Math.pow((col + 0.055) / 1.055, 2.4);\n });\n const L = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);\n\n return L > 0.179 ? '#000000' : '#ffffff';\n }\n\n const style: CSSProperties = {\n color: setColor(theme),\n backgroundColor: disabled? null : theme,\n border: theme? 'none': null,\n }\n\n return (\n <button className={`uil-button ${disabled ? 'uil-disabled' : ''} ${small ? 'uil-small' : ''}`} style={style} disabled={disabled} {...buttonProps}>\n {label}\n </button>\n );\n}","import React, {CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon {\n src : string;\n color? : string;\n height?: number;\n width? : number;\n}\n\nexport function SVG(props: ISvgIcon) {\n const {\n src,\n color,\n height,\n width\n } = props;\n\n if (!src.includes('.svg')) {\n throw new Error('Provided src is not an svg image');\n }\n\n const style: CSSProperties = {\n fill: color,\n height: `${height}px`,\n width: `${width}px`\n }\n\n return (\n <svg aria-hidden={true} className={'uil-svg'} style={style}>\n <use href={src}/>\n </svg>\n );\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport {SVG} from 'components/images/svgIcon';\nimport './input.scss';\n\nexport interface IBaseInput extends ComponentPropsWithoutRef<'input'> {\n label : string;\n value : string;\n valueChanged: (value: string) => void;\n iconColor? : string;\n iconSrc? : string;\n inputColor? : string;\n toggle? : () => void;\n}\n\nexport function BaseInput(props: IBaseInput) {\n const {\n iconColor,\n iconSrc,\n inputColor,\n label,\n toggle,\n valueChanged,\n ...inputProps\n } = props;\n\n return (\n <label className={'uil-input-wrapper'} htmlFor={inputProps.id}>\n <input\n className={'uil-input'}\n onChange={(e) => valueChanged(e.target.value)}\n placeholder={label}\n style={{color: inputColor}}\n {...inputProps}\n />\n\n {iconSrc &&\n <div className={'uil-icon'} onClick={toggle}>\n <SVG src={iconSrc} width={24} height={24} color={iconColor}/>\n </div>\n }\n\n <span className={'uil-label'} style={{color: inputColor}}>{label}</span>\n </label>\n );\n}","import {useEffect, useRef} from 'react';\n\nexport function useOutsideClick (callback: () => void) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function handleClickOutside (event: MouseEvent | TouchEvent) {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n callback();\n }\n }\n\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('touchend', handleClickOutside);\n\n\n return () => {\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('touchend', handleClickOutside);\n };\n }, [callback]);\n\n return ref;\n}","export enum PasswordRuleTypes {\n minLength,\n maxLength,\n letters,\n numbers,\n special,\n upper\n}","import React, {useState} from 'react';\nimport {BaseInput, IBaseInput} from './baseInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {useOutsideClick} from 'hooks/clickOutside';\nimport './input.scss';\n\nexport interface ICustomInput extends IBaseInput {\n tooltipClose?: string;\n tooltipIcon? : string;\n tooltipText? : string;\n}\n\nexport function CustomInput(props: ICustomInput) {\n const {\n tooltipClose,\n tooltipIcon,\n tooltipText,\n ...inputProps\n } = props;\n\n const [tooltipVisible, setTooltipVisible] = useState(false);\n const ref = useOutsideClick(closeTooltip);\n\n function closeTooltip() {\n setTooltipVisible(false);\n }\n\n return (\n <>\n {tooltipIcon ?\n <div className={'uil-tooltip-wrapper'}>\n {tooltipVisible &&\n <div className={'uil-tooltip'} ref={ref}>\n {tooltipClose &&\n <button className={'uil-tooltip-button'} onClick={closeTooltip}>\n {tooltipClose}\n </button>\n }\n\n <span>{tooltipText}</span>\n </div>\n }\n\n <div className={'uil-tooltip-icon'} onClick={() => setTooltipVisible(!tooltipVisible)}>\n <SVG src={tooltipIcon} height={16} width={16}/>\n </div>\n\n <BaseInput {...inputProps}/>\n </div> :\n\n <BaseInput {...inputProps}/>\n }\n </>\n );\n}","export enum ModalType {\n error,\n question,\n success\n}","import React, {useEffect, useState} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button';\nimport './modal.scss';\n\ninterface IBaseModal {\n message : string | string[];\n title : string;\n type : ModalType;\n cancelLabel? : string;\n closeLabel? : string;\n confirm? : () => void;\n confirmLabel?: string;\n timeout? : number;\n}\n\nexport function BaseModal(props: IBaseModal) {\n const {\n cancelLabel = '',\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if (!timeout) return;\n\n setTimeout(() => {\n setVisible(false);\n }, timeout);\n },[]);\n\n return visible ?\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={`uil-header ${type == ModalType.success ? 'uil-success' : ''} ${type == ModalType.error ? 'uil-error' : ''}`}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(props.timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) =>\n <p key={idx} className={'uil-modal-text'}>{m}</p>\n ) : <p className={'uil-modal-text'}>{message}</p>\n }\n </div>\n\n <div className={`uil-button-wrapper ${type !== ModalType.question ? 'uil-single' : ''}`}>\n {type !== ModalType.question &&\n <CustomButton label={closeLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n }\n\n {type == ModalType.question && props.confirm &&\n <>\n <CustomButton label={confirmLabel} theme={'#00416A'} small={true} onClick={() => confirm} type={'button'}/>\n <CustomButton label={cancelLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div> : <></>;\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport './checkbox.scss';\n\ninterface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {\n checked : boolean;\n label : string;\n onCheck : (value: boolean) => void;\n checkColor? : string;\n}\n\nexport function CustomCheckBox(props: ICustomCheckbox) {\n const {\n checkColor,\n checked,\n onCheck,\n label,\n ...checkProps\n } = props;\n\n return (\n <>\n <div className={'uil-check-wrapper'}>\n <label className={'uil-checkbox'}>\n <input type={'checkbox'} checked={checked} onChange={() => {onCheck(!checked)}} {...checkProps}/>\n <div className={'uil-checkmark'} style={{backgroundColor: checkColor}}/>\n </label>\n\n <span>{label}</span>\n </div>\n </>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n closeLabel: string;\n isSuccess : boolean;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n isSuccess,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={isSuccess? ModalType.success : ModalType.error} {...modalProps}/>\n );\n}","import React, {useEffect, useState} from 'react';\nimport {CustomInput, ICustomInput} from './customInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {PasswordRuleTypes} from 'enums/passwordRuleTypes';\nimport './input.scss';\n\ninterface IPasswordInput extends ICustomInput {\n capsLockWarning: string;\n setFailedRules : (value: PasswordRule[]) => void;\n ruleChecked : string;\n rules : PasswordRule[];\n ruleUnchecked : string;\n}\n\nexport interface PasswordRule {\n count : number;\n label : string;\n type : PasswordRuleTypes | string;\n pattern?: string;\n}\n\nexport function PasswordInput(props: IPasswordInput) {\n const {\n capsLockWarning,\n rules,\n ruleChecked,\n ruleUnchecked,\n setFailedRules,\n ...inputProps\n } = props;\n\n const [capsLock, setCapsLock] = useState(false);\n\n useEffect(() => {\n validateInput();\n },[props.value]);\n\n useEffect(() => {\n function setCapsLockState(event: globalThis.KeyboardEvent) {\n setCapsLock(event.getModifierState && event.getModifierState('CapsLock'));\n }\n\n document.addEventListener('keydown', setCapsLockState);\n\n return () => {\n document.removeEventListener('keydown', setCapsLockState);\n };\n },[]);\n\n function validateInput() {\n const failedRules: PasswordRule[] = [];\n \n rules.forEach(rule => {\n if (!checkRule(rule)) {\n failedRules.push(rule);\n }\n });\n\n setFailedRules(failedRules);\n }\n\n function checkRule(rule: PasswordRule) {\n let pattern: string;\n\n switch (rule.type) {\n case PasswordRuleTypes.minLength:\n pattern = `[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.maxLength:\n pattern = `^[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{0,${rule.count}}$`;\n break;\n case PasswordRuleTypes.letters:\n pattern = `[a-zA-ZßÄäÖöÜü]{${rule.count},}`;\n break;\n case PasswordRuleTypes.numbers:\n pattern = `[0-9]{${rule.count},}`;\n break;\n case PasswordRuleTypes.special:\n pattern = `[._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.upper:\n pattern = `[A-ZÄÖÜ]{${rule.count},}`;\n break;\n default:\n rule.pattern? pattern = rule.pattern : pattern = '';\n }\n\n if (pattern === '') return false;\n\n const reg = new RegExp(pattern);\n return reg.test(props.value);\n }\n\n return (\n <>\n <div>\n <CustomInput {...inputProps}/>\n\n <div className={'uil-password-rules'}>\n {capsLock &&\n <div className={'uil-password-rule'}>{capsLockWarning}</div>\n }\n\n {rules.map((rule, idx) =>\n <div key={idx} className={'uil-password-rule'}>\n <SVG src={checkRule(rule)? ruleChecked : ruleUnchecked} height={12} width={12}/>\n\n <span>{rule.label}</span>\n </div>\n )}\n </div>\n </div>\n </>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} {...modalProps}/>\n );\n}"],"names":["CustomButton","props","_props$disabled","disabled","label","_props$small","small","theme","buttonProps","_objectWithoutPropertiesLoose","_excluded","style","color","bgColor","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","border","_jsx","jsx","_extends","className","SVG","src","height","width","includes","Error","fill","children","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","_jsxs","htmlFor","id","onChange","e","target","value","placeholder","onClick","useOutsideClick","callback","ref","useRef","useEffect","handleClickOutside","event","current","contains","document","addEventListener","removeEventListener","PasswordRuleTypes","CustomInput","tooltipClose","tooltipIcon","tooltipText","_useState","useState","tooltipVisible","setTooltipVisible","closeTooltip","_Fragment","Fragment","jsxs","ModalType","BaseModal","_props$cancelLabel","cancelLabel","closeLabel","confirm","_props$confirmLabel","confirmLabel","message","timeout","title","type","visible","setVisible","setTimeout","success","error","animationDuration","Array","isArray","m","idx","question","checkColor","checked","onCheck","checkProps","isSuccess","modalProps","capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules","capsLock","setCapsLock","checkRule","rule","pattern","minLength","count","maxLength","letters","numbers","special","upper","RegExp","test","failedRules","forEach","push","setCapsLockState","getModifierState","_objectDestructuringEmpty"],"mappings":"otBAUM,SAAUA,EAAaC,GAC3B,IAAAC,EAMID,EALFE,SAAAA,WAAQD,GAAQA,EAChBE,EAIEH,EAJFG,MAAKC,EAIHJ,EAHFK,MAAAA,OAAQ,IAAHD,GAAQA,EACbE,EAEEN,EAFFM,MACGC,EAAWC,EACZR,EAAKS,GAmBHC,EAAuB,CAC3BC,MAlBF,SAAkBC,GAChB,IAAKN,GAASJ,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":3,"file":"index.umd.js","sources":["../src/components/button/customButton.tsx","../src/components/images/svgIcon.tsx","../src/components/input/baseInput.tsx","../src/hooks/clickOutside.ts","../src/enums/passwordRuleTypes.ts","../src/components/input/customInput.tsx","../src/enums/ModalType.ts","../src/components/modal/baseModal.tsx","../src/components/checkbox/customCheckBox.tsx","../src/components/modal/notifyModal.tsx","../src/components/input/passwordInput.tsx","../src/components/modal/questionModal.tsx"],"sourcesContent":["import React, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './button.scss';\n\ninterface ICustomButton extends ComponentPropsWithoutRef<'button'> {\n label : string;\n disabled?: boolean;\n small? : boolean;\n theme? : string;\n}\n\nexport function CustomButton(props: ICustomButton) {\n const {\n disabled = false,\n label,\n small = false,\n theme,\n ...buttonProps\n } = props;\n\n function setColor(bgColor: string) {\n if (!theme || disabled) return null;\n\n const color = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;\n const uiColors = [\n parseInt(color.substring(0, 2), 16) / 255,\n parseInt(color.substring(2, 4), 16) / 255,\n parseInt(color.substring(4, 6), 16) / 255\n ];\n const c = uiColors.map(col => {\n return col <= 0.03928? (col / 12.92) : Math.pow((col + 0.055) / 1.055, 2.4);\n });\n const L = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);\n\n return L > 0.179 ? '#000000' : '#ffffff';\n }\n\n const style: CSSProperties = {\n color: setColor(theme),\n backgroundColor: disabled? null : theme,\n border: theme? 'none': null,\n }\n\n return (\n <button className={`uil-button ${disabled ? 'uil-disabled' : ''} ${small ? 'uil-small' : ''}`} style={style} disabled={disabled} {...buttonProps}>\n {label}\n </button>\n );\n}","import React, {CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon {\n src : string;\n color? : string;\n height?: number;\n width? : number;\n}\n\nexport function SVG(props: ISvgIcon) {\n const {\n src,\n color,\n height,\n width\n } = props;\n\n if (!src.includes('.svg')) {\n throw new Error('Provided src is not an svg image');\n }\n\n const style: CSSProperties = {\n fill: color,\n height: `${height}px`,\n width: `${width}px`\n }\n\n return (\n <svg aria-hidden={true} className={'uil-svg'} style={style}>\n <use href={src}/>\n </svg>\n );\n}","import React, {ComponentPropsWithoutRef} from 'react';\nimport {SVG} from 'components/images/svgIcon';\nimport './input.scss';\n\nexport interface IBaseInput extends ComponentPropsWithoutRef<'input'> {\n label : string;\n value : string;\n valueChanged: (value: string) => void;\n iconColor? : string;\n iconSrc? : string;\n inputColor? : string;\n toggle? : () => void;\n}\n\nexport function BaseInput(props: IBaseInput) {\n const {\n iconColor,\n iconSrc,\n inputColor,\n label,\n toggle,\n valueChanged,\n ...inputProps\n } = props;\n\n return (\n <label className={'uil-input-wrapper'} htmlFor={inputProps.id}>\n <input\n className={'uil-input'}\n onChange={(e) => valueChanged(e.target.value)}\n placeholder={label}\n style={{color: inputColor}}\n {...inputProps}\n />\n\n {iconSrc &&\n <div className={'uil-icon'} onClick={toggle}>\n <SVG src={iconSrc} width={24} height={24} color={iconColor}/>\n </div>\n }\n\n <span className={'uil-label'} style={{color: inputColor}}>{label}</span>\n </label>\n );\n}","import {useEffect, useRef} from 'react';\n\nexport function useOutsideClick (callback: () => void) {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n function handleClickOutside (event: MouseEvent | TouchEvent) {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n callback();\n }\n }\n\n document.addEventListener('click', handleClickOutside);\n document.addEventListener('touchend', handleClickOutside);\n\n\n return () => {\n document.removeEventListener('click', handleClickOutside);\n document.removeEventListener('touchend', handleClickOutside);\n };\n }, [callback]);\n\n return ref;\n}","export enum PasswordRuleTypes {\n minLength,\n maxLength,\n letters,\n numbers,\n special,\n upper\n}","import React, {useState} from 'react';\nimport {BaseInput, IBaseInput} from './baseInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {useOutsideClick} from 'hooks/clickOutside';\nimport './input.scss';\n\nexport interface ICustomInput extends IBaseInput {\n tooltipClose?: string;\n tooltipIcon? : string;\n tooltipText? : string;\n}\n\nexport function CustomInput(props: ICustomInput) {\n const {\n tooltipClose,\n tooltipIcon,\n tooltipText,\n ...inputProps\n } = props;\n\n const [tooltipVisible, setTooltipVisible] = useState(false);\n const ref = useOutsideClick(closeTooltip);\n\n function closeTooltip() {\n setTooltipVisible(false);\n }\n\n return (\n <>\n {tooltipIcon ?\n <div className={'uil-tooltip-wrapper'}>\n {tooltipVisible &&\n <div className={'uil-tooltip'} ref={ref}>\n {tooltipClose &&\n <button className={'uil-tooltip-button'} onClick={closeTooltip}>\n {tooltipClose}\n </button>\n }\n\n <span>{tooltipText}</span>\n </div>\n }\n\n <div className={'uil-tooltip-icon'} onClick={() => setTooltipVisible(!tooltipVisible)}>\n <SVG src={tooltipIcon} height={16} width={16}/>\n </div>\n\n <BaseInput {...inputProps}/>\n </div> :\n\n <BaseInput {...inputProps}/>\n }\n </>\n );\n}","export enum ModalType {\n error,\n question,\n success\n}","import React, {useEffect, useState} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button';\nimport './modal.scss';\n\ninterface IBaseModal {\n message : string | string[];\n title : string;\n type : ModalType;\n cancelLabel? : string;\n closeLabel? : string;\n confirm? : () => void;\n confirmLabel?: string;\n timeout? : number;\n}\n\nexport function BaseModal(props: IBaseModal) {\n const {\n cancelLabel = '',\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n const [visible, setVisible] = useState(true);\n\n useEffect(() => {\n if (!timeout) return;\n\n setTimeout(() => {\n setVisible(false);\n }, timeout);\n },[]);\n\n return visible ?\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={`uil-header ${type == ModalType.success ? 'uil-success' : ''} ${type == ModalType.error ? 'uil-error' : ''}`}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(props.timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) =>\n <p key={idx} className={'uil-modal-text'}>{m}</p>\n ) : <p className={'uil-modal-text'}>{message}</p>\n }\n </div>\n\n <div className={`uil-button-wrapper ${type !== ModalType.question ? 'uil-single' : ''}`}>\n {type !== ModalType.question &&\n <CustomButton label={closeLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n }\n\n {type == ModalType.question && props.confirm &&\n <>\n <CustomButton label={confirmLabel} theme={'#00416A'} small={true} onClick={() => confirm} type={'button'}/>\n <CustomButton label={cancelLabel} small={true} onClick={() => setVisible(false)} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div> : <></>;\n}","import React, {ComponentPropsWithoutRef, ReactNode} from 'react';\nimport './checkbox.scss';\n\ninterface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {\n checked : boolean;\n label? : string;\n onCheck : (value: boolean) => void;\n checkColor? : string;\n children? : ReactNode;\n}\n\nexport function CustomCheckBox(props: ICustomCheckbox) {\n const {\n checkColor,\n checked,\n onCheck,\n label,\n children,\n ...checkProps\n } = props;\n\n return (\n <>\n <div className={'uil-check-wrapper'}>\n <label className={'uil-checkbox'}>\n <input type={'checkbox'} checked={checked} onChange={() => {onCheck(!checked)}} {...checkProps}/>\n <div className={'uil-checkmark'} style={{backgroundColor: checkColor}}/>\n </label>\n\n {children ? children : <span>{label}</span>}\n </div>\n </>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n closeLabel: string;\n isSuccess : boolean;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n isSuccess,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={isSuccess? ModalType.success : ModalType.error} {...modalProps}/>\n );\n}","import React, {useEffect, useState} from 'react';\nimport {CustomInput, ICustomInput} from './customInput';\nimport {SVG} from 'components/images/svgIcon';\nimport {PasswordRuleTypes} from 'enums/passwordRuleTypes';\nimport './input.scss';\n\ninterface IPasswordInput extends ICustomInput {\n capsLockWarning: string;\n setFailedRules : (value: PasswordRule[]) => void;\n ruleChecked : string;\n rules : PasswordRule[];\n ruleUnchecked : string;\n}\n\nexport interface PasswordRule {\n count : number;\n label : string;\n type : PasswordRuleTypes | string;\n pattern?: string;\n}\n\nexport function PasswordInput(props: IPasswordInput) {\n const {\n capsLockWarning,\n rules,\n ruleChecked,\n ruleUnchecked,\n setFailedRules,\n ...inputProps\n } = props;\n\n const [capsLock, setCapsLock] = useState(false);\n\n useEffect(() => {\n validateInput();\n },[props.value]);\n\n useEffect(() => {\n function setCapsLockState(event: globalThis.KeyboardEvent) {\n setCapsLock(event.getModifierState && event.getModifierState('CapsLock'));\n }\n\n document.addEventListener('keydown', setCapsLockState);\n\n return () => {\n document.removeEventListener('keydown', setCapsLockState);\n };\n },[]);\n\n function validateInput() {\n const failedRules: PasswordRule[] = [];\n \n rules.forEach(rule => {\n if (!checkRule(rule)) {\n failedRules.push(rule);\n }\n });\n\n setFailedRules(failedRules);\n }\n\n function checkRule(rule: PasswordRule) {\n let pattern: string;\n\n switch (rule.type) {\n case PasswordRuleTypes.minLength:\n pattern = `[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.maxLength:\n pattern = `^[a-zA-Z0-9ßÄäÖöÜü._!\"\\`'#%&,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{0,${rule.count}}$`;\n break;\n case PasswordRuleTypes.letters:\n pattern = `[a-zA-ZßÄäÖöÜü]{${rule.count},}`;\n break;\n case PasswordRuleTypes.numbers:\n pattern = `[0-9]{${rule.count},}`;\n break;\n case PasswordRuleTypes.special:\n pattern = `[._!\"\\`'#%&§,:;<>=@{}~\\\\$\\\\(\\\\)\\\\*\\\\+\\\\/\\\\\\\\\\\\?\\\\[\\\\]\\\\^\\\\|\\\\-]{${rule.count},}`;\n break;\n case PasswordRuleTypes.upper:\n pattern = `[A-ZÄÖÜ]{${rule.count},}`;\n break;\n default:\n rule.pattern? pattern = rule.pattern : pattern = '';\n }\n\n if (pattern === '') return false;\n\n const reg = new RegExp(pattern);\n return reg.test(props.value);\n }\n\n return (\n <>\n <div>\n <CustomInput {...inputProps}/>\n\n <div className={'uil-password-rules'}>\n {capsLock &&\n <div className={'uil-password-rule'}>{capsLockWarning}</div>\n }\n\n {rules.map((rule, idx) =>\n <div key={idx} className={'uil-password-rule'}>\n <SVG src={checkRule(rule)? ruleChecked : ruleUnchecked} height={12} width={12}/>\n\n <span>{rule.label}</span>\n </div>\n )}\n </div>\n </div>\n </>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n timeout? : number;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} {...modalProps}/>\n );\n}"],"names":["CustomButton","props","_props$disabled","disabled","label","_props$small","small","theme","buttonProps","_objectWithoutPropertiesLoose","_excluded","style","color","bgColor","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","border","_jsx","jsx","_extends","className","SVG","src","height","width","includes","Error","fill","children","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","_jsxs","htmlFor","id","onChange","e","target","value","placeholder","onClick","useOutsideClick","callback","ref","useRef","useEffect","handleClickOutside","event","current","contains","document","addEventListener","removeEventListener","PasswordRuleTypes","CustomInput","tooltipClose","tooltipIcon","tooltipText","_useState","useState","tooltipVisible","setTooltipVisible","closeTooltip","_Fragment","Fragment","jsxs","ModalType","BaseModal","_props$cancelLabel","cancelLabel","closeLabel","confirm","_props$confirmLabel","confirmLabel","message","timeout","title","type","visible","setVisible","setTimeout","success","error","animationDuration","Array","isArray","m","idx","question","checkColor","checked","onCheck","checkProps","isSuccess","modalProps","capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules","capsLock","setCapsLock","checkRule","rule","pattern","minLength","count","maxLength","letters","numbers","special","upper","RegExp","test","failedRules","forEach","push","setCapsLockState","getModifierState","_objectDestructuringEmpty"],"mappings":"otBAUM,SAAUA,EAAaC,GAC3B,IAAAC,EAMID,EALFE,SAAAA,WAAQD,GAAQA,EAChBE,EAIEH,EAJFG,MAAKC,EAIHJ,EAHFK,MAAAA,OAAQ,IAAHD,GAAQA,EACbE,EAEEN,EAFFM,MACGC,EAAWC,EACZR,EAAKS,GAmBHC,EAAuB,CAC3BC,MAlBF,SAAkBC,GAChB,IAAKN,GAASJ,EAAU,OAAW,KAEnC,IAAMS,EAA+B,MAAtBC,EAAQC,OAAO,GAAcD,EAAQE,UAAU,EAAG,GAAKF,EAMhEG,EALW,CACfC,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASL,EAAMG,UAAU,EAAG,GAAI,IAAM,KAErBG,IAAI,SAAAC,GACrB,OAAOA,GAAO,OAAUA,EAAM,MAASC,KAAKC,KAAKF,EAAM,MAAS,MAAO,IACzE,GAGA,MAFW,MAASH,EAAE,GAAO,MAASA,EAAE,GAAO,MAASA,EAAE,GAE/C,KAAQ,UAAY,SACjC,CAGSM,CAASf,GAChBgB,gBAAiBpB,EAAU,KAAOI,EAClCiB,OAAQjB,EAAO,OAAQ,MAGzB,OACEkB,EAAQC,IAAA,SAAAC,GAAAC,UAAS,eAAgBzB,EAAW,eAAiB,IAAMG,KAAAA,EAAQ,YAAc,IAAMK,MAAOA,EAAOR,SAAUA,GAAcK,YAClIJ,IAGP,6DCrCM,SAAUyB,EAAI5B,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AAAC,IAACyC,EAAWxC,EAAKiB,GAAAA,IAEjBC,EAAAA,KAAK,MAAA,CAAAjB,UAAW,+BACbqF,GACCxF,EAAAC,IAAA,MAAA,CAAKE,UAAW,oBAAmBQ,SAAGwE,IAGvCC,EAAM3F,IAAI,SAACkG,EAAMhB,GAAG,OACnBvD,EAAeiC,KAAA,MAAA,CAAAlD,UAAW,oBACxBQ,SAAA,CAAAX,EAAAA,IAACI,EAAG,CAACC,IAAKqF,EAAUC,GAAON,EAAcC,EAAehF,OAAQ,GAAIC,MAAO,KAE3EP,EAAAA,IAAO,OAAA,CAAAW,SAAAgF,EAAKhH,UAHJgG,EAIJ,UAMlB,kBCrGM,SAAwBnG,GAC5B,IACK0G,EAAUhF,EAAA,wEAAAyG,CACXnI,GAAAA,IAEJ,OACEwB,EAAAC,IAACsD,EAASrD,EAAA,CAAC+D,KAAMX,EAAUsB,UAAcM,GAE7C"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@hbuesing/ui-library",
4
- "version": "1.3.1",
4
+ "version": "1.4.0",
5
5
  "description": "Collection of reusable ui components for react based applications",
6
6
  "keywords": [
7
7
  "react",