-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7801592
Showing
134 changed files
with
887 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
_next/data/nl8rHUDGFFqSU1G7VDNVC/docs/basic/feature/chakra-factory.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"pageProps":{"doc":{"title":"Chakra Factory","body":{"raw":"\n# Chakra Factory\n","code":"var Component=(()=>{var u=Object.create;var r=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var d=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),l=(t,n)=>{for(var e in n)r(t,e,{get:n[e],enumerable:!0})},s=(t,n,e,a)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let o of f(n))!_.call(t,o)&&o!==e&&r(t,o,{get:()=>n[o],enumerable:!(a=x(n,o))||a.enumerable});return t};var C=(t,n,e)=>(e=t!=null?u(j(t)):{},s(n||!t||!t.__esModule?r(e,\"default\",{value:t,enumerable:!0}):e,t)),p=t=>s(r({},\"__esModule\",{value:!0}),t);var h=d((D,i)=>{i.exports=_jsx_runtime});var g={};l(g,{default:()=>b,frontmatter:()=>y});var c=C(h()),y={title:\"Chakra Factory\"};function m(t){let n=Object.assign({h1:\"h1\"},t.components);return(0,c.jsx)(n.h1,{children:\"Chakra Factory\"})}function M(t={}){let{wrapper:n}=t.components||{};return n?(0,c.jsx)(n,Object.assign({},t,{children:(0,c.jsx)(m,t)})):m(t)}var b=M;return p(g);})();\n;return Component;"},"_id":"docs/basic/feature/chakra-factory.mdx","_raw":{"sourceFilePath":"docs/basic/feature/chakra-factory.mdx","sourceFileName":"chakra-factory.mdx","sourceFileDir":"docs/basic/feature","contentType":"mdx","flattenedPath":"docs/basic/feature/chakra-factory"},"type":"Doc","slug":"/docs/basic/feature/chakra-factory"}},"__N_SSG":true} |
1 change: 1 addition & 0 deletions
1
_next/data/nl8rHUDGFFqSU1G7VDNVC/docs/basic/feature/color-mode.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"pageProps":{"doc":{"title":"Color Mode","body":{"raw":"\n# Color Mode\n","code":"var Component=(()=>{var x=Object.create;var r=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var j=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),M=(t,n)=>{for(var e in n)r(t,e,{get:n[e],enumerable:!0})},i=(t,n,e,s)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let o of l(n))!h.call(t,o)&&o!==e&&r(t,o,{get:()=>n[o],enumerable:!(s=d(n,o))||s.enumerable});return t};var _=(t,n,e)=>(e=t!=null?x(f(t)):{},i(n||!t||!t.__esModule?r(e,\"default\",{value:t,enumerable:!0}):e,t)),C=t=>i(r({},\"__esModule\",{value:!0}),t);var m=j((X,a)=>{a.exports=_jsx_runtime});var D={};M(D,{default:()=>g,frontmatter:()=>p});var c=_(m()),p={title:\"Color Mode\"};function u(t){let n=Object.assign({h1:\"h1\"},t.components);return(0,c.jsx)(n.h1,{children:\"Color Mode\"})}function b(t={}){let{wrapper:n}=t.components||{};return n?(0,c.jsx)(n,Object.assign({},t,{children:(0,c.jsx)(u,t)})):u(t)}var g=b;return C(D);})();\n;return Component;"},"_id":"docs/basic/feature/color-mode.mdx","_raw":{"sourceFilePath":"docs/basic/feature/color-mode.mdx","sourceFileName":"color-mode.mdx","sourceFileDir":"docs/basic/feature","contentType":"mdx","flattenedPath":"docs/basic/feature/color-mode"},"type":"Doc","slug":"/docs/basic/feature/color-mode"}},"__N_SSG":true} |
1 change: 1 addition & 0 deletions
1
_next/data/nl8rHUDGFFqSU1G7VDNVC/docs/basic/feature/global-styles.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"pageProps":{"doc":{"title":"Global Styles","body":{"raw":"\n# Global Styles\n","code":"var Component=(()=>{var u=Object.create;var r=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var _=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),b=(t,n)=>{for(var e in n)r(t,e,{get:n[e],enumerable:!0})},a=(t,n,e,c)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let o of f(n))!j.call(t,o)&&o!==e&&r(t,o,{get:()=>n[o],enumerable:!(c=x(n,o))||c.enumerable});return t};var d=(t,n,e)=>(e=t!=null?u(h(t)):{},a(n||!t||!t.__esModule?r(e,\"default\",{value:t,enumerable:!0}):e,t)),p=t=>a(r({},\"__esModule\",{value:!0}),t);var i=_((G,l)=>{l.exports=_jsx_runtime});var C={};b(C,{default:()=>g,frontmatter:()=>y});var s=d(i()),y={title:\"Global Styles\"};function m(t){let n=Object.assign({h1:\"h1\"},t.components);return(0,s.jsx)(n.h1,{children:\"Global Styles\"})}function M(t={}){let{wrapper:n}=t.components||{};return n?(0,s.jsx)(n,Object.assign({},t,{children:(0,s.jsx)(m,t)})):m(t)}var g=M;return p(C);})();\n;return Component;"},"_id":"docs/basic/feature/global-styles.mdx","_raw":{"sourceFilePath":"docs/basic/feature/global-styles.mdx","sourceFileName":"global-styles.mdx","sourceFileDir":"docs/basic/feature","contentType":"mdx","flattenedPath":"docs/basic/feature/global-styles"},"type":"Doc","slug":"/docs/basic/feature/global-styles"}},"__N_SSG":true} |
1 change: 1 addition & 0 deletions
1
_next/data/nl8rHUDGFFqSU1G7VDNVC/docs/basic/feature/responsive-styles.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"pageProps":{"doc":{"title":"Responsive Styles","body":{"raw":"\n# Responsive Styles\n","code":"var Component=(()=>{var x=Object.create;var s=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),_=(t,e)=>{for(var n in e)s(t,n,{get:e[n],enumerable:!0})},i=(t,e,n,c)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let o of f(e))!j.call(t,o)&&o!==n&&s(t,o,{get:()=>e[o],enumerable:!(c=l(e,o))||c.enumerable});return t};var d=(t,e,n)=>(n=t!=null?x(h(t)):{},i(e||!t||!t.__esModule?s(n,\"default\",{value:t,enumerable:!0}):n,t)),y=t=>i(s({},\"__esModule\",{value:!0}),t);var m=p((D,a)=>{a.exports=_jsx_runtime});var v={};_(v,{default:()=>g,frontmatter:()=>M});var r=d(m()),M={title:\"Responsive Styles\"};function u(t){let e=Object.assign({h1:\"h1\"},t.components);return(0,r.jsx)(e.h1,{children:\"Responsive Styles\"})}function b(t={}){let{wrapper:e}=t.components||{};return e?(0,r.jsx)(e,Object.assign({},t,{children:(0,r.jsx)(u,t)})):u(t)}var g=b;return y(v);})();\n;return Component;"},"_id":"docs/basic/feature/responsive-styles.mdx","_raw":{"sourceFilePath":"docs/basic/feature/responsive-styles.mdx","sourceFileName":"responsive-styles.mdx","sourceFileDir":"docs/basic/feature","contentType":"mdx","flattenedPath":"docs/basic/feature/responsive-styles"},"type":"Doc","slug":"/docs/basic/feature/responsive-styles"}},"__N_SSG":true} |
1 change: 1 addition & 0 deletions
1
_next/data/nl8rHUDGFFqSU1G7VDNVC/docs/basic/feature/style-props.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"pageProps":{"doc":{"title":"Style Props","body":{"raw":"\n# Style Props\n","code":"var Component=(()=>{var x=Object.create;var r=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var p=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),_=(t,n)=>{for(var e in n)r(t,e,{get:n[e],enumerable:!0})},i=(t,n,e,c)=>{if(n&&typeof n==\"object\"||typeof n==\"function\")for(let o of f(n))!j.call(t,o)&&o!==e&&r(t,o,{get:()=>n[o],enumerable:!(c=l(n,o))||c.enumerable});return t};var d=(t,n,e)=>(e=t!=null?x(h(t)):{},i(n||!t||!t.__esModule?r(e,\"default\",{value:t,enumerable:!0}):e,t)),y=t=>i(r({},\"__esModule\",{value:!0}),t);var m=p((O,a)=>{a.exports=_jsx_runtime});var C={};_(C,{default:()=>g,frontmatter:()=>M});var s=d(m()),M={title:\"Style Props\"};function u(t){let n=Object.assign({h1:\"h1\"},t.components);return(0,s.jsx)(n.h1,{children:\"Style Props\"})}function b(t={}){let{wrapper:n}=t.components||{};return n?(0,s.jsx)(n,Object.assign({},t,{children:(0,s.jsx)(u,t)})):u(t)}var g=b;return y(C);})();\n;return Component;"},"_id":"docs/basic/feature/style-props.mdx","_raw":{"sourceFilePath":"docs/basic/feature/style-props.mdx","sourceFileName":"style-props.mdx","sourceFileDir":"docs/basic/feature","contentType":"mdx","flattenedPath":"docs/basic/feature/style-props"},"type":"Doc","slug":"/docs/basic/feature/style-props"}},"__N_SSG":true} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"pageProps":{"doc":{"title":"Quick Start","body":{"raw":"\n# Quick Start\n\n## Examples\n\n- [Basic Usage](https://github.com/node-real/tote/tree/master/examples/uikit-basic)\n- [Next.js](https://github.com/node-real/tote/tree/master/examples/uikit-next)\n\n## Notice\n\nTo use UIKit, the React version should be in the range `>=16.8 and <18`, we recommend `v17`.\n\n## Installation\n\nIn your React project, install UIKit by running the following:\n\n```bash\nnpm i @totejs/uikit @emotion/react@^11 @emotion/styled@^11 framer-motion@^6\n```\n\nTo use icons, just install as follow:\n\n```bash\nnpm i @totejs/icons\n```\n","code":"var Component=(()=>{var d=Object.create;var c=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var p=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),j=(t,e)=>{for(var i in e)c(t,i,{get:e[i],enumerable:!0})},l=(t,e,i,o)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let r of u(e))!g.call(t,r)&&r!==i&&c(t,r,{get:()=>e[r],enumerable:!(o=m(e,r))||o.enumerable});return t};var f=(t,e,i)=>(i=t!=null?d(p(t)):{},l(e||!t||!t.__esModule?c(i,\"default\",{value:t,enumerable:!0}):i,t)),b=t=>l(c({},\"__esModule\",{value:!0}),t);var s=x((N,a)=>{a.exports=_jsx_runtime});var y={};j(y,{default:()=>w,frontmatter:()=>_});var n=f(s()),_={title:\"Quick Start\"};function h(t){let e=Object.assign({h1:\"h1\",h2:\"h2\",ul:\"ul\",li:\"li\",a:\"a\",p:\"p\",code:\"code\",pre:\"pre\"},t.components);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.h1,{children:\"Quick Start\"}),`\n`,(0,n.jsx)(e.h2,{children:\"Examples\"}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:\"https://github.com/node-real/tote/tree/master/examples/uikit-basic\",children:\"Basic Usage\"})}),`\n`,(0,n.jsx)(e.li,{children:(0,n.jsx)(e.a,{href:\"https://github.com/node-real/tote/tree/master/examples/uikit-next\",children:\"Next.js\"})}),`\n`]}),`\n`,(0,n.jsx)(e.h2,{children:\"Notice\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"To use UIKit, the React version should be in the range \",(0,n.jsx)(e.code,{children:\">=16.8 and <18\"}),\", we recommend \",(0,n.jsx)(e.code,{children:\"v17\"}),\".\"]}),`\n`,(0,n.jsx)(e.h2,{children:\"Installation\"}),`\n`,(0,n.jsx)(e.p,{children:\"In your React project, install UIKit by running the following:\"}),`\n`,(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:\"language-bash\",children:`npm i @totejs/uikit @emotion/react@^11 @emotion/styled@^11 framer-motion@^6\n`})}),`\n`,(0,n.jsx)(e.p,{children:\"To use icons, just install as follow:\"}),`\n`,(0,n.jsx)(e.pre,{children:(0,n.jsx)(e.code,{className:\"language-bash\",children:`npm i @totejs/icons\n`})})]})}function k(t={}){let{wrapper:e}=t.components||{};return e?(0,n.jsx)(e,Object.assign({},t,{children:(0,n.jsx)(h,t)})):h(t)}var w=k;return b(y);})();\n;return Component;"},"_id":"docs/basic/quick-start.mdx","_raw":{"sourceFilePath":"docs/basic/quick-start.mdx","sourceFileName":"quick-start.mdx","sourceFileDir":"docs/basic","contentType":"mdx","flattenedPath":"docs/basic/quick-start"},"type":"Doc","slug":"/docs/basic/quick-start"}},"__N_SSG":true} |
1 change: 1 addition & 0 deletions
1
_next/data/nl8rHUDGFFqSU1G7VDNVC/docs/basic/theming/customize-theme.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"pageProps":{"doc":{"title":"Customize Theme","body":{"raw":"\n# Customize Theme\n","code":"var Component=(()=>{var h=Object.create;var r=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var d=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),l=(t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})},i=(t,e,n,c)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let o of f(e))!_.call(t,o)&&o!==n&&r(t,o,{get:()=>e[o],enumerable:!(c=x(e,o))||c.enumerable});return t};var C=(t,e,n)=>(n=t!=null?h(j(t)):{},i(e||!t||!t.__esModule?r(n,\"default\",{value:t,enumerable:!0}):n,t)),p=t=>i(r({},\"__esModule\",{value:!0}),t);var u=d((O,m)=>{m.exports=_jsx_runtime});var z={};l(z,{default:()=>g,frontmatter:()=>M});var s=C(u()),M={title:\"Customize Theme\"};function a(t){let e=Object.assign({h1:\"h1\"},t.components);return(0,s.jsx)(e.h1,{children:\"Customize Theme\"})}function b(t={}){let{wrapper:e}=t.components||{};return e?(0,s.jsx)(e,Object.assign({},t,{children:(0,s.jsx)(a,t)})):a(t)}var g=b;return p(z);})();\n;return Component;"},"_id":"docs/basic/theming/customize-theme.mdx","_raw":{"sourceFilePath":"docs/basic/theming/customize-theme.mdx","sourceFileName":"customize-theme.mdx","sourceFileDir":"docs/basic/theming","contentType":"mdx","flattenedPath":"docs/basic/theming/customize-theme"},"type":"Doc","slug":"/docs/basic/theming/customize-theme"}},"__N_SSG":true} |
1 change: 1 addition & 0 deletions
1
_next/data/nl8rHUDGFFqSU1G7VDNVC/docs/basic/theming/default-theme.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"pageProps":{"doc":{"title":"Default Theme","body":{"raw":"\n# Default Theme\n","code":"var Component=(()=>{var f=Object.create;var r=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),d=(t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})},a=(t,e,n,s)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let o of x(e))!j.call(t,o)&&o!==n&&r(t,o,{get:()=>e[o],enumerable:!(s=h(e,o))||s.enumerable});return t};var D=(t,e,n)=>(n=t!=null?f(l(t)):{},a(e||!t||!t.__esModule?r(n,\"default\",{value:t,enumerable:!0}):n,t)),p=t=>a(r({},\"__esModule\",{value:!0}),t);var m=_((T,i)=>{i.exports=_jsx_runtime});var C={};d(C,{default:()=>g,frontmatter:()=>M});var c=D(m()),M={title:\"Default Theme\"};function u(t){let e=Object.assign({h1:\"h1\"},t.components);return(0,c.jsx)(e.h1,{children:\"Default Theme\"})}function b(t={}){let{wrapper:e}=t.components||{};return e?(0,c.jsx)(e,Object.assign({},t,{children:(0,c.jsx)(u,t)})):u(t)}var g=b;return p(C);})();\n;return Component;"},"_id":"docs/basic/theming/default-theme.mdx","_raw":{"sourceFilePath":"docs/basic/theming/default-theme.mdx","sourceFileName":"default-theme.mdx","sourceFileDir":"docs/basic/theming","contentType":"mdx","flattenedPath":"docs/basic/theming/default-theme"},"type":"Doc","slug":"/docs/basic/theming/default-theme"}},"__N_SSG":true} |
1 change: 1 addition & 0 deletions
1
_next/data/nl8rHUDGFFqSU1G7VDNVC/docs/components/animation/collapse.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"pageProps":{"doc":{"title":"Collapse","body":{"raw":"\n# Collapse\n\n## Import\n\n```jsx live=false\nimport { Collapse } from '@totejs/uikit';\n```\n\n## Usage\n\n### Collapse transition\n\n```jsx\nfunction CollapseEx() {\n const { isOpen, onToggle } = useDisclosure();\n\n return (\n <>\n <Button onClick={onToggle}>Click Me</Button>\n <Collapse in={isOpen} animateOpacity>\n <Box\n p={40}\n color=\"white\"\n mt=\"12\"\n bg=\"scene.success.normal\"\n borderRadius={8}\n >\n Some Text\n </Box>\n </Collapse>\n </>\n );\n}\n```\n\n### Changing the startingHeight\n\n```jsx\nfunction Example() {\n const [show, setShow] = React.useState(false);\n\n const handleToggle = () => setShow(!show);\n\n return (\n <>\n <Collapse startingHeight={20} in={show}>\n Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus\n terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer\n labore wes anderson cred nesciunt sapiente ea proident.\n </Collapse>\n <Button onClick={handleToggle} mt={12}>\n Show {show ? 'Less' : 'More'}\n </Button>\n </>\n );\n}\n```\n\n## Props\n\n<PropsTable\n data={[\n {\n name: 'in',\n required: false,\n type: 'boolean',\n default: '',\n desc: 'Show the component; triggers when enter or exit states',\n },\n {\n name: 'unmountOnExit',\n required: false,\n type: 'boolean',\n default: false,\n desc: 'If true, the element will unmount when `in={false}` and animation is done',\n },\n {\n name: 'animateOpacity',\n required: false,\n type: 'boolean',\n default: true,\n desc: 'If true, the opacity of the content will be animated',\n },\n {\n name: 'endingHeight',\n required: false,\n type: 'string | number',\n default: 'auto',\n desc: 'The height you want the content in its expanded state.',\n },\n {\n name: 'startingHeight',\n required: false,\n type: 'string | number',\n default: 0,\n desc: 'The height you want the content in its collapsed state.',\n },\n ]}\n/>\n","code":"var Component=(()=>{var d=Object.create;var s=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var f=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),x=(n,e)=>{for(var o in e)s(n,o,{get:e[o],enumerable:!0})},r=(n,e,o,i)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let a of p(e))!g.call(n,a)&&a!==o&&s(n,a,{get:()=>e[a],enumerable:!(i=u(e,a))||i.enumerable});return n};var w=(n,e,o)=>(o=n!=null?d(m(n)):{},r(e||!n||!n.__esModule?s(o,\"default\",{value:n,enumerable:!0}):o,n)),b=n=>r(s({},\"__esModule\",{value:!0}),n);var c=f((k,l)=>{l.exports=_jsx_runtime});var _={};x(_,{default:()=>j,frontmatter:()=>y});var t=w(c()),y={title:\"Collapse\"};function h(n){let e=Object.assign({h1:\"h1\",h2:\"h2\",pre:\"pre\",code:\"code\",h3:\"h3\"},n.components),{PropsTable:o}=e;return o||T(\"PropsTable\",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.h1,{children:\"Collapse\"}),`\n`,(0,t.jsx)(e.h2,{children:\"Import\"}),`\n`,(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:\"language-jsx\",live:\"false\",children:`import { Collapse } from '@totejs/uikit';\n`})}),`\n`,(0,t.jsx)(e.h2,{children:\"Usage\"}),`\n`,(0,t.jsx)(e.h3,{children:\"Collapse transition\"}),`\n`,(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:\"language-jsx\",children:`function CollapseEx() {\n const { isOpen, onToggle } = useDisclosure();\n\n return (\n <>\n <Button onClick={onToggle}>Click Me</Button>\n <Collapse in={isOpen} animateOpacity>\n <Box\n p={40}\n color=\"white\"\n mt=\"12\"\n bg=\"scene.success.normal\"\n borderRadius={8}\n >\n Some Text\n </Box>\n </Collapse>\n </>\n );\n}\n`})}),`\n`,(0,t.jsx)(e.h3,{children:\"Changing the startingHeight\"}),`\n`,(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:\"language-jsx\",children:`function Example() {\n const [show, setShow] = React.useState(false);\n\n const handleToggle = () => setShow(!show);\n\n return (\n <>\n <Collapse startingHeight={20} in={show}>\n Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus\n terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer\n labore wes anderson cred nesciunt sapiente ea proident.\n </Collapse>\n <Button onClick={handleToggle} mt={12}>\n Show {show ? 'Less' : 'More'}\n </Button>\n </>\n );\n}\n`})}),`\n`,(0,t.jsx)(e.h2,{children:\"Props\"}),`\n`,(0,t.jsx)(o,{data:[{name:\"in\",required:!1,type:\"boolean\",default:\"\",desc:\"Show the component; triggers when enter or exit states\"},{name:\"unmountOnExit\",required:!1,type:\"boolean\",default:!1,desc:\"If true, the element will unmount when `in={false}` and animation is done\"},{name:\"animateOpacity\",required:!1,type:\"boolean\",default:!0,desc:\"If true, the opacity of the content will be animated\"},{name:\"endingHeight\",required:!1,type:\"string | number\",default:\"auto\",desc:\"The height you want the content in its expanded state.\"},{name:\"startingHeight\",required:!1,type:\"string | number\",default:0,desc:\"The height you want the content in its collapsed state.\"}]})]})}function C(n={}){let{wrapper:e}=n.components||{};return e?(0,t.jsx)(e,Object.assign({},n,{children:(0,t.jsx)(h,n)})):h(n)}var j=C;function T(n,e){throw new Error(\"Expected \"+(e?\"component\":\"object\")+\" `\"+n+\"` to be defined: you likely forgot to import, pass, or provide it.\")}return b(_);})();\n;return Component;"},"_id":"docs/components/animation/collapse.mdx","_raw":{"sourceFilePath":"docs/components/animation/collapse.mdx","sourceFileName":"collapse.mdx","sourceFileDir":"docs/components/animation","contentType":"mdx","flattenedPath":"docs/components/animation/collapse"},"type":"Doc","slug":"/docs/components/animation/collapse"}},"__N_SSG":true} |
Oops, something went wrong.