diff --git a/dist/LICENSE b/dist/LICENSE new file mode 100644 index 0000000..02daaf6 --- /dev/null +++ b/dist/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020-23 thinkholic + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/dist/base/ErrorBoundary.d.ts b/dist/base/ErrorBoundary.d.ts new file mode 100644 index 0000000..619bef9 --- /dev/null +++ b/dist/base/ErrorBoundary.d.ts @@ -0,0 +1,14 @@ +import React, { Component, ErrorInfo, ReactNode } from 'react'; +interface Props { + children?: ReactNode; +} +interface State { + hasError: boolean; +} +declare class ErrorBoundary extends Component { + state: State; + static getDerivedStateFromError(_: Error): State; + componentDidCatch(error: Error, errorInfo: ErrorInfo): void; + render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined; +} +export default ErrorBoundary; diff --git a/dist/base/ErrorBoundary.js b/dist/base/ErrorBoundary.js new file mode 100644 index 0000000..386f9f7 --- /dev/null +++ b/dist/base/ErrorBoundary.js @@ -0,0 +1,67 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +exports.__esModule = true; +var react_1 = __importStar(require("react")); +var ErrorBoundary = /** @class */ (function (_super) { + __extends(ErrorBoundary, _super); + function ErrorBoundary() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.state = { + hasError: false + }; + return _this; + } + ErrorBoundary.getDerivedStateFromError = function (_) { + // Update state so the next render will show the fallback UI. + return { hasError: true }; + }; + ErrorBoundary.prototype.componentDidCatch = function (error, errorInfo) { + console.error('Uncaught error:', error, errorInfo); + }; + ErrorBoundary.prototype.render = function () { + if (this.state.hasError) { + return react_1["default"].createElement("h1", null, "Sorry.. there was an error"); + } + return this.props.children; + }; + return ErrorBoundary; +}(react_1.Component)); +exports["default"] = ErrorBoundary; +//# sourceMappingURL=ErrorBoundary.js.map \ No newline at end of file diff --git a/dist/base/ErrorBoundary.js.map b/dist/base/ErrorBoundary.js.map new file mode 100644 index 0000000..77b894a --- /dev/null +++ b/dist/base/ErrorBoundary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/base/ErrorBoundary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+D;AAU/D;IAA4B,iCAAuB;IAAnD;QAAA,qEAqBC;QApBQ,WAAK,GAAU;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC;;IAkBJ,CAAC;IAhBe,sCAAwB,GAAtC,UAAuC,CAAQ;QAC7C,6DAA6D;QAC7D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IAEM,yCAAiB,GAAxB,UAAyB,KAAY,EAAE,SAAoB;QACzD,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;IAEM,8BAAM,GAAb;QACE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACvB,OAAO,0EAAmC,CAAC;SAC5C;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;IACH,oBAAC;AAAD,CAAC,AArBD,CAA4B,iBAAS,GAqBpC;AAED,qBAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/base/Portal.d.ts b/dist/base/Portal.d.ts new file mode 100644 index 0000000..e6f986f --- /dev/null +++ b/dist/base/Portal.d.ts @@ -0,0 +1,6 @@ +import React from 'react'; +export type PortalProps = { + children: React.ReactNode; + target?: string; +}; +export default function Portal({ children, target, }: PortalProps): React.ReactPortal; diff --git a/dist/base/Portal.js b/dist/base/Portal.js new file mode 100644 index 0000000..7e13cc0 --- /dev/null +++ b/dist/base/Portal.js @@ -0,0 +1,16 @@ +"use strict"; +exports.__esModule = true; +var react_1 = require("react"); +var react_dom_1 = require("react-dom"); +function Portal(_a) { + var children = _a.children, _b = _a.target, target = _b === void 0 ? 'portal-root' : _b; + var mount = document.getElementById(target); + var el = document.createElement('div'); + (0, react_1.useEffect)(function () { + mount.appendChild(el); + return function () { return mount.removeChild(el); }; + }, [el, mount]); + return (0, react_dom_1.createPortal)(children, el); +} +exports["default"] = Portal; +//# sourceMappingURL=Portal.js.map \ No newline at end of file diff --git a/dist/base/Portal.js.map b/dist/base/Portal.js.map new file mode 100644 index 0000000..0ead3e1 --- /dev/null +++ b/dist/base/Portal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Portal.js","sourceRoot":"","sources":["../../../src/base/Portal.tsx"],"names":[],"mappings":";;AACA,+BAAkC;AAClC,uCAAyC;AAOzC,SAAwB,MAAM,CAAC,EAGjB;QAFZ,QAAQ,cAAA,EACR,cAAsB,EAAtB,MAAM,mBAAG,aAAa,KAAA;IAEtB,IAAM,KAAK,GAAQ,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACnD,IAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAEzC,IAAA,iBAAS,EAAC;QACR,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACtB,OAAO,cAAM,OAAA,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,EAArB,CAAqB,CAAC;IACrC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IAEhB,OAAO,IAAA,wBAAY,EAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC;AAbD,4BAaC"} \ No newline at end of file diff --git a/dist/base/SeoMeta.d.ts b/dist/base/SeoMeta.d.ts new file mode 100644 index 0000000..1d8af00 --- /dev/null +++ b/dist/base/SeoMeta.d.ts @@ -0,0 +1,12 @@ +/// +/** + * @check + * - https://ogp.me + * - https://ahrefs.com/blog/seo-meta-tags + */ +type Props = { + title: string; + metaTags?: any[]; +}; +export default function SeoMeta({ title, metaTags }: Props): JSX.Element; +export {}; diff --git a/dist/base/SeoMeta.js b/dist/base/SeoMeta.js new file mode 100644 index 0000000..8bbc0d1 --- /dev/null +++ b/dist/base/SeoMeta.js @@ -0,0 +1,18 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var react_1 = __importDefault(require("react")); +var react_helmet_async_1 = require("react-helmet-async"); +function SeoMeta(_a) { + var title = _a.title, _b = _a.metaTags, metaTags = _b === void 0 ? [] : _b; + return (react_1["default"].createElement(react_helmet_async_1.Helmet, null, + react_1["default"].createElement("title", null, title), + metaTags.map(function (_a) { + var name = _a.name, content = _a.content; + return (react_1["default"].createElement("meta", { name: name, content: content })); + }))); +} +exports["default"] = SeoMeta; +//# sourceMappingURL=SeoMeta.js.map \ No newline at end of file diff --git a/dist/base/SeoMeta.js.map b/dist/base/SeoMeta.js.map new file mode 100644 index 0000000..357932a --- /dev/null +++ b/dist/base/SeoMeta.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SeoMeta.js","sourceRoot":"","sources":["../../../src/base/SeoMeta.tsx"],"names":[],"mappings":";;;;;AAAA,gDAA0B;AAC1B,yDAA4C;AAkB5C,SAAwB,OAAO,CAAC,EAA+B;QAA7B,KAAK,WAAA,EAAE,gBAAa,EAAb,QAAQ,mBAAG,EAAE,KAAA;IACpD,OAAO,CACL,iCAAC,2BAAM;QACL,gDAAQ,KAAK,CAAS;QACrB,QAAQ,CAAC,GAAG,CAAC,UAAC,EAA0B;gBAAxB,IAAI,UAAA,EAAE,OAAO,aAAA;YAAgB,OAAA,CAC5C,2CAAM,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CACvC;QAF6C,CAE7C,CAAC,CACK,CACV,CAAC;AACJ,CAAC;AATD,6BASC"} \ No newline at end of file diff --git a/dist/base/index.d.ts b/dist/base/index.d.ts new file mode 100644 index 0000000..82de855 --- /dev/null +++ b/dist/base/index.d.ts @@ -0,0 +1,3 @@ +export { default as ErrorBoundary } from './ErrorBoundary'; +export { default as Portal } from './Portal'; +export { default as SeoMeta } from './SeoMeta'; diff --git a/dist/base/index.js b/dist/base/index.js new file mode 100644 index 0000000..5b06728 --- /dev/null +++ b/dist/base/index.js @@ -0,0 +1,21 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports.SeoMeta = exports.Portal = exports.ErrorBoundary = void 0; +var ErrorBoundary_1 = require("./ErrorBoundary"); +__createBinding(exports, ErrorBoundary_1, "default", "ErrorBoundary"); +var Portal_1 = require("./Portal"); +__createBinding(exports, Portal_1, "default", "Portal"); +var SeoMeta_1 = require("./SeoMeta"); +__createBinding(exports, SeoMeta_1, "default", "SeoMeta"); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/base/index.js.map b/dist/base/index.js.map new file mode 100644 index 0000000..ac6e6ea --- /dev/null +++ b/dist/base/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iDAA2D;AAAlD,sEAAwB;AACjC,mCAA6C;AAApC,wDAAiB;AAC1B,qCAA+C;AAAtC,0DAAkB"} \ No newline at end of file diff --git a/dist/components/Accordion.d.ts b/dist/components/Accordion.d.ts new file mode 100644 index 0000000..eaa0e1e --- /dev/null +++ b/dist/components/Accordion.d.ts @@ -0,0 +1,5 @@ +import * as $ from '../generics'; +export type { AccordionProps, AccordionItemProps } from '../generics'; +export declare const Accordion: import("styled-components").StyledComponent; +export declare const AccordionItem: import("styled-components").StyledComponent; +export default Accordion; diff --git a/dist/components/Accordion.js b/dist/components/Accordion.js new file mode 100644 index 0000000..ffdbc1c --- /dev/null +++ b/dist/components/Accordion.js @@ -0,0 +1,40 @@ +"use strict"; +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.AccordionItem = exports.Accordion = void 0; +var styled_components_1 = __importDefault(require("styled-components")); +var $ = __importStar(require("../generics")); +exports.Accordion = (0, styled_components_1["default"])($.Accordion)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .jpk-accordion {\n &__summary {\n background-color: var(--colors-primary);\n color: #ffffff;\n }\n }\n"], ["\n .jpk-accordion {\n &__summary {\n background-color: var(--colors-primary);\n color: #ffffff;\n }\n }\n"]))); +exports.AccordionItem = (0, styled_components_1["default"])($.AccordionItem)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n line-height: 20px;\n"], ["\n line-height: 20px;\n"]))); +exports["default"] = exports.Accordion; +var templateObject_1, templateObject_2; +//# sourceMappingURL=Accordion.js.map \ No newline at end of file diff --git a/dist/components/Accordion.js.map b/dist/components/Accordion.js.map new file mode 100644 index 0000000..834755b --- /dev/null +++ b/dist/components/Accordion.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/components/Accordion.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wEAAuC;AACvC,6CAAiC;AAIpB,QAAA,SAAS,GAAG,IAAA,8BAAM,EAAC,CAAC,CAAC,SAAS,CAAC,gMAAA,6HAO3C,KAAC;AAEW,QAAA,aAAa,GAAG,IAAA,8BAAM,EAAC,CAAC,CAAC,aAAa,CAAC,6FAAA,0BAEnD,KAAC;AAEF,qBAAe,iBAAS,CAAC"} \ No newline at end of file diff --git a/dist/components/Alert.d.ts b/dist/components/Alert.d.ts new file mode 100644 index 0000000..740846b --- /dev/null +++ b/dist/components/Alert.d.ts @@ -0,0 +1,3 @@ +export { Alert } from '../generics'; +export { Alert as default } from '../generics'; +export type { AlertProps } from '../generics'; diff --git a/dist/components/Alert.js b/dist/components/Alert.js new file mode 100644 index 0000000..29ed488 --- /dev/null +++ b/dist/components/Alert.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.Alert = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "Alert"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "Alert", "default"); +//# sourceMappingURL=Alert.js.map \ No newline at end of file diff --git a/dist/components/Alert.js.map b/dist/components/Alert.js.map new file mode 100644 index 0000000..0edfadf --- /dev/null +++ b/dist/components/Alert.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/components/Alert.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAoC;AAA3B,8CAAK;AACd,wCAA+C;AAAtC,yDAAgB"} \ No newline at end of file diff --git a/dist/components/Button.d.ts b/dist/components/Button.d.ts new file mode 100644 index 0000000..4fb6d18 --- /dev/null +++ b/dist/components/Button.d.ts @@ -0,0 +1,4 @@ +import * as $ from '../generics'; +export type { ButtonProps } from '../generics'; +export declare const Button: import("styled-components").StyledComponent; +export default Button; diff --git a/dist/components/Button.js b/dist/components/Button.js new file mode 100644 index 0000000..87f8079 --- /dev/null +++ b/dist/components/Button.js @@ -0,0 +1,39 @@ +"use strict"; +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Button = void 0; +var styled_components_1 = __importDefault(require("styled-components")); +var $ = __importStar(require("../generics")); +exports.Button = (0, styled_components_1["default"])($.Button)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .jpk-btn {\n &__small {\n min-width: 64px;\n height: 30px;\n padding: 4px 5px;\n }\n &__medium {\n min-width: 89px;\n height: 36px;\n padding: 6px 8px;\n }\n &__large {\n min-width: 92px;\n height: 42px;\n padding: 8px 11px;\n }\n }\n"], ["\n .jpk-btn {\n &__small {\n min-width: 64px;\n height: 30px;\n padding: 4px 5px;\n }\n &__medium {\n min-width: 89px;\n height: 36px;\n padding: 6px 8px;\n }\n &__large {\n min-width: 92px;\n height: 42px;\n padding: 8px 11px;\n }\n }\n"]))); +exports["default"] = exports.Button; +var templateObject_1; +//# sourceMappingURL=Button.js.map \ No newline at end of file diff --git a/dist/components/Button.js.map b/dist/components/Button.js.map new file mode 100644 index 0000000..e6d328c --- /dev/null +++ b/dist/components/Button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wEAAuC;AACvC,6CAAiC;AAIpB,QAAA,MAAM,GAAG,IAAA,8BAAM,EAAC,CAAC,CAAC,MAAM,CAAC,mXAAA,gTAkBrC,KAAC;AAEF,qBAAe,cAAM,CAAC"} \ No newline at end of file diff --git a/dist/components/Checkbox.d.ts b/dist/components/Checkbox.d.ts new file mode 100644 index 0000000..bdfb5c6 --- /dev/null +++ b/dist/components/Checkbox.d.ts @@ -0,0 +1,3 @@ +export { Checkbox } from '../generics'; +export { Checkbox as default } from '../generics'; +export type { CheckboxProps } from '../generics'; diff --git a/dist/components/Checkbox.js b/dist/components/Checkbox.js new file mode 100644 index 0000000..04b203d --- /dev/null +++ b/dist/components/Checkbox.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.Checkbox = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "Checkbox"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "Checkbox", "default"); +//# sourceMappingURL=Checkbox.js.map \ No newline at end of file diff --git a/dist/components/Checkbox.js.map b/dist/components/Checkbox.js.map new file mode 100644 index 0000000..fe5ce61 --- /dev/null +++ b/dist/components/Checkbox.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/Checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAuC;AAA9B,iDAAQ;AACjB,wCAAkD;AAAzC,4DAAmB"} \ No newline at end of file diff --git a/dist/components/FileInput.d.ts b/dist/components/FileInput.d.ts new file mode 100644 index 0000000..ffa2679 --- /dev/null +++ b/dist/components/FileInput.d.ts @@ -0,0 +1,3 @@ +export { FileInput } from '../generics'; +export { FileInput as default } from '../generics'; +export type { FileInputProps } from '../generics'; diff --git a/dist/components/FileInput.js b/dist/components/FileInput.js new file mode 100644 index 0000000..f0c17d4 --- /dev/null +++ b/dist/components/FileInput.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.FileInput = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "FileInput"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "FileInput", "default"); +//# sourceMappingURL=FileInput.js.map \ No newline at end of file diff --git a/dist/components/FileInput.js.map b/dist/components/FileInput.js.map new file mode 100644 index 0000000..289d08d --- /dev/null +++ b/dist/components/FileInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/components/FileInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAwC;AAA/B,kDAAS;AAClB,wCAAmD;AAA1C,6DAAoB"} \ No newline at end of file diff --git a/dist/components/List.d.ts b/dist/components/List.d.ts new file mode 100644 index 0000000..81ec7d4 --- /dev/null +++ b/dist/components/List.d.ts @@ -0,0 +1,3 @@ +export { List, ListItem } from '../generics'; +export { List as default } from '../generics'; +export type { ListProps, ListItemProps } from '../generics'; diff --git a/dist/components/List.js b/dist/components/List.js new file mode 100644 index 0000000..4226d15 --- /dev/null +++ b/dist/components/List.js @@ -0,0 +1,20 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.ListItem = exports.List = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "List"); +__createBinding(exports, generics_1, "ListItem"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "List", "default"); +//# sourceMappingURL=List.js.map \ No newline at end of file diff --git a/dist/components/List.js.map b/dist/components/List.js.map new file mode 100644 index 0000000..2b34d4c --- /dev/null +++ b/dist/components/List.js.map @@ -0,0 +1 @@ +{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/components/List.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAA6C;AAApC,6CAAI;AAAE,iDAAQ;AACvB,wCAA8C;AAArC,wDAAe"} \ No newline at end of file diff --git a/dist/components/Radio.d.ts b/dist/components/Radio.d.ts new file mode 100644 index 0000000..8c101d5 --- /dev/null +++ b/dist/components/Radio.d.ts @@ -0,0 +1,3 @@ +export { Radio } from '../generics'; +export { Radio as default } from '../generics'; +export type { RadioProps } from '../generics'; diff --git a/dist/components/Radio.js b/dist/components/Radio.js new file mode 100644 index 0000000..83f8506 --- /dev/null +++ b/dist/components/Radio.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.Radio = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "Radio"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "Radio", "default"); +//# sourceMappingURL=Radio.js.map \ No newline at end of file diff --git a/dist/components/Radio.js.map b/dist/components/Radio.js.map new file mode 100644 index 0000000..078e04d --- /dev/null +++ b/dist/components/Radio.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/components/Radio.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAoC;AAA3B,8CAAK;AACd,wCAA+C;AAAtC,yDAAgB"} \ No newline at end of file diff --git a/dist/components/RangeInput.d.ts b/dist/components/RangeInput.d.ts new file mode 100644 index 0000000..707c882 --- /dev/null +++ b/dist/components/RangeInput.d.ts @@ -0,0 +1,3 @@ +export { RangeInput } from '../generics'; +export { RangeInput as default } from '../generics'; +export type { RangeInputProps } from '../generics'; diff --git a/dist/components/RangeInput.js b/dist/components/RangeInput.js new file mode 100644 index 0000000..b4e3be7 --- /dev/null +++ b/dist/components/RangeInput.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.RangeInput = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "RangeInput"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "RangeInput", "default"); +//# sourceMappingURL=RangeInput.js.map \ No newline at end of file diff --git a/dist/components/RangeInput.js.map b/dist/components/RangeInput.js.map new file mode 100644 index 0000000..278de70 --- /dev/null +++ b/dist/components/RangeInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RangeInput.js","sourceRoot":"","sources":["../../../src/components/RangeInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAyC;AAAhC,mDAAU;AACnB,wCAAoD;AAA3C,8DAAqB"} \ No newline at end of file diff --git a/dist/components/SearchInput.d.ts b/dist/components/SearchInput.d.ts new file mode 100644 index 0000000..d4c458d --- /dev/null +++ b/dist/components/SearchInput.d.ts @@ -0,0 +1,3 @@ +export { SearchInput } from '../generics'; +export { SearchInput as default } from '../generics'; +export type { SearchInputProps } from '../generics'; diff --git a/dist/components/SearchInput.js b/dist/components/SearchInput.js new file mode 100644 index 0000000..01740c5 --- /dev/null +++ b/dist/components/SearchInput.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.SearchInput = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "SearchInput"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "SearchInput", "default"); +//# sourceMappingURL=SearchInput.js.map \ No newline at end of file diff --git a/dist/components/SearchInput.js.map b/dist/components/SearchInput.js.map new file mode 100644 index 0000000..a9a0b34 --- /dev/null +++ b/dist/components/SearchInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchInput.js","sourceRoot":"","sources":["../../../src/components/SearchInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAA0C;AAAjC,oDAAW;AACpB,wCAAqD;AAA5C,+DAAsB"} \ No newline at end of file diff --git a/dist/components/Select.d.ts b/dist/components/Select.d.ts new file mode 100644 index 0000000..85fff47 --- /dev/null +++ b/dist/components/Select.d.ts @@ -0,0 +1,3 @@ +export { Select } from '../generics'; +export { Select as default } from '../generics'; +export type { SelectProps } from '../generics'; diff --git a/dist/components/Select.js b/dist/components/Select.js new file mode 100644 index 0000000..fd0a0e7 --- /dev/null +++ b/dist/components/Select.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.Select = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "Select"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "Select", "default"); +//# sourceMappingURL=Select.js.map \ No newline at end of file diff --git a/dist/components/Select.js.map b/dist/components/Select.js.map new file mode 100644 index 0000000..cdeb261 --- /dev/null +++ b/dist/components/Select.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/components/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAqC;AAA5B,+CAAM;AACf,wCAAgD;AAAvC,0DAAiB"} \ No newline at end of file diff --git a/dist/components/Table.d.ts b/dist/components/Table.d.ts new file mode 100644 index 0000000..f71e2f7 --- /dev/null +++ b/dist/components/Table.d.ts @@ -0,0 +1,3 @@ +export { Table, TableHeader, TableRow, TableColHead, TableBody, TableCell, TableFooter, } from '../generics'; +export { Table as default } from '../generics'; +export type { TableProps } from '../generics'; diff --git a/dist/components/Table.js b/dist/components/Table.js new file mode 100644 index 0000000..5666955 --- /dev/null +++ b/dist/components/Table.js @@ -0,0 +1,25 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.TableFooter = exports.TableCell = exports.TableBody = exports.TableColHead = exports.TableRow = exports.TableHeader = exports.Table = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "Table"); +__createBinding(exports, generics_1, "TableHeader"); +__createBinding(exports, generics_1, "TableRow"); +__createBinding(exports, generics_1, "TableColHead"); +__createBinding(exports, generics_1, "TableBody"); +__createBinding(exports, generics_1, "TableCell"); +__createBinding(exports, generics_1, "TableFooter"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "Table", "default"); +//# sourceMappingURL=Table.js.map \ No newline at end of file diff --git a/dist/components/Table.js.map b/dist/components/Table.js.map new file mode 100644 index 0000000..f4e4787 --- /dev/null +++ b/dist/components/Table.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/components/Table.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAQqB;AAPnB,8CAAK;AACL,oDAAW;AACX,iDAAQ;AACR,qDAAY;AACZ,kDAAS;AACT,kDAAS;AACT,oDAAW;AAEb,wCAA+C;AAAtC,yDAAgB"} \ No newline at end of file diff --git a/dist/components/Tabs.d.ts b/dist/components/Tabs.d.ts new file mode 100644 index 0000000..8aef5dd --- /dev/null +++ b/dist/components/Tabs.d.ts @@ -0,0 +1,3 @@ +export { Tabs, Tab } from '../generics'; +export { Tabs as default } from '../generics'; +export type { TabsProps } from '../generics'; diff --git a/dist/components/Tabs.js b/dist/components/Tabs.js new file mode 100644 index 0000000..437749c --- /dev/null +++ b/dist/components/Tabs.js @@ -0,0 +1,20 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.Tab = exports.Tabs = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "Tabs"); +__createBinding(exports, generics_1, "Tab"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "Tabs", "default"); +//# sourceMappingURL=Tabs.js.map \ No newline at end of file diff --git a/dist/components/Tabs.js.map b/dist/components/Tabs.js.map new file mode 100644 index 0000000..bbf16cf --- /dev/null +++ b/dist/components/Tabs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/components/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAwC;AAA/B,6CAAI;AAAE,4CAAG;AAClB,wCAA8C;AAArC,wDAAe"} \ No newline at end of file diff --git a/dist/components/Text.d.ts b/dist/components/Text.d.ts new file mode 100644 index 0000000..f80984a --- /dev/null +++ b/dist/components/Text.d.ts @@ -0,0 +1,3 @@ +export { Text } from '../generics'; +export { Text as default } from '../generics'; +export type { TextProps } from '../generics'; diff --git a/dist/components/Text.js b/dist/components/Text.js new file mode 100644 index 0000000..d52612b --- /dev/null +++ b/dist/components/Text.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.Text = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "Text"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "Text", "default"); +//# sourceMappingURL=Text.js.map \ No newline at end of file diff --git a/dist/components/Text.js.map b/dist/components/Text.js.map new file mode 100644 index 0000000..91c1e6e --- /dev/null +++ b/dist/components/Text.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/Text.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAmC;AAA1B,6CAAI;AACb,wCAA8C;AAArC,wDAAe"} \ No newline at end of file diff --git a/dist/components/TextInput.d.ts b/dist/components/TextInput.d.ts new file mode 100644 index 0000000..0a103b2 --- /dev/null +++ b/dist/components/TextInput.d.ts @@ -0,0 +1,3 @@ +export { TextInput } from '../generics'; +export { TextInput as default } from '../generics'; +export type { TextInputProps } from '../generics'; diff --git a/dist/components/TextInput.js b/dist/components/TextInput.js new file mode 100644 index 0000000..42c2d99 --- /dev/null +++ b/dist/components/TextInput.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports["default"] = exports.TextInput = void 0; +var generics_1 = require("../generics"); +__createBinding(exports, generics_1, "TextInput"); +var generics_2 = require("../generics"); +__createBinding(exports, generics_2, "TextInput", "default"); +//# sourceMappingURL=TextInput.js.map \ No newline at end of file diff --git a/dist/components/TextInput.js.map b/dist/components/TextInput.js.map new file mode 100644 index 0000000..fd118ce --- /dev/null +++ b/dist/components/TextInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/components/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,wCAAwC;AAA/B,kDAAS;AAClB,wCAAmD;AAA1C,6DAAoB"} \ No newline at end of file diff --git a/dist/components/index.d.ts b/dist/components/index.d.ts new file mode 100644 index 0000000..23029e7 --- /dev/null +++ b/dist/components/index.d.ts @@ -0,0 +1,14 @@ +export * from './Accordion'; +export * from './Alert'; +export * from './Button'; +export * from './Checkbox'; +export * from './FileInput'; +export * from './List'; +export * from './Radio'; +export * from './RangeInput'; +export * from './SearchInput'; +export * from './Select'; +export * from './Table'; +export * from './Tabs'; +export * from './Text'; +export * from './TextInput'; diff --git a/dist/components/index.js b/dist/components/index.js new file mode 100644 index 0000000..fbfdd40 --- /dev/null +++ b/dist/components/index.js @@ -0,0 +1,31 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +exports.__esModule = true; +__exportStar(require("./Accordion"), exports); +__exportStar(require("./Alert"), exports); +__exportStar(require("./Button"), exports); +__exportStar(require("./Checkbox"), exports); +__exportStar(require("./FileInput"), exports); +__exportStar(require("./List"), exports); +__exportStar(require("./Radio"), exports); +__exportStar(require("./RangeInput"), exports); +__exportStar(require("./SearchInput"), exports); +__exportStar(require("./Select"), exports); +__exportStar(require("./Table"), exports); +__exportStar(require("./Tabs"), exports); +__exportStar(require("./Text"), exports); +__exportStar(require("./TextInput"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/components/index.js.map b/dist/components/index.js.map new file mode 100644 index 0000000..d0edfa0 --- /dev/null +++ b/dist/components/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB;AACxB,2CAAyB;AACzB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,0CAAwB;AACxB,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,0CAAwB;AACxB,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B"} \ No newline at end of file diff --git a/dist/esm/base/ErrorBoundary.d.ts b/dist/esm/base/ErrorBoundary.d.ts new file mode 100644 index 0000000..619bef9 --- /dev/null +++ b/dist/esm/base/ErrorBoundary.d.ts @@ -0,0 +1,14 @@ +import React, { Component, ErrorInfo, ReactNode } from 'react'; +interface Props { + children?: ReactNode; +} +interface State { + hasError: boolean; +} +declare class ErrorBoundary extends Component { + state: State; + static getDerivedStateFromError(_: Error): State; + componentDidCatch(error: Error, errorInfo: ErrorInfo): void; + render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined; +} +export default ErrorBoundary; diff --git a/dist/esm/base/ErrorBoundary.js b/dist/esm/base/ErrorBoundary.js new file mode 100644 index 0000000..1ee22c6 --- /dev/null +++ b/dist/esm/base/ErrorBoundary.js @@ -0,0 +1,42 @@ +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +import React, { Component } from 'react'; +var ErrorBoundary = /** @class */ (function (_super) { + __extends(ErrorBoundary, _super); + function ErrorBoundary() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.state = { + hasError: false + }; + return _this; + } + ErrorBoundary.getDerivedStateFromError = function (_) { + // Update state so the next render will show the fallback UI. + return { hasError: true }; + }; + ErrorBoundary.prototype.componentDidCatch = function (error, errorInfo) { + console.error('Uncaught error:', error, errorInfo); + }; + ErrorBoundary.prototype.render = function () { + if (this.state.hasError) { + return React.createElement("h1", null, "Sorry.. there was an error"); + } + return this.props.children; + }; + return ErrorBoundary; +}(Component)); +export default ErrorBoundary; +//# sourceMappingURL=ErrorBoundary.js.map \ No newline at end of file diff --git a/dist/esm/base/ErrorBoundary.js.map b/dist/esm/base/ErrorBoundary.js.map new file mode 100644 index 0000000..7cb4b99 --- /dev/null +++ b/dist/esm/base/ErrorBoundary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/base/ErrorBoundary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAwB,MAAM,OAAO,CAAC;AAU/D;IAA4B,iCAAuB;IAAnD;QAAA,qEAqBC;QApBQ,WAAK,GAAU;YACpB,QAAQ,EAAE,KAAK;SAChB,CAAC;;IAkBJ,CAAC;IAhBe,sCAAwB,GAAtC,UAAuC,CAAQ;QAC7C,6DAA6D;QAC7D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;IAEM,yCAAiB,GAAxB,UAAyB,KAAY,EAAE,SAAoB;QACzD,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC;IAEM,8BAAM,GAAb;QACE,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACvB,OAAO,6DAAmC,CAAC;SAC5C;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;IACH,oBAAC;AAAD,CAAC,AArBD,CAA4B,SAAS,GAqBpC;AAED,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/base/Portal.d.ts b/dist/esm/base/Portal.d.ts new file mode 100644 index 0000000..e6f986f --- /dev/null +++ b/dist/esm/base/Portal.d.ts @@ -0,0 +1,6 @@ +import React from 'react'; +export type PortalProps = { + children: React.ReactNode; + target?: string; +}; +export default function Portal({ children, target, }: PortalProps): React.ReactPortal; diff --git a/dist/esm/base/Portal.js b/dist/esm/base/Portal.js new file mode 100644 index 0000000..adfa46f --- /dev/null +++ b/dist/esm/base/Portal.js @@ -0,0 +1,13 @@ +import { useEffect } from 'react'; +import { createPortal } from 'react-dom'; +export default function Portal(_a) { + var children = _a.children, _b = _a.target, target = _b === void 0 ? 'portal-root' : _b; + var mount = document.getElementById(target); + var el = document.createElement('div'); + useEffect(function () { + mount.appendChild(el); + return function () { return mount.removeChild(el); }; + }, [el, mount]); + return createPortal(children, el); +} +//# sourceMappingURL=Portal.js.map \ No newline at end of file diff --git a/dist/esm/base/Portal.js.map b/dist/esm/base/Portal.js.map new file mode 100644 index 0000000..9c8b171 --- /dev/null +++ b/dist/esm/base/Portal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Portal.js","sourceRoot":"","sources":["../../../src/base/Portal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAOzC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAGjB;QAFZ,QAAQ,cAAA,EACR,cAAsB,EAAtB,MAAM,mBAAG,aAAa,KAAA;IAEtB,IAAM,KAAK,GAAQ,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACnD,IAAM,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAEzC,SAAS,CAAC;QACR,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACtB,OAAO,cAAM,OAAA,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,EAArB,CAAqB,CAAC;IACrC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;IAEhB,OAAO,YAAY,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC"} \ No newline at end of file diff --git a/dist/esm/base/SeoMeta.d.ts b/dist/esm/base/SeoMeta.d.ts new file mode 100644 index 0000000..1d8af00 --- /dev/null +++ b/dist/esm/base/SeoMeta.d.ts @@ -0,0 +1,12 @@ +/// +/** + * @check + * - https://ogp.me + * - https://ahrefs.com/blog/seo-meta-tags + */ +type Props = { + title: string; + metaTags?: any[]; +}; +export default function SeoMeta({ title, metaTags }: Props): JSX.Element; +export {}; diff --git a/dist/esm/base/SeoMeta.js b/dist/esm/base/SeoMeta.js new file mode 100644 index 0000000..1bad77d --- /dev/null +++ b/dist/esm/base/SeoMeta.js @@ -0,0 +1,12 @@ +import React from 'react'; +import { Helmet } from 'react-helmet-async'; +export default function SeoMeta(_a) { + var title = _a.title, _b = _a.metaTags, metaTags = _b === void 0 ? [] : _b; + return (React.createElement(Helmet, null, + React.createElement("title", null, title), + metaTags.map(function (_a) { + var name = _a.name, content = _a.content; + return (React.createElement("meta", { name: name, content: content })); + }))); +} +//# sourceMappingURL=SeoMeta.js.map \ No newline at end of file diff --git a/dist/esm/base/SeoMeta.js.map b/dist/esm/base/SeoMeta.js.map new file mode 100644 index 0000000..48bbdb6 --- /dev/null +++ b/dist/esm/base/SeoMeta.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SeoMeta.js","sourceRoot":"","sources":["../../../src/base/SeoMeta.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAkB5C,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAA+B;QAA7B,KAAK,WAAA,EAAE,gBAAa,EAAb,QAAQ,mBAAG,EAAE,KAAA;IACpD,OAAO,CACL,oBAAC,MAAM;QACL,mCAAQ,KAAK,CAAS;QACrB,QAAQ,CAAC,GAAG,CAAC,UAAC,EAA0B;gBAAxB,IAAI,UAAA,EAAE,OAAO,aAAA;YAAgB,OAAA,CAC5C,8BAAM,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI,CACvC;QAF6C,CAE7C,CAAC,CACK,CACV,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/esm/base/index.d.ts b/dist/esm/base/index.d.ts new file mode 100644 index 0000000..82de855 --- /dev/null +++ b/dist/esm/base/index.d.ts @@ -0,0 +1,3 @@ +export { default as ErrorBoundary } from './ErrorBoundary'; +export { default as Portal } from './Portal'; +export { default as SeoMeta } from './SeoMeta'; diff --git a/dist/esm/base/index.js b/dist/esm/base/index.js new file mode 100644 index 0000000..3e05c8c --- /dev/null +++ b/dist/esm/base/index.js @@ -0,0 +1,4 @@ +export { default as ErrorBoundary } from './ErrorBoundary'; +export { default as Portal } from './Portal'; +export { default as SeoMeta } from './SeoMeta'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/base/index.js.map b/dist/esm/base/index.js.map new file mode 100644 index 0000000..cc300c9 --- /dev/null +++ b/dist/esm/base/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/Accordion.d.ts b/dist/esm/components/Accordion.d.ts new file mode 100644 index 0000000..eaa0e1e --- /dev/null +++ b/dist/esm/components/Accordion.d.ts @@ -0,0 +1,5 @@ +import * as $ from '../generics'; +export type { AccordionProps, AccordionItemProps } from '../generics'; +export declare const Accordion: import("styled-components").StyledComponent; +export declare const AccordionItem: import("styled-components").StyledComponent; +export default Accordion; diff --git a/dist/esm/components/Accordion.js b/dist/esm/components/Accordion.js new file mode 100644 index 0000000..6e220fb --- /dev/null +++ b/dist/esm/components/Accordion.js @@ -0,0 +1,11 @@ +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +import styled from 'styled-components'; +import * as $ from '../generics'; +export var Accordion = styled($.Accordion)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .jpk-accordion {\n &__summary {\n background-color: var(--colors-primary);\n color: #ffffff;\n }\n }\n"], ["\n .jpk-accordion {\n &__summary {\n background-color: var(--colors-primary);\n color: #ffffff;\n }\n }\n"]))); +export var AccordionItem = styled($.AccordionItem)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n line-height: 20px;\n"], ["\n line-height: 20px;\n"]))); +export default Accordion; +var templateObject_1, templateObject_2; +//# sourceMappingURL=Accordion.js.map \ No newline at end of file diff --git a/dist/esm/components/Accordion.js.map b/dist/esm/components/Accordion.js.map new file mode 100644 index 0000000..f27fc92 --- /dev/null +++ b/dist/esm/components/Accordion.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/components/Accordion.tsx"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAIjC,MAAM,CAAC,IAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,gMAAA,6HAO3C,IAAA,CAAC;AAEF,MAAM,CAAC,IAAM,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,6FAAA,0BAEnD,IAAA,CAAC;AAEF,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/Alert.d.ts b/dist/esm/components/Alert.d.ts new file mode 100644 index 0000000..740846b --- /dev/null +++ b/dist/esm/components/Alert.d.ts @@ -0,0 +1,3 @@ +export { Alert } from '../generics'; +export { Alert as default } from '../generics'; +export type { AlertProps } from '../generics'; diff --git a/dist/esm/components/Alert.js b/dist/esm/components/Alert.js new file mode 100644 index 0000000..a8064f7 --- /dev/null +++ b/dist/esm/components/Alert.js @@ -0,0 +1,3 @@ +export { Alert } from '../generics'; +export { Alert as default } from '../generics'; +//# sourceMappingURL=Alert.js.map \ No newline at end of file diff --git a/dist/esm/components/Alert.js.map b/dist/esm/components/Alert.js.map new file mode 100644 index 0000000..ef83514 --- /dev/null +++ b/dist/esm/components/Alert.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/components/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/Button.d.ts b/dist/esm/components/Button.d.ts new file mode 100644 index 0000000..4fb6d18 --- /dev/null +++ b/dist/esm/components/Button.d.ts @@ -0,0 +1,4 @@ +import * as $ from '../generics'; +export type { ButtonProps } from '../generics'; +export declare const Button: import("styled-components").StyledComponent; +export default Button; diff --git a/dist/esm/components/Button.js b/dist/esm/components/Button.js new file mode 100644 index 0000000..cdd6373 --- /dev/null +++ b/dist/esm/components/Button.js @@ -0,0 +1,10 @@ +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +import styled from 'styled-components'; +import * as $ from '../generics'; +export var Button = styled($.Button)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .jpk-btn {\n &__small {\n min-width: 64px;\n height: 30px;\n padding: 4px 5px;\n }\n &__medium {\n min-width: 89px;\n height: 36px;\n padding: 6px 8px;\n }\n &__large {\n min-width: 92px;\n height: 42px;\n padding: 8px 11px;\n }\n }\n"], ["\n .jpk-btn {\n &__small {\n min-width: 64px;\n height: 30px;\n padding: 4px 5px;\n }\n &__medium {\n min-width: 89px;\n height: 36px;\n padding: 6px 8px;\n }\n &__large {\n min-width: 92px;\n height: 42px;\n padding: 8px 11px;\n }\n }\n"]))); +export default Button; +var templateObject_1; +//# sourceMappingURL=Button.js.map \ No newline at end of file diff --git a/dist/esm/components/Button.js.map b/dist/esm/components/Button.js.map new file mode 100644 index 0000000..ff53d42 --- /dev/null +++ b/dist/esm/components/Button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/components/Button.tsx"],"names":[],"mappings":";;;;AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAIjC,MAAM,CAAC,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,mXAAA,gTAkBrC,IAAA,CAAC;AAEF,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/Checkbox.d.ts b/dist/esm/components/Checkbox.d.ts new file mode 100644 index 0000000..bdfb5c6 --- /dev/null +++ b/dist/esm/components/Checkbox.d.ts @@ -0,0 +1,3 @@ +export { Checkbox } from '../generics'; +export { Checkbox as default } from '../generics'; +export type { CheckboxProps } from '../generics'; diff --git a/dist/esm/components/Checkbox.js b/dist/esm/components/Checkbox.js new file mode 100644 index 0000000..197570e --- /dev/null +++ b/dist/esm/components/Checkbox.js @@ -0,0 +1,3 @@ +export { Checkbox } from '../generics'; +export { Checkbox as default } from '../generics'; +//# sourceMappingURL=Checkbox.js.map \ No newline at end of file diff --git a/dist/esm/components/Checkbox.js.map b/dist/esm/components/Checkbox.js.map new file mode 100644 index 0000000..3e737b7 --- /dev/null +++ b/dist/esm/components/Checkbox.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/FileInput.d.ts b/dist/esm/components/FileInput.d.ts new file mode 100644 index 0000000..ffa2679 --- /dev/null +++ b/dist/esm/components/FileInput.d.ts @@ -0,0 +1,3 @@ +export { FileInput } from '../generics'; +export { FileInput as default } from '../generics'; +export type { FileInputProps } from '../generics'; diff --git a/dist/esm/components/FileInput.js b/dist/esm/components/FileInput.js new file mode 100644 index 0000000..7106f68 --- /dev/null +++ b/dist/esm/components/FileInput.js @@ -0,0 +1,3 @@ +export { FileInput } from '../generics'; +export { FileInput as default } from '../generics'; +//# sourceMappingURL=FileInput.js.map \ No newline at end of file diff --git a/dist/esm/components/FileInput.js.map b/dist/esm/components/FileInput.js.map new file mode 100644 index 0000000..d86da19 --- /dev/null +++ b/dist/esm/components/FileInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/List.d.ts b/dist/esm/components/List.d.ts new file mode 100644 index 0000000..81ec7d4 --- /dev/null +++ b/dist/esm/components/List.d.ts @@ -0,0 +1,3 @@ +export { List, ListItem } from '../generics'; +export { List as default } from '../generics'; +export type { ListProps, ListItemProps } from '../generics'; diff --git a/dist/esm/components/List.js b/dist/esm/components/List.js new file mode 100644 index 0000000..747d8de --- /dev/null +++ b/dist/esm/components/List.js @@ -0,0 +1,3 @@ +export { List, ListItem } from '../generics'; +export { List as default } from '../generics'; +//# sourceMappingURL=List.js.map \ No newline at end of file diff --git a/dist/esm/components/List.js.map b/dist/esm/components/List.js.map new file mode 100644 index 0000000..dd3c787 --- /dev/null +++ b/dist/esm/components/List.js.map @@ -0,0 +1 @@ +{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/components/List.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/Radio.d.ts b/dist/esm/components/Radio.d.ts new file mode 100644 index 0000000..8c101d5 --- /dev/null +++ b/dist/esm/components/Radio.d.ts @@ -0,0 +1,3 @@ +export { Radio } from '../generics'; +export { Radio as default } from '../generics'; +export type { RadioProps } from '../generics'; diff --git a/dist/esm/components/Radio.js b/dist/esm/components/Radio.js new file mode 100644 index 0000000..e653920 --- /dev/null +++ b/dist/esm/components/Radio.js @@ -0,0 +1,3 @@ +export { Radio } from '../generics'; +export { Radio as default } from '../generics'; +//# sourceMappingURL=Radio.js.map \ No newline at end of file diff --git a/dist/esm/components/Radio.js.map b/dist/esm/components/Radio.js.map new file mode 100644 index 0000000..2ee012b --- /dev/null +++ b/dist/esm/components/Radio.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/components/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/RangeInput.d.ts b/dist/esm/components/RangeInput.d.ts new file mode 100644 index 0000000..707c882 --- /dev/null +++ b/dist/esm/components/RangeInput.d.ts @@ -0,0 +1,3 @@ +export { RangeInput } from '../generics'; +export { RangeInput as default } from '../generics'; +export type { RangeInputProps } from '../generics'; diff --git a/dist/esm/components/RangeInput.js b/dist/esm/components/RangeInput.js new file mode 100644 index 0000000..6ad76ac --- /dev/null +++ b/dist/esm/components/RangeInput.js @@ -0,0 +1,3 @@ +export { RangeInput } from '../generics'; +export { RangeInput as default } from '../generics'; +//# sourceMappingURL=RangeInput.js.map \ No newline at end of file diff --git a/dist/esm/components/RangeInput.js.map b/dist/esm/components/RangeInput.js.map new file mode 100644 index 0000000..ff7a7c0 --- /dev/null +++ b/dist/esm/components/RangeInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RangeInput.js","sourceRoot":"","sources":["../../../src/components/RangeInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/SearchInput.d.ts b/dist/esm/components/SearchInput.d.ts new file mode 100644 index 0000000..d4c458d --- /dev/null +++ b/dist/esm/components/SearchInput.d.ts @@ -0,0 +1,3 @@ +export { SearchInput } from '../generics'; +export { SearchInput as default } from '../generics'; +export type { SearchInputProps } from '../generics'; diff --git a/dist/esm/components/SearchInput.js b/dist/esm/components/SearchInput.js new file mode 100644 index 0000000..2a030d0 --- /dev/null +++ b/dist/esm/components/SearchInput.js @@ -0,0 +1,3 @@ +export { SearchInput } from '../generics'; +export { SearchInput as default } from '../generics'; +//# sourceMappingURL=SearchInput.js.map \ No newline at end of file diff --git a/dist/esm/components/SearchInput.js.map b/dist/esm/components/SearchInput.js.map new file mode 100644 index 0000000..e5a1e69 --- /dev/null +++ b/dist/esm/components/SearchInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchInput.js","sourceRoot":"","sources":["../../../src/components/SearchInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/Select.d.ts b/dist/esm/components/Select.d.ts new file mode 100644 index 0000000..85fff47 --- /dev/null +++ b/dist/esm/components/Select.d.ts @@ -0,0 +1,3 @@ +export { Select } from '../generics'; +export { Select as default } from '../generics'; +export type { SelectProps } from '../generics'; diff --git a/dist/esm/components/Select.js b/dist/esm/components/Select.js new file mode 100644 index 0000000..08beb59 --- /dev/null +++ b/dist/esm/components/Select.js @@ -0,0 +1,3 @@ +export { Select } from '../generics'; +export { Select as default } from '../generics'; +//# sourceMappingURL=Select.js.map \ No newline at end of file diff --git a/dist/esm/components/Select.js.map b/dist/esm/components/Select.js.map new file mode 100644 index 0000000..b855f40 --- /dev/null +++ b/dist/esm/components/Select.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/components/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/Table.d.ts b/dist/esm/components/Table.d.ts new file mode 100644 index 0000000..f71e2f7 --- /dev/null +++ b/dist/esm/components/Table.d.ts @@ -0,0 +1,3 @@ +export { Table, TableHeader, TableRow, TableColHead, TableBody, TableCell, TableFooter, } from '../generics'; +export { Table as default } from '../generics'; +export type { TableProps } from '../generics'; diff --git a/dist/esm/components/Table.js b/dist/esm/components/Table.js new file mode 100644 index 0000000..03ba336 --- /dev/null +++ b/dist/esm/components/Table.js @@ -0,0 +1,3 @@ +export { Table, TableHeader, TableRow, TableColHead, TableBody, TableCell, TableFooter, } from '../generics'; +export { Table as default } from '../generics'; +//# sourceMappingURL=Table.js.map \ No newline at end of file diff --git a/dist/esm/components/Table.js.map b/dist/esm/components/Table.js.map new file mode 100644 index 0000000..963964a --- /dev/null +++ b/dist/esm/components/Table.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/components/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/Tabs.d.ts b/dist/esm/components/Tabs.d.ts new file mode 100644 index 0000000..8aef5dd --- /dev/null +++ b/dist/esm/components/Tabs.d.ts @@ -0,0 +1,3 @@ +export { Tabs, Tab } from '../generics'; +export { Tabs as default } from '../generics'; +export type { TabsProps } from '../generics'; diff --git a/dist/esm/components/Tabs.js b/dist/esm/components/Tabs.js new file mode 100644 index 0000000..340a8f4 --- /dev/null +++ b/dist/esm/components/Tabs.js @@ -0,0 +1,3 @@ +export { Tabs, Tab } from '../generics'; +export { Tabs as default } from '../generics'; +//# sourceMappingURL=Tabs.js.map \ No newline at end of file diff --git a/dist/esm/components/Tabs.js.map b/dist/esm/components/Tabs.js.map new file mode 100644 index 0000000..6ce2774 --- /dev/null +++ b/dist/esm/components/Tabs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/components/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/Text.d.ts b/dist/esm/components/Text.d.ts new file mode 100644 index 0000000..f80984a --- /dev/null +++ b/dist/esm/components/Text.d.ts @@ -0,0 +1,3 @@ +export { Text } from '../generics'; +export { Text as default } from '../generics'; +export type { TextProps } from '../generics'; diff --git a/dist/esm/components/Text.js b/dist/esm/components/Text.js new file mode 100644 index 0000000..78cbee6 --- /dev/null +++ b/dist/esm/components/Text.js @@ -0,0 +1,3 @@ +export { Text } from '../generics'; +export { Text as default } from '../generics'; +//# sourceMappingURL=Text.js.map \ No newline at end of file diff --git a/dist/esm/components/Text.js.map b/dist/esm/components/Text.js.map new file mode 100644 index 0000000..350907d --- /dev/null +++ b/dist/esm/components/Text.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/TextInput.d.ts b/dist/esm/components/TextInput.d.ts new file mode 100644 index 0000000..0a103b2 --- /dev/null +++ b/dist/esm/components/TextInput.d.ts @@ -0,0 +1,3 @@ +export { TextInput } from '../generics'; +export { TextInput as default } from '../generics'; +export type { TextInputProps } from '../generics'; diff --git a/dist/esm/components/TextInput.js b/dist/esm/components/TextInput.js new file mode 100644 index 0000000..7978553 --- /dev/null +++ b/dist/esm/components/TextInput.js @@ -0,0 +1,3 @@ +export { TextInput } from '../generics'; +export { TextInput as default } from '../generics'; +//# sourceMappingURL=TextInput.js.map \ No newline at end of file diff --git a/dist/esm/components/TextInput.js.map b/dist/esm/components/TextInput.js.map new file mode 100644 index 0000000..c3d245b --- /dev/null +++ b/dist/esm/components/TextInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/components/index.d.ts b/dist/esm/components/index.d.ts new file mode 100644 index 0000000..23029e7 --- /dev/null +++ b/dist/esm/components/index.d.ts @@ -0,0 +1,14 @@ +export * from './Accordion'; +export * from './Alert'; +export * from './Button'; +export * from './Checkbox'; +export * from './FileInput'; +export * from './List'; +export * from './Radio'; +export * from './RangeInput'; +export * from './SearchInput'; +export * from './Select'; +export * from './Table'; +export * from './Tabs'; +export * from './Text'; +export * from './TextInput'; diff --git a/dist/esm/components/index.js b/dist/esm/components/index.js new file mode 100644 index 0000000..8c08472 --- /dev/null +++ b/dist/esm/components/index.js @@ -0,0 +1,15 @@ +export * from './Accordion'; +export * from './Alert'; +export * from './Button'; +export * from './Checkbox'; +export * from './FileInput'; +export * from './List'; +export * from './Radio'; +export * from './RangeInput'; +export * from './SearchInput'; +export * from './Select'; +export * from './Table'; +export * from './Tabs'; +export * from './Text'; +export * from './TextInput'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/components/index.js.map b/dist/esm/components/index.js.map new file mode 100644 index 0000000..c4eb39b --- /dev/null +++ b/dist/esm/components/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/Accordion.d.ts b/dist/esm/generics/Accordion.d.ts new file mode 100644 index 0000000..b579460 --- /dev/null +++ b/dist/esm/generics/Accordion.d.ts @@ -0,0 +1,17 @@ +import React, { CSSProperties } from 'react'; +export type AccordionItemProps = { + children: string | React.ReactNode; + className?: string; + id?: string; + style?: CSSProperties; + summary: string; +}; +export declare function AccordionItem({ id, summary, children, className, style, }: AccordionItemProps): JSX.Element; +export type AccordionProps = { + children?: React.ReactNode; + className?: string; + data?: AccordionItemProps[]; + style?: CSSProperties; +}; +export declare function Accordion({ children, data, className, style, }: AccordionProps): JSX.Element; +export default Accordion; diff --git a/dist/esm/generics/Accordion.js b/dist/esm/generics/Accordion.js new file mode 100644 index 0000000..d899dca --- /dev/null +++ b/dist/esm/generics/Accordion.js @@ -0,0 +1,17 @@ +import clsx from 'clsx'; +import React, { useState } from 'react'; +export function AccordionItem(_a) { + var id = _a.id, summary = _a.summary, children = _a.children, className = _a.className, style = _a.style; + var _b = useState(false), isOpen = _b[0], setIsOpen = _b[1]; + return (React.createElement("section", { key: id !== null && id !== void 0 ? id : summary, className: clsx('jpk-accordion__section', className), style: style }, + React.createElement("div", { role: 'button', "aria-expanded": isOpen, className: 'jpk-accordion__summary', onClick: function () { return setIsOpen(!isOpen); } }, + React.createElement("div", null, summary), + React.createElement("div", null, isOpen ? '-' : '+')), + isOpen && React.createElement("div", { className: 'jpk-accordion__content' }, children))); +} +export function Accordion(_a) { + var children = _a.children, data = _a.data, className = _a.className, style = _a.style; + return (React.createElement("div", { className: clsx('jpk-accordion', className), style: style }, data ? data.map(AccordionItem) : children)); +} +export default Accordion; +//# sourceMappingURL=Accordion.js.map \ No newline at end of file diff --git a/dist/esm/generics/Accordion.js.map b/dist/esm/generics/Accordion.js.map new file mode 100644 index 0000000..da8aefa --- /dev/null +++ b/dist/esm/generics/Accordion.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/generics/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAiB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAcvD,MAAM,UAAU,aAAa,CAAC,EAMT;QALnB,EAAE,QAAA,EACF,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,KAAK,WAAA;IAEC,IAAA,KAAsB,QAAQ,CAAC,KAAK,CAAC,EAApC,MAAM,QAAA,EAAE,SAAS,QAAmB,CAAC;IAE5C,OAAO,CACL,iCACE,GAAG,EAAE,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,OAAO,EAClB,SAAS,EAAE,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC,EACpD,KAAK,EAAE,KAAK;QAEZ,6BACE,IAAI,EAAC,QAAQ,mBACE,MAAM,EACrB,SAAS,EAAC,wBAAwB,EAClC,OAAO,EAAE,cAAM,OAAA,SAAS,CAAC,CAAC,MAAM,CAAC,EAAlB,CAAkB;YAEjC,iCAAM,OAAO,CAAO;YACpB,iCAAM,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAO,CAC3B;QACL,MAAM,IAAI,6BAAK,SAAS,EAAC,wBAAwB,IAAE,QAAQ,CAAO,CAC3D,CACX,CAAC;AACJ,CAAC;AASD,MAAM,UAAU,SAAS,CAAC,EAKT;QAJf,QAAQ,cAAA,EACR,IAAI,UAAA,EACJ,SAAS,eAAA,EACT,KAAK,WAAA;IAEL,OAAO,CACL,6BAAK,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,IAC3D,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CACtC,CACP,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/Alert.d.ts b/dist/esm/generics/Alert.d.ts new file mode 100644 index 0000000..ba1ea80 --- /dev/null +++ b/dist/esm/generics/Alert.d.ts @@ -0,0 +1,7 @@ +/// +export type AlertProps = { + children: string; + severity?: 'error' | 'warning' | 'info' | 'success'; +}; +export declare function Alert({ children, severity }: AlertProps): JSX.Element; +export default Alert; diff --git a/dist/esm/generics/Alert.js b/dist/esm/generics/Alert.js new file mode 100644 index 0000000..fe70a21 --- /dev/null +++ b/dist/esm/generics/Alert.js @@ -0,0 +1,8 @@ +import clsx from 'clsx'; +import React from 'react'; +export function Alert(_a) { + var children = _a.children, severity = _a.severity; + return (React.createElement("div", { role: 'alert', className: clsx('jpk-alert', severity && "jpk-alert--".concat(severity)) }, children)); +} +export default Alert; +//# sourceMappingURL=Alert.js.map \ No newline at end of file diff --git a/dist/esm/generics/Alert.js.map b/dist/esm/generics/Alert.js.map new file mode 100644 index 0000000..3cb1a26 --- /dev/null +++ b/dist/esm/generics/Alert.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/generics/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,UAAU,KAAK,CAAC,EAAkC;QAAhC,QAAQ,cAAA,EAAE,QAAQ,cAAA;IACxC,OAAO,CACL,6BACE,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,IAAI,qBAAc,QAAQ,CAAE,CAAC,IAEjE,QAAQ,CACL,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/Button.d.ts b/dist/esm/generics/Button.d.ts new file mode 100644 index 0000000..39b417d --- /dev/null +++ b/dist/esm/generics/Button.d.ts @@ -0,0 +1,10 @@ +import React from 'react'; +export interface ButtonProps extends React.ButtonHTMLAttributes { + children: React.ReactNode; + className?: string; + size?: 'small' | 'medium' | 'large'; + type?: 'button' | 'reset' | 'submit'; + variant?: 'contained' | 'outlined' | 'text'; +} +export declare function Button({ children, className, size, type, variant, ...restProps }: ButtonProps): JSX.Element; +export default Button; diff --git a/dist/esm/generics/Button.js b/dist/esm/generics/Button.js new file mode 100644 index 0000000..67c2c7b --- /dev/null +++ b/dist/esm/generics/Button.js @@ -0,0 +1,30 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +export function Button(_a) { + var children = _a.children, className = _a.className, _b = _a.size, size = _b === void 0 ? 'medium' : _b, type = _a.type, variant = _a.variant, restProps = __rest(_a, ["children", "className", "size", "type", "variant"]); + return (React.createElement("button", __assign({}, restProps, { type: type, className: clsx('jpk-btn', variant && "jpk-btn__".concat(variant), size && "jpk-btn__".concat(size), className) }), children)); +} +export default Button; +//# sourceMappingURL=Button.js.map \ No newline at end of file diff --git a/dist/esm/generics/Button.js.map b/dist/esm/generics/Button.js.map new file mode 100644 index 0000000..0481aad --- /dev/null +++ b/dist/esm/generics/Button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/generics/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,UAAU,MAAM,CAAC,EAOT;IANZ,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,IAAI,UAAA,EACJ,OAAO,aAAA,EACJ,SAAS,cANS,oDAOtB,CADa;IAEZ,OAAO,CACL,2CACM,SAAS,IACb,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAI,CACb,SAAS,EACT,OAAO,IAAI,mBAAY,OAAO,CAAE,EAChC,IAAI,IAAI,mBAAY,IAAI,CAAE,EAC1B,SAAS,CACV,KAEA,QAAQ,CACF,CACV,CAAC;AACJ,CAAC;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/Checkbox.d.ts b/dist/esm/generics/Checkbox.d.ts new file mode 100644 index 0000000..12acd70 --- /dev/null +++ b/dist/esm/generics/Checkbox.d.ts @@ -0,0 +1,16 @@ +import React, { CSSProperties } from 'react'; +interface Style extends CSSProperties { + input?: CSSProperties; + label?: CSSProperties; +} +export interface CheckboxProps extends React.InputHTMLAttributes { + checked?: boolean; + className?: string; + disabled?: boolean; + label?: string; + name?: string; + style?: Style; + value?: string; +} +export declare function Checkbox({ checked, className, disabled, label, name, style, value, ...restProps }: CheckboxProps): JSX.Element; +export default Checkbox; diff --git a/dist/esm/generics/Checkbox.js b/dist/esm/generics/Checkbox.js new file mode 100644 index 0000000..16a35b7 --- /dev/null +++ b/dist/esm/generics/Checkbox.js @@ -0,0 +1,33 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +import { omit } from '../utils/mixins'; +export function Checkbox(_a) { + var _b = _a.checked, checked = _b === void 0 ? false : _b, className = _a.className, _c = _a.disabled, disabled = _c === void 0 ? false : _c, label = _a.label, name = _a.name, style = _a.style, value = _a.value, restProps = __rest(_a, ["checked", "className", "disabled", "label", "name", "style", "value"]); + return (React.createElement("div", { className: clsx('jpk-checkbox', checked && 'jpk-checkbox--checked', disabled && 'jpk-checkbox--disabled', className), style: omit(style, 'input', 'label') }, + React.createElement("input", __assign({}, restProps, { checked: checked, className: 'jpk-checkbox__input', disabled: disabled, name: name, style: style === null || style === void 0 ? void 0 : style.input, type: 'checkbox', value: value })), + label && (React.createElement("label", { htmlFor: name, className: 'jpk-checkbox__label', style: style === null || style === void 0 ? void 0 : style.label }, label)))); +} +export default Checkbox; +//# sourceMappingURL=Checkbox.js.map \ No newline at end of file diff --git a/dist/esm/generics/Checkbox.js.map b/dist/esm/generics/Checkbox.js.map new file mode 100644 index 0000000..2d1d20b --- /dev/null +++ b/dist/esm/generics/Checkbox.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/generics/Checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAkBvC,MAAM,UAAU,QAAQ,CAAC,EAST;IARd,IAAA,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA,EACf,SAAS,eAAA,EACT,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,KAAK,WAAA,EACF,SAAS,cARW,uEASxB,CADa;IAEZ,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,cAAc,EACd,OAAO,IAAI,uBAAuB,EAClC,QAAQ,IAAI,wBAAwB,EACpC,SAAS,CACV,EACD,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;QAEpC,0CACM,SAAS,IACb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,qBAAqB,EAC/B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EACnB,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,KAAK,IACZ;QACD,KAAK,IAAI,CACR,+BACE,OAAO,EAAE,IAAI,EACb,SAAS,EAAC,qBAAqB,EAC/B,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,IAElB,KAAK,CACA,CACT,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/FileInput.d.ts b/dist/esm/generics/FileInput.d.ts new file mode 100644 index 0000000..8efca6c --- /dev/null +++ b/dist/esm/generics/FileInput.d.ts @@ -0,0 +1,6 @@ +import React from 'react'; +export interface FileInputProps extends React.InputHTMLAttributes { + className?: string; +} +export declare function FileInput({ className, ...restProps }: FileInputProps): JSX.Element; +export default FileInput; diff --git a/dist/esm/generics/FileInput.js b/dist/esm/generics/FileInput.js new file mode 100644 index 0000000..0a28ef7 --- /dev/null +++ b/dist/esm/generics/FileInput.js @@ -0,0 +1,30 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +export function FileInput(_a) { + var className = _a.className, restProps = __rest(_a, ["className"]); + return (React.createElement("input", __assign({}, restProps, { className: clsx('jpk-file-input', className), type: 'file' }))); +} +export default FileInput; +//# sourceMappingURL=FileInput.js.map \ No newline at end of file diff --git a/dist/esm/generics/FileInput.js.map b/dist/esm/generics/FileInput.js.map new file mode 100644 index 0000000..61516fe --- /dev/null +++ b/dist/esm/generics/FileInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/generics/FileInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,UAAU,SAAS,CAAC,EAA2C;IAAzC,IAAA,SAAS,eAAA,EAAK,SAAS,cAAzB,aAA2B,CAAF;IACjD,OAAO,CACL,0CACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAC5C,IAAI,EAAC,MAAM,IACX,CACH,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/List.d.ts b/dist/esm/generics/List.d.ts new file mode 100644 index 0000000..ce9b3d7 --- /dev/null +++ b/dist/esm/generics/List.d.ts @@ -0,0 +1,528 @@ +import React from 'react'; +export interface ListProps extends React.HTMLAttributes { + as?: 'div' | 'ol' | 'ul'; +} +export declare function List({ as, children, className, ...restProps }: ListProps): React.DetailedReactHTMLElement<{ + defaultChecked?: boolean | undefined; + defaultValue?: string | number | readonly string[] | undefined; + suppressContentEditableWarning?: boolean | undefined; + suppressHydrationWarning?: boolean | undefined; + accessKey?: string | undefined; + contentEditable?: (boolean | "true" | "false") | "inherit" | undefined; + contextMenu?: string | undefined; + dir?: string | undefined; + draggable?: (boolean | "true" | "false") | undefined; + hidden?: boolean | undefined; + id?: string | undefined; + lang?: string | undefined; + nonce?: string | undefined; + placeholder?: string | undefined; + slot?: string | undefined; + spellCheck?: (boolean | "true" | "false") | undefined; + style?: React.CSSProperties | undefined; + tabIndex?: number | undefined; + title?: string | undefined; + translate?: "yes" | "no" | undefined; + radioGroup?: string | undefined; + role?: React.AriaRole | undefined; + about?: string | undefined; + datatype?: string | undefined; + inlist?: any; + prefix?: string | undefined; + property?: string | undefined; + resource?: string | undefined; + typeof?: string | undefined; + vocab?: string | undefined; + autoCapitalize?: string | undefined; + autoCorrect?: string | undefined; + autoSave?: string | undefined; + color?: string | undefined; + itemProp?: string | undefined; + itemScope?: boolean | undefined; + itemType?: string | undefined; + itemID?: string | undefined; + itemRef?: string | undefined; + results?: number | undefined; + security?: string | undefined; + unselectable?: "on" | "off" | undefined; + inputMode?: "url" | "search" | "text" | "none" | "tel" | "email" | "numeric" | "decimal" | undefined; + is?: string | undefined; + 'aria-activedescendant'?: string | undefined; + 'aria-atomic'?: (boolean | "true" | "false") | undefined; + 'aria-autocomplete'?: "list" | "none" | "both" | "inline" | undefined; + 'aria-busy'?: (boolean | "true" | "false") | undefined; + 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-colcount'?: number | undefined; + 'aria-colindex'?: number | undefined; + 'aria-colspan'?: number | undefined; + 'aria-controls'?: string | undefined; + 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "date" | "location" | undefined; + 'aria-describedby'?: string | undefined; + 'aria-details'?: string | undefined; + 'aria-disabled'?: (boolean | "true" | "false") | undefined; + 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined; + 'aria-errormessage'?: string | undefined; + 'aria-expanded'?: (boolean | "true" | "false") | undefined; + 'aria-flowto'?: string | undefined; + 'aria-grabbed'?: (boolean | "true" | "false") | undefined; + 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined; + 'aria-hidden'?: (boolean | "true" | "false") | undefined; + 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined; + 'aria-keyshortcuts'?: string | undefined; + 'aria-label'?: string | undefined; + 'aria-labelledby'?: string | undefined; + 'aria-level'?: number | undefined; + 'aria-live'?: "off" | "assertive" | "polite" | undefined; + 'aria-modal'?: (boolean | "true" | "false") | undefined; + 'aria-multiline'?: (boolean | "true" | "false") | undefined; + 'aria-multiselectable'?: (boolean | "true" | "false") | undefined; + 'aria-orientation'?: "horizontal" | "vertical" | undefined; + 'aria-owns'?: string | undefined; + 'aria-placeholder'?: string | undefined; + 'aria-posinset'?: number | undefined; + 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-readonly'?: (boolean | "true" | "false") | undefined; + 'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined; + 'aria-required'?: (boolean | "true" | "false") | undefined; + 'aria-roledescription'?: string | undefined; + 'aria-rowcount'?: number | undefined; + 'aria-rowindex'?: number | undefined; + 'aria-rowspan'?: number | undefined; + 'aria-selected'?: (boolean | "true" | "false") | undefined; + 'aria-setsize'?: number | undefined; + 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined; + 'aria-valuemax'?: number | undefined; + 'aria-valuemin'?: number | undefined; + 'aria-valuenow'?: number | undefined; + 'aria-valuetext'?: string | undefined; + dangerouslySetInnerHTML?: { + __html: string; + } | undefined; + onCopy?: React.ClipboardEventHandler | undefined; + onCopyCapture?: React.ClipboardEventHandler | undefined; + onCut?: React.ClipboardEventHandler | undefined; + onCutCapture?: React.ClipboardEventHandler | undefined; + onPaste?: React.ClipboardEventHandler | undefined; + onPasteCapture?: React.ClipboardEventHandler | undefined; + onCompositionEnd?: React.CompositionEventHandler | undefined; + onCompositionEndCapture?: React.CompositionEventHandler | undefined; + onCompositionStart?: React.CompositionEventHandler | undefined; + onCompositionStartCapture?: React.CompositionEventHandler | undefined; + onCompositionUpdate?: React.CompositionEventHandler | undefined; + onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; + onFocus?: React.FocusEventHandler | undefined; + onFocusCapture?: React.FocusEventHandler | undefined; + onBlur?: React.FocusEventHandler | undefined; + onBlurCapture?: React.FocusEventHandler | undefined; + onChange?: React.FormEventHandler | undefined; + onChangeCapture?: React.FormEventHandler | undefined; + onBeforeInput?: React.FormEventHandler | undefined; + onBeforeInputCapture?: React.FormEventHandler | undefined; + onInput?: React.FormEventHandler | undefined; + onInputCapture?: React.FormEventHandler | undefined; + onReset?: React.FormEventHandler | undefined; + onResetCapture?: React.FormEventHandler | undefined; + onSubmit?: React.FormEventHandler | undefined; + onSubmitCapture?: React.FormEventHandler | undefined; + onInvalid?: React.FormEventHandler | undefined; + onInvalidCapture?: React.FormEventHandler | undefined; + onLoad?: React.ReactEventHandler | undefined; + onLoadCapture?: React.ReactEventHandler | undefined; + onError?: React.ReactEventHandler | undefined; + onErrorCapture?: React.ReactEventHandler | undefined; + onKeyDown?: React.KeyboardEventHandler | undefined; + onKeyDownCapture?: React.KeyboardEventHandler | undefined; + onKeyPress?: React.KeyboardEventHandler | undefined; + onKeyPressCapture?: React.KeyboardEventHandler | undefined; + onKeyUp?: React.KeyboardEventHandler | undefined; + onKeyUpCapture?: React.KeyboardEventHandler | undefined; + onAbort?: React.ReactEventHandler | undefined; + onAbortCapture?: React.ReactEventHandler | undefined; + onCanPlay?: React.ReactEventHandler | undefined; + onCanPlayCapture?: React.ReactEventHandler | undefined; + onCanPlayThrough?: React.ReactEventHandler | undefined; + onCanPlayThroughCapture?: React.ReactEventHandler | undefined; + onDurationChange?: React.ReactEventHandler | undefined; + onDurationChangeCapture?: React.ReactEventHandler | undefined; + onEmptied?: React.ReactEventHandler | undefined; + onEmptiedCapture?: React.ReactEventHandler | undefined; + onEncrypted?: React.ReactEventHandler | undefined; + onEncryptedCapture?: React.ReactEventHandler | undefined; + onEnded?: React.ReactEventHandler | undefined; + onEndedCapture?: React.ReactEventHandler | undefined; + onLoadedData?: React.ReactEventHandler | undefined; + onLoadedDataCapture?: React.ReactEventHandler | undefined; + onLoadedMetadata?: React.ReactEventHandler | undefined; + onLoadedMetadataCapture?: React.ReactEventHandler | undefined; + onLoadStart?: React.ReactEventHandler | undefined; + onLoadStartCapture?: React.ReactEventHandler | undefined; + onPause?: React.ReactEventHandler | undefined; + onPauseCapture?: React.ReactEventHandler | undefined; + onPlay?: React.ReactEventHandler | undefined; + onPlayCapture?: React.ReactEventHandler | undefined; + onPlaying?: React.ReactEventHandler | undefined; + onPlayingCapture?: React.ReactEventHandler | undefined; + onProgress?: React.ReactEventHandler | undefined; + onProgressCapture?: React.ReactEventHandler | undefined; + onRateChange?: React.ReactEventHandler | undefined; + onRateChangeCapture?: React.ReactEventHandler | undefined; + onResize?: React.ReactEventHandler | undefined; + onResizeCapture?: React.ReactEventHandler | undefined; + onSeeked?: React.ReactEventHandler | undefined; + onSeekedCapture?: React.ReactEventHandler | undefined; + onSeeking?: React.ReactEventHandler | undefined; + onSeekingCapture?: React.ReactEventHandler | undefined; + onStalled?: React.ReactEventHandler | undefined; + onStalledCapture?: React.ReactEventHandler | undefined; + onSuspend?: React.ReactEventHandler | undefined; + onSuspendCapture?: React.ReactEventHandler | undefined; + onTimeUpdate?: React.ReactEventHandler | undefined; + onTimeUpdateCapture?: React.ReactEventHandler | undefined; + onVolumeChange?: React.ReactEventHandler | undefined; + onVolumeChangeCapture?: React.ReactEventHandler | undefined; + onWaiting?: React.ReactEventHandler | undefined; + onWaitingCapture?: React.ReactEventHandler | undefined; + onAuxClick?: React.MouseEventHandler | undefined; + onAuxClickCapture?: React.MouseEventHandler | undefined; + onClick?: React.MouseEventHandler | undefined; + onClickCapture?: React.MouseEventHandler | undefined; + onContextMenu?: React.MouseEventHandler | undefined; + onContextMenuCapture?: React.MouseEventHandler | undefined; + onDoubleClick?: React.MouseEventHandler | undefined; + onDoubleClickCapture?: React.MouseEventHandler | undefined; + onDrag?: React.DragEventHandler | undefined; + onDragCapture?: React.DragEventHandler | undefined; + onDragEnd?: React.DragEventHandler | undefined; + onDragEndCapture?: React.DragEventHandler | undefined; + onDragEnter?: React.DragEventHandler | undefined; + onDragEnterCapture?: React.DragEventHandler | undefined; + onDragExit?: React.DragEventHandler | undefined; + onDragExitCapture?: React.DragEventHandler | undefined; + onDragLeave?: React.DragEventHandler | undefined; + onDragLeaveCapture?: React.DragEventHandler | undefined; + onDragOver?: React.DragEventHandler | undefined; + onDragOverCapture?: React.DragEventHandler | undefined; + onDragStart?: React.DragEventHandler | undefined; + onDragStartCapture?: React.DragEventHandler | undefined; + onDrop?: React.DragEventHandler | undefined; + onDropCapture?: React.DragEventHandler | undefined; + onMouseDown?: React.MouseEventHandler | undefined; + onMouseDownCapture?: React.MouseEventHandler | undefined; + onMouseEnter?: React.MouseEventHandler | undefined; + onMouseLeave?: React.MouseEventHandler | undefined; + onMouseMove?: React.MouseEventHandler | undefined; + onMouseMoveCapture?: React.MouseEventHandler | undefined; + onMouseOut?: React.MouseEventHandler | undefined; + onMouseOutCapture?: React.MouseEventHandler | undefined; + onMouseOver?: React.MouseEventHandler | undefined; + onMouseOverCapture?: React.MouseEventHandler | undefined; + onMouseUp?: React.MouseEventHandler | undefined; + onMouseUpCapture?: React.MouseEventHandler | undefined; + onSelect?: React.ReactEventHandler | undefined; + onSelectCapture?: React.ReactEventHandler | undefined; + onTouchCancel?: React.TouchEventHandler | undefined; + onTouchCancelCapture?: React.TouchEventHandler | undefined; + onTouchEnd?: React.TouchEventHandler | undefined; + onTouchEndCapture?: React.TouchEventHandler | undefined; + onTouchMove?: React.TouchEventHandler | undefined; + onTouchMoveCapture?: React.TouchEventHandler | undefined; + onTouchStart?: React.TouchEventHandler | undefined; + onTouchStartCapture?: React.TouchEventHandler | undefined; + onPointerDown?: React.PointerEventHandler | undefined; + onPointerDownCapture?: React.PointerEventHandler | undefined; + onPointerMove?: React.PointerEventHandler | undefined; + onPointerMoveCapture?: React.PointerEventHandler | undefined; + onPointerUp?: React.PointerEventHandler | undefined; + onPointerUpCapture?: React.PointerEventHandler | undefined; + onPointerCancel?: React.PointerEventHandler | undefined; + onPointerCancelCapture?: React.PointerEventHandler | undefined; + onPointerEnter?: React.PointerEventHandler | undefined; + onPointerEnterCapture?: React.PointerEventHandler | undefined; + onPointerLeave?: React.PointerEventHandler | undefined; + onPointerLeaveCapture?: React.PointerEventHandler | undefined; + onPointerOver?: React.PointerEventHandler | undefined; + onPointerOverCapture?: React.PointerEventHandler | undefined; + onPointerOut?: React.PointerEventHandler | undefined; + onPointerOutCapture?: React.PointerEventHandler | undefined; + onGotPointerCapture?: React.PointerEventHandler | undefined; + onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; + onLostPointerCapture?: React.PointerEventHandler | undefined; + onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; + onScroll?: React.UIEventHandler | undefined; + onScrollCapture?: React.UIEventHandler | undefined; + onWheel?: React.WheelEventHandler | undefined; + onWheelCapture?: React.WheelEventHandler | undefined; + onAnimationStart?: React.AnimationEventHandler | undefined; + onAnimationStartCapture?: React.AnimationEventHandler | undefined; + onAnimationEnd?: React.AnimationEventHandler | undefined; + onAnimationEndCapture?: React.AnimationEventHandler | undefined; + onAnimationIteration?: React.AnimationEventHandler | undefined; + onAnimationIterationCapture?: React.AnimationEventHandler | undefined; + onTransitionEnd?: React.TransitionEventHandler | undefined; + onTransitionEndCapture?: React.TransitionEventHandler | undefined; + className: string; +}, HTMLElement>; +export interface ListItemProps extends React.HTMLAttributes { + as?: 'li' | 'div'; +} +export declare function ListItem({ as, children, className, ...restProps }: ListItemProps): React.DetailedReactHTMLElement<{ + defaultChecked?: boolean | undefined; + defaultValue?: string | number | readonly string[] | undefined; + suppressContentEditableWarning?: boolean | undefined; + suppressHydrationWarning?: boolean | undefined; + accessKey?: string | undefined; + contentEditable?: (boolean | "true" | "false") | "inherit" | undefined; + contextMenu?: string | undefined; + dir?: string | undefined; + draggable?: (boolean | "true" | "false") | undefined; + hidden?: boolean | undefined; + id?: string | undefined; + lang?: string | undefined; + nonce?: string | undefined; + placeholder?: string | undefined; + slot?: string | undefined; + spellCheck?: (boolean | "true" | "false") | undefined; + style?: React.CSSProperties | undefined; + tabIndex?: number | undefined; + title?: string | undefined; + translate?: "yes" | "no" | undefined; + radioGroup?: string | undefined; + role?: React.AriaRole | undefined; + about?: string | undefined; + datatype?: string | undefined; + inlist?: any; + prefix?: string | undefined; + property?: string | undefined; + resource?: string | undefined; + typeof?: string | undefined; + vocab?: string | undefined; + autoCapitalize?: string | undefined; + autoCorrect?: string | undefined; + autoSave?: string | undefined; + color?: string | undefined; + itemProp?: string | undefined; + itemScope?: boolean | undefined; + itemType?: string | undefined; + itemID?: string | undefined; + itemRef?: string | undefined; + results?: number | undefined; + security?: string | undefined; + unselectable?: "on" | "off" | undefined; + inputMode?: "url" | "search" | "text" | "none" | "tel" | "email" | "numeric" | "decimal" | undefined; + is?: string | undefined; + 'aria-activedescendant'?: string | undefined; + 'aria-atomic'?: (boolean | "true" | "false") | undefined; + 'aria-autocomplete'?: "list" | "none" | "both" | "inline" | undefined; + 'aria-busy'?: (boolean | "true" | "false") | undefined; + 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-colcount'?: number | undefined; + 'aria-colindex'?: number | undefined; + 'aria-colspan'?: number | undefined; + 'aria-controls'?: string | undefined; + 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "date" | "location" | undefined; + 'aria-describedby'?: string | undefined; + 'aria-details'?: string | undefined; + 'aria-disabled'?: (boolean | "true" | "false") | undefined; + 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined; + 'aria-errormessage'?: string | undefined; + 'aria-expanded'?: (boolean | "true" | "false") | undefined; + 'aria-flowto'?: string | undefined; + 'aria-grabbed'?: (boolean | "true" | "false") | undefined; + 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined; + 'aria-hidden'?: (boolean | "true" | "false") | undefined; + 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined; + 'aria-keyshortcuts'?: string | undefined; + 'aria-label'?: string | undefined; + 'aria-labelledby'?: string | undefined; + 'aria-level'?: number | undefined; + 'aria-live'?: "off" | "assertive" | "polite" | undefined; + 'aria-modal'?: (boolean | "true" | "false") | undefined; + 'aria-multiline'?: (boolean | "true" | "false") | undefined; + 'aria-multiselectable'?: (boolean | "true" | "false") | undefined; + 'aria-orientation'?: "horizontal" | "vertical" | undefined; + 'aria-owns'?: string | undefined; + 'aria-placeholder'?: string | undefined; + 'aria-posinset'?: number | undefined; + 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-readonly'?: (boolean | "true" | "false") | undefined; + 'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined; + 'aria-required'?: (boolean | "true" | "false") | undefined; + 'aria-roledescription'?: string | undefined; + 'aria-rowcount'?: number | undefined; + 'aria-rowindex'?: number | undefined; + 'aria-rowspan'?: number | undefined; + 'aria-selected'?: (boolean | "true" | "false") | undefined; + 'aria-setsize'?: number | undefined; + 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined; + 'aria-valuemax'?: number | undefined; + 'aria-valuemin'?: number | undefined; + 'aria-valuenow'?: number | undefined; + 'aria-valuetext'?: string | undefined; + dangerouslySetInnerHTML?: { + __html: string; + } | undefined; + onCopy?: React.ClipboardEventHandler | undefined; + onCopyCapture?: React.ClipboardEventHandler | undefined; + onCut?: React.ClipboardEventHandler | undefined; + onCutCapture?: React.ClipboardEventHandler | undefined; + onPaste?: React.ClipboardEventHandler | undefined; + onPasteCapture?: React.ClipboardEventHandler | undefined; + onCompositionEnd?: React.CompositionEventHandler | undefined; + onCompositionEndCapture?: React.CompositionEventHandler | undefined; + onCompositionStart?: React.CompositionEventHandler | undefined; + onCompositionStartCapture?: React.CompositionEventHandler | undefined; + onCompositionUpdate?: React.CompositionEventHandler | undefined; + onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; + onFocus?: React.FocusEventHandler | undefined; + onFocusCapture?: React.FocusEventHandler | undefined; + onBlur?: React.FocusEventHandler | undefined; + onBlurCapture?: React.FocusEventHandler | undefined; + onChange?: React.FormEventHandler | undefined; + onChangeCapture?: React.FormEventHandler | undefined; + onBeforeInput?: React.FormEventHandler | undefined; + onBeforeInputCapture?: React.FormEventHandler | undefined; + onInput?: React.FormEventHandler | undefined; + onInputCapture?: React.FormEventHandler | undefined; + onReset?: React.FormEventHandler | undefined; + onResetCapture?: React.FormEventHandler | undefined; + onSubmit?: React.FormEventHandler | undefined; + onSubmitCapture?: React.FormEventHandler | undefined; + onInvalid?: React.FormEventHandler | undefined; + onInvalidCapture?: React.FormEventHandler | undefined; + onLoad?: React.ReactEventHandler | undefined; + onLoadCapture?: React.ReactEventHandler | undefined; + onError?: React.ReactEventHandler | undefined; + onErrorCapture?: React.ReactEventHandler | undefined; + onKeyDown?: React.KeyboardEventHandler | undefined; + onKeyDownCapture?: React.KeyboardEventHandler | undefined; + onKeyPress?: React.KeyboardEventHandler | undefined; + onKeyPressCapture?: React.KeyboardEventHandler | undefined; + onKeyUp?: React.KeyboardEventHandler | undefined; + onKeyUpCapture?: React.KeyboardEventHandler | undefined; + onAbort?: React.ReactEventHandler | undefined; + onAbortCapture?: React.ReactEventHandler | undefined; + onCanPlay?: React.ReactEventHandler | undefined; + onCanPlayCapture?: React.ReactEventHandler | undefined; + onCanPlayThrough?: React.ReactEventHandler | undefined; + onCanPlayThroughCapture?: React.ReactEventHandler | undefined; + onDurationChange?: React.ReactEventHandler | undefined; + onDurationChangeCapture?: React.ReactEventHandler | undefined; + onEmptied?: React.ReactEventHandler | undefined; + onEmptiedCapture?: React.ReactEventHandler | undefined; + onEncrypted?: React.ReactEventHandler | undefined; + onEncryptedCapture?: React.ReactEventHandler | undefined; + onEnded?: React.ReactEventHandler | undefined; + onEndedCapture?: React.ReactEventHandler | undefined; + onLoadedData?: React.ReactEventHandler | undefined; + onLoadedDataCapture?: React.ReactEventHandler | undefined; + onLoadedMetadata?: React.ReactEventHandler | undefined; + onLoadedMetadataCapture?: React.ReactEventHandler | undefined; + onLoadStart?: React.ReactEventHandler | undefined; + onLoadStartCapture?: React.ReactEventHandler | undefined; + onPause?: React.ReactEventHandler | undefined; + onPauseCapture?: React.ReactEventHandler | undefined; + onPlay?: React.ReactEventHandler | undefined; + onPlayCapture?: React.ReactEventHandler | undefined; + onPlaying?: React.ReactEventHandler | undefined; + onPlayingCapture?: React.ReactEventHandler | undefined; + onProgress?: React.ReactEventHandler | undefined; + onProgressCapture?: React.ReactEventHandler | undefined; + onRateChange?: React.ReactEventHandler | undefined; + onRateChangeCapture?: React.ReactEventHandler | undefined; + onResize?: React.ReactEventHandler | undefined; + onResizeCapture?: React.ReactEventHandler | undefined; + onSeeked?: React.ReactEventHandler | undefined; + onSeekedCapture?: React.ReactEventHandler | undefined; + onSeeking?: React.ReactEventHandler | undefined; + onSeekingCapture?: React.ReactEventHandler | undefined; + onStalled?: React.ReactEventHandler | undefined; + onStalledCapture?: React.ReactEventHandler | undefined; + onSuspend?: React.ReactEventHandler | undefined; + onSuspendCapture?: React.ReactEventHandler | undefined; + onTimeUpdate?: React.ReactEventHandler | undefined; + onTimeUpdateCapture?: React.ReactEventHandler | undefined; + onVolumeChange?: React.ReactEventHandler | undefined; + onVolumeChangeCapture?: React.ReactEventHandler | undefined; + onWaiting?: React.ReactEventHandler | undefined; + onWaitingCapture?: React.ReactEventHandler | undefined; + onAuxClick?: React.MouseEventHandler | undefined; + onAuxClickCapture?: React.MouseEventHandler | undefined; + onClick?: React.MouseEventHandler | undefined; + onClickCapture?: React.MouseEventHandler | undefined; + onContextMenu?: React.MouseEventHandler | undefined; + onContextMenuCapture?: React.MouseEventHandler | undefined; + onDoubleClick?: React.MouseEventHandler | undefined; + onDoubleClickCapture?: React.MouseEventHandler | undefined; + onDrag?: React.DragEventHandler | undefined; + onDragCapture?: React.DragEventHandler | undefined; + onDragEnd?: React.DragEventHandler | undefined; + onDragEndCapture?: React.DragEventHandler | undefined; + onDragEnter?: React.DragEventHandler | undefined; + onDragEnterCapture?: React.DragEventHandler | undefined; + onDragExit?: React.DragEventHandler | undefined; + onDragExitCapture?: React.DragEventHandler | undefined; + onDragLeave?: React.DragEventHandler | undefined; + onDragLeaveCapture?: React.DragEventHandler | undefined; + onDragOver?: React.DragEventHandler | undefined; + onDragOverCapture?: React.DragEventHandler | undefined; + onDragStart?: React.DragEventHandler | undefined; + onDragStartCapture?: React.DragEventHandler | undefined; + onDrop?: React.DragEventHandler | undefined; + onDropCapture?: React.DragEventHandler | undefined; + onMouseDown?: React.MouseEventHandler | undefined; + onMouseDownCapture?: React.MouseEventHandler | undefined; + onMouseEnter?: React.MouseEventHandler | undefined; + onMouseLeave?: React.MouseEventHandler | undefined; + onMouseMove?: React.MouseEventHandler | undefined; + onMouseMoveCapture?: React.MouseEventHandler | undefined; + onMouseOut?: React.MouseEventHandler | undefined; + onMouseOutCapture?: React.MouseEventHandler | undefined; + onMouseOver?: React.MouseEventHandler | undefined; + onMouseOverCapture?: React.MouseEventHandler | undefined; + onMouseUp?: React.MouseEventHandler | undefined; + onMouseUpCapture?: React.MouseEventHandler | undefined; + onSelect?: React.ReactEventHandler | undefined; + onSelectCapture?: React.ReactEventHandler | undefined; + onTouchCancel?: React.TouchEventHandler | undefined; + onTouchCancelCapture?: React.TouchEventHandler | undefined; + onTouchEnd?: React.TouchEventHandler | undefined; + onTouchEndCapture?: React.TouchEventHandler | undefined; + onTouchMove?: React.TouchEventHandler | undefined; + onTouchMoveCapture?: React.TouchEventHandler | undefined; + onTouchStart?: React.TouchEventHandler | undefined; + onTouchStartCapture?: React.TouchEventHandler | undefined; + onPointerDown?: React.PointerEventHandler | undefined; + onPointerDownCapture?: React.PointerEventHandler | undefined; + onPointerMove?: React.PointerEventHandler | undefined; + onPointerMoveCapture?: React.PointerEventHandler | undefined; + onPointerUp?: React.PointerEventHandler | undefined; + onPointerUpCapture?: React.PointerEventHandler | undefined; + onPointerCancel?: React.PointerEventHandler | undefined; + onPointerCancelCapture?: React.PointerEventHandler | undefined; + onPointerEnter?: React.PointerEventHandler | undefined; + onPointerEnterCapture?: React.PointerEventHandler | undefined; + onPointerLeave?: React.PointerEventHandler | undefined; + onPointerLeaveCapture?: React.PointerEventHandler | undefined; + onPointerOver?: React.PointerEventHandler | undefined; + onPointerOverCapture?: React.PointerEventHandler | undefined; + onPointerOut?: React.PointerEventHandler | undefined; + onPointerOutCapture?: React.PointerEventHandler | undefined; + onGotPointerCapture?: React.PointerEventHandler | undefined; + onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; + onLostPointerCapture?: React.PointerEventHandler | undefined; + onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; + onScroll?: React.UIEventHandler | undefined; + onScrollCapture?: React.UIEventHandler | undefined; + onWheel?: React.WheelEventHandler | undefined; + onWheelCapture?: React.WheelEventHandler | undefined; + onAnimationStart?: React.AnimationEventHandler | undefined; + onAnimationStartCapture?: React.AnimationEventHandler | undefined; + onAnimationEnd?: React.AnimationEventHandler | undefined; + onAnimationEndCapture?: React.AnimationEventHandler | undefined; + onAnimationIteration?: React.AnimationEventHandler | undefined; + onAnimationIterationCapture?: React.AnimationEventHandler | undefined; + onTransitionEnd?: React.TransitionEventHandler | undefined; + onTransitionEndCapture?: React.TransitionEventHandler | undefined; + className: string; +}, HTMLElement>; +export default List; diff --git a/dist/esm/generics/List.js b/dist/esm/generics/List.js new file mode 100644 index 0000000..ce7c7ed --- /dev/null +++ b/dist/esm/generics/List.js @@ -0,0 +1,34 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +export function List(_a) { + var _b = _a.as, as = _b === void 0 ? 'ul' : _b, children = _a.children, className = _a.className, restProps = __rest(_a, ["as", "children", "className"]); + return React.createElement(as, __assign({ className: clsx('jpk-list', className) }, restProps), children); +} +export function ListItem(_a) { + var _b = _a.as, as = _b === void 0 ? 'li' : _b, children = _a.children, className = _a.className, restProps = __rest(_a, ["as", "children", "className"]); + return React.createElement(as, __assign({ className: clsx('jpk-list__item', className) }, restProps), children); +} +export default List; +//# sourceMappingURL=List.js.map \ No newline at end of file diff --git a/dist/esm/generics/List.js.map b/dist/esm/generics/List.js.map new file mode 100644 index 0000000..761e108 --- /dev/null +++ b/dist/esm/generics/List.js.map @@ -0,0 +1 @@ +{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/generics/List.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,UAAU,IAAI,CAAC,EAKT;IAJV,IAAA,UAAS,EAAT,EAAE,mBAAG,IAAI,KAAA,EACT,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAJO,+BAKpB,CADa;IAEZ,OAAO,KAAK,CAAC,aAAa,CACxB,EAAE,aAEA,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,IACnC,SAAS,GAEd,QAAQ,CACT,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,QAAQ,CAAC,EAKT;IAJd,IAAA,UAAS,EAAT,EAAE,mBAAG,IAAI,KAAA,EACT,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAJW,+BAKxB,CADa;IAEZ,OAAO,KAAK,CAAC,aAAa,CACxB,EAAE,aAEA,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,IACzC,SAAS,GAEd,QAAQ,CACT,CAAC;AACJ,CAAC;AAED,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/Pagination.d.ts b/dist/esm/generics/Pagination.d.ts new file mode 100644 index 0000000..cb60eb6 --- /dev/null +++ b/dist/esm/generics/Pagination.d.ts @@ -0,0 +1,18 @@ +import React from 'react'; +type Props = { + current: number; + className?: string; + labels?: { + first?: string; + prev?: string; + next?: string; + last?: string; + }; + pageSize: number; + style?: React.CSSProperties; + total: number; + variant?: 'standard'; + onSelect?: (page: number) => void; +}; +export declare function Pagination({ current, className, labels, pageSize, style, total, onSelect, }: Props): JSX.Element | null; +export default Pagination; diff --git a/dist/esm/generics/Pagination.js b/dist/esm/generics/Pagination.js new file mode 100644 index 0000000..c54a3b4 --- /dev/null +++ b/dist/esm/generics/Pagination.js @@ -0,0 +1,27 @@ +import clsx from 'clsx'; +import React from 'react'; +export function Pagination(_a) { + var current = _a.current, className = _a.className, _b = _a.labels, labels = _b === void 0 ? { + first: 'First', + prev: 'Prev', + next: 'Next', + last: 'Last' + } : _b, pageSize = _a.pageSize, style = _a.style, total = _a.total, _c = _a.onSelect, onSelect = _c === void 0 ? function () { } : _c; + var pages = Math.ceil(total / pageSize); + var handlePrev = function () { + onSelect(current - 1); + }; + var handleNext = function () { + onSelect(current + 1); + }; + if (!total) + return null; + return (React.createElement("div", { style: style, className: clsx('jpk-pagination', className) }, + React.createElement("button", { className: 'jpk-pagination__nav jpk-pagination__nav__first', disabled: current === 1, onClick: function () { return onSelect(1); } }, labels.first), + React.createElement("button", { className: 'jpk-pagination__nav jpk-pagination__nav__prev', disabled: current === 1, onClick: handlePrev }, labels.prev), + Array.from(Array(pages).keys()).map(function (pageIndex) { return (React.createElement("button", { key: pageIndex, className: clsx('jpk-pagination__item', "jpk-pagination__item__".concat(pageIndex + 1), current === pageIndex + 1 && 'jpk-pagination__item--current'), onClick: function () { return onSelect(pageIndex + 1); } }, pageIndex + 1)); }), + React.createElement("button", { className: 'jpk-pagination__nav jpk-pagination__nav__next', disabled: current === pages, onClick: handleNext }, labels.next), + React.createElement("button", { className: 'jpk-pagination__nav jpk-pagination__nav__last', disabled: current === pages, onClick: function () { return onSelect(pages); } }, labels.last))); +} +export default Pagination; +//# sourceMappingURL=Pagination.js.map \ No newline at end of file diff --git a/dist/esm/generics/Pagination.js.map b/dist/esm/generics/Pagination.js.map new file mode 100644 index 0000000..a656e03 --- /dev/null +++ b/dist/esm/generics/Pagination.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pagination.js","sourceRoot":"","sources":["../../../src/generics/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAkB1B,MAAM,UAAU,UAAU,CAAC,EAanB;QAZN,OAAO,aAAA,EACP,SAAS,eAAA,EACT,cAKC,EALD,MAAM,mBAAG;QACP,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;KACb,KAAA,EACD,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,KAAK,WAAA,EACL,gBAAmB,EAAnB,QAAQ,mBAAG,cAAO,CAAC,KAAA;IAEnB,IAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC;IAE1C,IAAM,UAAU,GAAG;QACjB,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,IAAM,UAAU,GAAG;QACjB,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,OAAO,CACL,6BAAK,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC;QAC7D,gCACE,SAAS,EAAC,gDAAgD,EAC1D,QAAQ,EAAE,OAAO,KAAK,CAAC,EACvB,OAAO,EAAE,cAAM,OAAA,QAAQ,CAAC,CAAC,CAAC,EAAX,CAAW,IAEzB,MAAM,CAAC,KAAK,CACN;QACT,gCACE,SAAS,EAAC,+CAA+C,EACzD,QAAQ,EAAE,OAAO,KAAK,CAAC,EACvB,OAAO,EAAE,UAAU,IAElB,MAAM,CAAC,IAAI,CACL;QAER,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,UAAC,SAAc,IAAK,OAAA,CACvD,gCACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,IAAI,CACb,sBAAsB,EACtB,gCAAyB,SAAS,GAAG,CAAC,CAAE,EACxC,OAAO,KAAK,SAAS,GAAG,CAAC,IAAI,+BAA+B,CAC7D,EACD,OAAO,EAAE,cAAM,OAAA,QAAQ,CAAC,SAAS,GAAG,CAAC,CAAC,EAAvB,CAAuB,IAErC,SAAS,GAAG,CAAC,CACP,CACV,EAZwD,CAYxD,CAAC;QAEF,gCACE,SAAS,EAAC,+CAA+C,EACzD,QAAQ,EAAE,OAAO,KAAK,KAAK,EAC3B,OAAO,EAAE,UAAU,IAElB,MAAM,CAAC,IAAI,CACL;QACT,gCACE,SAAS,EAAC,+CAA+C,EACzD,QAAQ,EAAE,OAAO,KAAK,KAAK,EAC3B,OAAO,EAAE,cAAM,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe,IAE7B,MAAM,CAAC,IAAI,CACL,CACL,CACP,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/Radio.d.ts b/dist/esm/generics/Radio.d.ts new file mode 100644 index 0000000..0a476ce --- /dev/null +++ b/dist/esm/generics/Radio.d.ts @@ -0,0 +1,16 @@ +import React, { CSSProperties } from 'react'; +interface Style extends CSSProperties { + input?: CSSProperties; + label?: CSSProperties; +} +export interface RadioProps extends React.InputHTMLAttributes { + checked?: boolean; + className?: string; + disabled?: boolean; + label?: string; + name?: string; + style?: Style; + value?: string; +} +export declare function Radio({ checked, className, disabled, label, name, style, value, ...restProps }: RadioProps): JSX.Element; +export default Radio; diff --git a/dist/esm/generics/Radio.js b/dist/esm/generics/Radio.js new file mode 100644 index 0000000..af1e267 --- /dev/null +++ b/dist/esm/generics/Radio.js @@ -0,0 +1,33 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +import { omit } from '../utils/mixins'; +export function Radio(_a) { + var _b = _a.checked, checked = _b === void 0 ? false : _b, className = _a.className, _c = _a.disabled, disabled = _c === void 0 ? false : _c, label = _a.label, name = _a.name, style = _a.style, value = _a.value, restProps = __rest(_a, ["checked", "className", "disabled", "label", "name", "style", "value"]); + return (React.createElement("div", { className: clsx('jpk-radio', checked && 'jpk-radio--checked', disabled && 'jpk-radio--disabled', className), style: omit(style, 'input', 'label') }, + React.createElement("input", __assign({}, restProps, { checked: checked, className: 'jpk-radio__input', disabled: disabled, name: name, style: style === null || style === void 0 ? void 0 : style.input, type: 'radio', value: value })), + label && (React.createElement("label", { htmlFor: name, className: 'jpk-radio__label', style: style === null || style === void 0 ? void 0 : style.label }, label)))); +} +export default Radio; +//# sourceMappingURL=Radio.js.map \ No newline at end of file diff --git a/dist/esm/generics/Radio.js.map b/dist/esm/generics/Radio.js.map new file mode 100644 index 0000000..b224c31 --- /dev/null +++ b/dist/esm/generics/Radio.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/generics/Radio.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAkBvC,MAAM,UAAU,KAAK,CAAC,EAST;IARX,IAAA,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA,EACf,SAAS,eAAA,EACT,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,KAAK,WAAA,EACF,SAAS,cARQ,uEASrB,CADa;IAEZ,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,WAAW,EACX,OAAO,IAAI,oBAAoB,EAC/B,QAAQ,IAAI,qBAAqB,EACjC,SAAS,CACV,EACD,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;QAEpC,0CACM,SAAS,IACb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,kBAAkB,EAC5B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EACnB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,IACZ;QACD,KAAK,IAAI,CACR,+BAAO,OAAO,EAAE,IAAI,EAAE,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,IACnE,KAAK,CACA,CACT,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/RangeInput.d.ts b/dist/esm/generics/RangeInput.d.ts new file mode 100644 index 0000000..a12f00f --- /dev/null +++ b/dist/esm/generics/RangeInput.d.ts @@ -0,0 +1,6 @@ +import React from 'react'; +export interface RangeInputProps extends React.InputHTMLAttributes { + className?: string; +} +export declare function RangeInput({ className, ...restProps }: RangeInputProps): JSX.Element; +export default RangeInput; diff --git a/dist/esm/generics/RangeInput.js b/dist/esm/generics/RangeInput.js new file mode 100644 index 0000000..2178fd2 --- /dev/null +++ b/dist/esm/generics/RangeInput.js @@ -0,0 +1,30 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +export function RangeInput(_a) { + var className = _a.className, restProps = __rest(_a, ["className"]); + return (React.createElement("input", __assign({}, restProps, { className: clsx('jpk-range-input', className), type: 'range' }))); +} +export default RangeInput; +//# sourceMappingURL=RangeInput.js.map \ No newline at end of file diff --git a/dist/esm/generics/RangeInput.js.map b/dist/esm/generics/RangeInput.js.map new file mode 100644 index 0000000..10aca5d --- /dev/null +++ b/dist/esm/generics/RangeInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RangeInput.js","sourceRoot":"","sources":["../../../src/generics/RangeInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,UAAU,UAAU,CAAC,EAA4C;IAA1C,IAAA,SAAS,eAAA,EAAK,SAAS,cAAzB,aAA2B,CAAF;IAClD,OAAO,CACL,0CACM,SAAS,IACb,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAC7C,IAAI,EAAC,OAAO,IACZ,CACH,CAAC;AACJ,CAAC;AAED,eAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/SearchInput.d.ts b/dist/esm/generics/SearchInput.d.ts new file mode 100644 index 0000000..d22b9c2 --- /dev/null +++ b/dist/esm/generics/SearchInput.d.ts @@ -0,0 +1,14 @@ +import React, { CSSProperties } from 'react'; +interface Style extends CSSProperties { + input?: CSSProperties; + button?: CSSProperties; +} +export interface SearchInputProps extends React.InputHTMLAttributes { + action?: string; + className?: string; + name?: string; + style?: Style; + onSubmit?: () => void; +} +export declare function SearchInput({ action, className, disabled, name, style, onSubmit, ...restProps }: SearchInputProps): JSX.Element; +export default SearchInput; diff --git a/dist/esm/generics/SearchInput.js b/dist/esm/generics/SearchInput.js new file mode 100644 index 0000000..5da5d54 --- /dev/null +++ b/dist/esm/generics/SearchInput.js @@ -0,0 +1,33 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +import { omit } from '../utils/mixins'; +export function SearchInput(_a) { + var action = _a.action, className = _a.className, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.name, name = _c === void 0 ? 'q' : _c, style = _a.style, onSubmit = _a.onSubmit, restProps = __rest(_a, ["action", "className", "disabled", "name", "style", "onSubmit"]); + return (React.createElement("form", { action: action, className: clsx('jpk-search-input', disabled && 'jpk-search-input--disabled', className), style: omit(style, 'input', 'button') }, + React.createElement("input", __assign({}, restProps, { "aria-label": 'Search', autoComplete: 'off', className: 'jpk-search-input__input', disabled: disabled, name: name, style: style === null || style === void 0 ? void 0 : style.input, type: 'search' })), + React.createElement("button", { className: 'jpk-search-input__btn', type: 'submit', disabled: disabled, style: style === null || style === void 0 ? void 0 : style.button, onClick: onSubmit }, "Search"))); +} +export default SearchInput; +//# sourceMappingURL=SearchInput.js.map \ No newline at end of file diff --git a/dist/esm/generics/SearchInput.js.map b/dist/esm/generics/SearchInput.js.map new file mode 100644 index 0000000..7536d30 --- /dev/null +++ b/dist/esm/generics/SearchInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchInput.js","sourceRoot":"","sources":["../../../src/generics/SearchInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAkBvC,MAAM,UAAU,WAAW,CAAC,EAQT;IAPjB,IAAA,MAAM,YAAA,EACN,SAAS,eAAA,EACT,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,YAAU,EAAV,IAAI,mBAAG,GAAG,KAAA,EACV,KAAK,WAAA,EACL,QAAQ,cAAA,EACL,SAAS,cAPc,gEAQ3B,CADa;IAEZ,OAAO,CACL,8BACE,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,IAAI,CACb,kBAAkB,EAClB,QAAQ,IAAI,4BAA4B,EACxC,SAAS,CACV,EACD,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;QAErC,0CACM,SAAS,kBACF,QAAQ,EACnB,YAAY,EAAC,KAAK,EAClB,SAAS,EAAC,yBAAyB,EACnC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EACnB,IAAI,EAAC,QAAQ,IACb;QACF,gCACE,SAAS,EAAC,uBAAuB,EACjC,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,EACpB,OAAO,EAAE,QAAQ,aAGV,CACJ,CACR,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/Select.d.ts b/dist/esm/generics/Select.d.ts new file mode 100644 index 0000000..525858b --- /dev/null +++ b/dist/esm/generics/Select.d.ts @@ -0,0 +1,17 @@ +import React, { CSSProperties } from 'react'; +interface Style extends CSSProperties { + select?: CSSProperties; + option?: CSSProperties; + label?: CSSProperties; +} +export type Option = { + label: string; + value: string; +}; +export interface SelectProps extends React.SelectHTMLAttributes { + label?: string; + options: Option[]; + style?: Style; +} +export declare function Select({ className, disabled, label, name, options, style, value, ...restProps }: SelectProps): JSX.Element; +export default Select; diff --git a/dist/esm/generics/Select.js b/dist/esm/generics/Select.js new file mode 100644 index 0000000..4ab8721 --- /dev/null +++ b/dist/esm/generics/Select.js @@ -0,0 +1,33 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +import { omit } from '../utils/mixins'; +export function Select(_a) { + var className = _a.className, disabled = _a.disabled, label = _a.label, name = _a.name, _b = _a.options, options = _b === void 0 ? [] : _b, style = _a.style, value = _a.value, restProps = __rest(_a, ["className", "disabled", "label", "name", "options", "style", "value"]); + return (React.createElement("div", { className: clsx('jpk-select', disabled && 'jpk-select--disabled', className), style: omit(style, 'select', 'option', 'label') }, + label && (React.createElement("label", { className: 'jpk-select__label', htmlFor: name, style: style === null || style === void 0 ? void 0 : style.label }, label)), + React.createElement("select", __assign({ className: 'jpk-select__menu', disabled: disabled, name: name, style: style === null || style === void 0 ? void 0 : style.select, value: value }, restProps), options.map(function (opt) { return (React.createElement("option", { className: 'jpk-select__menu__item', key: opt.value, value: opt.value, style: style === null || style === void 0 ? void 0 : style.option }, opt.label)); })))); +} +export default Select; +//# sourceMappingURL=Select.js.map \ No newline at end of file diff --git a/dist/esm/generics/Select.js.map b/dist/esm/generics/Select.js.map new file mode 100644 index 0000000..f0708ec --- /dev/null +++ b/dist/esm/generics/Select.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/generics/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAiBvC,MAAM,UAAU,MAAM,CAAC,EAST;IARZ,IAAA,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,eAAY,EAAZ,OAAO,mBAAG,EAAE,KAAA,EACZ,KAAK,WAAA,EACL,KAAK,WAAA,EACF,SAAS,cARS,uEAStB,CADa;IAEZ,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,YAAY,EACZ,QAAQ,IAAI,sBAAsB,EAClC,SAAS,CACV,EACD,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC;QAE9C,KAAK,IAAI,CACR,+BACE,SAAS,EAAC,mBAAmB,EAC7B,OAAO,EAAE,IAAI,EACb,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,IAElB,KAAK,CACA,CACT;QACD,yCACE,SAAS,EAAC,kBAAkB,EAC5B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,EACpB,KAAK,EAAE,KAAK,IACR,SAAS,GAEZ,OAAO,CAAC,GAAG,CAAC,UAAC,GAAW,IAAK,OAAA,CAC5B,gCACE,SAAS,EAAC,wBAAwB,EAClC,GAAG,EAAE,GAAG,CAAC,KAAK,EACd,KAAK,EAAE,GAAG,CAAC,KAAK,EAChB,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,IAEnB,GAAG,CAAC,KAAK,CACH,CACV,EAT6B,CAS7B,CAAC,CACK,CACL,CACP,CAAC;AACJ,CAAC;AAED,eAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/Table.d.ts b/dist/esm/generics/Table.d.ts new file mode 100644 index 0000000..86c56e7 --- /dev/null +++ b/dist/esm/generics/Table.d.ts @@ -0,0 +1,25 @@ +import React from 'react'; +import { BlockVariant } from '../layout/Block'; +export declare const TableHeader: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +export declare const TableRow: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +export declare const TableColHead: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +export declare const TableBody: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +export declare const TableCell: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +export declare const TableFooter: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +type Column = { + label: string; +}; +type Row = { + value: string; + wrapper?: BlockVariant; +}; +type Rows = Row[]; +export interface TableProps extends React.HTMLAttributes { + children?: React.ReactNode; + data?: null | { + columns: Column[]; + rows: Rows[]; + }; +} +export declare const Table: ({ children, data, className, ...restProps }: TableProps) => JSX.Element; +export default Table; diff --git a/dist/esm/generics/Table.js b/dist/esm/generics/Table.js new file mode 100644 index 0000000..bd199d2 --- /dev/null +++ b/dist/esm/generics/Table.js @@ -0,0 +1,68 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +// @todo: improve props to be exact +export var TableHeader = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (React.createElement("thead", __assign({}, restProps, { className: clsx('jpk-table__header', className) }), children)); +}; +export var TableRow = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (React.createElement("tr", __assign({}, restProps, { className: clsx('jpk-table__row', className) }), children)); +}; +export var TableColHead = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (React.createElement("th", __assign({}, restProps, { className: clsx('jpk-table__col-head', className) }), children)); +}; +export var TableBody = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (React.createElement("tbody", __assign({}, restProps, { className: clsx('jpk-table__body', className) }), children)); +}; +export var TableCell = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (React.createElement("td", __assign({}, restProps, { className: clsx('jpk-table__cell', className) }), children)); +}; +export var TableFooter = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (React.createElement("tfoot", __assign({}, restProps, { className: clsx('jpk-table__footer', className) }), children)); +}; +var TableCellWrapper = function (_a) { + var as = _a.as, children = _a.children; + return React.createElement(as, null, children); +}; +export var Table = function (_a) { + var children = _a.children, _b = _a.data, data = _b === void 0 ? null : _b, className = _a.className, restProps = __rest(_a, ["children", "data", "className"]); + return (React.createElement("table", __assign({}, restProps, { className: clsx('jpk-table', className) }), data ? (React.createElement(React.Fragment, null, + React.createElement(TableHeader, null, + React.createElement(TableRow, null, data.columns.map(function (_a) { + var label = _a.label; + return (React.createElement(TableColHead, { key: label }, label)); + }))), + React.createElement(TableBody, null, data.rows.map(function (row, index) { return (React.createElement(TableRow, { key: index }, row.map(function (_a) { + var value = _a.value, wrapper = _a.wrapper; + return (React.createElement(TableCell, { key: value }, wrapper ? (React.createElement(TableCellWrapper, { as: wrapper }, value)) : (value))); + }))); })))) : (React.createElement(React.Fragment, null, children)))); +}; +export default Table; +//# sourceMappingURL=Table.js.map \ No newline at end of file diff --git a/dist/esm/generics/Table.js.map b/dist/esm/generics/Table.js.map new file mode 100644 index 0000000..1adf4d5 --- /dev/null +++ b/dist/esm/generics/Table.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/generics/Table.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,mCAAmC;AAEnC,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,EAIA;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHc,yBAI3B,CADa;IACmB,OAAA,CAC/B,0CAAW,SAAS,IAAE,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,KAClE,QAAQ,CACH,CACT,CAAA;CAAA,CAAC;AAEF,MAAM,CAAC,IAAM,QAAQ,GAAG,UAAC,EAIG;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHW,yBAIxB,CADa;IACmB,OAAA,CAC/B,uCAAQ,SAAS,IAAE,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAC5D,QAAQ,CACN,CACN,CAAA;CAAA,CAAC;AAEF,MAAM,CAAC,IAAM,YAAY,GAAG,UAAC,EAID;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHe,yBAI5B,CADa;IACmB,OAAA,CAC/B,uCAAQ,SAAS,IAAE,SAAS,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,KACjE,QAAQ,CACN,CACN,CAAA;CAAA,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,EAIE;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHY,yBAIzB,CADa;IACmB,OAAA,CAC/B,0CAAW,SAAS,IAAE,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,KAChE,QAAQ,CACH,CACT,CAAA;CAAA,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,EAIE;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHY,yBAIzB,CADa;IACmB,OAAA,CAC/B,uCAAQ,SAAS,IAAE,SAAS,EAAE,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,KAC7D,QAAQ,CACN,CACN,CAAA;CAAA,CAAC;AAEF,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,EAIA;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHc,yBAI3B,CADa;IACmB,OAAA,CAC/B,0CAAW,SAAS,IAAE,SAAS,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,KAClE,QAAQ,CACH,CACT,CAAA;CAAA,CAAC;AAEF,IAAM,gBAAgB,GAAG,UAAC,EAAqB;QAAnB,EAAE,QAAA,EAAE,QAAQ,cAAA;IACtC,OAAA,KAAK,CAAC,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC;AAAvC,CAAuC,CAAC;AAY1C,MAAM,CAAC,IAAM,KAAK,GAAG,UAAC,EAKT;IAJX,IAAA,QAAQ,cAAA,EACR,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA,EACX,SAAS,eAAA,EACN,SAAS,cAJQ,iCAKrB,CADa;IACI,OAAA,CAChB,0CAAW,SAAS,IAAE,SAAS,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,KAC1D,IAAI,CAAC,CAAC,CAAC,CACN;QACE,oBAAC,WAAW;YACV,oBAAC,QAAQ,QACN,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAC,EAAiB;oBAAf,KAAK,WAAA;gBAAe,OAAA,CACvC,oBAAC,YAAY,IAAC,GAAG,EAAE,KAAK,IAAG,KAAK,CAAgB,CACjD;YAFwC,CAExC,CAAC,CACO,CACC;QACd,oBAAC,SAAS,QACP,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,GAAU,EAAE,KAAa,IAAK,OAAA,CAC5C,oBAAC,QAAQ,IAAC,GAAG,EAAE,KAAK,IACjB,GAAG,CAAC,GAAG,CAAC,UAAC,EAAuB;gBAArB,KAAK,WAAA,EAAE,OAAO,aAAA;YAAY,OAAA,CACpC,oBAAC,SAAS,IAAC,GAAG,EAAE,KAAK,IAClB,OAAO,CAAC,CAAC,CAAC,CACT,oBAAC,gBAAgB,IAAC,EAAE,EAAE,OAAO,IAAG,KAAK,CAAoB,CAC1D,CAAC,CAAC,CAAC,CACF,KAAK,CACN,CACS,CACb;QARqC,CAQrC,CAAC,CACO,CACZ,EAZ6C,CAY7C,CAAC,CACQ,CACX,CACJ,CAAC,CAAC,CAAC,CACF,0CAAG,QAAQ,CAAI,CAChB,CACK,CACT,CAAA;CAAA,CAAC;AAEF,eAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/Tabs.d.ts b/dist/esm/generics/Tabs.d.ts new file mode 100644 index 0000000..5ba3202 --- /dev/null +++ b/dist/esm/generics/Tabs.d.ts @@ -0,0 +1,7 @@ +import React from 'react'; +export declare const Tab: ({ title, selectedTab, onClick }: any) => JSX.Element; +export type TabsProps = { + children: React.ReactNode | any; +}; +export declare const Tabs: ({ children }: TabsProps) => JSX.Element; +export default Tabs; diff --git a/dist/esm/generics/Tabs.js b/dist/esm/generics/Tabs.js new file mode 100644 index 0000000..b3b32bc --- /dev/null +++ b/dist/esm/generics/Tabs.js @@ -0,0 +1,32 @@ +import clsx from 'clsx'; +import React, { useEffect, useState } from 'react'; +// @todo: improve type definitions +export var Tab = function (_a) { + var title = _a.title, selectedTab = _a.selectedTab, onClick = _a.onClick; + var selectTabHandler = function () { + onClick(title); + }; + return (React.createElement("li", { className: clsx('jpk-tab__summary', selectedTab === title && 'jpk-tab--active'), onClick: selectTabHandler }, title)); +}; +export var Tabs = function (_a) { + var children = _a.children; + var _b = useState(null), selectedTab = _b[0], setSelectedTab = _b[1]; + useEffect(function () { + setSelectedTab(children[0].props.title); + }, [children]); + var onClickTabItem = function (tabtitle) { + setSelectedTab(tabtitle); + }; + return (React.createElement("div", { className: 'jpk-tabs' }, + React.createElement("ol", { className: 'jpk-tab__header' }, children.map(function (child) { + var title = child.props.title; + return (React.createElement(Tab, { selectedTab: selectedTab, key: title, title: title, onClick: onClickTabItem })); + })), + React.createElement("div", { className: 'jpk-tab__content' }, children.map(function (child) { + if (child.props.title !== selectedTab) + return undefined; + return child.props.children; + })))); +}; +export default Tabs; +//# sourceMappingURL=Tabs.js.map \ No newline at end of file diff --git a/dist/esm/generics/Tabs.js.map b/dist/esm/generics/Tabs.js.map new file mode 100644 index 0000000..c1abfaa --- /dev/null +++ b/dist/esm/generics/Tabs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/generics/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,kCAAkC;AAElC,MAAM,CAAC,IAAM,GAAG,GAAG,UAAC,EAAoC;QAAlC,KAAK,WAAA,EAAE,WAAW,iBAAA,EAAE,OAAO,aAAA;IAC/C,IAAM,gBAAgB,GAAG;QACvB,OAAO,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,OAAO,CACL,4BACE,SAAS,EAAE,IAAI,CACb,kBAAkB,EAClB,WAAW,KAAK,KAAK,IAAI,iBAAiB,CAC3C,EACD,OAAO,EAAE,gBAAgB,IAExB,KAAK,CACH,CACN,CAAC;AACJ,CAAC,CAAC;AAMF,MAAM,CAAC,IAAM,IAAI,GAAG,UAAC,EAAuB;QAArB,QAAQ,cAAA;IACvB,IAAA,KAAgC,QAAQ,CAAC,IAAI,CAAC,EAA7C,WAAW,QAAA,EAAE,cAAc,QAAkB,CAAC;IAErD,SAAS,CAAC;QACR,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,IAAM,cAAc,GAAG,UAAC,QAAa;QACnC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,6BAAK,SAAS,EAAC,UAAU;QACvB,4BAAI,SAAS,EAAC,iBAAiB,IAC5B,QAAQ,CAAC,GAAG,CAAC,UAAC,KAAU;YACf,IAAA,KAAK,GAAK,KAAK,CAAC,KAAK,MAAhB,CAAiB;YAE9B,OAAO,CACL,oBAAC,GAAG,IACF,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,KAAK,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,cAAc,GACvB,CACH,CAAC;QACJ,CAAC,CAAC,CACC;QACL,6BAAK,SAAS,EAAC,kBAAkB,IAC9B,QAAQ,CAAC,GAAG,CAAC,UAAC,KAAU;YACvB,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,WAAW;gBAAE,OAAO,SAAS,CAAC;YACxD,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC9B,CAAC,CAAC,CACE,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/Text.d.ts b/dist/esm/generics/Text.d.ts new file mode 100644 index 0000000..f9f471f --- /dev/null +++ b/dist/esm/generics/Text.d.ts @@ -0,0 +1,267 @@ +import React from 'react'; +export type TextVariant = 'b' | 'big' | 'del' | 'div' | 'em' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'i' | 'ins' | 'mark' | 'p' | 'span' | 'sub' | 'sup' | 'small' | 'strong' | 'u'; +export interface TextProps extends React.HTMLAttributes { + children: React.ReactNode; + as?: TextVariant; +} +export declare function Text({ children, as, className, ...restProps }: TextProps): React.DetailedReactHTMLElement<{ + className: string; + defaultChecked?: boolean | undefined; + defaultValue?: string | number | readonly string[] | undefined; + suppressContentEditableWarning?: boolean | undefined; + suppressHydrationWarning?: boolean | undefined; + accessKey?: string | undefined; + contentEditable?: (boolean | "true" | "false") | "inherit" | undefined; + contextMenu?: string | undefined; + dir?: string | undefined; + draggable?: (boolean | "true" | "false") | undefined; + hidden?: boolean | undefined; + id?: string | undefined; + lang?: string | undefined; + nonce?: string | undefined; + placeholder?: string | undefined; + slot?: string | undefined; + spellCheck?: (boolean | "true" | "false") | undefined; + style?: React.CSSProperties | undefined; + tabIndex?: number | undefined; + title?: string | undefined; + translate?: "yes" | "no" | undefined; + radioGroup?: string | undefined; + role?: React.AriaRole | undefined; + about?: string | undefined; + datatype?: string | undefined; + inlist?: any; + prefix?: string | undefined; + property?: string | undefined; + resource?: string | undefined; + typeof?: string | undefined; + vocab?: string | undefined; + autoCapitalize?: string | undefined; + autoCorrect?: string | undefined; + autoSave?: string | undefined; + color?: string | undefined; + itemProp?: string | undefined; + itemScope?: boolean | undefined; + itemType?: string | undefined; + itemID?: string | undefined; + itemRef?: string | undefined; + results?: number | undefined; + security?: string | undefined; + unselectable?: "on" | "off" | undefined; + inputMode?: "url" | "search" | "text" | "none" | "tel" | "email" | "numeric" | "decimal" | undefined; + is?: string | undefined; + 'aria-activedescendant'?: string | undefined; + 'aria-atomic'?: (boolean | "true" | "false") | undefined; + 'aria-autocomplete'?: "list" | "none" | "both" | "inline" | undefined; + 'aria-busy'?: (boolean | "true" | "false") | undefined; + 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-colcount'?: number | undefined; + 'aria-colindex'?: number | undefined; + 'aria-colspan'?: number | undefined; + 'aria-controls'?: string | undefined; + 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "date" | "location" | undefined; + 'aria-describedby'?: string | undefined; + 'aria-details'?: string | undefined; + 'aria-disabled'?: (boolean | "true" | "false") | undefined; + 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined; + 'aria-errormessage'?: string | undefined; + 'aria-expanded'?: (boolean | "true" | "false") | undefined; + 'aria-flowto'?: string | undefined; + 'aria-grabbed'?: (boolean | "true" | "false") | undefined; + 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined; + 'aria-hidden'?: (boolean | "true" | "false") | undefined; + 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined; + 'aria-keyshortcuts'?: string | undefined; + 'aria-label'?: string | undefined; + 'aria-labelledby'?: string | undefined; + 'aria-level'?: number | undefined; + 'aria-live'?: "off" | "assertive" | "polite" | undefined; + 'aria-modal'?: (boolean | "true" | "false") | undefined; + 'aria-multiline'?: (boolean | "true" | "false") | undefined; + 'aria-multiselectable'?: (boolean | "true" | "false") | undefined; + 'aria-orientation'?: "horizontal" | "vertical" | undefined; + 'aria-owns'?: string | undefined; + 'aria-placeholder'?: string | undefined; + 'aria-posinset'?: number | undefined; + 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-readonly'?: (boolean | "true" | "false") | undefined; + 'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined; + 'aria-required'?: (boolean | "true" | "false") | undefined; + 'aria-roledescription'?: string | undefined; + 'aria-rowcount'?: number | undefined; + 'aria-rowindex'?: number | undefined; + 'aria-rowspan'?: number | undefined; + 'aria-selected'?: (boolean | "true" | "false") | undefined; + 'aria-setsize'?: number | undefined; + 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined; + 'aria-valuemax'?: number | undefined; + 'aria-valuemin'?: number | undefined; + 'aria-valuenow'?: number | undefined; + 'aria-valuetext'?: string | undefined; + dangerouslySetInnerHTML?: { + __html: string; + } | undefined; + onCopy?: React.ClipboardEventHandler | undefined; + onCopyCapture?: React.ClipboardEventHandler | undefined; + onCut?: React.ClipboardEventHandler | undefined; + onCutCapture?: React.ClipboardEventHandler | undefined; + onPaste?: React.ClipboardEventHandler | undefined; + onPasteCapture?: React.ClipboardEventHandler | undefined; + onCompositionEnd?: React.CompositionEventHandler | undefined; + onCompositionEndCapture?: React.CompositionEventHandler | undefined; + onCompositionStart?: React.CompositionEventHandler | undefined; + onCompositionStartCapture?: React.CompositionEventHandler | undefined; + onCompositionUpdate?: React.CompositionEventHandler | undefined; + onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; + onFocus?: React.FocusEventHandler | undefined; + onFocusCapture?: React.FocusEventHandler | undefined; + onBlur?: React.FocusEventHandler | undefined; + onBlurCapture?: React.FocusEventHandler | undefined; + onChange?: React.FormEventHandler | undefined; + onChangeCapture?: React.FormEventHandler | undefined; + onBeforeInput?: React.FormEventHandler | undefined; + onBeforeInputCapture?: React.FormEventHandler | undefined; + onInput?: React.FormEventHandler | undefined; + onInputCapture?: React.FormEventHandler | undefined; + onReset?: React.FormEventHandler | undefined; + onResetCapture?: React.FormEventHandler | undefined; + onSubmit?: React.FormEventHandler | undefined; + onSubmitCapture?: React.FormEventHandler | undefined; + onInvalid?: React.FormEventHandler | undefined; + onInvalidCapture?: React.FormEventHandler | undefined; + onLoad?: React.ReactEventHandler | undefined; + onLoadCapture?: React.ReactEventHandler | undefined; + onError?: React.ReactEventHandler | undefined; + onErrorCapture?: React.ReactEventHandler | undefined; + onKeyDown?: React.KeyboardEventHandler | undefined; + onKeyDownCapture?: React.KeyboardEventHandler | undefined; + onKeyPress?: React.KeyboardEventHandler | undefined; + onKeyPressCapture?: React.KeyboardEventHandler | undefined; + onKeyUp?: React.KeyboardEventHandler | undefined; + onKeyUpCapture?: React.KeyboardEventHandler | undefined; + onAbort?: React.ReactEventHandler | undefined; + onAbortCapture?: React.ReactEventHandler | undefined; + onCanPlay?: React.ReactEventHandler | undefined; + onCanPlayCapture?: React.ReactEventHandler | undefined; + onCanPlayThrough?: React.ReactEventHandler | undefined; + onCanPlayThroughCapture?: React.ReactEventHandler | undefined; + onDurationChange?: React.ReactEventHandler | undefined; + onDurationChangeCapture?: React.ReactEventHandler | undefined; + onEmptied?: React.ReactEventHandler | undefined; + onEmptiedCapture?: React.ReactEventHandler | undefined; + onEncrypted?: React.ReactEventHandler | undefined; + onEncryptedCapture?: React.ReactEventHandler | undefined; + onEnded?: React.ReactEventHandler | undefined; + onEndedCapture?: React.ReactEventHandler | undefined; + onLoadedData?: React.ReactEventHandler | undefined; + onLoadedDataCapture?: React.ReactEventHandler | undefined; + onLoadedMetadata?: React.ReactEventHandler | undefined; + onLoadedMetadataCapture?: React.ReactEventHandler | undefined; + onLoadStart?: React.ReactEventHandler | undefined; + onLoadStartCapture?: React.ReactEventHandler | undefined; + onPause?: React.ReactEventHandler | undefined; + onPauseCapture?: React.ReactEventHandler | undefined; + onPlay?: React.ReactEventHandler | undefined; + onPlayCapture?: React.ReactEventHandler | undefined; + onPlaying?: React.ReactEventHandler | undefined; + onPlayingCapture?: React.ReactEventHandler | undefined; + onProgress?: React.ReactEventHandler | undefined; + onProgressCapture?: React.ReactEventHandler | undefined; + onRateChange?: React.ReactEventHandler | undefined; + onRateChangeCapture?: React.ReactEventHandler | undefined; + onResize?: React.ReactEventHandler | undefined; + onResizeCapture?: React.ReactEventHandler | undefined; + onSeeked?: React.ReactEventHandler | undefined; + onSeekedCapture?: React.ReactEventHandler | undefined; + onSeeking?: React.ReactEventHandler | undefined; + onSeekingCapture?: React.ReactEventHandler | undefined; + onStalled?: React.ReactEventHandler | undefined; + onStalledCapture?: React.ReactEventHandler | undefined; + onSuspend?: React.ReactEventHandler | undefined; + onSuspendCapture?: React.ReactEventHandler | undefined; + onTimeUpdate?: React.ReactEventHandler | undefined; + onTimeUpdateCapture?: React.ReactEventHandler | undefined; + onVolumeChange?: React.ReactEventHandler | undefined; + onVolumeChangeCapture?: React.ReactEventHandler | undefined; + onWaiting?: React.ReactEventHandler | undefined; + onWaitingCapture?: React.ReactEventHandler | undefined; + onAuxClick?: React.MouseEventHandler | undefined; + onAuxClickCapture?: React.MouseEventHandler | undefined; + onClick?: React.MouseEventHandler | undefined; + onClickCapture?: React.MouseEventHandler | undefined; + onContextMenu?: React.MouseEventHandler | undefined; + onContextMenuCapture?: React.MouseEventHandler | undefined; + onDoubleClick?: React.MouseEventHandler | undefined; + onDoubleClickCapture?: React.MouseEventHandler | undefined; + onDrag?: React.DragEventHandler | undefined; + onDragCapture?: React.DragEventHandler | undefined; + onDragEnd?: React.DragEventHandler | undefined; + onDragEndCapture?: React.DragEventHandler | undefined; + onDragEnter?: React.DragEventHandler | undefined; + onDragEnterCapture?: React.DragEventHandler | undefined; + onDragExit?: React.DragEventHandler | undefined; + onDragExitCapture?: React.DragEventHandler | undefined; + onDragLeave?: React.DragEventHandler | undefined; + onDragLeaveCapture?: React.DragEventHandler | undefined; + onDragOver?: React.DragEventHandler | undefined; + onDragOverCapture?: React.DragEventHandler | undefined; + onDragStart?: React.DragEventHandler | undefined; + onDragStartCapture?: React.DragEventHandler | undefined; + onDrop?: React.DragEventHandler | undefined; + onDropCapture?: React.DragEventHandler | undefined; + onMouseDown?: React.MouseEventHandler | undefined; + onMouseDownCapture?: React.MouseEventHandler | undefined; + onMouseEnter?: React.MouseEventHandler | undefined; + onMouseLeave?: React.MouseEventHandler | undefined; + onMouseMove?: React.MouseEventHandler | undefined; + onMouseMoveCapture?: React.MouseEventHandler | undefined; + onMouseOut?: React.MouseEventHandler | undefined; + onMouseOutCapture?: React.MouseEventHandler | undefined; + onMouseOver?: React.MouseEventHandler | undefined; + onMouseOverCapture?: React.MouseEventHandler | undefined; + onMouseUp?: React.MouseEventHandler | undefined; + onMouseUpCapture?: React.MouseEventHandler | undefined; + onSelect?: React.ReactEventHandler | undefined; + onSelectCapture?: React.ReactEventHandler | undefined; + onTouchCancel?: React.TouchEventHandler | undefined; + onTouchCancelCapture?: React.TouchEventHandler | undefined; + onTouchEnd?: React.TouchEventHandler | undefined; + onTouchEndCapture?: React.TouchEventHandler | undefined; + onTouchMove?: React.TouchEventHandler | undefined; + onTouchMoveCapture?: React.TouchEventHandler | undefined; + onTouchStart?: React.TouchEventHandler | undefined; + onTouchStartCapture?: React.TouchEventHandler | undefined; + onPointerDown?: React.PointerEventHandler | undefined; + onPointerDownCapture?: React.PointerEventHandler | undefined; + onPointerMove?: React.PointerEventHandler | undefined; + onPointerMoveCapture?: React.PointerEventHandler | undefined; + onPointerUp?: React.PointerEventHandler | undefined; + onPointerUpCapture?: React.PointerEventHandler | undefined; + onPointerCancel?: React.PointerEventHandler | undefined; + onPointerCancelCapture?: React.PointerEventHandler | undefined; + onPointerEnter?: React.PointerEventHandler | undefined; + onPointerEnterCapture?: React.PointerEventHandler | undefined; + onPointerLeave?: React.PointerEventHandler | undefined; + onPointerLeaveCapture?: React.PointerEventHandler | undefined; + onPointerOver?: React.PointerEventHandler | undefined; + onPointerOverCapture?: React.PointerEventHandler | undefined; + onPointerOut?: React.PointerEventHandler | undefined; + onPointerOutCapture?: React.PointerEventHandler | undefined; + onGotPointerCapture?: React.PointerEventHandler | undefined; + onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; + onLostPointerCapture?: React.PointerEventHandler | undefined; + onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; + onScroll?: React.UIEventHandler | undefined; + onScrollCapture?: React.UIEventHandler | undefined; + onWheel?: React.WheelEventHandler | undefined; + onWheelCapture?: React.WheelEventHandler | undefined; + onAnimationStart?: React.AnimationEventHandler | undefined; + onAnimationStartCapture?: React.AnimationEventHandler | undefined; + onAnimationEnd?: React.AnimationEventHandler | undefined; + onAnimationEndCapture?: React.AnimationEventHandler | undefined; + onAnimationIteration?: React.AnimationEventHandler | undefined; + onAnimationIterationCapture?: React.AnimationEventHandler | undefined; + onTransitionEnd?: React.TransitionEventHandler | undefined; + onTransitionEndCapture?: React.TransitionEventHandler | undefined; +}, HTMLElement>; +export default Text; diff --git a/dist/esm/generics/Text.js b/dist/esm/generics/Text.js new file mode 100644 index 0000000..cc61270 --- /dev/null +++ b/dist/esm/generics/Text.js @@ -0,0 +1,30 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +export function Text(_a) { + var children = _a.children, _b = _a.as, as = _b === void 0 ? 'p' : _b, className = _a.className, restProps = __rest(_a, ["children", "as", "className"]); + return React.createElement(as, __assign(__assign({}, restProps), { className: clsx('jpk-typography', "jpk-typography__".concat(as), className) }), children); +} +export default Text; +//# sourceMappingURL=Text.js.map \ No newline at end of file diff --git a/dist/esm/generics/Text.js.map b/dist/esm/generics/Text.js.map new file mode 100644 index 0000000..a7170b9 --- /dev/null +++ b/dist/esm/generics/Text.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/generics/Text.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AA8B1B,MAAM,UAAU,IAAI,CAAC,EAKT;IAJV,IAAA,QAAQ,cAAA,EACR,UAAQ,EAAR,EAAE,mBAAG,GAAG,KAAA,EACR,SAAS,eAAA,EACN,SAAS,cAJO,+BAKpB,CADa;IAEZ,OAAO,KAAK,CAAC,aAAa,CACxB,EAAE,wBAEG,SAAS,KACZ,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,0BAAmB,EAAE,CAAE,EAAE,SAAS,CAAC,KAEvE,QAAQ,CACT,CAAC;AACJ,CAAC;AAED,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/TextInput.d.ts b/dist/esm/generics/TextInput.d.ts new file mode 100644 index 0000000..aead406 --- /dev/null +++ b/dist/esm/generics/TextInput.d.ts @@ -0,0 +1,17 @@ +import React, { CSSProperties } from 'react'; +interface Style extends CSSProperties { + input?: CSSProperties; + label?: CSSProperties; +} +export type InputTypes = 'color' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'tel' | 'text' | 'time' | 'url' | 'week'; +export interface TextInputProps extends React.InputHTMLAttributes { + className?: string; + disabled?: boolean; + label?: string; + name?: string; + style?: Style; + type?: InputTypes; + value?: string; +} +export declare function TextInput({ className, disabled, label, name, style, type, value, ...restProps }: TextInputProps): JSX.Element; +export default TextInput; diff --git a/dist/esm/generics/TextInput.js b/dist/esm/generics/TextInput.js new file mode 100644 index 0000000..3b0abf4 --- /dev/null +++ b/dist/esm/generics/TextInput.js @@ -0,0 +1,33 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import clsx from 'clsx'; +import React from 'react'; +import { omit } from '../utils/mixins'; +export function TextInput(_a) { + var className = _a.className, _b = _a.disabled, disabled = _b === void 0 ? false : _b, label = _a.label, name = _a.name, style = _a.style, _c = _a.type, type = _c === void 0 ? 'text' : _c, value = _a.value, restProps = __rest(_a, ["className", "disabled", "label", "name", "style", "type", "value"]); + return (React.createElement("div", { className: clsx('jpk-text-input', disabled && 'jpk-text-input--disabled', className), style: omit(style, 'input', 'label') }, + label && (React.createElement("label", { htmlFor: name, className: 'jpk-text-input__label', style: style === null || style === void 0 ? void 0 : style.label }, label)), + React.createElement("input", __assign({}, restProps, { className: 'jpk-text-input__input', disabled: disabled, name: name, style: style === null || style === void 0 ? void 0 : style.input, type: type, value: value })))); +} +export default TextInput; +//# sourceMappingURL=TextInput.js.map \ No newline at end of file diff --git a/dist/esm/generics/TextInput.js.map b/dist/esm/generics/TextInput.js.map new file mode 100644 index 0000000..98e092f --- /dev/null +++ b/dist/esm/generics/TextInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/generics/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAgCvC,MAAM,UAAU,SAAS,CAAC,EAST;IARf,IAAA,SAAS,eAAA,EACT,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,YAAa,EAAb,IAAI,mBAAG,MAAM,KAAA,EACb,KAAK,WAAA,EACF,SAAS,cARY,oEASzB,CADa;IAEZ,OAAO,CACL,6BACE,SAAS,EAAE,IAAI,CACb,gBAAgB,EAChB,QAAQ,IAAI,0BAA0B,EACtC,SAAS,CACV,EACD,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;QAEnC,KAAK,IAAI,CACR,+BACE,OAAO,EAAE,IAAI,EACb,SAAS,EAAC,uBAAuB,EACjC,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,IAElB,KAAK,CACA,CACT;QACD,0CACM,SAAS,IACb,SAAS,EAAC,uBAAuB,EACjC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EACnB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,IACZ,CACE,CACP,CAAC;AACJ,CAAC;AAED,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/esm/generics/index.d.ts b/dist/esm/generics/index.d.ts new file mode 100644 index 0000000..fe32263 --- /dev/null +++ b/dist/esm/generics/index.d.ts @@ -0,0 +1,15 @@ +export * from './Accordion'; +export * from './Alert'; +export * from './Button'; +export * from './Checkbox'; +export * from './FileInput'; +export * from './List'; +export * from './Pagination'; +export * from './Radio'; +export * from './RangeInput'; +export * from './SearchInput'; +export * from './Select'; +export * from './Table'; +export * from './Tabs'; +export * from './Text'; +export * from './TextInput'; diff --git a/dist/esm/generics/index.js b/dist/esm/generics/index.js new file mode 100644 index 0000000..f0148fb --- /dev/null +++ b/dist/esm/generics/index.js @@ -0,0 +1,16 @@ +export * from './Accordion'; +export * from './Alert'; +export * from './Button'; +export * from './Checkbox'; +export * from './FileInput'; +export * from './List'; +export * from './Pagination'; +export * from './Radio'; +export * from './RangeInput'; +export * from './SearchInput'; +export * from './Select'; +export * from './Table'; +export * from './Tabs'; +export * from './Text'; +export * from './TextInput'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/generics/index.js.map b/dist/esm/generics/index.js.map new file mode 100644 index 0000000..2ad08f5 --- /dev/null +++ b/dist/esm/generics/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generics/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"} \ No newline at end of file diff --git a/dist/esm/http.d.ts b/dist/esm/http.d.ts new file mode 100644 index 0000000..05aa0d2 --- /dev/null +++ b/dist/esm/http.d.ts @@ -0,0 +1,12 @@ +import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'; +export declare const init: (apiBaseUrl: string, reqInterceptor?: (req: AxiosRequestConfig) => AxiosRequestConfig, respInterceptor?: (res: AxiosResponse) => AxiosResponse, errInterceptor?: (error: AxiosError) => Promise) => void; +export declare const setAuthHeader: (token: string) => void; +export declare const resetAuthHeader: () => void; +export declare const create: (config?: import("axios").CreateAxiosDefaults | undefined) => import("axios").AxiosInstance; +export declare const all: (iterable: any) => Promise; +export declare const request: import("axios").AxiosStatic; +export declare const get: , D = any>(url: string, config?: AxiosRequestConfig | undefined) => Promise; +export declare const post: , D = any>(url: string, data?: D | undefined, config?: AxiosRequestConfig | undefined) => Promise; +export declare const put: , D = any>(url: string, data?: D | undefined, config?: AxiosRequestConfig | undefined) => Promise; +export declare const patch: , D = any>(url: string, data?: D | undefined, config?: AxiosRequestConfig | undefined) => Promise; +export declare const del: , D = any>(url: string, config?: AxiosRequestConfig | undefined) => Promise; diff --git a/dist/esm/http.js b/dist/esm/http.js new file mode 100644 index 0000000..e554d96 --- /dev/null +++ b/dist/esm/http.js @@ -0,0 +1,45 @@ +import axios from 'axios'; +var requestInterceptor = function (req) { + // @todo: retrive `accessToken` from where it's stored and set it here + // @ts-ignore + req.headers.Authorization = "Bearer accessToken"; + return req; +}; +var responseInterceptor = function (res) { + return res.data; +}; +var errorInterceptor = function (error) { + return Promise.reject(error); +}; +export var init = function (apiBaseUrl, reqInterceptor, respInterceptor, errInterceptor) { + if (reqInterceptor === void 0) { reqInterceptor = requestInterceptor; } + if (respInterceptor === void 0) { respInterceptor = responseInterceptor; } + if (errInterceptor === void 0) { errInterceptor = errorInterceptor; } + axios.defaults.baseURL = apiBaseUrl; + axios.interceptors.request.use(reqInterceptor, errInterceptor); + axios.interceptors.response.use(respInterceptor, errInterceptor); +}; +export var setAuthHeader = function (token) { + axios.defaults.headers.Authorization = "Bearer ".concat(token); +}; +export var resetAuthHeader = function () { + // @ts-ignore + axios.defaults.headers.Authorization = undefined; +}; +export var create = axios.create; +export var all = function (iterable) { + return axios.all(iterable).then(axios.spread(function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return args; + })); +}; +export var request = axios; +export var get = axios.get; +export var post = axios.post; +export var put = axios.put; +export var patch = axios.patch; +export var del = axios["delete"]; +//# sourceMappingURL=http.js.map \ No newline at end of file diff --git a/dist/esm/http.js.map b/dist/esm/http.js.map new file mode 100644 index 0000000..c52feec --- /dev/null +++ b/dist/esm/http.js.map @@ -0,0 +1 @@ +{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAE7E,IAAM,kBAAkB,GAAG,UAAC,GAAuB;IACjD,sEAAsE;IACtE,aAAa;IACb,GAAG,CAAC,OAAO,CAAC,aAAa,GAAG,oBAAoB,CAAC;IACjD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,IAAM,mBAAmB,GAAG,UAAC,GAAkB;IAC7C,OAAO,GAAG,CAAC,IAAI,CAAC;AAClB,CAAC,CAAC;AAEF,IAAM,gBAAgB,GAAG,UAAC,KAAiB;IACzC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,IAAI,GAAG,UAClB,UAAkB,EAClB,cAAmC,EACnC,eAAqC,EACrC,cAAiC;IAFjC,+BAAA,EAAA,mCAAmC;IACnC,gCAAA,EAAA,qCAAqC;IACrC,+BAAA,EAAA,iCAAiC;IAEjC,KAAK,CAAC,QAAQ,CAAC,OAAO,GAAG,UAAU,CAAC;IACpC,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAC/D,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;AACnE,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,aAAa,GAAG,UAAC,KAAa;IACzC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,iBAAU,KAAK,CAAE,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,eAAe,GAAG;IAC7B,aAAa;IACb,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;AACnD,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;AAEnC,MAAM,CAAC,IAAM,GAAG,GAAG,UAAC,QAAa;IAC/B,OAAA,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAAK,OAAA,IAAI;IAAJ,CAAI,CAAC,CAAC;AAAzD,CAAyD,CAAC;AAE5D,MAAM,CAAC,IAAM,OAAO,GAAG,KAAK,CAAC;AAE7B,MAAM,CAAC,IAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;AAE7B,MAAM,CAAC,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;AAE/B,MAAM,CAAC,IAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;AAE7B,MAAM,CAAC,IAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;AAEjC,MAAM,CAAC,IAAM,GAAG,GAAG,KAAK,CAAC,QAAM,CAAA,CAAC"} \ No newline at end of file diff --git a/dist/esm/icons/Search.d.ts b/dist/esm/icons/Search.d.ts new file mode 100644 index 0000000..b2bdf3f --- /dev/null +++ b/dist/esm/icons/Search.d.ts @@ -0,0 +1 @@ +export default function SearchIcon(props: any): JSX.Element; diff --git a/dist/esm/icons/Search.js b/dist/esm/icons/Search.js new file mode 100644 index 0000000..adac099 --- /dev/null +++ b/dist/esm/icons/Search.js @@ -0,0 +1,17 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import React from 'react'; +export default function SearchIcon(props) { + return (React.createElement("svg", __assign({}, props, { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 512 512' }), + React.createElement("path", { d: 'M416 208c0 45.9-14.9 88.3-40 122.7l126.6 126.7c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208zM208 352c79.5 0 144-64.5 144-144S287.5 64 208 64 64 128.5 64 208s64.5 144 144 144z' }))); +} +//# sourceMappingURL=Search.js.map \ No newline at end of file diff --git a/dist/esm/icons/Search.js.map b/dist/esm/icons/Search.js.map new file mode 100644 index 0000000..30cd57b --- /dev/null +++ b/dist/esm/icons/Search.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Search.js","sourceRoot":"","sources":["../../../src/icons/Search.jsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK;IACtC,OAAO,CACL,wCAAS,KAAK,IAAE,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa;QACtE,8BAAM,CAAC,EAAC,2QAA2Q,GAAQ,CACvR,CACP,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/esm/index.d.ts b/dist/esm/index.d.ts new file mode 100644 index 0000000..c75dfdb --- /dev/null +++ b/dist/esm/index.d.ts @@ -0,0 +1,6 @@ +export * from './base'; +export * from './components'; +export { default as Provider } from './providers'; +export * from './layout'; +export * from './types'; +export * from './utils'; diff --git a/dist/esm/index.js b/dist/esm/index.js new file mode 100644 index 0000000..2e394ce --- /dev/null +++ b/dist/esm/index.js @@ -0,0 +1,7 @@ +export * from './base'; +export * from './components'; +export { default as Provider } from './providers'; +export * from './layout'; +export * from './types'; +export * from './utils'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/index.js.map b/dist/esm/index.js.map new file mode 100644 index 0000000..53515be --- /dev/null +++ b/dist/esm/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/esm/layout/Block.d.ts b/dist/esm/layout/Block.d.ts new file mode 100644 index 0000000..a4c272e --- /dev/null +++ b/dist/esm/layout/Block.d.ts @@ -0,0 +1,40 @@ +import React from 'react'; +import { CSSProperties } from '../types'; +export type BlockVariant = 'aside' | 'article' | 'code' | 'details' | 'div' | 'figcaption' | 'figure' | 'footer' | 'header' | 'li' | 'main' | 'mark' | 'nav' | 'ol' | 'pre' | 'section' | 'summary' | 'time' | 'ul'; +export type Margin = 'auto' | number | 'string'; +export interface BlockProps extends React.ButtonHTMLAttributes { + as?: BlockVariant; + alignContent?: CSSProperties.AlignContent; + alignItems?: CSSProperties.AlignItems; + alignSelf?: CSSProperties.AlignSelf; + columnGap?: number; + display?: CSSProperties.Display; + flex?: number | string; + flexBasis?: CSSProperties.FlexBasis; + flexDirection?: CSSProperties.FlexDirection; + flexGrow?: CSSProperties.FlexGrow; + flexShrink?: CSSProperties.FlexShrink; + flexWrap?: CSSProperties.FlexWrap; + gap?: number | string; + height?: number; + justifyContent?: CSSProperties.JustifyContent; + justifySelf?: CSSProperties.JustifySelf; + margin?: Margin; + marginTop?: Margin; + marginRight?: Margin; + marginBottom?: Margin; + marginLeft?: Margin; + maxHeight?: number; + maxWidth?: number; + minHeight?: number; + minWidth?: number; + padding?: number | string; + paddingTop?: number; + paddingRight?: number; + paddingBottom?: number; + paddingLeft?: number; + rowGap?: number; + unit?: CSSProperties.Unit; + width?: number; +} +export default function Block({ as, alignContent, alignItems, alignSelf, children, columnGap, display, flex, flexBasis, flexDirection, flexGrow, flexShrink, flexWrap, gap, height, rowGap, justifyContent, justifySelf, margin, marginTop, marginRight, marginBottom, marginLeft, maxHeight, maxWidth, minHeight, minWidth, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, unit, width, ...restProps }: BlockProps): JSX.Element; diff --git a/dist/esm/layout/Block.js b/dist/esm/layout/Block.js new file mode 100644 index 0000000..52b00a6 --- /dev/null +++ b/dist/esm/layout/Block.js @@ -0,0 +1,79 @@ +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import React from 'react'; +import styled from 'styled-components'; +// @todo: stylis.js might be helpful to simplify the logic here. +// @todo: all `gap`, `margin*` etc should be able to pass values not only numbers but units along with. +var withUnit = function (value, unit) { + if (typeof value === 'string') + return value; + if (!value) + return undefined; + if (typeof value === 'number') + return "".concat(value).concat(unit); + return value; +}; +var Element = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-content: ", ";\n align-items: ", ";\n align-self: ", ";\n column-gap: ", ";\n display: ", ";\n flex: ", "\n flex-basis: ", ";\n flex-direction: ", ";\n flex-grow: ", ";\n flex-shrink: ", ";\n flex-wrap: ", ";\n gap: ", ";\n height: ", ";\n justify-content: ", ";\n justify-self: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n margin-left: ", ";\n max-height: ", ";\n max-width: ", ";\n min-height: ", ";\n min-width: ", ";\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n row-gap: ", ";\n width: ", ";\n"], ["\n align-content: ", ";\n align-items: ", ";\n align-self: ", ";\n column-gap: ", ";\n display: ", ";\n flex: ", "\n flex-basis: ", ";\n flex-direction: ", ";\n flex-grow: ", ";\n flex-shrink: ", ";\n flex-wrap: ", ";\n gap: ", ";\n height: ", ";\n justify-content: ", ";\n justify-self: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n margin-left: ", ";\n max-height: ", ";\n max-width: ", ";\n min-height: ", ";\n min-width: ", ";\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n row-gap: ", ";\n width: ", ";\n"])), function (_a) { + var $alignContent = _a.$alignContent; + return $alignContent; +}, function (_a) { + var $alignItems = _a.$alignItems; + return $alignItems; +}, function (_a) { + var $alignSelf = _a.$alignSelf; + return $alignSelf; +}, function (props) { return props.$columnGap; }, function (_a) { + var $display = _a.$display; + return $display; +}, function (props) { return props.$flex; }, function (_a) { + var $flexBasis = _a.$flexBasis; + return $flexBasis; +}, function (_a) { + var $flexDirection = _a.$flexDirection; + return $flexDirection; +}, function (_a) { + var $flexGrow = _a.$flexGrow; + return $flexGrow; +}, function (_a) { + var $flexShrink = _a.$flexShrink; + return $flexShrink; +}, function (_a) { + var $flexWrap = _a.$flexWrap; + return $flexWrap; +}, function (props) { return props.$gap; }, function (props) { return props.$height; }, function (_a) { + var $justifyContent = _a.$justifyContent; + return $justifyContent; +}, function (_a) { + var $justifySelf = _a.$justifySelf; + return $justifySelf; +}, function (props) { return props.$margin; }, function (props) { return props.$marginTop; }, function (props) { return props.$marginRight; }, function (props) { return props.$marginBottom; }, function (props) { return props.$marginLeft; }, function (props) { return props.$marginLeft; }, function (props) { return props.$maxHeight; }, function (props) { return props.$maxWidth; }, function (props) { return props.$minHeight; }, function (props) { return props.$minWidth; }, function (props) { return props.$padding; }, function (props) { return props.$paddingTop; }, function (props) { return props.$paddingRight; }, function (props) { return props.$paddingBottom; }, function (props) { return props.$paddingLeft; }, function (props) { return props.$rowGap; }, function (props) { return props.$width; }); +export default function Block(_a) { + var _b = _a.as, as = _b === void 0 ? 'div' : _b, alignContent = _a.alignContent, alignItems = _a.alignItems, alignSelf = _a.alignSelf, children = _a.children, columnGap = _a.columnGap, _c = _a.display, display = _c === void 0 ? undefined : _c, flex = _a.flex, flexBasis = _a.flexBasis, flexDirection = _a.flexDirection, flexGrow = _a.flexGrow, flexShrink = _a.flexShrink, flexWrap = _a.flexWrap, gap = _a.gap, height = _a.height, rowGap = _a.rowGap, justifyContent = _a.justifyContent, justifySelf = _a.justifySelf, margin = _a.margin, marginTop = _a.marginTop, marginRight = _a.marginRight, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, maxHeight = _a.maxHeight, maxWidth = _a.maxWidth, minHeight = _a.minHeight, minWidth = _a.minWidth, padding = _a.padding, paddingTop = _a.paddingTop, paddingRight = _a.paddingRight, paddingBottom = _a.paddingBottom, paddingLeft = _a.paddingLeft, _d = _a.unit, unit = _d === void 0 ? 'px' : _d, width = _a.width, restProps = __rest(_a, ["as", "alignContent", "alignItems", "alignSelf", "children", "columnGap", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "gap", "height", "rowGap", "justifyContent", "justifySelf", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "maxHeight", "maxWidth", "minHeight", "minWidth", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "unit", "width"]); + return (React.createElement(Element, __assign({}, restProps, { as: as, "$alignContent": alignContent, "$alignItems": alignItems, "$alignSelf": alignSelf, "$columnGap": withUnit(columnGap, unit), "$display": display, "$flex": flex, "$flexBasis": flexBasis, "$flexDirection": flexDirection, "$flexGrow": flexGrow, "$flexShrink": flexShrink, "$flexWrap": flexWrap, "$gap": withUnit(gap, unit), "$height": withUnit(height, unit), "$justifyContent": justifyContent, "$justifySelf": justifySelf, "$margin": withUnit(margin, unit), "$marginTop": withUnit(marginTop, unit), "$marginRight": withUnit(marginRight, unit), "$marginBottom": withUnit(marginBottom, unit), "$marginLeft": withUnit(marginLeft, unit), "$maxHeight": withUnit(maxHeight, unit), "$maxWidth": withUnit(maxWidth, unit), "$minHeight": withUnit(minHeight, unit), "$minWidth": withUnit(minWidth, unit), "$padding": withUnit(padding, unit), "$paddingTop": withUnit(paddingTop, unit), "$paddingRight": withUnit(paddingRight, unit), "$paddingBottom": withUnit(paddingBottom, unit), "$paddingLeft": withUnit(paddingLeft, unit), "$rowGap": withUnit(rowGap, unit), "$width": withUnit(width, unit) }), children)); +} +var templateObject_1; +//# sourceMappingURL=Block.js.map \ No newline at end of file diff --git a/dist/esm/layout/Block.js.map b/dist/esm/layout/Block.js.map new file mode 100644 index 0000000..73ddf20 --- /dev/null +++ b/dist/esm/layout/Block.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Block.js","sourceRoot":"","sources":["../../../src/layout/Block.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,gEAAgE;AAChE,uGAAuG;AAEvG,IAAM,QAAQ,GAAG,UACf,KAAkC,EAClC,IAAwB;IAExB,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,UAAG,KAAK,SAAG,IAAI,CAAE,CAAC;IACxD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAoEF,IAAM,OAAO,GAAG,MAAM,CAAC,GAAG,guBAAK,qBACZ,EAAoC,oBACtC,EAAgC,mBACjC,EAA8B,mBAC9B,EAA2B,gBAC9B,EAA0B,aAC7B,EAAsB,kBAChB,EAA8B,uBAC1B,EAAsC,kBAC3C,EAA4B,oBAC1B,EAAgC,kBAClC,EAA4B,YAClC,EAAqB,eAClB,EAAwB,wBACf,EAAwC,qBAC3C,EAAkC,eACxC,EAAwB,mBACpB,EAA2B,qBACzB,EAA6B,sBAC5B,EAA8B,oBAChC,EAA4B,oBAC5B,EAA4B,mBAC7B,EAA2B,kBAC5B,EAA0B,mBACzB,EAA2B,kBAC5B,EAA0B,gBAC5B,EAAyB,oBACrB,EAA4B,sBAC1B,EAA8B,uBAC7B,EAA+B,qBACjC,EAA6B,gBAClC,EAAwB,cAC1B,EAAuB,KACjC,KAhCkB,UAAC,EAAiB;QAAf,aAAa,mBAAA;IAAO,OAAA,aAAa;AAAb,CAAa,EACtC,UAAC,EAAe;QAAb,WAAW,iBAAA;IAAO,OAAA,WAAW;AAAX,CAAW,EACjC,UAAC,EAAc;QAAZ,UAAU,gBAAA;IAAO,OAAA,UAAU;AAAV,CAAU,EAC9B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,UAAU,EAAhB,CAAgB,EAC9B,UAAC,EAAY;QAAV,QAAQ,cAAA;IAAO,OAAA,QAAQ;AAAR,CAAQ,EAC7B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,EAAX,CAAW,EAChB,UAAC,EAAc;QAAZ,UAAU,gBAAA;IAAO,OAAA,UAAU;AAAV,CAAU,EAC1B,UAAC,EAAkB;QAAhB,cAAc,oBAAA;IAAO,OAAA,cAAc;AAAd,CAAc,EAC3C,UAAC,EAAa;QAAX,SAAS,eAAA;IAAO,OAAA,SAAS;AAAT,CAAS,EAC1B,UAAC,EAAe;QAAb,WAAW,iBAAA;IAAO,OAAA,WAAW;AAAX,CAAW,EAClC,UAAC,EAAa;QAAX,SAAS,eAAA;IAAO,OAAA,SAAS;AAAT,CAAS,EAClC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,IAAI,EAAV,CAAU,EAClB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,EACf,UAAC,EAAmB;QAAjB,eAAe,qBAAA;IAAO,OAAA,eAAe;AAAf,CAAe,EAC3C,UAAC,EAAgB;QAAd,YAAY,kBAAA;IAAO,OAAA,YAAY;AAAZ,CAAY,EACxC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,EACpB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,UAAU,EAAhB,CAAgB,EACzB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,YAAY,EAAlB,CAAkB,EAC5B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,aAAa,EAAnB,CAAmB,EAChC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,WAAW,EAAjB,CAAiB,EAC5B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,WAAW,EAAjB,CAAiB,EAC7B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,UAAU,EAAhB,CAAgB,EAC5B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,SAAS,EAAf,CAAe,EACzB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,UAAU,EAAhB,CAAgB,EAC5B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,SAAS,EAAf,CAAe,EAC5B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,QAAQ,EAAd,CAAc,EACrB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,WAAW,EAAjB,CAAiB,EAC1B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,aAAa,EAAnB,CAAmB,EAC7B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,cAAc,EAApB,CAAoB,EACjC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,YAAY,EAAlB,CAAkB,EAClC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,EAC1B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,MAAM,EAAZ,CAAY,CACjC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAoCjB;IAnCX,IAAA,UAAU,EAAV,EAAE,mBAAG,KAAK,KAAA,EACV,YAAY,kBAAA,EACZ,UAAU,gBAAA,EACV,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EACnB,IAAI,UAAA,EACJ,SAAS,eAAA,EACT,aAAa,mBAAA,EACb,QAAQ,cAAA,EACR,UAAU,gBAAA,EACV,QAAQ,cAAA,EACR,GAAG,SAAA,EACH,MAAM,YAAA,EACN,MAAM,YAAA,EACN,cAAc,oBAAA,EACd,WAAW,iBAAA,EACX,MAAM,YAAA,EACN,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,YAAY,kBAAA,EACZ,UAAU,gBAAA,EACV,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,YAAY,kBAAA,EACZ,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA,EACX,KAAK,WAAA,EACF,SAAS,cAnCgB,6aAoC7B,CADa;IAEZ,OAAO,CACL,oBAAC,OAAO,eACF,SAAS,IACb,EAAE,EAAE,EAAE,mBACS,YAAY,iBACd,UAAU,gBACX,SAAS,gBACT,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,cAC3B,OAAO,WACV,IAAI,gBACC,SAAS,oBACL,aAAa,eAClB,QAAQ,iBACN,UAAU,eACZ,QAAQ,UACb,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,aAChB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,qBACd,cAAc,kBACjB,WAAW,aAChB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,gBACnB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,kBACvB,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,mBAC1B,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,iBAC9B,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,gBAC3B,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,eAC1B,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,gBACvB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,eAC1B,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,cACzB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,iBACpB,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,mBACxB,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,oBAC3B,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,kBAC/B,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,aAChC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,YACvB,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,KAE5B,QAAQ,CACD,CACX,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/esm/layout/Col.d.ts b/dist/esm/layout/Col.d.ts new file mode 100644 index 0000000..732e68f --- /dev/null +++ b/dist/esm/layout/Col.d.ts @@ -0,0 +1,6 @@ +/// +import { BlockProps } from './Block'; +interface Props extends BlockProps { +} +export default function Col({ children, ...restProps }: Props): JSX.Element; +export {}; diff --git a/dist/esm/layout/Col.js b/dist/esm/layout/Col.js new file mode 100644 index 0000000..eef3712 --- /dev/null +++ b/dist/esm/layout/Col.js @@ -0,0 +1,29 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import React from 'react'; +import Block from './Block'; +export default function Col(_a) { + var children = _a.children, restProps = __rest(_a, ["children"]); + return (React.createElement(Block, __assign({}, restProps, { display: 'flex', flexDirection: 'column' }), children)); +} +//# sourceMappingURL=Col.js.map \ No newline at end of file diff --git a/dist/esm/layout/Col.js.map b/dist/esm/layout/Col.js.map new file mode 100644 index 0000000..184e39b --- /dev/null +++ b/dist/esm/layout/Col.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Col.js","sourceRoot":"","sources":["../../../src/layout/Col.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAqB,MAAM,SAAS,CAAC;AAI5C,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAiC;IAA/B,IAAA,QAAQ,cAAA,EAAK,SAAS,cAAxB,YAA0B,CAAF;IAClD,OAAO,CACL,oBAAC,KAAK,eAAK,SAAS,IAAE,OAAO,EAAC,MAAM,EAAC,aAAa,EAAC,QAAQ,KACxD,QAAQ,CACH,CACT,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/esm/layout/Row.d.ts b/dist/esm/layout/Row.d.ts new file mode 100644 index 0000000..6cdc1c9 --- /dev/null +++ b/dist/esm/layout/Row.d.ts @@ -0,0 +1,6 @@ +/// +import { BlockProps } from './Block'; +interface Props extends BlockProps { +} +export default function Row({ children, ...restProps }: Props): JSX.Element; +export {}; diff --git a/dist/esm/layout/Row.js b/dist/esm/layout/Row.js new file mode 100644 index 0000000..ed9169d --- /dev/null +++ b/dist/esm/layout/Row.js @@ -0,0 +1,29 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import React from 'react'; +import Block from './Block'; +export default function Row(_a) { + var children = _a.children, restProps = __rest(_a, ["children"]); + return (React.createElement(Block, __assign({}, restProps, { display: 'flex', flexDirection: 'row' }), children)); +} +//# sourceMappingURL=Row.js.map \ No newline at end of file diff --git a/dist/esm/layout/Row.js.map b/dist/esm/layout/Row.js.map new file mode 100644 index 0000000..cdbf4fe --- /dev/null +++ b/dist/esm/layout/Row.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Row.js","sourceRoot":"","sources":["../../../src/layout/Row.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAqB,MAAM,SAAS,CAAC;AAI5C,MAAM,CAAC,OAAO,UAAU,GAAG,CAAC,EAAiC;IAA/B,IAAA,QAAQ,cAAA,EAAK,SAAS,cAAxB,YAA0B,CAAF;IAClD,OAAO,CACL,oBAAC,KAAK,eAAK,SAAS,IAAE,OAAO,EAAC,MAAM,EAAC,aAAa,EAAC,KAAK,KACrD,QAAQ,CACH,CACT,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/esm/layout/index.d.ts b/dist/esm/layout/index.d.ts new file mode 100644 index 0000000..732036c --- /dev/null +++ b/dist/esm/layout/index.d.ts @@ -0,0 +1,3 @@ +export { default as Block } from './Block'; +export { default as Col } from './Col'; +export { default as Row } from './Row'; diff --git a/dist/esm/layout/index.js b/dist/esm/layout/index.js new file mode 100644 index 0000000..21acda9 --- /dev/null +++ b/dist/esm/layout/index.js @@ -0,0 +1,4 @@ +export { default as Block } from './Block'; +export { default as Col } from './Col'; +export { default as Row } from './Row'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/layout/index.js.map b/dist/esm/layout/index.js.map new file mode 100644 index 0000000..5ac710e --- /dev/null +++ b/dist/esm/layout/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC"} \ No newline at end of file diff --git a/dist/esm/providers/ThemeProvider/index.d.ts b/dist/esm/providers/ThemeProvider/index.d.ts new file mode 100644 index 0000000..7b8452f --- /dev/null +++ b/dist/esm/providers/ThemeProvider/index.d.ts @@ -0,0 +1,7 @@ +import React from 'react'; +type Props = { + children: React.ReactNode; + theme: unknown; +}; +export default function ThemeProvider({ children, theme }: Props): JSX.Element; +export {}; diff --git a/dist/esm/providers/ThemeProvider/index.js b/dist/esm/providers/ThemeProvider/index.js new file mode 100644 index 0000000..9929e9f --- /dev/null +++ b/dist/esm/providers/ThemeProvider/index.js @@ -0,0 +1,41 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import React from 'react'; +import { ThemeProvider as StyledProvider } from 'styled-components'; +import { GlobalStyle } from './styles'; +var styles = { + '--colors-primary': '#2b3a55', + '--colors-secondary': '#ce7777', + '--colors-tertiary': '#e8c4c4', + '--colors-accent': '#f2e5e5', + '--colors-error': 'rgb(253, 237, 237)', + '--colors-warning': 'rgb(255, 244, 229)', + '--colors-info': 'rgb(229, 246, 253)', + '--colors-success': 'rgb(237, 247, 237)', + '--colors-bg-primary': 'white', + '--colors-bg-secondary': '#efefef', + '--colors-text-primary': '#000000', + '--colors-text-secondary': '#cccccc', + '--colors-disabled': 'rgba(0, 0, 0, 0.12)', + '--colors-a': 'blue', + '--colors-a-hover': '#cccccc', + '--fonts-primary': "'Montserrat', sans-serif", + '--fonts-secondary': "'Montserrat', sans-serif", + '--fonts-size-primary': '14px' +}; +export default function ThemeProvider(_a) { + var children = _a.children, theme = _a.theme; + return (React.createElement(StyledProvider, { theme: theme }, + React.createElement(GlobalStyle, __assign({}, styles)), + children)); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/providers/ThemeProvider/index.js.map b/dist/esm/providers/ThemeProvider/index.js.map new file mode 100644 index 0000000..d2432eb --- /dev/null +++ b/dist/esm/providers/ThemeProvider/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/providers/ThemeProvider/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAOvC,IAAM,MAAM,GAAG;IACb,kBAAkB,EAAE,SAAS;IAC7B,oBAAoB,EAAE,SAAS;IAC/B,mBAAmB,EAAE,SAAS;IAC9B,iBAAiB,EAAE,SAAS;IAC5B,gBAAgB,EAAE,oBAAoB;IACtC,kBAAkB,EAAE,oBAAoB;IACxC,eAAe,EAAE,oBAAoB;IACrC,kBAAkB,EAAE,oBAAoB;IACxC,qBAAqB,EAAE,OAAO;IAC9B,uBAAuB,EAAE,SAAS;IAClC,uBAAuB,EAAE,SAAS;IAClC,yBAAyB,EAAE,SAAS;IACpC,mBAAmB,EAAE,qBAAqB;IAC1C,YAAY,EAAE,MAAM;IACpB,kBAAkB,EAAE,SAAS;IAC7B,iBAAiB,EAAE,0BAA0B;IAC7C,mBAAmB,EAAE,0BAA0B;IAC/C,sBAAsB,EAAE,MAAM;CACxB,CAAC;AAET,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAA0B;QAAxB,QAAQ,cAAA,EAAE,KAAK,WAAA;IACrD,OAAO,CACL,oBAAC,cAAc,IAAC,KAAK,EAAE,KAAK;QAC1B,oBAAC,WAAW,eAAK,MAAM,EAAI;QAC1B,QAAQ,CACM,CAClB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/esm/providers/ThemeProvider/styles.d.ts b/dist/esm/providers/ThemeProvider/styles.d.ts new file mode 100644 index 0000000..3a33b74 --- /dev/null +++ b/dist/esm/providers/ThemeProvider/styles.d.ts @@ -0,0 +1 @@ +export declare const GlobalStyle: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>; diff --git a/dist/esm/providers/ThemeProvider/styles.js b/dist/esm/providers/ThemeProvider/styles.js new file mode 100644 index 0000000..ef7308d --- /dev/null +++ b/dist/esm/providers/ThemeProvider/styles.js @@ -0,0 +1,9 @@ +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +// @ts-nocheck +import { createGlobalStyle } from 'styled-components'; +export var GlobalStyle = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n :root {\n --colors-primary: ", ";\n --colors-secondary: ", ";\n --colors-tertiary: ", ";\n --colors-accent: ", ";\n --colors-error: ", ";\n --colors-warning: ", ";\n --colors-info: ", ";\n --colors-success: ", ";\n --colors-bg-primary: ", ";\n --colors-bg-secondary: ", ";\n --colors-text-primary:", ";\n --colors-text-secondary: ", ";\n --colors-disabled: ", ";\n --colors-a: ", ";\n --colors-a-hover: ", ";\n --fonts-primary: ", ";\n --fonts-secondary: ", ";\n --fonts-size-primary: ", ";\n }\n /* normalize browser defaults with normalize.css */\n button,hr,input{overflow:visible}progress,sub,sup{vertical-align:baseline}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}details,main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[hidden],template{display:none}\n\n html {}\n a {\n color: var(--colors-a);\n text-decoration: none;\n &:hover {\n color: var(--colors-a-hover);\n }\n }\n aside {}\n article {}\n b {}\n body {\n font-family: var(--fonts-primary);\n font-size: var(--fonts-size-primary);\n background-color: var(--colors-bg-primary);\n color: var(--colors-text-primary);\n }\n button {\n cursor: pointer;\n }\n button:disabled,\n button[disabled] {\n cursor: default;\n }\n code {}\n del {}\n div {}\n details {}\n em {}\n figcaption {}\n figure {}\n footer {}\n h1, h2, h3, h4, h5, h6 {}\n header {}\n i {}\n input {}\n input[type='checkbox'] {}\n input:disabled,\n input[disabled] {\n cursor: default;\n }\n ins {}\n main {}\n mark {}\n nav {}\n ol {}\n ol li {}\n option {}\n p {}\n pre {}\n select {}\n section {}\n small {}\n span {}\n strong {}\n sub {}\n summary {}\n sup {}\n table {}\n time {}\n ul {}\n ul li {}\n\n /** JAccordion, JAccordionItem */\n .jpk-accordion {\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n &__section {}\n &__summary {\n align-items: center;\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n padding: 10px;\n }\n &__content {\n padding: 10px;\n }\n }\n\n /** JAlert */\n .jpk-alert {\n border-radius: 4px;\n color: rgb(95, 33, 32);\n font-size: 0.875rem;\n line-height: 1.43;\n letter-spacing: 0.01071em;\n padding: 10px 15px;\n\n &--error {\n background-color: var(--colors-error);\n }\n &--warning {\n background-color: var(--colors-warning);\n }\n &--info {\n background-color: var(--colors-info);\n }\n &--success {\n background-color: var(--colors-success);\n }\n }\n\n /** JButton */\n .jpk-btn {\n cursor: pointer;\n\n &__contained {\n background-color: var(--colors-primary);\n border: 0px;\n box-shadow: var(--colors-primary) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px;\n color: rgb(255, 255, 255);\n\n &:disabled,\n &[disabled] {\n background-color: var(--colors-disabled);\n box-shadow: var(--colors-disabled) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px;\n color: var(--colors-accent);\n }\n }\n &__outlined {\n background-color: transparent;\n border: 1px solid rgba(25, 118, 210, 0.5);\n box-shadow: none;\n color: var(--colors-primary);\n\n &:disabled,\n &[disabled] {\n border: 1px solid var(--colors-disabled);\n color: var(--colors-accent);\n }\n }\n &__text {\n background-color: transparent;\n border: 0px;\n color: var(--colors-primary);\n\n &:disabled,\n &[disabled] {\n color: var(--colors-accent);\n }\n }\n\n &__small {\n padding: 4px 5px;\n }\n &__medium {\n padding: 6px 8px;\n }\n &__large {\n padding: 8px 11px;\n }\n }\n\n /** JCheckbox */\n .jpk-checkbox {\n align-items: center;\n display: flex;\n flex-direction: row;\n vertical-align: middle;\n gap: 5px;\n\n &--checked {}\n &--disabled {}\n\n &__input {\n accent-color: var(--colors-primary);\n }\n &__label {}\n }\n\n /** JFileInput */\n .jpk-file-input {}\n\n /** JList */\n .jpk-list {\n &__item {}\n }\n\n /** JPagiantion **/\n .jpk-pagination {\n align-items: center;\n display: flex;\n gap: 5px;\n list-style: none;\n margin: 0;\n padding: 0;\n\n &__nav {\n border: none;\n background-color: transparent;\n\n &__first {}\n &__prev {}\n &__next {}\n &__last {}\n }\n \n &__item {\n\n &--current {\n background-color: #cccccc;\n }\n }\n \n }\n\n /** JRadio */\n .jpk-radio {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--checked {}\n &--disabled {}\n\n &__input {\n accent-color: var(--colors-primary);\n }\n &__label {}\n }\n\n /** JRangeInput {} */\n .jpk-range-input {\n accent-color: var(--colors-primary);\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--disabled\n }\n\n /** JSearchInput */\n .jpk-search-input {\n &--disabled {}\n\n &__input {}\n &__btn {}\n }\n\n /** JSelect */\n .jpk-select {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--disabled {}\n\n &__label {}\n &__menu {\n &__item {}\n }\n }\n\n /** JTable, JTableHeader, JTableRow, JTableColHead, JTableBody, JTableCell, JTableFooter */\n .jpk-table {\n &__header {}\n &__row {}\n &__col-head {}\n &__body {}\n &__cell {}\n &__footer {}\n }\n\n /** JTabs */\n .jpk-tabs {\n .jpk-tab {\n &__header {\n border-bottom: 1px solid #ccc;\n padding-left: 0;\n }\n\n &__summary {\n cursor: pointer;\n display: inline-block;\n list-style: none;\n margin-bottom: -1px;\n padding: 0.5rem 0.75rem;\n }\n\n &__content {}\n\n &--active {\n background-color: white;\n border: solid #ccc;\n border-width: 1px 1px 0 1px;\n }\n }\n }\n\n /** JText (JTypography) */\n .jpk-typography {\n &__b {}\n &__big {}\n &__del {}\n &__div {}\n &__em {}\n &__h1 {}\n &__h2 {}\n &__h3 {}\n &__h4 {}\n &__h5 {}\n &__h6 {}\n &__i {}\n &__ins {}\n &__mark {}\n &__p {}\n &__span {}\n &__sub {}\n &__sup {}\n &__small {}\n &__strong {}\n &__u {}\n }\n\n /** JTextInput */\n .jpk-text-input {\n display: flex;\n align-items: center;\n gap: 5px;\n\n &--disabled {}\n \n &__label {}\n &__input {}\n }\n"], ["\n :root {\n --colors-primary: ", ";\n --colors-secondary: ", ";\n --colors-tertiary: ", ";\n --colors-accent: ", ";\n --colors-error: ", ";\n --colors-warning: ", ";\n --colors-info: ", ";\n --colors-success: ", ";\n --colors-bg-primary: ", ";\n --colors-bg-secondary: ", ";\n --colors-text-primary:", ";\n --colors-text-secondary: ", ";\n --colors-disabled: ", ";\n --colors-a: ", ";\n --colors-a-hover: ", ";\n --fonts-primary: ", ";\n --fonts-secondary: ", ";\n --fonts-size-primary: ", ";\n }\n /* normalize browser defaults with normalize.css */\n button,hr,input{overflow:visible}progress,sub,sup{vertical-align:baseline}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}details,main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[hidden],template{display:none}\n\n html {}\n a {\n color: var(--colors-a);\n text-decoration: none;\n &:hover {\n color: var(--colors-a-hover);\n }\n }\n aside {}\n article {}\n b {}\n body {\n font-family: var(--fonts-primary);\n font-size: var(--fonts-size-primary);\n background-color: var(--colors-bg-primary);\n color: var(--colors-text-primary);\n }\n button {\n cursor: pointer;\n }\n button:disabled,\n button[disabled] {\n cursor: default;\n }\n code {}\n del {}\n div {}\n details {}\n em {}\n figcaption {}\n figure {}\n footer {}\n h1, h2, h3, h4, h5, h6 {}\n header {}\n i {}\n input {}\n input[type='checkbox'] {}\n input:disabled,\n input[disabled] {\n cursor: default;\n }\n ins {}\n main {}\n mark {}\n nav {}\n ol {}\n ol li {}\n option {}\n p {}\n pre {}\n select {}\n section {}\n small {}\n span {}\n strong {}\n sub {}\n summary {}\n sup {}\n table {}\n time {}\n ul {}\n ul li {}\n\n /** JAccordion, JAccordionItem */\n .jpk-accordion {\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n &__section {}\n &__summary {\n align-items: center;\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n padding: 10px;\n }\n &__content {\n padding: 10px;\n }\n }\n\n /** JAlert */\n .jpk-alert {\n border-radius: 4px;\n color: rgb(95, 33, 32);\n font-size: 0.875rem;\n line-height: 1.43;\n letter-spacing: 0.01071em;\n padding: 10px 15px;\n\n &--error {\n background-color: var(--colors-error);\n }\n &--warning {\n background-color: var(--colors-warning);\n }\n &--info {\n background-color: var(--colors-info);\n }\n &--success {\n background-color: var(--colors-success);\n }\n }\n\n /** JButton */\n .jpk-btn {\n cursor: pointer;\n\n &__contained {\n background-color: var(--colors-primary);\n border: 0px;\n box-shadow: var(--colors-primary) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px;\n color: rgb(255, 255, 255);\n\n &:disabled,\n &[disabled] {\n background-color: var(--colors-disabled);\n box-shadow: var(--colors-disabled) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px;\n color: var(--colors-accent);\n }\n }\n &__outlined {\n background-color: transparent;\n border: 1px solid rgba(25, 118, 210, 0.5);\n box-shadow: none;\n color: var(--colors-primary);\n\n &:disabled,\n &[disabled] {\n border: 1px solid var(--colors-disabled);\n color: var(--colors-accent);\n }\n }\n &__text {\n background-color: transparent;\n border: 0px;\n color: var(--colors-primary);\n\n &:disabled,\n &[disabled] {\n color: var(--colors-accent);\n }\n }\n\n &__small {\n padding: 4px 5px;\n }\n &__medium {\n padding: 6px 8px;\n }\n &__large {\n padding: 8px 11px;\n }\n }\n\n /** JCheckbox */\n .jpk-checkbox {\n align-items: center;\n display: flex;\n flex-direction: row;\n vertical-align: middle;\n gap: 5px;\n\n &--checked {}\n &--disabled {}\n\n &__input {\n accent-color: var(--colors-primary);\n }\n &__label {}\n }\n\n /** JFileInput */\n .jpk-file-input {}\n\n /** JList */\n .jpk-list {\n &__item {}\n }\n\n /** JPagiantion **/\n .jpk-pagination {\n align-items: center;\n display: flex;\n gap: 5px;\n list-style: none;\n margin: 0;\n padding: 0;\n\n &__nav {\n border: none;\n background-color: transparent;\n\n &__first {}\n &__prev {}\n &__next {}\n &__last {}\n }\n \n &__item {\n\n &--current {\n background-color: #cccccc;\n }\n }\n \n }\n\n /** JRadio */\n .jpk-radio {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--checked {}\n &--disabled {}\n\n &__input {\n accent-color: var(--colors-primary);\n }\n &__label {}\n }\n\n /** JRangeInput {} */\n .jpk-range-input {\n accent-color: var(--colors-primary);\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--disabled\n }\n\n /** JSearchInput */\n .jpk-search-input {\n &--disabled {}\n\n &__input {}\n &__btn {}\n }\n\n /** JSelect */\n .jpk-select {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--disabled {}\n\n &__label {}\n &__menu {\n &__item {}\n }\n }\n\n /** JTable, JTableHeader, JTableRow, JTableColHead, JTableBody, JTableCell, JTableFooter */\n .jpk-table {\n &__header {}\n &__row {}\n &__col-head {}\n &__body {}\n &__cell {}\n &__footer {}\n }\n\n /** JTabs */\n .jpk-tabs {\n .jpk-tab {\n &__header {\n border-bottom: 1px solid #ccc;\n padding-left: 0;\n }\n\n &__summary {\n cursor: pointer;\n display: inline-block;\n list-style: none;\n margin-bottom: -1px;\n padding: 0.5rem 0.75rem;\n }\n\n &__content {}\n\n &--active {\n background-color: white;\n border: solid #ccc;\n border-width: 1px 1px 0 1px;\n }\n }\n }\n\n /** JText (JTypography) */\n .jpk-typography {\n &__b {}\n &__big {}\n &__del {}\n &__div {}\n &__em {}\n &__h1 {}\n &__h2 {}\n &__h3 {}\n &__h4 {}\n &__h5 {}\n &__h6 {}\n &__i {}\n &__ins {}\n &__mark {}\n &__p {}\n &__span {}\n &__sub {}\n &__sup {}\n &__small {}\n &__strong {}\n &__u {}\n }\n\n /** JTextInput */\n .jpk-text-input {\n display: flex;\n align-items: center;\n gap: 5px;\n\n &--disabled {}\n \n &__label {}\n &__input {}\n }\n"])), function ($) { return $['--colors-primary']; }, function ($) { return $['--colors-secondary']; }, function ($) { return $['--colors-tertiary']; }, function ($) { return $['--colors-accent']; }, function ($) { return $['--colors-error']; }, function ($) { return $['--colors-warning']; }, function ($) { return $['--colors-info']; }, function ($) { return $['--colors-success']; }, function ($) { return $['--colors-bg-primary']; }, function ($) { return $['--colors-bg-secondary']; }, function ($) { return $['--colors-text-primary']; }, function ($) { return $['--colors-text-secondary']; }, function ($) { return $['--colors-disabled']; }, function ($) { return $['--colors-a']; }, function ($) { return $['--colors-a-hover']; }, function ($) { return $['--fonts-primary']; }, function ($) { return $['--fonts-secondary']; }, function ($) { return $['--fonts-size-primary']; }); +var templateObject_1; +//# sourceMappingURL=styles.js.map \ No newline at end of file diff --git a/dist/esm/providers/ThemeProvider/styles.js.map b/dist/esm/providers/ThemeProvider/styles.js.map new file mode 100644 index 0000000..932406e --- /dev/null +++ b/dist/esm/providers/ThemeProvider/styles.js.map @@ -0,0 +1 @@ +{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/providers/ThemeProvider/styles.ts"],"names":[],"mappings":";;;;AAAA,cAAc;AACd,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,CAAC,IAAM,WAAW,GAAG,iBAAiB,ogQAAA,qCAEpB,EAA4B,6BAC1B,EAA8B,4BAC/B,EAA6B,0BAC/B,EAA2B,yBAC5B,EAA0B,2BACxB,EAA4B,wBAC/B,EAAyB,2BACtB,EAA4B,8BACzB,EAA+B,gCAC7B,EAAiC,+BAClC,EAAiC,kCAC9B,EAAmC,4BACzC,EAA6B,qBACpC,EAAsB,2BAChB,EAA4B,0BAC7B,EAA2B,4BACzB,EAA6B,+BAC1B,EAAgC,85OAgV3D,KAjWuB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,kBAAkB,CAAC,EAArB,CAAqB,EAC1B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,oBAAoB,CAAC,EAAvB,CAAuB,EAC/B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,mBAAmB,CAAC,EAAtB,CAAsB,EAC/B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,iBAAiB,CAAC,EAApB,CAAoB,EAC5B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,gBAAgB,CAAC,EAAnB,CAAmB,EACxB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,kBAAkB,CAAC,EAArB,CAAqB,EAC/B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,eAAe,CAAC,EAAlB,CAAkB,EACtB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,kBAAkB,CAAC,EAArB,CAAqB,EACzB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,qBAAqB,CAAC,EAAxB,CAAwB,EAC7B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,uBAAuB,CAAC,EAA1B,CAA0B,EAClC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,uBAAuB,CAAC,EAA1B,CAA0B,EAC9B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,yBAAyB,CAAC,EAA5B,CAA4B,EACzC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,mBAAmB,CAAC,EAAtB,CAAsB,EACpC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,YAAY,CAAC,EAAf,CAAe,EAChB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,kBAAkB,CAAC,EAArB,CAAqB,EAC7B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,iBAAiB,CAAC,EAApB,CAAoB,EACzB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,mBAAmB,CAAC,EAAtB,CAAsB,EAC1B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,sBAAsB,CAAC,EAAzB,CAAyB,CAgV3D,CAAC"} \ No newline at end of file diff --git a/dist/esm/providers/index.d.ts b/dist/esm/providers/index.d.ts new file mode 100644 index 0000000..ef71d19 --- /dev/null +++ b/dist/esm/providers/index.d.ts @@ -0,0 +1,6 @@ +import React from 'react'; +export type ProviderProps = { + children: React.ReactNode; + theme?: unknown; +}; +export default function Providers({ children, theme }: ProviderProps): JSX.Element; diff --git a/dist/esm/providers/index.js b/dist/esm/providers/index.js new file mode 100644 index 0000000..3b1877c --- /dev/null +++ b/dist/esm/providers/index.js @@ -0,0 +1,9 @@ +import React from 'react'; +import { HelmetProvider } from 'react-helmet-async'; +import ThemeProvider from './ThemeProvider'; +export default function Providers(_a) { + var children = _a.children, _b = _a.theme, theme = _b === void 0 ? {} : _b; + return (React.createElement(HelmetProvider, null, + React.createElement(ThemeProvider, { theme: theme }, children))); +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/providers/index.js.map b/dist/esm/providers/index.js.map new file mode 100644 index 0000000..c92f171 --- /dev/null +++ b/dist/esm/providers/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAO5C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAAuC;QAArC,QAAQ,cAAA,EAAE,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA;IACtD,OAAO,CACL,oBAAC,cAAc;QACb,oBAAC,aAAa,IAAC,KAAK,EAAE,KAAK,IAAG,QAAQ,CAAiB,CACxC,CAClB,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/esm/stories/Button.d.ts b/dist/esm/stories/Button.d.ts new file mode 100644 index 0000000..c33eed4 --- /dev/null +++ b/dist/esm/stories/Button.d.ts @@ -0,0 +1,29 @@ +/// +import './button.css'; +interface ButtonProps { + /** + * Is this the principal call to action on the page? + */ + primary?: boolean; + /** + * What background color to use + */ + backgroundColor?: string; + /** + * How large should the button be? + */ + size?: 'small' | 'medium' | 'large'; + /** + * Button contents + */ + label: string; + /** + * Optional click handler + */ + onClick?: () => void; +} +/** + * Primary UI component for user interaction + */ +export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => JSX.Element; +export {}; diff --git a/dist/esm/stories/Button.js b/dist/esm/stories/Button.js new file mode 100644 index 0000000..4e14dd6 --- /dev/null +++ b/dist/esm/stories/Button.js @@ -0,0 +1,33 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +import React from 'react'; +import './button.css'; +/** + * Primary UI component for user interaction + */ +export var Button = function (_a) { + var _b = _a.primary, primary = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, backgroundColor = _a.backgroundColor, label = _a.label, props = __rest(_a, ["primary", "size", "backgroundColor", "label"]); + var mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; + return (React.createElement("button", __assign({ type: "button", className: ['storybook-button', "storybook-button--".concat(size), mode].join(' '), style: { backgroundColor: backgroundColor } }, props), label)); +}; +//# sourceMappingURL=Button.js.map \ No newline at end of file diff --git a/dist/esm/stories/Button.js.map b/dist/esm/stories/Button.js.map new file mode 100644 index 0000000..3aa76cc --- /dev/null +++ b/dist/esm/stories/Button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/stories/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,CAAC;AAyBtB;;GAEG;AACH,MAAM,CAAC,IAAM,MAAM,GAAG,UAAC,EAMT;IALZ,IAAA,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA,EACf,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,eAAe,qBAAA,EACf,KAAK,WAAA,EACF,KAAK,cALa,+CAMtB,CADS;IAER,IAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,6BAA6B,CAAC;IACnF,OAAO,CACL,yCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,CAAC,kBAAkB,EAAE,4BAAqB,IAAI,CAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC5E,KAAK,EAAE,EAAE,eAAe,iBAAA,EAAE,IACtB,KAAK,GAER,KAAK,CACC,CACV,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/esm/stories/Button.stories.js b/dist/esm/stories/Button.stories.js new file mode 100644 index 0000000..c5b60bd --- /dev/null +++ b/dist/esm/stories/Button.stories.js @@ -0,0 +1,45 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import React from 'react'; +import { Button } from './Button'; +// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export +export default { + title: 'Example/Button', + component: Button, + // More on argTypes: https://storybook.js.org/docs/react/api/argtypes + argTypes: { + backgroundColor: { control: 'color' } + } +}; +// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args +var Template = function (args) { return React.createElement(Button, __assign({}, args)); }; +export var Primary = Template.bind({}); +// More on args: https://storybook.js.org/docs/react/writing-stories/args +Primary.args = { + primary: true, + label: 'Button' +}; +export var Secondary = Template.bind({}); +Secondary.args = { + label: 'Button' +}; +export var Large = Template.bind({}); +Large.args = { + size: 'large', + label: 'Button' +}; +export var Small = Template.bind({}); +Small.args = { + size: 'small', + label: 'Button' +}; +//# sourceMappingURL=Button.stories.js.map \ No newline at end of file diff --git a/dist/esm/stories/Button.stories.js.map b/dist/esm/stories/Button.stories.js.map new file mode 100644 index 0000000..a597449 --- /dev/null +++ b/dist/esm/stories/Button.stories.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../../src/stories/Button.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,0GAA0G;AAC1G,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,MAAM;IACjB,qEAAqE;IACrE,QAAQ,EAAE;QACR,eAAe,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;KACtC;CAC8B,CAAC;AAElC,2GAA2G;AAC3G,IAAM,QAAQ,GAAkC,UAAC,IAAI,IAAK,OAAA,oBAAC,MAAM,eAAK,IAAI,EAAI,EAApB,CAAoB,CAAC;AAE/E,MAAM,CAAC,IAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,yEAAyE;AACzE,OAAO,CAAC,IAAI,GAAG;IACb,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;IACf,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,IAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACX,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,CAAC,IAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACX,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,QAAQ;CAChB,CAAC"} \ No newline at end of file diff --git a/dist/esm/stories/Header.d.ts b/dist/esm/stories/Header.d.ts new file mode 100644 index 0000000..47c5ce0 --- /dev/null +++ b/dist/esm/stories/Header.d.ts @@ -0,0 +1,13 @@ +/// +import './header.css'; +type User = { + name: string; +}; +interface HeaderProps { + user?: User; + onLogin: () => void; + onLogout: () => void; + onCreateAccount: () => void; +} +export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => JSX.Element; +export {}; diff --git a/dist/esm/stories/Header.js b/dist/esm/stories/Header.js new file mode 100644 index 0000000..0b1f403 --- /dev/null +++ b/dist/esm/stories/Header.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { Button } from './Button'; +import './header.css'; +export var Header = function (_a) { + var user = _a.user, onLogin = _a.onLogin, onLogout = _a.onLogout, onCreateAccount = _a.onCreateAccount; + return (React.createElement("header", null, + React.createElement("div", { className: "wrapper" }, + React.createElement("div", null, + React.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg" }, + React.createElement("g", { fill: "none", fillRule: "evenodd" }, + React.createElement("path", { d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z", fill: "#FFF" }), + React.createElement("path", { d: "M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z", fill: "#555AB9" }), + React.createElement("path", { d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z", fill: "#91BAF8" }))), + React.createElement("h1", null, "Acme")), + React.createElement("div", null, user ? (React.createElement(React.Fragment, null, + React.createElement("span", { className: "welcome" }, + "Welcome, ", + React.createElement("b", null, user.name), + "!"), + React.createElement(Button, { size: "small", onClick: onLogout, label: "Log out" }))) : (React.createElement(React.Fragment, null, + React.createElement(Button, { size: "small", onClick: onLogin, label: "Log in" }), + React.createElement(Button, { primary: true, size: "small", onClick: onCreateAccount, label: "Sign up" }))))))); +}; +//# sourceMappingURL=Header.js.map \ No newline at end of file diff --git a/dist/esm/stories/Header.js.map b/dist/esm/stories/Header.js.map new file mode 100644 index 0000000..a0034c1 --- /dev/null +++ b/dist/esm/stories/Header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/stories/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,cAAc,CAAC;AAatB,MAAM,CAAC,IAAM,MAAM,GAAG,UAAC,EAAyD;QAAvD,IAAI,UAAA,EAAE,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,eAAe,qBAAA;IAAoB,OAAA,CACnF;QACE,6BAAK,SAAS,EAAC,SAAS;YACtB;gBACE,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B;oBAChF,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;wBAC/B,8BACE,CAAC,EAAC,mFAAmF,EACrF,IAAI,EAAC,MAAM,GACX;wBACF,8BACE,CAAC,EAAC,kEAAkE,EACpE,IAAI,EAAC,SAAS,GACd;wBACF,8BACE,CAAC,EAAC,gEAAgE,EAClE,IAAI,EAAC,SAAS,GACd,CACA,CACA;gBACN,uCAAa,CACT;YACN,iCACG,IAAI,CAAC,CAAC,CAAC,CACN;gBACE,8BAAM,SAAS,EAAC,SAAS;;oBACd,+BAAI,IAAI,CAAC,IAAI,CAAK;wBACtB;gBACP,oBAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAC,SAAS,GAAG,CACzD,CACJ,CAAC,CAAC,CAAC,CACF;gBACE,oBAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAC,QAAQ,GAAG;gBACxD,oBAAC,MAAM,IAAC,OAAO,QAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAC,SAAS,GAAG,CACxE,CACJ,CACG,CACF,CACC,CACV;AAvCoF,CAuCpF,CAAC"} \ No newline at end of file diff --git a/dist/esm/stories/Header.stories.js b/dist/esm/stories/Header.stories.js new file mode 100644 index 0000000..3313185 --- /dev/null +++ b/dist/esm/stories/Header.stories.js @@ -0,0 +1,31 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import React from 'react'; +import { Header } from './Header'; +export default { + title: 'Example/Header', + component: Header, + parameters: { + // More on Story layout: https://storybook.js.org/docs/react/configure/story-layout + layout: 'fullscreen' + } +}; +var Template = function (args) { return React.createElement(Header, __assign({}, args)); }; +export var LoggedIn = Template.bind({}); +LoggedIn.args = { + user: { + name: 'Jane Doe' + } +}; +export var LoggedOut = Template.bind({}); +LoggedOut.args = {}; +//# sourceMappingURL=Header.stories.js.map \ No newline at end of file diff --git a/dist/esm/stories/Header.stories.js.map b/dist/esm/stories/Header.stories.js.map new file mode 100644 index 0000000..c79de27 --- /dev/null +++ b/dist/esm/stories/Header.stories.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Header.stories.js","sourceRoot":"","sources":["../../../src/stories/Header.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,mFAAmF;QACnF,MAAM,EAAE,YAAY;KACrB;CAC8B,CAAC;AAElC,IAAM,QAAQ,GAAkC,UAAC,IAAI,IAAK,OAAA,oBAAC,MAAM,eAAK,IAAI,EAAI,EAApB,CAAoB,CAAC;AAE/E,MAAM,CAAC,IAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,GAAG;IACd,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,IAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG,EAAE,CAAC"} \ No newline at end of file diff --git a/dist/esm/stories/Page.d.ts b/dist/esm/stories/Page.d.ts new file mode 100644 index 0000000..5804ff0 --- /dev/null +++ b/dist/esm/stories/Page.d.ts @@ -0,0 +1,3 @@ +import React from 'react'; +import './page.css'; +export declare const Page: React.VFC; diff --git a/dist/esm/stories/Page.js b/dist/esm/stories/Page.js new file mode 100644 index 0000000..3361346 --- /dev/null +++ b/dist/esm/stories/Page.js @@ -0,0 +1,38 @@ +import React from 'react'; +import { Header } from './Header'; +import './page.css'; +export var Page = function () { + var _a = React.useState(), user = _a[0], setUser = _a[1]; + return (React.createElement("article", null, + React.createElement(Header, { user: user, onLogin: function () { return setUser({ name: 'Jane Doe' }); }, onLogout: function () { return setUser(undefined); }, onCreateAccount: function () { return setUser({ name: 'Jane Doe' }); } }), + React.createElement("section", null, + React.createElement("h2", null, "Pages in Storybook"), + React.createElement("p", null, + "We recommend building UIs with a", + ' ', + React.createElement("a", { href: "https://componentdriven.org", target: "_blank", rel: "noopener noreferrer" }, + React.createElement("strong", null, "component-driven")), + ' ', + "process starting with atomic components and ending with pages."), + React.createElement("p", null, "Render pages with mock data. This makes it easy to build and review page states without needing to navigate to them in your app. Here are some handy patterns for managing page data in Storybook:"), + React.createElement("ul", null, + React.createElement("li", null, "Use a higher-level connected component. Storybook helps you compose such data from the \"args\" of child component stories"), + React.createElement("li", null, "Assemble data in the page component from your services. You can mock these services out using Storybook.")), + React.createElement("p", null, + "Get a guided tutorial on component-driven development at", + ' ', + React.createElement("a", { href: "https://storybook.js.org/tutorials/", target: "_blank", rel: "noopener noreferrer" }, "Storybook tutorials"), + ". Read more in the", + ' ', + React.createElement("a", { href: "https://storybook.js.org/docs", target: "_blank", rel: "noopener noreferrer" }, "docs"), + "."), + React.createElement("div", { className: "tip-wrapper" }, + React.createElement("span", { className: "tip" }, "Tip"), + " Adjust the width of the canvas with the", + ' ', + React.createElement("svg", { width: "10", height: "10", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" }, + React.createElement("g", { fill: "none", fillRule: "evenodd" }, + React.createElement("path", { d: "M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z", id: "a", fill: "#999" }))), + "Viewports addon in the toolbar")))); +}; +//# sourceMappingURL=Page.js.map \ No newline at end of file diff --git a/dist/esm/stories/Page.js.map b/dist/esm/stories/Page.js.map new file mode 100644 index 0000000..53ee374 --- /dev/null +++ b/dist/esm/stories/Page.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../src/stories/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,YAAY,CAAC;AAMpB,MAAM,CAAC,IAAM,IAAI,GAAc;IACvB,IAAA,KAAkB,KAAK,CAAC,QAAQ,EAAQ,EAAvC,IAAI,QAAA,EAAE,OAAO,QAA0B,CAAC;IAE/C,OAAO,CACL;QACE,oBAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,cAAM,OAAA,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAA7B,CAA6B,EAC5C,QAAQ,EAAE,cAAM,OAAA,OAAO,CAAC,SAAS,CAAC,EAAlB,CAAkB,EAClC,eAAe,EAAE,cAAM,OAAA,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,EAA7B,CAA6B,GACpD;QAEF;YACE,qDAA2B;YAC3B;;gBACmC,GAAG;gBACpC,2BAAG,IAAI,EAAC,6BAA6B,EAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB;oBAC7E,uDAAiC,CAC/B;gBAAC,GAAG;iFAEN;YACJ,oOAII;YACJ;gBACE,6JAGK;gBACL,2IAGK,CACF;YACL;;gBAC2D,GAAG;gBAC5D,2BAAG,IAAI,EAAC,qCAAqC,EAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,0BAEnF;;gBACe,GAAG;gBACtB,2BAAG,IAAI,EAAC,+BAA+B,EAAC,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB,WAE7E;oBAEF;YACJ,6BAAK,SAAS,EAAC,aAAa;gBAC1B,8BAAM,SAAS,EAAC,KAAK,UAAW;;gBAAyC,GAAG;gBAC5E,6BAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,4BAA4B;oBAChF,2BAAG,IAAI,EAAC,MAAM,EAAC,QAAQ,EAAC,SAAS;wBAC/B,8BACE,CAAC,EAAC,sOAAsO,EACxO,EAAE,EAAC,GAAG,EACN,IAAI,EAAC,MAAM,GACX,CACA,CACA;iDAEF,CACE,CACF,CACX,CAAC;AACJ,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/esm/stories/Page.stories.d.ts b/dist/esm/stories/Page.stories.d.ts new file mode 100644 index 0000000..5342175 --- /dev/null +++ b/dist/esm/stories/Page.stories.d.ts @@ -0,0 +1,6 @@ +import React from 'react'; +import { ComponentStory, ComponentMeta } from '@storybook/react'; +declare const _default: ComponentMeta>; +export default _default; +export declare const LoggedOut: ComponentStory>; +export declare const LoggedIn: ComponentStory>; diff --git a/dist/esm/stories/Page.stories.js b/dist/esm/stories/Page.stories.js new file mode 100644 index 0000000..f56776c --- /dev/null +++ b/dist/esm/stories/Page.stories.js @@ -0,0 +1,82 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +import React from 'react'; +import { within, userEvent } from '@storybook/testing-library'; +import { Page } from './Page'; +export default { + title: 'Example/Page', + component: Page, + parameters: { + // More on Story layout: https://storybook.js.org/docs/react/configure/story-layout + layout: 'fullscreen' + } +}; +var Template = function (args) { return React.createElement(Page, __assign({}, args)); }; +export var LoggedOut = Template.bind({}); +export var LoggedIn = Template.bind({}); +// More on interaction testing: https://storybook.js.org/docs/react/writing-tests/interaction-testing +LoggedIn.play = function (_a) { + var canvasElement = _a.canvasElement; + return __awaiter(void 0, void 0, void 0, function () { + var canvas, loginButton; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + canvas = within(canvasElement); + return [4 /*yield*/, canvas.getByRole('button', { name: /Log in/i })]; + case 1: + loginButton = _b.sent(); + return [4 /*yield*/, userEvent.click(loginButton)]; + case 2: + _b.sent(); + return [2 /*return*/]; + } + }); + }); +}; +//# sourceMappingURL=Page.stories.js.map \ No newline at end of file diff --git a/dist/esm/stories/Page.stories.js.map b/dist/esm/stories/Page.stories.js.map new file mode 100644 index 0000000..99ba513 --- /dev/null +++ b/dist/esm/stories/Page.stories.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Page.stories.js","sourceRoot":"","sources":["../../../src/stories/Page.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,eAAe;IACb,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV,mFAAmF;QACnF,MAAM,EAAE,YAAY;KACrB;CAC4B,CAAC;AAEhC,IAAM,QAAQ,GAAgC,UAAC,IAAI,IAAK,OAAA,oBAAC,IAAI,eAAK,IAAI,EAAI,EAAlB,CAAkB,CAAC;AAE3E,MAAM,CAAC,IAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE3C,MAAM,CAAC,IAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAE1C,qGAAqG;AACrG,QAAQ,CAAC,IAAI,GAAG,UAAO,EAAiB;QAAf,aAAa,mBAAA;;;;;;oBAC9B,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;oBACjB,qBAAM,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAA;;oBAAnE,WAAW,GAAG,SAAqD;oBACzE,qBAAM,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,EAAA;;oBAAlC,SAAkC,CAAC;;;;;CACpC,CAAC"} \ No newline at end of file diff --git a/dist/esm/types/CSSProperties.d.ts b/dist/esm/types/CSSProperties.d.ts new file mode 100644 index 0000000..8168a3c --- /dev/null +++ b/dist/esm/types/CSSProperties.d.ts @@ -0,0 +1,12 @@ +export type AlignContent = 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly' | 'initial' | 'inherit'; +export type AlignItems = 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'baseline' | 'initial' | 'inherit'; +export type AlignSelf = 'auto' | 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'baseline' | 'initial' | 'inherit'; +export type Display = 'inline' | 'block' | 'contents' | 'flex' | 'grid' | 'inline-block' | 'inline-flex' | 'inline-grid' | 'inline-table' | 'list-item' | 'run-in' | 'table' | 'table-caption' | 'table-column-group' | 'table-header-group' | 'table-footer-group' | 'table-row-group' | 'table-cell' | 'table-column' | 'table-row' | 'none' | 'initial' | 'inherit'; +export type FlexBasis = number | 'auto' | 'initial' | 'inherit'; +export type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse' | 'initial' | 'inherit'; +export type FlexGrow = number | 'initial' | 'inherit'; +export type FlexShrink = number | 'initial' | 'inherit'; +export type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse' | 'initial' | 'inherit'; +export type JustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly' | 'initial' | 'inherit'; +export type JustifySelf = 'auto' | 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'baseline' | 'initial' | 'inherit'; +export type Unit = '%' | 'em' | 'rem' | 'px' | 'vh' | 'vw'; diff --git a/dist/esm/types/CSSProperties.js b/dist/esm/types/CSSProperties.js new file mode 100644 index 0000000..acf7115 --- /dev/null +++ b/dist/esm/types/CSSProperties.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=CSSProperties.js.map \ No newline at end of file diff --git a/dist/esm/types/CSSProperties.js.map b/dist/esm/types/CSSProperties.js.map new file mode 100644 index 0000000..7825e33 --- /dev/null +++ b/dist/esm/types/CSSProperties.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CSSProperties.js","sourceRoot":"","sources":["../../../src/types/CSSProperties.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/esm/types/index.d.ts b/dist/esm/types/index.d.ts new file mode 100644 index 0000000..76d90eb --- /dev/null +++ b/dist/esm/types/index.d.ts @@ -0,0 +1,4 @@ +export * from './theme'; +export * as CSSProperties from './CSSProperties'; +export type { ProviderProps } from '../providers'; +export type { PortalProps } from '../base/Portal'; diff --git a/dist/esm/types/index.js b/dist/esm/types/index.js new file mode 100644 index 0000000..7450c7b --- /dev/null +++ b/dist/esm/types/index.js @@ -0,0 +1,3 @@ +export * from './theme'; +export * as CSSProperties from './CSSProperties'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/types/index.js.map b/dist/esm/types/index.js.map new file mode 100644 index 0000000..010ed4e --- /dev/null +++ b/dist/esm/types/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC"} \ No newline at end of file diff --git a/dist/esm/types/theme.d.ts b/dist/esm/types/theme.d.ts new file mode 100644 index 0000000..218decb --- /dev/null +++ b/dist/esm/types/theme.d.ts @@ -0,0 +1,21 @@ +type PaletteColor = { + light: string; + dark: string; +}; +export type ThemeConfig = { + __prefix: string; + mode: 'light' | 'dark'; + colors: { + primary: PaletteColor; + secondary: PaletteColor; + error: PaletteColor; + warning: PaletteColor; + info: PaletteColor; + success: PaletteColor; + background: { + default: string; + paper: string; + }; + }; +}; +export {}; diff --git a/dist/esm/types/theme.js b/dist/esm/types/theme.js new file mode 100644 index 0000000..2e119fa --- /dev/null +++ b/dist/esm/types/theme.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=theme.js.map \ No newline at end of file diff --git a/dist/esm/types/theme.js.map b/dist/esm/types/theme.js.map new file mode 100644 index 0000000..8d1af52 --- /dev/null +++ b/dist/esm/types/theme.js.map @@ -0,0 +1 @@ +{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/types/theme.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/esm/utils/index.d.ts b/dist/esm/utils/index.d.ts new file mode 100644 index 0000000..4ec645b --- /dev/null +++ b/dist/esm/utils/index.d.ts @@ -0,0 +1,2 @@ +export * from './localStorage'; +export * from './sessionStorage'; diff --git a/dist/esm/utils/index.js b/dist/esm/utils/index.js new file mode 100644 index 0000000..452d949 --- /dev/null +++ b/dist/esm/utils/index.js @@ -0,0 +1,3 @@ +export * from './localStorage'; +export * from './sessionStorage'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/esm/utils/index.js.map b/dist/esm/utils/index.js.map new file mode 100644 index 0000000..caf4352 --- /dev/null +++ b/dist/esm/utils/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"} \ No newline at end of file diff --git a/dist/esm/utils/localStorage.d.ts b/dist/esm/utils/localStorage.d.ts new file mode 100644 index 0000000..51f0c04 --- /dev/null +++ b/dist/esm/utils/localStorage.d.ts @@ -0,0 +1,8 @@ +export default localStorage; +declare namespace localStorage { + function set(key: any, value: any): void; + function get(key: any): string | null; + function getParsed(key: any): any; + function remove(key: any): void; + function clear(): void; +} diff --git a/dist/esm/utils/localStorage.js b/dist/esm/utils/localStorage.js new file mode 100644 index 0000000..9157c30 --- /dev/null +++ b/dist/esm/utils/localStorage.js @@ -0,0 +1,17 @@ +var localStorage = { + set: function (key, value) { return window.localStorage.setItem(key, value); }, + get: function (key) { return window.localStorage.getItem(key); }, + getParsed: function (key) { + try { + var data = JSON.parse(window.localStorage.getItem(key)); + return data; + } + catch (err) { + return null; + } + }, + remove: function (key) { return window.localStorage.removeItem(key); }, + clear: function () { return window.localStorage.clear(); } +}; +export default localStorage; +//# sourceMappingURL=localStorage.js.map \ No newline at end of file diff --git a/dist/esm/utils/localStorage.js.map b/dist/esm/utils/localStorage.js.map new file mode 100644 index 0000000..13c13a4 --- /dev/null +++ b/dist/esm/utils/localStorage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"localStorage.js","sourceRoot":"","sources":["../../../src/utils/localStorage.js"],"names":[],"mappings":"AAAA,IAAM,YAAY,GAAG;IACnB,GAAG,EAAE,UAAC,GAAG,EAAE,KAAK,IAAK,OAAA,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,EAAvC,CAAuC;IAC5D,GAAG,EAAE,UAAC,GAAG,IAAK,OAAA,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAhC,CAAgC;IAC9C,SAAS,EAAE,UAAC,GAAG;QACb,IAAI;YACF,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YAC1D,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IACD,MAAM,EAAE,UAAC,GAAG,IAAK,OAAA,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,EAAnC,CAAmC;IACpD,KAAK,EAAE,cAAM,OAAA,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,EAA3B,CAA2B;CACzC,CAAC;AAEF,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/esm/utils/mixins.d.ts b/dist/esm/utils/mixins.d.ts new file mode 100644 index 0000000..da5b43e --- /dev/null +++ b/dist/esm/utils/mixins.d.ts @@ -0,0 +1 @@ +export function omit(obj: any, ...props: any[]): any; diff --git a/dist/esm/utils/mixins.js b/dist/esm/utils/mixins.js new file mode 100644 index 0000000..5169701 --- /dev/null +++ b/dist/esm/utils/mixins.js @@ -0,0 +1,26 @@ +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +// Omit propery from an object +export function omit(obj) { + var props = []; + for (var _i = 1; _i < arguments.length; _i++) { + props[_i - 1] = arguments[_i]; + } + if (!obj) + return undefined; + var _obj = __assign({}, obj); + props.forEach(function (prop) { + delete _obj[prop]; + }); + return _obj; +} +//# sourceMappingURL=mixins.js.map \ No newline at end of file diff --git a/dist/esm/utils/mixins.js.map b/dist/esm/utils/mixins.js.map new file mode 100644 index 0000000..fee64ce --- /dev/null +++ b/dist/esm/utils/mixins.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mixins.js","sourceRoot":"","sources":["../../../src/utils/mixins.js"],"names":[],"mappings":";;;;;;;;;;;AAAA,8BAA8B;AAC9B,MAAM,UAAU,IAAI,CAAC,GAAG;IAAE,eAAQ;SAAR,UAAQ,EAAR,qBAAQ,EAAR,IAAQ;QAAR,8BAAQ;;IAChC,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAC3B,IAAM,IAAI,gBAAQ,GAAG,CAAE,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,UAAU,IAAI;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"} \ No newline at end of file diff --git a/dist/esm/utils/sessionStorage.d.ts b/dist/esm/utils/sessionStorage.d.ts new file mode 100644 index 0000000..c6ce617 --- /dev/null +++ b/dist/esm/utils/sessionStorage.d.ts @@ -0,0 +1,8 @@ +export default sessionStorage; +declare namespace sessionStorage { + function set(key: any, value: any): void; + function get(key: any): string | null; + function getParsed(key: any): any; + function remove(key: any): void; + function clear(): void; +} diff --git a/dist/esm/utils/sessionStorage.js b/dist/esm/utils/sessionStorage.js new file mode 100644 index 0000000..e161090 --- /dev/null +++ b/dist/esm/utils/sessionStorage.js @@ -0,0 +1,17 @@ +var sessionStorage = { + set: function (key, value) { return window.sessionStorage.setItem(key, value); }, + get: function (key) { return window.sessionStorage.getItem(key); }, + getParsed: function (key) { + try { + var data = JSON.parse(window.sessionStorage.getItem(key)); + return data; + } + catch (err) { + return null; + } + }, + remove: function (key) { return window.sessionStorage.removeItem(key); }, + clear: function () { return window.sessionStorage.clear(); } +}; +export default sessionStorage; +//# sourceMappingURL=sessionStorage.js.map \ No newline at end of file diff --git a/dist/esm/utils/sessionStorage.js.map b/dist/esm/utils/sessionStorage.js.map new file mode 100644 index 0000000..babccde --- /dev/null +++ b/dist/esm/utils/sessionStorage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sessionStorage.js","sourceRoot":"","sources":["../../../src/utils/sessionStorage.js"],"names":[],"mappings":"AAAA,IAAM,cAAc,GAAG;IACrB,GAAG,EAAE,UAAC,GAAG,EAAE,KAAK,IAAK,OAAA,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,EAAzC,CAAyC;IAC9D,GAAG,EAAE,UAAC,GAAG,IAAK,OAAA,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,EAAlC,CAAkC;IAChD,SAAS,EAAE,UAAC,GAAG;QACb,IAAI;YACF,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YAC5D,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IACD,MAAM,EAAE,UAAC,GAAG,IAAK,OAAA,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,EAArC,CAAqC;IACtD,KAAK,EAAE,cAAM,OAAA,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,EAA7B,CAA6B;CAC3C,CAAC;AAEF,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/dist/generics/Accordion.d.ts b/dist/generics/Accordion.d.ts new file mode 100644 index 0000000..b579460 --- /dev/null +++ b/dist/generics/Accordion.d.ts @@ -0,0 +1,17 @@ +import React, { CSSProperties } from 'react'; +export type AccordionItemProps = { + children: string | React.ReactNode; + className?: string; + id?: string; + style?: CSSProperties; + summary: string; +}; +export declare function AccordionItem({ id, summary, children, className, style, }: AccordionItemProps): JSX.Element; +export type AccordionProps = { + children?: React.ReactNode; + className?: string; + data?: AccordionItemProps[]; + style?: CSSProperties; +}; +export declare function Accordion({ children, data, className, style, }: AccordionProps): JSX.Element; +export default Accordion; diff --git a/dist/generics/Accordion.js b/dist/generics/Accordion.js new file mode 100644 index 0000000..cbac405 --- /dev/null +++ b/dist/generics/Accordion.js @@ -0,0 +1,48 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Accordion = exports.AccordionItem = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importStar(require("react")); +function AccordionItem(_a) { + var id = _a.id, summary = _a.summary, children = _a.children, className = _a.className, style = _a.style; + var _b = (0, react_1.useState)(false), isOpen = _b[0], setIsOpen = _b[1]; + return (react_1["default"].createElement("section", { key: id !== null && id !== void 0 ? id : summary, className: (0, clsx_1["default"])('jpk-accordion__section', className), style: style }, + react_1["default"].createElement("div", { role: 'button', "aria-expanded": isOpen, className: 'jpk-accordion__summary', onClick: function () { return setIsOpen(!isOpen); } }, + react_1["default"].createElement("div", null, summary), + react_1["default"].createElement("div", null, isOpen ? '-' : '+')), + isOpen && react_1["default"].createElement("div", { className: 'jpk-accordion__content' }, children))); +} +exports.AccordionItem = AccordionItem; +function Accordion(_a) { + var children = _a.children, data = _a.data, className = _a.className, style = _a.style; + return (react_1["default"].createElement("div", { className: (0, clsx_1["default"])('jpk-accordion', className), style: style }, data ? data.map(AccordionItem) : children)); +} +exports.Accordion = Accordion; +exports["default"] = Accordion; +//# sourceMappingURL=Accordion.js.map \ No newline at end of file diff --git a/dist/generics/Accordion.js.map b/dist/generics/Accordion.js.map new file mode 100644 index 0000000..09dd393 --- /dev/null +++ b/dist/generics/Accordion.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../src/generics/Accordion.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,6CAAuD;AAcvD,SAAgB,aAAa,CAAC,EAMT;QALnB,EAAE,QAAA,EACF,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,KAAK,WAAA;IAEC,IAAA,KAAsB,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAApC,MAAM,QAAA,EAAE,SAAS,QAAmB,CAAC;IAE5C,OAAO,CACL,8CACE,GAAG,EAAE,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,OAAO,EAClB,SAAS,EAAE,IAAA,iBAAI,EAAC,wBAAwB,EAAE,SAAS,CAAC,EACpD,KAAK,EAAE,KAAK;QAEZ,0CACE,IAAI,EAAC,QAAQ,mBACE,MAAM,EACrB,SAAS,EAAC,wBAAwB,EAClC,OAAO,EAAE,cAAM,OAAA,SAAS,CAAC,CAAC,MAAM,CAAC,EAAlB,CAAkB;YAEjC,8CAAM,OAAO,CAAO;YACpB,8CAAM,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAO,CAC3B;QACL,MAAM,IAAI,0CAAK,SAAS,EAAC,wBAAwB,IAAE,QAAQ,CAAO,CAC3D,CACX,CAAC;AACJ,CAAC;AA3BD,sCA2BC;AASD,SAAgB,SAAS,CAAC,EAKT;QAJf,QAAQ,cAAA,EACR,IAAI,UAAA,EACJ,SAAS,eAAA,EACT,KAAK,WAAA;IAEL,OAAO,CACL,0CAAK,SAAS,EAAE,IAAA,iBAAI,EAAC,eAAe,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,IAC3D,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CACtC,CACP,CAAC;AACJ,CAAC;AAXD,8BAWC;AAED,qBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/generics/Alert.d.ts b/dist/generics/Alert.d.ts new file mode 100644 index 0000000..ba1ea80 --- /dev/null +++ b/dist/generics/Alert.d.ts @@ -0,0 +1,7 @@ +/// +export type AlertProps = { + children: string; + severity?: 'error' | 'warning' | 'info' | 'success'; +}; +export declare function Alert({ children, severity }: AlertProps): JSX.Element; +export default Alert; diff --git a/dist/generics/Alert.js b/dist/generics/Alert.js new file mode 100644 index 0000000..3070281 --- /dev/null +++ b/dist/generics/Alert.js @@ -0,0 +1,15 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Alert = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +function Alert(_a) { + var children = _a.children, severity = _a.severity; + return (react_1["default"].createElement("div", { role: 'alert', className: (0, clsx_1["default"])('jpk-alert', severity && "jpk-alert--".concat(severity)) }, children)); +} +exports.Alert = Alert; +exports["default"] = Alert; +//# sourceMappingURL=Alert.js.map \ No newline at end of file diff --git a/dist/generics/Alert.js.map b/dist/generics/Alert.js.map new file mode 100644 index 0000000..75d4b5b --- /dev/null +++ b/dist/generics/Alert.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../src/generics/Alert.tsx"],"names":[],"mappings":";;;;;;AAAA,8CAAwB;AACxB,gDAA0B;AAS1B,SAAgB,KAAK,CAAC,EAAkC;QAAhC,QAAQ,cAAA,EAAE,QAAQ,cAAA;IACxC,OAAO,CACL,0CACE,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,IAAA,iBAAI,EAAC,WAAW,EAAE,QAAQ,IAAI,qBAAc,QAAQ,CAAE,CAAC,IAEjE,QAAQ,CACL,CACP,CAAC;AACJ,CAAC;AATD,sBASC;AAED,qBAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/dist/generics/Button.d.ts b/dist/generics/Button.d.ts new file mode 100644 index 0000000..39b417d --- /dev/null +++ b/dist/generics/Button.d.ts @@ -0,0 +1,10 @@ +import React from 'react'; +export interface ButtonProps extends React.ButtonHTMLAttributes { + children: React.ReactNode; + className?: string; + size?: 'small' | 'medium' | 'large'; + type?: 'button' | 'reset' | 'submit'; + variant?: 'contained' | 'outlined' | 'text'; +} +export declare function Button({ children, className, size, type, variant, ...restProps }: ButtonProps): JSX.Element; +export default Button; diff --git a/dist/generics/Button.js b/dist/generics/Button.js new file mode 100644 index 0000000..75cb9a9 --- /dev/null +++ b/dist/generics/Button.js @@ -0,0 +1,37 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Button = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +function Button(_a) { + var children = _a.children, className = _a.className, _b = _a.size, size = _b === void 0 ? 'medium' : _b, type = _a.type, variant = _a.variant, restProps = __rest(_a, ["children", "className", "size", "type", "variant"]); + return (react_1["default"].createElement("button", __assign({}, restProps, { type: type, className: (0, clsx_1["default"])('jpk-btn', variant && "jpk-btn__".concat(variant), size && "jpk-btn__".concat(size), className) }), children)); +} +exports.Button = Button; +exports["default"] = Button; +//# sourceMappingURL=Button.js.map \ No newline at end of file diff --git a/dist/generics/Button.js.map b/dist/generics/Button.js.map new file mode 100644 index 0000000..8f7d32e --- /dev/null +++ b/dist/generics/Button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../src/generics/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA0B;AAa1B,SAAgB,MAAM,CAAC,EAOT;IANZ,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,IAAI,UAAA,EACJ,OAAO,aAAA,EACJ,SAAS,cANS,oDAOtB,CADa;IAEZ,OAAO,CACL,wDACM,SAAS,IACb,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAA,iBAAI,EACb,SAAS,EACT,OAAO,IAAI,mBAAY,OAAO,CAAE,EAChC,IAAI,IAAI,mBAAY,IAAI,CAAE,EAC1B,SAAS,CACV,KAEA,QAAQ,CACF,CACV,CAAC;AACJ,CAAC;AAtBD,wBAsBC;AAED,qBAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/dist/generics/Checkbox.d.ts b/dist/generics/Checkbox.d.ts new file mode 100644 index 0000000..12acd70 --- /dev/null +++ b/dist/generics/Checkbox.d.ts @@ -0,0 +1,16 @@ +import React, { CSSProperties } from 'react'; +interface Style extends CSSProperties { + input?: CSSProperties; + label?: CSSProperties; +} +export interface CheckboxProps extends React.InputHTMLAttributes { + checked?: boolean; + className?: string; + disabled?: boolean; + label?: string; + name?: string; + style?: Style; + value?: string; +} +export declare function Checkbox({ checked, className, disabled, label, name, style, value, ...restProps }: CheckboxProps): JSX.Element; +export default Checkbox; diff --git a/dist/generics/Checkbox.js b/dist/generics/Checkbox.js new file mode 100644 index 0000000..4b4ecfd --- /dev/null +++ b/dist/generics/Checkbox.js @@ -0,0 +1,40 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Checkbox = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +var mixins_1 = require("../utils/mixins"); +function Checkbox(_a) { + var _b = _a.checked, checked = _b === void 0 ? false : _b, className = _a.className, _c = _a.disabled, disabled = _c === void 0 ? false : _c, label = _a.label, name = _a.name, style = _a.style, value = _a.value, restProps = __rest(_a, ["checked", "className", "disabled", "label", "name", "style", "value"]); + return (react_1["default"].createElement("div", { className: (0, clsx_1["default"])('jpk-checkbox', checked && 'jpk-checkbox--checked', disabled && 'jpk-checkbox--disabled', className), style: (0, mixins_1.omit)(style, 'input', 'label') }, + react_1["default"].createElement("input", __assign({}, restProps, { checked: checked, className: 'jpk-checkbox__input', disabled: disabled, name: name, style: style === null || style === void 0 ? void 0 : style.input, type: 'checkbox', value: value })), + label && (react_1["default"].createElement("label", { htmlFor: name, className: 'jpk-checkbox__label', style: style === null || style === void 0 ? void 0 : style.label }, label)))); +} +exports.Checkbox = Checkbox; +exports["default"] = Checkbox; +//# sourceMappingURL=Checkbox.js.map \ No newline at end of file diff --git a/dist/generics/Checkbox.js.map b/dist/generics/Checkbox.js.map new file mode 100644 index 0000000..dd9f693 --- /dev/null +++ b/dist/generics/Checkbox.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/generics/Checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA6C;AAC7C,0CAAuC;AAkBvC,SAAgB,QAAQ,CAAC,EAST;IARd,IAAA,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA,EACf,SAAS,eAAA,EACT,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,KAAK,WAAA,EACF,SAAS,cARW,uEASxB,CADa;IAEZ,OAAO,CACL,0CACE,SAAS,EAAE,IAAA,iBAAI,EACb,cAAc,EACd,OAAO,IAAI,uBAAuB,EAClC,QAAQ,IAAI,wBAAwB,EACpC,SAAS,CACV,EACD,KAAK,EAAE,IAAA,aAAI,EAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;QAEpC,uDACM,SAAS,IACb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,qBAAqB,EAC/B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EACnB,IAAI,EAAC,UAAU,EACf,KAAK,EAAE,KAAK,IACZ;QACD,KAAK,IAAI,CACR,4CACE,OAAO,EAAE,IAAI,EACb,SAAS,EAAC,qBAAqB,EAC/B,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,IAElB,KAAK,CACA,CACT,CACG,CACP,CAAC;AACJ,CAAC;AAzCD,4BAyCC;AAED,qBAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/dist/generics/FileInput.d.ts b/dist/generics/FileInput.d.ts new file mode 100644 index 0000000..8efca6c --- /dev/null +++ b/dist/generics/FileInput.d.ts @@ -0,0 +1,6 @@ +import React from 'react'; +export interface FileInputProps extends React.InputHTMLAttributes { + className?: string; +} +export declare function FileInput({ className, ...restProps }: FileInputProps): JSX.Element; +export default FileInput; diff --git a/dist/generics/FileInput.js b/dist/generics/FileInput.js new file mode 100644 index 0000000..cbd8003 --- /dev/null +++ b/dist/generics/FileInput.js @@ -0,0 +1,37 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.FileInput = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +function FileInput(_a) { + var className = _a.className, restProps = __rest(_a, ["className"]); + return (react_1["default"].createElement("input", __assign({}, restProps, { className: (0, clsx_1["default"])('jpk-file-input', className), type: 'file' }))); +} +exports.FileInput = FileInput; +exports["default"] = FileInput; +//# sourceMappingURL=FileInput.js.map \ No newline at end of file diff --git a/dist/generics/FileInput.js.map b/dist/generics/FileInput.js.map new file mode 100644 index 0000000..e20da2a --- /dev/null +++ b/dist/generics/FileInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../../src/generics/FileInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA0B;AAO1B,SAAgB,SAAS,CAAC,EAA2C;IAAzC,IAAA,SAAS,eAAA,EAAK,SAAS,cAAzB,aAA2B,CAAF;IACjD,OAAO,CACL,uDACM,SAAS,IACb,SAAS,EAAE,IAAA,iBAAI,EAAC,gBAAgB,EAAE,SAAS,CAAC,EAC5C,IAAI,EAAC,MAAM,IACX,CACH,CAAC;AACJ,CAAC;AARD,8BAQC;AAED,qBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/generics/List.d.ts b/dist/generics/List.d.ts new file mode 100644 index 0000000..ce9b3d7 --- /dev/null +++ b/dist/generics/List.d.ts @@ -0,0 +1,528 @@ +import React from 'react'; +export interface ListProps extends React.HTMLAttributes { + as?: 'div' | 'ol' | 'ul'; +} +export declare function List({ as, children, className, ...restProps }: ListProps): React.DetailedReactHTMLElement<{ + defaultChecked?: boolean | undefined; + defaultValue?: string | number | readonly string[] | undefined; + suppressContentEditableWarning?: boolean | undefined; + suppressHydrationWarning?: boolean | undefined; + accessKey?: string | undefined; + contentEditable?: (boolean | "true" | "false") | "inherit" | undefined; + contextMenu?: string | undefined; + dir?: string | undefined; + draggable?: (boolean | "true" | "false") | undefined; + hidden?: boolean | undefined; + id?: string | undefined; + lang?: string | undefined; + nonce?: string | undefined; + placeholder?: string | undefined; + slot?: string | undefined; + spellCheck?: (boolean | "true" | "false") | undefined; + style?: React.CSSProperties | undefined; + tabIndex?: number | undefined; + title?: string | undefined; + translate?: "yes" | "no" | undefined; + radioGroup?: string | undefined; + role?: React.AriaRole | undefined; + about?: string | undefined; + datatype?: string | undefined; + inlist?: any; + prefix?: string | undefined; + property?: string | undefined; + resource?: string | undefined; + typeof?: string | undefined; + vocab?: string | undefined; + autoCapitalize?: string | undefined; + autoCorrect?: string | undefined; + autoSave?: string | undefined; + color?: string | undefined; + itemProp?: string | undefined; + itemScope?: boolean | undefined; + itemType?: string | undefined; + itemID?: string | undefined; + itemRef?: string | undefined; + results?: number | undefined; + security?: string | undefined; + unselectable?: "on" | "off" | undefined; + inputMode?: "url" | "search" | "text" | "none" | "tel" | "email" | "numeric" | "decimal" | undefined; + is?: string | undefined; + 'aria-activedescendant'?: string | undefined; + 'aria-atomic'?: (boolean | "true" | "false") | undefined; + 'aria-autocomplete'?: "list" | "none" | "both" | "inline" | undefined; + 'aria-busy'?: (boolean | "true" | "false") | undefined; + 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-colcount'?: number | undefined; + 'aria-colindex'?: number | undefined; + 'aria-colspan'?: number | undefined; + 'aria-controls'?: string | undefined; + 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "date" | "location" | undefined; + 'aria-describedby'?: string | undefined; + 'aria-details'?: string | undefined; + 'aria-disabled'?: (boolean | "true" | "false") | undefined; + 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined; + 'aria-errormessage'?: string | undefined; + 'aria-expanded'?: (boolean | "true" | "false") | undefined; + 'aria-flowto'?: string | undefined; + 'aria-grabbed'?: (boolean | "true" | "false") | undefined; + 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined; + 'aria-hidden'?: (boolean | "true" | "false") | undefined; + 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined; + 'aria-keyshortcuts'?: string | undefined; + 'aria-label'?: string | undefined; + 'aria-labelledby'?: string | undefined; + 'aria-level'?: number | undefined; + 'aria-live'?: "off" | "assertive" | "polite" | undefined; + 'aria-modal'?: (boolean | "true" | "false") | undefined; + 'aria-multiline'?: (boolean | "true" | "false") | undefined; + 'aria-multiselectable'?: (boolean | "true" | "false") | undefined; + 'aria-orientation'?: "horizontal" | "vertical" | undefined; + 'aria-owns'?: string | undefined; + 'aria-placeholder'?: string | undefined; + 'aria-posinset'?: number | undefined; + 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-readonly'?: (boolean | "true" | "false") | undefined; + 'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined; + 'aria-required'?: (boolean | "true" | "false") | undefined; + 'aria-roledescription'?: string | undefined; + 'aria-rowcount'?: number | undefined; + 'aria-rowindex'?: number | undefined; + 'aria-rowspan'?: number | undefined; + 'aria-selected'?: (boolean | "true" | "false") | undefined; + 'aria-setsize'?: number | undefined; + 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined; + 'aria-valuemax'?: number | undefined; + 'aria-valuemin'?: number | undefined; + 'aria-valuenow'?: number | undefined; + 'aria-valuetext'?: string | undefined; + dangerouslySetInnerHTML?: { + __html: string; + } | undefined; + onCopy?: React.ClipboardEventHandler | undefined; + onCopyCapture?: React.ClipboardEventHandler | undefined; + onCut?: React.ClipboardEventHandler | undefined; + onCutCapture?: React.ClipboardEventHandler | undefined; + onPaste?: React.ClipboardEventHandler | undefined; + onPasteCapture?: React.ClipboardEventHandler | undefined; + onCompositionEnd?: React.CompositionEventHandler | undefined; + onCompositionEndCapture?: React.CompositionEventHandler | undefined; + onCompositionStart?: React.CompositionEventHandler | undefined; + onCompositionStartCapture?: React.CompositionEventHandler | undefined; + onCompositionUpdate?: React.CompositionEventHandler | undefined; + onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; + onFocus?: React.FocusEventHandler | undefined; + onFocusCapture?: React.FocusEventHandler | undefined; + onBlur?: React.FocusEventHandler | undefined; + onBlurCapture?: React.FocusEventHandler | undefined; + onChange?: React.FormEventHandler | undefined; + onChangeCapture?: React.FormEventHandler | undefined; + onBeforeInput?: React.FormEventHandler | undefined; + onBeforeInputCapture?: React.FormEventHandler | undefined; + onInput?: React.FormEventHandler | undefined; + onInputCapture?: React.FormEventHandler | undefined; + onReset?: React.FormEventHandler | undefined; + onResetCapture?: React.FormEventHandler | undefined; + onSubmit?: React.FormEventHandler | undefined; + onSubmitCapture?: React.FormEventHandler | undefined; + onInvalid?: React.FormEventHandler | undefined; + onInvalidCapture?: React.FormEventHandler | undefined; + onLoad?: React.ReactEventHandler | undefined; + onLoadCapture?: React.ReactEventHandler | undefined; + onError?: React.ReactEventHandler | undefined; + onErrorCapture?: React.ReactEventHandler | undefined; + onKeyDown?: React.KeyboardEventHandler | undefined; + onKeyDownCapture?: React.KeyboardEventHandler | undefined; + onKeyPress?: React.KeyboardEventHandler | undefined; + onKeyPressCapture?: React.KeyboardEventHandler | undefined; + onKeyUp?: React.KeyboardEventHandler | undefined; + onKeyUpCapture?: React.KeyboardEventHandler | undefined; + onAbort?: React.ReactEventHandler | undefined; + onAbortCapture?: React.ReactEventHandler | undefined; + onCanPlay?: React.ReactEventHandler | undefined; + onCanPlayCapture?: React.ReactEventHandler | undefined; + onCanPlayThrough?: React.ReactEventHandler | undefined; + onCanPlayThroughCapture?: React.ReactEventHandler | undefined; + onDurationChange?: React.ReactEventHandler | undefined; + onDurationChangeCapture?: React.ReactEventHandler | undefined; + onEmptied?: React.ReactEventHandler | undefined; + onEmptiedCapture?: React.ReactEventHandler | undefined; + onEncrypted?: React.ReactEventHandler | undefined; + onEncryptedCapture?: React.ReactEventHandler | undefined; + onEnded?: React.ReactEventHandler | undefined; + onEndedCapture?: React.ReactEventHandler | undefined; + onLoadedData?: React.ReactEventHandler | undefined; + onLoadedDataCapture?: React.ReactEventHandler | undefined; + onLoadedMetadata?: React.ReactEventHandler | undefined; + onLoadedMetadataCapture?: React.ReactEventHandler | undefined; + onLoadStart?: React.ReactEventHandler | undefined; + onLoadStartCapture?: React.ReactEventHandler | undefined; + onPause?: React.ReactEventHandler | undefined; + onPauseCapture?: React.ReactEventHandler | undefined; + onPlay?: React.ReactEventHandler | undefined; + onPlayCapture?: React.ReactEventHandler | undefined; + onPlaying?: React.ReactEventHandler | undefined; + onPlayingCapture?: React.ReactEventHandler | undefined; + onProgress?: React.ReactEventHandler | undefined; + onProgressCapture?: React.ReactEventHandler | undefined; + onRateChange?: React.ReactEventHandler | undefined; + onRateChangeCapture?: React.ReactEventHandler | undefined; + onResize?: React.ReactEventHandler | undefined; + onResizeCapture?: React.ReactEventHandler | undefined; + onSeeked?: React.ReactEventHandler | undefined; + onSeekedCapture?: React.ReactEventHandler | undefined; + onSeeking?: React.ReactEventHandler | undefined; + onSeekingCapture?: React.ReactEventHandler | undefined; + onStalled?: React.ReactEventHandler | undefined; + onStalledCapture?: React.ReactEventHandler | undefined; + onSuspend?: React.ReactEventHandler | undefined; + onSuspendCapture?: React.ReactEventHandler | undefined; + onTimeUpdate?: React.ReactEventHandler | undefined; + onTimeUpdateCapture?: React.ReactEventHandler | undefined; + onVolumeChange?: React.ReactEventHandler | undefined; + onVolumeChangeCapture?: React.ReactEventHandler | undefined; + onWaiting?: React.ReactEventHandler | undefined; + onWaitingCapture?: React.ReactEventHandler | undefined; + onAuxClick?: React.MouseEventHandler | undefined; + onAuxClickCapture?: React.MouseEventHandler | undefined; + onClick?: React.MouseEventHandler | undefined; + onClickCapture?: React.MouseEventHandler | undefined; + onContextMenu?: React.MouseEventHandler | undefined; + onContextMenuCapture?: React.MouseEventHandler | undefined; + onDoubleClick?: React.MouseEventHandler | undefined; + onDoubleClickCapture?: React.MouseEventHandler | undefined; + onDrag?: React.DragEventHandler | undefined; + onDragCapture?: React.DragEventHandler | undefined; + onDragEnd?: React.DragEventHandler | undefined; + onDragEndCapture?: React.DragEventHandler | undefined; + onDragEnter?: React.DragEventHandler | undefined; + onDragEnterCapture?: React.DragEventHandler | undefined; + onDragExit?: React.DragEventHandler | undefined; + onDragExitCapture?: React.DragEventHandler | undefined; + onDragLeave?: React.DragEventHandler | undefined; + onDragLeaveCapture?: React.DragEventHandler | undefined; + onDragOver?: React.DragEventHandler | undefined; + onDragOverCapture?: React.DragEventHandler | undefined; + onDragStart?: React.DragEventHandler | undefined; + onDragStartCapture?: React.DragEventHandler | undefined; + onDrop?: React.DragEventHandler | undefined; + onDropCapture?: React.DragEventHandler | undefined; + onMouseDown?: React.MouseEventHandler | undefined; + onMouseDownCapture?: React.MouseEventHandler | undefined; + onMouseEnter?: React.MouseEventHandler | undefined; + onMouseLeave?: React.MouseEventHandler | undefined; + onMouseMove?: React.MouseEventHandler | undefined; + onMouseMoveCapture?: React.MouseEventHandler | undefined; + onMouseOut?: React.MouseEventHandler | undefined; + onMouseOutCapture?: React.MouseEventHandler | undefined; + onMouseOver?: React.MouseEventHandler | undefined; + onMouseOverCapture?: React.MouseEventHandler | undefined; + onMouseUp?: React.MouseEventHandler | undefined; + onMouseUpCapture?: React.MouseEventHandler | undefined; + onSelect?: React.ReactEventHandler | undefined; + onSelectCapture?: React.ReactEventHandler | undefined; + onTouchCancel?: React.TouchEventHandler | undefined; + onTouchCancelCapture?: React.TouchEventHandler | undefined; + onTouchEnd?: React.TouchEventHandler | undefined; + onTouchEndCapture?: React.TouchEventHandler | undefined; + onTouchMove?: React.TouchEventHandler | undefined; + onTouchMoveCapture?: React.TouchEventHandler | undefined; + onTouchStart?: React.TouchEventHandler | undefined; + onTouchStartCapture?: React.TouchEventHandler | undefined; + onPointerDown?: React.PointerEventHandler | undefined; + onPointerDownCapture?: React.PointerEventHandler | undefined; + onPointerMove?: React.PointerEventHandler | undefined; + onPointerMoveCapture?: React.PointerEventHandler | undefined; + onPointerUp?: React.PointerEventHandler | undefined; + onPointerUpCapture?: React.PointerEventHandler | undefined; + onPointerCancel?: React.PointerEventHandler | undefined; + onPointerCancelCapture?: React.PointerEventHandler | undefined; + onPointerEnter?: React.PointerEventHandler | undefined; + onPointerEnterCapture?: React.PointerEventHandler | undefined; + onPointerLeave?: React.PointerEventHandler | undefined; + onPointerLeaveCapture?: React.PointerEventHandler | undefined; + onPointerOver?: React.PointerEventHandler | undefined; + onPointerOverCapture?: React.PointerEventHandler | undefined; + onPointerOut?: React.PointerEventHandler | undefined; + onPointerOutCapture?: React.PointerEventHandler | undefined; + onGotPointerCapture?: React.PointerEventHandler | undefined; + onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; + onLostPointerCapture?: React.PointerEventHandler | undefined; + onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; + onScroll?: React.UIEventHandler | undefined; + onScrollCapture?: React.UIEventHandler | undefined; + onWheel?: React.WheelEventHandler | undefined; + onWheelCapture?: React.WheelEventHandler | undefined; + onAnimationStart?: React.AnimationEventHandler | undefined; + onAnimationStartCapture?: React.AnimationEventHandler | undefined; + onAnimationEnd?: React.AnimationEventHandler | undefined; + onAnimationEndCapture?: React.AnimationEventHandler | undefined; + onAnimationIteration?: React.AnimationEventHandler | undefined; + onAnimationIterationCapture?: React.AnimationEventHandler | undefined; + onTransitionEnd?: React.TransitionEventHandler | undefined; + onTransitionEndCapture?: React.TransitionEventHandler | undefined; + className: string; +}, HTMLElement>; +export interface ListItemProps extends React.HTMLAttributes { + as?: 'li' | 'div'; +} +export declare function ListItem({ as, children, className, ...restProps }: ListItemProps): React.DetailedReactHTMLElement<{ + defaultChecked?: boolean | undefined; + defaultValue?: string | number | readonly string[] | undefined; + suppressContentEditableWarning?: boolean | undefined; + suppressHydrationWarning?: boolean | undefined; + accessKey?: string | undefined; + contentEditable?: (boolean | "true" | "false") | "inherit" | undefined; + contextMenu?: string | undefined; + dir?: string | undefined; + draggable?: (boolean | "true" | "false") | undefined; + hidden?: boolean | undefined; + id?: string | undefined; + lang?: string | undefined; + nonce?: string | undefined; + placeholder?: string | undefined; + slot?: string | undefined; + spellCheck?: (boolean | "true" | "false") | undefined; + style?: React.CSSProperties | undefined; + tabIndex?: number | undefined; + title?: string | undefined; + translate?: "yes" | "no" | undefined; + radioGroup?: string | undefined; + role?: React.AriaRole | undefined; + about?: string | undefined; + datatype?: string | undefined; + inlist?: any; + prefix?: string | undefined; + property?: string | undefined; + resource?: string | undefined; + typeof?: string | undefined; + vocab?: string | undefined; + autoCapitalize?: string | undefined; + autoCorrect?: string | undefined; + autoSave?: string | undefined; + color?: string | undefined; + itemProp?: string | undefined; + itemScope?: boolean | undefined; + itemType?: string | undefined; + itemID?: string | undefined; + itemRef?: string | undefined; + results?: number | undefined; + security?: string | undefined; + unselectable?: "on" | "off" | undefined; + inputMode?: "url" | "search" | "text" | "none" | "tel" | "email" | "numeric" | "decimal" | undefined; + is?: string | undefined; + 'aria-activedescendant'?: string | undefined; + 'aria-atomic'?: (boolean | "true" | "false") | undefined; + 'aria-autocomplete'?: "list" | "none" | "both" | "inline" | undefined; + 'aria-busy'?: (boolean | "true" | "false") | undefined; + 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-colcount'?: number | undefined; + 'aria-colindex'?: number | undefined; + 'aria-colspan'?: number | undefined; + 'aria-controls'?: string | undefined; + 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "date" | "location" | undefined; + 'aria-describedby'?: string | undefined; + 'aria-details'?: string | undefined; + 'aria-disabled'?: (boolean | "true" | "false") | undefined; + 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined; + 'aria-errormessage'?: string | undefined; + 'aria-expanded'?: (boolean | "true" | "false") | undefined; + 'aria-flowto'?: string | undefined; + 'aria-grabbed'?: (boolean | "true" | "false") | undefined; + 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined; + 'aria-hidden'?: (boolean | "true" | "false") | undefined; + 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined; + 'aria-keyshortcuts'?: string | undefined; + 'aria-label'?: string | undefined; + 'aria-labelledby'?: string | undefined; + 'aria-level'?: number | undefined; + 'aria-live'?: "off" | "assertive" | "polite" | undefined; + 'aria-modal'?: (boolean | "true" | "false") | undefined; + 'aria-multiline'?: (boolean | "true" | "false") | undefined; + 'aria-multiselectable'?: (boolean | "true" | "false") | undefined; + 'aria-orientation'?: "horizontal" | "vertical" | undefined; + 'aria-owns'?: string | undefined; + 'aria-placeholder'?: string | undefined; + 'aria-posinset'?: number | undefined; + 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-readonly'?: (boolean | "true" | "false") | undefined; + 'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined; + 'aria-required'?: (boolean | "true" | "false") | undefined; + 'aria-roledescription'?: string | undefined; + 'aria-rowcount'?: number | undefined; + 'aria-rowindex'?: number | undefined; + 'aria-rowspan'?: number | undefined; + 'aria-selected'?: (boolean | "true" | "false") | undefined; + 'aria-setsize'?: number | undefined; + 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined; + 'aria-valuemax'?: number | undefined; + 'aria-valuemin'?: number | undefined; + 'aria-valuenow'?: number | undefined; + 'aria-valuetext'?: string | undefined; + dangerouslySetInnerHTML?: { + __html: string; + } | undefined; + onCopy?: React.ClipboardEventHandler | undefined; + onCopyCapture?: React.ClipboardEventHandler | undefined; + onCut?: React.ClipboardEventHandler | undefined; + onCutCapture?: React.ClipboardEventHandler | undefined; + onPaste?: React.ClipboardEventHandler | undefined; + onPasteCapture?: React.ClipboardEventHandler | undefined; + onCompositionEnd?: React.CompositionEventHandler | undefined; + onCompositionEndCapture?: React.CompositionEventHandler | undefined; + onCompositionStart?: React.CompositionEventHandler | undefined; + onCompositionStartCapture?: React.CompositionEventHandler | undefined; + onCompositionUpdate?: React.CompositionEventHandler | undefined; + onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; + onFocus?: React.FocusEventHandler | undefined; + onFocusCapture?: React.FocusEventHandler | undefined; + onBlur?: React.FocusEventHandler | undefined; + onBlurCapture?: React.FocusEventHandler | undefined; + onChange?: React.FormEventHandler | undefined; + onChangeCapture?: React.FormEventHandler | undefined; + onBeforeInput?: React.FormEventHandler | undefined; + onBeforeInputCapture?: React.FormEventHandler | undefined; + onInput?: React.FormEventHandler | undefined; + onInputCapture?: React.FormEventHandler | undefined; + onReset?: React.FormEventHandler | undefined; + onResetCapture?: React.FormEventHandler | undefined; + onSubmit?: React.FormEventHandler | undefined; + onSubmitCapture?: React.FormEventHandler | undefined; + onInvalid?: React.FormEventHandler | undefined; + onInvalidCapture?: React.FormEventHandler | undefined; + onLoad?: React.ReactEventHandler | undefined; + onLoadCapture?: React.ReactEventHandler | undefined; + onError?: React.ReactEventHandler | undefined; + onErrorCapture?: React.ReactEventHandler | undefined; + onKeyDown?: React.KeyboardEventHandler | undefined; + onKeyDownCapture?: React.KeyboardEventHandler | undefined; + onKeyPress?: React.KeyboardEventHandler | undefined; + onKeyPressCapture?: React.KeyboardEventHandler | undefined; + onKeyUp?: React.KeyboardEventHandler | undefined; + onKeyUpCapture?: React.KeyboardEventHandler | undefined; + onAbort?: React.ReactEventHandler | undefined; + onAbortCapture?: React.ReactEventHandler | undefined; + onCanPlay?: React.ReactEventHandler | undefined; + onCanPlayCapture?: React.ReactEventHandler | undefined; + onCanPlayThrough?: React.ReactEventHandler | undefined; + onCanPlayThroughCapture?: React.ReactEventHandler | undefined; + onDurationChange?: React.ReactEventHandler | undefined; + onDurationChangeCapture?: React.ReactEventHandler | undefined; + onEmptied?: React.ReactEventHandler | undefined; + onEmptiedCapture?: React.ReactEventHandler | undefined; + onEncrypted?: React.ReactEventHandler | undefined; + onEncryptedCapture?: React.ReactEventHandler | undefined; + onEnded?: React.ReactEventHandler | undefined; + onEndedCapture?: React.ReactEventHandler | undefined; + onLoadedData?: React.ReactEventHandler | undefined; + onLoadedDataCapture?: React.ReactEventHandler | undefined; + onLoadedMetadata?: React.ReactEventHandler | undefined; + onLoadedMetadataCapture?: React.ReactEventHandler | undefined; + onLoadStart?: React.ReactEventHandler | undefined; + onLoadStartCapture?: React.ReactEventHandler | undefined; + onPause?: React.ReactEventHandler | undefined; + onPauseCapture?: React.ReactEventHandler | undefined; + onPlay?: React.ReactEventHandler | undefined; + onPlayCapture?: React.ReactEventHandler | undefined; + onPlaying?: React.ReactEventHandler | undefined; + onPlayingCapture?: React.ReactEventHandler | undefined; + onProgress?: React.ReactEventHandler | undefined; + onProgressCapture?: React.ReactEventHandler | undefined; + onRateChange?: React.ReactEventHandler | undefined; + onRateChangeCapture?: React.ReactEventHandler | undefined; + onResize?: React.ReactEventHandler | undefined; + onResizeCapture?: React.ReactEventHandler | undefined; + onSeeked?: React.ReactEventHandler | undefined; + onSeekedCapture?: React.ReactEventHandler | undefined; + onSeeking?: React.ReactEventHandler | undefined; + onSeekingCapture?: React.ReactEventHandler | undefined; + onStalled?: React.ReactEventHandler | undefined; + onStalledCapture?: React.ReactEventHandler | undefined; + onSuspend?: React.ReactEventHandler | undefined; + onSuspendCapture?: React.ReactEventHandler | undefined; + onTimeUpdate?: React.ReactEventHandler | undefined; + onTimeUpdateCapture?: React.ReactEventHandler | undefined; + onVolumeChange?: React.ReactEventHandler | undefined; + onVolumeChangeCapture?: React.ReactEventHandler | undefined; + onWaiting?: React.ReactEventHandler | undefined; + onWaitingCapture?: React.ReactEventHandler | undefined; + onAuxClick?: React.MouseEventHandler | undefined; + onAuxClickCapture?: React.MouseEventHandler | undefined; + onClick?: React.MouseEventHandler | undefined; + onClickCapture?: React.MouseEventHandler | undefined; + onContextMenu?: React.MouseEventHandler | undefined; + onContextMenuCapture?: React.MouseEventHandler | undefined; + onDoubleClick?: React.MouseEventHandler | undefined; + onDoubleClickCapture?: React.MouseEventHandler | undefined; + onDrag?: React.DragEventHandler | undefined; + onDragCapture?: React.DragEventHandler | undefined; + onDragEnd?: React.DragEventHandler | undefined; + onDragEndCapture?: React.DragEventHandler | undefined; + onDragEnter?: React.DragEventHandler | undefined; + onDragEnterCapture?: React.DragEventHandler | undefined; + onDragExit?: React.DragEventHandler | undefined; + onDragExitCapture?: React.DragEventHandler | undefined; + onDragLeave?: React.DragEventHandler | undefined; + onDragLeaveCapture?: React.DragEventHandler | undefined; + onDragOver?: React.DragEventHandler | undefined; + onDragOverCapture?: React.DragEventHandler | undefined; + onDragStart?: React.DragEventHandler | undefined; + onDragStartCapture?: React.DragEventHandler | undefined; + onDrop?: React.DragEventHandler | undefined; + onDropCapture?: React.DragEventHandler | undefined; + onMouseDown?: React.MouseEventHandler | undefined; + onMouseDownCapture?: React.MouseEventHandler | undefined; + onMouseEnter?: React.MouseEventHandler | undefined; + onMouseLeave?: React.MouseEventHandler | undefined; + onMouseMove?: React.MouseEventHandler | undefined; + onMouseMoveCapture?: React.MouseEventHandler | undefined; + onMouseOut?: React.MouseEventHandler | undefined; + onMouseOutCapture?: React.MouseEventHandler | undefined; + onMouseOver?: React.MouseEventHandler | undefined; + onMouseOverCapture?: React.MouseEventHandler | undefined; + onMouseUp?: React.MouseEventHandler | undefined; + onMouseUpCapture?: React.MouseEventHandler | undefined; + onSelect?: React.ReactEventHandler | undefined; + onSelectCapture?: React.ReactEventHandler | undefined; + onTouchCancel?: React.TouchEventHandler | undefined; + onTouchCancelCapture?: React.TouchEventHandler | undefined; + onTouchEnd?: React.TouchEventHandler | undefined; + onTouchEndCapture?: React.TouchEventHandler | undefined; + onTouchMove?: React.TouchEventHandler | undefined; + onTouchMoveCapture?: React.TouchEventHandler | undefined; + onTouchStart?: React.TouchEventHandler | undefined; + onTouchStartCapture?: React.TouchEventHandler | undefined; + onPointerDown?: React.PointerEventHandler | undefined; + onPointerDownCapture?: React.PointerEventHandler | undefined; + onPointerMove?: React.PointerEventHandler | undefined; + onPointerMoveCapture?: React.PointerEventHandler | undefined; + onPointerUp?: React.PointerEventHandler | undefined; + onPointerUpCapture?: React.PointerEventHandler | undefined; + onPointerCancel?: React.PointerEventHandler | undefined; + onPointerCancelCapture?: React.PointerEventHandler | undefined; + onPointerEnter?: React.PointerEventHandler | undefined; + onPointerEnterCapture?: React.PointerEventHandler | undefined; + onPointerLeave?: React.PointerEventHandler | undefined; + onPointerLeaveCapture?: React.PointerEventHandler | undefined; + onPointerOver?: React.PointerEventHandler | undefined; + onPointerOverCapture?: React.PointerEventHandler | undefined; + onPointerOut?: React.PointerEventHandler | undefined; + onPointerOutCapture?: React.PointerEventHandler | undefined; + onGotPointerCapture?: React.PointerEventHandler | undefined; + onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; + onLostPointerCapture?: React.PointerEventHandler | undefined; + onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; + onScroll?: React.UIEventHandler | undefined; + onScrollCapture?: React.UIEventHandler | undefined; + onWheel?: React.WheelEventHandler | undefined; + onWheelCapture?: React.WheelEventHandler | undefined; + onAnimationStart?: React.AnimationEventHandler | undefined; + onAnimationStartCapture?: React.AnimationEventHandler | undefined; + onAnimationEnd?: React.AnimationEventHandler | undefined; + onAnimationEndCapture?: React.AnimationEventHandler | undefined; + onAnimationIteration?: React.AnimationEventHandler | undefined; + onAnimationIterationCapture?: React.AnimationEventHandler | undefined; + onTransitionEnd?: React.TransitionEventHandler | undefined; + onTransitionEndCapture?: React.TransitionEventHandler | undefined; + className: string; +}, HTMLElement>; +export default List; diff --git a/dist/generics/List.js b/dist/generics/List.js new file mode 100644 index 0000000..87fb43b --- /dev/null +++ b/dist/generics/List.js @@ -0,0 +1,42 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.ListItem = exports.List = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +function List(_a) { + var _b = _a.as, as = _b === void 0 ? 'ul' : _b, children = _a.children, className = _a.className, restProps = __rest(_a, ["as", "children", "className"]); + return react_1["default"].createElement(as, __assign({ className: (0, clsx_1["default"])('jpk-list', className) }, restProps), children); +} +exports.List = List; +function ListItem(_a) { + var _b = _a.as, as = _b === void 0 ? 'li' : _b, children = _a.children, className = _a.className, restProps = __rest(_a, ["as", "children", "className"]); + return react_1["default"].createElement(as, __assign({ className: (0, clsx_1["default"])('jpk-list__item', className) }, restProps), children); +} +exports.ListItem = ListItem; +exports["default"] = List; +//# sourceMappingURL=List.js.map \ No newline at end of file diff --git a/dist/generics/List.js.map b/dist/generics/List.js.map new file mode 100644 index 0000000..4ccdc42 --- /dev/null +++ b/dist/generics/List.js.map @@ -0,0 +1 @@ +{"version":3,"file":"List.js","sourceRoot":"","sources":["../../../src/generics/List.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA0B;AAO1B,SAAgB,IAAI,CAAC,EAKT;IAJV,IAAA,UAAS,EAAT,EAAE,mBAAG,IAAI,KAAA,EACT,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAJO,+BAKpB,CADa;IAEZ,OAAO,kBAAK,CAAC,aAAa,CACxB,EAAE,aAEA,SAAS,EAAE,IAAA,iBAAI,EAAC,UAAU,EAAE,SAAS,CAAC,IACnC,SAAS,GAEd,QAAQ,CACT,CAAC;AACJ,CAAC;AAdD,oBAcC;AAMD,SAAgB,QAAQ,CAAC,EAKT;IAJd,IAAA,UAAS,EAAT,EAAE,mBAAG,IAAI,KAAA,EACT,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAJW,+BAKxB,CADa;IAEZ,OAAO,kBAAK,CAAC,aAAa,CACxB,EAAE,aAEA,SAAS,EAAE,IAAA,iBAAI,EAAC,gBAAgB,EAAE,SAAS,CAAC,IACzC,SAAS,GAEd,QAAQ,CACT,CAAC;AACJ,CAAC;AAdD,4BAcC;AAED,qBAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/dist/generics/Pagination.d.ts b/dist/generics/Pagination.d.ts new file mode 100644 index 0000000..cb60eb6 --- /dev/null +++ b/dist/generics/Pagination.d.ts @@ -0,0 +1,18 @@ +import React from 'react'; +type Props = { + current: number; + className?: string; + labels?: { + first?: string; + prev?: string; + next?: string; + last?: string; + }; + pageSize: number; + style?: React.CSSProperties; + total: number; + variant?: 'standard'; + onSelect?: (page: number) => void; +}; +export declare function Pagination({ current, className, labels, pageSize, style, total, onSelect, }: Props): JSX.Element | null; +export default Pagination; diff --git a/dist/generics/Pagination.js b/dist/generics/Pagination.js new file mode 100644 index 0000000..676918e --- /dev/null +++ b/dist/generics/Pagination.js @@ -0,0 +1,34 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Pagination = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +function Pagination(_a) { + var current = _a.current, className = _a.className, _b = _a.labels, labels = _b === void 0 ? { + first: 'First', + prev: 'Prev', + next: 'Next', + last: 'Last' + } : _b, pageSize = _a.pageSize, style = _a.style, total = _a.total, _c = _a.onSelect, onSelect = _c === void 0 ? function () { } : _c; + var pages = Math.ceil(total / pageSize); + var handlePrev = function () { + onSelect(current - 1); + }; + var handleNext = function () { + onSelect(current + 1); + }; + if (!total) + return null; + return (react_1["default"].createElement("div", { style: style, className: (0, clsx_1["default"])('jpk-pagination', className) }, + react_1["default"].createElement("button", { className: 'jpk-pagination__nav jpk-pagination__nav__first', disabled: current === 1, onClick: function () { return onSelect(1); } }, labels.first), + react_1["default"].createElement("button", { className: 'jpk-pagination__nav jpk-pagination__nav__prev', disabled: current === 1, onClick: handlePrev }, labels.prev), + Array.from(Array(pages).keys()).map(function (pageIndex) { return (react_1["default"].createElement("button", { key: pageIndex, className: (0, clsx_1["default"])('jpk-pagination__item', "jpk-pagination__item__".concat(pageIndex + 1), current === pageIndex + 1 && 'jpk-pagination__item--current'), onClick: function () { return onSelect(pageIndex + 1); } }, pageIndex + 1)); }), + react_1["default"].createElement("button", { className: 'jpk-pagination__nav jpk-pagination__nav__next', disabled: current === pages, onClick: handleNext }, labels.next), + react_1["default"].createElement("button", { className: 'jpk-pagination__nav jpk-pagination__nav__last', disabled: current === pages, onClick: function () { return onSelect(pages); } }, labels.last))); +} +exports.Pagination = Pagination; +exports["default"] = Pagination; +//# sourceMappingURL=Pagination.js.map \ No newline at end of file diff --git a/dist/generics/Pagination.js.map b/dist/generics/Pagination.js.map new file mode 100644 index 0000000..0fff10a --- /dev/null +++ b/dist/generics/Pagination.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pagination.js","sourceRoot":"","sources":["../../../src/generics/Pagination.tsx"],"names":[],"mappings":";;;;;;AAAA,8CAAwB;AACxB,gDAA0B;AAkB1B,SAAgB,UAAU,CAAC,EAanB;QAZN,OAAO,aAAA,EACP,SAAS,eAAA,EACT,cAKC,EALD,MAAM,mBAAG;QACP,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;KACb,KAAA,EACD,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,KAAK,WAAA,EACL,gBAAmB,EAAnB,QAAQ,mBAAG,cAAO,CAAC,KAAA;IAEnB,IAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC;IAE1C,IAAM,UAAU,GAAG;QACjB,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,IAAM,UAAU,GAAG;QACjB,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IAExB,OAAO,CACL,0CAAK,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,IAAA,iBAAI,EAAC,gBAAgB,EAAE,SAAS,CAAC;QAC7D,6CACE,SAAS,EAAC,gDAAgD,EAC1D,QAAQ,EAAE,OAAO,KAAK,CAAC,EACvB,OAAO,EAAE,cAAM,OAAA,QAAQ,CAAC,CAAC,CAAC,EAAX,CAAW,IAEzB,MAAM,CAAC,KAAK,CACN;QACT,6CACE,SAAS,EAAC,+CAA+C,EACzD,QAAQ,EAAE,OAAO,KAAK,CAAC,EACvB,OAAO,EAAE,UAAU,IAElB,MAAM,CAAC,IAAI,CACL;QAER,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,UAAC,SAAc,IAAK,OAAA,CACvD,6CACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,IAAA,iBAAI,EACb,sBAAsB,EACtB,gCAAyB,SAAS,GAAG,CAAC,CAAE,EACxC,OAAO,KAAK,SAAS,GAAG,CAAC,IAAI,+BAA+B,CAC7D,EACD,OAAO,EAAE,cAAM,OAAA,QAAQ,CAAC,SAAS,GAAG,CAAC,CAAC,EAAvB,CAAuB,IAErC,SAAS,GAAG,CAAC,CACP,CACV,EAZwD,CAYxD,CAAC;QAEF,6CACE,SAAS,EAAC,+CAA+C,EACzD,QAAQ,EAAE,OAAO,KAAK,KAAK,EAC3B,OAAO,EAAE,UAAU,IAElB,MAAM,CAAC,IAAI,CACL;QACT,6CACE,SAAS,EAAC,+CAA+C,EACzD,QAAQ,EAAE,OAAO,KAAK,KAAK,EAC3B,OAAO,EAAE,cAAM,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe,IAE7B,MAAM,CAAC,IAAI,CACL,CACL,CACP,CAAC;AACJ,CAAC;AAzED,gCAyEC;AAED,qBAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/dist/generics/Radio.d.ts b/dist/generics/Radio.d.ts new file mode 100644 index 0000000..0a476ce --- /dev/null +++ b/dist/generics/Radio.d.ts @@ -0,0 +1,16 @@ +import React, { CSSProperties } from 'react'; +interface Style extends CSSProperties { + input?: CSSProperties; + label?: CSSProperties; +} +export interface RadioProps extends React.InputHTMLAttributes { + checked?: boolean; + className?: string; + disabled?: boolean; + label?: string; + name?: string; + style?: Style; + value?: string; +} +export declare function Radio({ checked, className, disabled, label, name, style, value, ...restProps }: RadioProps): JSX.Element; +export default Radio; diff --git a/dist/generics/Radio.js b/dist/generics/Radio.js new file mode 100644 index 0000000..a30982c --- /dev/null +++ b/dist/generics/Radio.js @@ -0,0 +1,40 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Radio = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +var mixins_1 = require("../utils/mixins"); +function Radio(_a) { + var _b = _a.checked, checked = _b === void 0 ? false : _b, className = _a.className, _c = _a.disabled, disabled = _c === void 0 ? false : _c, label = _a.label, name = _a.name, style = _a.style, value = _a.value, restProps = __rest(_a, ["checked", "className", "disabled", "label", "name", "style", "value"]); + return (react_1["default"].createElement("div", { className: (0, clsx_1["default"])('jpk-radio', checked && 'jpk-radio--checked', disabled && 'jpk-radio--disabled', className), style: (0, mixins_1.omit)(style, 'input', 'label') }, + react_1["default"].createElement("input", __assign({}, restProps, { checked: checked, className: 'jpk-radio__input', disabled: disabled, name: name, style: style === null || style === void 0 ? void 0 : style.input, type: 'radio', value: value })), + label && (react_1["default"].createElement("label", { htmlFor: name, className: 'jpk-radio__label', style: style === null || style === void 0 ? void 0 : style.label }, label)))); +} +exports.Radio = Radio; +exports["default"] = Radio; +//# sourceMappingURL=Radio.js.map \ No newline at end of file diff --git a/dist/generics/Radio.js.map b/dist/generics/Radio.js.map new file mode 100644 index 0000000..54bb8e7 --- /dev/null +++ b/dist/generics/Radio.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/generics/Radio.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA6C;AAC7C,0CAAuC;AAkBvC,SAAgB,KAAK,CAAC,EAST;IARX,IAAA,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA,EACf,SAAS,eAAA,EACT,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,KAAK,WAAA,EACF,SAAS,cARQ,uEASrB,CADa;IAEZ,OAAO,CACL,0CACE,SAAS,EAAE,IAAA,iBAAI,EACb,WAAW,EACX,OAAO,IAAI,oBAAoB,EAC/B,QAAQ,IAAI,qBAAqB,EACjC,SAAS,CACV,EACD,KAAK,EAAE,IAAA,aAAI,EAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;QAEpC,uDACM,SAAS,IACb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,kBAAkB,EAC5B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EACnB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,IACZ;QACD,KAAK,IAAI,CACR,4CAAO,OAAO,EAAE,IAAI,EAAE,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,IACnE,KAAK,CACA,CACT,CACG,CACP,CAAC;AACJ,CAAC;AArCD,sBAqCC;AAED,qBAAe,KAAK,CAAC"} \ No newline at end of file diff --git a/dist/generics/RangeInput.d.ts b/dist/generics/RangeInput.d.ts new file mode 100644 index 0000000..a12f00f --- /dev/null +++ b/dist/generics/RangeInput.d.ts @@ -0,0 +1,6 @@ +import React from 'react'; +export interface RangeInputProps extends React.InputHTMLAttributes { + className?: string; +} +export declare function RangeInput({ className, ...restProps }: RangeInputProps): JSX.Element; +export default RangeInput; diff --git a/dist/generics/RangeInput.js b/dist/generics/RangeInput.js new file mode 100644 index 0000000..dbead01 --- /dev/null +++ b/dist/generics/RangeInput.js @@ -0,0 +1,37 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.RangeInput = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +function RangeInput(_a) { + var className = _a.className, restProps = __rest(_a, ["className"]); + return (react_1["default"].createElement("input", __assign({}, restProps, { className: (0, clsx_1["default"])('jpk-range-input', className), type: 'range' }))); +} +exports.RangeInput = RangeInput; +exports["default"] = RangeInput; +//# sourceMappingURL=RangeInput.js.map \ No newline at end of file diff --git a/dist/generics/RangeInput.js.map b/dist/generics/RangeInput.js.map new file mode 100644 index 0000000..a5e6033 --- /dev/null +++ b/dist/generics/RangeInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RangeInput.js","sourceRoot":"","sources":["../../../src/generics/RangeInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA0B;AAS1B,SAAgB,UAAU,CAAC,EAA4C;IAA1C,IAAA,SAAS,eAAA,EAAK,SAAS,cAAzB,aAA2B,CAAF;IAClD,OAAO,CACL,uDACM,SAAS,IACb,SAAS,EAAE,IAAA,iBAAI,EAAC,iBAAiB,EAAE,SAAS,CAAC,EAC7C,IAAI,EAAC,OAAO,IACZ,CACH,CAAC;AACJ,CAAC;AARD,gCAQC;AAED,qBAAe,UAAU,CAAC"} \ No newline at end of file diff --git a/dist/generics/SearchInput.d.ts b/dist/generics/SearchInput.d.ts new file mode 100644 index 0000000..d22b9c2 --- /dev/null +++ b/dist/generics/SearchInput.d.ts @@ -0,0 +1,14 @@ +import React, { CSSProperties } from 'react'; +interface Style extends CSSProperties { + input?: CSSProperties; + button?: CSSProperties; +} +export interface SearchInputProps extends React.InputHTMLAttributes { + action?: string; + className?: string; + name?: string; + style?: Style; + onSubmit?: () => void; +} +export declare function SearchInput({ action, className, disabled, name, style, onSubmit, ...restProps }: SearchInputProps): JSX.Element; +export default SearchInput; diff --git a/dist/generics/SearchInput.js b/dist/generics/SearchInput.js new file mode 100644 index 0000000..723d294 --- /dev/null +++ b/dist/generics/SearchInput.js @@ -0,0 +1,40 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.SearchInput = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +var mixins_1 = require("../utils/mixins"); +function SearchInput(_a) { + var action = _a.action, className = _a.className, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.name, name = _c === void 0 ? 'q' : _c, style = _a.style, onSubmit = _a.onSubmit, restProps = __rest(_a, ["action", "className", "disabled", "name", "style", "onSubmit"]); + return (react_1["default"].createElement("form", { action: action, className: (0, clsx_1["default"])('jpk-search-input', disabled && 'jpk-search-input--disabled', className), style: (0, mixins_1.omit)(style, 'input', 'button') }, + react_1["default"].createElement("input", __assign({}, restProps, { "aria-label": 'Search', autoComplete: 'off', className: 'jpk-search-input__input', disabled: disabled, name: name, style: style === null || style === void 0 ? void 0 : style.input, type: 'search' })), + react_1["default"].createElement("button", { className: 'jpk-search-input__btn', type: 'submit', disabled: disabled, style: style === null || style === void 0 ? void 0 : style.button, onClick: onSubmit }, "Search"))); +} +exports.SearchInput = SearchInput; +exports["default"] = SearchInput; +//# sourceMappingURL=SearchInput.js.map \ No newline at end of file diff --git a/dist/generics/SearchInput.js.map b/dist/generics/SearchInput.js.map new file mode 100644 index 0000000..efbc972 --- /dev/null +++ b/dist/generics/SearchInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SearchInput.js","sourceRoot":"","sources":["../../../src/generics/SearchInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA6C;AAC7C,0CAAuC;AAkBvC,SAAgB,WAAW,CAAC,EAQT;IAPjB,IAAA,MAAM,YAAA,EACN,SAAS,eAAA,EACT,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,YAAU,EAAV,IAAI,mBAAG,GAAG,KAAA,EACV,KAAK,WAAA,EACL,QAAQ,cAAA,EACL,SAAS,cAPc,gEAQ3B,CADa;IAEZ,OAAO,CACL,2CACE,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,IAAA,iBAAI,EACb,kBAAkB,EAClB,QAAQ,IAAI,4BAA4B,EACxC,SAAS,CACV,EACD,KAAK,EAAE,IAAA,aAAI,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;QAErC,uDACM,SAAS,kBACF,QAAQ,EACnB,YAAY,EAAC,KAAK,EAClB,SAAS,EAAC,yBAAyB,EACnC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EACnB,IAAI,EAAC,QAAQ,IACb;QACF,6CACE,SAAS,EAAC,uBAAuB,EACjC,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,EACpB,OAAO,EAAE,QAAQ,aAGV,CACJ,CACR,CAAC;AACJ,CAAC;AAxCD,kCAwCC;AAED,qBAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/dist/generics/Select.d.ts b/dist/generics/Select.d.ts new file mode 100644 index 0000000..525858b --- /dev/null +++ b/dist/generics/Select.d.ts @@ -0,0 +1,17 @@ +import React, { CSSProperties } from 'react'; +interface Style extends CSSProperties { + select?: CSSProperties; + option?: CSSProperties; + label?: CSSProperties; +} +export type Option = { + label: string; + value: string; +}; +export interface SelectProps extends React.SelectHTMLAttributes { + label?: string; + options: Option[]; + style?: Style; +} +export declare function Select({ className, disabled, label, name, options, style, value, ...restProps }: SelectProps): JSX.Element; +export default Select; diff --git a/dist/generics/Select.js b/dist/generics/Select.js new file mode 100644 index 0000000..58635b4 --- /dev/null +++ b/dist/generics/Select.js @@ -0,0 +1,40 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Select = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +var mixins_1 = require("../utils/mixins"); +function Select(_a) { + var className = _a.className, disabled = _a.disabled, label = _a.label, name = _a.name, _b = _a.options, options = _b === void 0 ? [] : _b, style = _a.style, value = _a.value, restProps = __rest(_a, ["className", "disabled", "label", "name", "options", "style", "value"]); + return (react_1["default"].createElement("div", { className: (0, clsx_1["default"])('jpk-select', disabled && 'jpk-select--disabled', className), style: (0, mixins_1.omit)(style, 'select', 'option', 'label') }, + label && (react_1["default"].createElement("label", { className: 'jpk-select__label', htmlFor: name, style: style === null || style === void 0 ? void 0 : style.label }, label)), + react_1["default"].createElement("select", __assign({ className: 'jpk-select__menu', disabled: disabled, name: name, style: style === null || style === void 0 ? void 0 : style.select, value: value }, restProps), options.map(function (opt) { return (react_1["default"].createElement("option", { className: 'jpk-select__menu__item', key: opt.value, value: opt.value, style: style === null || style === void 0 ? void 0 : style.option }, opt.label)); })))); +} +exports.Select = Select; +exports["default"] = Select; +//# sourceMappingURL=Select.js.map \ No newline at end of file diff --git a/dist/generics/Select.js.map b/dist/generics/Select.js.map new file mode 100644 index 0000000..3f1e030 --- /dev/null +++ b/dist/generics/Select.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/generics/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA6C;AAC7C,0CAAuC;AAiBvC,SAAgB,MAAM,CAAC,EAST;IARZ,IAAA,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,eAAY,EAAZ,OAAO,mBAAG,EAAE,KAAA,EACZ,KAAK,WAAA,EACL,KAAK,WAAA,EACF,SAAS,cARS,uEAStB,CADa;IAEZ,OAAO,CACL,0CACE,SAAS,EAAE,IAAA,iBAAI,EACb,YAAY,EACZ,QAAQ,IAAI,sBAAsB,EAClC,SAAS,CACV,EACD,KAAK,EAAE,IAAA,aAAI,EAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC;QAE9C,KAAK,IAAI,CACR,4CACE,SAAS,EAAC,mBAAmB,EAC7B,OAAO,EAAE,IAAI,EACb,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,IAElB,KAAK,CACA,CACT;QACD,sDACE,SAAS,EAAC,kBAAkB,EAC5B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,EACpB,KAAK,EAAE,KAAK,IACR,SAAS,GAEZ,OAAO,CAAC,GAAG,CAAC,UAAC,GAAW,IAAK,OAAA,CAC5B,6CACE,SAAS,EAAC,wBAAwB,EAClC,GAAG,EAAE,GAAG,CAAC,KAAK,EACd,KAAK,EAAE,GAAG,CAAC,KAAK,EAChB,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,IAEnB,GAAG,CAAC,KAAK,CACH,CACV,EAT6B,CAS7B,CAAC,CACK,CACL,CACP,CAAC;AACJ,CAAC;AAjDD,wBAiDC;AAED,qBAAe,MAAM,CAAC"} \ No newline at end of file diff --git a/dist/generics/Table.d.ts b/dist/generics/Table.d.ts new file mode 100644 index 0000000..86c56e7 --- /dev/null +++ b/dist/generics/Table.d.ts @@ -0,0 +1,25 @@ +import React from 'react'; +import { BlockVariant } from '../layout/Block'; +export declare const TableHeader: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +export declare const TableRow: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +export declare const TableColHead: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +export declare const TableBody: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +export declare const TableCell: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +export declare const TableFooter: ({ children, className, ...restProps }: React.HTMLAttributes) => JSX.Element; +type Column = { + label: string; +}; +type Row = { + value: string; + wrapper?: BlockVariant; +}; +type Rows = Row[]; +export interface TableProps extends React.HTMLAttributes { + children?: React.ReactNode; + data?: null | { + columns: Column[]; + rows: Rows[]; + }; +} +export declare const Table: ({ children, data, className, ...restProps }: TableProps) => JSX.Element; +export default Table; diff --git a/dist/generics/Table.js b/dist/generics/Table.js new file mode 100644 index 0000000..2eeff2d --- /dev/null +++ b/dist/generics/Table.js @@ -0,0 +1,81 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Table = exports.TableFooter = exports.TableCell = exports.TableBody = exports.TableColHead = exports.TableRow = exports.TableHeader = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +// @todo: improve props to be exact +var TableHeader = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (react_1["default"].createElement("thead", __assign({}, restProps, { className: (0, clsx_1["default"])('jpk-table__header', className) }), children)); +}; +exports.TableHeader = TableHeader; +var TableRow = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (react_1["default"].createElement("tr", __assign({}, restProps, { className: (0, clsx_1["default"])('jpk-table__row', className) }), children)); +}; +exports.TableRow = TableRow; +var TableColHead = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (react_1["default"].createElement("th", __assign({}, restProps, { className: (0, clsx_1["default"])('jpk-table__col-head', className) }), children)); +}; +exports.TableColHead = TableColHead; +var TableBody = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (react_1["default"].createElement("tbody", __assign({}, restProps, { className: (0, clsx_1["default"])('jpk-table__body', className) }), children)); +}; +exports.TableBody = TableBody; +var TableCell = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (react_1["default"].createElement("td", __assign({}, restProps, { className: (0, clsx_1["default"])('jpk-table__cell', className) }), children)); +}; +exports.TableCell = TableCell; +var TableFooter = function (_a) { + var children = _a.children, className = _a.className, restProps = __rest(_a, ["children", "className"]); + return (react_1["default"].createElement("tfoot", __assign({}, restProps, { className: (0, clsx_1["default"])('jpk-table__footer', className) }), children)); +}; +exports.TableFooter = TableFooter; +var TableCellWrapper = function (_a) { + var as = _a.as, children = _a.children; + return react_1["default"].createElement(as, null, children); +}; +var Table = function (_a) { + var children = _a.children, _b = _a.data, data = _b === void 0 ? null : _b, className = _a.className, restProps = __rest(_a, ["children", "data", "className"]); + return (react_1["default"].createElement("table", __assign({}, restProps, { className: (0, clsx_1["default"])('jpk-table', className) }), data ? (react_1["default"].createElement(react_1["default"].Fragment, null, + react_1["default"].createElement(exports.TableHeader, null, + react_1["default"].createElement(exports.TableRow, null, data.columns.map(function (_a) { + var label = _a.label; + return (react_1["default"].createElement(exports.TableColHead, { key: label }, label)); + }))), + react_1["default"].createElement(exports.TableBody, null, data.rows.map(function (row, index) { return (react_1["default"].createElement(exports.TableRow, { key: index }, row.map(function (_a) { + var value = _a.value, wrapper = _a.wrapper; + return (react_1["default"].createElement(exports.TableCell, { key: value }, wrapper ? (react_1["default"].createElement(TableCellWrapper, { as: wrapper }, value)) : (value))); + }))); })))) : (react_1["default"].createElement(react_1["default"].Fragment, null, children)))); +}; +exports.Table = Table; +exports["default"] = exports.Table; +//# sourceMappingURL=Table.js.map \ No newline at end of file diff --git a/dist/generics/Table.js.map b/dist/generics/Table.js.map new file mode 100644 index 0000000..db8cb3b --- /dev/null +++ b/dist/generics/Table.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../src/generics/Table.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA0B;AAG1B,mCAAmC;AAE5B,IAAM,WAAW,GAAG,UAAC,EAIA;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHc,yBAI3B,CADa;IACmB,OAAA,CAC/B,uDAAW,SAAS,IAAE,SAAS,EAAE,IAAA,iBAAI,EAAC,mBAAmB,EAAE,SAAS,CAAC,KAClE,QAAQ,CACH,CACT,CAAA;CAAA,CAAC;AARW,QAAA,WAAW,eAQtB;AAEK,IAAM,QAAQ,GAAG,UAAC,EAIG;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHW,yBAIxB,CADa;IACmB,OAAA,CAC/B,oDAAQ,SAAS,IAAE,SAAS,EAAE,IAAA,iBAAI,EAAC,gBAAgB,EAAE,SAAS,CAAC,KAC5D,QAAQ,CACN,CACN,CAAA;CAAA,CAAC;AARW,QAAA,QAAQ,YAQnB;AAEK,IAAM,YAAY,GAAG,UAAC,EAID;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHe,yBAI5B,CADa;IACmB,OAAA,CAC/B,oDAAQ,SAAS,IAAE,SAAS,EAAE,IAAA,iBAAI,EAAC,qBAAqB,EAAE,SAAS,CAAC,KACjE,QAAQ,CACN,CACN,CAAA;CAAA,CAAC;AARW,QAAA,YAAY,gBAQvB;AAEK,IAAM,SAAS,GAAG,UAAC,EAIE;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHY,yBAIzB,CADa;IACmB,OAAA,CAC/B,uDAAW,SAAS,IAAE,SAAS,EAAE,IAAA,iBAAI,EAAC,iBAAiB,EAAE,SAAS,CAAC,KAChE,QAAQ,CACH,CACT,CAAA;CAAA,CAAC;AARW,QAAA,SAAS,aAQpB;AAEK,IAAM,SAAS,GAAG,UAAC,EAIE;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHY,yBAIzB,CADa;IACmB,OAAA,CAC/B,oDAAQ,SAAS,IAAE,SAAS,EAAE,IAAA,iBAAI,EAAC,iBAAiB,EAAE,SAAS,CAAC,KAC7D,QAAQ,CACN,CACN,CAAA;CAAA,CAAC;AARW,QAAA,SAAS,aAQpB;AAEK,IAAM,WAAW,GAAG,UAAC,EAIA;IAH1B,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACN,SAAS,cAHc,yBAI3B,CADa;IACmB,OAAA,CAC/B,uDAAW,SAAS,IAAE,SAAS,EAAE,IAAA,iBAAI,EAAC,mBAAmB,EAAE,SAAS,CAAC,KAClE,QAAQ,CACH,CACT,CAAA;CAAA,CAAC;AARW,QAAA,WAAW,eAQtB;AAEF,IAAM,gBAAgB,GAAG,UAAC,EAAqB;QAAnB,EAAE,QAAA,EAAE,QAAQ,cAAA;IACtC,OAAA,kBAAK,CAAC,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC;AAAvC,CAAuC,CAAC;AAYnC,IAAM,KAAK,GAAG,UAAC,EAKT;IAJX,IAAA,QAAQ,cAAA,EACR,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA,EACX,SAAS,eAAA,EACN,SAAS,cAJQ,iCAKrB,CADa;IACI,OAAA,CAChB,uDAAW,SAAS,IAAE,SAAS,EAAE,IAAA,iBAAI,EAAC,WAAW,EAAE,SAAS,CAAC,KAC1D,IAAI,CAAC,CAAC,CAAC,CACN;QACE,iCAAC,mBAAW;YACV,iCAAC,gBAAQ,QACN,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAC,EAAiB;oBAAf,KAAK,WAAA;gBAAe,OAAA,CACvC,iCAAC,oBAAY,IAAC,GAAG,EAAE,KAAK,IAAG,KAAK,CAAgB,CACjD;YAFwC,CAExC,CAAC,CACO,CACC;QACd,iCAAC,iBAAS,QACP,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAC,GAAU,EAAE,KAAa,IAAK,OAAA,CAC5C,iCAAC,gBAAQ,IAAC,GAAG,EAAE,KAAK,IACjB,GAAG,CAAC,GAAG,CAAC,UAAC,EAAuB;gBAArB,KAAK,WAAA,EAAE,OAAO,aAAA;YAAY,OAAA,CACpC,iCAAC,iBAAS,IAAC,GAAG,EAAE,KAAK,IAClB,OAAO,CAAC,CAAC,CAAC,CACT,iCAAC,gBAAgB,IAAC,EAAE,EAAE,OAAO,IAAG,KAAK,CAAoB,CAC1D,CAAC,CAAC,CAAC,CACF,KAAK,CACN,CACS,CACb;QARqC,CAQrC,CAAC,CACO,CACZ,EAZ6C,CAY7C,CAAC,CACQ,CACX,CACJ,CAAC,CAAC,CAAC,CACF,oEAAG,QAAQ,CAAI,CAChB,CACK,CACT,CAAA;CAAA,CAAC;AApCW,QAAA,KAAK,SAoChB;AAEF,qBAAe,aAAK,CAAC"} \ No newline at end of file diff --git a/dist/generics/Tabs.d.ts b/dist/generics/Tabs.d.ts new file mode 100644 index 0000000..5ba3202 --- /dev/null +++ b/dist/generics/Tabs.d.ts @@ -0,0 +1,7 @@ +import React from 'react'; +export declare const Tab: ({ title, selectedTab, onClick }: any) => JSX.Element; +export type TabsProps = { + children: React.ReactNode | any; +}; +export declare const Tabs: ({ children }: TabsProps) => JSX.Element; +export default Tabs; diff --git a/dist/generics/Tabs.js b/dist/generics/Tabs.js new file mode 100644 index 0000000..f488ae8 --- /dev/null +++ b/dist/generics/Tabs.js @@ -0,0 +1,63 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Tabs = exports.Tab = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importStar(require("react")); +// @todo: improve type definitions +var Tab = function (_a) { + var title = _a.title, selectedTab = _a.selectedTab, onClick = _a.onClick; + var selectTabHandler = function () { + onClick(title); + }; + return (react_1["default"].createElement("li", { className: (0, clsx_1["default"])('jpk-tab__summary', selectedTab === title && 'jpk-tab--active'), onClick: selectTabHandler }, title)); +}; +exports.Tab = Tab; +var Tabs = function (_a) { + var children = _a.children; + var _b = (0, react_1.useState)(null), selectedTab = _b[0], setSelectedTab = _b[1]; + (0, react_1.useEffect)(function () { + setSelectedTab(children[0].props.title); + }, [children]); + var onClickTabItem = function (tabtitle) { + setSelectedTab(tabtitle); + }; + return (react_1["default"].createElement("div", { className: 'jpk-tabs' }, + react_1["default"].createElement("ol", { className: 'jpk-tab__header' }, children.map(function (child) { + var title = child.props.title; + return (react_1["default"].createElement(exports.Tab, { selectedTab: selectedTab, key: title, title: title, onClick: onClickTabItem })); + })), + react_1["default"].createElement("div", { className: 'jpk-tab__content' }, children.map(function (child) { + if (child.props.title !== selectedTab) + return undefined; + return child.props.children; + })))); +}; +exports.Tabs = Tabs; +exports["default"] = exports.Tabs; +//# sourceMappingURL=Tabs.js.map \ No newline at end of file diff --git a/dist/generics/Tabs.js.map b/dist/generics/Tabs.js.map new file mode 100644 index 0000000..31e46dd --- /dev/null +++ b/dist/generics/Tabs.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/generics/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,6CAAmD;AAEnD,kCAAkC;AAE3B,IAAM,GAAG,GAAG,UAAC,EAAoC;QAAlC,KAAK,WAAA,EAAE,WAAW,iBAAA,EAAE,OAAO,aAAA;IAC/C,IAAM,gBAAgB,GAAG;QACvB,OAAO,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,OAAO,CACL,yCACE,SAAS,EAAE,IAAA,iBAAI,EACb,kBAAkB,EAClB,WAAW,KAAK,KAAK,IAAI,iBAAiB,CAC3C,EACD,OAAO,EAAE,gBAAgB,IAExB,KAAK,CACH,CACN,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,GAAG,OAgBd;AAMK,IAAM,IAAI,GAAG,UAAC,EAAuB;QAArB,QAAQ,cAAA;IACvB,IAAA,KAAgC,IAAA,gBAAQ,EAAC,IAAI,CAAC,EAA7C,WAAW,QAAA,EAAE,cAAc,QAAkB,CAAC;IAErD,IAAA,iBAAS,EAAC;QACR,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,IAAM,cAAc,GAAG,UAAC,QAAa;QACnC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,0CAAK,SAAS,EAAC,UAAU;QACvB,yCAAI,SAAS,EAAC,iBAAiB,IAC5B,QAAQ,CAAC,GAAG,CAAC,UAAC,KAAU;YACf,IAAA,KAAK,GAAK,KAAK,CAAC,KAAK,MAAhB,CAAiB;YAE9B,OAAO,CACL,iCAAC,WAAG,IACF,WAAW,EAAE,WAAW,EACxB,GAAG,EAAE,KAAK,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,cAAc,GACvB,CACH,CAAC;QACJ,CAAC,CAAC,CACC;QACL,0CAAK,SAAS,EAAC,kBAAkB,IAC9B,QAAQ,CAAC,GAAG,CAAC,UAAC,KAAU;YACvB,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,WAAW;gBAAE,OAAO,SAAS,CAAC;YACxD,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC9B,CAAC,CAAC,CACE,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAnCW,QAAA,IAAI,QAmCf;AAEF,qBAAe,YAAI,CAAC"} \ No newline at end of file diff --git a/dist/generics/Text.d.ts b/dist/generics/Text.d.ts new file mode 100644 index 0000000..f9f471f --- /dev/null +++ b/dist/generics/Text.d.ts @@ -0,0 +1,267 @@ +import React from 'react'; +export type TextVariant = 'b' | 'big' | 'del' | 'div' | 'em' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'i' | 'ins' | 'mark' | 'p' | 'span' | 'sub' | 'sup' | 'small' | 'strong' | 'u'; +export interface TextProps extends React.HTMLAttributes { + children: React.ReactNode; + as?: TextVariant; +} +export declare function Text({ children, as, className, ...restProps }: TextProps): React.DetailedReactHTMLElement<{ + className: string; + defaultChecked?: boolean | undefined; + defaultValue?: string | number | readonly string[] | undefined; + suppressContentEditableWarning?: boolean | undefined; + suppressHydrationWarning?: boolean | undefined; + accessKey?: string | undefined; + contentEditable?: (boolean | "true" | "false") | "inherit" | undefined; + contextMenu?: string | undefined; + dir?: string | undefined; + draggable?: (boolean | "true" | "false") | undefined; + hidden?: boolean | undefined; + id?: string | undefined; + lang?: string | undefined; + nonce?: string | undefined; + placeholder?: string | undefined; + slot?: string | undefined; + spellCheck?: (boolean | "true" | "false") | undefined; + style?: React.CSSProperties | undefined; + tabIndex?: number | undefined; + title?: string | undefined; + translate?: "yes" | "no" | undefined; + radioGroup?: string | undefined; + role?: React.AriaRole | undefined; + about?: string | undefined; + datatype?: string | undefined; + inlist?: any; + prefix?: string | undefined; + property?: string | undefined; + resource?: string | undefined; + typeof?: string | undefined; + vocab?: string | undefined; + autoCapitalize?: string | undefined; + autoCorrect?: string | undefined; + autoSave?: string | undefined; + color?: string | undefined; + itemProp?: string | undefined; + itemScope?: boolean | undefined; + itemType?: string | undefined; + itemID?: string | undefined; + itemRef?: string | undefined; + results?: number | undefined; + security?: string | undefined; + unselectable?: "on" | "off" | undefined; + inputMode?: "url" | "search" | "text" | "none" | "tel" | "email" | "numeric" | "decimal" | undefined; + is?: string | undefined; + 'aria-activedescendant'?: string | undefined; + 'aria-atomic'?: (boolean | "true" | "false") | undefined; + 'aria-autocomplete'?: "list" | "none" | "both" | "inline" | undefined; + 'aria-busy'?: (boolean | "true" | "false") | undefined; + 'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-colcount'?: number | undefined; + 'aria-colindex'?: number | undefined; + 'aria-colspan'?: number | undefined; + 'aria-controls'?: string | undefined; + 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "date" | "location" | undefined; + 'aria-describedby'?: string | undefined; + 'aria-details'?: string | undefined; + 'aria-disabled'?: (boolean | "true" | "false") | undefined; + 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined; + 'aria-errormessage'?: string | undefined; + 'aria-expanded'?: (boolean | "true" | "false") | undefined; + 'aria-flowto'?: string | undefined; + 'aria-grabbed'?: (boolean | "true" | "false") | undefined; + 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined; + 'aria-hidden'?: (boolean | "true" | "false") | undefined; + 'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined; + 'aria-keyshortcuts'?: string | undefined; + 'aria-label'?: string | undefined; + 'aria-labelledby'?: string | undefined; + 'aria-level'?: number | undefined; + 'aria-live'?: "off" | "assertive" | "polite" | undefined; + 'aria-modal'?: (boolean | "true" | "false") | undefined; + 'aria-multiline'?: (boolean | "true" | "false") | undefined; + 'aria-multiselectable'?: (boolean | "true" | "false") | undefined; + 'aria-orientation'?: "horizontal" | "vertical" | undefined; + 'aria-owns'?: string | undefined; + 'aria-placeholder'?: string | undefined; + 'aria-posinset'?: number | undefined; + 'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined; + 'aria-readonly'?: (boolean | "true" | "false") | undefined; + 'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined; + 'aria-required'?: (boolean | "true" | "false") | undefined; + 'aria-roledescription'?: string | undefined; + 'aria-rowcount'?: number | undefined; + 'aria-rowindex'?: number | undefined; + 'aria-rowspan'?: number | undefined; + 'aria-selected'?: (boolean | "true" | "false") | undefined; + 'aria-setsize'?: number | undefined; + 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined; + 'aria-valuemax'?: number | undefined; + 'aria-valuemin'?: number | undefined; + 'aria-valuenow'?: number | undefined; + 'aria-valuetext'?: string | undefined; + dangerouslySetInnerHTML?: { + __html: string; + } | undefined; + onCopy?: React.ClipboardEventHandler | undefined; + onCopyCapture?: React.ClipboardEventHandler | undefined; + onCut?: React.ClipboardEventHandler | undefined; + onCutCapture?: React.ClipboardEventHandler | undefined; + onPaste?: React.ClipboardEventHandler | undefined; + onPasteCapture?: React.ClipboardEventHandler | undefined; + onCompositionEnd?: React.CompositionEventHandler | undefined; + onCompositionEndCapture?: React.CompositionEventHandler | undefined; + onCompositionStart?: React.CompositionEventHandler | undefined; + onCompositionStartCapture?: React.CompositionEventHandler | undefined; + onCompositionUpdate?: React.CompositionEventHandler | undefined; + onCompositionUpdateCapture?: React.CompositionEventHandler | undefined; + onFocus?: React.FocusEventHandler | undefined; + onFocusCapture?: React.FocusEventHandler | undefined; + onBlur?: React.FocusEventHandler | undefined; + onBlurCapture?: React.FocusEventHandler | undefined; + onChange?: React.FormEventHandler | undefined; + onChangeCapture?: React.FormEventHandler | undefined; + onBeforeInput?: React.FormEventHandler | undefined; + onBeforeInputCapture?: React.FormEventHandler | undefined; + onInput?: React.FormEventHandler | undefined; + onInputCapture?: React.FormEventHandler | undefined; + onReset?: React.FormEventHandler | undefined; + onResetCapture?: React.FormEventHandler | undefined; + onSubmit?: React.FormEventHandler | undefined; + onSubmitCapture?: React.FormEventHandler | undefined; + onInvalid?: React.FormEventHandler | undefined; + onInvalidCapture?: React.FormEventHandler | undefined; + onLoad?: React.ReactEventHandler | undefined; + onLoadCapture?: React.ReactEventHandler | undefined; + onError?: React.ReactEventHandler | undefined; + onErrorCapture?: React.ReactEventHandler | undefined; + onKeyDown?: React.KeyboardEventHandler | undefined; + onKeyDownCapture?: React.KeyboardEventHandler | undefined; + onKeyPress?: React.KeyboardEventHandler | undefined; + onKeyPressCapture?: React.KeyboardEventHandler | undefined; + onKeyUp?: React.KeyboardEventHandler | undefined; + onKeyUpCapture?: React.KeyboardEventHandler | undefined; + onAbort?: React.ReactEventHandler | undefined; + onAbortCapture?: React.ReactEventHandler | undefined; + onCanPlay?: React.ReactEventHandler | undefined; + onCanPlayCapture?: React.ReactEventHandler | undefined; + onCanPlayThrough?: React.ReactEventHandler | undefined; + onCanPlayThroughCapture?: React.ReactEventHandler | undefined; + onDurationChange?: React.ReactEventHandler | undefined; + onDurationChangeCapture?: React.ReactEventHandler | undefined; + onEmptied?: React.ReactEventHandler | undefined; + onEmptiedCapture?: React.ReactEventHandler | undefined; + onEncrypted?: React.ReactEventHandler | undefined; + onEncryptedCapture?: React.ReactEventHandler | undefined; + onEnded?: React.ReactEventHandler | undefined; + onEndedCapture?: React.ReactEventHandler | undefined; + onLoadedData?: React.ReactEventHandler | undefined; + onLoadedDataCapture?: React.ReactEventHandler | undefined; + onLoadedMetadata?: React.ReactEventHandler | undefined; + onLoadedMetadataCapture?: React.ReactEventHandler | undefined; + onLoadStart?: React.ReactEventHandler | undefined; + onLoadStartCapture?: React.ReactEventHandler | undefined; + onPause?: React.ReactEventHandler | undefined; + onPauseCapture?: React.ReactEventHandler | undefined; + onPlay?: React.ReactEventHandler | undefined; + onPlayCapture?: React.ReactEventHandler | undefined; + onPlaying?: React.ReactEventHandler | undefined; + onPlayingCapture?: React.ReactEventHandler | undefined; + onProgress?: React.ReactEventHandler | undefined; + onProgressCapture?: React.ReactEventHandler | undefined; + onRateChange?: React.ReactEventHandler | undefined; + onRateChangeCapture?: React.ReactEventHandler | undefined; + onResize?: React.ReactEventHandler | undefined; + onResizeCapture?: React.ReactEventHandler | undefined; + onSeeked?: React.ReactEventHandler | undefined; + onSeekedCapture?: React.ReactEventHandler | undefined; + onSeeking?: React.ReactEventHandler | undefined; + onSeekingCapture?: React.ReactEventHandler | undefined; + onStalled?: React.ReactEventHandler | undefined; + onStalledCapture?: React.ReactEventHandler | undefined; + onSuspend?: React.ReactEventHandler | undefined; + onSuspendCapture?: React.ReactEventHandler | undefined; + onTimeUpdate?: React.ReactEventHandler | undefined; + onTimeUpdateCapture?: React.ReactEventHandler | undefined; + onVolumeChange?: React.ReactEventHandler | undefined; + onVolumeChangeCapture?: React.ReactEventHandler | undefined; + onWaiting?: React.ReactEventHandler | undefined; + onWaitingCapture?: React.ReactEventHandler | undefined; + onAuxClick?: React.MouseEventHandler | undefined; + onAuxClickCapture?: React.MouseEventHandler | undefined; + onClick?: React.MouseEventHandler | undefined; + onClickCapture?: React.MouseEventHandler | undefined; + onContextMenu?: React.MouseEventHandler | undefined; + onContextMenuCapture?: React.MouseEventHandler | undefined; + onDoubleClick?: React.MouseEventHandler | undefined; + onDoubleClickCapture?: React.MouseEventHandler | undefined; + onDrag?: React.DragEventHandler | undefined; + onDragCapture?: React.DragEventHandler | undefined; + onDragEnd?: React.DragEventHandler | undefined; + onDragEndCapture?: React.DragEventHandler | undefined; + onDragEnter?: React.DragEventHandler | undefined; + onDragEnterCapture?: React.DragEventHandler | undefined; + onDragExit?: React.DragEventHandler | undefined; + onDragExitCapture?: React.DragEventHandler | undefined; + onDragLeave?: React.DragEventHandler | undefined; + onDragLeaveCapture?: React.DragEventHandler | undefined; + onDragOver?: React.DragEventHandler | undefined; + onDragOverCapture?: React.DragEventHandler | undefined; + onDragStart?: React.DragEventHandler | undefined; + onDragStartCapture?: React.DragEventHandler | undefined; + onDrop?: React.DragEventHandler | undefined; + onDropCapture?: React.DragEventHandler | undefined; + onMouseDown?: React.MouseEventHandler | undefined; + onMouseDownCapture?: React.MouseEventHandler | undefined; + onMouseEnter?: React.MouseEventHandler | undefined; + onMouseLeave?: React.MouseEventHandler | undefined; + onMouseMove?: React.MouseEventHandler | undefined; + onMouseMoveCapture?: React.MouseEventHandler | undefined; + onMouseOut?: React.MouseEventHandler | undefined; + onMouseOutCapture?: React.MouseEventHandler | undefined; + onMouseOver?: React.MouseEventHandler | undefined; + onMouseOverCapture?: React.MouseEventHandler | undefined; + onMouseUp?: React.MouseEventHandler | undefined; + onMouseUpCapture?: React.MouseEventHandler | undefined; + onSelect?: React.ReactEventHandler | undefined; + onSelectCapture?: React.ReactEventHandler | undefined; + onTouchCancel?: React.TouchEventHandler | undefined; + onTouchCancelCapture?: React.TouchEventHandler | undefined; + onTouchEnd?: React.TouchEventHandler | undefined; + onTouchEndCapture?: React.TouchEventHandler | undefined; + onTouchMove?: React.TouchEventHandler | undefined; + onTouchMoveCapture?: React.TouchEventHandler | undefined; + onTouchStart?: React.TouchEventHandler | undefined; + onTouchStartCapture?: React.TouchEventHandler | undefined; + onPointerDown?: React.PointerEventHandler | undefined; + onPointerDownCapture?: React.PointerEventHandler | undefined; + onPointerMove?: React.PointerEventHandler | undefined; + onPointerMoveCapture?: React.PointerEventHandler | undefined; + onPointerUp?: React.PointerEventHandler | undefined; + onPointerUpCapture?: React.PointerEventHandler | undefined; + onPointerCancel?: React.PointerEventHandler | undefined; + onPointerCancelCapture?: React.PointerEventHandler | undefined; + onPointerEnter?: React.PointerEventHandler | undefined; + onPointerEnterCapture?: React.PointerEventHandler | undefined; + onPointerLeave?: React.PointerEventHandler | undefined; + onPointerLeaveCapture?: React.PointerEventHandler | undefined; + onPointerOver?: React.PointerEventHandler | undefined; + onPointerOverCapture?: React.PointerEventHandler | undefined; + onPointerOut?: React.PointerEventHandler | undefined; + onPointerOutCapture?: React.PointerEventHandler | undefined; + onGotPointerCapture?: React.PointerEventHandler | undefined; + onGotPointerCaptureCapture?: React.PointerEventHandler | undefined; + onLostPointerCapture?: React.PointerEventHandler | undefined; + onLostPointerCaptureCapture?: React.PointerEventHandler | undefined; + onScroll?: React.UIEventHandler | undefined; + onScrollCapture?: React.UIEventHandler | undefined; + onWheel?: React.WheelEventHandler | undefined; + onWheelCapture?: React.WheelEventHandler | undefined; + onAnimationStart?: React.AnimationEventHandler | undefined; + onAnimationStartCapture?: React.AnimationEventHandler | undefined; + onAnimationEnd?: React.AnimationEventHandler | undefined; + onAnimationEndCapture?: React.AnimationEventHandler | undefined; + onAnimationIteration?: React.AnimationEventHandler | undefined; + onAnimationIterationCapture?: React.AnimationEventHandler | undefined; + onTransitionEnd?: React.TransitionEventHandler | undefined; + onTransitionEndCapture?: React.TransitionEventHandler | undefined; +}, HTMLElement>; +export default Text; diff --git a/dist/generics/Text.js b/dist/generics/Text.js new file mode 100644 index 0000000..57c3340 --- /dev/null +++ b/dist/generics/Text.js @@ -0,0 +1,37 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.Text = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +function Text(_a) { + var children = _a.children, _b = _a.as, as = _b === void 0 ? 'p' : _b, className = _a.className, restProps = __rest(_a, ["children", "as", "className"]); + return react_1["default"].createElement(as, __assign(__assign({}, restProps), { className: (0, clsx_1["default"])('jpk-typography', "jpk-typography__".concat(as), className) }), children); +} +exports.Text = Text; +exports["default"] = Text; +//# sourceMappingURL=Text.js.map \ No newline at end of file diff --git a/dist/generics/Text.js.map b/dist/generics/Text.js.map new file mode 100644 index 0000000..77b1087 --- /dev/null +++ b/dist/generics/Text.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/generics/Text.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA0B;AA8B1B,SAAgB,IAAI,CAAC,EAKT;IAJV,IAAA,QAAQ,cAAA,EACR,UAAQ,EAAR,EAAE,mBAAG,GAAG,KAAA,EACR,SAAS,eAAA,EACN,SAAS,cAJO,+BAKpB,CADa;IAEZ,OAAO,kBAAK,CAAC,aAAa,CACxB,EAAE,wBAEG,SAAS,KACZ,SAAS,EAAE,IAAA,iBAAI,EAAC,gBAAgB,EAAE,0BAAmB,EAAE,CAAE,EAAE,SAAS,CAAC,KAEvE,QAAQ,CACT,CAAC;AACJ,CAAC;AAdD,oBAcC;AAED,qBAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/dist/generics/TextInput.d.ts b/dist/generics/TextInput.d.ts new file mode 100644 index 0000000..aead406 --- /dev/null +++ b/dist/generics/TextInput.d.ts @@ -0,0 +1,17 @@ +import React, { CSSProperties } from 'react'; +interface Style extends CSSProperties { + input?: CSSProperties; + label?: CSSProperties; +} +export type InputTypes = 'color' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'tel' | 'text' | 'time' | 'url' | 'week'; +export interface TextInputProps extends React.InputHTMLAttributes { + className?: string; + disabled?: boolean; + label?: string; + name?: string; + style?: Style; + type?: InputTypes; + value?: string; +} +export declare function TextInput({ className, disabled, label, name, style, type, value, ...restProps }: TextInputProps): JSX.Element; +export default TextInput; diff --git a/dist/generics/TextInput.js b/dist/generics/TextInput.js new file mode 100644 index 0000000..9d33ee0 --- /dev/null +++ b/dist/generics/TextInput.js @@ -0,0 +1,40 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.TextInput = void 0; +var clsx_1 = __importDefault(require("clsx")); +var react_1 = __importDefault(require("react")); +var mixins_1 = require("../utils/mixins"); +function TextInput(_a) { + var className = _a.className, _b = _a.disabled, disabled = _b === void 0 ? false : _b, label = _a.label, name = _a.name, style = _a.style, _c = _a.type, type = _c === void 0 ? 'text' : _c, value = _a.value, restProps = __rest(_a, ["className", "disabled", "label", "name", "style", "type", "value"]); + return (react_1["default"].createElement("div", { className: (0, clsx_1["default"])('jpk-text-input', disabled && 'jpk-text-input--disabled', className), style: (0, mixins_1.omit)(style, 'input', 'label') }, + label && (react_1["default"].createElement("label", { htmlFor: name, className: 'jpk-text-input__label', style: style === null || style === void 0 ? void 0 : style.label }, label)), + react_1["default"].createElement("input", __assign({}, restProps, { className: 'jpk-text-input__input', disabled: disabled, name: name, style: style === null || style === void 0 ? void 0 : style.input, type: type, value: value })))); +} +exports.TextInput = TextInput; +exports["default"] = TextInput; +//# sourceMappingURL=TextInput.js.map \ No newline at end of file diff --git a/dist/generics/TextInput.js.map b/dist/generics/TextInput.js.map new file mode 100644 index 0000000..13c8f84 --- /dev/null +++ b/dist/generics/TextInput.js.map @@ -0,0 +1 @@ +{"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/generics/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAwB;AACxB,gDAA6C;AAC7C,0CAAuC;AAgCvC,SAAgB,SAAS,CAAC,EAST;IARf,IAAA,SAAS,eAAA,EACT,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAAK,WAAA,EACL,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,YAAa,EAAb,IAAI,mBAAG,MAAM,KAAA,EACb,KAAK,WAAA,EACF,SAAS,cARY,oEASzB,CADa;IAEZ,OAAO,CACL,0CACE,SAAS,EAAE,IAAA,iBAAI,EACb,gBAAgB,EAChB,QAAQ,IAAI,0BAA0B,EACtC,SAAS,CACV,EACD,KAAK,EAAE,IAAA,aAAI,EAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC;QAEnC,KAAK,IAAI,CACR,4CACE,OAAO,EAAE,IAAI,EACb,SAAS,EAAC,uBAAuB,EACjC,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,IAElB,KAAK,CACA,CACT;QACD,uDACM,SAAS,IACb,SAAS,EAAC,uBAAuB,EACjC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EACnB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,IACZ,CACE,CACP,CAAC;AACJ,CAAC;AAvCD,8BAuCC;AAED,qBAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/generics/index.d.ts b/dist/generics/index.d.ts new file mode 100644 index 0000000..fe32263 --- /dev/null +++ b/dist/generics/index.d.ts @@ -0,0 +1,15 @@ +export * from './Accordion'; +export * from './Alert'; +export * from './Button'; +export * from './Checkbox'; +export * from './FileInput'; +export * from './List'; +export * from './Pagination'; +export * from './Radio'; +export * from './RangeInput'; +export * from './SearchInput'; +export * from './Select'; +export * from './Table'; +export * from './Tabs'; +export * from './Text'; +export * from './TextInput'; diff --git a/dist/generics/index.js b/dist/generics/index.js new file mode 100644 index 0000000..4ce50d3 --- /dev/null +++ b/dist/generics/index.js @@ -0,0 +1,32 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +exports.__esModule = true; +__exportStar(require("./Accordion"), exports); +__exportStar(require("./Alert"), exports); +__exportStar(require("./Button"), exports); +__exportStar(require("./Checkbox"), exports); +__exportStar(require("./FileInput"), exports); +__exportStar(require("./List"), exports); +__exportStar(require("./Pagination"), exports); +__exportStar(require("./Radio"), exports); +__exportStar(require("./RangeInput"), exports); +__exportStar(require("./SearchInput"), exports); +__exportStar(require("./Select"), exports); +__exportStar(require("./Table"), exports); +__exportStar(require("./Tabs"), exports); +__exportStar(require("./Text"), exports); +__exportStar(require("./TextInput"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/generics/index.js.map b/dist/generics/index.js.map new file mode 100644 index 0000000..8f6e392 --- /dev/null +++ b/dist/generics/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generics/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB;AACxB,2CAAyB;AACzB,6CAA2B;AAC3B,8CAA4B;AAC5B,yCAAuB;AACvB,+CAA6B;AAC7B,0CAAwB;AACxB,+CAA6B;AAC7B,gDAA8B;AAC9B,2CAAyB;AACzB,0CAAwB;AACxB,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B"} \ No newline at end of file diff --git a/dist/http.d.ts b/dist/http.d.ts new file mode 100644 index 0000000..05aa0d2 --- /dev/null +++ b/dist/http.d.ts @@ -0,0 +1,12 @@ +import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'; +export declare const init: (apiBaseUrl: string, reqInterceptor?: (req: AxiosRequestConfig) => AxiosRequestConfig, respInterceptor?: (res: AxiosResponse) => AxiosResponse, errInterceptor?: (error: AxiosError) => Promise) => void; +export declare const setAuthHeader: (token: string) => void; +export declare const resetAuthHeader: () => void; +export declare const create: (config?: import("axios").CreateAxiosDefaults | undefined) => import("axios").AxiosInstance; +export declare const all: (iterable: any) => Promise; +export declare const request: import("axios").AxiosStatic; +export declare const get: , D = any>(url: string, config?: AxiosRequestConfig | undefined) => Promise; +export declare const post: , D = any>(url: string, data?: D | undefined, config?: AxiosRequestConfig | undefined) => Promise; +export declare const put: , D = any>(url: string, data?: D | undefined, config?: AxiosRequestConfig | undefined) => Promise; +export declare const patch: , D = any>(url: string, data?: D | undefined, config?: AxiosRequestConfig | undefined) => Promise; +export declare const del: , D = any>(url: string, config?: AxiosRequestConfig | undefined) => Promise; diff --git a/dist/http.js b/dist/http.js new file mode 100644 index 0000000..0329f19 --- /dev/null +++ b/dist/http.js @@ -0,0 +1,55 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +exports.del = exports.patch = exports.put = exports.post = exports.get = exports.request = exports.all = exports.create = exports.resetAuthHeader = exports.setAuthHeader = exports.init = void 0; +var axios_1 = __importDefault(require("axios")); +var requestInterceptor = function (req) { + // @todo: retrive `accessToken` from where it's stored and set it here + // @ts-ignore + req.headers.Authorization = "Bearer accessToken"; + return req; +}; +var responseInterceptor = function (res) { + return res.data; +}; +var errorInterceptor = function (error) { + return Promise.reject(error); +}; +var init = function (apiBaseUrl, reqInterceptor, respInterceptor, errInterceptor) { + if (reqInterceptor === void 0) { reqInterceptor = requestInterceptor; } + if (respInterceptor === void 0) { respInterceptor = responseInterceptor; } + if (errInterceptor === void 0) { errInterceptor = errorInterceptor; } + axios_1["default"].defaults.baseURL = apiBaseUrl; + axios_1["default"].interceptors.request.use(reqInterceptor, errInterceptor); + axios_1["default"].interceptors.response.use(respInterceptor, errInterceptor); +}; +exports.init = init; +var setAuthHeader = function (token) { + axios_1["default"].defaults.headers.Authorization = "Bearer ".concat(token); +}; +exports.setAuthHeader = setAuthHeader; +var resetAuthHeader = function () { + // @ts-ignore + axios_1["default"].defaults.headers.Authorization = undefined; +}; +exports.resetAuthHeader = resetAuthHeader; +exports.create = axios_1["default"].create; +var all = function (iterable) { + return axios_1["default"].all(iterable).then(axios_1["default"].spread(function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + return args; + })); +}; +exports.all = all; +exports.request = axios_1["default"]; +exports.get = axios_1["default"].get; +exports.post = axios_1["default"].post; +exports.put = axios_1["default"].put; +exports.patch = axios_1["default"].patch; +exports.del = axios_1["default"]["delete"]; +//# sourceMappingURL=http.js.map \ No newline at end of file diff --git a/dist/http.js.map b/dist/http.js.map new file mode 100644 index 0000000..f43c137 --- /dev/null +++ b/dist/http.js.map @@ -0,0 +1 @@ +{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/http.ts"],"names":[],"mappings":";;;;;;AAAA,gDAA6E;AAE7E,IAAM,kBAAkB,GAAG,UAAC,GAAuB;IACjD,sEAAsE;IACtE,aAAa;IACb,GAAG,CAAC,OAAO,CAAC,aAAa,GAAG,oBAAoB,CAAC;IACjD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,IAAM,mBAAmB,GAAG,UAAC,GAAkB;IAC7C,OAAO,GAAG,CAAC,IAAI,CAAC;AAClB,CAAC,CAAC;AAEF,IAAM,gBAAgB,GAAG,UAAC,KAAiB;IACzC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEK,IAAM,IAAI,GAAG,UAClB,UAAkB,EAClB,cAAmC,EACnC,eAAqC,EACrC,cAAiC;IAFjC,+BAAA,EAAA,mCAAmC;IACnC,gCAAA,EAAA,qCAAqC;IACrC,+BAAA,EAAA,iCAAiC;IAEjC,kBAAK,CAAC,QAAQ,CAAC,OAAO,GAAG,UAAU,CAAC;IACpC,kBAAK,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC;IAC/D,kBAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;AACnE,CAAC,CAAC;AATW,QAAA,IAAI,QASf;AAEK,IAAM,aAAa,GAAG,UAAC,KAAa;IACzC,kBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,iBAAU,KAAK,CAAE,CAAC;AAC3D,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB;AAEK,IAAM,eAAe,GAAG;IAC7B,aAAa;IACb,kBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;AACnD,CAAC,CAAC;AAHW,QAAA,eAAe,mBAG1B;AAEW,QAAA,MAAM,GAAG,kBAAK,CAAC,MAAM,CAAC;AAE5B,IAAM,GAAG,GAAG,UAAC,QAAa;IAC/B,OAAA,kBAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,kBAAK,CAAC,MAAM,CAAC;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QAAK,OAAA,IAAI;IAAJ,CAAI,CAAC,CAAC;AAAzD,CAAyD,CAAC;AAD/C,QAAA,GAAG,OAC4C;AAE/C,QAAA,OAAO,GAAG,kBAAK,CAAC;AAEhB,QAAA,GAAG,GAAG,kBAAK,CAAC,GAAG,CAAC;AAEhB,QAAA,IAAI,GAAG,kBAAK,CAAC,IAAI,CAAC;AAElB,QAAA,GAAG,GAAG,kBAAK,CAAC,GAAG,CAAC;AAEhB,QAAA,KAAK,GAAG,kBAAK,CAAC,KAAK,CAAC;AAEpB,QAAA,GAAG,GAAG,kBAAK,CAAC,QAAM,CAAA,CAAC"} \ No newline at end of file diff --git a/dist/icons/Search.d.ts b/dist/icons/Search.d.ts new file mode 100644 index 0000000..b2bdf3f --- /dev/null +++ b/dist/icons/Search.d.ts @@ -0,0 +1 @@ +export default function SearchIcon(props: any): JSX.Element; diff --git a/dist/icons/Search.js b/dist/icons/Search.js new file mode 100644 index 0000000..6793c40 --- /dev/null +++ b/dist/icons/Search.js @@ -0,0 +1,23 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var react_1 = __importDefault(require("react")); +function SearchIcon(props) { + return (react_1["default"].createElement("svg", __assign({}, props, { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 512 512' }), + react_1["default"].createElement("path", { d: 'M416 208c0 45.9-14.9 88.3-40 122.7l126.6 126.7c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0s208 93.1 208 208zM208 352c79.5 0 144-64.5 144-144S287.5 64 208 64 64 128.5 64 208s64.5 144 144 144z' }))); +} +exports["default"] = SearchIcon; +//# sourceMappingURL=Search.js.map \ No newline at end of file diff --git a/dist/icons/Search.js.map b/dist/icons/Search.js.map new file mode 100644 index 0000000..812cf2d --- /dev/null +++ b/dist/icons/Search.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Search.js","sourceRoot":"","sources":["../../../src/icons/Search.jsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA0B;AAE1B,SAAwB,UAAU,CAAC,KAAK;IACtC,OAAO,CACL,qDAAS,KAAK,IAAE,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa;QACtE,2CAAM,CAAC,EAAC,2QAA2Q,GAAQ,CACvR,CACP,CAAC;AACJ,CAAC;AAND,gCAMC"} \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..c75dfdb --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,6 @@ +export * from './base'; +export * from './components'; +export { default as Provider } from './providers'; +export * from './layout'; +export * from './types'; +export * from './utils'; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..4cc51da --- /dev/null +++ b/dist/index.js @@ -0,0 +1,25 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +exports.__esModule = true; +exports.Provider = void 0; +__exportStar(require("./base"), exports); +__exportStar(require("./components"), exports); +var providers_1 = require("./providers"); +__createBinding(exports, providers_1, "default", "Provider"); +__exportStar(require("./layout"), exports); +__exportStar(require("./types"), exports); +__exportStar(require("./utils"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..5ce9eb5 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,+CAA6B;AAC7B,yCAAkD;AAAzC,6DAAmB;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,0CAAwB"} \ No newline at end of file diff --git a/dist/layout/Block.d.ts b/dist/layout/Block.d.ts new file mode 100644 index 0000000..a4c272e --- /dev/null +++ b/dist/layout/Block.d.ts @@ -0,0 +1,40 @@ +import React from 'react'; +import { CSSProperties } from '../types'; +export type BlockVariant = 'aside' | 'article' | 'code' | 'details' | 'div' | 'figcaption' | 'figure' | 'footer' | 'header' | 'li' | 'main' | 'mark' | 'nav' | 'ol' | 'pre' | 'section' | 'summary' | 'time' | 'ul'; +export type Margin = 'auto' | number | 'string'; +export interface BlockProps extends React.ButtonHTMLAttributes { + as?: BlockVariant; + alignContent?: CSSProperties.AlignContent; + alignItems?: CSSProperties.AlignItems; + alignSelf?: CSSProperties.AlignSelf; + columnGap?: number; + display?: CSSProperties.Display; + flex?: number | string; + flexBasis?: CSSProperties.FlexBasis; + flexDirection?: CSSProperties.FlexDirection; + flexGrow?: CSSProperties.FlexGrow; + flexShrink?: CSSProperties.FlexShrink; + flexWrap?: CSSProperties.FlexWrap; + gap?: number | string; + height?: number; + justifyContent?: CSSProperties.JustifyContent; + justifySelf?: CSSProperties.JustifySelf; + margin?: Margin; + marginTop?: Margin; + marginRight?: Margin; + marginBottom?: Margin; + marginLeft?: Margin; + maxHeight?: number; + maxWidth?: number; + minHeight?: number; + minWidth?: number; + padding?: number | string; + paddingTop?: number; + paddingRight?: number; + paddingBottom?: number; + paddingLeft?: number; + rowGap?: number; + unit?: CSSProperties.Unit; + width?: number; +} +export default function Block({ as, alignContent, alignItems, alignSelf, children, columnGap, display, flex, flexBasis, flexDirection, flexGrow, flexShrink, flexWrap, gap, height, rowGap, justifyContent, justifySelf, margin, marginTop, marginRight, marginBottom, marginLeft, maxHeight, maxWidth, minHeight, minWidth, padding, paddingTop, paddingRight, paddingBottom, paddingLeft, unit, width, ...restProps }: BlockProps): JSX.Element; diff --git a/dist/layout/Block.js b/dist/layout/Block.js new file mode 100644 index 0000000..5b1bc5c --- /dev/null +++ b/dist/layout/Block.js @@ -0,0 +1,85 @@ +"use strict"; +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var react_1 = __importDefault(require("react")); +var styled_components_1 = __importDefault(require("styled-components")); +// @todo: stylis.js might be helpful to simplify the logic here. +// @todo: all `gap`, `margin*` etc should be able to pass values not only numbers but units along with. +var withUnit = function (value, unit) { + if (typeof value === 'string') + return value; + if (!value) + return undefined; + if (typeof value === 'number') + return "".concat(value).concat(unit); + return value; +}; +var Element = styled_components_1["default"].div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-content: ", ";\n align-items: ", ";\n align-self: ", ";\n column-gap: ", ";\n display: ", ";\n flex: ", "\n flex-basis: ", ";\n flex-direction: ", ";\n flex-grow: ", ";\n flex-shrink: ", ";\n flex-wrap: ", ";\n gap: ", ";\n height: ", ";\n justify-content: ", ";\n justify-self: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n margin-left: ", ";\n max-height: ", ";\n max-width: ", ";\n min-height: ", ";\n min-width: ", ";\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n row-gap: ", ";\n width: ", ";\n"], ["\n align-content: ", ";\n align-items: ", ";\n align-self: ", ";\n column-gap: ", ";\n display: ", ";\n flex: ", "\n flex-basis: ", ";\n flex-direction: ", ";\n flex-grow: ", ";\n flex-shrink: ", ";\n flex-wrap: ", ";\n gap: ", ";\n height: ", ";\n justify-content: ", ";\n justify-self: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n margin-left: ", ";\n max-height: ", ";\n max-width: ", ";\n min-height: ", ";\n min-width: ", ";\n padding: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n row-gap: ", ";\n width: ", ";\n"])), function (_a) { + var $alignContent = _a.$alignContent; + return $alignContent; +}, function (_a) { + var $alignItems = _a.$alignItems; + return $alignItems; +}, function (_a) { + var $alignSelf = _a.$alignSelf; + return $alignSelf; +}, function (props) { return props.$columnGap; }, function (_a) { + var $display = _a.$display; + return $display; +}, function (props) { return props.$flex; }, function (_a) { + var $flexBasis = _a.$flexBasis; + return $flexBasis; +}, function (_a) { + var $flexDirection = _a.$flexDirection; + return $flexDirection; +}, function (_a) { + var $flexGrow = _a.$flexGrow; + return $flexGrow; +}, function (_a) { + var $flexShrink = _a.$flexShrink; + return $flexShrink; +}, function (_a) { + var $flexWrap = _a.$flexWrap; + return $flexWrap; +}, function (props) { return props.$gap; }, function (props) { return props.$height; }, function (_a) { + var $justifyContent = _a.$justifyContent; + return $justifyContent; +}, function (_a) { + var $justifySelf = _a.$justifySelf; + return $justifySelf; +}, function (props) { return props.$margin; }, function (props) { return props.$marginTop; }, function (props) { return props.$marginRight; }, function (props) { return props.$marginBottom; }, function (props) { return props.$marginLeft; }, function (props) { return props.$marginLeft; }, function (props) { return props.$maxHeight; }, function (props) { return props.$maxWidth; }, function (props) { return props.$minHeight; }, function (props) { return props.$minWidth; }, function (props) { return props.$padding; }, function (props) { return props.$paddingTop; }, function (props) { return props.$paddingRight; }, function (props) { return props.$paddingBottom; }, function (props) { return props.$paddingLeft; }, function (props) { return props.$rowGap; }, function (props) { return props.$width; }); +function Block(_a) { + var _b = _a.as, as = _b === void 0 ? 'div' : _b, alignContent = _a.alignContent, alignItems = _a.alignItems, alignSelf = _a.alignSelf, children = _a.children, columnGap = _a.columnGap, _c = _a.display, display = _c === void 0 ? undefined : _c, flex = _a.flex, flexBasis = _a.flexBasis, flexDirection = _a.flexDirection, flexGrow = _a.flexGrow, flexShrink = _a.flexShrink, flexWrap = _a.flexWrap, gap = _a.gap, height = _a.height, rowGap = _a.rowGap, justifyContent = _a.justifyContent, justifySelf = _a.justifySelf, margin = _a.margin, marginTop = _a.marginTop, marginRight = _a.marginRight, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, maxHeight = _a.maxHeight, maxWidth = _a.maxWidth, minHeight = _a.minHeight, minWidth = _a.minWidth, padding = _a.padding, paddingTop = _a.paddingTop, paddingRight = _a.paddingRight, paddingBottom = _a.paddingBottom, paddingLeft = _a.paddingLeft, _d = _a.unit, unit = _d === void 0 ? 'px' : _d, width = _a.width, restProps = __rest(_a, ["as", "alignContent", "alignItems", "alignSelf", "children", "columnGap", "display", "flex", "flexBasis", "flexDirection", "flexGrow", "flexShrink", "flexWrap", "gap", "height", "rowGap", "justifyContent", "justifySelf", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "maxHeight", "maxWidth", "minHeight", "minWidth", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "unit", "width"]); + return (react_1["default"].createElement(Element, __assign({}, restProps, { as: as, "$alignContent": alignContent, "$alignItems": alignItems, "$alignSelf": alignSelf, "$columnGap": withUnit(columnGap, unit), "$display": display, "$flex": flex, "$flexBasis": flexBasis, "$flexDirection": flexDirection, "$flexGrow": flexGrow, "$flexShrink": flexShrink, "$flexWrap": flexWrap, "$gap": withUnit(gap, unit), "$height": withUnit(height, unit), "$justifyContent": justifyContent, "$justifySelf": justifySelf, "$margin": withUnit(margin, unit), "$marginTop": withUnit(marginTop, unit), "$marginRight": withUnit(marginRight, unit), "$marginBottom": withUnit(marginBottom, unit), "$marginLeft": withUnit(marginLeft, unit), "$maxHeight": withUnit(maxHeight, unit), "$maxWidth": withUnit(maxWidth, unit), "$minHeight": withUnit(minHeight, unit), "$minWidth": withUnit(minWidth, unit), "$padding": withUnit(padding, unit), "$paddingTop": withUnit(paddingTop, unit), "$paddingRight": withUnit(paddingRight, unit), "$paddingBottom": withUnit(paddingBottom, unit), "$paddingLeft": withUnit(paddingLeft, unit), "$rowGap": withUnit(rowGap, unit), "$width": withUnit(width, unit) }), children)); +} +exports["default"] = Block; +var templateObject_1; +//# sourceMappingURL=Block.js.map \ No newline at end of file diff --git a/dist/layout/Block.js.map b/dist/layout/Block.js.map new file mode 100644 index 0000000..727a927 --- /dev/null +++ b/dist/layout/Block.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Block.js","sourceRoot":"","sources":["../../../src/layout/Block.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,wEAAuC;AAGvC,gEAAgE;AAChE,uGAAuG;AAEvG,IAAM,QAAQ,GAAG,UACf,KAAkC,EAClC,IAAwB;IAExB,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,UAAG,KAAK,SAAG,IAAI,CAAE,CAAC;IACxD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAoEF,IAAM,OAAO,GAAG,8BAAM,CAAC,GAAG,guBAAK,qBACZ,EAAoC,oBACtC,EAAgC,mBACjC,EAA8B,mBAC9B,EAA2B,gBAC9B,EAA0B,aAC7B,EAAsB,kBAChB,EAA8B,uBAC1B,EAAsC,kBAC3C,EAA4B,oBAC1B,EAAgC,kBAClC,EAA4B,YAClC,EAAqB,eAClB,EAAwB,wBACf,EAAwC,qBAC3C,EAAkC,eACxC,EAAwB,mBACpB,EAA2B,qBACzB,EAA6B,sBAC5B,EAA8B,oBAChC,EAA4B,oBAC5B,EAA4B,mBAC7B,EAA2B,kBAC5B,EAA0B,mBACzB,EAA2B,kBAC5B,EAA0B,gBAC5B,EAAyB,oBACrB,EAA4B,sBAC1B,EAA8B,uBAC7B,EAA+B,qBACjC,EAA6B,gBAClC,EAAwB,cAC1B,EAAuB,KACjC,KAhCkB,UAAC,EAAiB;QAAf,aAAa,mBAAA;IAAO,OAAA,aAAa;AAAb,CAAa,EACtC,UAAC,EAAe;QAAb,WAAW,iBAAA;IAAO,OAAA,WAAW;AAAX,CAAW,EACjC,UAAC,EAAc;QAAZ,UAAU,gBAAA;IAAO,OAAA,UAAU;AAAV,CAAU,EAC9B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,UAAU,EAAhB,CAAgB,EAC9B,UAAC,EAAY;QAAV,QAAQ,cAAA;IAAO,OAAA,QAAQ;AAAR,CAAQ,EAC7B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,EAAX,CAAW,EAChB,UAAC,EAAc;QAAZ,UAAU,gBAAA;IAAO,OAAA,UAAU;AAAV,CAAU,EAC1B,UAAC,EAAkB;QAAhB,cAAc,oBAAA;IAAO,OAAA,cAAc;AAAd,CAAc,EAC3C,UAAC,EAAa;QAAX,SAAS,eAAA;IAAO,OAAA,SAAS;AAAT,CAAS,EAC1B,UAAC,EAAe;QAAb,WAAW,iBAAA;IAAO,OAAA,WAAW;AAAX,CAAW,EAClC,UAAC,EAAa;QAAX,SAAS,eAAA;IAAO,OAAA,SAAS;AAAT,CAAS,EAClC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,IAAI,EAAV,CAAU,EAClB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,EACf,UAAC,EAAmB;QAAjB,eAAe,qBAAA;IAAO,OAAA,eAAe;AAAf,CAAe,EAC3C,UAAC,EAAgB;QAAd,YAAY,kBAAA;IAAO,OAAA,YAAY;AAAZ,CAAY,EACxC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,EACpB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,UAAU,EAAhB,CAAgB,EACzB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,YAAY,EAAlB,CAAkB,EAC5B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,aAAa,EAAnB,CAAmB,EAChC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,WAAW,EAAjB,CAAiB,EAC5B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,WAAW,EAAjB,CAAiB,EAC7B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,UAAU,EAAhB,CAAgB,EAC5B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,SAAS,EAAf,CAAe,EACzB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,UAAU,EAAhB,CAAgB,EAC5B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,SAAS,EAAf,CAAe,EAC5B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,QAAQ,EAAd,CAAc,EACrB,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,WAAW,EAAjB,CAAiB,EAC1B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,aAAa,EAAnB,CAAmB,EAC7B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,cAAc,EAApB,CAAoB,EACjC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,YAAY,EAAlB,CAAkB,EAClC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,OAAO,EAAb,CAAa,EAC1B,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,MAAM,EAAZ,CAAY,CACjC,CAAC;AAEF,SAAwB,KAAK,CAAC,EAoCjB;IAnCX,IAAA,UAAU,EAAV,EAAE,mBAAG,KAAK,KAAA,EACV,YAAY,kBAAA,EACZ,UAAU,gBAAA,EACV,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EACnB,IAAI,UAAA,EACJ,SAAS,eAAA,EACT,aAAa,mBAAA,EACb,QAAQ,cAAA,EACR,UAAU,gBAAA,EACV,QAAQ,cAAA,EACR,GAAG,SAAA,EACH,MAAM,YAAA,EACN,MAAM,YAAA,EACN,cAAc,oBAAA,EACd,WAAW,iBAAA,EACX,MAAM,YAAA,EACN,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,YAAY,kBAAA,EACZ,UAAU,gBAAA,EACV,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,YAAY,kBAAA,EACZ,aAAa,mBAAA,EACb,WAAW,iBAAA,EACX,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA,EACX,KAAK,WAAA,EACF,SAAS,cAnCgB,6aAoC7B,CADa;IAEZ,OAAO,CACL,iCAAC,OAAO,eACF,SAAS,IACb,EAAE,EAAE,EAAE,mBACS,YAAY,iBACd,UAAU,gBACX,SAAS,gBACT,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,cAC3B,OAAO,WACV,IAAI,gBACC,SAAS,oBACL,aAAa,eAClB,QAAQ,iBACN,UAAU,eACZ,QAAQ,UACb,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,aAChB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,qBACd,cAAc,kBACjB,WAAW,aAChB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,gBACnB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,kBACvB,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,mBAC1B,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,iBAC9B,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,gBAC3B,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,eAC1B,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,gBACvB,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,eAC1B,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,cACzB,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,iBACpB,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,mBACxB,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,oBAC3B,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,kBAC/B,QAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,aAChC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,YACvB,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,KAE5B,QAAQ,CACD,CACX,CAAC;AACJ,CAAC;AA5ED,2BA4EC"} \ No newline at end of file diff --git a/dist/layout/Col.d.ts b/dist/layout/Col.d.ts new file mode 100644 index 0000000..732e68f --- /dev/null +++ b/dist/layout/Col.d.ts @@ -0,0 +1,6 @@ +/// +import { BlockProps } from './Block'; +interface Props extends BlockProps { +} +export default function Col({ children, ...restProps }: Props): JSX.Element; +export {}; diff --git a/dist/layout/Col.js b/dist/layout/Col.js new file mode 100644 index 0000000..cec3f3d --- /dev/null +++ b/dist/layout/Col.js @@ -0,0 +1,35 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var react_1 = __importDefault(require("react")); +var Block_1 = __importDefault(require("./Block")); +function Col(_a) { + var children = _a.children, restProps = __rest(_a, ["children"]); + return (react_1["default"].createElement(Block_1["default"], __assign({}, restProps, { display: 'flex', flexDirection: 'column' }), children)); +} +exports["default"] = Col; +//# sourceMappingURL=Col.js.map \ No newline at end of file diff --git a/dist/layout/Col.js.map b/dist/layout/Col.js.map new file mode 100644 index 0000000..57d2010 --- /dev/null +++ b/dist/layout/Col.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Col.js","sourceRoot":"","sources":["../../../src/layout/Col.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,kDAA4C;AAI5C,SAAwB,GAAG,CAAC,EAAiC;IAA/B,IAAA,QAAQ,cAAA,EAAK,SAAS,cAAxB,YAA0B,CAAF;IAClD,OAAO,CACL,iCAAC,kBAAK,eAAK,SAAS,IAAE,OAAO,EAAC,MAAM,EAAC,aAAa,EAAC,QAAQ,KACxD,QAAQ,CACH,CACT,CAAC;AACJ,CAAC;AAND,yBAMC"} \ No newline at end of file diff --git a/dist/layout/Row.d.ts b/dist/layout/Row.d.ts new file mode 100644 index 0000000..6cdc1c9 --- /dev/null +++ b/dist/layout/Row.d.ts @@ -0,0 +1,6 @@ +/// +import { BlockProps } from './Block'; +interface Props extends BlockProps { +} +export default function Row({ children, ...restProps }: Props): JSX.Element; +export {}; diff --git a/dist/layout/Row.js b/dist/layout/Row.js new file mode 100644 index 0000000..a7184a8 --- /dev/null +++ b/dist/layout/Row.js @@ -0,0 +1,35 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var react_1 = __importDefault(require("react")); +var Block_1 = __importDefault(require("./Block")); +function Row(_a) { + var children = _a.children, restProps = __rest(_a, ["children"]); + return (react_1["default"].createElement(Block_1["default"], __assign({}, restProps, { display: 'flex', flexDirection: 'row' }), children)); +} +exports["default"] = Row; +//# sourceMappingURL=Row.js.map \ No newline at end of file diff --git a/dist/layout/Row.js.map b/dist/layout/Row.js.map new file mode 100644 index 0000000..c955a25 --- /dev/null +++ b/dist/layout/Row.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Row.js","sourceRoot":"","sources":["../../../src/layout/Row.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,kDAA4C;AAI5C,SAAwB,GAAG,CAAC,EAAiC;IAA/B,IAAA,QAAQ,cAAA,EAAK,SAAS,cAAxB,YAA0B,CAAF;IAClD,OAAO,CACL,iCAAC,kBAAK,eAAK,SAAS,IAAE,OAAO,EAAC,MAAM,EAAC,aAAa,EAAC,KAAK,KACrD,QAAQ,CACH,CACT,CAAC;AACJ,CAAC;AAND,yBAMC"} \ No newline at end of file diff --git a/dist/layout/index.d.ts b/dist/layout/index.d.ts new file mode 100644 index 0000000..732036c --- /dev/null +++ b/dist/layout/index.d.ts @@ -0,0 +1,3 @@ +export { default as Block } from './Block'; +export { default as Col } from './Col'; +export { default as Row } from './Row'; diff --git a/dist/layout/index.js b/dist/layout/index.js new file mode 100644 index 0000000..1b76f7c --- /dev/null +++ b/dist/layout/index.js @@ -0,0 +1,21 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +exports.__esModule = true; +exports.Row = exports.Col = exports.Block = void 0; +var Block_1 = require("./Block"); +__createBinding(exports, Block_1, "default", "Block"); +var Col_1 = require("./Col"); +__createBinding(exports, Col_1, "default", "Col"); +var Row_1 = require("./Row"); +__createBinding(exports, Row_1, "default", "Row"); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/layout/index.js.map b/dist/layout/index.js.map new file mode 100644 index 0000000..d7a0543 --- /dev/null +++ b/dist/layout/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/layout/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,iCAA2C;AAAlC,sDAAgB;AACzB,6BAAuC;AAA9B,kDAAc;AACvB,6BAAuC;AAA9B,kDAAc"} \ No newline at end of file diff --git a/dist/package.json b/dist/package.json new file mode 100644 index 0000000..c03a1b7 --- /dev/null +++ b/dist/package.json @@ -0,0 +1,49 @@ +{ + "name": "react-jetpack", + "version": "1.0.0-alpha.4", + "description": "An opinionated, but loosely coupled toolkit for efficient React.js development.", + "main": "./index.js", + "module": "./esm/index.js", + "types": "./index.d.ts", + "scripts": { + "publish": "npm publish" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/thinkholic/react-jetpack.git" + }, + "author": "thinkholic", + "license": "MIT", + "bugs": { + "url": "https://github.com/thinkholic/react-jetpack/issues" + }, + "homepage": "https://github.com/thinkholic/react-jetpack#readme", + "devDependencies": { + "@babel/core": "^7.20.12", + "@storybook/addon-actions": "^6.5.15", + "@storybook/addon-essentials": "^6.5.15", + "@storybook/addon-interactions": "^6.5.15", + "@storybook/addon-links": "^6.5.15", + "@storybook/builder-webpack4": "^6.5.15", + "@storybook/manager-webpack4": "^6.5.15", + "@storybook/react": "^6.5.15", + "@storybook/testing-library": "^0.0.13", + "@types/react": "^18.0.26", + "@types/react-dom": "^18.0.10", + "@types/styled-components": "^5.1.26", + "axios": "^1.2.2", + "babel-loader": "^8.3.0", + "clsx": "^1.2.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-helmet-async": "^1.3.0", + "styled-components": "^5.3.6", + "typescript": "^4.9.4" + }, + "dependencies": {}, + "peerDependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0", + "styled-components": "^5.3.6" + } +} \ No newline at end of file diff --git a/dist/providers/ThemeProvider/index.d.ts b/dist/providers/ThemeProvider/index.d.ts new file mode 100644 index 0000000..7b8452f --- /dev/null +++ b/dist/providers/ThemeProvider/index.d.ts @@ -0,0 +1,7 @@ +import React from 'react'; +type Props = { + children: React.ReactNode; + theme: unknown; +}; +export default function ThemeProvider({ children, theme }: Props): JSX.Element; +export {}; diff --git a/dist/providers/ThemeProvider/index.js b/dist/providers/ThemeProvider/index.js new file mode 100644 index 0000000..46302b9 --- /dev/null +++ b/dist/providers/ThemeProvider/index.js @@ -0,0 +1,47 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var react_1 = __importDefault(require("react")); +var styled_components_1 = require("styled-components"); +var styles_1 = require("./styles"); +var styles = { + '--colors-primary': '#2b3a55', + '--colors-secondary': '#ce7777', + '--colors-tertiary': '#e8c4c4', + '--colors-accent': '#f2e5e5', + '--colors-error': 'rgb(253, 237, 237)', + '--colors-warning': 'rgb(255, 244, 229)', + '--colors-info': 'rgb(229, 246, 253)', + '--colors-success': 'rgb(237, 247, 237)', + '--colors-bg-primary': 'white', + '--colors-bg-secondary': '#efefef', + '--colors-text-primary': '#000000', + '--colors-text-secondary': '#cccccc', + '--colors-disabled': 'rgba(0, 0, 0, 0.12)', + '--colors-a': 'blue', + '--colors-a-hover': '#cccccc', + '--fonts-primary': "'Montserrat', sans-serif", + '--fonts-secondary': "'Montserrat', sans-serif", + '--fonts-size-primary': '14px' +}; +function ThemeProvider(_a) { + var children = _a.children, theme = _a.theme; + return (react_1["default"].createElement(styled_components_1.ThemeProvider, { theme: theme }, + react_1["default"].createElement(styles_1.GlobalStyle, __assign({}, styles)), + children)); +} +exports["default"] = ThemeProvider; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/providers/ThemeProvider/index.js.map b/dist/providers/ThemeProvider/index.js.map new file mode 100644 index 0000000..1072259 --- /dev/null +++ b/dist/providers/ThemeProvider/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/providers/ThemeProvider/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA0B;AAC1B,uDAAoE;AACpE,mCAAuC;AAOvC,IAAM,MAAM,GAAG;IACb,kBAAkB,EAAE,SAAS;IAC7B,oBAAoB,EAAE,SAAS;IAC/B,mBAAmB,EAAE,SAAS;IAC9B,iBAAiB,EAAE,SAAS;IAC5B,gBAAgB,EAAE,oBAAoB;IACtC,kBAAkB,EAAE,oBAAoB;IACxC,eAAe,EAAE,oBAAoB;IACrC,kBAAkB,EAAE,oBAAoB;IACxC,qBAAqB,EAAE,OAAO;IAC9B,uBAAuB,EAAE,SAAS;IAClC,uBAAuB,EAAE,SAAS;IAClC,yBAAyB,EAAE,SAAS;IACpC,mBAAmB,EAAE,qBAAqB;IAC1C,YAAY,EAAE,MAAM;IACpB,kBAAkB,EAAE,SAAS;IAC7B,iBAAiB,EAAE,0BAA0B;IAC7C,mBAAmB,EAAE,0BAA0B;IAC/C,sBAAsB,EAAE,MAAM;CACxB,CAAC;AAET,SAAwB,aAAa,CAAC,EAA0B;QAAxB,QAAQ,cAAA,EAAE,KAAK,WAAA;IACrD,OAAO,CACL,iCAAC,iCAAc,IAAC,KAAK,EAAE,KAAK;QAC1B,iCAAC,oBAAW,eAAK,MAAM,EAAI;QAC1B,QAAQ,CACM,CAClB,CAAC;AACJ,CAAC;AAPD,mCAOC"} \ No newline at end of file diff --git a/dist/providers/ThemeProvider/styles.d.ts b/dist/providers/ThemeProvider/styles.d.ts new file mode 100644 index 0000000..3a33b74 --- /dev/null +++ b/dist/providers/ThemeProvider/styles.d.ts @@ -0,0 +1 @@ +export declare const GlobalStyle: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>; diff --git a/dist/providers/ThemeProvider/styles.js b/dist/providers/ThemeProvider/styles.js new file mode 100644 index 0000000..0f907cc --- /dev/null +++ b/dist/providers/ThemeProvider/styles.js @@ -0,0 +1,12 @@ +"use strict"; +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +exports.__esModule = true; +exports.GlobalStyle = void 0; +// @ts-nocheck +var styled_components_1 = require("styled-components"); +exports.GlobalStyle = (0, styled_components_1.createGlobalStyle)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n :root {\n --colors-primary: ", ";\n --colors-secondary: ", ";\n --colors-tertiary: ", ";\n --colors-accent: ", ";\n --colors-error: ", ";\n --colors-warning: ", ";\n --colors-info: ", ";\n --colors-success: ", ";\n --colors-bg-primary: ", ";\n --colors-bg-secondary: ", ";\n --colors-text-primary:", ";\n --colors-text-secondary: ", ";\n --colors-disabled: ", ";\n --colors-a: ", ";\n --colors-a-hover: ", ";\n --fonts-primary: ", ";\n --fonts-secondary: ", ";\n --fonts-size-primary: ", ";\n }\n /* normalize browser defaults with normalize.css */\n button,hr,input{overflow:visible}progress,sub,sup{vertical-align:baseline}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}details,main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[hidden],template{display:none}\n\n html {}\n a {\n color: var(--colors-a);\n text-decoration: none;\n &:hover {\n color: var(--colors-a-hover);\n }\n }\n aside {}\n article {}\n b {}\n body {\n font-family: var(--fonts-primary);\n font-size: var(--fonts-size-primary);\n background-color: var(--colors-bg-primary);\n color: var(--colors-text-primary);\n }\n button {\n cursor: pointer;\n }\n button:disabled,\n button[disabled] {\n cursor: default;\n }\n code {}\n del {}\n div {}\n details {}\n em {}\n figcaption {}\n figure {}\n footer {}\n h1, h2, h3, h4, h5, h6 {}\n header {}\n i {}\n input {}\n input[type='checkbox'] {}\n input:disabled,\n input[disabled] {\n cursor: default;\n }\n ins {}\n main {}\n mark {}\n nav {}\n ol {}\n ol li {}\n option {}\n p {}\n pre {}\n select {}\n section {}\n small {}\n span {}\n strong {}\n sub {}\n summary {}\n sup {}\n table {}\n time {}\n ul {}\n ul li {}\n\n /** JAccordion, JAccordionItem */\n .jpk-accordion {\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n &__section {}\n &__summary {\n align-items: center;\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n padding: 10px;\n }\n &__content {\n padding: 10px;\n }\n }\n\n /** JAlert */\n .jpk-alert {\n border-radius: 4px;\n color: rgb(95, 33, 32);\n font-size: 0.875rem;\n line-height: 1.43;\n letter-spacing: 0.01071em;\n padding: 10px 15px;\n\n &--error {\n background-color: var(--colors-error);\n }\n &--warning {\n background-color: var(--colors-warning);\n }\n &--info {\n background-color: var(--colors-info);\n }\n &--success {\n background-color: var(--colors-success);\n }\n }\n\n /** JButton */\n .jpk-btn {\n cursor: pointer;\n\n &__contained {\n background-color: var(--colors-primary);\n border: 0px;\n box-shadow: var(--colors-primary) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px;\n color: rgb(255, 255, 255);\n\n &:disabled,\n &[disabled] {\n background-color: var(--colors-disabled);\n box-shadow: var(--colors-disabled) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px;\n color: var(--colors-accent);\n }\n }\n &__outlined {\n background-color: transparent;\n border: 1px solid rgba(25, 118, 210, 0.5);\n box-shadow: none;\n color: var(--colors-primary);\n\n &:disabled,\n &[disabled] {\n border: 1px solid var(--colors-disabled);\n color: var(--colors-accent);\n }\n }\n &__text {\n background-color: transparent;\n border: 0px;\n color: var(--colors-primary);\n\n &:disabled,\n &[disabled] {\n color: var(--colors-accent);\n }\n }\n\n &__small {\n padding: 4px 5px;\n }\n &__medium {\n padding: 6px 8px;\n }\n &__large {\n padding: 8px 11px;\n }\n }\n\n /** JCheckbox */\n .jpk-checkbox {\n align-items: center;\n display: flex;\n flex-direction: row;\n vertical-align: middle;\n gap: 5px;\n\n &--checked {}\n &--disabled {}\n\n &__input {\n accent-color: var(--colors-primary);\n }\n &__label {}\n }\n\n /** JFileInput */\n .jpk-file-input {}\n\n /** JList */\n .jpk-list {\n &__item {}\n }\n\n /** JPagiantion **/\n .jpk-pagination {\n align-items: center;\n display: flex;\n gap: 5px;\n list-style: none;\n margin: 0;\n padding: 0;\n\n &__nav {\n border: none;\n background-color: transparent;\n\n &__first {}\n &__prev {}\n &__next {}\n &__last {}\n }\n \n &__item {\n\n &--current {\n background-color: #cccccc;\n }\n }\n \n }\n\n /** JRadio */\n .jpk-radio {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--checked {}\n &--disabled {}\n\n &__input {\n accent-color: var(--colors-primary);\n }\n &__label {}\n }\n\n /** JRangeInput {} */\n .jpk-range-input {\n accent-color: var(--colors-primary);\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--disabled\n }\n\n /** JSearchInput */\n .jpk-search-input {\n &--disabled {}\n\n &__input {}\n &__btn {}\n }\n\n /** JSelect */\n .jpk-select {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--disabled {}\n\n &__label {}\n &__menu {\n &__item {}\n }\n }\n\n /** JTable, JTableHeader, JTableRow, JTableColHead, JTableBody, JTableCell, JTableFooter */\n .jpk-table {\n &__header {}\n &__row {}\n &__col-head {}\n &__body {}\n &__cell {}\n &__footer {}\n }\n\n /** JTabs */\n .jpk-tabs {\n .jpk-tab {\n &__header {\n border-bottom: 1px solid #ccc;\n padding-left: 0;\n }\n\n &__summary {\n cursor: pointer;\n display: inline-block;\n list-style: none;\n margin-bottom: -1px;\n padding: 0.5rem 0.75rem;\n }\n\n &__content {}\n\n &--active {\n background-color: white;\n border: solid #ccc;\n border-width: 1px 1px 0 1px;\n }\n }\n }\n\n /** JText (JTypography) */\n .jpk-typography {\n &__b {}\n &__big {}\n &__del {}\n &__div {}\n &__em {}\n &__h1 {}\n &__h2 {}\n &__h3 {}\n &__h4 {}\n &__h5 {}\n &__h6 {}\n &__i {}\n &__ins {}\n &__mark {}\n &__p {}\n &__span {}\n &__sub {}\n &__sup {}\n &__small {}\n &__strong {}\n &__u {}\n }\n\n /** JTextInput */\n .jpk-text-input {\n display: flex;\n align-items: center;\n gap: 5px;\n\n &--disabled {}\n \n &__label {}\n &__input {}\n }\n"], ["\n :root {\n --colors-primary: ", ";\n --colors-secondary: ", ";\n --colors-tertiary: ", ";\n --colors-accent: ", ";\n --colors-error: ", ";\n --colors-warning: ", ";\n --colors-info: ", ";\n --colors-success: ", ";\n --colors-bg-primary: ", ";\n --colors-bg-secondary: ", ";\n --colors-text-primary:", ";\n --colors-text-secondary: ", ";\n --colors-disabled: ", ";\n --colors-a: ", ";\n --colors-a-hover: ", ";\n --fonts-primary: ", ";\n --fonts-secondary: ", ";\n --fonts-size-primary: ", ";\n }\n /* normalize browser defaults with normalize.css */\n button,hr,input{overflow:visible}progress,sub,sup{vertical-align:baseline}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}details,main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[hidden],template{display:none}\n\n html {}\n a {\n color: var(--colors-a);\n text-decoration: none;\n &:hover {\n color: var(--colors-a-hover);\n }\n }\n aside {}\n article {}\n b {}\n body {\n font-family: var(--fonts-primary);\n font-size: var(--fonts-size-primary);\n background-color: var(--colors-bg-primary);\n color: var(--colors-text-primary);\n }\n button {\n cursor: pointer;\n }\n button:disabled,\n button[disabled] {\n cursor: default;\n }\n code {}\n del {}\n div {}\n details {}\n em {}\n figcaption {}\n figure {}\n footer {}\n h1, h2, h3, h4, h5, h6 {}\n header {}\n i {}\n input {}\n input[type='checkbox'] {}\n input:disabled,\n input[disabled] {\n cursor: default;\n }\n ins {}\n main {}\n mark {}\n nav {}\n ol {}\n ol li {}\n option {}\n p {}\n pre {}\n select {}\n section {}\n small {}\n span {}\n strong {}\n sub {}\n summary {}\n sup {}\n table {}\n time {}\n ul {}\n ul li {}\n\n /** JAccordion, JAccordionItem */\n .jpk-accordion {\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n &__section {}\n &__summary {\n align-items: center;\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n padding: 10px;\n }\n &__content {\n padding: 10px;\n }\n }\n\n /** JAlert */\n .jpk-alert {\n border-radius: 4px;\n color: rgb(95, 33, 32);\n font-size: 0.875rem;\n line-height: 1.43;\n letter-spacing: 0.01071em;\n padding: 10px 15px;\n\n &--error {\n background-color: var(--colors-error);\n }\n &--warning {\n background-color: var(--colors-warning);\n }\n &--info {\n background-color: var(--colors-info);\n }\n &--success {\n background-color: var(--colors-success);\n }\n }\n\n /** JButton */\n .jpk-btn {\n cursor: pointer;\n\n &__contained {\n background-color: var(--colors-primary);\n border: 0px;\n box-shadow: var(--colors-primary) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px;\n color: rgb(255, 255, 255);\n\n &:disabled,\n &[disabled] {\n background-color: var(--colors-disabled);\n box-shadow: var(--colors-disabled) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px;\n color: var(--colors-accent);\n }\n }\n &__outlined {\n background-color: transparent;\n border: 1px solid rgba(25, 118, 210, 0.5);\n box-shadow: none;\n color: var(--colors-primary);\n\n &:disabled,\n &[disabled] {\n border: 1px solid var(--colors-disabled);\n color: var(--colors-accent);\n }\n }\n &__text {\n background-color: transparent;\n border: 0px;\n color: var(--colors-primary);\n\n &:disabled,\n &[disabled] {\n color: var(--colors-accent);\n }\n }\n\n &__small {\n padding: 4px 5px;\n }\n &__medium {\n padding: 6px 8px;\n }\n &__large {\n padding: 8px 11px;\n }\n }\n\n /** JCheckbox */\n .jpk-checkbox {\n align-items: center;\n display: flex;\n flex-direction: row;\n vertical-align: middle;\n gap: 5px;\n\n &--checked {}\n &--disabled {}\n\n &__input {\n accent-color: var(--colors-primary);\n }\n &__label {}\n }\n\n /** JFileInput */\n .jpk-file-input {}\n\n /** JList */\n .jpk-list {\n &__item {}\n }\n\n /** JPagiantion **/\n .jpk-pagination {\n align-items: center;\n display: flex;\n gap: 5px;\n list-style: none;\n margin: 0;\n padding: 0;\n\n &__nav {\n border: none;\n background-color: transparent;\n\n &__first {}\n &__prev {}\n &__next {}\n &__last {}\n }\n \n &__item {\n\n &--current {\n background-color: #cccccc;\n }\n }\n \n }\n\n /** JRadio */\n .jpk-radio {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--checked {}\n &--disabled {}\n\n &__input {\n accent-color: var(--colors-primary);\n }\n &__label {}\n }\n\n /** JRangeInput {} */\n .jpk-range-input {\n accent-color: var(--colors-primary);\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--disabled\n }\n\n /** JSearchInput */\n .jpk-search-input {\n &--disabled {}\n\n &__input {}\n &__btn {}\n }\n\n /** JSelect */\n .jpk-select {\n align-items: center;\n display: flex;\n flex-direction: row;\n gap: 5px;\n\n &--disabled {}\n\n &__label {}\n &__menu {\n &__item {}\n }\n }\n\n /** JTable, JTableHeader, JTableRow, JTableColHead, JTableBody, JTableCell, JTableFooter */\n .jpk-table {\n &__header {}\n &__row {}\n &__col-head {}\n &__body {}\n &__cell {}\n &__footer {}\n }\n\n /** JTabs */\n .jpk-tabs {\n .jpk-tab {\n &__header {\n border-bottom: 1px solid #ccc;\n padding-left: 0;\n }\n\n &__summary {\n cursor: pointer;\n display: inline-block;\n list-style: none;\n margin-bottom: -1px;\n padding: 0.5rem 0.75rem;\n }\n\n &__content {}\n\n &--active {\n background-color: white;\n border: solid #ccc;\n border-width: 1px 1px 0 1px;\n }\n }\n }\n\n /** JText (JTypography) */\n .jpk-typography {\n &__b {}\n &__big {}\n &__del {}\n &__div {}\n &__em {}\n &__h1 {}\n &__h2 {}\n &__h3 {}\n &__h4 {}\n &__h5 {}\n &__h6 {}\n &__i {}\n &__ins {}\n &__mark {}\n &__p {}\n &__span {}\n &__sub {}\n &__sup {}\n &__small {}\n &__strong {}\n &__u {}\n }\n\n /** JTextInput */\n .jpk-text-input {\n display: flex;\n align-items: center;\n gap: 5px;\n\n &--disabled {}\n \n &__label {}\n &__input {}\n }\n"])), function ($) { return $['--colors-primary']; }, function ($) { return $['--colors-secondary']; }, function ($) { return $['--colors-tertiary']; }, function ($) { return $['--colors-accent']; }, function ($) { return $['--colors-error']; }, function ($) { return $['--colors-warning']; }, function ($) { return $['--colors-info']; }, function ($) { return $['--colors-success']; }, function ($) { return $['--colors-bg-primary']; }, function ($) { return $['--colors-bg-secondary']; }, function ($) { return $['--colors-text-primary']; }, function ($) { return $['--colors-text-secondary']; }, function ($) { return $['--colors-disabled']; }, function ($) { return $['--colors-a']; }, function ($) { return $['--colors-a-hover']; }, function ($) { return $['--fonts-primary']; }, function ($) { return $['--fonts-secondary']; }, function ($) { return $['--fonts-size-primary']; }); +var templateObject_1; +//# sourceMappingURL=styles.js.map \ No newline at end of file diff --git a/dist/providers/ThemeProvider/styles.js.map b/dist/providers/ThemeProvider/styles.js.map new file mode 100644 index 0000000..211fde6 --- /dev/null +++ b/dist/providers/ThemeProvider/styles.js.map @@ -0,0 +1 @@ +{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/providers/ThemeProvider/styles.ts"],"names":[],"mappings":";;;;;;;AAAA,cAAc;AACd,uDAAsD;AAEzC,QAAA,WAAW,OAAG,qCAAiB,qgQAAA,qCAEpB,EAA4B,6BAC1B,EAA8B,4BAC/B,EAA6B,0BAC/B,EAA2B,yBAC5B,EAA0B,2BACxB,EAA4B,wBAC/B,EAAyB,2BACtB,EAA4B,8BACzB,EAA+B,gCAC7B,EAAiC,+BAClC,EAAiC,kCAC9B,EAAmC,4BACzC,EAA6B,qBACpC,EAAsB,2BAChB,EAA4B,0BAC7B,EAA2B,4BACzB,EAA6B,+BAC1B,EAAgC,85OAgV3D,KAjWuB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,kBAAkB,CAAC,EAArB,CAAqB,EAC1B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,oBAAoB,CAAC,EAAvB,CAAuB,EAC/B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,mBAAmB,CAAC,EAAtB,CAAsB,EAC/B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,iBAAiB,CAAC,EAApB,CAAoB,EAC5B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,gBAAgB,CAAC,EAAnB,CAAmB,EACxB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,kBAAkB,CAAC,EAArB,CAAqB,EAC/B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,eAAe,CAAC,EAAlB,CAAkB,EACtB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,kBAAkB,CAAC,EAArB,CAAqB,EACzB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,qBAAqB,CAAC,EAAxB,CAAwB,EAC7B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,uBAAuB,CAAC,EAA1B,CAA0B,EAClC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,uBAAuB,CAAC,EAA1B,CAA0B,EAC9B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,yBAAyB,CAAC,EAA5B,CAA4B,EACzC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,mBAAmB,CAAC,EAAtB,CAAsB,EACpC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,YAAY,CAAC,EAAf,CAAe,EAChB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,kBAAkB,CAAC,EAArB,CAAqB,EAC7B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,iBAAiB,CAAC,EAApB,CAAoB,EACzB,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,mBAAmB,CAAC,EAAtB,CAAsB,EAC1B,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,sBAAsB,CAAC,EAAzB,CAAyB,EAgV1D"} \ No newline at end of file diff --git a/dist/providers/index.d.ts b/dist/providers/index.d.ts new file mode 100644 index 0000000..ef71d19 --- /dev/null +++ b/dist/providers/index.d.ts @@ -0,0 +1,6 @@ +import React from 'react'; +export type ProviderProps = { + children: React.ReactNode; + theme?: unknown; +}; +export default function Providers({ children, theme }: ProviderProps): JSX.Element; diff --git a/dist/providers/index.js b/dist/providers/index.js new file mode 100644 index 0000000..5fb9c57 --- /dev/null +++ b/dist/providers/index.js @@ -0,0 +1,15 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +exports.__esModule = true; +var react_1 = __importDefault(require("react")); +var react_helmet_async_1 = require("react-helmet-async"); +var ThemeProvider_1 = __importDefault(require("./ThemeProvider")); +function Providers(_a) { + var children = _a.children, _b = _a.theme, theme = _b === void 0 ? {} : _b; + return (react_1["default"].createElement(react_helmet_async_1.HelmetProvider, null, + react_1["default"].createElement(ThemeProvider_1["default"], { theme: theme }, children))); +} +exports["default"] = Providers; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/providers/index.js.map b/dist/providers/index.js.map new file mode 100644 index 0000000..e686c05 --- /dev/null +++ b/dist/providers/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/index.tsx"],"names":[],"mappings":";;;;;AAAA,gDAA0B;AAC1B,yDAAoD;AACpD,kEAA4C;AAO5C,SAAwB,SAAS,CAAC,EAAuC;QAArC,QAAQ,cAAA,EAAE,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA;IACtD,OAAO,CACL,iCAAC,mCAAc;QACb,iCAAC,0BAAa,IAAC,KAAK,EAAE,KAAK,IAAG,QAAQ,CAAiB,CACxC,CAClB,CAAC;AACJ,CAAC;AAND,+BAMC"} \ No newline at end of file diff --git a/dist/types/CSSProperties.d.ts b/dist/types/CSSProperties.d.ts new file mode 100644 index 0000000..8168a3c --- /dev/null +++ b/dist/types/CSSProperties.d.ts @@ -0,0 +1,12 @@ +export type AlignContent = 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly' | 'initial' | 'inherit'; +export type AlignItems = 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'baseline' | 'initial' | 'inherit'; +export type AlignSelf = 'auto' | 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'baseline' | 'initial' | 'inherit'; +export type Display = 'inline' | 'block' | 'contents' | 'flex' | 'grid' | 'inline-block' | 'inline-flex' | 'inline-grid' | 'inline-table' | 'list-item' | 'run-in' | 'table' | 'table-caption' | 'table-column-group' | 'table-header-group' | 'table-footer-group' | 'table-row-group' | 'table-cell' | 'table-column' | 'table-row' | 'none' | 'initial' | 'inherit'; +export type FlexBasis = number | 'auto' | 'initial' | 'inherit'; +export type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse' | 'initial' | 'inherit'; +export type FlexGrow = number | 'initial' | 'inherit'; +export type FlexShrink = number | 'initial' | 'inherit'; +export type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse' | 'initial' | 'inherit'; +export type JustifyContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly' | 'initial' | 'inherit'; +export type JustifySelf = 'auto' | 'stretch' | 'center' | 'flex-start' | 'flex-end' | 'baseline' | 'initial' | 'inherit'; +export type Unit = '%' | 'em' | 'rem' | 'px' | 'vh' | 'vw'; diff --git a/dist/types/CSSProperties.js b/dist/types/CSSProperties.js new file mode 100644 index 0000000..0458569 --- /dev/null +++ b/dist/types/CSSProperties.js @@ -0,0 +1,3 @@ +"use strict"; +exports.__esModule = true; +//# sourceMappingURL=CSSProperties.js.map \ No newline at end of file diff --git a/dist/types/CSSProperties.js.map b/dist/types/CSSProperties.js.map new file mode 100644 index 0000000..7825e33 --- /dev/null +++ b/dist/types/CSSProperties.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CSSProperties.js","sourceRoot":"","sources":["../../../src/types/CSSProperties.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/types/index.d.ts b/dist/types/index.d.ts new file mode 100644 index 0000000..76d90eb --- /dev/null +++ b/dist/types/index.d.ts @@ -0,0 +1,4 @@ +export * from './theme'; +export * as CSSProperties from './CSSProperties'; +export type { ProviderProps } from '../providers'; +export type { PortalProps } from '../base/Portal'; diff --git a/dist/types/index.js b/dist/types/index.js new file mode 100644 index 0000000..47246d9 --- /dev/null +++ b/dist/types/index.js @@ -0,0 +1,32 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +exports.__esModule = true; +exports.CSSProperties = void 0; +__exportStar(require("./theme"), exports); +exports.CSSProperties = __importStar(require("./CSSProperties")); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/types/index.js.map b/dist/types/index.js.map new file mode 100644 index 0000000..61275df --- /dev/null +++ b/dist/types/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,iEAAiD"} \ No newline at end of file diff --git a/dist/types/theme.d.ts b/dist/types/theme.d.ts new file mode 100644 index 0000000..218decb --- /dev/null +++ b/dist/types/theme.d.ts @@ -0,0 +1,21 @@ +type PaletteColor = { + light: string; + dark: string; +}; +export type ThemeConfig = { + __prefix: string; + mode: 'light' | 'dark'; + colors: { + primary: PaletteColor; + secondary: PaletteColor; + error: PaletteColor; + warning: PaletteColor; + info: PaletteColor; + success: PaletteColor; + background: { + default: string; + paper: string; + }; + }; +}; +export {}; diff --git a/dist/types/theme.js b/dist/types/theme.js new file mode 100644 index 0000000..228f4ec --- /dev/null +++ b/dist/types/theme.js @@ -0,0 +1,3 @@ +"use strict"; +exports.__esModule = true; +//# sourceMappingURL=theme.js.map \ No newline at end of file diff --git a/dist/types/theme.js.map b/dist/types/theme.js.map new file mode 100644 index 0000000..8d1af52 --- /dev/null +++ b/dist/types/theme.js.map @@ -0,0 +1 @@ +{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/types/theme.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/utils/index.d.ts b/dist/utils/index.d.ts new file mode 100644 index 0000000..4ec645b --- /dev/null +++ b/dist/utils/index.d.ts @@ -0,0 +1,2 @@ +export * from './localStorage'; +export * from './sessionStorage'; diff --git a/dist/utils/index.js b/dist/utils/index.js new file mode 100644 index 0000000..9eae2c1 --- /dev/null +++ b/dist/utils/index.js @@ -0,0 +1,19 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +exports.__esModule = true; +__exportStar(require("./localStorage"), exports); +__exportStar(require("./sessionStorage"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/utils/index.js.map b/dist/utils/index.js.map new file mode 100644 index 0000000..d60de54 --- /dev/null +++ b/dist/utils/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,mDAAiC"} \ No newline at end of file diff --git a/dist/utils/localStorage.d.ts b/dist/utils/localStorage.d.ts new file mode 100644 index 0000000..51f0c04 --- /dev/null +++ b/dist/utils/localStorage.d.ts @@ -0,0 +1,8 @@ +export default localStorage; +declare namespace localStorage { + function set(key: any, value: any): void; + function get(key: any): string | null; + function getParsed(key: any): any; + function remove(key: any): void; + function clear(): void; +} diff --git a/dist/utils/localStorage.js b/dist/utils/localStorage.js new file mode 100644 index 0000000..16dec53 --- /dev/null +++ b/dist/utils/localStorage.js @@ -0,0 +1,19 @@ +"use strict"; +exports.__esModule = true; +var localStorage = { + set: function (key, value) { return window.localStorage.setItem(key, value); }, + get: function (key) { return window.localStorage.getItem(key); }, + getParsed: function (key) { + try { + var data = JSON.parse(window.localStorage.getItem(key)); + return data; + } + catch (err) { + return null; + } + }, + remove: function (key) { return window.localStorage.removeItem(key); }, + clear: function () { return window.localStorage.clear(); } +}; +exports["default"] = localStorage; +//# sourceMappingURL=localStorage.js.map \ No newline at end of file diff --git a/dist/utils/localStorage.js.map b/dist/utils/localStorage.js.map new file mode 100644 index 0000000..c7c0df5 --- /dev/null +++ b/dist/utils/localStorage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"localStorage.js","sourceRoot":"","sources":["../../../src/utils/localStorage.js"],"names":[],"mappings":";;AAAA,IAAM,YAAY,GAAG;IACnB,GAAG,EAAE,UAAC,GAAG,EAAE,KAAK,IAAK,OAAA,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,EAAvC,CAAuC;IAC5D,GAAG,EAAE,UAAC,GAAG,IAAK,OAAA,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAhC,CAAgC;IAC9C,SAAS,EAAE,UAAC,GAAG;QACb,IAAI;YACF,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YAC1D,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IACD,MAAM,EAAE,UAAC,GAAG,IAAK,OAAA,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,EAAnC,CAAmC;IACpD,KAAK,EAAE,cAAM,OAAA,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,EAA3B,CAA2B;CACzC,CAAC;AAEF,qBAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/dist/utils/mixins.d.ts b/dist/utils/mixins.d.ts new file mode 100644 index 0000000..da5b43e --- /dev/null +++ b/dist/utils/mixins.d.ts @@ -0,0 +1 @@ +export function omit(obj: any, ...props: any[]): any; diff --git a/dist/utils/mixins.js b/dist/utils/mixins.js new file mode 100644 index 0000000..1ea6485 --- /dev/null +++ b/dist/utils/mixins.js @@ -0,0 +1,30 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +exports.__esModule = true; +exports.omit = void 0; +// Omit propery from an object +function omit(obj) { + var props = []; + for (var _i = 1; _i < arguments.length; _i++) { + props[_i - 1] = arguments[_i]; + } + if (!obj) + return undefined; + var _obj = __assign({}, obj); + props.forEach(function (prop) { + delete _obj[prop]; + }); + return _obj; +} +exports.omit = omit; +//# sourceMappingURL=mixins.js.map \ No newline at end of file diff --git a/dist/utils/mixins.js.map b/dist/utils/mixins.js.map new file mode 100644 index 0000000..2bba06f --- /dev/null +++ b/dist/utils/mixins.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mixins.js","sourceRoot":"","sources":["../../../src/utils/mixins.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,SAAgB,IAAI,CAAC,GAAG;IAAE,eAAQ;SAAR,UAAQ,EAAR,qBAAQ,EAAR,IAAQ;QAAR,8BAAQ;;IAChC,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAC3B,IAAM,IAAI,gBAAQ,GAAG,CAAE,CAAC;IACxB,KAAK,CAAC,OAAO,CAAC,UAAU,IAAI;QAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC;AAPD,oBAOC"} \ No newline at end of file diff --git a/dist/utils/sessionStorage.d.ts b/dist/utils/sessionStorage.d.ts new file mode 100644 index 0000000..c6ce617 --- /dev/null +++ b/dist/utils/sessionStorage.d.ts @@ -0,0 +1,8 @@ +export default sessionStorage; +declare namespace sessionStorage { + function set(key: any, value: any): void; + function get(key: any): string | null; + function getParsed(key: any): any; + function remove(key: any): void; + function clear(): void; +} diff --git a/dist/utils/sessionStorage.js b/dist/utils/sessionStorage.js new file mode 100644 index 0000000..71ad270 --- /dev/null +++ b/dist/utils/sessionStorage.js @@ -0,0 +1,19 @@ +"use strict"; +exports.__esModule = true; +var sessionStorage = { + set: function (key, value) { return window.sessionStorage.setItem(key, value); }, + get: function (key) { return window.sessionStorage.getItem(key); }, + getParsed: function (key) { + try { + var data = JSON.parse(window.sessionStorage.getItem(key)); + return data; + } + catch (err) { + return null; + } + }, + remove: function (key) { return window.sessionStorage.removeItem(key); }, + clear: function () { return window.sessionStorage.clear(); } +}; +exports["default"] = sessionStorage; +//# sourceMappingURL=sessionStorage.js.map \ No newline at end of file diff --git a/dist/utils/sessionStorage.js.map b/dist/utils/sessionStorage.js.map new file mode 100644 index 0000000..ccca174 --- /dev/null +++ b/dist/utils/sessionStorage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sessionStorage.js","sourceRoot":"","sources":["../../../src/utils/sessionStorage.js"],"names":[],"mappings":";;AAAA,IAAM,cAAc,GAAG;IACrB,GAAG,EAAE,UAAC,GAAG,EAAE,KAAK,IAAK,OAAA,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,EAAzC,CAAyC;IAC9D,GAAG,EAAE,UAAC,GAAG,IAAK,OAAA,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,EAAlC,CAAkC;IAChD,SAAS,EAAE,UAAC,GAAG;QACb,IAAI;YACF,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YAC5D,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IACD,MAAM,EAAE,UAAC,GAAG,IAAK,OAAA,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,EAArC,CAAqC;IACtD,KAAK,EAAE,cAAM,OAAA,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,EAA7B,CAA6B;CAC3C,CAAC;AAEF,qBAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index 5b055b5..34e8ccb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-jetpack", - "version": "1.0.0-alpha.3", + "version": "1.0.0-alpha.4", "description": "An opinionated, but loosely coupled toolkit for efficient React.js development.", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", @@ -10,7 +10,8 @@ "build:esm": "tsc", "build:cjs": "tsc --module commonjs --outDir build/cjs", "storybook": "export NODE_OPTIONS=--openssl-legacy-provider && start-storybook -p 6006", - "build-storybook": "build-storybook" + "build-storybook": "build-storybook", + "postbuild": "node ./scripts/build.js" }, "repository": { "type": "git", @@ -47,6 +48,7 @@ "dependencies": {}, "peerDependencies": { "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "styled-components": "^5.3.6" } }