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: "