@hbuesing/ui-library 2.0.3 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,2 +1,4 @@
1
1
  # ui-library
2
- Collection of reusable ui components for react based applications
2
+
3
+ Sourcecode of the package
4
+
package/dist/bundle.js ADDED
@@ -0,0 +1,2 @@
1
+ import e,{useEffect as l,useRef as i,useState as r}from"react";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var l=1;l<arguments.length;l++){var i=arguments[l];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},t.apply(null,arguments)}function a(e,l){if(null==e)return{};var i={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(l.includes(r))continue;i[r]=e[r]}return i}var o=":root{--uil-black:#000;--uil-black-alt:#222;--uil-white:#fff;--uil-grey:#f3f3f3;--uil-grey-alt:#cfcfcf;--uil-grey-dark:#878787;--uil-outline-focus:#1e90ff;--uil-outline-disabled:#8b0000;--uil-success:#006a4e;--uil-error:#800020;--uil-question:#00416a;--uil-warning:gold;--uil-xxxs:.125rem;--uil-xxs:.25rem;--uil-xs:.5rem;--uil-s:.75rem;--uil-m:1rem;--uil-l:1.25rem;--uil-xl:1.5rem;--uil-xxl:1.75rem;--uil-xxxl:2rem;--uil-font-base:var(--uil-l);--uil-font-small:var(--uil-m)}.uil-button{background-color:var(--uil-white);border:1px solid var(--uil-black);border-radius:2px;box-shadow:0 0 3px 0 var(--uil-black-alt);color:var(--uil-black);cursor:pointer;letter-spacing:1px;padding:var(--uil-xs) var(--uil-s)}.uil-button.uil-disabled{background-color:var(--uil-grey-dark);border:transparent;color:var(--uil-grey)}.uil-button.uil-small{font-size:var(--uil-font-small);line-height:var(--uil-font-small);padding:var(--uil-xxs) var(--uil-xs)}.uil-check-wrapper{align-items:center;display:flex;font-size:var(--uil-font-base);gap:var(--uil-s);line-height:var(--uil-font-base)}.uil-check-wrapper .uil-checkbox{border-radius:2px}.uil-svg-wrapper{display:flex;height:-moz-fit-content;height:fit-content;width:-moz-fit-content;width:fit-content}.uil-svg-wrapper .uil-svg{height:var(--uil-xxxl);width:var(--uil-xxxl)}.uil-input-wrapper{display:block;position:relative}.uil-input-wrapper .uil-label{background:linear-gradient(0deg,var(--uil-white) 9px,transparent 0);color:var(--uil-black);cursor:text;font-weight:700;left:var(--uil-xxs);opacity:.6;padding:0 var(--uil-xxxs);position:absolute;top:25%;transition:top .25s ease-in-out}.uil-input-wrapper .uil-input{background-color:var(--uil-white);border:1px solid var(--uil-black);border-radius:0;box-sizing:border-box;color:var(--uil-black);padding:var(--uil-xs);width:100%}.uil-input-wrapper .uil-input::-moz-placeholder{color:transparent;height:0;width:0}.uil-input-wrapper .uil-input::placeholder{color:transparent;height:0;width:0}.uil-input-wrapper .uil-input:focus{outline:1px solid var(--uil-outline-focus)}.uil-input-wrapper .uil-input:disabled{background-color:var(--uil-grey);border:2px solid var(--uil-outline-disabled);color:var(--uil-grey-dark);cursor:not-allowed}.uil-input-wrapper .uil-input:disabled~.uil-label{background:transparent;color:var(--uil-grey-dark);cursor:not-allowed}.uil-input-wrapper .uil-input:disabled~.uil-icon{fill:var(--uil-grey-dark);cursor:not-allowed}.uil-input-wrapper .uil-input:disabled:not(:-moz-placeholder-shown)~.uil-label{background:linear-gradient(0deg,var(--uil-grey) 8px,transparent 0)}.uil-input-wrapper .uil-input:disabled:not(:placeholder-shown)~.uil-label{background:linear-gradient(0deg,var(--uil-grey) 8px,transparent 0)}.uil-input-wrapper .uil-icon{fill:var(--uil-black);align-items:center;display:flex;justify-content:center;opacity:.5;position:absolute;right:var(--uil-xs);top:50%;transform:translateY(-50%)}.uil-input-wrapper .uil-input:not(:-moz-placeholder-shown)~.uil-label{opacity:1;top:-30%}.uil-input-wrapper .uil-input:focus~.uil-label,.uil-input-wrapper .uil-input:not(:placeholder-shown)~.uil-label{opacity:1;top:-30%}.uil-input-wrapper .uil-input:not(:-moz-placeholder-shown)~.uil-icon{opacity:1}.uil-input-wrapper .uil-input:focus~.uil-icon,.uil-input-wrapper .uil-input:not(:placeholder-shown)~.uil-icon{opacity:1}.uil-tooltip-wrapper{position:relative}.uil-tooltip-wrapper .uil-tooltip-icon{fill:var(--uil-black-alt);cursor:pointer;margin-bottom:var(--uil-xxs)}.uil-tooltip-wrapper .uil-tooltip-icon:has(~.uil-input-wrapper>.uil-input:not(:-moz-placeholder-shown),~.uil-input-wrapper:focus-within){opacity:0;-moz-transition:opacity .3s,visibility .3s;transition:opacity .3s,visibility .3s;visibility:hidden}.uil-tooltip-wrapper .uil-tooltip-icon:has(~.uil-input-wrapper>.uil-input:not(:placeholder-shown),~.uil-input-wrapper:focus-within){opacity:0;transition:opacity .3s,visibility .3s;visibility:hidden}.uil-tooltip-wrapper .uil-tooltip{background-color:rgba(34,34,34,.9);border-radius:3px;box-sizing:border-box;color:var(--uil-white);font-size:var(--uil-font-small);left:0;line-height:var(--uil-font-small);padding:var(--uil-s);position:absolute;top:0;width:100%;z-index:1}.uil-tooltip-wrapper .uil-tooltip .uil-tooltip-button{background-color:transparent;border:none;border-bottom:1px solid var(--uil-white);color:var(--uil-white);cursor:pointer;display:block;margin-bottom:var(--uil-m);margin-left:auto;padding:0}.uil-password-rules{display:flex;flex-direction:column;gap:var(--uil-xs);margin-left:var(--uil-xs);margin-top:var(--uil-m)}.uil-password-rules .uil-password-rule{align-items:center;display:flex;font-size:var(--uil-font-small);gap:var(--uil-xxs);line-height:var(--uil-font-small)}.uil-modal-wrapper{background-color:rgba(0,0,0,.5);height:100%;left:0;position:fixed;top:0;width:100%;z-index:99}.uil-modal-wrapper .uil-modal{border-radius:5px;box-shadow:0 0 6px 0 var(--uil-black);left:50%;position:absolute;top:30%;transform:translateX(-50%);width:95%;z-index:999}@media (min-width:1025px){.uil-modal-wrapper .uil-modal{width:75%}}@media (min-width:1250px){.uil-modal-wrapper .uil-modal{width:55%}}@media (min-width:1920px){.uil-modal-wrapper .uil-modal{width:35%}}.uil-modal-wrapper .uil-modal .uil-progress-wrapper{background-color:var(--uil-grey-alt)}.uil-modal-wrapper .uil-modal .uil-progress-wrapper .uil-progress-bar{animation-duration:2s;animation-iteration-count:1;animation-name:uil-progress;border:2px solid var(--uil-grey-dark)}@keyframes uil-progress{0%{width:100%}to{width:0}}.uil-modal-wrapper .uil-modal .uil-header{background-color:var(--uil-question);border-top-left-radius:3px;border-top-right-radius:3px;color:var(--uil-white);display:flex;font-size:var(--uil-xl);font-weight:700;justify-content:space-between;line-height:var(--uil-xl);margin:0;padding:var(--uil-s)}@media (min-width:1025px){.uil-modal-wrapper .uil-modal .uil-header{font-size:var(--uil-xxxl);line-height:var(--uil-xxxl);padding:var(--uil-m)}}.uil-modal-wrapper .uil-modal .uil-header.uil-success{background-color:var(--uil-success)}.uil-modal-wrapper .uil-modal .uil-header.uil-error{background-color:var(--uil-error)}.uil-modal-wrapper .uil-modal .uil-header.uil-warning{background-color:var(--uil-warning);color:var(--uil-black)}.uil-modal-wrapper .uil-modal .uil-content{background-color:var(--uil-white);border-bottom-left-radius:3px;border-bottom-right-radius:3px;display:flex;flex-direction:column;gap:var(--uil-m);padding:var(--uil-m)}@media (min-width:1025px){.uil-modal-wrapper .uil-modal .uil-content{gap:var(--uil-xxxl);padding:var(--uil-l)}}.uil-modal-wrapper .uil-modal .uil-content .uil-modal-text{color:var(--uil-black);font-size:var(--uil-font-small);line-height:var(--uil-font-small);margin:var(--uil-s) 0}@media (min-width:760px){.uil-modal-wrapper .uil-modal .uil-content .uil-modal-text{font-size:var(--uil-font-base);line-height:var(--uil-font-base)}}.uil-modal-wrapper .uil-modal .uil-content .uil-button-wrapper{display:flex;justify-content:space-between}.uil-modal-wrapper .uil-modal .uil-content .uil-button-wrapper.uil-single{justify-content:end}.uil-radio-title{display:block;font-size:var(--uil-xl);line-height:var(--uil-xl);margin-bottom:var(--uil-m)}.uil-radio-wrapper{display:flex;flex-direction:column;gap:var(--uil-m)}.uil-radio-wrapper .uil-radio-option{align-items:center;display:flex;gap:.25rem}.uil-radio-wrapper .uil-radio-option .uil-radio,.uil-radio-wrapper .uil-radio-option .uil-radio .uil-radio-check{border-radius:50%}.uil-fit{height:-moz-fit-content;height:fit-content;width:-moz-fit-content;width:fit-content}.uil-font-base{font-size:var(--uil-font-base);line-height:var(--uil-font-base)}.uil-check{border:2px solid var(--uil-black-alt);box-sizing:border-box;cursor:pointer;display:block;font-size:var(--uil-font-small);line-height:var(--uil-font-small);min-height:var(--uil-l);min-width:var(--uil-l);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.uil-check:has(input:disabled){background-color:var(--uil-grey);border-color:var(--uil-grey-dark)}.uil-check input{cursor:pointer;height:0;opacity:0;position:absolute;width:0}.uil-check input:checked~.uil-checkmark{transform:scale(1)}.uil-check input:disabled~.uil-checkmark{background-color:var(--uil-grey-dark)}.uil-check .uil-checkmark{background-color:var(--uil-black-alt);height:var(--uil-xs);left:25%;position:absolute;top:25%;transform:scale(0);transition:.1s ease;width:var(--uil-xs)}";const n=[];function u(e){l(()=>{const l=e.current?e.current.ownerDocument:document;if(void 0!==l&&!n.includes(l)){const e=l.createElement("style");e.innerHTML=o,n.push(l),l.head.appendChild(e)}},[])}function c(e){if(7!==e.length)throw new Error("provided hex color must be 7 characters (including #) long");e=e.substring(1,7);const l=[parseInt(e.substring(0,2),16)/255,parseInt(e.substring(2,4),16)/255,parseInt(e.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"}const s=["disabled","label","small","theme"];function p(l){const{disabled:r=!1,label:o,small:n=!1,theme:p}=l,d=a(l,s),m=i(null);return u(m),e.createElement("button",t({className:function(){const e="uil-button uil-fit";return r&&!n?`${e} uil-font-base uil-disabled`:r&&n?`${e} uil-disabled uil-small`:n?`${e} uil-small`:`${e} uil-font-base`}(),style:function(){if(!r&&p){if(p.includes("#"))return{color:c(p),backgroundColor:p,border:"transparent"};switch(p){case"success":return{color:c("#006A4E"),backgroundColor:"#006A4E",border:"transparent"};case"warning":return{color:"#000000",backgroundColor:"#FFD700",border:"transparent"};case"error":return{color:c("#800020"),backgroundColor:"#800020",border:"transparent"};default:throw new Error("invalid theme provided")}}}(),disabled:r},d,{ref:m}),o)}const d=["checkColor","checked","toggleCheck","label","children"];function m(l){const{checkColor:r,checked:o,toggleCheck:n,label:c,children:s}=l,p=a(l,d),m=i(null);return u(m),e.createElement("div",{className:"uil-check-wrapper",ref:m},e.createElement("label",{className:"uil-checkbox uil-check"},e.createElement("input",t({type:"checkbox",checked:o,onChange:()=>{n(!o)}},p)),e.createElement("div",{className:"uil-checkmark",style:{backgroundColor:r}})),s||e.createElement("span",{onClick:()=>n(!o),style:{cursor:"pointer",userSelect:"none"}},c))}function h(l){const{src:r,color:t,height:a,width:o}=l;if(!r.includes(".svg"))throw new Error("Provided src is not an svg image");const n=i(null);return u(n),e.createElement("div",{ref:n,className:"uil-svg-wrapper"},e.createElement("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:t,height:`${a}px`,width:`${o}px`}},e.createElement("use",{href:r})))}const b=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function g(l){const{iconColor:r,iconSrc:o,inputColor:n,label:c,toggle:s,valueChanged:p}=l,d=a(l,b),m=i(null);return u(m),e.createElement("label",{className:"uil-input-wrapper",htmlFor:d.id,ref:m},e.createElement("input",t({className:"uil-input uil-font-base",onChange:e=>p(e.target.value),placeholder:c,style:{color:n}},d)),o&&e.createElement("div",{className:"uil-icon",onClick:s},e.createElement(h,{src:o,width:24,height:24,color:r})),e.createElement("span",{className:"uil-label uil-font-base",style:{color:n}},c))}function f(e){const r=i(null);return l(()=>{if(r.current)return document.addEventListener("click",l),document.addEventListener("touchend",l),()=>{document.removeEventListener("click",l),document.removeEventListener("touchend",l)};function l(l){r.current&&!r.current.contains(l.target)&&e()}},[e]),r}const v=["tooltipClose","tooltipIcon","tooltipText"];function w(l){const{tooltipClose:i,tooltipIcon:o,tooltipText:n}=l,u=a(l,v),[c,s]=r(!1),p=f(d);function d(){s(!1)}return e.createElement(e.Fragment,null,o?e.createElement("div",{className:"uil-tooltip-wrapper",ref:p},c&&e.createElement("div",{className:"uil-tooltip"},i&&e.createElement("button",{className:"uil-tooltip-button uil-fit",onClick:d},i),e.createElement("span",null,n)),e.createElement("div",{className:"uil-tooltip-icon uil-fit",onClick:()=>s(!c)},e.createElement(h,{src:o,height:16,width:16})),e.createElement(g,t({},u))):e.createElement(g,t({},u)))}var k;!function(e){e[e.minLength=1]="minLength",e[e.maxLength=2]="maxLength",e[e.letters=3]="letters",e[e.numbers=4]="numbers",e[e.special=5]="special",e[e.upper=6]="upper"}(k||(k={}));const x=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function y(i){const{capsLockWarning:o,rules:n,ruleChecked:u,ruleUnchecked:c,setFailedRules:s}=i,p=a(i,x),[d,m]=r(!1);function b(e){let l;if(e.type){if(!e.count)throw new Error("count must not be empty if a type is provided");switch(e.type){case k.minLength:l=`[a-zA-Z0-9ßÄäÖöÜü._!"\`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{${e.count},}`;break;case k.maxLength:l=`^[a-zA-Z0-9ßÄäÖöÜü._!"\`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,${e.count}}$`;break;case k.letters:l=`[a-zA-ZßÄäÖöÜü]{${e.count},}`;break;case k.numbers:l=`[0-9]{${e.count},}`;break;case k.special:l=`[._!"\`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{${e.count},}`;break;case k.upper:l=`[A-ZÄÖÜ]{${e.count},}`;break;default:throw new Error("unrecognized rule type provided")}}else l=e.pattern?e.pattern:"";if(""===l)throw new Error("pattern must not be an empty string");return new RegExp(l).test(i.value)}return l(()=>{!function(){const e=[];n.forEach(l=>{b(l)||e.push(l)}),null==s||s(e)}()},[i.value]),l(()=>{if(o)return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e);function e(e){m(null==e.getModifierState?void 0:e.getModifierState("CapsLock"))}},[]),e.createElement(e.Fragment,null,e.createElement(w,t({},p)),e.createElement("div",{className:"uil-password-rules"},d&&e.createElement("div",{className:"uil-password-rule"},o),n.map((l,i)=>e.createElement("div",{key:i,className:"uil-password-rule"},e.createElement(h,{src:b(l)?u:c,height:12,width:12}),e.createElement("span",null,l.label)))))}var E;function C(r){const{callback:t,cancelLabel:a="",close:o,closeLabel:n,confirm:c,confirmLabel:s="",message:d,timeout:m,title:h,type:b}=r;let g;const f=i(null);return u(f),l(()=>{if(m)return g=setTimeout(()=>t?t():o(),m),()=>clearTimeout(g)},[]),e.createElement("div",{className:"uil-modal-wrapper",ref:f},e.createElement("div",{className:"uil-modal"},e.createElement("div",{className:function(){const e="uil-header";switch(b){case E.error:return`${e} uil-error`;case E.success:return`${e} uil-success`;case E.warning:return`${e} uil-warning`;default:return e}}()},h),m&&e.createElement("div",{className:"uil-progress-wrapper"},e.createElement("div",{className:"uil-progress-bar",style:{animationDuration:m/1e3+.5+"s"}})),e.createElement("div",{className:"uil-content"},e.createElement("div",null,Array.isArray(d)?d.map((l,i)=>e.createElement("p",{key:i,className:"uil-modal-text"},l)):e.createElement("p",{className:"uil-modal-text"},d)),e.createElement("div",{className:"uil-button-wrapper "+(b!==E.question?"uil-single":"")},b!==E.question&&e.createElement(p,{label:null!=n?n:"",onClick:function(){clearTimeout(g),m&&t?t():o()},type:"button"}),b==E.question&&r.confirm&&e.createElement(e.Fragment,null,e.createElement(p,{label:s,theme:"#00416A",onClick:c,type:"button"}),e.createElement(p,{label:a,onClick:o,type:"button"}))))))}!function(e){e.error="error",e.question="question",e.success="success",e.warning="warning"}(E||(E={}));const z=["modalType"];function N(l){const{modalType:i}=l,r=a(l,z);return e.createElement(C,t({type:i},r))}const $=["cancel"];function L(l){const{cancel:i}=l,r=a(l,$);return e.createElement(C,t({type:E.question,close:i},r))}function A(r){const{checkColor:t,disabled:a,label:o,options:n,value:c,valueChanged:s}=r,p=i(null);function d(e){c!==e&&s(e)}return u(p),l(()=>{n.forEach(e=>{e.checked&&d(e.value)})},[]),e.createElement("div",{ref:p},o&&e.createElement("div",{className:"uil-radio-title"},o),e.createElement("div",{className:"uil-radio-wrapper"},n.map((l,i)=>{return e.createElement("div",{key:(r=i,`${r}-${(new Date).getTime()}`),className:"uil-radio-option"},e.createElement("label",{className:"uil-radio uil-check"},e.createElement("input",{name:l.label,type:"radio",value:l.value,checked:c===l.value||""===c&&l.checked,onChange:()=>d(l.value),disabled:a||l.disabled}),e.createElement("div",{className:"uil-checkmark uil-radio-check",style:{backgroundColor:t}})),e.createElement("span",{className:"uil-font-base"},l.label));var r})))}export{p as CustomButton,m as CustomCheckBox,w as CustomInput,A as CustomRadio,N as NotifyModal,y as PasswordInput,k as PasswordRuleTypes,L as QuestionModal,h as SVG,f as useClickOutsideRef,c as useGetColor};
2
+ //# sourceMappingURL=bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.js","sources":["../src/utils/useInjectStyles.ts","../src/hooks/getColor.ts","../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","../src/components/radio/customRadio.tsx","../src/utils/generateKey.ts"],"sourcesContent":["import {RefObject, useEffect} from \"react\";\nimport styles from \"./styles.scss\";\n\nconst injectedStyles: Document[] = [];\n\nexport default function useInjectStyleSheet(nodeRef: RefObject<HTMLElement>): void {\n useEffect(() => {\n const parentDocument = nodeRef.current ? nodeRef.current.ownerDocument : document;\n\n if (typeof parentDocument !== \"undefined\" && !injectedStyles.includes(parentDocument)) {\n const styleElement = parentDocument.createElement(\"style\");\n\n styleElement.innerHTML = styles;\n injectedStyles.push(parentDocument);\n\n parentDocument.head.appendChild(styleElement);\n }\n }, []);\n}","export function useGetColor(backgroundColor: string) {\n if (backgroundColor.length !== 7) throw new Error('provided hex color must be 7 characters (including #) long');\n\n backgroundColor = backgroundColor.substring(1, 7);\n const uiColors = [\n parseInt(backgroundColor.substring(0, 2), 16) / 255,\n parseInt(backgroundColor.substring(2, 4), 16) / 255,\n parseInt(backgroundColor.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 contrast = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);\n\n return contrast > 0.179 ? '#000000' : '#ffffff';\n}","import React, {ComponentPropsWithoutRef, CSSProperties, useRef} from 'react';\nimport useInjectStyleSheet from \"utils/useInjectStyles\";\nimport {useGetColor} from 'hooks/getColor';\n\ntype HEXColor = `#${string}`\n\ninterface ICustomButton extends ComponentPropsWithoutRef<'button'> {\n label : string;\n disabled?: boolean;\n small? : boolean;\n theme? : HEXColor | 'success' | 'warning' | 'error';\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 const nodeRef = useRef<HTMLButtonElement>(null);\n useInjectStyleSheet(nodeRef);\n\n function getStyle(): CSSProperties | undefined {\n if (disabled || !theme) return undefined;\n\n if (theme.includes('#')) {\n return {\n color: useGetColor(theme),\n backgroundColor: theme,\n border: 'transparent'\n };\n }\n\n switch (theme) {\n case 'success':\n return {\n color: useGetColor('#006A4E'),\n backgroundColor: '#006A4E',\n border: 'transparent'\n };\n case 'warning':\n return {\n color: '#000000',\n backgroundColor: '#FFD700',\n border: 'transparent'\n };\n case 'error':\n return {\n color: useGetColor('#800020'),\n backgroundColor: '#800020',\n border: 'transparent'\n };\n default:\n throw new Error('invalid theme provided')\n }\n }\n\n function getClassName(): string {\n const base = 'uil-button uil-fit'\n\n if (disabled && !small) {\n return `${base} uil-font-base uil-disabled`;\n }\n\n if (disabled && small) {\n return `${base} uil-disabled uil-small`;\n }\n\n if (small) {\n return `${base} uil-small`;\n }\n\n return `${base} uil-font-base`;\n }\n\n return (\n <button className={getClassName()} style={getStyle()} disabled={disabled} {...buttonProps} ref={nodeRef}>\n {label}\n </button>\n );\n}","import React, {ComponentPropsWithoutRef, ReactNode, useRef} from 'react';\nimport useInjectStyleSheet from \"utils/useInjectStyles\";\n\ninterface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {\n checked : boolean;\n label? : string;\n toggleCheck : (value: boolean) => void;\n checkColor? : string;\n children? : ReactNode;\n}\n\nexport function CustomCheckBox(props: ICustomCheckbox) {\n const {\n checkColor,\n checked,\n toggleCheck,\n label,\n children,\n ...checkProps\n } = props;\n\n const nodeRef = useRef<HTMLDivElement>(null);\n useInjectStyleSheet(nodeRef);\n\n return (\n <div className={'uil-check-wrapper'} ref={nodeRef}>\n <label className={'uil-checkbox uil-check'}>\n <input type={'checkbox'} checked={checked} onChange={() => {toggleCheck(!checked)}} {...checkProps}/>\n <div className={'uil-checkmark'} style={{backgroundColor: checkColor}}/>\n </label>\n\n {children ? children : <span onClick={() => toggleCheck(!checked)} style={{cursor: 'pointer', userSelect: 'none'}}>{label}</span>}\n </div>\n );\n}","import React, {ComponentPropsWithoutRef, CSSProperties, useRef} from 'react';\nimport useInjectStyleSheet from \"utils/useInjectStyles\";\n\ninterface ISvgIcon extends ComponentPropsWithoutRef<'svg'>{\n src : string;\n color? : string | undefined;\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 nodeRef = useRef<HTMLDivElement>(null);\n useInjectStyleSheet(nodeRef);\n\n const style: CSSProperties = {\n fill: color,\n height: `${height}px`,\n width: `${width}px`\n }\n\n return (\n <div ref={nodeRef} className={'uil-svg-wrapper'}>\n <svg aria-hidden={true} className={'uil-svg'} style={style}>\n <use href={src}/>\n </svg>\n </div>\n );\n}","import React, {ComponentPropsWithoutRef, useRef} from 'react';\nimport {SVG} from 'components/images/svgIcon';\nimport useInjectStyleSheet from \"../../utils/useInjectStyles\";\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 const nodeRef = useRef<HTMLLabelElement>(null);\n useInjectStyleSheet(nodeRef);\n\n return (\n <label className={'uil-input-wrapper'} htmlFor={inputProps.id} ref={nodeRef}>\n <input\n className={'uil-input uil-font-base'}\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 uil-font-base'} style={{color: inputColor}}>{label}</span>\n </label>\n );\n}","import {useEffect, useRef} from 'react';\n\nexport function useClickOutsideRef<T extends HTMLElement>(callback: () => void) {\n const ref = useRef<T>(null);\n\n useEffect(() => {\n if (!ref.current) return;\n\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 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 {useClickOutsideRef} from 'hooks/clickOutside';\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 = useClickOutsideRef<HTMLDivElement>(closeTooltip);\n\n function closeTooltip() {\n setTooltipVisible(false);\n }\n\n return (\n <>\n {tooltipIcon ?\n <div className={'uil-tooltip-wrapper'} ref={ref}>\n {tooltipVisible &&\n <div className={'uil-tooltip'}>\n {tooltipClose &&\n <button className={'uil-tooltip-button uil-fit'} onClick={closeTooltip}>\n {tooltipClose}\n </button>\n }\n\n <span>{tooltipText}</span>\n </div>\n }\n\n <div className={'uil-tooltip-icon uil-fit'} 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 = 1,\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';\n\ninterface IPasswordInput extends ICustomInput {\n ruleChecked : string;\n rules : PasswordRule[];\n ruleUnchecked : string;\n capsLockWarning?: string;\n setFailedRules? : (value: PasswordRule[]) => void;\n}\n\nexport interface PasswordRule {\n label : string;\n count? : number;\n type? : PasswordRuleTypes;\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 if (!capsLockWarning) return;\n\n function setCapsLockState(event: globalThis.KeyboardEvent) {\n setCapsLock(event.getModifierState?.('CapsLock'));\n }\n\n document.addEventListener('keydown', setCapsLockState);\n\n return () => document.removeEventListener('keydown', setCapsLockState);\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): boolean {\n let pattern: string;\n\n if (rule.type) {\n if (!rule.count) throw new Error('count must not be empty if a type is provided');\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 throw new Error('unrecognized rule type provided');\n }\n } else {\n pattern = rule.pattern ? rule.pattern : '';\n }\n\n if (pattern === '') throw new Error('pattern must not be an empty string');\n\n const reg = new RegExp(pattern);\n return reg.test(props.value);\n }\n\n return (\n <>\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 </>\n );\n}","export enum ModalType {\n error = 'error',\n question = 'question',\n success = 'success',\n warning = 'warning',\n}","import React, {useEffect, useRef} from 'react';\nimport {ModalType} from 'enums/modalType';\nimport {CustomButton} from 'components/button/customButton';\nimport useInjectStyleSheet from \"utils/useInjectStyles\";\n\ninterface IBaseModal {\n close : () => void;\n message : string | string[];\n title : string;\n type : ModalType;\n callback? : (() => void) | undefined;\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 callback,\n cancelLabel = '',\n close,\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n let timer: NodeJS.Timeout | undefined = undefined;\n const nodeRef = useRef<HTMLDivElement>(null);\n useInjectStyleSheet(nodeRef);\n\n useEffect(() => {\n if (!timeout) return;\n\n timer = setTimeout(() => {\n return callback ? callback() : close();\n }, timeout);\n\n return () => clearTimeout(timer);\n },[]);\n\n function setHeaderClass() {\n const base = 'uil-header';\n\n switch (type) {\n case ModalType.error:\n return `${base} uil-error`;\n case ModalType.success:\n return `${base} uil-success`;\n case ModalType.warning:\n return `${base} uil-warning`;\n default:\n return base;\n }\n }\n\n //run callback if timeout and callback are set, otherwise close\n function handleClose() {\n clearTimeout(timer);\n timeout && callback ? callback() : close();\n }\n\n return (\n <div className={'uil-modal-wrapper'} ref={nodeRef}>\n <div className={'uil-modal'}>\n <div className={setHeaderClass()}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(timeout / 1000) + .5}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) => <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?? ''} onClick={handleClose} type={'button'}/>\n }\n\n {type == ModalType.question && props.confirm &&\n <>\n <CustomButton label={confirmLabel} theme={'#00416A'} onClick={confirm} type={'button'}/>\n <CustomButton label={cancelLabel} onClick={close} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/modalType';\n\nexport interface INotifyModal {\n close : () => void;\n closeLabel: string;\n modalType : 'success' | 'warning' | 'error';\n message : string | string[];\n title : string;\n callback? : (() => void) | undefined;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n modalType,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={modalType as ModalType} {...modalProps}/>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/modalType';\n\nexport interface IQuestionModal {\n cancel : () => void;\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n cancel,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} close={cancel} {...modalProps}/>\n );\n}","import React, {useEffect, useRef} from 'react';\nimport generateKey from 'utils/generateKey';\nimport useInjectStyleSheet from \"utils/useInjectStyles\";\n\ninterface ICustomRadio {\n options : RadioOption[];\n value : string;\n valueChanged: (value: string) => void;\n checkColor? : string;\n disabled? : boolean;\n label? : string;\n}\n\nexport interface RadioOption {\n label : string;\n value : string;\n checked? : boolean;\n disabled?: boolean;\n}\n\nexport function CustomRadio(props: ICustomRadio) {\n const {\n checkColor,\n disabled,\n label,\n options,\n value,\n valueChanged,\n } = props;\n\n const nodeRef = useRef<HTMLDivElement>(null);\n useInjectStyleSheet(nodeRef);\n\n useEffect(() => {\n // prevents multiple radio options being checked at the same time\n options.forEach(option => {\n if (option.checked) handleRadioChange(option.value);\n });\n },[]);\n\n function handleRadioChange(newValue: string) {\n if (value === newValue) return;\n\n valueChanged(newValue);\n }\n\n return (\n <div ref={nodeRef}>\n {label && <div className={'uil-radio-title'}>{label}</div>}\n\n <div className={'uil-radio-wrapper'}>\n {options.map((option, idx) =>\n <div key={generateKey(idx)} className={'uil-radio-option'}>\n <label className={'uil-radio uil-check'}>\n <input\n name={option.label}\n type={'radio'}\n value={option.value}\n checked={value === option.value || value === '' && option.checked}\n onChange={() => handleRadioChange(option.value)}\n disabled={disabled? disabled : option.disabled}\n />\n <div className={'uil-checkmark uil-radio-check'} style={{backgroundColor: checkColor}}/>\n </label>\n\n <span className={'uil-font-base'}>{option.label}</span>\n </div>\n )}\n </div>\n </div>\n );\n}","export default function generateKey(prefix: string | number) {\n return `${prefix}-${new Date().getTime()}`;\n}"],"names":["injectedStyles","useInjectStyleSheet","nodeRef","useEffect","parentDocument","current","ownerDocument","document","includes","styleElement","createElement","innerHTML","styles","push","head","appendChild","useGetColor","backgroundColor","length","Error","substring","c","parseInt","map","col","Math","pow","_excluded","CustomButton","props","disabled","label","small","theme","buttonProps","_objectWithoutPropertiesLoose","useRef","React","_extends","className","base","getClassName","style","color","border","getStyle","ref","CustomCheckBox","checkColor","checked","toggleCheck","children","checkProps","type","onChange","onClick","cursor","userSelect","SVG","src","height","width","fill","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","htmlFor","id","e","target","value","placeholder","useClickOutsideRef","callback","addEventListener","handleClickOutside","removeEventListener","event","contains","CustomInput","tooltipClose","tooltipIcon","tooltipText","tooltipVisible","setTooltipVisible","useState","closeTooltip","Fragment","PasswordRuleTypes","PasswordInput","capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules","capsLock","setCapsLock","checkRule","rule","pattern","count","minLength","maxLength","letters","numbers","special","upper","RegExp","test","failedRules","forEach","validateInput","setCapsLockState","getModifierState","idx","key","ModalType","BaseModal","cancelLabel","close","closeLabel","confirm","confirmLabel","message","timeout","title","timer","setTimeout","clearTimeout","error","success","warning","setHeaderClass","animationDuration","Array","isArray","m","question","NotifyModal","modalType","modalProps","QuestionModal","cancel","CustomRadio","options","handleRadioChange","newValue","option","prefix","Date","getTime","name"],"mappings":"2pRAGA,MAAMA,EAA6B,GAEX,SAAAC,EAAoBC,GAC1CC,EAAU,KACR,MAAMC,EAAiBF,EAAQG,QAAUH,EAAQG,QAAQC,cAAgBC,SAEzE,QAA8B,IAAnBH,IAAmCJ,EAAeQ,SAASJ,GAAiB,CACrF,MAAMK,EAAeL,EAAeM,cAAc,SAElDD,EAAaE,UAAYC,EACzBZ,EAAea,KAAKT,GAEpBA,EAAeU,KAAKC,YAAYN,EAClC,GACC,GACL,UClBgBO,EAAYC,GAC1B,GAA+B,IAA3BA,EAAgBC,OAAc,UAAUC,MAAM,8DAElDF,EAAkBA,EAAgBG,UAAU,EAAG,GAC/C,MAKMC,EALW,CACfC,SAASL,EAAgBG,UAAU,EAAG,GAAI,IAAM,IAChDE,SAASL,EAAgBG,UAAU,EAAG,GAAI,IAAM,IAChDE,SAASL,EAAgBG,UAAU,EAAG,GAAI,IAAM,KAE/BG,IAAIC,GACdA,GAAO,OAAUA,EAAM,MAASC,KAAKC,KAAKF,EAAM,MAAS,MAAO,MAIzE,MAFkB,MAASH,EAAE,GAAO,MAASA,EAAE,GAAO,MAASA,EAAE,GAE/C,KAAQ,UAAY,SACxC,CCfA,MAAAM,EAAA,CAAA,WAAA,QAAA,QAAA,SAaM,SAAUC,EAAaC,GAC3B,MAAMC,SACJA,GAAW,EAAKC,MAChBA,EAAKC,MACLA,GAAQ,EAAKC,MACbA,GAEEJ,EADCK,EAAWC,EACZN,EAAKF,G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2
- import './button.scss';
2
+ type HEXColor = `#${string}`;
3
3
  interface ICustomButton extends ComponentPropsWithoutRef<'button'> {
4
4
  label: string;
5
5
  disabled?: boolean;
6
6
  small?: boolean;
7
- theme?: string;
7
+ theme?: HEXColor | 'success' | 'warning' | 'error';
8
8
  }
9
9
  export declare function CustomButton(props: ICustomButton): React.JSX.Element;
10
10
  export {};
@@ -1,9 +1,8 @@
1
1
  import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- import './checkbox.scss';
3
2
  interface ICustomCheckbox extends ComponentPropsWithoutRef<'input'> {
4
3
  checked: boolean;
5
4
  label?: string;
6
- onCheck: (value: boolean) => void;
5
+ toggleCheck: (value: boolean) => void;
7
6
  checkColor?: string;
8
7
  children?: ReactNode;
9
8
  }
@@ -1,5 +1,4 @@
1
1
  import React, { ComponentPropsWithoutRef } from 'react';
2
- import './images.scss';
3
2
  interface ISvgIcon extends ComponentPropsWithoutRef<'svg'> {
4
3
  src: string;
5
4
  color?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import React, { ComponentPropsWithoutRef } from 'react';
2
- import './input.scss';
3
2
  export interface IBaseInput extends ComponentPropsWithoutRef<'input'> {
4
3
  label: string;
5
4
  value: string;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { IBaseInput } from './baseInput';
3
- import './input.scss';
4
3
  export interface ICustomInput extends IBaseInput {
5
4
  tooltipClose?: string;
6
5
  tooltipIcon?: string;
@@ -1,18 +1,17 @@
1
1
  import React from 'react';
2
2
  import { ICustomInput } from './customInput';
3
3
  import { PasswordRuleTypes } from 'enums/passwordRuleTypes';
4
- import './input.scss';
5
4
  interface IPasswordInput extends ICustomInput {
6
- capsLockWarning: string;
7
- setFailedRules: (value: PasswordRule[]) => void;
8
5
  ruleChecked: string;
9
6
  rules: PasswordRule[];
10
7
  ruleUnchecked: string;
8
+ capsLockWarning?: string;
9
+ setFailedRules?: (value: PasswordRule[]) => void;
11
10
  }
12
11
  export interface PasswordRule {
13
- count: number;
14
12
  label: string;
15
- type: PasswordRuleTypes | string;
13
+ count?: number;
14
+ type?: PasswordRuleTypes;
16
15
  pattern?: string;
17
16
  }
18
17
  export declare function PasswordInput(props: IPasswordInput): React.JSX.Element;
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { ModalType } from 'enums/ModalType';
3
- import './modal.scss';
2
+ import { ModalType } from 'enums/modalType';
4
3
  interface IBaseModal {
5
4
  close: () => void;
6
5
  message: string | string[];
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ interface ICustomRadio {
3
+ options: RadioOption[];
4
+ value: string;
5
+ valueChanged: (value: string) => void;
6
+ checkColor?: string;
7
+ disabled?: boolean;
8
+ label?: string;
9
+ }
10
+ export interface RadioOption {
11
+ label: string;
12
+ value: string;
13
+ checked?: boolean;
14
+ disabled?: boolean;
15
+ }
16
+ export declare function CustomRadio(props: ICustomRadio): React.JSX.Element;
17
+ export {};
@@ -0,0 +1 @@
1
+ export * from './customRadio';
@@ -1,8 +1,8 @@
1
1
  export declare enum PasswordRuleTypes {
2
- minLength = 0,
3
- maxLength = 1,
4
- letters = 2,
5
- numbers = 3,
6
- special = 4,
7
- upper = 5
2
+ minLength = 1,
3
+ maxLength = 2,
4
+ letters = 3,
5
+ numbers = 4,
6
+ special = 5,
7
+ upper = 6
8
8
  }
@@ -1 +1 @@
1
- export declare function useOutsideClick(callback: () => void): import("react").RefObject<HTMLDivElement>;
1
+ export declare function useClickOutsideRef<T extends HTMLElement>(callback: () => void): import("react").RefObject<T>;
@@ -0,0 +1 @@
1
+ export declare function useGetColor(backgroundColor: string): "#000000" | "#ffffff";
@@ -1 +1,2 @@
1
1
  export * from './clickOutside';
2
+ export * from './getColor';
package/dist/index.d.ts CHANGED
@@ -3,5 +3,6 @@ export { CustomCheckBox } from './components/checkbox/index';
3
3
  export { SVG } from './components/images/index';
4
4
  export { CustomInput, PasswordInput, PasswordRule } from './components/input/index';
5
5
  export { NotifyModal, QuestionModal } from './components/modal/index';
6
- export { useOutsideClick } from './hooks/index';
6
+ export { CustomRadio, RadioOption } from './components/radio/index';
7
+ export { useClickOutsideRef, useGetColor } from './hooks/index';
7
8
  export { PasswordRuleTypes } from './enums/index';
@@ -0,0 +1 @@
1
+ export default function generateKey(prefix: string | number): string;
@@ -0,0 +1,2 @@
1
+ import { RefObject } from "react";
2
+ export default function useInjectStyleSheet(nodeRef: RefObject<HTMLElement>): void;
package/package.json CHANGED
@@ -1,63 +1,37 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@hbuesing/ui-library",
4
- "version": "2.0.3",
4
+ "version": "3.0.1",
5
5
  "description": "Collection of reusable ui components for react based applications",
6
6
  "source": "src/index.ts",
7
- "main": "dist/index.js",
8
- "module": "dist/index.mjs",
7
+ "type": "module",
8
+ "exports": "./dist/bundle.js",
9
9
  "types": "dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "require": "./dist/index.js",
13
- "types": "./dist/index.d.ts",
14
- "default": "./dist/index.modern.mjs"
15
- },
16
- "./dist/*.css": {
17
- "import": "./dist/index.css",
18
- "require": "./dist/index.css"
19
- }
20
- },
21
10
  "files": [
22
11
  "dist/*"
23
12
  ],
24
13
  "scripts": {
25
14
  "clean": "rimraf ./dist && mkdir dist",
26
15
  "lint": "eslint src",
27
- "lint:prod": "eslint src --max-warnings 0",
28
- "build": "microbundle build --jsx react --globals react/jsx-runtime=jsxRuntime",
29
- "dev": "microbundle -w --jsx react",
16
+ "lint:nw": "eslint src --max-warnings 0",
17
+ "build": "microbundle build --output ./dist/bundle.js --generateTypes true --format modern --jsx react --globals react/jsx-runtime=jsxRuntime --css inline",
18
+ "build:uil": "microbundle build --output ../website/src/uil-bundle/bundle.mjs --no-pkg-main --generateTypes true --format modern --jsx react --globals react/jsx-runtime=jsxRuntime --css inline",
19
+ "dev": "microbundle -w --output ./dist/bundle.mjs --no-pkg-main --generateTypes true --format modern --jsx react --globals react/jsx-runtime=jsxRuntime --css inline",
30
20
  "stats": "microbundle --visualize"
31
21
  },
32
- "author": "Henrik Buesing",
33
22
  "license": "MIT",
34
- "homepage": "https://github.com/HenrikBuesing/ui-library/tree/main#README.md",
23
+ "homepage": "https://hb-ui-library-docs.vercel.app",
35
24
  "bugs": "https://github.com/HenrikBuesing/ui-library/issues",
36
25
  "repository": {
37
26
  "type": "git",
38
- "url": "https://github.com/HenrikBuesing/ui-library.git"
27
+ "url": "https://github.com/HenrikBuesing/ui-library.git",
28
+ "directory": "ui-library"
39
29
  },
40
30
  "peerDependencies": {
41
31
  "react": "^18.0.0"
42
32
  },
43
33
  "devDependencies": {
44
- "@eslint/compat": "^1.0.3",
45
- "@eslint/js": "^9.5.0",
46
- "@types/react": "^18.3.3",
47
- "eslint": "^8.57.0",
48
- "eslint-plugin-react": "^7.34.3",
49
- "globals": "^15.6.0",
50
34
  "microbundle": "^0.15.1",
51
- "react": "^18.3.1",
52
- "rimraf": "^5.0.7",
53
- "sass": "^1.77.6",
54
- "typescript": "^5.5.2",
55
- "typescript-eslint": "^7.14.1"
56
- },
57
- "keywords": [
58
- "next",
59
- "react",
60
- "ui",
61
- "ui-library"
62
- ]
35
+ "rimraf": "^6.0.1"
36
+ }
63
37
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 - present Henrik Buesing
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/dist/index.css DELETED
@@ -1,2 +0,0 @@
1
- .uil-button{background-color:var(--uil-white);border:1px solid var(--uil-black);border-radius:2px;box-shadow:0 0 3px 0 var(--uil-black-alt);color:var(--uil-black);cursor:pointer;font-size:var(--uil-font-base);letter-spacing:1px;line-height:var(--uil-font-base);padding:var(--uil-xs) var(--uil-s);width:-moz-fit-content;width:fit-content}.uil-button.uil-disabled{background-color:var(--uil-grey-dark);border:transparent;color:var(--uil-grey)}.uil-button.uil-small{font-size:var(--uil-m);line-height:var(--uil-m);padding:var(--uil-xxs) var(--uil-xs)}@media (min-width:1025px){.uil-button.uil-small{font-size:1.125rem;line-height:1.125rem;padding:var(--uil-xs) var(--uil-s)}}.uil-check-wrapper{align-items:center;display:flex;font-size:var(--uil-font-base);gap:var(--uil-s);line-height:var(--uil-font-base)}.uil-check-wrapper .uil-checkbox{border:2px solid var(--uil-black-alt);border-radius:2px;cursor:pointer;display:block;font-size:var(--uil-m);min-height:var(--uil-m);min-width:var(--uil-m);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.uil-check-wrapper .uil-checkbox input{cursor:pointer;height:0;opacity:0;position:absolute;width:0}.uil-check-wrapper .uil-checkbox input:checked~.uil-checkmark{transform:scale(1)}.uil-check-wrapper .uil-checkbox .uil-checkmark{background-color:var(--uil-black-alt);height:var(--uil-xs);left:25%;position:absolute;top:25%;transform:scale(0);transition:.1s ease;width:var(--uil-xs)}.uil-svg{height:var(--uil-xxxl);width:var(--uil-xxxl)}.uil-input-wrapper{display:block;position:relative}.uil-input-wrapper .uil-label{background:linear-gradient(0deg,var(--uil-white) 9px,transparent 0);cursor:text;font-weight:700;left:var(--uil-xxs);opacity:.6;padding:0 var(--uil-xxxs);position:absolute;top:25%;transition:top .25s ease-in-out}.uil-input-wrapper .uil-input,.uil-input-wrapper .uil-label{color:var(--uil-black);font-size:var(--uil-font-base);line-height:var(--uil-font-base)}.uil-input-wrapper .uil-input{background-color:var(--uil-white);border:1px solid var(--uil-black);border-radius:0;box-sizing:border-box;padding:var(--uil-xs);width:100%}.uil-input-wrapper .uil-input::-moz-placeholder{color:transparent;height:0;width:0}.uil-input-wrapper .uil-input::placeholder{color:transparent;height:0;width:0}.uil-input-wrapper .uil-input:focus{outline:1px solid var(--uil-outline-focus)}.uil-input-wrapper .uil-input:disabled{background-color:var(--uil-grey);border:2px solid var(--uil-outline-disabled);color:var(--uil-grey-dark);cursor:not-allowed}.uil-input-wrapper .uil-input:disabled~.uil-label{background:transparent;color:var(--uil-grey-dark);cursor:not-allowed}.uil-input-wrapper .uil-input:disabled~.uil-icon{fill:var(--uil-grey-dark);cursor:not-allowed}.uil-input-wrapper .uil-input:disabled:not(:-moz-placeholder-shown)~.uil-label{background:linear-gradient(0deg,var(--uil-grey) 8px,transparent 0)}.uil-input-wrapper .uil-input:disabled:not(:placeholder-shown)~.uil-label{background:linear-gradient(0deg,var(--uil-grey) 8px,transparent 0)}.uil-input-wrapper .uil-icon{fill:var(--uil-black);opacity:.5;position:absolute;right:var(--uil-xs);top:50%;transform:translateY(-50%)}.uil-input-wrapper .uil-input:not(:-moz-placeholder-shown)~.uil-label{opacity:1;top:-30%}.uil-input-wrapper .uil-input:focus~.uil-label,.uil-input-wrapper .uil-input:not(:placeholder-shown)~.uil-label{opacity:1;top:-30%}.uil-input-wrapper .uil-input:not(:-moz-placeholder-shown)~.uil-icon{opacity:1}.uil-input-wrapper .uil-input:focus~.uil-icon,.uil-input-wrapper .uil-input:not(:placeholder-shown)~.uil-icon{opacity:1}.uil-tooltip-wrapper{position:relative}.uil-tooltip-wrapper .uil-tooltip-icon{fill:var(--uil-black-alt);cursor:pointer;height:-moz-fit-content;height:fit-content;width:-moz-fit-content;width:fit-content}.uil-tooltip-wrapper .uil-tooltip-icon:has(~.uil-input-wrapper>.uil-input:not(:-moz-placeholder-shown),~.uil-input-wrapper:focus-within){visibility:hidden}.uil-tooltip-wrapper .uil-tooltip-icon:has(~.uil-input-wrapper>.uil-input:not(:placeholder-shown),~.uil-input-wrapper:focus-within){visibility:hidden}.uil-tooltip-wrapper .uil-tooltip{background-color:rgba(34,34,34,.9);border-radius:3px;box-sizing:border-box;color:var(--uil-white);font-size:var(--uil-font-small);left:0;line-height:var(--uil-font-small);padding:var(--uil-s);position:absolute;top:0;width:100%;z-index:1}.uil-tooltip-wrapper .uil-tooltip .uil-tooltip-button{background-color:transparent;border:none;border-bottom:1px solid var(--uil-white);color:var(--uil-white);cursor:pointer;display:block;margin-bottom:var(--uil-m);margin-left:auto;padding:0;width:-moz-fit-content;width:fit-content}.uil-password-rules{display:flex;flex-direction:column;gap:var(--uil-xs);margin-left:var(--uil-xs);margin-top:var(--uil-m)}.uil-password-rules .uil-password-rule{align-items:center;display:flex;font-size:var(--uil-font-small);gap:var(--uil-xxs);line-height:var(--uil-font-small)}:root{--uil-black:#000;--uil-black-alt:#222;--uil-white:#fff;--uil-grey:#f3f3f3;--uil-grey-alt:#cfcfcf;--uil-grey-dark:#878787;--uil-outline-focus:#1e90ff;--uil-outline-disabled:#8b0000;--uil-success:#006a4e;--uil-error:#800020;--uil-question:#00416a;--uil-warning:gold;--uil-xxxs:.125rem;--uil-xxs:.25rem;--uil-xs:.5rem;--uil-s:.75rem;--uil-m:1rem;--uil-l:1.25rem;--uil-xl:1.5rem;--uil-xxl:1.75rem;--uil-xxxl:2rem;--uil-font-base:var(--uil-l);--uil-font-small:var(--uil-m)}.uil-modal-wrapper{background-color:rgba(0,0,0,.5);height:100%;left:0;position:fixed;top:0;width:100%;z-index:99}.uil-modal-wrapper .uil-modal{border-radius:5px;box-shadow:0 0 6px 0 var(--uil-black);left:50%;position:absolute;top:30%;transform:translateX(-50%);width:95%;z-index:999}@media (min-width:1025px){.uil-modal-wrapper .uil-modal{width:75%}}@media (min-width:1250px){.uil-modal-wrapper .uil-modal{width:55%}}@media (min-width:1920px){.uil-modal-wrapper .uil-modal{width:35%}}.uil-modal-wrapper .uil-modal .uil-progress-wrapper{background-color:var(--uil-grey-alt)}.uil-modal-wrapper .uil-modal .uil-progress-wrapper .uil-progress-bar{animation-duration:2s;animation-iteration-count:1;animation-name:uil-progress;border:2px solid var(--uil-grey-dark)}@keyframes uil-progress{0%{width:100%}to{width:0}}.uil-modal-wrapper .uil-modal .uil-header{background-color:var(--uil-question);border-top-left-radius:3px;border-top-right-radius:3px;color:var(--uil-white);display:flex;font-size:var(--uil-xl);font-weight:700;justify-content:space-between;line-height:var(--uil-xl);margin:0;min-height:var(--uil-xl);padding:var(--uil-xs)}@media (min-width:1025px){.uil-modal-wrapper .uil-modal .uil-header{font-size:var(--uil-xxl);line-height:var(--uil-xxl);padding:var(--uil-s)}}.uil-modal-wrapper .uil-modal .uil-header.uil-success{background-color:var(--uil-success)}.uil-modal-wrapper .uil-modal .uil-header.uil-error{background-color:var(--uil-error)}.uil-modal-wrapper .uil-modal .uil-header.uil-warning{background-color:var(--uil-warning);color:var(--uil-black)}.uil-modal-wrapper .uil-modal .uil-content{background-color:var(--uil-white);border-bottom-left-radius:3px;border-bottom-right-radius:3px;display:flex;flex-direction:column;gap:var(--uil-m);padding:var(--uil-m)}@media (min-width:1025px){.uil-modal-wrapper .uil-modal .uil-content{gap:var(--uil-xxxl);padding:var(--uil-l)}}.uil-modal-wrapper .uil-modal .uil-content .uil-modal-text{color:var(--uil-black);font-size:var(--uil-l);line-height:var(--uil-l);margin:var(--uil-s) 0}@media (min-width:1025px){.uil-modal-wrapper .uil-modal .uil-content .uil-modal-text{font-size:var(--uil-l);line-height:var(--uil-l)}}.uil-modal-wrapper .uil-modal .uil-content .uil-button-wrapper{display:flex;justify-content:space-between}.uil-modal-wrapper .uil-modal .uil-content .uil-button-wrapper.uil-single{justify-content:end}
2
- /*# sourceMappingURL=index.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sources":["button.scss","checkbox.scss","images.scss","input.scss","modal.scss"],"names":[],"mappings":"AA0BA,YAKE,iCAAkC,CAClC,iCAAkC,CAClC,iBAAkB,CAKlB,yCAA0C,CAR1C,sBAAuB,CAKvB,cAAe,CARf,8BAA+B,CAE/B,kBAAmB,CADnB,gCAAiC,CAQjC,kCAAmC,CAFnC,sBAAkB,CAAlB,iBAKF,CACA,yBACE,qCAAsC,CAEtC,kBAAmB,CADnB,qBAEF,CACA,sBACE,sBAAuB,CACvB,wBAAyB,CACzB,oCACF,CACA,0BACE,sBACE,kBAAmB,CACnB,oBAAqB,CACrB,kCACF,CACF,CC9BA,mBAEE,kBAAmB,CADnB,YAAa,CAGb,8BAA+B,CAD/B,gBAAiB,CAEjB,gCACF,CACA,iCAQE,qCAAsC,CACtC,iBAAkB,CANlB,cAAe,CADf,aAAc,CAEd,sBAAuB,CAEvB,uBAAwB,CADxB,sBAAuB,CAJvB,iBAAkB,CAMlB,wBAAiB,CAAjB,qBAAiB,CAAjB,gBAGF,CACA,uCAEE,cAAe,CACf,QAAS,CAET,SAAU,CAJV,iBAAkB,CAGlB,OAEF,CACA,8DACE,kBACF,CACA,gDAIE,qCAAsC,CAEtC,oBAAqB,CAHrB,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAKR,kBAAmB,CACnB,mBAAqB,CAHrB,mBAIF,CCrCA,SACE,sBAAuB,CACvB,qBACF,CCHA,mBAEE,aAAc,CADd,iBAEF,CACA,8BASE,mEAA4E,CAL5E,WAAY,CAEZ,eAAiB,CAHjB,mBAAoB,CAOpB,UAAY,CACZ,yBAA0B,CAV1B,iBAAkB,CAClB,OAAQ,CAUR,+BACF,CACA,4DANE,sBAAuB,CAHvB,8BAA+B,CAE/B,gCAiBF,CAVA,8BAME,iCAAkC,CAClC,iCAAkC,CAClC,eAAgB,CAPhB,qBAAsB,CA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BAAiC,CACjC,qBAAsB,CACtB,mBAAoB,CACpB,sBAAuB,CACvB,kBAAsB,CACtB,kBAAmB,CACnB,gBAAiB,CACjB,cAAe,CACf,cAAe,CACf,YAAa,CACb,eAAgB,CAChB,eAAgB,CAChB,iBAAkB,CAClB,eAAgB,CAChB,4BAA6B,CAC7B,6BACF,CAEA,mBAME,+BAAoC,CADpC,WAAY,CAHZ,MAAO,CADP,cAAe,CAEf,KAAM,CACN,UAAW,CAGX,UACF,CACA,8BAQE,iBAAkB,CADlB,qCAAsC,CAJtC,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,0BAA2B,CAC3B,SAAU,CAIV,WACF,CACA,0BACE,8BACE,SACF,CACF,CACA,0BACE,8BACE,SACF,CACF,CACA,0BACE,8BACE,SACF,CACF,CACA,oDACE,oCACF,CACA,sEAEE,qBAAsB,CACtB,2BAAkC,CAClC,2BAA4B,CAH5B,qCAIF,CACA,wBACE,GACE,UACF,CACA,GACE,OACF,CACF,CACA,0CAEE,oCAAqC,CASrC,0BAA2B,CAC3B,2BAA4B,CAX5B,sBAAuB,CAEvB,YAAa,CAEb,uBAAwB,CAExB,eAAiB,CAHjB,6BAA8B,CAE9B,yBAA0B,CAG1B,QAAS,CADT,wBAAyB,CAEzB,qBAGF,CACA,0BACE,0CACE,wBAAyB,CACzB,0BAA2B,CAC3B,oBACF,CACF,CACA,sDACE,mCACF,CACA,oDACE,iCACF,CACA,sDAEE,mCAAoC,CADpC,sBAEF,CACA,2CACE,iCAAkC,CAElC,6BAA8B,CAC9B,8BAA+B,CAC/B,YAAa,CACb,qBAAsB,CACtB,gBAAiB,CALjB,oBAMF,CACA,0BACE,2CAEE,mBAAoB,CADpB,oBAEF,CACF,CACA,2DAGE,sBAAuB,CAFvB,sBAAuB,CACvB,wBAAyB,CAEzB,qBACF,CACA,0BACE,2DACE,sBAAuB,CACvB,wBACF,CACF,CACA,+DACE,YAAa,CACb,6BACF,CACA,0EACE,mBACF","file":"index.css","sourcesContent":[":root {\n --uil-black: #000000;\n --uil-black-alt: #222222;\n --uil-white: #ffffff;\n --uil-grey: #f3f3f3;\n --uil-grey-alt: #cfcfcf;\n --uil-grey-dark: #878787;\n --uil-outline-focus: #1E90FFFF;\n --uil-outline-disabled: #8B0000FF;\n --uil-success: #006A4E;\n --uil-error: #800020;\n --uil-question: #00416A;\n --uil-warning: #FFD700;\n --uil-xxxs: .125rem;\n --uil-xxs: .25rem;\n --uil-xs: .5rem;\n --uil-s: .75rem;\n --uil-m: 1rem;\n --uil-l: 1.25rem;\n --uil-xl: 1.5rem;\n --uil-xxl: 1.75rem;\n --uil-xxxl: 2rem;\n --uil-font-base: var(--uil-l);\n --uil-font-small: var(--uil-m);\n}\n\n.uil-button {\n font-size: var(--uil-font-base);\n line-height: var(--uil-font-base);\n letter-spacing: 1px;\n color: var(--uil-black);\n background-color: var(--uil-white);\n border: 1px solid var(--uil-black);\n border-radius: 2px;\n width: fit-content;\n cursor: pointer;\n padding: var(--uil-xs) var(--uil-s);\n -webkit-box-shadow: 0 0 3px 0 var(--uil-black-alt);\n box-shadow: 0 0 3px 0 var(--uil-black-alt);\n}\n.uil-button.uil-disabled {\n background-color: var(--uil-grey-dark);\n color: var(--uil-grey);\n border: transparent;\n}\n.uil-button.uil-small {\n font-size: var(--uil-m);\n line-height: var(--uil-m);\n padding: var(--uil-xxs) var(--uil-xs);\n}\n@media (min-width: 1025px) {\n .uil-button.uil-small {\n font-size: 1.125rem;\n line-height: 1.125rem;\n padding: var(--uil-xs) var(--uil-s);\n }\n}",":root {\n --uil-black: #000000;\n --uil-black-alt: #222222;\n --uil-white: #ffffff;\n --uil-grey: #f3f3f3;\n --uil-grey-alt: #cfcfcf;\n --uil-grey-dark: #878787;\n --uil-outline-focus: #1E90FFFF;\n --uil-outline-disabled: #8B0000FF;\n --uil-success: #006A4E;\n --uil-error: #800020;\n --uil-question: #00416A;\n --uil-warning: #FFD700;\n --uil-xxxs: .125rem;\n --uil-xxs: .25rem;\n --uil-xs: .5rem;\n --uil-s: .75rem;\n --uil-m: 1rem;\n --uil-l: 1.25rem;\n --uil-xl: 1.5rem;\n --uil-xxl: 1.75rem;\n --uil-xxxl: 2rem;\n --uil-font-base: var(--uil-l);\n --uil-font-small: var(--uil-m);\n}\n\n.uil-check-wrapper {\n display: flex;\n align-items: center;\n gap: var(--uil-s);\n font-size: var(--uil-font-base);\n line-height: var(--uil-font-base);\n}\n.uil-check-wrapper .uil-checkbox {\n position: relative;\n display: block;\n cursor: pointer;\n font-size: var(--uil-m);\n min-width: var(--uil-m);\n min-height: var(--uil-m);\n user-select: none;\n border: 2px solid var(--uil-black-alt);\n border-radius: 2px;\n}\n.uil-check-wrapper .uil-checkbox input {\n position: absolute;\n cursor: pointer;\n height: 0;\n width: 0;\n opacity: 0;\n}\n.uil-check-wrapper .uil-checkbox input:checked ~ .uil-checkmark {\n transform: scale(1);\n}\n.uil-check-wrapper .uil-checkbox .uil-checkmark {\n position: absolute;\n top: 25%;\n left: 25%;\n background-color: var(--uil-black-alt);\n width: var(--uil-xs);\n height: var(--uil-xs);\n transform: scale(0);\n transition: 0.1s ease;\n}",":root {\n --uil-black: #000000;\n --uil-black-alt: #222222;\n --uil-white: #ffffff;\n --uil-grey: #f3f3f3;\n --uil-grey-alt: #cfcfcf;\n --uil-grey-dark: #878787;\n --uil-outline-focus: #1E90FFFF;\n --uil-outline-disabled: #8B0000FF;\n --uil-success: #006A4E;\n --uil-error: #800020;\n --uil-question: #00416A;\n --uil-warning: #FFD700;\n --uil-xxxs: .125rem;\n --uil-xxs: .25rem;\n --uil-xs: .5rem;\n --uil-s: .75rem;\n --uil-m: 1rem;\n --uil-l: 1.25rem;\n --uil-xl: 1.5rem;\n --uil-xxl: 1.75rem;\n --uil-xxxl: 2rem;\n --uil-font-base: var(--uil-l);\n --uil-font-small: var(--uil-m);\n}\n\n.uil-svg {\n height: var(--uil-xxxl);\n width: var(--uil-xxxl);\n}",":root {\n --uil-black: #000000;\n --uil-black-alt: #222222;\n --uil-white: #ffffff;\n --uil-grey: #f3f3f3;\n --uil-grey-alt: #cfcfcf;\n --uil-grey-dark: #878787;\n --uil-outline-focus: #1E90FFFF;\n --uil-outline-disabled: #8B0000FF;\n --uil-success: #006A4E;\n --uil-error: #800020;\n --uil-question: #00416A;\n --uil-warning: #FFD700;\n --uil-xxxs: .125rem;\n --uil-xxs: .25rem;\n --uil-xs: .5rem;\n --uil-s: .75rem;\n --uil-m: 1rem;\n --uil-l: 1.25rem;\n --uil-xl: 1.5rem;\n --uil-xxl: 1.75rem;\n --uil-xxxl: 2rem;\n --uil-font-base: var(--uil-l);\n --uil-font-small: var(--uil-m);\n}\n\n.uil-input-wrapper {\n position: relative;\n display: block;\n}\n.uil-input-wrapper .uil-label {\n position: absolute;\n top: 25%;\n left: var(--uil-xxs);\n cursor: text;\n font-size: var(--uil-font-base);\n font-weight: bold;\n line-height: var(--uil-font-base);\n color: var(--uil-black);\n background: linear-gradient(0deg, var(--uil-white) 9px, rgba(0, 0, 0, 0) 0%);\n opacity: 0.6;\n padding: 0 var(--uil-xxxs);\n transition: top 0.25s ease-in-out;\n}\n.uil-input-wrapper .uil-input {\n box-sizing: border-box;\n font-size: var(--uil-font-base);\n line-height: var(--uil-font-base);\n width: 100%;\n color: var(--uil-black);\n background-color: var(--uil-white);\n border: 1px solid var(--uil-black);\n border-radius: 0;\n padding: var(--uil-xs);\n}\n.uil-input-wrapper .uil-input::placeholder {\n color: transparent;\n width: 0;\n height: 0;\n}\n.uil-input-wrapper .uil-input:focus {\n outline: 1px solid var(--uil-outline-focus);\n}\n.uil-input-wrapper .uil-input:disabled {\n cursor: not-allowed;\n border: 2px solid var(--uil-outline-disabled);\n background-color: var(--uil-grey);\n color: var(--uil-grey-dark);\n}\n.uil-input-wrapper .uil-input:disabled ~ .uil-label {\n cursor: not-allowed;\n background: transparent;\n color: var(--uil-grey-dark);\n}\n.uil-input-wrapper .uil-input:disabled ~ .uil-icon {\n cursor: not-allowed;\n fill: var(--uil-grey-dark);\n}\n.uil-input-wrapper .uil-input:disabled:not(:placeholder-shown) ~ .uil-label {\n background: linear-gradient(0deg, var(--uil-grey) 8px, rgba(0, 0, 0, 0) 0%);\n}\n.uil-input-wrapper .uil-icon {\n position: absolute;\n top: 50%;\n right: var(--uil-xs);\n transform: translate(0%, -50%);\n fill: var(--uil-black);\n opacity: 0.5;\n}\n.uil-input-wrapper .uil-input:focus ~ .uil-label, .uil-input-wrapper .uil-input:not(:placeholder-shown) ~ .uil-label {\n top: -30%;\n opacity: 1;\n}\n.uil-input-wrapper .uil-input:focus ~ .uil-icon, .uil-input-wrapper .uil-input:not(:placeholder-shown) ~ .uil-icon {\n opacity: 1;\n}\n\n.uil-tooltip-wrapper {\n position: relative;\n}\n.uil-tooltip-wrapper .uil-tooltip-icon {\n cursor: pointer;\n height: fit-content;\n width: fit-content;\n fill: var(--uil-black-alt);\n}\n.uil-tooltip-wrapper .uil-tooltip-icon:has(~ .uil-input-wrapper > .uil-input:not(:placeholder-shown), ~ .uil-input-wrapper:focus-within) {\n visibility: hidden;\n}\n.uil-tooltip-wrapper .uil-tooltip {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n box-sizing: border-box;\n z-index: 1;\n color: var(--uil-white);\n background-color: rgba(34, 34, 34, 0.9);\n padding: var(--uil-s);\n border-radius: 3px;\n font-size: var(--uil-font-small);\n line-height: var(--uil-font-small);\n}\n.uil-tooltip-wrapper .uil-tooltip .uil-tooltip-button {\n display: block;\n width: fit-content;\n margin-left: auto;\n margin-bottom: var(--uil-m);\n color: var(--uil-white);\n background-color: transparent;\n border: none;\n padding: 0;\n border-bottom: 1px solid var(--uil-white);\n cursor: pointer;\n}\n\n.uil-password-rules {\n margin-top: var(--uil-m);\n display: flex;\n flex-direction: column;\n gap: var(--uil-xs);\n margin-left: var(--uil-xs);\n}\n.uil-password-rules .uil-password-rule {\n display: flex;\n align-items: center;\n gap: var(--uil-xxs);\n font-size: var(--uil-font-small);\n line-height: var(--uil-font-small);\n}",":root {\n --uil-black: #000000;\n --uil-black-alt: #222222;\n --uil-white: #ffffff;\n --uil-grey: #f3f3f3;\n --uil-grey-alt: #cfcfcf;\n --uil-grey-dark: #878787;\n --uil-outline-focus: #1E90FFFF;\n --uil-outline-disabled: #8B0000FF;\n --uil-success: #006A4E;\n --uil-error: #800020;\n --uil-question: #00416A;\n --uil-warning: #FFD700;\n --uil-xxxs: .125rem;\n --uil-xxs: .25rem;\n --uil-xs: .5rem;\n --uil-s: .75rem;\n --uil-m: 1rem;\n --uil-l: 1.25rem;\n --uil-xl: 1.5rem;\n --uil-xxl: 1.75rem;\n --uil-xxxl: 2rem;\n --uil-font-base: var(--uil-l);\n --uil-font-small: var(--uil-m);\n}\n\n.uil-modal-wrapper {\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 99;\n}\n.uil-modal-wrapper .uil-modal {\n position: absolute;\n top: 30%;\n left: 50%;\n transform: translateX(-50%);\n width: 95%;\n -webkit-box-shadow: 0 0 6px 0 var(--uil-black);\n box-shadow: 0 0 6px 0 var(--uil-black);\n border-radius: 5px;\n z-index: 999;\n}\n@media (min-width: 1025px) {\n .uil-modal-wrapper .uil-modal {\n width: 75%;\n }\n}\n@media (min-width: 1250px) {\n .uil-modal-wrapper .uil-modal {\n width: 55%;\n }\n}\n@media (min-width: 1920px) {\n .uil-modal-wrapper .uil-modal {\n width: 35%;\n }\n}\n.uil-modal-wrapper .uil-modal .uil-progress-wrapper {\n background-color: var(--uil-grey-alt);\n}\n.uil-modal-wrapper .uil-modal .uil-progress-wrapper .uil-progress-bar {\n border: 2px solid var(--uil-grey-dark);\n animation-duration: 2s;\n animation-iteration-count: initial;\n animation-name: uil-progress;\n}\n@keyframes uil-progress {\n 0% {\n width: 100%;\n }\n 100% {\n width: 0;\n }\n}\n.uil-modal-wrapper .uil-modal .uil-header {\n color: var(--uil-white);\n background-color: var(--uil-question);\n display: flex;\n justify-content: space-between;\n font-size: var(--uil-xl);\n line-height: var(--uil-xl);\n font-weight: bold;\n min-height: var(--uil-xl);\n margin: 0;\n padding: var(--uil-xs);\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n@media (min-width: 1025px) {\n .uil-modal-wrapper .uil-modal .uil-header {\n font-size: var(--uil-xxl);\n line-height: var(--uil-xxl);\n padding: var(--uil-s);\n }\n}\n.uil-modal-wrapper .uil-modal .uil-header.uil-success {\n background-color: var(--uil-success);\n}\n.uil-modal-wrapper .uil-modal .uil-header.uil-error {\n background-color: var(--uil-error);\n}\n.uil-modal-wrapper .uil-modal .uil-header.uil-warning {\n color: var(--uil-black);\n background-color: var(--uil-warning);\n}\n.uil-modal-wrapper .uil-modal .uil-content {\n background-color: var(--uil-white);\n padding: var(--uil-m);\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n display: flex;\n flex-direction: column;\n gap: var(--uil-m);\n}\n@media (min-width: 1025px) {\n .uil-modal-wrapper .uil-modal .uil-content {\n padding: var(--uil-l);\n gap: var(--uil-xxxl);\n }\n}\n.uil-modal-wrapper .uil-modal .uil-content .uil-modal-text {\n font-size: var(--uil-l);\n line-height: var(--uil-l);\n color: var(--uil-black);\n margin: var(--uil-s) 0;\n}\n@media (min-width: 1025px) {\n .uil-modal-wrapper .uil-modal .uil-content .uil-modal-text {\n font-size: var(--uil-l);\n line-height: var(--uil-l);\n }\n}\n.uil-modal-wrapper .uil-modal .uil-content .uil-button-wrapper {\n display: flex;\n justify-content: space-between;\n}\n.uil-modal-wrapper .uil-modal .uil-content .uil-button-wrapper.uil-single {\n justify-content: end;\n}"]}
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=/*#__PURE__*/t(e);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},a.apply(null,arguments)}function n(e,t){if(null==e)return{};var l={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;l[a]=e[a]}return l}var r=["disabled","label","small","theme"];function u(e){var t=e.disabled,u=void 0!==t&&t,c=e.label,o=e.small,s=void 0!==o&&o,i=e.theme,d=n(e,r),f={color:function(){if(i&&!u){if("#"!==i.charAt(0))return"#ffffff";var e=i.substring(1,7),t=[parseInt(e.substring(0,2),16)/255,parseInt(e.substring(2,4),16)/255,parseInt(e.substring(4,6),16)/255].map(function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return.2126*t[0]+.7152*t[1]+.0722*t[2]>.179?"#000000":"#ffffff"}}(),backgroundColor:u?void 0:i,border:i?"none":void 0};return l.default.createElement("button",a({className:"uil-button "+(u?"uil-disabled":"")+" "+(s?"uil-small":""),style:f,disabled:u},d),c)}var c=["checkColor","checked","onCheck","label","children"];function o(e){var t=e.src,a=e.color,n=e.height,r=e.width;if(!t.includes(".svg"))throw new Error("Provided src is not an svg image");return l.default.createElement("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:a,height:n+"px",width:r+"px"}},l.default.createElement("use",{href:t}))}var s=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function i(e){var t=e.iconColor,r=e.iconSrc,u=e.inputColor,c=e.label,i=e.toggle,d=e.valueChanged,f=n(e,s);return l.default.createElement("label",{className:"uil-input-wrapper",htmlFor:f.id},l.default.createElement("input",a({className:"uil-input",onChange:function(e){return d(e.target.value)},placeholder:c,style:{color:u}},f)),r&&l.default.createElement("div",{className:"uil-icon",onClick:i},l.default.createElement(o,{src:r,width:24,height:24,color:t})),l.default.createElement("span",{className:"uil-label",style:{color:u}},c))}function d(t){var l=e.useRef(null);return e.useEffect(function(){function e(e){l.current&&!l.current.contains(e.target)&&t()}return document.addEventListener("click",e),document.addEventListener("touchend",e),function(){document.removeEventListener("click",e),document.removeEventListener("touchend",e)}},[t]),l}var f,m=["tooltipClose","tooltipIcon","tooltipText"];function p(t){var r=t.tooltipClose,u=t.tooltipIcon,c=t.tooltipText,s=n(t,m),f=e.useState(!1),p=f[0],v=f[1],h=d(E);function E(){v(!1)}return l.default.createElement(l.default.Fragment,null,u?l.default.createElement("div",{className:"uil-tooltip-wrapper"},p&&l.default.createElement("div",{className:"uil-tooltip",ref:h},r&&l.default.createElement("button",{className:"uil-tooltip-button",onClick:E},r),l.default.createElement("span",null,c)),l.default.createElement("div",{className:"uil-tooltip-icon",onClick:function(){return v(!p)}},l.default.createElement(o,{src:u,height:16,width:16})),l.default.createElement(i,a({},s))):l.default.createElement(i,a({},s)))}exports.PasswordRuleTypes=void 0,(f=exports.PasswordRuleTypes||(exports.PasswordRuleTypes={}))[f.minLength=0]="minLength",f[f.maxLength=1]="maxLength",f[f.letters=2]="letters",f[f.numbers=3]="numbers",f[f.special=4]="special",f[f.upper=5]="upper";var v,h=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function E(t){var a=t.callback,n=t.cancelLabel,r=void 0===n?"":n,c=t.close,o=t.closeLabel,s=t.confirm,i=t.confirmLabel,d=void 0===i?"":i,f=t.message,m=t.timeout,p=t.title,h=t.type;return e.useEffect(function(){if(m){var e=setTimeout(function(){a&&a(),c()},m);return function(){return clearTimeout(e)}}},[]),l.default.createElement("div",{className:"uil-modal-wrapper"},l.default.createElement("div",{className:"uil-modal"},l.default.createElement("div",{className:function(){switch(h){case v.error:return"uil-header uil-error";case v.success:return"uil-header uil-success";case v.warning:return"uil-header uil-warning";default:return"uil-header"}}()},p),m&&l.default.createElement("div",{className:"uil-progress-wrapper"},l.default.createElement("div",{className:"uil-progress-bar",style:{animationDuration:m/1e3+1+"s"}})),l.default.createElement("div",{className:"uil-content"},l.default.createElement("div",null,Array.isArray(f)?f.map(function(e,t){return l.default.createElement("p",{key:t,className:"uil-modal-text"},e)}):l.default.createElement("p",{className:"uil-modal-text"},f)),l.default.createElement("div",{className:"uil-button-wrapper "+(h!==v.question?"uil-single":"")},h!==v.question&&l.default.createElement(u,{label:null!=o?o:"",small:!0,onClick:c,type:"button"}),h==v.question&&t.confirm&&l.default.createElement(l.default.Fragment,null,l.default.createElement(u,{label:d,theme:"#00416A",small:!0,onClick:s,type:"button"}),l.default.createElement(u,{label:r,small:!0,onClick:c,type:"button"}))))))}!function(e){e.error="error",e.question="question",e.success="success",e.warning="warning"}(v||(v={}));var b=["callback","modalType"],g=["cancel"];exports.CustomButton=u,exports.CustomCheckBox=function(e){var t=e.checkColor,r=e.checked,u=e.onCheck,o=e.label,s=e.children,i=n(e,c);return l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:"uil-check-wrapper"},l.default.createElement("label",{className:"uil-checkbox"},l.default.createElement("input",a({type:"checkbox",checked:r,onChange:function(){u(!r)}},i)),l.default.createElement("div",{className:"uil-checkmark",style:{backgroundColor:t}})),s||l.default.createElement("span",null,o)))},exports.CustomInput=p,exports.NotifyModal=function(e){var t=e.callback,r=e.modalType,u=n(e,b);return l.default.createElement(E,a({type:r},u,{callback:t}))},exports.PasswordInput=function(t){var r=t.capsLockWarning,u=t.rules,c=t.ruleChecked,s=t.ruleUnchecked,i=t.setFailedRules,d=n(t,h),f=e.useState(!1),m=f[0],v=f[1];function E(e){var l;switch(e.type){case exports.PasswordRuleTypes.minLength:l="[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case exports.PasswordRuleTypes.maxLength:l="^[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,"+e.count+"}$";break;case exports.PasswordRuleTypes.letters:l="[a-zA-ZßÄäÖöÜü]{"+e.count+",}";break;case exports.PasswordRuleTypes.numbers:l="[0-9]{"+e.count+",}";break;case exports.PasswordRuleTypes.special:l="[._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case exports.PasswordRuleTypes.upper:l="[A-ZÄÖÜ]{"+e.count+",}";break;default:l=e.pattern?e.pattern:""}if(""===l)throw new Error("pattern must not be an empty string. Checked rule: "+e);return new RegExp(l).test(t.value)}return e.useEffect(function(){var e;e=[],u.forEach(function(t){E(t)||e.push(t)}),i(e)},[t.value]),e.useEffect(function(){function e(e){v(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[]),l.default.createElement(l.default.Fragment,null,l.default.createElement("div",null,l.default.createElement(p,a({},d)),l.default.createElement("div",{className:"uil-password-rules"},m&&l.default.createElement("div",{className:"uil-password-rule"},r),u.map(function(e,t){return l.default.createElement("div",{key:t,className:"uil-password-rule"},l.default.createElement(o,{src:E(e)?c:s,height:12,width:12}),l.default.createElement("span",null,e.label))}))))},exports.QuestionModal=function(e){var t=e.cancel,r=n(e,g);return l.default.createElement(E,a({type:v.question,close:t},r))},exports.SVG=o,exports.useOutsideClick=d;
2
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","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/modal/baseModal.tsx","../src/components/modal/notifyModal.tsx","../src/components/modal/questionModal.tsx","../src/components/input/passwordInput.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() {\n if (!theme || disabled) return undefined;\n if (theme.charAt(0) !== '#') return '#ffffff';\n\n const color = theme.substring(1, 7);\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(),\n backgroundColor: disabled? undefined : theme,\n border: theme? 'none': undefined,\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, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon extends ComponentPropsWithoutRef<'svg'>{\n src : string;\n color? : string | undefined;\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 = 'error',\n question = 'question',\n success = 'success',\n warning = 'warning',\n}","import React, {useEffect} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button/customButton';\nimport './modal.scss';\n\ninterface IBaseModal {\n close : () => void;\n message : string | string[];\n title : string;\n type : ModalType;\n callback? : (() => void) | undefined;\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 callback,\n cancelLabel = '',\n close,\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n useEffect(() => {\n if (!timeout) return;\n\n const t = setTimeout(() => {\n callback && callback();\n\n close();\n }, timeout);\n\n return () => clearTimeout(t);\n },[]);\n\n function setHeaderClass() {\n switch (type) {\n case ModalType.error:\n return 'uil-header uil-error';\n case ModalType.success:\n return 'uil-header uil-success';\n case ModalType.warning:\n return 'uil-header uil-warning';\n default:\n return 'uil-header';\n }\n }\n\n return (\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={setHeaderClass()}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) => <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={close} 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={close} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n close : () => void;\n closeLabel: string;\n modalType : 'success' | 'warning' | 'error';\n message : string | string[];\n title : string;\n callback? : (() => void) | undefined;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n callback,\n modalType,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={modalType as ModalType} {...modalProps} callback={callback}/>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancel : () => void;\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n cancel,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} close={cancel} {...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 () => document.removeEventListener('keydown', setCapsLockState);\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): boolean {\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 === '') throw new Error(`pattern must not be an empty string. Checked rule: ${rule}`);\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}"],"names":["_excluded","CustomButton","props","_props$disabled","disabled","label","_props$small","small","theme","buttonProps","_objectWithoutPropertiesLoose","style","color","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","undefined","border","React","createElement","_extends","className","SVG","src","height","width","includes","Error","fill","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","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","ModalType","BaseModal","_props$cancelLabel","cancelLabel","close","closeLabel","confirm","_props$confirmLabel","confirmLabel","message","timeout","title","type","t","setTimeout","clearTimeout","error","success","warning","setHeaderClass","animationDuration","Array","isArray","m","idx","key","question","checkColor","checked","onCheck","children","checkProps","modalType","modalProps","capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules","capsLock","setCapsLock","checkRule","rule","pattern","minLength","count","maxLength","letters","numbers","special","upper","RegExp","test","failed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D,SAAA,KACEjD,EAAA,QAAAC,cAAA,MAAA,KACED,EAAAA,QAACC,cAAAuC,EAAWtC,EAAKgB,CAAAA,EAAAA,IAEjBlB,EAAK,QAAAC,cAAA,MAAA,CAAAE,UAAW,sBACbsF,GACCzF,EAAAA,QAAAC,cAAA,MAAA,CAAKE,UAAW,qBAAsBiF,GAGvCC,EAAM7F,IAAI,SAACoG,EAAMlB,GAAG,OACnB1E,+BAAK2E,IAAKD,EAAKvE,UAAW,qBACxBH,EAAAA,QAACC,cAAAG,EAAI,CAAAC,IAAKsF,EAAUC,GAAON,EAAcC,EAAejF,OAAQ,GAAIC,MAAO,KAE3EP,EAAAA,QAAOC,cAAA,OAAA,KAAA2F,EAAKhH,OACR,KAMlB,wBDnGgB,SAAcH,GAC5B,IACEmI,EAEEnI,EAFFmI,OACGzB,EAAUlG,EACXR,EAAKF,GAET,OACEyB,EAAAA,QAACC,cAAAkD,EAASjD,EAAC4D,CAAAA,KAAMZ,EAAU0B,SAAUtB,MAAOsD,GAAYzB,GAE5D"}
package/dist/index.mjs DELETED
@@ -1,2 +0,0 @@
1
- import e,{useRef as t,useEffect as n,useState as r}from"react";function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function a(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var c=["disabled","label","small","theme"];function i(t){var n=t.disabled,r=void 0!==n&&n,i=t.label,o=t.small,u=void 0!==o&&o,s=t.theme,m=a(t,c),d={color:function(){if(s&&!r){if("#"!==s.charAt(0))return"#ffffff";var e=s.substring(1,7),t=[parseInt(e.substring(0,2),16)/255,parseInt(e.substring(2,4),16)/255,parseInt(e.substring(4,6),16)/255].map(function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return.2126*t[0]+.7152*t[1]+.0722*t[2]>.179?"#000000":"#ffffff"}}(),backgroundColor:r?void 0:s,border:s?"none":void 0};return e.createElement("button",l({className:"uil-button "+(r?"uil-disabled":"")+" "+(u?"uil-small":""),style:d,disabled:r},m),i)}var o=["checkColor","checked","onCheck","label","children"];function u(t){var n=t.checkColor,r=t.checked,c=t.onCheck,i=t.label,u=t.children,s=a(t,o);return e.createElement(e.Fragment,null,e.createElement("div",{className:"uil-check-wrapper"},e.createElement("label",{className:"uil-checkbox"},e.createElement("input",l({type:"checkbox",checked:r,onChange:function(){c(!r)}},s)),e.createElement("div",{className:"uil-checkmark",style:{backgroundColor:n}})),u||e.createElement("span",null,i)))}function s(t){var n=t.src,r=t.color,l=t.height,a=t.width;if(!n.includes(".svg"))throw new Error("Provided src is not an svg image");return e.createElement("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:r,height:l+"px",width:a+"px"}},e.createElement("use",{href:n}))}var m=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function d(t){var n=t.iconColor,r=t.iconSrc,c=t.inputColor,i=t.label,o=t.toggle,u=t.valueChanged,d=a(t,m);return e.createElement("label",{className:"uil-input-wrapper",htmlFor:d.id},e.createElement("input",l({className:"uil-input",onChange:function(e){return u(e.target.value)},placeholder:i,style:{color:c}},d)),r&&e.createElement("div",{className:"uil-icon",onClick:o},e.createElement(s,{src:r,width:24,height:24,color:n})),e.createElement("span",{className:"uil-label",style:{color:c}},i))}function p(e){var r=t(null);return n(function(){function t(t){r.current&&!r.current.contains(t.target)&&e()}return document.addEventListener("click",t),document.addEventListener("touchend",t),function(){document.removeEventListener("click",t),document.removeEventListener("touchend",t)}},[e]),r}var f,v=["tooltipClose","tooltipIcon","tooltipText"];function h(t){var n=t.tooltipClose,c=t.tooltipIcon,i=t.tooltipText,o=a(t,v),u=r(!1),m=u[0],f=u[1],h=p(E);function E(){f(!1)}return e.createElement(e.Fragment,null,c?e.createElement("div",{className:"uil-tooltip-wrapper"},m&&e.createElement("div",{className:"uil-tooltip",ref:h},n&&e.createElement("button",{className:"uil-tooltip-button",onClick:E},n),e.createElement("span",null,i)),e.createElement("div",{className:"uil-tooltip-icon",onClick:function(){return f(!m)}},e.createElement(s,{src:c,height:16,width:16})),e.createElement(d,l({},o))):e.createElement(d,l({},o)))}!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"}(f||(f={}));var E,b=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function g(t){var c=t.capsLockWarning,i=t.rules,o=t.ruleChecked,u=t.ruleUnchecked,m=t.setFailedRules,d=a(t,b),p=r(!1),v=p[0],E=p[1];function g(e){var n;switch(e.type){case f.minLength:n="[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case f.maxLength:n="^[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,"+e.count+"}$";break;case f.letters:n="[a-zA-ZßÄäÖöÜü]{"+e.count+",}";break;case f.numbers:n="[0-9]{"+e.count+",}";break;case f.special:n="[._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+e.count+",}";break;case f.upper:n="[A-ZÄÖÜ]{"+e.count+",}";break;default:n=e.pattern?e.pattern:""}if(""===n)throw new Error("pattern must not be an empty string. Checked rule: "+e);return new RegExp(n).test(t.value)}return n(function(){var e;e=[],i.forEach(function(t){g(t)||e.push(t)}),m(e)},[t.value]),n(function(){function e(e){E(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[]),e.createElement(e.Fragment,null,e.createElement("div",null,e.createElement(h,l({},d)),e.createElement("div",{className:"uil-password-rules"},v&&e.createElement("div",{className:"uil-password-rule"},c),i.map(function(t,n){return e.createElement("div",{key:n,className:"uil-password-rule"},e.createElement(s,{src:g(t)?o:u,height:12,width:12}),e.createElement("span",null,t.label))}))))}function k(t){var r=t.callback,l=t.cancelLabel,a=void 0===l?"":l,c=t.close,o=t.closeLabel,u=t.confirm,s=t.confirmLabel,m=void 0===s?"":s,d=t.message,p=t.timeout,f=t.title,v=t.type;return n(function(){if(p){var e=setTimeout(function(){r&&r(),c()},p);return function(){return clearTimeout(e)}}},[]),e.createElement("div",{className:"uil-modal-wrapper"},e.createElement("div",{className:"uil-modal"},e.createElement("div",{className:function(){switch(v){case E.error:return"uil-header uil-error";case E.success:return"uil-header uil-success";case E.warning:return"uil-header uil-warning";default:return"uil-header"}}()},f),p&&e.createElement("div",{className:"uil-progress-wrapper"},e.createElement("div",{className:"uil-progress-bar",style:{animationDuration:p/1e3+1+"s"}})),e.createElement("div",{className:"uil-content"},e.createElement("div",null,Array.isArray(d)?d.map(function(t,n){return e.createElement("p",{key:n,className:"uil-modal-text"},t)}):e.createElement("p",{className:"uil-modal-text"},d)),e.createElement("div",{className:"uil-button-wrapper "+(v!==E.question?"uil-single":"")},v!==E.question&&e.createElement(i,{label:null!=o?o:"",small:!0,onClick:c,type:"button"}),v==E.question&&t.confirm&&e.createElement(e.Fragment,null,e.createElement(i,{label:m,theme:"#00416A",small:!0,onClick:u,type:"button"}),e.createElement(i,{label:a,small:!0,onClick:c,type:"button"}))))))}!function(e){e.error="error",e.question="question",e.success="success",e.warning="warning"}(E||(E={}));var w=["callback","modalType"];function y(t){var n=t.callback,r=t.modalType,c=a(t,w);return e.createElement(k,l({type:r},c,{callback:n}))}var C=["cancel"];function N(t){var n=t.cancel,r=a(t,C);return e.createElement(k,l({type:E.question,close:n},r))}export{i as CustomButton,u as CustomCheckBox,h as CustomInput,y as NotifyModal,g as PasswordInput,f as PasswordRuleTypes,N as QuestionModal,s as SVG,p as useOutsideClick};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
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() {\n if (!theme || disabled) return undefined;\n if (theme.charAt(0) !== '#') return '#ffffff';\n\n const color = theme.substring(1, 7);\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(),\n backgroundColor: disabled? undefined : theme,\n border: theme? 'none': undefined,\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, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon extends ComponentPropsWithoutRef<'svg'>{\n src : string;\n color? : string | undefined;\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 = 'error',\n question = 'question',\n success = 'success',\n warning = 'warning',\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 () => document.removeEventListener('keydown', setCapsLockState);\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): boolean {\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 === '') throw new Error(`pattern must not be an empty string. Checked rule: ${rule}`);\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} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button/customButton';\nimport './modal.scss';\n\ninterface IBaseModal {\n close : () => void;\n message : string | string[];\n title : string;\n type : ModalType;\n callback? : (() => void) | undefined;\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 callback,\n cancelLabel = '',\n close,\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n useEffect(() => {\n if (!timeout) return;\n\n const t = setTimeout(() => {\n callback && callback();\n\n close();\n }, timeout);\n\n return () => clearTimeout(t);\n },[]);\n\n function setHeaderClass() {\n switch (type) {\n case ModalType.error:\n return 'uil-header uil-error';\n case ModalType.success:\n return 'uil-header uil-success';\n case ModalType.warning:\n return 'uil-header uil-warning';\n default:\n return 'uil-header';\n }\n }\n\n return (\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={setHeaderClass()}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) => <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={close} 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={close} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n close : () => void;\n closeLabel: string;\n modalType : 'success' | 'warning' | 'error';\n message : string | string[];\n title : string;\n callback? : (() => void) | undefined;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n callback,\n modalType,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={modalType as ModalType} {...modalProps} callback={callback}/>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancel : () => void;\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n cancel,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} close={cancel} {...modalProps}/>\n );\n}"],"names":["_excluded","CustomButton","props","_props$disabled","disabled","label","_props$small","small","theme","buttonProps","_objectWithoutPropertiesLoose","style","color","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","undefined","border","React","createElement","_extends","className","CustomCheckBox","checkColor","checked","onCheck","children","checkProps","Fragment","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","key","BaseModal","_props$cancelLabel","cancelLabel","close","closeLabel","confirm","_props$confirmLabel","confirmLabel","message","timeout","title","t","setTimeout","clearTimeout","error","success","warning","setHeaderClass","animationDuration","Array","isArray","m","question","NotifyModal","modalType","modalProps","QuestionModal","cancel"],"mappings":"kaAAA,IAAAA,EAAA,CAAA,WAAA,QAAA,QAAA,SAUgB,SAAAC,EAAaC,GAC3B,IAAAC,EAMID,EALFE,SAAAA,OAAQ,IAAAD,GAAQA,EAChBE,EAIEH,EAJFG,MAAKC,EAIHJ,EAHFK,MAAAA,WAAKD,GAAQA,EACbE,EAEEN,EAFFM,MACGC,EAAWC,EACZR,EAAKF,GAoBHW,EAAuB,CAC3BC,MAnBF,WACE,GAAKJ,IAASJ,EAAd,CACA,GAAwB,MAApBI,EAAMK,OAAO,GAAY,MAAO,UAEpC,IAAMD,EAAQJ,EAAMM,UAAU,EAAG,GAM3BC,EALW,CACfC,SAASJ,EAAME,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASJ,EAAME,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASJ,EAAME,UAAU,EAAG,GAAI,IAAM,KAErBG,IAAI,SAAAC,GACrB,OAAOA,GAAO,OAAUA,EAAM,MAASC,KAAKC,KAAKF,EAAM,MAAS,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A,EAAAA,EAAa,GAAI3G,OAAO,EAAMoD,QAASsD,EAAO7E,KAAM,WAG1EA,GAAQ8C,EAAUkD,UAAYlI,EAAMiH,SACnC1F,EAAAC,cAAAD,EAAAU,SAAA,KACEV,EAACC,cAAAzB,GAAaI,MAAOgH,EAAc7G,MAAO,UAAWD,OAAO,EAAMoD,QAASwD,EAAS/E,KAAM,WAC1FX,EAACC,cAAAzB,EAAa,CAAAI,MAAO2G,EAAazG,OAAO,EAAMoD,QAASsD,EAAO7E,KAAM,eAQrF,EF9FA,SAAY8C,GACVA,EAAA,MAAA,QACAA,EAAA,SAAA,WACAA,EAAA,QAAA,UACAA,EAAA,QAAA,SACD,CALD,CAAYA,IAAAA,EAKX,CAAA,IGLD,IAAAlF,EAAA,CAAA,WAAA,aAcM,SAAUqI,EAAYnI,GAC1B,IACE2D,EAGE3D,EAHF2D,SACAyE,EAEEpI,EAFFoI,UACGC,EAAU7H,EACXR,EAAKF,GAET,OACEyB,EAAAC,cAACoF,EAASnF,EAAA,CAACS,KAAMkG,GAA4BC,EAAU,CAAE1E,SAAUA,IAEvE,CCxBA,IAAA7D,EAAA,CAAA,UAagB,SAAAwI,EAActI,GAC5B,IACEuI,EAEEvI,EAFFuI,OACGF,EAAU7H,EACXR,EAAKF,GAET,OACEyB,EAACC,cAAAoF,EAASnF,EAACS,CAAAA,KAAM8C,EAAUkD,SAAUnB,MAAOwB,GAAYF,GAE5D"}
@@ -1,2 +0,0 @@
1
- import e,{useRef as t,useEffect as n,useState as l}from"react";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},r.apply(null,arguments)}function a(e,t){if(null==e)return{};var n={};for(var l in e)if({}.hasOwnProperty.call(e,l)){if(t.indexOf(l)>=0)continue;n[l]=e[l]}return n}const c=["disabled","label","small","theme"];function o(t){const{disabled:n=!1,label:l,small:o=!1,theme:s}=t,i=a(t,c),u={color:function(){if(!s||n)return;if("#"!==s.charAt(0))return"#ffffff";const e=s.substring(1,7),t=[parseInt(e.substring(0,2),16)/255,parseInt(e.substring(2,4),16)/255,parseInt(e.substring(4,6),16)/255].map(e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return.2126*t[0]+.7152*t[1]+.0722*t[2]>.179?"#000000":"#ffffff"}(),backgroundColor:n?void 0:s,border:s?"none":void 0};return e.createElement("button",r({className:`uil-button ${n?"uil-disabled":""} ${o?"uil-small":""}`,style:u,disabled:n},i),l)}const s=["checkColor","checked","onCheck","label","children"];function i(t){const{checkColor:n,checked:l,onCheck:c,label:o,children:i}=t,u=a(t,s);return e.createElement(e.Fragment,null,e.createElement("div",{className:"uil-check-wrapper"},e.createElement("label",{className:"uil-checkbox"},e.createElement("input",r({type:"checkbox",checked:l,onChange:()=>{c(!l)}},u)),e.createElement("div",{className:"uil-checkmark",style:{backgroundColor:n}})),i||e.createElement("span",null,o)))}function u(t){const{src:n,color:l,height:r,width:a}=t;if(!n.includes(".svg"))throw new Error("Provided src is not an svg image");return e.createElement("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:l,height:`${r}px`,width:`${a}px`}},e.createElement("use",{href:n}))}const m=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function d(t){const{iconColor:n,iconSrc:l,inputColor:c,label:o,toggle:s,valueChanged:i}=t,d=a(t,m);return e.createElement("label",{className:"uil-input-wrapper",htmlFor:d.id},e.createElement("input",r({className:"uil-input",onChange:e=>i(e.target.value),placeholder:o,style:{color:c}},d)),l&&e.createElement("div",{className:"uil-icon",onClick:s},e.createElement(u,{src:l,width:24,height:24,color:n})),e.createElement("span",{className:"uil-label",style:{color:c}},o))}function p(e){const l=t(null);return n(()=>{function t(t){l.current&&!l.current.contains(t.target)&&e()}return document.addEventListener("click",t),document.addEventListener("touchend",t),()=>{document.removeEventListener("click",t),document.removeEventListener("touchend",t)}},[e]),l}const h=["tooltipClose","tooltipIcon","tooltipText"];function f(t){const{tooltipClose:n,tooltipIcon:c,tooltipText:o}=t,s=a(t,h),[i,m]=l(!1),f=p(E);function E(){m(!1)}return e.createElement(e.Fragment,null,c?e.createElement("div",{className:"uil-tooltip-wrapper"},i&&e.createElement("div",{className:"uil-tooltip",ref:f},n&&e.createElement("button",{className:"uil-tooltip-button",onClick:E},n),e.createElement("span",null,o)),e.createElement("div",{className:"uil-tooltip-icon",onClick:()=>m(!i)},e.createElement(u,{src:c,height:16,width:16})),e.createElement(d,r({},s))):e.createElement(d,r({},s)))}var E;!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"}(E||(E={}));const b=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function g(t){const{capsLockWarning:c,rules:o,ruleChecked:s,ruleUnchecked:i,setFailedRules:m}=t,d=a(t,b),[p,h]=l(!1);function g(e){let n;switch(e.type){case E.minLength:n=`[a-zA-Z0-9ßÄäÖöÜü._!"\`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{${e.count},}`;break;case E.maxLength:n=`^[a-zA-Z0-9ßÄäÖöÜü._!"\`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,${e.count}}$`;break;case E.letters:n=`[a-zA-ZßÄäÖöÜü]{${e.count},}`;break;case E.numbers:n=`[0-9]{${e.count},}`;break;case E.special:n=`[._!"\`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{${e.count},}`;break;case E.upper:n=`[A-ZÄÖÜ]{${e.count},}`;break;default:n=e.pattern?e.pattern:""}if(""===n)throw new Error(`pattern must not be an empty string. Checked rule: ${e}`);return new RegExp(n).test(t.value)}return n(()=>{!function(){const e=[];o.forEach(t=>{g(t)||e.push(t)}),m(e)}()},[t.value]),n(()=>{function e(e){h(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),e.createElement(e.Fragment,null,e.createElement("div",null,e.createElement(f,r({},d)),e.createElement("div",{className:"uil-password-rules"},p&&e.createElement("div",{className:"uil-password-rule"},c),o.map((t,n)=>e.createElement("div",{key:n,className:"uil-password-rule"},e.createElement(u,{src:g(t)?s:i,height:12,width:12}),e.createElement("span",null,t.label))))))}var v;function k(t){const{callback:l,cancelLabel:r="",close:a,closeLabel:c,confirm:s,confirmLabel:i="",message:u,timeout:m,title:d,type:p}=t;return n(()=>{if(!m)return;const e=setTimeout(()=>{l&&l(),a()},m);return()=>clearTimeout(e)},[]),e.createElement("div",{className:"uil-modal-wrapper"},e.createElement("div",{className:"uil-modal"},e.createElement("div",{className:function(){switch(p){case v.error:return"uil-header uil-error";case v.success:return"uil-header uil-success";case v.warning:return"uil-header uil-warning";default:return"uil-header"}}()},d),m&&e.createElement("div",{className:"uil-progress-wrapper"},e.createElement("div",{className:"uil-progress-bar",style:{animationDuration:m/1e3+1+"s"}})),e.createElement("div",{className:"uil-content"},e.createElement("div",null,Array.isArray(u)?u.map((t,n)=>e.createElement("p",{key:n,className:"uil-modal-text"},t)):e.createElement("p",{className:"uil-modal-text"},u)),e.createElement("div",{className:"uil-button-wrapper "+(p!==v.question?"uil-single":"")},p!==v.question&&e.createElement(o,{label:null!=c?c:"",small:!0,onClick:a,type:"button"}),p==v.question&&t.confirm&&e.createElement(e.Fragment,null,e.createElement(o,{label:i,theme:"#00416A",small:!0,onClick:s,type:"button"}),e.createElement(o,{label:r,small:!0,onClick:a,type:"button"}))))))}!function(e){e.error="error",e.question="question",e.success="success",e.warning="warning"}(v||(v={}));const w=["callback","modalType"];function y(t){const{callback:n,modalType:l}=t,c=a(t,w);return e.createElement(k,r({type:l},c,{callback:n}))}const C=["cancel"];function N(t){const{cancel:n}=t,l=a(t,C);return e.createElement(k,r({type:v.question,close:n},l))}export{o as CustomButton,i as CustomCheckBox,f as CustomInput,y as NotifyModal,g as PasswordInput,E as PasswordRuleTypes,N as QuestionModal,u as SVG,p as useOutsideClick};
2
- //# sourceMappingURL=index.modern.mjs.map
@@ -1 +0,0 @@
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() {\n if (!theme || disabled) return undefined;\n if (theme.charAt(0) !== '#') return '#ffffff';\n\n const color = theme.substring(1, 7);\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(),\n backgroundColor: disabled? undefined : theme,\n border: theme? 'none': undefined,\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, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon extends ComponentPropsWithoutRef<'svg'>{\n src : string;\n color? : string | undefined;\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 () => document.removeEventListener('keydown', setCapsLockState);\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): boolean {\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 === '') throw new Error(`pattern must not be an empty string. Checked rule: ${rule}`);\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 = 'error',\n question = 'question',\n success = 'success',\n warning = 'warning',\n}","import React, {useEffect} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button/customButton';\nimport './modal.scss';\n\ninterface IBaseModal {\n close : () => void;\n message : string | string[];\n title : string;\n type : ModalType;\n callback? : (() => void) | undefined;\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 callback,\n cancelLabel = '',\n close,\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n useEffect(() => {\n if (!timeout) return;\n\n const t = setTimeout(() => {\n callback && callback();\n\n close();\n }, timeout);\n\n return () => clearTimeout(t);\n },[]);\n\n function setHeaderClass() {\n switch (type) {\n case ModalType.error:\n return 'uil-header uil-error';\n case ModalType.success:\n return 'uil-header uil-success';\n case ModalType.warning:\n return 'uil-header uil-warning';\n default:\n return 'uil-header';\n }\n }\n\n return (\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={setHeaderClass()}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) => <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={close} 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={close} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n close : () => void;\n closeLabel: string;\n modalType : 'success' | 'warning' | 'error';\n message : string | string[];\n title : string;\n callback? : (() => void) | undefined;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n callback,\n modalType,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={modalType as ModalType} {...modalProps} callback={callback}/>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancel : () => void;\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n cancel,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} close={cancel} {...modalProps}/>\n );\n}"],"names":["_excluded","CustomButton","props","disabled","label","small","theme","buttonProps","_objectWithoutPropertiesLoose","style","color","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","undefined","border","React","createElement","_extends","className","CustomCheckBox","checkColor","checked","onCheck","children","checkProps","Fragment","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","key","ModalType","BaseModal","cancelLabel","close","closeLabel","confirm","confirmLabel","message","timeout","title","t","setTimeout","clearTimeout","error","success","warning","setHeaderClass","animationDuration","Array","isArray","m","question","NotifyModal","modalType","modalProps","QuestionModal","cancel"],"mappings":"kaAAA,MAAAA,EAAA,CAAA,WAAA,QAAA,QAAA,SAUM,SAAUC,EAAaC,GAC3B,MAAMC,SACJA,GAAW,EAAKC,MAChBA,EAAKC,MACLA,GAAQ,EAAKC,MACbA,GAEEJ,EADCK,EAAWC,EACZN,EAAKF,GAoBHS,EAAuB,CAC3BC,MAnBF,WACE,IAAKJ,GAASH,EAAU,OACxB,GAAwB,MAApBG,EAAMK,OAAO,GAAY,MAAO,UAEpC,MAAMD,EAAQJ,EAAMM,UAAU,EAAG,GAM3BC,EALW,CACfC,SAASJ,EAAME,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASJ,EAAME,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASJ,EAAME,UAAU,EAAG,GAAI,IAAM,KAErBG,IAAIC,GACdA,GAAO,OAAUA,EAAM,MAASC,KAAKC,KAAKF,EAAM,MA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K,SAAUsB,EAAY/H,GAC1B,MAAMyD,SACJA,EAAQuE,UACRA,GAEEhI,EADCiI,EAAU3H,EACXN,EAAKF,GAET,OACEuB,EAAAC,cAACoF,EAASnF,EAAA,CAACS,KAAMgG,GAA4BC,EAAU,CAAExE,SAAUA,IAEvE,CCxBA,MAAA3D,EAAA,CAAA,UAagB,SAAAoI,EAAclI,GAC5B,MAAMmI,OACJA,GAEEnI,EADCiI,EAAU3H,EACXN,EAAKF,GAET,OACEuB,EAACC,cAAAoF,EAASnF,EAAA,CAACS,KAAMyE,EAAUqB,SAAUlB,MAAOuB,GAAYF,GAE5D"}
package/dist/index.umd.js DELETED
@@ -1,2 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e||self).uiLibrary={},e.react)}(this,function(e,t){function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=/*#__PURE__*/l(t);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},n.apply(null,arguments)}function r(e,t){if(null==e)return{};var l={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;l[a]=e[a]}return l}var u=["disabled","label","small","theme"];function c(e){var t=e.disabled,l=void 0!==t&&t,c=e.label,o=e.small,i=void 0!==o&&o,s=e.theme,d=r(e,u),f={color:function(){if(s&&!l){if("#"!==s.charAt(0))return"#ffffff";var e=s.substring(1,7),t=[parseInt(e.substring(0,2),16)/255,parseInt(e.substring(2,4),16)/255,parseInt(e.substring(4,6),16)/255].map(function(e){return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)});return.2126*t[0]+.7152*t[1]+.0722*t[2]>.179?"#000000":"#ffffff"}}(),backgroundColor:l?void 0:s,border:s?"none":void 0};return a.default.createElement("button",n({className:"uil-button "+(l?"uil-disabled":"")+" "+(i?"uil-small":""),style:f,disabled:l},d),c)}var o=["checkColor","checked","onCheck","label","children"];function i(e){var t=e.src,l=e.color,n=e.height,r=e.width;if(!t.includes(".svg"))throw new Error("Provided src is not an svg image");return a.default.createElement("svg",{"aria-hidden":!0,className:"uil-svg",style:{fill:l,height:n+"px",width:r+"px"}},a.default.createElement("use",{href:t}))}var s=["iconColor","iconSrc","inputColor","label","toggle","valueChanged"];function d(e){var t=e.iconColor,l=e.iconSrc,u=e.inputColor,c=e.label,o=e.toggle,d=e.valueChanged,f=r(e,s);return a.default.createElement("label",{className:"uil-input-wrapper",htmlFor:f.id},a.default.createElement("input",n({className:"uil-input",onChange:function(e){return d(e.target.value)},placeholder:c,style:{color:u}},f)),l&&a.default.createElement("div",{className:"uil-icon",onClick:o},a.default.createElement(i,{src:l,width:24,height:24,color:t})),a.default.createElement("span",{className:"uil-label",style:{color:u}},c))}function f(e){var l=t.useRef(null);return t.useEffect(function(){function t(t){l.current&&!l.current.contains(t.target)&&e()}return document.addEventListener("click",t),document.addEventListener("touchend",t),function(){document.removeEventListener("click",t),document.removeEventListener("touchend",t)}},[e]),l}var m,p=["tooltipClose","tooltipIcon","tooltipText"];function h(e){var l=e.tooltipClose,u=e.tooltipIcon,c=e.tooltipText,o=r(e,p),s=t.useState(!1),m=s[0],h=s[1],v=f(E);function E(){h(!1)}return a.default.createElement(a.default.Fragment,null,u?a.default.createElement("div",{className:"uil-tooltip-wrapper"},m&&a.default.createElement("div",{className:"uil-tooltip",ref:v},l&&a.default.createElement("button",{className:"uil-tooltip-button",onClick:E},l),a.default.createElement("span",null,c)),a.default.createElement("div",{className:"uil-tooltip-icon",onClick:function(){return h(!m)}},a.default.createElement(i,{src:u,height:16,width:16})),a.default.createElement(d,n({},o))):a.default.createElement(d,n({},o)))}e.PasswordRuleTypes=void 0,(m=e.PasswordRuleTypes||(e.PasswordRuleTypes={}))[m.minLength=0]="minLength",m[m.maxLength=1]="maxLength",m[m.letters=2]="letters",m[m.numbers=3]="numbers",m[m.special=4]="special",m[m.upper=5]="upper";var v,E=["capsLockWarning","rules","ruleChecked","ruleUnchecked","setFailedRules"];function b(e){var l=e.callback,n=e.cancelLabel,r=void 0===n?"":n,u=e.close,o=e.closeLabel,i=e.confirm,s=e.confirmLabel,d=void 0===s?"":s,f=e.message,m=e.timeout,p=e.title,h=e.type;return t.useEffect(function(){if(m){var e=setTimeout(function(){l&&l(),u()},m);return function(){return clearTimeout(e)}}},[]),a.default.createElement("div",{className:"uil-modal-wrapper"},a.default.createElement("div",{className:"uil-modal"},a.default.createElement("div",{className:function(){switch(h){case v.error:return"uil-header uil-error";case v.success:return"uil-header uil-success";case v.warning:return"uil-header uil-warning";default:return"uil-header"}}()},p),m&&a.default.createElement("div",{className:"uil-progress-wrapper"},a.default.createElement("div",{className:"uil-progress-bar",style:{animationDuration:m/1e3+1+"s"}})),a.default.createElement("div",{className:"uil-content"},a.default.createElement("div",null,Array.isArray(f)?f.map(function(e,t){return a.default.createElement("p",{key:t,className:"uil-modal-text"},e)}):a.default.createElement("p",{className:"uil-modal-text"},f)),a.default.createElement("div",{className:"uil-button-wrapper "+(h!==v.question?"uil-single":"")},h!==v.question&&a.default.createElement(c,{label:null!=o?o:"",small:!0,onClick:u,type:"button"}),h==v.question&&e.confirm&&a.default.createElement(a.default.Fragment,null,a.default.createElement(c,{label:d,theme:"#00416A",small:!0,onClick:i,type:"button"}),a.default.createElement(c,{label:r,small:!0,onClick:u,type:"button"}))))))}!function(e){e.error="error",e.question="question",e.success="success",e.warning="warning"}(v||(v={}));var g=["callback","modalType"],k=["cancel"];e.CustomButton=c,e.CustomCheckBox=function(e){var t=e.checkColor,l=e.checked,u=e.onCheck,c=e.label,i=e.children,s=r(e,o);return a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{className:"uil-check-wrapper"},a.default.createElement("label",{className:"uil-checkbox"},a.default.createElement("input",n({type:"checkbox",checked:l,onChange:function(){u(!l)}},s)),a.default.createElement("div",{className:"uil-checkmark",style:{backgroundColor:t}})),i||a.default.createElement("span",null,c)))},e.CustomInput=h,e.NotifyModal=function(e){var t=e.callback,l=e.modalType,u=r(e,g);return a.default.createElement(b,n({type:l},u,{callback:t}))},e.PasswordInput=function(l){var u=l.capsLockWarning,c=l.rules,o=l.ruleChecked,s=l.ruleUnchecked,d=l.setFailedRules,f=r(l,E),m=t.useState(!1),p=m[0],v=m[1];function b(t){var a;switch(t.type){case e.PasswordRuleTypes.minLength:a="[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+t.count+",}";break;case e.PasswordRuleTypes.maxLength:a="^[a-zA-Z0-9ßÄäÖöÜü._!\"`'#%&,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{0,"+t.count+"}$";break;case e.PasswordRuleTypes.letters:a="[a-zA-ZßÄäÖöÜü]{"+t.count+",}";break;case e.PasswordRuleTypes.numbers:a="[0-9]{"+t.count+",}";break;case e.PasswordRuleTypes.special:a="[._!\"`'#%&§,:;<>=@{}~\\$\\(\\)\\*\\+\\/\\\\\\?\\[\\]\\^\\|\\-]{"+t.count+",}";break;case e.PasswordRuleTypes.upper:a="[A-ZÄÖÜ]{"+t.count+",}";break;default:a=t.pattern?t.pattern:""}if(""===a)throw new Error("pattern must not be an empty string. Checked rule: "+t);return new RegExp(a).test(l.value)}return t.useEffect(function(){var e;e=[],c.forEach(function(t){b(t)||e.push(t)}),d(e)},[l.value]),t.useEffect(function(){function e(e){v(e.getModifierState&&e.getModifierState("CapsLock"))}return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[]),a.default.createElement(a.default.Fragment,null,a.default.createElement("div",null,a.default.createElement(h,n({},f)),a.default.createElement("div",{className:"uil-password-rules"},p&&a.default.createElement("div",{className:"uil-password-rule"},u),c.map(function(e,t){return a.default.createElement("div",{key:t,className:"uil-password-rule"},a.default.createElement(i,{src:b(e)?o:s,height:12,width:12}),a.default.createElement("span",null,e.label))}))))},e.QuestionModal=function(e){var t=e.cancel,l=r(e,k);return a.default.createElement(b,n({type:v.question,close:t},l))},e.SVG=i,e.useOutsideClick=f});
2
- //# sourceMappingURL=index.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.umd.js","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/modal/baseModal.tsx","../src/components/modal/notifyModal.tsx","../src/components/modal/questionModal.tsx","../src/components/input/passwordInput.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() {\n if (!theme || disabled) return undefined;\n if (theme.charAt(0) !== '#') return '#ffffff';\n\n const color = theme.substring(1, 7);\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(),\n backgroundColor: disabled? undefined : theme,\n border: theme? 'none': undefined,\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, {ComponentPropsWithoutRef, CSSProperties} from 'react';\nimport './images.scss';\n\ninterface ISvgIcon extends ComponentPropsWithoutRef<'svg'>{\n src : string;\n color? : string | undefined;\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 = 'error',\n question = 'question',\n success = 'success',\n warning = 'warning',\n}","import React, {useEffect} from 'react';\nimport {ModalType} from 'enums/ModalType';\nimport {CustomButton} from 'components/button/customButton';\nimport './modal.scss';\n\ninterface IBaseModal {\n close : () => void;\n message : string | string[];\n title : string;\n type : ModalType;\n callback? : (() => void) | undefined;\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 callback,\n cancelLabel = '',\n close,\n closeLabel,\n confirm,\n confirmLabel = '',\n message,\n timeout,\n title,\n type\n } = props;\n\n useEffect(() => {\n if (!timeout) return;\n\n const t = setTimeout(() => {\n callback && callback();\n\n close();\n }, timeout);\n\n return () => clearTimeout(t);\n },[]);\n\n function setHeaderClass() {\n switch (type) {\n case ModalType.error:\n return 'uil-header uil-error';\n case ModalType.success:\n return 'uil-header uil-success';\n case ModalType.warning:\n return 'uil-header uil-warning';\n default:\n return 'uil-header';\n }\n }\n\n return (\n <div className={'uil-modal-wrapper'}>\n <div className={'uil-modal'}>\n <div className={setHeaderClass()}>\n {title}\n </div>\n\n {timeout &&\n <div className={'uil-progress-wrapper'}>\n <div className={'uil-progress-bar'} style={{animationDuration: `${(timeout / 1000) + 1}s`}}/>\n </div>\n }\n\n <div className={'uil-content'}>\n <div>\n {Array.isArray(message) ?\n message.map((m, idx) => <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={close} 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={close} type={'button'}/>\n </>\n }\n </div>\n </div>\n </div>\n </div>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface INotifyModal {\n close : () => void;\n closeLabel: string;\n modalType : 'success' | 'warning' | 'error';\n message : string | string[];\n title : string;\n callback? : (() => void) | undefined;\n timeout? : number;\n}\n\nexport function NotifyModal(props: INotifyModal) {\n const {\n callback,\n modalType,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={modalType as ModalType} {...modalProps} callback={callback}/>\n );\n}","import React from 'react';\nimport {BaseModal} from './baseModal';\nimport {ModalType} from 'enums/ModalType';\n\nexport interface IQuestionModal {\n cancel : () => void;\n cancelLabel : string;\n confirm : () => void;\n confirmLabel: string;\n message : string | string[];\n title : string;\n}\n\nexport function QuestionModal(props: IQuestionModal) {\n const {\n cancel,\n ...modalProps\n } = props;\n\n return (\n <BaseModal type={ModalType.question} close={cancel} {...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 () => document.removeEventListener('keydown', setCapsLockState);\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): boolean {\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 === '') throw new Error(`pattern must not be an empty string. Checked rule: ${rule}`);\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}"],"names":["_excluded","CustomButton","props","_props$disabled","disabled","label","_props$small","small","theme","buttonProps","_objectWithoutPropertiesLoose","style","color","charAt","substring","c","parseInt","map","col","Math","pow","setColor","backgroundColor","undefined","border","React","createElement","_extends","className","SVG","src","height","width","includes","Error","fill","href","BaseInput","iconColor","iconSrc","inputColor","toggle","valueChanged","inputProps","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","ModalType","BaseModal","_props$cancelLabel","cancelLabel","close","closeLabel","confirm","_props$confirmLabel","confirmLabel","message","timeout","title","type","t","setTimeout","clearTimeout","error","success","warning","setHeaderClass","animationDuration","Array","isArray","m","idx","key","question","checkColor","checked","onCheck","children","checkProps","modalType","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","cancel"],"mappings":"ysBAAA,IAAAA,EAAA,CAAA,WAAA,QAAA,QAAA,SAUgB,SAAAC,EAAaC,GAC3B,IAAAC,EAMID,EALFE,SAAAA,OAAQ,IAAAD,GAAQA,EAChBE,EAIEH,EAJFG,MAAKC,EAIHJ,EAHFK,MAAAA,WAAKD,GAAQA,EACbE,EAEEN,EAFFM,MACGC,EAAWC,EACZR,EAAKF,GAoBHW,EAAuB,CAC3BC,MAnBF,WACE,GAAKJ,IAASJ,EAAd,CACA,GAAwB,MAApBI,EAAMK,OAAO,GAAY,MAAO,UAEpC,IAAMD,EAAQJ,EAAMM,UAAU,EAAG,GAM3BC,EALW,CACfC,SAASJ,EAAME,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASJ,EAAME,UAAU,EAAG,GAAI,IAAM,IACtCE,SAASJ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