@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.
Files changed (171) hide show
  1. package/.storybook/main.ts +40 -0
  2. package/.storybook/manager-head.html +6 -0
  3. package/.storybook/manager.ts +18 -0
  4. package/.storybook/preview.ts +40 -0
  5. package/.storybook/styles.css +5 -0
  6. package/.storybook/theme.ts +34 -0
  7. package/CHANGELOG.md +2357 -0
  8. package/LICENSE +21 -0
  9. package/README.md +50 -0
  10. package/eslint.config.js +28 -0
  11. package/package.json +61 -0
  12. package/public/logo.svg +10 -0
  13. package/src/__fixtures__/Icons.tsx +83 -0
  14. package/src/__fixtures__/atlas-index/package-index.mdx +194 -0
  15. package/src/__fixtures__/atlas-index/wip1.mdx +131 -0
  16. package/src/__fixtures__/atlas-index.mdx +53 -0
  17. package/src/__fixtures__/code-sample.mdx +15 -0
  18. package/src/__fixtures__/example-source-uniform.ts +41 -0
  19. package/src/__fixtures__/hello-world.mdx +116 -0
  20. package/src/components/DemoDocs.tsx +235 -0
  21. package/src/components/logo.tsx +37 -0
  22. package/src/decorators/DocsTemplate.tsx +101 -0
  23. package/src/docs/atlas/Atlas.stories.tsx +51 -0
  24. package/src/docs/atlas/todo-app.uniform.json +625 -0
  25. package/src/docs/atlas/uniform-to-references.ts +101 -0
  26. package/src/docs/components/coder/CodeSample.stories.tsx +29 -0
  27. package/src/docs/components/pages/PageBlogHome.stories.tsx +52 -0
  28. package/src/docs/components/pages/PageFirstSlide.stories.tsx +124 -0
  29. package/src/docs/components/pages/PageHome.stories.tsx +127 -0
  30. package/src/docs/components/system/Baseline.stories.tsx +126 -0
  31. package/src/docs/components/writer/Badge.stories.tsx +132 -0
  32. package/src/docs/components/writer/Banner.stories.tsx +394 -0
  33. package/src/docs/components/writer/Blockquote.stories.tsx +415 -0
  34. package/src/docs/components/writer/Breadcrumbs.stories.tsx +282 -0
  35. package/src/docs/components/writer/Button.stories.tsx +405 -0
  36. package/src/docs/components/writer/Callout.stories.tsx +183 -0
  37. package/src/docs/components/writer/Card.stories.tsx +457 -0
  38. package/src/docs/components/writer/ColorSchemeButton.stories.tsx +322 -0
  39. package/src/docs/components/writer/Details.stories.tsx +333 -0
  40. package/src/docs/components/writer/GuideCard.stories.tsx +384 -0
  41. package/src/docs/components/writer/Heading.stories.tsx +379 -0
  42. package/src/docs/components/writer/Hr.stories.tsx +325 -0
  43. package/src/docs/components/writer/IconSocial.stories.tsx +591 -0
  44. package/src/docs/components/writer/Image.stories.tsx +430 -0
  45. package/src/docs/components/writer/List.stories.tsx +479 -0
  46. package/src/docs/components/writer/NavLinks.stories.tsx +380 -0
  47. package/src/docs/components/writer/Pre.stories.tsx +23 -0
  48. package/src/docs/components/writer/Steps.stories.tsx +914 -0
  49. package/src/docs/components/writer/Table.stories.tsx +608 -0
  50. package/src/docs/components/writer/Tabs.stories.tsx +760 -0
  51. package/src/docs/components/writer/TocCard.stories.tsx +407 -0
  52. package/src/docs/components/writer/Update.stories.tsx +457 -0
  53. package/src/docs/components/writer/VideoGuide.stories.tsx +17 -0
  54. package/src/docs/templates/CodeSample.stories.tsx +15 -0
  55. package/src/docs/themes/TODO.md +1 -0
  56. package/src/docs/themes/logo.tsx +37 -0
  57. package/src/docs/themes/themes.stories.tsx +269 -0
  58. package/src/docs/ui/Nav.stories.tsx +58 -0
  59. package/src/docs/ui/Sidebar.stories.tsx +167 -0
  60. package/src/docs/ui/SubNav.stories.tsx +29 -0
  61. package/src/utils/mdx.ts +31 -0
  62. package/storybook-static/assets/Atlas.stories-B3Ix52TV.js +153 -0
  63. package/storybook-static/assets/Badge.stories-D3nfVAAW.js +84 -0
  64. package/storybook-static/assets/Banner.stories-BHLs2WlR.js +394 -0
  65. package/storybook-static/assets/Baseline.stories-Bwx2zF_U.js +103 -0
  66. package/storybook-static/assets/Blockquote.stories-Cxf9fDVo.js +468 -0
  67. package/storybook-static/assets/Breadcrumbs.stories-CFjDJvdh.js +219 -0
  68. package/storybook-static/assets/Button-Cj99tk5U-Cn0Wrqkw.js +3 -0
  69. package/storybook-static/assets/Button.stories-DUfQIyn7.js +472 -0
  70. package/storybook-static/assets/Callout.stories-CIQWommc.js +134 -0
  71. package/storybook-static/assets/Card.stories-0mJDPE-f.js +278 -0
  72. package/storybook-static/assets/CodeSample.stories-1k1_b2U_.js +8 -0
  73. package/storybook-static/assets/CodeSample.stories-BEAQ3H6A.js +22 -0
  74. package/storybook-static/assets/Color-YHDXOIA2-BAq_yxd2.js +1 -0
  75. package/storybook-static/assets/ColorSchemeButton.stories-C1yuuA8O.js +384 -0
  76. package/storybook-static/assets/Details.stories-BacIPYUH.js +290 -0
  77. package/storybook-static/assets/DocsRenderer-CFRXHY34-BwJiFRuq.js +575 -0
  78. package/storybook-static/assets/DocsTemplate-B8_ZAKIZ.js +16 -0
  79. package/storybook-static/assets/GuideCard.stories-IJbjW-xe.js +253 -0
  80. package/storybook-static/assets/Heading.stories-C9rBwnlZ.js +337 -0
  81. package/storybook-static/assets/Hr.stories-bgwD4mmY.js +351 -0
  82. package/storybook-static/assets/IconSocial.stories-Bv3u90GB.js +715 -0
  83. package/storybook-static/assets/Icons-CjNNbMNR.js +1 -0
  84. package/storybook-static/assets/Image.stories-BlrJ8Th7.js +349 -0
  85. package/storybook-static/assets/List.stories-mzy4ZAGg.js +513 -0
  86. package/storybook-static/assets/Nav.stories-CZhCHFlj.js +13 -0
  87. package/storybook-static/assets/NavLinks.stories-DuFRhZLh.js +359 -0
  88. package/storybook-static/assets/PageBlogHome.stories-BnmA2r3q.js +14 -0
  89. package/storybook-static/assets/PageFirstSlide-D2kcGYmB-BWfslHla.js +1 -0
  90. package/storybook-static/assets/PageFirstSlide-SzOOIHx0.css +1 -0
  91. package/storybook-static/assets/PageFirstSlide.stories-CoKlxYlH.js +55 -0
  92. package/storybook-static/assets/PageHome.stories-DcgUrGxe.js +121 -0
  93. package/storybook-static/assets/Pre.stories-CKu9R4kn.js +11 -0
  94. package/storybook-static/assets/Sidebar.stories-BivU6MOT.js +9 -0
  95. package/storybook-static/assets/Steps.stories-fSa3Sw8j.js +1146 -0
  96. package/storybook-static/assets/SubNav.stories-CL_Th3oO.js +19 -0
  97. package/storybook-static/assets/Table.stories-BdNM7k9y.js +581 -0
  98. package/storybook-static/assets/Tabs.stories-A3NcBab_.js +873 -0
  99. package/storybook-static/assets/Text-BAwif7rv-BYvLGGQV.js +31 -0
  100. package/storybook-static/assets/TocCard.stories-BRB1SH6U.js +299 -0
  101. package/storybook-static/assets/Update-DflVXGGQ-qVV03FlC.js +1 -0
  102. package/storybook-static/assets/Update.stories-DG383caW.js +387 -0
  103. package/storybook-static/assets/VideoGuide.stories-BnCDLXK7.js +3 -0
  104. package/storybook-static/assets/__vite-browser-external-FmFgRqLi.js +1 -0
  105. package/storybook-static/assets/_rollupPluginBabelHelpers-DuYa1R0C-CyXpXONY.js +4 -0
  106. package/storybook-static/assets/chunk-EF7DTUVF-DPkwZaUR.js +12 -0
  107. package/storybook-static/assets/chunk-XP5HYGXS-BpfKkqn7.js +1 -0
  108. package/storybook-static/assets/content-BRdfAQPf.js +27 -0
  109. package/storybook-static/assets/entry-preview-D5WwyKaL.js +2 -0
  110. package/storybook-static/assets/entry-preview-docs-DU3GzdsG.js +46 -0
  111. package/storybook-static/assets/entry-preview-rsc-56ExrKd2.js +1 -0
  112. package/storybook-static/assets/github-BKgXy13-.js +6 -0
  113. package/storybook-static/assets/iframe-YbiB23cy.js +211 -0
  114. package/storybook-static/assets/index-Cf9b6H0j.js +8 -0
  115. package/storybook-static/assets/index-CrSc8wm9.js +240 -0
  116. package/storybook-static/assets/index-CzKwSnp0.js +9 -0
  117. package/storybook-static/assets/index-D6tQpKjq.js +12 -0
  118. package/storybook-static/assets/index-DUCcPMOf.js +1 -0
  119. package/storybook-static/assets/index-D_kTjGoR.js +9 -0
  120. package/storybook-static/assets/index-DgnBCu_c.js +1 -0
  121. package/storybook-static/assets/index-DrFu-skq.js +6 -0
  122. package/storybook-static/assets/index-H0MBf5rE.js +1 -0
  123. package/storybook-static/assets/jsx-runtime-D_zvdyIk.js +9 -0
  124. package/storybook-static/assets/layouts-DBdGRyBm.js +1 -0
  125. package/storybook-static/assets/preview-B5edrxhc.js +1 -0
  126. package/storybook-static/assets/preview-BWzBA1C2.js +396 -0
  127. package/storybook-static/assets/preview-C5EOgwJ9.js +2 -0
  128. package/storybook-static/assets/preview-DGZ5Qq08.js +34 -0
  129. package/storybook-static/assets/preview-DTyQTpzx.js +1 -0
  130. package/storybook-static/assets/preview-TqM3Oi8H.js +1 -0
  131. package/storybook-static/assets/preview-WIE65ICp.js +1 -0
  132. package/storybook-static/assets/preview-_Oh-njOd.css +1 -0
  133. package/storybook-static/assets/preview-caVMbCIR.js +7 -0
  134. package/storybook-static/assets/react-18-Tf4JhPOR.js +25 -0
  135. package/storybook-static/assets/system-CcsYyfSK.js +1 -0
  136. package/storybook-static/assets/test-utils-BaXAOqRT.js +9 -0
  137. package/storybook-static/assets/themes.stories-D1474P9U.js +41 -0
  138. package/storybook-static/assets/writer-DkrWmB39.js +1 -0
  139. package/storybook-static/favicon.svg +1 -0
  140. package/storybook-static/iframe.html +666 -0
  141. package/storybook-static/index.html +183 -0
  142. package/storybook-static/index.json +1 -0
  143. package/storybook-static/logo.svg +10 -0
  144. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  145. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  146. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  147. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  148. package/storybook-static/project.json +1 -0
  149. package/storybook-static/sb-addons/docs-9/manager-bundle.js +242 -0
  150. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
  151. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +12 -0
  152. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +402 -0
  153. package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js +3 -0
  154. package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js +3 -0
  155. package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js +3 -0
  156. package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js +3 -0
  157. package/storybook-static/sb-addons/storybook-10/manager-bundle.js +3 -0
  158. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  159. package/storybook-static/sb-addons/storysource-8/manager-bundle.js +3 -0
  160. package/storybook-static/sb-common-assets/favicon.svg +1 -0
  161. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  162. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  163. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  164. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  165. package/storybook-static/sb-manager/globals-module-info.js +1052 -0
  166. package/storybook-static/sb-manager/globals-runtime.js +42127 -0
  167. package/storybook-static/sb-manager/globals.js +48 -0
  168. package/storybook-static/sb-manager/runtime.js +12048 -0
  169. package/tsconfig.json +39 -0
  170. package/tsconfig.tsbuildinfo +1 -0
  171. package/vite.config.ts +8 -0
