From aebf61bfd6c4921a629346d091497f38a645fa61 Mon Sep 17 00:00:00 2001 From: mittwald <> Date: Mon, 25 Mar 2024 12:27:50 +0000 Subject: [PATCH] Update from https://github.com/mittwald/flow/commit/e5c9c597346bf47ff82a7a07252feb34725d8a16 --- .../01-getting-started/installation.html | 17 + .../badge/01-getting-started/installation.txt | 2746 ++++++++++++++++ docs/badge/01-getting-started/stylesheet.html | 77 + docs/badge/01-getting-started/stylesheet.txt | 2799 +++++++++++++++++ docs/badge/02-components/actions/button.html | 89 + docs/badge/02-components/actions/button.txt | 2754 ++++++++++++++++ .../02-components/actions/copy-button.html | 5 + .../02-components/actions/copy-button.txt | 2709 ++++++++++++++++ docs/badge/02-components/button-group.html | 44 + docs/badge/02-components/button-group.txt | 2721 ++++++++++++++++ docs/badge/02-components/column-layout.html | 46 + docs/badge/02-components/column-layout.txt | 2749 ++++++++++++++++ docs/badge/02-components/content/avatar.html | 70 + docs/badge/02-components/content/avatar.txt | 2735 ++++++++++++++++ docs/badge/02-components/content/badge.html | 18 + docs/badge/02-components/content/badge.txt | 2713 ++++++++++++++++ docs/badge/02-components/content/heading.html | 25 + docs/badge/02-components/content/heading.txt | 2717 ++++++++++++++++ docs/badge/02-components/content/icon.html | 57 + docs/badge/02-components/content/icon.txt | 2732 ++++++++++++++++ docs/badge/02-components/content/image.html | 8 + docs/badge/02-components/content/image.txt | 2709 ++++++++++++++++ .../02-components/content/inline-code.html | 9 + .../02-components/content/inline-code.txt | 2709 ++++++++++++++++ docs/badge/02-components/content/label.html | 5 + docs/badge/02-components/content/label.txt | 2709 ++++++++++++++++ .../02-components/content/labeled-value.html | 44 + .../02-components/content/labeled-value.txt | 2721 ++++++++++++++++ .../02-components/form-controls/checkbox.html | 5 + .../02-components/form-controls/checkbox.txt | 2709 ++++++++++++++++ .../form-controls/number-field.html | 5 + .../form-controls/number-field.txt | 2709 ++++++++++++++++ .../form-controls/radio-group.html | 13 + .../form-controls/radio-group.txt | 2709 ++++++++++++++++ .../02-components/form-controls/switch.html | 19 + .../02-components/form-controls/switch.txt | 2717 ++++++++++++++++ .../form-controls/text-area.html | 10 + .../02-components/form-controls/text-area.txt | 2709 ++++++++++++++++ .../form-controls/text-field.html | 10 + .../form-controls/text-field.txt | 2709 ++++++++++++++++ docs/badge/02-components/navigation/link.html | 22 + docs/badge/02-components/navigation/link.txt | 2723 ++++++++++++++++ .../02-components/navigation/navigation.html | 46 + .../02-components/navigation/navigation.txt | 2713 ++++++++++++++++ docs/badge/02-components/overlays/modal.html | 46 + docs/badge/02-components/overlays/modal.txt | 2757 ++++++++++++++++ .../badge/02-components/overlays/tooltip.html | 14 + docs/badge/02-components/overlays/tooltip.txt | 2709 ++++++++++++++++ .../02-components/status/inline-alert.html | 63 + .../02-components/status/inline-alert.txt | 2756 ++++++++++++++++ .../02-components/status/status-badge.html | 15 + .../02-components/status/status-badge.txt | 2713 ++++++++++++++++ .../02-components/status/status-icon.html | 17 + .../02-components/status/status-icon.txt | 2722 ++++++++++++++++ .../02-components/structure/layout-card.html | 8 + .../02-components/structure/layout-card.txt | 2709 ++++++++++++++++ docs/badge/02-components/structure/list.html | 22 + docs/badge/02-components/structure/list.txt | 2709 ++++++++++++++++ .../02-components/structure/section.html | 88 + .../badge/02-components/structure/section.txt | 2753 ++++++++++++++++ docs/badge/404.html | 1 + .../static/chunks/208.0e840532496ed5fd.js | 1 + .../static/chunks/21.068b8a8c43479191.js | 1 + .../static/chunks/219.efa373c77c378cf0.js | 1 + .../static/chunks/233.f25448c50db16a20.js | 1 + .../static/chunks/246.7e270435b4a5a699.js | 1 + .../static/chunks/261.a8ce0b561286734b.js | 1 + .../static/chunks/279.3fc8745cbf950155.js | 1 + .../_next/static/chunks/3.4aa4660d66ba7370.js | 1 + .../static/chunks/379.599c5577c52dc2dd.js | 1 + .../static/chunks/383.ab7004d0295abfc5.js | 1 + .../chunks/3ceb1ae0-b38747a08ab44079.js | 1 + .../static/chunks/402.5bee430b580b222f.js | 1 + .../static/chunks/430.7af2a4a8ff6379bb.js | 1 + .../static/chunks/437.a68cfc16832c7e59.js | 1 + .../static/chunks/49.87ef728e2476b3fd.js | 1 + .../static/chunks/50.e698b516ebdaddb8.js | 1 + .../static/chunks/506.2fcf6ada4580fd96.js | 1 + .../static/chunks/521.f245ade3a5f76722.js | 1 + .../static/chunks/530-d26691cd436c7330.js | 131 + .../static/chunks/536.55153a1e1d9c3ba8.js | 1 + .../static/chunks/538.c0216b6286918baf.js | 1 + .../static/chunks/553-eec603ad851c1f3a.js | 9 + .../static/chunks/558.5e0529f9201bf6f9.js | 1 + .../static/chunks/567.d6e1278cc5aebb7e.js | 1 + .../static/chunks/573.81b42c0deab95e19.js | 1 + .../static/chunks/654.f2b32c11e2655083.js | 1 + .../static/chunks/675.f5081ff596179793.js | 1 + .../static/chunks/704.035b08762836da7f.js | 1 + .../chunks/70ee543b-1762fe385b328da9.js | 1 + .../static/chunks/818.93d45b3524ee71d7.js | 1 + .../static/chunks/833.2d9f73d80ac0afd2.js | 1 + .../static/chunks/872.ea65b231eb7459da.js | 1 + .../_next/static/chunks/9.1b52231dfd7f11ad.js | 1 + .../static/chunks/918-ade7e90ebb3fefbd.js | 1 + .../static/chunks/951.708a9fc9c7980d53.js | 1 + .../static/chunks/985-dc04f245b69b64b8.js | 1 + .../chunks/a6fcb21f.4b1f7eaf4b5f3a1c.js | 1 + .../app/[...slug]/page-9b68a4d443ec09be.js | 1 + .../chunks/app/_not-found-6bc7d2d3b6595abf.js | 1 + .../chunks/app/layout-ad5f8a570bb58345.js | 1 + .../chunks/app/page-0e4cc24ccff7b0c4.js | 1 + .../chunks/d709487a-0b33f1540d9dc41a.js | 1 + .../chunks/framework-b7a3b3ca78c5d416.js | 33 + .../static/chunks/main-142edbcf5d4f6570.js | 1 + .../chunks/main-app-389f4953ce602099.js | 1 + .../chunks/pages/_app-770aa478920799ce.js | 1 + .../chunks/pages/_error-14e34bf79fac4690.js | 1 + .../chunks/polyfills-c67a75d1b6f99dc8.js | 1 + .../static/chunks/webpack-e1ad595ba9686db4.js | 1 + .../_next/static/css/1de2f7839b9cf19e.css | 1 + .../_next/static/css/b7476877dd2c8a04.css | 1 + .../wG7dSsx2iQ5rsPcZLZ8xc/_buildManifest.js | 1 + .../wG7dSsx2iQ5rsPcZLZ8xc/_ssgManifest.js | 1 + docs/badge/favicon.ico | Bin 0 -> 877 bytes docs/badge/index.html | 1 + docs/badge/index.txt | 2681 ++++++++++++++++ 117 files changed, 85572 insertions(+) create mode 100644 docs/badge/01-getting-started/installation.html create mode 100644 docs/badge/01-getting-started/installation.txt create mode 100644 docs/badge/01-getting-started/stylesheet.html create mode 100644 docs/badge/01-getting-started/stylesheet.txt create mode 100644 docs/badge/02-components/actions/button.html create mode 100644 docs/badge/02-components/actions/button.txt create mode 100644 docs/badge/02-components/actions/copy-button.html create mode 100644 docs/badge/02-components/actions/copy-button.txt create mode 100644 docs/badge/02-components/button-group.html create mode 100644 docs/badge/02-components/button-group.txt create mode 100644 docs/badge/02-components/column-layout.html create mode 100644 docs/badge/02-components/column-layout.txt create mode 100644 docs/badge/02-components/content/avatar.html create mode 100644 docs/badge/02-components/content/avatar.txt create mode 100644 docs/badge/02-components/content/badge.html create mode 100644 docs/badge/02-components/content/badge.txt create mode 100644 docs/badge/02-components/content/heading.html create mode 100644 docs/badge/02-components/content/heading.txt create mode 100644 docs/badge/02-components/content/icon.html create mode 100644 docs/badge/02-components/content/icon.txt create mode 100644 docs/badge/02-components/content/image.html create mode 100644 docs/badge/02-components/content/image.txt create mode 100644 docs/badge/02-components/content/inline-code.html create mode 100644 docs/badge/02-components/content/inline-code.txt create mode 100644 docs/badge/02-components/content/label.html create mode 100644 docs/badge/02-components/content/label.txt create mode 100644 docs/badge/02-components/content/labeled-value.html create mode 100644 docs/badge/02-components/content/labeled-value.txt create mode 100644 docs/badge/02-components/form-controls/checkbox.html create mode 100644 docs/badge/02-components/form-controls/checkbox.txt create mode 100644 docs/badge/02-components/form-controls/number-field.html create mode 100644 docs/badge/02-components/form-controls/number-field.txt create mode 100644 docs/badge/02-components/form-controls/radio-group.html create mode 100644 docs/badge/02-components/form-controls/radio-group.txt create mode 100644 docs/badge/02-components/form-controls/switch.html create mode 100644 docs/badge/02-components/form-controls/switch.txt create mode 100644 docs/badge/02-components/form-controls/text-area.html create mode 100644 docs/badge/02-components/form-controls/text-area.txt create mode 100644 docs/badge/02-components/form-controls/text-field.html create mode 100644 docs/badge/02-components/form-controls/text-field.txt create mode 100644 docs/badge/02-components/navigation/link.html create mode 100644 docs/badge/02-components/navigation/link.txt create mode 100644 docs/badge/02-components/navigation/navigation.html create mode 100644 docs/badge/02-components/navigation/navigation.txt create mode 100644 docs/badge/02-components/overlays/modal.html create mode 100644 docs/badge/02-components/overlays/modal.txt create mode 100644 docs/badge/02-components/overlays/tooltip.html create mode 100644 docs/badge/02-components/overlays/tooltip.txt create mode 100644 docs/badge/02-components/status/inline-alert.html create mode 100644 docs/badge/02-components/status/inline-alert.txt create mode 100644 docs/badge/02-components/status/status-badge.html create mode 100644 docs/badge/02-components/status/status-badge.txt create mode 100644 docs/badge/02-components/status/status-icon.html create mode 100644 docs/badge/02-components/status/status-icon.txt create mode 100644 docs/badge/02-components/structure/layout-card.html create mode 100644 docs/badge/02-components/structure/layout-card.txt create mode 100644 docs/badge/02-components/structure/list.html create mode 100644 docs/badge/02-components/structure/list.txt create mode 100644 docs/badge/02-components/structure/section.html create mode 100644 docs/badge/02-components/structure/section.txt create mode 100644 docs/badge/404.html create mode 100644 docs/badge/_next/static/chunks/208.0e840532496ed5fd.js create mode 100644 docs/badge/_next/static/chunks/21.068b8a8c43479191.js create mode 100644 docs/badge/_next/static/chunks/219.efa373c77c378cf0.js create mode 100644 docs/badge/_next/static/chunks/233.f25448c50db16a20.js create mode 100644 docs/badge/_next/static/chunks/246.7e270435b4a5a699.js create mode 100644 docs/badge/_next/static/chunks/261.a8ce0b561286734b.js create mode 100644 docs/badge/_next/static/chunks/279.3fc8745cbf950155.js create mode 100644 docs/badge/_next/static/chunks/3.4aa4660d66ba7370.js create mode 100644 docs/badge/_next/static/chunks/379.599c5577c52dc2dd.js create mode 100644 docs/badge/_next/static/chunks/383.ab7004d0295abfc5.js create mode 100644 docs/badge/_next/static/chunks/3ceb1ae0-b38747a08ab44079.js create mode 100644 docs/badge/_next/static/chunks/402.5bee430b580b222f.js create mode 100644 docs/badge/_next/static/chunks/430.7af2a4a8ff6379bb.js create mode 100644 docs/badge/_next/static/chunks/437.a68cfc16832c7e59.js create mode 100644 docs/badge/_next/static/chunks/49.87ef728e2476b3fd.js create mode 100644 docs/badge/_next/static/chunks/50.e698b516ebdaddb8.js create mode 100644 docs/badge/_next/static/chunks/506.2fcf6ada4580fd96.js create mode 100644 docs/badge/_next/static/chunks/521.f245ade3a5f76722.js create mode 100644 docs/badge/_next/static/chunks/530-d26691cd436c7330.js create mode 100644 docs/badge/_next/static/chunks/536.55153a1e1d9c3ba8.js create mode 100644 docs/badge/_next/static/chunks/538.c0216b6286918baf.js create mode 100644 docs/badge/_next/static/chunks/553-eec603ad851c1f3a.js create mode 100644 docs/badge/_next/static/chunks/558.5e0529f9201bf6f9.js create mode 100644 docs/badge/_next/static/chunks/567.d6e1278cc5aebb7e.js create mode 100644 docs/badge/_next/static/chunks/573.81b42c0deab95e19.js create mode 100644 docs/badge/_next/static/chunks/654.f2b32c11e2655083.js create mode 100644 docs/badge/_next/static/chunks/675.f5081ff596179793.js create mode 100644 docs/badge/_next/static/chunks/704.035b08762836da7f.js create mode 100644 docs/badge/_next/static/chunks/70ee543b-1762fe385b328da9.js create mode 100644 docs/badge/_next/static/chunks/818.93d45b3524ee71d7.js create mode 100644 docs/badge/_next/static/chunks/833.2d9f73d80ac0afd2.js create mode 100644 docs/badge/_next/static/chunks/872.ea65b231eb7459da.js create mode 100644 docs/badge/_next/static/chunks/9.1b52231dfd7f11ad.js create mode 100644 docs/badge/_next/static/chunks/918-ade7e90ebb3fefbd.js create mode 100644 docs/badge/_next/static/chunks/951.708a9fc9c7980d53.js create mode 100644 docs/badge/_next/static/chunks/985-dc04f245b69b64b8.js create mode 100644 docs/badge/_next/static/chunks/a6fcb21f.4b1f7eaf4b5f3a1c.js create mode 100644 docs/badge/_next/static/chunks/app/[...slug]/page-9b68a4d443ec09be.js create mode 100644 docs/badge/_next/static/chunks/app/_not-found-6bc7d2d3b6595abf.js create mode 100644 docs/badge/_next/static/chunks/app/layout-ad5f8a570bb58345.js create mode 100644 docs/badge/_next/static/chunks/app/page-0e4cc24ccff7b0c4.js create mode 100644 docs/badge/_next/static/chunks/d709487a-0b33f1540d9dc41a.js create mode 100644 docs/badge/_next/static/chunks/framework-b7a3b3ca78c5d416.js create mode 100644 docs/badge/_next/static/chunks/main-142edbcf5d4f6570.js create mode 100644 docs/badge/_next/static/chunks/main-app-389f4953ce602099.js create mode 100644 docs/badge/_next/static/chunks/pages/_app-770aa478920799ce.js create mode 100644 docs/badge/_next/static/chunks/pages/_error-14e34bf79fac4690.js create mode 100644 docs/badge/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js create mode 100644 docs/badge/_next/static/chunks/webpack-e1ad595ba9686db4.js create mode 100644 docs/badge/_next/static/css/1de2f7839b9cf19e.css create mode 100644 docs/badge/_next/static/css/b7476877dd2c8a04.css create mode 100644 docs/badge/_next/static/wG7dSsx2iQ5rsPcZLZ8xc/_buildManifest.js create mode 100644 docs/badge/_next/static/wG7dSsx2iQ5rsPcZLZ8xc/_ssgManifest.js create mode 100644 docs/badge/favicon.ico create mode 100644 docs/badge/index.html create mode 100644 docs/badge/index.txt diff --git a/docs/badge/01-getting-started/installation.html b/docs/badge/01-getting-started/installation.html new file mode 100644 index 0000000000..3d93da9ce6 --- /dev/null +++ b/docs/badge/01-getting-started/installation.html @@ -0,0 +1,17 @@ +Installation

