@refraction-ui/astro 0.15.0 → 0.15.1

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 (129) hide show
  1. package/dist/astro-accordion/Accordion.astro +7 -0
  2. package/dist/astro-accordion/Accordion.stories.ts +10 -4
  3. package/dist/astro-ai/AIScript.astro +1 -1
  4. package/dist/astro-analytics/Analytics.stories.ts +5 -3
  5. package/dist/astro-analytics/AnalyticsScript.astro +1 -1
  6. package/dist/astro-animated-text/AnimatedText.stories.ts +7 -3
  7. package/dist/astro-app-shell/AppShell.stories.ts +14 -3
  8. package/dist/astro-auth/Auth.stories.ts +8 -3
  9. package/dist/astro-avatar/Avatar.stories.ts +6 -3
  10. package/dist/astro-avatar-group/AvatarGroup.stories.ts +10 -3
  11. package/dist/astro-badge/Badge.stories.ts +7 -7
  12. package/dist/astro-bottom-nav/BottomNav.stories.ts +6 -3
  13. package/dist/astro-breadcrumbs/Breadcrumbs.stories.ts +9 -3
  14. package/dist/astro-button/Button.stories.ts +9 -3
  15. package/dist/astro-calendar/Calendar.stories.ts +9 -3
  16. package/dist/astro-callout/Callout.stories.ts +6 -3
  17. package/dist/astro-card/Card.stories.ts +6 -3
  18. package/dist/astro-card-grid/CardGrid.stories.ts +5 -3
  19. package/dist/astro-carousel/Carousel.astro +7 -0
  20. package/dist/astro-carousel/Carousel.stories.ts +10 -4
  21. package/dist/astro-charts/Charts.stories.ts +9 -4
  22. package/dist/astro-checkbox/Checkbox.stories.ts +9 -3
  23. package/dist/astro-code-block/CodeBlock.stories.ts +5 -3
  24. package/dist/astro-code-editor/CodeEditor.astro +1 -1
  25. package/dist/astro-code-editor/CodeEditor.stories.ts +10 -3
  26. package/dist/astro-collapsible/Collapsible.stories.ts +7 -3
  27. package/dist/astro-command/Command.stories.ts +6 -3
  28. package/dist/astro-command-input/CommandInput.stories.ts +5 -3
  29. package/dist/astro-content-protection/ContentProtection.stories.ts +9 -3
  30. package/dist/astro-conversation/Chat.astro +1 -1
  31. package/dist/astro-conversation/Conversation.stories.ts +7 -3
  32. package/dist/astro-data-table/DataTable.astro +1 -1
  33. package/dist/astro-data-table/DataTable.stories.ts +15 -3
  34. package/dist/astro-date-picker/DatePicker.stories.ts +11 -3
  35. package/dist/astro-device-frame/DeviceFrame.stories.ts +7 -3
  36. package/dist/astro-dialog/Dialog.stories.ts +7 -3
  37. package/dist/astro-diff-viewer/DiffViewer.stories.ts +19 -3
  38. package/dist/astro-dropdown-menu/DropdownMenu.stories.ts +6 -3
  39. package/dist/astro-emoji-picker/EmojiPicker.stories.ts +5 -3
  40. package/dist/astro-feedback-dialog/FeedbackDialog.stories.ts +6 -3
  41. package/dist/astro-file-tree/FileTree.stories.ts +5 -3
  42. package/dist/astro-file-upload/FileUpload.stories.ts +9 -3
  43. package/dist/astro-floating-reactions/FloatingReactions.astro +1 -1
  44. package/dist/astro-footer/Footer.stories.ts +7 -3
  45. package/dist/astro-icon-system/IconSystem.stories.ts +5 -3
  46. package/dist/astro-inline-editor/InlineEditor.stories.ts +5 -3
  47. package/dist/astro-input/Input.stories.ts +11 -3
  48. package/dist/astro-input-group/InputGroup.stories.ts +6 -3
  49. package/dist/astro-install-prompt/InstallPrompt.stories.ts +9 -3
  50. package/dist/astro-keyboard-shortcut/KeyboardShortcut.stories.ts +7 -3
  51. package/dist/astro-language-selector/LanguageSelector.stories.ts +11 -3
  52. package/dist/astro-link-card/LinkCard.stories.ts +5 -3
  53. package/dist/astro-logger/Logger.stories.ts +10 -3
  54. package/dist/astro-logger/TelemetryScript.astro +1 -1
  55. package/dist/astro-markdown-renderer/MarkdownRenderer.stories.ts +8 -3
  56. package/dist/astro-mascot/Mascot.astro +274 -0
  57. package/dist/astro-mascot/Mascot.stories.ts +46 -0
  58. package/dist/astro-mascot/index.ts +11 -0
  59. package/dist/astro-mobile-nav/MobileNav.stories.ts +6 -3
  60. package/dist/astro-navbar/Navbar.stories.ts +16 -3
  61. package/dist/astro-otp-input/OtpInput.stories.ts +20 -3
  62. package/dist/astro-pagination/Pagination.stories.ts +3 -3
  63. package/dist/astro-password-input/PasswordInput.stories.ts +29 -0
  64. package/dist/astro-payment/Payment.stories.ts +8 -3
  65. package/dist/astro-popover/Popover.stories.ts +10 -3
  66. package/dist/astro-popover/PopoverClose.stories.ts +17 -0
  67. package/dist/astro-popover/PopoverContent.stories.ts +19 -0
  68. package/dist/astro-popover/PopoverTrigger.stories.ts +17 -0
  69. package/dist/astro-presence-indicator/PresenceIndicator.stories.ts +14 -3
  70. package/dist/astro-progress-display/BadgeDisplay.astro +1 -1
  71. package/dist/astro-progress-display/BadgeDisplay.stories.ts +17 -0
  72. package/dist/astro-progress-display/ProgressBar.stories.ts +21 -0
  73. package/dist/astro-progress-display/StatsGrid.astro +1 -1
  74. package/dist/astro-progress-display/StatsGrid.stories.ts +19 -0
  75. package/dist/astro-radio/RadioGroup.stories.ts +25 -0
  76. package/dist/astro-radio/RadioItem.stories.ts +23 -0
  77. package/dist/astro-reaction-bar/ReactionBar.astro +1 -1
  78. package/dist/astro-reaction-bar/ReactionBar.stories.ts +10 -3
  79. package/dist/astro-resizable-layout/ResizableDivider.stories.ts +19 -0
  80. package/dist/astro-resizable-layout/ResizableLayout.stories.ts +18 -3
  81. package/dist/astro-resizable-layout/ResizablePane.stories.ts +21 -0
  82. package/dist/astro-rich-editor/RichEditor.stories.ts +20 -3
  83. package/dist/astro-search-bar/SearchBar.stories.ts +14 -3
  84. package/dist/astro-search-bar/SearchResultItem.stories.ts +17 -0
  85. package/dist/astro-search-bar/SearchResults.stories.ts +17 -0
  86. package/dist/astro-segmented-control/SegmentedControl.stories.ts +23 -0
  87. package/dist/astro-segmented-control/SegmentedControlItem.stories.ts +25 -0
  88. package/dist/astro-select/Select.stories.ts +16 -3
  89. package/dist/astro-select/SelectContent.stories.ts +17 -0
  90. package/dist/astro-select/SelectItem.stories.ts +23 -0
  91. package/dist/astro-select/SelectTrigger.stories.ts +21 -0
  92. package/dist/astro-separator/Separator.stories.ts +23 -0
  93. package/dist/astro-sidebar/Sidebar.astro +1 -1
  94. package/dist/astro-sidebar/Sidebar.stories.ts +14 -3
  95. package/dist/astro-skeleton/Skeleton.stories.ts +14 -3
  96. package/dist/astro-skeleton/SkeletonText.stories.ts +19 -0
  97. package/dist/astro-skip-to-content/SkipToContent.stories.ts +3 -3
  98. package/dist/astro-slide-viewer/SlideViewer.stories.ts +14 -3
  99. package/dist/astro-social-auth-button/SocialAuthButton.stories.ts +23 -0
  100. package/dist/astro-social-auth-button/SocialAuthRow.stories.ts +17 -0
  101. package/dist/astro-status-indicator/StatusIndicator.stories.ts +14 -3
  102. package/dist/astro-steps/Steps.stories.ts +3 -3
  103. package/dist/astro-switch/Switch.stories.ts +14 -3
  104. package/dist/astro-table-of-contents/TableOfContents.stories.ts +8 -3
  105. package/dist/astro-tabs/Tabs.stories.ts +12 -3
  106. package/dist/astro-tabs/TabsContent.stories.ts +21 -0
  107. package/dist/astro-tabs/TabsList.stories.ts +17 -0
  108. package/dist/astro-tabs/TabsTrigger.stories.ts +21 -0
  109. package/dist/astro-textarea/Textarea.stories.ts +22 -3
  110. package/dist/astro-theme/ThemeScript.stories.ts +23 -0
  111. package/dist/astro-theme/ThemeToggle.stories.ts +21 -0
  112. package/dist/astro-thread-view/ThreadView.astro +1 -1
  113. package/dist/astro-thread-view/ThreadView.stories.ts +10 -3
  114. package/dist/astro-toast/Toast.stories.ts +16 -3
  115. package/dist/astro-toast/Toaster.stories.ts +17 -0
  116. package/dist/astro-tooltip/Tooltip.stories.ts +10 -3
  117. package/dist/astro-tooltip/TooltipContent.stories.ts +19 -0
  118. package/dist/astro-tooltip/TooltipTrigger.stories.ts +17 -0
  119. package/dist/astro-version-selector/VersionSelector.astro +2 -2
  120. package/dist/astro-version-selector/VersionSelector.stories.ts +12 -3
  121. package/dist/astro-video-grid/VideoGrid.astro +1 -1
  122. package/dist/astro-video-player/VideoPlayer.stories.ts +16 -3
  123. package/dist/astro-voice-pill/VoicePill.stories.ts +24 -3
  124. package/dist/astro-waveform/Waveform.stories.ts +26 -3
  125. package/dist/index.ts +1 -0
  126. package/dist/mascot/index.ts +2 -0
  127. package/dist/mascot/mascot.styles.ts +33 -0
  128. package/dist/mascot/mascot.ts +121 -0
  129. package/package.json +2 -1
