@refraction-ui/astro 0.14.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 (144) 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-kanban-board/KanbanBoard.astro +92 -0
  51. package/dist/astro-kanban-board/index.ts +1 -0
  52. package/dist/astro-keyboard-shortcut/KeyboardShortcut.stories.ts +7 -3
  53. package/dist/astro-language-selector/LanguageSelector.stories.ts +11 -3
  54. package/dist/astro-link-card/LinkCard.stories.ts +5 -3
  55. package/dist/astro-logger/Logger.stories.ts +10 -3
  56. package/dist/astro-logger/TelemetryScript.astro +1 -1
  57. package/dist/astro-markdown-renderer/MarkdownRenderer.stories.ts +8 -3
  58. package/dist/astro-mascot/Mascot.astro +274 -0
  59. package/dist/astro-mascot/Mascot.stories.ts +46 -0
  60. package/dist/astro-mascot/index.ts +11 -0
  61. package/dist/astro-mobile-nav/MobileNav.stories.ts +6 -3
  62. package/dist/astro-navbar/Navbar.stories.ts +16 -3
  63. package/dist/astro-otp-input/OtpInput.stories.ts +20 -3
  64. package/dist/astro-pagination/Pagination.stories.ts +3 -3
  65. package/dist/astro-password-input/PasswordInput.stories.ts +29 -0
  66. package/dist/astro-payment/Payment.stories.ts +8 -3
  67. package/dist/astro-popover/Popover.stories.ts +10 -3
  68. package/dist/astro-popover/PopoverClose.stories.ts +17 -0
  69. package/dist/astro-popover/PopoverContent.stories.ts +19 -0
  70. package/dist/astro-popover/PopoverTrigger.stories.ts +17 -0
  71. package/dist/astro-presence-indicator/PresenceIndicator.stories.ts +14 -3
  72. package/dist/astro-progress-display/BadgeDisplay.astro +1 -1
  73. package/dist/astro-progress-display/BadgeDisplay.stories.ts +17 -0
  74. package/dist/astro-progress-display/ProgressBar.stories.ts +21 -0
  75. package/dist/astro-progress-display/StatsGrid.astro +1 -1
  76. package/dist/astro-progress-display/StatsGrid.stories.ts +19 -0
  77. package/dist/astro-radio/RadioGroup.stories.ts +25 -0
  78. package/dist/astro-radio/RadioItem.stories.ts +23 -0
  79. package/dist/astro-reaction-bar/ReactionBar.astro +1 -1
  80. package/dist/astro-reaction-bar/ReactionBar.stories.ts +10 -3
  81. package/dist/astro-resizable-layout/ResizableDivider.stories.ts +19 -0
  82. package/dist/astro-resizable-layout/ResizableLayout.stories.ts +18 -3
  83. package/dist/astro-resizable-layout/ResizablePane.stories.ts +21 -0
  84. package/dist/astro-rich-editor/RichEditor.stories.ts +20 -3
  85. package/dist/astro-search-bar/SearchBar.stories.ts +14 -3
  86. package/dist/astro-search-bar/SearchResultItem.stories.ts +17 -0
  87. package/dist/astro-search-bar/SearchResults.stories.ts +17 -0
  88. package/dist/astro-segmented-control/SegmentedControl.stories.ts +23 -0
  89. package/dist/astro-segmented-control/SegmentedControlItem.stories.ts +25 -0
  90. package/dist/astro-select/Select.stories.ts +16 -3
  91. package/dist/astro-select/SelectContent.stories.ts +17 -0
  92. package/dist/astro-select/SelectItem.stories.ts +23 -0
  93. package/dist/astro-select/SelectTrigger.stories.ts +21 -0
  94. package/dist/astro-separator/Separator.stories.ts +23 -0
  95. package/dist/astro-sidebar/Sidebar.astro +1 -1
  96. package/dist/astro-sidebar/Sidebar.stories.ts +14 -3
  97. package/dist/astro-skeleton/Skeleton.stories.ts +14 -3
  98. package/dist/astro-skeleton/SkeletonText.stories.ts +19 -0
  99. package/dist/astro-skip-to-content/SkipToContent.stories.ts +3 -3
  100. package/dist/astro-slide-viewer/SlideViewer.stories.ts +14 -3
  101. package/dist/astro-slot-picker/SlotPicker.astro +105 -0
  102. package/dist/astro-slot-picker/index.ts +1 -0
  103. package/dist/astro-social-auth-button/SocialAuthButton.stories.ts +23 -0
  104. package/dist/astro-social-auth-button/SocialAuthRow.stories.ts +17 -0
  105. package/dist/astro-sortable-list/SortableList.astro +68 -0
  106. package/dist/astro-sortable-list/index.ts +1 -0
  107. package/dist/astro-status-indicator/StatusIndicator.stories.ts +14 -3
  108. package/dist/astro-steps/Steps.stories.ts +3 -3
  109. package/dist/astro-switch/Switch.stories.ts +14 -3
  110. package/dist/astro-table-of-contents/TableOfContents.stories.ts +8 -3
  111. package/dist/astro-tabs/Tabs.stories.ts +12 -3
  112. package/dist/astro-tabs/TabsContent.stories.ts +21 -0
  113. package/dist/astro-tabs/TabsList.stories.ts +17 -0
  114. package/dist/astro-tabs/TabsTrigger.stories.ts +21 -0
  115. package/dist/astro-textarea/Textarea.stories.ts +22 -3
  116. package/dist/astro-theme/ThemeScript.stories.ts +23 -0
  117. package/dist/astro-theme/ThemeToggle.stories.ts +21 -0
  118. package/dist/astro-thread-view/ThreadView.astro +1 -1
  119. package/dist/astro-thread-view/ThreadView.stories.ts +10 -3
  120. package/dist/astro-toast/Toast.stories.ts +16 -3
  121. package/dist/astro-toast/Toaster.stories.ts +17 -0
  122. package/dist/astro-tooltip/Tooltip.stories.ts +10 -3
  123. package/dist/astro-tooltip/TooltipContent.stories.ts +19 -0
  124. package/dist/astro-tooltip/TooltipTrigger.stories.ts +17 -0
  125. package/dist/astro-version-selector/VersionSelector.astro +2 -2
  126. package/dist/astro-version-selector/VersionSelector.stories.ts +12 -3
  127. package/dist/astro-video-grid/VideoGrid.astro +1 -1
  128. package/dist/astro-video-player/VideoPlayer.stories.ts +16 -3
  129. package/dist/astro-voice-pill/VoicePill.stories.ts +24 -3
  130. package/dist/astro-waveform/Waveform.stories.ts +26 -3
  131. package/dist/index.ts +4 -0
  132. package/dist/kanban-board/index.ts +20 -0
  133. package/dist/kanban-board/kanban-board.styles.ts +78 -0
  134. package/dist/kanban-board/kanban-board.ts +82 -0
  135. package/dist/mascot/index.ts +2 -0
  136. package/dist/mascot/mascot.styles.ts +33 -0
  137. package/dist/mascot/mascot.ts +121 -0
  138. package/dist/slot-picker/index.ts +18 -0
  139. package/dist/slot-picker/slot-picker.styles.ts +70 -0
  140. package/dist/slot-picker/slot-picker.ts +64 -0
  141. package/dist/sortable-list/index.ts +13 -0
  142. package/dist/sortable-list/sortable-list.styles.ts +42 -0
  143. package/dist/sortable-list/sortable-list.ts +90 -0
  144. package/package.json +5 -1