Flow – mittwald Design System
beta

Installation

Welcome to the Flow documentation!

+

Installing the Flow React Component Library

+

The Flow React Component Library can be installed using a package manager like +npm or yarn.

+
yarn add @mittwald/flow-react-components
+
+

All components are available in this one package for ease of dependency +management.

+

Import styles

+

You have to import the bundled stylesheet in order to get the correct component +styles. Add this line to your project's entry point.

+
import "@mittwald/flow-react-components/styles";
+
\ No newline at end of file diff --git a/docs/badge/01-getting-started/installation.txt b/docs/badge/01-getting-started/installation.txt new file mode 100644 index 0000000000..9f2e091789 --- /dev/null +++ b/docs/badge/01-getting-started/installation.txt @@ -0,0 +1,2746 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","01-getting-started/installation","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","01-getting-started/installation","c"],{"children":["__PAGE__?{\"slug\":[\"01-getting-started\",\"installation\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","01-getting-started/installation","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: " +

Import styles

+

You have to import the bundled stylesheet in order to get the correct component +styles. Add this line to your project's entry point.

+
import "@mittwald/flow-stylesheet/css";
+
+

Using the stylesheet

+

If you want to get started, you should probably learn how the class names are +structured. The class names provided in this stylesheet are following a +consistent, component-based and easy to understand schema.

+

General class name notation

+

The class names are all in lowercase and using - to separate words and -- to +separate logical sections.

+

The first logical section is always the flow namespace. Other sections might +be:

+

Components

+
.flow--button
+.flow--heading
+.flow--status-icon
+
+

Sub-Components

+
.flow--navigation
+.flow--navigation--navigation-item
+
+

Specialization: different variants

+
.flow--button--primary
+.flow--inline-alert--danger
+.flow--icon--fixed-width
+
+

Specialization: components aligned in a composition

+
.flow--button--icon
+.flow--inline-alert--status-icon
+
+

A note to specialization

+

Class Names used to specialize a basic component must always be used in +addition to the basic class name. Here are some examples that illustrate +this requirement.

+
<button className="flow--button flow--button--primary">
+  Primary button
+</button>;
+
+

Combined variants

+
<button className="flow--button flow--button--primary flow--button--size-s">
+  Small primary button
+</button>;
+
+

Components aligned in a composition

+

It is a common practice to compose larger components out of already existing +smaller ones. Take the Inline Alert example. The Inline Alert is composed out of +an icon, a heading and some optional content. These contained components must +have their basic class name (flow--icon), to get their basic styling and the +specialization class name (flow--inline-alert--status-icon) to get the Inline +Alert specific styles.

+
import ExampleSvg from "@/content/01-getting-started/stylesheet/examples/components/ExampleSvg";
+
+<aside className="flow--inline-alert flow--inline-alert--info">
+  <ExampleSvg className="flow--icon flow--inline-alert--status-icon" />
+  <h3 className="flow--heading flow--inline-alert--heading">
+    Email address has been archived
+  </h3>
+  <div className="flow--inline-alert--content">
+    As your domain has been deleted, this email address has
+    been archived. To be able to send and receive emails,
+    you must rename the address.
+  </div>
+</aside>;
+
\ No newline at end of file diff --git a/docs/badge/01-getting-started/stylesheet.txt b/docs/badge/01-getting-started/stylesheet.txt new file mode 100644 index 0000000000..e99b49acb6 --- /dev/null +++ b/docs/badge/01-getting-started/stylesheet.txt @@ -0,0 +1,2799 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","01-getting-started/stylesheet","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","01-getting-started/stylesheet","c"],{"children":["__PAGE__?{\"slug\":[\"01-getting-started\",\"stylesheet\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","01-getting-started/stylesheet","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: "
import Button from "@mittwald/flow-react-components/Button";
+
+<Button>Continue/Action</Button>;
+
+

Different variants

+
import Button from "@mittwald/flow-react-components/Button";
+
+<Row>
+  <Button variant="primary">Continue/Action</Button>
+  <Button variant="secondary">Abort/Back</Button>
+  <Button variant="accent">Create/Save</Button>
+  <Button variant="danger">Delete/Terminate</Button>
+</Row>;
+
+

Plain style

+
import Button from "@mittwald/flow-react-components/Button";
+
+<Row>
+  <Button style="plain" variant="primary">
+    Continue/Action
+  </Button>
+  <Button style="plain" variant="secondary">
+    Abort/Back
+  </Button>
+  <Button style="plain" variant="accent">
+    Create/Save
+  </Button>
+  <Button style="plain" variant="danger">
+    Delete/Terminate
+  </Button>
+</Row>;
+
+

Soft style

+
import Button from "@mittwald/flow-react-components/Button";
+
+<Row>
+  <Button style="soft" variant="primary">
+    Continue/Action
+  </Button>
+  <Button style="soft" variant="secondary">
+    Abort/Back
+  </Button>
+  <Button style="soft" variant="accent">
+    Create/Save
+  </Button>
+  <Button style="soft" variant="danger">
+    Delete/Terminate
+  </Button>
+</Row>;
+
+

With icon

+

Use the <Icon /> inside a <Button /> to display an icon.

+

Accessibility

+

The underlying SVG image automatically receives the aria-hidden=true +attribute. Use the aria-label attribute at the Button to describe the +associated action.

+
import Button from "@mittwald/flow-react-components/Button";
+import { IconHome } from "@mittwald/flow-react-components/Icons";
+
+<Button aria-label="Star item">
+  <IconHome />
+</Button>;
+
+

With icon and text

+
import Button from "@mittwald/flow-react-components/Button";
+import { Text } from "@mittwald/flow-react-components/Text";
+import { IconChevronDown } from "@mittwald/flow-react-components/Icons";
+
+<Button>
+  <Text>Add email address</Text>
+  <IconChevronDown />
+</Button>;
+
+

Small variant

+
import Button from "@mittwald/flow-react-components/Button";
+
+<Button size="s">Continue/Action</Button>;
+
+

States

+
import Button from "@mittwald/flow-react-components/Button";
+
+<Row>
+  <Button isDisabled>Continue/Action</Button>
+  <Button isPending>Continue/Action</Button>
+  <Button isSucceeded>Continue/Action</Button>
+  <Button isFailed>Continue/Action</Button>
+</Row>;
+
\ No newline at end of file diff --git a/docs/badge/02-components/actions/button.txt b/docs/badge/02-components/actions/button.txt new file mode 100644 index 0000000000..dc9d4ba604 --- /dev/null +++ b/docs/badge/02-components/actions/button.txt @@ -0,0 +1,2754 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","02-components/actions/button","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","02-components/actions/button","c"],{"children":["__PAGE__?{\"slug\":[\"02-components\",\"actions\",\"button\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","02-components/actions/button","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: "
import { CopyButton } from "@mittwald/flow-react-components/CopyButton";
+
+<CopyButton text="Copied content" />;
+
\ No newline at end of file diff --git a/docs/badge/02-components/actions/copy-button.txt b/docs/badge/02-components/actions/copy-button.txt new file mode 100644 index 0000000000..f7a4d07c57 --- /dev/null +++ b/docs/badge/02-components/actions/copy-button.txt @@ -0,0 +1,2709 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","02-components/actions/copy-button","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","02-components/actions/copy-button","c"],{"children":["__PAGE__?{\"slug\":[\"02-components\",\"actions\",\"copy-button\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","02-components/actions/copy-button","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: "
import ButtonGroup from "@mittwald/flow-react-components/ButtonGroup";
+import Button from "@mittwald/flow-react-components/Button";
+
+<ButtonGroup>
+  <Button variant="accent">Create customer</Button>
+  <Button variant="secondary" style="soft">
+    Abort
+  </Button>
+</ButtonGroup>;
+
+

Danger

+
import ButtonGroup from "@mittwald/flow-react-components/ButtonGroup";
+import Button from "@mittwald/flow-react-components/Button";
+
+<ButtonGroup>
+  <Button variant="danger">Delete project</Button>
+  <Button variant="secondary" style="soft">
+    Abort
+  </Button>
+</ButtonGroup>;
+
+

Info

+
import ButtonGroup from "@mittwald/flow-react-components/ButtonGroup";
+import Button from "@mittwald/flow-react-components/Button";
+
+<ButtonGroup>
+  <Button>Ok</Button>
+</ButtonGroup>;
+
+

Additional secondary button

+
import ButtonGroup from "@mittwald/flow-react-components/ButtonGroup";
+import Button from "@mittwald/flow-react-components/Button";
+
+<ButtonGroup>
+  <Button variant="secondary" style="soft">
+    Save and add more
+  </Button>
+  <Button variant="accent">Add email address</Button>
+  <Button variant="secondary" style="soft">
+    Abort
+  </Button>
+</ButtonGroup>;
+
\ No newline at end of file diff --git a/docs/badge/02-components/button-group.txt b/docs/badge/02-components/button-group.txt new file mode 100644 index 0000000000..094e3ae1c3 --- /dev/null +++ b/docs/badge/02-components/button-group.txt @@ -0,0 +1,2721 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","02-components/button-group","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","02-components/button-group","c"],{"children":["__PAGE__?{\"slug\":[\"02-components\",\"button-group\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","02-components/button-group","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: "
import Badge from "@mittwald/flow-react-components/Badge";
+import { Text } from "@mittwald/flow-react-components/Text";
+import { Button } from "@mittwald/flow-react-components/Button";
+import { IconClose } from "@mittwald/flow-react-components/Icons";
+
+<Badge>
+  <Text>Badge</Text>
+  <Button>
+    <IconClose />
+  </Button>
+</Badge>;
+
\ No newline at end of file diff --git a/docs/badge/02-components/content/badge.txt b/docs/badge/02-components/content/badge.txt new file mode 100644 index 0000000000..7abe82f72d --- /dev/null +++ b/docs/badge/02-components/content/badge.txt @@ -0,0 +1,2713 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","02-components/content/badge","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","02-components/content/badge","c"],{"children":["__PAGE__?{\"slug\":[\"02-components\",\"content\",\"badge\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","02-components/content/badge","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: "
import LabeledValue from "@mittwald/flow-react-components/LabeledValue";
+import Label from "@mittwald/flow-react-components/Label";
+import Content from "@mittwald/flow-react-components/Content";
+import CopyButton from "@mittwald/flow-react-components/CopyButton";
+
+<LabeledValue>
+  <Label>Project ID</Label>
+  <Content>p-eWRhpRV</Content>
+  <CopyButton text="Project ID: p-eWRhpRV" />
+</LabeledValue>;
+
+

With link

+
https://mittwald.de
import LabeledValue from "@mittwald/flow-react-components/LabeledValue";
+import Label from "@mittwald/flow-react-components/Label";
+import Link from "@mittwald/flow-react-components/Link";
+
+<LabeledValue>
+  <Label>Domain</Label>
+  <Link>https://mittwald.de</Link>
+</LabeledValue>;
+
+

With inline code

+
127.0.0.1
import LabeledValue from "@mittwald/flow-react-components/LabeledValue";
+import Label from "@mittwald/flow-react-components/Label";
+import InlineCode from "@mittwald/flow-react-components/InlineCode";
+import CopyButton from "@mittwald/flow-react-components/CopyButton";
+
+<LabeledValue>
+  <Label>IP address</Label>
+  <InlineCode>127.0.0.1</InlineCode>
+  <CopyButton text="127.0.0.1" />
+</LabeledValue>;
+
\ No newline at end of file diff --git a/docs/badge/02-components/content/labeled-value.txt b/docs/badge/02-components/content/labeled-value.txt new file mode 100644 index 0000000000..9345b45ede --- /dev/null +++ b/docs/badge/02-components/content/labeled-value.txt @@ -0,0 +1,2721 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","02-components/content/labeled-value","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","02-components/content/labeled-value","c"],{"children":["__PAGE__?{\"slug\":[\"02-components\",\"content\",\"labeled-value\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","02-components/content/labeled-value","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: "
import NumberField from "@mittwald/flow-react-components/NumberField";
+
+<NumberField defaultValue={5} minValue={0} maxValue={10} />;
+
\ No newline at end of file diff --git a/docs/badge/02-components/form-controls/number-field.txt b/docs/badge/02-components/form-controls/number-field.txt new file mode 100644 index 0000000000..c5d855b828 --- /dev/null +++ b/docs/badge/02-components/form-controls/number-field.txt @@ -0,0 +1,2709 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","02-components/form-controls/number-field","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","02-components/form-controls/number-field","c"],{"children":["__PAGE__?{\"slug\":[\"02-components\",\"form-controls\",\"number-field\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","02-components/form-controls/number-field","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: "
import Modal, {
+  ModalTrigger,
+} from "@mittwald/flow-react-components/Modal";
+import Content from "@mittwald/flow-react-components/Content";
+import Text from "@mittwald/flow-react-components/Text";
+import TextField from "@mittwald/flow-react-components/TextField";
+import Label from "@mittwald/flow-react-components/Label";
+import ButtonGroup from "@mittwald/flow-react-components/ButtonGroup";
+import Button from "@mittwald/flow-react-components/Button";
+import Heading from "@mittwald/flow-react-components/Heading";
+
+<ModalTrigger>
+  <Button variant="accent">Create customer</Button>
+  <Modal>
+    {({ close }) => (
+      <>
+        <Heading>New Customer</Heading>
+        <Content>
+          <Text>
+            Create a new customer to manage your projects,
+            members and payments.
+          </Text>
+          <TextField>
+            <Label>Customer name</Label>
+          </TextField>
+        </Content>
+        <ButtonGroup>
+          <Button variant="accent" onPress={close}>
+            Create customer
+          </Button>
+          <Button
+            style="soft"
+            variant="secondary"
+            onPress={close}
+          >
+            Abort
+          </Button>
+        </ButtonGroup>
+      </>
+    )}
+  </Modal>
+</ModalTrigger>;
+
\ No newline at end of file diff --git a/docs/badge/02-components/overlays/modal.txt b/docs/badge/02-components/overlays/modal.txt new file mode 100644 index 0000000000..bca9983b8b --- /dev/null +++ b/docs/badge/02-components/overlays/modal.txt @@ -0,0 +1,2757 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","02-components/overlays/modal","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","02-components/overlays/modal","c"],{"children":["__PAGE__?{\"slug\":[\"02-components\",\"overlays\",\"modal\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","02-components/overlays/modal","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: "
import Tooltip, {
+  TooltipTrigger,
+} from "@mittwald/flow-react-components/Tooltip";
+import Button from "@mittwald/flow-react-components/Button";
+import { IconCopy } from "@mittwald/flow-react-components/Icons";
+
+<TooltipTrigger>
+  <Button aria-label="save">
+    <IconCopy />
+  </Button>
+  <Tooltip>Save</Tooltip>
+</TooltipTrigger>;
+
\ No newline at end of file diff --git a/docs/badge/02-components/overlays/tooltip.txt b/docs/badge/02-components/overlays/tooltip.txt new file mode 100644 index 0000000000..b6392a53a6 --- /dev/null +++ b/docs/badge/02-components/overlays/tooltip.txt @@ -0,0 +1,2709 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","02-components/overlays/tooltip","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","02-components/overlays/tooltip","c"],{"children":["__PAGE__?{\"slug\":[\"02-components\",\"overlays\",\"tooltip\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","02-components/overlays/tooltip","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: "
import {
+  List,
+  ListItemView,
+  ListStaticData,
+} from "@mittwald/flow-react-components/List";
+import {
+  type User,
+  users,
+} from "@/content/02-components/structure/list/examples/userApi";
+
+<List>
+  <ListStaticData data={users} />
+  <ListItemView<User>>
+    {(user) => (
+      <>
+        {user.name.first} {user.name.last}
+      </>
+    )}
+  </ListItemView>
+</List>;
+
\ No newline at end of file diff --git a/docs/badge/02-components/structure/list.txt b/docs/badge/02-components/structure/list.txt new file mode 100644 index 0000000000..b368511c2e --- /dev/null +++ b/docs/badge/02-components/structure/list.txt @@ -0,0 +1,2709 @@ +3:I[94152,[],""] +5:I[662855,[],""] +4:["slug","02-components/structure/list","c"] +0:["wG7dSsx2iQ5rsPcZLZ8xc",[[["",{"children":[["slug","02-components/structure/list","c"],{"children":["__PAGE__?{\"slug\":[\"02-components\",\"structure\",\"list\"]}",{}]}]},"$undefined","$undefined",true],["",{"children":[["slug","02-components/structure/list","c"],{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","$4","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/b7476877dd2c8a04.css","precedence":"next","crossOrigin":""}]]}]]},[null,"$L6",null]],[[["$","link","0",{"rel":"stylesheet","href":"/flow-previews/docs/badge/_next/static/css/1de2f7839b9cf19e.css","precedence":"next","crossOrigin":""}]],"$L7"]]]] +8:I[433702,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +9:I[499656,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +a:I[414009,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +b:I[102652,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2d:I[371536,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +2e:I[489373,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","553","static/chunks/553-eec603ad851c1f3a.js","985","static/chunks/985-dc04f245b69b64b8.js","185","static/chunks/app/layout-ad5f8a570bb58345.js"],""] +e6:I[127875,["384","static/chunks/3ceb1ae0-b38747a08ab44079.js","802","static/chunks/d709487a-0b33f1540d9dc41a.js","553","static/chunks/553-eec603ad851c1f3a.js","530","static/chunks/530-d26691cd436c7330.js","877","static/chunks/app/%5B...slug%5D/page-9b68a4d443ec09be.js"],""] +c:Tb4f,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + strong: "strong", + h2: "h2", + code: "code", + pre: "pre" + }, _provideComponents(), props.components), {InlineAlert, Heading, Content} = _components; + if (!Content) _missingMdxReference("Content", true); + if (!Heading) _missingMdxReference("Heading", true); + if (!InlineAlert) _missingMdxReference("InlineAlert", true); + return _jsxs(_Fragment, { + children: [_jsxs(InlineAlert, { + children: [_jsx(Heading, { + children: "Early development & stability notice" + }), _jsx(Content, { + children: _jsxs(_components.p, { + children: ["This project is in ", _jsx(_components.strong, { + children: "early development" + }), " stage, and we do not offer any\nstability guarantees of any kind. We welcome you to give this project a try\nand we're looking forward for any feedback on this project in this stage of\ndevelopment. However, please do not rely on any inputs or outputs of this\nproject to remain stable."] + }) + })] + }), "\n", _jsx(_components.h2, { + children: "Installing the Flow React Component Library" + }), "\n", _jsxs(_components.p, { + children: ["The Flow React Component Library can be installed using a package manager like\n", _jsx(_components.code, { + children: "npm" + }), " or ", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + className: "language-shell", + children: "yarn add @mittwald/flow-react-components\n" + }) + }), "\n", _jsx(_components.p, { + children: "All components are available in this one package for ease of dependency\nmanagement." + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-react-components/styles\";\n" + }) + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +d:T1659,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + p: "p", + h2: "h2", + code: "code", + pre: "pre", + h3: "h3", + h4: "h4", + strong: "strong" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.p, { + children: "The Flow Component libraries are styled by a shared stylesheet, that can also be\nused standalone. This might be useful if you want to use your own framework to\nbuild components following the mittwald styling guidelines." + }), "\n", _jsx(_components.p, { + children: "On this page you can find information about how to install the stylesheet and\nhow the classnames are structured." + }), "\n", _jsx(_components.h2, { + children: "Install the standalone stylesheet" + }), "\n", _jsxs(_components.p, { + children: ["At this point of development you can only get the stylesheet via NPM. The Flow\nStylesheet Library can be installed using a package manager like ", _jsx(_components.code, { + children: "npm" + }), " or\n", _jsx(_components.code, { + children: "yarn" + }), "."] + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "yarn add @mittwald/flow-stylesheet\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Import styles" + }), "\n", _jsx(_components.p, { + children: "You have to import the bundled stylesheet in order to get the correct component\nstyles. Add this line to your project's entry point." + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: "import \"@mittwald/flow-stylesheet/css\";\n" + }) + }), "\n", _jsx(_components.h2, { + children: "Using the stylesheet" + }), "\n", _jsx(_components.p, { + children: "If you want to get started, you should probably learn how the class names are\nstructured. The class names provided in this stylesheet are following a\nconsistent, component-based and easy to understand schema." + }), "\n", _jsx(_components.h3, { + children: "General class name notation" + }), "\n", _jsxs(_components.p, { + children: ["The class names are all in lowercase and using ", _jsx(_components.code, { + children: "-" + }), " to separate words and ", _jsx(_components.code, { + children: "--" + }), " to\nseparate logical sections."] + }), "\n", _jsxs(_components.p, { + children: ["The first logical section is always the ", _jsx(_components.code, { + children: "flow" + }), " namespace. Other sections might\nbe:"] + }), "\n", _jsx(_components.h4, { + children: "Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button\n.flow--heading\n.flow--status-icon\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Sub-Components" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--navigation\n.flow--navigation--navigation-item\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: different variants" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--primary\n.flow--inline-alert--danger\n.flow--icon--fixed-width\n" + }) + }), "\n", _jsx(_components.h4, { + children: "Specialization: components aligned in a composition" + }), "\n", _jsx(_components.pre, { + children: _jsx(_components.code, { + children: ".flow--button--icon\n.flow--inline-alert--status-icon\n" + }) + }), "\n", _jsx(_components.h3, { + children: "A note to specialization" + }), "\n", _jsxs(_components.p, { + children: ["Class Names used to specialize a basic component must always be used in\n", _jsx(_components.strong, { + children: "addition to the basic class name" + }), ". Here are some examples that illustrate\nthis requirement."] + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h4, { + children: "Combined variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "multiple-variants" + }), "\n", _jsx(_components.h4, { + children: "Components aligned in a composition" + }), "\n", _jsxs(_components.p, { + children: ["It is a common practice to compose larger components out of already existing\nsmaller ones. Take the Inline Alert example. The Inline Alert is composed out of\nan icon, a heading and some optional content. These contained components must\nhave their basic class name (", _jsx(_components.code, { + children: "flow--icon" + }), "), to get their basic styling and the\nspecialization class name (", _jsx(_components.code, { + children: "flow--inline-alert--status-icon" + }), ") to get the Inline\nAlert specific styles."] + }), "\n", _jsx(LiveCodeEditor, { + example: "composition" + })] + }); +} +function MDXContent(props = {}) { + const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components); + return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, { + children: _jsx(_createMdxContent, props) + })) : _createMdxContent(props); +} +return { + default: MDXContent +}; +function _missingMdxReference(id, component) { + throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it."); +} +e:Ta54,/*@jsxRuntime automatic @jsxImportSource react*/ +const {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0]; +const {useMDXComponents: _provideComponents} = arguments[0]; +function _createMdxContent(props) { + const _components = Object.assign({ + h2: "h2", + p: "p", + code: "code", + h3: "h3" + }, _provideComponents(), props.components), {LiveCodeEditor} = _components; + if (!LiveCodeEditor) _missingMdxReference("LiveCodeEditor", true); + return _jsxs(_Fragment, { + children: [_jsx(_components.h2, { + children: "Example" + }), "\n", _jsx(LiveCodeEditor, {}), "\n", _jsx(_components.h2, { + children: "Different variants" + }), "\n", _jsx(LiveCodeEditor, { + example: "variants" + }), "\n", _jsx(_components.h2, { + children: "Plain style" + }), "\n", _jsx(LiveCodeEditor, { + example: "plain" + }), "\n", _jsx(_components.h2, { + children: "Soft style" + }), "\n", _jsx(LiveCodeEditor, { + example: "soft" + }), "\n", _jsx(_components.h2, { + children: "With icon" + }), "\n", _jsxs(_components.p, { + children: ["Use the ", _jsx(_components.code, { + children: "" + }), " inside a ", _jsx(_components.code, { + children: "