@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,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
+ }
@@ -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,105 @@
1
+ ---
2
+ import {
3
+ createSlotPicker,
4
+ slotsForDay,
5
+ isSlotSelected,
6
+ slotPickerVariants,
7
+ slotPickerDayRowClass,
8
+ slotPickerDayVariants,
9
+ slotPickerGridClass,
10
+ slotPickerSlotVariants,
11
+ slotPickerSectionLabelClass,
12
+ slotPickerTimezoneClass,
13
+ type SlotDay,
14
+ type SlotSelection,
15
+ } from '../slot-picker/index.ts'
16
+ import { cn } from '../shared/index.ts'
17
+
18
+ interface Props extends astroHTML.JSX.HTMLAttributes {
19
+ /** The list of days to show as chips. */
20
+ days: SlotDay[]
21
+ /** Map of dayId → available time slot strings. */
22
+ slotsByDay: Record<string, string[]>
23
+ /** The currently-selected day (determines which slots are shown). */
24
+ selectedDayId?: string
25
+ /** The full selection (day + slot) used to highlight the selected slot. */
26
+ value?: SlotSelection
27
+ /** Label shown beside the "Pick a time" heading (e.g. "Eastern Time"). */
28
+ timezoneLabel?: string
29
+ /** Slot strings that should be rendered as disabled. */
30
+ disabledSlots?: string[]
31
+ }
32
+
33
+ const {
34
+ days,
35
+ slotsByDay,
36
+ selectedDayId,
37
+ value,
38
+ timezoneLabel,
39
+ disabledSlots = [],
40
+ class: className,
41
+ ...rest
42
+ } = Astro.props
43
+
44
+ const currentSlots = selectedDayId ? slotsForDay(slotsByDay, selectedDayId) : []
45
+ const { ariaProps, dataAttributes } = createSlotPicker()
46
+ ---
47
+
48
+ <div class={cn(slotPickerVariants(), className)} {...ariaProps} {...dataAttributes} {...rest}>
49
+ <!-- Day row -->
50
+ <div>
51
+ <p class={slotPickerSectionLabelClass}>Pick a day</p>
52
+ <div role="radiogroup" aria-label="Pick a day" class={`${slotPickerDayRowClass} mt-2`}>
53
+ {
54
+ days.map((day) => {
55
+ const isSelected = selectedDayId === day.id
56
+ return (
57
+ <button
58
+ type="button"
59
+ role="radio"
60
+ aria-checked={isSelected}
61
+ data-state={isSelected ? 'checked' : 'unchecked'}
62
+ class={slotPickerDayVariants({ selected: isSelected ? 'true' : 'false' })}
63
+ >
64
+ <span class="text-xs">{day.weekday}</span>
65
+ <span class="text-base font-bold leading-none">{day.dayNum}</span>
66
+ </button>
67
+ )
68
+ })
69
+ }
70
+ </div>
71
+ </div>
72
+
73
+ <!-- Slot grid (only when a day is selected) -->
74
+ {selectedDayId && currentSlots.length > 0 && (
75
+ <div>
76
+ <p class={slotPickerSectionLabelClass}>
77
+ Pick a time
78
+ {timezoneLabel && <span class={slotPickerTimezoneClass}>{timezoneLabel}</span>}
79
+ </p>
80
+ <div role="radiogroup" aria-label="Pick a time" class={`${slotPickerGridClass} mt-2`}>
81
+ {
82
+ currentSlots.map((slot) => {
83
+ const isSlotActive = isSlotSelected(value, selectedDayId, slot)
84
+ const isDisabled = disabledSlots.includes(slot)
85
+ return (
86
+ <button
87
+ type="button"
88
+ role="radio"
89
+ aria-checked={isSlotActive}
90
+ aria-disabled={isDisabled || undefined}
91
+ data-state={isSlotActive ? 'checked' : 'unchecked'}
92
+ class={slotPickerSlotVariants({
93
+ selected: isSlotActive ? 'true' : 'false',
94
+ disabled: isDisabled ? 'true' : 'false',
95
+ })}
96
+ >
97
+ {slot}
98
+ </button>
99
+ )
100
+ })
101
+ }
102
+ </div>
103
+ </div>
104
+ )}
105
+ </div>
@@ -0,0 +1 @@
1
+ export {}