├── .gitignore ├── .npmrc ├── .storybook ├── main.js └── preview.js ├── LICENSE ├── README.md ├── lib ├── components │ ├── button │ │ ├── button.d.ts │ │ ├── button.d.ts.map │ │ ├── button.js │ │ ├── button.js.map │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── styled.d.ts │ │ ├── styled.d.ts.map │ │ ├── styled.js │ │ └── styled.js.map │ ├── form-control │ │ ├── form-control.d.ts │ │ ├── form-control.d.ts.map │ │ ├── form-control.js │ │ ├── form-control.js.map │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── styled.d.ts │ │ ├── styled.d.ts.map │ │ ├── styled.js │ │ └── styled.js.map │ ├── index.d.ts │ ├── index.d.ts.map │ ├── index.js │ ├── index.js.map │ ├── link │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── link.d.ts │ │ ├── link.d.ts.map │ │ ├── link.js │ │ ├── link.js.map │ │ ├── styled.d.ts │ │ ├── styled.d.ts.map │ │ ├── styled.js │ │ └── styled.js.map │ ├── login │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── login.d.ts │ │ ├── login.d.ts.map │ │ ├── login.js │ │ ├── login.js.map │ │ ├── styled.d.ts │ │ ├── styled.d.ts.map │ │ ├── styled.js │ │ ├── styled.js.map │ │ ├── use-login-logic.d.ts │ │ ├── use-login-logic.d.ts.map │ │ ├── use-login-logic.js │ │ └── use-login-logic.js.map │ ├── search │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── search.d.ts │ │ ├── search.d.ts.map │ │ ├── search.js │ │ ├── search.js.map │ │ ├── styled.d.ts │ │ ├── styled.d.ts.map │ │ ├── styled.js │ │ └── styled.js.map │ ├── select │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── select.d.ts │ │ ├── select.d.ts.map │ │ ├── select.js │ │ ├── select.js.map │ │ ├── styled.d.ts │ │ ├── styled.d.ts.map │ │ ├── styled.js │ │ ├── styled.js.map │ │ ├── use-select-logic.d.ts │ │ ├── use-select-logic.d.ts.map │ │ ├── use-select-logic.js │ │ └── use-select-logic.js.map │ ├── skeleton │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── skeleton.d.ts │ │ ├── skeleton.d.ts.map │ │ ├── skeleton.js │ │ ├── skeleton.js.map │ │ ├── styled.d.ts │ │ ├── styled.d.ts.map │ │ ├── styled.js │ │ └── styled.js.map │ ├── spinner │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── spinner.d.ts │ │ ├── spinner.d.ts.map │ │ ├── spinner.js │ │ ├── spinner.js.map │ │ ├── styled.d.ts │ │ ├── styled.d.ts.map │ │ ├── styled.js │ │ ├── styled.js.map │ │ ├── utils.d.ts │ │ ├── utils.d.ts.map │ │ ├── utils.js │ │ └── utils.js.map │ ├── text-input │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── styled.d.ts │ │ ├── styled.d.ts.map │ │ ├── styled.js │ │ ├── styled.js.map │ │ ├── text-input.d.ts │ │ ├── text-input.d.ts.map │ │ ├── text-input.js │ │ └── text-input.js.map │ └── typography │ │ ├── index.d.ts │ │ ├── index.d.ts.map │ │ ├── index.js │ │ ├── index.js.map │ │ ├── styled.d.ts │ │ ├── styled.d.ts.map │ │ ├── styled.js │ │ └── styled.js.map ├── config │ ├── global.styles.d.ts │ ├── global.styles.d.ts.map │ ├── global.styles.js │ ├── global.styles.js.map │ ├── sizes.d.ts │ ├── sizes.d.ts.map │ ├── sizes.js │ └── sizes.js.map ├── icons │ ├── ArrowDown.d.ts │ ├── ArrowDown.d.ts.map │ ├── ArrowDown.js │ ├── ArrowDown.js.map │ ├── Cross.d.ts │ ├── Cross.d.ts.map │ ├── Cross.js │ ├── Cross.js.map │ ├── Download.d.ts │ ├── Download.d.ts.map │ ├── Download.js │ ├── Download.js.map │ ├── Search.d.ts │ ├── Search.d.ts.map │ ├── Search.js │ ├── Search.js.map │ ├── User.d.ts │ ├── User.d.ts.map │ ├── User.js │ ├── User.js.map │ ├── index.d.ts │ ├── index.d.ts.map │ ├── index.js │ └── index.js.map ├── index.d.ts ├── index.d.ts.map ├── index.js └── index.js.map ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── src ├── components │ ├── button │ │ ├── Button.stories.tsx │ │ ├── button.tsx │ │ ├── index.ts │ │ └── styled.ts │ ├── form-control │ │ ├── form-control.stories.tsx │ │ ├── form-control.tsx │ │ ├── index.ts │ │ └── styled.ts │ ├── index.ts │ ├── link │ │ ├── index.ts │ │ ├── link.stories.tsx │ │ ├── link.tsx │ │ └── styled.ts │ ├── login │ │ ├── index.ts │ │ ├── login.stories.tsx │ │ ├── login.tsx │ │ ├── styled.ts │ │ └── use-login-logic.ts │ ├── search │ │ ├── index.ts │ │ ├── search.stories.tsx │ │ ├── search.tsx │ │ └── styled.ts │ ├── select │ │ ├── index.ts │ │ ├── select.stories.tsx │ │ ├── select.tsx │ │ ├── styled.ts │ │ └── use-select-logic.ts │ ├── signup │ │ ├── index.ts │ │ ├── signup.stories.tsx │ │ ├── signup.tsx │ │ ├── styled.ts │ │ └── use-login-logic.ts │ ├── skeleton │ │ ├── index.ts │ │ ├── skeleton.stories.tsx │ │ ├── skeleton.tsx │ │ └── styled.tsx │ ├── spinner │ │ ├── index.ts │ │ ├── spinner.stories.tsx │ │ ├── spinner.tsx │ │ ├── styled.ts │ │ └── utils.ts │ ├── text-input │ │ ├── index.ts │ │ ├── styled.ts │ │ ├── text-input.stories.tsx │ │ └── text-input.tsx │ └── typography │ │ ├── index.ts │ │ └── styled.ts ├── config │ ├── global.styles.ts │ └── sizes.ts ├── icons │ ├── ArrowDown.tsx │ ├── Cross.tsx │ ├── Download.tsx │ ├── Search.tsx │ ├── User.tsx │ ├── arrow-down.svg │ ├── cross.svg │ ├── download.svg │ ├── index.tsx │ ├── search.svg │ └── user.svg ├── index.tsx ├── logo.svg ├── react-app-env.d.ts ├── setupTests.ts └── stories │ └── assets │ ├── code-brackets.svg │ ├── colors.svg │ ├── comments.svg │ ├── direction.svg │ ├── flow.svg │ ├── plugin.svg │ ├── repo.svg │ └── stackalt.svg └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | @ashishmishra-bit:registry=https://npm.pkg.github.com -------------------------------------------------------------------------------- /.storybook/main.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "stories": [ 3 | "../src/**/*.stories.mdx", 4 | "../src/**/*.stories.@(js|jsx|ts|tsx)" 5 | ], 6 | "addons": [ 7 | "@storybook/addon-links", 8 | "@storybook/addon-essentials", 9 | "@storybook/preset-create-react-app" 10 | ], 11 | "framework": "@storybook/react", 12 | "core": { 13 | "builder": "webpack5" 14 | } 15 | } -------------------------------------------------------------------------------- /.storybook/preview.js: -------------------------------------------------------------------------------- 1 | export const parameters = { 2 | actions: { argTypesRegex: "^on[A-Z].*" }, 3 | controls: { 4 | matchers: { 5 | color: /(background|color)$/i, 6 | date: /Date$/, 7 | }, 8 | }, 9 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Next Gen UI Developers. 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. -------------------------------------------------------------------------------- /lib/components/button/button.d.ts: -------------------------------------------------------------------------------- 1 | import React, { ElementType, MouseEventHandler, ReactNode } from 'react'; 2 | import { ComponentSize } from '../../config/sizes'; 3 | export declare type ButtonType = 'default' | 'danger' | 'ghost' | 'secondary'; 4 | interface BaseButtonProps { 5 | type?: ButtonType; 6 | icon?: ElementType; 7 | size?: ComponentSize; 8 | className?: string; 9 | children?: ReactNode; 10 | disabled?: boolean; 11 | loading?: boolean; 12 | } 13 | declare type HTMLButtonProps = { 14 | onClick?: MouseEventHandler; 15 | } & BaseButtonProps; 16 | /** 17 | * If href is supplied, button becomes an anchor link 18 | */ 19 | declare type HTMLAnchorProps = { 20 | href?: string; 21 | } & BaseButtonProps; 22 | /** 23 | * If `as` is supplied, button becomes a custom html node specified in `as` 24 | */ 25 | declare type CustomNodeProps = { 26 | as?: ElementType; 27 | to?: string; 28 | } & BaseButtonProps; 29 | export declare type ButtonProps = HTMLButtonProps & HTMLAnchorProps & CustomNodeProps; 30 | declare const _default: React.ForwardRefExoticComponent<{ 31 | onClick?: React.MouseEventHandler | undefined; 32 | } & BaseButtonProps & { 33 | href?: string | undefined; 34 | } & { 35 | as?: React.ElementType | undefined; 36 | to?: string | undefined; 37 | } & React.RefAttributes>; 38 | export default _default; 39 | //# sourceMappingURL=button.d.ts.map -------------------------------------------------------------------------------- /lib/components/button/button.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,oBAAY,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAC;AAEtE,UAAU,eAAe;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,aAAK,eAAe,GAAG;IACnB,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CAClD,GAAG,eAAe,CAAC;AAEpB;;GAEG;AACH,aAAK,eAAe,GAAG;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,eAAe,CAAC;AAEpB;;GAEG;AACH,aAAK,eAAe,GAAG;IACnB,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,eAAe,CAAC;AAEpB,oBAAY,WAAW,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,CAAC;;;;;;;;;AA6F9E,wBAA8D"} -------------------------------------------------------------------------------- /lib/components/button/button.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; 13 | import React from 'react'; 14 | import { StyledButton, StyledIcon } from './styled'; 15 | import Spinner from '../spinner'; 16 | var Button = function (props, ref) { 17 | var _a = props.type, type = _a === void 0 ? 'default' : _a, icon = props.icon, _b = props.size, size = _b === void 0 ? 'default' : _b, className = props.className, children = props.children, _c = props.disabled, disabled = _c === void 0 ? false : _c, loading = props.loading, onClick = props.onClick, href = props.href, as = props.as, to = props.to; 18 | var styles = { 19 | innerType: type, 20 | size: size, 21 | disabled: disabled, 22 | withText: children != null 23 | }; 24 | var spinnerStyles = { 25 | size: size === 'large' ? 25 : size === 'default' ? 20 : 15, 26 | light: true, 27 | }; 28 | var childrenWithIcon = !icon ? children : (_jsxs(_Fragment, { children: [children, _jsx(StyledIcon, { as: icon }, void 0)] }, void 0)); 29 | if (as && !disabled) { 30 | return (_jsx(StyledButton, __assign({ as: as, to: to, ref: ref, className: className }, styles, { children: loading ? (_jsxs(_Fragment, { children: ["Loading", _jsx(Spinner, __assign({}, spinnerStyles), void 0)] }, void 0)) : childrenWithIcon }), void 0)); 31 | } 32 | if (href && !disabled) { 33 | return (_jsx(StyledButton, __assign({ as: 'a', href: href, ref: ref, className: className }, styles, { children: loading ? (_jsxs(_Fragment, { children: ["Loading", _jsx(Spinner, __assign({}, spinnerStyles), void 0)] }, void 0)) : childrenWithIcon }), void 0)); 34 | } 35 | return (_jsx(StyledButton, __assign({ as: 'button', type: 'button', onClick: onClick, ref: ref, className: className }, styles, { children: loading ? (_jsxs(_Fragment, { children: ["Loading", _jsx(Spinner, __assign({}, spinnerStyles), void 0)] }, void 0)) : childrenWithIcon }), void 0)); 36 | }; 37 | export default React.forwardRef(Button); 38 | //# sourceMappingURL=button.js.map -------------------------------------------------------------------------------- /lib/components/button/button.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,OAAO,MAAM,YAAY,CAAC;AAoCjC,IAAM,MAAM,GAAyD,UAAC,KAAK,EAAE,GAAG;IAExE,IAAA,KAWA,KAAK,KAXW,EAAhB,IAAI,mBAAG,SAAS,KAAA,EAChB,IAAI,GAUJ,KAAK,KAVD,EACJ,KASA,KAAK,KATW,EAAhB,IAAI,mBAAG,SAAS,KAAA,EAChB,SAAS,GAQT,KAAK,UARI,EACT,QAAQ,GAOR,KAAK,SAPG,EACR,KAMA,KAAK,SANW,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,OAAO,GAKP,KAAK,QALE,EACP,OAAO,GAIP,KAAK,QAJE,EACP,IAAI,GAGJ,KAAK,KAHD,EACJ,EAAE,GAEF,KAAK,GAFH,EACF,EAAE,GACF,KAAK,GADH,CACI;IAEV,IAAM,MAAM,GAAG;QACX,SAAS,EAAE,IAAI;QACf,IAAI,MAAA;QACJ,QAAQ,UAAA;QACR,QAAQ,EAAE,QAAQ,IAAI,IAAI;KAC7B,CAAA;IAED,IAAM,aAAa,GAAG;QAClB,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QAC1D,KAAK,EAAE,IAAI;KACd,CAAA;IAED,IAAM,gBAAgB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CACxC,8BACK,QAAQ,EACT,KAAC,UAAU,IAAC,EAAE,EAAE,IAAI,WAAI,YACzB,CACN,CAAC;IAEF,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE;QACjB,OAAO,CACH,KAAC,YAAY,aACT,EAAE,EAAE,EAAE,EACN,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,IAChB,MAAM,cAET,OAAO,CAAC,CAAC,CAAC,CACP,yCAEI,KAAC,OAAO,eAAK,aAAa,UAAI,YAC/B,CACN,CAAC,CAAC,CAAC,gBAAgB,YACT,CAClB,CAAA;KACJ;IAED,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;QACnB,OAAO,CACH,KAAC,YAAY,aACT,EAAE,EAAC,GAAG,EACN,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAgD,EACrD,SAAS,EAAE,SAAS,IAChB,MAAM,cAET,OAAO,CAAC,CAAC,CAAC,CACP,yCAEI,KAAC,OAAO,eAAK,aAAa,UAAI,YAC/B,CACN,CAAC,CAAC,CAAC,gBAAgB,YACT,CAClB,CAAC;KACL;IAED,OAAO,CACH,KAAC,YAAY,aACT,EAAE,EAAC,QAAQ,EACX,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAgD,EACrD,SAAS,EAAE,SAAS,IAChB,MAAM,cAET,OAAO,CAAC,CAAC,CAAC,CACP,yCAEI,KAAC,OAAO,eAAK,aAAa,UAAI,YAC/B,CACN,CAAC,CAAC,CAAC,gBAAgB,YACT,CAClB,CAAC;AACN,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,UAAU,CAAuB,MAAM,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/components/button/index.d.ts: -------------------------------------------------------------------------------- 1 | import Button from './button'; 2 | export * from './button'; 3 | export default Button; 4 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/button/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,cAAc,UAAU,CAAC;AAEzB,eAAe,MAAM,CAAC"} -------------------------------------------------------------------------------- /lib/components/button/index.js: -------------------------------------------------------------------------------- 1 | import Button from './button'; 2 | export * from './button'; 3 | export default Button; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/button/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,cAAc,UAAU,CAAC;AAEzB,eAAe,MAAM,CAAC"} -------------------------------------------------------------------------------- /lib/components/button/styled.d.ts: -------------------------------------------------------------------------------- 1 | import { ButtonType } from "./button"; 2 | import { ComponentSize } from "../../config/sizes"; 3 | interface StyledButtonProps { 4 | innerType: ButtonType; 5 | size: ComponentSize; 6 | withText: boolean; 7 | } 8 | export declare const StyledButton: import("styled-components").StyledComponent<"button", any, StyledButtonProps, never>; 9 | export declare const StyledIcon: import("styled-components").StyledComponent<"div", any, {}, never>; 10 | export {}; 11 | //# sourceMappingURL=styled.d.ts.map -------------------------------------------------------------------------------- /lib/components/button/styled.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/button/styled.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,aAAa,EAAyB,MAAM,oBAAoB,CAAC;AAwC1E,UAAU,iBAAiB;IACvB,SAAS,EAAE,UAAU,CAAC;IACtB,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAGD,eAAO,MAAM,YAAY,sFAmCxB,CAAC;AAEF,eAAO,MAAM,UAAU,oEAEtB,CAAC"} -------------------------------------------------------------------------------- /lib/components/button/styled.js: -------------------------------------------------------------------------------- 1 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { 2 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 3 | return cooked; 4 | }; 5 | import styled from "styled-components"; 6 | import { heights, sidePaddings } from "../../config/sizes"; 7 | var typeColors = { 8 | default: { 9 | regular: '#0018cf', 10 | hover: '#2e27cc', 11 | }, 12 | danger: { 13 | regular: '#d93848', 14 | hover: '#eb4d5d', 15 | }, 16 | ghost: { 17 | regular: 'transparent', 18 | hover: '#dbdbdb', 19 | }, 20 | secondary: { 21 | regular: '#000', 22 | hover: '#3d3d3d', 23 | } 24 | }; 25 | /* Real tag is assigned dynamically */ 26 | export var StyledButton = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n /* Add margin in case of loading or icon */\n & > *:nth-child(1) {\n margin-left: ", "px;\n }\n font-size: 15px;\n border: none;\n cursor: pointer;\n background-color: ", ";\n padding: 0 ", "px;\n height: ", "px;\n color: ", ";\n ", "\n border-radius: 20px;\n outline: none;\n &:focus {\n box-shadow: 0 0 0 1px #fff, 0 0 0 2px ", ";\n }\n &:hover {\n background-color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n /* Add margin in case of loading or icon */\n & > *:nth-child(1) {\n margin-left: ", "px;\n }\n font-size: 15px;\n border: none;\n cursor: pointer;\n background-color: ", ";\n padding: 0 ", "px;\n height: ", "px;\n color: ", ";\n ", "\n border-radius: 20px;\n outline: none;\n &:focus {\n box-shadow: 0 0 0 1px #fff, 0 0 0 2px ", ";\n }\n &:hover {\n background-color: ", ";\n }\n"])), function (pr) { return pr.withText ? 7 : 0; }, function (pr) { return typeColors[pr.innerType].regular; }, function (pr) { return sidePaddings[pr.size]; }, function (pr) { return heights[pr.size]; }, function (pr) { return pr.innerType === 'ghost' 27 | ? typeColors['default'].regular 28 | : '#fff'; }, function (pr) { return pr.disabled ? "\n background-color: #a6a6a6;\n color: #5e5e5e;\n cursor: not-allowed;\n &:hover {\n background-color: #a6a6a6 !important;\n color: #5e5e5e !important;\n }\n " : ''; }, function (pr) { return typeColors[pr.innerType].regular; }, function (pr) { return typeColors[pr.innerType].hover; }); 29 | export var StyledIcon = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 20px;\n"], ["\n height: 20px;\n"]))); 30 | var templateObject_1, templateObject_2; 31 | //# sourceMappingURL=styled.js.map -------------------------------------------------------------------------------- /lib/components/button/styled.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/button/styled.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAiB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAqB1E,IAAM,UAAU,GAAuC;IACnD,OAAO,EAAE;QACL,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,SAAS;KACnB;IACD,MAAM,EAAE;QACJ,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,SAAS;KACnB;IACD,KAAK,EAAE;QACH,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE,SAAS;KACnB;IACD,SAAS,EAAE;QACP,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,SAAS;KACnB;CACJ,CAAC;AAQF,sCAAsC;AACtC,MAAM,CAAC,IAAM,YAAY,GAAG,MAAM,CAAC,MAAM,wlBAAmB,gLAMrC,EAAyB,mGAKxB,EAA0C,oBACjD,EAA4B,mBAC/B,EAAuB,kBACxB,EAGT,SACE,EAQI,+GAIsC,EAA0C,qDAG9D,EAAwC,YAEnE,KA7BsB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAnB,CAAmB,EAKvB,UAAC,EAAE,IAAK,OAAA,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,OAAO,EAAhC,CAAgC,EAC/C,UAAA,EAAE,IAAI,OAAA,YAAY,CAAC,EAAE,CAAC,IAAI,CAAC,EAArB,CAAqB,EAC9B,UAAA,EAAE,IAAI,OAAA,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,EAAhB,CAAgB,EACvB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,SAAS,KAAK,OAAO;IACpC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,OAAO;IAC/B,CAAC,CAAC,MAAM,EAFI,CAEJ,EAET,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,4NAQtB,CAAC,CAAC,CAAC,EAAE,EARG,CAQH,EAIuC,UAAC,EAAE,IAAK,OAAA,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,OAAO,EAAhC,CAAgC,EAG5D,UAAC,EAAE,IAAK,OAAA,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,KAAK,EAA9B,CAA8B,CAElE,CAAC;AAEF,MAAM,CAAC,IAAM,UAAU,GAAG,MAAM,CAAC,GAAG,0FAAA,uBAEnC,IAAA,CAAC"} -------------------------------------------------------------------------------- /lib/components/form-control/form-control.d.ts: -------------------------------------------------------------------------------- 1 | import React, { ReactNode } from 'react'; 2 | export interface FormControlProps { 3 | label?: string; 4 | htmlFor?: string; 5 | error?: string; 6 | hint?: string; 7 | disabled?: boolean; 8 | className?: string; 9 | children: ReactNode; 10 | onBlur?: (e: React.FocusEvent) => void; 11 | onFocus?: (e: React.FocusEvent) => void; 12 | forceLabel?: boolean; 13 | } 14 | declare const _default: React.ForwardRefExoticComponent>; 15 | export default _default; 16 | //# sourceMappingURL=form-control.d.ts.map -------------------------------------------------------------------------------- /lib/components/form-control/form-control.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"form-control.d.ts","sourceRoot":"","sources":["../../../src/components/form-control/form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAGnD,MAAM,WAAW,gBAAgB;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACvD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAExD,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;;AAsCD,wBAA+E"} -------------------------------------------------------------------------------- /lib/components/form-control/form-control.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; 13 | import React, { useState } from 'react'; 14 | import { StyledFormControl, StyledLabel, StyledError, StyledHint } from './styled'; 15 | var FormControl = function (props, ref) { 16 | var _a = props.label, label = _a === void 0 ? '' : _a, _b = props.htmlFor, htmlFor = _b === void 0 ? '' : _b, _c = props.error, error = _c === void 0 ? '' : _c, _d = props.hint, hint = _d === void 0 ? '' : _d, _e = props.disabled, disabled = _e === void 0 ? false : _e, className = props.className, children = props.children, _f = props.onBlur, onBlur = _f === void 0 ? function () { } : _f, _g = props.onFocus, onFocus = _g === void 0 ? function () { } : _g, _h = props.forceLabel, forceLabel = _h === void 0 ? false : _h; 17 | var _j = useState(false), focused = _j[0], setFocused = _j[1]; 18 | return (_jsxs(StyledFormControl, __assign({ ref: ref, className: className, onFocus: function (e) { setFocused(true); onFocus(e); }, onBlur: function (e) { setFocused(false); onBlur(e); } }, { children: [label ? _jsx(StyledLabel, __assign({ htmlFor: htmlFor, focused: forceLabel || disabled || focused || error !== '', error: error !== '' }, { children: label }), void 0) : null, children, error ? _jsx(StyledError, { children: error }, void 0) : (hint ? _jsx(StyledHint, { children: hint }, void 0) : null)] }), void 0)); 19 | }; 20 | export default React.forwardRef(FormControl); 21 | //# sourceMappingURL=form-control.js.map -------------------------------------------------------------------------------- /lib/components/form-control/form-control.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"form-control.js","sourceRoot":"","sources":["../../../src/components/form-control/form-control.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAiBnF,IAAM,WAAW,GAAqE,UAAC,KAAK,EAAE,GAAG;IAEzF,IAAA,KAUA,KAAK,MAVK,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,KASA,KAAK,QATO,EAAZ,OAAO,mBAAG,EAAE,KAAA,EACZ,KAQA,KAAK,MARK,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,KAOA,KAAK,KAPI,EAAT,IAAI,mBAAG,EAAE,KAAA,EACT,KAMA,KAAK,SANW,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,SAAS,GAKT,KAAK,UALI,EACT,QAAQ,GAIR,KAAK,SAJG,EACR,KAGA,KAAK,OAHY,EAAjB,MAAM,mBAAG,cAAO,CAAC,KAAA,EACjB,KAEA,KAAK,QAFa,EAAlB,OAAO,mBAAG,cAAO,CAAC,KAAA,EAClB,KACA,KAAK,WADa,EAAlB,UAAU,mBAAG,KAAK,KAAA,CACZ;IAEJ,IAAA,KAAwB,QAAQ,CAAC,KAAK,CAAC,EAAtC,OAAO,QAAA,EAAE,UAAU,QAAmB,CAAC;IAE9C,OAAO,CACH,MAAC,iBAAiB,aACd,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,UAAC,CAAC,IAAO,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACjD,MAAM,EAAE,UAAC,CAAC,IAAO,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,iBAE/C,KAAK,CAAC,CAAC,CAAC,KAAC,WAAW,aACjB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,UAAU,IAAI,QAAQ,IAAI,OAAO,IAAI,KAAK,KAAK,EAAE,EAC1D,KAAK,EAAE,KAAK,KAAK,EAAE,gBACrB,KAAK,YAAe,CAAC,CAAC,CAAC,IAAI,EAC5B,QAAQ,EACR,KAAK,CAAC,CAAC,CAAC,KAAC,WAAW,cAAE,KAAK,WAAe,CAAC,CAAC,CAAC,CAC1C,IAAI,CAAC,CAAC,CAAC,KAAC,UAAU,cAAE,IAAI,WAAc,CAAC,CAAC,CAAC,IAAI,CAChD,aACe,CACvB,CAAC;AACN,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,UAAU,CAAmC,WAAW,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/components/form-control/index.d.ts: -------------------------------------------------------------------------------- 1 | import FormControl from './form-control'; 2 | export * from './form-control'; 3 | export default FormControl; 4 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/form-control/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/form-control/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,cAAc,gBAAgB,CAAC;AAE/B,eAAe,WAAW,CAAC"} -------------------------------------------------------------------------------- /lib/components/form-control/index.js: -------------------------------------------------------------------------------- 1 | import FormControl from './form-control'; 2 | export * from './form-control'; 3 | export default FormControl; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/form-control/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/form-control/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,cAAc,gBAAgB,CAAC;AAE/B,eAAe,WAAW,CAAC"} -------------------------------------------------------------------------------- /lib/components/form-control/styled.d.ts: -------------------------------------------------------------------------------- 1 | export declare const StyledFormControl: import("styled-components").StyledComponent<"div", any, {}, never>; 2 | interface StyledLabelProps { 3 | focused: boolean; 4 | error: boolean; 5 | } 6 | export declare const StyledLabel: import("styled-components").StyledComponent<"label", any, StyledLabelProps, never>; 7 | export declare const StyledError: import("styled-components").StyledComponent<"span", any, {}, never>; 8 | export declare const StyledHint: import("styled-components").StyledComponent<"span", any, {}, never>; 9 | export {}; 10 | //# sourceMappingURL=styled.d.ts.map -------------------------------------------------------------------------------- /lib/components/form-control/styled.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/form-control/styled.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,oEAI7B,CAAC;AAEF,UAAU,gBAAgB;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,oFAYvB,CAAC;AAOF,eAAO,MAAM,WAAW,qEAEvB,CAAC;AACF,eAAO,MAAM,UAAU,qEAGtB,CAAC"} -------------------------------------------------------------------------------- /lib/components/form-control/styled.js: -------------------------------------------------------------------------------- 1 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { 2 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 3 | return cooked; 4 | }; 5 | import styled from "styled-components"; 6 | export var StyledFormControl = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n margin-bottom: 20px;\n"], ["\n box-sizing: border-box;\n position: relative;\n margin-bottom: 20px;\n"]))); 7 | export var StyledLabel = styled.label(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: block;\n position: relative;\n z-index: 2;\n transform: ", ";\n opacity: ", ";\n visibility: ", ";\n transition: all 0.2s ease-in;\n font-size: 0.8em;\n font-weight: 500;\n margin-bottom: 5px;\n color: ", ";\n"], ["\n display: block;\n position: relative;\n z-index: 2;\n transform: ", ";\n opacity: ", ";\n visibility: ", ";\n transition: all 0.2s ease-in;\n font-size: 0.8em;\n font-weight: 500;\n margin-bottom: 5px;\n color: ", ";\n"])), function (pr) { return pr.focused ? 'translateY(0)' : 'translateY(20px)'; }, function (pr) { return pr.focused ? 1 : 0; }, function (pr) { return pr.focused ? 'visible' : 'hidden'; }, function (pr) { return pr.error ? '#d93848' : '#000'; }); 8 | var StyledCaption = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n font-size: 0.75em;\n"], ["\n position: absolute;\n font-size: 0.75em;\n"]))); 9 | export var StyledError = styled(StyledCaption)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: #d93848;\n"], ["\n color: #d93848;\n"]))); 10 | export var StyledHint = styled(StyledCaption)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: #545454;\n font-style: italic;\n"], ["\n color: #545454;\n font-style: italic;\n"]))); 11 | var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5; 12 | //# sourceMappingURL=styled.js.map -------------------------------------------------------------------------------- /lib/components/form-control/styled.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/form-control/styled.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,uJAAA,oFAI1C,IAAA,CAAC;AAOF,MAAM,CAAC,IAAM,WAAW,GAAG,MAAM,CAAC,KAAK,mUAAkB,kFAIxC,EAAuD,kBACzD,EAAwB,qBACrB,EAAuC,0HAK5C,EAAmC,KAC/C,KARgB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,kBAAkB,EAAjD,CAAiD,EACzD,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAlB,CAAkB,EACrB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAjC,CAAiC,EAK5C,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAA7B,CAA6B,CAC/C,CAAC;AAEF,IAAM,aAAa,GAAG,MAAM,CAAC,IAAI,wHAAA,qDAGhC,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,4FAAA,yBAE/C,IAAA,CAAC;AACF,MAAM,CAAC,IAAM,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,qHAAA,kDAG9C,IAAA,CAAC"} -------------------------------------------------------------------------------- /lib/components/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as Button } from './button'; 2 | export { default as FormControl } from './form-control'; 3 | export { default as Link } from './link'; 4 | export { default as Search } from './search'; 5 | export { default as Select } from './select'; 6 | export { default as Skeleton } from './skeleton'; 7 | export { default as Spinner } from './spinner'; 8 | export { default as TextInput } from './text-input'; 9 | export { default as Login } from './login'; 10 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"} -------------------------------------------------------------------------------- /lib/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as Button } from './button'; 2 | export { default as FormControl } from './form-control'; 3 | export { default as Link } from './link'; 4 | export { default as Search } from './search'; 5 | export { default as Select } from './select'; 6 | export { default as Skeleton } from './skeleton'; 7 | export { default as Spinner } from './spinner'; 8 | export { default as TextInput } from './text-input'; 9 | export { default as Login } from './login'; 10 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"} -------------------------------------------------------------------------------- /lib/components/link/index.d.ts: -------------------------------------------------------------------------------- 1 | import Link from './link'; 2 | export * from './link'; 3 | export default Link; 4 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/link/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/link/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,cAAc,QAAQ,CAAC;AAEvB,eAAe,IAAI,CAAC"} -------------------------------------------------------------------------------- /lib/components/link/index.js: -------------------------------------------------------------------------------- 1 | import Link from './link'; 2 | export * from './link'; 3 | export default Link; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/link/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/link/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,cAAc,QAAQ,CAAC;AAEvB,eAAe,IAAI,CAAC"} -------------------------------------------------------------------------------- /lib/components/link/link.d.ts: -------------------------------------------------------------------------------- 1 | import React, { ElementType, HTMLAttributes, ReactNode } from 'react'; 2 | export interface LinkProps extends Omit, 'as' | 'disabled'> { 3 | disabled?: boolean; 4 | className?: string; 5 | children: ReactNode; 6 | as?: ElementType; 7 | href?: string; 8 | } 9 | declare const _default: React.ForwardRefExoticComponent>; 10 | export default _default; 11 | //# sourceMappingURL=link.d.ts.map -------------------------------------------------------------------------------- /lib/components/link/link.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../src/components/link/link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC;IACzF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;;AAuBD,wBAAoE"} -------------------------------------------------------------------------------- /lib/components/link/link.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx } from "react/jsx-runtime"; 13 | import React from 'react'; 14 | import { StyledLink } from './styled'; 15 | var Link = function (props, ref) { 16 | var className = props.className, _a = props.disabled, disabled = _a === void 0 ? false : _a, children = props.children, _b = props.as, as = _b === void 0 ? 'a' : _b, href = props.href; 17 | return (_jsx(StyledLink, __assign({ ref: ref, className: className, as: disabled ? 'p' : as, href: href, disabled: disabled }, { children: children }), void 0)); 18 | }; 19 | export default React.forwardRef(Link); 20 | //# sourceMappingURL=link.js.map -------------------------------------------------------------------------------- /lib/components/link/link.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/components/link/link.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAUtC,IAAM,IAAI,GAAiE,UAAC,KAAK,EAAE,GAAG;IAE9E,IAAA,SAAS,GAKT,KAAK,UALI,EACT,KAIA,KAAK,SAJW,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,QAAQ,GAGR,KAAK,SAHG,EACR,KAEA,KAAK,GAFG,EAAR,EAAE,mBAAG,GAAG,KAAA,EACR,IAAI,GACJ,KAAK,KADD,CACE;IAEV,OAAO,CACH,KAAC,UAAU,aACP,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EACvB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,gBACpB,QAAQ,YAAc,CAC3B,CAAC;AACN,CAAC,CAAA;AAGD,eAAe,KAAK,CAAC,UAAU,CAA+B,IAAI,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/components/link/styled.d.ts: -------------------------------------------------------------------------------- 1 | interface StyledLinkProps { 2 | disabled: boolean; 3 | } 4 | export declare const StyledLink: import("styled-components").StyledComponent<"a", any, StyledLinkProps, never>; 5 | export {}; 6 | //# sourceMappingURL=styled.d.ts.map -------------------------------------------------------------------------------- /lib/components/link/styled.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/link/styled.ts"],"names":[],"mappings":"AAEA,UAAU,eAAe;IACrB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,+EAwBtB,CAAA"} -------------------------------------------------------------------------------- /lib/components/link/styled.js: -------------------------------------------------------------------------------- 1 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { 2 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 3 | return cooked; 4 | }; 5 | import styled from "styled-components"; 6 | export var StyledLink = styled.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n box-sizing: border-box;\n color: #0018cf;\n cursor: pointer;\n text-decoration: none;\n margin: 0;\n padding: 0;\n font-size: 15px;\n\n &:active, &:visited {\n color: #0018cf;\n text-decoration: none;\n }\n &:focus, &:hover {\n color: #6874cc;\n }\n\n ", " \n"], ["\n display: inline-block;\n box-sizing: border-box;\n color: #0018cf;\n cursor: pointer;\n text-decoration: none;\n margin: 0;\n padding: 0;\n font-size: 15px;\n\n &:active, &:visited {\n color: #0018cf;\n text-decoration: none;\n }\n &:focus, &:hover {\n color: #6874cc;\n }\n\n ", " \n"])), function (pr) { return pr.disabled ? "\n cursor: not-allowed;\n &, &:focus, &:visited, &:hover {\n color: #5e5e5e;\n }\n " : ''; }); 7 | var templateObject_1; 8 | //# sourceMappingURL=styled.js.map -------------------------------------------------------------------------------- /lib/components/link/styled.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/link/styled.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAMvC,MAAM,CAAC,IAAM,UAAU,GAAG,MAAM,CAAC,CAAC,gaAAiB,sVAkB7C,EAKI,KACT,KANK,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,wHAKrB,CAAC,CAAC,CAAC,EAAE,EALE,CAKF,CACT,CAAA"} -------------------------------------------------------------------------------- /lib/components/login/index.d.ts: -------------------------------------------------------------------------------- 1 | import Login from './login'; 2 | export * from './login'; 3 | export default Login; 4 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/login/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,cAAc,SAAS,CAAC;AAExB,eAAe,KAAK,CAAC"} -------------------------------------------------------------------------------- /lib/components/login/index.js: -------------------------------------------------------------------------------- 1 | import Login from './login'; 2 | export * from './login'; 3 | export default Login; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/login/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,cAAc,SAAS,CAAC;AAExB,eAAe,KAAK,CAAC"} -------------------------------------------------------------------------------- /lib/components/login/login.d.ts: -------------------------------------------------------------------------------- 1 | import React, { HTMLAttributes } from 'react'; 2 | export interface LoginModel { 3 | email?: string; 4 | password?: string; 5 | } 6 | export declare type SubmitHandler = (fieldValues: LoginModel) => void; 7 | export interface LoginProps extends Omit, 'onSubmit'> { 8 | onSubmit?: SubmitHandler; 9 | initialValues?: LoginModel; 10 | loading?: boolean; 11 | registerLink?: string; 12 | } 13 | declare const _default: React.ForwardRefExoticComponent>; 14 | export default _default; 15 | //# sourceMappingURL=login.d.ts.map -------------------------------------------------------------------------------- /lib/components/login/login.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/components/login/login.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAe,cAAc,EAAE,MAAM,OAAO,CAAC;AAS3D,MAAM,WAAW,UAAU;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,oBAAY,aAAa,GAAG,CAAC,WAAW,EAAE,UAAU,KAAK,IAAI,CAAC;AAE9D,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;IACjF,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;;AA+DD,wBAAoE"} -------------------------------------------------------------------------------- /lib/components/login/login.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; 13 | import React from 'react'; 14 | import useLoginLogic from './use-login-logic'; 15 | import FormControl from '../form-control'; 16 | import TextInput from '../text-input'; 17 | import Button from '../button'; 18 | import { ButtonWrapper, StyledForm } from './styled'; 19 | import { H3 } from '../typography'; 20 | import Link from '../link'; 21 | var Login = function (props, ref) { 22 | var _a = props.onSubmit, onSubmit = _a === void 0 ? function () { } : _a, _b = props.initialValues, initialValues = _b === void 0 ? {} : _b, _c = props.loading, loading = _c === void 0 ? false : _c, _d = props.registerLink, registerLink = _d === void 0 ? '#' : _d; 23 | var _e = useLoginLogic(onSubmit, initialValues), values = _e.values, errors = _e.errors, handleChange = _e.handleChange, handleSubmit = _e.handleSubmit; 24 | return (_jsxs(StyledForm, { children: [_jsx(H3, __assign({ align: 'center' }, { children: "Sign In" }), void 0), _jsx(FormControl, __assign({ label: 'Email', htmlFor: 'email', error: errors.email, forceLabel: true }, { children: _jsx(TextInput, { id: 'email', value: values.email, placeholder: 'Enter email', onChange: function (e) { return handleChange('email')(e.currentTarget.value); }, error: !!errors.email }, void 0) }), void 0), _jsx(FormControl, __assign({ label: 'Password', htmlFor: 'password', error: errors.password, forceLabel: true }, { children: _jsx(TextInput, { id: 'password', type: 'password', value: values.password, placeholder: 'Enter password', onChange: function (e) { return handleChange('password')(e.currentTarget.value); }, error: !!errors.password }, void 0) }), void 0), _jsxs(ButtonWrapper, { children: [_jsx(Link, __assign({ href: registerLink }, { children: "Create account" }), void 0), _jsx(Button, __assign({ onClick: handleSubmit, loading: loading }, { children: "Proceed" }), void 0)] }, void 0)] }, void 0)); 25 | }; 26 | export default React.forwardRef(Login); 27 | //# sourceMappingURL=login.js.map -------------------------------------------------------------------------------- /lib/components/login/login.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/components/login/login.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,SAAS,MAAM,eAAe,CAAC;AACtC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACnC,OAAO,IAAI,MAAM,SAAS,CAAC;AAgB3B,IAAM,KAAK,GAAgE,UAAC,KAAK,EAAE,GAAG;IAE9E,IAAA,KAIA,KAAK,SAJc,EAAnB,QAAQ,mBAAG,cAAO,CAAC,KAAA,EACnB,KAGA,KAAK,cAHa,EAAlB,aAAa,mBAAG,EAAE,KAAA,EAClB,KAEA,KAAK,QAFU,EAAf,OAAO,mBAAG,KAAK,KAAA,EACf,KACA,KAAK,aADa,EAAlB,YAAY,mBAAG,GAAG,KAAA,CACZ;IAEJ,IAAA,KAKA,aAAa,CACf,QAAQ,EACR,aAAa,CACd,EAPC,MAAM,YAAA,EACN,MAAM,YAAA,EACN,YAAY,kBAAA,EACZ,YAAY,kBAIb,CAAC;IACJ,OAAO,CACH,MAAC,UAAU,eACP,KAAC,EAAE,aAAC,KAAK,EAAC,QAAQ,qCAAa,EAC/B,KAAC,WAAW,aACR,KAAK,EAAC,OAAO,EACb,OAAO,EAAC,OAAO,EACf,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,UAAU,sBAEV,KAAC,SAAS,IACN,EAAE,EAAC,OAAO,EACV,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,WAAW,EAAC,aAAa,EACzB,QAAQ,EAAE,UAAC,CAAgC,IAAK,OAAA,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EAA5C,CAA4C,EAC5F,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,WACvB,YACQ,EACd,KAAC,WAAW,aACR,KAAK,EAAC,UAAU,EAChB,OAAO,EAAC,UAAU,EAClB,KAAK,EAAE,MAAM,CAAC,QAAQ,EACtB,UAAU,sBAEV,KAAC,SAAS,IACN,EAAE,EAAC,UAAU,EACb,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,MAAM,CAAC,QAAQ,EACtB,WAAW,EAAC,gBAAgB,EAC5B,QAAQ,EAAE,UAAC,CAAgC,IAAK,OAAA,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,EAA/C,CAA+C,EAC/F,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,WAC1B,YACQ,EACd,MAAC,aAAa,eACV,KAAC,IAAI,aAAC,IAAI,EAAE,YAAY,4CAAuB,EAC/C,KAAC,MAAM,aACH,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,OAAO,qCACH,YACL,YACP,CAChB,CAAC;AACN,CAAC,CAAA;AAGD,eAAe,KAAK,CAAC,UAAU,CAA8B,KAAK,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/components/login/styled.d.ts: -------------------------------------------------------------------------------- 1 | export declare const ButtonWrapper: import("styled-components").StyledComponent<"div", any, {}, never>; 2 | export declare const StyledForm: import("styled-components").StyledComponent<"form", any, {}, never>; 3 | //# sourceMappingURL=styled.d.ts.map -------------------------------------------------------------------------------- /lib/components/login/styled.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/login/styled.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,oEAKzB,CAAA;AAED,eAAO,MAAM,UAAU,qEAItB,CAAC"} -------------------------------------------------------------------------------- /lib/components/login/styled.js: -------------------------------------------------------------------------------- 1 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { 2 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 3 | return cooked; 4 | }; 5 | import styled from "styled-components"; 6 | export var ButtonWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 40px;\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 40px;\n"]))); 7 | export var StyledForm = styled.form(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 40px 25px;\n width: 450px;\n border: 1px solid #333333;\n"], ["\n padding: 40px 25px;\n width: 450px;\n border: 1px solid #333333;\n"]))); 8 | var templateObject_1, templateObject_2; 9 | //# sourceMappingURL=styled.js.map -------------------------------------------------------------------------------- /lib/components/login/styled.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/login/styled.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,GAAG,iLAAA,8GAKtC,IAAA,CAAA;AAED,MAAM,CAAC,IAAM,UAAU,GAAG,MAAM,CAAC,IAAI,mJAAA,gFAIpC,IAAA,CAAC"} -------------------------------------------------------------------------------- /lib/components/login/use-login-logic.d.ts: -------------------------------------------------------------------------------- 1 | import { LoginModel, SubmitHandler } from "./login"; 2 | export declare type ErrorModel = { 3 | [key in keyof LoginModel]?: string; 4 | }; 5 | declare const useLoginLogic: (onSubmit: SubmitHandler, initialValues: LoginModel) => { 6 | values: LoginModel; 7 | errors: ErrorModel; 8 | handleChange: (fieldName: string) => (value: any) => void; 9 | handleSubmit: (event: any) => void; 10 | }; 11 | export default useLoginLogic; 12 | //# sourceMappingURL=use-login-logic.d.ts.map -------------------------------------------------------------------------------- /lib/components/login/use-login-logic.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"use-login-logic.d.ts","sourceRoot":"","sources":["../../../src/components/login/use-login-logic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGpD,oBAAY,UAAU,GAAG;KAAE,GAAG,IAAI,MAAM,UAAU,CAAC,CAAC,EAAE,MAAM;CAAC,CAAC;AAoB9D,QAAA,MAAM,aAAa,aACL,aAAa,iBACR,UAAU;YAEjB,UAAU;YACV,UAAU;8BACQ,MAAM,aAAa,GAAG,KAAK,IAAI;0BACnC,GAAG,KAAK,IAAI;CAoCnC,CAAC;AAEF,eAAe,aAAa,CAAC"} -------------------------------------------------------------------------------- /lib/components/login/use-login-logic.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { useEffect, useState } from "react"; 13 | import { validate as validateEmail } from 'email-validator'; 14 | var validate = function (values) { 15 | var errors = {}; 16 | if (!values.password) { 17 | errors.password = 'Field is required'; 18 | } 19 | if (!values.email) { 20 | errors.email = 'Field is required'; 21 | } 22 | else if (!validateEmail(values.email)) { 23 | errors.email = 'Please type a valid email address'; 24 | } 25 | return errors; 26 | }; 27 | var useLoginLogic = function (onSubmit, initialValues) { 28 | var _a = useState(initialValues), values = _a[0], setValues = _a[1]; 29 | var _b = useState({}), errors = _b[0], setErrors = _b[1]; 30 | var _c = useState(false), isSubmitting = _c[0], setIsSubmitting = _c[1]; 31 | useEffect(function () { 32 | if (Object.keys(errors).length === 0 && isSubmitting) { 33 | onSubmit(values); 34 | } 35 | setIsSubmitting(false); 36 | }, [errors]); 37 | var handleSubmit = function (event) { 38 | if (event) 39 | event.preventDefault(); 40 | setErrors(validate(values)); 41 | setIsSubmitting(true); 42 | }; 43 | var handleChange = function (fieldName) { return function (value) { 44 | setValues(function (values) { 45 | var _a; 46 | return (__assign(__assign({}, values), (_a = {}, _a[fieldName] = value, _a))); 47 | }); 48 | }; }; 49 | return { 50 | handleChange: handleChange, 51 | handleSubmit: handleSubmit, 52 | values: values, 53 | errors: errors, 54 | }; 55 | }; 56 | export default useLoginLogic; 57 | //# sourceMappingURL=use-login-logic.js.map -------------------------------------------------------------------------------- /lib/components/login/use-login-logic.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"use-login-logic.js","sourceRoot":"","sources":["../../../src/components/login/use-login-logic.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAI5D,IAAM,QAAQ,GAAG,UACb,MAAkB;IAElB,IAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QAClB,MAAM,CAAC,QAAQ,GAAG,mBAAmB,CAAC;KACzC;IAED,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;QACf,MAAM,CAAC,KAAK,GAAG,mBAAmB,CAAC;KACtC;SAAM,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QACrC,MAAM,CAAC,KAAK,GAAG,mCAAmC,CAAA;KACrD;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEJ,IAAM,aAAa,GAAG,UAClB,QAAuB,EACvB,aAAyB;IAOnB,IAAA,KAAsB,QAAQ,CAAa,aAAa,CAAC,EAAxD,MAAM,QAAA,EAAE,SAAS,QAAuC,CAAC;IAC1D,IAAA,KAAsB,QAAQ,CAAa,EAAE,CAAC,EAA7C,MAAM,QAAA,EAAE,SAAS,QAA4B,CAAC;IAC/C,IAAA,KAAkC,QAAQ,CAAC,KAAK,CAAC,EAAhD,YAAY,QAAA,EAAE,eAAe,QAAmB,CAAC;IAGxD,SAAS,CAAC;QACR,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,YAAY,EAAE;YACpD,QAAQ,CAAC,MAAM,CAAC,CAAC;SAClB;QACD,eAAe,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,IAAM,YAAY,GAAG,UACnB,KAAU;QAEV,IAAI,KAAK;YAAE,KAAK,CAAC,cAAc,EAAE,CAAC;QAElC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QAC5B,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,IAAM,YAAY,GAAG,UAAC,SAAiB,IAAK,OAAA,UAAC,KAAU;QACrD,SAAS,CAAC,UAAC,MAAkB;;YAAiB,OAAA,uBACzC,MAAM,gBACR,SAAS,IAAG,KAAK,OAClB;QAH4C,CAG5C,CAAC,CAAC;IACN,CAAC,EAL2C,CAK3C,CAAC;IAEF,OAAO;QACL,YAAY,cAAA;QACZ,YAAY,cAAA;QACZ,MAAM,QAAA;QACN,MAAM,QAAA;KACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"} -------------------------------------------------------------------------------- /lib/components/search/index.d.ts: -------------------------------------------------------------------------------- 1 | import Search from './search'; 2 | export * from './search'; 3 | export default Search; 4 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/search/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/search/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,cAAc,UAAU,CAAC;AAEzB,eAAe,MAAM,CAAC"} -------------------------------------------------------------------------------- /lib/components/search/index.js: -------------------------------------------------------------------------------- 1 | import Search from './search'; 2 | export * from './search'; 3 | export default Search; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/search/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/search/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,cAAc,UAAU,CAAC;AAEzB,eAAe,MAAM,CAAC"} -------------------------------------------------------------------------------- /lib/components/search/search.d.ts: -------------------------------------------------------------------------------- 1 | import React, { ChangeEventHandler } from "react"; 2 | import { ComponentSize } from "../../config/sizes"; 3 | export interface SearchProps { 4 | className?: string; 5 | size?: ComponentSize; 6 | width?: string; 7 | value?: string; 8 | onChange?: ChangeEventHandler; 9 | placeholder?: string; 10 | } 11 | declare const _default: React.ForwardRefExoticComponent>; 12 | export default _default; 13 | //# sourceMappingURL=search.d.ts.map -------------------------------------------------------------------------------- /lib/components/search/search.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/components/search/search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;;AAkCD,wBAAqE"} -------------------------------------------------------------------------------- /lib/components/search/search.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; 13 | import React from "react"; 14 | import Button from "../button"; 15 | import TextInput from "../text-input"; 16 | import { SearchWrapper } from "./styled"; 17 | import SearchIcon from "../../icons/Search"; 18 | var Search = function (props, ref) { 19 | var _a = props.size, size = _a === void 0 ? "default" : _a, className = props.className, value = props.value, onChange = props.onChange, placeholder = props.placeholder, _b = props.width, width = _b === void 0 ? "100%" : _b; 20 | var textInputStyles = { 21 | size: size, 22 | width: "100%", 23 | placeholder: placeholder, 24 | }; 25 | return (_jsxs(SearchWrapper, __assign({ ref: ref, className: className, width: width }, { children: [_jsx(TextInput, __assign({ value: value, onChange: onChange, clearable: true }, textInputStyles), void 0), _jsx(Button, { type: "secondary", icon: SearchIcon }, void 0)] }), void 0)); 26 | }; 27 | export default React.forwardRef(Search); 28 | //# sourceMappingURL=search.js.map -------------------------------------------------------------------------------- /lib/components/search/search.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/components/search/search.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,SAAS,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAW5C,IAAM,MAAM,GAAgE,UAC1E,KAAK,EACL,GAAG;IAGD,IAAA,KAME,KAAK,KANS,EAAhB,IAAI,mBAAG,SAAS,KAAA,EAChB,SAAS,GAKP,KAAK,UALE,EACT,KAAK,GAIH,KAAK,MAJF,EACL,QAAQ,GAGN,KAAK,SAHC,EACR,WAAW,GAET,KAAK,YAFI,EACX,KACE,KAAK,MADO,EAAd,KAAK,mBAAG,MAAM,KAAA,CACN;IAEV,IAAM,eAAe,GAAG;QACtB,IAAI,MAAA;QACJ,KAAK,EAAE,MAAM;QACb,WAAW,aAAA;KACZ,CAAC;IAEF,OAAO,CACL,MAAC,aAAa,aAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,iBACzD,KAAC,SAAS,aACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,SAAS,UACL,eAAe,UACnB,EACF,KAAC,MAAM,IAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAE,UAAU,WAAI,aAC/B,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC,UAAU,CAA8B,MAAM,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/components/search/styled.d.ts: -------------------------------------------------------------------------------- 1 | interface SearchWrapperProps { 2 | width: string; 3 | } 4 | export declare const SearchWrapper: import("styled-components").StyledComponent<"div", any, SearchWrapperProps, never>; 5 | export {}; 6 | //# sourceMappingURL=styled.d.ts.map -------------------------------------------------------------------------------- /lib/components/search/styled.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/search/styled.ts"],"names":[],"mappings":"AAEA,UAAU,kBAAkB;IACxB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,oFAIzB,CAAC"} -------------------------------------------------------------------------------- /lib/components/search/styled.js: -------------------------------------------------------------------------------- 1 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { 2 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 3 | return cooked; 4 | }; 5 | import styled from "styled-components"; 6 | export var SearchWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n\n display: flex;\n"], ["\n width: ", ";\n\n display: flex;\n"])), function (pr) { return pr.width; }); 7 | var templateObject_1; 8 | //# sourceMappingURL=styled.js.map -------------------------------------------------------------------------------- /lib/components/search/styled.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/search/styled.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAMvC,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,GAAG,+GAAoB,eAC9C,EAAc,2BAG1B,KAHY,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,EAAR,CAAQ,CAG1B,CAAC"} -------------------------------------------------------------------------------- /lib/components/select/index.d.ts: -------------------------------------------------------------------------------- 1 | import Select from './select'; 2 | export * from './select'; 3 | export default Select; 4 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/select/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,cAAc,UAAU,CAAC;AAEzB,eAAe,MAAM,CAAC"} -------------------------------------------------------------------------------- /lib/components/select/index.js: -------------------------------------------------------------------------------- 1 | import Select from './select'; 2 | export * from './select'; 3 | export default Select; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/select/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,cAAc,UAAU,CAAC;AAEzB,eAAe,MAAM,CAAC"} -------------------------------------------------------------------------------- /lib/components/select/select.d.ts: -------------------------------------------------------------------------------- 1 | import React, { HTMLAttributes } from 'react'; 2 | import { ComponentSize } from '../../config/sizes'; 3 | export declare type SelectOption = { 4 | label: string; 5 | value: string; 6 | }; 7 | export declare type SelectChangeHandler = (option: SelectOption | undefined) => void; 8 | export interface SelectProps extends Omit, 'className' | 'width' | 'option' | 'onChange'> { 9 | className?: string; 10 | size?: ComponentSize; 11 | disabled?: boolean; 12 | error?: boolean; 13 | width?: string; 14 | option?: SelectOption; 15 | listOptions?: SelectOption[]; 16 | onChange?: SelectChangeHandler; 17 | placeholder?: string; 18 | } 19 | declare const _default: React.ForwardRefExoticComponent>; 20 | export default _default; 21 | //# sourceMappingURL=select.d.ts.map -------------------------------------------------------------------------------- /lib/components/select/select.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAU,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAWnD,oBAAY,YAAY,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAA;AAED,oBAAY,mBAAmB,GAAG,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,KAAK,IAAI,CAAC;AAE7E,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IACpH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,WAAW,CAAC,EAAE,YAAY,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;;AAmED,wBAAqE"} -------------------------------------------------------------------------------- /lib/components/select/select.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; 13 | import React, { useRef } from 'react'; 14 | import TextInput from '../text-input'; 15 | import { StyledWrapper, StyledHeader, StyledArrow, StyledPopover, List, ListItem } from './styled'; 16 | import { useSelectLogic } from './use-select-logic'; 17 | var Select = function (props, ref) { 18 | var _a = props.size, size = _a === void 0 ? 'default' : _a, className = props.className, _b = props.disabled, disabled = _b === void 0 ? false : _b, _c = props.error, error = _c === void 0 ? false : _c, option = props.option, listOptions = props.listOptions, onChange = props.onChange, placeholder = props.placeholder, _d = props.width, width = _d === void 0 ? '100%' : _d; 19 | var textInputStyles = { 20 | size: size, 21 | disabled: disabled, 22 | error: error, 23 | width: '100%', 24 | placeholder: placeholder, 25 | readonly: true, 26 | }; 27 | var headerRef = useRef(null); 28 | var popoverRef = useRef(null); 29 | var _e = useSelectLogic(onChange, { headerRef: headerRef, popoverRef: popoverRef }, disabled), onOptionClick = _e.onOptionClick, optionsListVisible = _e.optionsListVisible, setOptionsListVisible = _e.setOptionsListVisible; 30 | return (_jsxs(StyledWrapper, __assign({ className: className, width: width, innerSize: size }, { children: [_jsxs(StyledHeader, __assign({ ref: headerRef, onClick: function () { return setOptionsListVisible(true); } }, { children: [_jsx(TextInput, __assign({ value: option ? option.value : '' }, textInputStyles), void 0), _jsx(StyledArrow, { innerSize: size, upwards: optionsListVisible }, void 0)] }), void 0), _jsx(StyledPopover, __assign({ ref: popoverRef, width: width, visible: optionsListVisible }, { children: _jsx(List, { children: listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (option) { return (_jsx(ListItem, __assign({ innerSize: size, onClick: function () { return onOptionClick(option); } }, { children: option.label }), option.value)); }) }, void 0) }), void 0)] }), void 0)); 31 | }; 32 | export default React.forwardRef(Select); 33 | //# sourceMappingURL=select.js.map -------------------------------------------------------------------------------- /lib/components/select/select.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAkB,MAAM,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,SAAS,MAAM,eAAe,CAAC;AAEtC,OAAO,EACH,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,EACb,IAAI,EACJ,QAAQ,EACX,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAqBpD,IAAM,MAAM,GAAgE,UAAC,KAAK,EAAE,GAAG;IAE/E,IAAA,KASA,KAAK,KATW,EAAhB,IAAI,mBAAG,SAAS,KAAA,EAChB,SAAS,GAQT,KAAK,UARI,EACT,KAOA,KAAK,SAPW,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAMA,KAAK,MANQ,EAAb,KAAK,mBAAG,KAAK,KAAA,EACb,MAAM,GAKN,KAAK,OALC,EACN,WAAW,GAIX,KAAK,YAJM,EACX,QAAQ,GAGR,KAAK,SAHG,EACR,WAAW,GAEX,KAAK,YAFM,EACX,KACA,KAAK,MADS,EAAd,KAAK,mBAAG,MAAM,KAAA,CACR;IAEV,IAAM,eAAe,GAAG;QACpB,IAAI,MAAA;QACJ,QAAQ,UAAA;QACR,KAAK,OAAA;QACL,KAAK,EAAE,MAAM;QACb,WAAW,aAAA;QACX,QAAQ,EAAE,IAAI;KACjB,CAAA;IAED,IAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,IAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC1C,IAAA,KAIF,cAAc,CAAC,QAAQ,EAAE,EAAE,SAAS,WAAA,EAAE,UAAU,YAAA,EAAE,EAAE,QAAQ,CAAC,EAH7D,aAAa,mBAAA,EACb,kBAAkB,wBAAA,EAClB,qBAAqB,2BACwC,CAAC;IAElE,OAAO,CACH,MAAC,aAAa,aACV,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAI,iBAEf,MAAC,YAAY,aACT,GAAG,EAAE,SAAS,EACd,OAAO,EAAE,cAAM,OAAA,qBAAqB,CAAC,IAAI,CAAC,EAA3B,CAA2B,iBAE1C,KAAC,SAAS,aACN,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAC7B,eAAe,UACrB,EACF,KAAC,WAAW,IAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,WAAI,aAClD,EACf,KAAC,aAAa,aACV,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,kBAAkB,gBAE3B,KAAC,IAAI,cACA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,CAC1B,KAAC,QAAQ,aAEL,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,cAAM,OAAA,aAAa,CAAC,MAAM,CAAC,EAArB,CAAqB,gBACtC,MAAM,CAAC,KAAK,KAHL,MAAM,CAAC,KAAK,CAGK,CAC7B,EAN6B,CAM7B,CAAC,WACC,YACK,aACJ,CACnB,CAAC;AACN,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,UAAU,CAA8B,MAAM,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/components/select/styled.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { ComponentSize } from "../../config/sizes"; 3 | interface StyledWrapperProps { 4 | width: string; 5 | innerSize: ComponentSize; 6 | } 7 | export declare const StyledWrapper: import("styled-components").StyledComponent<"div", any, StyledWrapperProps, never>; 8 | export declare const StyledHeader: import("styled-components").StyledComponent<"div", any, {}, never>; 9 | interface StyledArrowProps { 10 | innerSize: ComponentSize; 11 | upwards: boolean; 12 | } 13 | export declare const StyledArrow: import("styled-components").StyledComponent<(props: import("react").SVGProps) => JSX.Element, any, StyledArrowProps, never>; 14 | interface StyledPopoverProps { 15 | width: string; 16 | visible: boolean; 17 | } 18 | export declare const StyledPopover: import("styled-components").StyledComponent<"div", any, StyledPopoverProps, never>; 19 | export declare const List: import("styled-components").StyledComponent<"ul", any, {}, never>; 20 | interface ListItemProps { 21 | innerSize: ComponentSize; 22 | } 23 | export declare const ListItem: import("styled-components").StyledComponent<"li", any, ListItemProps, never>; 24 | export {}; 25 | //# sourceMappingURL=styled.d.ts.map -------------------------------------------------------------------------------- /lib/components/select/styled.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/select/styled.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAyB,MAAM,oBAAoB,CAAC;AAG1E,UAAU,kBAAkB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,oFAKzB,CAAC;AAEF,eAAO,MAAM,YAAY,oEAOxB,CAAC;AAEF,UAAU,gBAAgB;IACtB,SAAS,EAAE,aAAa,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,WAAW,4IAavB,CAAC;AAEF,UAAU,kBAAkB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,oFAgBzB,CAAC;AAEF,eAAO,MAAM,IAAI,mEAKhB,CAAC;AAGF,UAAU,aAAa;IACnB,SAAS,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,QAAQ,8EAUpB,CAAC"} -------------------------------------------------------------------------------- /lib/components/select/styled.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/select/styled.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAiB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAO9C,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,GAAG,oKAAoB,qEAG9C,EAAc,iBACb,EAA4B,OACzC,KAFY,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,EAAR,CAAQ,EACZ,UAAA,EAAE,IAAI,OAAA,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,EAArB,CAAqB,CACzC,CAAC;AAEF,MAAM,CAAC,IAAM,YAAY,GAAG,MAAM,CAAC,GAAG,6LAAA,0HAOrC,IAAA,CAAC;AAOF,MAAM,CAAC,IAAM,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC;IACpD,iBAAiB,EAAE,UAAC,IAAI,EAAE,YAAY;QACpC,OAAA,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC;IAA9D,CAA8D;CACjE,CAAC,uQAAkB,qEAGT,EAAiC,qCAE7B,EAA4E,sFAK5F,KAPa,UAAA,EAAE,IAAI,OAAA,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,EAA1B,CAA0B,EAE5B,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,kBAAkB,EAApE,CAAoE,CAK3F,CAAC;AAOF,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,GAAG,ycAAoB,0GAM9C,EAAc,+PAQT,EAAuC,kBAC1C,EAAwB,KACtC,KAVY,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,EAAR,CAAQ,EAQT,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAjC,CAAiC,EAC1C,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAlB,CAAkB,CACtC,CAAC;AAEF,MAAM,CAAC,IAAM,IAAI,GAAG,MAAM,CAAC,EAAE,4JAAA,yFAK5B,IAAA,CAAC;AAOF,MAAM,CAAC,IAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,uPAAe,yFAI7B,EAAiC,yFAMnD,KANmB,UAAA,EAAE,IAAI,OAAA,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,EAA1B,CAA0B,CAMnD,CAAC"} -------------------------------------------------------------------------------- /lib/components/select/use-select-logic.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { SelectOption, SelectChangeHandler } from './select'; 3 | interface Refs { 4 | headerRef: React.MutableRefObject; 5 | popoverRef: React.MutableRefObject; 6 | } 7 | export declare const useSelectLogic: (onChange: SelectChangeHandler | undefined, { headerRef, popoverRef }: Refs, disabled: boolean) => { 8 | onOptionClick: (option: SelectOption) => void; 9 | optionsListVisible: boolean; 10 | setOptionsListVisible: (isVisible: boolean) => void; 11 | }; 12 | export {}; 13 | //# sourceMappingURL=use-select-logic.d.ts.map -------------------------------------------------------------------------------- /lib/components/select/use-select-logic.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"use-select-logic.d.ts","sourceRoot":"","sources":["../../../src/components/select/use-select-logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE7D,UAAU,IAAI;IACV,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACtD,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAC1D;AAED,eAAO,MAAM,cAAc,yEAEI,IAAI,YACrB,OAAO;4BAGc,YAAY;;uCAKW,OAAO;CAgChE,CAAA"} -------------------------------------------------------------------------------- /lib/components/select/use-select-logic.js: -------------------------------------------------------------------------------- 1 | import { useEffect, useState, useCallback } from 'react'; 2 | export var useSelectLogic = function (onChange, _a, disabled) { 3 | if (onChange === void 0) { onChange = function () { }; } 4 | var headerRef = _a.headerRef, popoverRef = _a.popoverRef; 5 | var _b = useState(false), optionsListVisible = _b[0], __setOptionsListVisible = _b[1]; 6 | var onOptionClick = function (option) { 7 | onChange(option); 8 | setOptionsListVisible(false); 9 | }; 10 | var setOptionsListVisible = useCallback(function (isVisible) { 11 | if (!disabled) { 12 | __setOptionsListVisible(isVisible); 13 | } 14 | }, [disabled]); 15 | useEffect(function () { 16 | /** 17 | * Alert if clicked on outside of element 18 | */ 19 | var handleClickOutside = function (event) { 20 | if (headerRef.current 21 | && popoverRef.current 22 | && !headerRef.current.contains(event.target) 23 | && !popoverRef.current.contains(event.target)) { 24 | setOptionsListVisible(false); 25 | } 26 | }; 27 | document.addEventListener("mousedown", handleClickOutside); 28 | return function () { 29 | document.removeEventListener("mousedown", handleClickOutside); 30 | }; 31 | }, [headerRef, popoverRef, setOptionsListVisible]); 32 | return { 33 | onOptionClick: onOptionClick, 34 | optionsListVisible: optionsListVisible, 35 | setOptionsListVisible: setOptionsListVisible 36 | }; 37 | }; 38 | //# sourceMappingURL=use-select-logic.js.map -------------------------------------------------------------------------------- /lib/components/select/use-select-logic.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"use-select-logic.js","sourceRoot":"","sources":["../../../src/components/select/use-select-logic.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAQhE,MAAM,CAAC,IAAM,cAAc,GAAG,UAC1B,QAAwC,EACxC,EAA+B,EAC/B,QAAiB;IAFjB,yBAAA,EAAA,yBAAuC,CAAC;QACtC,SAAS,eAAA,EAAE,UAAU,gBAAA;IAGjB,IAAA,KAAgD,QAAQ,CAAC,KAAK,CAAC,EAA9D,kBAAkB,QAAA,EAAE,uBAAuB,QAAmB,CAAC;IACtE,IAAM,aAAa,GAAG,UAAC,MAAoB;QACvC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACjB,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CAAA;IAED,IAAM,qBAAqB,GAAG,WAAW,CAAC,UAAC,SAAkB;QACzD,IAAI,CAAC,QAAQ,EAAE;YACX,uBAAuB,CAAC,SAAS,CAAC,CAAC;SACtC;IACL,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,SAAS,CAAC;QACN;;WAEG;QACH,IAAM,kBAAkB,GAAG,UAAC,KAAiB;YACzC,IACI,SAAS,CAAC,OAAO;mBACd,UAAU,CAAC,OAAO;mBAClB,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC;mBACjD,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EACvD;gBACE,qBAAqB,CAAC,KAAK,CAAC,CAAC;aAChC;QACL,CAAC,CAAA;QAED,QAAQ,CAAC,gBAAgB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAC3D,OAAO;YACH,QAAQ,CAAC,mBAAmB,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;QAClE,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAEnD,OAAO;QACH,aAAa,eAAA;QACb,kBAAkB,oBAAA;QAClB,qBAAqB,uBAAA;KACxB,CAAC;AACN,CAAC,CAAA"} -------------------------------------------------------------------------------- /lib/components/skeleton/index.d.ts: -------------------------------------------------------------------------------- 1 | import Skeleton from './skeleton'; 2 | export * from './skeleton'; 3 | export default Skeleton; 4 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/skeleton/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,cAAc,YAAY,CAAC;AAE3B,eAAe,QAAQ,CAAC"} -------------------------------------------------------------------------------- /lib/components/skeleton/index.js: -------------------------------------------------------------------------------- 1 | import Skeleton from './skeleton'; 2 | export * from './skeleton'; 3 | export default Skeleton; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/skeleton/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,cAAc,YAAY,CAAC;AAE3B,eAAe,QAAQ,CAAC"} -------------------------------------------------------------------------------- /lib/components/skeleton/skeleton.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | export declare type SkeletonProps = { 3 | width?: number; 4 | height?: number; 5 | className?: string; 6 | borderRadius: string; 7 | }; 8 | declare const _default: React.ForwardRefExoticComponent>; 9 | export default _default; 10 | //# sourceMappingURL=skeleton.d.ts.map -------------------------------------------------------------------------------- /lib/components/skeleton/skeleton.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,oBAAY,aAAa,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAA;;AAsBD,wBAAyE"} -------------------------------------------------------------------------------- /lib/components/skeleton/skeleton.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import React from 'react'; 3 | import { StyledSkeleton } from './styled'; 4 | var Skeleton = function (props, ref) { 5 | var className = props.className, _a = props.width, width = _a === void 0 ? 100 : _a, _b = props.height, height = _b === void 0 ? 100 : _b, _c = props.borderRadius, borderRadius = _c === void 0 ? 'none' : _c; 6 | return (_jsx(StyledSkeleton, { ref: ref, className: className, width: width, height: height, borderRadius: borderRadius }, void 0)); 7 | }; 8 | export default React.forwardRef(Skeleton); 9 | //# sourceMappingURL=skeleton.js.map -------------------------------------------------------------------------------- /lib/components/skeleton/skeleton.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../../src/components/skeleton/skeleton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAS1C,IAAM,QAAQ,GAAkE,UAAC,KAAK,EAAE,GAAG;IAEnF,IAAA,SAAS,GAIT,KAAK,UAJI,EACT,KAGA,KAAK,MAHM,EAAX,KAAK,mBAAG,GAAG,KAAA,EACX,KAEA,KAAK,OAFO,EAAZ,MAAM,mBAAG,GAAG,KAAA,EACZ,KACA,KAAK,aADgB,EAArB,YAAY,mBAAG,MAAM,KAAA,CACf;IAEV,OAAO,CACH,KAAC,cAAc,IACX,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,WAC5B,CACL,CAAC;AACN,CAAC,CAAA;AAGD,eAAe,KAAK,CAAC,UAAU,CAAgC,QAAQ,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/components/skeleton/styled.d.ts: -------------------------------------------------------------------------------- 1 | interface StyledSkeletonProps { 2 | width: number; 3 | height: number; 4 | borderRadius: string; 5 | } 6 | export declare const StyledSkeleton: import("styled-components").StyledComponent<"div", any, StyledSkeletonProps, never>; 7 | export {}; 8 | //# sourceMappingURL=styled.d.ts.map -------------------------------------------------------------------------------- /lib/components/skeleton/styled.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/styled.tsx"],"names":[],"mappings":"AAEA,UAAU,mBAAmB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,qFA6B1B,CAAC"} -------------------------------------------------------------------------------- /lib/components/skeleton/styled.js: -------------------------------------------------------------------------------- 1 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { 2 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 3 | return cooked; 4 | }; 5 | import styled from "styled-components"; 6 | export var StyledSkeleton = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n overflow: hidden;\n width: ", "px;\n height: ", "px;\n background-color: #e8e8e8;\n border-radius: ", ";\n\n &:before {\n content: '';\n display: block;\n position: absolute;\n left: -", "px;\n top: 0;\n height: ", "px;\n width: ", "px;\n background-color: #cccccc;\n animation: load 1.5s cubic-bezier(0.4, 0.0, 0.2, 1);\n animation-iteration-count: infinite;\n }\n\n @keyframes load {\n from {\n left: -", "px;\n }\n to {\n left: 100%;\n }\n }\n"], ["\n position: relative;\n overflow: hidden;\n width: ", "px;\n height: ", "px;\n background-color: #e8e8e8;\n border-radius: ", ";\n\n &:before {\n content: '';\n display: block;\n position: absolute;\n left: -", "px;\n top: 0;\n height: ", "px;\n width: ", "px;\n background-color: #cccccc;\n animation: load 1.5s cubic-bezier(0.4, 0.0, 0.2, 1);\n animation-iteration-count: infinite;\n }\n\n @keyframes load {\n from {\n left: -", "px;\n }\n to {\n left: 100%;\n }\n }\n"])), function (pr) { return pr.width; }, function (pr) { return pr.height; }, function (pr) { return pr.borderRadius; }, function (pr) { return pr.width; }, function (pr) { return pr.height; }, function (pr) { return pr.width; }, function (pr) { return pr.width; }); 7 | var templateObject_1; 8 | //# sourceMappingURL=styled.js.map -------------------------------------------------------------------------------- /lib/components/skeleton/styled.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/skeleton/styled.tsx"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAQvC,MAAM,CAAC,IAAM,cAAc,GAAG,MAAM,CAAC,GAAG,krBAAqB,+DAGhD,EAAc,mBACb,EAAe,0DAER,EAAqB,kHAMzB,EAAc,wCAEb,EAAe,sBAChB,EAAc,0NAQV,EAAc,2EAMlC,KA1BY,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,EAAR,CAAQ,EACb,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,MAAM,EAAT,CAAS,EAER,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,YAAY,EAAf,CAAe,EAMzB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,EAAR,CAAQ,EAEb,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,MAAM,EAAT,CAAS,EAChB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,EAAR,CAAQ,EAQV,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,EAAR,CAAQ,CAMlC,CAAC"} -------------------------------------------------------------------------------- /lib/components/spinner/index.d.ts: -------------------------------------------------------------------------------- 1 | import Spinner from './spinner'; 2 | export * from './spinner'; 3 | export default Spinner; 4 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/spinner/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,cAAc,WAAW,CAAC;AAE1B,eAAe,OAAO,CAAC"} -------------------------------------------------------------------------------- /lib/components/spinner/index.js: -------------------------------------------------------------------------------- 1 | import Spinner from './spinner'; 2 | export * from './spinner'; 3 | export default Spinner; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/spinner/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/spinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,cAAc,WAAW,CAAC;AAE1B,eAAe,OAAO,CAAC"} -------------------------------------------------------------------------------- /lib/components/spinner/spinner.d.ts: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | export declare type SpinnerProps = { 3 | size?: number; 4 | className?: string; 5 | light?: boolean; 6 | }; 7 | declare const _default: React.ForwardRefExoticComponent>; 8 | export default _default; 9 | //# sourceMappingURL=spinner.d.ts.map -------------------------------------------------------------------------------- /lib/components/spinner/spinner.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,oBAAY,YAAY,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAA;;AAoBD,wBAAuE"} -------------------------------------------------------------------------------- /lib/components/spinner/spinner.js: -------------------------------------------------------------------------------- 1 | import { jsx as _jsx } from "react/jsx-runtime"; 2 | import React from 'react'; 3 | import { StyledSpinner } from './styled'; 4 | var Spinner = function (props, ref) { 5 | var className = props.className, _a = props.size, size = _a === void 0 ? 30 : _a, _b = props.light, light = _b === void 0 ? false : _b; 6 | return (_jsx(StyledSpinner, { ref: ref, className: className, size: size, light: light }, void 0)); 7 | }; 8 | export default React.forwardRef(Spinner); 9 | //# sourceMappingURL=spinner.js.map -------------------------------------------------------------------------------- /lib/components/spinner/spinner.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../../src/components/spinner/spinner.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAQzC,IAAM,OAAO,GAAiE,UAAC,KAAK,EAAE,GAAG;IAEjF,IAAA,SAAS,GAGT,KAAK,UAHI,EACT,KAEA,KAAK,KAFI,EAAT,IAAI,mBAAG,EAAE,KAAA,EACT,KACA,KAAK,MADQ,EAAb,KAAK,mBAAG,KAAK,KAAA,CACP;IAEV,OAAO,CACH,KAAC,aAAa,IACV,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,WACd,CACL,CAAC;AACN,CAAC,CAAA;AAGD,eAAe,KAAK,CAAC,UAAU,CAA+B,OAAO,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/components/spinner/styled.d.ts: -------------------------------------------------------------------------------- 1 | interface StyledSpinnerProps { 2 | size: number; 3 | light: boolean; 4 | } 5 | export declare const StyledSpinner: import("styled-components").StyledComponent<"span", any, StyledSpinnerProps, never>; 6 | export {}; 7 | //# sourceMappingURL=styled.d.ts.map -------------------------------------------------------------------------------- /lib/components/spinner/styled.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/styled.ts"],"names":[],"mappings":"AAKA,UAAU,kBAAkB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,qFAezB,CAAC"} -------------------------------------------------------------------------------- /lib/components/spinner/styled.js: -------------------------------------------------------------------------------- 1 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { 2 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 3 | return cooked; 4 | }; 5 | import styled from "styled-components"; 6 | import { getSpinnerWidth } from './utils'; 7 | export var StyledSpinner = styled.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-sizing: border-box;\n display: block;\n border: ", "px solid transparent;\n border-top: ", "px solid ", ";\n border-right: ", "px solid ", ";\n border-bottom: ", "px solid ", ";\n border-radius: 50%;\n width: ", "px;\n height: ", "px;\n animation: spin 1s linear infinite;\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n"], ["\n box-sizing: border-box;\n display: block;\n border: ", "px solid transparent;\n border-top: ", "px solid ", ";\n border-right: ", "px solid ", ";\n border-bottom: ", "px solid ", ";\n border-radius: 50%;\n width: ", "px;\n height: ", "px;\n animation: spin 1s linear infinite;\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n"])), function (pr) { return getSpinnerWidth(pr.size); }, function (pr) { return getSpinnerWidth(pr.size); }, function (pr) { return pr.light ? '#f7f7f7' : '#3d4ed1'; }, function (pr) { return getSpinnerWidth(pr.size); }, function (pr) { return pr.light ? '#f7f7f7' : '#3d4ed1'; }, function (pr) { return getSpinnerWidth(pr.size); }, function (pr) { return pr.light ? '#f7f7f7' : '#3d4ed1'; }, function (pr) { return pr.size; }, function (pr) { return pr.size; }); 8 | var templateObject_1; 9 | //# sourceMappingURL=styled.js.map -------------------------------------------------------------------------------- /lib/components/spinner/styled.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/spinner/styled.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AASzC,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,IAAI,gfAAoB,kEAG9C,EAA8B,yCAC1B,EAA8B,WAAY,EAAuC,uBAC/E,EAA8B,WAAY,EAAuC,wBAChF,EAA8B,WAAY,EAAuC,yCAEzF,EAAa,mBACZ,EAAa,oKAM1B,KAZa,UAAA,EAAE,IAAI,OAAA,eAAe,CAAC,EAAE,CAAC,IAAI,CAAC,EAAxB,CAAwB,EAC1B,UAAA,EAAE,IAAI,OAAA,eAAe,CAAC,EAAE,CAAC,IAAI,CAAC,EAAxB,CAAwB,EAAY,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,SAAS,EAAjC,CAAiC,EAC/E,UAAA,EAAE,IAAI,OAAA,eAAe,CAAC,EAAE,CAAC,IAAI,CAAC,EAAxB,CAAwB,EAAY,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,SAAS,EAAjC,CAAiC,EAChF,UAAA,EAAE,IAAI,OAAA,eAAe,CAAC,EAAE,CAAC,IAAI,CAAC,EAAxB,CAAwB,EAAY,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,SAAS,EAAjC,CAAiC,EAEzF,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,IAAI,EAAP,CAAO,EACZ,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,IAAI,EAAP,CAAO,CAM1B,CAAC"} -------------------------------------------------------------------------------- /lib/components/spinner/utils.d.ts: -------------------------------------------------------------------------------- 1 | export declare const getSpinnerWidth: (size: number) => number; 2 | //# sourceMappingURL=utils.d.ts.map -------------------------------------------------------------------------------- /lib/components/spinner/utils.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,SAAU,MAAM,KAAG,MAa9C,CAAA"} -------------------------------------------------------------------------------- /lib/components/spinner/utils.js: -------------------------------------------------------------------------------- 1 | export var getSpinnerWidth = function (size) { 2 | switch (true) { 3 | case (size < 15): 4 | return size / 3.5; 5 | case (size < 50): 6 | return size / 5; 7 | case (size < 100): 8 | return size / 7.5; 9 | case (size >= 100): 10 | return size / 10; 11 | default: 12 | return size / 10; 13 | } 14 | }; 15 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /lib/components/spinner/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/spinner/utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,IAAY;IACxC,QAAQ,IAAI,EAAE;QACV,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC;YACZ,OAAO,IAAI,GAAG,GAAG,CAAC;QACtB,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC;YACZ,OAAO,IAAI,GAAG,CAAC,CAAC;QACpB,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC;YACb,OAAO,IAAI,GAAG,GAAG,CAAC;QACtB,KAAK,CAAC,IAAI,IAAI,GAAG,CAAC;YACd,OAAO,IAAI,GAAG,EAAE,CAAC;QACrB;YACI,OAAO,IAAI,GAAG,EAAE,CAAC;KACxB;AACL,CAAC,CAAA"} -------------------------------------------------------------------------------- /lib/components/text-input/index.d.ts: -------------------------------------------------------------------------------- 1 | import TextInput from './text-input'; 2 | export * from './text-input'; 3 | export default TextInput; 4 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/text-input/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,cAAc,cAAc,CAAC;AAE7B,eAAe,SAAS,CAAC"} -------------------------------------------------------------------------------- /lib/components/text-input/index.js: -------------------------------------------------------------------------------- 1 | import TextInput from './text-input'; 2 | export * from './text-input'; 3 | export default TextInput; 4 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/text-input/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/text-input/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,cAAc,cAAc,CAAC;AAE7B,eAAe,SAAS,CAAC"} -------------------------------------------------------------------------------- /lib/components/text-input/styled.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { ComponentSize } from "../../config/sizes"; 3 | interface StyledWrapperProps { 4 | width: string; 5 | innerSize: ComponentSize; 6 | } 7 | export declare const StyledWrapper: import("styled-components").StyledComponent<"div", any, StyledWrapperProps, never>; 8 | interface StyledTextInputProps { 9 | innerSize: ComponentSize; 10 | disabled: boolean; 11 | error: boolean; 12 | width: string; 13 | withIcon: boolean; 14 | withCross: boolean; 15 | } 16 | export declare const StyledTextInput: import("styled-components").StyledComponent<"input", any, StyledTextInputProps, never>; 17 | interface StyledIconProps { 18 | innerSize: ComponentSize; 19 | } 20 | export declare const StyledIcon: import("styled-components").StyledComponent<"div", any, StyledIconProps, never>; 21 | interface StyledCrossProps { 22 | innerSize: ComponentSize; 23 | } 24 | export declare const StyledCross: import("styled-components").StyledComponent<(props: import("react").SVGProps) => JSX.Element, any, StyledCrossProps, never>; 25 | export {}; 26 | //# sourceMappingURL=styled.d.ts.map -------------------------------------------------------------------------------- /lib/components/text-input/styled.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/styled.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAyB,MAAM,oBAAoB,CAAC;AAG1E,UAAU,kBAAkB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,oFAIzB,CAAC;AAEF,UAAU,oBAAoB;IAC1B,SAAS,EAAE,aAAa,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACtB;AAID,eAAO,MAAM,eAAe,wFA6B3B,CAAC;AAEF,UAAU,eAAe;IACrB,SAAS,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,UAAU,iFAYtB,CAAC;AAEF,UAAU,gBAAgB;IACtB,SAAS,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,WAAW,4IASvB,CAAC"} -------------------------------------------------------------------------------- /lib/components/text-input/styled.js: -------------------------------------------------------------------------------- 1 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { 2 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 3 | return cooked; 4 | }; 5 | import styled from "styled-components"; 6 | import { heights, sidePaddings } from "../../config/sizes"; 7 | import CrossIcon from '../../icons/Cross'; 8 | export var StyledWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n width: ", ";\n height: ", "px;\n"], ["\n position: relative;\n width: ", ";\n height: ", "px;\n"])), function (pr) { return pr.width; }, function (pr) { return heights[pr.innerSize]; }); 9 | /* Real tag is assigned dynamically */ 10 | export var StyledTextInput = styled.input(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n background-color: ", ";\n padding: 0;\n padding-left: ", "px;\n padding-right: ", "px;\n height: ", "px;\n width: ", ";\n border: none;\n color: #000;\n ", "\n border-radius: 0;\n outline: none;\n transition: 0.1s ease-out;\n \n box-shadow: inset 0 0 0 2px ", ";\n &:focus {\n box-shadow: inset 0 0 0 2px ", ";\n }\n"], ["\n box-sizing: border-box;\n position: relative;\n background-color: ", ";\n padding: 0;\n padding-left: ", "px;\n padding-right: ", "px;\n height: ", "px;\n width: ", ";\n border: none;\n color: #000;\n ", "\n border-radius: 0;\n outline: none;\n transition: 0.1s ease-out;\n \n box-shadow: inset 0 0 0 2px ", ";\n &:focus {\n box-shadow: inset 0 0 0 2px ", ";\n }\n"])), function (pr) { return pr.error ? '#ffe3e6' : '#EEEEEE'; }, function (pr) { return sidePaddings[pr.innerSize] + (pr.withIcon ? sidePaddings[pr.innerSize] + 10 /* icon */ : 0); }, function (pr) { return sidePaddings[pr.innerSize] + (pr.withCross ? sidePaddings[pr.innerSize] /* cross */ : 0); }, function (pr) { return heights[pr.innerSize]; }, function (pr) { return pr.width; }, function (pr) { return pr.disabled ? "\n background-color: #a6a6a6;\n color: #5e5e5e;\n cursor: not-allowed;\n \n &:hover {\n background-color: #a6a6a6 !important;\n color: #5e5e5e !important;\n }\n " : ''; }, function (pr) { return pr.error ? '#d93848' : 'transparent'; }, function (pr) { return pr.error ? '#d93848' : '#000'; }); 11 | export var StyledIcon = styled.div.withConfig({ 12 | shouldForwardProp: function (prop, defPropValFN) { 13 | return !["innerSize"].includes(prop) && defPropValFN(prop); 14 | }, 15 | })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n box-sizing: border-box;\n position: absolute;\n left: ", "px;\n top: 50%;\n transform: translateY(-50%);\n\n height: 15px;\n width: 15px;\n"], ["\n box-sizing: border-box;\n position: absolute;\n left: ", "px;\n top: 50%;\n transform: translateY(-50%);\n\n height: 15px;\n width: 15px;\n"])), function (pr) { return sidePaddings[pr.innerSize]; }); 16 | export var StyledCross = styled(CrossIcon)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n box-sizing: border-box;\n position: absolute;\n right: ", "px;\n top: 50%;\n transform: translateY(-50%);\n cursor: pointer;\n\n height: 15px;\n"], ["\n box-sizing: border-box;\n position: absolute;\n right: ", "px;\n top: 50%;\n transform: translateY(-50%);\n cursor: pointer;\n\n height: 15px;\n"])), function (pr) { return sidePaddings[pr.innerSize]; }); 17 | var templateObject_1, templateObject_2, templateObject_3, templateObject_4; 18 | //# sourceMappingURL=styled.js.map -------------------------------------------------------------------------------- /lib/components/text-input/styled.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/text-input/styled.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAiB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAO1C,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,GAAG,uIAAoB,wCAE9C,EAAc,iBACb,EAA4B,OACzC,KAFY,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,EAAR,CAAQ,EACZ,UAAA,EAAE,IAAI,OAAA,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,EAArB,CAAqB,CACzC,CAAC;AAYF,sCAAsC;AACtC,MAAM,CAAC,IAAM,eAAe,GAAG,MAAM,CAAC,KAAK,ifAAsB,gFAGzC,EAA0C,wCAE9C,EAAkG,0BACjG,EAA+F,mBACtG,EAA4B,kBAC7B,EAAc,8CAGrB,EASI,qHAKwB,EAA0C,wDAEtC,EAAmC,YAExE,KA1BwB,UAAC,EAAE,IAAK,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAhC,CAAgC,EAE5C,UAAA,EAAE,IAAI,OAAA,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,CAAA,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAA1F,CAA0F,EAC/F,UAAA,EAAE,IAAI,OAAA,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,CAAA,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAvF,CAAuF,EACpG,UAAA,EAAE,IAAI,OAAA,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC,EAArB,CAAqB,EAC7B,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,EAAR,CAAQ,EAGpB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,sMAStB,CAAC,CAAC,CAAC,EAAE,EATG,CASH,EAKwB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EAApC,CAAoC,EAEtC,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,EAA7B,CAA6B,CAExE,CAAC;AAMF,MAAM,CAAC,IAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC;IAC5C,iBAAiB,EAAE,UAAC,IAAI,EAAE,YAAY;QACpC,OAAA,CAAC,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC;IAAnD,CAAmD;CACtD,CAAC,wOAAiB,oEAGT,EAAiC,+FAM5C,KANY,UAAA,EAAE,IAAI,OAAA,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,EAA1B,CAA0B,CAM5C,CAAC;AAMF,MAAM,CAAC,IAAM,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,6OAAkB,qEAGjD,EAAiC,mGAM7C,KANa,UAAA,EAAE,IAAI,OAAA,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,EAA1B,CAA0B,CAM7C,CAAC"} -------------------------------------------------------------------------------- /lib/components/text-input/text-input.d.ts: -------------------------------------------------------------------------------- 1 | import React, { ChangeEventHandler, HTMLAttributes } from 'react'; 2 | import { ComponentSize } from '../../config/sizes'; 3 | export interface TextInputProps extends Omit, 'size' | 'disabled' | 'onChange'> { 4 | icon?: React.ElementType; 5 | size?: ComponentSize; 6 | disabled?: boolean; 7 | error?: boolean; 8 | value?: string; 9 | width?: string; 10 | onChange?: ChangeEventHandler; 11 | readonly?: boolean; 12 | clearable?: boolean; 13 | [key: string]: any; 14 | } 15 | declare const _default: React.ForwardRefExoticComponent & React.RefAttributes>; 16 | export default _default; 17 | //# sourceMappingURL=text-input.d.ts.map -------------------------------------------------------------------------------- /lib/components/text-input/text-input.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../../src/components/text-input/text-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC;IAC5G,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAEhD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;;AAsDD,wBAA6E"} -------------------------------------------------------------------------------- /lib/components/text-input/text-input.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | var __rest = (this && this.__rest) || function (s, e) { 13 | var t = {}; 14 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) 15 | t[p] = s[p]; 16 | if (s != null && typeof Object.getOwnPropertySymbols === "function") 17 | for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { 18 | if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) 19 | t[p[i]] = s[p[i]]; 20 | } 21 | return t; 22 | }; 23 | import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; 24 | import React from 'react'; 25 | import { StyledTextInput, StyledWrapper, StyledIcon, StyledCross } from './styled'; 26 | var TextInput = function (props, ref) { 27 | var icon = props.icon, _a = props.size, size = _a === void 0 ? 'default' : _a, className = props.className, _b = props.disabled, disabled = _b === void 0 ? false : _b, _c = props.error, error = _c === void 0 ? false : _c, value = props.value, onChange = props.onChange, placeholder = props.placeholder, _d = props.width, width = _d === void 0 ? '100%' : _d, _e = props.readonly, readonly = _e === void 0 ? false : _e, _f = props.clearable, clearable = _f === void 0 ? false : _f, rest = __rest(props, ["icon", "size", "className", "disabled", "error", "value", "onChange", "placeholder", "width", "readonly", "clearable"]); 28 | var styles = { 29 | innerSize: size, 30 | disabled: disabled, 31 | error: error, 32 | width: width, 33 | withIcon: icon !== undefined, 34 | withCross: clearable 35 | }; 36 | return (_jsxs(StyledWrapper, __assign({ width: width, innerSize: size }, { children: [_jsx(StyledTextInput, __assign({ type: rest.type || 'text', value: value, onChange: onChange, readOnly: readonly, ref: ref, className: className, placeholder: placeholder }, styles, rest), void 0), _jsx(StyledIcon, { as: icon, innerSize: size }, void 0), clearable && value ? (_jsx(StyledCross, { innerSize: size, onClick: function () { 37 | return onChange 38 | && onChange({ currentTarget: { value: '' } }); 39 | } }, void 0)) : null] }), void 0)); 40 | }; 41 | export default React.forwardRef(TextInput); 42 | //# sourceMappingURL=text-input.js.map -------------------------------------------------------------------------------- /lib/components/text-input/text-input.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"text-input.js","sourceRoot":"","sources":["../../../src/components/text-input/text-input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAgBnF,IAAM,SAAS,GAAqE,UAAC,KAAK,EAAE,GAAG;IAEvF,IAAA,IAAI,GAYJ,KAAK,KAZD,EACJ,KAWA,KAAK,KAXW,EAAhB,IAAI,mBAAG,SAAS,KAAA,EAChB,SAAS,GAUT,KAAK,UAVI,EACT,KASA,KAAK,SATW,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAQA,KAAK,MARQ,EAAb,KAAK,mBAAG,KAAK,KAAA,EACb,KAAK,GAOL,KAAK,MAPA,EACL,QAAQ,GAMR,KAAK,SANG,EACR,WAAW,GAKX,KAAK,YALM,EACX,KAIA,KAAK,MAJS,EAAd,KAAK,mBAAG,MAAM,KAAA,EACd,KAGA,KAAK,SAHW,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAEA,KAAK,UAFY,EAAjB,SAAS,mBAAG,KAAK,KAAA,EACd,IAAI,UACP,KAAK,EAbH,wHAaL,CADU,CACD;IAEV,IAAM,MAAM,GAAG;QACX,SAAS,EAAE,IAAI;QACf,QAAQ,EAAE,QAAQ;QAClB,KAAK,OAAA;QACL,KAAK,OAAA;QACL,QAAQ,EAAE,IAAI,KAAK,SAAS;QAC5B,SAAS,EAAE,SAAS;KACvB,CAAC;IAEF,OAAO,CACH,MAAC,aAAa,aAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,iBACxC,KAAC,eAAe,aACZ,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,MAAM,EACzB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,IACpB,MAAM,EACN,IAAI,UACV,EACF,KAAC,UAAU,IAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,WAAI,EACxC,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,CAClB,KAAC,WAAW,IACR,SAAS,EAAE,IAAI,EACf,OAAO,EAAE;oBACL,OAAA,QAAQ;2BACL,QAAQ,CAAC,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAS,CAAC;gBADpD,CACoD,WAE1D,CACL,CAAC,CAAC,CAAC,IAAI,aACI,CACnB,CAAC;AACN,CAAC,CAAA;AAED,eAAe,KAAK,CAAC,UAAU,CAAmC,SAAS,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/components/typography/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './styled'; 2 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/components/typography/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/typography/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"} -------------------------------------------------------------------------------- /lib/components/typography/index.js: -------------------------------------------------------------------------------- 1 | export * from './styled'; 2 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/components/typography/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/typography/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"} -------------------------------------------------------------------------------- /lib/components/typography/styled.d.ts: -------------------------------------------------------------------------------- 1 | interface HeaderProps { 2 | align?: 'center' | 'right' | 'left'; 3 | } 4 | export declare const H1: import("styled-components").StyledComponent<"h1", any, HeaderProps, never>; 5 | export declare const H2: import("styled-components").StyledComponent<"h2", any, HeaderProps, never>; 6 | export declare const H3: import("styled-components").StyledComponent<"h3", any, HeaderProps, never>; 7 | export {}; 8 | //# sourceMappingURL=styled.d.ts.map -------------------------------------------------------------------------------- /lib/components/typography/styled.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/typography/styled.ts"],"names":[],"mappings":"AAMA,UAAU,WAAW;IACjB,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;CACvC;AAED,eAAO,MAAM,EAAE,4EAId,CAAC;AAEF,eAAO,MAAM,EAAE,4EAId,CAAC;AAEF,eAAO,MAAM,EAAE,4EAId,CAAC"} -------------------------------------------------------------------------------- /lib/components/typography/styled.js: -------------------------------------------------------------------------------- 1 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { 2 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 3 | return cooked; 4 | }; 5 | import styled, { css } from "styled-components"; 6 | var headingMargin = css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin: 15px 0;\n"], ["\n margin: 15px 0;\n"]))); 7 | export var H1 = styled.h1(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 64px;\n text-align: ", ";\n ", "\n"], ["\n font-size: 64px;\n text-align: ", ";\n ", "\n"])), function (pr) { return pr.align ? pr.align : 'left'; }, headingMargin); 8 | export var H2 = styled.h2(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 48px;\n text-align: ", ";\n ", "\n"], ["\n font-size: 48px;\n text-align: ", ";\n ", "\n"])), function (pr) { return pr.align ? pr.align : 'left'; }, headingMargin); 9 | export var H3 = styled.h3(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: 24px;\n text-align: ", ";\n ", "\n"], ["\n font-size: 24px;\n text-align: ", ";\n ", "\n"])), function (pr) { return pr.align ? pr.align : 'left'; }, headingMargin); 10 | var templateObject_1, templateObject_2, templateObject_3, templateObject_4; 11 | //# sourceMappingURL=styled.js.map -------------------------------------------------------------------------------- /lib/components/typography/styled.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/typography/styled.ts"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,IAAM,aAAa,GAAG,GAAG,4FAAA,yBAExB,IAAA,CAAC;AAMF,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,8HAAa,0CAEtB,EAAkC,SAC9C,EAAa,IAClB,KAFiB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAA5B,CAA4B,EAC9C,aAAa,CAClB,CAAC;AAEF,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,8HAAa,0CAEtB,EAAkC,SAC9C,EAAa,IAClB,KAFiB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAA5B,CAA4B,EAC9C,aAAa,CAClB,CAAC;AAEF,MAAM,CAAC,IAAM,EAAE,GAAG,MAAM,CAAC,EAAE,8HAAa,0CAEtB,EAAkC,SAC9C,EAAa,IAClB,KAFiB,UAAA,EAAE,IAAI,OAAA,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAA5B,CAA4B,EAC9C,aAAa,CAClB,CAAC"} -------------------------------------------------------------------------------- /lib/config/global.styles.d.ts: -------------------------------------------------------------------------------- 1 | export declare const GlobalStyles: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>; 2 | //# sourceMappingURL=global.styles.d.ts.map -------------------------------------------------------------------------------- /lib/config/global.styles.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"global.styles.d.ts","sourceRoot":"","sources":["../../src/config/global.styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,gGAOxB,CAAC"} -------------------------------------------------------------------------------- /lib/config/global.styles.js: -------------------------------------------------------------------------------- 1 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { 2 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } 3 | return cooked; 4 | }; 5 | import { createGlobalStyle } from 'styled-components'; 6 | export var GlobalStyles = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n * {\n \n box-sizing: border-box;\n margin: 0;\n padding: 0;\n }\n"], ["\n * {\n \n box-sizing: border-box;\n margin: 0;\n padding: 0;\n }\n"]))); 7 | var templateObject_1; 8 | //# sourceMappingURL=global.styles.js.map -------------------------------------------------------------------------------- /lib/config/global.styles.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"global.styles.js","sourceRoot":"","sources":["../../src/config/global.styles.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,MAAM,CAAC,IAAM,YAAY,GAAG,iBAAiB,uJAAA,oFAO5C,IAAA,CAAC"} -------------------------------------------------------------------------------- /lib/config/sizes.d.ts: -------------------------------------------------------------------------------- 1 | export declare type ComponentSize = 'default' | 'large' | 'small'; 2 | export declare const sidePaddings: { 3 | [key in ComponentSize]: number; 4 | }; 5 | export declare const heights: { 6 | [key in ComponentSize]: number; 7 | }; 8 | //# sourceMappingURL=sizes.d.ts.map -------------------------------------------------------------------------------- /lib/config/sizes.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"sizes.d.ts","sourceRoot":"","sources":["../../src/config/sizes.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1D,eAAO,MAAM,YAAY,EAAE;KAAE,GAAG,IAAI,aAAa,GAAG,MAAM;CAIzD,CAAA;AAED,eAAO,MAAM,OAAO,EAAE;KAAE,GAAG,IAAI,aAAa,GAAG,MAAM;CAIpD,CAAA"} -------------------------------------------------------------------------------- /lib/config/sizes.js: -------------------------------------------------------------------------------- 1 | export var sidePaddings = { 2 | large: 30, 3 | default: 25, 4 | small: 20, 5 | }; 6 | export var heights = { 7 | large: 55, 8 | default: 45, 9 | small: 35, 10 | }; 11 | //# sourceMappingURL=sizes.js.map -------------------------------------------------------------------------------- /lib/config/sizes.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"sizes.js","sourceRoot":"","sources":["../../src/config/sizes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAM,YAAY,GAAqC;IAC1D,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;CACZ,CAAA;AAED,MAAM,CAAC,IAAM,OAAO,GAAqC;IACrD,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,EAAE;CACZ,CAAA"} -------------------------------------------------------------------------------- /lib/icons/ArrowDown.d.ts: -------------------------------------------------------------------------------- 1 | import { SVGProps } from "react"; 2 | declare const SvgArrowDown: (props: SVGProps) => JSX.Element; 3 | export default SvgArrowDown; 4 | //# sourceMappingURL=ArrowDown.d.ts.map -------------------------------------------------------------------------------- /lib/icons/ArrowDown.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ArrowDown.d.ts","sourceRoot":"","sources":["../../src/icons/ArrowDown.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,QAAA,MAAM,YAAY,UAAW,SAAS,aAAa,CAAC,gBAInD,CAAC;AAEF,eAAe,YAAY,CAAC"} -------------------------------------------------------------------------------- /lib/icons/ArrowDown.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx } from "react/jsx-runtime"; 13 | var SvgArrowDown = function (props) { return (_jsx("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 129 129" }, props, { children: _jsx("path", { d: "M121.3 34.6c-1.6-1.6-4.2-1.6-5.8 0l-51 51.1-51.1-51.1c-1.6-1.6-4.2-1.6-5.8 0-1.6 1.6-1.6 4.2 0 5.8l53.9 53.9c.8.8 1.8 1.2 2.9 1.2 1 0 2.1-.4 2.9-1.2l53.9-53.9c1.7-1.6 1.7-4.2.1-5.8z" }, void 0) }), void 0)); }; 14 | export default SvgArrowDown; 15 | //# sourceMappingURL=ArrowDown.js.map -------------------------------------------------------------------------------- /lib/icons/ArrowDown.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ArrowDown.js","sourceRoot":"","sources":["../../src/icons/ArrowDown.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAGA,IAAM,YAAY,GAAG,UAAC,KAA8B,IAAK,OAAA,CACvD,uBAAK,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,IAAK,KAAK,cACrE,eAAM,CAAC,EAAC,uLAAuL,WAAG,YAC9L,CACP,EAJwD,CAIxD,CAAC;AAEF,eAAe,YAAY,CAAC"} -------------------------------------------------------------------------------- /lib/icons/Cross.d.ts: -------------------------------------------------------------------------------- 1 | import { SVGProps } from "react"; 2 | declare const SvgCross: (props: SVGProps) => JSX.Element; 3 | export default SvgCross; 4 | //# sourceMappingURL=Cross.d.ts.map -------------------------------------------------------------------------------- /lib/icons/Cross.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Cross.d.ts","sourceRoot":"","sources":["../../src/icons/Cross.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,QAAA,MAAM,QAAQ,UAAW,SAAS,aAAa,CAAC,gBAI/C,CAAC;AAEF,eAAe,QAAQ,CAAC"} -------------------------------------------------------------------------------- /lib/icons/Cross.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx } from "react/jsx-runtime"; 13 | var SvgCross = function (props) { return (_jsx("svg", __assign({ viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg" }, props, { children: _jsx("path", { d: "m28.71 4.71-1.42-1.42L16 14.59 4.71 3.29 3.29 4.71 14.59 16 3.29 27.29l1.42 1.42L16 17.41l11.29 11.3 1.42-1.42L17.41 16l11.3-11.29z" }, void 0) }), void 0)); }; 14 | export default SvgCross; 15 | //# sourceMappingURL=Cross.js.map -------------------------------------------------------------------------------- /lib/icons/Cross.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Cross.js","sourceRoot":"","sources":["../../src/icons/Cross.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAGA,IAAM,QAAQ,GAAG,UAAC,KAA8B,IAAK,OAAA,CACnD,uBAAK,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B,IAAK,KAAK,cACnE,eAAM,CAAC,EAAC,qIAAqI,WAAG,YAC5I,CACP,EAJoD,CAIpD,CAAC;AAEF,eAAe,QAAQ,CAAC"} -------------------------------------------------------------------------------- /lib/icons/Download.d.ts: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | declare function SvgDownload(props: React.SVGProps): JSX.Element; 3 | export default SvgDownload; 4 | //# sourceMappingURL=Download.d.ts.map -------------------------------------------------------------------------------- /lib/icons/Download.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Download.d.ts","sourceRoot":"","sources":["../../src/icons/Download.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,eAMxD;AAED,eAAe,WAAW,CAAC"} -------------------------------------------------------------------------------- /lib/icons/Download.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx } from "react/jsx-runtime"; 13 | function SvgDownload(props) { 14 | return (_jsx("svg", __assign({ viewBox: "0 0 485 485", fill: "#fff" }, props, { children: _jsx("path", { d: "M233 378.7c2.6 2.6 6.1 4 9.5 4s6.9-1.3 9.5-4l107.5-107.5c5.3-5.3 5.3-13.8 0-19.1-5.3-5.3-13.8-5.3-19.1 0L256 336.5v-323C256 6 250 0 242.5 0S229 6 229 13.5v323l-84.4-84.4c-5.3-5.3-13.8-5.3-19.1 0s-5.3 13.8 0 19.1L233 378.7zM426.5 458h-368C51 458 45 464 45 471.5S51 485 58.5 485h368c7.5 0 13.5-6 13.5-13.5s-6-13.5-13.5-13.5z" }, void 0) }), void 0)); 15 | } 16 | export default SvgDownload; 17 | //# sourceMappingURL=Download.js.map -------------------------------------------------------------------------------- /lib/icons/Download.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Download.js","sourceRoot":"","sources":["../../src/icons/Download.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAEA,SAAS,WAAW,CAAC,KAAoC;IACvD,OAAO,CACL,uBAAK,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,IAAK,KAAK,cAC9C,eAAM,CAAC,EAAC,oUAAoU,WAAG,YAC3U,CACP,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"} -------------------------------------------------------------------------------- /lib/icons/Search.d.ts: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | declare function SvgSearch(props: React.SVGProps): JSX.Element; 3 | export default SvgSearch; 4 | //# sourceMappingURL=Search.d.ts.map -------------------------------------------------------------------------------- /lib/icons/Search.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../src/icons/Search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,eAMtD;AAED,eAAe,SAAS,CAAC"} -------------------------------------------------------------------------------- /lib/icons/Search.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx } from "react/jsx-runtime"; 13 | function SvgSearch(props) { 14 | return (_jsx("svg", __assign({ viewBox: "0 0 512.005 512.005", fill: "#fff" }, props, { children: _jsx("path", { d: "M505.749 475.587l-145.6-145.6c28.203-34.837 45.184-79.104 45.184-127.317C405.333 90.926 314.41.003 202.666.003S0 90.925 0 202.669s90.923 202.667 202.667 202.667c48.213 0 92.48-16.981 127.317-45.184l145.6 145.6c4.16 4.16 9.621 6.251 15.083 6.251s10.923-2.091 15.083-6.251c8.341-8.341 8.341-21.824-.001-30.165zM202.667 362.669c-88.235 0-160-71.765-160-160s71.765-160 160-160 160 71.765 160 160-71.766 160-160 160z" }, void 0) }), void 0)); 15 | } 16 | export default SvgSearch; 17 | //# sourceMappingURL=Search.js.map -------------------------------------------------------------------------------- /lib/icons/Search.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Search.js","sourceRoot":"","sources":["../../src/icons/Search.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAEA,SAAS,SAAS,CAAC,KAAoC;IACrD,OAAO,CACL,uBAAK,OAAO,EAAC,qBAAqB,EAAC,IAAI,EAAC,MAAM,IAAK,KAAK,cACtD,eAAM,CAAC,EAAC,6ZAA6Z,WAAG,YACpa,CACP,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"} -------------------------------------------------------------------------------- /lib/icons/User.d.ts: -------------------------------------------------------------------------------- 1 | import { SVGProps } from "react"; 2 | declare const SvgUser: (props: SVGProps) => JSX.Element; 3 | export default SvgUser; 4 | //# sourceMappingURL=User.d.ts.map -------------------------------------------------------------------------------- /lib/icons/User.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../src/icons/User.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,QAAA,MAAM,OAAO,UAAW,SAAS,aAAa,CAAC,gBAS9C,CAAC;AAEF,eAAe,OAAO,CAAC"} -------------------------------------------------------------------------------- /lib/icons/User.js: -------------------------------------------------------------------------------- 1 | var __assign = (this && this.__assign) || function () { 2 | __assign = Object.assign || function(t) { 3 | for (var s, i = 1, n = arguments.length; i < n; i++) { 4 | s = arguments[i]; 5 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) 6 | t[p] = s[p]; 7 | } 8 | return t; 9 | }; 10 | return __assign.apply(this, arguments); 11 | }; 12 | import { jsx as _jsx } from "react/jsx-runtime"; 13 | var SvgUser = function (props) { return (_jsx("svg", __assign({ viewBox: "0 0 64 64", xmlns: "http://www.w3.org/2000/svg", fill: "#8a8a8a" }, props, { children: _jsx("path", { d: "M41.245 33.035a16 16 0 1 0-18.49 0A26.041 26.041 0 0 0 4 58a2 2 0 0 0 2 2h52a2 2 0 0 0 2-2 26.041 26.041 0 0 0-18.755-24.965ZM20 20a12 12 0 1 1 12 12 12.014 12.014 0 0 1-12-12ZM8.09 56A22.03 22.03 0 0 1 30 36h4a22.03 22.03 0 0 1 21.91 20Z" }, void 0) }), void 0)); }; 14 | export default SvgUser; 15 | //# sourceMappingURL=User.js.map -------------------------------------------------------------------------------- /lib/icons/User.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"User.js","sourceRoot":"","sources":["../../src/icons/User.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAGA,IAAM,OAAO,GAAG,UAAC,KAA8B,IAAK,OAAA,CAClD,uBACE,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,SAAS,IACV,KAAK,cAET,eAAM,CAAC,EAAC,gPAAgP,WAAG,YACvP,CACP,EATmD,CASnD,CAAC;AAEF,eAAe,OAAO,CAAC"} -------------------------------------------------------------------------------- /lib/icons/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default as ArrowDown } from "./ArrowDown"; 2 | export { default as Cross } from "./Cross"; 3 | export { default as Download } from "./Download"; 4 | export { default as Search } from "./Search"; 5 | export { default as User } from "./User"; 6 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/icons/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icons/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC"} -------------------------------------------------------------------------------- /lib/icons/index.js: -------------------------------------------------------------------------------- 1 | export { default as ArrowDown } from "./ArrowDown"; 2 | export { default as Cross } from "./Cross"; 3 | export { default as Download } from "./Download"; 4 | export { default as Search } from "./Search"; 5 | export { default as User } from "./User"; 6 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/icons/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icons/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC"} -------------------------------------------------------------------------------- /lib/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './config/global.styles'; 3 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC"} -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './config/global.styles'; 3 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC"} -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "next-gen-ui", 3 | "version": "2.0.4", 4 | "private": false, 5 | "license": "MIT", 6 | "author": "Ashish Kumar Mishhra", 7 | "repository": "https://github.com/ashishmishra-bit/next-gen-ui.git", 8 | "main": "/lib/index.js", 9 | "homepage": "https://nextgenui.in/", 10 | "description": "Next Gen Ui is a home for front-end & UI/Ux developers. We provide all the necessary components required to build a scalable front-end application which suits the user experience in a unique way.", 11 | "keywords": [ 12 | "Next.js", 13 | "React.js", 14 | "Next Gen UI", 15 | "Tailwind Css", 16 | "Component UI", 17 | "Front-end", 18 | "Loaders", 19 | "Login Forms", 20 | "Spinners", 21 | "Buttons", 22 | "Link", 23 | "Forms", 24 | "Search", 25 | "Text-Input" 26 | ], 27 | "directories": { 28 | "lib": "lib" 29 | }, 30 | "files": [ 31 | "lib" 32 | ], 33 | "dependencies": { 34 | "email-validator": "^2.0.4", 35 | "styled-components": "^5.3.3" 36 | }, 37 | "scripts": { 38 | "compile-icons": "npx @svgr/cli -d src/icons src/icons --typescript", 39 | "start": "react-scripts start", 40 | "build": "tsc --build \"./tsconfig.json\"", 41 | "test": "react-scripts test", 42 | "eject": "react-scripts eject", 43 | "storybook": "start-storybook -p 6006 -s public", 44 | "build-storybook": "build-storybook -s public", 45 | "clean": "rm -rf ./lib" 46 | }, 47 | "eslintConfig": { 48 | "extends": [ 49 | "react-app", 50 | "react-app/jest" 51 | ], 52 | "overrides": [ 53 | { 54 | "files": [ 55 | "**/*.stories.*" 56 | ], 57 | "rules": { 58 | "import/no-anonymous-default-export": "off" 59 | } 60 | } 61 | ] 62 | }, 63 | "browserslist": { 64 | "production": [ 65 | ">0.2%", 66 | "not dead", 67 | "not op_mini all" 68 | ], 69 | "development": [ 70 | "last 1 chrome version", 71 | "last 1 firefox version", 72 | "last 1 safari version" 73 | ] 74 | }, 75 | "peerDependencies": { 76 | "react": ">=16.13.1", 77 | "react-dom": ">=16.13.1", 78 | "styled-components": ">=5.3.3" 79 | }, 80 | "devDependencies": { 81 | "@storybook/addon-actions": "^6.4.9", 82 | "@storybook/addon-essentials": "^6.4.9", 83 | "@storybook/addon-links": "^6.4.9", 84 | "@storybook/builder-webpack5": "^6.4.9", 85 | "@storybook/manager-webpack5": "^6.4.9", 86 | "@storybook/node-logger": "^6.4.9", 87 | "@storybook/preset-create-react-app": "^4.0.0", 88 | "@storybook/react": "^6.4.9", 89 | "@svgr/cli": "^6.1.2", 90 | "@testing-library/jest-dom": "^5.16.1", 91 | "@testing-library/react": "^12.1.2", 92 | "@testing-library/user-event": "^13.5.0", 93 | "@types/jest": "^27.0.3", 94 | "@types/node": "^16.11.13", 95 | "@types/react": "^17.0.37", 96 | "@types/react-dom": "^17.0.11", 97 | "@types/styled-components": "^5.1.18", 98 | "react": "^17.0.2", 99 | "react-dom": "^17.0.2", 100 | "react-scripts": "5.0.0", 101 | "typescript": "^4.5.4", 102 | "web-vitals": "^2.1.2", 103 | "webpack": "^5.65.0" 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishmishra-bit/next-gen-ui/dbd23778c011b5febc295ca301037062d1d8d2b3/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishmishra-bit/next-gen-ui/dbd23778c011b5febc295ca301037062d1d8d2b3/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ashishmishra-bit/next-gen-ui/dbd23778c011b5febc295ca301037062d1d8d2b3/public/logo512.png -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/components/button/Button.stories.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // also exported from '@storybook/react' if you can deal with breaking changes in 6.1 3 | import { Story, Meta } from '@storybook/react/types-6-0'; 4 | 5 | import Button, { ButtonProps } from './button'; 6 | import styled from 'styled-components'; 7 | import DownloadIcon from '../../icons/Download'; 8 | 9 | export default { 10 | title: 'Components/Button', 11 | component: Button, 12 | } as Meta; 13 | 14 | const Template: Story = (args) => 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | ); 96 | }; -------------------------------------------------------------------------------- /src/components/button/button.tsx: -------------------------------------------------------------------------------- 1 | import React, { ElementType, MouseEventHandler, ReactNode } from 'react'; 2 | import { StyledButton, StyledIcon } from './styled'; 3 | import Spinner from '../spinner'; 4 | import { ComponentSize } from '../../config/sizes'; 5 | 6 | export type ButtonType = 'default' | 'danger' | 'ghost' | 'secondary'; 7 | 8 | interface BaseButtonProps { 9 | type?: ButtonType; 10 | icon?: ElementType; 11 | size?: ComponentSize; 12 | className?: string; 13 | children?: ReactNode; 14 | disabled?: boolean; 15 | loading?: boolean; 16 | } 17 | 18 | type HTMLButtonProps = { 19 | onClick?: MouseEventHandler; 20 | } & BaseButtonProps; 21 | 22 | /** 23 | * If href is supplied, button becomes an anchor link 24 | */ 25 | type HTMLAnchorProps = { 26 | href?: string; 27 | } & BaseButtonProps; 28 | 29 | /** 30 | * If `as` is supplied, button becomes a custom html node specified in `as` 31 | */ 32 | type CustomNodeProps = { 33 | as?: ElementType; 34 | to?: string; 35 | } & BaseButtonProps; 36 | 37 | export type ButtonProps = HTMLButtonProps & HTMLAnchorProps & CustomNodeProps; 38 | 39 | const Button: React.ForwardRefRenderFunction = (props, ref) => { 40 | const { 41 | type = 'default', 42 | icon, 43 | size = 'default', 44 | className, 45 | children, 46 | disabled = false, 47 | loading, 48 | onClick, 49 | href, 50 | as, 51 | to, 52 | } = props; 53 | 54 | const styles = { 55 | innerType: type, 56 | size, 57 | disabled, 58 | withText: children != null 59 | } 60 | 61 | const spinnerStyles = { 62 | size: size === 'large' ? 25 : size === 'default' ? 20 : 15, 63 | light: true, 64 | } 65 | 66 | const childrenWithIcon = !icon ? children : ( 67 | <> 68 | {children} 69 | 70 | 71 | ); 72 | 73 | if (as && !disabled) { 74 | return ( 75 | 82 | {loading ? ( 83 | <> 84 | Loading 85 | 86 | 87 | ) : childrenWithIcon} 88 | 89 | ) 90 | } 91 | 92 | if (href && !disabled) { 93 | return ( 94 | } 98 | className={className} 99 | {...styles} 100 | > 101 | {loading ? ( 102 | <> 103 | Loading 104 | 105 | 106 | ) : childrenWithIcon} 107 | 108 | ); 109 | } 110 | 111 | return ( 112 | } 117 | className={className} 118 | {...styles} 119 | > 120 | {loading ? ( 121 | <> 122 | Loading 123 | 124 | 125 | ) : childrenWithIcon } 126 | 127 | ); 128 | } 129 | 130 | export default React.forwardRef(Button); -------------------------------------------------------------------------------- /src/components/button/index.ts: -------------------------------------------------------------------------------- 1 | import Button from './button'; 2 | 3 | export * from './button'; 4 | 5 | export default Button; -------------------------------------------------------------------------------- /src/components/button/styled.ts: -------------------------------------------------------------------------------- 1 | import styled from "styled-components"; 2 | import { ButtonType } from "./button"; 3 | import { ComponentSize, heights, sidePaddings } from "../../config/sizes"; 4 | 5 | // export type ComponentSize = "default" | 'large' | "small"; 6 | 7 | // export const sidePaddings: {[key in ComponentSize]: number} = { 8 | // large: 30, 9 | // default: 25, 10 | // small:20, 11 | // } 12 | // export const heights: {[key in ComponentSize]: number} = { 13 | // large: 55, 14 | // default: 45, 15 | // small:35, 16 | // } 17 | 18 | 19 | type StateColors = { 20 | regular: string; 21 | hover: string; 22 | }; 23 | 24 | const typeColors: {[key in ButtonType]: StateColors} = { 25 | default: { 26 | regular: '#0018cf', 27 | hover: '#2e27cc', 28 | }, 29 | danger: { 30 | regular: '#d93848', 31 | hover: '#eb4d5d', 32 | }, 33 | ghost: { 34 | regular: 'transparent', 35 | hover: '#dbdbdb', 36 | }, 37 | secondary: { 38 | regular: '#000', 39 | hover: '#3d3d3d', 40 | } 41 | }; 42 | 43 | interface StyledButtonProps { 44 | innerType: ButtonType; 45 | size: ComponentSize; 46 | withText: boolean; 47 | } 48 | 49 | /* Real tag is assigned dynamically */ 50 | export const StyledButton = styled.button` 51 | display: flex; 52 | align-items: center; 53 | justify-content: center; 54 | /* Add margin in case of loading or icon */ 55 | & > *:nth-child(1) { 56 | margin-left: ${pr => pr.withText ? 7 : 0}px; 57 | } 58 | font-size: 15px; 59 | border: none; 60 | cursor: pointer; 61 | background-color: ${ (pr) => typeColors[pr.innerType].regular }; 62 | padding: 0 ${ pr => sidePaddings[pr.size]}px; 63 | height: ${ pr => heights[pr.size]}px; 64 | color: ${ pr => pr.innerType === 'ghost' 65 | ? typeColors['default'].regular 66 | : '#fff' 67 | }; 68 | ${ pr => pr.disabled ? ` 69 | background-color: #a6a6a6; 70 | color: #5e5e5e; 71 | cursor: not-allowed; 72 | &:hover { 73 | background-color: #a6a6a6 !important; 74 | color: #5e5e5e !important; 75 | } 76 | ` : ''} 77 | border-radius: 20px; 78 | outline: none; 79 | &:focus { 80 | box-shadow: 0 0 0 1px #fff, 0 0 0 2px ${ (pr) => typeColors[pr.innerType].regular }; 81 | } 82 | &:hover { 83 | background-color: ${ (pr) => typeColors[pr.innerType].hover }; 84 | } 85 | `; 86 | 87 | export const StyledIcon = styled.div` 88 | height: 20px; 89 | `; -------------------------------------------------------------------------------- /src/components/form-control/form-control.stories.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | // also exported from '@storybook/react' if you can deal with breaking changes in 6.1 3 | import { Meta } from '@storybook/react/types-6-0'; 4 | 5 | import FormControl from '.'; 6 | import TextInput from '../text-input'; 7 | import Select, { SelectOption } from '../select'; 8 | import { validate as validateEmail } from 'email-validator'; 9 | 10 | export default { 11 | title: 'Components/FormControl', 12 | component: FormControl, 13 | } as Meta; 14 | 15 | export const FormInput = () => { 16 | const [value, setValue] = React.useState(''); 17 | const [isValid, setIsValid] = React.useState(false); 18 | const [isVisited, setIsVisited] = React.useState(false); 19 | const shouldShowError = !isValid && isVisited; 20 | const onChange = (event: React.FormEvent) => { 21 | const {value} = event.currentTarget; 22 | setIsValid(validateEmail(value)); 23 | setValue(value); 24 | }; 25 | 26 | return ( 27 | setIsVisited(true) } 37 | > 38 | 46 | 47 | ) 48 | } 49 | 50 | export const DisabledFormInput = () => { 51 | 52 | return ( 53 | 59 | 65 | 66 | ) 67 | } 68 | 69 | 70 | 71 | const selectOptions = [ 72 | { label: 'Country 1', value: 'country-1' }, 73 | { label: 'Country 2', value: 'country-2' }, 74 | { label: 'Country 3', value: 'country-3' }, 75 | ] 76 | 77 | export const FormSelect = () => { 78 | const [option, setOption] = React.useState( 79 | selectOptions[0] 80 | ); 81 | const [isVisited, setIsVisited] = React.useState(false); 82 | const shouldShowError = !option && isVisited; 83 | 84 | return ( 85 | setIsVisited(true) } 96 | > 97 | { 27 | setOption(option); 28 | }} 29 | /> 30 | } 31 | 32 | export const WithError = () => { 33 | const [option, setOption] = useState(listOptions[1]); 34 | return { 55 | setOption(option); 56 | }} 57 | /> 58 | } 59 | 60 | const Row = styled.div` 61 | display: flex; 62 | align-items: flex-start; 63 | margin-bottom: 10px; 64 | & > * { 65 | margin-right: 10px; 66 | } 67 | `; 68 | 69 | export const Sizes = () => { 70 | return ( 71 | 72 | 74 |