neba 1.10.0 → 1.12.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 (288) hide show
  1. package/README.md +36 -6
  2. package/dist/components/accordion/Accordion.js +1 -1
  3. package/dist/components/alert/Alert.js +1 -1
  4. package/dist/components/anchor/Anchor.js +1 -1
  5. package/dist/components/animate-appear/AnimateAppear.d.ts +2 -13
  6. package/dist/components/animate-appear/AnimateAppear.js +1 -1
  7. package/dist/components/animate-blink/AnimateBlink.d.ts +2 -2
  8. package/dist/components/animate-blink/AnimateBlink.js +1 -1
  9. package/dist/components/animate-counter/AnimateCounter.d.ts +45 -0
  10. package/dist/components/animate-counter/AnimateCounter.js +1 -0
  11. package/dist/components/animate-counter/index.d.ts +1 -0
  12. package/dist/components/animate-counter/index.js +1 -0
  13. package/dist/components/animate-fade/AnimateFade.d.ts +2 -2
  14. package/dist/components/animate-fade/AnimateFade.js +1 -1
  15. package/dist/components/animate-float/AnimateFloat.d.ts +35 -0
  16. package/dist/components/animate-float/AnimateFloat.js +1 -0
  17. package/dist/components/animate-float/index.d.ts +1 -0
  18. package/dist/components/animate-float/index.js +1 -0
  19. package/dist/components/animate-grow/AnimateGrow.d.ts +2 -2
  20. package/dist/components/animate-grow/AnimateGrow.js +1 -1
  21. package/dist/components/animate-lighting/AnimateLighting.js +1 -1
  22. package/dist/components/animate-reveal/AnimateReveal.d.ts +41 -0
  23. package/dist/components/animate-reveal/AnimateReveal.js +1 -0
  24. package/dist/components/animate-reveal/index.d.ts +1 -0
  25. package/dist/components/animate-reveal/index.js +1 -0
  26. package/dist/components/animate-rotate/AnimateRotate.d.ts +2 -2
  27. package/dist/components/animate-rotate/AnimateRotate.js +1 -1
  28. package/dist/components/animate-scramble/AnimateScramble.d.ts +48 -0
  29. package/dist/components/animate-scramble/AnimateScramble.js +1 -0
  30. package/dist/components/animate-scramble/index.d.ts +1 -0
  31. package/dist/components/animate-scramble/index.js +1 -0
  32. package/dist/components/animate-shake/AnimateShake.d.ts +39 -0
  33. package/dist/components/animate-shake/AnimateShake.js +1 -0
  34. package/dist/components/animate-shake/index.d.ts +1 -0
  35. package/dist/components/animate-shake/index.js +1 -0
  36. package/dist/components/animate-slide/AnimateSlide.d.ts +2 -2
  37. package/dist/components/animate-slide/AnimateSlide.js +1 -1
  38. package/dist/components/animate-split/AnimateSplit.d.ts +61 -0
  39. package/dist/components/animate-split/AnimateSplit.js +1 -0
  40. package/dist/components/animate-split/index.d.ts +1 -0
  41. package/dist/components/animate-split/index.js +1 -0
  42. package/dist/components/animate-typing/AnimateTyping.js +1 -1
  43. package/dist/components/animate-zoom/AnimateZoom.d.ts +2 -2
  44. package/dist/components/animate-zoom/AnimateZoom.js +1 -1
  45. package/dist/components/app-logo/AppLogo.js +1 -1
  46. package/dist/components/aspect-ratio/AspectRatio.js +1 -1
  47. package/dist/components/avatar/Avatar.js +1 -1
  48. package/dist/components/badge/Badge.js +1 -1
  49. package/dist/components/bar-chart/BarChart.d.ts +1 -1
  50. package/dist/components/bar-chart/BarChart.js +1 -1
  51. package/dist/components/blockquote/Blockquote.js +1 -1
  52. package/dist/components/bottom-navigation/BottomNavigation.js +1 -1
  53. package/dist/components/box/Box.js +1 -1
  54. package/dist/components/breadcrumb/Breadcrumb.js +1 -1
  55. package/dist/components/button/Button.js +1 -1
  56. package/dist/components/button-group/ButtonGroup.js +1 -1
  57. package/dist/components/calendar/Calendar.d.ts +72 -0
  58. package/dist/components/calendar/Calendar.js +1 -0
  59. package/dist/components/calendar/index.d.ts +2 -0
  60. package/dist/components/calendar/index.js +1 -0
  61. package/dist/components/card/Card.js +1 -1
  62. package/dist/components/carousel/Carousel.js +1 -1
  63. package/dist/components/chat-bubble/ChatBubble.js +1 -1
  64. package/dist/components/checkbox/Checkbox.js +1 -1
  65. package/dist/components/chip/Chip.js +1 -1
  66. package/dist/components/code-block/CodeBlock.js +1 -1
  67. package/dist/components/collapsible/Collapsible.js +1 -1
  68. package/dist/components/color-picker/ColorPicker.js +1 -1
  69. package/dist/components/combobox/Combobox.d.ts +14 -2
  70. package/dist/components/combobox/Combobox.js +1 -1
  71. package/dist/components/command-palette/CommandPalette.d.ts +1 -1
  72. package/dist/components/command-palette/CommandPalette.js +1 -1
  73. package/dist/components/confirm/Confirm.d.ts +83 -0
  74. package/dist/components/confirm/Confirm.js +1 -0
  75. package/dist/components/confirm/index.d.ts +2 -0
  76. package/dist/components/confirm/index.js +1 -0
  77. package/dist/components/container/Container.d.ts +12 -4
  78. package/dist/components/container/Container.js +1 -1
  79. package/dist/components/data-list/DataList.js +1 -1
  80. package/dist/components/data-table/DataTable.d.ts +104 -1
  81. package/dist/components/data-table/DataTable.js +1 -1
  82. package/dist/components/date-picker/DatePicker.d.ts +40 -8
  83. package/dist/components/date-picker/DatePicker.js +1 -1
  84. package/dist/components/date-range-picker/DateRangePicker.js +1 -1
  85. package/dist/components/date-time-picker/DateTimePicker.js +1 -1
  86. package/dist/components/dialog/Dialog.d.ts +1 -1
  87. package/dist/components/dialog/Dialog.js +1 -1
  88. package/dist/components/divider/Divider.js +1 -1
  89. package/dist/components/drawer/Drawer.d.ts +1 -1
  90. package/dist/components/drawer/Drawer.js +1 -1
  91. package/dist/components/empty/Empty.js +1 -1
  92. package/dist/components/file-picker/FilePicker.js +1 -1
  93. package/dist/components/flex/Flex.d.ts +93 -0
  94. package/dist/components/flex/Flex.js +1 -0
  95. package/dist/components/flex/index.d.ts +2 -0
  96. package/dist/components/flex/index.js +1 -0
  97. package/dist/components/floating-action-button/FloatingActionButton.js +1 -1
  98. package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
  99. package/dist/components/footer/Footer.d.ts +4 -3
  100. package/dist/components/footer/Footer.js +1 -1
  101. package/dist/components/gallery/Gallery.d.ts +150 -0
  102. package/dist/components/gallery/Gallery.js +1 -0
  103. package/dist/components/gallery/GalleryViewer.d.ts +30 -0
  104. package/dist/components/gallery/GalleryViewer.js +1 -0
  105. package/dist/components/gallery/index.d.ts +2 -0
  106. package/dist/components/gallery/index.js +1 -0
  107. package/dist/components/gauge-chart/GaugeChart.d.ts +1 -1
  108. package/dist/components/gauge-chart/GaugeChart.js +1 -1
  109. package/dist/components/grid/Grid.js +1 -1
  110. package/dist/components/grid-container/GridContainer.js +1 -1
  111. package/dist/components/header/Header.d.ts +5 -4
  112. package/dist/components/header/Header.js +1 -1
  113. package/dist/components/heatmap-chart/HeatmapChart.d.ts +1 -1
  114. package/dist/components/heatmap-chart/HeatmapChart.js +1 -1
  115. package/dist/components/highlight/Highlight.js +1 -1
  116. package/dist/components/hover-card/HoverCard.d.ts +1 -1
  117. package/dist/components/hover-card/HoverCard.js +1 -1
  118. package/dist/components/how-to-steps/HowToSteps.js +1 -1
  119. package/dist/components/image/Image.d.ts +190 -0
  120. package/dist/components/image/Image.js +1 -0
  121. package/dist/components/image/index.d.ts +2 -0
  122. package/dist/components/image/index.js +1 -0
  123. package/dist/components/list/List.js +1 -1
  124. package/dist/components/menu/Menu.js +1 -1
  125. package/dist/components/menubar/Menubar.js +1 -1
  126. package/dist/components/meter/Meter.js +1 -1
  127. package/dist/components/mockup/Mockup.js +1 -1
  128. package/dist/components/navigation-menu/NavigationMenu.js +1 -1
  129. package/dist/components/number-field/NumberField.d.ts +12 -2
  130. package/dist/components/number-field/NumberField.js +1 -1
  131. package/dist/components/otp-field/OtpField.js +1 -1
  132. package/dist/components/overlay/Overlay.d.ts +1 -1
  133. package/dist/components/overlay/Overlay.js +1 -1
  134. package/dist/components/page-layout/PageLayout.js +1 -1
  135. package/dist/components/pagination/Pagination.js +1 -1
  136. package/dist/components/panes/Panes.js +1 -1
  137. package/dist/components/pie-chart/PieChart.d.ts +1 -1
  138. package/dist/components/pie-chart/PieChart.js +1 -1
  139. package/dist/components/pill/Pill.js +1 -1
  140. package/dist/components/popconfirm/Popconfirm.d.ts +71 -0
  141. package/dist/components/popconfirm/Popconfirm.js +1 -0
  142. package/dist/components/popconfirm/index.d.ts +2 -0
  143. package/dist/components/popconfirm/index.js +1 -0
  144. package/dist/components/popover/Popover.d.ts +1 -1
  145. package/dist/components/popover/Popover.js +1 -1
  146. package/dist/components/portal/Portal.d.ts +48 -0
  147. package/dist/components/portal/Portal.js +1 -0
  148. package/dist/components/portal/index.d.ts +2 -0
  149. package/dist/components/portal/index.js +1 -0
  150. package/dist/components/progress-box/ProgressBox.js +1 -1
  151. package/dist/components/progress-circular/ProgressCircular.js +1 -1
  152. package/dist/components/progress-linear/ProgressLinear.js +1 -1
  153. package/dist/components/provider/NebaProvider.d.ts +99 -0
  154. package/dist/components/provider/NebaProvider.js +1 -0
  155. package/dist/components/provider/index.d.ts +3 -0
  156. package/dist/components/provider/index.js +1 -0
  157. package/dist/components/radio-group/RadioGroup.js +1 -1
  158. package/dist/components/rating/Rating.js +1 -1
  159. package/dist/components/scatter-chart/ScatterChart.d.ts +1 -1
  160. package/dist/components/scatter-chart/ScatterChart.js +1 -1
  161. package/dist/components/scroll-area/ScrollArea.js +1 -1
  162. package/dist/components/scroll-zone/ScrollZone.d.ts +9 -4
  163. package/dist/components/scroll-zone/ScrollZone.js +1 -1
  164. package/dist/components/select/Select.js +1 -1
  165. package/dist/components/shortcut/Shortcut.d.ts +2 -1
  166. package/dist/components/shortcut/Shortcut.js +1 -1
  167. package/dist/components/show/Show.d.ts +60 -0
  168. package/dist/components/show/Show.js +1 -0
  169. package/dist/components/show/index.d.ts +2 -0
  170. package/dist/components/show/index.js +1 -0
  171. package/dist/components/sidebar/Sidebar.js +1 -1
  172. package/dist/components/sidebar/SidebarTrigger.js +1 -1
  173. package/dist/components/skeleton/Skeleton.js +1 -1
  174. package/dist/components/slider/Slider.js +1 -1
  175. package/dist/components/sparkline/Sparkline.js +1 -1
  176. package/dist/components/spoiler/Spoiler.js +1 -1
  177. package/dist/components/stack/Stack.d.ts +126 -0
  178. package/dist/components/stack/Stack.js +1 -0
  179. package/dist/components/stack/index.d.ts +1 -0
  180. package/dist/components/stack/index.js +1 -0
  181. package/dist/components/statistic/Statistic.d.ts +8 -3
  182. package/dist/components/statistic/Statistic.js +1 -1
  183. package/dist/components/switch/Switch.js +1 -1
  184. package/dist/components/table/Table.d.ts +1 -1
  185. package/dist/components/table/Table.js +1 -1
  186. package/dist/components/tabs/Tabs.d.ts +28 -0
  187. package/dist/components/tabs/Tabs.js +1 -1
  188. package/dist/components/text-field/TextField.d.ts +12 -1
  189. package/dist/components/text-field/TextField.js +1 -1
  190. package/dist/components/text-link/TextLink.js +1 -1
  191. package/dist/components/time-picker/TimePicker.js +1 -1
  192. package/dist/components/timeline-chart/TimelineChart.d.ts +1 -1
  193. package/dist/components/timeline-chart/TimelineChart.js +1 -1
  194. package/dist/components/toast/Toast.d.ts +1 -1
  195. package/dist/components/toast/Toast.js +1 -1
  196. package/dist/components/toggle/Toggle.js +1 -1
  197. package/dist/components/toggle-group/ToggleGroup.js +1 -1
  198. package/dist/components/toolbar/Toolbar.js +1 -1
  199. package/dist/components/tooltip/Tooltip.d.ts +1 -1
  200. package/dist/components/tooltip/Tooltip.js +1 -1
  201. package/dist/components/tour/Tour.d.ts +1 -1
  202. package/dist/components/tour/Tour.js +1 -1
  203. package/dist/components/transfer/Transfer.js +1 -1
  204. package/dist/components/tree-select/TreeSelect.d.ts +88 -0
  205. package/dist/components/tree-select/TreeSelect.js +1 -0
  206. package/dist/components/tree-select/index.d.ts +2 -0
  207. package/dist/components/tree-select/index.js +1 -0
  208. package/dist/components/tree-view/TreeView.js +1 -1
  209. package/dist/components/visually-hidden/VisuallyHidden.d.ts +37 -0
  210. package/dist/components/visually-hidden/VisuallyHidden.js +1 -0
  211. package/dist/components/visually-hidden/index.d.ts +2 -0
  212. package/dist/components/visually-hidden/index.js +1 -0
  213. package/dist/components/window-pane/WindowPane.js +1 -1
  214. package/dist/hooks/index.d.ts +10 -0
  215. package/dist/hooks/index.js +1 -0
  216. package/dist/hooks/useDisclosure.d.ts +21 -0
  217. package/dist/hooks/useDisclosure.js +1 -0
  218. package/dist/hooks/useElementSize.d.ts +23 -0
  219. package/dist/hooks/useElementSize.js +1 -0
  220. package/dist/hooks/useMediaQuery.d.ts +61 -0
  221. package/dist/hooks/useMediaQuery.js +1 -0
  222. package/dist/hooks/useOnScreen.d.ts +24 -0
  223. package/dist/hooks/useOnScreen.js +1 -0
  224. package/dist/hooks/useShortcut.d.ts +34 -0
  225. package/dist/hooks/useShortcut.js +1 -0
  226. package/dist/index.d.ts +19 -1
  227. package/dist/index.js +1 -1
  228. package/dist/internal/animate.d.ts +65 -2
  229. package/dist/internal/animate.js +1 -1
  230. package/dist/internal/calendar.d.ts +31 -5
  231. package/dist/internal/calendar.js +1 -1
  232. package/dist/internal/chart-frame.d.ts +32 -0
  233. package/dist/internal/chart-frame.js +1 -1
  234. package/dist/internal/chart-line.js +1 -1
  235. package/dist/internal/chart.d.ts +16 -0
  236. package/dist/internal/chart.js +1 -1
  237. package/dist/internal/csv.d.ts +40 -0
  238. package/dist/internal/csv.js +1 -0
  239. package/dist/internal/date.d.ts +39 -1
  240. package/dist/internal/date.js +1 -1
  241. package/dist/internal/defaults.d.ts +46 -0
  242. package/dist/internal/defaults.js +1 -0
  243. package/dist/internal/grid.d.ts +13 -27
  244. package/dist/internal/grid.js +1 -1
  245. package/dist/internal/i18n.d.ts +43 -0
  246. package/dist/internal/i18n.js +1 -1
  247. package/dist/internal/keys.d.ts +92 -0
  248. package/dist/internal/keys.js +1 -0
  249. package/dist/internal/media.d.ts +34 -0
  250. package/dist/internal/media.js +1 -1
  251. package/dist/internal/page-layout.d.ts +18 -9
  252. package/dist/internal/page-layout.js +1 -1
  253. package/dist/internal/picker.d.ts +7 -1
  254. package/dist/internal/picker.js +1 -1
  255. package/dist/internal/responsive.d.ts +97 -0
  256. package/dist/internal/responsive.js +1 -0
  257. package/dist/internal/styles.d.ts +68 -0
  258. package/dist/internal/styles.js +1 -1
  259. package/dist/internal/text.d.ts +42 -0
  260. package/dist/internal/text.js +1 -0
  261. package/dist/locales/ar.js +1 -1
  262. package/dist/locales/de.js +1 -1
  263. package/dist/locales/es.js +1 -1
  264. package/dist/locales/fr.js +1 -1
  265. package/dist/locales/hi.js +1 -1
  266. package/dist/locales/id.js +1 -1
  267. package/dist/locales/it.js +1 -1
  268. package/dist/locales/ja.js +1 -1
  269. package/dist/locales/ko.js +1 -1
  270. package/dist/locales/nl.js +1 -1
  271. package/dist/locales/pl.js +1 -1
  272. package/dist/locales/pt.js +1 -1
  273. package/dist/locales/ru.js +1 -1
  274. package/dist/locales/th.js +1 -1
  275. package/dist/locales/tr.js +1 -1
  276. package/dist/locales/vi.js +1 -1
  277. package/dist/locales/zh-hans.js +1 -1
  278. package/dist/locales/zh-hant.js +1 -1
  279. package/dist/styles.css +1 -1
  280. package/dist/tailwind.css +280 -24
  281. package/dist/types.d.ts +153 -6
  282. package/package.json +23 -17
  283. package/dist/components/avatar-group/AvatarGroup.d.ts +0 -47
  284. package/dist/components/avatar-group/AvatarGroup.js +0 -1
  285. package/dist/components/avatar-group/index.d.ts +0 -2
  286. package/dist/components/avatar-group/index.js +0 -1
  287. package/dist/internal/avatar-group.d.ts +0 -22
  288. package/dist/internal/avatar-group.js +0 -1