@@ -0,0 +1,25 @@
1
+ import Component from './SegmentedControlItem.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/SegmentedControlItem',
5
+ component: Component,
6
+ argTypes: {
7
+ value: { control: 'text' },
8
+ size: { control: 'select', options: ['sm', 'default', 'lg', 'icon'] },
9
+ checked: { control: 'boolean' },
10
+ disabled: { control: 'boolean' },
11
+ default: { control: 'text' },
12
+ },
13
+ }
14
+
15
+ export default meta
16
+
17
+ export const Default = {
18
+ args: {
19
+ value: '',
20
+ size: 'default',
21
+ checked: false,
22
+ disabled: false,
23
+ default: '<span>default content</span>',
24
+ }
25
+ }
@@ -1,12 +1,25 @@
1
1
  import Component from './Select.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/Select',
7
5
  component: Component,
6
+ argTypes: {
7
+ value: { control: 'text' },
8
+ placeholder: { control: 'text' },
9
+ disabled: { control: 'boolean' },
10
+ name: { control: 'text' },
11
+ default: { control: 'text' },
12
+ },
8
13
  }
9
14
 
10
15
  export default meta
11
16
 
12
- export const Default = { args: {} }
17
+ export const Default = {
18
+ args: {
19
+ value: '',
20
+ placeholder: '',
21
+ disabled: false,
22
+ name: '',
23
+ default: '<span>default content</span>',
24
+ }
25
+ }
@@ -0,0 +1,17 @@
1
+ import Component from './SelectContent.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/SelectContent',
5
+ component: Component,
6
+ argTypes: {
7
+ default: { control: 'text' },
8
+ },
9
+ }
10
+
11
+ export default meta
12
+
13
+ export const Default = {
14
+ args: {
15
+ default: '<span>default content</span>',
16
+ }
17
+ }
@@ -0,0 +1,23 @@
1
+ import Component from './SelectItem.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/SelectItem',
5
+ component: Component,
6
+ argTypes: {
7
+ value: { control: 'text' },
8
+ disabled: { control: 'boolean' },
9
+ selected: { control: 'boolean' },
10
+ default: { control: 'text' },
11
+ },
12
+ }
13
+
14
+ export default meta
15
+
16
+ export const Default = {
17
+ args: {
18
+ value: '',
19
+ disabled: false,
20
+ selected: false,
21
+ default: '<span>default content</span>',
22
+ }
23
+ }
@@ -0,0 +1,21 @@
1
+ import Component from './SelectTrigger.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/SelectTrigger',
5
+ component: Component,
6
+ argTypes: {
7
+ size: { control: 'select', options: ['sm', 'default', 'lg', 'icon'] },
8
+ placeholder: { control: 'text' },
9
+ default: { control: 'text' },
10
+ },
11
+ }
12
+
13
+ export default meta
14
+
15
+ export const Default = {
16
+ args: {
17
+ size: 'default',
18
+ placeholder: '',
19
+ default: '<span>default content</span>',
20
+ }
21
+ }
@@ -0,0 +1,23 @@
1
+ import Component from './Separator.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/Separator',
5
+ component: Component,
6
+ argTypes: {
7
+ orientation: { control: 'text' },
8
+ label: { control: 'text' },
9
+ decorative: { control: 'boolean' },
10
+ default: { control: 'text' },
11
+ },
12
+ }
13
+
14
+ export default meta
15
+
16
+ export const Default = {
17
+ args: {
18
+ orientation: '',
19
+ label: '',
20
+ decorative: false,
21
+ default: '<span>default content</span>',
22
+ }
23
+ }
@@ -32,7 +32,7 @@ const classes = cn(
32
32
 
33
33
  <aside class={classes} {...api.ariaProps} {...props}>
34
34
  <div class="flex flex-col gap-4 p-4">
35
- {api.visibleSections.map((section, sIdx) => (
35
+ {(api.visibleSections || []).map((section, sIdx) => (
36
36
  <div>
37
37
  {section.title && !collapsed && (
38
38
  <h3 class="mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground">
@@ -1,12 +1,23 @@
1
1
  import Component from './Sidebar.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/Sidebar',
7
5
  component: Component,
6
+ argTypes: {
7
+ sections: { control: 'text' },
8
+ currentPath: { control: 'text' },
9
+ collapsed: { control: 'boolean' },
10
+ userRoles: { control: 'text' },
11
+ },
8
12
  }
9
13
 
10
14
  export default meta
11
15
 
12
- export const Default = { args: {} }
16
+ export const Default = {
17
+ args: {
18
+ sections: '',
19
+ currentPath: '',
20
+ collapsed: false,
21
+ userRoles: '',
22
+ },
23
+ }
@@ -1,12 +1,23 @@
1
1
  import Component from './Skeleton.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/Skeleton',
7
5
  component: Component,
6
+ argTypes: {
7
+ shape: { control: 'text' },
8
+ width: { control: 'number' },
9
+ height: { control: 'number' },
10
+ animate: { control: 'boolean' },
11
+ },
8
12
  }
9
13
 
10
14
  export default meta
11
15
 
12
- export const Default = { args: {} }
16
+ export const Default = {
17
+ args: {
18
+ shape: '',
19
+ width: 0,
20
+ height: 0,
21
+ animate: false,
22
+ },
23
+ }
@@ -0,0 +1,19 @@
1
+ import Component from './SkeletonText.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/SkeletonText',
5
+ component: Component,
6
+ argTypes: {
7
+ lines: { control: 'number' },
8
+ animate: { control: 'boolean' },
9
+ },
10
+ }
11
+
12
+ export default meta
13
+
14
+ export const Default = {
15
+ args: {
16
+ lines: 0,
17
+ animate: false,
18
+ },
19
+ }
@@ -1,7 +1,5 @@
1
1
  import Component from './SkipToContent.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/SkipToContent',
7
5
  component: Component,
@@ -9,4 +7,6 @@ const meta = {
9
7
 
10
8
  export default meta
11
9
 
12
- export const Default = { args: {} }
10
+ export const Default = {
11
+ args: {},
12
+ }
@@ -1,12 +1,23 @@
1
1
  import Component from './SlideViewer.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/SlideViewer',
7
5
  component: Component,
6
+ argTypes: {
7
+ slides: { control: 'text' },
8
+ initialSlide: { control: 'number' },
9
+ size: { control: 'select', options: ['sm', 'default', 'lg', 'icon'] },
10
+ default: { control: 'text' },
11
+ },
8
12
  }
9
13
 
10
14
  export default meta
11
15
 
12
- export const Default = { args: {} }
16
+ export const Default = {
17
+ args: {
18
+ slides: '',
19
+ initialSlide: 0,
20
+ size: 'default',
21
+ default: '<span>default content</span>',
22
+ }
23
+ }
@@ -0,0 +1,23 @@
1
+ import Component from './SocialAuthButton.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/SocialAuthButton',
5
+ component: Component,
6
+ argTypes: {
7
+ provider: { control: 'text' },
8
+ lastUsed: { control: 'boolean' },
9
+ loading: { control: 'boolean' },
10
+ disabled: { control: 'boolean' },
11
+ },
12
+ }
13
+
14
+ export default meta
15
+
16
+ export const Default = {
17
+ args: {
18
+ provider: '',
19
+ lastUsed: false,
20
+ loading: false,
21
+ disabled: false,
22
+ },
23
+ }
@@ -0,0 +1,17 @@
1
+ import Component from './SocialAuthRow.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/SocialAuthRow',
5
+ component: Component,
6
+ argTypes: {
7
+ default: { control: 'text' },
8
+ },
9
+ }
10
+
11
+ export default meta
12
+
13
+ export const Default = {
14
+ args: {
15
+ default: '<span>default content</span>',
16
+ }
17
+ }
@@ -1,12 +1,23 @@
1
1
  import Component from './StatusIndicator.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/StatusIndicator',
7
5
  component: Component,
6
+ argTypes: {
7
+ type: { control: 'text' },
8
+ label: { control: 'text' },
9
+ pulse: { control: 'boolean' },
10
+ showLabel: { control: 'boolean' },
11
+ },
8
12
  }
9
13
 
10
14
  export default meta
11
15
 
12
- export const Default = { args: {} }
16
+ export const Default = {
17
+ args: {
18
+ type: '',
19
+ label: '',
20
+ pulse: false,
21
+ showLabel: false,
22
+ },
23
+ }
@@ -1,7 +1,5 @@
1
1
  import Component from './Steps.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/Steps',
7
5
  component: Component,
@@ -9,4 +7,6 @@ const meta = {
9
7
 
10
8
  export default meta
11
9
 
12
- export const Default = { args: {} }
10
+ export const Default = {
11
+ args: {},
12
+ }
@@ -1,12 +1,23 @@
1
1
  import Component from './Switch.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/Switch',
7
5
  component: Component,
6
+ argTypes: {
7
+ checked: { control: 'boolean' },
8
+ disabled: { control: 'boolean' },
9
+ size: { control: 'select', options: ['sm', 'default', 'lg', 'icon'] },
10
+ name: { control: 'text' },
11
+ },
8
12
  }
9
13
 
10
14
  export default meta
11
15
 
12
- export const Default = { args: {} }
16
+ export const Default = {
17
+ args: {
18
+ checked: false,
19
+ disabled: false,
20
+ size: 'default',
21
+ name: '',
22
+ },
23
+ }
@@ -1,12 +1,17 @@
1
1
  import Component from './TableOfContents.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/TableOfContents',
7
5
  component: Component,
6
+ argTypes: {
7
+ selectors: { control: 'text' },
8
+ },
8
9
  }
9
10
 
10
11
  export default meta
11
12
 
12
- export const Default = { args: {} }
13
+ export const Default = {
14
+ args: {
15
+ selectors: '',
16
+ },
17
+ }
@@ -1,12 +1,21 @@
1
1
  import Component from './Tabs.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/Tabs',
7
5
  component: Component,
6
+ argTypes: {
7
+ defaultValue: { control: 'text' },
8
+ orientation: { control: 'text' },
9
+ default: { control: 'text' },
10
+ },
8
11
  }
9
12
 
10
13
  export default meta
11
14
 
12
- export const Default = { args: {} }
15
+ export const Default = {
16
+ args: {
17
+ defaultValue: '',
18
+ orientation: '',
19
+ default: '<span>default content</span>',
20
+ }
21
+ }
@@ -0,0 +1,21 @@
1
+ import Component from './TabsContent.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/TabsContent',
5
+ component: Component,
6
+ argTypes: {
7
+ value: { control: 'text' },
8
+ isActive: { control: 'boolean' },
9
+ default: { control: 'text' },
10
+ },
11
+ }
12
+
13
+ export default meta
14
+
15
+ export const Default = {
16
+ args: {
17
+ value: '',
18
+ isActive: false,
19
+ default: '<span>default content</span>',
20
+ }
21
+ }
@@ -0,0 +1,17 @@
1
+ import Component from './TabsList.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/TabsList',
5
+ component: Component,
6
+ argTypes: {
7
+ default: { control: 'text' },
8
+ },
9
+ }
10
+
11
+ export default meta
12
+
13
+ export const Default = {
14
+ args: {
15
+ default: '<span>default content</span>',
16
+ }
17
+ }
@@ -0,0 +1,21 @@
1
+ import Component from './TabsTrigger.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/TabsTrigger',
5
+ component: Component,
6
+ argTypes: {
7
+ value: { control: 'text' },
8
+ isActive: { control: 'boolean' },
9
+ default: { control: 'text' },
10
+ },
11
+ }
12
+
13
+ export default meta
14
+
15
+ export const Default = {
16
+ args: {
17
+ value: '',
18
+ isActive: false,
19
+ default: '<span>default content</span>',
20
+ }
21
+ }
@@ -1,12 +1,31 @@
1
1
  import Component from './Textarea.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/Textarea',
