@xyd-js/storybook 0.0.1-build.167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +40 -0
- package/.storybook/manager-head.html +6 -0
- package/.storybook/manager.ts +18 -0
- package/.storybook/preview.ts +40 -0
- package/.storybook/styles.css +5 -0
- package/.storybook/theme.ts +34 -0
- package/CHANGELOG.md +2357 -0
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/eslint.config.js +28 -0
- package/package.json +61 -0
- package/public/logo.svg +10 -0
- package/src/__fixtures__/Icons.tsx +83 -0
- package/src/__fixtures__/atlas-index/package-index.mdx +194 -0
- package/src/__fixtures__/atlas-index/wip1.mdx +131 -0
- package/src/__fixtures__/atlas-index.mdx +53 -0
- package/src/__fixtures__/code-sample.mdx +15 -0
- package/src/__fixtures__/example-source-uniform.ts +41 -0
- package/src/__fixtures__/hello-world.mdx +116 -0
- package/src/components/DemoDocs.tsx +235 -0
- package/src/components/logo.tsx +37 -0
- package/src/decorators/DocsTemplate.tsx +101 -0
- package/src/docs/atlas/Atlas.stories.tsx +51 -0
- package/src/docs/atlas/todo-app.uniform.json +625 -0
- package/src/docs/atlas/uniform-to-references.ts +101 -0
- package/src/docs/components/coder/CodeSample.stories.tsx +29 -0
- package/src/docs/components/pages/PageBlogHome.stories.tsx +52 -0
- package/src/docs/components/pages/PageFirstSlide.stories.tsx +124 -0
- package/src/docs/components/pages/PageHome.stories.tsx +127 -0
- package/src/docs/components/system/Baseline.stories.tsx +126 -0
- package/src/docs/components/writer/Badge.stories.tsx +132 -0
- package/src/docs/components/writer/Banner.stories.tsx +394 -0
- package/src/docs/components/writer/Blockquote.stories.tsx +415 -0
- package/src/docs/components/writer/Breadcrumbs.stories.tsx +282 -0
- package/src/docs/components/writer/Button.stories.tsx +405 -0
- package/src/docs/components/writer/Callout.stories.tsx +183 -0
- package/src/docs/components/writer/Card.stories.tsx +457 -0
- package/src/docs/components/writer/ColorSchemeButton.stories.tsx +322 -0
- package/src/docs/components/writer/Details.stories.tsx +333 -0
- package/src/docs/components/writer/GuideCard.stories.tsx +384 -0
- package/src/docs/components/writer/Heading.stories.tsx +379 -0
- package/src/docs/components/writer/Hr.stories.tsx +325 -0
- package/src/docs/components/writer/IconSocial.stories.tsx +591 -0
- package/src/docs/components/writer/Image.stories.tsx +430 -0
- package/src/docs/components/writer/List.stories.tsx +479 -0
- package/src/docs/components/writer/NavLinks.stories.tsx +380 -0
- package/src/docs/components/writer/Pre.stories.tsx +23 -0
- package/src/docs/components/writer/Steps.stories.tsx +914 -0
- package/src/docs/components/writer/Table.stories.tsx +608 -0
- package/src/docs/components/writer/Tabs.stories.tsx +760 -0
- package/src/docs/components/writer/TocCard.stories.tsx +407 -0
- package/src/docs/components/writer/Update.stories.tsx +457 -0
- package/src/docs/components/writer/VideoGuide.stories.tsx +17 -0
- package/src/docs/templates/CodeSample.stories.tsx +15 -0
- package/src/docs/themes/TODO.md +1 -0
- package/src/docs/themes/logo.tsx +37 -0
- package/src/docs/themes/themes.stories.tsx +269 -0
- package/src/docs/ui/Nav.stories.tsx +58 -0
- package/src/docs/ui/Sidebar.stories.tsx +167 -0
- package/src/docs/ui/SubNav.stories.tsx +29 -0
- package/src/utils/mdx.ts +31 -0
- package/storybook-static/assets/Atlas.stories-B3Ix52TV.js +153 -0
- package/storybook-static/assets/Badge.stories-D3nfVAAW.js +84 -0
- package/storybook-static/assets/Banner.stories-BHLs2WlR.js +394 -0
- package/storybook-static/assets/Baseline.stories-Bwx2zF_U.js +103 -0
- package/storybook-static/assets/Blockquote.stories-Cxf9fDVo.js +468 -0
- package/storybook-static/assets/Breadcrumbs.stories-CFjDJvdh.js +219 -0
- package/storybook-static/assets/Button-Cj99tk5U-Cn0Wrqkw.js +3 -0
- package/storybook-static/assets/Button.stories-DUfQIyn7.js +472 -0
- package/storybook-static/assets/Callout.stories-CIQWommc.js +134 -0
- package/storybook-static/assets/Card.stories-0mJDPE-f.js +278 -0
- package/storybook-static/assets/CodeSample.stories-1k1_b2U_.js +8 -0
- package/storybook-static/assets/CodeSample.stories-BEAQ3H6A.js +22 -0
- package/storybook-static/assets/Color-YHDXOIA2-BAq_yxd2.js +1 -0
- package/storybook-static/assets/ColorSchemeButton.stories-C1yuuA8O.js +384 -0
- package/storybook-static/assets/Details.stories-BacIPYUH.js +290 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-BwJiFRuq.js +575 -0
- package/storybook-static/assets/DocsTemplate-B8_ZAKIZ.js +16 -0
- package/storybook-static/assets/GuideCard.stories-IJbjW-xe.js +253 -0
- package/storybook-static/assets/Heading.stories-C9rBwnlZ.js +337 -0
- package/storybook-static/assets/Hr.stories-bgwD4mmY.js +351 -0
- package/storybook-static/assets/IconSocial.stories-Bv3u90GB.js +715 -0
- package/storybook-static/assets/Icons-CjNNbMNR.js +1 -0
- package/storybook-static/assets/Image.stories-BlrJ8Th7.js +349 -0
- package/storybook-static/assets/List.stories-mzy4ZAGg.js +513 -0
- package/storybook-static/assets/Nav.stories-CZhCHFlj.js +13 -0
- package/storybook-static/assets/NavLinks.stories-DuFRhZLh.js +359 -0
- package/storybook-static/assets/PageBlogHome.stories-BnmA2r3q.js +14 -0
- package/storybook-static/assets/PageFirstSlide-D2kcGYmB-BWfslHla.js +1 -0
- package/storybook-static/assets/PageFirstSlide-SzOOIHx0.css +1 -0
- package/storybook-static/assets/PageFirstSlide.stories-CoKlxYlH.js +55 -0
- package/storybook-static/assets/PageHome.stories-DcgUrGxe.js +121 -0
- package/storybook-static/assets/Pre.stories-CKu9R4kn.js +11 -0
- package/storybook-static/assets/Sidebar.stories-BivU6MOT.js +9 -0
- package/storybook-static/assets/Steps.stories-fSa3Sw8j.js +1146 -0
- package/storybook-static/assets/SubNav.stories-CL_Th3oO.js +19 -0
- package/storybook-static/assets/Table.stories-BdNM7k9y.js +581 -0
- package/storybook-static/assets/Tabs.stories-A3NcBab_.js +873 -0
- package/storybook-static/assets/Text-BAwif7rv-BYvLGGQV.js +31 -0
- package/storybook-static/assets/TocCard.stories-BRB1SH6U.js +299 -0
- package/storybook-static/assets/Update-DflVXGGQ-qVV03FlC.js +1 -0
- package/storybook-static/assets/Update.stories-DG383caW.js +387 -0
- package/storybook-static/assets/VideoGuide.stories-BnCDLXK7.js +3 -0
- package/storybook-static/assets/__vite-browser-external-FmFgRqLi.js +1 -0
- package/storybook-static/assets/_rollupPluginBabelHelpers-DuYa1R0C-CyXpXONY.js +4 -0
- package/storybook-static/assets/chunk-EF7DTUVF-DPkwZaUR.js +12 -0
- package/storybook-static/assets/chunk-XP5HYGXS-BpfKkqn7.js +1 -0
- package/storybook-static/assets/content-BRdfAQPf.js +27 -0
- package/storybook-static/assets/entry-preview-D5WwyKaL.js +2 -0
- package/storybook-static/assets/entry-preview-docs-DU3GzdsG.js +46 -0
- package/storybook-static/assets/entry-preview-rsc-56ExrKd2.js +1 -0
- package/storybook-static/assets/github-BKgXy13-.js +6 -0
- package/storybook-static/assets/iframe-YbiB23cy.js +211 -0
- package/storybook-static/assets/index-Cf9b6H0j.js +8 -0
- package/storybook-static/assets/index-CrSc8wm9.js +240 -0
- package/storybook-static/assets/index-CzKwSnp0.js +9 -0
- package/storybook-static/assets/index-D6tQpKjq.js +12 -0
- package/storybook-static/assets/index-DUCcPMOf.js +1 -0
- package/storybook-static/assets/index-D_kTjGoR.js +9 -0
- package/storybook-static/assets/index-DgnBCu_c.js +1 -0
- package/storybook-static/assets/index-DrFu-skq.js +6 -0
- package/storybook-static/assets/index-H0MBf5rE.js +1 -0
- package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
- package/storybook-static/assets/layouts-DBdGRyBm.js +1 -0
- package/storybook-static/assets/preview-B5edrxhc.js +1 -0
- package/storybook-static/assets/preview-BWzBA1C2.js +396 -0
- package/storybook-static/assets/preview-C5EOgwJ9.js +2 -0
- package/storybook-static/assets/preview-DGZ5Qq08.js +34 -0
- package/storybook-static/assets/preview-DTyQTpzx.js +1 -0
- package/storybook-static/assets/preview-TqM3Oi8H.js +1 -0
- package/storybook-static/assets/preview-WIE65ICp.js +1 -0
- package/storybook-static/assets/preview-_Oh-njOd.css +1 -0
- package/storybook-static/assets/preview-caVMbCIR.js +7 -0
- package/storybook-static/assets/react-18-Tf4JhPOR.js +25 -0
- package/storybook-static/assets/system-CcsYyfSK.js +1 -0
- package/storybook-static/assets/test-utils-BaXAOqRT.js +9 -0
- package/storybook-static/assets/themes.stories-D1474P9U.js +41 -0
- package/storybook-static/assets/writer-DkrWmB39.js +1 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +666 -0
- package/storybook-static/index.html +183 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/logo.svg +10 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/docs-9/manager-bundle.js +242 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +402 -0
- package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/storybook-10/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
- package/storybook-static/sb-addons/storysource-8/manager-bundle.js +3 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +1052 -0
- package/storybook-static/sb-manager/globals-runtime.js +42127 -0
- package/storybook-static/sb-manager/globals.js +48 -0
- package/storybook-static/sb-manager/runtime.js +12048 -0
- package/tsconfig.json +39 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/vite.config.ts +8 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import"./writer-DkrWmB39.js";import{b as o}from"./Update-DflVXGGQ-qVV03FlC.js";import"./Text-BAwif7rv-BYvLGGQV.js";import"./index-CzKwSnp0.js";import"./Button-Cj99tk5U-Cn0Wrqkw.js";import"./_rollupPluginBabelHelpers-DuYa1R0C-CyXpXONY.js";import"./index-DUCcPMOf.js";import"./index-DgnBCu_c.js";import"./index-D_kTjGoR.js";const u={title:"Components/Writer/ColorSchemeButton",component:o,parameters:{docs:{description:{component:"ColorSchemeButton component provides a toggle button for switching between light and dark color schemes. It automatically detects the current scheme and updates the UI accordingly."}}},argTypes:{}},t={render:()=>e.jsx("div",{style:{padding:"20px"},children:e.jsx(o,{})})},r={render:()=>e.jsx("div",{style:{padding:"20px",background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"8px"},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px"},children:[e.jsx("div",{style:{fontWeight:"bold"},children:"Documentation"}),e.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[e.jsx("span",{style:{fontSize:"14px"},children:"Theme:"}),e.jsx(o,{})]})]})}),parameters:{docs:{description:{story:"This example shows how the ColorSchemeButton is typically used in navigation bars or headers."}}}},n={render:()=>e.jsxs("div",{style:{padding:"20px"},children:[e.jsxs("div",{style:{marginBottom:"20px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"Header Button"}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px",background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"4px"},children:[e.jsx("span",{children:"Site Header"}),e.jsx(o,{})]})]}),e.jsxs("div",{style:{marginBottom:"20px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"Sidebar Button"}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px",padding:"12px",background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"4px",width:"200px"},children:[e.jsx("span",{children:"Navigation"}),e.jsx("span",{children:"Getting Started"}),e.jsx("span",{children:"API Reference"}),e.jsx("div",{style:{marginTop:"auto",display:"flex",justifyContent:"center"},children:e.jsx(o,{})})]})]}),e.jsxs("div",{style:{marginBottom:"20px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"Footer Button"}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px",background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"4px"},children:[e.jsx("span",{children:"© 2024 Documentation"}),e.jsx(o,{})]})]})]}),parameters:{docs:{description:{story:"This example shows how ColorSchemeButton can be used in different contexts throughout an application."}}}},i={render:()=>e.jsxs("div",{style:{padding:"20px"},children:[e.jsxs("div",{style:{background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"8px",padding:"20px",marginBottom:"20px"},children:[e.jsx("h3",{style:{marginBottom:"16px"},children:"Theme Toggle Demo"}),e.jsx("p",{style:{marginBottom:"16px",color:"var(--xyd-text-color)"},children:"Click the button below to toggle between light and dark themes. The button will automatically show the appropriate icon for the current theme."}),e.jsx("div",{style:{display:"flex",justifyContent:"center"},children:e.jsx(o,{})})]}),e.jsxs("div",{style:{background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"8px",padding:"20px"},children:[e.jsx("h4",{style:{marginBottom:"12px"},children:"Current Theme Information"}),e.jsxs("ul",{style:{color:"var(--xyd-text-color)"},children:[e.jsx("li",{children:"The button automatically detects the current color scheme"}),e.jsx("li",{children:"Shows a sun icon for light mode"}),e.jsx("li",{children:"Shows a moon icon for dark mode"}),e.jsx("li",{children:"Persists the selection in localStorage"}),e.jsx("li",{children:'Respects system preferences when set to "os"'})]})]})]}),parameters:{docs:{description:{story:"This interactive example demonstrates the ColorSchemeButton functionality and behavior."}}}},d={render:()=>e.jsxs("div",{style:{padding:"20px",maxWidth:"800px"},children:[e.jsxs("div",{style:{marginBottom:"40px"},children:[e.jsx("h2",{children:"Documentation Site Header"}),e.jsx("p",{children:"Typical usage in a documentation site header with navigation and theme toggle."}),e.jsx("div",{style:{background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"8px",padding:"16px"},children:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"24px"},children:[e.jsx("span",{style:{fontWeight:"bold",fontSize:"18px"},children:"Docs"}),e.jsxs("nav",{style:{display:"flex",gap:"16px"},children:[e.jsx("a",{href:"#",style:{color:"var(--xyd-text-color)",textDecoration:"none"},children:"Guide"}),e.jsx("a",{href:"#",style:{color:"var(--xyd-text-color)",textDecoration:"none"},children:"API"}),e.jsx("a",{href:"#",style:{color:"var(--xyd-text-color)",textDecoration:"none"},children:"Examples"})]})]}),e.jsx(o,{})]})})]}),e.jsxs("div",{style:{marginBottom:"40px"},children:[e.jsx("h2",{children:"Application Settings"}),e.jsx("p",{children:"Theme toggle in an application settings panel."}),e.jsxs("div",{style:{background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"8px",padding:"20px"},children:[e.jsx("h3",{style:{marginBottom:"16px"},children:"Appearance"}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px",background:"var(--xyd-bgcolor-secondary)",borderRadius:"4px",marginBottom:"12px"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:"bold",marginBottom:"4px"},children:"Theme"}),e.jsx("div",{style:{fontSize:"14px",color:"var(--xyd-text-color-secondary)"},children:"Choose your preferred color scheme"})]}),e.jsx(o,{})]})]})]}),e.jsxs("div",{style:{marginBottom:"40px"},children:[e.jsx("h2",{children:"Sidebar Navigation"}),e.jsx("p",{children:"Theme toggle in a sidebar navigation component."}),e.jsx("div",{style:{display:"flex",gap:"20px"},children:e.jsxs("div",{style:{background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"8px",padding:"16px",width:"250px",display:"flex",flexDirection:"column",gap:"12px"},children:[e.jsx("div",{style:{fontWeight:"bold",marginBottom:"8px"},children:"Navigation"}),e.jsx("a",{href:"#",style:{color:"var(--xyd-text-color)",textDecoration:"none"},children:"Dashboard"}),e.jsx("a",{href:"#",style:{color:"var(--xyd-text-color)",textDecoration:"none"},children:"Projects"}),e.jsx("a",{href:"#",style:{color:"var(--xyd-text-color)",textDecoration:"none"},children:"Settings"}),e.jsx("div",{style:{marginTop:"auto",display:"flex",justifyContent:"center"},children:e.jsx(o,{})})]})})]})]}),parameters:{docs:{description:{story:"This example shows practical use cases for the ColorSchemeButton in real applications."}}}},s={render:()=>e.jsxs("div",{style:{padding:"20px"},children:[e.jsxs("div",{style:{background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"8px",padding:"20px",marginBottom:"20px"},children:[e.jsx("h3",{style:{marginBottom:"16px",color:"var(--xyd-text-color)"},children:"Theme Toggle"}),e.jsx("p",{style:{marginBottom:"16px",color:"var(--xyd-text-color)"},children:"This button automatically adapts to the current theme and provides a way to switch between light and dark modes."}),e.jsx("div",{style:{display:"flex",justifyContent:"center"},children:e.jsx(o,{})})]}),e.jsxs("div",{style:{background:"var(--xyd-bgcolor)",border:"1px solid var(--xyd-border-color)",borderRadius:"8px",padding:"20px"},children:[e.jsx("h4",{style:{marginBottom:"12px",color:"var(--xyd-text-color)"},children:"Features"}),e.jsxs("ul",{style:{color:"var(--xyd-text-color)"},children:[e.jsx("li",{children:"Automatic theme detection"}),e.jsx("li",{children:"System preference support"}),e.jsx("li",{children:"Local storage persistence"}),e.jsx("li",{children:"Accessible button design"}),e.jsx("li",{children:"Consistent with design system"})]})]})]}),parameters:{docs:{description:{story:"This example demonstrates the ColorSchemeButton features and capabilities."}}}};t.parameters={...t.parameters,docs:{...t.parameters?.docs,source:{originalSource:`{
|
|
2
|
+
render: () => <div style={{
|
|
3
|
+
padding: '20px'
|
|
4
|
+
}}>
|
|
5
|
+
<ColorSchemeButton />
|
|
6
|
+
</div>
|
|
7
|
+
}`,...t.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
|
|
8
|
+
render: () => <div style={{
|
|
9
|
+
padding: '20px',
|
|
10
|
+
background: 'var(--xyd-bgcolor)',
|
|
11
|
+
border: '1px solid var(--xyd-border-color)',
|
|
12
|
+
borderRadius: '8px'
|
|
13
|
+
}}>
|
|
14
|
+
<div style={{
|
|
15
|
+
display: 'flex',
|
|
16
|
+
justifyContent: 'space-between',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
padding: '16px'
|
|
19
|
+
}}>
|
|
20
|
+
<div style={{
|
|
21
|
+
fontWeight: 'bold'
|
|
22
|
+
}}>Documentation</div>
|
|
23
|
+
<div style={{
|
|
24
|
+
display: 'flex',
|
|
25
|
+
gap: '12px',
|
|
26
|
+
alignItems: 'center'
|
|
27
|
+
}}>
|
|
28
|
+
<span style={{
|
|
29
|
+
fontSize: '14px'
|
|
30
|
+
}}>Theme:</span>
|
|
31
|
+
<ColorSchemeButton />
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>,
|
|
35
|
+
parameters: {
|
|
36
|
+
docs: {
|
|
37
|
+
description: {
|
|
38
|
+
story: 'This example shows how the ColorSchemeButton is typically used in navigation bars or headers.'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}`,...r.parameters?.docs?.source}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{
|
|
43
|
+
render: () => <div style={{
|
|
44
|
+
padding: '20px'
|
|
45
|
+
}}>
|
|
46
|
+
<div style={{
|
|
47
|
+
marginBottom: '20px'
|
|
48
|
+
}}>
|
|
49
|
+
<h3 style={{
|
|
50
|
+
marginBottom: '10px',
|
|
51
|
+
color: '#666'
|
|
52
|
+
}}>Header Button</h3>
|
|
53
|
+
<div style={{
|
|
54
|
+
display: 'flex',
|
|
55
|
+
justifyContent: 'space-between',
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
padding: '12px',
|
|
58
|
+
background: 'var(--xyd-bgcolor)',
|
|
59
|
+
border: '1px solid var(--xyd-border-color)',
|
|
60
|
+
borderRadius: '4px'
|
|
61
|
+
}}>
|
|
62
|
+
<span>Site Header</span>
|
|
63
|
+
<ColorSchemeButton />
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div style={{
|
|
68
|
+
marginBottom: '20px'
|
|
69
|
+
}}>
|
|
70
|
+
<h3 style={{
|
|
71
|
+
marginBottom: '10px',
|
|
72
|
+
color: '#666'
|
|
73
|
+
}}>Sidebar Button</h3>
|
|
74
|
+
<div style={{
|
|
75
|
+
display: 'flex',
|
|
76
|
+
flexDirection: 'column',
|
|
77
|
+
gap: '8px',
|
|
78
|
+
padding: '12px',
|
|
79
|
+
background: 'var(--xyd-bgcolor)',
|
|
80
|
+
border: '1px solid var(--xyd-border-color)',
|
|
81
|
+
borderRadius: '4px',
|
|
82
|
+
width: '200px'
|
|
83
|
+
}}>
|
|
84
|
+
<span>Navigation</span>
|
|
85
|
+
<span>Getting Started</span>
|
|
86
|
+
<span>API Reference</span>
|
|
87
|
+
<div style={{
|
|
88
|
+
marginTop: 'auto',
|
|
89
|
+
display: 'flex',
|
|
90
|
+
justifyContent: 'center'
|
|
91
|
+
}}>
|
|
92
|
+
<ColorSchemeButton />
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div style={{
|
|
98
|
+
marginBottom: '20px'
|
|
99
|
+
}}>
|
|
100
|
+
<h3 style={{
|
|
101
|
+
marginBottom: '10px',
|
|
102
|
+
color: '#666'
|
|
103
|
+
}}>Footer Button</h3>
|
|
104
|
+
<div style={{
|
|
105
|
+
display: 'flex',
|
|
106
|
+
justifyContent: 'space-between',
|
|
107
|
+
alignItems: 'center',
|
|
108
|
+
padding: '12px',
|
|
109
|
+
background: 'var(--xyd-bgcolor)',
|
|
110
|
+
border: '1px solid var(--xyd-border-color)',
|
|
111
|
+
borderRadius: '4px'
|
|
112
|
+
}}>
|
|
113
|
+
<span>© 2024 Documentation</span>
|
|
114
|
+
<ColorSchemeButton />
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>,
|
|
118
|
+
parameters: {
|
|
119
|
+
docs: {
|
|
120
|
+
description: {
|
|
121
|
+
story: 'This example shows how ColorSchemeButton can be used in different contexts throughout an application.'
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}`,...n.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
|
|
126
|
+
render: () => <div style={{
|
|
127
|
+
padding: '20px'
|
|
128
|
+
}}>
|
|
129
|
+
<div style={{
|
|
130
|
+
background: 'var(--xyd-bgcolor)',
|
|
131
|
+
border: '1px solid var(--xyd-border-color)',
|
|
132
|
+
borderRadius: '8px',
|
|
133
|
+
padding: '20px',
|
|
134
|
+
marginBottom: '20px'
|
|
135
|
+
}}>
|
|
136
|
+
<h3 style={{
|
|
137
|
+
marginBottom: '16px'
|
|
138
|
+
}}>Theme Toggle Demo</h3>
|
|
139
|
+
<p style={{
|
|
140
|
+
marginBottom: '16px',
|
|
141
|
+
color: 'var(--xyd-text-color)'
|
|
142
|
+
}}>
|
|
143
|
+
Click the button below to toggle between light and dark themes.
|
|
144
|
+
The button will automatically show the appropriate icon for the current theme.
|
|
145
|
+
</p>
|
|
146
|
+
<div style={{
|
|
147
|
+
display: 'flex',
|
|
148
|
+
justifyContent: 'center'
|
|
149
|
+
}}>
|
|
150
|
+
<ColorSchemeButton />
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
|
|
154
|
+
<div style={{
|
|
155
|
+
background: 'var(--xyd-bgcolor)',
|
|
156
|
+
border: '1px solid var(--xyd-border-color)',
|
|
157
|
+
borderRadius: '8px',
|
|
158
|
+
padding: '20px'
|
|
159
|
+
}}>
|
|
160
|
+
<h4 style={{
|
|
161
|
+
marginBottom: '12px'
|
|
162
|
+
}}>Current Theme Information</h4>
|
|
163
|
+
<ul style={{
|
|
164
|
+
color: 'var(--xyd-text-color)'
|
|
165
|
+
}}>
|
|
166
|
+
<li>The button automatically detects the current color scheme</li>
|
|
167
|
+
<li>Shows a sun icon for light mode</li>
|
|
168
|
+
<li>Shows a moon icon for dark mode</li>
|
|
169
|
+
<li>Persists the selection in localStorage</li>
|
|
170
|
+
<li>Respects system preferences when set to "os"</li>
|
|
171
|
+
</ul>
|
|
172
|
+
</div>
|
|
173
|
+
</div>,
|
|
174
|
+
parameters: {
|
|
175
|
+
docs: {
|
|
176
|
+
description: {
|
|
177
|
+
story: 'This interactive example demonstrates the ColorSchemeButton functionality and behavior.'
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}`,...i.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
|
|
182
|
+
render: () => <div style={{
|
|
183
|
+
padding: '20px',
|
|
184
|
+
maxWidth: '800px'
|
|
185
|
+
}}>
|
|
186
|
+
<div style={{
|
|
187
|
+
marginBottom: '40px'
|
|
188
|
+
}}>
|
|
189
|
+
<h2>Documentation Site Header</h2>
|
|
190
|
+
<p>Typical usage in a documentation site header with navigation and theme toggle.</p>
|
|
191
|
+
<div style={{
|
|
192
|
+
background: 'var(--xyd-bgcolor)',
|
|
193
|
+
border: '1px solid var(--xyd-border-color)',
|
|
194
|
+
borderRadius: '8px',
|
|
195
|
+
padding: '16px'
|
|
196
|
+
}}>
|
|
197
|
+
<div style={{
|
|
198
|
+
display: 'flex',
|
|
199
|
+
justifyContent: 'space-between',
|
|
200
|
+
alignItems: 'center'
|
|
201
|
+
}}>
|
|
202
|
+
<div style={{
|
|
203
|
+
display: 'flex',
|
|
204
|
+
alignItems: 'center',
|
|
205
|
+
gap: '24px'
|
|
206
|
+
}}>
|
|
207
|
+
<span style={{
|
|
208
|
+
fontWeight: 'bold',
|
|
209
|
+
fontSize: '18px'
|
|
210
|
+
}}>Docs</span>
|
|
211
|
+
<nav style={{
|
|
212
|
+
display: 'flex',
|
|
213
|
+
gap: '16px'
|
|
214
|
+
}}>
|
|
215
|
+
<a href="#" style={{
|
|
216
|
+
color: 'var(--xyd-text-color)',
|
|
217
|
+
textDecoration: 'none'
|
|
218
|
+
}}>Guide</a>
|
|
219
|
+
<a href="#" style={{
|
|
220
|
+
color: 'var(--xyd-text-color)',
|
|
221
|
+
textDecoration: 'none'
|
|
222
|
+
}}>API</a>
|
|
223
|
+
<a href="#" style={{
|
|
224
|
+
color: 'var(--xyd-text-color)',
|
|
225
|
+
textDecoration: 'none'
|
|
226
|
+
}}>Examples</a>
|
|
227
|
+
</nav>
|
|
228
|
+
</div>
|
|
229
|
+
<ColorSchemeButton />
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<div style={{
|
|
235
|
+
marginBottom: '40px'
|
|
236
|
+
}}>
|
|
237
|
+
<h2>Application Settings</h2>
|
|
238
|
+
<p>Theme toggle in an application settings panel.</p>
|
|
239
|
+
<div style={{
|
|
240
|
+
background: 'var(--xyd-bgcolor)',
|
|
241
|
+
border: '1px solid var(--xyd-border-color)',
|
|
242
|
+
borderRadius: '8px',
|
|
243
|
+
padding: '20px'
|
|
244
|
+
}}>
|
|
245
|
+
<h3 style={{
|
|
246
|
+
marginBottom: '16px'
|
|
247
|
+
}}>Appearance</h3>
|
|
248
|
+
<div style={{
|
|
249
|
+
display: 'flex',
|
|
250
|
+
justifyContent: 'space-between',
|
|
251
|
+
alignItems: 'center',
|
|
252
|
+
padding: '12px',
|
|
253
|
+
background: 'var(--xyd-bgcolor-secondary)',
|
|
254
|
+
borderRadius: '4px',
|
|
255
|
+
marginBottom: '12px'
|
|
256
|
+
}}>
|
|
257
|
+
<div>
|
|
258
|
+
<div style={{
|
|
259
|
+
fontWeight: 'bold',
|
|
260
|
+
marginBottom: '4px'
|
|
261
|
+
}}>Theme</div>
|
|
262
|
+
<div style={{
|
|
263
|
+
fontSize: '14px',
|
|
264
|
+
color: 'var(--xyd-text-color-secondary)'
|
|
265
|
+
}}>
|
|
266
|
+
Choose your preferred color scheme
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
<ColorSchemeButton />
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
|
|
274
|
+
<div style={{
|
|
275
|
+
marginBottom: '40px'
|
|
276
|
+
}}>
|
|
277
|
+
<h2>Sidebar Navigation</h2>
|
|
278
|
+
<p>Theme toggle in a sidebar navigation component.</p>
|
|
279
|
+
<div style={{
|
|
280
|
+
display: 'flex',
|
|
281
|
+
gap: '20px'
|
|
282
|
+
}}>
|
|
283
|
+
<div style={{
|
|
284
|
+
background: 'var(--xyd-bgcolor)',
|
|
285
|
+
border: '1px solid var(--xyd-border-color)',
|
|
286
|
+
borderRadius: '8px',
|
|
287
|
+
padding: '16px',
|
|
288
|
+
width: '250px',
|
|
289
|
+
display: 'flex',
|
|
290
|
+
flexDirection: 'column',
|
|
291
|
+
gap: '12px'
|
|
292
|
+
}}>
|
|
293
|
+
<div style={{
|
|
294
|
+
fontWeight: 'bold',
|
|
295
|
+
marginBottom: '8px'
|
|
296
|
+
}}>Navigation</div>
|
|
297
|
+
<a href="#" style={{
|
|
298
|
+
color: 'var(--xyd-text-color)',
|
|
299
|
+
textDecoration: 'none'
|
|
300
|
+
}}>Dashboard</a>
|
|
301
|
+
<a href="#" style={{
|
|
302
|
+
color: 'var(--xyd-text-color)',
|
|
303
|
+
textDecoration: 'none'
|
|
304
|
+
}}>Projects</a>
|
|
305
|
+
<a href="#" style={{
|
|
306
|
+
color: 'var(--xyd-text-color)',
|
|
307
|
+
textDecoration: 'none'
|
|
308
|
+
}}>Settings</a>
|
|
309
|
+
<div style={{
|
|
310
|
+
marginTop: 'auto',
|
|
311
|
+
display: 'flex',
|
|
312
|
+
justifyContent: 'center'
|
|
313
|
+
}}>
|
|
314
|
+
<ColorSchemeButton />
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
</div>,
|
|
320
|
+
parameters: {
|
|
321
|
+
docs: {
|
|
322
|
+
description: {
|
|
323
|
+
story: 'This example shows practical use cases for the ColorSchemeButton in real applications.'
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}`,...d.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
|
|
328
|
+
render: () => <div style={{
|
|
329
|
+
padding: '20px'
|
|
330
|
+
}}>
|
|
331
|
+
<div style={{
|
|
332
|
+
background: 'var(--xyd-bgcolor)',
|
|
333
|
+
border: '1px solid var(--xyd-border-color)',
|
|
334
|
+
borderRadius: '8px',
|
|
335
|
+
padding: '20px',
|
|
336
|
+
marginBottom: '20px'
|
|
337
|
+
}}>
|
|
338
|
+
<h3 style={{
|
|
339
|
+
marginBottom: '16px',
|
|
340
|
+
color: 'var(--xyd-text-color)'
|
|
341
|
+
}}>Theme Toggle</h3>
|
|
342
|
+
<p style={{
|
|
343
|
+
marginBottom: '16px',
|
|
344
|
+
color: 'var(--xyd-text-color)'
|
|
345
|
+
}}>
|
|
346
|
+
This button automatically adapts to the current theme and provides a way to switch between light and dark modes.
|
|
347
|
+
</p>
|
|
348
|
+
<div style={{
|
|
349
|
+
display: 'flex',
|
|
350
|
+
justifyContent: 'center'
|
|
351
|
+
}}>
|
|
352
|
+
<ColorSchemeButton />
|
|
353
|
+
</div>
|
|
354
|
+
</div>
|
|
355
|
+
|
|
356
|
+
<div style={{
|
|
357
|
+
background: 'var(--xyd-bgcolor)',
|
|
358
|
+
border: '1px solid var(--xyd-border-color)',
|
|
359
|
+
borderRadius: '8px',
|
|
360
|
+
padding: '20px'
|
|
361
|
+
}}>
|
|
362
|
+
<h4 style={{
|
|
363
|
+
marginBottom: '12px',
|
|
364
|
+
color: 'var(--xyd-text-color)'
|
|
365
|
+
}}>Features</h4>
|
|
366
|
+
<ul style={{
|
|
367
|
+
color: 'var(--xyd-text-color)'
|
|
368
|
+
}}>
|
|
369
|
+
<li>Automatic theme detection</li>
|
|
370
|
+
<li>System preference support</li>
|
|
371
|
+
<li>Local storage persistence</li>
|
|
372
|
+
<li>Accessible button design</li>
|
|
373
|
+
<li>Consistent with design system</li>
|
|
374
|
+
</ul>
|
|
375
|
+
</div>
|
|
376
|
+
</div>,
|
|
377
|
+
parameters: {
|
|
378
|
+
docs: {
|
|
379
|
+
description: {
|
|
380
|
+
story: 'This example demonstrates the ColorSchemeButton features and capabilities.'
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}`,...s.parameters?.docs?.source}}};const b=["Default","InNavigation","MultipleButtons","Interactive","RealWorldExamples","ThemeDemonstration"];export{t as Default,r as InNavigation,i as Interactive,n as MultipleButtons,d as RealWorldExamples,s as ThemeDemonstration,b as __namedExportsOrder,u as default};
|