package/README.md CHANGED
@@ -125,6 +125,36 @@ A registered language costs about 1.9 kB gzipped and you pay only for the ones y
125
125
 
126
126
  Anything the platform already knows — month names, weekday names, AM/PM, number and date formats — comes from `Intl` and needs no registration. And every string a component invents also has a prop that overrides it, so a language Neba does not carry is never a dead end.
127
127
 
128
+ ### One place for your defaults
129
+
130
+ ```tsx
131
+ import { NebaProvider } from 'neba';
132
+
133
+ <NebaProvider
134
+ defaults={{ size: 'sm', density: 'compact', locale: 'ko' }}
135
+ defaultColorScheme="system"
136
+ >
137
+ <App />
138
+ </NebaProvider>;
139
+ ```
140
+
141
+ Optional, and every component works without it. It fills in `size`, `density`, `variant` and `locale` where a call site left them out — the call site always wins — owns the colour scheme (`useColorScheme()`, plus a `colorSchemeScript()` for the first-paint flash), and sets the writing direction. `color` and `elevation` are deliberately not defaultable; [the guide](https://neba.cdget.com/guide/provider) says why.
142
+
143
+ ### Hooks
144
+
145
+ The hooks the components already run on, from `neba/hooks` (or from the package root):
146
+
147
+ ```tsx
148
+ import { useDisclosure, useBreakpoint, useShortcut } from 'neba/hooks';
149
+
150
+ const { open, onOpen, setOpen } = useDisclosure();
151
+ const desktop = useBreakpoint('lg');
152
+
153
+ useShortcut('Mod+K', onOpen);
154
+ ```
155
+
156
+ `useDisclosure`, `useMediaQuery`, `useBreakpoint`, `usePrefersReducedMotion`, `useElementSize`, `useOnScreen`, `useShortcut`. Everything here is machinery the library needed for itself — there is no general-purpose hook collection, and there is not going to be one. Full notes in [the hooks guide](https://neba.cdget.com/guide/hooks).
157
+
128
158
  ### The shared prop vocabulary
129
159
 
130
160
  The reason a Neba screen looks composed rather than assembled is that the props mean one thing across the library. They live in [`src/types.ts`](src/types.ts) and every component draws from the same list:
@@ -146,21 +176,21 @@ Placement props are logical, not physical — `start`/`end` rather than `left`/`
146
176
 
147
177
  ### Components
148
178
 
149
- **Inputs** — Button, IconButton, ButtonGroup, SegmentedButton, Toggle, ToggleGroup, Form, Fieldset, FloatingActionButton (with FloatingAction), TextField, NumberField, OtpField, Select, Combobox, Checkbox, RadioGroup, Switch, Slider, Rating, Menu (with submenus, checkbox and radio items), ContextMenu, Menubar, NavigationMenu, CommandPalette, FilePicker, Transfer, Pagination, BottomNavigation, FloatingBottomNavigation, ColorPicker, DatePicker, TimePicker, DateTimePicker, DateRangePicker
179
+ **Inputs** — Button, IconButton, ButtonGroup, SegmentedButton, Toggle, ToggleGroup, Form, Fieldset, FloatingActionButton (with FloatingAction), TextField, NumberField, OtpField, Select, Combobox, TreeSelect, Checkbox, RadioGroup, Switch, Slider, Rating, Menu (with submenus, checkbox and radio items), ContextMenu, Menubar, NavigationMenu, CommandPalette, FilePicker, Transfer, Pagination, BottomNavigation, FloatingBottomNavigation, ColorPicker, Calendar, DatePicker, TimePicker, DateTimePicker, DateRangePicker
150
180
 
151
181
  **Surfaces** — Box, Card, Accordion, Collapsible, Tabs, Carousel, Toolbar, Pill, Spoiler, HowToSteps, ChatBubble, Drawer, Popover, Mockup, WindowPane, HoverCard
152
182
 
153
- **Display** — Typography, TextLink, Blockquote, Highlight, Divider, Chip, Badge, Avatar, AvatarGroup, AppLogo, Icon, Shortcut, List, DataList, Table, DataTable, CodeBlock, Timeline, Breadcrumb, Anchor, TreeView
183
+ **Display** — Typography, TextLink, Blockquote, Highlight, Divider, Chip, Badge, Avatar, AppLogo, Icon, Image, Gallery, Shortcut, List, DataList, Table, DataTable, CodeBlock, Timeline, Breadcrumb, Anchor, TreeView, VisuallyHidden
154
184
 
155
185
  **Charts** — Statistic, Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart, GaugeChart
156
186
 
157
- **Feedback** — Alert, Dialog, Toast, Tooltip, Overlay, Skeleton, Empty, ProgressLinear, ProgressCircular, ProgressBox, Meter, Tour
187
+ **Feedback** — Alert, Dialog, Confirm, Popconfirm, Toast, Tooltip, Overlay, Skeleton, Empty, ProgressLinear, ProgressCircular, ProgressBox, Meter, Tour
158
188
 
159
- **Layout** — PageLayout (with Header, Footer and Sidebar), Container, Grid (with GridContainer), Panes, AspectRatio, ScrollZone, ScrollArea
189
+ **Layout** — PageLayout (with Header, Footer and Sidebar), Container, Grid (with GridContainer), Flex, Panes, Stack, Show, AspectRatio, Portal, ScrollZone, ScrollArea
160
190
 
161
- **Transitions** — AnimateFade, AnimateGrow, AnimateZoom, AnimateSlide, AnimateRotate, AnimateBlink, AnimateAppear, AnimateTyping, AnimateLighting, AnimateMarquee, AnimateHeadline
191
+ **Transitions** — AnimateFade, AnimateGrow, AnimateZoom, AnimateSlide, AnimateRotate, AnimateBlink, AnimateReveal, AnimateFloat, AnimateShake, AnimateAppear, AnimateSplit, AnimateTyping, AnimateScramble, AnimateCounter, AnimateLighting, AnimateMarquee, AnimateHeadline
162
192
 
163
- **Recently added** — GaugeChart, CommandPalette, Tour, Transfer, Anchor, DataList, AvatarGroup, NavigationMenu, Menubar, Form (with Fieldset), ScrollArea, HoverCard, Meter, Toggle (with ToggleGroup), CodeBlock, HowToSteps, ScrollZone, FloatingBottomNavigation, WindowPane, Collapsible, Rating, BottomNavigation, FloatingActionButton, the charts (Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart), DataTable, Empty, Mockup, the eleven `Animate*` wrappers, ColorPicker, Drawer, Popover, Skeleton, AspectRatio
193
+ **Recently added** — Gallery, Flex, Show, the six new `Animate*` (Reveal, Float, Shake, Split, Counter, Scramble), Stack, TreeSelect, Calendar, Image, Confirm, Popconfirm, VisuallyHidden, Portal, GaugeChart, CommandPalette, Tour, Transfer, Anchor, DataList, NavigationMenu, Menubar, Form (with Fieldset), ScrollArea, HoverCard, Meter, Toggle (with ToggleGroup), CodeBlock, HowToSteps, ScrollZone, FloatingBottomNavigation, WindowPane, Collapsible, Rating, BottomNavigation, FloatingActionButton, the charts (Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart), DataTable, Empty, Mockup, the `Animate*` wrappers, ColorPicker, Drawer, Popover, Skeleton, AspectRatio
164
194
 
165
195
  Each one has its own page — live previews, every prop, and the variations worth seeing — under [**All components**](https://neba.cdget.com/components/).
166
196
 
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{Accordion as t}from"@base-ui/react/accordion";import{boxPaddingXClasses as l,boxPaddingYClasses as r}from"../box/Box.js";import{ChevronIcon as s}from"../../internal/icons.js";import{cx as i,focusRingClasses as o,gapClasses as d,hasContent as c,iconClasses as m,metaTextClasses as u,radiusClasses as f,sheetBodyClasses as h,sheetHeaderGapClasses as b,sheetTitleClasses as x,surfaceClasses as p,surfaceSlots as v,transitionClasses as g}from"../../internal/styles.js";const N=/*@__PURE__*/a.createContext({size:"md",density:"default",dividers:!0}),j={solid:[p,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[p,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"},w={xs:f.xs,sm:f.xs,md:f.sm,lg:f.sm,xl:f.md};export const Accordion=/*@__PURE__*/a.forwardRef(function({variant:n="outline",size:l="md",color:r="primary",density:s="default",elevation:o=0,multiple:d=!1,value:c,defaultValue:m,onValueChange:u,dividers:h=!0,disabled:b=!1,hiddenUntilFound:x=!1,keepMounted:p=!1,className:w,style:y,children:k,...z},C){const V=a.useMemo(()=>({size:l,density:s,dividers:h}),[l,s,h]),$=i("flex flex-col",f[l],j[n],g,h?"overflow-hidden [&>div+div]:border-t [&>div+div]:[border-color:var(--n-line)]":"p-1",w??"");return e(N.Provider,{value:V,children:e(t.Root,{ref:C,multiple:d,value:c,defaultValue:m,onValueChange:e=>u?.(e),disabled:b,hiddenUntilFound:x,keepMounted:p,className:$,style:{...v(r,o),...y},...z,children:k})})});export const AccordionItem=/*@__PURE__*/a.forwardRef(function({value:f,title:p,subtitle:v,startIcon:j,action:y,disabled:k=!1,className:z,children:C,...V},$){const{size:_,density:A,dividers:I}=a.useContext(N),M=l[A][_],R=r[A][_];return n(t.Item,{ref:$,value:f,disabled:k,className:i("flex flex-col",z??""),...V,children:[n(t.Header,{className:"m-0 flex w-full items-center [font:inherit]",children:[n(t.Trigger,{className:i("flex min-w-0 flex-1 cursor-pointer items-center text-start",M,R,d[_],g,m,o,I?"":w[_],"hover:bg-(--n-soft)","data-[panel-open]:text-(--n-accent)","disabled:cursor-not-allowed disabled:bg-transparent disabled:text-(--neba-disabled-fg)"),children:[c(j)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:j}):null,n("span",{className:`flex min-w-0 flex-1 flex-col ${b[_]}`,children:[c(p)?e("span",{className:`truncate font-semibold ${x[_]}`,children:p}):null,c(v)?e("span",{className:`truncate text-(--neba-muted-fg) ${u[_]}`,children:v}):null]}),e("span",{className:["flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)","[transition:rotate_var(--neba-duration)_var(--neba-ease)]","data-[panel-open]:rotate-180"].join(" "),children:e(s,{})})]}),c(y)?e("span",{className:`flex shrink-0 items-center ${M}`,children:y}):null]}),e(t.Panel,{className:["h-(--accordion-panel-height) overflow-hidden","[transition:height_var(--neba-duration)_var(--neba-ease)]","data-[starting-style]:h-0 data-[ending-style]:h-0"].join(" "),children:e("div",{className:["text-(--neba-muted-fg)",h[_],M,"compact"===A?"pb-2":"pb-4"].join(" "),children:C})})]})});
1
+ "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{Accordion as t}from"@base-ui/react/accordion";import{boxPaddingXClasses as l,boxPaddingYClasses as r}from"../box/Box.js";import{ChevronIcon as i}from"../../internal/icons.js";import{cx as s,focusRingClasses as o,gapClasses as d,hasContent as c,iconClasses as m,metaTextClasses as f,radiusClasses as u,sheetBodyClasses as h,sheetHeaderGapClasses as b,sheetTitleClasses as x,surfaceClasses as p,surfaceSlots as v,transitionClasses as g}from"../../internal/styles.js";import{useStyleDefaults as N}from"../../internal/defaults.js";const j=/*@__PURE__*/a.createContext({size:"md",density:"default",dividers:!0}),y={solid:[p,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[p,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"},w={xs:u.xs,sm:u.xs,md:u.sm,lg:u.sm,xl:u.md};export const Accordion=/*@__PURE__*/a.forwardRef(function(n,l){const{variant:r="outline",size:i="md",color:o="primary",density:d="default",elevation:c=0,multiple:m=!1,value:f,defaultValue:h,onValueChange:b,dividers:x=!0,disabled:p=!1,hiddenUntilFound:w=!1,keepMounted:k=!1,className:z,style:C,children:V,...$}=N(n,["size","density","variant"]),_=a.useMemo(()=>({size:i,density:d,dividers:x}),[i,d,x]),A=s("flex flex-col",u[i],y[r],g,x?"overflow-hidden [&>div+div]:border-t [&>div+div]:[border-color:var(--n-line)]":"p-1",z??"");return e(j.Provider,{value:_,children:e(t.Root,{ref:l,multiple:m,value:f,defaultValue:h,onValueChange:e=>b?.(e),disabled:p,hiddenUntilFound:w,keepMounted:k,className:A,style:{...v(o,c),...C},...$,children:V})})});export const AccordionItem=/*@__PURE__*/a.forwardRef(function({value:u,title:p,subtitle:v,startIcon:N,action:y,disabled:k=!1,className:z,children:C,...V},$){const{size:_,density:A,dividers:I}=a.useContext(j),M=l[A][_],R=r[A][_];return n(t.Item,{ref:$,value:u,disabled:k,className:s("flex flex-col",z??""),...V,children:[n(t.Header,{className:"m-0 flex w-full items-center [font:inherit]",children:[n(t.Trigger,{className:s("flex min-w-0 flex-1 cursor-pointer items-center text-start",M,R,d[_],g,m,o,I?"":w[_],"hover:bg-(--n-soft)","data-[panel-open]:text-(--n-accent)","disabled:cursor-not-allowed disabled:bg-transparent disabled:text-(--neba-disabled-fg)"),children:[c(N)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:N}):null,n("span",{className:`flex min-w-0 flex-1 flex-col ${b[_]}`,children:[c(p)?e("span",{className:`truncate font-semibold ${x[_]}`,children:p}):null,c(v)?e("span",{className:`truncate text-(--neba-muted-fg) ${f[_]}`,children:v}):null]}),e("span",{className:["flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)","[transition:rotate_var(--neba-duration)_var(--neba-ease)]","data-[panel-open]:rotate-180"].join(" "),children:e(i,{})})]}),c(y)?e("span",{className:`flex shrink-0 items-center ${M}`,children:y}):null]}),e(t.Panel,{className:["h-(--accordion-panel-height) overflow-hidden","[transition:height_var(--neba-duration)_var(--neba-ease)]","data-[starting-style]:h-0 data-[ending-style]:h-0"].join(" "),children:e("div",{className:["text-(--neba-muted-fg)",h[_],M,"compact"===A?"pb-2":"pb-4"].join(" "),children:C})})]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{boxPaddingClasses as l}from"../box/Box.js";import{actionMessages as i,useMessages as s}from"../../internal/i18n.js";import{CloseIcon as a,severityIcon as o}from"../../internal/icons.js";import{transitionProps as r}from"../../internal/animate.js";import{controlSlots as c,cx as d,hasContent as m,iconClasses as f,radiusClasses as u,sheetBodyClasses as x,sheetHeaderGapClasses as b,sheetSectionGapClasses as v,sheetTitleClasses as h,surfaceClasses as p,transitionClasses as y}from"../../internal/styles.js";const j={solid:[p,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[p,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-(--n-soft)"},g={solid:"",outline:"text-(--n-accent)",text:"text-(--n-accent)"},N={solid:"",outline:"text-(--neba-muted-fg)",text:"text-(--neba-muted-fg)"},w={primary:"status",secondary:"status",info:"status",success:"status",warning:"alert",danger:"alert"};export const Alert=/*@__PURE__*/n.forwardRef(function({variant:n="outline",size:p="md",color:k="info",density:$="default",elevation:_=0,title:z,icon:C,action:A,onClose:B,locale:L,closeLabel:R,transition:q,className:D,style:E,children:F,...G},H){const I=s(i,L),J=void 0===C?o(k):C,K=g[n],M=m(z),O=r(q);return t("div",{ref:H,role:w[k],className:d("flex w-full items-start",l[$][p],u[p],v[p],x[p],y,j[n],f,O.className,D??""),style:{...c(k,_,n),...O.style,...E},...G,children:[m(J)?e("span",{className:`flex h-[1lh] shrink-0 items-center ${K}`,children:J}):null,t("div",{className:`flex min-w-0 flex-1 flex-col ${b[p]}`,children:[M?e("div",{className:`neba-title font-semibold ${h[p]} ${K}`,children:z}):null,m(F)?e("div",{className:M?N[n]:void 0,children:F}):null]}),m(A)?e("div",{className:"flex h-[1lh] shrink-0 items-center",children:A}):null,B?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e("button",{type:"button","aria-label":R??I.dismiss,onClick:B,className:["inline-flex size-[1.15em] cursor-pointer items-center justify-center rounded-full","opacity-70 [transition:opacity_var(--neba-duration)_var(--neba-ease)]","hover:opacity-100 focus-visible:opacity-100","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),children:e(a,{})})}):null]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{boxPaddingClasses as i}from"../box/Box.js";import{actionMessages as l,useMessages as s}from"../../internal/i18n.js";import{CloseIcon as a,severityIcon as o}from"../../internal/icons.js";import{transitionProps as r}from"../../internal/animate.js";import{controlSlots as c,cx as d,hasContent as m,iconClasses as f,radiusClasses as u,sheetBodyClasses as x,sheetHeaderGapClasses as b,sheetSectionGapClasses as v,sheetTitleClasses as p,surfaceClasses as h,transitionClasses as y}from"../../internal/styles.js";import{useStyleDefaults as j}from"../../internal/defaults.js";const g={solid:[h,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[h,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-(--n-soft)"},N={solid:"",outline:"text-(--n-accent)",text:"text-(--n-accent)"},w={solid:"",outline:"text-(--neba-muted-fg)",text:"text-(--neba-muted-fg)"},k={primary:"status",secondary:"status",info:"status",success:"status",warning:"alert",danger:"alert"};export const Alert=/*@__PURE__*/n.forwardRef(function(n,h){const{variant:$="outline",size:_="md",color:z="info",density:C="default",elevation:A=0,title:B,icon:L,action:R,onClose:q,locale:D,closeLabel:E,transition:F,className:G,style:H,children:I,...J}=j(n,["size","density","variant","locale"]),K=s(l,D),M=void 0===L?o(z):L,O=N[$],P=m(B),Q=r(F);return t("div",{ref:h,role:k[z],className:d("flex w-full items-start",i[C][_],u[_],v[_],x[_],y,g[$],f,Q.className,G??""),style:{...c(z,A,$),...Q.style,...H},...J,children:[m(M)?e("span",{className:`flex h-[1lh] shrink-0 items-center ${O}`,children:M}):null,t("div",{className:`flex min-w-0 flex-1 flex-col ${b[_]}`,children:[P?e("div",{className:`neba-title font-semibold ${p[_]} ${O}`,children:B}):null,m(I)?e("div",{className:P?w[$]:void 0,children:I}):null]}),m(R)?e("div",{className:"flex h-[1lh] shrink-0 items-center",children:R}):null,q?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e("button",{type:"button","aria-label":E??K.dismiss,onClick:q,className:["inline-flex size-[1.15em] cursor-pointer items-center justify-center rounded-full","opacity-70 [transition:opacity_var(--neba-duration)_var(--neba-ease)]","hover:opacity-100 focus-visible:opacity-100","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),children:e(a,{})})}):null]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import*as n from"react";import{anchorMessages as r,useMessages as t}from"../../internal/i18n.js";import{controlTextLeadingClasses as o,cx as a,focusRingClasses as l,transitionClasses as i}from"../../internal/styles.js";const c={default:{xs:"py-1",sm:"py-1",md:"py-1.5",lg:"py-1.5",xl:"py-2"},compact:{xs:"py-0.5",sm:"py-0.5",md:"py-1",lg:"py-1",xl:"py-1"}},s={xs:8,sm:10,md:12,lg:14,xl:16},m=["block min-w-0 truncate no-underline","text-(--neba-muted-fg)",i,l,"hover:text-(--neba-fg)","aria-[current=location]:font-medium aria-[current=location]:text-(--n-accent)"].join(" "),d=["border-s [border-color:transparent]","[transition:border-color_var(--neba-duration)_var(--neba-ease)]","aria-[current=location]:[border-color:var(--n-accent)]"].join(" ");export const Anchor=/*@__PURE__*/n.forwardRef(function({items:l,activeHref:i,onActiveChange:u,offset:f=0,container:p,rail:h=!0,size:g="md",color:v="primary",density:b="default",locale:y,label:x,className:w,style:j,...E},H){const N=t(r,y),[R,A]=n.useState(null),L=void 0!==i,z=L?i:R,B=n.useRef(u);B.current=u;const C=n.useRef(l);C.current=l;const $=l.map(e=>e.href).join("\0");return n.useEffect(()=>{if(L)return;const e=p?.current??window;let n=0,r=null;const t=()=>{n=0;const e=function(e,n,r){const t=(r?r.getBoundingClientRect().top:0)+n+1;let o=null;for(const n of e){const e=document.getElementById(n.href.replace(/^#/,""));e&&e.getBoundingClientRect().top<=t&&(o=n.href)}return(r?r.scrollTop+r.clientHeight>=r.scrollHeight-2:window.innerHeight+window.scrollY>=document.documentElement.scrollHeight-2)&&e.length>0?e[e.length-1].href:o}(C.current,f,p?.current??null);e!==r&&(r=e,A(e),B.current?.(e))},o=()=>{0===n&&(n=requestAnimationFrame(t))};return t(),e.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o,{passive:!0}),()=>{0!==n&&cancelAnimationFrame(n),e.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[$,f,p,L]),e("nav",{ref:H,"aria-label":x??N.label,className:a("min-w-0",w??""),style:{"--n-accent":`var(--neba-${v}-accent)`,"--n-ring":`var(--neba-${v}-ring)`,...j},...E,children:e("ul",{className:a("m-0 flex list-none flex-col p-0",h?"border-s [border-color:var(--neba-border)]":""),children:l.map(n=>e("li",{className:h?"[margin-inline-start:-1px]":"",children:e("a",{href:n.href,"aria-current":z===n.href?"location":void 0,className:a(m,o[g],c[b][g],h?`${d} ps-3`:""),style:{marginInlineStart:n.depth?n.depth*s[g]:void 0},children:n.label})},n.href))})})});
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as n from"react";import{anchorMessages as r,useMessages as t}from"../../internal/i18n.js";import{controlTextLeadingClasses as o,cx as a,focusRingClasses as l,transitionClasses as i}from"../../internal/styles.js";import{useStyleDefaults as c}from"../../internal/defaults.js";const s={default:{xs:"py-1",sm:"py-1",md:"py-1.5",lg:"py-1.5",xl:"py-2"},compact:{xs:"py-0.5",sm:"py-0.5",md:"py-1",lg:"py-1",xl:"py-1"}},m={xs:8,sm:10,md:12,lg:14,xl:16},d=["block min-w-0 truncate no-underline","text-(--neba-muted-fg)",i,l,"hover:text-(--neba-fg)","aria-[current=location]:font-medium aria-[current=location]:text-(--n-accent)"].join(" "),u=["border-s [border-color:transparent]","[transition:border-color_var(--neba-duration)_var(--neba-ease)]","aria-[current=location]:[border-color:var(--n-accent)]"].join(" ");export const Anchor=/*@__PURE__*/n.forwardRef(function(l,i){const{items:f,activeHref:p,onActiveChange:h,offset:g=0,container:v,rail:b=!0,size:y="md",color:x="primary",density:w="default",locale:j,label:E,className:H,style:N,...R}=c(l,["size","density","locale"]),z=t(r,j),[A,L]=n.useState(null),B=void 0!==p,C=B?p:A,$=n.useRef(h);$.current=h;const F=n.useRef(f);F.current=f;const I=f.map(e=>e.href).join("\0");return n.useEffect(()=>{if(B)return;const e=v?.current??window;let n=0,r=null;const t=()=>{n=0;const e=function(e,n,r){const t=(r?r.getBoundingClientRect().top:0)+n+1;let o=null;for(const n of e){const e=document.getElementById(n.href.replace(/^#/,""));e&&e.getBoundingClientRect().top<=t&&(o=n.href)}return(r?r.scrollTop+r.clientHeight>=r.scrollHeight-2:window.innerHeight+window.scrollY>=document.documentElement.scrollHeight-2)&&e.length>0?e[e.length-1].href:o}(F.current,g,v?.current??null);e!==r&&(r=e,L(e),$.current?.(e))},o=()=>{0===n&&(n=requestAnimationFrame(t))};return t(),e.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o,{passive:!0}),()=>{0!==n&&cancelAnimationFrame(n),e.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[I,g,v,B]),e("nav",{ref:i,"aria-label":E??z.label,className:a("min-w-0",H??""),style:{"--n-accent":`var(--neba-${x}-accent)`,"--n-ring":`var(--neba-${x}-ring)`,...N},...R,children:e("ul",{className:a("m-0 flex list-none flex-col p-0",b?"border-s [border-color:var(--neba-border)]":""),children:f.map(n=>e("li",{className:b?"[margin-inline-start:-1px]":"",children:e("a",{href:n.href,"aria-current":C===n.href?"location":void 0,className:a(d,o[y],s[w][y],b?`${u} ps-3`:""),style:{marginInlineStart:n.depth?n.depth*m[y]:void 0},children:n.label})},n.href))})})});
@@ -1,13 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { NebaAnimateProps, NebaSide } from '../../types.js';
4
- export interface AnimateAppearProps extends NebaAnimateProps, React.ComponentPropsWithoutRef<'div'> {
5
- /**
6
- * How long after one child the next one starts, in milliseconds. This is the
7
- * whole effect — everything else is what a single child does.
8
- * @default 80
9
- */
10
- stagger?: number;
3
+ import type { NebaAnimateProps, NebaSide, NebaStaggerProps, NebaTimelineProps } from '../../types.js';
4
+ export interface AnimateAppearProps extends NebaAnimateProps, NebaStaggerProps, NebaTimelineProps, React.ComponentPropsWithoutRef<'div'> {
11
5
  /**
12
6
  * Which edge each child drifts in from.
13
7
  * @default 'bottom'
@@ -25,11 +19,6 @@ export interface AnimateAppearProps extends NebaAnimateProps, React.ComponentPro
25
19
  * @default true
26
20
  */
27
21
  fade?: boolean;
28
- /**
29
- * Runs the list from the last child to the first.
30
- * @default false
31
- */
32
- reverse?: boolean;
33
22
  /** Renders something other than a `<div>`. Base UI's own escape hatch. */
34
23
  render?: useRender.RenderProp;
35
24
  /** The things that appear, one after another. */
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{useRender as a}from"@base-ui/react/use-render";import{animBaseClass as r,animationClasses as s,animationSlots as n,isInfinite as i,slideOffsets as l,useAnimationRun as o}from"../../internal/animate.js";import{cx as m}from"../../internal/styles.js";export const AnimateAppear=/*@__PURE__*/t.forwardRef(function({duration:d=420,delay:p=0,easing:c,repeat:f=1,alternate:y,paused:u,trigger:h="mount",play:g,once:x=!0,threshold:N=.2,stagger:j=80,from:b="bottom",distance:A="0.75rem",fade:E=!0,reverse:$=!1,render:v,className:w,style:C,children:R,...V},k){const q=o({trigger:h,play:g,once:x,threshold:N,paused:u,infinite:i(f)}),{x:z,y:B}=l(b,A),D=t.Children.toArray(R),F=`${r} ${s.slide}`,G=D.map((a,r)=>{const s=$?D.length-1-r:r,i=n({duration:d,delay:p+s*j,easing:c,repeat:f,alternate:y,x:z,y:B,opacity:E?0:1});if(!t.isValidElement(a))return e("span",{className:F,style:i,children:a},r);const l=a.props;return t.cloneElement(a,{className:m(F,l.className),style:{...i,...l.style}})});return a({render:v,ref:[k,q.ref],props:{...V,className:w,style:{"--n-anim-state":q.state,...C},...q.handlers,"data-neba-animation":"appear","data-state":q.state,children:G}})});
1
+ "use client";import*as e from"react";import{useRender as a}from"@base-ui/react/use-render";import{animBaseClass as t,animationClasses as r,isInfinite as n,slideOffsets as i,staggerChildren as s,useAnimationRun as o}from"../../internal/animate.js";export const AnimateAppear=/*@__PURE__*/e.forwardRef(function({duration:e=420,delay:d=0,easing:l,repeat:p=1,alternate:m,paused:c,trigger:g="mount",play:u,once:f=!0,threshold:y=.2,stagger:h=80,durationStep:b=0,reverse:x=!1,timeline:v,range:A,from:N="bottom",distance:S="0.75rem",fade:$=!0,render:j,className:w,style:R,children:k,...q},z){const B=o({trigger:g,play:u,once:f,threshold:y,paused:c,infinite:n(p)}),{x:C,y:D}=i(N,S),E=s(k,`${t} ${r.slide}`,{duration:e,delay:d,easing:l,repeat:p,alternate:m,x:C,y:D,opacity:$?0:1,timeline:v,range:A},{stagger:h,durationStep:b,reverse:x});return a({render:j,ref:[z,B.ref],props:{...q,className:w,style:{"--n-anim-state":B.state,...R},...B.handlers,"data-neba-animation":"appear","data-state":B.state,children:E}})});
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { NebaAnimateProps } from '../../types.js';
4
- export interface AnimateBlinkProps extends NebaAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { NebaAnimateProps, NebaStaggerProps, NebaTimelineProps } from '../../types.js';
4
+ export interface AnimateBlinkProps extends NebaAnimateProps, NebaStaggerProps, NebaTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * How faint it gets at the bottom of the cycle, between `0` and `1`. Raise it
7
7
  * for something that has to stay readable while it pulses.
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";import{cx as n}from"../../internal/styles.js";export const AnimateBlink=/*@__PURE__*/e.forwardRef(function({duration:e=900,delay:i=0,easing:s,repeat:o="infinite",alternate:l,paused:p,trigger:c="mount",play:m,once:d=!0,threshold:f=.2,min:u=0,render:y,className:g,style:h,children:N,...b},j){const k=a({effect:"blink",duration:e,delay:i,easing:s,repeat:o,alternate:l,opacity:u,trigger:c,play:m,once:d,threshold:f,paused:p,infinite:t(o)});return r({render:y,ref:[j,k.ref],props:{...b,className:n(k.className,g),style:{...k.style,...h},...k.props,children:N}})});
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as n}from"../../internal/animate.js";import{cx as a}from"../../internal/styles.js";export const AnimateBlink=/*@__PURE__*/e.forwardRef(function({duration:e=900,delay:i=0,easing:s,repeat:l="infinite",alternate:o,paused:d,trigger:p="mount",play:c,once:m=!0,threshold:f=.2,stagger:g=0,durationStep:u=0,reverse:y=!1,timeline:h,range:N,min:b=0,render:j,className:k,style:v,children:S,...w},x){const A=n({effect:"blink",duration:e,delay:i,easing:s,repeat:l,alternate:o,opacity:b,trigger:p,play:c,once:m,threshold:f,paused:d,infinite:t(l),timeline:h,range:N,children:S,stagger:g,durationStep:u,reverse:y});return r({render:j,ref:[x,A.ref],props:{...w,className:a(A.className,k),style:{...A.style,...v},...A.props,children:A.children}})});
@@ -0,0 +1,45 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { NebaAnimateProps } from '../../types.js';
4
+ export interface AnimateCounterProps extends Omit<NebaAnimateProps, 'easing' | 'repeat' | 'alternate'>, Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {
5
+ /** Where it lands. */
6
+ value: number;
7
+ /**
8
+ * Where it starts.
9
+ * @default 0
10
+ */
11
+ from?: number;
12
+ /**
13
+ * How long the count takes, in milliseconds.
14
+ * @default 1200
15
+ */
16
+ duration?: number;
17
+ /**
18
+ * How the number is written — `Intl.NumberFormat` options, so a currency, a
19
+ * percentage or a compact `1.2M` is a prop rather than a `format` callback.
20
+ */
21
+ format?: Intl.NumberFormatOptions;
22
+ /** Which language it is written in. Defaults to the reader's own. */
23
+ locale?: string;
24
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
25
+ render?: useRender.RenderProp;
26
+ }
27
+ /**
28
+ * A number counted up to its value.
29
+ *
30
+ * The one animation in the library whose subject is the content rather than the
31
+ * box around it, and the reason it is a component: a count is a value being
32
+ * interpolated and formatted on every frame, which is not something a
33
+ * `@keyframes` can do.
34
+ *
35
+ * It pairs with [Statistic](../charts/statistic) — a dashboard that draws its
36
+ * numbers instantly and animates everything around them has the emphasis
37
+ * exactly backwards.
38
+ *
39
+ * The finished number is in the document from the first frame, in a clipped box
40
+ * for a screen reader; what counts is a visible copy that is `aria-hidden`.
41
+ * A reader who cannot see the count is told the answer rather than a hundred
42
+ * intermediate ones, and a reader who has asked for less motion is shown the
43
+ * answer too.
44
+ */
45
+ export declare const AnimateCounter: React.ForwardRefExoticComponent<AnimateCounterProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{useRender as a}from"@base-ui/react/use-render";import{useAnimationRun as s,usePrefersReducedMotion as i}from"../../internal/animate.js";import{srOnlyClasses as o}from"../../internal/styles.js";export const AnimateCounter=/*@__PURE__*/n.forwardRef(function({value:m,from:l=0,duration:u=1200,delay:c=0,paused:d,trigger:f="mount",play:p,once:h=!0,threshold:y=.2,format:g,locale:F,render:j,className:v,style:A,...N},x){const b=s({trigger:f,play:p,once:h,threshold:y,paused:d,infinite:!1}),q=i(),[w,M]=n.useState(l),S=void 0===g?"":JSON.stringify(g),C=n.useMemo(()=>new Intl.NumberFormat(F,g),[F,S]);return n.useEffect(()=>{if(!b.started)return void M(l);if(q||u<=0)return void M(m);let e=0,r=null;const t=n=>{null===r&&(r=n);const a=n-r-c;if(a<0)return void(e=requestAnimationFrame(t));const s=Math.min(1,a/u);M(l+(m-l)*function(e){return 1-(1-e)**3}(s)),s<1&&(e=requestAnimationFrame(t))};return M(l),e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[b.started,q,m,l,u,c]),a({render:j,ref:[x,b.ref],props:{...N,className:v,style:A,"data-neba-animation":"counter","data-state":b.state,...b.handlers,children:t(r,{children:[e("span",{className:o,children:C.format(m)}),e("span",{"aria-hidden":"true",children:C.format(w)})]})}})});
@@ -0,0 +1 @@
1
+ export * from './AnimateCounter.js';
@@ -0,0 +1 @@
1
+ export*from"./AnimateCounter.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { NebaAnimateMode, NebaAnimateProps } from '../../types.js';
4
- export interface AnimateFadeProps extends NebaAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { NebaAnimateMode, NebaAnimateProps, NebaStaggerProps, NebaTimelineProps } from '../../types.js';
4
+ export interface AnimateFadeProps extends NebaAnimateProps, NebaStaggerProps, NebaTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * Whether the content arrives or leaves.
7
7
  * @default 'in'
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";import{cx as n}from"../../internal/styles.js";export const AnimateFade=/*@__PURE__*/e.forwardRef(function({duration:e=320,delay:s=0,easing:o,repeat:i=1,alternate:l,paused:d,trigger:m="mount",play:p,once:c=!0,threshold:f=.2,mode:u="in",from:y=0,render:g,className:h,style:N,children:j,...b},w){const x=a({effect:"fade",duration:e,delay:s,easing:o,repeat:i,alternate:l,mode:u,opacity:y,trigger:m,play:p,once:c,threshold:f,paused:d,infinite:t(i)});return r({render:g,ref:[w,x.ref],props:{...b,className:n(x.className,h),style:{...x.style,...N},...x.props,children:j}})});
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";import{cx as n}from"../../internal/styles.js";export const AnimateFade=/*@__PURE__*/e.forwardRef(function({duration:e=320,delay:i=0,easing:s,repeat:o=1,alternate:l,paused:d,trigger:m="mount",play:p,once:c=!0,threshold:f=.2,stagger:g=0,durationStep:u=0,reverse:y=!1,timeline:h,range:N,mode:j="in",from:v=0,render:S,className:b,style:w,children:x,...A},F){const R=a({effect:"fade",duration:e,delay:i,easing:s,repeat:o,alternate:l,mode:j,opacity:v,trigger:m,play:p,once:c,threshold:f,paused:d,infinite:t(o),timeline:h,range:N,children:x,stagger:g,durationStep:u,reverse:y});return r({render:S,ref:[F,R.ref],props:{...A,className:n(R.className,b),style:{...R.style,...w},...R.props,children:R.children}})});
@@ -0,0 +1,35 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { NebaAnimateProps, NebaSide, NebaStaggerProps, NebaTimelineProps } from '../../types.js';
4
+ export interface AnimateFloatProps extends NebaAnimateProps, NebaStaggerProps, NebaTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * Which way it drifts.
7
+ * @default 'top'
8
+ */
9
+ from?: NebaSide;
10
+ /**
11
+ * How far, at the top of the drift — a CSS length, or a number in pixels.
12
+ * Small on purpose: this is something resting rather than something moving,
13
+ * and past about a centimetre it stops reading as either.
14
+ * @default '0.5rem'
15
+ */
16
+ distance?: number | string;
17
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
18
+ render?: useRender.RenderProp;
19
+ children?: React.ReactNode;
20
+ }
21
+ /**
22
+ * A slow drift with nowhere to get to.
23
+ *
24
+ * The only effect in the set that is neither an arrival nor a state: it says
25
+ * *this is not fixed to the page*, which is what an illustration, a floating
26
+ * card or a mark above a hero wants and what nothing else in the library says.
27
+ * It runs for as long as the page is open and turns round at both ends, so
28
+ * there is never a frame where it jumps back.
29
+ *
30
+ * It is `translate` rather than a `transform`, so it composes with anything the
31
+ * element is already scaled or rotated by — and it is deliberately not offered
32
+ * on a control: a button that is never quite where it was is a button that is
33
+ * harder to press.
34
+ */
35
+ export declare const AnimateFloat: React.ForwardRefExoticComponent<AnimateFloatProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,slideOffsets as a,useAnimateElement as n}from"../../internal/animate.js";import{cx as i}from"../../internal/styles.js";export const AnimateFloat=/*@__PURE__*/e.forwardRef(function({duration:e=3200,delay:s=0,easing:l="ease-in-out",repeat:o="infinite",alternate:m=!0,paused:d,trigger:c="mount",play:f,once:p=!0,threshold:u=.2,stagger:g=0,durationStep:y=0,reverse:h=!1,timeline:x,range:N,from:b="top",distance:j="0.5rem",render:v,className:S,style:w,children:A,...C},F){const{x:R,y:k}=a(b,j),q=n({effect:null,effectClass:"neba-anim-float",name:"float",duration:e,delay:s,easing:l,repeat:o,alternate:m,x:R,y:k,trigger:c,play:f,once:p,threshold:u,paused:d,infinite:t(o),timeline:x,range:N,children:A,stagger:g,durationStep:y,reverse:h});return r({render:v,ref:[F,q.ref],props:{...C,className:i(q.className,S),style:{...q.style,...w},...q.props,children:q.children}})});
@@ -0,0 +1 @@
1
+ export * from './AnimateFloat.js';
@@ -0,0 +1 @@
1
+ export*from"./AnimateFloat.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { NebaAnimateMode, NebaAnimateProps } from '../../types.js';
4
- export interface AnimateGrowProps extends NebaAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { NebaAnimateMode, NebaAnimateProps, NebaStaggerProps, NebaTimelineProps } from '../../types.js';
4
+ export interface AnimateGrowProps extends NebaAnimateProps, NebaStaggerProps, NebaTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * Whether the content unfolds or folds away.
7
7
  * @default 'in'
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";import{cx as n}from"../../internal/styles.js";export const AnimateGrow=/*@__PURE__*/e.forwardRef(function({duration:e=340,delay:o=0,easing:s,repeat:i=1,alternate:l,paused:m,trigger:c="mount",play:d,once:p=!0,threshold:f=.2,mode:u="in",from:g=.8,origin:y="center",fade:h=!0,render:w,className:N,style:j,children:b,...x},A){const G=a({effect:"grow",duration:e,delay:o,easing:s,repeat:i,alternate:l,mode:u,scale:g,opacity:h?0:1,trigger:c,play:d,once:p,threshold:f,paused:m,infinite:t(i)});return r({render:w,ref:[A,G.ref],props:{...x,className:n(G.className,N),style:{transformOrigin:y,...G.style,...j},...G.props,children:b}})});
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";import{cx as n}from"../../internal/styles.js";export const AnimateGrow=/*@__PURE__*/e.forwardRef(function({duration:e=340,delay:i=0,easing:s,repeat:o=1,alternate:l,paused:d,trigger:m="mount",play:c,once:p=!0,threshold:f=.2,stagger:g=0,durationStep:u=0,reverse:y=!1,timeline:h,range:w,mode:N="in",from:j=.8,origin:v="center",fade:S=!0,render:b,className:x,style:A,children:G,...O},R){const k=a({effect:"grow",duration:e,delay:i,easing:s,repeat:o,alternate:l,mode:N,scale:j,opacity:S?0:1,trigger:m,play:c,once:p,threshold:f,paused:d,infinite:t(o),timeline:h,range:w,children:G,stagger:g,durationStep:u,reverse:y});return r({render:b,ref:[R,k.ref],props:{...O,className:n(k.className,x),style:{transformOrigin:v,...k.style,...A},...k.props,children:k.children}})});
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as n,useAnimateElement as a}from"../../internal/animate.js";import{cx as t,radiusClasses as i}from"../../internal/styles.js";export const AnimateLighting=/*@__PURE__*/e.forwardRef(function({duration:e=3e3,delay:o=0,easing:l,repeat:s="infinite",alternate:m,paused:d,trigger:p="mount",play:c,once:g=!0,threshold:u=.2,color:f="primary",glow:h,size:y="md",spread:w=3,arc:b=50,blur:$=4,reverse:x=!1,render:j,className:v,style:N,children:z,...A},L){const R=a({effect:null,duration:e,delay:o,easing:l,repeat:s,alternate:m,mode:x?"out":"in",trigger:p,play:c,once:g,threshold:u,paused:d,infinite:n(s)});return r({render:j,ref:[L,R.ref],props:{...A,className:t("neba-anim-lighting",i[y],v),style:{...R.style,"--n-anim-glow":h??`var(--neba-${f}-accent)`,"--n-anim-glow-width":`${w}px`,"--n-anim-glow-arc":`${b}deg`,"--n-anim-glow-blur":`${$}px`,...N},...R.props,"data-neba-animation":"lighting",children:z}})});
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as n,useAnimateElement as a}from"../../internal/animate.js";import{cx as t,radiusClasses as i}from"../../internal/styles.js";import{useStyleDefaults as o}from"../../internal/defaults.js";export const AnimateLighting=/*@__PURE__*/e.forwardRef(function(e,l){const{duration:s=3e3,delay:m=0,easing:d,repeat:p="infinite",alternate:c,paused:g,trigger:f="mount",play:u,once:h=!0,threshold:y=.2,color:w="primary",glow:b,size:$="md",spread:j=3,arc:x=50,blur:v=4,reverse:z=!1,render:N,className:A,style:L,children:R,...k}=o(e,["size"]),q=a({effect:null,duration:s,delay:m,easing:d,repeat:p,alternate:c,mode:z?"out":"in",trigger:f,play:u,once:h,threshold:y,paused:g,infinite:n(p)});return r({render:N,ref:[l,q.ref],props:{...k,className:t("neba-anim-lighting",i[$],A),style:{...q.style,"--n-anim-glow":b??`var(--neba-${w}-accent)`,"--n-anim-glow-width":`${j}px`,"--n-anim-glow-arc":`${x}deg`,"--n-anim-glow-blur":`${v}px`,...L},...q.props,"data-neba-animation":"lighting",children:R}})});
@@ -0,0 +1,41 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { NebaAnimateMode, NebaAnimateProps, NebaSide, NebaStaggerProps, NebaTimelineProps } from '../../types.js';
4
+ export interface AnimateRevealProps extends NebaAnimateProps, NebaStaggerProps, NebaTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * Whether the content is uncovered or covered again.
7
+ * @default 'in'
8
+ */
9
+ mode?: NebaAnimateMode;
10
+ /**
11
+ * The edge the wipe travels **from**. `left` uncovers left to right.
12
+ * @default 'left'
13
+ */
14
+ side?: NebaSide;
15
+ /**
16
+ * Fades as it wipes, from this opacity. `1` — the default — is a wipe and
17
+ * nothing else, which is the point of reaching for one.
18
+ * @default 1
19
+ */
20
+ from?: number;
21
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
22
+ render?: useRender.RenderProp;
23
+ children?: React.ReactNode;
24
+ }
25
+ /**
26
+ * Content uncovered by an edge travelling across it.
27
+ *
28
+ * The one entrance in the set where the content never moves and never changes
29
+ * colour: it is already in place, at full size and full strength, and what
30
+ * changes is how much of it has been let through. That makes it the effect to
31
+ * reach for on a heading, a rule, a chart's own plot area — anything whose
32
+ * position is the information.
33
+ *
34
+ * It is `clip-path`, so there is no wrapper and no `overflow` box: the element
35
+ * takes exactly the room it always took, and everything around it is laid out
36
+ * against the finished size from the first frame.
37
+ *
38
+ * `mode="out"` runs the same edge backwards and holds it there, which covers
39
+ * the content up.
40
+ */
41
+ export declare const AnimateReveal: React.ForwardRefExoticComponent<AnimateRevealProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,revealClip as a,useAnimateElement as n}from"../../internal/animate.js";import{cx as i}from"../../internal/styles.js";export const AnimateReveal=/*@__PURE__*/e.forwardRef(function({duration:e=620,delay:s=0,easing:l,repeat:o=1,alternate:d,paused:m,trigger:p="mount",play:c,once:f=!0,threshold:g=.2,stagger:u=0,durationStep:y=0,reverse:h=!1,timeline:v,range:N,mode:j="in",side:R="left",from:S=1,render:b,className:w,style:x,children:A,...k},q){const z=n({effect:"reveal",duration:e,delay:s,easing:l,repeat:o,alternate:d,mode:j,opacity:S,clip:a(R),trigger:p,play:c,once:f,threshold:g,paused:m,infinite:t(o),timeline:v,range:N,children:A,stagger:u,durationStep:y,reverse:h});return r({render:b,ref:[q,z.ref],props:{...k,className:i(z.className,w),style:{...z.style,...x},...z.props,children:z.children}})});
@@ -0,0 +1 @@
1
+ export * from './AnimateReveal.js';
@@ -0,0 +1 @@
1
+ export*from"./AnimateReveal.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { NebaAnimateMode, NebaAnimateProps } from '../../types.js';
4
- export interface AnimateRotateProps extends NebaAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { NebaAnimateMode, NebaAnimateProps, NebaStaggerProps, NebaTimelineProps } from '../../types.js';
4
+ export interface AnimateRotateProps extends NebaAnimateProps, NebaStaggerProps, NebaTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /** Whether the content turns into place or out of it. @default 'in' */
6
6
  mode?: NebaAnimateMode;
7
7
  /**
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";import{cx as n}from"../../internal/styles.js";export const AnimateRotate=/*@__PURE__*/e.forwardRef(function({duration:e=460,delay:o=0,easing:i,repeat:s=1,alternate:l,paused:d,trigger:m="mount",play:c,once:p=!0,threshold:f=.2,mode:g="in",from:u=-180,to:y=0,origin:h="center",fade:N=!0,render:j,className:R,style:$,children:b,...w},x){const A=a({effect:"rotate",duration:e,delay:o,easing:i,repeat:s,alternate:l,mode:g,angle:`${u}deg`,angleTo:`${y}deg`,opacity:N?0:1,trigger:m,play:c,once:p,threshold:f,paused:d,infinite:t(s)});return r({render:j,ref:[x,A.ref],props:{...w,className:n(A.className,R),style:{transformOrigin:h,...A.style,...$},...A.props,children:b}})});
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,useAnimateElement as a}from"../../internal/animate.js";import{cx as n}from"../../internal/styles.js";export const AnimateRotate=/*@__PURE__*/e.forwardRef(function({duration:e=460,delay:i=0,easing:o,repeat:s=1,alternate:l,paused:d,trigger:m="mount",play:c,once:g=!0,threshold:p=.2,stagger:f=0,durationStep:u=0,reverse:y=!1,timeline:h,range:N,mode:j="in",from:v=-180,to:R=0,origin:S="center",fade:$=!0,render:b,className:w,style:x,children:A,...O},T){const k=a({effect:"rotate",duration:e,delay:i,easing:o,repeat:s,alternate:l,mode:j,angle:`${v}deg`,angleTo:`${R}deg`,opacity:$?0:1,trigger:m,play:c,once:g,threshold:p,paused:d,infinite:t(s),timeline:h,range:N,children:A,stagger:f,durationStep:u,reverse:y});return r({render:b,ref:[T,k.ref],props:{...O,className:n(k.className,w),style:{transformOrigin:S,...k.style,...x},...k.props,children:k.children}})});
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { NebaAnimateProps } from '../../types.js';
4
+ export interface AnimateScrambleProps extends Omit<NebaAnimateProps, 'easing' | 'alternate'>, Omit<React.ComponentPropsWithoutRef<'div'>, 'children'> {
5
+ /** The text, when it is easier to pass than to nest. Overrides `children`. */
6
+ text?: string;
7
+ /**
8
+ * How fast the text settles, in characters per second.
9
+ * @default 18
10
+ */
11
+ speed?: number;
12
+ /**
13
+ * How often an unsettled character is redrawn, in milliseconds. Lower is
14
+ * busier; below about 30 it stops reading as characters at all.
15
+ * @default 45
16
+ */
17
+ tick?: number;
18
+ /**
19
+ * The pool an unsettled character is drawn from. Deliberately narrow — a pool
20
+ * with tall and short glyphs in it makes the line jump as it settles.
21
+ */
22
+ characters?: string;
23
+ /**
24
+ * Which language the text is in, for finding the character boundaries.
25
+ */
26
+ locale?: string;
27
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
28
+ render?: useRender.RenderProp;
29
+ /** The text to settle. Only text is settled. */
30
+ children?: React.ReactNode;
31
+ }
32
+ /**
33
+ * Text arriving through noise, one character at a time.
34
+ *
35
+ * `AnimateTyping`'s sibling: a typewriter reveals a string from an empty line,
36
+ * this one resolves it out of a line that was already the right length. That is
37
+ * the whole reason to choose it — the box never changes size, so nothing around
38
+ * it reflows and a heading does not push the page down as it lands.
39
+ *
40
+ * Whitespace is never scrambled. A space that flickers into a letter and back
41
+ * reads as the words having moved, which is the one thing this effect is for
42
+ * avoiding.
43
+ *
44
+ * The finished string is in the document from the first frame, in a clipped box
45
+ * for a screen reader; the noise is a visible copy that is `aria-hidden`. A
46
+ * reader who has asked for less motion is shown the text.
47
+ */
48
+ export declare const AnimateScramble: React.ForwardRefExoticComponent<AnimateScrambleProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import*as a from"react";import{useRender as s}from"@base-ui/react/use-render";import{isInfinite as n,useAnimationRun as i,usePrefersReducedMotion as o}from"../../internal/animate.js";import{graphemesOf as l,textOf as c}from"../../internal/text.js";import{srOnlyClasses as m}from"../../internal/styles.js";const d="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#%&$@*";export const AnimateScramble=/*@__PURE__*/a.forwardRef(function({text:u,speed:p=18,tick:h=45,characters:f=d,duration:g,delay:x=0,repeat:j=1,paused:M,trigger:y="mount",play:v,once:N=!0,threshold:b=.2,locale:I,render:T,className:w,style:R,children:S,...A},E){const F=i({trigger:y,play:v,once:N,threshold:b,paused:M,infinite:n(j)}),k=o(),B=u??c(S),C=a.useMemo(()=>l(B,I),[B,I]),D=C.length,[G,H]=a.useState(0),[,J]=a.useReducer(e=>e+1,0),K=a.useMemo(()=>void 0!==g&&D>0?Math.max(1,g/D):1e3/Math.max(1,p),[g,p,D]);a.useEffect(()=>{if(!F.started||M)return;if(k||0===D)return void H(D);let e,t=0;const r=()=>{t+=1,H(t),t<D?e=setTimeout(r,K):clearInterval(a)};H(0);const a=setInterval(J,h);return e=setTimeout(r,x+K),()=>{clearTimeout(e),clearInterval(a)}},[F.started,M,k,D,K,h,x]);const L=f.length>0?f:d,O=C.map((e,t)=>t<G||""===e.trim()?e:L[Math.floor(Math.random()*L.length)]).join("");return s({render:T,ref:[E,F.ref],props:{...A,className:w,style:R,"data-neba-animation":"scramble","data-state":F.state,...F.handlers,children:r(t,{children:[e("span",{className:m,children:B}),e("span",{"aria-hidden":"true",className:"whitespace-pre-wrap",children:O})]})}})});
@@ -0,0 +1 @@
1
+ export * from './AnimateScramble.js';
@@ -0,0 +1 @@
1
+ export*from"./AnimateScramble.js";
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import type { NebaAnimateProps, NebaStaggerProps, NebaTimelineProps } from '../../types.js';
4
+ export interface AnimateShakeProps extends NebaAnimateProps, NebaStaggerProps, NebaTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
+ /**
6
+ * How far it travels at the widest point — a CSS length, or a number in
7
+ * pixels. Short: this is a head shaken, not a thing thrown.
8
+ * @default 6
9
+ */
10
+ distance?: number | string;
11
+ /** Renders something other than a `<div>`. Base UI's own escape hatch. */
12
+ render?: useRender.RenderProp;
13
+ children?: React.ReactNode;
14
+ }
15
+ /**
16
+ * The one effect in the set that says *no*.
17
+ *
18
+ * A password that was wrong, a form that would not send, a row that could not
19
+ * be dropped where it was let go. Every other animation here is about content
20
+ * arriving; this one is an **answer**, and it is the only reason to reach for
21
+ * it — a shake that runs on mount is decoration, and decoration that moves is
22
+ * what a reader learns to ignore.
23
+ *
24
+ * It is therefore almost always `trigger="manual"` with `play` bound to the
25
+ * thing that failed, and it starts and ends exactly where the element sits, so
26
+ * a run that is interrupted leaves nothing off its mark.
27
+ *
28
+ * ## Why this one is allowed to move
29
+ *
30
+ * The house rule is that a control is never transformed: scaling resamples the
31
+ * label, and text that shifts under the cursor is what reads as cheap. That
32
+ * rule is about a control's **resting states** — hover, press, on, off — where
33
+ * the movement is a side effect of saying something colour could say better.
34
+ * A shake is not a state. It is a one-off reply to something the reader just
35
+ * did, it is over in four hundred milliseconds, and there is no colour that
36
+ * says "that did not work" as unmistakably. It is an exception, it is the only
37
+ * one, and it should never be given `repeat`.
38
+ */
39
+ export declare const AnimateShake: React.ForwardRefExoticComponent<AnimateShakeProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as a,lengthValue as t,useAnimateElement as n}from"../../internal/animate.js";import{cx as s}from"../../internal/styles.js";export const AnimateShake=/*@__PURE__*/e.forwardRef(function({duration:e=420,delay:i=0,easing:l="ease-in-out",repeat:o=1,alternate:d,paused:c,trigger:m="manual",play:p,once:f=!0,threshold:u=.2,stagger:g=0,durationStep:h=0,reverse:y=!1,timeline:k,range:N,distance:S=6,render:b,className:j,style:v,children:x,...w},A){const C=n({effect:null,effectClass:"neba-anim-shake",name:"shake",duration:e,delay:i,easing:l,repeat:o,alternate:d,x:t(S),trigger:m,play:p,once:f,threshold:u,paused:c,infinite:a(o),timeline:k,range:N,children:x,stagger:g,durationStep:h,reverse:y});return r({render:b,ref:[A,C.ref],props:{...w,className:s(C.className,j),style:{...C.style,...v},...C.props,children:C.children}})});
@@ -0,0 +1 @@
1
+ export * from './AnimateShake.js';
@@ -0,0 +1 @@
1
+ export*from"./AnimateShake.js";
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
- import type { NebaAnimateMode, NebaAnimateProps, NebaSide } from '../../types.js';
4
- export interface AnimateSlideProps extends NebaAnimateProps, React.ComponentPropsWithoutRef<'div'> {
3
+ import type { NebaAnimateMode, NebaAnimateProps, NebaSide, NebaStaggerProps, NebaTimelineProps } from '../../types.js';
4
+ export interface AnimateSlideProps extends NebaAnimateProps, NebaStaggerProps, NebaTimelineProps, React.ComponentPropsWithoutRef<'div'> {
5
5
  /**
6
6
  * Whether the content slides in or slides away. `out` leaves by the same edge
7
7
  * it would have come from.
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,slideOffsets as a,useAnimateElement as n}from"../../internal/animate.js";import{cx as s}from"../../internal/styles.js";export const AnimateSlide=/*@__PURE__*/e.forwardRef(function({duration:e=380,delay:o=0,easing:i,repeat:l=1,alternate:d,paused:m,trigger:c="mount",play:p,once:f=!0,threshold:y=.2,mode:u="in",from:g="bottom",distance:h="100%",fade:x=!0,render:N,className:b,style:j,children:w,...A},R){const{x:S,y:k}=a(g,h),q=n({effect:"slide",duration:e,delay:o,easing:i,repeat:l,alternate:d,mode:u,x:S,y:k,opacity:x?0:1,trigger:c,play:p,once:f,threshold:y,paused:m,infinite:t(l)});return r({render:N,ref:[R,q.ref],props:{...A,className:s(q.className,b),style:{...q.style,...j},...q.props,children:w}})});
1
+ "use client";import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as t,slideOffsets as a,useAnimateElement as n}from"../../internal/animate.js";import{cx as i}from"../../internal/styles.js";export const AnimateSlide=/*@__PURE__*/e.forwardRef(function({duration:e=380,delay:s=0,easing:o,repeat:l=1,alternate:d,paused:m,trigger:c="mount",play:p,once:f=!0,threshold:g=.2,stagger:u=0,durationStep:y=0,reverse:h=!1,timeline:x,range:N,mode:S="in",from:b="bottom",distance:j="100%",fade:v=!0,render:w,className:A,style:R,children:k,...q},z){const{x:B,y:C}=a(b,j),D=n({effect:"slide",duration:e,delay:s,easing:o,repeat:l,alternate:d,mode:S,x:B,y:C,opacity:v?0:1,trigger:c,play:p,once:f,threshold:g,paused:m,infinite:t(l),timeline:x,range:N,children:k,stagger:u,durationStep:y,reverse:h});return r({render:w,ref:[z,D.ref],props:{...q,className:i(D.className,A),style:{...D.style,...R},...D.props,children:D.children}})});