neba 1.8.0 → 1.9.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 (222) hide show
  1. package/README.md +13 -7
  2. package/dist/components/accordion/Accordion.js +1 -1
  3. package/dist/components/alert/Alert.js +1 -1
  4. package/dist/components/anchor/Anchor.d.ts +73 -0
  5. package/dist/components/anchor/Anchor.js +1 -0
  6. package/dist/components/anchor/index.d.ts +2 -0
  7. package/dist/components/anchor/index.js +1 -0
  8. package/dist/components/animate-appear/AnimateAppear.js +1 -1
  9. package/dist/components/animate-blink/AnimateBlink.js +1 -1
  10. package/dist/components/animate-fade/AnimateFade.js +1 -1
  11. package/dist/components/animate-grow/AnimateGrow.js +1 -1
  12. package/dist/components/animate-headline/AnimateHeadline.js +1 -1
  13. package/dist/components/animate-lighting/AnimateLighting.js +1 -1
  14. package/dist/components/animate-marquee/AnimateMarquee.js +1 -1
  15. package/dist/components/animate-rotate/AnimateRotate.js +1 -1
  16. package/dist/components/animate-slide/AnimateSlide.js +1 -1
  17. package/dist/components/animate-typing/AnimateTyping.js +1 -1
  18. package/dist/components/animate-zoom/AnimateZoom.js +1 -1
  19. package/dist/components/app-logo/AppLogo.js +1 -1
  20. package/dist/components/area-chart/AreaChart.js +1 -1
  21. package/dist/components/aspect-ratio/AspectRatio.js +1 -1
  22. package/dist/components/avatar/Avatar.js +1 -1
  23. package/dist/components/avatar-group/AvatarGroup.d.ts +47 -0
  24. package/dist/components/avatar-group/AvatarGroup.js +1 -0
  25. package/dist/components/avatar-group/index.d.ts +2 -0
  26. package/dist/components/avatar-group/index.js +1 -0
  27. package/dist/components/badge/Badge.js +1 -1
  28. package/dist/components/bar-chart/BarChart.js +1 -1
  29. package/dist/components/blockquote/Blockquote.js +1 -1
  30. package/dist/components/bottom-navigation/BottomNavigation.js +1 -1
  31. package/dist/components/box/Box.js +1 -1
  32. package/dist/components/breadcrumb/Breadcrumb.js +1 -1
  33. package/dist/components/button/Button.js +1 -1
  34. package/dist/components/button-group/ButtonGroup.js +1 -1
  35. package/dist/components/card/Card.js +1 -1
  36. package/dist/components/carousel/Carousel.js +1 -1
  37. package/dist/components/chat-bubble/ChatBubble.js +1 -1
  38. package/dist/components/checkbox/Checkbox.js +1 -1
  39. package/dist/components/chip/Chip.js +1 -1
  40. package/dist/components/code-block/CodeBlock.js +1 -1
  41. package/dist/components/collapsible/Collapsible.js +1 -1
  42. package/dist/components/color-picker/ColorPicker.js +1 -1
  43. package/dist/components/combobox/Combobox.js +1 -1
  44. package/dist/components/command-palette/CommandPalette.d.ts +88 -0
  45. package/dist/components/command-palette/CommandPalette.js +1 -0
  46. package/dist/components/command-palette/index.d.ts +2 -0
  47. package/dist/components/command-palette/index.js +1 -0
  48. package/dist/components/container/Container.js +1 -1
  49. package/dist/components/data-list/DataList.d.ts +55 -0
  50. package/dist/components/data-list/DataList.js +1 -0
  51. package/dist/components/data-list/index.d.ts +2 -0
  52. package/dist/components/data-list/index.js +1 -0
  53. package/dist/components/data-table/DataTable.js +1 -1
  54. package/dist/components/date-picker/DatePicker.js +1 -1
  55. package/dist/components/date-range-picker/DateRangePicker.js +1 -1
  56. package/dist/components/date-time-picker/DateTimePicker.js +1 -1
  57. package/dist/components/dialog/Dialog.js +1 -1
  58. package/dist/components/divider/Divider.js +1 -1
  59. package/dist/components/drawer/Drawer.js +1 -1
  60. package/dist/components/empty/Empty.js +1 -1
  61. package/dist/components/fieldset/Fieldset.d.ts +33 -0
  62. package/dist/components/fieldset/Fieldset.js +1 -0
  63. package/dist/components/fieldset/index.d.ts +2 -0
  64. package/dist/components/fieldset/index.js +1 -0
  65. package/dist/components/file-picker/FilePicker.js +1 -1
  66. package/dist/components/floating-action-button/FloatingActionButton.js +1 -1
  67. package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
  68. package/dist/components/footer/Footer.js +1 -1
  69. package/dist/components/form/Form.d.ts +58 -0
  70. package/dist/components/form/Form.js +1 -0
  71. package/dist/components/form/index.d.ts +2 -0
  72. package/dist/components/form/index.js +1 -0
  73. package/dist/components/gauge-chart/GaugeChart.d.ts +62 -0
  74. package/dist/components/gauge-chart/GaugeChart.js +1 -0
  75. package/dist/components/gauge-chart/index.d.ts +2 -0
  76. package/dist/components/gauge-chart/index.js +1 -0
  77. package/dist/components/grid/Grid.js +1 -1
  78. package/dist/components/grid-container/GridContainer.js +1 -1
  79. package/dist/components/header/Header.js +1 -1
  80. package/dist/components/heatmap-chart/HeatmapChart.js +1 -1
  81. package/dist/components/highlight/Highlight.js +1 -1
  82. package/dist/components/hover-card/HoverCard.d.ts +78 -0
  83. package/dist/components/hover-card/HoverCard.js +1 -0
  84. package/dist/components/hover-card/index.d.ts +2 -0
  85. package/dist/components/hover-card/index.js +1 -0
  86. package/dist/components/how-to-steps/HowToSteps.d.ts +11 -25
  87. package/dist/components/how-to-steps/HowToSteps.js +1 -1
  88. package/dist/components/icon/Icon.js +1 -1
  89. package/dist/components/icon-button/IconButton.js +1 -1
  90. package/dist/components/line-chart/LineChart.js +1 -1
  91. package/dist/components/list/List.js +1 -1
  92. package/dist/components/menu/Menu.d.ts +16 -4
  93. package/dist/components/menu/Menu.js +1 -1
  94. package/dist/components/menubar/Menubar.d.ts +56 -0
  95. package/dist/components/menubar/Menubar.js +1 -0
  96. package/dist/components/menubar/index.d.ts +2 -0
  97. package/dist/components/menubar/index.js +1 -0
  98. package/dist/components/meter/Meter.d.ts +52 -0
  99. package/dist/components/meter/Meter.js +1 -0
  100. package/dist/components/meter/index.d.ts +2 -0
  101. package/dist/components/meter/index.js +1 -0
  102. package/dist/components/mockup/Mockup.js +1 -1
  103. package/dist/components/navigation-menu/NavigationMenu.d.ts +100 -0
  104. package/dist/components/navigation-menu/NavigationMenu.js +1 -0
  105. package/dist/components/navigation-menu/index.d.ts +2 -0
  106. package/dist/components/navigation-menu/index.js +1 -0
  107. package/dist/components/number-field/NumberField.js +1 -1
  108. package/dist/components/otp-field/OtpField.js +1 -1
  109. package/dist/components/overlay/Overlay.js +1 -1
  110. package/dist/components/page-layout/PageLayout.js +1 -1
  111. package/dist/components/pagination/Pagination.js +1 -1
  112. package/dist/components/panes/Panes.js +1 -1
  113. package/dist/components/pie-chart/PieChart.js +1 -1
  114. package/dist/components/pill/Pill.js +1 -1
  115. package/dist/components/popover/Popover.js +1 -1
  116. package/dist/components/progress-box/ProgressBox.js +1 -1
  117. package/dist/components/progress-circular/ProgressCircular.js +1 -1
  118. package/dist/components/progress-linear/ProgressLinear.js +1 -1
  119. package/dist/components/radio-group/RadioGroup.js +1 -1
  120. package/dist/components/rating/Rating.js +1 -1
  121. package/dist/components/scatter-chart/ScatterChart.js +1 -1
  122. package/dist/components/scroll-area/ScrollArea.d.ts +50 -0
  123. package/dist/components/scroll-area/ScrollArea.js +1 -0
  124. package/dist/components/scroll-area/index.d.ts +2 -0
  125. package/dist/components/scroll-area/index.js +1 -0
  126. package/dist/components/scroll-zone/ScrollZone.d.ts +35 -17
  127. package/dist/components/scroll-zone/ScrollZone.js +1 -1
  128. package/dist/components/segmented-button/SegmentedButton.js +1 -1
  129. package/dist/components/select/Select.js +1 -1
  130. package/dist/components/shortcut/Shortcut.js +1 -1
  131. package/dist/components/sidebar/Sidebar.js +1 -1
  132. package/dist/components/sidebar/SidebarTrigger.js +1 -1
  133. package/dist/components/skeleton/Skeleton.js +1 -1
  134. package/dist/components/slider/Slider.js +1 -1
  135. package/dist/components/sparkline/Sparkline.js +1 -1
  136. package/dist/components/spoiler/Spoiler.js +1 -1
  137. package/dist/components/statistic/Statistic.js +1 -1
  138. package/dist/components/switch/Switch.js +1 -1
  139. package/dist/components/table/Table.js +1 -1
  140. package/dist/components/tabs/Tabs.js +1 -1
  141. package/dist/components/text-field/TextField.js +1 -1
  142. package/dist/components/text-link/TextLink.js +1 -1
  143. package/dist/components/time-picker/TimePicker.js +1 -1
  144. package/dist/components/timeline/Timeline.js +1 -1
  145. package/dist/components/timeline-chart/TimelineChart.js +1 -1
  146. package/dist/components/toast/Toast.js +1 -1
  147. package/dist/components/toggle/Toggle.d.ts +53 -0
  148. package/dist/components/toggle/Toggle.js +1 -0
  149. package/dist/components/toggle/index.d.ts +2 -0
  150. package/dist/components/toggle/index.js +1 -0
  151. package/dist/components/toggle-group/ToggleGroup.d.ts +51 -0
  152. package/dist/components/toggle-group/ToggleGroup.js +1 -0
  153. package/dist/components/toggle-group/index.d.ts +2 -0
  154. package/dist/components/toggle-group/index.js +1 -0
  155. package/dist/components/toolbar/Toolbar.js +1 -1
  156. package/dist/components/tooltip/Tooltip.js +1 -1
  157. package/dist/components/tour/Tour.d.ts +82 -0
  158. package/dist/components/tour/Tour.js +1 -0
  159. package/dist/components/tour/index.d.ts +2 -0
  160. package/dist/components/tour/index.js +1 -0
  161. package/dist/components/transfer/Transfer.d.ts +52 -0
  162. package/dist/components/transfer/Transfer.js +1 -0
  163. package/dist/components/transfer/index.d.ts +2 -0
  164. package/dist/components/transfer/index.js +1 -0
  165. package/dist/components/tree-view/TreeView.js +1 -1
  166. package/dist/components/typography/Typography.js +1 -1
  167. package/dist/components/window-pane/WindowPane.js +1 -1
  168. package/dist/index.d.ts +16 -0
  169. package/dist/index.js +1 -1
  170. package/dist/internal/animate.d.ts +7 -1
  171. package/dist/internal/animate.js +1 -1
  172. package/dist/internal/avatar-group.d.ts +22 -0
  173. package/dist/internal/avatar-group.js +1 -0
  174. package/dist/internal/bottom-navigation.js +1 -1
  175. package/dist/internal/button-group.d.ts +6 -2
  176. package/dist/internal/button-group.js +1 -1
  177. package/dist/internal/calendar.js +1 -1
  178. package/dist/internal/chart-frame.d.ts +18 -1
  179. package/dist/internal/chart-frame.js +1 -1
  180. package/dist/internal/data-table.d.ts +0 -14
  181. package/dist/internal/data-table.js +1 -1
  182. package/dist/internal/drag.d.ts +62 -0
  183. package/dist/internal/drag.js +1 -0
  184. package/dist/internal/highlight.js +1 -1
  185. package/dist/internal/i18n.d.ts +82 -0
  186. package/dist/internal/i18n.js +1 -1
  187. package/dist/internal/link.d.ts +19 -0
  188. package/dist/internal/link.js +1 -0
  189. package/dist/internal/media.d.ts +29 -0
  190. package/dist/internal/media.js +1 -0
  191. package/dist/internal/menu.js +1 -1
  192. package/dist/internal/observe.d.ts +42 -0
  193. package/dist/internal/observe.js +1 -0
  194. package/dist/internal/page-layout.js +1 -1
  195. package/dist/internal/picker.js +1 -1
  196. package/dist/internal/progress.d.ts +5 -0
  197. package/dist/internal/search.d.ts +33 -0
  198. package/dist/internal/search.js +1 -0
  199. package/dist/internal/styles.d.ts +39 -0
  200. package/dist/internal/styles.js +1 -1
  201. package/dist/locales/ar.js +1 -1
  202. package/dist/locales/de.js +1 -1
  203. package/dist/locales/es.js +1 -1
  204. package/dist/locales/fr.js +1 -1
  205. package/dist/locales/hi.js +1 -1
  206. package/dist/locales/id.js +1 -1
  207. package/dist/locales/it.js +1 -1
  208. package/dist/locales/ja.js +1 -1
  209. package/dist/locales/ko.js +1 -1
  210. package/dist/locales/nl.js +1 -1
  211. package/dist/locales/pl.js +1 -1
  212. package/dist/locales/pt.js +1 -1
  213. package/dist/locales/ru.js +1 -1
  214. package/dist/locales/th.js +1 -1
  215. package/dist/locales/tr.js +1 -1
  216. package/dist/locales/vi.js +1 -1
  217. package/dist/locales/zh-hans.js +1 -1
  218. package/dist/locales/zh-hant.js +1 -1
  219. package/dist/styles.css +1 -1
  220. package/dist/tailwind.css +104 -0
  221. package/dist/types.d.ts +16 -0
  222. package/package.json +2 -2
