@a4ui/core 0.37.0 → 0.38.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 (105) hide show
  1. package/README.md +8 -7
  2. package/dist/Collapse-Cr5cDqAl.js +375 -0
  3. package/dist/charts/AreaChart.d.ts +38 -0
  4. package/dist/charts/BarChart.d.ts +17 -1
  5. package/dist/charts/PieChart.d.ts +29 -0
  6. package/dist/charts/RadialBarChart.d.ts +33 -0
  7. package/dist/charts/index.d.ts +5 -0
  8. package/dist/charts/shared.d.ts +111 -0
  9. package/dist/charts.js +1493 -780
  10. package/dist/commerce.js +625 -634
  11. package/dist/elements.css +1076 -8
  12. package/dist/elements.iife.js +1 -6
  13. package/dist/elements.js +7774 -9133
  14. package/dist/full.css +1076 -8
  15. package/dist/index.d.ts +30 -3
  16. package/dist/index.js +17502 -15098
  17. package/dist/layout/Aurora.d.ts +16 -0
  18. package/dist/layout/EffectsToggle.d.ts +1 -1
  19. package/dist/layout/SpaceBackground.d.ts +1 -1
  20. package/dist/lib/anchored.d.ts +16 -0
  21. package/dist/motion-CTIBwMCA.js +104 -0
  22. package/dist/styles.css +110 -3
  23. package/dist/ui/AspectRatio.d.ts +19 -0
  24. package/dist/ui/Attachment.d.ts +70 -0
  25. package/dist/ui/ButtonGroup.d.ts +37 -0
  26. package/dist/ui/ChatMarker.d.ts +20 -0
  27. package/dist/ui/ChatThread.d.ts +32 -8
  28. package/dist/ui/ContactSection.d.ts +49 -0
  29. package/dist/ui/CtaBanner.d.ts +28 -0
  30. package/dist/ui/DateField.d.ts +2 -2
  31. package/dist/ui/Drawer.d.ts +5 -2
  32. package/dist/ui/Faq.d.ts +29 -0
  33. package/dist/ui/FeatureGrid.d.ts +35 -0
  34. package/dist/ui/Field.d.ts +148 -0
  35. package/dist/ui/Hero.d.ts +48 -0
  36. package/dist/ui/InputGroup.d.ts +93 -0
  37. package/dist/ui/Item.d.ts +63 -0
  38. package/dist/ui/Label.d.ts +23 -0
  39. package/dist/ui/Menubar.d.ts +83 -0
  40. package/dist/ui/Message.d.ts +51 -5
  41. package/dist/ui/Modal.d.ts +8 -2
  42. package/dist/ui/NativeSelect.d.ts +26 -0
  43. package/dist/ui/NavigationMenu.d.ts +85 -0
  44. package/dist/ui/PromptComposer.d.ts +5 -0
  45. package/dist/ui/Prose.d.ts +21 -0
  46. package/dist/ui/Questionnaire.d.ts +71 -0
  47. package/dist/ui/ScrollArea.d.ts +30 -0
  48. package/dist/ui/Sidebar.d.ts +229 -0
  49. package/dist/ui/SiteFooter.d.ts +39 -0
  50. package/dist/ui/SiteNav.d.ts +35 -0
  51. package/dist/ui/TeamGrid.d.ts +33 -0
  52. package/dist/ui/Testimonials.d.ts +37 -0
  53. package/dist/ui/internal/sectionKit.d.ts +22 -0
  54. package/dist/ui/internal/socialIcons.d.ts +9 -0
  55. package/package.json +38 -26
  56. package/preset.d.ts +23 -0
  57. package/src/charts/AreaChart.tsx +206 -0
  58. package/src/charts/BarChart.tsx +241 -5
  59. package/src/charts/DonutChart.tsx +8 -11
  60. package/src/charts/LineChart.tsx +2 -3
  61. package/src/charts/PieChart.tsx +145 -0
  62. package/src/charts/RadialBarChart.tsx +141 -0
  63. package/src/charts/index.ts +14 -0
  64. package/src/charts/shared.tsx +304 -0
  65. package/src/index.ts +192 -3
  66. package/src/layout/Aurora.tsx +36 -7
  67. package/src/layout/sceneEffects.ts +22 -3
  68. package/src/lib/anchored.ts +57 -0
  69. package/src/ui/AspectRatio.tsx +35 -0
  70. package/src/ui/Attachment.tsx +189 -0
  71. package/src/ui/ButtonGroup.tsx +89 -0
  72. package/src/ui/ChatMarker.tsx +58 -0
  73. package/src/ui/ChatThread.tsx +115 -23
  74. package/src/ui/ContactSection.tsx +199 -0
  75. package/src/ui/CtaBanner.tsx +62 -0
  76. package/src/ui/DateField.tsx +17 -7
  77. package/src/ui/DateRangePicker.tsx +15 -5
  78. package/src/ui/Drawer.tsx +37 -4
  79. package/src/ui/Faq.tsx +57 -0
  80. package/src/ui/FeatureGrid.tsx +77 -0
  81. package/src/ui/Field.tsx +374 -0
  82. package/src/ui/Hero.tsx +146 -0
  83. package/src/ui/InputGroup.tsx +219 -0
  84. package/src/ui/Item.tsx +185 -0
  85. package/src/ui/Label.tsx +50 -0
  86. package/src/ui/Menubar.tsx +212 -0
  87. package/src/ui/Message.tsx +139 -13
  88. package/src/ui/Modal.tsx +41 -5
  89. package/src/ui/MultiSelect.tsx +15 -5
  90. package/src/ui/NativeSelect.tsx +66 -0
  91. package/src/ui/NavigationMenu.tsx +262 -0
  92. package/src/ui/PromptComposer.tsx +11 -0
  93. package/src/ui/Prose.tsx +63 -0
  94. package/src/ui/Questionnaire.tsx +331 -0
  95. package/src/ui/ScrollArea.tsx +70 -0
  96. package/src/ui/Sidebar.tsx +753 -0
  97. package/src/ui/SiteFooter.tsx +112 -0
  98. package/src/ui/SiteNav.tsx +146 -0
  99. package/src/ui/TeamGrid.tsx +81 -0
  100. package/src/ui/Testimonials.tsx +103 -0
  101. package/src/ui/TimeField.tsx +15 -5
  102. package/src/ui/internal/sectionKit.tsx +72 -0
  103. package/src/ui/internal/socialIcons.tsx +41 -0
  104. package/dist/NumberInput-Bnh2u7pp.js +0 -381
  105. package/dist/motion-jYMWmZqB.js +0 -119