@@ -0,0 +1,84 @@
1
+ import{j as e}from"./jsx-runtime-D_zvdyIk.js";import"./writer-DkrWmB39.js";import{g as s}from"./Text-BAwif7rv-BYvLGGQV.js";import"./Update-DflVXGGQ-qVV03FlC.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 B={title:"Components/Writer/Badge",component:s,parameters:{docs:{description:{component:"Badge component is used to display small status indicators, labels, or tags."}}},argTypes:{children:{description:"The content to display inside the badge",control:"text"},size:{description:"The size of the badge",control:{type:"select"},options:["xs","sm"]},kind:{description:"The visual style variant of the badge",control:{type:"select"},options:["default","warning","info"]},className:{description:"Additional CSS classes to apply",control:"text"}}},n={args:{children:"Default Badge",kind:"default",size:"sm"}},a={args:{children:"Small Badge",size:"sm",kind:"default"}},r={args:{children:"XS Badge",size:"xs",kind:"default"}},i={args:{children:"Warning Badge",kind:"warning",size:"sm"}},t={args:{children:"Info Badge",kind:"info",size:"sm"}},d={render:()=>e.jsxs("div",{style:{display:"flex",gap:"12px",flexWrap:"wrap",alignItems:"center"},children:[e.jsx(s,{kind:"default",size:"sm",children:"Default"}),e.jsx(s,{kind:"warning",size:"sm",children:"Warning"}),e.jsx(s,{kind:"info",size:"sm",children:"Info"}),e.jsx(s,{kind:"default",size:"xs",children:"XS Default"}),e.jsx(s,{kind:"warning",size:"xs",children:"XS Warning"}),e.jsx(s,{kind:"info",size:"xs",children:"XS Info"})]})},o={render:()=>e.jsxs("div",{style:{display:"flex",gap:"12px",flexWrap:"wrap",alignItems:"center"},children:[e.jsxs(s,{kind:"info",size:"sm",children:[e.jsx("span",{style:{marginRight:"4px"},children:"ℹ️"}),"Information"]}),e.jsxs(s,{kind:"warning",size:"sm",children:[e.jsx("span",{style:{marginRight:"4px"},children:"⚠️"}),"Warning"]}),e.jsxs(s,{kind:"default",size:"sm",children:[e.jsx("span",{style:{marginRight:"4px"},children:"🏷️"}),"Label"]})]})},l={args:{children:"Click me!",kind:"default",size:"sm"},parameters:{docs:{description:{story:"This badge can be used in interactive contexts. You can add onClick handlers or other event listeners."}}}};n.parameters={...n.parameters,docs:{...n.parameters?.docs,source:{originalSource:`{
2
+ args: {
3
+ children: 'Default Badge',
4
+ kind: 'default',
5
+ size: 'sm'
6
+ }
7
+ }`,...n.parameters?.docs?.source}}};a.parameters={...a.parameters,docs:{...a.parameters?.docs,source:{originalSource:`{
8
+ args: {
9
+ children: 'Small Badge',
10
+ size: 'sm',
11
+ kind: 'default'
12
+ }
13
+ }`,...a.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
14
+ args: {
15
+ children: 'XS Badge',
16
+ size: 'xs',
17
+ kind: 'default'
18
+ }
19
+ }`,...r.parameters?.docs?.source}}};i.parameters={...i.parameters,docs:{...i.parameters?.docs,source:{originalSource:`{
20
+ args: {
21
+ children: 'Warning Badge',
22
+ kind: 'warning',
23
+ size: 'sm'
24
+ }
25
+ }`,...i.parameters?.docs?.source}}};t.parameters={...t.parameters,docs:{...t.parameters?.docs,source:{originalSource:`{
26
+ args: {
27
+ children: 'Info Badge',
28
+ kind: 'info',
29
+ size: 'sm'
30
+ }
31
+ }`,...t.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
32
+ render: () => <div style={{
33
+ display: 'flex',
34
+ gap: '12px',
35
+ flexWrap: 'wrap',
36
+ alignItems: 'center'
37
+ }}>
38
+ <Badge kind="default" size="sm">Default</Badge>
39
+ <Badge kind="warning" size="sm">Warning</Badge>
40
+ <Badge kind="info" size="sm">Info</Badge>
41
+ <Badge kind="default" size="xs">XS Default</Badge>
42
+ <Badge kind="warning" size="xs">XS Warning</Badge>
43
+ <Badge kind="info" size="xs">XS Info</Badge>
44
+ </div>
45
+ }`,...d.parameters?.docs?.source}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
46
+ render: () => <div style={{
47
+ display: 'flex',
48
+ gap: '12px',
49
+ flexWrap: 'wrap',
50
+ alignItems: 'center'
51
+ }}>
52
+ <Badge kind="info" size="sm">
53
+ <span style={{
54
+ marginRight: '4px'
55
+ }}>ℹ️</span>
56
+ Information
57
+ </Badge>
58
+ <Badge kind="warning" size="sm">
59
+ <span style={{
60
+ marginRight: '4px'
61
+ }}>⚠️</span>
62
+ Warning
63
+ </Badge>
64
+ <Badge kind="default" size="sm">
65
+ <span style={{
66
+ marginRight: '4px'
67
+ }}>🏷️</span>
68
+ Label
69
+ </Badge>
70
+ </div>
71
+ }`,...o.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
72
+ args: {
73
+ children: 'Click me!',
74
+ kind: 'default',
75
+ size: 'sm'
76
+ },
77
+ parameters: {
78
+ docs: {
79
+ description: {
80
+ story: 'This badge can be used in interactive contexts. You can add onClick handlers or other event listeners.'
81
+ }
82
+ }
83
+ }
84
+ }`,...l.parameters?.docs?.source}}};const S=["Default","Small","ExtraSmall","Warning","Info","AllVariants","WithIcons","Interactive"];export{d as AllVariants,n as Default,r as ExtraSmall,t as Info,l as Interactive,a as Small,i as Warning,o as WithIcons,S as __namedExportsOrder,B as default};
@@ -0,0 +1,394 @@
1
+ import{j as e}from"./jsx-runtime-D_zvdyIk.js";import"./writer-DkrWmB39.js";import{I as a,a as s,b as i}from"./Icons-CjNNbMNR.js";import{p as n}from"./Text-BAwif7rv-BYvLGGQV.js";import"./Update-DflVXGGQ-qVV03FlC.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 N={title:"Components/Writer/Banner",component:n,parameters:{docs:{description:{component:"Banner component displays promotional or informational messages with optional storage functionality to control visibility based on user interactions."}}},argTypes:{children:{description:"The content to display inside the banner",control:"text"},kind:{description:"The visual style variant of the banner",control:{type:"select"},options:["secondary"]},label:{description:"Optional label to display in the banner",control:"text"},href:{description:"URL to navigate to when banner is clicked",control:"text"},icon:{description:"Icon to display in the banner",control:!1},store:{description:"Seconds until banner can show again after being closed",control:"number"}}},o={args:{children:"New feature available! Check out our latest updates.",href:"#"},render:r=>e.jsx("div",{style:{padding:"20px"},children:e.jsx(n,{...r})})},t={args:{children:"Session replay is now available in beta",icon:e.jsx(a,{}),href:"/features/session-replay"},render:r=>e.jsx("div",{style:{padding:"20px"},children:e.jsx(n,{...r})})},l={args:{children:"Analytics dashboard has been updated",label:"NEW",href:"/analytics"},render:r=>e.jsx("div",{style:{padding:"20px"},children:e.jsx(n,{...r})})},d={args:{children:"Funnel analysis tool is now live",icon:e.jsx(s,{}),label:"BETA",href:"/tools/funnel-analysis"},render:r=>e.jsx("div",{style:{padding:"20px"},children:e.jsx(n,{...r})})},c={args:{children:"This is a secondary banner with different styling",kind:"secondary",label:"INFO"},render:r=>e.jsx("div",{style:{padding:"20px"},children:e.jsx(n,{...r})})},p={args:{children:"This banner will be hidden for 30 seconds after closing",label:"REMINDER",store:30},render:r=>e.jsxs("div",{style:{padding:"20px"},children:[e.jsx(n,{...r}),e.jsx("p",{style:{marginTop:"10px",fontSize:"14px",color:"#666"},children:"Try closing this banner and refreshing the page to see the storage functionality."})]}),parameters:{docs:{description:{story:"This banner demonstrates the storage functionality. When closed, it will be hidden for the specified number of seconds."}}}},h={args:{children:"This is a banner with much longer content to demonstrate how the component handles extended text and multiple lines of information.",icon:e.jsx(i,{}),label:"UPDATE",href:"/changelog"},render:r=>e.jsx("div",{style:{padding:"20px"},children:e.jsx(n,{...r})})},m={args:{children:"Visit our documentation for more information",icon:e.jsx(a,{}),label:"DOCS",href:"https://docs.example.com"},render:r=>e.jsx("div",{style:{padding:"20px"},children:e.jsx(n,{...r})})},x={args:{children:"This banner has no link and cannot be clicked",icon:e.jsx(s,{}),label:"NOTICE"},render:r=>e.jsx("div",{style:{padding:"20px"},children:e.jsx(n,{...r})})},g={render:()=>e.jsxs("div",{style:{padding:"20px"},children:[e.jsxs("div",{style:{marginBottom:"30px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"Default Banners"}),e.jsx("div",{style:{marginBottom:"20px"},children:e.jsx(n,{href:"#",children:"Basic banner with link"})}),e.jsx("div",{style:{marginBottom:"20px"},children:e.jsx(n,{icon:e.jsx(a,{}),href:"#",children:"Banner with icon"})}),e.jsx("div",{style:{marginBottom:"20px"},children:e.jsx(n,{label:"NEW",href:"#",children:"Banner with label"})}),e.jsx("div",{style:{marginBottom:"20px"},children:e.jsx(n,{icon:e.jsx(i,{}),label:"BETA",href:"#",children:"Banner with icon and label"})})]}),e.jsxs("div",{style:{marginBottom:"30px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"Secondary Banners"}),e.jsx("div",{style:{marginBottom:"20px"},children:e.jsx(n,{kind:"secondary",label:"INFO",children:"Secondary banner with label"})}),e.jsx("div",{style:{marginBottom:"20px"},children:e.jsx(n,{kind:"secondary",icon:e.jsx(s,{}),label:"UPDATE",children:"Secondary banner with icon and label"})})]}),e.jsxs("div",{style:{marginBottom:"30px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"Banners with Storage"}),e.jsx("div",{style:{marginBottom:"20px"},children:e.jsx(n,{store:60,label:"REMINDER",children:"This banner will be hidden for 1 minute after closing"})}),e.jsx("div",{style:{marginBottom:"20px"},children:e.jsx(n,{store:300,icon:e.jsx(a,{}),label:"TIP",children:"This banner will be hidden for 5 minutes after closing"})})]}),e.jsxs("div",{style:{marginBottom:"30px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"External Links"}),e.jsx("div",{style:{marginBottom:"20px"},children:e.jsx(n,{href:"https://github.com",icon:e.jsx(i,{}),label:"GITHUB",children:"Visit our GitHub repository"})}),e.jsx("div",{style:{marginBottom:"20px"},children:e.jsx(n,{href:"https://docs.example.com",label:"DOCS",children:"Read our documentation"})})]})]})},y={render:()=>e.jsxs("div",{style:{padding:"20px",maxWidth:"800px"},children:[e.jsxs("div",{style:{marginBottom:"30px"},children:[e.jsx("h2",{children:"Product Announcements"}),e.jsx("p",{children:"Banners commonly used for product announcements and feature releases."}),e.jsx("div",{style:{marginTop:"16px"},children:e.jsx(n,{icon:e.jsx(a,{}),label:"NEW",href:"/features/session-replay",children:"Session replay is now available in beta! Record and analyze user interactions."})})]}),e.jsxs("div",{style:{marginBottom:"30px"},children:[e.jsx("h2",{children:"System Notifications"}),e.jsx("p",{children:"Banners used for system-wide notifications and updates."}),e.jsx("div",{style:{marginTop:"16px"},children:e.jsx(n,{kind:"secondary",label:"MAINTENANCE",store:3600,children:"Scheduled maintenance on Sunday, 2:00 AM - 4:00 AM EST"})})]}),e.jsxs("div",{style:{marginBottom:"30px"},children:[e.jsx("h2",{children:"Promotional Content"}),e.jsx("p",{children:"Banners for promotional content and marketing messages."}),e.jsx("div",{style:{marginTop:"16px"},children:e.jsx(n,{icon:e.jsx(i,{}),label:"SALE",href:"/pricing",children:"🎉 50% off annual plans! Limited time offer ends soon."})})]}),e.jsxs("div",{style:{marginBottom:"30px"},children:[e.jsx("h2",{children:"Documentation Updates"}),e.jsx("p",{children:"Banners for documentation and help content."}),e.jsx("div",{style:{marginTop:"16px"},children:e.jsx(n,{icon:e.jsx(s,{}),label:"GUIDE",href:"/docs/getting-started",children:"New getting started guide available with step-by-step instructions"})})]}),e.jsxs("div",{style:{marginBottom:"30px"},children:[e.jsx("h2",{children:"Beta Features"}),e.jsx("p",{children:"Banners for beta features and experimental functionality."}),e.jsx("div",{style:{marginTop:"16px"},children:e.jsx(n,{kind:"secondary",icon:e.jsx(a,{}),label:"BETA",store:86400,children:"Try our new analytics dashboard in beta! Feedback welcome."})})]})]}),parameters:{docs:{description:{story:"This example shows how banners are typically used in real-world applications, demonstrating common patterns and use cases."}}}},u={args:{children:"This banner demonstrates interactive behavior. Try clicking it or closing it!",icon:e.jsx(a,{}),label:"DEMO",href:"#",store:10},render:r=>e.jsxs("div",{style:{padding:"20px"},children:[e.jsx(n,{...r}),e.jsx("p",{style:{marginTop:"10px",fontSize:"14px",color:"#666"},children:"This banner has a 10-second storage delay. Try closing it and refreshing the page to see the behavior."})]}),parameters:{docs:{description:{story:"This banner demonstrates the interactive behavior including clicking and closing functionality."}}}},b={render:()=>e.jsxs("div",{style:{padding:"20px"},children:[e.jsxs("div",{style:{marginBottom:"20px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"Short Duration (30 seconds)"}),e.jsx(n,{store:30,label:"QUICK",children:"This banner will reappear after 30 seconds"})]}),e.jsxs("div",{style:{marginBottom:"20px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"Medium Duration (5 minutes)"}),e.jsx(n,{store:300,icon:e.jsx(i,{}),label:"INFO",children:"This banner will reappear after 5 minutes"})]}),e.jsxs("div",{style:{marginBottom:"20px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"Long Duration (1 hour)"}),e.jsx(n,{store:3600,icon:e.jsx(s,{}),label:"REMINDER",children:"This banner will reappear after 1 hour"})]}),e.jsxs("div",{style:{marginBottom:"20px"},children:[e.jsx("h3",{style:{marginBottom:"10px",color:"#666"},children:"Very Long Duration (1 day)"}),e.jsx(n,{store:86400,kind:"secondary",label:"UPDATE",children:"This banner will reappear after 1 day"})]})]}),parameters:{docs:{description:{story:"This example shows different storage durations and how they affect banner visibility."}}}};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
2
+ args: {
3
+ children: 'New feature available! Check out our latest updates.',
4
+ href: '#'
5
+ },
6
+ render: args => <div style={{
7
+ padding: '20px'
8
+ }}>
9
+ <Banner {...args} />
10
+ </div>
11
+ }`,...o.parameters?.docs?.source}}};t.parameters={...t.parameters,docs:{...t.parameters?.docs,source:{originalSource:`{
12
+ args: {
13
+ children: 'Session replay is now available in beta',
14
+ icon: <IconSessionReplay />,
15
+ href: '/features/session-replay'
16
+ },
17
+ render: args => <div style={{
18
+ padding: '20px'
19
+ }}>
20
+ <Banner {...args} />
21
+ </div>
22
+ }`,...t.parameters?.docs?.source}}};l.parameters={...l.parameters,docs:{...l.parameters?.docs,source:{originalSource:`{
23
+ args: {
24
+ children: 'Analytics dashboard has been updated',
25
+ label: 'NEW',
26
+ href: '/analytics'
27
+ },
28
+ render: args => <div style={{
29
+ padding: '20px'
30
+ }}>
31
+ <Banner {...args} />
32
+ </div>
33
+ }`,...l.parameters?.docs?.source}}};d.parameters={...d.parameters,docs:{...d.parameters?.docs,source:{originalSource:`{
34
+ args: {
35
+ children: 'Funnel analysis tool is now live',
36
+ icon: <IconFunnels />,
37
+ label: 'BETA',
38
+ href: '/tools/funnel-analysis'
39
+ },
40
+ render: args => <div style={{
41
+ padding: '20px'
42
+ }}>
43
+ <Banner {...args} />
44
+ </div>
45
+ }`,...d.parameters?.docs?.source}}};c.parameters={...c.parameters,docs:{...c.parameters?.docs,source:{originalSource:`{
46
+ args: {
47
+ children: 'This is a secondary banner with different styling',
48
+ kind: 'secondary',
49
+ label: 'INFO'
50
+ },
51
+ render: args => <div style={{
52
+ padding: '20px'
53
+ }}>
54
+ <Banner {...args} />
55
+ </div>
56
+ }`,...c.parameters?.docs?.source}}};p.parameters={...p.parameters,docs:{...p.parameters?.docs,source:{originalSource:`{
57
+ args: {
58
+ children: 'This banner will be hidden for 30 seconds after closing',
59
+ label: 'REMINDER',
60
+ store: 30
61
+ },
62
+ render: args => <div style={{
63
+ padding: '20px'
64
+ }}>
65
+ <Banner {...args} />
66
+ <p style={{
67
+ marginTop: '10px',
68
+ fontSize: '14px',
69
+ color: '#666'
70
+ }}>
71
+ Try closing this banner and refreshing the page to see the storage functionality.
72
+ </p>
73
+ </div>,
74
+ parameters: {
75
+ docs: {
76
+ description: {
77
+ story: 'This banner demonstrates the storage functionality. When closed, it will be hidden for the specified number of seconds.'
78
+ }
79
+ }
80
+ }
81
+ }`,...p.parameters?.docs?.source}}};h.parameters={...h.parameters,docs:{...h.parameters?.docs,source:{originalSource:`{
82
+ args: {
83
+ children: 'This is a banner with much longer content to demonstrate how the component handles extended text and multiple lines of information.',
84
+ icon: <IconMetrics />,
85
+ label: 'UPDATE',
86
+ href: '/changelog'
87
+ },
88
+ render: args => <div style={{
89
+ padding: '20px'
90
+ }}>
91
+ <Banner {...args} />
92
+ </div>
93
+ }`,...h.parameters?.docs?.source}}};m.parameters={...m.parameters,docs:{...m.parameters?.docs,source:{originalSource:`{
94
+ args: {
95
+ children: 'Visit our documentation for more information',
96
+ icon: <IconSessionReplay />,
97
+ label: 'DOCS',
98
+ href: 'https://docs.example.com'
99
+ },
100
+ render: args => <div style={{
101
+ padding: '20px'
102
+ }}>
103
+ <Banner {...args} />
104
+ </div>
105
+ }`,...m.parameters?.docs?.source}}};x.parameters={...x.parameters,docs:{...x.parameters?.docs,source:{originalSource:`{
106
+ args: {
107
+ children: 'This banner has no link and cannot be clicked',
108
+ icon: <IconFunnels />,
109
+ label: 'NOTICE'
110
+ },
111
+ render: args => <div style={{
112
+ padding: '20px'
113
+ }}>
114
+ <Banner {...args} />
115
+ </div>
116
+ }`,...x.parameters?.docs?.source}}};g.parameters={...g.parameters,docs:{...g.parameters?.docs,source:{originalSource:`{
117
+ render: () => <div style={{
118
+ padding: '20px'
119
+ }}>
120
+ <div style={{
121
+ marginBottom: '30px'
122
+ }}>
123
+ <h3 style={{
124
+ marginBottom: '10px',
125
+ color: '#666'
126
+ }}>Default Banners</h3>
127
+ <div style={{
128
+ marginBottom: '20px'
129
+ }}>
130
+ <Banner href="#">
131
+ Basic banner with link
132
+ </Banner>
133
+ </div>
134
+ <div style={{
135
+ marginBottom: '20px'
136
+ }}>
137
+ <Banner icon={<IconSessionReplay />} href="#">
138
+ Banner with icon
139
+ </Banner>
140
+ </div>
141
+ <div style={{
142
+ marginBottom: '20px'
143
+ }}>
144
+ <Banner label="NEW" href="#">
145
+ Banner with label
146
+ </Banner>
147
+ </div>
148
+ <div style={{
149
+ marginBottom: '20px'
150
+ }}>
151
+ <Banner icon={<IconMetrics />} label="BETA" href="#">
152
+ Banner with icon and label
153
+ </Banner>
154
+ </div>
155
+ </div>
156
+
157
+ <div style={{
158
+ marginBottom: '30px'
159
+ }}>
160
+ <h3 style={{
161
+ marginBottom: '10px',
162
+ color: '#666'
163
+ }}>Secondary Banners</h3>
164
+ <div style={{
165
+ marginBottom: '20px'
166
+ }}>
167
+ <Banner kind="secondary" label="INFO">
168
+ Secondary banner with label
169
+ </Banner>
170
+ </div>
171
+ <div style={{
172
+ marginBottom: '20px'
173
+ }}>
174
+ <Banner kind="secondary" icon={<IconFunnels />} label="UPDATE">
175
+ Secondary banner with icon and label
176
+ </Banner>
177
+ </div>
178
+ </div>
179
+
180
+ <div style={{
181
+ marginBottom: '30px'
182
+ }}>
183
+ <h3 style={{
184
+ marginBottom: '10px',
185
+ color: '#666'
186
+ }}>Banners with Storage</h3>
187
+ <div style={{
188
+ marginBottom: '20px'
189
+ }}>
190
+ <Banner store={60} label="REMINDER">
191
+ This banner will be hidden for 1 minute after closing
192
+ </Banner>
193
+ </div>
194
+ <div style={{
195
+ marginBottom: '20px'
196
+ }}>
197
+ <Banner store={300} icon={<IconSessionReplay />} label="TIP">
198
+ This banner will be hidden for 5 minutes after closing
199
+ </Banner>
200
+ </div>
201
+ </div>
202
+
203
+ <div style={{
204
+ marginBottom: '30px'
205
+ }}>
206
+ <h3 style={{
207
+ marginBottom: '10px',
208
+ color: '#666'
209
+ }}>External Links</h3>
210
+ <div style={{
211
+ marginBottom: '20px'
212
+ }}>
213
+ <Banner href="https://github.com" icon={<IconMetrics />} label="GITHUB">
214
+ Visit our GitHub repository
215
+ </Banner>
216
+ </div>
217
+ <div style={{
218
+ marginBottom: '20px'
219
+ }}>
220
+ <Banner href="https://docs.example.com" label="DOCS">
221
+ Read our documentation
222
+ </Banner>
223
+ </div>
224
+ </div>
225
+ </div>
226
+ }`,...g.parameters?.docs?.source}}};y.parameters={...y.parameters,docs:{...y.parameters?.docs,source:{originalSource:`{
227
+ render: () => <div style={{
228
+ padding: '20px',
229
+ maxWidth: '800px'
230
+ }}>
231
+ <div style={{
232
+ marginBottom: '30px'
233
+ }}>
234
+ <h2>Product Announcements</h2>
235
+ <p>Banners commonly used for product announcements and feature releases.</p>
236
+ <div style={{
237
+ marginTop: '16px'
238
+ }}>
239
+ <Banner icon={<IconSessionReplay />} label="NEW" href="/features/session-replay">
240
+ Session replay is now available in beta! Record and analyze user interactions.
241
+ </Banner>
242
+ </div>
243
+ </div>
244
+
245
+ <div style={{
246
+ marginBottom: '30px'
247
+ }}>
248
+ <h2>System Notifications</h2>
249
+ <p>Banners used for system-wide notifications and updates.</p>
250
+ <div style={{
251
+ marginTop: '16px'
252
+ }}>
253
+ <Banner kind="secondary" label="MAINTENANCE" store={3600}>
254
+ Scheduled maintenance on Sunday, 2:00 AM - 4:00 AM EST
255
+ </Banner>
256
+ </div>
257
+ </div>
258
+
259
+ <div style={{
260
+ marginBottom: '30px'
261
+ }}>
262
+ <h2>Promotional Content</h2>
263
+ <p>Banners for promotional content and marketing messages.</p>
264
+ <div style={{
265
+ marginTop: '16px'
266
+ }}>
267
+ <Banner icon={<IconMetrics />} label="SALE" href="/pricing">
268
+ 🎉 50% off annual plans! Limited time offer ends soon.
269
+ </Banner>
270
+ </div>
271
+ </div>
272
+
273
+ <div style={{
274
+ marginBottom: '30px'
275
+ }}>
276
+ <h2>Documentation Updates</h2>
277
+ <p>Banners for documentation and help content.</p>
278
+ <div style={{
279
+ marginTop: '16px'
280
+ }}>
281
+ <Banner icon={<IconFunnels />} label="GUIDE" href="/docs/getting-started">
282
+ New getting started guide available with step-by-step instructions
283
+ </Banner>
284
+ </div>
285
+ </div>
286
+
287
+ <div style={{
288
+ marginBottom: '30px'
289
+ }}>
290
+ <h2>Beta Features</h2>
291
+ <p>Banners for beta features and experimental functionality.</p>
292
+ <div style={{
293
+ marginTop: '16px'
294
+ }}>
295
+ <Banner kind="secondary" icon={<IconSessionReplay />} label="BETA" store={86400}>
296
+ Try our new analytics dashboard in beta! Feedback welcome.
297
+ </Banner>
298
+ </div>
299
+ </div>
300
+ </div>,
301
+ parameters: {
302
+ docs: {
303
+ description: {
304
+ story: 'This example shows how banners are typically used in real-world applications, demonstrating common patterns and use cases.'
305
+ }
306
+ }
307
+ }
308
+ }`,...y.parameters?.docs?.source}}};u.parameters={...u.parameters,docs:{...u.parameters?.docs,source:{originalSource:`{
309
+ args: {
310
+ children: 'This banner demonstrates interactive behavior. Try clicking it or closing it!',
311
+ icon: <IconSessionReplay />,
312
+ label: 'DEMO',
313
+ href: '#',
314
+ store: 10
315
+ },
316
+ render: args => <div style={{
317
+ padding: '20px'
318
+ }}>
319
+ <Banner {...args} />
320
+ <p style={{
321
+ marginTop: '10px',
322
+ fontSize: '14px',
323
+ color: '#666'
324
+ }}>
325
+ This banner has a 10-second storage delay. Try closing it and refreshing the page to see the behavior.
326
+ </p>
327
+ </div>,
328
+ parameters: {
329
+ docs: {
330
+ description: {
331
+ story: 'This banner demonstrates the interactive behavior including clicking and closing functionality.'
332
+ }
333
+ }
334
+ }
335
+ }`,...u.parameters?.docs?.source}}};b.parameters={...b.parameters,docs:{...b.parameters?.docs,source:{originalSource:`{
336
+ render: () => <div style={{
337
+ padding: '20px'
338
+ }}>
339
+ <div style={{
340
+ marginBottom: '20px'
341
+ }}>
342
+ <h3 style={{
343
+ marginBottom: '10px',
344
+ color: '#666'
345
+ }}>Short Duration (30 seconds)</h3>
346
+ <Banner store={30} label="QUICK">
347
+ This banner will reappear after 30 seconds
348
+ </Banner>
349
+ </div>
350
+
351
+ <div style={{
352
+ marginBottom: '20px'
353
+ }}>
354
+ <h3 style={{
355
+ marginBottom: '10px',
356
+ color: '#666'
357
+ }}>Medium Duration (5 minutes)</h3>
358
+ <Banner store={300} icon={<IconMetrics />} label="INFO">
359
+ This banner will reappear after 5 minutes
360
+ </Banner>
361
+ </div>
362
+
363
+ <div style={{
364
+ marginBottom: '20px'
365
+ }}>
366
+ <h3 style={{
367
+ marginBottom: '10px',
368
+ color: '#666'
369
+ }}>Long Duration (1 hour)</h3>
370
+ <Banner store={3600} icon={<IconFunnels />} label="REMINDER">
371
+ This banner will reappear after 1 hour
372
+ </Banner>
373
+ </div>
374
+
375
+ <div style={{
376
+ marginBottom: '20px'
377
+ }}>
378
+ <h3 style={{
379
+ marginBottom: '10px',
380
+ color: '#666'
381
+ }}>Very Long Duration (1 day)</h3>
382
+ <Banner store={86400} kind="secondary" label="UPDATE">
383
+ This banner will reappear after 1 day
384
+ </Banner>
385
+ </div>
386
+ </div>,
387
+ parameters: {
388
+ docs: {
389
+ description: {
390
+ story: 'This example shows different storage durations and how they affect banner visibility.'
391
+ }
392
+ }
393
+ }
394
+ }`,...b.parameters?.docs?.source}}};const A=["Default","WithIcon","WithLabel","WithIconAndLabel","Secondary","WithStorage","LongContent","ExternalLink","NoLink","AllVariants","RealWorldExamples","Interactive","StorageDurations"];export{g as AllVariants,o as Default,m as ExternalLink,u as Interactive,h as LongContent,x as NoLink,y as RealWorldExamples,c as Secondary,b as StorageDurations,t as WithIcon,d as WithIconAndLabel,l as WithLabel,p as WithStorage,A as __namedExportsOrder,N as default};
@@ -0,0 +1,103 @@
1
+ import{j as S}from"./jsx-runtime-D_zvdyIk.js";import{g as ue,r as fe,e as pe}from"./index-CzKwSnp0.js";import{i as H}from"./system-CcsYyfSK.js";import"./Button-Cj99tk5U-Cn0Wrqkw.js";import"./_rollupPluginBabelHelpers-DuYa1R0C-CyXpXONY.js";function de(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),n=r.createElement("base"),s=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(s),t&&(n.href=t),s.href=e,s.href}const me=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function g(e){const t=[];for(let r=0,n=e.length;r<n;r++)t.push(e[r]);return t}let b=null;function ee(e={}){return b||(e.includeStyleProperties?(b=e.includeStyleProperties,b):(b=g(window.getComputedStyle(document.documentElement)),b))}function k(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function he(e){const t=k(e,"border-left-width"),r=k(e,"border-right-width");return e.clientWidth+t+r}function ge(e){const t=k(e,"border-top-width"),r=k(e,"border-bottom-width");return e.clientHeight+t+r}function ye(e,t={}){const r=t.width||he(e),n=t.height||ge(e);return{width:r,height:n}}function V(e){return new Promise((t,r)=>{const n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>t(n))})},n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=e})}async function be(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function we(e,t,r){const n="http://www.w3.org/2000/svg",s=document.createElementNS(n,"svg"),o=document.createElementNS(n,"foreignObject");return s.setAttribute("width",`${t}`),s.setAttribute("height",`${r}`),s.setAttribute("viewBox",`0 0 ${t} ${r}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),s.appendChild(o),o.appendChild(e),be(s)}const p=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||p(r,t)};function Se(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function xe(e,t){return ee(t).map(r=>{const n=e.getPropertyValue(r),s=e.getPropertyPriority(r);return`${r}: ${n}${s?" !important":""};`}).join(" ")}function Ee(e,t,r,n){const s=`.${e}:${t}`,o=r.cssText?Se(r):xe(r,n);return document.createTextNode(`${s}{${o}}`)}function z(e,t,r,n){const s=window.getComputedStyle(e,r),o=s.getPropertyValue("content");if(o===""||o==="none")return;const a=me();try{t.className=`${t.className} ${a}`}catch{return}const l=document.createElement("style");l.appendChild(Ee(a,r,s,n)),t.appendChild(l)}function Re(e,t,r){z(e,t,":before",r),z(e,t,":after",r)}const X="application/font-woff",K="image/jpeg",Ce={woff:X,woff2:X,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:K,jpeg:K,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function ve(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function M(e){const t=ve(e).toLowerCase();return Ce[t]||""}function Te(e){return e.split(/,/)[1]}function j(e){return e.search(/^(data:)/)!==-1}function Pe(e,t){return`data:${t};base64,${e}`}async function te(e,t,r){const n=await fetch(e,t);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);const s=await n.blob();return new Promise((o,a)=>{const l=new FileReader;l.onerror=a,l.onloadend=()=>{try{o(r({res:n,result:l.result}))}catch(i){a(i)}},l.readAsDataURL(s)})}const B={};function Le(e,t,r){let n=e.replace(/\?.*/,"");return r&&(n=e),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),t?`[${t}]${n}`:n}async function O(e,t,r){const n=Le(e,t,r.includeQueryParams);if(B[n]!=null)return B[n];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let s;try{const o=await te(e,r.fetchRequestInit,({res:a,result:l})=>(t||(t=a.headers.get("Content-Type")||""),Te(l)));s=Pe(o,t)}catch(o){s=r.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;o&&(a=typeof o=="string"?o:o.message),a&&console.warn(a)}return B[n]=s,s}async function $e(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):V(t)}async function Fe(e,t){if(e.currentSrc){const o=document.createElement("canvas"),a=o.getContext("2d");o.width=e.clientWidth,o.height=e.clientHeight,a?.drawImage(e,0,0,o.width,o.height);const l=o.toDataURL();return V(l)}const r=e.poster,n=M(r),s=await O(r,n,t);return V(s)}async function Ae(e,t){var r;try{if(!((r=e?.contentDocument)===null||r===void 0)&&r.body)return await D(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function ke(e,t){return p(e,HTMLCanvasElement)?$e(e):p(e,HTMLVideoElement)?Fe(e,t):p(e,HTMLIFrameElement)?Ae(e,t):e.cloneNode(ne(e))}const De=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",ne=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Ue(e,t,r){var n,s;if(ne(t))return t;let o=[];return De(e)&&e.assignedNodes?o=g(e.assignedNodes()):p(e,HTMLIFrameElement)&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?o=g(e.contentDocument.body.childNodes):o=g(((s=e.shadowRoot)!==null&&s!==void 0?s:e).childNodes),o.length===0||p(e,HTMLVideoElement)||await o.reduce((a,l)=>a.then(()=>D(l,r)).then(i=>{i&&t.appendChild(i)}),Promise.resolve()),t}function Ie(e,t,r){const n=t.style;if(!n)return;const s=window.getComputedStyle(e);s.cssText?(n.cssText=s.cssText,n.transformOrigin=s.transformOrigin):ee(r).forEach(o=>{let a=s.getPropertyValue(o);o==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),p(e,HTMLIFrameElement)&&o==="display"&&a==="inline"&&(a="block"),o==="d"&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),n.setProperty(o,a,s.getPropertyPriority(o))})}function Be(e,t){p(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),p(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Ve(e,t){if(p(e,HTMLSelectElement)){const r=t,n=Array.from(r.children).find(s=>e.value===s.getAttribute("value"));n&&n.setAttribute("selected","")}}function je(e,t,r){return p(t,Element)&&(Ie(e,t,r),Re(e,t,r),Be(e,t),Ve(e,t)),t}async function He(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const n={};for(let o=0;o<r.length;o++){const l=r[o].getAttribute("xlink:href");if(l){const i=e.querySelector(l),c=document.querySelector(l);!i&&c&&!n[l]&&(n[l]=await D(c,t,!0))}}const s=Object.values(n);if(s.length){const o="http://www.w3.org/1999/xhtml",a=document.createElementNS(o,"svg");a.setAttribute("xmlns",o),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";const l=document.createElementNS(o,"defs");a.appendChild(l);for(let i=0;i<s.length;i++)l.appendChild(s[i]);e.appendChild(a)}return e}async function D(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(n=>ke(n,t)).then(n=>Ue(e,n,t)).then(n=>je(e,n,t)).then(n=>He(n,t))}const re=/url\((['"]?)([^'"]+?)\1\)/g,Me=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Oe=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function We(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Ge(e){const t=[];return e.replace(re,(r,n,s)=>(t.push(s),r)),t.filter(r=>!j(r))}async function _e(e,t,r,n,s){try{const o=r?de(t,r):t,a=M(t);let l;return s||(l=await O(o,a,n)),e.replace(We(t),`$1${l}$3`)}catch{}return e}function qe(e,{preferredFontFormat:t}){return t?e.replace(Oe,r=>{for(;;){const[n,,s]=Me.exec(r)||[];if(!s)return"";if(s===t)return`src: ${n};`}}):e}function oe(e){return e.search(re)!==-1}async function se(e,t,r){if(!oe(e))return e;const n=qe(e,r);return Ge(n).reduce((o,a)=>o.then(l=>_e(l,a,t,r)),Promise.resolve(n))}async function w(e,t,r){var n;const s=(n=t.style)===null||n===void 0?void 0:n.getPropertyValue(e);if(s){const o=await se(s,null,r);return t.style.setProperty(e,o,t.style.getPropertyPriority(e)),!0}return!1}async function ze(e,t){await w("background",e,t)||await w("background-image",e,t),await w("mask",e,t)||await w("-webkit-mask",e,t)||await w("mask-image",e,t)||await w("-webkit-mask-image",e,t)}async function Xe(e,t){const r=p(e,HTMLImageElement);if(!(r&&!j(e.src))&&!(p(e,SVGImageElement)&&!j(e.href.baseVal)))return;const n=r?e.src:e.href.baseVal,s=await O(n,M(n),t);await new Promise((o,a)=>{e.onload=o,e.onerror=t.onImageErrorHandler?(...i)=>{try{o(t.onImageErrorHandler(...i))}catch(c){a(c)}}:a;const l=e;l.decode&&(l.decode=o),l.loading==="lazy"&&(l.loading="eager"),r?(e.srcset="",e.src=s):e.href.baseVal=s})}async function Ke(e,t){const n=g(e.childNodes).map(s=>ae(s,t));await Promise.all(n).then(()=>e)}async function ae(e,t){p(e,Element)&&(await ze(e,t),await Xe(e,t),await Ke(e,t))}function Je(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const n=t.style;return n!=null&&Object.keys(n).forEach(s=>{r[s]=n[s]}),e}const J={};async function Q(e){let t=J[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},J[e]=t,t}async function Y(e,t){let r=e.cssText;const n=/url\(["']?([^"')]+)["']?\)/g,o=(r.match(/url\([^)]+\)/g)||[]).map(async a=>{let l=a.replace(n,"$1");return l.startsWith("https://")||(l=new URL(l,e.url).href),te(l,t.fetchRequestInit,({result:i})=>(r=r.replace(a,`url(${i})`),[a,i]))});return Promise.all(o).then(()=>r)}function Z(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let n=e.replace(r,"");const s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const i=s.exec(n);if(i===null)break;t.push(i[0])}n=n.replace(s,"");const o=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(a,"gi");for(;;){let i=o.exec(n);if(i===null){if(i=l.exec(n),i===null)break;o.lastIndex=l.lastIndex}else l.lastIndex=o.lastIndex;t.push(i[0])}return t}async function Qe(e,t){const r=[],n=[];return e.forEach(s=>{if("cssRules"in s)try{g(s.cssRules||[]).forEach((o,a)=>{if(o.type===CSSRule.IMPORT_RULE){let l=a+1;const i=o.href,c=Q(i).then(d=>Y(d,t)).then(d=>Z(d).forEach(f=>{try{s.insertRule(f,f.startsWith("@import")?l+=1:s.cssRules.length)}catch(x){console.error("Error inserting rule from remote css",{rule:f,error:x})}})).catch(d=>{console.error("Error loading remote css",d.toString())});n.push(c)}})}catch(o){const a=e.find(l=>l.href==null)||document.styleSheets[0];s.href!=null&&n.push(Q(s.href).then(l=>Y(l,t)).then(l=>Z(l).forEach(i=>{a.insertRule(i,a.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",o)}}),Promise.all(n).then(()=>(e.forEach(s=>{if("cssRules"in s)try{g(s.cssRules||[]).forEach(o=>{r.push(o)})}catch(o){console.error(`Error while reading CSS rules from ${s.href}`,o)}}),r))}function Ye(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>oe(t.style.getPropertyValue("src")))}async function Ze(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=g(e.ownerDocument.styleSheets),n=await Qe(r,t);return Ye(n)}function le(e){return e.trim().replace(/["']/g,"")}function Ne(e){const t=new Set;function r(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(o=>{t.add(le(o))}),Array.from(n.children).forEach(o=>{o instanceof HTMLElement&&r(o)})}return r(e),t}async function et(e,t){const r=await Ze(e,t),n=Ne(e);return(await Promise.all(r.filter(o=>n.has(le(o.style.fontFamily))).map(o=>{const a=o.parentStyleSheet?o.parentStyleSheet.href:null;return se(o.cssText,a,t)}))).join(`
2
+ `)}async function tt(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await et(e,t);if(r){const n=document.createElement("style"),s=document.createTextNode(r);n.appendChild(s),e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}}async function nt(e,t={}){const{width:r,height:n}=ye(e,t),s=await D(e,t,!0);return await tt(s,t),await ae(s,t),Je(s,t),await we(s,r,n)}var A={exports:{}},rt=A.exports,N;function ot(){return N||(N=1,function(e,t){(function(r,n){e.exports=n()})(rt,function(){return function r(n,s,o){var a=window,l="application/octet-stream",i=o||l,c=n,d=!s&&!o&&c,f=document.createElement("a"),x=function(u){return String(u)},m=a.Blob||a.MozBlob||a.WebKitBlob||x,E=s||"download",h,U;if(m=m.call?m.bind(a):Blob,String(this)==="true"&&(c=[c,i],i=c[0],c=c[1]),d&&d.length<2048&&(E=d.split("/").pop().split("?")[0],f.href=d,f.href.indexOf(d)!==-1)){var R=new XMLHttpRequest;return R.open("GET",d,!0),R.responseType="blob",R.onload=function(u){r(u.target.response,E,l)},setTimeout(function(){R.send()},0),R}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(c))if(c.length>1024*1024*1.999&&m!==x)c=W(c),i=c.type||l;else return navigator.msSaveBlob?navigator.msSaveBlob(W(c),E):v(c);else if(/([\x80-\xff])/.test(c)){var C=0,I=new Uint8Array(c.length),ie=I.length;for(C;C<ie;++C)I[C]=c.charCodeAt(C);c=new m([I],{type:i})}h=c instanceof m?c:new m([c],{type:i});function W(u){var y=u.split(/[:;,]/),T=y[1],ce=y[2]=="base64"?atob:decodeURIComponent,G=ce(y.pop()),_=G.length,P=0,q=new Uint8Array(_);for(P;P<_;++P)q[P]=G.charCodeAt(P);return new m([q],{type:T})}function v(u,y){if("download"in f)return f.href=u,f.setAttribute("download",E),f.className="download-js-link",f.innerHTML="downloading...",f.style.display="none",document.body.appendChild(f),setTimeout(function(){f.click(),document.body.removeChild(f),y===!0&&setTimeout(function(){a.URL.revokeObjectURL(f.href)},250)},66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(u)&&(u="data:"+u.replace(/^data:([\w\/\-\+]+)/,l)),window.open(u)||confirm(`Displaying New Document
3
+
4
+ Use Save As... to download, then click back to return to this page.`)&&(location.href=u),!0;var T=document.createElement("iframe");document.body.appendChild(T),!y&&/^data:/.test(u)&&(u="data:"+u.replace(/^data:([\w\/\-\+]+)/,l)),T.src=u,setTimeout(function(){document.body.removeChild(T)},333)}if(navigator.msSaveBlob)return navigator.msSaveBlob(h,E);if(a.URL)v(a.URL.createObjectURL(h),!0);else{if(typeof h=="string"||h.constructor===x)try{return v("data:"+i+";base64,"+a.btoa(h))}catch{return v("data:"+i+","+encodeURIComponent(h))}U=new FileReader,U.onload=function(u){v(this.result)},U.readAsDataURL(h)}return!0}})}(A)),A.exports}var st=ot();const at=ue(st);function lt({children:e}){const t=pe.useRef(null),r=()=>{t.current&&nt(t.current).then(n=>{at(n,"exported-component.svg","image/svg+xml")}).catch(n=>{console.error("Failed to export as SVG:",n)})};return S.jsxs("div",{children:[S.jsx("div",{ref:t,children:e}),S.jsx("button",{onClick:r,children:"Download as SVG"})]})}const dt={title:"Components/System/Baseline",component:H,parameters:{docs:{description:{component:"Baseline component is used to display a baseline for the design system."}}},argTypes:{}},L={args:{title:"Node.js Support",toolGroups:[[{tool:"bun",supported:!0},{tool:"node",supported:!0,label:"22"},{tool:"node",supported:!0,label:"23"},{tool:"node",supported:!0,label:"24"}],[{tool:"npm",supported:!0},{tool:"node",supported:!0,label:"22"}],[{tool:"pnpm",supported:!1}]]}},$={render:e=>{const t=fe.useRef(null);return S.jsx(H,{...e,ref:t,onClick:()=>{console.log("Baseline clicked!",t.current)}})},args:{title:"Node.js Support",toolGroups:[[{tool:"bun",supported:!0},{tool:"node",supported:!0,label:"22"},{tool:"node",supported:!0,label:"23"},{tool:"node",supported:!0,label:"24"}],[{tool:"npm",supported:!0},{tool:"node",supported:!0,label:"22"}],[{tool:"pnpm",supported:!1}]]}},F={render:e=>S.jsx(lt,{children:S.jsx(H,{...e})}),args:{title:"Node.js Support",toolGroups:[[{tool:"bun",supported:!0},{tool:"node",supported:!0,label:"22"},{tool:"node",supported:!0,label:"23"},{tool:"node",supported:!0,label:"24"}],[{tool:"npm",supported:!0},{tool:"node",supported:!0,label:"22"}],[{tool:"pnpm",supported:!1}]]}};L.parameters={...L.parameters,docs:{...L.parameters?.docs,source:{originalSource:`{
5
+ args: {
6
+ title: 'Node.js Support',
7
+ toolGroups: [[{
8
+ tool: 'bun',
9
+ supported: true
10
+ }, {
11
+ tool: 'node',
12
+ supported: true,
13
+ label: '22'
14
+ }, {
15
+ tool: 'node',
16
+ supported: true,
17
+ label: '23'
18
+ }, {
19
+ tool: 'node',
20
+ supported: true,
21
+ label: '24'
22
+ }], [{
23
+ tool: 'npm',
24
+ supported: true
25
+ }, {
26
+ tool: 'node',
27
+ supported: true,
28
+ label: '22'
29
+ }], [{
30
+ tool: 'pnpm',
31
+ supported: false
32
+ }]]
33
+ }
34
+ }`,...L.parameters?.docs?.source}}};$.parameters={...$.parameters,docs:{...$.parameters?.docs,source:{originalSource:`{
35
+ render: args => {
36
+ const ref = useRef<HTMLDetailsElement>(null);
37
+ return <Baseline {...args} ref={ref} onClick={() => {
38
+ console.log('Baseline clicked!', ref.current);
39
+ }} />;
40
+ },
41
+ args: {
42
+ title: 'Node.js Support',
43
+ toolGroups: [[{
44
+ tool: 'bun',
45
+ supported: true
46
+ }, {
47
+ tool: 'node',
48
+ supported: true,
49
+ label: '22'
50
+ }, {
51
+ tool: 'node',
52
+ supported: true,
53
+ label: '23'
54
+ }, {
55
+ tool: 'node',
56
+ supported: true,
57
+ label: '24'
58
+ }], [{
59
+ tool: 'npm',
60
+ supported: true
61
+ }, {
62
+ tool: 'node',
63
+ supported: true,
64
+ label: '22'
65
+ }], [{
66
+ tool: 'pnpm',
67
+ supported: false
68
+ }]]
69
+ }
70
+ }`,...$.parameters?.docs?.source}}};F.parameters={...F.parameters,docs:{...F.parameters?.docs,source:{originalSource:`{
71
+ render: args => <ExportableWrapper>
72
+ <Baseline {...args} />
73
+ </ExportableWrapper>,
74
+ args: {
75
+ title: 'Node.js Support',
76
+ toolGroups: [[{
77
+ tool: 'bun',
78
+ supported: true
79
+ }, {
80
+ tool: 'node',
81
+ supported: true,
82
+ label: '22'
83
+ }, {
84
+ tool: 'node',
85
+ supported: true,
86
+ label: '23'
87
+ }, {
88
+ tool: 'node',
89
+ supported: true,
90
+ label: '24'
91
+ }], [{
92
+ tool: 'npm',
93
+ supported: true
94
+ }, {
95
+ tool: 'node',
96
+ supported: true,
97
+ label: '22'
98
+ }], [{
99
+ tool: 'pnpm',
100
+ supported: false
101
+ }]]
102
+ }
103
+ }`,...F.parameters?.docs?.source}}};const mt=["Default","WithRefAndClick","ExportableBaseline"];export{L as Default,F as ExportableBaseline,$ as WithRefAndClick,mt as __namedExportsOrder,dt as default};