7
5
  component: Component,
6
+ argTypes: {
7
+ size: { control: 'select', options: ['sm', 'default', 'lg', 'icon'] },
8
+ disabled: { control: 'boolean' },
9
+ readonly: { control: 'boolean' },
10
+ required: { control: 'boolean' },
11
+ rows: { control: 'number' },
12
+ maxRows: { control: 'number' },
13
+ 'aria-invalid': { control: 'boolean' },
14
+ default: { control: 'text' },
15
+ },
8
16
  }
9
17
 
10
18
  export default meta
11
19
 
12
- export const Default = { args: {} }
20
+ export const Default = {
21
+ args: {
22
+ size: 'default',
23
+ disabled: false,
24
+ readonly: false,
25
+ required: false,
26
+ rows: 0,
27
+ maxRows: 0,
28
+ 'aria-invalid': false,
29
+ default: '<span>default content</span>',
30
+ }
31
+ }
@@ -0,0 +1,23 @@
1
+ import Component from './ThemeScript.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/ThemeScript',
5
+ component: Component,
6
+ argTypes: {
7
+ storageKey: { control: 'text' },
8
+ attribute: { control: 'text' },
9
+ defaultMode: { control: 'text' },
10
+ enableSystem: { control: 'boolean' },
11
+ },
12
+ }
13
+
14
+ export default meta
15
+
16
+ export const Default = {
17
+ args: {
18
+ storageKey: '',
19
+ attribute: '',
20
+ defaultMode: '',
21
+ enableSystem: false,
22
+ },
23
+ }
@@ -0,0 +1,21 @@
1
+ import Component from './ThemeToggle.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/ThemeToggle',
5
+ component: Component,
6
+ argTypes: {
7
+ variant: { control: 'select', options: ['default', 'secondary', 'destructive', 'outline', 'ghost', 'link'] },
8
+ storageKey: { control: 'text' },
9
+ attribute: { control: 'text' },
10
+ },
11
+ }
12
+
13
+ export default meta
14
+
15
+ export const Default = {
16
+ args: {
17
+ variant: 'default',
18
+ storageKey: '',
19
+ attribute: '',
20
+ },
21
+ }
@@ -41,7 +41,7 @@ const api = createThreadView({ messages, currentUserId })
41
41
  data-rfr-thread-view
