@fragments-sdk/ui 0.7.5 → 0.8.0

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 (100) hide show
  1. package/README.md +58 -25
  2. package/fragments.json +1 -1
  3. package/package.json +15 -5
  4. package/src/blocks/AppShell.block.ts +2 -2
  5. package/src/blocks/InsetDashboardLayout.block.ts +1 -1
  6. package/src/blocks/LoginForm.block.ts +14 -7
  7. package/src/components/Accordion/Accordion.fragment.tsx +8 -2
  8. package/src/components/Alert/Alert.module.scss +4 -4
  9. package/src/components/AppShell/AppShell.fragment.tsx +1 -1
  10. package/src/components/AppShell/index.tsx +2 -0
  11. package/src/components/Avatar/Avatar.fragment.tsx +5 -1
  12. package/src/components/Avatar/Avatar.module.scss +1 -1
  13. package/src/components/Avatar/index.tsx +37 -1
  14. package/src/components/Badge/Badge.fragment.tsx +3 -3
  15. package/src/components/Badge/Badge.module.scss +4 -4
  16. package/src/components/Badge/index.tsx +5 -1
  17. package/src/components/Box/index.tsx +5 -1
  18. package/src/components/Button/Button.fragment.tsx +17 -16
  19. package/src/components/Button/index.tsx +5 -1
  20. package/src/components/ButtonGroup/index.tsx +5 -1
  21. package/src/components/Card/Card.fragment.tsx +5 -5
  22. package/src/components/Chart/Chart.fragment.tsx +9 -1
  23. package/src/components/Chart/index.tsx +22 -4
  24. package/src/components/Checkbox/index.tsx +5 -1
  25. package/src/components/Chip/Chip.fragment.tsx +0 -5
  26. package/src/components/Chip/Chip.module.scss +2 -2
  27. package/src/components/CodeBlock/CodeBlock.fragment.tsx +9 -3
  28. package/src/components/CodeBlock/CodeBlock.module.scss +1 -1
  29. package/src/components/ColorPicker/index.tsx +5 -1
  30. package/src/components/Combobox/Combobox.fragment.tsx +15 -7
  31. package/src/components/ConversationList/ConversationList.fragment.tsx +3 -3
  32. package/src/components/ConversationList/ConversationList.module.scss +1 -1
  33. package/src/components/DatePicker/DatePicker.fragment.tsx +245 -0
  34. package/src/components/DatePicker/DatePicker.module.scss +394 -0
  35. package/src/components/DatePicker/DatePicker.test.tsx +264 -0
  36. package/src/components/DatePicker/index.tsx +535 -0
  37. package/src/components/Field/Field.fragment.tsx +5 -4
  38. package/src/components/Fieldset/Fieldset.fragment.tsx +5 -4
  39. package/src/components/Form/Form.fragment.tsx +9 -3
  40. package/src/components/Form/index.tsx +5 -1
  41. package/src/components/Grid/Grid.fragment.tsx +4 -0
  42. package/src/components/Header/Header.fragment.tsx +36 -13
  43. package/src/components/Header/Header.module.scss +114 -1
  44. package/src/components/Header/Header.test.tsx +106 -1
  45. package/src/components/Header/index.tsx +100 -31
  46. package/src/components/Icon/Icon.fragment.tsx +6 -1
  47. package/src/components/Icon/index.tsx +5 -1
  48. package/src/components/Image/Image.fragment.tsx +2 -2
  49. package/src/components/Image/index.tsx +5 -1
  50. package/src/components/Input/Input.fragment.tsx +21 -3
  51. package/src/components/Input/Input.module.scss +1 -1
  52. package/src/components/Input/index.tsx +5 -1
  53. package/src/components/Link/Link.fragment.tsx +0 -4
  54. package/src/components/Link/index.tsx +5 -1
  55. package/src/components/Listbox/Listbox.fragment.tsx +0 -12
  56. package/src/components/Markdown/Markdown.module.scss +6 -3
  57. package/src/components/Markdown/index.tsx +5 -1
  58. package/src/components/Message/Message.fragment.tsx +8 -6
  59. package/src/components/Message/Message.module.scss +1 -1
  60. package/src/components/Progress/Progress.fragment.tsx +14 -0
  61. package/src/components/Progress/index.tsx +9 -2
  62. package/src/components/Prompt/Prompt.fragment.tsx +11 -0
  63. package/src/components/RadioGroup/RadioGroup.fragment.tsx +5 -0
  64. package/src/components/ScrollArea/ScrollArea.fragment.tsx +185 -0
  65. package/src/components/ScrollArea/ScrollArea.module.scss +136 -0
  66. package/src/components/ScrollArea/ScrollArea.test.tsx +38 -0
  67. package/src/components/ScrollArea/index.tsx +121 -0
  68. package/src/components/Select/Select.fragment.tsx +13 -5
  69. package/src/components/Separator/index.tsx +5 -1
  70. package/src/components/Sidebar/Sidebar.fragment.tsx +64 -11
  71. package/src/components/Sidebar/Sidebar.module.scss +68 -16
  72. package/src/components/Sidebar/Sidebar.test.tsx +31 -2
  73. package/src/components/Sidebar/index.tsx +69 -45
  74. package/src/components/Skeleton/Skeleton.fragment.tsx +5 -0
  75. package/src/components/Slider/index.tsx +5 -1
  76. package/src/components/Stack/Stack.fragment.tsx +2 -2
  77. package/src/components/Stack/index.tsx +5 -1
  78. package/src/components/Table/Table.fragment.tsx +29 -0
  79. package/src/components/Table/index.tsx +6 -1
  80. package/src/components/TableOfContents/TableOfContents.fragment.tsx +149 -0
  81. package/src/components/TableOfContents/TableOfContents.module.scss +71 -0
  82. package/src/components/TableOfContents/TableOfContents.test.tsx +126 -0
  83. package/src/components/TableOfContents/index.tsx +105 -0
  84. package/src/components/Text/index.tsx +5 -1
  85. package/src/components/Textarea/Textarea.fragment.tsx +8 -0
  86. package/src/components/Textarea/index.tsx +5 -1
  87. package/src/components/Theme/index.tsx +7 -0
  88. package/src/components/ThinkingIndicator/ThinkingIndicator.fragment.tsx +3 -2
  89. package/src/components/Toast/Toast.fragment.tsx +12 -0
  90. package/src/components/Toggle/index.tsx +5 -1
  91. package/src/components/Tooltip/Tooltip.fragment.tsx +18 -0
  92. package/src/components/Tooltip/index.tsx +6 -1
  93. package/src/components/VisuallyHidden/index.tsx +5 -1
  94. package/src/components/compound-pattern.test.ts +40 -0
  95. package/src/index.ts +29 -0
  96. package/src/recipes/AppShell.recipe.ts +2 -2
  97. package/src/recipes/LoginForm.recipe.ts +14 -7
  98. package/src/tokens/_computed.scss +12 -0
  99. package/src/tokens/_derive.scss +71 -0
  100. package/src/tokens/_variables.scss +22 -0
