neba 1.8.1 → 1.10.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 (196) hide show
  1. package/README.md +7 -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-marquee/AnimateMarquee.js +1 -1
  9. package/dist/components/app-logo/AppLogo.js +1 -1
  10. package/dist/components/aspect-ratio/AspectRatio.js +1 -1
  11. package/dist/components/avatar/Avatar.js +1 -1
  12. package/dist/components/avatar-group/AvatarGroup.d.ts +47 -0
  13. package/dist/components/avatar-group/AvatarGroup.js +1 -0
  14. package/dist/components/avatar-group/index.d.ts +2 -0
  15. package/dist/components/avatar-group/index.js +1 -0
  16. package/dist/components/badge/Badge.js +1 -1
  17. package/dist/components/blockquote/Blockquote.js +1 -1
  18. package/dist/components/box/Box.js +1 -1
  19. package/dist/components/button/Button.js +1 -1
  20. package/dist/components/button-group/ButtonGroup.js +1 -1
  21. package/dist/components/card/Card.js +1 -1
  22. package/dist/components/carousel/Carousel.js +1 -1
  23. package/dist/components/chat-bubble/ChatBubble.js +1 -1
  24. package/dist/components/checkbox/Checkbox.d.ts +13 -1
  25. package/dist/components/checkbox/Checkbox.js +1 -1
  26. package/dist/components/combobox/Combobox.d.ts +17 -2
  27. package/dist/components/combobox/Combobox.js +1 -1
  28. package/dist/components/command-palette/CommandPalette.d.ts +105 -0
  29. package/dist/components/command-palette/CommandPalette.js +1 -0
  30. package/dist/components/command-palette/index.d.ts +2 -0
  31. package/dist/components/command-palette/index.js +1 -0
  32. package/dist/components/container/Container.js +1 -1
  33. package/dist/components/data-list/DataList.d.ts +55 -0
  34. package/dist/components/data-list/DataList.js +1 -0
  35. package/dist/components/data-list/index.d.ts +2 -0
  36. package/dist/components/data-list/index.js +1 -0
  37. package/dist/components/data-table/DataTable.js +1 -1
  38. package/dist/components/dialog/Dialog.d.ts +19 -2
  39. package/dist/components/dialog/Dialog.js +1 -1
  40. package/dist/components/divider/Divider.js +1 -1
  41. package/dist/components/drawer/Drawer.js +1 -1
  42. package/dist/components/empty/Empty.js +1 -1
  43. package/dist/components/fieldset/Fieldset.d.ts +33 -0
  44. package/dist/components/fieldset/Fieldset.js +1 -0
  45. package/dist/components/fieldset/index.d.ts +2 -0
  46. package/dist/components/fieldset/index.js +1 -0
  47. package/dist/components/file-picker/FilePicker.js +1 -1
  48. package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
  49. package/dist/components/form/Form.d.ts +58 -0
  50. package/dist/components/form/Form.js +1 -0
  51. package/dist/components/form/index.d.ts +2 -0
  52. package/dist/components/form/index.js +1 -0
  53. package/dist/components/gauge-chart/GaugeChart.d.ts +62 -0
  54. package/dist/components/gauge-chart/GaugeChart.js +1 -0
  55. package/dist/components/gauge-chart/index.d.ts +2 -0
  56. package/dist/components/gauge-chart/index.js +1 -0
  57. package/dist/components/grid/Grid.js +1 -1
  58. package/dist/components/grid-container/GridContainer.js +1 -1
  59. package/dist/components/heatmap-chart/HeatmapChart.js +1 -1
  60. package/dist/components/highlight/Highlight.js +1 -1
  61. package/dist/components/hover-card/HoverCard.d.ts +78 -0
  62. package/dist/components/hover-card/HoverCard.js +1 -0
  63. package/dist/components/hover-card/index.d.ts +2 -0
  64. package/dist/components/hover-card/index.js +1 -0
  65. package/dist/components/how-to-steps/HowToSteps.d.ts +11 -25
  66. package/dist/components/how-to-steps/HowToSteps.js +1 -1
  67. package/dist/components/icon/Icon.js +1 -1
  68. package/dist/components/list/List.js +1 -1
  69. package/dist/components/menu/Menu.d.ts +16 -4
  70. package/dist/components/menu/Menu.js +1 -1
  71. package/dist/components/menubar/Menubar.d.ts +56 -0
  72. package/dist/components/menubar/Menubar.js +1 -0
  73. package/dist/components/menubar/index.d.ts +2 -0
  74. package/dist/components/menubar/index.js +1 -0
  75. package/dist/components/meter/Meter.d.ts +52 -0
  76. package/dist/components/meter/Meter.js +1 -0
  77. package/dist/components/meter/index.d.ts +2 -0
  78. package/dist/components/meter/index.js +1 -0
  79. package/dist/components/mockup/Mockup.js +1 -1
  80. package/dist/components/navigation-menu/NavigationMenu.d.ts +100 -0
  81. package/dist/components/navigation-menu/NavigationMenu.js +1 -0
  82. package/dist/components/navigation-menu/index.d.ts +2 -0
  83. package/dist/components/navigation-menu/index.js +1 -0
  84. package/dist/components/number-field/NumberField.d.ts +17 -2
  85. package/dist/components/number-field/NumberField.js +1 -1
  86. package/dist/components/otp-field/OtpField.js +1 -1
  87. package/dist/components/overlay/Overlay.js +1 -1
  88. package/dist/components/page-layout/PageLayout.js +1 -1
  89. package/dist/components/pagination/Pagination.js +1 -1
  90. package/dist/components/panes/Panes.js +1 -1
  91. package/dist/components/pie-chart/PieChart.js +1 -1
  92. package/dist/components/pill/Pill.js +1 -1
  93. package/dist/components/popover/Popover.js +1 -1
  94. package/dist/components/progress-box/ProgressBox.js +1 -1
  95. package/dist/components/progress-circular/ProgressCircular.js +1 -1
  96. package/dist/components/progress-linear/ProgressLinear.js +1 -1
  97. package/dist/components/radio-group/RadioGroup.d.ts +22 -1
  98. package/dist/components/radio-group/RadioGroup.js +1 -1
  99. package/dist/components/rating/Rating.js +1 -1
  100. package/dist/components/scroll-area/ScrollArea.d.ts +50 -0
  101. package/dist/components/scroll-area/ScrollArea.js +1 -0
  102. package/dist/components/scroll-area/index.d.ts +2 -0
  103. package/dist/components/scroll-area/index.js +1 -0
  104. package/dist/components/scroll-zone/ScrollZone.d.ts +35 -17
  105. package/dist/components/scroll-zone/ScrollZone.js +1 -1
  106. package/dist/components/segmented-button/SegmentedButton.js +1 -1
  107. package/dist/components/select/Select.d.ts +16 -1
  108. package/dist/components/select/Select.js +1 -1
  109. package/dist/components/shortcut/Shortcut.js +1 -1
  110. package/dist/components/sidebar/Sidebar.js +1 -1
  111. package/dist/components/skeleton/Skeleton.js +1 -1
  112. package/dist/components/slider/Slider.js +1 -1
  113. package/dist/components/spoiler/Spoiler.js +1 -1
  114. package/dist/components/statistic/Statistic.js +1 -1
  115. package/dist/components/switch/Switch.d.ts +13 -1
  116. package/dist/components/switch/Switch.js +1 -1
  117. package/dist/components/table/Table.d.ts +21 -2
  118. package/dist/components/table/Table.js +1 -1
  119. package/dist/components/tabs/Tabs.js +1 -1
  120. package/dist/components/text-field/TextField.d.ts +16 -1
  121. package/dist/components/text-field/TextField.js +1 -1
  122. package/dist/components/text-link/TextLink.js +1 -1
  123. package/dist/components/toast/Toast.d.ts +17 -2
  124. package/dist/components/toast/Toast.js +1 -1
  125. package/dist/components/toggle/Toggle.d.ts +53 -0
  126. package/dist/components/toggle/Toggle.js +1 -0
  127. package/dist/components/toggle/index.d.ts +2 -0
  128. package/dist/components/toggle/index.js +1 -0
  129. package/dist/components/toggle-group/ToggleGroup.d.ts +51 -0
  130. package/dist/components/toggle-group/ToggleGroup.js +1 -0
  131. package/dist/components/toggle-group/index.d.ts +2 -0
  132. package/dist/components/toggle-group/index.js +1 -0
  133. package/dist/components/toolbar/Toolbar.js +1 -1
  134. package/dist/components/tooltip/Tooltip.js +1 -1
  135. package/dist/components/tour/Tour.d.ts +97 -0
  136. package/dist/components/tour/Tour.js +1 -0
  137. package/dist/components/tour/index.d.ts +2 -0
  138. package/dist/components/tour/index.js +1 -0
  139. package/dist/components/transfer/Transfer.d.ts +52 -0
  140. package/dist/components/transfer/Transfer.js +1 -0
  141. package/dist/components/transfer/index.d.ts +2 -0
  142. package/dist/components/transfer/index.js +1 -0
  143. package/dist/components/tree-view/TreeView.js +1 -1
  144. package/dist/components/typography/Typography.js +1 -1
  145. package/dist/components/window-pane/WindowPane.js +1 -1
  146. package/dist/index.d.ts +16 -0
  147. package/dist/index.js +1 -1
  148. package/dist/internal/animate.d.ts +7 -1
  149. package/dist/internal/animate.js +1 -1
  150. package/dist/internal/avatar-group.d.ts +22 -0
  151. package/dist/internal/avatar-group.js +1 -0
  152. package/dist/internal/button-group.d.ts +6 -2
  153. package/dist/internal/chart-frame.d.ts +18 -1
  154. package/dist/internal/chart-frame.js +1 -1
  155. package/dist/internal/data-table.d.ts +0 -14
  156. package/dist/internal/data-table.js +1 -1
  157. package/dist/internal/drag.d.ts +62 -0
  158. package/dist/internal/drag.js +1 -0
  159. package/dist/internal/highlight.js +1 -1
  160. package/dist/internal/i18n.d.ts +82 -0
  161. package/dist/internal/i18n.js +1 -1
  162. package/dist/internal/link.d.ts +19 -0
  163. package/dist/internal/link.js +1 -0
  164. package/dist/internal/media.d.ts +29 -0
  165. package/dist/internal/media.js +1 -0
  166. package/dist/internal/observe.d.ts +42 -0
  167. package/dist/internal/observe.js +1 -0
  168. package/dist/internal/page-layout.js +1 -1
  169. package/dist/internal/picker.js +1 -1
  170. package/dist/internal/progress.d.ts +5 -0
  171. package/dist/internal/search.d.ts +33 -0
  172. package/dist/internal/search.js +1 -0
  173. package/dist/internal/styles.d.ts +39 -0
  174. package/dist/internal/styles.js +1 -1
  175. package/dist/locales/ar.js +1 -1
  176. package/dist/locales/de.js +1 -1
  177. package/dist/locales/es.js +1 -1
  178. package/dist/locales/fr.js +1 -1
  179. package/dist/locales/hi.js +1 -1
  180. package/dist/locales/id.js +1 -1
  181. package/dist/locales/it.js +1 -1
  182. package/dist/locales/ja.js +1 -1
  183. package/dist/locales/ko.js +1 -1
  184. package/dist/locales/nl.js +1 -1
  185. package/dist/locales/pl.js +1 -1
  186. package/dist/locales/pt.js +1 -1
  187. package/dist/locales/ru.js +1 -1
  188. package/dist/locales/th.js +1 -1
  189. package/dist/locales/tr.js +1 -1
  190. package/dist/locales/vi.js +1 -1
  191. package/dist/locales/zh-hans.js +1 -1
  192. package/dist/locales/zh-hant.js +1 -1
  193. package/dist/styles.css +1 -1
  194. package/dist/tailwind.css +104 -0
  195. package/dist/types.d.ts +55 -0
  196. package/package.json +2 -2