package/README.md CHANGED
@@ -86,6 +86,12 @@ export default function SignIn() {
86
86
  }
87
87
  ```
88
88
 
89
+ ### Next.js and React Server Components
90
+
91
+ Every component carries `'use client'`, so it can be imported straight into a Server Component — no wrapper, no `transpilePackages` entry. The directive marks a boundary, not a page: the page stays a Server Component and only the components it renders reach the browser. The ordinary rule about that boundary still applies — an event handler defined in a Server Component cannot be passed across it.
92
+
93
+ The `neba` barrel and `neba/locales` are deliberately left unmarked, so a Server Component importing the barrel reaches the components behind it rather than a boundary of its own, and `registerMessages` stays a plain function. Bundlers that do not implement Server Components ignore the directive entirely.
94
+
89
95
  A few components provide context and are mounted once, near the root, only if you use them — `ToastProvider` (paired with the `useToast()` hook) and `TooltipProvider`.
90
96
 
91
97
  Every component is also its own entry point, named after its folder:
@@ -140,21 +146,21 @@ Placement props are logical, not physical — `start`/`end` rather than `left`/`
140
146
 
141
147
  ### Components
142
148
 
143
- **Inputs** — Button, IconButton, ButtonGroup, SegmentedButton, FloatingActionButton (with FloatingAction), TextField, NumberField, OtpField, Select, Combobox, Checkbox, RadioGroup, Switch, Slider, Rating, Menu (with submenus, checkbox and radio items), ContextMenu, FilePicker, Pagination, BottomNavigation, FloatingBottomNavigation, ColorPicker, DatePicker, TimePicker, DateTimePicker, DateRangePicker
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
144
150
 
145
- **Surfaces** — Box, Card, Accordion, Collapsible, Tabs, Carousel, Toolbar, Pill, Spoiler, HowToSteps, ChatBubble, Drawer, Popover, Mockup, WindowPane
151
+ **Surfaces** — Box, Card, Accordion, Collapsible, Tabs, Carousel, Toolbar, Pill, Spoiler, HowToSteps, ChatBubble, Drawer, Popover, Mockup, WindowPane, HoverCard
146
152
 
147
- **Display** — Typography, TextLink, Blockquote, Highlight, Divider, Chip, Badge, Avatar, AppLogo, Icon, Shortcut, List, Table, DataTable, CodeBlock, Timeline, Breadcrumb, TreeView
153
+ **Display** — Typography, TextLink, Blockquote, Highlight, Divider, Chip, Badge, Avatar, AvatarGroup, AppLogo, Icon, Shortcut, List, DataList, Table, DataTable, CodeBlock, Timeline, Breadcrumb, Anchor, TreeView
148
154
 
149
- **Charts** — Statistic, Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart
155
+ **Charts** — Statistic, Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart, GaugeChart
150
156
 
151
- **Feedback** — Alert, Dialog, Toast, Tooltip, Overlay, Skeleton, Empty, ProgressLinear, ProgressCircular, ProgressBox
157
+ **Feedback** — Alert, Dialog, Toast, Tooltip, Overlay, Skeleton, Empty, ProgressLinear, ProgressCircular, ProgressBox, Meter, Tour
152
158
 
153
- **Layout** — PageLayout (with Header, Footer and Sidebar), Container, Grid (with GridContainer), Panes, AspectRatio, ScrollZone
159
+ **Layout** — PageLayout (with Header, Footer and Sidebar), Container, Grid (with GridContainer), Panes, AspectRatio, ScrollZone, ScrollArea
154
160
 
155
161
  **Transitions** — AnimateFade, AnimateGrow, AnimateZoom, AnimateSlide, AnimateRotate, AnimateBlink, AnimateAppear, AnimateTyping, AnimateLighting, AnimateMarquee, AnimateHeadline
156
162
 
157
- **Recently added** — 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
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
158
164
 
