neba 1.18.1 → 1.19.1

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 (189) hide show
  1. package/dist/a2ui/adapter-catalog.json +1 -1
  2. package/dist/a2ui/catalog.json +3 -3
  3. package/dist/a2ui/index.d.ts +37 -16
  4. package/dist/a2ui/index.js +1 -1
  5. package/dist/a2ui/schema.d.ts +7 -0
  6. package/dist/a2ui/schema.js +1 -1
  7. package/dist/components/accordion/Accordion.js +1 -1
  8. package/dist/components/agent-steps/AgentSteps.js +1 -1
  9. package/dist/components/alert/Alert.js +1 -1
  10. package/dist/components/anchor/Anchor.js +1 -1
  11. package/dist/components/animate-counter/AnimateCounter.js +1 -1
  12. package/dist/components/animate-headline/AnimateHeadline.js +1 -1
  13. package/dist/components/animate-lighting/AnimateLighting.js +1 -1
  14. package/dist/components/animate-marquee/AnimateMarquee.js +1 -1
  15. package/dist/components/animate-scramble/AnimateScramble.js +1 -1
  16. package/dist/components/animate-typing/AnimateTyping.js +1 -1
  17. package/dist/components/app-logo/AppLogo.js +1 -1
  18. package/dist/components/approval/Approval.js +1 -1
  19. package/dist/components/aspect-ratio/AspectRatio.js +1 -1
  20. package/dist/components/avatar/Avatar.js +1 -1
  21. package/dist/components/badge/Badge.js +1 -1
  22. package/dist/components/bar-chart/BarChart.js +1 -1
  23. package/dist/components/blockquote/Blockquote.js +1 -1
  24. package/dist/components/bottom-navigation/BottomNavigation.js +1 -1
  25. package/dist/components/breadcrumb/Breadcrumb.js +1 -1
  26. package/dist/components/button/Button.js +1 -1
  27. package/dist/components/button-group/ButtonGroup.js +1 -1
  28. package/dist/components/calendar/Calendar.js +1 -1
  29. package/dist/components/carousel/Carousel.js +1 -1
  30. package/dist/components/chat-bubble/ChatBubble.js +1 -1
  31. package/dist/components/checkbox/Checkbox.js +1 -1
  32. package/dist/components/checkbox/index.d.ts +1 -1
  33. package/dist/components/checkbox-group/index.d.ts +1 -1
  34. package/dist/components/chip/Chip.d.ts +32 -3
  35. package/dist/components/chip/Chip.js +1 -1
  36. package/dist/components/code-block/CodeBlock.js +1 -1
  37. package/dist/components/collapsible/Collapsible.js +1 -1
  38. package/dist/components/color-picker/ColorPicker.js +1 -1
  39. package/dist/components/combobox/Combobox.d.ts +11 -0
  40. package/dist/components/combobox/Combobox.js +1 -1
  41. package/dist/components/combobox/index.d.ts +1 -1
  42. package/dist/components/command-palette/CommandPalette.d.ts +21 -5
  43. package/dist/components/command-palette/CommandPalette.js +1 -1
  44. package/dist/components/command-palette/CommandPaletteSheet.d.ts +27 -0
  45. package/dist/components/command-palette/CommandPaletteSheet.js +1 -0
  46. package/dist/components/command-palette/index.d.ts +1 -1
  47. package/dist/components/confirm/Confirm.d.ts +7 -5
  48. package/dist/components/confirm/Confirm.js +1 -1
  49. package/dist/components/data-list/DataList.js +1 -1
  50. package/dist/components/data-table/DataTable.js +1 -1
  51. package/dist/components/data-table/RowsPerPage.d.ts +43 -0
  52. package/dist/components/data-table/RowsPerPage.js +1 -0
  53. package/dist/components/date-picker/DatePicker.js +1 -1
  54. package/dist/components/date-range-picker/DateRangePicker.js +1 -1
  55. package/dist/components/date-time-picker/DateTimePicker.js +1 -1
  56. package/dist/components/dialog/Dialog.js +1 -1
  57. package/dist/components/dialog/index.d.ts +1 -1
  58. package/dist/components/drawer/Drawer.d.ts +1 -1
  59. package/dist/components/drawer/Drawer.js +1 -1
  60. package/dist/components/empty/Empty.js +1 -1
  61. package/dist/components/file-picker/FilePicker.js +1 -1
  62. package/dist/components/floating-action-button/FloatingActionButton.js +1 -1
  63. package/dist/components/floating-action-button/index.d.ts +1 -0
  64. package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
  65. package/dist/components/footer/Footer.js +1 -1
  66. package/dist/components/gallery/Gallery.js +1 -1
  67. package/dist/components/gauge-chart/GaugeChart.js +1 -1
  68. package/dist/components/header/Header.js +1 -1
  69. package/dist/components/heatmap-chart/HeatmapChart.js +1 -1
  70. package/dist/components/highlight/Highlight.js +1 -1
  71. package/dist/components/hover-card/HoverCard.js +1 -1
  72. package/dist/components/how-to-steps/HowToSteps.d.ts +3 -0
  73. package/dist/components/how-to-steps/HowToSteps.js +1 -1
  74. package/dist/components/image/Image.js +1 -1
  75. package/dist/components/inline-citation/InlineCitation.d.ts +24 -0
  76. package/dist/components/inline-citation/InlineCitation.js +1 -1
  77. package/dist/components/list/List.js +1 -1
  78. package/dist/components/menu/Menu.js +1 -1
  79. package/dist/components/menubar/Menubar.js +1 -1
  80. package/dist/components/meter/Meter.js +1 -1
  81. package/dist/components/mockup/Mockup.js +1 -1
  82. package/dist/components/navigation-menu/NavigationMenu.d.ts +2 -1
  83. package/dist/components/navigation-menu/NavigationMenu.js +1 -1
  84. package/dist/components/number-field/NumberField.js +1 -1
  85. package/dist/components/number-field/index.d.ts +1 -1
  86. package/dist/components/overlay/Overlay.js +1 -1
  87. package/dist/components/page-layout/PageLayout.js +1 -1
  88. package/dist/components/pagination/Pagination.js +1 -1
  89. package/dist/components/panes/Panes.js +1 -1
  90. package/dist/components/pie-chart/PieChart.js +1 -1
  91. package/dist/components/pill/Pill.js +1 -1
  92. package/dist/components/popover/Popover.js +1 -1
  93. package/dist/components/progress-box/ProgressBox.js +1 -1
  94. package/dist/components/progress-circular/ProgressCircular.js +1 -1
  95. package/dist/components/progress-linear/ProgressLinear.js +1 -1
  96. package/dist/components/prompt-input/PromptInput.js +1 -1
  97. package/dist/components/provider/NebaProvider.js +1 -1
  98. package/dist/components/radio-group/RadioGroup.js +1 -1
  99. package/dist/components/radio-group/index.d.ts +1 -1
  100. package/dist/components/rating/Rating.js +1 -1
  101. package/dist/components/reasoning/Reasoning.js +1 -1
  102. package/dist/components/scatter-chart/ScatterChart.js +1 -1
  103. package/dist/components/scroll-area/ScrollArea.js +1 -1
  104. package/dist/components/scroll-zone/ScrollZone.js +1 -1
  105. package/dist/components/segmented-button/SegmentedButton.js +1 -1
  106. package/dist/components/select/Select.d.ts +12 -0
  107. package/dist/components/select/Select.js +1 -1
  108. package/dist/components/select/index.d.ts +1 -1
  109. package/dist/components/shortcut/Shortcut.js +1 -1
  110. package/dist/components/sidebar/Sidebar.js +1 -1
  111. package/dist/components/sidebar/SidebarTrigger.js +1 -1
  112. package/dist/components/skeleton/Skeleton.js +1 -1
  113. package/dist/components/slider/Slider.js +1 -1
  114. package/dist/components/slider/index.d.ts +1 -1
  115. package/dist/components/sources/Sources.js +1 -1
  116. package/dist/components/sparkline/Sparkline.d.ts +7 -0
  117. package/dist/components/sparkline/Sparkline.js +1 -1
  118. package/dist/components/spoiler/Spoiler.js +1 -1
  119. package/dist/components/statistic/Statistic.js +1 -1
  120. package/dist/components/streaming-text/StreamingText.d.ts +10 -6
  121. package/dist/components/streaming-text/StreamingText.js +1 -1
  122. package/dist/components/switch/Switch.js +1 -1
  123. package/dist/components/switch/index.d.ts +1 -1
  124. package/dist/components/table/Table.js +1 -1
  125. package/dist/components/table/index.d.ts +1 -1
  126. package/dist/components/tabs/Tabs.js +1 -1
  127. package/dist/components/text-field/TextField.js +1 -1
  128. package/dist/components/text-field/index.d.ts +1 -1
  129. package/dist/components/text-link/TextLink.js +1 -1
  130. package/dist/components/time-picker/TimePicker.js +1 -1
  131. package/dist/components/timeline-chart/TimelineChart.js +1 -1
  132. package/dist/components/toast/Toast.d.ts +38 -5
  133. package/dist/components/toast/Toast.js +1 -1
  134. package/dist/components/toast/index.d.ts +2 -2
  135. package/dist/components/toast/index.js +1 -1
  136. package/dist/components/toggle/Toggle.js +1 -1
  137. package/dist/components/toggle-group/ToggleGroup.js +1 -1
  138. package/dist/components/tool-call/ToolCall.js +1 -1
  139. package/dist/components/toolbar/Toolbar.js +1 -1
  140. package/dist/components/tooltip/Tooltip.js +1 -1
  141. package/dist/components/tour/Tour.js +1 -1
  142. package/dist/components/tour/index.d.ts +1 -1
  143. package/dist/components/transfer/Transfer.d.ts +7 -0
  144. package/dist/components/transfer/Transfer.js +1 -1
  145. package/dist/components/tree-select/TreeSelect.js +1 -1
  146. package/dist/components/tree-view/TreeView.js +1 -1
  147. package/dist/components/window-pane/WindowPane.js +1 -1
  148. package/dist/internal/animate.d.ts +34 -2
  149. package/dist/internal/animate.js +1 -1
  150. package/dist/internal/cache.d.ts +7 -1
  151. package/dist/internal/cache.js +1 -1
  152. package/dist/internal/calendar.d.ts +40 -1
  153. package/dist/internal/calendar.js +1 -1
  154. package/dist/internal/chart-frame.d.ts +86 -8
  155. package/dist/internal/chart-frame.js +1 -1
  156. package/dist/internal/chart-line.js +1 -1
  157. package/dist/internal/chart.d.ts +13 -0
  158. package/dist/internal/chart.js +1 -1
  159. package/dist/internal/data-table.d.ts +7 -1
  160. package/dist/internal/data-table.js +1 -1
  161. package/dist/internal/date.d.ts +10 -0
  162. package/dist/internal/date.js +1 -1
  163. package/dist/internal/idle.d.ts +10 -0
  164. package/dist/internal/idle.js +1 -0
  165. package/dist/internal/link.d.ts +4 -3
  166. package/dist/internal/media.js +1 -1
  167. package/dist/internal/observe.d.ts +4 -0
  168. package/dist/internal/observe.js +1 -1
  169. package/dist/internal/page-layout.d.ts +30 -2
  170. package/dist/internal/page-layout.js +1 -1
  171. package/dist/internal/picker.js +1 -1
  172. package/dist/internal/progress.d.ts +17 -0
  173. package/dist/internal/progress.js +1 -1
  174. package/dist/internal/refs.d.ts +18 -0
  175. package/dist/internal/refs.js +1 -0
  176. package/dist/internal/run.d.ts +34 -19
  177. package/dist/internal/run.js +1 -1
  178. package/dist/internal/sizer.d.ts +9 -4
  179. package/dist/internal/sizer.js +1 -1
  180. package/dist/internal/styles.d.ts +14 -0
  181. package/dist/internal/styles.js +1 -1
  182. package/dist/internal/tile.d.ts +34 -0
  183. package/dist/internal/tile.js +1 -0
  184. package/dist/internal/wheel.d.ts +24 -1
  185. package/dist/internal/wheel.js +1 -1
  186. package/dist/styles.css +1 -1
  187. package/dist/tailwind.css +366 -61
  188. package/dist/types.d.ts +4 -2
  189. package/package.json +19 -19
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as l,Fragment as n}from"react/jsx-runtime";import*as a from"react";import{useLayoutEffectOnClient as t}from"../../internal/layout-effect.js";import{Button as i}from"../button/Button.js";import{boxPaddingClasses as s}from"../box/Box.js";import{CheckIcon as r,severityIcon as o}from"../../internal/icons.js";import{approvalMessages as c,useMessages as d}from"../../internal/i18n.js";import{cx as m,focusRingClasses as f,hasContent as u,iconClasses as p,metaTextClasses as x,preformattedClasses as v,radiusClasses as h,sheetBodyClasses as b,sheetHeaderGapClasses as g,sheetSectionGapClasses as N,sheetTitleClasses as w,surfaceClasses as j,surfaceSlots as y,transitionClasses as k}from"../../internal/styles.js";import{useStyleDefaults as z}from"../../internal/defaults.js";const I={low:"info",medium:"warning",high:"danger"},R={solid:[j,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[j,"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)"};export const Approval=/*@__PURE__*/a.forwardRef(function Approval(j,A){const{variant:B="outline",size:q="md",color:C="warning",density:D="default",elevation:E=0,options:F,title:S,description:G,details:H,risk:J,decision:K,onDecide:L,icon:M,disabled:O=!1,locale:P,labels:Q,classNames:T,className:U,style:V,children:W,...X}=z(j,["size","density","variant","locale"]),Y={...d(c,P),...Q},[Z,$]=a.useState(null),_=void 0!==K,ee=_?K:Z,le=J?I[J]:C,ne=void 0===M?o(le):M,ae=u(S)?S:Y.request,te=a.useId(),ie=null===ee?void 0:F.find(e=>e.value===ee),se=void 0!==ie,re=a.useRef(!1),oe=a.useRef(null);return t(()=>{if(!se||!re.current)return;re.current=!1;const e=document.activeElement;null!==e&&e!==document.body||oe.current?.focus()},[se]),l("div",{ref:A,role:"group","aria-labelledby":te,"data-decided":ee??void 0,className:m("flex w-full flex-col",s[D][q],h[q],N[q],b[q],R[B],k,p,U??""),style:{...y(le,E),...V},...X,children:[l("div",{className:"flex items-start gap-3",children:[u(ne)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--n-accent)",children:ne}):null,l("div",{className:m("flex min-w-0 flex-1 flex-col",g[q]),children:[e("div",{id:te,className:m("font-semibold text-(--n-accent)",w[q],T?.title??""),children:ae}),u(G)?e("div",{className:m("text-(--neba-muted-fg)",T?.description??""),children:G}):null]}),J?e("span",{className:m("shrink-0 rounded-full bg-(--n-soft) px-2 py-0.5 font-medium text-(--n-on-tint)",x[q]),children:Y[J]}):null]}),u(H)?e("div",{className:m("min-w-0",T?.details??""),children:"string"==typeof H?e("pre",{className:m(v,"max-h-56"),children:H}):H}):null,W,e("div",{className:m("flex min-w-0 flex-col gap-1.5",T?.actions??""),children:ie?l("div",{ref:oe,tabIndex:-1,className:m("flex items-center gap-2 rounded-(--neba-radius-xs) text-(--neba-muted-fg)",f),children:[e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--n-accent)",children:e(r,{})}),e("span",{className:x[q],children:Y.answered}),e("span",{className:"min-w-0 font-medium text-(--neba-fg)",children:ie.label})]}):l(n,{children:[e("div",{className:"flex flex-wrap gap-2",children:F.map(l=>e(i,{size:q,variant:l.variant??"outline",color:l.color??le,startIcon:l.icon,disabled:O||l.disabled,onClick:()=>{re.current=!0,_||$(l.value),L?.(l.value)},children:l.label},l.value))}),F.some(e=>u(e.description))?e("ul",{className:m("m-0 flex list-none flex-col gap-0.5 p-0 text-(--neba-muted-fg)",x[q]),children:F.filter(e=>u(e.description)).map(n=>l("li",{children:[e("span",{className:"font-medium text-(--neba-fg)",children:n.label})," — ",n.description]},n.value))}):null]})})]})});
1
+ "use client";import{jsx as e,jsxs as l,Fragment as n}from"react/jsx-runtime";import*as a from"react";import{useLayoutEffectOnClient as t}from"../../internal/layout-effect.js";import{Button as i}from"../button/Button.js";import{boxPaddingClasses as s}from"../box/Box.js";import{CheckIcon as r,severityIcon as o}from"../../internal/icons.js";import{approvalMessages as c,useMessages as d}from"../../internal/i18n.js";import{cx as m,focusRingClasses as f,hasContent as u,iconClasses as p,metaTextClasses as x,preformattedClasses as v,radiusClasses as h,sheetBodyClasses as b,sheetHeaderGapClasses as g,sheetSectionGapClasses as N,sheetTitleClasses as w,surfaceClasses as j,surfaceSlots as y,transitionClasses as k}from"../../internal/styles.js";import{useStyleDefaults as z}from"../../internal/defaults.js";const I={low:"info",medium:"warning",high:"danger"},R={solid:j+" text-(--neba-fg) bg-(--n-panel-hover) [box-shadow:var(--n-elev),var(--neba-plate-solid)]",outline:j+" border text-(--neba-fg) bg-(--n-panel) [border-color:var(--n-line)] [box-shadow:var(--n-elev),var(--neba-plate-glass)]",text:"text-(--neba-fg) bg-(--n-soft)"};export const Approval=/*@__PURE__*/a.forwardRef(function Approval(j,A){const{variant:B="outline",size:q="md",color:C="warning",density:D="default",elevation:E=0,options:F,title:S,description:G,details:H,risk:J,decision:K,onDecide:L,icon:M,disabled:O=!1,locale:P,labels:Q,classNames:T,className:U,style:V,children:W,...X}=z(j,["size","density","variant","locale"]),Y={...d(c,P),...Q},[Z,$]=a.useState(null),_=void 0!==K,ee=_?K:Z,le=J?I[J]:C,ne=void 0===M?o(le):M,ae=u(S)?S:Y.request,te=a.useId(),ie=null===ee?void 0:F.find(e=>e.value===ee),se=void 0!==ie,re=a.useRef(!1),oe=a.useRef(null);return t(()=>{if(!se||!re.current)return;re.current=!1;const e=document.activeElement;null!==e&&e!==document.body||oe.current?.focus()},[se]),l("div",{ref:A,role:"group","aria-labelledby":te,"data-decided":ee??void 0,className:m("flex w-full flex-col",s[D][q],h[q],N[q],b[q],R[B],k,p,U??""),style:{...y(le,E),...V},...X,children:[l("div",{className:"flex items-start gap-3",children:[u(ne)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--n-accent)",children:ne}):null,l("div",{className:m("flex min-w-0 flex-1 flex-col",g[q]),children:[e("div",{id:te,className:m("font-semibold text-(--n-accent)",w[q],T?.title??""),children:ae}),u(G)?e("div",{className:m("text-(--neba-muted-fg)",T?.description??""),children:G}):null]}),J?e("span",{className:m("shrink-0 rounded-full bg-(--n-soft) px-2 py-0.5 font-medium text-(--n-on-tint)",x[q]),children:Y[J]}):null]}),u(H)?e("div",{className:m("min-w-0",T?.details??""),children:"string"==typeof H?e("pre",{className:m(v,"max-h-56"),children:H}):H}):null,W,e("div",{className:m("flex min-w-0 flex-col gap-1.5",T?.actions??""),children:ie?l("div",{ref:oe,tabIndex:-1,className:m("flex items-center gap-2 rounded-(--neba-radius-xs) text-(--neba-muted-fg)",f),children:[e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--n-accent)",children:e(r,{})}),e("span",{className:x[q],children:Y.answered}),e("span",{className:"min-w-0 font-medium text-(--neba-fg)",children:ie.label})]}):l(n,{children:[e("div",{className:"flex flex-wrap gap-2",children:F.map(l=>e(i,{size:q,variant:l.variant??"outline",color:l.color??le,startIcon:l.icon,disabled:O||l.disabled,onClick:()=>{re.current=!0,_||$(l.value),L?.(l.value)},children:l.label},l.value))}),F.some(e=>u(e.description))?e("ul",{className:m("m-0 flex list-none flex-col gap-0.5 p-0 text-(--neba-muted-fg)",x[q]),children:F.filter(e=>u(e.description)).map(n=>l("li",{children:[e("span",{className:"font-medium text-(--neba-fg)",children:n.label})," — ",n.description]},n.value))}):null]})})]})});
@@ -1 +1 @@
1
- "use client";import*as e from"react";import{useRender as o}from"@base-ui/react/use-render";import{cx as i,radiusClasses as c}from"../../internal/styles.js";import{useStyleDefaults as t}from"../../internal/defaults.js";const n=["[&>img]:size-full","[&>video]:size-full","[&>canvas]:size-full","[&>svg]:size-full","[&>iframe]:size-full","[&>picture]:size-full","[&>picture>img]:size-full"].join(" "),l={cover:["[&>img]:object-cover","[&>video]:object-cover","[&>canvas]:object-cover","[&>picture>img]:object-cover"].join(" "),contain:["[&>img]:object-contain","[&>video]:object-contain","[&>canvas]:object-contain","[&>picture>img]:object-contain"].join(" "),fill:["[&>img]:object-fill","[&>video]:object-fill","[&>canvas]:object-fill","[&>picture>img]:object-fill"].join(" "),none:["[&>img]:object-none","[&>video]:object-none","[&>canvas]:object-none","[&>picture>img]:object-none"].join(" "),"scale-down":["[&>img]:object-scale-down","[&>video]:object-scale-down","[&>canvas]:object-scale-down","[&>picture>img]:object-scale-down"].join(" ")};export const AspectRatio=/*@__PURE__*/e.forwardRef(function AspectRatio(e,r){const{ratio:s=1,fit:a="cover",rounded:j=!1,size:f="md",render:m,className:d,style:b,children:u,...v}=t(e,["size"]),p=i("relative block w-full overflow-hidden",n,l[a],j?c[f]:"",d??"");return o({render:m,ref:r,props:{className:p,style:{aspectRatio:s,...b},children:u,...v}})});
1
+ "use client";import*as e from"react";import{useRender as o}from"@base-ui/react/use-render";import{cx as c,radiusClasses as i}from"../../internal/styles.js";import{useStyleDefaults as t}from"../../internal/defaults.js";const n={cover:"[&>img]:object-cover [&>video]:object-cover [&>canvas]:object-cover [&>picture>img]:object-cover",contain:"[&>img]:object-contain [&>video]:object-contain [&>canvas]:object-contain [&>picture>img]:object-contain",fill:"[&>img]:object-fill [&>video]:object-fill [&>canvas]:object-fill [&>picture>img]:object-fill",none:"[&>img]:object-none [&>video]:object-none [&>canvas]:object-none [&>picture>img]:object-none","scale-down":"[&>img]:object-scale-down [&>video]:object-scale-down [&>canvas]:object-scale-down [&>picture>img]:object-scale-down"};export const AspectRatio=/*@__PURE__*/e.forwardRef(function AspectRatio(e,l){const{ratio:r=1,fit:s="cover",rounded:a=!1,size:f="md",render:m,className:d,style:b,children:j,...u}=t(e,["size"]),v=c("relative block w-full overflow-hidden","[&>img]:size-full [&>video]:size-full [&>canvas]:size-full [&>svg]:size-full [&>iframe]:size-full [&>picture]:size-full [&>picture>img]:size-full",n[s],a?i[f]:"",d??"");return o({render:m,ref:l,props:{className:v,style:{aspectRatio:r,...b},children:j,...u}})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{Avatar as n}from"@base-ui/react/avatar";import{transitionProps as r}from"../../internal/animate.js";import{initialsOf as o}from"../../internal/initials.js";import{controlHeightClasses as i,controlSlots as s,controlSquareClasses as l,cx as d,hasContent as c,srOnlyClasses as m,surfaceClasses as u,tintPlateClasses as f,transitionClasses as v}from"../../internal/styles.js";import{useStyleDefaults as x}from"../../internal/defaults.js";const p={xs:"text-[0.5625rem]",sm:"text-[0.6875rem]",md:"text-[0.8125rem]",lg:"text-[1rem]",xl:"text-[1.1875rem]"},h={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},b={solid:[u,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev)]"].join(" "),outline:[u,"border text-(--n-on-tint) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev)]"].join(" "),text:`text-(--n-on-tint) ${f} [box-shadow:var(--n-elev)]`},g="after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit]",j={solid:`${g} after:[box-shadow:var(--neba-plate-solid)]`,outline:`${g} after:[box-shadow:var(--neba-plate-glass)]`,text:""},y=["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 PersonIcon(){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__*/a.forwardRef(function Avatar(a,u){const{src:f,srcSet:v,alt:g,name:w,initials:N,shape:z,variant:k,size:S,color:_,elevation:A,delay:C,imageProps:I,onLoadingStatusChange:M,transition:P,className:$,style:B,children:L,...R}=x(a,["size","variant"]),Z=z??"circle",F=k??"text",q=S??"md",D=_??"primary",E=A??0,G=w?o(w):"",H=r(P),J=g??w,K=c(L)?L:(N??G)||e(PersonIcon,{}),O=Boolean(J),Q=""===J,T=d(y,i[q],l[q],p[q],"circle"===Z?"rounded-full":h[q],b[F],j[F],H.className,$??"");return t(n.Root,{ref:u,className:T,style:{...s(D,E,F),...H.style,...B},...R,children:[f?e(n.Image,{src:f,srcSet:v,alt:J??"",decoding:"async",onLoadingStatusChange:M,keepMounted:!0,...I,className:d("absolute inset-0 size-full object-cover [transition:opacity_var(--neba-duration-fill)_var(--neba-ease)] data-[error]:opacity-0 data-[loading]:opacity-0",I?.className)}):null,t(n.Fallback,{delay:f?C:void 0,className:"flex size-full items-center justify-center",children:[O?e("span",{className:m,children:J}):null,e("span",{"aria-hidden":!(!O&&!Q)||void 0,className:"contents",children:K})]})]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{Avatar as n}from"@base-ui/react/avatar";import{transitionProps as r}from"../../internal/animate.js";import{initialsOf as o}from"../../internal/initials.js";import{controlHeightClasses as s,controlSlots as i,controlSquareClasses as l,cx as d,hasContent as c,srOnlyClasses as m,surfaceClasses as u,tintPlateClasses as f,transitionClasses as v}from"../../internal/styles.js";import{useStyleDefaults as x}from"../../internal/defaults.js";const p={xs:"text-[0.5625rem]",sm:"text-[0.6875rem]",md:"text-[0.8125rem]",lg:"text-[1rem]",xl:"text-[1.1875rem]"},h={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},b={solid:u+" text-(--n-on-solid) bg-(--n-fill) [box-shadow:var(--n-elev)]",outline:u+" border text-(--n-on-tint) bg-(--n-panel) [border-color:var(--n-line)] [box-shadow:var(--n-elev)]",text:`text-(--n-on-tint) ${f} [box-shadow:var(--n-elev)]`},g="after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit]",y={solid:`${g} after:[box-shadow:var(--neba-plate-solid)]`,outline:`${g} after:[box-shadow:var(--neba-plate-glass)]`,text:""},w="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;function PersonIcon(){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__*/a.forwardRef(function Avatar(a,u){const{src:f,srcSet:v,alt:g,name:j,initials:N,shape:z,variant:k,size:S,color:_,elevation:A,delay:C,imageProps:I,onLoadingStatusChange:M,transition:P,className:$,style:B,children:L,...R}=x(a,["size","variant"]),Z=z??"circle",F=k??"text",q=S??"md",D=_??"primary",E=A??0,G=j?o(j):"",H=r(P),J=g??j,K=c(L)?L:(N??G)||e(PersonIcon,{}),O=Boolean(J),Q=""===J,T=d(w,s[q],l[q],p[q],"circle"===Z?"rounded-full":h[q],b[F],y[F],H.className,$??"");return t(n.Root,{ref:u,className:T,style:{...i(D,E,F),...H.style,...B},...R,children:[f?e(n.Image,{src:f,srcSet:v,alt:J??"",decoding:"async",onLoadingStatusChange:M,keepMounted:!0,...I,className:d("absolute inset-0 size-full object-cover [transition:opacity_var(--neba-duration-fill)_var(--neba-ease)] data-[error]:opacity-0 data-[loading]:opacity-0",I?.className)}):null,t(n.Fallback,{delay:f?C:void 0,className:"flex size-full items-center justify-center",children:[O?e("span",{className:m,children:J}):null,e("span",{"aria-hidden":!(!O&&!Q)||void 0,className:"contents",children:K})]})]})});
@@ -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,cx as o,hasContent as a,srOnlyClasses as i,surfaceClasses as l,tintPlateClasses as r,transitionClasses as d}from"../../internal/styles.js";import{useStyleDefaults as x}from"../../internal/defaults.js";const b={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"},p={xs:"size-1.5",sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},c={xs:"text-[0.5625rem]",sm:"text-[0.625rem]",md:"text-[0.6875rem]",lg:"text-[0.75rem]",xl:"text-[0.8125rem]"},u={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"}},g={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"}},f={"top-start":"top-0 start-0","top-end":"top-0 end-0","bottom-start":"bottom-0 start-0","bottom-end":"bottom-0 end-0"},h={"top-start":"mt-[7%] ms-[7%]","top-end":"mt-[7%] me-[7%]","bottom-start":"mb-[7%] ms-[7%]","bottom-end":"mb-[7%] me-[7%]"},v={solid:[l,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[l,"border text-(--n-on-tint) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:`text-(--n-on-tint) ${r}`};export const Badge=/*@__PURE__*/n.forwardRef(function Badge(n,l){const{variant:r="solid",size:w="md",color:j="primary",density:y="default",elevation:z=0,content:N,max:$=99,dot:k=!1,showZero:B=!1,invisible:q=!1,placement:F="top-end",overlap:R="square",label:Z,className:A,style:C,children:D,...E}=x(n,["size","density","variant"]),G=a(D),H=0===N&&!B,I=!a(N)||H,J=k||I,K=q||H&&!k,L=K||J&&void 0===Z&&!a(N),M=o("pointer-events-none z-10 inline-flex shrink-0 items-center justify-center","font-semibold tabular-nums whitespace-nowrap","rounded-full",d,v[r],J?p[w]:[b[w],c[w],u[y][w]].join(" "),G?`absolute ${f[F]}`:"relative align-middle",G?J?g[w].dot:g[w].badge:"",G&&"circle"===R?h[F]:"",K?"invisible":"",A??""),O=function(e,t){return"number"==typeof e&&e>t?`${t}+`:e}(N,$),P=e("span",{ref:l,className:M,style:{...s(j,z,r),...C},"aria-hidden":!!L||void 0,...E,children:K?null:m(t,{children:[!J&&!Z||L?null:e("span",{className:i,children:Z??O}),J?null:e("span",{"aria-hidden":!!Z||void 0,children:O})]})});return G?m("span",{className:"relative inline-flex shrink-0 align-middle",children:[D,P]}):P});
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 a,hasContent as l,srOnlyClasses as o,surfaceClasses as i,tintPlateClasses as r,transitionClasses as d}from"../../internal/styles.js";import{useStyleDefaults as x}from"../../internal/defaults.js";const b={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"},p={xs:"size-1.5",sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},c={xs:"text-[0.5625rem]",sm:"text-[0.625rem]",md:"text-[0.6875rem]",lg:"text-[0.75rem]",xl:"text-[0.8125rem]"},u={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"}},g={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"}},f={"top-start":"top-0 start-0","top-end":"top-0 end-0","bottom-start":"bottom-0 start-0","bottom-end":"bottom-0 end-0"},h={"top-start":"mt-[7%] ms-[7%]","top-end":"mt-[7%] me-[7%]","bottom-start":"mb-[7%] ms-[7%]","bottom-end":"mb-[7%] me-[7%]"},v={solid:i+" text-(--n-on-solid) bg-(--n-fill) [box-shadow:var(--n-elev),var(--neba-plate-solid)]",outline:i+" border text-(--n-on-tint) bg-(--n-panel) [border-color:var(--n-line)] [box-shadow:var(--n-elev),var(--neba-plate-glass)]",text:`text-(--n-on-tint) ${r}`};export const Badge=/*@__PURE__*/s.forwardRef(function Badge(s,i){const{variant:r="solid",size:w="md",color:y="primary",density:z="default",elevation:j=0,content:N,max:$=99,dot:k=!1,showZero:B=!1,invisible:q=!1,placement:F="top-end",overlap:R="square",label:Z,className:A,style:C,children:D,...E}=x(s,["size","density","variant"]),G=l(D),H=0===N&&!B,I=!l(N)||H,J=k||I,K=q||H&&!k,L=K||J&&void 0===Z&&!l(N),M=a("pointer-events-none z-10 inline-flex shrink-0 items-center justify-center","font-semibold tabular-nums whitespace-nowrap","rounded-full",d,v[r],J?p[w]:b[w]+" "+c[w]+" "+u[z][w],G?`absolute ${f[F]}`:"relative align-middle",G?J?g[w].dot:g[w].badge:"",G&&"circle"===R?h[F]:"",K?"invisible":"",A??""),O=function(e,t){return"number"==typeof e&&e>t?`${t}+`:e}(N,$),P=e("span",{ref:i,className:M,style:{...n(y,j,r),...C},"aria-hidden":!!L||void 0,...E,children:K?null:m(t,{children:[!J&&!Z||L?null:e("span",{className:o,children:Z??O}),J?null:e("span",{"aria-hidden":!!Z||void 0,children:O})]})});return G?m("span",{className:"relative inline-flex shrink-0 align-middle",children:[D,P]}):P});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{CartesianChart as a,markTransitionClasses as n}from"../../internal/chart-frame.js";import{barBandRatio as l,barMaxThickness as r,barPath as i,barRadius as o,chartFontSizes as s,labelInk as u,labelledPoints as d,markGap as c}from"../../internal/chart.js";import{useStyleDefaults as h}from"../../internal/defaults.js";export function BarChart(t){const{orientation:n="vertical",stacked:i=!1,rounded:o=!0,barSize:s,valueLabels:u="none",series:d,yAxis:c,size:m="md",density:x="default",...f}=h(t,["size","density"]),v="full"===i;return e(a,{...f,series:d,stackedFull:v,size:m,density:x,horizontal:"horizontal"===n,stacked:!1!==i,yAxis:v?{min:0,max:100,tickFormat:e=>`${e}%`,...c}:c,includeZero:!0,bandRatio:l[x],headroom:"none"===u?0:12,children:t=>e(Bars,{context:t,stacked:!1!==i,rounded:o,barSize:s??r[m],valueLabels:u,size:m})})}function Bars({context:a,stacked:l,rounded:r,barSize:h,valueLabels:m,size:x}){const{values:f,visible:v,colors:b,hovered:p,activeIndex:z,plot:y,band:k,horizontal:g,valuePx:j,categoryPx:M,zeroPx:B,zeroPxOf:P,formatFor:S}=a,A=f.map((e,t)=>({one:e,index:t})).filter(e=>v[e.index]),F=l?1:Math.max(1,A.length),L=Math.min(h,Math.max(1,(k.band-c*(F-1))/F)),N=L*F+c*(F-1),W=[],w=[],C=s[x];return t("g",{children:[A.map(({one:a,index:s},h)=>{const x=b[s],f=null!==p&&p!==s,v="extremes"===m||"last"===m?d(a,m):null;return e("g",{opacity:f?.28:1,className:n,children:a.map((a,d)=>{if(null===a.value)return null;const f=M(d),b=l?0:h*(L+c)-N/2+L/2,p=l?a.value>=0?W[d]??0:w[d]??0:0,k=0===p?P(s):j(p,s),B=j(p+a.value,s);l&&(a.value>=0?W[d]=p+a.value:w[d]=p+a.value);const A=l&&0!==p?c:0,F=Math.abs(B-k)-A;if(F<=0)return null;const I=B<k,O=d===z,R=g?i(Math.min(k,B)+(I?0:A),y.top+f+b-L/2,F,L,r&&!l?o:r?o/2:0,a.value>=0?"right":"left"):i(y.left+f+b-L/2,Math.min(k,B)+(I?0:A),L,F,r&&!l?o:r?o/2:0,a.value>=0?"up":"down");return t("g",{children:[e("path",{d:R,fill:a.color??x,opacity:O?1:.92,className:n}),"none"===m||v&&!v(d)?null:e("text",{x:g?B+(a.value>=0?5:-5):y.left+f+b,y:g?y.top+f+b:a.value>=0?B-5:B+C+2,textAnchor:g?a.value>=0?"start":"end":"middle",dominantBaseline:g?"central":void 0,fontSize:C,fontWeight:500,fill:u(a.color??x),className:"tabular-nums",children:a.label??S(s)(a.value)})]},d)})},s)}),e("line",g?{x1:B,x2:B,y1:y.top,y2:y.top+y.height,stroke:"var(--neba-chart-baseline)",strokeWidth:1}:{x1:y.left,x2:y.left+y.width,y1:B,y2:B,stroke:"var(--neba-chart-baseline)",strokeWidth:1})]})}
1
+ "use client";import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import*as l from"react";import{CartesianChart as n,markTransitionClasses as r}from"../../internal/chart-frame.js";import{barBandRatio as o,barMaxThickness as i,barPath as s,barRadius as c,chartFontSizes as u,labelInk as d,labelledPoints as h,markGap as m}from"../../internal/chart.js";import{useStyleDefaults as x}from"../../internal/defaults.js";export function BarChart(a){const{orientation:t="vertical",stacked:l=!1,rounded:r=!0,barSize:s,valueLabels:c="none",series:u,yAxis:d,size:h="md",density:m="default",...f}=x(a,["size","density"]),b="full"===l;return e(n,{...f,series:u,stackedFull:b,size:h,density:m,horizontal:"horizontal"===t,stacked:!1!==l,yAxis:b?{min:0,max:100,tickFormat:e=>`${e}%`,...d}:d,includeZero:!0,bandRatio:o[m],headroom:"none"===c?0:12,children:a=>e(Bars,{context:a,stacked:!1!==l,rounded:r,barSize:s??i[h],valueLabels:c,size:h})})}const f=64;function Bars({context:t,stacked:n,rounded:o,barSize:i,valueLabels:x,size:v}){const{values:p,visible:y,colors:g,hovered:z,activeIndex:k,plot:M,band:j,horizontal:S,valuePx:B,categoryPx:F,zeroPx:P,zeroPxOf:A,formatFor:L}=t,N=u[v],W="none"===x?null:L,w=l.useMemo(()=>{const e=p.map((e,a)=>({one:e,index:a})).filter(e=>y[e.index]),a=n?1:Math.max(1,e.length),t=Math.min(i,Math.max(1,(j.band-m*(a-1))/a)),l=t*a+m*(a-1),r=[],u=[];return e.map(({one:e,index:a},i)=>{const b=g[a],v="extremes"===x||"last"===x?h(e,x):null,p=[];e.forEach((e,h)=>{if(null===e.value)return;const f=F(h),y=n?0:i*(t+m)-l/2+t/2,g=n?e.value>=0?r[h]??0:u[h]??0:0,z=0===g?A(a):B(g,a),k=B(g+e.value,a);n&&(e.value>=0?r[h]=g+e.value:u[h]=g+e.value);const j=n&&0!==g?m:0,P=Math.abs(k-z)-j;if(P<=0)return;const L=k<z,w=S?s(Math.min(z,k)+(L?0:j),M.top+f+y-t/2,P,t,o&&!n?c:o?c/2:0,e.value>=0?"right":"left"):s(M.left+f+y-t/2,Math.min(z,k)+(L?0:j),t,P,o&&!n?c:o?c/2:0,e.value>=0?"up":"down");p.push({category:h,path:w,fill:e.color??b,label:"none"===x||v&&!v(h)?null:{x:S?k+(e.value>=0?5:-5):M.left+f+y,y:S?M.top+f+y:e.value>=0?k-5:k+N+2,anchor:S?e.value>=0?"start":"end":"middle",baseline:S?"central":void 0,fill:d(e.color??b),text:e.label??W(a)(e.value)}})});const y=[];for(let e=0;e<p.length;e+=f)y.push(p.slice(e,e+f));return{index:a,runs:y}})},[p,y,g,M,j,S,B,F,A,W,n,o,i,x,N]);return a("g",{children:[w.map(({index:a,runs:t})=>e("g",{opacity:null!==z&&z!==a?.28:1,className:r,children:t.map((a,t)=>e(b,{bars:a,active:null!==k&&k>=a[0].category&&k<=a[a.length-1].category?k:null,labelSize:N},t))},a)),e("line",S?{x1:P,x2:P,y1:M.top,y2:M.top+M.height,stroke:"var(--neba-chart-baseline)",strokeWidth:1}:{x1:M.left,x2:M.left+M.width,y1:P,y2:P,stroke:"var(--neba-chart-baseline)",strokeWidth:1})]})}const b=/*@__PURE__*/l.memo(function BarRun({bars:l,active:n,labelSize:o}){return e(t,{children:l.map(t=>a("g",{children:[e("path",{d:t.path,fill:t.fill,opacity:t.category===n?1:.92,className:r}),t.label?e("text",{x:t.label.x,y:t.label.y,textAnchor:t.label.anchor,dominantBaseline:t.label.baseline,fontSize:o,fontWeight:500,fill:t.label.fill,className:"tabular-nums",children:t.label.text}):null]},t.category))})});
@@ -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{cx as l,hasContent as o,metaTextClasses as s,radiusClasses as i,surfaceClasses as c,surfaceSlots as m,transitionClasses as d}from"../../internal/styles.js";import{useStyleDefaults as f}from"../../internal/defaults.js";const u={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={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 QuoteMarkIcon(){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 Blockquote(t,c){const{variant:p="text",size:b="md",color:h="primary",density:v="default",elevation:g=0,author:j,source:N,cite:y,icon:k,transition:w,className:z,style:B,children:M,...q}=f(t,["size","density","variant"]),I=a(w),Q=o(j)||o(N),Z=void 0===k?e(QuoteMarkIcon,{}):k,C=l("flex flex-col text-(--neba-fg)","border-s-2 [border-inline-start-color:var(--n-accent)]","text"===p?"":`${i[b]} rounded-s-none`,x[p],n[v][b],d,I.className,z??""),R=r("blockquote",{cite:y,className:u[b],children:[o(Z)?e("span",{"aria-hidden":"true",className:"mb-1 block size-[2em] text-(--n-soft-press) [&>svg]:size-full",children:Z}):null,M]}),$={...m(h,g),...I.style,...B};return Q?r("figure",{ref:c,className:C,style:$,...q,children:[R,r("figcaption",{className:["mt-2 flex flex-wrap items-baseline gap-x-1.5 text-(--neba-muted-fg)",s[b]].join(" "),children:[o(j)?r("span",{className:"font-medium text-(--neba-fg)",children:[e("span",{"aria-hidden":"true",children:"— "}),j]}):null,o(N)?e("cite",{className:"not-italic",children:N}):null]})]}):e("div",{ref:c,className:C,style:$,...q,children:R})});
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{boxPaddingClasses as a}from"../box/Box.js";import{transitionProps as n}from"../../internal/animate.js";import{cx as l,hasContent as s,metaTextClasses as o,radiusClasses as i,surfaceClasses as c,surfaceSlots as m,transitionClasses as d}from"../../internal/styles.js";import{useStyleDefaults as f}from"../../internal/defaults.js";const u={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={solid:c+" bg-(--n-panel-hover) [box-shadow:var(--n-elev),var(--neba-plate-solid)]",outline:c+" border border-s-2 bg-(--n-panel) [border-color:var(--n-line)] [box-shadow:var(--n-elev),var(--neba-plate-glass)]",text:"bg-transparent"};function QuoteMarkIcon(){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 Blockquote(t,c){const{variant:p="text",size:b="md",color:h="primary",density:v="default",elevation:g=0,author:N,source:y,cite:j,icon:k,transition:w,className:z,style:B,children:M,...q}=f(t,["size","density","variant"]),I=n(w),Q=s(N)||s(y),Z=void 0===k?e(QuoteMarkIcon,{}):k,C=l("flex flex-col text-(--neba-fg)","border-s-2 [border-inline-start-color:var(--n-accent)]","text"===p?"":`${i[b]} rounded-s-none`,x[p],a[v][b],d,I.className,z??""),R=r("blockquote",{cite:j,className:u[b],children:[s(Z)?e("span",{"aria-hidden":"true",className:"mb-1 block size-[2em] text-(--n-soft-press) [&>svg]:size-full",children:Z}):null,M]}),$={...m(h,g),...I.style,...B};return Q?r("figure",{ref:c,className:C,style:$,...q,children:[R,r("figcaption",{className:"mt-2 flex flex-wrap items-baseline gap-x-1.5 text-(--neba-muted-fg) "+o[b],children:[s(N)?r("span",{className:"font-medium text-(--neba-fg)",children:[e("span",{"aria-hidden":"true",children:"— "}),N]}):null,s(y)?e("cite",{className:"not-italic",children:y}):null]})]}):e("div",{ref:c,className:C,style:$,...q,children:R})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as t,jsxs as a}from"react/jsx-runtime";import*as n from"react";import{useRender as i}from"@base-ui/react/use-render";import{barMinHeightClasses as r,BottomNavigationContext as l}from"../../internal/bottom-navigation.js";import{safeHref as o,safeRel as s}from"../../internal/link.js";import{NewTabNote as d}from"../../internal/new-tab.js";import{cx as c,hasContent as m,iconSizeClasses as u,metaTextClasses as p,paddingXClasses as f,radiusClasses as g,srOnlyClasses as b,surfaceClasses as v,surfaceSlots as x,transitionClasses as h}from"../../internal/styles.js";import{useStyleDefaults as y}from"../../internal/defaults.js";const w={solid:[v,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[v,"text-(--neba-fg) bg-(--n-panel)","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"},N={static:"",sticky:"sticky bottom-0 z-20",fixed:"fixed inset-x-0 bottom-0 z-30"},j={default:{xs:"p-1",sm:"p-1",md:"p-1.5",lg:"p-2",xl:"p-2.5"},compact:{xs:"p-0.5",sm:"p-0.5",md:"p-1",lg:"p-1",xl:"p-1.5"}},z={xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"};export const BottomNavigation=/*@__PURE__*/n.forwardRef(function BottomNavigation(t,a){const{variant:o="outline",size:s="md",color:d="primary",density:m="default",elevation:u=0,value:p,defaultValue:f=null,onValueChange:b,position:v="fixed",labels:z="all",divider:k=!0,safeArea:C=!0,disabled:B=!1,label:I,render:R,className:V,style:_,children:A,...D}=y(t,["size","density","variant"]),[F,M]=n.useState(f),P=void 0!==p,S=P?p:F,q=n.useCallback(e=>{P||M(e),b?.(e)},[P,b]),E=n.useMemo(()=>({value:S??null,change:q,size:s,density:m,labels:z,disabled:B,floating:!1}),[S,q,s,m,z,B]),G=c("w-full min-w-0","static"===v?g[s]:"",w[o],"outline"===o&&"static"===v?"border [border-color:var(--n-line)]":"",k?"border-t [border-color:var(--n-line)]":"",N[v],C&&"static"!==v?"pb-[env(safe-area-inset-bottom)]":"",h,V);return i({render:R??e("nav",{}),ref:a,props:{"aria-label":I,className:G,style:{...x(d,u),..._},children:e(l.Provider,{value:E,children:e("div",{className:c("flex w-full items-stretch",r[s],j[m][s]),children:A})}),...D}})});export const BottomNavigationItem=/*@__PURE__*/n.forwardRef(function BottomNavigationItem({value:i,icon:r,href:v,target:x,rel:y,disabled:w=!1,className:N,children:j,onClick:k,...C},B){const I=n.useContext(l),R=w||I.disabled,V=null!==I.value&&I.value===i,_="all"===I.labels||"selected"===I.labels&&V,A=c("neba-nav-item flex min-w-0 flex-col items-center justify-center py-1.5",I.floating?c("relative z-10",f[I.density][I.size],"rounded-full"):c("flex-1 px-1",g[I.size]),z[I.size],"[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",h,"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]",R?"cursor-not-allowed text-(--neba-disabled-fg)":V?I.floating?"cursor-pointer font-medium text-(--n-on-tint)":"cursor-pointer font-medium text-(--n-on-tint) bg-(--n-soft) hover:bg-(--n-soft-hover)":"cursor-pointer text-(--neba-muted-fg) hover:text-(--neba-fg) hover:bg-(--n-panel-hover)",N),D=a(t,{children:[m(r)?e("span",{className:c("flex shrink-0 items-center justify-center",u[I.size]),children:r}):null,m(j)?I.floating&&"selected"===I.labels?e("span",{"data-drawn":_?"":void 0,className:c("grid justify-items-center [grid-template-rows:1fr]","[transition-property:grid-template-columns,opacity]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","motion-reduce:[transition-duration:0ms]",_?"[grid-template-columns:1fr] opacity-100":"[grid-template-columns:0fr] opacity-0"),children:e("span",{className:c("min-w-0 truncate leading-tight",p[I.size]),children:j})}):e("span",{"data-drawn":_?"":void 0,className:_?c("max-w-full truncate leading-tight",p[I.size]):"selected"===I.labels?c("max-w-full truncate leading-tight opacity-0",p[I.size]):b,children:j}):null]}),F=e=>{R?e.preventDefault():(I.change(i),k?.(e))},M=o(v);return M?a("a",{ref:B,"data-nav-item":"",href:R?void 0:M,"aria-current":V?"page":void 0,"aria-disabled":R||void 0,className:A,onClick:F,target:x,rel:s(x,y),...C,children:[D,e(d,{target:x})]}):e("button",{ref:B,"data-nav-item":"",type:"button",disabled:R,"aria-current":V?"page":void 0,className:A,onClick:F,...C,children:D})});
1
+ "use client";import{jsx as e,Fragment as t,jsxs as a}from"react/jsx-runtime";import*as n from"react";import{useRender as i}from"@base-ui/react/use-render";import{barMinHeightClasses as r,BottomNavigationContext as l}from"../../internal/bottom-navigation.js";import{safeHref as o,safeRel as s}from"../../internal/link.js";import{NewTabNote as d}from"../../internal/new-tab.js";import{cx as c,hasContent as m,iconSizeClasses as u,metaTextClasses as p,paddingXClasses as f,radiusClasses as g,srOnlyClasses as b,surfaceClasses as v,surfaceSlots as x,transitionClasses as h}from"../../internal/styles.js";import{useStyleDefaults as y}from"../../internal/defaults.js";const w={solid:v+" text-(--neba-fg) bg-(--n-panel-hover) [box-shadow:var(--n-elev),var(--neba-plate-solid)]",outline:v+" text-(--neba-fg) bg-(--n-panel) [box-shadow:var(--n-elev),var(--neba-plate-glass)]",text:"text-(--neba-fg) bg-transparent"},N={static:"",sticky:"sticky bottom-0 z-20",fixed:"fixed inset-x-0 bottom-0 z-30"},z={default:{xs:"p-1",sm:"p-1",md:"p-1.5",lg:"p-2",xl:"p-2.5"},compact:{xs:"p-0.5",sm:"p-0.5",md:"p-1",lg:"p-1",xl:"p-1.5"}},j={xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"};export const BottomNavigation=/*@__PURE__*/n.forwardRef(function BottomNavigation(t,a){const{variant:o="outline",size:s="md",color:d="primary",density:m="default",elevation:u=0,value:p,defaultValue:f=null,onValueChange:b,position:v="fixed",labels:j="all",divider:k=!0,safeArea:C=!0,disabled:B=!1,label:I,render:R,className:V,style:_,children:A,...D}=y(t,["size","density","variant"]),[F,M]=n.useState(f),P=void 0!==p,S=P?p:F,q=n.useCallback(e=>{P||M(e),b?.(e)},[P,b]),E=n.useMemo(()=>({value:S??null,change:q,size:s,density:m,labels:j,disabled:B,floating:!1}),[S,q,s,m,j,B]),G=c("w-full min-w-0","static"===v?g[s]:"",w[o],"outline"===o&&"static"===v?"border [border-color:var(--n-line)]":"",k?"border-t [border-color:var(--n-line)]":"",N[v],C&&"static"!==v?"pb-[env(safe-area-inset-bottom)]":"",h,V);return i({render:R??e("nav",{}),ref:a,props:{"aria-label":I,className:G,style:{...x(d,u),..._},children:e(l.Provider,{value:E,children:e("div",{className:c("flex w-full items-stretch",r[s],z[m][s]),children:A})}),...D}})});export const BottomNavigationItem=/*@__PURE__*/n.forwardRef(function BottomNavigationItem({value:i,icon:r,href:v,target:x,rel:y,disabled:w=!1,className:N,children:z,onClick:k,...C},B){const I=n.useContext(l),R=w||I.disabled,V=null!==I.value&&I.value===i,_="all"===I.labels||"selected"===I.labels&&V,A=c("neba-nav-item flex min-w-0 flex-col items-center justify-center py-1.5 no-underline",I.floating?c("relative z-10",f[I.density][I.size],"rounded-full"):c("flex-1 px-1",g[I.size]),j[I.size],"[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",h,"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]",R?"cursor-not-allowed text-(--neba-disabled-fg)":V?I.floating?"cursor-pointer font-medium text-(--n-on-tint)":"cursor-pointer font-medium text-(--n-on-tint) bg-(--n-soft) hover:bg-(--n-soft-hover)":"cursor-pointer text-(--neba-muted-fg) hover:text-(--neba-fg) hover:bg-(--n-panel-hover)",N),D=a(t,{children:[m(r)?e("span",{className:c("flex shrink-0 items-center justify-center",u[I.size]),children:r}):null,m(z)?I.floating&&"selected"===I.labels?e("span",{"data-drawn":_?"":void 0,className:c("grid justify-items-center [grid-template-rows:1fr]","[transition-property:grid-template-columns,opacity]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","motion-reduce:[transition-duration:0ms]",_?"[grid-template-columns:1fr] opacity-100":"[grid-template-columns:0fr] opacity-0"),children:e("span",{className:c("min-w-0 truncate leading-tight",p[I.size]),children:z})}):e("span",{"data-drawn":_?"":void 0,className:_?c("max-w-full truncate leading-tight",p[I.size]):"selected"===I.labels?c("max-w-full truncate leading-tight opacity-0",p[I.size]):b,children:z}):null]}),F=e=>{R?e.preventDefault():(I.change(i),k?.(e))},M=o(v);return M?a("a",{ref:B,"data-nav-item":"",href:R?void 0:M,"aria-current":V?"page":void 0,"aria-disabled":R||void 0,className:A,onClick:F,target:x,rel:s(x,y),...C,children:[D,e(d,{target:x})]}):e("button",{ref:B,"data-nav-item":"",type:"button",disabled:R,"aria-current":V?"page":void 0,className:A,onClick:F,...C,children:D})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{useLayoutEffectOnClient as a}from"../../internal/layout-effect.js";import{useRender as s}from"@base-ui/react/use-render";import{safeHref as l,safeRel as i}from"../../internal/link.js";import{NewTabNote as o}from"../../internal/new-tab.js";import{breadcrumbMessages as c,useMessages as d}from"../../internal/i18n.js";import{ArrowRightIcon as m,ChevronIcon as u,EllipsisIcon as p}from"../../internal/icons.js";import{controlTextClasses as f,cx as h,gapClasses as x,hasContent as b,iconClasses as g,radiusClasses as y,transitionClasses as v}from"../../internal/styles.js";import{useStyleDefaults as N}from"../../internal/defaults.js";const j=/*@__PURE__*/n.createContext({size:"md",last:!1}),k={default:{xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"},compact:{xs:"gap-0.5",sm:"gap-1",md:"gap-1",lg:"gap-1.5",xl:"gap-2"}},w={xs:y.xs,sm:y.xs,md:y.xs,lg:y.sm,xl:y.sm};const C=["chevron","arrow","slash","dot"];function B(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(B).join(""):n.isValidElement(e)?B(e.props.children):""}function I(e,t){if(!t)return e;try{return new URL(e,t).href}catch{return e}}function $(e,t){const r=e.map((e,r)=>{const{children:n}=e.props,a=l(e.props.href);return{"@type":"ListItem",position:r+1,name:B(n),...a?{item:I(a,t)}:null}});return JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:r}).replace(/</g,"\\u003c")}export const Breadcrumb=/*@__PURE__*/n.forwardRef(function Breadcrumb(r,s){const{size:l="md",color:i="primary",density:o="default",separator:x="chevron",maxItems:b,itemsBeforeCollapse:y=1,itemsAfterCollapse:w=1,expandable:I=!0,keepMounted:E=!1,locale:L,label:M,expandLabel:S,structuredData:_=!1,baseUrl:z,className:A,style:R,children:q,...F}=N(r,["size","density","locale"]),T=d(c,L),U=n.Children.toArray(q).filter(n.isValidElement),V=U.length,D=U.map(e=>`${e.key??""}\0${e.props.href??""}\0${B(e.props.children)}`).join(""),[H,J]=n.useState(null),O=H===D,P=n.useRef(null),G=n.useRef(!1);a(()=>{if(!O||!G.current)return;G.current=!1;const e=P.current?.querySelectorAll(":scope > li:not([aria-hidden])")[Math.max(0,y)];e?.querySelector("a, button")?.focus()},[O,y]);const K=U.some(e=>!0===e.props.current),Q=!O&&void 0!==b&&V>Math.max(b,1)&&V-y-w>1,W=Math.max(0,y),X=V-Math.max(0,w),Y=[];U.forEach((e,t)=>{const r=Q&&t>=W&&t<X;Q&&t===W&&Y.push({step:null,at:-1,folded:!1}),r?E&&Y.push({step:n.cloneElement(e,{hidden:!0}),at:t,folded:r}):Y.push({step:e,at:t,folded:r})});const Z=Y.reduce((e,t)=>t.folded?e:t.step?t.at:-1,-1),ee="string"==typeof(te=x)&&C.includes(te)?function(t){switch(t){case"chevron":return e("span",{className:"flex -rotate-90 items-center rtl:rotate-90",children:e(u,{})});case"arrow":return e("span",{className:"flex items-center rtl:rotate-180",children:e(m,{})});case"slash":return e("span",{className:"opacity-70",children:"/"});case"dot":return e("span",{className:"opacity-70",children:"·"});default:return null}}(x):x;var te;const re=h("inline-flex items-center rounded-(--neba-radius-xs) px-0.5","text-(--neba-muted-fg)",v,g,I?h("cursor-pointer hover:bg-(--n-soft) hover:text-(--n-on-tint)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"");return t("nav",{ref:s,"aria-label":M??T.label,className:h("flex",f[l],g,A),style:{"--n-accent":`var(--neba-${i}-accent)`,"--n-on-tint":`var(--neba-${i}-on-tint)`,"--n-soft":`var(--neba-${i}-soft)`,"--n-ring":`var(--neba-${i}-ring)`,...R},...F,children:[_&&V>0?e("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:$(U,z)}}):null,e("ol",{ref:P,role:"list",className:h("flex list-none flex-wrap items-center p-0",k[o][l]),children:Y.map(({step:r,at:a,folded:s},i)=>t(n.Fragment,{children:[i>0?e("li",{"aria-hidden":"true",hidden:s||void 0,className:"flex shrink-0 items-center text-(--neba-muted-fg) select-none [&[hidden]]:hidden",children:ee}):null,r?e(j.Provider,{value:{size:l,locale:L,last:!K&&a===Z},children:r}):e("li",{className:"flex shrink-0 items-center",children:I?e("button",{type:"button",className:re,"aria-label":S??T.expand,onClick:e=>{G.current=e.currentTarget===document.activeElement,J(D)},children:e(p,{})}):e("span",{className:re,"aria-hidden":"true",children:e(p,{})})})]},r?r.key??a:"fold"))})]})});export const BreadcrumbItem=/*@__PURE__*/n.forwardRef(function BreadcrumbItem({href:a,onClick:c,render:d,target:m,rel:u,startIcon:p,endIcon:f,current:g,disabled:y=!1,className:N,children:k,...C},B){const{size:I,locale:$,last:E}=n.useContext(j),L=l(a),M=g??E,S=Boolean(L||c||d)&&!M&&!y,_=S&&Boolean(L||d),z=h("inline-flex min-w-0 items-center px-1",x[I],w[I],v,y?"cursor-not-allowed text-(--neba-disabled-fg)":M?"font-medium text-(--neba-fg)":S?h("cursor-pointer text-(--neba-muted-fg)","hover:bg-(--n-soft) hover:text-(--n-on-tint)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"text-(--neba-muted-fg)"),A=t(r,{children:[b(p)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:p}):null,e("span",{className:"truncate",children:k}),b(f)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:f}):null]}),R=s({render:d??e("a",{}),props:{href:L,target:m,rel:i(m,u),className:z,onClick:c,children:t(r,{children:[A,e(o,{target:m,locale:$})]})}});return e("li",{ref:B,className:h("flex min-w-0 items-center [&[hidden]]:hidden",N),...C,children:_?R:S?e("button",{type:"button",className:z,onClick:c,children:A}):e("span",{className:z,"aria-current":M?"page":void 0,"aria-disabled":y||void 0,children:A})})});
1
+ "use client";import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import{useLayoutEffectOnClient as a}from"../../internal/layout-effect.js";import{useRender as s}from"@base-ui/react/use-render";import{safeHref as l,safeRel as i}from"../../internal/link.js";import{NewTabNote as o}from"../../internal/new-tab.js";import{breadcrumbMessages as c,useMessages as d}from"../../internal/i18n.js";import{ArrowRightIcon as m,ChevronIcon as u,EllipsisIcon as p}from"../../internal/icons.js";import{controlTextClasses as f,cx as h,gapClasses as x,hasContent as b,iconClasses as g,radiusClasses as y,transitionClasses as v}from"../../internal/styles.js";import{useStyleDefaults as N}from"../../internal/defaults.js";const j=/*@__PURE__*/r.createContext({size:"md",last:!1}),k={default:{xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"},compact:{xs:"gap-0.5",sm:"gap-1",md:"gap-1",lg:"gap-1.5",xl:"gap-2"}},w={xs:y.xs,sm:y.xs,md:y.xs,lg:y.sm,xl:y.sm};const C=["chevron","arrow","slash","dot"];function B(e){return"string"==typeof e||"number"==typeof e?String(e):Array.isArray(e)?e.map(B).join(""):r.isValidElement(e)?B(e.props.children):""}function I(e,t){if(!t)return e;try{return new URL(e,t).href}catch{return e}}function $(e,t){const n=e.map((e,n)=>{const{children:r}=e.props,a=l(e.props.href);return{"@type":"ListItem",position:n+1,name:B(r),...a?{item:I(a,t)}:null}});return JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:n}).replace(/</g,"\\u003c")}export const Breadcrumb=/*@__PURE__*/r.forwardRef(function Breadcrumb(n,s){const{size:l="md",color:i="primary",density:o="default",separator:x="chevron",maxItems:b,itemsBeforeCollapse:y=1,itemsAfterCollapse:w=1,expandable:I=!0,keepMounted:E=!1,locale:L,label:M,expandLabel:S,structuredData:_=!1,baseUrl:z,className:A,style:R,children:q,...F}=N(n,["size","density","locale"]),T=d(c,L),U=r.Children.toArray(q).filter(r.isValidElement),V=U.length,D=U.map(e=>`${e.key??""}\0${e.props.href??""}\0${B(e.props.children)}`).join(""),[H,J]=r.useState(null),O=H===D,P=r.useRef(null),G=r.useRef(!1);a(()=>{if(!O||!G.current)return;G.current=!1;const e=P.current?.querySelectorAll(":scope > li:not([aria-hidden])")[Math.max(0,y)];e?.querySelector("a, button")?.focus()},[O,y]);const K=U.some(e=>!0===e.props.current),Q=!O&&void 0!==b&&V>Math.max(b,1)&&V-y-w>1,W=Math.max(0,y),X=V-Math.max(0,w),Y=[];U.forEach((e,t)=>{const n=Q&&t>=W&&t<X;Q&&t===W&&Y.push({step:null,at:-1,folded:!1}),n?E&&Y.push({step:r.cloneElement(e,{hidden:!0}),at:t,folded:n}):Y.push({step:e,at:t,folded:n})});const Z=Y.reduce((e,t)=>t.folded?e:t.step?t.at:-1,-1),ee="string"==typeof(te=x)&&C.includes(te)?function(t){switch(t){case"chevron":return e("span",{className:"flex -rotate-90 items-center rtl:rotate-90",children:e(u,{})});case"arrow":return e("span",{className:"flex items-center rtl:rotate-180",children:e(m,{})});case"slash":return e("span",{className:"opacity-70",children:"/"});case"dot":return e("span",{className:"opacity-70",children:"·"});default:return null}}(x):x;var te;const ne=h("inline-flex items-center rounded-(--neba-radius-xs) px-0.5","text-(--neba-muted-fg)",v,g,I?h("cursor-pointer hover:bg-(--n-soft) hover:text-(--n-on-tint)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"");return t("nav",{ref:s,"aria-label":M??T.label,className:h("flex",f[l],g,A),style:{"--n-accent":`var(--neba-${i}-accent)`,"--n-on-tint":`var(--neba-${i}-on-tint)`,"--n-soft":`var(--neba-${i}-soft)`,"--n-ring":`var(--neba-${i}-ring)`,...R},...F,children:[_&&V>0?e("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:$(U,z)}}):null,e("ol",{ref:P,role:"list",className:h("flex list-none flex-wrap items-center p-0",k[o][l]),children:Y.map(({step:n,at:a,folded:s},i)=>t(r.Fragment,{children:[i>0?e("li",{"aria-hidden":"true",hidden:s||void 0,className:"flex shrink-0 items-center text-(--neba-muted-fg) select-none [&[hidden]]:hidden",children:ee}):null,n?e(j.Provider,{value:{size:l,locale:L,last:!K&&a===Z},children:n}):e("li",{className:"flex shrink-0 items-center",children:I?e("button",{type:"button",className:ne,"aria-label":S??T.expand,onClick:e=>{G.current=e.currentTarget===document.activeElement,J(D)},children:e(p,{})}):e("span",{className:ne,"aria-hidden":"true",children:e(p,{})})})]},n?n.key??a:"fold"))})]})});export const BreadcrumbItem=/*@__PURE__*/r.forwardRef(function BreadcrumbItem({href:a,onClick:c,render:d,target:m,rel:u,startIcon:p,endIcon:f,current:g,disabled:y=!1,className:N,children:k,...C},B){const{size:I,locale:$,last:E}=r.useContext(j),L=l(a),M=g??E,S=Boolean(L||c||d)&&!M&&!y,_=S&&Boolean(L||d),z=h("inline-flex min-w-0 items-center px-1 no-underline",x[I],w[I],v,y?"cursor-not-allowed text-(--neba-disabled-fg)":M?"font-medium text-(--neba-fg)":S?h("cursor-pointer text-(--neba-muted-fg)","hover:bg-(--n-soft) hover:text-(--n-on-tint)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"):"text-(--neba-muted-fg)"),A=t(n,{children:[b(p)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:p}):null,e("span",{className:"truncate",children:k}),b(f)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:f}):null]}),R=s({render:d??e("a",{}),props:{href:L,target:m,rel:i(m,u),className:z,onClick:c,children:t(n,{children:[A,e(o,{target:m,locale:$})]})}});return e("li",{ref:B,className:h("flex min-w-0 items-center [&[hidden]]:hidden",N),...C,children:_?R:S?e("button",{type:"button",className:z,onClick:c,children:A}):e("span",{className:z,"aria-current":M?"page":void 0,"aria-disabled":y||void 0,children:A})})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as o,jsxs as n}from"react/jsx-runtime";import*as r from"react";import{Button as t}from"@base-ui/react/button";import{useRender as a}from"@base-ui/react/use-render";import{trackPointer as l}from"../../internal/glow.js";import{ButtonGroupContext as s}from"../../internal/button-group.js";import{SpinnerIcon as i}from"../../internal/icons.js";import{controlHeightClasses as d,controlSlots as v,controlSquareClasses as b,controlTextClasses as p,cx as c,disabledClasses as m,focusRingClasses as x,gapClasses as u,iconClasses as g,paddingXClasses as f,pressTransitionClasses as h,radiusClasses as $,readOnlyFilterClasses as j,surfaceClasses as w,transitionClasses as y}from"../../internal/styles.js";import{useStyleDefaults as k}from"../../internal/defaults.js";const z={xs:`${d.xs} ${u.xs} ${$.xs} ${p.xs}`,sm:`${d.sm} ${u.sm} ${$.sm} ${p.sm}`,md:`${d.md} ${u.md} ${$.md} ${p.md}`,lg:`${d.lg} ${u.lg} ${$.lg} ${p.lg}`,xl:`${d.xl} ${u.xl} ${$.xl} ${p.xl}`},B={xs:`${b.xs} px-0`,sm:`${b.sm} px-0`,md:`${b.md} px-0`,lg:`${b.lg} px-0`,xl:`${b.xl} px-0`},C=["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,h,x,g].join(" "),D={solid:[w,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[w,"border text-(--n-on-tint) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-on-tint) 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)"},W={solid:[w,j,"cursor-default text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--neba-plate-solid)]"].join(" "),outline:[w,j,"cursor-default border text-(--n-on-tint) bg-(--n-panel)","[border-color:var(--n-line)] [box-shadow:var(--neba-plate-glass)]"].join(" "),text:`${j} cursor-default text-(--n-on-tint) bg-transparent`};export const Button=/*@__PURE__*/r.forwardRef(function Button(d,b){const p=r.useContext(s),{variant:x,size:u,color:g,density:h,elevation:$,startIcon:j,endIcon:w,loading:y=!1,readOnly:I=!1,fullWidth:M=!1,disabled:N,focusableWhenDisabled:F=!1,render:O,className:R,style:q,children:A,onClick:E,onPointerMove:G,...H}=k(d,["size","density","variant"],p),J=x??p?.variant??"solid",K=u??p?.size??"md",L=g??p?.color??"primary",Q=h??p?.density??"default",S=$??p?.elevation??0,T=N??p?.disabled??!1,U=y||I,V=c(C,z[K],null==A||!1===A?B[K]:f[Q][K],T?m[J]:I?W[J]:D[J],T||U?"":[P[J],"neba-glow","cursor-pointer"].join(" "),y?"cursor-progress":"",M?"w-full":"",R??"");return a({render:O??e(t,{disabled:T,focusableWhenDisabled:F}),ref:b,props:{className:V,style:{...v(L,S,J),...q},...U?{"aria-disabled":!0}:null,"aria-busy":y||void 0,"data-loading":y||void 0,"data-readonly":I||void 0,onClick:e=>{if(U)return e.preventDefault(),void e.stopPropagation();E?.(e)},onPointerMove:l(G,!T&&!U),...H,children:n(o,{children:[y?e(i,{}):j,A,w]})}})});
1
+ "use client";import{jsx as e,Fragment as n,jsxs as o}from"react/jsx-runtime";import*as r from"react";import{Button as t}from"@base-ui/react/button";import{useRender as a}from"@base-ui/react/use-render";import{trackPointer as l}from"../../internal/glow.js";import{ButtonGroupContext as s}from"../../internal/button-group.js";import{SpinnerIcon as i}from"../../internal/icons.js";import{controlHeightClasses as d,controlSlots as v,controlSquareClasses as b,controlTextClasses as p,cx as c,disabledClasses as m,focusRingClasses as x,gapClasses as u,iconClasses as g,paddingXClasses as f,pressTransitionClasses as h,radiusClasses as $,readOnlyFilterClasses as w,surfaceClasses as y,transitionClasses as j}from"../../internal/styles.js";import{useStyleDefaults as k}from"../../internal/defaults.js";const z={xs:`${d.xs} ${u.xs} ${$.xs} ${p.xs}`,sm:`${d.sm} ${u.sm} ${$.sm} ${p.sm}`,md:`${d.md} ${u.md} ${$.md} ${p.md}`,lg:`${d.lg} ${u.lg} ${$.lg} ${p.lg}`,xl:`${d.xl} ${u.xl} ${$.xl} ${p.xl}`},B={xs:`${b.xs} px-0`,sm:`${b.sm} px-0`,md:`${b.md} px-0`,lg:`${b.lg} px-0`,xl:`${b.xl} px-0`},C="relative inline-flex shrink-0 select-none items-center justify-center no-underline whitespace-nowrap align-middle font-medium leading-none [-webkit-tap-highlight-color:transparent] [touch-action:manipulation] "+j+" "+h+" "+x+" "+g,D={solid:y+" text-(--n-on-solid) bg-(--n-fill) [box-shadow:var(--n-elev),var(--neba-plate-solid)]",outline:y+" border text-(--n-on-tint) bg-(--n-panel) [border-color:var(--n-line)] [box-shadow:var(--n-elev),var(--neba-plate-glass)]",text:"text-(--n-on-tint) 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)]",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)]",text:"hover:bg-(--n-soft) active:bg-(--n-soft-hover)"},W={solid:y+" "+w+" cursor-default text-(--n-on-solid) bg-(--n-fill) [box-shadow:var(--neba-plate-solid)]",outline:y+" "+w+" cursor-default border text-(--n-on-tint) bg-(--n-panel) [border-color:var(--n-line)] [box-shadow:var(--neba-plate-glass)]",text:`${w} cursor-default text-(--n-on-tint) bg-transparent`};export const Button=/*@__PURE__*/r.forwardRef(function Button(d,b){const p=r.useContext(s),{variant:x,size:u,color:g,density:h,elevation:$,startIcon:w,endIcon:y,loading:j=!1,readOnly:I=!1,fullWidth:M=!1,disabled:N,focusableWhenDisabled:F=!1,render:O,className:R,style:q,children:A,onClick:E,onPointerMove:G,...H}=k(d,["size","density","variant"],p),J=x??p?.variant??"solid",K=u??p?.size??"md",L=g??p?.color??"primary",Q=h??p?.density??"default",S=$??p?.elevation??0,T=N??p?.disabled??!1,U=j||I,V=c(C,z[K],null==A||!1===A?B[K]:f[Q][K],T?m[J]:I?W[J]:D[J],T||U?"":P[J]+" neba-glow cursor-pointer",j?"cursor-progress":"",M?"w-full":"",R??"");return a({render:O??e(t,{disabled:T,focusableWhenDisabled:F}),ref:b,props:{className:V,style:{...v(L,S,J),...q},...U?{"aria-disabled":!0}:null,"aria-busy":j||void 0,"data-loading":j||void 0,"data-readonly":I||void 0,onClick:e=>{if(U)return e.preventDefault(),void e.stopPropagation();E?.(e)},onPointerMove:l(G,!T&&!U),...H,children:o(n,{children:[j?e(i,{}):w,A,y]})}})});
@@ -1 +1 @@
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 t}from"../../internal/styles.js";import{useStyleDefaults as n}from"../../internal/defaults.js";const r={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"},l={horizontal:"[&>*:not(:first-child)]:-ms-px",vertical:"[&>*:not(:first-child)]:-mt-px"},s=["align-middle","[&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10","[&>*]:shrink-0"].join(" ");export const ButtonGroup=/*@__PURE__*/o.forwardRef(function ButtonGroup(a,d){const{variant:c,size:f,color:u,density:m,elevation:h,orientation:v="horizontal",disabled:p,fullWidth:x=!1,className:z,children:j,...b}=n(a,["size","density","variant"]),y=o.useMemo(()=>({variant:c,size:f,color:u,density:m,elevation:h,disabled:p}),[c,f,u,m,h,p]);return e(i.Provider,{value:y,children:e("div",{ref:d,role:"group",className:t(s,"vertical"===v?"flex-col":"flex-row",r[v],"outline"===(c??"solid")?l[v]:"",x?"flex w-full [&>*]:flex-1":"inline-flex",z??""),...b,children:j})})});
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as o from"react";import{ButtonGroupContext as t}from"../../internal/button-group.js";import{cx as i}from"../../internal/styles.js";import{useStyleDefaults as n}from"../../internal/defaults.js";const r={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"},l={horizontal:"[&>*:not(:first-child)]:-ms-px",vertical:"[&>*:not(:first-child)]:-mt-px"};export const ButtonGroup=/*@__PURE__*/o.forwardRef(function ButtonGroup(s,a){const{variant:d,size:c,color:f,density:u,elevation:m,orientation:h="horizontal",disabled:v,fullWidth:p=!1,className:x,children:z,...b}=n(s,["size","density","variant"]),j=o.useMemo(()=>({variant:d,size:c,color:f,density:u,elevation:m,disabled:v}),[d,c,f,u,m,v]);return e(t.Provider,{value:j,children:e("div",{ref:a,role:"group",className:i("align-middle [&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10 [&>*]:shrink-0","vertical"===h?"flex-col":"flex-row",r[h],"outline"===(d??"solid")?l[h]:"",p?"flex w-full [&>*]:flex-1":"inline-flex",x??""),...b,children:z})})});
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import*as a from"react";import{Calendar as t,usePickerLabels as n}from"../../internal/calendar.js";import{compareDay as r,isSameDay as l,isValidDate as s,localeWeekStart as o,startOfMonth as i,startOfUnit as d,today as m}from"../../internal/date.js";import{popupPaddingClasses as u}from"../../internal/picker.js";import{cx as c,radiusClasses as f,surfaceClasses as g,surfaceSlots as h}from"../../internal/styles.js";import{useStyleDefaults as p}from"../../internal/defaults.js";import{useIntlLocale as v}from"../../internal/media.js";const b={single:null,multiple:[],range:{start:null,end:null}};function D(e,a){if("multiple"===e)return a??[];if("range"===e){const e=a??b.range;return[e.start,e.end]}return[a]}export const Calendar=/*@__PURE__*/a.forwardRef(function Calendar(y,j){const{mode:w="single",value:x,defaultValue:C,onValueChange:S,size:k="md",color:O="primary",elevation:z=0,bordered:M=!0,month:N,defaultMonth:V,onMonthChange:E,granularity:R="day",minDate:q,maxDate:A,shouldDisableDate:B,locale:F,weekStartsOn:G,showOutsideDays:H=!0,renderDay:I,labels:J,className:K,style:L,...P}=p(y,["size","locale"]),Q=n(J,F),T=v(F),U=G??o(T),[W,X]=a.useState(()=>C??b[w]),Y=void 0!==x?x:W,Z=D(w,Y).find(s),[$,_]=a.useState(()=>i(Z??V??m())),ee=N??$,ae=e=>{void 0===x&&X(e),S?.(e)},te="range"===w?Y??b.range:b.range;return e("div",{ref:j,className:c("inline-block",M?c(g,"border bg-(--n-panel-press) [border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]",f[k],u[k]):"[box-shadow:var(--n-elev)]",K),style:{...h(O,z),...L},...P,children:e(t,{size:k,color:O,locale:F,weekStartsOn:U,month:ee,onMonthChange:e=>{void 0===N&&_(e),E?.(e)},selected:D(w,Y),rangeStart:te.start,rangeEnd:te.end,onSelect:e=>{const a=d(e,R);if("multiple"===w){const e=Y??[],t=e.filter(e=>!l(e,a));return void ae(t.length===e.length?[...e,a]:t)}if("range"===w){const e=Y??b.range;return!s(e.start)||s(e.end)?void ae({start:a,end:null}):void ae(r(a,e.start)<0?{start:a,end:null}:{start:e.start,end:a})}ae(a)},granularity:R,minDate:q,maxDate:A,shouldDisableDate:B,showOutsideDays:H,renderDay:I,multiselectable:"single"!==w,labels:Q})})});
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{askOnEveryRender as n,Calendar as r,usePickerLabels as a}from"../../internal/calendar.js";import{compareDay as l,isSameDay as o,isValidDate as s,localeWeekStart as i,makeDate as d,startOfMonth as u,startOfUnit as c,toISOMonth as m,toMonthOf as f,today as g}from"../../internal/date.js";import{popupPaddingClasses as h}from"../../internal/picker.js";import{cx as p,radiusClasses as b,surfaceClasses as v,surfaceSlots as y}from"../../internal/styles.js";import{useStyleDefaults as D}from"../../internal/defaults.js";import{useHydrated as S,useIntlLocale as j}from"../../internal/media.js";const x={single:null,multiple:[],range:{start:null,end:null}};function C(e,t){if("multiple"===e)return t??[];if("range"===e){const e=t??x.range;return[e.start,e.end]}return[t]}export const Calendar=/*@__PURE__*/t.forwardRef(function Calendar(w,k){const{mode:N="single",value:O,defaultValue:z,onValueChange:M,size:R="md",color:E="primary",elevation:V=0,bordered:$=!0,month:q,defaultMonth:A,onMonthChange:F,granularity:I="day",minDate:B,maxDate:G,shouldDisableDate:H,locale:J,weekStartsOn:K,showOutsideDays:L=!0,renderDay:P,labels:Q,className:T,style:U,...W}=D(w,["size","locale"]),X=a(Q,J),Y=j(J),Z=K??i(Y),[_,ee]=t.useState(()=>z??x[N]),te=void 0!==O?O:_,ne=C(N,te).find(s),re=S(),ae=t.useId(),[le,oe]=t.useState(()=>u(ne??A??(re?null:function(e){if("undefined"==typeof document)return null;const t=document.querySelector(`[data-neba-calendar="${CSS.escape(e)}"]`)?.getAttribute("data-month"),n=t?/^(\d{4,})-(\d{2})$/.exec(t):null;return n?d(Number(n[1]),Number(n[2])-1,1):null}(ae))??g())),se=q??le,[ie]=t.useState(()=>!re&&void 0===ne&&void 0===A&&void 0===q),de=t.useRef(ie),ue=t.useRef(!1);t.useEffect(()=>{re&&de.current&&(de.current=!1,ue.current||oe(f(g())))},[re]);const ce=e=>{void 0===O&&ee(e),M?.(e)},me="range"===N?te??x.range:x.range;return e("div",{ref:k,className:p("inline-block",$?p(v,"border bg-(--n-panel-press) [border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]",b[R],h[R]):"[box-shadow:var(--n-elev)]",T),style:{...y(E,V),...U},"data-neba-calendar":ae,"data-month":m(se),...W,children:e(r,{size:R,color:E,locale:J,weekStartsOn:Z,month:se,onMonthChange:e=>{ue.current=!0,void 0===q&&oe(e),F?.(e)},selected:C(N,te),rangeStart:me.start,rangeEnd:me.end,onSelect:e=>{const t=c(e,I);if("multiple"===N){const e=te??[],n=e.filter(e=>!o(e,t));return void ce(n.length===e.length?[...e,t]:n)}if("range"===N){const e=te??x.range;return!s(e.start)||s(e.end)?void ce({start:t,end:null}):void ce(l(t,e.start)<0?{start:t,end:null}:{start:e.start,end:t})}ce(t)},granularity:I,minDate:B,maxDate:G,shouldDisableDate:n(H),showOutsideDays:L,renderDay:P,multiselectable:"single"!==N,monthFromClock:ie,labels:X})})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{IconButton as n}from"../icon-button/IconButton.js";import{childKey as a}from"../../internal/children.js";import{carouselMessages as l,fillMessage as o,useMessages as i}from"../../internal/i18n.js";import{ChevronIcon as s,PauseIcon as c,PlayIcon as u}from"../../internal/icons.js";import{usePrefersReducedMotion as d}from"../../internal/media.js";import{observeVisibility as m}from"../../internal/observe.js";import{cx as f,radiusClasses as p,srOnlyClasses as b,surfaceClasses as h,surfaceSlots as v,transitionClasses as g}from"../../internal/styles.js";import{useStyleDefaults as x}from"../../internal/defaults.js";const w={solid:[h,"text-(--neba-fg) bg-(--n-panel-hover)","[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-transparent"},y={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"},j={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"}},N={xs:"0.25rem",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.5rem"};export const Carousel=/*@__PURE__*/r.forwardRef(function Carousel(h,C){const{variant:k="outline",size:S="md",color:L="primary",density:M="default",elevation:_=0,value:z,defaultValue:E=0,onValueChange:P,loop:R=!0,autoPlay:T=!1,interval:W=5e3,arrows:I=!0,indicators:$=!0,locale:B,label:D,previousLabel:F,nextLabel:V,pauseLabel:A,playLabel:q,slideLabel:G,className:H,style:J,children:K,onPointerEnter:O,onPointerLeave:Q,onFocus:U,onBlur:X,...Y}=x(h,["size","density","variant","locale"]),Z=i(l,B),ee=G??((e,t)=>o(Z.slide,{index:String(e),total:String(t)})),te=r.Children.toArray(K),re=te.length,[ne,ae]=r.useState(E),le=Math.min(Math.max(z??ne,0),Math.max(re-1,0)),oe=r.useRef(null),ie=r.useRef(!1),se=r.useRef(!1),ce=r.useRef(!1),[ue,de]=r.useState(!1),[me,fe]=r.useState(!1),pe=ue||me,[be,he]=r.useState(!1),ve=r.useCallback((e,t=!1)=>{if(0===re)return;const r=R?(e%re+re)%re:Math.min(Math.max(e,0),re-1);ie.current=t,void 0===z&&ae(r),r!==le&&P?.(r)},[re,R,z,le,P]);r.useEffect(()=>{if(ie.current)return void(ie.current=!1);const e=!se.current;if(se.current=!0,e&&0===le)return;const t=oe.current;if(t){const r="rtl"===getComputedStyle(t).direction?-1:1;t.scrollTo({left:r*le*t.clientWidth,...e?{behavior:"instant"}:null})}ce.current=!0;const r=window.setTimeout(()=>{ce.current=!1},700);return()=>window.clearTimeout(r)},[le]);const ge=d(),[xe,we]=r.useState(!1),ye=T&&!be&&!ge&&re>1;r.useEffect(()=>{const e=oe.current;if(ye&&e)return m(e,0,e=>we(!e))??void 0},[ye]),r.useEffect(()=>{if(!T||be||pe||ge||xe||re<2)return;const e=window.setInterval(()=>{document.hidden||ve(le+1)},W);return()=>window.clearInterval(e)},[T,be,pe,ge,xe,re,W,le,ve]);const je=le<=0,Ne=le>=re-1,Ce=T&&!ge&&re>1,ke=$&&re>1;return t("div",{ref:C,role:"region","aria-roledescription":"carousel","aria-label":D??Z.label,className:f("flex flex-col",H??""),style:{...v(L,_),...J},onPointerEnter:e=>{de(!0),O?.(e)},onPointerLeave:e=>{de(!1),Q?.(e)},onFocus:e=>{fe(!0),U?.(e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||fe(!1),X?.(e)},...Y,children:[t("div",{className:["relative min-w-0 overflow-hidden",p[S],w[k],g].join(" "),children:[e("div",{ref:oe,tabIndex:0,role:"group","aria-label":D??Z.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=oe.current;if(ce.current||!e||0===e.clientWidth)return;const t=Math.round(Math.abs(e.scrollLeft)/e.clientWidth);t!==le&&t>=0&&t<re&&ve(t,!0)},children:te.map((t,r)=>e("div",{role:"group","aria-roledescription":"slide","aria-label":ee(r+1,re),className:"w-full shrink-0 grow-0 basis-full snap-start",children:t},a(t,r)))}),I&&re>1?t("div",{className:`pointer-events-none absolute inset-y-0 flex items-center ${y[S]}`,children:[e(n,{variant:"solid",size:S,color:L,density:M,elevation:1,label:F??Z.previous,disabled:!R&&je,focusableWhenDisabled:!0,className:"pointer-events-auto",icon:e("span",{className:"flex items-center rotate-90 rtl:-rotate-90",children:e(s,{})}),onClick:()=>ve(le-1)}),e("span",{className:"flex-1"}),e(n,{variant:"solid",size:S,color:L,density:M,elevation:1,label:V??Z.next,disabled:!R&&Ne,focusableWhenDisabled:!0,className:"pointer-events-auto",icon:e("span",{className:"flex items-center -rotate-90 rtl:rotate-90",children:e(s,{})}),onClick:()=>ve(le+1)})]}):null]}),Ce||ke?t("div",{className:"grid shrink-0 grid-cols-[1fr_auto_1fr] items-center pt-2",children:[e("span",{className:"flex justify-start",children:Ce?e(n,{variant:"text",size:S,color:L,density:M,label:be?q??Z.play:A??Z.pause,icon:e(be?u:c,{}),onClick:()=>he(e=>!e)}):null}),e("span",{className:`flex items-center ${j[S].gap}`,style:{"--n-hit-gap":N[S]},children:ke?te.map((t,r)=>e("button",{type:"button","aria-label":ee(r+1,re),"aria-current":r===le?"true":void 0,className:["neba-hit-row relative 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",r===le?`${j[S].current} bg-(--n-accent)`:`${j[S].rest} bg-(--n-line-hover) hover:bg-(--n-accent)`].join(" "),onClick:()=>ve(r)},r)):null}),e("span",{})]}):null,e("span",{className:b,"aria-live":!Ce||be||pe?"polite":"off",children:re>0?ee(le+1,re):""})]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{IconButton as n}from"../icon-button/IconButton.js";import{childKey as a}from"../../internal/children.js";import{carouselMessages as l,fillMessage as o,useMessages as s}from"../../internal/i18n.js";import{ChevronIcon as i,PauseIcon as c,PlayIcon as u}from"../../internal/icons.js";import{usePrefersReducedMotion as d}from"../../internal/media.js";import{observeVisibility as m}from"../../internal/observe.js";import{cx as f,radiusClasses as p,srOnlyClasses as b,surfaceClasses as v,surfaceSlots as h,transitionClasses as g}from"../../internal/styles.js";import{useStyleDefaults as x}from"../../internal/defaults.js";const w={solid:v+" text-(--neba-fg) bg-(--n-panel-hover) [box-shadow:var(--n-elev),var(--neba-plate-solid)]",outline:v+" border text-(--neba-fg) bg-(--n-panel) [border-color:var(--n-line)] [box-shadow:var(--n-elev),var(--neba-plate-glass)]",text:"text-(--neba-fg) bg-transparent"},y={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"},N={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"}},j={xs:"0.25rem",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.5rem"};export const Carousel=/*@__PURE__*/r.forwardRef(function Carousel(v,C){const{variant:S="outline",size:k="md",color:L="primary",density:M="default",elevation:T=0,value:_,defaultValue:z=0,onValueChange:E,loop:I=!0,autoPlay:P=!1,interval:R=5e3,arrows:W=!0,indicators:$=!0,locale:B,label:D,previousLabel:F,nextLabel:V,pauseLabel:A,playLabel:q,slideLabel:G,className:H,style:J,children:K,onPointerEnter:O,onPointerLeave:Q,onFocus:U,onBlur:X,...Y}=x(v,["size","density","variant","locale"]),Z=s(l,B),ee=G??((e,t)=>o(Z.slide,{index:String(e),total:String(t)})),te=r.Children.toArray(K),re=te.length,[ne,ae]=r.useState(z),le=Math.min(Math.max(_??ne,0),Math.max(re-1,0)),[oe]=r.useState(le),se=r.useRef(null),ie=r.useRef(!1),ce=r.useRef(!1),ue=r.useRef(!1),[de,me]=r.useState(!1),[fe,pe]=r.useState(!1),be=de||fe,[ve,he]=r.useState(!1),ge=r.useCallback((e,t=!1)=>{if(0===re)return;const r=I?(e%re+re)%re:Math.min(Math.max(e,0),re-1);ie.current=t,void 0===_&&ae(r),r!==le&&E?.(r)},[re,I,_,le,E]);r.useEffect(()=>{if(ie.current)return void(ie.current=!1);const e=!ce.current;if(ce.current=!0,e&&0===le)return;const t=se.current;if(t){const r="rtl"===getComputedStyle(t).direction?-1:1;t.scrollTo({left:r*le*t.clientWidth,...e?{behavior:"instant"}:null})}ue.current=!0;const r=window.setTimeout(()=>{ue.current=!1},700);return()=>window.clearTimeout(r)},[le]);const xe=d(),[we,ye]=r.useState(null),Ne=P&&!ve&&!xe&&re>1;r.useEffect(()=>{const e=se.current;if(!Ne||!e)return;const t=m(e,0,e=>ye(!e));return t||ye(!1),t??void 0},[Ne]),r.useEffect(()=>{if(!P||ve||be||xe||!1!==we||re<2)return;const e=window.setInterval(()=>{document.hidden||ge(le+1)},R);return()=>window.clearInterval(e)},[P,ve,be,xe,we,re,R,le,ge]);const je=le<=0,Ce=le>=re-1,Se=P&&!xe&&re>1,ke=$&&re>1;return t("div",{ref:C,role:"region","aria-roledescription":"carousel","aria-label":D??Z.label,className:f("flex flex-col",H??""),style:{...h(L,T),...J},onPointerEnter:e=>{me(!0),O?.(e)},onPointerLeave:e=>{me(!1),Q?.(e)},onFocus:e=>{pe(!0),U?.(e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||pe(!1),X?.(e)},...Y,children:[t("div",{className:"relative min-w-0 overflow-hidden "+p[k]+" "+w[S]+" "+g,children:[e("div",{ref:se,tabIndex:0,role:"group","aria-label":D??Z.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]",onScroll:()=>{const e=se.current;if(ue.current||!e||0===e.clientWidth)return;const t=Math.round(Math.abs(e.scrollLeft)/e.clientWidth);t!==le&&t>=0&&t<re&&ge(t,!0)},children:te.map((t,r)=>e("div",{role:"group","aria-roledescription":"slide","aria-label":ee(r+1,re),className:"w-full shrink-0 grow-0 basis-full snap-start",style:r===oe&&oe>0?{scrollInitialTarget:"nearest"}:void 0,children:t},a(t,r)))}),W&&re>1?t("div",{className:`pointer-events-none absolute inset-y-0 flex items-center ${y[k]}`,children:[e(n,{variant:"solid",size:k,color:L,density:M,elevation:1,label:F??Z.previous,disabled:!I&&je,focusableWhenDisabled:!0,className:"pointer-events-auto",icon:e("span",{className:"flex items-center rotate-90 rtl:-rotate-90",children:e(i,{})}),onClick:()=>ge(le-1)}),e("span",{className:"flex-1"}),e(n,{variant:"solid",size:k,color:L,density:M,elevation:1,label:V??Z.next,disabled:!I&&Ce,focusableWhenDisabled:!0,className:"pointer-events-auto",icon:e("span",{className:"flex items-center -rotate-90 rtl:rotate-90",children:e(i,{})}),onClick:()=>ge(le+1)})]}):null]}),Se||ke?t("div",{className:"grid shrink-0 grid-cols-[1fr_auto_1fr] items-center pt-2",children:[e("span",{className:"flex justify-start",children:Se?e(n,{variant:"text",size:k,color:L,density:M,label:ve?q??Z.play:A??Z.pause,icon:e(ve?u:c,{}),onClick:()=>he(e=>!e)}):null}),e("span",{className:`flex items-center ${N[k].gap}`,style:{"--n-hit-gap":j[k]},children:ke?te.map((t,r)=>e("button",{type:"button","aria-label":ee(r+1,re),"aria-current":r===le?"true":void 0,className:"neba-hit-row relative 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 "+(r===le?`${N[k].current} bg-(--n-accent)`:`${N[k].rest} bg-(--n-line-hover) hover:bg-(--n-accent)`),onClick:()=>ge(r)},r)):null}),e("span",{})]}):null,e("span",{className:b,"aria-live":!Se||ve||be?"polite":"off",children:re>0?ee(le+1,re):""})]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as r from"react";import{chatMessages as l,useMessages as a}from"../../internal/i18n.js";import{CheckIcon as i,ClockIcon as t,DangerIcon as o,LinkIcon as s}from"../../internal/icons.js";import{safeHref as c,safeRel as d}from"../../internal/link.js";import{NewTabNote as m}from"../../internal/new-tab.js";import{controlSlots as p,cx as u,hasContent as f,metaTextClasses as b,radiusClasses as h,sheetBodyClasses as v,sheetHeaderGapClasses as x,srOnlyClasses as g,surfaceClasses as k,transitionClasses as y}from"../../internal/styles.js";import{useStyleDefaults as w}from"../../internal/defaults.js";const N={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"}},j={start:"[border-start-start-radius:0.25rem]",end:"[border-start-end-radius:0.25rem]"},_={solid:[k,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[k,"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)]"};const L={sending:e(t,{}),sent:e(i,{}),delivered:e(function DoubleCheckIcon(){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"})]})},{}),read:e(function ReadIcon(){const l=r.useId();return n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n("mask",{id:l,children:[e("rect",{width:"16",height:"16",fill:"white"}),n("g",{transform:"translate(2.375 1.25) scale(0.75)",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"m1.5 8.5 2.75 2.75L9.5 6"}),e("path",{d:"M7 10.75 8.25 12l5.25-5.25"})]})]}),e("circle",{cx:"8",cy:"8",r:"7.25",fill:"currentColor",mask:`url(#${l})`})]})},{}),failed:e(o,{})},C={sending:"text-(--neba-muted-fg)",sent:"text-(--neba-muted-fg)",delivered:"text-(--neba-muted-fg)",read:"text-(--n-accent)",failed:"text-(--neba-danger-accent)"},z=["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(" "),B=["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 ChatBubble(r,i){const{side:t="start",name:o,time:s,avatar:c,status:d,statusLabel:m,typing:k=!1,media:z,preview:D,actions:I,locale:T,variant:W="outline",size:M="md",color:P="primary",density:R="default",elevation:$=0,className:q,style:A,children:E,...F}=w(r,["size","density","variant","locale"]),G=a(l,T),H="end"===t,J=f(o)||f(s),K=k||f(E)||Boolean(D),O=["flex min-w-0 flex-col overflow-hidden",h[M],j[t],_[W],y].join(" "),Q=d?m??G[d]:"";return n("div",{ref:i,className:u("group/bubble flex w-full items-start gap-2",H?"flex-row-reverse":"",q??""),style:{...p(P,$,W),...A},...F,children:[f(c)?e("div",{className:"shrink-0",children:c}):null,n("div",{className:["flex min-w-0 max-w-[min(100%,32rem)] flex-col",x[M],H?"items-end":"items-start"].join(" "),children:[J?n("div",{className:`flex items-baseline gap-2 ${b[M]}`,children:[f(o)?e("span",{className:"font-semibold",children:o}):null,f(s)?e("span",{className:"text-(--neba-muted-fg)",children:s}):null]}):null,n("div",{className:"flex min-w-0 items-center gap-1 "+(H?"flex-row-reverse":""),children:[n("div",{className:O,children:[f(z)?e("div",{className:"[&_img]:block [&_img]:w-full [&_video]:block [&_video]:w-full",children:z}):null,K?n("div",{className:[N[R][M],"flex min-w-0 flex-col gap-2",v[M]].join(" "),children:[k?e(TypingDots,{label:G.typing}):f(E)?e("div",{className:"min-w-0 break-words whitespace-pre-line",children:E}):null,D?e(LinkPreview,{preview:D,locale:T}):null]}):null]}),f(I)?e("div",{className:B,children:I}):null]}),d?n("div",{className:["flex items-center gap-1",b[M],C[d],"[&_svg]:size-[1.15em] [&_svg]:shrink-0"].join(" "),children:[L[d],e("span",{className:g,children:Q})]}):null]})]})});function TypingDots({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:g,children:r})]})}function LinkPreview({preview:r,locale:l}){const{url:a,title:i,description:t,image:o,site:p,newTab:u=!1,rel:b}=r,h=u?"_blank":void 0;return n("a",{href:c(a),target:h,rel:d(h,b),className:z,children:[o?e("img",{alt:"",loading:"lazy",decoding:"async",className:"block h-28 w-full object-cover",src:o}):null,n("div",{className:"flex flex-col gap-0.5 p-2",children:[f(p)?n("span",{className:"flex items-center gap-1 text-[0.85em] opacity-70 [&_svg]:size-[1em] [&_svg]:shrink-0",children:[e(s,{}),e("span",{className:"truncate",children:p})]}):null,f(i)?e("span",{className:"font-semibold",children:i}):null,f(t)?e("span",{className:"line-clamp-2 text-[0.9em] opacity-80",children:t}):null,e(m,{target:h,locale:l})]})]})}
1
+ "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as r from"react";import{chatMessages as l,useMessages as a}from"../../internal/i18n.js";import{CheckIcon as i,ClockIcon as t,DangerIcon as s,LinkIcon as o}from"../../internal/icons.js";import{safeHref as c,safeRel as d}from"../../internal/link.js";import{NewTabNote as m}from"../../internal/new-tab.js";import{controlSlots as p,cx as u,hasContent as f,metaTextClasses as b,radiusClasses as h,sheetBodyClasses as v,sheetHeaderGapClasses as x,srOnlyClasses as g,surfaceClasses as k,transitionClasses as y}from"../../internal/styles.js";import{useStyleDefaults as w}from"../../internal/defaults.js";const N={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"}},_={start:"[border-start-start-radius:0.25rem]",end:"[border-start-end-radius:0.25rem]"},j={solid:k+" text-(--n-on-solid) bg-(--n-fill) [box-shadow:var(--n-elev),var(--neba-plate-solid)]",outline:k+" border text-(--neba-fg) bg-(--n-panel) [border-color:var(--n-line)] [box-shadow:var(--n-elev),var(--neba-plate-glass)]",text:"text-(--neba-fg) bg-(--n-soft) [box-shadow:var(--n-elev)]"};const L={sending:e(t,{}),sent:e(i,{}),delivered:e(function DoubleCheckIcon(){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"})]})},{}),read:e(function ReadIcon(){const l=r.useId();return n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[n("mask",{id:l,children:[e("rect",{width:"16",height:"16",fill:"white"}),n("g",{transform:"translate(2.375 1.25) scale(0.75)",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e("path",{d:"m1.5 8.5 2.75 2.75L9.5 6"}),e("path",{d:"M7 10.75 8.25 12l5.25-5.25"})]})]}),e("circle",{cx:"8",cy:"8",r:"7.25",fill:"currentColor",mask:`url(#${l})`})]})},{}),failed:e(s,{})},C={sending:"text-(--neba-muted-fg)",sent:"text-(--neba-muted-fg)",delivered:"text-(--neba-muted-fg)",read:"text-(--n-accent)",failed:"text-(--neba-danger-accent)"};export const ChatBubble=/*@__PURE__*/r.forwardRef(function ChatBubble(r,i){const{side:t="start",name:s,time:o,avatar:c,status:d,statusLabel:m,typing:k=!1,media:z,preview:B,actions:D,locale:I,variant:T="outline",size:W="md",color:M="primary",density:P="default",elevation:R=0,className:$,style:q,children:A,...E}=w(r,["size","density","variant","locale"]),F=a(l,I),G="end"===t,H=f(s)||f(o),J=k||f(A)||Boolean(B),K="flex min-w-0 flex-col overflow-hidden "+h[W]+" "+_[t]+" "+j[T]+" "+y,O=d?m??F[d]:"";return n("div",{ref:i,className:u("group/bubble flex w-full items-start gap-2",G?"flex-row-reverse":"",$??""),style:{...p(M,R,T),...q},...E,children:[f(c)?e("div",{className:"shrink-0",children:c}):null,n("div",{className:"flex min-w-0 max-w-[min(100%,32rem)] flex-col "+x[W]+" "+(G?"items-end":"items-start"),children:[H?n("div",{className:`flex items-baseline gap-2 ${b[W]}`,children:[f(s)?e("span",{className:"font-semibold",children:s}):null,f(o)?e("span",{className:"text-(--neba-muted-fg)",children:o}):null]}):null,n("div",{className:"flex min-w-0 items-center gap-1 "+(G?"flex-row-reverse":""),children:[n("div",{className:K,children:[f(z)?e("div",{className:"[&_img]:block [&_img]:w-full [&_video]:block [&_video]:w-full",children:z}):null,J?n("div",{className:N[P][W]+" flex min-w-0 flex-col gap-2 "+v[W],children:[k?e(TypingDots,{label:F.typing}):f(A)?e("div",{className:"min-w-0 break-words whitespace-pre-line",children:A}):null,B?e(LinkPreview,{preview:B,locale:I}):null]}):null]}),f(D)?e("div",{className:"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",children:D}):null]}),d?n("div",{className:"flex items-center gap-1 "+b[W]+" "+C[d]+" [&_svg]:size-[1.15em] [&_svg]:shrink-0",children:[L[d],e("span",{className:g,children:O})]}):null]})]})});function TypingDots({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:g,children:r})]})}function LinkPreview({preview:r,locale:l}){const{url:a,title:i,description:t,image:s,site:p,newTab:u=!1,rel:b}=r,h=u?"_blank":void 0;return n("a",{href:c(a),target:h,rel:d(h,b),className:"block overflow-hidden rounded-(--neba-radius-sm) border text-inherit 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",children:[s?e("img",{alt:"",loading:"lazy",decoding:"async",className:"block h-28 w-full object-cover",src:s}):null,n("div",{className:"flex flex-col gap-0.5 p-2",children:[f(p)?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:p})]}):null,f(i)?e("span",{className:"font-semibold",children:i}):null,f(t)?e("span",{className:"line-clamp-2 text-[0.9em] opacity-80",children:t}):null,e(m,{target:h,locale:l})]})]})}
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as n from"react";import{Checkbox as r}from"@base-ui/react/checkbox";import{Field as t}from"@base-ui/react/field";import{controlTextClasses as i,cx as o,hitAreaClasses as l,metaTextClasses as s,surfaceClasses as d,tickRadiusClasses as c,tickRowLeadingClasses as h,tickSizeClasses as b,transitionClasses as f}from"../../internal/styles.js";import{useStyleDefaults as m}from"../../internal/defaults.js";import{useFieldsetDisabled as p}from"../../internal/fieldset.js";import{CheckboxGroupContext as u}from"../../internal/checkbox-group.js";const v=["relative inline-flex shrink-0 items-center justify-center border",l,"[-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(" "),g=[d,"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(" "),k=[d,"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]","data-[indeterminate]:bg-(--n-fill) data-[indeterminate]:text-(--n-on-solid)","data-[indeterminate]:[border-color:transparent]"].join(" "),x=["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(" "),y=["flex size-[70%] items-center justify-center","[transition:opacity_var(--neba-duration)_var(--neba-ease)]","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0","[&_path]:[stroke-dasharray:1]","[&_path]:[transition:stroke-dashoffset_var(--neba-duration)_var(--neba-ease)]","[&[data-starting-style]_path]:[stroke-dashoffset:1]","[&[data-ending-style]_path]:[stroke-dashoffset:1]"].join(" ");function CheckMark(){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",pathLength:"1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function DashMark(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2.5 6h7",pathLength:"1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}export const Checkbox=/*@__PURE__*/n.forwardRef(function Checkbox(l,d){const f=n.useContext(u),{size:j,color:N,label:_,description:$,error:C,invalid:w,disabled:z,readOnly:L,name:M,className:D,classNames:O,style:R,...B}=m(l,["size"],f),W=j??f?.size??"md",E=N??f?.color??"primary",I=L??f?.readOnly??!1,q=M??f?.name,A=p(z)||!0===f?.disabled,F=null!=C&&!1!==C&&""!==C,G=w??F,H=G||!0===f?.invalid?"danger":E,J={"--n-fill":`var(--neba-${H}-fill)`,"--n-fill-hover":`var(--neba-${H}-fill-hover)`,"--n-on-solid":`var(--neba-${H}-on-solid)`,"--n-accent":`var(--neba-${H}-accent)`,"--n-panel":"var(--neba-panel)","--n-panel-hover":"var(--neba-panel-hover)","--n-line":`var(--neba-${H}-line)`,"--n-line-hover":`var(--neba-${H}-line-hover)`,"--n-ring":`var(--neba-${H}-ring)`},K=[v,b[W],c[W],A?x:I?k:g].join(" ");return a(t.Root,{disabled:A,invalid:G,className:o("inline-flex flex-col gap-1 align-top",D??""),style:{...J,...R},children:[a("div",{className:`flex items-start gap-2 ${i[W]} ${h}`,children:[e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e(r.Root,{ref:d,className:o(K,O?.control),disabled:A,readOnly:I,name:q,...B,children:e(r.Indicator,{className:o(y,O?.indicator),render:(a,n)=>e("span",{...a,children:n.indeterminate?e(DashMark,{}):e(CheckMark,{})})})})}),_||$?a("span",{className:"flex min-w-0 flex-col gap-0.5",children:[_?e(t.Label,{className:o("leading-[1.4]",A?"text-(--neba-disabled-fg)":"cursor-pointer text-(--neba-fg)",O?.label),children:_}):null,$?e(t.Description,{className:o(s[W],"text-(--neba-muted-fg)",O?.description),children:$}):null]}):null]}),e(t.Error,F?{match:!0,className:o(s[W],"text-(--n-accent)",O?.error),children:C}:{className:o(s[W],"text-(--n-accent)",O?.error)})]})});
1
+ "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as n from"react";import{Checkbox as r}from"@base-ui/react/checkbox";import{Field as t}from"@base-ui/react/field";import{controlTextClasses as i,cx as o,hitAreaClasses as l,metaTextClasses as s,surfaceClasses as d,tickRadiusClasses as c,tickRowLeadingClasses as h,tickSizeClasses as b,transitionClasses as f}from"../../internal/styles.js";import{useStyleDefaults as m}from"../../internal/defaults.js";import{useFieldsetDisabled as p}from"../../internal/fieldset.js";import{CheckboxGroupContext as u}from"../../internal/checkbox-group.js";const v="relative inline-flex shrink-0 items-center justify-center border "+l+" [-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",g=d+" 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]",k=d+" 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] data-[indeterminate]:bg-(--n-fill) data-[indeterminate]:text-(--n-on-solid) data-[indeterminate]:[border-color:transparent]";function CheckMark(){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",pathLength:"1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function DashMark(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2.5 6h7",pathLength:"1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}export const Checkbox=/*@__PURE__*/n.forwardRef(function Checkbox(l,d){const f=n.useContext(u),{size:x,color:y,label:N,description:j,error:_,invalid:$,disabled:C,readOnly:w,name:z,className:L,classNames:M,style:D,...O}=m(l,["size"],f),R=x??f?.size??"md",B=y??f?.color??"primary",W=w??f?.readOnly??!1,E=z??f?.name,I=p(C)||!0===f?.disabled,q=null!=_&&!1!==_&&""!==_,A=$??q,F=A||!0===f?.invalid?"danger":B,G={"--n-fill":`var(--neba-${F}-fill)`,"--n-fill-hover":`var(--neba-${F}-fill-hover)`,"--n-on-solid":`var(--neba-${F}-on-solid)`,"--n-accent":`var(--neba-${F}-accent)`,"--n-panel":"var(--neba-panel)","--n-panel-hover":"var(--neba-panel-hover)","--n-line":`var(--neba-${F}-line)`,"--n-line-hover":`var(--neba-${F}-line-hover)`,"--n-ring":`var(--neba-${F}-ring)`},H=v+" "+b[R]+" "+c[R]+" "+(I?"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)":W?k:g);return a(t.Root,{disabled:I,invalid:A,className:o("inline-flex flex-col gap-1 align-top",L??""),style:{...G,...D},children:[a("div",{className:`flex items-start gap-2 ${i[R]} ${h}`,children:[e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e(r.Root,{ref:d,className:o(H,M?.control),disabled:I,readOnly:W,name:E,...O,children:e(r.Indicator,{className:o("flex size-[70%] items-center justify-center [transition:opacity_var(--neba-duration)_var(--neba-ease)] data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 [&_path]:[stroke-dasharray:1] [&_path]:[transition:stroke-dashoffset_var(--neba-duration)_var(--neba-ease)] [&[data-starting-style]_path]:[stroke-dashoffset:1] [&[data-ending-style]_path]:[stroke-dashoffset:1]",M?.indicator),render:(a,n)=>e("span",{...a,children:n.indeterminate?e(DashMark,{}):e(CheckMark,{})})})})}),N||j?a("span",{className:"flex min-w-0 flex-col gap-0.5",children:[N?e(t.Label,{className:o("leading-[1.4]",I?"text-(--neba-disabled-fg)":"cursor-pointer text-(--neba-fg)",M?.label),children:N}):null,j?e(t.Description,{className:o(s[R],"text-(--neba-muted-fg)",M?.description),children:j}):null]}):null]}),e(t.Error,q?{match:!0,className:o(s[R],"text-(--n-accent)",M?.error),children:_}:{className:o(s[R],"text-(--n-accent)",M?.error)})]})});
@@ -1,2 +1,2 @@
1
1
  export { Checkbox } from './Checkbox.js';
2
- export type { CheckboxProps } from './Checkbox.js';
2
+ export type { CheckboxProps, CheckboxSlot } from './Checkbox.js';
@@ -1,2 +1,2 @@
1
1
  export { CheckboxGroup } from './CheckboxGroup.js';
2
- export type { CheckboxGroupProps } from './CheckboxGroup.js';
2
+ export type { CheckboxGroupProps, CheckboxGroupSlot } from './CheckboxGroup.js';
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { useRender } from '@base-ui/react/use-render';
2
3
  import type { NebaElevation, NebaStyleProps, NebaTransition } from '../../types.js';
3
4
  export interface ChipProps extends NebaStyleProps, Omit<React.ComponentPropsWithoutRef<'span'>, 'color'> {
4
5
  /**
@@ -49,6 +50,31 @@ export interface ChipProps extends NebaStyleProps, Omit<React.ComponentPropsWith
49
50
  * screen reader. A chip with `onClick` and no `selected` is a plain button.
50
51
  */
51
52
  selected?: boolean;
53
+ /**
54
+ * Makes the chip's label a link to this address: a tag that leads to its
55
+ * page, a filter that is a URL. A crawler can follow it and a reader can
56
+ * open it in a new tab, neither of which a button with an `onClick` offers.
57
+ * With `onDelete` the × stays a button of its own beside the link, never
58
+ * inside it.
59
+ *
60
+ * A scheme other than `http`, `https`, `mailto` and `tel` is dropped, and a
61
+ * `disabled` chip is not a link.
62
+ */
63
+ href?: string;
64
+ /**
65
+ * Renders the link as something other than an `<a>` — the `Link` a router
66
+ * brings, so a chip moves without reloading the page. `href` still goes
67
+ * through. Only a chip that is a link uses it: a `disabled` one stays text,
68
+ * and the `onDelete` button stays beside the link, never inside it.
69
+ */
70
+ render?: useRender.RenderProp;
71
+ /** Where the link opens. Anything but this tab also gets `rel="noopener noreferrer"`. */
72
+ target?: string;
73
+ /**
74
+ * The link's `rel` — `tag`, `nofollow`, `sponsored`. The two tokens a new tab
75
+ * needs are merged into it rather than written over it.
76
+ */
77
+ rel?: string;
52
78
  /** Unavailable. Drops the colour family for neutral grey, as everywhere else. */
53
79
  disabled?: boolean;
54
80
  children?: React.ReactNode;
@@ -57,9 +83,12 @@ export interface ChipProps extends NebaStyleProps, Omit<React.ComponentPropsWith
57
83
  * A compact token: a tag, a filter, a status, an entity plucked out of a list.
58
84
  *
59
85
  * The shell is always a `<span>`. What changes is what is inside it: a plain run
60
- * of content, or — when `onClick` is given — a real `<button>` wrapping that
61
- * content, plus a second button for `onDelete`. Both are reachable by keyboard,
62
- * and neither is nested inside the other.
86
+ * of content, a real `<button>` wrapping that content when `onClick` is given,
87
+ * or an `<a>` wrapping it when `href` is — or whatever `render` draws in its
88
+ * place — plus a second button for `onDelete`.
89
+ * Both are reachable by keyboard, and neither is nested inside the other, which
90
+ * is as true of a link as of a button: interactive content inside an `<a>` is
91
+ * invalid too.
63
92
  *
64
93
  * An inert `<span>` carrying a click handler is the single most common way a
65
94
  * component library loses its keyboard users, and a `<button>` inside a
@@ -1 +1 @@
1
- "use client";import{jsx as e,Fragment as n,jsxs as l}from"react/jsx-runtime";import*as t from"react";import{actionMessages as i,fillMessage as o,useMessages as r}from"../../internal/i18n.js";import{CloseIcon as a}from"../../internal/icons.js";import{transitionProps as s}from"../../internal/animate.js";import{chipRemoveClasses as c,controlHeightClasses as d,controlSlots as m,controlTextClasses as p,disabledClasses as b,focusRingClasses as f,gapClasses as u,iconClasses as v,paddingXClasses as h,pressTransitionClasses as g,radiusClasses as x,surfaceClasses as j,transitionClasses as y}from"../../internal/styles.js";import{useStyleDefaults as w}from"../../internal/defaults.js";const N={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg"},k={solid:[j,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[j,"border text-(--n-on-tint) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-on-tint) bg-(--n-soft)"},C={solid:"bg-(--n-fill-active)",outline:"bg-(--n-panel-press) [border-color:var(--n-line-hover)]",text:"bg-(--n-soft-press)"},$={solid:"hover:bg-(--n-fill-hover) active:bg-(--n-fill-active)",outline:"hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)] active:bg-(--n-panel-press)",text:"hover:bg-(--n-soft-hover) active:bg-(--n-soft-press)"},z=["relative inline-flex max-w-full shrink-0 select-none items-center","align-middle font-medium leading-none whitespace-nowrap","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",y,g,v].join(" "),B=["flex min-w-0 flex-1 cursor-pointer items-center justify-center self-stretch rounded-[inherit]",f].join(" ");export const Chip=/*@__PURE__*/t.forwardRef(function Chip(t,f){const{variant:v="outline",size:g="md",color:j="primary",density:y="default",elevation:I=0,startIcon:L,endIcon:D,count:F,onDelete:R,locale:q,deleteLabel:A,transition:E,selected:G,disabled:H=!1,className:J,style:K,children:M,onClick:O,...P}=w(t,["size","density","variant","locale"]),Q=r(i,q),S=Boolean(O)&&!H,T=N[g],U=s(E),V=h[y][T],W=[z,d[T],p[T],u[T],x[T],H?b[v]:k[v],!H&&G?C[v]:"",S?$[v]:"",S?"ps-0":V,R?"pe-1":S?"pe-0":"",U.className,J??""].filter(Boolean).join(" "),X=l(n,{children:[L,null!=M&&!1!==M?e("span",{className:"min-w-0 truncate leading-[normal]",children:M}):null,D,null!=F&&!1!==F?e("span",{className:["ms-0.5 inline-flex shrink-0 items-center justify-center rounded-full px-1.5 py-px","text-[0.85em] leading-none font-semibold tabular-nums","solid"===v?"bg-(--neba-glow-on-fill) text-(--n-on-solid)":"bg-(--n-fill) text-(--n-on-solid)"].join(" "),children:F}):null]});return l("span",{ref:f,className:W,style:{...m(j,I,v),...U.style,...K},"aria-disabled":!(!H||S)||void 0,...P,children:[S?e("button",{type:"button","aria-pressed":G,className:`${B} ${u[T]} ${V}`,onClick:O,children:X}):X,R?e("button",{type:"button","aria-label":A??("string"==typeof M&&M.trim()?o(Q.removeLabel,{label:M.trim()}):Q.remove),disabled:H,className:c,onClick:R,children:e(a,{})}):null]})});
1
+ "use client";import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import*as l from"react";import{useRender as r}from"@base-ui/react/use-render";import{actionMessages as i,fillMessage as o,useMessages as a}from"../../internal/i18n.js";import{CloseIcon as s}from"../../internal/icons.js";import{safeHref as d,safeRel as c}from"../../internal/link.js";import{NewTabNote as m}from"../../internal/new-tab.js";import{transitionProps as p}from"../../internal/animate.js";import{chipRemoveClasses as f,controlHeightClasses as b,controlSlots as u,controlTextClasses as h,disabledClasses as v,focusRingClasses as g,gapClasses as x,iconClasses as j,paddingXClasses as y,pressTransitionClasses as w,radiusClasses as k,surfaceClasses as N,transitionClasses as $}from"../../internal/styles.js";import{useStyleDefaults as C}from"../../internal/defaults.js";const z={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg"},B={solid:N+" text-(--n-on-solid) bg-(--n-fill) [box-shadow:var(--n-elev),var(--neba-plate-solid)]",outline:N+" border text-(--n-on-tint) bg-(--n-panel) [border-color:var(--n-line)] [box-shadow:var(--n-elev),var(--neba-plate-glass)]",text:"text-(--n-on-tint) bg-(--n-soft)"},I={solid:"bg-(--n-fill-active)",outline:"bg-(--n-panel-press) [border-color:var(--n-line-hover)]",text:"bg-(--n-soft-press)"},L={solid:"hover:bg-(--n-fill-hover) active:bg-(--n-fill-active)",outline:"hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)] active:bg-(--n-panel-press)",text:"hover:bg-(--n-soft-hover) active:bg-(--n-soft-press)"},D="relative inline-flex max-w-full shrink-0 select-none items-center align-middle font-medium leading-none whitespace-nowrap [-webkit-tap-highlight-color:transparent] [touch-action:manipulation] "+$+" "+w+" "+j,F="flex min-w-0 flex-1 cursor-pointer items-center justify-center self-stretch rounded-[inherit] "+g,R=`${F} text-inherit no-underline`;export const Chip=/*@__PURE__*/l.forwardRef(function Chip(l,g){const{variant:j="outline",size:w="md",color:N="primary",density:$="default",elevation:q=0,startIcon:A,endIcon:E,count:G,onDelete:H,locale:J,deleteLabel:K,transition:M,selected:O,href:P,render:Q,target:S,rel:T,disabled:U=!1,className:V,style:W,children:X,onClick:Y,...Z}=C(l,["size","density","variant","locale"]),_=a(i,J),ee=U?void 0:d(P),ne=(void 0!==ee||void 0!==Q)&&!U,te=(ne||Boolean(Y))&&!U,le=z[w],re=p(M),ie=y[$][le],oe=[D,b[le],h[le],x[le],k[le],U?v[j]:B[j],!U&&O?I[j]:"",te?L[j]:"",te?"ps-0":ie,H?"pe-1":te?"pe-0":"",re.className,V??""].filter(Boolean).join(" "),ae=t(n,{children:[A,null!=X&&!1!==X?e("span",{className:"min-w-0 truncate leading-[normal]",children:X}):null,E,null!=G&&!1!==G?e("span",{className:"ms-0.5 inline-flex shrink-0 items-center justify-center rounded-full px-1.5 py-px text-[0.85em] leading-none font-semibold tabular-nums "+("solid"===j?"bg-(--neba-glow-on-fill) text-(--n-on-solid)":"bg-(--n-fill) text-(--n-on-solid)"),children:G}):null]}),se=r({render:Q??e("a",{}),props:{href:ee,target:S,rel:c(S,T),"aria-current":O?"true":void 0,className:`${R} ${x[le]} ${ie}`,onClick:Y,children:t(n,{children:[ae,e(m,{target:S,locale:J})]})}});return t("span",{ref:g,className:oe,style:{...u(N,q,j),...re.style,...W},"aria-disabled":!(!U||te)||void 0,...Z,children:[ne?se:te?e("button",{type:"button","aria-pressed":O,className:`${F} ${x[le]} ${ie}`,onClick:Y,children:ae}):ae,H?e("button",{type:"button","aria-label":K??("string"==typeof X&&X.trim()?o(_.removeLabel,{label:X.trim()}):_.remove),disabled:U,className:f,onClick:H,children:e(s,{})}):null]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{CheckIcon as o,CodeIcon as r,CopyIcon as l}from"../../internal/icons.js";import{codeMessages as i,useMessages as a}from"../../internal/i18n.js";import{observeResize as s,observeVisibility as c}from"../../internal/observe.js";import{canonicalLanguage as d,highlight as u,plainLines as m,preloadLanguage as p}from"../../internal/highlight.js";import{cx as f,hasContent as x,metaTextClasses as h,radiusClasses as g,srOnlyClasses as y,surfaceSlots as v,toLength as b,transitionClasses as w}from"../../internal/styles.js";import{useStyleDefaults as N}from"../../internal/defaults.js";const k={xs:"text-[0.6875rem]/[1.55]",sm:"text-[0.75rem]/[1.6]",md:"text-[0.8125rem]/[1.65]",lg:"text-[0.875rem]/[1.7]",xl:"text-[1rem]/[1.7]"},S={default:{xs:"py-2",sm:"py-3",md:"py-3.5",lg:"py-4",xl:"py-5"},compact:{xs:"py-1.5",sm:"py-2",md:"py-2.5",lg:"py-3",xl:"py-3.5"}},T={default:{xs:"px-2",sm:"px-3",md:"px-3.5",lg:"px-4",xl:"px-5"},compact:{xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3",xl:"px-3.5"}},M={default:{xs:"px-2.5 py-1",sm:"px-3.5 py-1",md:"px-4 py-1.5",lg:"px-4.5 py-2",xl:"px-5.5 py-2"},compact:{xs:"px-2 py-0.5",sm:"px-2.5 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1",xl:"px-4 py-1.5"}};export const CodeBlock=/*@__PURE__*/n.forwardRef(function CodeBlock(j,C){const{code:E,language:R,theme:A="dark",size:H="md",color:L="primary",density:_="default",elevation:z=0,highlight:F=!0,toolbar:K=!0,title:$,showLanguage:B=!0,copyable:D=!0,rawToggle:I=!1,highlightLines:W,lineNumbers:q=!1,startLine:G=1,prompt:J,wrap:O=!1,maxHeight:P,fontFamily:Q,fontSize:U,lineHeight:V,letterSpacing:X,locale:Y,copyLabel:Z,copiedLabel:ee,rawLabel:te,onCopy:ne,className:oe,style:re,...le}=N(j,["size","density","locale"]),ie=a(i,Y),ae=n.useMemo(()=>E.replace(/\r\n?/g,"\n").trimEnd(),[E]),se=d(R),[ce,de]=n.useState(!1),[ue,me]=n.useState(null),[pe,fe]=n.useState(null),xe=F&&!ce&&null!==se,[he,ge]=n.useState(!1);n.useEffect(()=>{if(!xe||!se)return void fe(null);if(!he)return void p(se);let e=!1;return u(ae,se).then(t=>{e||n.startTransition(()=>fe(t?{source:ae,name:se,lines:t}:null))},()=>{e||fe(null)}),()=>{e=!0}},[ae,se,xe,he]);const ye=n.useMemo(()=>xe&&pe&&pe.source===ae&&pe.name===se?pe.lines:m(ae),[xe,pe,ae,se]),ve=`${String(G+Math.max(ye.length-1,0)).length}ch`,be=n.useRef(void 0),we=n.useRef(void 0),[Ne,ke]=n.useState(null);n.useEffect(()=>()=>{clearTimeout(be.current),clearTimeout(we.current)},[]);const Se=G+Math.max(ye.length-1,0),Te=n.useMemo(()=>function(e,t,n){const o=new Set;if(void 0===e)return o;for(const r of Array.isArray(e)?e:[e])if("number"!=typeof r)for(const e of r.split(",")){const r=/^\s*(\d+)\s*(?:-\s*(\d+)\s*)?$/.exec(e);if(!r)continue;const l=Number(r[1]),i=void 0===r[2]?l:Number(r[2]),a=Math.max(Math.min(l,i),t),s=Math.min(Math.max(l,i),n);for(let e=a;e<=s;e+=1)o.add(e)}else Number.isFinite(r)&&o.add(Math.trunc(r));return o}(W,G,Se),[W,G,Se]),Me=n.useRef(null),je=n.useRef(null),[Ce,Ee]=n.useState(!1);n.useEffect(()=>{const e=je.current;if(!xe||he||!e)return;const t=c(e,0,e=>{e&&ge(!0)},"100% 0px");if(t)return t;ge(!0)},[xe,he]),n.useEffect(()=>{const e=je.current,t=Me.current;if(!e||!t)return;const n=()=>Ee(e.scrollWidth>e.clientWidth+1||e.scrollHeight>e.clientHeight+1);n();const o=s(e,n),r=s(t,n);return()=>{o(),r()}},[]);const Re=Z??ie.copy,Ae=ee??ie.copied,He=te??ie.raw,Le=f("inline-flex shrink-0 cursor-pointer items-center gap-1 border-0 bg-transparent","px-1.5 py-1 text-(--n-code-dim) hover:text-(--n-code-fg) hover:bg-(--n-code-hover)",g.xs,h[H],"[&_svg]:pointer-events-none [&_svg]:size-[1.15em] [&_svg]:shrink-0",w,"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"),_e=n.useId(),ze=x($)&&"string"!=typeof $&&K,Fe="string"==typeof $&&""!==$?$:se??ie.code,Ke=e("div",{ref:je,role:Ce?"region":void 0,"aria-label":Ce&&!ze?Fe:void 0,"aria-labelledby":Ce&&ze?_e:void 0,tabIndex:Ce?0:void 0,onKeyDown:e=>{if(!("a"===e.key||"A"===e.key||!/^[a-z]$/i.test(e.key)&&"KeyA"===e.code))return;if(!e.metaKey&&!e.ctrlKey||e.altKey)return;const t=Me.current,n="undefined"==typeof window?null:window.getSelection();if(!t||!n)return;e.preventDefault();const o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o)},className:f("min-h-0 overflow-auto",S[_][H],"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:-outline-offset-2"),style:void 0===P?void 0:{maxHeight:b(P)},children:e("pre",{ref:Me,className:f("m-0 bg-transparent p-0 font-mono",O?"w-full":"w-max min-w-full"),children:ye.map((t,o)=>{const r=G+o;return e("div",{className:f("neba-code-line",T[_][H]),"data-line":q?r:void 0,"data-mark":Te.has(r)?"":void 0,"data-prompt":J&&t.length>0?J:void 0,children:e("code",{children:t.map((t,o)=>t.token?e("span",{className:t.token,children:t.text},o):e(n.Fragment,{children:t.text},o))})},o)})})});return t("div",{ref:C,className:f("neba-code flex min-w-0 flex-col overflow-hidden",g[H],"border bg-(--n-code-bg) text-(--n-code-fg) [border-color:var(--n-code-rule)]","[box-shadow:var(--n-elev)]",w,oe),"data-code-theme":A,"data-code-wrap":O?"true":void 0,style:{...v(L,z),"--n-code-gutter":ve,...Q?{fontFamily:Q}:null,...void 0===U?null:{fontSize:b(U)},...void 0===V?null:{lineHeight:V},...void 0===X?null:{letterSpacing:b(X)},...re},...le,children:[K&&(B&&se||D||I&&F||x($))?t("div",{className:f("flex min-w-0 items-center gap-1 border-b [border-color:var(--n-code-rule)]",M[_][H]),children:[x($)?e("span",{id:_e,className:f("min-w-0 truncate font-mono",h[H]),children:$}):null,B&&se?e("span",{className:f("min-w-0 truncate font-mono tracking-wide text-(--n-code-dim) uppercase select-none",h[H]),children:se}):null,e("span",{className:"flex-1"}),I&&F?e("button",{type:"button","aria-pressed":ce,"aria-label":He,title:He,onClick:()=>de(e=>!e),className:f(Le,ce?"text-(--n-code-fg) bg-(--n-code-hover)":""),children:e(r,{})}):null,D?t("button",{type:"button",onClick:async()=>{const e=await async function(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}const t=document.activeElement;try{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.setAttribute("aria-hidden","true"),t.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.append(t),t.select();const n=document.execCommand("copy");return t.remove(),n}catch{return!1}finally{t instanceof HTMLElement&&t.isConnected&&t.focus()}}(ae);clearTimeout(be.current),clearTimeout(we.current),me(e),ke(null),we.current=setTimeout(()=>ke(e),100),be.current=setTimeout(()=>{me(null),ke(null)},2e3),e&&ne?.(ae)},className:Le,children:[e(ue?o:l,{}),e("span",{children:null===ue?Re:ue?Ae:ie.copyFailed})]}):null]}):null,e("div",{className:f("flex min-h-0 flex-col",k[H]),children:Ke}),e("span",{"aria-live":"polite",className:y,children:null===Ne?"":Ne?Ae:ie.copyFailed})]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{CheckIcon as o,CodeIcon as r,CopyIcon as l}from"../../internal/icons.js";import{codeMessages as i,useMessages as a}from"../../internal/i18n.js";import{observeResize as s,observeVisibility as c}from"../../internal/observe.js";import{canonicalLanguage as d,highlight as u,plainLines as m,preloadLanguage as p}from"../../internal/highlight.js";import{cx as f,hasContent as x,metaTextClasses as h,radiusClasses as g,srOnlyClasses as y,surfaceSlots as v,toLength as b,transitionClasses as w}from"../../internal/styles.js";import{useStyleDefaults as N}from"../../internal/defaults.js";const k={xs:"text-[0.6875rem]/[1.55]",sm:"text-[0.75rem]/[1.6]",md:"text-[0.8125rem]/[1.65]",lg:"text-[0.875rem]/[1.7]",xl:"text-[1rem]/[1.7]"},S={default:{xs:"py-2",sm:"py-3",md:"py-3.5",lg:"py-4",xl:"py-5"},compact:{xs:"py-1.5",sm:"py-2",md:"py-2.5",lg:"py-3",xl:"py-3.5"}},M={default:{xs:"px-2",sm:"px-3",md:"px-3.5",lg:"px-4",xl:"px-5"},compact:{xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3",xl:"px-3.5"}},T={default:{xs:"px-2.5 py-1",sm:"px-3.5 py-1",md:"px-4 py-1.5",lg:"px-4.5 py-2",xl:"px-5.5 py-2"},compact:{xs:"px-2 py-0.5",sm:"px-2.5 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1",xl:"px-4 py-1.5"}};export const CodeBlock=/*@__PURE__*/n.forwardRef(function CodeBlock(j,C){const{code:E,language:R,theme:A="dark",size:H="md",color:L="primary",density:_="default",elevation:z=0,highlight:F=!0,toolbar:K=!0,title:$,showLanguage:B=!0,copyable:D=!0,rawToggle:I=!1,highlightLines:W,lineNumbers:q=!1,startLine:G=1,prompt:J,wrap:O=!1,maxHeight:P,fontFamily:Q,fontSize:U,lineHeight:V,letterSpacing:X,locale:Y,copyLabel:Z,copiedLabel:ee,rawLabel:te,onCopy:ne,className:oe,style:re,...le}=N(j,["size","density","locale"]),ie=a(i,Y),ae=n.useMemo(()=>E.replace(/\r\n?/g,"\n").trimEnd(),[E]),se=d(R),[ce,de]=n.useState(!1),[ue,me]=n.useState(null),[pe,fe]=n.useState(null),xe=F&&!ce&&null!==se,[he,ge]=n.useState(!1);n.useEffect(()=>{if(!xe||!se)return void fe(null);if(!he)return void p(se);let e=!1;return u(ae,se).then(t=>{e||n.startTransition(()=>fe(t?{source:ae,name:se,lines:t}:null))},()=>{e||fe(null)}),()=>{e=!0}},[ae,se,xe,he]);const ye=n.useMemo(()=>xe&&pe&&pe.source===ae&&pe.name===se?pe.lines:m(ae),[xe,pe,ae,se]),ve=`${String(G+Math.max(ye.length-1,0)).length}ch`,be=n.useRef(void 0),we=n.useRef(void 0),[Ne,ke]=n.useState(null);n.useEffect(()=>()=>{clearTimeout(be.current),clearTimeout(we.current)},[]);const Se=G+Math.max(ye.length-1,0),Me=n.useMemo(()=>function(e,t,n){const o=new Set;if(void 0===e)return o;for(const r of Array.isArray(e)?e:[e])if("number"!=typeof r)for(const e of r.split(",")){const r=/^\s*(\d+)\s*(?:-\s*(\d+)\s*)?$/.exec(e);if(!r)continue;const l=Number(r[1]),i=void 0===r[2]?l:Number(r[2]),a=Math.max(Math.min(l,i),t),s=Math.min(Math.max(l,i),n);for(let e=a;e<=s;e+=1)o.add(e)}else Number.isFinite(r)&&o.add(Math.trunc(r));return o}(W,G,Se),[W,G,Se]),Te=n.useRef(null),je=n.useRef(null),[Ce,Ee]=n.useState(!1);n.useEffect(()=>{const e=je.current;if(!xe||he||!e)return;const t=c(e,0,e=>{e&&ge(!0)},"100% 0px");if(t)return t;ge(!0)},[xe,he]),n.useEffect(()=>{const e=je.current,t=Te.current;if(!e||!t)return;const n=()=>Ee(e.scrollWidth>e.clientWidth+1||e.scrollHeight>e.clientHeight+1);n();const o=s(e,n),r=s(t,n);return()=>{o(),r()}},[]);const Re=Z??ie.copy,Ae=ee??ie.copied,He=te??ie.raw,Le=f("inline-flex shrink-0 cursor-pointer items-center gap-1 border-0 bg-transparent","px-1.5 py-1 text-(--n-code-dim) hover:text-(--n-code-fg) hover:bg-(--n-code-hover)",g.xs,h[H],"[&_svg]:pointer-events-none [&_svg]:size-[1.15em] [&_svg]:shrink-0",w,"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1"),_e=n.useId(),ze=x($)&&"string"!=typeof $&&K,Fe="string"==typeof $&&""!==$?$:se??ie.code,Ke=n.useMemo(()=>e("pre",{ref:Te,className:f("m-0 bg-transparent p-0 font-mono",O?"w-full":"w-max min-w-full"),children:ye.map((t,o)=>{const r=G+o;return e("div",{className:f("neba-code-line",M[_][H]),"data-line":q?r:void 0,"data-mark":Me.has(r)?"":void 0,"data-prompt":J&&t.length>0?J:void 0,children:e("code",{children:t.map((t,o)=>t.token?e("span",{className:t.token,children:t.text},o):e(n.Fragment,{children:t.text},o))})},o)})}),[ye,O,G,_,H,q,Me,J]),$e=e("div",{ref:je,role:Ce?"region":void 0,"aria-label":Ce&&!ze?Fe:void 0,"aria-labelledby":Ce&&ze?_e:void 0,tabIndex:Ce?0:void 0,onKeyDown:e=>{if(!("a"===e.key||"A"===e.key||!/^[a-z]$/i.test(e.key)&&"KeyA"===e.code))return;if(!e.metaKey&&!e.ctrlKey||e.altKey)return;const t=Te.current,n="undefined"==typeof window?null:window.getSelection();if(!t||!n)return;e.preventDefault();const o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o)},className:f("min-h-0 overflow-auto",S[_][H],"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:-outline-offset-2"),style:void 0===P?void 0:{maxHeight:b(P)},children:Ke});return t("div",{ref:C,className:f("neba-code flex min-w-0 flex-col overflow-hidden",g[H],"border bg-(--n-code-bg) text-(--n-code-fg) [border-color:var(--n-code-rule)]","[box-shadow:var(--n-elev)]",w,oe),"data-code-theme":A,"data-code-wrap":O?"true":void 0,style:{...v(L,z),"--n-code-gutter":ve,...Q?{fontFamily:Q}:null,...void 0===U?null:{fontSize:b(U)},...void 0===V?null:{lineHeight:V},...void 0===X?null:{letterSpacing:b(X)},...re},...le,children:[K&&(B&&se||D||I&&F||x($))?t("div",{className:f("flex min-w-0 items-center gap-1 border-b [border-color:var(--n-code-rule)]",T[_][H]),children:[x($)?e("span",{id:_e,className:f("min-w-0 truncate font-mono",h[H]),children:$}):null,B&&se?e("span",{className:f("min-w-0 truncate font-mono tracking-wide text-(--n-code-dim) uppercase select-none",h[H]),children:se}):null,e("span",{className:"flex-1"}),I&&F?e("button",{type:"button","aria-pressed":ce,"aria-label":He,title:He,onClick:()=>de(e=>!e),className:f(Le,ce?"text-(--n-code-fg) bg-(--n-code-hover)":""),children:e(r,{})}):null,D?t("button",{type:"button",onClick:async()=>{const e=await async function(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}const t=document.activeElement;try{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.setAttribute("aria-hidden","true"),t.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.append(t),t.select();const n=document.execCommand("copy");return t.remove(),n}catch{return!1}finally{t instanceof HTMLElement&&t.isConnected&&t.focus()}}(ae);clearTimeout(be.current),clearTimeout(we.current),me(e),ke(null),we.current=setTimeout(()=>ke(e),100),be.current=setTimeout(()=>{me(null),ke(null)},2e3),e&&ne?.(ae)},className:Le,children:[e(ue?o:l,{}),e("span",{children:null===ue?Re:ue?Ae:ie.copyFailed})]}):null]}):null,e("div",{className:f("flex min-h-0 flex-col",k[H]),children:$e}),e("span",{"aria-live":"polite",className:y,children:null===Ne?"":Ne?Ae:ie.copyFailed})]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as l from"react";import{Collapsible as t}from"@base-ui/react/collapsible";import{boxPaddingXClasses as a,boxPaddingYClasses as s}from"../box/Box.js";import{ChevronIcon as i}from"../../internal/icons.js";import{collapsiblePanelClasses as o,gapClasses as r,hasContent as d,iconClasses as c,metaTextClasses as f,radiusClasses as m,sheetBodyClasses as p,sheetHeaderGapClasses as b,sheetTitleClasses as u,surfaceClasses as x,surfaceSlots as h,transitionClasses as g,clampClasses as v,clampSlot as j,disclosureChevronClasses as N,disclosureTriggerClasses as w}from"../../internal/styles.js";import{useStyleDefaults as y}from"../../internal/defaults.js";const $={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"};export const Collapsible=/*@__PURE__*/l.forwardRef(function Collapsible(l,x){const{variant:C="outline",size:k="md",color:O="primary",density:B="default",elevation:z=0,open:F,defaultOpen:M=!1,onOpenChange:R,title:T,subtitle:U,lines:_,startIcon:I,action:P,trigger:q,indicator:A=!0,disabled:D=!1,padded:E=!0,hiddenUntilFound:G=!0,keepMounted:H=!1,className:J,style:K,children:L,...Q}=y(l,["size","density","variant"]),S=_?v(_):"",V=j(_),W=a[B][k],X=s[B][k];return n(t.Root,{ref:x,open:F,defaultOpen:M,onOpenChange:e=>R?.(e),disabled:D,className:["flex flex-col overflow-hidden",m[k],$[C],g,J??""].filter(Boolean).join(" "),style:{...h(O,z),...K},...Q,children:[q?e(t.Trigger,{render:q}):n("div",{className:"flex w-full items-center",children:[n(t.Trigger,{className:["flex min-w-0 flex-1 items-center text-start",w,W,X,r[k],g,c,"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]",D?"cursor-not-allowed bg-transparent text-(--neba-disabled-fg)":"cursor-pointer hover:bg-(--n-soft) data-[panel-open]:text-(--n-on-tint)"].join(" "),children:[d(I)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:I}):null,n("span",{className:`flex min-w-0 flex-1 flex-col ${b[k]}`,children:[d(T)?e("span",{className:`${S} font-semibold ${u[k]}`,style:V,children:T}):null,d(U)?e("span",{className:`${S} text-(--neba-muted-fg) ${f[k]}`,style:V,children:U}):null]}),A?e("span",{className:`${N} text-(--neba-muted-fg)`,children:e(i,{})}):null]}),d(P)?e("span",{className:`flex shrink-0 items-center ${W}`,children:P}):null]}),e(t.Panel,{hiddenUntilFound:G,keepMounted:H,className:o,children:e("div",{className:["min-w-0 text-(--neba-muted-fg)",p[k],E?W:"",E?q?X:"compact"===B?"pb-2":"pb-4":""].filter(Boolean).join(" "),children:L})})]})});
1
+ "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as l from"react";import{Collapsible as t}from"@base-ui/react/collapsible";import{boxPaddingXClasses as a,boxPaddingYClasses as s}from"../box/Box.js";import{ChevronIcon as i}from"../../internal/icons.js";import{collapsiblePanelClasses as r,gapClasses as o,hasContent as d,iconClasses as c,metaTextClasses as f,radiusClasses as m,sheetBodyClasses as p,sheetHeaderGapClasses as b,sheetTitleClasses as u,surfaceClasses as x,surfaceSlots as h,transitionClasses as g,clampClasses as v,clampSlot as N,disclosureChevronClasses as j,disclosureTriggerClasses as w}from"../../internal/styles.js";import{useStyleDefaults as y}from"../../internal/defaults.js";const $={solid:x+" text-(--neba-fg) bg-(--n-panel-hover) [box-shadow:var(--n-elev),var(--neba-plate-solid)]",outline:x+" border text-(--neba-fg) bg-(--n-panel) [border-color:var(--n-line)] [box-shadow:var(--n-elev),var(--neba-plate-glass)]",text:"text-(--neba-fg) bg-transparent"};export const Collapsible=/*@__PURE__*/l.forwardRef(function Collapsible(l,x){const{variant:C="outline",size:k="md",color:O="primary",density:B="default",elevation:z=0,open:F,defaultOpen:M=!1,onOpenChange:R,title:T,subtitle:U,lines:_,startIcon:I,action:P,trigger:q,indicator:A=!0,disabled:D=!1,padded:E=!0,hiddenUntilFound:G=!0,keepMounted:H=!1,className:J,style:K,children:L,...Q}=y(l,["size","density","variant"]),S=_?v(_):"",V=N(_),W=a[B][k],X=s[B][k];return n(t.Root,{ref:x,open:F,defaultOpen:M,onOpenChange:e=>R?.(e),disabled:D,className:["flex flex-col overflow-hidden",m[k],$[C],g,J??""].filter(Boolean).join(" "),style:{...h(O,z),...K},...Q,children:[q?e(t.Trigger,{render:q}):n("div",{className:"flex w-full items-center",children:[n(t.Trigger,{className:"flex min-w-0 flex-1 items-center text-start "+w+" "+W+" "+X+" "+o[k]+" "+g+" "+c+" focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px] "+(D?"cursor-not-allowed bg-transparent text-(--neba-disabled-fg)":"cursor-pointer hover:bg-(--n-soft) data-[panel-open]:text-(--n-on-tint)"),children:[d(I)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:I}):null,n("span",{className:`flex min-w-0 flex-1 flex-col ${b[k]}`,children:[d(T)?e("span",{className:`${S} font-semibold ${u[k]}`,style:V,children:T}):null,d(U)?e("span",{className:`${S} text-(--neba-muted-fg) ${f[k]}`,style:V,children:U}):null]}),A?e("span",{className:`${j} text-(--neba-muted-fg)`,children:e(i,{})}):null]}),d(P)?e("span",{className:`flex shrink-0 items-center ${W}`,children:P}):null]}),e(t.Panel,{hiddenUntilFound:G,keepMounted:G?void 0:H,className:r,children:e("div",{className:["min-w-0 text-(--neba-muted-fg)",p[k],E?W:"",E?q?X:"compact"===B?"pb-2":"pb-4":""].filter(Boolean).join(" "),children:L})})]})});