package/README.md CHANGED
@@ -146,21 +146,21 @@ Placement props are logical, not physical — `start`/`end` rather than `left`/`
146
146
 
147
147
  ### Components
148
148
 
149
- **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
150
150
 
151
- **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
152
152
 
153
- **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
154
154
 
155
- **Charts** — Statistic, Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart
155
+ **Charts** — Statistic, Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart, GaugeChart
156
156
 
157
- **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
158
158
 
159
- **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
160
160
 
161
161
  **Transitions** — AnimateFade, AnimateGrow, AnimateZoom, AnimateSlide, AnimateRotate, AnimateBlink, AnimateAppear, AnimateTyping, AnimateLighting, AnimateMarquee, AnimateHeadline
162
162
 
163
- **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
164
164
 
165
165
  Each one has its own page — live previews, every prop, and the variations worth seeing — under [**All components**](https://neba.cdget.com/components/).
166
166
 
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{Accordion as t}from"@base-ui/react/accordion";import{boxPaddingXClasses as l,boxPaddingYClasses as i}from"../box/Box.js";import{ChevronIcon as r}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:i="primary",density:r="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:r,dividers:u}),[l,r,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(i,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=i[$][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(r,{})})]}),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
- "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,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
- "use client";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
- "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: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
- "use client";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
- "use client";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
- "use client";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 l,surfaceClasses as a,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"},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%]"},f={solid:[a,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[a,"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:a="md",color:h="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,f[n],G?d[a]:[r[a],b[a],x[v][a]].join(" "),D?`absolute ${g[B]}`:"relative align-middle",D?G?c[a].dot:c[a].badge:"",D&&"circle"===$?u[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(h,w,n),...R},"aria-hidden":!!H||void 0,...A,children:H?null:m(t,{children:[G||q?e("span",{className:l,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
- "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{hasContent as l,metaTextClasses as s,radiusClasses as o,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?"":`${o[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)",s[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
- "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{radiusClasses as o,surfaceClasses as t,surfaceSlots as n,transitionClasses as l}from"../../internal/styles.js";const p=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",l].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:l="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,p[o],i?boxPaddingClasses[l][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
- "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,disabledClasses as v,focusRingClasses as p,gapClasses as x,iconClasses as b,paddingXClasses as u,pressTransitionClasses as m,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]",$,m,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:m,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]:u[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,m]})}})});
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]})}})});
@@ -1 +1 @@
1
- "use client";import{jsx as o}from"react/jsx-runtime";import*as e from"react";import{ButtonGroupContext as i}from"../../internal/button-group.js";const n={horizontal:"[&>*:not(:first-child)]:rounded-s-none [&>*:not(:last-child)]:rounded-e-none",vertical:"[&>*:not(:first-child)]:rounded-t-none [&>*:not(:last-child)]:rounded-b-none"},t={horizontal:"[&>*:not(:first-child)]:-ms-px",vertical:"[&>*:not(:first-child)]:-mt-px"},r=["inline-flex align-middle","[&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10","[&>*]:shrink-0"].join(" ");export const ButtonGroup=/*@__PURE__*/e.forwardRef(function({variant:l,size:s,color:a,density:d,elevation:c,orientation:f="horizontal",disabled:u,fullWidth:h=!1,className:m,children:v,...x},p){const z=e.useMemo(()=>({variant:l,size:s,color:a,density:d,elevation:c,disabled:u}),[l,s,a,d,c,u]);return o(i.Provider,{value:z,children:o("div",{ref:p,role:"group",className:[r,"vertical"===f?"flex-col":"flex-row",n[f],"outline"===(l??"solid")?t[f]:"",h?"flex w-full [&>*]:flex-1":"",m??""].filter(Boolean).join(" "),...x,children:v})})});
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as o from"react";import{ButtonGroupContext as i}from"../../internal/button-group.js";import{cx as n}from"../../internal/styles.js";const t={horizontal:"[&>*:not(:first-child)]:rounded-s-none [&>*:not(:last-child)]:rounded-e-none",vertical:"[&>*:not(:first-child)]:rounded-t-none [&>*:not(:last-child)]:rounded-b-none"},r={horizontal:"[&>*:not(:first-child)]:-ms-px",vertical:"[&>*:not(:first-child)]:-mt-px"},l=["inline-flex align-middle","[&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10","[&>*]:shrink-0"].join(" ");export const ButtonGroup=/*@__PURE__*/o.forwardRef(function({variant:s,size:a,color:d,density:c,elevation:f,orientation:u="horizontal",disabled:h,fullWidth:m=!1,className:v,children:p,...x},z){const b=o.useMemo(()=>({variant:s,size:a,color:d,density:c,elevation:f,disabled:h}),[s,a,d,c,f,h]);return e(i.Provider,{value:b,children:e("div",{ref:z,role:"group",className:n(l,"vertical"===u?"flex-col":"flex-row",t[u],"outline"===(s??"solid")?r[u]:"",m?"flex w-full [&>*]:flex-1":"",v??""),...x,children:p})})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import*as n from"react";import{Box as s,boxPaddingXClasses as a,boxPaddingYClasses as r}from"../box/Box.js";import{hasContent as i,metaTextClasses as o,sheetBodyClasses as c,sheetHeaderGapClasses as d,sheetSectionGapClasses as m,sheetTitleClasses as f}from"../../internal/styles.js";export const Card=/*@__PURE__*/n.forwardRef(function({size:n="md",density:u="default",title:x,subtitle:h,headerAction:N,footer:p,dividers:$=!1,className:b,children:j,...v},y){const k=a[u][n],g=r[u][n],w=$?`${k} ${g}`:k,B=i(x)||i(h)||i(N),z=l(t,{children:[i(x)||i(h)?l("div",{className:`flex min-w-0 flex-1 flex-col ${d[n]}`,children:[i(x)?e("div",{className:`neba-title font-semibold ${f[n]}`,children:x}):null,i(h)?e("div",{className:`text-(--neba-muted-fg) ${o[n]}`,children:h}):null]}):null,i(N)?e("div",{className:"ml-auto shrink-0",children:N}):null]}),A=[B?{key:"header",className:"flex items-start gap-3",content:z}:null,i(j)?{key:"content",className:c[n],content:j}:null,i(p)?{key:"footer",className:`flex flex-wrap items-center gap-2 ${c[n]}`,content:p}:null].filter(e=>null!==e);return e(s,{ref:y,size:n,density:u,padded:!1,className:["flex flex-col",$?"":`${g} ${m[n]}`,b??""].filter(Boolean).join(" "),...v,children:A.map((l,t)=>e("div",{className:[w,l.className,$&&t>0?"border-t [border-color:var(--n-line)]":""].filter(Boolean).join(" "),children:l.content},l.key))})});
1
+ "use client";import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import*as s from"react";import{Box as n,boxPaddingXClasses as a,boxPaddingYClasses as r}from"../box/Box.js";import{cx as i,hasContent as c,metaTextClasses as o,sheetBodyClasses as d,sheetHeaderGapClasses as m,sheetSectionGapClasses as f,sheetTitleClasses as u}from"../../internal/styles.js";export const Card=/*@__PURE__*/s.forwardRef(function({size:s="md",density:x="default",title:h,subtitle:N,headerAction:p,footer:$,dividers:b=!1,className:v,children:y,...j},k){const g=a[x][s],w=r[x][s],z=b?`${g} ${w}`:g,A=c(h)||c(N)||c(p),B=l(t,{children:[c(h)||c(N)?l("div",{className:`flex min-w-0 flex-1 flex-col ${m[s]}`,children:[c(h)?e("div",{className:`neba-title font-semibold ${u[s]}`,children:h}):null,c(N)?e("div",{className:`text-(--neba-muted-fg) ${o[s]}`,children:N}):null]}):null,c(p)?e("div",{className:"ml-auto shrink-0",children:p}):null]}),C=[A?{key:"header",className:"flex items-start gap-3",content:B}:null,c(y)?{key:"content",className:d[s],content:y}:null,c($)?{key:"footer",className:`flex flex-wrap items-center gap-2 ${d[s]}`,content:$}:null].filter(e=>null!==e);return e(n,{ref:k,size:s,density:x,padded:!1,className:i("flex flex-col",b?"":`${w} ${f[s]}`,v??""),...j,children:C.map((l,t)=>e("div",{className:i(z,l.className,b&&t>0?"border-t [border-color:var(--n-line)]":""),children:l.content},l.key))})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{IconButton as n}from"../icon-button/IconButton.js";import{carouselMessages as a,fillMessage as o,useMessages as i}from"../../internal/i18n.js";import{ChevronIcon as l}from"../../internal/icons.js";import{radiusClasses as s,srOnlyClasses as c,surfaceClasses as u,surfaceSlots as d,transitionClasses as f}from"../../internal/styles.js";const m={solid:[u,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[u,"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"},p={xs:"start-1 end-1",sm:"start-1.5 end-1.5",md:"start-2 end-2",lg:"start-3 end-3",xl:"start-4 end-4"},b={xs:{rest:"h-1 w-1",current:"h-1 w-3",gap:"gap-1"},sm:{rest:"h-1 w-1",current:"h-1 w-3.5",gap:"gap-1"},md:{rest:"h-1.5 w-1.5",current:"h-1.5 w-4",gap:"gap-1.5"},lg:{rest:"h-1.5 w-1.5",current:"h-1.5 w-5",gap:"gap-2"},xl:{rest:"h-2 w-2",current:"h-2 w-6",gap:"gap-2"}};export const Carousel=/*@__PURE__*/t.forwardRef(function({variant:u="outline",size:v="md",color:h="primary",density:g="default",elevation:w=0,value:x,defaultValue:j=0,onValueChange:y,loop:N=!0,autoPlay:k=!1,interval:M=5e3,arrows:C=!0,indicators:R=!0,locale:I,label:L,previousLabel:S,nextLabel:$,slideLabel:_,className:z,style:B,children:E,...P},V){const T=i(a,I),W=_??((e,r)=>o(T.slide,{index:String(e),total:String(r)})),A=t.Children.toArray(E),F=A.length,[q,D]=t.useState(j),G=Math.min(Math.max(x??q,0),Math.max(F-1,0)),H=t.useRef(null),J=t.useRef([]),K=t.useRef(!1),O=t.useRef(!1),Q=t.useRef(!1),[U,X]=t.useState(!1),Y=t.useCallback((e,r=!1)=>{if(0===F)return;const t=N?(e%F+F)%F:Math.min(Math.max(e,0),F-1);K.current=r,void 0===x&&D(t),t!==G&&y?.(t)},[F,N,x,G,y]);t.useEffect(()=>{if(K.current)return void(K.current=!1);if(!O.current)return void(O.current=!0);J.current[G]?.scrollIntoView({block:"nearest",inline:"start"}),Q.current=!0;const e=window.setTimeout(()=>{Q.current=!1},700);return()=>window.clearTimeout(e)},[G]);t.useEffect(()=>{if(!k||U||F<2)return;if(window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;const e=window.setInterval(()=>{document.hidden||Y(G+1)},M);return()=>window.clearInterval(e)},[k,U,F,M,G,Y]);const Z=G<=0,ee=G>=F-1;return r("div",{ref:V,role:"region","aria-roledescription":"carousel","aria-label":L??T.label,className:["flex flex-col",z??""].filter(Boolean).join(" "),style:{...d(h,w),...B},onPointerEnter:()=>X(!0),onPointerLeave:()=>X(!1),onFocus:()=>X(!0),onBlur:()=>X(!1),...P,children:[r("div",{className:["relative min-w-0 overflow-hidden",s[v],m[u],f].join(" "),children:[e("div",{ref:H,tabIndex:0,role:"group","aria-label":L??T.label,className:["flex min-w-0 snap-x snap-mandatory overflow-x-auto scroll-smooth","motion-reduce:scroll-auto","[scrollbar-width:none] [&::-webkit-scrollbar]:hidden","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]"].join(" "),onScroll:()=>{const e=H.current;if(Q.current||!e||0===e.clientWidth)return;const r=Math.round(Math.abs(e.scrollLeft)/e.clientWidth);r!==G&&r>=0&&r<F&&Y(r,!0)},children:A.map((r,t)=>e("div",{ref:e=>{J.current[t]=e},role:"group","aria-roledescription":"slide","aria-label":W(t+1,F),className:"w-full shrink-0 grow-0 basis-full snap-start",children:r},t))}),C&&F>1?r("div",{className:`pointer-events-none absolute inset-y-0 flex items-center ${p[v]}`,children:[e(n,{variant:"solid",size:v,color:h,density:g,elevation:1,label:S??T.previous,disabled:!N&&Z,className:"pointer-events-auto",icon:e("span",{className:"flex items-center rotate-90 rtl:-rotate-90",children:e(l,{})}),onClick:()=>Y(G-1)}),e("span",{className:"flex-1"}),e(n,{variant:"solid",size:v,color:h,density:g,elevation:1,label:$??T.next,disabled:!N&&ee,className:"pointer-events-auto",icon:e("span",{className:"flex items-center -rotate-90 rtl:rotate-90",children:e(l,{})}),onClick:()=>Y(G+1)})]}):null]}),R&&F>1?e("div",{className:`flex shrink-0 items-center justify-center pt-2 ${b[v].gap}`,children:A.map((r,t)=>e("button",{type:"button","aria-label":W(t+1,F),"aria-current":t===G?"true":void 0,className:["cursor-pointer rounded-full","[transition-property:width,background-color]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2",t===G?`${b[v].current} bg-(--n-accent)`:`${b[v].rest} bg-(--n-line-hover) hover:bg-(--n-accent)`].join(" "),onClick:()=>Y(t)},t))}):null,e("span",{className:c,"aria-live":k?"off":"polite",children:F>0?W(G+1,F):""})]})});
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{IconButton as n}from"../icon-button/IconButton.js";import{carouselMessages as a,fillMessage as o,useMessages as l}from"../../internal/i18n.js";import{ChevronIcon as i}from"../../internal/icons.js";import{usePrefersReducedMotion as s}from"../../internal/media.js";import{cx as c,radiusClasses as u,srOnlyClasses as d,surfaceClasses as f,surfaceSlots as m,transitionClasses as p}from"../../internal/styles.js";const b={solid:[f,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[f,"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"},v={xs:"start-1 end-1",sm:"start-1.5 end-1.5",md:"start-2 end-2",lg:"start-3 end-3",xl:"start-4 end-4"},h={xs:{rest:"h-1 w-1",current:"h-1 w-3",gap:"gap-1"},sm:{rest:"h-1 w-1",current:"h-1 w-3.5",gap:"gap-1"},md:{rest:"h-1.5 w-1.5",current:"h-1.5 w-4",gap:"gap-1.5"},lg:{rest:"h-1.5 w-1.5",current:"h-1.5 w-5",gap:"gap-2"},xl:{rest:"h-2 w-2",current:"h-2 w-6",gap:"gap-2"}};export const Carousel=/*@__PURE__*/t.forwardRef(function({variant:f="outline",size:g="md",color:x="primary",density:w="default",elevation:j=0,value:y,defaultValue:N=0,onValueChange:k,loop:C=!0,autoPlay:M=!1,interval:R=5e3,arrows:I=!0,indicators:L=!0,locale:S,label:$,previousLabel:_,nextLabel:z,slideLabel:E,className:P,style:V,children:B,...T},W){const A=l(a,S),F=E??((e,r)=>o(A.slide,{index:String(e),total:String(r)})),q=t.Children.toArray(B),D=q.length,[G,H]=t.useState(N),J=Math.min(Math.max(y??G,0),Math.max(D-1,0)),K=t.useRef(null),O=t.useRef([]),Q=t.useRef(!1),U=t.useRef(!1),X=t.useRef(!1),[Y,Z]=t.useState(!1),ee=t.useCallback((e,r=!1)=>{if(0===D)return;const t=C?(e%D+D)%D:Math.min(Math.max(e,0),D-1);Q.current=r,void 0===y&&H(t),t!==J&&k?.(t)},[D,C,y,J,k]);t.useEffect(()=>{if(Q.current)return void(Q.current=!1);if(!U.current)return void(U.current=!0);O.current[J]?.scrollIntoView({block:"nearest",inline:"start"}),X.current=!0;const e=window.setTimeout(()=>{X.current=!1},700);return()=>window.clearTimeout(e)},[J]);const re=s();t.useEffect(()=>{if(!M||Y||re||D<2)return;const e=window.setInterval(()=>{document.hidden||ee(J+1)},R);return()=>window.clearInterval(e)},[M,Y,re,D,R,J,ee]);const te=J<=0,ne=J>=D-1;return r("div",{ref:W,role:"region","aria-roledescription":"carousel","aria-label":$??A.label,className:c("flex flex-col",P??""),style:{...m(x,j),...V},onPointerEnter:()=>Z(!0),onPointerLeave:()=>Z(!1),onFocus:()=>Z(!0),onBlur:()=>Z(!1),...T,children:[r("div",{className:["relative min-w-0 overflow-hidden",u[g],b[f],p].join(" "),children:[e("div",{ref:K,tabIndex:0,role:"group","aria-label":$??A.label,className:["flex min-w-0 snap-x snap-mandatory overflow-x-auto scroll-smooth","motion-reduce:scroll-auto","[scrollbar-width:none] [&::-webkit-scrollbar]:hidden","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]"].join(" "),onScroll:()=>{const e=K.current;if(X.current||!e||0===e.clientWidth)return;const r=Math.round(Math.abs(e.scrollLeft)/e.clientWidth);r!==J&&r>=0&&r<D&&ee(r,!0)},children:q.map((r,t)=>e("div",{ref:e=>{O.current[t]=e},role:"group","aria-roledescription":"slide","aria-label":F(t+1,D),className:"w-full shrink-0 grow-0 basis-full snap-start",children:r},t))}),I&&D>1?r("div",{className:`pointer-events-none absolute inset-y-0 flex items-center ${v[g]}`,children:[e(n,{variant:"solid",size:g,color:x,density:w,elevation:1,label:_??A.previous,disabled:!C&&te,className:"pointer-events-auto",icon:e("span",{className:"flex items-center rotate-90 rtl:-rotate-90",children:e(i,{})}),onClick:()=>ee(J-1)}),e("span",{className:"flex-1"}),e(n,{variant:"solid",size:g,color:x,density:w,elevation:1,label:z??A.next,disabled:!C&&ne,className:"pointer-events-auto",icon:e("span",{className:"flex items-center -rotate-90 rtl:rotate-90",children:e(i,{})}),onClick:()=>ee(J+1)})]}):null]}),L&&D>1?e("div",{className:`flex shrink-0 items-center justify-center pt-2 ${h[g].gap}`,children:q.map((r,t)=>e("button",{type:"button","aria-label":F(t+1,D),"aria-current":t===J?"true":void 0,className:["cursor-pointer rounded-full","[transition-property:width,background-color]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2",t===J?`${h[g].current} bg-(--n-accent)`:`${h[g].rest} bg-(--n-line-hover) hover:bg-(--n-accent)`].join(" "),onClick:()=>ee(t)},t))}):null,e("span",{className:d,"aria-live":M?"off":"polite",children:D>0?F(J+1,D):""})]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as r from"react";import{chatMessages as a,useMessages as l}from"../../internal/i18n.js";import{CheckIcon as i,ClockIcon as t,DangerIcon as s,LinkIcon as o}from"../../internal/icons.js";import{controlSlots as c,hasContent as d,metaTextClasses as m,radiusClasses as p,sheetBodyClasses as u,sheetHeaderGapClasses as b,srOnlyClasses as f,surfaceClasses as v,transitionClasses as x}from"../../internal/styles.js";const h={default:{xs:"px-2 py-1",sm:"px-2.5 py-1.5",md:"px-3 py-2",lg:"px-3.5 py-2.5",xl:"px-4 py-3"},compact:{xs:"px-1.5 py-0.5",sm:"px-2 py-1",md:"px-2.5 py-1.5",lg:"px-3 py-1.5",xl:"px-3.5 py-2"}},g={start:"[border-start-start-radius:0.25rem]",end:"[border-start-end-radius:0.25rem]"},y={solid:[v,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[v,"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) [box-shadow:var(--n-elev)]"};function w(){return n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e("path",{d:"m1.5 8.5 2.75 2.75L9.5 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M7 10.75 8.25 12l5.25-5.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}const N={sending:e(t,{}),sent:e(i,{}),delivered:e(w,{}),read:e(w,{}),failed:e(s,{})},k={sending:"text-(--neba-muted-fg)",sent:"text-(--neba-muted-fg)",delivered:"text-(--neba-muted-fg)",read:"text-(--n-accent)",failed:"text-(--neba-danger-accent)"},_=["block overflow-hidden rounded-(--neba-radius-sm) border no-underline","[border-color:color-mix(in_oklab,currentColor_18%,transparent)]","[background-color:color-mix(in_oklab,currentColor_7%,transparent)]","hover:[background-color:color-mix(in_oklab,currentColor_12%,transparent)]","[transition-property:background-color] [transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),j=["shrink-0 opacity-0","[transition:opacity_var(--neba-duration)_var(--neba-ease)]","group-hover/bubble:opacity-100 group-focus-within/bubble:opacity-100","[@media(hover:none)]:opacity-100"].join(" ");export const ChatBubble=/*@__PURE__*/r.forwardRef(function({side:r="start",name:i,time:t,avatar:s,status:o,statusLabel:v,typing:w=!1,media:_,preview:z,actions:B,locale:W,variant:M="outline",size:R="md",color:T="primary",density:$="default",elevation:q=0,className:A,style:D,children:E,...F},G){const H=l(a,W),I="end"===r,J=d(i)||d(t),K=w||d(E)||Boolean(z),O=["flex min-w-0 flex-col overflow-hidden",p[R],g[r],y[M],x].join(" "),P=o?v??H[o]:"";return n("div",{ref:G,className:["group/bubble flex w-full items-start gap-2",I?"flex-row-reverse":"",A??""].filter(Boolean).join(" "),style:{...c(T,q,M),...D},...F,children:[d(s)?e("div",{className:"shrink-0",children:s}):null,n("div",{className:["flex min-w-0 max-w-[min(100%,32rem)] flex-col",b[R],I?"items-end":"items-start"].join(" "),children:[J?n("div",{className:`flex items-baseline gap-2 ${m[R]}`,children:[d(i)?e("span",{className:"font-semibold",children:i}):null,d(t)?e("span",{className:"text-(--neba-muted-fg)",children:t}):null]}):null,n("div",{className:"flex min-w-0 items-center gap-1 "+(I?"flex-row-reverse":""),children:[n("div",{className:O,children:[d(_)?e("div",{className:"[&_img]:block [&_img]:w-full [&_video]:block [&_video]:w-full",children:_}):null,K?n("div",{className:[h[$][R],"flex min-w-0 flex-col gap-2",u[R]].join(" "),children:[w?e(C,{label:H.typing}):d(E)?e("div",{className:"min-w-0 break-words whitespace-pre-line",children:E}):null,z?e(L,{preview:z}):null]}):null]}),d(B)?e("div",{className:j,children:B}):null]}),o?n("div",{className:["flex items-center gap-1",m[R],k[o],"[&_svg]:size-[1.15em] [&_svg]:shrink-0"].join(" "),children:[N[o],e("span",{className:f,children:P})]}):null]})]})});function C({label:r}){return n("div",{className:"flex items-center gap-1 py-[0.35em]",role:"status",children:[[0,1,2].map(n=>e("span",{"aria-hidden":"true",className:"neba-typing-dot size-[0.45em] rounded-full",style:{"--n-i":n}},n)),e("span",{className:f,children:r})]})}function L({preview:r}){const{url:a,title:l,description:i,image:t,site:s,newTab:c=!1}=r;return n("a",{href:a,target:c?"_blank":void 0,rel:c?"noopener noreferrer":void 0,className:_,children:[t?e("img",{src:t,alt:"",className:"block h-28 w-full object-cover"}):null,n("div",{className:"flex flex-col gap-0.5 p-2",children:[d(s)?n("span",{className:"flex items-center gap-1 text-[0.85em] opacity-70 [&_svg]:size-[1em] [&_svg]:shrink-0",children:[e(o,{}),e("span",{className:"truncate",children:s})]}):null,d(l)?e("span",{className:"font-semibold",children:l}):null,d(i)?e("span",{className:"line-clamp-2 text-[0.9em] opacity-80",children:i}):null]})]})}
1
+ "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{chatMessages as l,useMessages as r}from"../../internal/i18n.js";import{CheckIcon as i,ClockIcon as t,DangerIcon as s,LinkIcon as o}from"../../internal/icons.js";import{safeRel as c}from"../../internal/link.js";import{controlSlots as d,cx as m,hasContent as p,metaTextClasses as u,radiusClasses as b,sheetBodyClasses as f,sheetHeaderGapClasses as v,srOnlyClasses as x,surfaceClasses as h,transitionClasses as g}from"../../internal/styles.js";const y={default:{xs:"px-2 py-1",sm:"px-2.5 py-1.5",md:"px-3 py-2",lg:"px-3.5 py-2.5",xl:"px-4 py-3"},compact:{xs:"px-1.5 py-0.5",sm:"px-2 py-1",md:"px-2.5 py-1.5",lg:"px-3 py-1.5",xl:"px-3.5 py-2"}},w={start:"[border-start-start-radius:0.25rem]",end:"[border-start-end-radius:0.25rem]"},k={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) [box-shadow:var(--n-elev)]"};function N(){return n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e("path",{d:"m1.5 8.5 2.75 2.75L9.5 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M7 10.75 8.25 12l5.25-5.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}const _={sending:e(t,{}),sent:e(i,{}),delivered:e(N,{}),read:e(N,{}),failed:e(s,{})},j={sending:"text-(--neba-muted-fg)",sent:"text-(--neba-muted-fg)",delivered:"text-(--neba-muted-fg)",read:"text-(--n-accent)",failed:"text-(--neba-danger-accent)"},C=["block overflow-hidden rounded-(--neba-radius-sm) border no-underline","[border-color:color-mix(in_oklab,currentColor_18%,transparent)]","[background-color:color-mix(in_oklab,currentColor_7%,transparent)]","hover:[background-color:color-mix(in_oklab,currentColor_12%,transparent)]","[transition-property:background-color] [transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),L=["shrink-0 opacity-0","[transition:opacity_var(--neba-duration)_var(--neba-ease)]","group-hover/bubble:opacity-100 group-focus-within/bubble:opacity-100","[@media(hover:none)]:opacity-100"].join(" ");export const ChatBubble=/*@__PURE__*/a.forwardRef(function({side:a="start",name:i,time:t,avatar:s,status:o,statusLabel:c,typing:h=!1,media:N,preview:C,actions:W,locale:M,variant:R="outline",size:T="md",color:$="primary",density:q="default",elevation:A=0,className:D,style:E,children:F,...G},H){const I=r(l,M),J="end"===a,K=p(i)||p(t),O=h||p(F)||Boolean(C),P=["flex min-w-0 flex-col overflow-hidden",b[T],w[a],k[R],g].join(" "),Q=o?c??I[o]:"";return n("div",{ref:H,className:m("group/bubble flex w-full items-start gap-2",J?"flex-row-reverse":"",D??""),style:{...d($,A,R),...E},...G,children:[p(s)?e("div",{className:"shrink-0",children:s}):null,n("div",{className:["flex min-w-0 max-w-[min(100%,32rem)] flex-col",v[T],J?"items-end":"items-start"].join(" "),children:[K?n("div",{className:`flex items-baseline gap-2 ${u[T]}`,children:[p(i)?e("span",{className:"font-semibold",children:i}):null,p(t)?e("span",{className:"text-(--neba-muted-fg)",children:t}):null]}):null,n("div",{className:"flex min-w-0 items-center gap-1 "+(J?"flex-row-reverse":""),children:[n("div",{className:P,children:[p(N)?e("div",{className:"[&_img]:block [&_img]:w-full [&_video]:block [&_video]:w-full",children:N}):null,O?n("div",{className:[y[q][T],"flex min-w-0 flex-col gap-2",f[T]].join(" "),children:[h?e(z,{label:I.typing}):p(F)?e("div",{className:"min-w-0 break-words whitespace-pre-line",children:F}):null,C?e(B,{preview:C}):null]}):null]}),p(W)?e("div",{className:L,children:W}):null]}),o?n("div",{className:["flex items-center gap-1",u[T],j[o],"[&_svg]:size-[1.15em] [&_svg]:shrink-0"].join(" "),children:[_[o],e("span",{className:x,children:Q})]}):null]})]})});function z({label:a}){return n("div",{className:"flex items-center gap-1 py-[0.35em]",role:"status",children:[[0,1,2].map(n=>e("span",{"aria-hidden":"true",className:"neba-typing-dot size-[0.45em] rounded-full",style:{"--n-i":n}},n)),e("span",{className:x,children:a})]})}function B({preview:a}){const{url:l,title:r,description:i,image:t,site:s,newTab:d=!1}=a,m=d?"_blank":void 0;return n("a",{href:l,target:m,rel:c(m,void 0),className:C,children:[t?e("img",{src:t,alt:"",loading:"lazy",decoding:"async",className:"block h-28 w-full object-cover"}):null,n("div",{className:"flex flex-col gap-0.5 p-2",children:[p(s)?n("span",{className:"flex items-center gap-1 text-[0.85em] opacity-70 [&_svg]:size-[1em] [&_svg]:shrink-0",children:[e(o,{}),e("span",{className:"truncate",children:s})]}):null,p(r)?e("span",{className:"font-semibold",children:r}):null,p(i)?e("span",{className:"line-clamp-2 text-[0.9em] opacity-80",children:i}):null]})]})}
@@ -1,12 +1,19 @@
1
1
  import * as React from 'react';
2
2
  import { Checkbox as BaseUICheckbox } from '@base-ui/react/checkbox';
3
- import type { NebaColor, NebaSize } from '../../types.js';
3
+ import type { NebaColor, NebaFieldSlot, NebaSize, NebaSlots } from '../../types.js';
4
4
  /**
5
5
  * Base UI's own props, minus the ones this component owns: `className` and
6
6
  * `style` land on the field wrapper rather than on the tick, and `render` would
7
7
  * replace the tick with something that is no longer a checkbox.
8
8
  */
9
9
  type BaseCheckboxProps = Omit<React.ComponentPropsWithoutRef<typeof BaseUICheckbox.Root>, 'className' | 'style' | 'render' | 'children'>;
10
+ /**
11
+ * The parts a Checkbox draws behind its root.
12
+ *
13
+ * `control` is the tick itself — the bordered box that fills when checked — and
14
+ * `indicator` is the mark inside it.
15
+ */
16
+ export type CheckboxSlot = NebaFieldSlot | 'indicator';
10
17
  export interface CheckboxProps extends BaseCheckboxProps {
11
18
  /** @default 'md' */
12
19
  size?: NebaSize;
@@ -25,6 +32,11 @@ export interface CheckboxProps extends BaseCheckboxProps {
25
32
  invalid?: boolean;
26
33
  /** Class names for the field wrapper, not for the tick itself. */
27
34
  className?: string;
35
+ /**
36
+ * Class names for the parts behind that wrapper — the tick is
37
+ * `classNames.control`.
38
+ */
39
+ classNames?: NebaSlots<CheckboxSlot>;
28
40
  style?: React.CSSProperties;
29
41
  }
30
42
  /**
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as r from"react";import{Checkbox as a}from"@base-ui/react/checkbox";import{Field as i}from"@base-ui/react/field";import{controlTextClasses as l,metaTextClasses as t,surfaceClasses as o,tickRadiusClasses as s,tickRowLeadingClasses as d,tickSizeClasses as c,transitionClasses as b}from"../../internal/styles.js";const h=["relative inline-flex shrink-0 items-center justify-center border","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",b,"active:[transition-duration:0ms]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),f=[o,"cursor-pointer bg-(--n-panel) [border-color:var(--n-line)]","hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)]","data-[checked]:bg-(--n-fill) data-[checked]:text-(--n-on-solid)","data-[checked]:[border-color:transparent]","data-[checked]:hover:bg-(--n-fill-hover)","data-[indeterminate]:bg-(--n-fill) data-[indeterminate]:text-(--n-on-solid)","data-[indeterminate]:[border-color:transparent]"].join(" "),u=[o,"cursor-default bg-(--n-panel) [border-color:var(--n-line)]","[filter:saturate(0.55)]","data-[checked]:bg-(--n-fill) data-[checked]:text-(--n-on-solid)","data-[checked]:[border-color:transparent]"].join(" "),m=["cursor-not-allowed bg-transparent [border-color:var(--neba-disabled-border)]","text-(--neba-disabled-fg) shadow-none","data-[checked]:bg-(--neba-disabled-bg)","data-[indeterminate]:bg-(--neba-disabled-bg)"].join(" ");function v(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2 6.2 4.6 8.8 10 3.4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function p(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2.5 6h7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}export const Checkbox=/*@__PURE__*/r.forwardRef(function({size:r="md",color:o="primary",label:b,description:g,error:x,invalid:k,disabled:j=!1,readOnly:N=!1,className:$,style:y,...w},z){const C=null!=x&&!1!==x&&""!==x,L=k??C,B=L?"danger":o,R={"--n-fill":`var(--neba-${B}-fill)`,"--n-fill-hover":`var(--neba-${B}-fill-hover)`,"--n-on-solid":`var(--neba-${B}-on-solid)`,"--n-accent":`var(--neba-${B}-accent)`,"--n-panel":"var(--neba-panel)","--n-panel-hover":"var(--neba-panel-hover)","--n-line":`var(--neba-${B}-line)`,"--n-line-hover":`var(--neba-${B}-line-hover)`,"--n-ring":`var(--neba-${B}-ring)`},M=[h,c[r],s[r],j?m:N?u:f].join(" ");return n(i.Root,{disabled:j,invalid:L,className:["inline-flex flex-col gap-1 align-top",$??""].filter(Boolean).join(" "),style:{...R,...y},children:[n("div",{className:`flex items-start gap-2 ${l[r]} ${d}`,children:[e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e(a.Root,{ref:z,className:M,disabled:j,readOnly:N,...w,children:e(a.Indicator,{className:"flex size-[70%] items-center justify-center",children:w.indeterminate?e(p,{}):e(v,{})})})}),b||g?n("span",{className:"flex min-w-0 flex-col gap-0.5",children:[b?e(i.Label,{className:["leading-[1.4]",j?"text-(--neba-disabled-fg)":"cursor-pointer text-(--neba-fg)"].join(" "),children:b}):null,g?e(i.Description,{className:`${t[r]} text-(--neba-muted-fg)`,children:g}):null]}):null]}),C?e(i.Error,{match:!0,className:`${t[r]} text-(--n-accent)`,children:x}):null]})});
1
+ "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as r from"react";import{Checkbox as a}from"@base-ui/react/checkbox";import{Field as i}from"@base-ui/react/field";import{controlTextClasses as t,cx as l,hitAreaClasses as o,metaTextClasses as s,surfaceClasses as c,tickRadiusClasses as d,tickRowLeadingClasses as b,tickSizeClasses as h,transitionClasses as f}from"../../internal/styles.js";const m=["relative inline-flex shrink-0 items-center justify-center border",o,"[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",f,"active:[transition-duration:0ms]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),u=[c,"cursor-pointer bg-(--n-panel) [border-color:var(--n-line)]","hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)]","data-[checked]:bg-(--n-fill) data-[checked]:text-(--n-on-solid)","data-[checked]:[border-color:transparent]","data-[checked]:hover:bg-(--n-fill-hover)","data-[indeterminate]:bg-(--n-fill) data-[indeterminate]:text-(--n-on-solid)","data-[indeterminate]:[border-color:transparent]"].join(" "),p=[c,"cursor-default bg-(--n-panel) [border-color:var(--n-line)]","[filter:saturate(0.55)]","data-[checked]:bg-(--n-fill) data-[checked]:text-(--n-on-solid)","data-[checked]:[border-color:transparent]"].join(" "),v=["cursor-not-allowed bg-transparent [border-color:var(--neba-disabled-border)]","text-(--neba-disabled-fg) shadow-none","data-[checked]:bg-(--neba-disabled-bg)","data-[indeterminate]:bg-(--neba-disabled-bg)"].join(" ");function g(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2 6.2 4.6 8.8 10 3.4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function x(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2.5 6h7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}export const Checkbox=/*@__PURE__*/r.forwardRef(function({size:r="md",color:o="primary",label:c,description:f,error:k,invalid:N,disabled:j=!1,readOnly:$=!1,className:y,classNames:w,style:z,...C},L){const R=null!=k&&!1!==k&&""!==k,B=N??R,M=B?"danger":o,O={"--n-fill":`var(--neba-${M}-fill)`,"--n-fill-hover":`var(--neba-${M}-fill-hover)`,"--n-on-solid":`var(--neba-${M}-on-solid)`,"--n-accent":`var(--neba-${M}-accent)`,"--n-panel":"var(--neba-panel)","--n-panel-hover":"var(--neba-panel-hover)","--n-line":`var(--neba-${M}-line)`,"--n-line-hover":`var(--neba-${M}-line-hover)`,"--n-ring":`var(--neba-${M}-ring)`},W=[m,h[r],d[r],j?v:$?p:u].join(" ");return n(i.Root,{disabled:j,invalid:B,className:l("inline-flex flex-col gap-1 align-top",y??""),style:{...O,...z},children:[n("div",{className:`flex items-start gap-2 ${t[r]} ${b}`,children:[e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e(a.Root,{ref:L,className:l(W,w?.control),disabled:j,readOnly:$,...C,children:e(a.Indicator,{className:l("flex size-[70%] items-center justify-center",w?.indicator),children:C.indeterminate?e(x,{}):e(g,{})})})}),c||f?n("span",{className:"flex min-w-0 flex-col gap-0.5",children:[c?e(i.Label,{className:l("leading-[1.4]",j?"text-(--neba-disabled-fg)":"cursor-pointer text-(--neba-fg)",w?.label),children:c}):null,f?e(i.Description,{className:l(s[r],"text-(--neba-muted-fg)",w?.description),children:f}):null]}):null]}),e(i.Error,R?{match:!0,className:l(s[r],"text-(--n-accent)",w?.error),children:k}:{className:l(s[r],"text-(--n-accent)",w?.error)})]})});