@@ -0,0 +1,70 @@
1
+ // Scroll container with thin, token-colored scrollbars. Native scrolling (no JS
2
+ // thumb): wheel, touch, keyboard and screen readers behave as the platform does.
3
+ // Scrollbar styling is Tailwind arbitrary variants (Firefox `scrollbar-*`
4
+ // properties + WebKit pseudo-elements), so there is no component CSS file.
5
+ import { splitProps, type JSX, type ParentProps } from 'solid-js'
6
+
7
+ import { cn } from '../lib/cn'
8
+
9
+ export type ScrollAreaOrientation = 'vertical' | 'horizontal' | 'both'
10
+
11
+ interface ScrollAreaProps extends ParentProps {
12
+ /** Which axis scrolls. @default 'vertical' */
13
+ orientation?: ScrollAreaOrientation
14
+ /**
15
+ * Accessible name. When set, the area is exposed as a labelled `region`.
16
+ * Recommended whenever the content is more than decoration.
17
+ */
18
+ label?: string
19
+ /** Receives the scrolling element (to read or set `scrollTop`, observe, …). */
20
+ ref?: (el: HTMLDivElement) => void
21
+ class?: string
22
+ style?: JSX.CSSProperties
23
+ }
24
+
25
+ export type { ScrollAreaProps }
26
+
27
+ const AXIS: Record<ScrollAreaOrientation, string> = {
28
+ vertical: 'overflow-y-auto overflow-x-hidden',
29
+ horizontal: 'overflow-x-auto overflow-y-hidden',
30
+ both: 'overflow-auto',
31
+ }
32
+
33
+ /**
34
+ * Scrollable container with thin scrollbars tinted from the theme tokens. Give it
35
+ * a bounded size (`class="h-64"`, `max-h-…`, or a flex parent) — it scrolls
36
+ * whatever overflows. It is keyboard-focusable so the content can be scrolled
37
+ * with the arrow keys.
38
+ *
39
+ * @example
40
+ * ```tsx
41
+ * <ScrollArea class="h-64 rounded-xl border border-border" label="Release notes">
42
+ * <div class="p-4">…long content…</div>
43
+ * </ScrollArea>
44
+ * ```
45
+ */
46
+ export function ScrollArea(props: ScrollAreaProps): JSX.Element {
47
+ const [local] = splitProps(props, ['orientation', 'label', 'ref', 'class', 'style', 'children'])
48
+ return (
49
+ <div
50
+ ref={(el) => local.ref?.(el)}
51
+ // A scrollable region must be reachable by keyboard (axe: scrollable-region-focusable).
52
+ tabIndex={0}
53
+ role={local.label ? 'region' : undefined}
54
+ aria-label={local.label}
55
+ data-orientation={local.orientation ?? 'vertical'}
56
+ style={local.style}
57
+ class={cn(
58
+ 'relative overscroll-contain outline-none focus-visible:ring-2 focus-visible:ring-ring',
59
+ '[scrollbar-color:hsl(var(--muted-foreground)/0.35)_transparent] [scrollbar-width:thin]',
60
+ '[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-transparent',
61
+ '[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/35',
62
+ 'hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/55',
63
+ AXIS[local.orientation ?? 'vertical'],
64
+ local.class,
65
+ )}
66
+ >
67
+ {local.children}
68
+ </div>
69
+ )
70
+ }