package/README.md CHANGED
@@ -44,30 +44,63 @@ function App() {
44
44
 
45
45
  | Component | Category | Description |
46
46
  |-----------|----------|-------------|
47
- | Alert | Feedback | Contextual feedback messages with severity levels |
48
- | Avatar | Display | User or entity profile images with fallbacks |
49
- | Badge | Display | Status indicators and labels |
50
- | Button | Actions | Primary interaction element with variants |
51
- | Card | Layout | Content container with optional sections |
52
- | Checkbox | Forms | Binary selection control |
53
- | CircularProgress | Feedback | Circular loading/progress indicator |
54
- | Dialog | Overlay | Modal dialogs with compound API |
55
- | EmptyState | Feedback | Placeholder for empty content areas |
56
- | Grid | Layout | Responsive grid layout with breakpoint support |
57
- | Input | Forms | Text input with label, error, and helper text |
58
- | Menu | Overlay | Dropdown action menus |
59
- | Popover | Overlay | Floating content panels |
60
- | Progress | Feedback | Linear progress bar |
61
- | RadioGroup | Forms | Single-select from a group of options |
62
- | Select | Forms | Dropdown selection control |
63
- | Separator | Layout | Visual divider between content |
64
- | Skeleton | Feedback | Loading placeholder that preserves layout |
65
- | Table | Data | Data table with sorting and selection |
66
- | Tabs | Navigation | Tabbed content panels |
67
- | Textarea | Forms | Multi-line text input |
68
- | Toast | Feedback | Transient notifications |
69
- | Toggle | Forms | On/off switch control |
70
- | Tooltip | Overlay | Contextual information on hover |
47
+ | Accordion | Layout | Vertically stacked, collapsible content sections. Use for organizing related content that can be progressively disclosed. |
48
+ | Alert | Feedback | Contextual feedback messages for user actions or system status. Supports multiple severity levels with optional actions and dismissibility. |
49
+ | AppShell | Layout | Full layout wrapper integrating sidebar, header, main content, and optional aside panel. Supports two layout modes: stacked (header on top) and sidebar-inset (sidebar full height). |
50
+ | Avatar | Display | Visual representation of a user or entity |
51
+ | Badge | Display | Compact label for status, counts, or categorization. Draws attention to metadata without dominating the layout. |
52
+ | Box | Layout | Primitive layout component for applying spacing, backgrounds, and borders. A flexible container for building custom layouts. |
53
+ | Breadcrumbs | Navigation | Breadcrumb navigation showing the current page location within a hierarchy. Helps users navigate back through parent pages. |
54
+ | Button | Forms | Interactive element for user actions and form submissions |
55
+ | ButtonGroup | Forms | Groups related buttons together with consistent spacing and alignment. Useful for action bars, toolbars, and related button sets. |
56
+ | Card | Layout | Container for grouping related content |
57
+ | Chart | Display | Composable chart wrapper for recharts with theme-aware tooltips, legends, and color integration. |
58
+ | Checkbox | Forms | Binary toggle for form fields. Use for options that require explicit submission, unlike Toggle which takes effect immediately. |
59
+ | Chip | Forms | Interactive pill-shaped element for filtering, selecting, and tagging. Supports single and multi-select via Chip.Group. |
60
+ | CodeBlock | Display | Syntax-highlighted code display with copy functionality, theming, diff view, and collapsible sections |
61
+ | Collapsible | Layout | An interactive component that expands/collapses to show or hide content |
62
+ | ColorPicker | Forms | Color selection control with hex input and visual picker. Displays a swatch that opens a full color picker on click. |
63
+ | Combobox | Forms | Searchable select input that filters a dropdown list of options as you type. Supports single and multiple selection with chips. |
64
+ | ConversationList | Ai | Scrollable message container with auto-scroll and history loading |
65
+ | Dialog | Feedback | Modal overlay for focused user interactions. Use for confirmations, forms, or content requiring full attention. |
66
+ | EmptyState | Feedback | Placeholder for empty content areas. Provides context, guidance, and actions when no data is available. |
67
+ | Field | Forms | Compositional form field wrapper providing validation, labels, descriptions, and error messages. Use for advanced form needs beyond baked-in Input/Textarea props. |
68
+ | Fieldset | Forms | Groups related form fields with an accessible legend. Use to organize forms into logical sections. |
69
+ | Form | Forms | Form wrapper that handles server-side error distribution to Field components. Pairs with Field for complete form validation. |
70
+ | Grid | Layout | Responsive grid layout for arranging items in columns with consistent spacing |
71
+ | Header | Navigation | Composable header with slots for brand, navigation, search, and actions. Supports dropdown nav groups via Header.NavMenu. Designed for use within AppShell with responsive mobile support. |
72
+ | Icon | Display | Wrapper for Phosphor icons with consistent sizing and semantic colors. Provides standardized icon rendering across the design system. |
73
+ | Image | Display | Responsive image component with aspect ratio control, loading states, and error fallbacks. Handles image display with consistent styling. |
74
+ | Input | Forms | Text input field for single-line user data entry |
75
+ | Link | Navigation | Styled anchor element for navigation. Supports internal and external links with consistent visual treatment. |
76
+ | List | Display | Compound component for rendering ordered or unordered lists with consistent styling. Supports bullet, numbered, and icon-prefixed items. |
77
+ | Listbox | Forms | Controlled listbox for search results, autocomplete dropdowns, and command menus. Provides Menu-like styling without requiring a trigger. |
78
+ | Loading | Feedback | Versatile loading indicator with multiple variants for showing progress or waiting states |
79
+ | Markdown | Display | Renders markdown strings as styled prose using react-markdown and remark-gfm. Supports headings, lists, tables, code blocks, blockquotes, and more. |
80
+ | Menu | Feedback | Dropdown menu for actions and commands. Use for contextual actions, overflow menus, or grouped commands. |
81
+ | Message | Ai | Individual chat message display with role-based styling |
82
+ | Popover | Feedback | Rich content overlay anchored to a trigger element. Use for forms, detailed information, or interactive content that should stay in context. |
83
+ | Progress | Feedback | Visual indicator of task completion or loading state. Available in linear and circular variants. |
84
+ | Prompt | Ai | Multi-line input with toolbar for AI/chat interfaces |
85
+ | RadioGroup | Forms | Single selection from a list of mutually exclusive options |
86
+ | ScrollArea | Layout | A styled scrollable container with thin scrollbars and optional fade indicators. |
87
+ | Select | Forms | Dropdown for choosing from a list of options. Use when there are more than 4-5 choices that would clutter the UI. |
88
+ | Separator | Layout | Visual divider between content sections. Use to create clear visual boundaries and improve content organization. |
89
+ | Sidebar | Navigation | Responsive navigation sidebar with collapsible desktop mode and mobile drawer behavior. |
90
+ | Skeleton | Feedback | Placeholder loading state for content |
91
+ | Slider | Forms | Range input control for selecting a numeric value within a defined range. Supports labels, value display, and custom step intervals. |
92
+ | Stack | Layout | Flexible layout component for arranging children in rows or columns with consistent spacing. Supports responsive direction and gap. |
93
+ | Table | Display | Data table with sorting and row selection. Use for displaying structured data that needs to be scanned, compared, or acted upon. |
94
+ | Tabs | Navigation | Organize content into switchable panels. Use for related content that benefits from a compact, navigable layout. |
95
+ | Text | Display | Typography component for rendering text with consistent styling. Supports various sizes, weights, colors, and semantic elements. |
96
+ | Textarea | Forms | Multi-line text input for longer form content |
97
+ | Theme | Navigation | Theme management system with provider, toggle, and hook pattern. Supports light, dark, and system modes with localStorage persistence. |
98
+ | ThinkingIndicator | Ai | Animated indicator showing AI is processing |
99
+ | Toast | Feedback | Brief, non-blocking notification messages |
100
+ | Toggle | Forms | Binary on/off switch for settings and preferences. Provides immediate visual feedback and is ideal for options that take effect instantly. |
101
+ | ToggleGroup | Forms | A group of toggle buttons where only one can be selected at a time. Useful for switching between views, modes, or options. |
102
+ | Tooltip | Feedback | Contextual help text that appears on hover or focus. Perfect for explaining icons, truncated text, or providing additional context. |
103
+ | VisuallyHidden | Navigation | Hides content visually while keeping it accessible to screen readers. Essential for accessible icon-only buttons and supplementary text. |
71
104
 
72
105
  ## Design Tokens
73
106
 
@@ -178,7 +211,7 @@ You can still override individual tokens directly:
178
211
 
179
212
  **Existing code continues to work.** The seed system is fully backward compatible:
180
213
 
181
- - Existing `@use '@fragments/ui/tokens'` imports work unchanged
214
+ - Existing `@use '@fragments-sdk/ui/tokens'` imports work unchanged
182
215
  - Individual variable overrides (`$fui-color-accent: #blue`) still work
183
216
  - CSS variable usage (`var(--fui-color-accent)`) works
184
217
  - Component APIs remain the same