@@ -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
+ }
@@ -0,0 +1,68 @@
1
+ ---
2
+ import {
3
+ createSortableList,
4
+ sortableListVariants,
5
+ sortableListRowVariants,
6
+ sortableListGripClass,
7
+ sortableListContentClass,
8
+ } from '../sortable-list/index.ts'
9
+ import { cn } from '../shared/index.ts'
10
+
11
+ interface Item {
12
+ /** Unique key for the item. */
13
+ id: string | number
14
+ /** Display label rendered as the row content. */
15
+ label: string
16
+ }
17
+
18
+ interface Props extends astroHTML.JSX.HTMLAttributes {
19
+ /** The ordered list of items to render. */
20
+ items: Item[]
21
+ /** Disables drag affordances visually. */
22
+ disabled?: boolean
23
+ }
24
+
25
+ const {
26
+ items,
27
+ disabled = false,
28
+ class: className,
29
+ ...rest
30
+ } = Astro.props
31
+
32
+ const { ariaProps, dataAttributes } = createSortableList()
33
+ ---
34
+
35
+ <div
36
+ class={cn(sortableListVariants({ disabled: disabled ? 'true' : 'false' }), className)}
37
+ {...ariaProps}
38
+ {...dataAttributes}
39
+ {...rest}
40
+ >
41
+ {
42
+ items.map((item) => (
43
+ <div
44
+ role="listitem"
45
+ class={sortableListRowVariants({ dragging: 'false' })}
46
+ >
47
+ {/* Grip handle — static in SSR; interactivity is React-only */}
48
+ <span class={sortableListGripClass} aria-hidden="true">
49
+ <svg
50
+ width="16"
51
+ height="16"
52
+ viewBox="0 0 16 16"
53
+ fill="none"
54
+ aria-hidden="true"
55
+ >
56
+ <path
57
+ d="M2 4h12M2 8h12M2 12h12"
58
+ stroke="currentColor"
59
+ stroke-width="1.5"
60
+ stroke-linecap="round"
61
+ />
62
+ </svg>
63
+ </span>
64
+ <span class={sortableListContentClass}>{item.label}</span>
65
+ </div>
66
+ ))
67
+ }
68
+ </div>
@@ -0,0 +1 @@
1
+ export {}
@@ -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
+ }
@@ -1,12 +1,19 @@
1
1
  import Component from './Tooltip.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/Tooltip',
7
5
  component: Component,
