@refraction-ui/astro 0.15.0 → 0.15.2

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 (132) 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.astro +39 -355
  35. package/dist/astro-date-picker/DatePicker.stories.ts +11 -3
  36. package/dist/astro-device-frame/DeviceFrame.stories.ts +7 -3
  37. package/dist/astro-dialog/Dialog.stories.ts +7 -3
  38. package/dist/astro-diff-viewer/DiffViewer.stories.ts +19 -3
  39. package/dist/astro-dropdown-menu/DropdownMenu.stories.ts +6 -3
  40. package/dist/astro-emoji-picker/EmojiPicker.stories.ts +5 -3
  41. package/dist/astro-feedback-dialog/FeedbackDialog.stories.ts +6 -3
  42. package/dist/astro-file-tree/FileTree.stories.ts +5 -3
  43. package/dist/astro-file-upload/FileUpload.stories.ts +9 -3
  44. package/dist/astro-floating-reactions/FloatingReactions.astro +1 -1
  45. package/dist/astro-footer/Footer.stories.ts +7 -3
  46. package/dist/astro-icon-system/IconSystem.stories.ts +5 -3
  47. package/dist/astro-inline-editor/InlineEditor.stories.ts +5 -3
  48. package/dist/astro-input/Input.stories.ts +11 -3
  49. package/dist/astro-input-group/InputGroup.stories.ts +6 -3
  50. package/dist/astro-install-prompt/InstallPrompt.stories.ts +9 -3
  51. package/dist/astro-keyboard-shortcut/KeyboardShortcut.stories.ts +7 -3
  52. package/dist/astro-language-selector/LanguageSelector.stories.ts +11 -3
  53. package/dist/astro-link-card/LinkCard.stories.ts +5 -3
  54. package/dist/astro-logger/Logger.stories.ts +10 -3
  55. package/dist/astro-logger/TelemetryScript.astro +1 -1
  56. package/dist/astro-markdown-renderer/MarkdownRenderer.stories.ts +8 -3
  57. package/dist/astro-mascot/Mascot.astro +274 -0
  58. package/dist/astro-mascot/Mascot.stories.ts +46 -0
  59. package/dist/astro-mascot/index.ts +11 -0
  60. package/dist/astro-mobile-nav/MobileNav.stories.ts +6 -3
  61. package/dist/astro-navbar/Navbar.stories.ts +16 -3
  62. package/dist/astro-otp-input/OtpInput.stories.ts +20 -3
  63. package/dist/astro-pagination/Pagination.stories.ts +3 -3
  64. package/dist/astro-password-input/PasswordInput.stories.ts +29 -0
  65. package/dist/astro-payment/Payment.stories.ts +8 -3
  66. package/dist/astro-popover/Popover.stories.ts +10 -3
  67. package/dist/astro-popover/PopoverClose.stories.ts +17 -0
  68. package/dist/astro-popover/PopoverContent.stories.ts +19 -0
  69. package/dist/astro-popover/PopoverTrigger.stories.ts +17 -0
  70. package/dist/astro-presence-indicator/PresenceIndicator.stories.ts +14 -3
  71. package/dist/astro-progress-display/BadgeDisplay.astro +1 -1
  72. package/dist/astro-progress-display/BadgeDisplay.stories.ts +17 -0
  73. package/dist/astro-progress-display/ProgressBar.stories.ts +21 -0
  74. package/dist/astro-progress-display/StatsGrid.astro +1 -1
  75. package/dist/astro-progress-display/StatsGrid.stories.ts +19 -0
  76. package/dist/astro-radio/RadioGroup.stories.ts +25 -0
  77. package/dist/astro-radio/RadioItem.stories.ts +23 -0
  78. package/dist/astro-reaction-bar/ReactionBar.astro +1 -1
  79. package/dist/astro-reaction-bar/ReactionBar.stories.ts +10 -3
  80. package/dist/astro-resizable-layout/ResizableDivider.stories.ts +19 -0
  81. package/dist/astro-resizable-layout/ResizableLayout.stories.ts +18 -3
  82. package/dist/astro-resizable-layout/ResizablePane.stories.ts +21 -0
  83. package/dist/astro-rich-editor/RichEditor.stories.ts +20 -3
  84. package/dist/astro-search-bar/SearchBar.stories.ts +14 -3
  85. package/dist/astro-search-bar/SearchResultItem.stories.ts +17 -0
  86. package/dist/astro-search-bar/SearchResults.stories.ts +17 -0
  87. package/dist/astro-segmented-control/SegmentedControl.stories.ts +23 -0
  88. package/dist/astro-segmented-control/SegmentedControlItem.stories.ts +25 -0
  89. package/dist/astro-select/Select.stories.ts +16 -3
  90. package/dist/astro-select/SelectContent.stories.ts +17 -0
  91. package/dist/astro-select/SelectItem.stories.ts +23 -0
  92. package/dist/astro-select/SelectTrigger.stories.ts +21 -0
  93. package/dist/astro-separator/Separator.stories.ts +23 -0
  94. package/dist/astro-sidebar/Sidebar.astro +1 -1
  95. package/dist/astro-sidebar/Sidebar.stories.ts +14 -3
  96. package/dist/astro-skeleton/Skeleton.stories.ts +14 -3
  97. package/dist/astro-skeleton/SkeletonText.stories.ts +19 -0
  98. package/dist/astro-skip-to-content/SkipToContent.stories.ts +3 -3
  99. package/dist/astro-slide-viewer/SlideViewer.stories.ts +14 -3
  100. package/dist/astro-social-auth-button/SocialAuthButton.stories.ts +23 -0
  101. package/dist/astro-social-auth-button/SocialAuthRow.stories.ts +17 -0
  102. package/dist/astro-status-indicator/StatusIndicator.stories.ts +14 -3
  103. package/dist/astro-steps/Steps.stories.ts +3 -3
  104. package/dist/astro-switch/Switch.stories.ts +14 -3
  105. package/dist/astro-table-of-contents/TableOfContents.stories.ts +8 -3
  106. package/dist/astro-tabs/Tabs.stories.ts +12 -3
  107. package/dist/astro-tabs/TabsContent.stories.ts +21 -0
  108. package/dist/astro-tabs/TabsList.stories.ts +17 -0
  109. package/dist/astro-tabs/TabsTrigger.stories.ts +21 -0
  110. package/dist/astro-textarea/Textarea.stories.ts +22 -3
  111. package/dist/astro-theme/ThemeScript.stories.ts +23 -0
  112. package/dist/astro-theme/ThemeToggle.stories.ts +21 -0
  113. package/dist/astro-thread-view/ThreadView.astro +1 -1
  114. package/dist/astro-thread-view/ThreadView.stories.ts +10 -3
  115. package/dist/astro-toast/Toast.stories.ts +16 -3
  116. package/dist/astro-toast/Toaster.stories.ts +17 -0
  117. package/dist/astro-tooltip/Tooltip.stories.ts +10 -3
  118. package/dist/astro-tooltip/TooltipContent.stories.ts +19 -0
  119. package/dist/astro-tooltip/TooltipTrigger.stories.ts +17 -0
  120. package/dist/astro-version-selector/VersionSelector.astro +2 -2
  121. package/dist/astro-version-selector/VersionSelector.stories.ts +12 -3
  122. package/dist/astro-video-grid/VideoGrid.astro +1 -1
  123. package/dist/astro-video-player/VideoPlayer.stories.ts +16 -3
  124. package/dist/astro-voice-pill/VoicePill.stories.ts +24 -3
  125. package/dist/astro-waveform/Waveform.stories.ts +26 -3
  126. package/dist/date-picker/date-picker.styles.ts +1 -1
  127. package/dist/date-picker/date-picker.ts +3 -1
  128. package/dist/index.ts +1 -0
  129. package/dist/mascot/index.ts +2 -0
  130. package/dist/mascot/mascot.styles.ts +33 -0
  131. package/dist/mascot/mascot.ts +121 -0
  132. package/package.json +2 -1
