@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.
- package/README.md +8 -7
- package/dist/Collapse-Cr5cDqAl.js +375 -0
- package/dist/charts/AreaChart.d.ts +38 -0
- package/dist/charts/BarChart.d.ts +17 -1
- package/dist/charts/PieChart.d.ts +29 -0
- package/dist/charts/RadialBarChart.d.ts +33 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/shared.d.ts +111 -0
- package/dist/charts.js +1493 -780
- package/dist/commerce.js +625 -634
- package/dist/elements.css +1076 -8
- package/dist/elements.iife.js +1 -6
- package/dist/elements.js +7774 -9133
- package/dist/full.css +1076 -8
- package/dist/index.d.ts +30 -3
- package/dist/index.js +17502 -15098
- package/dist/layout/Aurora.d.ts +16 -0
- package/dist/layout/EffectsToggle.d.ts +1 -1
- package/dist/layout/SpaceBackground.d.ts +1 -1
- package/dist/lib/anchored.d.ts +16 -0
- package/dist/motion-CTIBwMCA.js +104 -0
- package/dist/styles.css +110 -3
- package/dist/ui/AspectRatio.d.ts +19 -0
- package/dist/ui/Attachment.d.ts +70 -0
- package/dist/ui/ButtonGroup.d.ts +37 -0
- package/dist/ui/ChatMarker.d.ts +20 -0
- package/dist/ui/ChatThread.d.ts +32 -8
- package/dist/ui/ContactSection.d.ts +49 -0
- package/dist/ui/CtaBanner.d.ts +28 -0
- package/dist/ui/DateField.d.ts +2 -2
- package/dist/ui/Drawer.d.ts +5 -2
- package/dist/ui/Faq.d.ts +29 -0
- package/dist/ui/FeatureGrid.d.ts +35 -0
- package/dist/ui/Field.d.ts +148 -0
- package/dist/ui/Hero.d.ts +48 -0
- package/dist/ui/InputGroup.d.ts +93 -0
- package/dist/ui/Item.d.ts +63 -0
- package/dist/ui/Label.d.ts +23 -0
- package/dist/ui/Menubar.d.ts +83 -0
- package/dist/ui/Message.d.ts +51 -5
- package/dist/ui/Modal.d.ts +8 -2
- package/dist/ui/NativeSelect.d.ts +26 -0
- package/dist/ui/NavigationMenu.d.ts +85 -0
- package/dist/ui/PromptComposer.d.ts +5 -0
- package/dist/ui/Prose.d.ts +21 -0
- package/dist/ui/Questionnaire.d.ts +71 -0
- package/dist/ui/ScrollArea.d.ts +30 -0
- package/dist/ui/Sidebar.d.ts +229 -0
- package/dist/ui/SiteFooter.d.ts +39 -0
- package/dist/ui/SiteNav.d.ts +35 -0
- package/dist/ui/TeamGrid.d.ts +33 -0
- package/dist/ui/Testimonials.d.ts +37 -0
- package/dist/ui/internal/sectionKit.d.ts +22 -0
- package/dist/ui/internal/socialIcons.d.ts +9 -0
- package/package.json +38 -26
- package/preset.d.ts +23 -0
- package/src/charts/AreaChart.tsx +206 -0
- package/src/charts/BarChart.tsx +241 -5
- package/src/charts/DonutChart.tsx +8 -11
- package/src/charts/LineChart.tsx +2 -3
- package/src/charts/PieChart.tsx +145 -0
- package/src/charts/RadialBarChart.tsx +141 -0
- package/src/charts/index.ts +14 -0
- package/src/charts/shared.tsx +304 -0
- package/src/index.ts +192 -3
- package/src/layout/Aurora.tsx +36 -7
- package/src/layout/sceneEffects.ts +22 -3
- package/src/lib/anchored.ts +57 -0
- package/src/ui/AspectRatio.tsx +35 -0
- package/src/ui/Attachment.tsx +189 -0
- package/src/ui/ButtonGroup.tsx +89 -0
- package/src/ui/ChatMarker.tsx +58 -0
- package/src/ui/ChatThread.tsx +115 -23
- package/src/ui/ContactSection.tsx +199 -0
- package/src/ui/CtaBanner.tsx +62 -0
- package/src/ui/DateField.tsx +17 -7
- package/src/ui/DateRangePicker.tsx +15 -5
- package/src/ui/Drawer.tsx +37 -4
- package/src/ui/Faq.tsx +57 -0
- package/src/ui/FeatureGrid.tsx +77 -0
- package/src/ui/Field.tsx +374 -0
- package/src/ui/Hero.tsx +146 -0
- package/src/ui/InputGroup.tsx +219 -0
- package/src/ui/Item.tsx +185 -0
- package/src/ui/Label.tsx +50 -0
- package/src/ui/Menubar.tsx +212 -0
- package/src/ui/Message.tsx +139 -13
- package/src/ui/Modal.tsx +41 -5
- package/src/ui/MultiSelect.tsx +15 -5
- package/src/ui/NativeSelect.tsx +66 -0
- package/src/ui/NavigationMenu.tsx +262 -0
- package/src/ui/PromptComposer.tsx +11 -0
- package/src/ui/Prose.tsx +63 -0
- package/src/ui/Questionnaire.tsx +331 -0
- package/src/ui/ScrollArea.tsx +70 -0
- package/src/ui/Sidebar.tsx +753 -0
- package/src/ui/SiteFooter.tsx +112 -0
- package/src/ui/SiteNav.tsx +146 -0
- package/src/ui/TeamGrid.tsx +81 -0
- package/src/ui/Testimonials.tsx +103 -0
- package/src/ui/TimeField.tsx +15 -5
- package/src/ui/internal/sectionKit.tsx +72 -0
- package/src/ui/internal/socialIcons.tsx +41 -0
- package/dist/NumberInput-Bnh2u7pp.js +0 -381
- 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
|
+
}
|