42
42
  {...props}
43
43
  >
44
- {messages.map((message) => {
44
+ {(messages || []).map((message) => {
45
45
  const msgAriaProps = api.getMessageAriaProps(message)
46
46
  const replyAriaProps = api.getReplyButtonAriaProps(message.id)
47
47
  return (
@@ -1,12 +1,19 @@
1
1
  import Component from './ThreadView.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/ThreadView',
7
5
  component: Component,
6
+ argTypes: {
7
+ messages: { control: 'text' },
8
+ currentUserId: { control: 'text' },
9
+ },
8
10
  }
9
11
 
10
12
  export default meta
11
13
 
12
- export const Default = { args: {} }
14
+ export const Default = {
15
+ args: {
16
+ messages: '',
17
+ currentUserId: '',
18
+ },
19
+ }
@@ -1,12 +1,25 @@
1
1
  import Component from './Toast.astro'
2
2
 
3
- // Auto-generated baseline story. Renders the component with empty args;
4
- // components that require props show a render error (enrich by hand as needed).
5
3
  const meta = {
6
4
  title: 'Astro/Toast',
7
5
  component: Component,
6
+ argTypes: {
7
+ variant: { control: 'select', options: ['default', 'secondary', 'destructive', 'outline', 'ghost', 'link'] },
8
+ duration: { control: 'number' },
9
+ dismissible: { control: 'boolean' },
10
+ message: { control: 'text' },
11
+ default: { control: 'text' },
12
+ },
8
13
  }
9
14
 
10
15
  export default meta
11
16
 
12
- export const Default = { args: {} }
17
+ export const Default = {
18
+ args: {
19
+ variant: 'default',
20
+ duration: 0,
21
+ dismissible: false,
22
+ message: '',
23
+ default: '<span>default content</span>',
24
+ }
25
+ }
@@ -0,0 +1,17 @@
1
+ import Component from './Toaster.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/Toaster',
5
+ component: Component,
6
+ argTypes: {
7
+ default: { control: 'text' },
8
+ },
9
+ }
10
+
11
+ export default meta
12
+
13
+ export const Default = {
14
+ args: {
15
+ default: '<span>default content</span>',
16
+ }
17
+ }