159
165
  Each one has its own page — live previews, every prop, and the variations worth seeing — under [**All components**](https://neba.cdget.com/components/).
160
166
 
@@ -1 +1 @@
1
- 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{focusRingClasses as s,gapClasses as o,hasContent as d,iconClasses as c,metaTextClasses as m,radiusClasses as f,sheetBodyClasses as u,sheetHeaderGapClasses as h,sheetTitleClasses as b,surfaceClasses as x,surfaceSlots as p,transitionClasses as v}from"../../internal/styles.js";const g=/*@__PURE__*/a.createContext({size:"md",density:"default",dividers:!0}),j={solid:[x,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[x,"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"},N={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:i="default",elevation:s=0,multiple:o=!1,value:d,defaultValue:c,onValueChange:m,dividers:u=!0,disabled:h=!1,hiddenUntilFound:b=!1,keepMounted:x=!1,className:N,style:w,children:y,...k},z){const B=a.useMemo(()=>({size:l,density:i,dividers:u}),[l,i,u]),C=["flex flex-col",f[l],j[n],v,u?"overflow-hidden [&>div+div]:border-t [&>div+div]:[border-color:var(--n-line)]":"p-1",N??""].filter(Boolean).join(" ");return e(g.Provider,{value:B,children:e(t.Root,{ref:z,multiple:o,value:d,defaultValue:c,onValueChange:e=>m?.(e),disabled:h,hiddenUntilFound:b,keepMounted:x,className:C,style:{...p(r,s),...w},...k,children:y})})});export const AccordionItem=/*@__PURE__*/a.forwardRef(function({value:f,title:x,subtitle:p,startIcon:j,action:w,disabled:y=!1,className:k,children:z,...B},C){const{size:V,density:$,dividers:_}=a.useContext(g),A=l[$][V],I=r[$][V];return n(t.Item,{ref:C,value:f,disabled:y,className:["flex flex-col",k??""].filter(Boolean).join(" "),...B,children:[n(t.Header,{className:"m-0 flex w-full items-center [font:inherit]",children:[n(t.Trigger,{className:["flex min-w-0 flex-1 cursor-pointer items-center text-start",A,I,o[V],v,c,s,_?"":N[V],"hover:bg-(--n-soft)","data-[panel-open]:text-(--n-accent)","disabled:cursor-not-allowed disabled:bg-transparent disabled:text-(--neba-disabled-fg)"].filter(Boolean).join(" "),children:[d(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 ${h[V]}`,children:[d(x)?e("span",{className:`truncate font-semibold ${b[V]}`,children:x}):null,d(p)?e("span",{className:`truncate text-(--neba-muted-fg) ${m[V]}`,children:p}):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,{})})]}),d(w)?e("span",{className:`flex shrink-0 items-center ${A}`,children:w}):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)",u[V],A,"compact"===$?"pb-2":"pb-4"].join(" "),children:z})})]})});
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 +1 @@
1
- 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,hasContent as d,iconClasses as m,radiusClasses as f,sheetBodyClasses as u,sheetHeaderGapClasses as x,sheetSectionGapClasses as b,sheetTitleClasses as v,surfaceClasses as h,transitionClasses as p}from"../../internal/styles.js";const j={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)"},y={solid:"",outline:"text-(--n-accent)",text:"text-(--n-accent)"},g={solid:"",outline:"text-(--neba-muted-fg)",text:"text-(--neba-muted-fg)"},N={primary:"status",secondary:"status",info:"status",success:"status",warning:"alert",danger:"alert"};export const Alert=/*@__PURE__*/n.forwardRef(function({variant:n="outline",size:h="md",color:w="info",density:k="default",elevation:$=0,title:_,icon:z,action:B,onClose:C,locale:A,closeLabel:L,transition:R,className:q,style:D,children:E,...F},G){const H=s(i,A),I=void 0===z?o(w):z,J=y[n],K=d(_),M=r(R);return t("div",{ref:G,role:N[w],className:["flex w-full items-start",l[k][h],f[h],b[h],u[h],p,j[n],m,M.className,q??""].filter(Boolean).join(" "),style:{...c(w,$,n),...M.style,...D},...F,children:[d(I)?e("span",{className:`flex h-[1lh] shrink-0 items-center ${J}`,children:I}):null,t("div",{className:`flex min-w-0 flex-1 flex-col ${x[h]}`,children:[K?e("div",{className:`neba-title font-semibold ${v[h]} ${J}`,children:_}):null,d(E)?e("div",{className:K?g[n]:void 0,children:E}):null]}),d(B)?e("div",{className:"flex h-[1lh] shrink-0 items-center",children:B}):null,C?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e("button",{type:"button","aria-label":L??H.dismiss,onClick:C,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 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]})});
@@ -0,0 +1,73 @@
1
+ import * as React from 'react';
2
+ import type { NebaColor, NebaDensity, NebaSize } from '../../types.js';
3
+ /** One heading in the list. */
4
+ export interface AnchorItem {
5
+ /**
6
+ * The fragment it points at — `#getting-started`. The `id` it names is what
7
+ * the list watches, so a heading with no `id` cannot be tracked.
8
+ */
9
+ href: string;
10
+ /** What the row says. */
11
+ label: React.ReactNode;
12
+ /**
13
+ * How deep the heading sits, from `0`. Only the indent depends on it; the
14
+ * list is flat, because a nested `<ul>` inside a table of contents is read as
15
+ * a list inside a list and says nothing a reader needed.
16
+ * @default 0
17
+ */
18
+ depth?: number;
19
+ }
20
+ export interface AnchorProps extends Omit<React.ComponentPropsWithoutRef<'nav'>, 'color' | 'children' | 'onChange'> {
21
+ /** The headings, in the order they appear on the page. */
22
+ items: readonly AnchorItem[];
23
+ /**
24
+ * Which row is marked, by its `href`. Given, the list stops tracking the
25
+ * scroll and says what it is told.
26
+ */
27
+ activeHref?: string | null;
28
+ /** Called whenever the row the reader is in changes. */
29
+ onActiveChange?: (href: string | null) => void;
30
+ /**
31
+ * How far below the top of the scrollport a heading counts as reached, in
32
+ * pixels. Set it to the height of a sticky header, or the heading under the
33
+ * bar is never the one marked.
34
+ * @default 0
35
+ */
36
+ offset?: number;
37
+ /**
38
+ * What scrolls, when it is not the document — the element a
39
+ * [PageLayout](../layout/page-layout) with `scroll="content"` puts the page
40
+ * inside, for instance.
41
+ */
42
+ container?: React.RefObject<HTMLElement | null>;
43
+ /** Draws the rail down the leading edge, with the active row lit. @default true */
44
+ rail?: boolean;
45
+ /** @default 'md' */
46
+ size?: NebaSize;
47
+ /** @default 'primary' */
48
+ color?: NebaColor;
49
+ /** Tightens the rows and nothing else. @default 'default' */
50
+ density?: NebaDensity;
51
+ /**
52
+ * Which language the `<nav>` is named in — a BCP 47 tag such as `ko`, `pt-BR`
53
+ * or `zh-Hant`. Unsupported tags fall back to English.
54
+ */
55
+ locale?: string;
56
+ /** The accessible name of the `<nav>`. Defaults to the `locale`'s word for it. */
57
+ label?: string;
58
+ }
59
+ /**
60
+ * The list of headings on the page being read, with the one the reader is in
61
+ * marked.
62
+ *
63
+ * It is a real `<nav>` of real `<a href="#…">`s, which is what makes it work
64
+ * before any of this runs: the links jump to their headings with JavaScript
65
+ * turned off, and they are in the link list a screen reader can pull up. The
66
+ * tracking is the part that is added on top, not the part that is load-bearing.
67
+ *
68
+ * The headings are given as `items` rather than scraped out of the document.
69
+ * Anything that produces this list — an MDX pipeline, a CMS, a route's own
70
+ * frontmatter — already knows the ids, and a component that went looking for
71
+ * them would be guessing at which `<h2>`s were content and which were chrome.
72
+ */
73
+ export declare const Anchor: React.ForwardRefExoticComponent<AnchorProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +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))})})});
@@ -0,0 +1,2 @@
1
+ export { Anchor } from './Anchor.js';
2
+ export type { AnchorItem, AnchorProps } from './Anchor.js';
@@ -0,0 +1 @@
1
+ export{Anchor}from"./Anchor.js";
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import*as a from"react";import{useRender as t}from"@base-ui/react/use-render";import{animBaseClass as r,animationClasses as s,animationSlots as n,isInfinite as i,slideOffsets as o,useAnimationRun as l}from"../../internal/animate.js";import{cx as m}from"../../internal/styles.js";export const AnimateAppear=/*@__PURE__*/a.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=l({trigger:h,play:g,once:x,threshold:N,paused:u,infinite:i(f)}),{x:z,y:B}=o(b,A),D=a.Children.toArray(R),F=`${r} ${s.slide}`,G=D.map((t,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(!a.isValidElement(t))return e("span",{className:F,style:i,children:t},r);const o=t.props;return a.cloneElement(t,{className:m(F,o.className),style:{...i,...o.style}})});return t({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{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 +1 @@
1
- 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:m="mount",play:c,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:m,play:c,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 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 +1 @@
1
- import*as e from"react";import{useRender as r}from"@base-ui/react/use-render";import{isInfinite as a,useAnimateElement as t}from"../../internal/animate.js";import{cx as n}from"../../internal/styles.js";export const AnimateFade=/*@__PURE__*/e.forwardRef(function({duration:e=320,delay:o=0,easing:s,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=t({effect:"fade",duration:e,delay:o,easing:s,repeat:i,alternate:l,mode:u,opacity:y,trigger:m,play:p,once:c,threshold:f,paused:d,infinite:a(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: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 +1 @@
1
- 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:d="mount",play:c,once:p=!0,threshold:f=.2,mode:g="in",from:u=.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:g,scale:u,opacity:h?0:1,trigger:d,play:c,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: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 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{isInfinite as n,lengthValue as a,useAnimationRun as r,usePrefersReducedMotion as i}from"../../internal/animate.js";import{cx as s}from"../../internal/styles.js";export const AnimateHeadline=/*@__PURE__*/t.forwardRef(function({duration:l=480,delay:o=0,easing:u,repeat:c="infinite",paused:m,trigger:d="mount",play:f,once:h=!0,threshold:p=.2,interval:g=2600,index:v,defaultIndex:y=0,onIndexChange:x,loop:b=!0,rise:E="100%",className:N,style:j,children:T,...C},R){const k=r({trigger:d,play:f,once:h,threshold:p,paused:m,infinite:n(c)}),A=i(),I=t.Children.toArray(T),M=I.length,[S,w]=t.useState(y),H=Math.min(v??S,Math.max(M-1,0)),[V,$]=t.useState(null),q=t.useRef(H);t.useEffect(()=>{q.current!==H&&($(q.current),q.current=H)},[H]),t.useEffect(()=>{if(null===V)return;const e=setTimeout(()=>$(null),l);return()=>clearTimeout(e)},[V,l]);const z=t.useCallback(()=>{const e=H+1;if(e>=M){if(!b)return;return void 0===v&&w(0),void x?.(0)}void 0===v&&w(e),x?.(e)},[H,M,b,v,x]),B=t.useRef(!1);return t.useEffect(()=>{if(void 0!==v||M<2||"running"!==k.state)return;if(!b&&H===M-1)return;const e=setTimeout(()=>{B.current=!0,z()},g+(B.current?0:o));return()=>clearTimeout(e)},[v,M,k.state,g,o,z,b,H]),e("div",{ref:e=>{k.ref(e),"function"==typeof R?R(e):R&&(R.current=e)},className:s("neba-headline",N),style:{"--n-anim-duration":`${l}ms`,"--n-anim-rise":a(E),...u?{"--n-anim-ease":u}:{},"--n-anim-state":k.state,...j},"data-neba-animation":"headline","data-state":k.state,...k.handlers,...C,children:I.map((n,a)=>{const r=a===H?"active":a!==V||A?void 0:"leaving";if(!t.isValidElement(n))return e("span",{className:"neba-headline-item","data-state":r,children:n},a);const i=n.props;return t.cloneElement(n,{key:a,className:s("neba-headline-item",i.className),"data-state":r})})})});
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{isInfinite as n,lengthValue as a,useAnimationRun as r,usePrefersReducedMotion as i}from"../../internal/animate.js";import{cx as s}from"../../internal/styles.js";export const AnimateHeadline=/*@__PURE__*/t.forwardRef(function({duration:l=480,delay:o=0,easing:u,repeat:c="infinite",paused:m,trigger:d="mount",play:f,once:h=!0,threshold:p=.2,interval:g=2600,index:v,defaultIndex:y=0,onIndexChange:x,loop:b=!0,rise:E="100%",className:N,style:j,children:T,...C},R){const k=r({trigger:d,play:f,once:h,threshold:p,paused:m,infinite:n(c)}),A=i(),I=t.Children.toArray(T),M=I.length,[S,w]=t.useState(y),H=Math.min(v??S,Math.max(M-1,0)),[V,$]=t.useState(null),q=t.useRef(H);t.useEffect(()=>{q.current!==H&&($(q.current),q.current=H)},[H]),t.useEffect(()=>{if(null===V)return;const e=setTimeout(()=>$(null),l);return()=>clearTimeout(e)},[V,l]);const z=t.useCallback(()=>{const e=H+1;if(e>=M){if(!b)return;return void 0===v&&w(0),void x?.(0)}void 0===v&&w(e),x?.(e)},[H,M,b,v,x]),B=t.useRef(!1);return t.useEffect(()=>{if(void 0!==v||M<2||"running"!==k.state)return;if(!b&&H===M-1)return;const e=setTimeout(()=>{B.current=!0,z()},g+(B.current?0:o));return()=>clearTimeout(e)},[v,M,k.state,g,o,z,b,H]),e("div",{ref:e=>{k.ref(e),"function"==typeof R?R(e):R&&(R.current=e)},className:s("neba-headline",N),style:{"--n-anim-duration":`${l}ms`,"--n-anim-rise":a(E),...u?{"--n-anim-ease":u}:{},"--n-anim-state":k.state,...j},"data-neba-animation":"headline","data-state":k.state,...k.handlers,...C,children:I.map((n,a)=>{const r=a===H?"active":a!==V||A?void 0:"leaving";if(!t.isValidElement(n))return e("span",{className:"neba-headline-item","data-state":r,children:n},a);const i=n.props;return t.cloneElement(n,{key:a,className:s("neba-headline-item",i.className),"data-state":r})})})});
@@ -1 +1 @@
1
- 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:g,once:c=!0,threshold:f=.2,color:u="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:g,once:c,threshold:f,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-${u}-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";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 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{isInfinite as r,lengthValue as n,useAnimationRun as a}from"../../internal/animate.js";import{cx as i}from"../../internal/styles.js";export const AnimateMarquee=/*@__PURE__*/t.forwardRef(function({duration:s,delay:o=0,repeat:m="infinite",alternate:u,paused:l,trigger:c="mount",play:d,once:f=!0,threshold:p=.2,easing:h,orientation:v="horizontal",reverse:g=!1,speed:y=60,gap:b="2rem",copies:q=2,pauseOnHover:R=!0,className:j,style:x,children:w,...z},M){const N=a({trigger:c,play:d,once:f,threshold:p,paused:l,infinite:r(m)}),O=t.useRef(null),S=t.useRef(null),[A,G]=t.useState(0),H="vertical"===v;t.useEffect(()=>{const e=O.current,t=S.current;if(!e||!t)return;const r=()=>{const r=getComputedStyle(e),n=parseFloat(H?r.rowGap:r.columnGap)||0,a=H?t.offsetHeight:t.offsetWidth;G(a+n)};if(r(),"undefined"==typeof ResizeObserver)return;const n=new ResizeObserver(r);return n.observe(t),n.observe(e),()=>n.disconnect()},[H,w]);const $=s??(A>0?A/y*1e3:12e3);return e("div",{ref:e=>{O.current=e,N.ref(e),"function"==typeof M?M(e):M&&(M.current=e)},className:i("neba-marquee",H&&"neba-marquee-vertical",j),style:{"--n-anim-gap":n(b),...h?{"--n-anim-ease":h}:{},"--n-anim-duration":`${Math.round($)}ms`,"--n-anim-delay":`${o}ms`,"--n-anim-repeat":"infinite"===m?"infinite":String(m),"--n-anim-direction":g?u?"alternate-reverse":"reverse":u?"alternate":"normal","--n-anim-state":N.state,...x},"data-neba-animation":"marquee","data-state":N.state,"data-pause-on-hover":R?"":void 0,...N.handlers,...z,children:Array.from({length:Math.max(1,q)},(t,r)=>(t=>e("div",{ref:0===t?S:void 0,className:"neba-marquee-track","aria-hidden":0===t?void 0:"true",children:w},t))(r))})});
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{isInfinite as a,lengthValue as r,useAnimationRun as n}from"../../internal/animate.js";import{observeResize as i}from"../../internal/observe.js";import{cx as s}from"../../internal/styles.js";export const AnimateMarquee=/*@__PURE__*/t.forwardRef(function({duration:o,delay:m=0,repeat:l="infinite",alternate:u,paused:c,trigger:d="mount",play:f,once:p=!0,threshold:h=.2,easing:v,orientation:g="horizontal",reverse:y=!1,speed:b=60,gap:j="2rem",copies:q=2,pauseOnHover:x=!0,className:M,style:N,children:R,...S},w){const A=n({trigger:d,play:f,once:p,threshold:h,paused:c,infinite:a(l)}),G=t.useRef(null),H=t.useRef(null),[$,k]=t.useState(0),z="vertical"===g;t.useEffect(()=>{const e=G.current,t=H.current;if(!e||!t)return;const a=()=>{const a=getComputedStyle(e),r=parseFloat(z?a.rowGap:a.columnGap)||0,n=z?t.offsetHeight:t.offsetWidth;k(n+r)};a();const r=i(t,a),n=i(e,a);return()=>{r(),n()}},[z,R]);const C=o??($>0?$/b*1e3:12e3);return e("div",{ref:e=>{G.current=e,A.ref(e),"function"==typeof w?w(e):w&&(w.current=e)},className:s("neba-marquee",z&&"neba-marquee-vertical",M),style:{"--n-anim-gap":r(j),...v?{"--n-anim-ease":v}:{},"--n-anim-duration":`${Math.round(C)}ms`,"--n-anim-delay":`${m}ms`,"--n-anim-repeat":"infinite"===l?"infinite":String(l),"--n-anim-direction":y?u?"alternate-reverse":"reverse":u?"alternate":"normal","--n-anim-state":A.state,...N},"data-neba-animation":"marquee","data-state":A.state,"data-pause-on-hover":x?"":void 0,...A.handlers,...S,children:Array.from({length:Math.max(1,q)},(t,a)=>(t=>e("div",{ref:0===t?H:void 0,className:"neba-marquee-track","aria-hidden":0===t?void 0:"true",children:R},t))(a))})});
@@ -1 +1 @@
1
- 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:p,once:c=!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:p,once:c,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: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 +1 @@
1
- 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 o}from"../../internal/styles.js";export const AnimateSlide=/*@__PURE__*/e.forwardRef(function({duration:e=380,delay:s=0,easing:i,repeat:l=1,alternate:d,paused:m,trigger:p="mount",play:c,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:s,easing:i,repeat:l,alternate:d,mode:u,x:S,y:k,opacity:x?0:1,trigger:p,play:c,once:f,threshold:y,paused:m,infinite:t(l)});return r({render:N,ref:[R,q.ref],props:{...A,className:o(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 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 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{isInfinite as n,useAnimationRun as a,usePrefersReducedMotion as i}from"../../internal/animate.js";import{cx as s,srOnlyClasses as o}from"../../internal/styles.js";function u(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(u).join(""):""}export const AnimateTyping=/*@__PURE__*/r.forwardRef(function({text:c,speed:m=24,hold:f=1400,erase:l=!1,eraseSpeed:d,caret:p=!0,caretChar:h="|",duration:g,delay:y=0,repeat:x=1,paused:T,trigger:j="mount",play:v,once:N=!0,threshold:S=.2,className:w,style:M,children:b,...A},I){const E=a({trigger:j,play:v,once:N,threshold:S,paused:T,infinite:n(x)}),R=i(),C=c??u(b),k=r.useMemo(()=>function(e,t){if("undefined"!=typeof Intl&&"Segmenter"in Intl)return[...new Intl.Segmenter(t,{granularity:"grapheme"}).segment(e)].map(e=>e.segment);return[...e]}(C),[C]),q=k.length,[z,B]=r.useState(0),D=r.useRef(0),F=g&&q>0?g/q:1e3/Math.max(m,1),G=1e3/Math.max(d??2*m,1);return r.useEffect(()=>{D.current=0},[q]),r.useEffect(()=>{if(R||0===q)return void B(q);if(!E.started)return D.current=0,void B(0);if(T)return;let e,t=!1,r=D.current,n=1,a=!1;const i="infinite"===x?1/0:Math.max(1,x);if(r>=q&&1===i)return;const s=()=>{if(!t){if(a)return r-=1,D.current=r,B(r),r<=0&&(a=!1,n+=1),void(e=setTimeout(s,a?G:F));if(r+=1,D.current=r,B(r),r<q)e=setTimeout(s,F);else if(!(n>=i)){if(l)return a=!0,void(e=setTimeout(s,f));n+=1,e=setTimeout(()=>{t||(r=0,D.current=0,B(0),e=setTimeout(s,F))},f)}}};return B(r),e=setTimeout(s,0===r?y:F),()=>{t=!0,clearTimeout(e)}},[E.started,T,R,q,F,G,y,f,l,x]),t("div",{ref:e=>{E.ref(e),"function"==typeof I?I(e):I&&(I.current=e)},className:w,style:M,"data-neba-animation":"typing","data-state":E.state,...E.handlers,...A,children:[e("span",{className:o,children:C}),t("span",{"aria-hidden":"true",className:"whitespace-pre-wrap",children:[k.slice(0,z).join(""),p?e("span",{className:s("neba-typing-caret"),children:h}):null]})]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{isInfinite as n,useAnimationRun as a,usePrefersReducedMotion as i}from"../../internal/animate.js";import{cx as s,srOnlyClasses as u}from"../../internal/styles.js";function o(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(o).join(""):""}export const AnimateTyping=/*@__PURE__*/r.forwardRef(function({text:c,speed:m=24,hold:f=1400,erase:l=!1,eraseSpeed:d,caret:p=!0,caretChar:h="|",duration:g,delay:y=0,repeat:x=1,paused:T,trigger:j="mount",play:v,once:N=!0,threshold:S=.2,className:w,style:M,children:b,...A},I){const E=a({trigger:j,play:v,once:N,threshold:S,paused:T,infinite:n(x)}),R=i(),C=c??o(b),k=r.useMemo(()=>function(e,t){if("undefined"!=typeof Intl&&"Segmenter"in Intl)return[...new Intl.Segmenter(t,{granularity:"grapheme"}).segment(e)].map(e=>e.segment);return[...e]}(C),[C]),q=k.length,[z,B]=r.useState(0),D=r.useRef(0),F=g&&q>0?g/q:1e3/Math.max(m,1),G=1e3/Math.max(d??2*m,1);return r.useEffect(()=>{D.current=0},[q]),r.useEffect(()=>{if(R||0===q)return void B(q);if(!E.started)return D.current=0,void B(0);if(T)return;let e,t=!1,r=D.current,n=1,a=!1;const i="infinite"===x?1/0:Math.max(1,x);if(r>=q&&1===i)return;const s=()=>{if(!t){if(a)return r-=1,D.current=r,B(r),r<=0&&(a=!1,n+=1),void(e=setTimeout(s,a?G:F));if(r+=1,D.current=r,B(r),r<q)e=setTimeout(s,F);else if(!(n>=i)){if(l)return a=!0,void(e=setTimeout(s,f));n+=1,e=setTimeout(()=>{t||(r=0,D.current=0,B(0),e=setTimeout(s,F))},f)}}};return B(r),e=setTimeout(s,0===r?y:F),()=>{t=!0,clearTimeout(e)}},[E.started,T,R,q,F,G,y,f,l,x]),t("div",{ref:e=>{E.ref(e),"function"==typeof I?I(e):I&&(I.current=e)},className:w,style:M,"data-neba-animation":"typing","data-state":E.state,...E.handlers,...A,children:[e("span",{className:u,children:C}),t("span",{"aria-hidden":"true",className:"whitespace-pre-wrap",children:[k.slice(0,z).join(""),p?e("span",{className:s("neba-typing-caret"),children:h}):null]})]})});
@@ -1 +1 @@
1
- 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 AnimateZoom=/*@__PURE__*/e.forwardRef(function({duration:e=340,delay:o=0,easing:s,repeat:i=1,alternate:l,paused:m,trigger:d="mount",play:c,once:p=!0,threshold:f=.2,mode:u="in",from:y=.4,fade:g=!0,render:h,className:N,style:j,children:b,...w},x){const z=a({effect:"zoom",duration:e,delay:o,easing:s,repeat:i,alternate:l,mode:u,scale:y,opacity:g?0:1,trigger:d,play:c,once:p,threshold:f,paused:m,infinite:t(i)});return r({render:h,ref:[x,z.ref],props:{...w,className:n(z.className,N),style:{transformOrigin:"center",...z.style,...j},...z.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 AnimateZoom=/*@__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:y=.4,fade:g=!0,render:h,className:N,style:j,children:b,...w},x){const z=a({effect:"zoom",duration:e,delay:o,easing:s,repeat:i,alternate:l,mode:u,scale:y,opacity:g?0:1,trigger:c,play:d,once:p,threshold:f,paused:m,infinite:t(i)});return r({render:h,ref:[x,z.ref],props:{...w,className:n(z.className,N),style:{transformOrigin:"center",...z.style,...j},...z.props,children:b}})});
@@ -1 +1 @@
1
- import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import*as t from"react";import{useRender as s}from"@base-ui/react/use-render";import{initialsOf as a}from"../../internal/initials.js";import{controlHeightClasses as l,controlSlots as i,controlSquareClasses as o,cx as m,gapClasses as d,hasContent as c,srOnlyClasses as u,surfaceClasses as x,toLength as f,transitionClasses as g}from"../../internal/styles.js";const h={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.375rem]",xl:"text-[1.625rem]"},p={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.3125rem]",xl:"text-[1.5625rem]"},v={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},b={solid:[x,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[x,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft-press) [box-shadow:var(--n-elev)]"};export const AppLogo=/*@__PURE__*/t.forwardRef(function({src:t,srcSet:x,alt:w,name:j,initials:_,showName:N=!1,shape:y="bare",variant:k="solid",size:S="md",color:z="primary",elevation:A=0,padded:F=!0,height:L,href:P,imageProps:R,render:$,className:q,style:B,children:C,...D},E){const G="bare"!==y,H=c(C)?C:t?"image":null,I=G&&F,J=null===H&&!G,K=N&&!J&&c(j),M=w??j,O=_??(j?a(j):""),Q="image"===H&&!K&&c(M),T=J||Q,U=!T&&!K&&c(M),V=f(L),W=V?{height:V,width:G?V:void 0}:null,X=e("span",{"aria-hidden":!T||void 0,className:m("flex shrink-0 items-center justify-center overflow-hidden","font-semibold tracking-tight whitespace-nowrap",V?"":l[S],G?m(V?"":o[S],"circle"===y?"rounded-full":v[S],p[S],b[k]):m("w-auto text-(--neba-fg)",h[S]),"[&_svg]:w-auto [&_svg]:shrink-0",I?"[&_svg]:h-[72%] [&_svg]:max-w-[72%]":"[&_svg]:h-full [&_svg]:max-w-full",g),style:{...G?i(z,A,k):null,...W},children:"image"===H?e("img",{src:t,srcSet:x,alt:Q?M??"":"",className:m("w-auto object-contain",I?"h-[72%] max-w-[72%]":"h-full max-w-full"),...R}):H??(J?j:O)});return s({render:$??e(P?"a":"span",{}),ref:E,props:{href:P,className:m("inline-flex max-w-full min-w-0 items-center align-middle","text-(--neba-fg) no-underline select-none",d[S],P?"cursor-pointer rounded-(--neba-radius-sm)":"",P?"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2":"",q),style:{"--n-ring":`var(--neba-${z}-ring)`,...B},children:n(r,{children:[X,K?e("span",{className:m("min-w-0 truncate font-semibold",h[S]),children:j}):null,U?e("span",{className:u,children:M}):null]}),...D}})});
1
+ "use client";import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import*as t from"react";import{useRender as s}from"@base-ui/react/use-render";import{initialsOf as a}from"../../internal/initials.js";import{controlHeightClasses as l,controlSlots as i,controlSquareClasses as o,cx as m,gapClasses as d,hasContent as c,srOnlyClasses as u,surfaceClasses as x,toLength as f,transitionClasses as g}from"../../internal/styles.js";const h={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.375rem]",xl:"text-[1.625rem]"},p={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.3125rem]",xl:"text-[1.5625rem]"},v={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},b={solid:[x,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[x,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft-press) [box-shadow:var(--n-elev)]"};export const AppLogo=/*@__PURE__*/t.forwardRef(function({src:t,srcSet:x,alt:w,name:j,initials:_,showName:y=!1,shape:N="bare",variant:k="solid",size:S="md",color:z="primary",elevation:A=0,padded:F=!0,height:L,href:P,imageProps:R,render:$,className:q,style:B,children:C,...D},E){const G="bare"!==N,H=c(C)?C:t?"image":null,I=G&&F,J=null===H&&!G,K=y&&!J&&c(j),M=w??j,O=_??(j?a(j):""),Q="image"===H&&!K&&c(M),T=J||Q,U=!T&&!K&&c(M),V=f(L),W=V?{height:V,width:G?V:void 0}:null,X=e("span",{"aria-hidden":!T||void 0,className:m("flex shrink-0 items-center justify-center overflow-hidden","font-semibold tracking-tight whitespace-nowrap",V?"":l[S],G?m(V?"":o[S],"circle"===N?"rounded-full":v[S],p[S],b[k]):m("w-auto text-(--neba-fg)",h[S]),"[&_svg]:w-auto [&_svg]:shrink-0",I?"[&_svg]:h-[72%] [&_svg]:max-w-[72%]":"[&_svg]:h-full [&_svg]:max-w-full",g),style:{...G?i(z,A,k):null,...W},children:"image"===H?e("img",{src:t,srcSet:x,alt:Q?M??"":"",className:m("w-auto object-contain",I?"h-[72%] max-w-[72%]":"h-full max-w-full"),decoding:"async",...R}):H??(J?j:O)});return s({render:$??e(P?"a":"span",{}),ref:E,props:{href:P,className:m("inline-flex max-w-full min-w-0 items-center align-middle","text-(--neba-fg) no-underline select-none",d[S],P?"cursor-pointer rounded-(--neba-radius-sm)":"",P?"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2":"",q),style:{"--n-ring":`var(--neba-${z}-ring)`,...B},children:n(r,{children:[X,K?e("span",{className:m("min-w-0 truncate font-semibold",h[S]),children:j}):null,U?e("span",{className:u,children:M}):null]}),...D}})});
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import*as r from"react";import{CartesianChart as a}from"../../internal/chart-frame.js";import{LineSeries as t}from"../../internal/chart-line.js";import{toValues as n}from"../../internal/chart.js";export function AreaChart({curve:o="linear",stacked:l=!1,markers:s="none",valueLabels:i="none",connectNulls:c=!1,series:m,yAxis:u,format:f,...d}){const x=r.useId().replace(/:/g,""),p="full"===l,h=r.useMemo(()=>{if(!p)return m;const e=n(m),r=[];for(const a of e)a.forEach((e,a)=>{r[a]=(r[a]??0)+Math.abs(e.value??0)});return m.map((a,t)=>({...a,data:e[t].map((e,a)=>{if(null===e.value)return null;const t=r[a];return{x:e.x,y:0===t?0:e.value/t*100,color:e.color,label:e.label??String(e.value)}})}))},[m,p]);return e(a,{...d,series:h,format:f,yAxis:p?{min:0,max:100,tickFormat:e=>`${e}%`,...u}:u,stacked:!1!==l,inset:!0,includeZero:!0,headroom:"none"===i?0:10,children:r=>e(t,{context:r,curve:o,filled:!0,stacked:!1!==l,markers:s,valueLabels:i,connectNulls:c,gradient:!1,idPrefix:x})})}
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as r from"react";import{CartesianChart as a}from"../../internal/chart-frame.js";import{LineSeries as t}from"../../internal/chart-line.js";import{toValues as n}from"../../internal/chart.js";export function AreaChart({curve:o="linear",stacked:l=!1,markers:s="none",valueLabels:i="none",connectNulls:c=!1,series:u,yAxis:m,format:f,...d}){const x=r.useId().replace(/:/g,""),p="full"===l,h=r.useMemo(()=>{if(!p)return u;const e=n(u),r=[];for(const a of e)a.forEach((e,a)=>{r[a]=(r[a]??0)+Math.abs(e.value??0)});return u.map((a,t)=>({...a,data:e[t].map((e,a)=>{if(null===e.value)return null;const t=r[a];return{x:e.x,y:0===t?0:e.value/t*100,color:e.color,label:e.label??String(e.value)}})}))},[u,p]);return e(a,{...d,series:h,format:f,yAxis:p?{min:0,max:100,tickFormat:e=>`${e}%`,...m}:m,stacked:!1!==l,inset:!0,includeZero:!0,headroom:"none"===i?0:10,children:r=>e(t,{context:r,curve:o,filled:!0,stacked:!1!==l,markers:s,valueLabels:i,connectNulls:c,gradient:!1,idPrefix:x})})}
@@ -1 +1 @@
1
- import*as e from"react";import{useRender as i}from"@base-ui/react/use-render";import{radiusClasses as o}from"../../internal/styles.js";const t=["[&>img]:size-full","[&>video]:size-full","[&>canvas]:size-full","[&>svg]:size-full","[&>iframe]:size-full","[&>picture]:size-full","[&>picture>img]:size-full"].join(" "),c={cover:"[&>img]:object-cover [&>video]:object-cover [&>picture>img]:object-cover",contain:"[&>img]:object-contain [&>video]:object-contain [&>picture>img]:object-contain",fill:"[&>img]:object-fill [&>video]:object-fill [&>picture>img]:object-fill",none:"[&>img]:object-none [&>video]:object-none [&>picture>img]:object-none"};export const AspectRatio=/*@__PURE__*/e.forwardRef(function({ratio:e=1,fit:r="cover",rounded:l=!1,size:n="md",render:s,className:a,style:f,children:m,...u},d){const j=["relative block w-full overflow-hidden",t,c[r],l?o[n]:"",a??""].filter(Boolean).join(" ");return i({render:s,ref:d,props:{className:j,style:{aspectRatio:e,...f},children:m,...u}})});
1
+ "use client";import*as e from"react";import{useRender as i}from"@base-ui/react/use-render";import{cx as o,radiusClasses as t}from"../../internal/styles.js";const c=["[&>img]:size-full","[&>video]:size-full","[&>canvas]:size-full","[&>svg]:size-full","[&>iframe]:size-full","[&>picture]:size-full","[&>picture>img]:size-full"].join(" "),r={cover:"[&>img]:object-cover [&>video]:object-cover [&>picture>img]:object-cover",contain:"[&>img]:object-contain [&>video]:object-contain [&>picture>img]:object-contain",fill:"[&>img]:object-fill [&>video]:object-fill [&>picture>img]:object-fill",none:"[&>img]:object-none [&>video]:object-none [&>picture>img]:object-none"};export const AspectRatio=/*@__PURE__*/e.forwardRef(function({ratio:e=1,fit:l="cover",rounded:n=!1,size:s="md",render:a,className:f,style:m,children:u,...d},b){const j=o("relative block w-full overflow-hidden",c,r[l],n?t[s]:"",f??"");return i({render:a,ref:b,props:{className:j,style:{aspectRatio:e,...m},children:u,...d}})});
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{Avatar as r}from"@base-ui/react/avatar";import{transitionProps as a}from"../../internal/animate.js";import{initialsOf as o}from"../../internal/initials.js";import{controlHeightClasses as s,controlSlots as i,controlSquareClasses as l,hasContent as d,srOnlyClasses as c,surfaceClasses as m,transitionClasses as f}from"../../internal/styles.js";const u={xs:"text-[0.5625rem]",sm:"text-[0.6875rem]",md:"text-[0.8125rem]",lg:"text-[1rem]",xl:"text-[1.1875rem]"},x={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},v={solid:[m,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev)]"].join(" "),outline:[m,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft-press) [box-shadow:var(--n-elev)]"},h="after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit]",p={solid:`${h} after:[box-shadow:var(--neba-plate-solid)]`,outline:`${h} after:[box-shadow:var(--neba-plate-glass)]`,text:""},g=["relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden","align-middle font-semibold tracking-wide whitespace-nowrap leading-none","[&_svg]:pointer-events-none [&_svg]:size-[55%]",f].join(" ");function b(){return t("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z"}),e("path",{d:"M12 14.25c-4.28 0-7.75 2.42-7.75 5.4 0 .75.6 1.35 1.35 1.35h12.8c.75 0 1.35-.6 1.35-1.35 0-2.98-3.47-5.4-7.75-5.4Z"})]})}export const Avatar=/*@__PURE__*/n.forwardRef(function({src:n,srcSet:m,alt:f,name:h,initials:j,shape:w="circle",variant:y="text",size:N="md",color:z="primary",elevation:S=0,delay:k,imageProps:B,onLoadingStatusChange:C,transition:A,className:L,style:M,children:R,...Z},$){const _=h?o(h):"",F=a(A),I=f??h,P=d(R)?R:(j??_)||e(b,{}),q=d(R)||Boolean(j??_),D=[g,s[N],l[N],u[N],"circle"===w?"rounded-full":x[N],v[y],p[y],F.className,L??""].filter(Boolean).join(" ");return t(r.Root,{ref:$,className:D,style:{...i(z,S,y),...F.style,...M},...Z,children:[n?e(r.Image,{src:n,srcSet:m,alt:I??"",className:"size-full object-cover",onLoadingStatusChange:C,...B}):null,t(r.Fallback,{delay:n?k:void 0,className:"flex size-full items-center justify-center",children:[I&&q?e("span",{className:c,children:I}):null,e("span",{"aria-hidden":!(!I||!q)||void 0,className:"contents",children:P})]})]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{Avatar as a}from"@base-ui/react/avatar";import{transitionProps as r}from"../../internal/animate.js";import{AvatarGroupContext as o}from"../../internal/avatar-group.js";import{initialsOf as s}from"../../internal/initials.js";import{controlHeightClasses as i,controlSlots as l,controlSquareClasses as d,cx as c,hasContent as m,srOnlyClasses as f,surfaceClasses as u,transitionClasses as v}from"../../internal/styles.js";const x={xs:"text-[0.5625rem]",sm:"text-[0.6875rem]",md:"text-[0.8125rem]",lg:"text-[1rem]",xl:"text-[1.1875rem]"},p={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},h={solid:[u,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev)]"].join(" "),outline:[u,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft-press) [box-shadow:var(--n-elev)]"},g="after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit]",b={solid:`${g} after:[box-shadow:var(--neba-plate-solid)]`,outline:`${g} after:[box-shadow:var(--neba-plate-glass)]`,text:""},j=["relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden","align-middle font-semibold tracking-wide whitespace-nowrap leading-none","[&_svg]:pointer-events-none [&_svg]:size-[55%]",v].join(" ");function w(){return t("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z"}),e("path",{d:"M12 14.25c-4.28 0-7.75 2.42-7.75 5.4 0 .75.6 1.35 1.35 1.35h12.8c.75 0 1.35-.6 1.35-1.35 0-2.98-3.47-5.4-7.75-5.4Z"})]})}export const Avatar=/*@__PURE__*/n.forwardRef(function({src:u,srcSet:v,alt:g,name:y,initials:N,shape:z,variant:C,size:S,color:k,elevation:A,delay:B,imageProps:L,onLoadingStatusChange:M,transition:R,className:Z,style:$,children:_,...F},I){const P=n.useContext(o),q=z??P?.shape??"circle",D=C??P?.variant??"text",E=S??P?.size??"md",G=k??P?.color??"primary",H=A??P?.elevation??0,J=y?s(y):"",K=r(R),O=g??y,Q=m(_)?_:(N??J)||e(w,{}),T=m(_)||Boolean(N??J),U=c(j,i[E],d[E],x[E],"circle"===q?"rounded-full":p[E],h[D],b[D],K.className,Z??"");return t(a.Root,{ref:I,className:U,style:{...l(G,H,D),...K.style,...$},...F,children:[u?e(a.Image,{src:u,srcSet:v,alt:O??"",className:"size-full object-cover",decoding:"async",onLoadingStatusChange:M,...L}):null,t(a.Fallback,{delay:u?B:void 0,className:"flex size-full items-center justify-center",children:[O&&T?e("span",{className:f,children:O}):null,e("span",{"aria-hidden":!(!O||!T)||void 0,className:"contents",children:Q})]})]})});
@@ -0,0 +1,47 @@
1
+ import * as React from 'react';
2
+ import { type AvatarShape } from '../avatar/Avatar.js';
3
+ import type { NebaColor, NebaElevation, NebaSize, NebaVariant } from '../../types.js';
4
+ export interface AvatarGroupProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color'> {
5
+ /**
6
+ * How many avatars are drawn before the rest become a count. Left out, every
7
+ * one of them is drawn.
8
+ */
9
+ max?: number;
10
+ /**
11
+ * How many there are altogether, when the group was handed only the first
12
+ * few. Without it the count is worked out from the children, which is right
13
+ * only when all of them were passed.
14
+ */
15
+ total?: number;
16
+ /**
17
+ * How far each avatar sits under the one before it — a CSS length, or a
18
+ * number of pixels. Left out it is a fraction of `size`, which keeps the
19
+ * overlap looking the same at every step.
20
+ */
21
+ overlap?: number | string;
22
+ /** Passed to every avatar in the group. @default 'md' */
23
+ size?: NebaSize;
24
+ /** Passed to every avatar in the group. @default 'circle' */
25
+ shape?: AvatarShape;
26
+ /** Passed to every avatar in the group. @default 'text' */
27
+ variant?: NebaVariant;
28
+ /** Passed to every avatar in the group. @default 'primary' */
29
+ color?: NebaColor;
30
+ /** Passed to every avatar in the group. @default 0 */
31
+ elevation?: NebaElevation;
32
+ /** The avatars. */
33
+ children?: React.ReactNode;
34
+ }
35
+ /**
36
+ * A stack of avatars, overlapping, with the ones that did not fit as a count.
37
+ *
38
+ * `size`, `shape`, `variant`, `color` and `elevation` are set once here rather
39
+ * than on every avatar — a stack whose fourth face is a size out is not a stack
40
+ * — and an avatar's own prop still wins, which is what lets one of them be
41
+ * marked out from the rest.
42
+ *
43
+ * The order is the DOM order, and the first avatar is on top: a stack read
44
+ * left to right is read front to back, so the one the group is *about* comes
45
+ * first rather than last.
46
+ */
47
+ export declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as r,jsxs as e}from"react/jsx-runtime";import*as a from"react";import{Avatar as t}from"../avatar/Avatar.js";import{AvatarGroupContext as i}from"../../internal/avatar-group.js";import{cx as n}from"../../internal/styles.js";const l={xs:"0.375rem",sm:"0.5rem",md:"0.625rem",lg:"0.75rem",xl:"0.875rem"};export const AvatarGroup=/*@__PURE__*/a.forwardRef(function({max:o,total:s,overlap:m,size:c="md",shape:v="circle",variant:p="text",color:f="primary",elevation:d=0,className:x,style:h,children:u,...g},j){const y=a.useMemo(()=>({size:c,shape:v,variant:p,color:f,elevation:d}),[c,v,p,f,d]),A=a.Children.toArray(u),M=void 0===o?A:A.slice(0,Math.max(0,o)),b=s??A.length,z=Math.max(0,b-M.length);return r(i.Provider,{value:y,children:e("div",{ref:j,className:n("isolate inline-flex items-center","[&>*:not(:first-child)]:[margin-inline-start:calc(var(--n-overlap)*-1)]","[&>*]:ring-2 [&>*]:ring-(--neba-surface)",x??""),style:{"--n-overlap":void 0===m?l[c]:"number"==typeof m?`${m}px`:m,...h},...g,children:[M,z>0?r(t,{initials:`+${z}`}):null]})})});
@@ -0,0 +1,2 @@
1
+ export { AvatarGroup } from './AvatarGroup.js';
2
+ export type { AvatarGroupProps } from './AvatarGroup.js';
@@ -0,0 +1 @@
1
+ export{AvatarGroup}from"./AvatarGroup.js";
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t,jsxs as m}from"react/jsx-runtime";import*as n from"react";import{controlSlots as s,hasContent as o,srOnlyClasses as a,surfaceClasses as l,transitionClasses as i}from"../../internal/styles.js";const r={xs:"h-3.5 min-w-3.5",sm:"h-4 min-w-4",md:"h-4.5 min-w-4.5",lg:"h-5 min-w-5",xl:"h-6 min-w-6"},d={xs:"size-1.5",sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},b={xs:"text-[0.5625rem]",sm:"text-[0.625rem]",md:"text-[0.6875rem]",lg:"text-[0.75rem]",xl:"text-[0.8125rem]"},x={default:{xs:"px-1",sm:"px-1",md:"px-1.5",lg:"px-1.5",xl:"px-2"},compact:{xs:"px-0.5",sm:"px-0.5",md:"px-1",lg:"px-1",xl:"px-1.5"}},p="rounded-full",c={xs:{badge:"-mt-1.5 -mb-1.5 -ms-1.5 -me-1.5",dot:"-mt-0.5 -mb-0.5 -ms-0.5 -me-0.5"},sm:{badge:"-mt-2 -mb-2 -ms-2 -me-2",dot:"-mt-1 -mb-1 -ms-1 -me-1"},md:{badge:"-mt-2 -mb-2 -ms-2 -me-2",dot:"-mt-1 -mb-1 -ms-1 -me-1"},lg:{badge:"-mt-2.5 -mb-2.5 -ms-2.5 -me-2.5",dot:"-mt-1 -mb-1 -ms-1 -me-1"},xl:{badge:"-mt-3 -mb-3 -ms-3 -me-3",dot:"-mt-1.5 -mb-1.5 -ms-1.5 -me-1.5"}},g={"top-start":"top-0 start-0","top-end":"top-0 end-0","bottom-start":"bottom-0 start-0","bottom-end":"bottom-0 end-0"},f={"top-start":"mt-[7%] ms-[7%]","top-end":"mt-[7%] me-[7%]","bottom-start":"mb-[7%] ms-[7%]","bottom-end":"mb-[7%] me-[7%]"},h={solid:[l,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[l,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft-press)"};export const Badge=/*@__PURE__*/n.forwardRef(function({variant:n="solid",size:l="md",color:u="primary",density:v="default",elevation:w=0,content:j,max:y=99,dot:z=!1,showZero:N=!1,invisible:k=!1,placement:B="top-end",overlap:$="square",label:q,className:F,style:R,children:Z,...A},C){const D=o(Z),E=!o(j)||0===j&&!N,G=z||E,H=k||E&&!z,I=["pointer-events-none z-10 inline-flex shrink-0 items-center justify-center","font-semibold tabular-nums whitespace-nowrap",p,i,h[n],G?d[l]:[r[l],b[l],x[v][l]].join(" "),D?`absolute ${g[B]}`:"relative align-middle",D?G?c[l].dot:c[l].badge:"",D&&"circle"===$?f[B]:"",H?"invisible":"",F??""].filter(Boolean).join(" "),J=function(e,t){return"number"==typeof e&&e>t?`${t}+`:e}(j,y),K=e("span",{ref:C,className:I,style:{...s(u,w,n),...R},"aria-hidden":!!H||void 0,...A,children:H?null:m(t,{children:[G||q?e("span",{className:a,children:q??J}):null,G?null:e("span",{"aria-hidden":!!q||void 0,children:J})]})});return D?m("span",{className:"relative inline-flex shrink-0 align-middle",children:[Z,K]}):K});
1
+ "use client";import{jsx as e,Fragment as t,jsxs as m}from"react/jsx-runtime";import*as s from"react";import{controlSlots as n,cx as o,hasContent as a,srOnlyClasses as l,surfaceClasses as i,transitionClasses as r}from"../../internal/styles.js";const d={xs:"h-3.5 min-w-3.5",sm:"h-4 min-w-4",md:"h-4.5 min-w-4.5",lg:"h-5 min-w-5",xl:"h-6 min-w-6"},b={xs:"size-1.5",sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},x={xs:"text-[0.5625rem]",sm:"text-[0.625rem]",md:"text-[0.6875rem]",lg:"text-[0.75rem]",xl:"text-[0.8125rem]"},p={default:{xs:"px-1",sm:"px-1",md:"px-1.5",lg:"px-1.5",xl:"px-2"},compact:{xs:"px-0.5",sm:"px-0.5",md:"px-1",lg:"px-1",xl:"px-1.5"}},c={xs:{badge:"-mt-1.5 -mb-1.5 -ms-1.5 -me-1.5",dot:"-mt-0.5 -mb-0.5 -ms-0.5 -me-0.5"},sm:{badge:"-mt-2 -mb-2 -ms-2 -me-2",dot:"-mt-1 -mb-1 -ms-1 -me-1"},md:{badge:"-mt-2 -mb-2 -ms-2 -me-2",dot:"-mt-1 -mb-1 -ms-1 -me-1"},lg:{badge:"-mt-2.5 -mb-2.5 -ms-2.5 -me-2.5",dot:"-mt-1 -mb-1 -ms-1 -me-1"},xl:{badge:"-mt-3 -mb-3 -ms-3 -me-3",dot:"-mt-1.5 -mb-1.5 -ms-1.5 -me-1.5"}},g={"top-start":"top-0 start-0","top-end":"top-0 end-0","bottom-start":"bottom-0 start-0","bottom-end":"bottom-0 end-0"},u={"top-start":"mt-[7%] ms-[7%]","top-end":"mt-[7%] me-[7%]","bottom-start":"mb-[7%] ms-[7%]","bottom-end":"mb-[7%] me-[7%]"},h={solid:[i,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[i,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft-press)"};export const Badge=/*@__PURE__*/s.forwardRef(function({variant:s="solid",size:i="md",color:f="primary",density:v="default",elevation:w=0,content:j,max:y=99,dot:z=!1,showZero:N=!1,invisible:k=!1,placement:$="top-end",overlap:q="square",label:B,className:F,style:R,children:Z,...A},C){const D=a(Z),E=!a(j)||0===j&&!N,G=z||E,H=k||E&&!z,I=o("pointer-events-none z-10 inline-flex shrink-0 items-center justify-center","font-semibold tabular-nums whitespace-nowrap","rounded-full",r,h[s],G?b[i]:[d[i],x[i],p[v][i]].join(" "),D?`absolute ${g[$]}`:"relative align-middle",D?G?c[i].dot:c[i].badge:"",D&&"circle"===q?u[$]:"",H?"invisible":"",F??""),J=function(e,t){return"number"==typeof e&&e>t?`${t}+`:e}(j,y),K=e("span",{ref:C,className:I,style:{...n(f,w,s),...R},"aria-hidden":!!H||void 0,...A,children:H?null:m(t,{children:[G||B?e("span",{className:l,children:B??J}):null,G?null:e("span",{"aria-hidden":!!B||void 0,children:J})]})});return D?m("span",{className:"relative inline-flex shrink-0 align-middle",children:[Z,K]}):K});
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{CartesianChart as n}from"../../internal/chart-frame.js";import{barBandRatio as l,barMaxThickness as r,barPath as o,barRadius as i,chartFontSizes as u,markGap as s,toValues as c}from"../../internal/chart.js";export function BarChart({orientation:t="vertical",stacked:o=!1,rounded:i=!0,barSize:u,valueLabels:s="none",series:h,yAxis:m,size:v="md",density:f="default",...x}){const b="horizontal"===t,p="full"===o,y=a.useMemo(()=>{if(!p)return h;const e=c(h),t=[];for(const a of e)a.forEach((e,a)=>{t[a]=(t[a]??0)+Math.abs(e.value??0)});return h.map((a,n)=>({...a,data:e[n].map((e,a)=>{if(null===e.value)return null;const n=t[a];return{x:e.x,y:0===n?0:e.value/n*100,color:e.color,label:e.label??String(e.value)}})}))},[h,p]);return e(n,{...x,series:y,size:v,density:f,horizontal:b,stacked:!1!==o,yAxis:p?{min:0,max:100,tickFormat:e=>`${e}%`,...m}:m,includeZero:!0,bandRatio:l[f],headroom:"none"===s?0:12,children:t=>e(d,{context:t,stacked:!1!==o,rounded:i,barSize:u??r[v],valueLabels:s,size:v})})}function d({context:a,stacked:n,rounded:l,barSize:r,valueLabels:c,size:d}){const{values:m,visible:v,colors:f,hovered:x,activeIndex:b,plot:p,band:y,horizontal:z,valuePx:g,categoryPx:M,zeroPx:k,format:j}=a,S=m.map((e,t)=>({one:e,index:t})).filter(e=>v[e.index]),A=n?1:Math.max(1,S.length),L=Math.min(r,Math.max(1,(y.band-s*(A-1))/A)),P=L*A+s*(A-1),W=[],w=[],B=u[d];return t("g",{children:[S.map(({one:a,index:r},u)=>{const d=f[r];return e("g",{opacity:null!==x&&x!==r?.28:1,children:a.map((r,m)=>{if(null===r.value)return null;const v=M(m),f=n?0:u*(L+s)-P/2+L/2,x=n?r.value>=0?W[m]??0:w[m]??0:0,y=g(x),k=g(x+r.value);n&&(r.value>=0?W[m]=x+r.value:w[m]=x+r.value);const S=n&&0!==x?s:0,A=Math.abs(k-y)-S;if(A<=0)return null;const C=k<y,E=m===b,F=z?o(Math.min(y,k)+(C?0:S),p.top+v+f-L/2,A,L,l&&!n?i:l?i/2:0,r.value>=0?"right":"left"):o(p.left+v+f-L/2,Math.min(y,k)+(C?0:S),L,A,l&&!n?i:l?i/2:0,r.value>=0?"up":"down");return t("g",{children:[e("path",{d:F,fill:r.color??d,opacity:E?1:.92}),"none"===c||"extremes"===c&&!h(a,m)||"last"===c&&m!==a.length-1?null:e("text",{x:z?k+(r.value>=0?5:-5):p.left+v+f,y:z?p.top+v+f:r.value>=0?k-5:k+B+2,textAnchor:z?r.value>=0?"start":"end":"middle",dominantBaseline:z?"central":void 0,fontSize:B,fontWeight:500,fill:"var(--neba-fg)",className:"tabular-nums",children:r.label??j(r.value)})]},m)})},r)}),e("line",z?{x1:k,x2:k,y1:p.top,y2:p.top+p.height,stroke:"var(--neba-chart-baseline)",strokeWidth:1}:{x1:p.left,x2:p.left+p.width,y1:k,y2:k,stroke:"var(--neba-chart-baseline)",strokeWidth:1})]})}function h(e,t){const a=e[t].value;if(null===a)return!1;let n=1/0,l=-1/0;for(const t of e)null!==t.value&&(n=Math.min(n,t.value),l=Math.max(l,t.value));return a===n||a===l}
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{CartesianChart as n}from"../../internal/chart-frame.js";import{barBandRatio as l,barMaxThickness as r,barPath as o,barRadius as i,chartFontSizes as u,markGap as s,toValues as c}from"../../internal/chart.js";export function BarChart({orientation:t="vertical",stacked:o=!1,rounded:i=!0,barSize:u,valueLabels:s="none",series:h,yAxis:m,size:v="md",density:f="default",...x}){const b="horizontal"===t,p="full"===o,y=a.useMemo(()=>{if(!p)return h;const e=c(h),t=[];for(const a of e)a.forEach((e,a)=>{t[a]=(t[a]??0)+Math.abs(e.value??0)});return h.map((a,n)=>({...a,data:e[n].map((e,a)=>{if(null===e.value)return null;const n=t[a];return{x:e.x,y:0===n?0:e.value/n*100,color:e.color,label:e.label??String(e.value)}})}))},[h,p]);return e(n,{...x,series:y,size:v,density:f,horizontal:b,stacked:!1!==o,yAxis:p?{min:0,max:100,tickFormat:e=>`${e}%`,...m}:m,includeZero:!0,bandRatio:l[f],headroom:"none"===s?0:12,children:t=>e(d,{context:t,stacked:!1!==o,rounded:i,barSize:u??r[v],valueLabels:s,size:v})})}function d({context:a,stacked:n,rounded:l,barSize:r,valueLabels:c,size:d}){const{values:m,visible:v,colors:f,hovered:x,activeIndex:b,plot:p,band:y,horizontal:z,valuePx:g,categoryPx:M,zeroPx:k,format:j}=a,S=m.map((e,t)=>({one:e,index:t})).filter(e=>v[e.index]),A=n?1:Math.max(1,S.length),L=Math.min(r,Math.max(1,(y.band-s*(A-1))/A)),P=L*A+s*(A-1),W=[],w=[],B=u[d];return t("g",{children:[S.map(({one:a,index:r},u)=>{const d=f[r];return e("g",{opacity:null!==x&&x!==r?.28:1,children:a.map((r,m)=>{if(null===r.value)return null;const v=M(m),f=n?0:u*(L+s)-P/2+L/2,x=n?r.value>=0?W[m]??0:w[m]??0:0,y=g(x),k=g(x+r.value);n&&(r.value>=0?W[m]=x+r.value:w[m]=x+r.value);const S=n&&0!==x?s:0,A=Math.abs(k-y)-S;if(A<=0)return null;const C=k<y,E=m===b,F=z?o(Math.min(y,k)+(C?0:S),p.top+v+f-L/2,A,L,l&&!n?i:l?i/2:0,r.value>=0?"right":"left"):o(p.left+v+f-L/2,Math.min(y,k)+(C?0:S),L,A,l&&!n?i:l?i/2:0,r.value>=0?"up":"down");return t("g",{children:[e("path",{d:F,fill:r.color??d,opacity:E?1:.92}),"none"===c||"extremes"===c&&!h(a,m)||"last"===c&&m!==a.length-1?null:e("text",{x:z?k+(r.value>=0?5:-5):p.left+v+f,y:z?p.top+v+f:r.value>=0?k-5:k+B+2,textAnchor:z?r.value>=0?"start":"end":"middle",dominantBaseline:z?"central":void 0,fontSize:B,fontWeight:500,fill:"var(--neba-fg)",className:"tabular-nums",children:r.label??j(r.value)})]},m)})},r)}),e("line",z?{x1:k,x2:k,y1:p.top,y2:p.top+p.height,stroke:"var(--neba-chart-baseline)",strokeWidth:1}:{x1:p.left,x2:p.left+p.width,y1:k,y2:k,stroke:"var(--neba-chart-baseline)",strokeWidth:1})]})}function h(e,t){const a=e[t].value;if(null===a)return!1;let n=1/0,l=-1/0;for(const t of e)null!==t.value&&(n=Math.min(n,t.value),l=Math.max(l,t.value));return a===n||a===l}
@@ -1 +1 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{boxPaddingClasses as n}from"../box/Box.js";import{transitionProps as a}from"../../internal/animate.js";import{hasContent as l,metaTextClasses as o,radiusClasses as s,surfaceClasses as i,surfaceSlots as c,transitionClasses as m}from"../../internal/styles.js";const d={xs:"text-[0.75rem]/[1.25rem]",sm:"text-[0.8125rem]/[1.375rem]",md:"text-[0.9375rem]/[1.625rem]",lg:"text-[1.0625rem]/[1.875rem]",xl:"text-[1.25rem]/[2.125rem]"},x="border-s-2 [border-inline-start-color:var(--n-accent)]",f={solid:[i,"bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[i,"border border-s-2 bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"bg-transparent"};function u(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e("path",{d:"M6.4 3.6c-2.3.9-3.7 2.8-3.7 5.1 0 2 1.2 3.3 2.8 3.3 1.4 0 2.5-1 2.5-2.4 0-1.3-.9-2.2-2.1-2.2-.2 0-.4 0-.6.1.3-1 1.1-1.8 2.2-2.3l-1.1-1.6ZM13.3 3.6c-2.3.9-3.7 2.8-3.7 5.1 0 2 1.2 3.3 2.8 3.3 1.4 0 2.5-1 2.5-2.4 0-1.3-.9-2.2-2.1-2.2-.2 0-.4 0-.6.1.3-1 1.1-1.8 2.2-2.3l-1.1-1.6Z",fill:"currentColor"})})}export const Blockquote=/*@__PURE__*/t.forwardRef(function({variant:t="text",size:i="md",color:b="primary",density:p="default",elevation:h=0,author:v,source:g,cite:j,icon:N,transition:y,className:w,style:B,children:k,...z},q){const M=a(y),Z=l(v)||l(g),C=void 0===N?e(u,{}):N,R=["flex flex-col text-(--neba-fg)",x,"text"===t?"":`${s[i]} rounded-s-none`,f[t],n[p][i],m,M.className,w??""].filter(Boolean).join(" "),$=r("blockquote",{cite:j,className:d[i],children:[l(C)?e("span",{"aria-hidden":"true",className:"mb-1 block size-[2em] text-(--n-soft-press) [&>svg]:size-full",children:C}):null,k]}),A={...c(b,h),...M.style,...B};return Z?r("figure",{ref:q,className:R,style:A,...z,children:[$,r("figcaption",{className:["mt-2 flex flex-wrap items-baseline gap-x-1.5 text-(--neba-muted-fg)",o[i]].join(" "),children:[l(v)?r("span",{className:"font-medium text-(--neba-fg)",children:[e("span",{"aria-hidden":"true",children:"— "}),v]}):null,l(g)?e("cite",{className:"not-italic",children:g}):null]})]}):e("div",{ref:q,className:R,style:A,...z,children:$})});
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{boxPaddingClasses as n}from"../box/Box.js";import{transitionProps as a}from"../../internal/animate.js";import{cx as l,hasContent as s,metaTextClasses as i,radiusClasses as o,surfaceClasses as c,surfaceSlots as m,transitionClasses as d}from"../../internal/styles.js";const x={xs:"text-[0.75rem]/[1.25rem]",sm:"text-[0.8125rem]/[1.375rem]",md:"text-[0.9375rem]/[1.625rem]",lg:"text-[1.0625rem]/[1.875rem]",xl:"text-[1.25rem]/[2.125rem]"},f={solid:[c,"bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[c,"border border-s-2 bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"bg-transparent"};function u(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e("path",{d:"M6.4 3.6c-2.3.9-3.7 2.8-3.7 5.1 0 2 1.2 3.3 2.8 3.3 1.4 0 2.5-1 2.5-2.4 0-1.3-.9-2.2-2.1-2.2-.2 0-.4 0-.6.1.3-1 1.1-1.8 2.2-2.3l-1.1-1.6ZM13.3 3.6c-2.3.9-3.7 2.8-3.7 5.1 0 2 1.2 3.3 2.8 3.3 1.4 0 2.5-1 2.5-2.4 0-1.3-.9-2.2-2.1-2.2-.2 0-.4 0-.6.1.3-1 1.1-1.8 2.2-2.3l-1.1-1.6Z",fill:"currentColor"})})}export const Blockquote=/*@__PURE__*/t.forwardRef(function({variant:t="text",size:c="md",color:b="primary",density:p="default",elevation:h=0,author:v,source:g,cite:j,icon:N,transition:y,className:w,style:k,children:z,...B},q){const M=a(y),Z=s(v)||s(g),C=void 0===N?e(u,{}):N,R=l("flex flex-col text-(--neba-fg)","border-s-2 [border-inline-start-color:var(--n-accent)]","text"===t?"":`${o[c]} rounded-s-none`,f[t],n[p][c],d,M.className,w??""),$=r("blockquote",{cite:j,className:x[c],children:[s(C)?e("span",{"aria-hidden":"true",className:"mb-1 block size-[2em] text-(--n-soft-press) [&>svg]:size-full",children:C}):null,z]}),A={...m(b,h),...M.style,...k};return Z?r("figure",{ref:q,className:R,style:A,...B,children:[$,r("figcaption",{className:["mt-2 flex flex-wrap items-baseline gap-x-1.5 text-(--neba-muted-fg)",i[c]].join(" "),children:[s(v)?r("span",{className:"font-medium text-(--neba-fg)",children:[e("span",{"aria-hidden":"true",children:"— "}),v]}):null,s(g)?e("cite",{className:"not-italic",children:g}):null]})]}):e("div",{ref:q,className:R,style:A,...B,children:$})});
@@ -1 +1 @@
1
- import{jsx as e,Fragment as t,jsxs as a}from"react/jsx-runtime";import*as n from"react";import{useRender as i}from"@base-ui/react/use-render";import{barMinHeightClasses as l,BottomNavigationContext as r}from"../../internal/bottom-navigation.js";import{cx as o,hasContent as s,iconSizeClasses as d,metaTextClasses as c,paddingXClasses as u,radiusClasses as m,srOnlyClasses as p,surfaceClasses as f,surfaceSlots as b,transitionClasses as g}from"../../internal/styles.js";const v={solid:[f,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[f,"text-(--neba-fg) bg-(--n-panel)","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"},x={static:"",sticky:"sticky bottom-0 z-20",fixed:"fixed inset-x-0 bottom-0 z-30"},h={default:{xs:"p-1",sm:"p-1",md:"p-1.5",lg:"p-2",xl:"p-2.5"},compact:{xs:"p-0.5",sm:"p-0.5",md:"p-1",lg:"p-1",xl:"p-1.5"}},y={xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"};export const BottomNavigation=/*@__PURE__*/n.forwardRef(function({variant:t="outline",size:a="md",color:s="primary",density:d="default",elevation:c=0,value:u,defaultValue:p=null,onValueChange:f,position:y="fixed",labels:w="all",divider:N=!0,safeArea:z=!0,disabled:j=!1,label:k,render:C,className:B,style:R,children:V,..._},A){const[D,F]=n.useState(p),I=void 0!==u,M=I?u:D,P=n.useCallback(e=>{I||F(e),f?.(e)},[I,f]),S=n.useMemo(()=>({value:M??null,change:P,size:a,density:d,labels:w,disabled:j,floating:!1}),[M,P,a,d,w,j]),q=o("w-full min-w-0","static"===y?m[a]:"",v[t],"outline"===t&&"static"===y?"border [border-color:var(--n-line)]":"",N?"border-t [border-color:var(--n-line)]":"",x[y],z?"pb-[env(safe-area-inset-bottom)]":"",g,B);return i({render:C??e("nav",{}),ref:A,props:{"aria-label":k,className:q,style:{...b(s,c),...R},children:e(r.Provider,{value:S,children:e("div",{className:o("flex w-full items-stretch",l[a],h[d][a]),children:V})}),..._}})});export const BottomNavigationItem=/*@__PURE__*/n.forwardRef(function({value:i,icon:l,href:f,disabled:b=!1,className:v,children:x,onClick:h,...w},N){const z=n.useContext(r),j=b||z.disabled,k=null!==z.value&&z.value===i,C="all"===z.labels||"selected"===z.labels&&k,B=o("flex min-w-0 flex-col items-center justify-center py-1.5",z.floating?o("relative z-10",u[z.density][z.size],"rounded-full"):o("flex-1 px-1",m[z.size]),y[z.size],"[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",g,"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]",j?"cursor-not-allowed text-(--neba-disabled-fg)":k?z.floating?"cursor-pointer font-medium text-(--n-accent)":"cursor-pointer font-medium text-(--n-accent) bg-(--n-soft) hover:bg-(--n-soft-hover)":"cursor-pointer text-(--neba-muted-fg) hover:text-(--neba-fg) hover:bg-(--n-panel-hover)",v),R=a(t,{children:[s(l)?e("span",{className:o("flex shrink-0 items-center justify-center",d[z.size]),children:l}):null,s(x)?z.floating&&"selected"===z.labels?e("span",{"data-drawn":C?"":void 0,className:o("grid justify-items-center [grid-template-rows:1fr]","[transition-property:grid-template-columns,opacity]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","motion-reduce:[transition-duration:0ms]",C?"[grid-template-columns:1fr] opacity-100":"[grid-template-columns:0fr] opacity-0"),children:e("span",{className:o("min-w-0 truncate leading-tight",c[z.size]),children:x})}):e("span",{"data-drawn":C?"":void 0,className:C?o("max-w-full truncate leading-tight",c[z.size]):p,children:x}):null]}),V=e=>{j?e.preventDefault():(z.change(i),h?.(e))};return f?e("a",{ref:N,"data-nav-item":"",href:j?void 0:f,"aria-current":k?"page":void 0,"aria-disabled":j||void 0,className:B,onClick:V,...w,children:R}):e("button",{ref:N,"data-nav-item":"",type:"button",disabled:j,"aria-current":k?"page":void 0,className:B,onClick:V,...w,children:R})});
1
+ "use client";import{jsx as e,Fragment as t,jsxs as a}from"react/jsx-runtime";import*as n from"react";import{useRender as i}from"@base-ui/react/use-render";import{barMinHeightClasses as l,BottomNavigationContext as r}from"../../internal/bottom-navigation.js";import{cx as o,hasContent as s,iconSizeClasses as d,metaTextClasses as c,paddingXClasses as u,radiusClasses as m,srOnlyClasses as p,surfaceClasses as f,surfaceSlots as b,transitionClasses as g}from"../../internal/styles.js";const v={solid:[f,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[f,"text-(--neba-fg) bg-(--n-panel)","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"},x={static:"",sticky:"sticky bottom-0 z-20",fixed:"fixed inset-x-0 bottom-0 z-30"},h={default:{xs:"p-1",sm:"p-1",md:"p-1.5",lg:"p-2",xl:"p-2.5"},compact:{xs:"p-0.5",sm:"p-0.5",md:"p-1",lg:"p-1",xl:"p-1.5"}},y={xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"};export const BottomNavigation=/*@__PURE__*/n.forwardRef(function({variant:t="outline",size:a="md",color:s="primary",density:d="default",elevation:c=0,value:u,defaultValue:p=null,onValueChange:f,position:y="fixed",labels:w="all",divider:N=!0,safeArea:z=!0,disabled:j=!1,label:k,render:C,className:B,style:R,children:V,..._},A){const[D,F]=n.useState(p),I=void 0!==u,M=I?u:D,P=n.useCallback(e=>{I||F(e),f?.(e)},[I,f]),S=n.useMemo(()=>({value:M??null,change:P,size:a,density:d,labels:w,disabled:j,floating:!1}),[M,P,a,d,w,j]),q=o("w-full min-w-0","static"===y?m[a]:"",v[t],"outline"===t&&"static"===y?"border [border-color:var(--n-line)]":"",N?"border-t [border-color:var(--n-line)]":"",x[y],z?"pb-[env(safe-area-inset-bottom)]":"",g,B);return i({render:C??e("nav",{}),ref:A,props:{"aria-label":k,className:q,style:{...b(s,c),...R},children:e(r.Provider,{value:S,children:e("div",{className:o("flex w-full items-stretch",l[a],h[d][a]),children:V})}),..._}})});export const BottomNavigationItem=/*@__PURE__*/n.forwardRef(function({value:i,icon:l,href:f,disabled:b=!1,className:v,children:x,onClick:h,...w},N){const z=n.useContext(r),j=b||z.disabled,k=null!==z.value&&z.value===i,C="all"===z.labels||"selected"===z.labels&&k,B=o("flex min-w-0 flex-col items-center justify-center py-1.5",z.floating?o("relative z-10",u[z.density][z.size],"rounded-full"):o("flex-1 px-1",m[z.size]),y[z.size],"[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",g,"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]",j?"cursor-not-allowed text-(--neba-disabled-fg)":k?z.floating?"cursor-pointer font-medium text-(--n-accent)":"cursor-pointer font-medium text-(--n-accent) bg-(--n-soft) hover:bg-(--n-soft-hover)":"cursor-pointer text-(--neba-muted-fg) hover:text-(--neba-fg) hover:bg-(--n-panel-hover)",v),R=a(t,{children:[s(l)?e("span",{className:o("flex shrink-0 items-center justify-center",d[z.size]),children:l}):null,s(x)?z.floating&&"selected"===z.labels?e("span",{"data-drawn":C?"":void 0,className:o("grid justify-items-center [grid-template-rows:1fr]","[transition-property:grid-template-columns,opacity]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","motion-reduce:[transition-duration:0ms]",C?"[grid-template-columns:1fr] opacity-100":"[grid-template-columns:0fr] opacity-0"),children:e("span",{className:o("min-w-0 truncate leading-tight",c[z.size]),children:x})}):e("span",{"data-drawn":C?"":void 0,className:C?o("max-w-full truncate leading-tight",c[z.size]):p,children:x}):null]}),V=e=>{j?e.preventDefault():(z.change(i),h?.(e))};return f?e("a",{ref:N,"data-nav-item":"",href:j?void 0:f,"aria-current":k?"page":void 0,"aria-disabled":j||void 0,className:B,onClick:V,...w,children:R}):e("button",{ref:N,"data-nav-item":"",type:"button",disabled:j,"aria-current":k?"page":void 0,className:B,onClick:V,...w,children:R})});
@@ -1 +1 @@
1
- import*as e from"react";import{useRender as s}from"@base-ui/react/use-render";import{transitionProps as a}from"../../internal/animate.js";import{radiusClasses as o,surfaceClasses as t,surfaceSlots as n,transitionClasses as p}from"../../internal/styles.js";const l=o;export const boxPaddingClasses={default:{xs:"p-2",sm:"p-3",md:"p-4",lg:"p-5",xl:"p-6"},compact:{xs:"p-1.5",sm:"p-2",md:"p-2.5",lg:"p-3",xl:"p-4"}};export const boxPaddingXClasses={default:{xs:"px-2",sm:"px-3",md:"px-4",lg:"px-5",xl:"px-6"},compact:{xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3",xl:"px-4"}};export const boxPaddingYClasses={default:{xs:"py-2",sm:"py-3",md:"py-4",lg:"py-5",xl:"py-6"},compact:{xs:"py-1.5",sm:"py-2",md:"py-2.5",lg:"py-3",xl:"py-4"}};const r=["block",p].join(" "),x={solid:[t,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[t,"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"};export const Box=/*@__PURE__*/e.forwardRef(function({variant:e="outline",size:o="md",color:t="primary",density:p="default",elevation:d=0,padded:i=!0,transition:m,render:c,className:b,style:g,children:f,...y},u){const v=a(m),j=[r,l[o],i?boxPaddingClasses[p][o]:"",x[e],v.className,b??""].filter(Boolean).join(" ");return s({render:c,ref:u,props:{className:j,style:{...n(t,d),...v.style,...g},children:f,...y}})});
1
+ "use client";import*as e from"react";import{useRender as s}from"@base-ui/react/use-render";import{transitionProps as a}from"../../internal/animate.js";import{cx as t,radiusClasses as o,surfaceClasses as n,surfaceSlots as p,transitionClasses as l}from"../../internal/styles.js";const r=o;export const boxPaddingClasses={default:{xs:"p-2",sm:"p-3",md:"p-4",lg:"p-5",xl:"p-6"},compact:{xs:"p-1.5",sm:"p-2",md:"p-2.5",lg:"p-3",xl:"p-4"}};export const boxPaddingXClasses={default:{xs:"px-2",sm:"px-3",md:"px-4",lg:"px-5",xl:"px-6"},compact:{xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3",xl:"px-4"}};export const boxPaddingYClasses={default:{xs:"py-2",sm:"py-3",md:"py-4",lg:"py-5",xl:"py-6"},compact:{xs:"py-1.5",sm:"py-2",md:"py-2.5",lg:"py-3",xl:"py-4"}};const x=["block",l].join(" "),d={solid:[n,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[n,"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"};export const Box=/*@__PURE__*/e.forwardRef(function({variant:e="outline",size:o="md",color:n="primary",density:l="default",elevation:i=0,padded:m=!0,transition:c,render:b,className:g,style:y,children:f,...u},v){const h=a(c),j=t(x,r[o],m?boxPaddingClasses[l][o]:"",d[e],h.className,g??"");return s({render:b,ref:v,props:{className:j,style:{...p(n,i),...h.style,...y},children:f,...u}})});
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import{breadcrumbMessages as a,useMessages as s}from"../../internal/i18n.js";import{ArrowRightIcon as l,ChevronIcon as i,EllipsisIcon as c}from"../../internal/icons.js";import{controlTextClasses as o,cx as m,gapClasses as d,hasContent as u,iconClasses as p,radiusClasses as f,transitionClasses as h}from"../../internal/styles.js";const x=/*@__PURE__*/r.createContext({size:"md",last:!1}),g={default:{xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"},compact:{xs:"gap-0.5",sm:"gap-1",md:"gap-1",lg:"gap-1.5",xl:"gap-2"}},b={xs:f.xs,sm:f.xs,md:f.xs,lg:f.sm,xl:f.sm};const v=["chevron","arrow","slash","dot"];function y(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(y).join(""):r.isValidElement(e)?y(e.props.children):""}function N(e,t){if(!t)return e;try{return new URL(e,t).href}catch{return e}}function w(e,t){const n=e.map((e,n)=>{const{href:r,children:a}=e.props;return{"@type":"ListItem",position:n+1,name:y(a),...r?{item:N(r,t)}:null}});return JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:n}).replace(/</g,"\\u003c")}export const Breadcrumb=/*@__PURE__*/r.forwardRef(function({size:n="md",color:d="primary",density:u="default",separator:f="chevron",maxItems:b,itemsBeforeCollapse:y=1,itemsAfterCollapse:N=1,expandable:k=!0,locale:C,label:j,expandLabel:I,structuredData:L=!1,baseUrl:_,className:B,style:z,children:A,...M},S){const E=s(a,C),[R,$]=r.useState(!1),F=r.Children.toArray(A).filter(r.isValidElement),U=F.length,V=F.some(e=>!0===e.props.current),D=!R&&void 0!==b&&U>Math.max(b,1)&&U-y-N>1?[...F.slice(0,Math.max(0,y)),null,...F.slice(U-Math.max(0,N))]:F,H="string"==typeof(J=f)&&v.includes(J)?function(t){switch(t){case"chevron":return e("span",{className:"flex -rotate-90 items-center rtl:rotate-90",children:e(i,{})});case"arrow":return e("span",{className:"flex items-center rtl:rotate-180",children:e(l,{})});case"slash":return e("span",{className:"opacity-70",children:"/"});case"dot":return e("span",{className:"opacity-70",children:"·"});default:return null}}(f):f;var J;const O=m("inline-flex items-center rounded-(--neba-radius-xs) px-0.5","text-(--neba-muted-fg)",h,p,k?m("cursor-pointer hover:bg-(--n-soft) hover:text-(--n-accent)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"");return t("nav",{ref:S,"aria-label":j??E.label,className:m("flex",o[n],p,B),style:{"--n-accent":`var(--neba-${d}-accent)`,"--n-soft":`var(--neba-${d}-soft)`,"--n-ring":`var(--neba-${d}-ring)`,...z},...M,children:[L&&U>0?e("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:w(F,_)}}):null,e("ol",{role:"list",className:m("flex list-none flex-wrap items-center p-0",g[u][n]),children:D.map((a,s)=>t(r.Fragment,{children:[s>0?e("li",{"aria-hidden":"true",className:"flex shrink-0 items-center text-(--neba-muted-fg) select-none",children:H}):null,a?e(x.Provider,{value:{size:n,last:!V&&s===D.length-1},children:a}):e("li",{className:"flex shrink-0 items-center",children:k?e("button",{type:"button",className:O,"aria-label":I??E.expand,onClick:()=>$(!0),children:e(c,{})}):e("span",{className:O,"aria-hidden":"true",children:e(c,{})})})]},a?a.key??s:"fold"))})]})});export const BreadcrumbItem=/*@__PURE__*/r.forwardRef(function({href:a,onClick:s,startIcon:l,endIcon:i,current:c,disabled:o=!1,className:p,children:f,...g},v){const{size:y,last:N}=r.useContext(x),w=c??N,k=Boolean(a||s)&&!w&&!o,C=m("inline-flex min-w-0 items-center px-1",d[y],b[y],h,o?"cursor-not-allowed text-(--neba-disabled-fg)":w?"font-medium text-(--neba-fg)":k?m("cursor-pointer text-(--neba-muted-fg)","hover:bg-(--n-soft) hover:text-(--n-accent)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"text-(--neba-muted-fg)"),j=t(n,{children:[u(l)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:l}):null,e("span",{className:"truncate",children:f}),u(i)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:i}):null]});return e("li",{ref:v,className:m("flex min-w-0 items-center",p),...g,children:k&&a?e("a",{href:a,className:C,onClick:s,children:j}):k?e("button",{type:"button",className:C,onClick:s,children:j}):e("span",{className:C,"aria-current":w?"page":void 0,"aria-disabled":o||void 0,children:j})})});
1
+ "use client";import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import{breadcrumbMessages as a,useMessages as s}from"../../internal/i18n.js";import{ArrowRightIcon as l,ChevronIcon as i,EllipsisIcon as c}from"../../internal/icons.js";import{controlTextClasses as o,cx as m,gapClasses as d,hasContent as u,iconClasses as p,radiusClasses as f,transitionClasses as h}from"../../internal/styles.js";const x=/*@__PURE__*/r.createContext({size:"md",last:!1}),g={default:{xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"},compact:{xs:"gap-0.5",sm:"gap-1",md:"gap-1",lg:"gap-1.5",xl:"gap-2"}},b={xs:f.xs,sm:f.xs,md:f.xs,lg:f.sm,xl:f.sm};const v=["chevron","arrow","slash","dot"];function y(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(y).join(""):r.isValidElement(e)?y(e.props.children):""}function N(e,t){if(!t)return e;try{return new URL(e,t).href}catch{return e}}function w(e,t){const n=e.map((e,n)=>{const{href:r,children:a}=e.props;return{"@type":"ListItem",position:n+1,name:y(a),...r?{item:N(r,t)}:null}});return JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:n}).replace(/</g,"\\u003c")}export const Breadcrumb=/*@__PURE__*/r.forwardRef(function({size:n="md",color:d="primary",density:u="default",separator:f="chevron",maxItems:b,itemsBeforeCollapse:y=1,itemsAfterCollapse:N=1,expandable:k=!0,locale:C,label:j,expandLabel:I,structuredData:L=!1,baseUrl:_,className:B,style:z,children:A,...M},S){const E=s(a,C),[R,$]=r.useState(!1),F=r.Children.toArray(A).filter(r.isValidElement),U=F.length,V=F.some(e=>!0===e.props.current),D=!R&&void 0!==b&&U>Math.max(b,1)&&U-y-N>1?[...F.slice(0,Math.max(0,y)),null,...F.slice(U-Math.max(0,N))]:F,H="string"==typeof(J=f)&&v.includes(J)?function(t){switch(t){case"chevron":return e("span",{className:"flex -rotate-90 items-center rtl:rotate-90",children:e(i,{})});case"arrow":return e("span",{className:"flex items-center rtl:rotate-180",children:e(l,{})});case"slash":return e("span",{className:"opacity-70",children:"/"});case"dot":return e("span",{className:"opacity-70",children:"·"});default:return null}}(f):f;var J;const O=m("inline-flex items-center rounded-(--neba-radius-xs) px-0.5","text-(--neba-muted-fg)",h,p,k?m("cursor-pointer hover:bg-(--n-soft) hover:text-(--n-accent)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"");return t("nav",{ref:S,"aria-label":j??E.label,className:m("flex",o[n],p,B),style:{"--n-accent":`var(--neba-${d}-accent)`,"--n-soft":`var(--neba-${d}-soft)`,"--n-ring":`var(--neba-${d}-ring)`,...z},...M,children:[L&&U>0?e("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:w(F,_)}}):null,e("ol",{role:"list",className:m("flex list-none flex-wrap items-center p-0",g[u][n]),children:D.map((a,s)=>t(r.Fragment,{children:[s>0?e("li",{"aria-hidden":"true",className:"flex shrink-0 items-center text-(--neba-muted-fg) select-none",children:H}):null,a?e(x.Provider,{value:{size:n,last:!V&&s===D.length-1},children:a}):e("li",{className:"flex shrink-0 items-center",children:k?e("button",{type:"button",className:O,"aria-label":I??E.expand,onClick:()=>$(!0),children:e(c,{})}):e("span",{className:O,"aria-hidden":"true",children:e(c,{})})})]},a?a.key??s:"fold"))})]})});export const BreadcrumbItem=/*@__PURE__*/r.forwardRef(function({href:a,onClick:s,startIcon:l,endIcon:i,current:c,disabled:o=!1,className:p,children:f,...g},v){const{size:y,last:N}=r.useContext(x),w=c??N,k=Boolean(a||s)&&!w&&!o,C=m("inline-flex min-w-0 items-center px-1",d[y],b[y],h,o?"cursor-not-allowed text-(--neba-disabled-fg)":w?"font-medium text-(--neba-fg)":k?m("cursor-pointer text-(--neba-muted-fg)","hover:bg-(--n-soft) hover:text-(--n-accent)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"text-(--neba-muted-fg)"),j=t(n,{children:[u(l)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:l}):null,e("span",{className:"truncate",children:f}),u(i)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:i}):null]});return e("li",{ref:v,className:m("flex min-w-0 items-center",p),...g,children:k&&a?e("a",{href:a,className:C,onClick:s,children:j}):k?e("button",{type:"button",className:C,onClick:s,children:j}):e("span",{className:C,"aria-current":w?"page":void 0,"aria-disabled":o||void 0,children:j})})});
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{Button as t}from"@base-ui/react/button";import{useRender as a}from"@base-ui/react/use-render";import{ButtonGroupContext as l}from"../../internal/button-group.js";import{controlHeightClasses as s,controlSlots as i,controlSquareClasses as d,controlTextClasses as c,disabledClasses as v,focusRingClasses as p,gapClasses as x,iconClasses as b,paddingXClasses as m,pressTransitionClasses as u,radiusClasses as g,readOnlyFilterClasses as h,surfaceClasses as f,transitionClasses as $}from"../../internal/styles.js";const y={xs:`${s.xs} ${x.xs} ${g.xs} ${c.xs}`,sm:`${s.sm} ${x.sm} ${g.sm} ${c.sm}`,md:`${s.md} ${x.md} ${g.md} ${c.md}`,lg:`${s.lg} ${x.lg} ${g.lg} ${c.lg}`,xl:`${s.xl} ${x.xl} ${g.xl} ${c.xl}`},j={xs:`${d.xs} px-0`,sm:`${d.sm} px-0`,md:`${d.md} px-0`,lg:`${d.lg} px-0`,xl:`${d.xl} px-0`},w=["relative inline-flex shrink-0 select-none items-center justify-center","whitespace-nowrap align-middle font-medium leading-none","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",$,u,p,b].join(" "),k={solid:[f,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[f,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-transparent"},C={solid:["hover:bg-(--n-fill-hover)","hover:[box-shadow:var(--n-elev-hover),var(--neba-plate-solid)]","active:bg-(--n-fill-active)","active:[box-shadow:var(--n-elev-press),var(--neba-plate-solid)]"].join(" "),outline:["hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)]","hover:[box-shadow:var(--n-elev-hover),var(--neba-plate-glass)]","active:bg-(--n-panel-press)","active:[box-shadow:var(--n-elev-press),var(--neba-plate-glass)]"].join(" "),text:"hover:bg-(--n-soft) active:bg-(--n-soft-hover)"},P={solid:[f,h,"cursor-default text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--neba-plate-solid)]"].join(" "),outline:[f,h,"cursor-default border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)] [box-shadow:var(--neba-plate-glass)]"].join(" "),text:`${h} cursor-default text-(--n-accent) bg-transparent`};function B(){return o("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"animate-spin",children:[e("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2"}),e("path",{d:"M14.5 8A6.5 6.5 0 0 0 8 1.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}export const Button=/*@__PURE__*/n.forwardRef(function({variant:s,size:d,color:c,density:p,elevation:x,startIcon:b,endIcon:u,loading:g=!1,readOnly:h=!1,fullWidth:f=!1,disabled:$,render:M,className:N,style:W,children:z,onClick:E,onPointerMove:I,...O},A){const D=n.useContext(l),F=s??D?.variant??"solid",L=d??D?.size??"md",R=c??D?.color??"primary",T=p??D?.density??"default",X=x??D?.elevation??0,Y=$??D?.disabled??!1,q=null==z||!1===z,G=g||h,H=[w,y[L],q?j[L]:m[T][L],Y?v[F]:h?P[F]:k[F],Y||G?"":[C[F],"neba-glow","cursor-pointer"].join(" "),g?"cursor-progress":"",f?"w-full":"",N??""].filter(Boolean).join(" ");return a({render:M??e(t,{disabled:Y}),ref:A,props:{className:H,style:{...i(R,X,F),...W},"aria-disabled":G||void 0,"aria-busy":g||void 0,"data-loading":g||void 0,"data-readonly":h||void 0,onClick:e=>{if(G)return e.preventDefault(),void e.stopPropagation();E?.(e)},onPointerMove:e=>{const o=e.currentTarget;o.style.setProperty("--n-mx",`${e.nativeEvent.offsetX}px`),o.style.setProperty("--n-my",`${e.nativeEvent.offsetY}px`),I?.(e)},...O,children:o(r,{children:[g?e(B,{}):b,z,u]})}})});
1
+ "use client";import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{Button as t}from"@base-ui/react/button";import{useRender as a}from"@base-ui/react/use-render";import{ButtonGroupContext as l}from"../../internal/button-group.js";import{controlHeightClasses as s,controlSlots as i,controlSquareClasses as d,controlTextClasses as c,cx as v,disabledClasses as p,focusRingClasses as x,gapClasses as b,iconClasses as u,paddingXClasses as m,pressTransitionClasses as g,radiusClasses as h,readOnlyFilterClasses as f,surfaceClasses as $,transitionClasses as y}from"../../internal/styles.js";const w={xs:`${s.xs} ${b.xs} ${h.xs} ${c.xs}`,sm:`${s.sm} ${b.sm} ${h.sm} ${c.sm}`,md:`${s.md} ${b.md} ${h.md} ${c.md}`,lg:`${s.lg} ${b.lg} ${h.lg} ${c.lg}`,xl:`${s.xl} ${b.xl} ${h.xl} ${c.xl}`},j={xs:`${d.xs} px-0`,sm:`${d.sm} px-0`,md:`${d.md} px-0`,lg:`${d.lg} px-0`,xl:`${d.xl} px-0`},k=["relative inline-flex shrink-0 select-none items-center justify-center","whitespace-nowrap align-middle font-medium leading-none","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",y,g,x,u].join(" "),C={solid:[$,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[$,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-transparent"},P={solid:["hover:bg-(--n-fill-hover)","hover:[box-shadow:var(--n-elev-hover),var(--neba-plate-solid)]","active:bg-(--n-fill-active)","active:[box-shadow:var(--n-elev-press),var(--neba-plate-solid)]"].join(" "),outline:["hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)]","hover:[box-shadow:var(--n-elev-hover),var(--neba-plate-glass)]","active:bg-(--n-panel-press)","active:[box-shadow:var(--n-elev-press),var(--neba-plate-glass)]"].join(" "),text:"hover:bg-(--n-soft) active:bg-(--n-soft-hover)"},B={solid:[$,f,"cursor-default text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--neba-plate-solid)]"].join(" "),outline:[$,f,"cursor-default border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)] [box-shadow:var(--neba-plate-glass)]"].join(" "),text:`${f} cursor-default text-(--n-accent) bg-transparent`};function M(){return o("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"animate-spin",children:[e("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2"}),e("path",{d:"M14.5 8A6.5 6.5 0 0 0 8 1.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}export const Button=/*@__PURE__*/n.forwardRef(function({variant:s,size:d,color:c,density:x,elevation:b,startIcon:u,endIcon:g,loading:h=!1,readOnly:f=!1,fullWidth:$=!1,disabled:y,render:N,className:W,style:z,children:E,onClick:I,onPointerMove:O,...A},D){const F=n.useContext(l),L=s??F?.variant??"solid",R=d??F?.size??"md",T=c??F?.color??"primary",X=x??F?.density??"default",Y=b??F?.elevation??0,q=y??F?.disabled??!1,G=h||f,H=v(k,w[R],null==E||!1===E?j[R]:m[X][R],q?p[L]:f?B[L]:C[L],q||G?"":[P[L],"neba-glow","cursor-pointer"].join(" "),h?"cursor-progress":"",$?"w-full":"",W??"");return a({render:N??e(t,{disabled:q}),ref:D,props:{className:H,style:{...i(T,Y,L),...z},"aria-disabled":G||void 0,"aria-busy":h||void 0,"data-loading":h||void 0,"data-readonly":f||void 0,onClick:e=>{if(G)return e.preventDefault(),void e.stopPropagation();I?.(e)},onPointerMove:e=>{if(!q&&!G){const o=e.currentTarget;o.style.setProperty("--n-mx",`${e.nativeEvent.offsetX}px`),o.style.setProperty("--n-my",`${e.nativeEvent.offsetY}px`)}O?.(e)},...A,children:o(r,{children:[h?e(M,{}):u,E,g]})}})});