@@ -1,12 +1,19 @@
1
1
  import Component from './Popover.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/Popover',
7
5
  component: Component,
6
+ argTypes: {
7
+ defaultOpen: { control: 'boolean' },
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
+ defaultOpen: false,
17
+ default: '<span>default content</span>',
18
+ }
19
+ }
@@ -0,0 +1,17 @@
1
+ import Component from './PopoverClose.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/PopoverClose',
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,19 @@
1
+ import Component from './PopoverContent.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/PopoverContent',
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 './PopoverTrigger.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/PopoverTrigger',
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 './PresenceIndicator.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/PresenceIndicator',
7
5
  component: Component,
6
+ argTypes: {
7
+ status: { control: 'text' },
8
+ showLabel: { control: 'boolean' },
9
+ label: { control: 'text' },
10
+ size: { control: 'select', options: ['sm', 'default', 'lg', 'icon'] },
11
+ },
8
12
  }
9
13
 
10
14
  export default meta
11
15
 
12
- export const Default = { args: {} }
16
+ export const Default = {
17
+ args: {
18
+ status: '',
19
+ showLabel: false,
20
+ label: '',
21
+ size: 'default',
22
+ },
23
+ }
@@ -16,7 +16,7 @@ const api = createProgressDisplay({ stats: [], badges })
16
16
  ---
