@dracor/react 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +49 -0
- package/dist/cjs/index.js +74 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/components/ApiDoc/ApiDoc.d.ts +6 -0
- package/dist/cjs/types/components/ApiDoc/ApiDoc.stories.d.ts +19 -0
- package/dist/cjs/types/components/ApiDoc/ApiDoc.test.d.ts +1 -0
- package/dist/cjs/types/components/ApiDoc/index.d.ts +1 -0
- package/dist/cjs/types/components/Navigation/NavBar.d.ts +13 -0
- package/dist/cjs/types/components/Navigation/NavBar.stories.d.ts +26 -0
- package/dist/cjs/types/components/Navigation/NavBar.test.d.ts +1 -0
- package/dist/cjs/types/components/Navigation/NavItem.d.ts +8 -0
- package/dist/cjs/types/components/Navigation/NavItem.stories.d.ts +17 -0
- package/dist/cjs/types/components/Navigation/NavMenu.d.ts +12 -0
- package/dist/cjs/types/components/Navigation/NavMenu.stories.d.ts +17 -0
- package/dist/cjs/types/components/Navigation/index.d.ts +1 -0
- package/dist/cjs/types/components/index.d.ts +2 -0
- package/dist/cjs/types/einakter-gh.d.ts +2 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/testHelpers.d.ts +7 -0
- package/dist/esm/index.js +71 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/ApiDoc/ApiDoc.d.ts +6 -0
- package/dist/esm/types/components/ApiDoc/ApiDoc.stories.d.ts +19 -0
- package/dist/esm/types/components/ApiDoc/ApiDoc.test.d.ts +1 -0
- package/dist/esm/types/components/ApiDoc/index.d.ts +1 -0
- package/dist/esm/types/components/Navigation/NavBar.d.ts +13 -0
- package/dist/esm/types/components/Navigation/NavBar.stories.d.ts +26 -0
- package/dist/esm/types/components/Navigation/NavBar.test.d.ts +1 -0
- package/dist/esm/types/components/Navigation/NavItem.d.ts +8 -0
- package/dist/esm/types/components/Navigation/NavItem.stories.d.ts +17 -0
- package/dist/esm/types/components/Navigation/NavMenu.d.ts +12 -0
- package/dist/esm/types/components/Navigation/NavMenu.stories.d.ts +17 -0
- package/dist/esm/types/components/Navigation/index.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/esm/types/einakter-gh.d.ts +2 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/testHelpers.d.ts +7 -0
- package/dist/index.d.ts +39 -0
- package/package.json +84 -0
- package/tailwind.js +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 DraCor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# dracor-react
|
|
2
|
+
|
|
3
|
+
The *DraCor React Component Library* provides reusable [react](https://react.dev)
|
|
4
|
+
components for various [DraCor](https://dracor.org) and related projects.
|
|
5
|
+
|
|
6
|
+
The components are documented in
|
|
7
|
+
[storybook](https://dracor-org.github.io/dracor-react/).
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
First add the DraCor React components to your react project:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm i @dracor/react
|
|
15
|
+
# or
|
|
16
|
+
yarn add @dracor/react
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Then adjust your tailwind.config.js to make the DraCor styles available to your
|
|
20
|
+
project:
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
// tailwind.config.js
|
|
24
|
+
module.exports = {
|
|
25
|
+
// make the library available to the tailwind compiler
|
|
26
|
+
content: [
|
|
27
|
+
'./node_modules/@dracor/react/**/*.js',
|
|
28
|
+
'./src/**/*.{js,jsx,ts,tsx}',
|
|
29
|
+
],
|
|
30
|
+
// add the DraCor Tailwindcss plugin
|
|
31
|
+
plugins: [require('@dracor/react/tailwind')],
|
|
32
|
+
|
|
33
|
+
// ... your customisations
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Publication
|
|
38
|
+
|
|
39
|
+
To release a new version to npmjs.com you need to be a member of the
|
|
40
|
+
[dracor organization](https://www.npmjs.com/org/dracor).
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
yarn release
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
The components and documentation of this project are released under the
|
|
49
|
+
[MIT License](LICENSE).
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react$1 = require('react');
|
|
5
|
+
var reactRouterDom = require('react-router-dom');
|
|
6
|
+
var freeBrandsSvgIcons = require('@fortawesome/free-brands-svg-icons');
|
|
7
|
+
var reactFontawesome = require('@fortawesome/react-fontawesome');
|
|
8
|
+
var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
|
|
9
|
+
var react = require('@headlessui/react');
|
|
10
|
+
var reactHelmetAsync = require('react-helmet-async');
|
|
11
|
+
var SwaggerUI = require('swagger-ui-react');
|
|
12
|
+
require('swagger-ui-react/swagger-ui.css');
|
|
13
|
+
|
|
14
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
15
|
+
|
|
16
|
+
/* eslint-disable */
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
19
|
+
/// Autogenerated by tailwindcss-classnames CLI. https://git.io/JtsPU
|
|
20
|
+
/// DO NOT EDIT THIS FILE DIRECTLY!
|
|
21
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
22
|
+
var alignItems = clsx;
|
|
23
|
+
var flexGrow = clsx;
|
|
24
|
+
//////////// Layout Utility functions
|
|
25
|
+
var display = clsx;
|
|
26
|
+
//////////// Sizing Utility functions
|
|
27
|
+
var width = clsx;
|
|
28
|
+
var classnames = clsx;
|
|
29
|
+
|
|
30
|
+
function NavItem({ label, href, active, className }) {
|
|
31
|
+
return (jsxRuntime.jsx(reactRouterDom.Link, { to: href, className: itemClassNames(active, className), children: label }));
|
|
32
|
+
}
|
|
33
|
+
function itemClassNames(active = false, className = '') {
|
|
34
|
+
return `block md:inline-block justify-center text-white hover:text-blue-100
|
|
35
|
+
uppercase
|
|
36
|
+
${active ? 'border-b-4' : ''} ${className}`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function NavMenu({ label, items, menuClass }) {
|
|
40
|
+
const location = reactRouterDom.useLocation();
|
|
41
|
+
function isActive({ href, selected }) {
|
|
42
|
+
if (selected !== undefined) {
|
|
43
|
+
return selected;
|
|
44
|
+
}
|
|
45
|
+
return location.pathname.startsWith(href);
|
|
46
|
+
}
|
|
47
|
+
const active = Boolean(items.find((item) => isActive(item)));
|
|
48
|
+
return (jsxRuntime.jsxs(react.Menu, { as: "div", className: "relative inline-block text-left", children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsxs(react.Menu.Button, { className: itemClassNames(active, menuClass), children: [label, jsxRuntime.jsx(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faCaretDown, className: "ml-2 mt-1", size: "sm", "aria-hidden": "true" })] }) }), jsxRuntime.jsx(react.Transition, { as: react$1.Fragment, enter: "transition ease-out duration-100", enterFrom: "transform opacity-0 scale-95", enterTo: "transform opacity-100 scale-100", leave: "transition ease-in duration-75", leaveFrom: "transform opacity-100 scale-100", leaveTo: "transform opacity-0 scale-95", children: jsxRuntime.jsx(react.Menu.Items, { className: "absolute left-0 mt-2 min-w-fit whitespace-nowrap origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none", children: jsxRuntime.jsx("div", { className: "px-1 py-1", children: items.map((item) => (jsxRuntime.jsx(react.Menu.Item, { children: ({ active }) => (jsxRuntime.jsx(reactRouterDom.Link, { to: item.href, className: `${active ? 'bg-blue-100' : ''} ${isActive(item) ? 'bg-blue-300 text-white' : ''} text-gray-900 group flex w-full items-center rounded-md px-2 py-1 text-sm`, children: item.label })) }, item.href))) }) }) })] }));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function NavBar({ title, logo, logoClass, version, gitHubUrl, gitHubIcon, navItems }) {
|
|
52
|
+
const [showNav, setShowNav] = react$1.useState(false);
|
|
53
|
+
const location = reactRouterDom.useLocation();
|
|
54
|
+
function isActive({ href, active }) {
|
|
55
|
+
if (active !== undefined) {
|
|
56
|
+
return active;
|
|
57
|
+
}
|
|
58
|
+
return location.pathname.startsWith(href);
|
|
59
|
+
}
|
|
60
|
+
const menuWrapperClasses = classnames(display('block', 'md:flex', { hidden: !showNav }), flexGrow('grow'), alignItems('md:items-center'), width('w-full', 'md:w-auto'));
|
|
61
|
+
return (jsxRuntime.jsxs("nav", { className: "flex items-center justify-between flex-wrap p-4 bg-primary text-white font-medium", children: [jsxRuntime.jsx(reactRouterDom.Link, { to: "/", children: jsxRuntime.jsx("img", { alt: `${title} logo`, title: `${title}${version ? ` (${version})` : ''}`, className: `h-12 ${logoClass || ''}`, src: logo }) }), jsxRuntime.jsx("div", { className: "block md:hidden", children: jsxRuntime.jsx("button", { className: "flex items-center px-3 py-2 hover:text-blue-100", onClick: () => setShowNav(!showNav), children: jsxRuntime.jsxs("svg", { className: "fill-current h-10 w-10", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("title", { children: "Menu" }), jsxRuntime.jsx("path", { d: "M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" })] }) }) }), jsxRuntime.jsxs("div", { className: menuWrapperClasses, children: [(navItems === null || navItems === void 0 ? void 0 : navItems.length) && (jsxRuntime.jsx("div", { className: "my-2 md:flex-grow md:flex-row flex justify-center flex-col gap-4", children: navItems.map((item) => ('items' in item
|
|
62
|
+
? jsxRuntime.jsx(NavMenu, { label: item.label, items: item.items }, item.label)
|
|
63
|
+
: jsxRuntime.jsx(NavItem, { label: item.label, href: item.href, active: isActive(item) }, item.label))) })), gitHubUrl && (jsxRuntime.jsx("div", { children: jsxRuntime.jsx("a", { href: gitHubUrl, title: "EcoCor Github", className: "text-white text-2xl", children: gitHubIcon
|
|
64
|
+
? gitHubIcon
|
|
65
|
+
: jsxRuntime.jsx(reactFontawesome.FontAwesomeIcon, { icon: freeBrandsSvgIcons.faGithub, size: "2xl" }) }) }))] })] }));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function ApiDoc({ url, title }) {
|
|
69
|
+
return (jsxRuntime.jsxs("div", { children: [title && (jsxRuntime.jsx(reactHelmetAsync.Helmet, { children: jsxRuntime.jsx("title", { children: title }) })), jsxRuntime.jsx(SwaggerUI, { url: url, deepLinking: true })] }));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
exports.ApiDoc = ApiDoc;
|
|
73
|
+
exports.NavBar = NavBar;
|
|
74
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../node_modules/clsx/dist/clsx.m.js","../../node_modules/tailwindcss-classnames/es/index.js","../../src/components/Navigation/NavItem.tsx","../../src/components/Navigation/NavMenu.tsx","../../src/components/Navigation/NavBar.tsx","../../src/components/ApiDoc/ApiDoc.tsx"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/* eslint-disable */\n/* tslint:disable */\n//////////////////////////////////////////////////////////////////////////////\n/// Autogenerated by tailwindcss-classnames CLI. https://git.io/JtsPU\n/// DO NOT EDIT THIS FILE DIRECTLY!\n//////////////////////////////////////////////////////////////////////////////\nimport classnamesLib from 'clsx';\n//////////// Accessibility Utility functions\nexport var screenReaders = classnamesLib;\n//////////// Backgrounds Utility functions\nexport var backgroundAttachment = classnamesLib;\nexport var backgroundClip = classnamesLib;\nexport var backgroundOrigin = classnamesLib;\nexport var backgroundRepeat = classnamesLib;\nexport var backgroundOpacity = classnamesLib;\nexport var backgroundColor = classnamesLib;\nexport var backgroundPosition = classnamesLib;\nexport var backgroundSize = classnamesLib;\nexport var backgroundImage = classnamesLib;\nexport var gradientColorStops = classnamesLib;\n//////////// Borders Utility functions\nexport var borderStyle = classnamesLib;\nexport var divideStyle = classnamesLib;\nexport var outlineStyle = classnamesLib;\nexport var borderColor = classnamesLib;\nexport var borderOpacity = classnamesLib;\nexport var borderRadius = classnamesLib;\nexport var borderWidth = classnamesLib;\nexport var divideColor = classnamesLib;\nexport var divideOpacity = classnamesLib;\nexport var divideWidth = classnamesLib;\nexport var ringColor = classnamesLib;\nexport var ringWidth = classnamesLib;\nexport var ringOpacity = classnamesLib;\nexport var ringOffsetColor = classnamesLib;\nexport var ringOffsetWidth = classnamesLib;\nexport var outlineOffset = classnamesLib;\nexport var outlineWidth = classnamesLib;\nexport var outlineColor = classnamesLib;\n//////////// Tables Utility functions\nexport var borderCollapse = classnamesLib;\nexport var tableLayout = classnamesLib;\nexport var borderSpacing = classnamesLib;\n//////////// Effects Utility functions\nexport var mixBlendMode = classnamesLib;\nexport var backgroundBlendMode = classnamesLib;\nexport var boxShadow = classnamesLib;\nexport var boxShadowColor = classnamesLib;\nexport var opacity = classnamesLib;\n//////////// TransitionsAndAnimations Utility functions\nexport var transitionProperty = classnamesLib;\nexport var transitionDuration = classnamesLib;\nexport var transitionTimingFunction = classnamesLib;\nexport var transitionDelay = classnamesLib;\nexport var animation = classnamesLib;\n//////////// Filters Utility functions\nexport var filter = classnamesLib;\nexport var backdropFilter = classnamesLib;\nexport var blur = classnamesLib;\nexport var brightness = classnamesLib;\nexport var contrast = classnamesLib;\nexport var dropShadow = classnamesLib;\nexport var grayscale = classnamesLib;\nexport var hueRotate = classnamesLib;\nexport var invert = classnamesLib;\nexport var saturate = classnamesLib;\nexport var sepia = classnamesLib;\nexport var backdropBlur = classnamesLib;\nexport var backdropBrightness = classnamesLib;\nexport var backdropContrast = classnamesLib;\nexport var backdropGrayscale = classnamesLib;\nexport var backdropHueRotate = classnamesLib;\nexport var backdropInvert = classnamesLib;\nexport var backdropOpacity = classnamesLib;\nexport var backdropSaturate = classnamesLib;\nexport var backdropSepia = classnamesLib;\n//////////// FlexBox Utility functions\nexport var flexDirection = classnamesLib;\nexport var flexWrap = classnamesLib;\nexport var alignItems = classnamesLib;\nexport var alignContent = classnamesLib;\nexport var alignSelf = classnamesLib;\nexport var placeContent = classnamesLib;\nexport var placeItems = classnamesLib;\nexport var placeSelf = classnamesLib;\nexport var justifyContent = classnamesLib;\nexport var justifyItems = classnamesLib;\nexport var justifySelf = classnamesLib;\nexport var flex = classnamesLib;\nexport var flexBasis = classnamesLib;\nexport var flexGrow = classnamesLib;\nexport var flexShrink = classnamesLib;\nexport var order = classnamesLib;\n//////////// Grid Utility functions\nexport var gridAutoFlow = classnamesLib;\nexport var gridTemplateColumns = classnamesLib;\nexport var gridAutoColumns = classnamesLib;\nexport var gridColumn = classnamesLib;\nexport var gridColumnStart = classnamesLib;\nexport var gridColumnEnd = classnamesLib;\nexport var gridTemplateRows = classnamesLib;\nexport var gridAutoRows = classnamesLib;\nexport var gridRow = classnamesLib;\nexport var gridRowStart = classnamesLib;\nexport var gridRowEnd = classnamesLib;\nexport var gap = classnamesLib;\n//////////// Grouping Utility functions\nexport var group = classnamesLib;\nexport var peer = classnamesLib;\n//////////// Spacing Utility functions\nexport var padding = classnamesLib;\nexport var margin = classnamesLib;\nexport var space = classnamesLib;\n//////////// Interactivity Utility functions\nexport var appearance = classnamesLib;\nexport var pointerEvents = classnamesLib;\nexport var resize = classnamesLib;\nexport var userSelect = classnamesLib;\nexport var scrollSnap = classnamesLib;\nexport var scrollBehavior = classnamesLib;\nexport var touchAction = classnamesLib;\nexport var cursor = classnamesLib;\nexport var caretColor = classnamesLib;\nexport var willChange = classnamesLib;\nexport var accentColor = classnamesLib;\nexport var scrollPadding = classnamesLib;\nexport var scrollMargin = classnamesLib;\n//////////// Layout Utility functions\nexport var display = classnamesLib;\nexport var boxDecorationBreak = classnamesLib;\nexport var boxSizing = classnamesLib;\nexport var container = classnamesLib;\nexport var float = classnamesLib;\nexport var clear = classnamesLib;\nexport var isolation = classnamesLib;\nexport var objectFit = classnamesLib;\nexport var overflow = classnamesLib;\nexport var overscrollBehavior = classnamesLib;\nexport var position = classnamesLib;\nexport var visibility = classnamesLib;\nexport var breakBefore = classnamesLib;\nexport var breakInside = classnamesLib;\nexport var breakAfter = classnamesLib;\nexport var objectPosition = classnamesLib;\nexport var inset = classnamesLib;\nexport var zIndex = classnamesLib;\nexport var aspectRatio = classnamesLib;\nexport var columns = classnamesLib;\n//////////// Sizing Utility functions\nexport var width = classnamesLib;\nexport var minWidth = classnamesLib;\nexport var maxWidth = classnamesLib;\nexport var height = classnamesLib;\nexport var minHeight = classnamesLib;\nexport var maxHeight = classnamesLib;\n//////////// SVG Utility functions\nexport var fill = classnamesLib;\nexport var stroke = classnamesLib;\nexport var strokeWidth = classnamesLib;\n//////////// Transforms Utility functions\nexport var hardwareAcceleration = classnamesLib;\nexport var scale = classnamesLib;\nexport var rotate = classnamesLib;\nexport var translate = classnamesLib;\nexport var skew = classnamesLib;\nexport var transformOrigin = classnamesLib;\n//////////// Typography Utility functions\nexport var fontSmoothing = classnamesLib;\nexport var fontStyle = classnamesLib;\nexport var fontVariantNumeric = classnamesLib;\nexport var listStylePosition = classnamesLib;\nexport var textAlign = classnamesLib;\nexport var textDecoration = classnamesLib;\nexport var textTransform = classnamesLib;\nexport var textOverflow = classnamesLib;\nexport var verticalAlign = classnamesLib;\nexport var whitespace = classnamesLib;\nexport var wordBreak = classnamesLib;\nexport var textDecorationStyle = classnamesLib;\nexport var fontFamily = classnamesLib;\nexport var fontSize = classnamesLib;\nexport var fontWeight = classnamesLib;\nexport var letterSpacing = classnamesLib;\nexport var lineHeight = classnamesLib;\nexport var listStyleType = classnamesLib;\nexport var placeholderColor = classnamesLib;\nexport var placeholderOpacity = classnamesLib;\nexport var textColor = classnamesLib;\nexport var textOpacity = classnamesLib;\nexport var content = classnamesLib;\nexport var textIndent = classnamesLib;\nexport var textDecorationColor = classnamesLib;\nexport var textDecorationThickness = classnamesLib;\nexport var textUnderlineOffset = classnamesLib;\n//////////// Accessibility Utility functions\nexport var accessibility = classnamesLib;\n//////////// Backgrounds Utility functions\nexport var backgrounds = classnamesLib;\n//////////// Borders Utility functions\nexport var borders = classnamesLib;\n//////////// Tables Utility functions\nexport var tables = classnamesLib;\n//////////// Effects Utility functions\nexport var effects = classnamesLib;\n//////////// TransitionsAndAnimations Utility functions\nexport var transitionsAndAnimations = classnamesLib;\n//////////// Filters Utility functions\nexport var filters = classnamesLib;\n//////////// FlexBox Utility functions\nexport var flexBox = classnamesLib;\n//////////// Grid Utility functions\nexport var grid = classnamesLib;\n//////////// Grouping Utility functions\nexport var grouping = classnamesLib;\n//////////// Spacing Utility functions\nexport var spacing = classnamesLib;\n//////////// Interactivity Utility functions\nexport var interactivity = classnamesLib;\n//////////// Layout Utility functions\nexport var layout = classnamesLib;\n//////////// Sizing Utility functions\nexport var sizing = classnamesLib;\n//////////// SVG Utility functions\nexport var svg = classnamesLib;\n//////////// Transforms Utility functions\nexport var transforms = classnamesLib;\n//////////// Typography Utility functions\nexport var typography = classnamesLib;\nexport var TW = {\n screenReaders: screenReaders,\n backgroundAttachment: backgroundAttachment,\n backgroundClip: backgroundClip,\n backgroundOrigin: backgroundOrigin,\n backgroundRepeat: backgroundRepeat,\n backgroundOpacity: backgroundOpacity,\n backgroundColor: backgroundColor,\n backgroundPosition: backgroundPosition,\n backgroundSize: backgroundSize,\n backgroundImage: backgroundImage,\n gradientColorStops: gradientColorStops,\n borderStyle: borderStyle,\n divideStyle: divideStyle,\n outlineStyle: outlineStyle,\n borderColor: borderColor,\n borderOpacity: borderOpacity,\n borderRadius: borderRadius,\n borderWidth: borderWidth,\n divideColor: divideColor,\n divideOpacity: divideOpacity,\n divideWidth: divideWidth,\n ringColor: ringColor,\n ringWidth: ringWidth,\n ringOpacity: ringOpacity,\n ringOffsetColor: ringOffsetColor,\n ringOffsetWidth: ringOffsetWidth,\n outlineOffset: outlineOffset,\n outlineWidth: outlineWidth,\n outlineColor: outlineColor,\n borderCollapse: borderCollapse,\n tableLayout: tableLayout,\n borderSpacing: borderSpacing,\n mixBlendMode: mixBlendMode,\n backgroundBlendMode: backgroundBlendMode,\n boxShadow: boxShadow,\n boxShadowColor: boxShadowColor,\n opacity: opacity,\n transitionProperty: transitionProperty,\n transitionDuration: transitionDuration,\n transitionTimingFunction: transitionTimingFunction,\n transitionDelay: transitionDelay,\n animation: animation,\n filter: filter,\n backdropFilter: backdropFilter,\n blur: blur,\n brightness: brightness,\n contrast: contrast,\n dropShadow: dropShadow,\n grayscale: grayscale,\n hueRotate: hueRotate,\n invert: invert,\n saturate: saturate,\n sepia: sepia,\n backdropBlur: backdropBlur,\n backdropBrightness: backdropBrightness,\n backdropContrast: backdropContrast,\n backdropGrayscale: backdropGrayscale,\n backdropHueRotate: backdropHueRotate,\n backdropInvert: backdropInvert,\n backdropOpacity: backdropOpacity,\n backdropSaturate: backdropSaturate,\n backdropSepia: backdropSepia,\n flexDirection: flexDirection,\n flexWrap: flexWrap,\n alignItems: alignItems,\n alignContent: alignContent,\n alignSelf: alignSelf,\n placeContent: placeContent,\n placeItems: placeItems,\n placeSelf: placeSelf,\n justifyContent: justifyContent,\n justifyItems: justifyItems,\n justifySelf: justifySelf,\n flex: flex,\n flexBasis: flexBasis,\n flexGrow: flexGrow,\n flexShrink: flexShrink,\n order: order,\n gridAutoFlow: gridAutoFlow,\n gridTemplateColumns: gridTemplateColumns,\n gridAutoColumns: gridAutoColumns,\n gridColumn: gridColumn,\n gridColumnStart: gridColumnStart,\n gridColumnEnd: gridColumnEnd,\n gridTemplateRows: gridTemplateRows,\n gridAutoRows: gridAutoRows,\n gridRow: gridRow,\n gridRowStart: gridRowStart,\n gridRowEnd: gridRowEnd,\n gap: gap,\n group: group,\n peer: peer,\n padding: padding,\n margin: margin,\n space: space,\n appearance: appearance,\n pointerEvents: pointerEvents,\n resize: resize,\n userSelect: userSelect,\n scrollSnap: scrollSnap,\n scrollBehavior: scrollBehavior,\n touchAction: touchAction,\n cursor: cursor,\n caretColor: caretColor,\n willChange: willChange,\n accentColor: accentColor,\n scrollPadding: scrollPadding,\n scrollMargin: scrollMargin,\n display: display,\n boxDecorationBreak: boxDecorationBreak,\n boxSizing: boxSizing,\n container: container,\n float: float,\n clear: clear,\n isolation: isolation,\n objectFit: objectFit,\n overflow: overflow,\n overscrollBehavior: overscrollBehavior,\n position: position,\n visibility: visibility,\n breakBefore: breakBefore,\n breakInside: breakInside,\n breakAfter: breakAfter,\n objectPosition: objectPosition,\n inset: inset,\n zIndex: zIndex,\n aspectRatio: aspectRatio,\n columns: columns,\n width: width,\n minWidth: minWidth,\n maxWidth: maxWidth,\n height: height,\n minHeight: minHeight,\n maxHeight: maxHeight,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n hardwareAcceleration: hardwareAcceleration,\n scale: scale,\n rotate: rotate,\n translate: translate,\n skew: skew,\n transformOrigin: transformOrigin,\n fontSmoothing: fontSmoothing,\n fontStyle: fontStyle,\n fontVariantNumeric: fontVariantNumeric,\n listStylePosition: listStylePosition,\n textAlign: textAlign,\n textDecoration: textDecoration,\n textTransform: textTransform,\n textOverflow: textOverflow,\n verticalAlign: verticalAlign,\n whitespace: whitespace,\n wordBreak: wordBreak,\n textDecorationStyle: textDecorationStyle,\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeight: fontWeight,\n letterSpacing: letterSpacing,\n lineHeight: lineHeight,\n listStyleType: listStyleType,\n placeholderColor: placeholderColor,\n placeholderOpacity: placeholderOpacity,\n textColor: textColor,\n textOpacity: textOpacity,\n content: content,\n textIndent: textIndent,\n textDecorationColor: textDecorationColor,\n textDecorationThickness: textDecorationThickness,\n textUnderlineOffset: textUnderlineOffset,\n};\nexport var CN = {\n accessibility: accessibility,\n backgrounds: backgrounds,\n borders: borders,\n tables: tables,\n effects: effects,\n transitionsAndAnimations: transitionsAndAnimations,\n filters: filters,\n flexBox: flexBox,\n grid: grid,\n grouping: grouping,\n spacing: spacing,\n interactivity: interactivity,\n layout: layout,\n sizing: sizing,\n svg: svg,\n transforms: transforms,\n typography: typography,\n};\nexport var mainCategoriesUtilityFunctions = CN;\nexport var subCategoriesUtilityFunctions = TW;\nexport var classnames = classnamesLib;\nexport default classnames;\n//# sourceMappingURL=index.js.map",null,null,null,null],"names":["classnamesLib","_jsx","Link","useLocation","_jsxs","Menu","FontAwesomeIcon","faCaretDown","Transition","Fragment","useState","faGithub","Helmet"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,GAAG,QAAQ,EAAE,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAQ,SAAS,IAAI,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,C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AAA,QAAA,EAAAA,cAAA,CAAA,GAAA,EAAA,EACE,IAAI,EAAE,SAAS,EACf,KAAK,EAAC,eAAe,EACrB,SAAS,EAAC,qBAAqB,EAAA,QAAA,EAE9B,UAAU;AACT,kCAAE,UAAU;AACZ,kCAAEA,cAAC,CAAAK,gCAAe,IAAC,IAAI,EAAEK,2BAAQ,EAAE,IAAI,EAAC,KAAK,GAAG,EAEhD,CAAA,EAAA,CACA,CACP,CACG,EAAA,CAAA,CAAA,EAAA,CACF,EACN;AACJ;;ACjGwB,SAAA,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAS,EAAA;IAClD,QACEP,eACG,CAAA,KAAA,EAAA,EAAA,QAAA,EAAA,CAAA,KAAK,KACJH,eAACW,uBAAM,EAAA,EAAA,QAAA,EACLX,cAAQ,CAAA,OAAA,EAAA,EAAA,QAAA,EAAA,KAAK,EAAS,CAAA,EAAA,CACf,CACZ,EACCA,cAAA,CAAC,SAAS,EAAA,EAAC,GAAG,EAAE,GAAG,EAAE,WAAW,EAAA,IAAA,EAAA,CAAG,CAC/B,EAAA,CAAA,EACN;AACJ;;;;;","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import ApiDoc from './ApiDoc';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ApiDoc;
|
|
6
|
+
tags: string[];
|
|
7
|
+
decorators: ((story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
8
|
+
url: string;
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
11
|
+
parameters: {
|
|
12
|
+
reactRouter: {
|
|
13
|
+
routePath: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Ecocor: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ApiDoc';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props as NavItemProps } from './NavItem';
|
|
3
|
+
import { Props as NavMenuProps } from './NavMenu';
|
|
4
|
+
export interface NavBarProps {
|
|
5
|
+
title: string;
|
|
6
|
+
logo?: string;
|
|
7
|
+
logoClass?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
gitHubUrl?: string;
|
|
10
|
+
gitHubIcon?: JSX.Element;
|
|
11
|
+
navItems?: (NavItemProps | NavMenuProps)[];
|
|
12
|
+
}
|
|
13
|
+
export default function NavBar({ title, logo, logoClass, version, gitHubUrl, gitHubIcon, navItems }: NavBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import NavBar from './NavBar';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof NavBar;
|
|
6
|
+
tags: string[];
|
|
7
|
+
decorators: import("@storybook/preview-api/dist/storybook-channel-mock-a19cd233").M[];
|
|
8
|
+
parameters: {
|
|
9
|
+
reactRouter: {
|
|
10
|
+
routePath: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
logo: {
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
options: string[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
export declare const Dracor: Story;
|
|
25
|
+
export declare const Einakter: Story;
|
|
26
|
+
export declare const Ecocor: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface Props {
|
|
2
|
+
label: string;
|
|
3
|
+
href: string;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export default function NavItem({ label, href, active, className }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function itemClassNames(active?: boolean, className?: string): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import NavItem from './NavItem';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof NavItem;
|
|
6
|
+
tags: string[];
|
|
7
|
+
decorators: import("@storybook/preview-api/dist/storybook-channel-mock-a19cd233").M[];
|
|
8
|
+
parameters: {
|
|
9
|
+
reactRouter: {
|
|
10
|
+
routePath: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
export declare const Home: Story;
|
|
17
|
+
export declare const Active: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Item {
|
|
2
|
+
label: string;
|
|
3
|
+
href: string;
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface Props {
|
|
7
|
+
label: string;
|
|
8
|
+
items: Item[];
|
|
9
|
+
menuClass?: string;
|
|
10
|
+
}
|
|
11
|
+
export default function NavMenu({ label, items, menuClass }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import NavMenu from './NavMenu';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof NavMenu;
|
|
6
|
+
tags: string[];
|
|
7
|
+
decorators: import("@storybook/preview-api/dist/storybook-channel-mock-a19cd233").M[];
|
|
8
|
+
parameters: {
|
|
9
|
+
reactRouter: {
|
|
10
|
+
routePath: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
export declare const Simple: Story;
|
|
17
|
+
export declare const Active: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './NavBar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const withRouter: (children: JSX.Element, { route }?: {
|
|
3
|
+
route?: string | undefined;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const withProviders: (children: JSX.Element, { route }?: {
|
|
6
|
+
route?: string | undefined;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Fragment, useState } from 'react';
|
|
3
|
+
import { Link, useLocation } from 'react-router-dom';
|
|
4
|
+
import { faGithub } from '@fortawesome/free-brands-svg-icons';
|
|
5
|
+
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
6
|
+
import { faCaretDown } from '@fortawesome/free-solid-svg-icons';
|
|
7
|
+
import { Menu, Transition } from '@headlessui/react';
|
|
8
|
+
import { Helmet } from 'react-helmet-async';
|
|
9
|
+
import SwaggerUI from 'swagger-ui-react';
|
|
10
|
+
import 'swagger-ui-react/swagger-ui.css';
|
|
11
|
+
|
|
12
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
13
|
+
|
|
14
|
+
/* eslint-disable */
|
|
15
|
+
/* tslint:disable */
|
|
16
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
17
|
+
/// Autogenerated by tailwindcss-classnames CLI. https://git.io/JtsPU
|
|
18
|
+
/// DO NOT EDIT THIS FILE DIRECTLY!
|
|
19
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
20
|
+
var alignItems = clsx;
|
|
21
|
+
var flexGrow = clsx;
|
|
22
|
+
//////////// Layout Utility functions
|
|
23
|
+
var display = clsx;
|
|
24
|
+
//////////// Sizing Utility functions
|
|
25
|
+
var width = clsx;
|
|
26
|
+
var classnames = clsx;
|
|
27
|
+
|
|
28
|
+
function NavItem({ label, href, active, className }) {
|
|
29
|
+
return (jsx(Link, { to: href, className: itemClassNames(active, className), children: label }));
|
|
30
|
+
}
|
|
31
|
+
function itemClassNames(active = false, className = '') {
|
|
32
|
+
return `block md:inline-block justify-center text-white hover:text-blue-100
|
|
33
|
+
uppercase
|
|
34
|
+
${active ? 'border-b-4' : ''} ${className}`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function NavMenu({ label, items, menuClass }) {
|
|
38
|
+
const location = useLocation();
|
|
39
|
+
function isActive({ href, selected }) {
|
|
40
|
+
if (selected !== undefined) {
|
|
41
|
+
return selected;
|
|
42
|
+
}
|
|
43
|
+
return location.pathname.startsWith(href);
|
|
44
|
+
}
|
|
45
|
+
const active = Boolean(items.find((item) => isActive(item)));
|
|
46
|
+
return (jsxs(Menu, { as: "div", className: "relative inline-block text-left", children: [jsx("div", { children: jsxs(Menu.Button, { className: itemClassNames(active, menuClass), children: [label, jsx(FontAwesomeIcon, { icon: faCaretDown, className: "ml-2 mt-1", size: "sm", "aria-hidden": "true" })] }) }), jsx(Transition, { as: Fragment, enter: "transition ease-out duration-100", enterFrom: "transform opacity-0 scale-95", enterTo: "transform opacity-100 scale-100", leave: "transition ease-in duration-75", leaveFrom: "transform opacity-100 scale-100", leaveTo: "transform opacity-0 scale-95", children: jsx(Menu.Items, { className: "absolute left-0 mt-2 min-w-fit whitespace-nowrap origin-top-right divide-y divide-gray-100 rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none", children: jsx("div", { className: "px-1 py-1", children: items.map((item) => (jsx(Menu.Item, { children: ({ active }) => (jsx(Link, { to: item.href, className: `${active ? 'bg-blue-100' : ''} ${isActive(item) ? 'bg-blue-300 text-white' : ''} text-gray-900 group flex w-full items-center rounded-md px-2 py-1 text-sm`, children: item.label })) }, item.href))) }) }) })] }));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function NavBar({ title, logo, logoClass, version, gitHubUrl, gitHubIcon, navItems }) {
|
|
50
|
+
const [showNav, setShowNav] = useState(false);
|
|
51
|
+
const location = useLocation();
|
|
52
|
+
function isActive({ href, active }) {
|
|
53
|
+
if (active !== undefined) {
|
|
54
|
+
return active;
|
|
55
|
+
}
|
|
56
|
+
return location.pathname.startsWith(href);
|
|
57
|
+
}
|
|
58
|
+
const menuWrapperClasses = classnames(display('block', 'md:flex', { hidden: !showNav }), flexGrow('grow'), alignItems('md:items-center'), width('w-full', 'md:w-auto'));
|
|
59
|
+
return (jsxs("nav", { className: "flex items-center justify-between flex-wrap p-4 bg-primary text-white font-medium", children: [jsx(Link, { to: "/", children: jsx("img", { alt: `${title} logo`, title: `${title}${version ? ` (${version})` : ''}`, className: `h-12 ${logoClass || ''}`, src: logo }) }), jsx("div", { className: "block md:hidden", children: jsx("button", { className: "flex items-center px-3 py-2 hover:text-blue-100", onClick: () => setShowNav(!showNav), children: jsxs("svg", { className: "fill-current h-10 w-10", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", children: [jsx("title", { children: "Menu" }), jsx("path", { d: "M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" })] }) }) }), jsxs("div", { className: menuWrapperClasses, children: [(navItems === null || navItems === void 0 ? void 0 : navItems.length) && (jsx("div", { className: "my-2 md:flex-grow md:flex-row flex justify-center flex-col gap-4", children: navItems.map((item) => ('items' in item
|
|
60
|
+
? jsx(NavMenu, { label: item.label, items: item.items }, item.label)
|
|
61
|
+
: jsx(NavItem, { label: item.label, href: item.href, active: isActive(item) }, item.label))) })), gitHubUrl && (jsx("div", { children: jsx("a", { href: gitHubUrl, title: "EcoCor Github", className: "text-white text-2xl", children: gitHubIcon
|
|
62
|
+
? gitHubIcon
|
|
63
|
+
: jsx(FontAwesomeIcon, { icon: faGithub, size: "2xl" }) }) }))] })] }));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function ApiDoc({ url, title }) {
|
|
67
|
+
return (jsxs("div", { children: [title && (jsx(Helmet, { children: jsx("title", { children: title }) })), jsx(SwaggerUI, { url: url, deepLinking: true })] }));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { ApiDoc, NavBar };
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../node_modules/clsx/dist/clsx.m.js","../../node_modules/tailwindcss-classnames/es/index.js","../../src/components/Navigation/NavItem.tsx","../../src/components/Navigation/NavMenu.tsx","../../src/components/Navigation/NavBar.tsx","../../src/components/ApiDoc/ApiDoc.tsx"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/* eslint-disable */\n/* tslint:disable */\n//////////////////////////////////////////////////////////////////////////////\n/// Autogenerated by tailwindcss-classnames CLI. https://git.io/JtsPU\n/// DO NOT EDIT THIS FILE DIRECTLY!\n//////////////////////////////////////////////////////////////////////////////\nimport classnamesLib from 'clsx';\n//////////// Accessibility Utility functions\nexport var screenReaders = classnamesLib;\n//////////// Backgrounds Utility functions\nexport var backgroundAttachment = classnamesLib;\nexport var backgroundClip = classnamesLib;\nexport var backgroundOrigin = classnamesLib;\nexport var backgroundRepeat = classnamesLib;\nexport var backgroundOpacity = classnamesLib;\nexport var backgroundColor = classnamesLib;\nexport var backgroundPosition = classnamesLib;\nexport var backgroundSize = classnamesLib;\nexport var backgroundImage = classnamesLib;\nexport var gradientColorStops = classnamesLib;\n//////////// Borders Utility functions\nexport var borderStyle = classnamesLib;\nexport var divideStyle = classnamesLib;\nexport var outlineStyle = classnamesLib;\nexport var borderColor = classnamesLib;\nexport var borderOpacity = classnamesLib;\nexport var borderRadius = classnamesLib;\nexport var borderWidth = classnamesLib;\nexport var divideColor = classnamesLib;\nexport var divideOpacity = classnamesLib;\nexport var divideWidth = classnamesLib;\nexport var ringColor = classnamesLib;\nexport var ringWidth = classnamesLib;\nexport var ringOpacity = classnamesLib;\nexport var ringOffsetColor = classnamesLib;\nexport var ringOffsetWidth = classnamesLib;\nexport var outlineOffset = classnamesLib;\nexport var outlineWidth = classnamesLib;\nexport var outlineColor = classnamesLib;\n//////////// Tables Utility functions\nexport var borderCollapse = classnamesLib;\nexport var tableLayout = classnamesLib;\nexport var borderSpacing = classnamesLib;\n//////////// Effects Utility functions\nexport var mixBlendMode = classnamesLib;\nexport var backgroundBlendMode = classnamesLib;\nexport var boxShadow = classnamesLib;\nexport var boxShadowColor = classnamesLib;\nexport var opacity = classnamesLib;\n//////////// TransitionsAndAnimations Utility functions\nexport var transitionProperty = classnamesLib;\nexport var transitionDuration = classnamesLib;\nexport var transitionTimingFunction = classnamesLib;\nexport var transitionDelay = classnamesLib;\nexport var animation = classnamesLib;\n//////////// Filters Utility functions\nexport var filter = classnamesLib;\nexport var backdropFilter = classnamesLib;\nexport var blur = classnamesLib;\nexport var brightness = classnamesLib;\nexport var contrast = classnamesLib;\nexport var dropShadow = classnamesLib;\nexport var grayscale = classnamesLib;\nexport var hueRotate = classnamesLib;\nexport var invert = classnamesLib;\nexport var saturate = classnamesLib;\nexport var sepia = classnamesLib;\nexport var backdropBlur = classnamesLib;\nexport var backdropBrightness = classnamesLib;\nexport var backdropContrast = classnamesLib;\nexport var backdropGrayscale = classnamesLib;\nexport var backdropHueRotate = classnamesLib;\nexport var backdropInvert = classnamesLib;\nexport var backdropOpacity = classnamesLib;\nexport var backdropSaturate = classnamesLib;\nexport var backdropSepia = classnamesLib;\n//////////// FlexBox Utility functions\nexport var flexDirection = classnamesLib;\nexport var flexWrap = classnamesLib;\nexport var alignItems = classnamesLib;\nexport var alignContent = classnamesLib;\nexport var alignSelf = classnamesLib;\nexport var placeContent = classnamesLib;\nexport var placeItems = classnamesLib;\nexport var placeSelf = classnamesLib;\nexport var justifyContent = classnamesLib;\nexport var justifyItems = classnamesLib;\nexport var justifySelf = classnamesLib;\nexport var flex = classnamesLib;\nexport var flexBasis = classnamesLib;\nexport var flexGrow = classnamesLib;\nexport var flexShrink = classnamesLib;\nexport var order = classnamesLib;\n//////////// Grid Utility functions\nexport var gridAutoFlow = classnamesLib;\nexport var gridTemplateColumns = classnamesLib;\nexport var gridAutoColumns = classnamesLib;\nexport var gridColumn = classnamesLib;\nexport var gridColumnStart = classnamesLib;\nexport var gridColumnEnd = classnamesLib;\nexport var gridTemplateRows = classnamesLib;\nexport var gridAutoRows = classnamesLib;\nexport var gridRow = classnamesLib;\nexport var gridRowStart = classnamesLib;\nexport var gridRowEnd = classnamesLib;\nexport var gap = classnamesLib;\n//////////// Grouping Utility functions\nexport var group = classnamesLib;\nexport var peer = classnamesLib;\n//////////// Spacing Utility functions\nexport var padding = classnamesLib;\nexport var margin = classnamesLib;\nexport var space = classnamesLib;\n//////////// Interactivity Utility functions\nexport var appearance = classnamesLib;\nexport var pointerEvents = classnamesLib;\nexport var resize = classnamesLib;\nexport var userSelect = classnamesLib;\nexport var scrollSnap = classnamesLib;\nexport var scrollBehavior = classnamesLib;\nexport var touchAction = classnamesLib;\nexport var cursor = classnamesLib;\nexport var caretColor = classnamesLib;\nexport var willChange = classnamesLib;\nexport var accentColor = classnamesLib;\nexport var scrollPadding = classnamesLib;\nexport var scrollMargin = classnamesLib;\n//////////// Layout Utility functions\nexport var display = classnamesLib;\nexport var boxDecorationBreak = classnamesLib;\nexport var boxSizing = classnamesLib;\nexport var container = classnamesLib;\nexport var float = classnamesLib;\nexport var clear = classnamesLib;\nexport var isolation = classnamesLib;\nexport var objectFit = classnamesLib;\nexport var overflow = classnamesLib;\nexport var overscrollBehavior = classnamesLib;\nexport var position = classnamesLib;\nexport var visibility = classnamesLib;\nexport var breakBefore = classnamesLib;\nexport var breakInside = classnamesLib;\nexport var breakAfter = classnamesLib;\nexport var objectPosition = classnamesLib;\nexport var inset = classnamesLib;\nexport var zIndex = classnamesLib;\nexport var aspectRatio = classnamesLib;\nexport var columns = classnamesLib;\n//////////// Sizing Utility functions\nexport var width = classnamesLib;\nexport var minWidth = classnamesLib;\nexport var maxWidth = classnamesLib;\nexport var height = classnamesLib;\nexport var minHeight = classnamesLib;\nexport var maxHeight = classnamesLib;\n//////////// SVG Utility functions\nexport var fill = classnamesLib;\nexport var stroke = classnamesLib;\nexport var strokeWidth = classnamesLib;\n//////////// Transforms Utility functions\nexport var hardwareAcceleration = classnamesLib;\nexport var scale = classnamesLib;\nexport var rotate = classnamesLib;\nexport var translate = classnamesLib;\nexport var skew = classnamesLib;\nexport var transformOrigin = classnamesLib;\n//////////// Typography Utility functions\nexport var fontSmoothing = classnamesLib;\nexport var fontStyle = classnamesLib;\nexport var fontVariantNumeric = classnamesLib;\nexport var listStylePosition = classnamesLib;\nexport var textAlign = classnamesLib;\nexport var textDecoration = classnamesLib;\nexport var textTransform = classnamesLib;\nexport var textOverflow = classnamesLib;\nexport var verticalAlign = classnamesLib;\nexport var whitespace = classnamesLib;\nexport var wordBreak = classnamesLib;\nexport var textDecorationStyle = classnamesLib;\nexport var fontFamily = classnamesLib;\nexport var fontSize = classnamesLib;\nexport var fontWeight = classnamesLib;\nexport var letterSpacing = classnamesLib;\nexport var lineHeight = classnamesLib;\nexport var listStyleType = classnamesLib;\nexport var placeholderColor = classnamesLib;\nexport var placeholderOpacity = classnamesLib;\nexport var textColor = classnamesLib;\nexport var textOpacity = classnamesLib;\nexport var content = classnamesLib;\nexport var textIndent = classnamesLib;\nexport var textDecorationColor = classnamesLib;\nexport var textDecorationThickness = classnamesLib;\nexport var textUnderlineOffset = classnamesLib;\n//////////// Accessibility Utility functions\nexport var accessibility = classnamesLib;\n//////////// Backgrounds Utility functions\nexport var backgrounds = classnamesLib;\n//////////// Borders Utility functions\nexport var borders = classnamesLib;\n//////////// Tables Utility functions\nexport var tables = classnamesLib;\n//////////// Effects Utility functions\nexport var effects = classnamesLib;\n//////////// TransitionsAndAnimations Utility functions\nexport var transitionsAndAnimations = classnamesLib;\n//////////// Filters Utility functions\nexport var filters = classnamesLib;\n//////////// FlexBox Utility functions\nexport var flexBox = classnamesLib;\n//////////// Grid Utility functions\nexport var grid = classnamesLib;\n//////////// Grouping Utility functions\nexport var grouping = classnamesLib;\n//////////// Spacing Utility functions\nexport var spacing = classnamesLib;\n//////////// Interactivity Utility functions\nexport var interactivity = classnamesLib;\n//////////// Layout Utility functions\nexport var layout = classnamesLib;\n//////////// Sizing Utility functions\nexport var sizing = classnamesLib;\n//////////// SVG Utility functions\nexport var svg = classnamesLib;\n//////////// Transforms Utility functions\nexport var transforms = classnamesLib;\n//////////// Typography Utility functions\nexport var typography = classnamesLib;\nexport var TW = {\n screenReaders: screenReaders,\n backgroundAttachment: backgroundAttachment,\n backgroundClip: backgroundClip,\n backgroundOrigin: backgroundOrigin,\n backgroundRepeat: backgroundRepeat,\n backgroundOpacity: backgroundOpacity,\n backgroundColor: backgroundColor,\n backgroundPosition: backgroundPosition,\n backgroundSize: backgroundSize,\n backgroundImage: backgroundImage,\n gradientColorStops: gradientColorStops,\n borderStyle: borderStyle,\n divideStyle: divideStyle,\n outlineStyle: outlineStyle,\n borderColor: borderColor,\n borderOpacity: borderOpacity,\n borderRadius: borderRadius,\n borderWidth: borderWidth,\n divideColor: divideColor,\n divideOpacity: divideOpacity,\n divideWidth: divideWidth,\n ringColor: ringColor,\n ringWidth: ringWidth,\n ringOpacity: ringOpacity,\n ringOffsetColor: ringOffsetColor,\n ringOffsetWidth: ringOffsetWidth,\n outlineOffset: outlineOffset,\n outlineWidth: outlineWidth,\n outlineColor: outlineColor,\n borderCollapse: borderCollapse,\n tableLayout: tableLayout,\n borderSpacing: borderSpacing,\n mixBlendMode: mixBlendMode,\n backgroundBlendMode: backgroundBlendMode,\n boxShadow: boxShadow,\n boxShadowColor: boxShadowColor,\n opacity: opacity,\n transitionProperty: transitionProperty,\n transitionDuration: transitionDuration,\n transitionTimingFunction: transitionTimingFunction,\n transitionDelay: transitionDelay,\n animation: animation,\n filter: filter,\n backdropFilter: backdropFilter,\n blur: blur,\n brightness: brightness,\n contrast: contrast,\n dropShadow: dropShadow,\n grayscale: grayscale,\n hueRotate: hueRotate,\n invert: invert,\n saturate: saturate,\n sepia: sepia,\n backdropBlur: backdropBlur,\n backdropBrightness: backdropBrightness,\n backdropContrast: backdropContrast,\n backdropGrayscale: backdropGrayscale,\n backdropHueRotate: backdropHueRotate,\n backdropInvert: backdropInvert,\n backdropOpacity: backdropOpacity,\n backdropSaturate: backdropSaturate,\n backdropSepia: backdropSepia,\n flexDirection: flexDirection,\n flexWrap: flexWrap,\n alignItems: alignItems,\n alignContent: alignContent,\n alignSelf: alignSelf,\n placeContent: placeContent,\n placeItems: placeItems,\n placeSelf: placeSelf,\n justifyContent: justifyContent,\n justifyItems: justifyItems,\n justifySelf: justifySelf,\n flex: flex,\n flexBasis: flexBasis,\n flexGrow: flexGrow,\n flexShrink: flexShrink,\n order: order,\n gridAutoFlow: gridAutoFlow,\n gridTemplateColumns: gridTemplateColumns,\n gridAutoColumns: gridAutoColumns,\n gridColumn: gridColumn,\n gridColumnStart: gridColumnStart,\n gridColumnEnd: gridColumnEnd,\n gridTemplateRows: gridTemplateRows,\n gridAutoRows: gridAutoRows,\n gridRow: gridRow,\n gridRowStart: gridRowStart,\n gridRowEnd: gridRowEnd,\n gap: gap,\n group: group,\n peer: peer,\n padding: padding,\n margin: margin,\n space: space,\n appearance: appearance,\n pointerEvents: pointerEvents,\n resize: resize,\n userSelect: userSelect,\n scrollSnap: scrollSnap,\n scrollBehavior: scrollBehavior,\n touchAction: touchAction,\n cursor: cursor,\n caretColor: caretColor,\n willChange: willChange,\n accentColor: accentColor,\n scrollPadding: scrollPadding,\n scrollMargin: scrollMargin,\n display: display,\n boxDecorationBreak: boxDecorationBreak,\n boxSizing: boxSizing,\n container: container,\n float: float,\n clear: clear,\n isolation: isolation,\n objectFit: objectFit,\n overflow: overflow,\n overscrollBehavior: overscrollBehavior,\n position: position,\n visibility: visibility,\n breakBefore: breakBefore,\n breakInside: breakInside,\n breakAfter: breakAfter,\n objectPosition: objectPosition,\n inset: inset,\n zIndex: zIndex,\n aspectRatio: aspectRatio,\n columns: columns,\n width: width,\n minWidth: minWidth,\n maxWidth: maxWidth,\n height: height,\n minHeight: minHeight,\n maxHeight: maxHeight,\n fill: fill,\n stroke: stroke,\n strokeWidth: strokeWidth,\n hardwareAcceleration: hardwareAcceleration,\n scale: scale,\n rotate: rotate,\n translate: translate,\n skew: skew,\n transformOrigin: transformOrigin,\n fontSmoothing: fontSmoothing,\n fontStyle: fontStyle,\n fontVariantNumeric: fontVariantNumeric,\n listStylePosition: listStylePosition,\n textAlign: textAlign,\n textDecoration: textDecoration,\n textTransform: textTransform,\n textOverflow: textOverflow,\n verticalAlign: verticalAlign,\n whitespace: whitespace,\n wordBreak: wordBreak,\n textDecorationStyle: textDecorationStyle,\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeight: fontWeight,\n letterSpacing: letterSpacing,\n lineHeight: lineHeight,\n listStyleType: listStyleType,\n placeholderColor: placeholderColor,\n placeholderOpacity: placeholderOpacity,\n textColor: textColor,\n textOpacity: textOpacity,\n content: content,\n textIndent: textIndent,\n textDecorationColor: textDecorationColor,\n textDecorationThickness: textDecorationThickness,\n textUnderlineOffset: textUnderlineOffset,\n};\nexport var CN = {\n accessibility: accessibility,\n backgrounds: backgrounds,\n borders: borders,\n tables: tables,\n effects: effects,\n transitionsAndAnimations: transitionsAndAnimations,\n filters: filters,\n flexBox: flexBox,\n grid: grid,\n grouping: grouping,\n spacing: spacing,\n interactivity: interactivity,\n layout: layout,\n sizing: sizing,\n svg: svg,\n transforms: transforms,\n typography: typography,\n};\nexport var mainCategoriesUtilityFunctions = CN;\nexport var subCategoriesUtilityFunctions = TW;\nexport var classnames = classnamesLib;\nexport default classnames;\n//# sourceMappingURL=index.js.map",null,null,null,null],"names":["classnamesLib","_jsx","_jsxs"],"mappings":";;;;;;;;;;;AAAA,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,GAAG,QAAQ,EAAE,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAQ,SAAS,IAAI,EAAE,CAAC,IAA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AAI,CAAC,KAAK,CAGW,CACjC,CAAC,EAAA,CACE,CACP,EACA,SAAS,KACRA,GACE,CAAA,KAAA,EAAA,EAAA,QAAA,EAAAA,GAAA,CAAA,GAAA,EAAA,EACE,IAAI,EAAE,SAAS,EACf,KAAK,EAAC,eAAe,EACrB,SAAS,EAAC,qBAAqB,EAAA,QAAA,EAE9B,UAAU;AACT,kCAAE,UAAU;AACZ,kCAAEA,GAAC,CAAA,eAAe,IAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,KAAK,GAAG,EAEhD,CAAA,EAAA,CACA,CACP,CACG,EAAA,CAAA,CAAA,EAAA,CACF,EACN;AACJ;;ACjGwB,SAAA,MAAM,CAAC,EAAE,GAAG,EAAE,KAAK,EAAS,EAAA;IAClD,QACEC,IACG,CAAA,KAAA,EAAA,EAAA,QAAA,EAAA,CAAA,KAAK,KACJD,IAAC,MAAM,EAAA,EAAA,QAAA,EACLA,GAAQ,CAAA,OAAA,EAAA,EAAA,QAAA,EAAA,KAAK,EAAS,CAAA,EAAA,CACf,CACZ,EACCA,GAAA,CAAC,SAAS,EAAA,EAAC,GAAG,EAAE,GAAG,EAAE,WAAW,EAAA,IAAA,EAAA,CAAG,CAC/B,EAAA,CAAA,EACN;AACJ;;;;","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import ApiDoc from './ApiDoc';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ApiDoc;
|
|
6
|
+
tags: string[];
|
|
7
|
+
decorators: ((story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
8
|
+
url: string;
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
11
|
+
parameters: {
|
|
12
|
+
reactRouter: {
|
|
13
|
+
routePath: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Ecocor: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ApiDoc';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props as NavItemProps } from './NavItem';
|
|
3
|
+
import { Props as NavMenuProps } from './NavMenu';
|
|
4
|
+
export interface NavBarProps {
|
|
5
|
+
title: string;
|
|
6
|
+
logo?: string;
|
|
7
|
+
logoClass?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
gitHubUrl?: string;
|
|
10
|
+
gitHubIcon?: JSX.Element;
|
|
11
|
+
navItems?: (NavItemProps | NavMenuProps)[];
|
|
12
|
+
}
|
|
13
|
+
export default function NavBar({ title, logo, logoClass, version, gitHubUrl, gitHubIcon, navItems }: NavBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import NavBar from './NavBar';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof NavBar;
|
|
6
|
+
tags: string[];
|
|
7
|
+
decorators: import("@storybook/preview-api/dist/storybook-channel-mock-a19cd233").M[];
|
|
8
|
+
parameters: {
|
|
9
|
+
reactRouter: {
|
|
10
|
+
routePath: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
logo: {
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
options: string[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
export declare const Dracor: Story;
|
|
25
|
+
export declare const Einakter: Story;
|
|
26
|
+
export declare const Ecocor: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface Props {
|
|
2
|
+
label: string;
|
|
3
|
+
href: string;
|
|
4
|
+
active?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export default function NavItem({ label, href, active, className }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function itemClassNames(active?: boolean, className?: string): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import NavItem from './NavItem';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof NavItem;
|
|
6
|
+
tags: string[];
|
|
7
|
+
decorators: import("@storybook/preview-api/dist/storybook-channel-mock-a19cd233").M[];
|
|
8
|
+
parameters: {
|
|
9
|
+
reactRouter: {
|
|
10
|
+
routePath: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
export declare const Home: Story;
|
|
17
|
+
export declare const Active: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Item {
|
|
2
|
+
label: string;
|
|
3
|
+
href: string;
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface Props {
|
|
7
|
+
label: string;
|
|
8
|
+
items: Item[];
|
|
9
|
+
menuClass?: string;
|
|
10
|
+
}
|
|
11
|
+
export default function NavMenu({ label, items, menuClass }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import NavMenu from './NavMenu';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof NavMenu;
|
|
6
|
+
tags: string[];
|
|
7
|
+
decorators: import("@storybook/preview-api/dist/storybook-channel-mock-a19cd233").M[];
|
|
8
|
+
parameters: {
|
|
9
|
+
reactRouter: {
|
|
10
|
+
routePath: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof meta>;
|
|
16
|
+
export declare const Simple: Story;
|
|
17
|
+
export declare const Active: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './NavBar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const withRouter: (children: JSX.Element, { route }?: {
|
|
3
|
+
route?: string | undefined;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const withProviders: (children: JSX.Element, { route }?: {
|
|
6
|
+
route?: string | undefined;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
interface Props$2 {
|
|
5
|
+
label: string;
|
|
6
|
+
href: string;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Item {
|
|
12
|
+
label: string;
|
|
13
|
+
href: string;
|
|
14
|
+
selected?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface Props$1 {
|
|
17
|
+
label: string;
|
|
18
|
+
items: Item[];
|
|
19
|
+
menuClass?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface NavBarProps {
|
|
23
|
+
title: string;
|
|
24
|
+
logo?: string;
|
|
25
|
+
logoClass?: string;
|
|
26
|
+
version?: string;
|
|
27
|
+
gitHubUrl?: string;
|
|
28
|
+
gitHubIcon?: JSX.Element;
|
|
29
|
+
navItems?: (Props$2 | Props$1)[];
|
|
30
|
+
}
|
|
31
|
+
declare function NavBar({ title, logo, logoClass, version, gitHubUrl, gitHubIcon, navItems }: NavBarProps): react_jsx_runtime.JSX.Element;
|
|
32
|
+
|
|
33
|
+
interface Props {
|
|
34
|
+
url: string;
|
|
35
|
+
title?: string;
|
|
36
|
+
}
|
|
37
|
+
declare function ApiDoc({ url, title }: Props): react_jsx_runtime.JSX.Element;
|
|
38
|
+
|
|
39
|
+
export { ApiDoc, NavBar };
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dracor/react",
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "DraCor react component library",
|
|
5
|
+
"repository": "https://github.com/dracor-org/dracor-react",
|
|
6
|
+
"homepage": "https://github.com/dracor-org/dracor-react#readme",
|
|
7
|
+
"author": "Carsten Milling <cmil@hashtable.de>",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"main": "dist/cjs/index.js",
|
|
10
|
+
"module": "dist/esm/index.js",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"tailwind.js"
|
|
14
|
+
],
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "rollup -c --bundleConfigAsCjs",
|
|
18
|
+
"test": "jest",
|
|
19
|
+
"storybook": "storybook dev -p 6006",
|
|
20
|
+
"build-storybook": "storybook build",
|
|
21
|
+
"release": "./prepublish.sh && yarn publish --access public"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"tailwindcss-classnames": "^3.1.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@babel/core": "^7.22.5",
|
|
28
|
+
"@babel/preset-env": "^7.22.5",
|
|
29
|
+
"@babel/preset-react": "^7.22.5",
|
|
30
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
31
|
+
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
|
32
|
+
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
|
33
|
+
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
|
34
|
+
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
35
|
+
"@headlessui/react": "^1.7.15",
|
|
36
|
+
"@rollup/plugin-commonjs": "^25.0.2",
|
|
37
|
+
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
38
|
+
"@rollup/plugin-typescript": "^11.1.2",
|
|
39
|
+
"@storybook/addon-essentials": "^7.0.27",
|
|
40
|
+
"@storybook/addon-interactions": "^7.0.27",
|
|
41
|
+
"@storybook/addon-links": "^7.0.27",
|
|
42
|
+
"@storybook/addon-styling": "^1.3.4",
|
|
43
|
+
"@storybook/blocks": "^7.0.27",
|
|
44
|
+
"@storybook/react": "^7.0.27",
|
|
45
|
+
"@storybook/react-vite": "^7.0.27",
|
|
46
|
+
"@storybook/testing-library": "^0.2.0",
|
|
47
|
+
"@testing-library/react": "^14.0.0",
|
|
48
|
+
"@types/jest": "^29.5.2",
|
|
49
|
+
"@types/react": "^18.2.14",
|
|
50
|
+
"@types/swagger-ui-react": "^4.18.0",
|
|
51
|
+
"autoprefixer": "^10.4.14",
|
|
52
|
+
"babel-jest": "^29.5.0",
|
|
53
|
+
"jest": "^29.5.0",
|
|
54
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
55
|
+
"postcss": "^8.4.25",
|
|
56
|
+
"prop-types": "^15.8.1",
|
|
57
|
+
"react": "^18.2.0",
|
|
58
|
+
"react-dom": "^18.2.0",
|
|
59
|
+
"react-helmet-async": "^1.3.0",
|
|
60
|
+
"react-router-dom": "^6.14.1",
|
|
61
|
+
"rollup": "^3.26.0",
|
|
62
|
+
"rollup-plugin-dts": "^5.3.0",
|
|
63
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
64
|
+
"storybook": "^7.0.27",
|
|
65
|
+
"storybook-addon-react-router-v6": "^1.0.2",
|
|
66
|
+
"swagger-ui-react": "^5.1.3",
|
|
67
|
+
"tailwindcss": "^3.3.2",
|
|
68
|
+
"tslib": "^2.6.0",
|
|
69
|
+
"typescript": "^5.1.6",
|
|
70
|
+
"vite": "^4.3.9"
|
|
71
|
+
},
|
|
72
|
+
"peerDependencies": {
|
|
73
|
+
"@fortawesome/fontawesome-svg-core": "^6.4.0",
|
|
74
|
+
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
|
75
|
+
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
|
76
|
+
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
77
|
+
"@headlessui/react": "^1.7.15",
|
|
78
|
+
"react": "^18.2.0",
|
|
79
|
+
"react-helmet-async": "^1.3.0",
|
|
80
|
+
"react-router-dom": "^6.14.1",
|
|
81
|
+
"swagger-ui-react": "^5.1.3",
|
|
82
|
+
"tailwindcss": "^3.3.2"
|
|
83
|
+
}
|
|
84
|
+
}
|
package/tailwind.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const plugin = require('tailwindcss/plugin');
|
|
2
|
+
|
|
3
|
+
const config = {
|
|
4
|
+
theme: {
|
|
5
|
+
extend: {
|
|
6
|
+
colors: {
|
|
7
|
+
primary: '#1f2448',
|
|
8
|
+
secondary: {
|
|
9
|
+
100: '#aef',
|
|
10
|
+
200: '#08f',
|
|
11
|
+
},
|
|
12
|
+
neutral: {
|
|
13
|
+
100: '#ebf0f7',
|
|
14
|
+
200: '#1f244809',
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
typography: {
|
|
18
|
+
DEFAULT: {
|
|
19
|
+
css: {
|
|
20
|
+
color: '#333',
|
|
21
|
+
strong: {
|
|
22
|
+
fontWeight: '500',
|
|
23
|
+
},
|
|
24
|
+
h1: {
|
|
25
|
+
fontWeight: '500',
|
|
26
|
+
},
|
|
27
|
+
h2: {
|
|
28
|
+
fontWeight: '500',
|
|
29
|
+
},
|
|
30
|
+
h3: {
|
|
31
|
+
fontWeight: '500',
|
|
32
|
+
},
|
|
33
|
+
a: {
|
|
34
|
+
color: '#08f',
|
|
35
|
+
'&:hover': {
|
|
36
|
+
color: '#0056b3',
|
|
37
|
+
},
|
|
38
|
+
fontWeight: '400',
|
|
39
|
+
textDecoration: false,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
height: {
|
|
45
|
+
'calc-full-0.75': 'calc(100% - 0.75rem)',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
module.exports = plugin(() => {}, config);
|