6
+ argTypes: {
7
+ delayDuration: { control: 'number' },
8
+ default: { 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
+ delayDuration: 0,
17
+ default: '<span>default content</span>',
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ import Component from './TooltipContent.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/TooltipContent',
5
+ component: Component,
6
+ argTypes: {
7
+ side: { control: 'text' },
8
+ default: { control: 'text' },
9
+ },
10
+ }
11
+
12
+ export default meta
13
+
14
+ export const Default = {
15
+ args: {
16
+ side: '',
17
+ default: '<span>default content</span>',
18
+ }
19
+ }
@@ -0,0 +1,17 @@
1
+ import Component from './TooltipTrigger.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/TooltipTrigger',
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
+ }
@@ -23,7 +23,7 @@ const {
23
23
  } = Astro.props
24
24
 
25
25
  const api = createVersionSelector({ value, versions })
26
- const selectedOpt = versions.find((v) => v.value === value)
26
+ const selectedOpt = (versions || []).find((v) => v.value === value)
27
27
  const displayLabel = selectedOpt ? selectedOpt.label : placeholder
28
28
  ---
29
29
 
@@ -106,7 +106,7 @@ const displayLabel = selectedOpt ? selectedOpt.label : placeholder
106
106
  selectedValue = value
107
107
  root.setAttribute('data-rfr-version-value', value)
108
108
 
109
- const opt = versions.find((v) => v.value === value)
109
+ const opt = (versions || []).find((v) => v.value === value)
110
110
  label.textContent = opt ? opt.label : placeholder
111
111
 
112
112
  // Update latest badge on trigger
@@ -1,12 +1,21 @@
1
1
  import Component from './VersionSelector.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/VersionSelector',
7
5
  component: Component,
6
+ argTypes: {
7
+ value: { control: 'text' },
8
+ versions: { control: 'text' },
9
+ placeholder: { 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
+ value: '',
18
+ versions: '',
19
+ placeholder: '',
20
+ },
21
+ }
@@ -53,7 +53,7 @@ const gridStyle =
53
53
 
54
54
  const spotlightParticipant =
55
55
  effectiveLayout === 'speaker'
56
- ? (participants.find((p) => p.id === spotlightId) ?? participants[0])
56
+ ? ((participants || []).find((p) => p.id === spotlightId) ?? participants[0])
57
57
  : undefined
58
58
 
59
59
  const filmstrip =
@@ -1,12 +1,25 @@
1
1
  import Component from './VideoPlayer.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/VideoPlayer',
7
5
  component: Component,
6
+ argTypes: {
7
+ src: { control: 'text' },
8
+ poster: { control: 'text' },
9
+ autoplay: { control: 'boolean' },
10
+ muted: { control: 'boolean' },
11
+ controls: { control: 'boolean' },
12
+ },
8
13
  }
9
14
 
10
15
  export default meta
11
16
 
12
- export const Default = { args: {} }
17
+ export const Default = {
18
+ args: {
19
+ src: '',
20
+ poster: '',
21
+ autoplay: false,
22
+ muted: false,
23
+ controls: false,
24
+ },
25
+ }
@@ -1,12 +1,33 @@
1
1
  import Component from './VoicePill.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/VoicePill',
7
5
  component: Component,
6
+ argTypes: {
7
+ speaker: { control: 'text' },
8
+ label: { control: 'text' },
9
+ sub: { control: 'text' },
10
+ subtitle: { control: 'text' },
11
+ intensity: { control: 'number' },
12
+ muted: { control: 'boolean' },
13
+ position: { control: 'text' },
14
+ showMuteButton: { control: 'boolean' },
15
+ avatar: { control: 'text' },
16
+ },
8
17
  }
9
18
 
10
19
  export default meta
11
20
 
12
- export const Default = { args: {} }
21
+ export const Default = {
22
+ args: {
23
+ speaker: '',
24
+ label: '',
25
+ sub: '',
26
+ subtitle: '',
27
+ intensity: 0,
28
+ muted: false,
29
+ position: '',
30
+ showMuteButton: false,
31
+ avatar: '<span>avatar content</span>',
32
+ }
33
+ }
@@ -1,12 +1,35 @@
1
1
  import Component from './Waveform.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/Waveform',
7
5
  component: Component,
6
+ argTypes: {
7
+ samples: { control: 'text' },
8
+ intensity: { control: 'number' },
9
+ amplitude: { control: 'number' },
10
+ variant: { control: 'select', options: ['default', 'secondary', 'destructive', 'outline', 'ghost', 'link'] },
11
+ height: { control: 'number' },
12
+ width: { control: 'number' },
13
+ barCount: { control: 'number' },
14
+ smoothing: { control: 'number' },
15
+ color: { control: 'text' },
16
+ paused: { control: 'boolean' },
17
+ },
8
18
  }
9
19
 
10
20
  export default meta
11
21
 
12
- export const Default = { args: {} }
22
+ export const Default = {
23
+ args: {
24
+ samples: '',
25
+ intensity: 0,
26
+ amplitude: 0,
27
+ variant: 'default',
28
+ height: 0,
29
+ width: 0,
30
+ barCount: 0,
31
+ smoothing: 0,
32
+ color: '',
33
+ paused: false,
34
+ },
35
+ }