17
17
 
18
18
  <div class={cn(badgeGridVariants(), className)} {...props}>
19
- {api.badges.map((badge) => (
19
+ {(api.badges || []).map((badge) => (
20
20
  <div
21
21
  class={badgeItemVariants({
22
22
  state: badge.isUnlocked ? 'unlocked' : 'locked',
@@ -0,0 +1,17 @@
1
+ import Component from './BadgeDisplay.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/BadgeDisplay',
5
+ component: Component,
6
+ argTypes: {
7
+ badges: { control: 'text' },
8
+ },
9
+ }
10
+
11
+ export default meta
12
+
13
+ export const Default = {
14
+ args: {
15
+ badges: '',
16
+ },
17
+ }
@@ -0,0 +1,21 @@
1
+ import Component from './ProgressBar.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/ProgressBar',
5
+ component: Component,
6
+ argTypes: {
7
+ value: { control: 'number' },
8
+ max: { control: 'number' },
9
+ size: { control: 'select', options: ['sm', 'default', 'lg', 'icon'] },
10
+ },
11
+ }
12
+
13
+ export default meta
14
+
15
+ export const Default = {
16
+ args: {
17
+ value: 0,
18
+ max: 0,
19
+ size: 'default',
20
+ },
21
+ }
@@ -18,7 +18,7 @@ const api = createProgressDisplay({ stats, badges })
18
18
  ---
19
19
 
20
20
  <div class={cn(statsGridVariants(), className)} {...api.ariaProps} {...props}>
21
- {api.stats.map((stat) => (
21
+ {(api.stats || []).map((stat) => (
22
22
  <div
23
23
  class={statCardVariants({
24
24
  color: (stat.color as 'default' | 'primary' | 'success' | 'warning' | 'destructive') ?? 'default',
@@ -0,0 +1,19 @@
1
+ import Component from './StatsGrid.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/StatsGrid',
5
+ component: Component,
6
+ argTypes: {
7
+ stats: { control: 'text' },
8
+ badges: { control: 'text' },
9
+ },
10
+ }
11
+
12
+ export default meta
13
+
14
+ export const Default = {
15
+ args: {
16
+ stats: '',
17
+ badges: '',
18
+ },
19
+ }
@@ -0,0 +1,25 @@
1
+ import Component from './RadioGroup.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/RadioGroup',
5
+ component: Component,
6
+ argTypes: {
7
+ value: { control: 'text' },
8
+ name: { control: 'text' },
9
+ disabled: { control: 'boolean' },
10
+ orientation: { control: 'text' },
11
+ default: { control: 'text' },
12
+ },
13
+ }
14
+
15
+ export default meta
16
+
17
+ export const Default = {
18
+ args: {
19
+ value: '',
20
+ name: '',
21
+ disabled: false,
22
+ orientation: '',
23
+ default: '<span>default content</span>',
24
+ }
25
+ }
@@ -0,0 +1,23 @@
1
+ import Component from './RadioItem.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/RadioItem',
5
+ component: Component,
6
+ argTypes: {
7
+ value: { control: 'text' },
8
+ disabled: { control: 'boolean' },
9
+ checked: { 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
+ checked: false,
21
+ default: '<span>default content</span>',
22
+ }
23
+ }
@@ -35,7 +35,7 @@ const api = createReactionBar({ reactions })
35
35
  aria-label="Reactions"
36
36
  {...props}
37
37
  >
38
- {api.reactions.map((reaction) => (
38
+ {(api.reactions || []).map((reaction) => (
39
39
  <button
40
40
  type="button"
41
41
  data-rfr-rb-emoji={reaction.emoji}
@@ -1,12 +1,19 @@
1
1
  import Component from './ReactionBar.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/ReactionBar',
7
5
  component: Component,
6
+ argTypes: {
7
+ reactions: { control: 'text' },
8
+ showAddButton: { control: 'boolean' },
9
+ },
8
10
  }
9
11
 
10
12
  export default meta
11
13
 
12
- export const Default = { args: {} }
14
+ export const Default = {
15
+ args: {
16
+ reactions: '',
17
+ showAddButton: false,
18
+ },
19
+ }
@@ -0,0 +1,19 @@
1
+ import Component from './ResizableDivider.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/ResizableDivider',
5
+ component: Component,
6
+ argTypes: {
7
+ index: { control: 'number' },
8
+ orientation: { control: 'text' },
9
+ },
10
+ }
11
+
12
+ export default meta
13
+
14
+ export const Default = {
15
+ args: {
16
+ index: 0,
17
+ orientation: '',
18
+ },
19
+ }
@@ -1,12 +1,27 @@
1
1
  import Component from './ResizableLayout.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/ResizableLayout',
7
5
  component: Component,
6
+ argTypes: {
7
+ orientation: { control: 'text' },
8
+ defaultSizes: { control: 'number' },
9
+ minSizes: { control: 'number' },
10
+ maxSizes: { control: 'number' },
11
+ persistKey: { control: 'text' },
12
+ default: { control: 'text' },
13
+ },
8
14
  }
9
15
 
10
16
  export default meta
11
17
 
12
- export const Default = { args: {} }
18
+ export const Default = {
19
+ args: {
20
+ orientation: '',
21
+ defaultSizes: 0,
22
+ minSizes: 0,
23
+ maxSizes: 0,
24
+ persistKey: '',
25
+ default: '<span>default content</span>',
26
+ }
27
+ }
@@ -0,0 +1,21 @@
1
+ import Component from './ResizablePane.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/ResizablePane',
5
+ component: Component,
6
+ argTypes: {
7
+ index: { control: 'number' },
8
+ orientation: { control: 'text' },
9
+ default: { control: 'text' },
10
+ },
11
+ }
12
+
13
+ export default meta
14
+
15
+ export const Default = {
16
+ args: {
17
+ index: 0,
18
+ orientation: '',
19
+ default: '<span>default content</span>',
20
+ }
21
+ }
@@ -1,12 +1,29 @@
1
1
  import Component from './RichEditor.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/RichEditor',
7
5
  component: Component,
6
+ argTypes: {
7
+ content: { control: 'text' },
8
+ placeholder: { control: 'text' },
9
+ readOnly: { control: 'boolean' },
10
+ maxLength: { control: 'number' },
11
+ showToolbar: { control: 'boolean' },
12
+ showCount: { control: 'boolean' },
13
+ name: { control: 'text' },
14
+ },
8
15
  }
9
16
 
10
17
  export default meta
11
18
 
12
- export const Default = { args: {} }
19
+ export const Default = {
20
+ args: {
21
+ content: '',
22
+ placeholder: '',
23
+ readOnly: false,
24
+ maxLength: 0,
25
+ showToolbar: false,
26
+ showCount: false,
27
+ name: '',
28
+ },
29
+ }
@@ -1,12 +1,23 @@
1
1
  import Component from './SearchBar.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/SearchBar',
7
5
  component: Component,
6
+ argTypes: {
7
+ placeholder: { control: 'text' },
8
+ loading: { control: 'boolean' },
9
+ debounceMs: { control: 'number' },
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
+ placeholder: '',
19
+ loading: false,
20
+ debounceMs: 0,
21
+ default: '<span>default content</span>',
22
+ }
23
+ }
@@ -0,0 +1,17 @@
1
+ import Component from './SearchResultItem.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/SearchResultItem',
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,17 @@
1
+ import Component from './SearchResults.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/SearchResults',
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 './SegmentedControl.astro'
2
+
3
+ const meta = {
4
+ title: 'Astro/SegmentedControl',
5
+ component: Component,
6
+ argTypes: {
7
+ value: { control: 'text' },
8
+ size: { control: 'select', options: ['sm', 'default', 'lg', 'icon'] },
9
+ name: { control: 'text' },
10
+ default: { control: 'text' },
11
+ },
12
+ }
13
+
14
+ export default meta
15
+
16
+ export const Default = {
17
+ args: {
18
+ value: '',
19
+ size: 'default',
20
+ name: '',
21
+ default: '<span>default content</span>',
22
+ }
23
+ }
@@ -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
+ }