neba 1.8.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +7 -7
  2. package/dist/components/accordion/Accordion.js +1 -1
  3. package/dist/components/alert/Alert.js +1 -1
  4. package/dist/components/anchor/Anchor.d.ts +73 -0
  5. package/dist/components/anchor/Anchor.js +1 -0
  6. package/dist/components/anchor/index.d.ts +2 -0
  7. package/dist/components/anchor/index.js +1 -0
  8. package/dist/components/animate-marquee/AnimateMarquee.js +1 -1
  9. package/dist/components/app-logo/AppLogo.js +1 -1
  10. package/dist/components/aspect-ratio/AspectRatio.js +1 -1
  11. package/dist/components/avatar/Avatar.js +1 -1
  12. package/dist/components/avatar-group/AvatarGroup.d.ts +47 -0
  13. package/dist/components/avatar-group/AvatarGroup.js +1 -0
  14. package/dist/components/avatar-group/index.d.ts +2 -0
  15. package/dist/components/avatar-group/index.js +1 -0
  16. package/dist/components/badge/Badge.js +1 -1
  17. package/dist/components/blockquote/Blockquote.js +1 -1
  18. package/dist/components/box/Box.js +1 -1
  19. package/dist/components/button/Button.js +1 -1
  20. package/dist/components/button-group/ButtonGroup.js +1 -1
  21. package/dist/components/card/Card.js +1 -1
  22. package/dist/components/carousel/Carousel.js +1 -1
  23. package/dist/components/chat-bubble/ChatBubble.js +1 -1
  24. package/dist/components/checkbox/Checkbox.js +1 -1
  25. package/dist/components/combobox/Combobox.js +1 -1
  26. package/dist/components/command-palette/CommandPalette.d.ts +88 -0
  27. package/dist/components/command-palette/CommandPalette.js +1 -0
  28. package/dist/components/command-palette/index.d.ts +2 -0
  29. package/dist/components/command-palette/index.js +1 -0
  30. package/dist/components/container/Container.js +1 -1
  31. package/dist/components/data-list/DataList.d.ts +55 -0
  32. package/dist/components/data-list/DataList.js +1 -0
  33. package/dist/components/data-list/index.d.ts +2 -0
  34. package/dist/components/data-list/index.js +1 -0
  35. package/dist/components/data-table/DataTable.js +1 -1
  36. package/dist/components/dialog/Dialog.js +1 -1
  37. package/dist/components/divider/Divider.js +1 -1
  38. package/dist/components/drawer/Drawer.js +1 -1
  39. package/dist/components/empty/Empty.js +1 -1
  40. package/dist/components/fieldset/Fieldset.d.ts +33 -0
  41. package/dist/components/fieldset/Fieldset.js +1 -0
  42. package/dist/components/fieldset/index.d.ts +2 -0
  43. package/dist/components/fieldset/index.js +1 -0
  44. package/dist/components/file-picker/FilePicker.js +1 -1
  45. package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
  46. package/dist/components/form/Form.d.ts +58 -0
  47. package/dist/components/form/Form.js +1 -0
  48. package/dist/components/form/index.d.ts +2 -0
  49. package/dist/components/form/index.js +1 -0
  50. package/dist/components/gauge-chart/GaugeChart.d.ts +62 -0
  51. package/dist/components/gauge-chart/GaugeChart.js +1 -0
  52. package/dist/components/gauge-chart/index.d.ts +2 -0
  53. package/dist/components/gauge-chart/index.js +1 -0
  54. package/dist/components/grid/Grid.js +1 -1
  55. package/dist/components/grid-container/GridContainer.js +1 -1
  56. package/dist/components/heatmap-chart/HeatmapChart.js +1 -1
  57. package/dist/components/highlight/Highlight.js +1 -1
  58. package/dist/components/hover-card/HoverCard.d.ts +78 -0
  59. package/dist/components/hover-card/HoverCard.js +1 -0
  60. package/dist/components/hover-card/index.d.ts +2 -0
  61. package/dist/components/hover-card/index.js +1 -0
  62. package/dist/components/how-to-steps/HowToSteps.d.ts +11 -25
  63. package/dist/components/how-to-steps/HowToSteps.js +1 -1
  64. package/dist/components/icon/Icon.js +1 -1
  65. package/dist/components/list/List.js +1 -1
  66. package/dist/components/menu/Menu.d.ts +16 -4
  67. package/dist/components/menu/Menu.js +1 -1
  68. package/dist/components/menubar/Menubar.d.ts +56 -0
  69. package/dist/components/menubar/Menubar.js +1 -0
  70. package/dist/components/menubar/index.d.ts +2 -0
  71. package/dist/components/menubar/index.js +1 -0
  72. package/dist/components/meter/Meter.d.ts +52 -0
  73. package/dist/components/meter/Meter.js +1 -0
  74. package/dist/components/meter/index.d.ts +2 -0
  75. package/dist/components/meter/index.js +1 -0
  76. package/dist/components/mockup/Mockup.js +1 -1
  77. package/dist/components/navigation-menu/NavigationMenu.d.ts +100 -0
  78. package/dist/components/navigation-menu/NavigationMenu.js +1 -0
  79. package/dist/components/navigation-menu/index.d.ts +2 -0
  80. package/dist/components/navigation-menu/index.js +1 -0
  81. package/dist/components/number-field/NumberField.js +1 -1
  82. package/dist/components/otp-field/OtpField.js +1 -1
  83. package/dist/components/overlay/Overlay.js +1 -1
  84. package/dist/components/page-layout/PageLayout.js +1 -1
  85. package/dist/components/pagination/Pagination.js +1 -1
  86. package/dist/components/panes/Panes.js +1 -1
  87. package/dist/components/pie-chart/PieChart.js +1 -1
  88. package/dist/components/pill/Pill.js +1 -1
  89. package/dist/components/popover/Popover.js +1 -1
  90. package/dist/components/progress-box/ProgressBox.js +1 -1
  91. package/dist/components/progress-circular/ProgressCircular.js +1 -1
  92. package/dist/components/progress-linear/ProgressLinear.js +1 -1
  93. package/dist/components/radio-group/RadioGroup.js +1 -1
  94. package/dist/components/rating/Rating.js +1 -1
  95. package/dist/components/scroll-area/ScrollArea.d.ts +50 -0
  96. package/dist/components/scroll-area/ScrollArea.js +1 -0
  97. package/dist/components/scroll-area/index.d.ts +2 -0
  98. package/dist/components/scroll-area/index.js +1 -0
  99. package/dist/components/scroll-zone/ScrollZone.d.ts +35 -17
  100. package/dist/components/scroll-zone/ScrollZone.js +1 -1
  101. package/dist/components/segmented-button/SegmentedButton.js +1 -1
  102. package/dist/components/select/Select.js +1 -1
  103. package/dist/components/shortcut/Shortcut.js +1 -1
  104. package/dist/components/sidebar/Sidebar.js +1 -1
  105. package/dist/components/skeleton/Skeleton.js +1 -1
  106. package/dist/components/slider/Slider.js +1 -1
  107. package/dist/components/spoiler/Spoiler.js +1 -1
  108. package/dist/components/statistic/Statistic.js +1 -1
  109. package/dist/components/switch/Switch.js +1 -1
  110. package/dist/components/table/Table.js +1 -1
  111. package/dist/components/tabs/Tabs.js +1 -1
  112. package/dist/components/text-field/TextField.js +1 -1
  113. package/dist/components/text-link/TextLink.js +1 -1
  114. package/dist/components/toast/Toast.js +1 -1
  115. package/dist/components/toggle/Toggle.d.ts +53 -0
  116. package/dist/components/toggle/Toggle.js +1 -0
  117. package/dist/components/toggle/index.d.ts +2 -0
  118. package/dist/components/toggle/index.js +1 -0
  119. package/dist/components/toggle-group/ToggleGroup.d.ts +51 -0
  120. package/dist/components/toggle-group/ToggleGroup.js +1 -0
  121. package/dist/components/toggle-group/index.d.ts +2 -0
  122. package/dist/components/toggle-group/index.js +1 -0
  123. package/dist/components/toolbar/Toolbar.js +1 -1
  124. package/dist/components/tooltip/Tooltip.js +1 -1
  125. package/dist/components/tour/Tour.d.ts +82 -0
  126. package/dist/components/tour/Tour.js +1 -0
  127. package/dist/components/tour/index.d.ts +2 -0
  128. package/dist/components/tour/index.js +1 -0
  129. package/dist/components/transfer/Transfer.d.ts +52 -0
  130. package/dist/components/transfer/Transfer.js +1 -0
  131. package/dist/components/transfer/index.d.ts +2 -0
  132. package/dist/components/transfer/index.js +1 -0
  133. package/dist/components/tree-view/TreeView.js +1 -1
  134. package/dist/components/typography/Typography.js +1 -1
  135. package/dist/components/window-pane/WindowPane.js +1 -1
  136. package/dist/index.d.ts +16 -0
  137. package/dist/index.js +1 -1
  138. package/dist/internal/animate.d.ts +7 -1
  139. package/dist/internal/animate.js +1 -1
  140. package/dist/internal/avatar-group.d.ts +22 -0
  141. package/dist/internal/avatar-group.js +1 -0
  142. package/dist/internal/button-group.d.ts +6 -2
  143. package/dist/internal/chart-frame.d.ts +18 -1
  144. package/dist/internal/chart-frame.js +1 -1
  145. package/dist/internal/data-table.d.ts +0 -14
  146. package/dist/internal/data-table.js +1 -1
  147. package/dist/internal/drag.d.ts +62 -0
  148. package/dist/internal/drag.js +1 -0
  149. package/dist/internal/highlight.js +1 -1
  150. package/dist/internal/i18n.d.ts +82 -0
  151. package/dist/internal/i18n.js +1 -1
  152. package/dist/internal/link.d.ts +19 -0
  153. package/dist/internal/link.js +1 -0
  154. package/dist/internal/media.d.ts +29 -0
  155. package/dist/internal/media.js +1 -0
  156. package/dist/internal/observe.d.ts +42 -0
  157. package/dist/internal/observe.js +1 -0
  158. package/dist/internal/page-layout.js +1 -1
  159. package/dist/internal/picker.js +1 -1
  160. package/dist/internal/progress.d.ts +5 -0
  161. package/dist/internal/search.d.ts +33 -0
  162. package/dist/internal/search.js +1 -0
  163. package/dist/internal/styles.d.ts +39 -0
  164. package/dist/internal/styles.js +1 -1
  165. package/dist/locales/ar.js +1 -1
  166. package/dist/locales/de.js +1 -1
  167. package/dist/locales/es.js +1 -1
  168. package/dist/locales/fr.js +1 -1
  169. package/dist/locales/hi.js +1 -1
  170. package/dist/locales/id.js +1 -1
  171. package/dist/locales/it.js +1 -1
  172. package/dist/locales/ja.js +1 -1
  173. package/dist/locales/ko.js +1 -1
  174. package/dist/locales/nl.js +1 -1
  175. package/dist/locales/pl.js +1 -1
  176. package/dist/locales/pt.js +1 -1
  177. package/dist/locales/ru.js +1 -1
  178. package/dist/locales/th.js +1 -1
  179. package/dist/locales/tr.js +1 -1
  180. package/dist/locales/vi.js +1 -1
  181. package/dist/locales/zh-hans.js +1 -1
  182. package/dist/locales/zh-hant.js +1 -1
  183. package/dist/styles.css +1 -1
  184. package/dist/tailwind.css +104 -0
  185. package/dist/types.d.ts +16 -0
  186. package/package.json +2 -2
@@ -0,0 +1,50 @@
1
+ import * as React from 'react';
2
+ import type { NebaColor, NebaSize } from '../../types.js';
3
+ /**
4
+ * Which axes may scroll.
5
+ *
6
+ * `NebaOrientation` plus a third value rather than the type itself, because
7
+ * "both" is meaningless everywhere that type is used today — a Divider, a
8
+ * ButtonGroup and a Slider each run one way — and widening it there to say it
9
+ * here would be the second spelling this library keeps out.
10
+ */
11
+ export type ScrollAreaOrientation = 'vertical' | 'horizontal' | 'both';
12
+ export interface ScrollAreaProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color'> {
13
+ /** Which axes may scroll. @default 'vertical' */
14
+ orientation?: ScrollAreaOrientation;
15
+ /**
16
+ * A fixed height. A vertical scroll area has to be bounded by something or
17
+ * there is nothing to scroll; this is the shortest way to say what by.
18
+ */
19
+ height?: number | string;
20
+ /** The same, as a ceiling rather than a fixed height. */
21
+ maxHeight?: number | string;
22
+ /** Thickness of the scrollbar and the size of its inset. @default 'md' */
23
+ size?: NebaSize;
24
+ /** The family the thumb carries. @default 'primary' */
25
+ color?: NebaColor;
26
+ /**
27
+ * Fades the content out at each edge that has more beyond it, and only at
28
+ * those edges — so the fade is a statement about the content rather than
29
+ * decoration, and it disappears at the top when you are at the top.
30
+ * @default false
31
+ */
32
+ fade?: boolean;
33
+ children?: React.ReactNode;
34
+ }
35
+ /**
36
+ * A box with its own scrollbar.
37
+ *
38
+ * The browser's scrollbar is drawn by the operating system, which means it is
39
+ * seventeen pixels wide on one machine, overlaid and invisible on the next, and
40
+ * a different colour in a dark theme than the sheet it is cut into. This one is
41
+ * an element, so it is the same everywhere and it can be made of the library's
42
+ * own tokens.
43
+ *
44
+ * It is not [ScrollZone](./scroll-zone), which is a *rail* — a strip of items
45
+ * laid out in one direction with buttons that step through them, for a row of
46
+ * cards or a line of chips. This is the plain case: a box that is too small for
47
+ * what is in it. Underneath, both are ordinary scroll containers, so the wheel,
48
+ * the trackpad, the keyboard and momentum are the browser's own in both.
49
+ */
50
+ export declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as a from"react";import{ScrollArea as n}from"@base-ui/react/scroll-area";import{cx as o,focusRingClasses as l,toLength as t}from"../../internal/styles.js";const i={xs:"0.25rem",sm:"0.3125rem",md:"0.375rem",lg:"0.5rem",xl:"0.625rem"},s={xs:"1rem",sm:"1.25rem",md:"1.5rem",lg:"2rem",xl:"2.5rem"},c=["flex touch-none select-none rounded-full p-px","bg-transparent hover:bg-(--n-soft)","opacity-0 transition-[opacity,background-color] duration-(--neba-duration) ease-(--neba-ease)","data-[hovering]:opacity-100 data-[scrolling]:opacity-100 data-[scrolling]:duration-0"].join(" "),m="flex-1 rounded-full bg-(--n-thumb) hover:bg-(--n-thumb-hover)";export const ScrollArea=/*@__PURE__*/a.forwardRef(function({orientation:a="vertical",height:h,maxHeight:d,size:b="md",color:u="primary",fade:f=!1,className:g,style:p,children:x,...v},y){const N="vertical"===a||"both"===a,w="horizontal"===a||"both"===a;return r(n.Root,{ref:y,className:o("relative overflow-hidden",g??""),style:{"--n-soft":`var(--neba-${u}-soft)`,"--n-ring":`var(--neba-${u}-ring)`,"--n-thumb":`color-mix(in oklab, var(--neba-${u}-accent) 35%, transparent)`,"--n-thumb-hover":`color-mix(in oklab, var(--neba-${u}-accent) 55%, transparent)`,"--n-rail":i[b],"--n-fade":s[b],height:t(h),maxHeight:t(d),...p},...v,children:[e(n.Viewport,{style:{height:"100%",width:"100%"},className:o("overscroll-contain [outline:none]",l,f?"neba-scroll-fade":""),children:e(n.Content,{className:"min-w-full",children:x})}),N?e(n.Scrollbar,{orientation:"vertical",className:`${c} w-(--n-rail) [margin-block:2px]`,children:e(n.Thumb,{className:m})}):null,w?e(n.Scrollbar,{orientation:"horizontal",className:`${c} h-(--n-rail) [margin-inline:2px]`,children:e(n.Thumb,{className:m})}):null,N&&w?e(n.Corner,{}):null]})});
@@ -0,0 +1,2 @@
1
+ export { ScrollArea } from './ScrollArea.js';
2
+ export type { ScrollAreaOrientation, ScrollAreaProps } from './ScrollArea.js';
@@ -0,0 +1 @@
1
+ export{ScrollArea}from"./ScrollArea.js";
@@ -9,8 +9,9 @@ import type { NebaOrientation, NebaStyleProps } from '../../types.js';
9
9
  * - `always` — both, from the first paint, with the one that has nowhere to go
10
10
  * `disabled` rather than gone. What a row whose content arrives later wants,
11
11
  * since the buttons do not appear under the pointer half a second in.
12
- * - `none` — none at all. Dragging, the wheel and the arrow keys are still
13
- * there; this is the strip that scrolls the way a phone scrolls.
12
+ * - `none` — none at all. Dragging, the arrow keys and whatever the pointer can
13
+ * already swipe with are still there; this is the strip that scrolls the way
14
+ * a phone scrolls.
14
15
  */
15
16
  export type ScrollZoneButtons = 'auto' | 'always' | 'none';
16
17
  /**
@@ -28,19 +29,20 @@ export type ScrollZoneMode = 'item' | 'page' | 'hold';
28
29
  /**
29
30
  * Where the scroll buttons sit, which is also where the strip ends.
30
31
  *
32
+ * - `inline` — beside the strip, in the layout. The default. The scroller stops
33
+ * where the button starts, so an item is *cut off* at the button's edge
34
+ * rather than sliding beneath it: nothing is ever half-hidden behind a
35
+ * control, and the button is legible over the page rather than over whatever
36
+ * it landed on.
31
37
  * - `overlay` — over the ends of the strip, which keeps every pixel of the box
32
- * for content and lets an item pass under a button. The default, and what a
33
- * shelf of pictures wants.
34
- * - `inline` — beside the strip, in the layout. The scroller stops where the
35
- * button starts, so an item is *cut off* at the button's edge rather than
36
- * sliding beneath it: nothing is ever half-hidden behind a control, and the
37
- * button is legible over the page rather than over whatever it landed on.
38
+ * for content and lets an item pass under a button. What a shelf of pictures
39
+ * wants, where the thing under the button is a picture that carries on.
38
40
  *
39
41
  * The lane an `inline` button sits in is kept even while that button has
40
42
  * nowhere to go, or the strip would resize under the pointer every time it
41
43
  * reached an end.
42
44
  */
43
- export type ScrollZoneButtonPlacement = 'overlay' | 'inline';
45
+ export type ScrollZoneButtonPlacement = 'inline' | 'overlay';
44
46
  export interface ScrollZoneProps extends NebaStyleProps, Omit<React.ComponentPropsWithoutRef<'div'>, 'color'> {
45
47
  /**
46
48
  * Which way the children run, and therefore which way the zone scrolls.
@@ -63,10 +65,10 @@ export interface ScrollZoneProps extends NebaStyleProps, Omit<React.ComponentPro
63
65
  /** When the scroll buttons are drawn. @default 'auto' */
64
66
  buttons?: ScrollZoneButtons;
65
67
  /**
66
- * Whether the buttons sit over the strip or beside it. `inline` is what to
67
- * reach for when an item disappearing under a button reads as a bug rather
68
- * than as depth.
69
- * @default 'overlay'
68
+ * Whether the buttons sit beside the strip or over it. `overlay` is what to
69
+ * reach for when the thing under a button is content that carries on rather
70
+ * than something to be read whole.
71
+ * @default 'inline'
70
72
  */
71
73
  buttonPlacement?: ScrollZoneButtonPlacement;
72
74
  /** What pressing one does. @default 'item' */
@@ -89,6 +91,21 @@ export interface ScrollZoneProps extends NebaStyleProps, Omit<React.ComponentPro
89
91
  * @default true
90
92
  */
91
93
  drag?: boolean;
94
+ /**
95
+ * Turns a wheel rolled over the strip into travel along it — the one axis a
96
+ * mouse has, on a strip that does not run along it. Off by default, because a
97
+ * wheel taken from the page is the page's: a reader who meant to scroll past
98
+ * the shelf is held by it instead.
99
+ *
100
+ * What it does take it gives back at the ends, so a strip with nothing left
101
+ * ahead of it is something to scroll past rather than something to be caught
102
+ * in. A trackpad swiping sideways is left alone — that already scrolls the
103
+ * strip, and answering it here would move twice as far as it was asked to —
104
+ * and a vertical zone ignores the prop, the wheel already pointing the way it
105
+ * runs.
106
+ * @default false
107
+ */
108
+ wheel?: boolean;
92
109
  /** Shows the native scrollbar. @default false */
93
110
  scrollbar?: boolean;
94
111
  /**
@@ -109,10 +126,11 @@ export interface ScrollZoneProps extends NebaStyleProps, Omit<React.ComponentPro
109
126
  *
110
127
  * The mechanism is an ordinary scroll container, and everything the component
111
128
  * offers is a way of driving one. Swiping on a phone, two-finger dragging on a
112
- * trackpad, the wheel, the arrow keys and the scrollbar are the browser's own
113
- * and are never intercepted; what is added on top is a pair of buttons for the
114
- * pointer that has neither a wheel nor a finger, and a mouse drag for the strip
115
- * that reads as something to pull rather than something to page.
129
+ * trackpad, the arrow keys and the scrollbar are the browser's own and are
130
+ * never intercepted; what is added on top is a pair of buttons for the pointer
131
+ * that has neither a wheel nor a finger, a mouse drag for the strip that reads
132
+ * as something to pull rather than something to page, and — only where it is
133
+ * asked for — the wheel turned onto the axis the strip runs along.
116
134
  *
117
135
  * Nothing is transformed. A translated track would have to argue for an
118
136
  * exception to the house rule; a scroll offset does not, and it is also what
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{IconButton as r}from"../icon-button/IconButton.js";import{spacingValue as o}from"../../internal/grid.js";import{scrollMessages as i,useMessages as s}from"../../internal/i18n.js";import{ChevronIcon as l}from"../../internal/icons.js";import{cx as a}from"../../internal/styles.js";const c={xs:"p-1",sm:"p-1.5",md:"p-2",lg:"p-3",xl:"p-4"},u={xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-3",xl:"gap-4"};export const ScrollZone=/*@__PURE__*/n.forwardRef(function({orientation:d="horizontal",lines:m=1,spacing:p=2,buttons:f="auto",buttonPlacement:v="overlay",mode:b="item",step:w=1,speed:g=900,snap:h=!1,drag:y=!0,scrollbar:x=!1,variant:k="solid",size:L="md",color:E="primary",density:C="default",locale:R,label:j,previousLabel:P,nextLabel:M,className:N,style:T,children:A,...z},D){const S=s(i,R),B="horizontal"===d,F=Math.max(1,Math.round(m)),H=Math.max(1,Math.round(w)),I=n.useRef(null),W=n.useRef(null),[$,q]=n.useState({back:!1,forward:!1}),O=n.useCallback(()=>{const e=I.current;if(!e)return;const t=B?e.clientWidth:e.clientHeight,n=B?e.scrollWidth:e.scrollHeight,r=Math.abs(B?e.scrollLeft:e.scrollTop);q(e=>{const o=r>1,i=n-t-r>1;return e.back===o&&e.forward===i?e:{back:o,forward:i}})},[B]);n.useEffect(()=>{const e=I.current,t=W.current;if(!e)return;if(O(),"undefined"==typeof ResizeObserver)return;const n=new ResizeObserver(O);return n.observe(e),t&&n.observe(t),()=>n.disconnect()},[O]);const X=n.useCallback(()=>{const e=I.current;return e&&B&&"rtl"===getComputedStyle(e).direction?-1:1},[B]),Y=n.useCallback((e,t)=>{const n=I.current;if(!n)return;const r=t?"undefined"!=typeof window&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?"auto":"smooth":"auto";n.scrollBy(B?{left:e,behavior:r}:{top:e,behavior:r})},[B]),_=n.useCallback(()=>{const e=I.current,t=W.current;if(!e||!t)return[];const n=B&&"rtl"===getComputedStyle(e).direction,r=B?n?"right":"left":"top",o=n?-1:1,i=e.getBoundingClientRect()[r],s=[];for(const e of Array.from(t.children)){const t=Math.round((e.getBoundingClientRect()[r]-i)*o);s.includes(t)||s.push(t)}return s.sort((e,t)=>e-t)},[B]),K=n.useCallback((e,t=b)=>{const n=I.current;if(!n)return;const r=X(),o=B?n.clientWidth:n.clientHeight;if("page"===t)return void Y(o*(e?1:-1)*r,!0);const i=_(),s=i.filter(e=>e>1),l=i.filter(e=>e<-1),a=e?s[H-1]:l[l.length-H];Y(void 0!==a?a*r:o*(e?1:-1)*r,!0)},[X,B,_,H,b,Y]),V=n.useRef(null);n.useEffect(()=>()=>V.current?.(),[]);const Z=n.useCallback((e,t)=>{if(V.current)return;const n=X(),r=performance.now();let o=r,i=0;const s=t=>{const r=t-o;o=t,Y(g*r/1e3*(e?1:-1)*n,!1),i=requestAnimationFrame(s)};i=requestAnimationFrame(s);const l=()=>{cancelAnimationFrame(i),V.current=null,window.removeEventListener(t,l),window.removeEventListener("pointercancel",l),window.removeEventListener("blur",l),performance.now()-r<140&&K(e,"item")};V.current=l,window.addEventListener(t,l),window.addEventListener("pointercancel",l),window.addEventListener("blur",l)},[K,X,Y,g]),G=n.useRef(null);function J(e){return"hold"!==b?{onClick:()=>K(e)}:{onPointerDown:t=>{0===t.button&&Z(e,"pointerup")},onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),Z(e,"keyup"))}}}n.useEffect(()=>()=>G.current?.(),[]);const Q="none"!==f&&("always"===f||$.back||$.forward),U="inline"===v;function ee(t){const n=t?$.forward:$.back;if("auto"===f&&!n&&!U)return e("span",{});const o=B?t?"-rotate-90 rtl:rotate-90":"rotate-90 rtl:-rotate-90":t?"":"rotate-180",i="auto"===f&&!n,s=e(r,{variant:k,size:L,color:E,density:C,elevation:1,label:t?M??S.next:P??S.previous,disabled:!n,className:"pointer-events-auto",icon:e("span",{className:a("flex items-center",o),children:e(l,{})}),...J(t)});return U?e("span",{className:a("flex shrink-0 items-center justify-center",i?"invisible":""),inert:i,children:s}):s}return t("div",{ref:D,className:a("relative flex min-w-0",U&&B?"flex-row items-stretch":"flex-col",U?u[L]:"",N),style:{"--n-ring":`var(--neba-${E}-ring)`,...T},...z,children:[Q&&U?ee(!1):null,e("div",{ref:I,tabIndex:0,role:j?"group":void 0,"aria-label":j,className:a("min-h-0 min-w-0 grow",B?"overflow-x-auto overflow-y-hidden":"overflow-y-auto overflow-x-hidden",h?B?"snap-x snap-mandatory":"snap-y snap-mandatory":"",x?"":"[scrollbar-width:none] [&::-webkit-scrollbar]:hidden",y&&($.back||$.forward)?"cursor-grab data-[dragging]:cursor-grabbing":"","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]"),onScroll:O,onPointerDown:function(e){if(!y||"touch"===e.pointerType||0!==e.button)return;G.current?.();const t=e.currentTarget,n=e.clientX,r=e.clientY,o=t.scrollLeft,i=t.scrollTop;let s=!1;const l=document.body.style.getPropertyValue("-webkit-user-select"),a=e=>{const l=e.clientX-n,a=e.clientY-r;if(!s){if(Math.abs(B?l:a)<4)return;s=!0,t.setPointerCapture(e.pointerId),t.dataset.dragging="true",document.body.style.setProperty("-webkit-user-select","none")}B?t.scrollLeft=o-l:t.scrollTop=i-a},c=()=>{G.current=null,t.removeEventListener("pointermove",a),t.removeEventListener("pointerup",u),t.removeEventListener("pointercancel",c),delete t.dataset.dragging,l?document.body.style.setProperty("-webkit-user-select",l):document.body.style.removeProperty("-webkit-user-select")},u=()=>{const e=s;if(c(),!e)return;const n=e=>{e.stopPropagation(),e.preventDefault()};t.addEventListener("click",n,{capture:!0,once:!0}),window.setTimeout(()=>t.removeEventListener("click",n,!0),0)};G.current=c,t.addEventListener("pointermove",a),t.addEventListener("pointerup",u),t.addEventListener("pointercancel",c)},children:e("div",{ref:W,className:a(h?"[&>*]:snap-start":""),style:{display:"grid",gap:o(p),gridAutoFlow:B?"column":"row",...B?{width:"max-content",gridTemplateRows:`repeat(${F}, auto)`,gridAutoColumns:"max-content"}:{gridTemplateColumns:`repeat(${F}, minmax(0, 1fr))`,gridAutoRows:"max-content"}},children:A})}),Q&&U?ee(!0):null,Q&&!U?t("div",{className:a("pointer-events-none absolute inset-0 flex justify-between",B?"items-center":"flex-col items-center",c[L]),children:[ee(!1),ee(!0)]}):null]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{IconButton as r}from"../icon-button/IconButton.js";import{spacingValue as o}from"../../internal/grid.js";import{scrollMessages as i,useMessages as l}from"../../internal/i18n.js";import{ChevronIcon as s}from"../../internal/icons.js";import{queryMatches as a,reducedMotionQuery as c}from"../../internal/media.js";import{observeResize as u}from"../../internal/observe.js";import{cx as d}from"../../internal/styles.js";const f={xs:"p-1",sm:"p-1.5",md:"p-2",lg:"p-3",xl:"p-4"},m={xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-3",xl:"gap-4"};export const ScrollZone=/*@__PURE__*/n.forwardRef(function({orientation:p="horizontal",lines:v=1,spacing:b=2,buttons:w="auto",buttonPlacement:g="inline",mode:h="item",step:y=1,speed:x=900,snap:k=!1,drag:L=!0,wheel:E=!1,scrollbar:C=!1,variant:j="solid",size:M="md",color:P="primary",density:R="default",locale:N,label:T,previousLabel:A,nextLabel:D,className:W,style:S,children:z,...B},F){const Y=l(i,N),H="horizontal"===p,I=Math.max(1,Math.round(v)),X=Math.max(1,Math.round(y)),$=n.useRef(null),q=n.useRef(null),[K,_]=n.useState({back:!1,forward:!1}),V=n.useCallback(()=>{const e=$.current;if(!e)return;const t=H?e.clientWidth:e.clientHeight,n=H?e.scrollWidth:e.scrollHeight,r=Math.abs(H?e.scrollLeft:e.scrollTop);_(e=>{const o=r>1,i=n-t-r>1;return e.back===o&&e.forward===i?e:{back:o,forward:i}})},[H]);n.useEffect(()=>{const e=$.current,t=q.current;if(!e)return;V();const n=[u(e,V),t?u(t,V):null];return()=>{for(const e of n)e?.()}},[V]);const Z=n.useCallback(()=>{const e=$.current;return e&&H&&"rtl"===getComputedStyle(e).direction?-1:1},[H]),G=n.useCallback((e,t)=>{const n=$.current;if(!n)return;const r=t?a(c)?"auto":"smooth":"auto";n.scrollBy(H?{left:e,behavior:r}:{top:e,behavior:r})},[H]),J=n.useCallback(()=>{const e=$.current,t=q.current;if(!e||!t)return[];const n=H&&"rtl"===getComputedStyle(e).direction,r=H?n?"right":"left":"top",o=n?-1:1,i=e.getBoundingClientRect()[r],l=[];for(const e of Array.from(t.children)){const t=Math.round((e.getBoundingClientRect()[r]-i)*o);l.includes(t)||l.push(t)}return l.sort((e,t)=>e-t)},[H]),O=n.useCallback((e,t=h)=>{const n=$.current;if(!n)return;const r=Z(),o=H?n.clientWidth:n.clientHeight;if("page"===t)return void G(o*(e?1:-1)*r,!0);const i=J(),l=i.filter(e=>e>1),s=i.filter(e=>e<-1),a=e?l[X-1]:s[s.length-X];G(void 0!==a?a*r:o*(e?1:-1)*r,!0)},[Z,H,J,X,h,G]),Q=n.useRef(null);n.useEffect(()=>()=>Q.current?.(),[]);const U=n.useCallback((e,t)=>{if(Q.current)return;const n=Z(),r=performance.now();let o=r,i=0;const l=t=>{const r=t-o;o=t,G(x*r/1e3*(e?1:-1)*n,!1),i=requestAnimationFrame(l)};i=requestAnimationFrame(l);const s=()=>{cancelAnimationFrame(i),Q.current=null,window.removeEventListener(t,s),window.removeEventListener("pointercancel",s),window.removeEventListener("blur",s),performance.now()-r<140&&O(e,"item")};Q.current=s,window.addEventListener(t,s),window.addEventListener("pointercancel",s),window.addEventListener("blur",s)},[O,Z,G,x]),ee=n.useRef(null);function te(e){return"hold"!==h?{onClick:()=>O(e)}:{onPointerDown:t=>{0===t.button&&U(e,"pointerup")},onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),U(e,"keyup"))}}}n.useEffect(()=>()=>ee.current?.(),[]),n.useEffect(()=>{const e=$.current;if(!e||!E||!H)return;const t=t=>{if(t.ctrlKey||Math.abs(t.deltaX)>Math.abs(t.deltaY))return;const n=1===t.deltaMode?16:2===t.deltaMode?e.clientWidth:1,r=t.deltaY*n;if(!r)return;const o=Math.abs(e.scrollLeft);(r>0?e.scrollWidth-e.clientWidth-o>1:o>1)&&(t.preventDefault(),G(r*Z(),!1))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[Z,H,G,E]);const ne="none"!==w&&("always"===w||K.back||K.forward),re="inline"===g;function oe(t){const n=t?K.forward:K.back;if("auto"===w&&!n&&!re)return e("span",{});const o=H?t?"-rotate-90 rtl:rotate-90":"rotate-90 rtl:-rotate-90":t?"":"rotate-180",i="auto"===w&&!n,l=e(r,{variant:j,size:M,color:P,density:R,elevation:1,label:t?D??Y.next:A??Y.previous,disabled:!n,className:"pointer-events-auto",icon:e("span",{className:d("flex items-center",o),children:e(s,{})}),...te(t)});return re?e("span",{className:d("flex shrink-0 items-center justify-center",i?"invisible":""),inert:i,children:l}):l}return t("div",{ref:F,className:d("relative flex min-w-0",re&&H?"flex-row items-stretch":"flex-col",re?m[M]:"",W),style:{"--n-ring":`var(--neba-${P}-ring)`,...S},...B,children:[ne&&re?oe(!1):null,e("div",{ref:$,tabIndex:0,role:"group","aria-label":T??Y.label,className:d("min-h-0 min-w-0 grow",H?"overflow-x-auto overflow-y-hidden":"overflow-y-auto overflow-x-hidden",k?H?"snap-x snap-mandatory":"snap-y snap-mandatory":"",C?"":"[scrollbar-width:none] [&::-webkit-scrollbar]:hidden",L&&(K.back||K.forward)?"cursor-grab data-[dragging]:cursor-grabbing":"","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]"),onScroll:V,onPointerDown:function(e){if(!L||"touch"===e.pointerType||0!==e.button)return;ee.current?.();const t=e.currentTarget,n=e.clientX,r=e.clientY,o=t.scrollLeft,i=t.scrollTop;let l=!1;const s=document.body.style.getPropertyValue("-webkit-user-select"),a=e=>{const s=e.clientX-n,a=e.clientY-r;if(!l){if(Math.abs(H?s:a)<4)return;l=!0,t.setPointerCapture(e.pointerId),t.dataset.dragging="true",document.body.style.setProperty("-webkit-user-select","none")}H?t.scrollLeft=o-s:t.scrollTop=i-a},c=()=>{ee.current=null,t.removeEventListener("pointermove",a),t.removeEventListener("pointerup",u),t.removeEventListener("pointercancel",c),delete t.dataset.dragging,s?document.body.style.setProperty("-webkit-user-select",s):document.body.style.removeProperty("-webkit-user-select")},u=()=>{const e=l;if(c(),!e)return;const n=e=>{e.stopPropagation(),e.preventDefault()};t.addEventListener("click",n,{capture:!0,once:!0}),window.setTimeout(()=>t.removeEventListener("click",n,!0),0)};ee.current=c,t.addEventListener("pointermove",a),t.addEventListener("pointerup",u),t.addEventListener("pointercancel",c)},children:e("div",{ref:q,className:d(k?"[&>*]:snap-start":""),style:{display:"grid",gap:o(b),gridAutoFlow:H?"column":"row",...H?{width:"max-content",gridTemplateRows:`repeat(${I}, auto)`,gridAutoColumns:"max-content"}:{gridTemplateColumns:`repeat(${I}, minmax(0, 1fr))`,gridAutoRows:"max-content"}},children:z})}),ne&&re?oe(!0):null,ne&&!re?t("div",{className:d("pointer-events-none absolute inset-0 flex justify-between",H?"items-center":"flex-col items-center",f[M]),children:[oe(!1),oe(!0)]}):null]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{Radio as n}from"@base-ui/react/radio";import{RadioGroup as r}from"@base-ui/react/radio-group";import{controlHeightClasses as s,controlSlots as l,controlTextClasses as o,gapClasses as i,hasContent as d,iconClasses as u,paddingXClasses as c,surfaceClasses as f,transitionClasses as h}from"../../internal/styles.js";const p=/*@__PURE__*/a.createContext({variant:"outline",size:"md",density:"default",fullWidth:!1}),b={solid:`${f} bg-(--n-panel) p-1 [box-shadow:var(--n-elev),var(--neba-plate-glass)]`,outline:`${f} border bg-(--n-panel) p-1 [border-color:var(--n-line)] [box-shadow:var(--n-elev),var(--neba-plate-glass)]`,text:""},m={solid:`${f} bg-(--n-fill) [box-shadow:var(--neba-shadow-1),var(--neba-plate-solid)]`,outline:`${f} bg-(--n-panel-press) [box-shadow:var(--neba-shadow-1),var(--neba-plate-glass)]`,text:`${f} bg-(--n-panel-press) [box-shadow:var(--neba-shadow-1),var(--neba-plate-glass)]`},v={solid:"data-[checked]:text-(--n-on-solid)",outline:"data-[checked]:text-(--n-accent)",text:"data-[checked]:text-(--n-accent)"};export const Segment=/*@__PURE__*/a.forwardRef(function({value:r,startIcon:l,endIcon:f,disabled:b=!1,className:m,children:x,...g},y){const{variant:w,size:k,density:$,fullWidth:j}=a.useContext(p);return t(n.Root,{ref:y,value:r,disabled:b,"data-segment":"",className:["relative z-10 inline-flex shrink-0 cursor-pointer items-center justify-center select-none","whitespace-nowrap font-medium","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",s[k],o[k],i[k],c[$][k],"rounded-full",h,u,"text-(--neba-muted-fg) hover:text-(--neba-fg)",v[w],"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]","data-[disabled]:cursor-not-allowed data-[disabled]:text-(--neba-disabled-fg)","data-[readonly]:cursor-default",j?"flex-1":"",m??""].filter(Boolean).join(" "),...g,children:[d(l)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:l}):null,x,d(f)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:f}):null]})});export const SegmentedButton=/*@__PURE__*/a.forwardRef(function({variant:n="outline",size:s="md",color:o="primary",density:i="default",elevation:d=0,value:u,defaultValue:c=null,onValueChange:f,disabled:v=!1,readOnly:x=!1,name:g,fullWidth:y=!1,className:w,style:k,children:$,...j},R){const[N,z]=a.useState(c),W=void 0!==u,C=W?u:N,P=a.useRef(null),S=a.useRef(null),A=a.useCallback(e=>{const t=P.current,a=S.current;if(!t||!a)return;const n=t.querySelector("[data-segment][data-checked]");if(!n)return;const r=!e||!a.hasAttribute("data-ready");r&&a.removeAttribute("data-ready"),a.style.setProperty("--n-seg-x",`${n.offsetLeft}px`),a.style.setProperty("--n-seg-y",`${n.offsetTop}px`),a.style.setProperty("--n-seg-w",`${n.offsetWidth}px`),a.style.setProperty("--n-seg-h",`${n.offsetHeight}px`),r&&a.offsetWidth,a.setAttribute("data-ready","")},[]);a.useLayoutEffect(()=>{A(!0)},[A,C,n,s,i,y,$]),a.useEffect(()=>{const e=P.current;if(!e)return;const t=new ResizeObserver(()=>A(!1));return t.observe(e),()=>t.disconnect()},[A]);const B=a.useMemo(()=>({variant:n,size:s,density:i,fullWidth:y}),[n,s,i,y]);return e(p.Provider,{value:B,children:t(r,{ref:e=>{P.current=e,"function"==typeof R?R(e):R&&(R.current=e)},value:C,onValueChange:e=>{const t=e??null;W||z(t),f?.(t)},disabled:v,readOnly:x,name:g,className:["relative inline-flex items-center rounded-full",b[n],h,x?"[filter:saturate(0.55)]":"",y?"flex w-full":"",w??""].filter(Boolean).join(" "),style:{...l(o,d,n),...k},...j,children:[null!=C?e("span",{ref:S,"aria-hidden":"true",className:["pointer-events-none absolute rounded-full","left-(--n-seg-x) top-(--n-seg-y) h-(--n-seg-h) w-(--n-seg-w)",m[n],"[transition-property:left,top,width,height]","[transition-timing-function:var(--neba-ease)]","[transition-duration:0ms] data-[ready]:[transition-duration:var(--neba-duration)]"].join(" ")}):null,$]})})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{Radio as n}from"@base-ui/react/radio";import{RadioGroup as r}from"@base-ui/react/radio-group";import{observeResize as s}from"../../internal/observe.js";import{controlHeightClasses as l,controlSlots as o,controlTextClasses as i,cx as d,gapClasses as u,hasContent as c,iconClasses as f,paddingXClasses as p,surfaceClasses as h,transitionClasses as b}from"../../internal/styles.js";const m=/*@__PURE__*/a.createContext({variant:"outline",size:"md",density:"default",fullWidth:!1}),v={solid:`${h} bg-(--n-panel) p-1 [box-shadow:var(--n-elev),var(--neba-plate-glass)]`,outline:`${h} border bg-(--n-panel) p-1 [border-color:var(--n-line)] [box-shadow:var(--n-elev),var(--neba-plate-glass)]`,text:""},x={solid:`${h} bg-(--n-fill) [box-shadow:var(--neba-shadow-1),var(--neba-plate-solid)]`,outline:`${h} bg-(--n-panel-press) [box-shadow:var(--neba-shadow-1),var(--neba-plate-glass)]`,text:`${h} bg-(--n-panel-press) [box-shadow:var(--neba-shadow-1),var(--neba-plate-glass)]`},g={solid:"data-[checked]:text-(--n-on-solid)",outline:"data-[checked]:text-(--n-accent)",text:"data-[checked]:text-(--n-accent)"};export const Segment=/*@__PURE__*/a.forwardRef(function({value:r,startIcon:s,endIcon:o,disabled:h=!1,className:v,children:x,...y},w){const{variant:k,size:$,density:j,fullWidth:N}=a.useContext(m);return t(n.Root,{ref:w,value:r,disabled:h,"data-segment":"",className:d("relative z-10 inline-flex shrink-0 cursor-pointer items-center justify-center select-none","whitespace-nowrap font-medium","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",l[$],i[$],u[$],p[j][$],"rounded-full",b,f,"text-(--neba-muted-fg) hover:text-(--neba-fg)",g[k],"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]","data-[disabled]:cursor-not-allowed data-[disabled]:text-(--neba-disabled-fg)","data-[readonly]:cursor-default",N?"flex-1":"",v??""),...y,children:[c(s)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:s}):null,x,c(o)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:o}):null]})});export const SegmentedButton=/*@__PURE__*/a.forwardRef(function({variant:n="outline",size:l="md",color:i="primary",density:d="default",elevation:u=0,value:c,defaultValue:f=null,onValueChange:p,disabled:h=!1,readOnly:g=!1,name:y,fullWidth:w=!1,className:k,style:$,children:j,...N},R){const[W,z]=a.useState(f),C=void 0!==c,P=C?c:W,S=a.useRef(null),A=a.useRef(null),V=a.useCallback(e=>{const t=S.current,a=A.current;if(!t||!a)return;const n=t.querySelector("[data-segment][data-checked]");if(!n)return;const r=!e||!a.hasAttribute("data-ready");r&&a.removeAttribute("data-ready"),a.style.setProperty("--n-seg-x",`${n.offsetLeft}px`),a.style.setProperty("--n-seg-y",`${n.offsetTop}px`),a.style.setProperty("--n-seg-w",`${n.offsetWidth}px`),a.style.setProperty("--n-seg-h",`${n.offsetHeight}px`),r&&a.offsetWidth,a.setAttribute("data-ready","")},[]);a.useLayoutEffect(()=>{V(!0)},[V,P,n,l,d,w,j]),a.useEffect(()=>{const e=S.current;if(e)return s(e,()=>V(!1))},[V]);const B=a.useMemo(()=>({variant:n,size:l,density:d,fullWidth:w}),[n,l,d,w]);return e(m.Provider,{value:B,children:t(r,{ref:e=>{S.current=e,"function"==typeof R?R(e):R&&(R.current=e)},value:P,onValueChange:e=>{const t=e??null;C||z(t),p?.(t)},disabled:h,readOnly:g,name:y,className:["relative inline-flex items-center rounded-full",v[n],b,g?"[filter:saturate(0.55)]":"",w?"flex w-full":"",k??""].filter(Boolean).join(" "),style:{...o(i,u,n),...$},...N,children:[null!=P?e("span",{ref:A,"aria-hidden":"true",className:["pointer-events-none absolute rounded-full","left-(--n-seg-x) top-(--n-seg-y) h-(--n-seg-h) w-(--n-seg-w)",x[n],"[transition-property:left,top,width,height]","[transition-timing-function:var(--neba-ease)]","[transition-duration:0ms] data-[ready]:[transition-duration:var(--neba-duration)]"].join(" ")}):null,j]})})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as t from"react";import{Select as l}from"@base-ui/react/select";import{Field as n}from"@base-ui/react/field";import{CheckIcon as r,ChevronIcon as i}from"../../internal/icons.js";import{WidthSizer as s}from"../../internal/sizer.js";import{controlHeightClasses as o,controlTextLeadingClasses as d,disabledClasses as c,fieldReadOnlyClasses as m,fieldRestClasses as u,focusWithinRingClasses as h,gapClasses as f,hasContent as p,iconClasses as b,metaTextClasses as g,paddingXClasses as x,radiusClasses as v,stackGapClasses as j,surfaceClasses as N,surfaceSlots as w,transitionClasses as y}from"../../internal/styles.js";const I=["group relative flex w-full cursor-pointer items-center select-none","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",y,"focus-within:[transition-duration:0ms]",h,b].join(" "),S=[N,"max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain","min-w-[var(--anchor-width)] border bg-(--n-panel-press) p-1","[border-color:var(--n-line)]","[box-shadow:var(--neba-shadow-3),var(--neba-plate-glass)]","[outline:none]"].join(" "),$=["relative flex cursor-pointer items-center gap-2 select-none","rounded-(--neba-radius-xs) py-1.5 pe-2 ps-7",y,"data-[highlighted]:bg-(--n-soft-hover) data-[highlighted]:text-(--n-accent)","data-[selected]:text-(--n-accent) data-[selected]:font-medium","data-[disabled]:cursor-not-allowed data-[disabled]:text-(--neba-disabled-fg)","[outline:none]"].join(" ");export const Select=/*@__PURE__*/t.forwardRef(function({variant:h="outline",size:b="md",color:N="primary",density:y="default",elevation:V=0,items:z,value:k,defaultValue:O,onValueChange:P,placeholder:R,label:T,description:q,error:C,invalid:M,startIcon:W,fullWidth:_=!1,disabled:B=!1,readOnly:D=!1,required:E=!1,name:L,id:A,className:F,style:G,...H},J){const K=null!=C&&!1!==C&&""!==C,Q=M??K,U=Q?"danger":N,X=t.useMemo(()=>z.map(e=>({label:e.label??String(e.value),value:e.value})),[z]),Y=t.useMemo(()=>[...z.map(e=>e.label??String(e.value)),...p(R)?[R]:[]],[z,R]);return a(n.Root,{disabled:B,invalid:Q,className:["flex-col align-top",j[b],_?"flex w-full":"inline-flex",F??""].filter(Boolean).join(" "),style:{...w(U,V),...G},...H,children:[T?e(n.Label,{className:[g[b],"font-medium",B?"text-(--neba-disabled-fg)":"text-(--neba-fg)"].join(" "),children:T}):null,a(l.Root,{id:A,name:L,items:X,value:k,defaultValue:O,onValueChange:e=>P?.(e),disabled:B,readOnly:D,required:E,children:[a(l.Trigger,{ref:J,className:[I,o[b],d[b],v[b],f[b],x[y][b],B?c[h]:D?`${m[h]} cursor-default`:u[h]].join(" "),children:[W?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:W}):null,a("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(l.Value,{className:["w-full truncate text-start","data-[placeholder]:text-(--neba-muted-fg)"].join(" "),placeholder:R}),e(s,{samples:Y})]}),e(l.Icon,{className:["flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)","[transition:rotate_var(--neba-duration)_var(--neba-ease)]","data-[popup-open]:rotate-180"].join(" "),children:e(i,{})})]}),e(l.Portal,{children:e(l.Positioner,{className:"neba-portal z-50 [outline:none]",sideOffset:6,alignItemWithTrigger:!1,children:e(l.Popup,{className:`${S} ${v[b]} ${d[b]}`,style:w(U,3),children:z.map(t=>a(l.Item,{value:t.value,disabled:t.disabled,className:$,children:[e(l.ItemIndicator,{className:"absolute start-1.5 flex size-4 items-center justify-center",children:e(r,{})}),e(l.ItemText,{className:"truncate",children:t.label??String(t.value)})]},String(t.value)))})})})]}),q?e(n.Description,{className:`${g[b]} text-(--neba-muted-fg)`,children:q}):null,K?e(n.Error,{match:!0,className:`${g[b]} text-(--n-accent)`,children:C}):null]})});
1
+ "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as t from"react";import{Select as l}from"@base-ui/react/select";import{Field as n}from"@base-ui/react/field";import{CheckIcon as r,ChevronIcon as i}from"../../internal/icons.js";import{WidthSizer as s}from"../../internal/sizer.js";import{controlHeightClasses as o,controlTextLeadingClasses as c,cx as d,disabledClasses as m,fieldReadOnlyClasses as u,fieldRestClasses as h,focusWithinRingClasses as f,gapClasses as p,hasContent as b,iconClasses as g,metaTextClasses as x,paddingXClasses as v,radiusClasses as N,stackGapClasses as j,surfaceClasses as w,surfaceSlots as y,transitionClasses as I}from"../../internal/styles.js";const $=["group relative flex w-full cursor-pointer items-center select-none","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",I,"focus-within:[transition-duration:0ms]",f,g].join(" "),S=[w,"max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain","min-w-[var(--anchor-width)] border bg-(--n-panel-press) p-1","[border-color:var(--n-line)]","[box-shadow:var(--neba-shadow-3),var(--neba-plate-glass)]","[outline:none]"].join(" "),V=["relative flex cursor-pointer items-center gap-2 select-none","rounded-(--neba-radius-xs) py-1.5 pe-2 ps-7",I,"data-[highlighted]:bg-(--n-soft-hover) data-[highlighted]:text-(--n-accent)","data-[selected]:text-(--n-accent) data-[selected]:font-medium","data-[disabled]:cursor-not-allowed data-[disabled]:text-(--neba-disabled-fg)","[outline:none]"].join(" ");export const Select=/*@__PURE__*/t.forwardRef(function({variant:f="outline",size:g="md",color:w="primary",density:I="default",elevation:z=0,items:k,value:O,defaultValue:P,onValueChange:R,placeholder:T,label:q,description:C,error:M,invalid:W,startIcon:_,fullWidth:D=!1,disabled:E=!1,readOnly:L=!1,required:A=!1,name:B,id:F,className:G,style:H,...J},K){const Q=null!=M&&!1!==M&&""!==M,U=W??Q,X=U?"danger":w,Y=t.useMemo(()=>k.map(e=>({label:e.label??String(e.value),value:e.value})),[k]),Z=t.useMemo(()=>[...k.map(e=>e.label??String(e.value)),...b(T)?[T]:[]],[k,T]);return a(n.Root,{disabled:E,invalid:U,className:d("flex-col align-top",j[g],D?"flex w-full":"inline-flex",G??""),style:{...y(X,z),...H},...J,children:[q?e(n.Label,{className:[x[g],"font-medium",E?"text-(--neba-disabled-fg)":"text-(--neba-fg)"].join(" "),children:q}):null,a(l.Root,{id:F,name:B,items:Y,value:O,defaultValue:P,onValueChange:e=>R?.(e),disabled:E,readOnly:L,required:A,children:[a(l.Trigger,{ref:K,className:[$,o[g],c[g],N[g],p[g],v[I][g],E?m[f]:L?`${u[f]} cursor-default`:h[f]].join(" "),children:[_?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:_}):null,a("span",{className:"flex min-w-0 flex-1 flex-col",children:[e(l.Value,{className:["w-full truncate text-start","data-[placeholder]:text-(--neba-muted-fg)"].join(" "),placeholder:T}),e(s,{samples:Z})]}),e(l.Icon,{className:["flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)","[transition:rotate_var(--neba-duration)_var(--neba-ease)]","data-[popup-open]:rotate-180"].join(" "),children:e(i,{})})]}),e(l.Portal,{children:e(l.Positioner,{className:"neba-portal z-50 [outline:none]",sideOffset:6,alignItemWithTrigger:!1,children:e(l.Popup,{className:`${S} ${N[g]} ${c[g]}`,style:y(X,3),children:k.map(t=>a(l.Item,{value:t.value,disabled:t.disabled,className:V,children:[e(l.ItemIndicator,{className:"absolute start-1.5 flex size-4 items-center justify-center",children:e(r,{})}),e(l.ItemText,{className:"truncate",children:t.label??String(t.value)})]},String(t.value)))})})})]}),C?e(n.Description,{className:`${x[g]} text-(--neba-muted-fg)`,children:C}):null,e(n.Error,Q?{match:!0,className:`${x[g]} text-(--n-accent)`,children:M}:{className:`${x[g]} text-(--n-accent)`})]})});
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as e,jsxs as a}from"react/jsx-runtime";import*as o from"react";import{controlHeightClasses as t,controlSlots as r,controlTextClasses as l,paddingXClasses as s,radiusClasses as m,srOnlyClasses as i,surfaceClasses as c,transitionClasses as d}from"../../internal/styles.js";const w=n=>({symbol:n,name:n}),u={mod:{mac:{symbol:"⌘",name:"Command"},windows:w("Ctrl"),linux:w("Ctrl")},meta:{mac:{symbol:"⌘",name:"Command"},windows:w("Win"),linux:w("Super")},ctrl:{mac:{symbol:"⌃",name:"Control"},windows:w("Ctrl"),linux:w("Ctrl")},alt:{mac:{symbol:"⌥",name:"Option"},windows:w("Alt"),linux:w("Alt")},shift:{mac:{symbol:"⇧",name:"Shift"},windows:w("Shift"),linux:w("Shift")},enter:{mac:{symbol:"↩",name:"Enter"},windows:w("Enter"),linux:w("Enter")},tab:{mac:{symbol:"⇥",name:"Tab"},windows:w("Tab"),linux:w("Tab")},escape:{mac:{symbol:"⎋",name:"Escape"},windows:w("Esc"),linux:w("Esc")},backspace:{mac:{symbol:"⌫",name:"Backspace"},windows:w("Backspace"),linux:w("Backspace")},delete:{mac:{symbol:"⌦",name:"Delete"},windows:w("Del"),linux:w("Del")},capslock:{mac:{symbol:"⇪",name:"Caps Lock"},windows:w("Caps Lock"),linux:w("Caps Lock")}},p={cmdorctrl:"mod",commandorcontrol:"mod",cmd:"meta",command:"meta",super:"meta",win:"meta",windows:"meta",control:"ctrl",option:"alt",opt:"alt",return:"enter",esc:"escape",del:"delete",caps:"capslock"},b={up:{symbol:"↑",name:"Arrow up"},down:{symbol:"↓",name:"Arrow down"},left:{symbol:"←",name:"Arrow left"},right:{symbol:"→",name:"Arrow right"},arrowup:{symbol:"↑",name:"Arrow up"},arrowdown:{symbol:"↓",name:"Arrow down"},arrowleft:{symbol:"←",name:"Arrow left"},arrowright:{symbol:"→",name:"Arrow right"}};function f(){if("undefined"==typeof navigator)return"windows";const n=navigator.userAgentData,e=`${n?.platform??""} ${navigator.platform??""} ${navigator.userAgent??""}`;return/mac|iphone|ipad|ipod/i.test(e)?"mac":/win/i.test(e)?"windows":"linux"}function y(){return()=>{}}function x(){return"windows"}const g={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg"},h={solid:[c,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[c,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft)"},v={xs:"min-w-5.5",sm:"min-w-6.5",md:"min-w-8",lg:"min-w-10",xl:"min-w-12"};export const Shortcut=/*@__PURE__*/o.forwardRef(function({variant:c="outline",size:A="md",color:k="secondary",density:C="compact",elevation:j=0,keys:E,os:S="auto",separator:B,className:N,style:D,...L},T){const $=o.useSyncExternalStore(y,f,x),F="auto"===S?$:S,z=g[A],O=function(n){return Array.isArray(n)?n.map(n=>n.trim()).filter(Boolean):n.split("+").map(n=>n.trim()).filter(Boolean)}(E),R=O.map(n=>function(n,e){const a=n.toLowerCase().replace(/[\s_-]/g,""),o=p[a]??a,t=b[o];if(t)return t;const r=u[o];return r?r[e]:w(1===n.length?n.toUpperCase():n)}(n,F)),U=void 0===B?"mac"===F?null:"+":B,W=["inline-flex shrink-0 items-center justify-center","font-mono font-medium leading-none whitespace-nowrap tabular-nums",t[z],l[z],v[z],s[C][z],m[z],h[c],d].join(" ");return n("span",{ref:T,className:["inline-flex max-w-full items-center gap-1 align-middle",N??""].filter(Boolean).join(" "),style:{...r(k,j,c),...D},...L,children:R.map((t,r)=>a(o.Fragment,{children:[r>0&&null!==U?n("span",{"aria-hidden":"true",className:"text-(--neba-muted-fg)",children:U}):null,n("kbd",{className:W,children:t.symbol===t.name?t.symbol:a(e,{children:[n("span",{"aria-hidden":"true",children:t.symbol}),n("span",{className:i,children:t.name})]})})]},r))})});
1
+ "use client";import{jsx as n,Fragment as e,jsxs as a}from"react/jsx-runtime";import*as o from"react";import{controlHeightClasses as t,controlSlots as r,controlTextClasses as l,cx as s,paddingXClasses as m,radiusClasses as i,srOnlyClasses as c,surfaceClasses as d,transitionClasses as w}from"../../internal/styles.js";const u=n=>({symbol:n,name:n}),p={mod:{mac:{symbol:"⌘",name:"Command"},windows:u("Ctrl"),linux:u("Ctrl")},meta:{mac:{symbol:"⌘",name:"Command"},windows:u("Win"),linux:u("Super")},ctrl:{mac:{symbol:"⌃",name:"Control"},windows:u("Ctrl"),linux:u("Ctrl")},alt:{mac:{symbol:"⌥",name:"Option"},windows:u("Alt"),linux:u("Alt")},shift:{mac:{symbol:"⇧",name:"Shift"},windows:u("Shift"),linux:u("Shift")},enter:{mac:{symbol:"↩",name:"Enter"},windows:u("Enter"),linux:u("Enter")},tab:{mac:{symbol:"⇥",name:"Tab"},windows:u("Tab"),linux:u("Tab")},escape:{mac:{symbol:"⎋",name:"Escape"},windows:u("Esc"),linux:u("Esc")},backspace:{mac:{symbol:"⌫",name:"Backspace"},windows:u("Backspace"),linux:u("Backspace")},delete:{mac:{symbol:"⌦",name:"Delete"},windows:u("Del"),linux:u("Del")},capslock:{mac:{symbol:"⇪",name:"Caps Lock"},windows:u("Caps Lock"),linux:u("Caps Lock")}},b={cmdorctrl:"mod",commandorcontrol:"mod",cmd:"meta",command:"meta",super:"meta",win:"meta",windows:"meta",control:"ctrl",option:"alt",opt:"alt",return:"enter",esc:"escape",del:"delete",caps:"capslock"},f={up:{symbol:"↑",name:"Arrow up"},down:{symbol:"↓",name:"Arrow down"},left:{symbol:"←",name:"Arrow left"},right:{symbol:"→",name:"Arrow right"},arrowup:{symbol:"↑",name:"Arrow up"},arrowdown:{symbol:"↓",name:"Arrow down"},arrowleft:{symbol:"←",name:"Arrow left"},arrowright:{symbol:"→",name:"Arrow right"}};let y=null;function x(){return y??=function(){if("undefined"==typeof navigator)return"windows";const n=navigator.userAgentData,e=`${n?.platform??""} ${navigator.platform??""} ${navigator.userAgent??""}`;return/mac|iphone|ipad|ipod/i.test(e)?"mac":/win/i.test(e)?"windows":"linux"}(),y}function g(){return()=>{}}function h(){return"windows"}const v={xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"lg"},A={solid:[d,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[d,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft)"},k={xs:"min-w-5.5",sm:"min-w-6.5",md:"min-w-8",lg:"min-w-10",xl:"min-w-12"};export const Shortcut=/*@__PURE__*/o.forwardRef(function({variant:d="outline",size:y="md",color:C="secondary",density:j="compact",elevation:E=0,keys:S,os:B="auto",separator:N,className:D,style:L,...T},$){const F=o.useSyncExternalStore(g,x,h),z="auto"===B?F:B,O=v[y],R=function(n){return Array.isArray(n)?n.map(n=>n.trim()).filter(Boolean):n.split("+").map(n=>n.trim()).filter(Boolean)}(S),U=R.map(n=>function(n,e){const a=n.toLowerCase().replace(/[\s_-]/g,""),o=b[a]??a,t=f[o];if(t)return t;const r=p[o];return r?r[e]:u(1===n.length?n.toUpperCase():n)}(n,z)),W=void 0===N?"mac"===z?null:"+":N,_=["inline-flex shrink-0 items-center justify-center","font-mono font-medium leading-none whitespace-nowrap tabular-nums",t[O],l[O],k[O],m[j][O],i[O],A[d],w].join(" ");return n("span",{ref:$,className:s("inline-flex max-w-full items-center gap-1 align-middle",D??""),style:{...r(C,E,d),...L},...T,children:U.map((t,r)=>a(o.Fragment,{children:[r>0&&null!==W?n("span",{"aria-hidden":"true",className:"text-(--neba-muted-fg)",children:W}):null,n("kbd",{className:_,children:t.symbol===t.name?t.symbol:a(e,{children:[n("span",{"aria-hidden":"true",children:t.symbol}),n("span",{className:c,children:t.name})]})})]},r))})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{boxPaddingXClasses as n,boxPaddingYClasses as o}from"../box/Box.js";import{Drawer as s}from"../drawer/Drawer.js";import{layoutMessages as i,useMessages as a}from"../../internal/i18n.js";import{drawerSide as l,expandedOnlyClasses as d,PageLayoutContext as c,SidebarSideContext as u,useCollapsed as p}from"../../internal/page-layout.js";import{cx as m,surfaceClasses as f,surfaceSlots as b,toLength as v,transitionClasses as y}from"../../internal/styles.js";const g={xs:"11rem",sm:"13rem",md:"16rem",lg:"18rem",xl:"21rem"},w={solid:[f,"text-(--neba-fg) bg-(--n-panel-press)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[f,"text-(--neba-fg) bg-(--n-panel)","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"};function x(e,t){if(null==e)return t;if("number"==typeof e)return e;const r=/^\s*(-?[\d.]+)\s*(px|rem|em|%)\s*$/.exec(e);if(!r)return t;const n=Number(r[1]);if(Number.isNaN(n))return t;switch(r[2]){case"px":return n;case"%":return"undefined"==typeof window?t:window.innerWidth*n/100;default:return n*parseFloat(("undefined"==typeof document?"":getComputedStyle(document.documentElement).fontSize)||"16")}}export const Sidebar=/*@__PURE__*/r.forwardRef(function({side:f,width:h,minWidth:k=160,maxWidth:C=480,resizable:j=!1,onResize:z,onResizeEnd:E,collapseBelow:N,open:R,defaultOpen:L=!1,onOpenChange:S,sticky:P=!0,title:B,variant:D="outline",size:O="md",color:A="primary",density:M="default",elevation:W=0,divider:I=!0,padded:T=!0,label:X,locale:$,className:_,style:F,children:K,...V},q){const G=r.useContext(c),H=r.useContext(u),J=f??H??"start",Q=$??G.locale,U=a(i,Q),Y=N??(G.present?G.collapseBelow:"none"),Z=p(Y),[ee,te]=r.useState(L),re=void 0!==R,ne=re?R:G.present?G.open[J]:ee,oe=e=>{re||(G.present?G.setOpen(J,e):te(e)),S?.(e)},se=v(h)??g[O],ie=r.useRef(null),ae=r.useCallback(e=>{ie.current=e,"function"==typeof q?q(e):q&&(q.current=e)},[q]),le=r.useRef(null);r.useEffect(()=>()=>le.current?.(),[]);const de=e=>{const t=ie.current;if(!t)return e;const r=Math.min(x(C,480),Math.max(x(k,160),Math.round(e)));return t.style.setProperty("--n-sidebar-w",`${r}px`),r},ce=e("div",{className:m("min-h-0 flex-1 overflow-y-auto overscroll-contain",T?m(n[M][O],o[M][O]):""),children:K});return Z?e(s,{side:l(J),mode:"overlay",open:ne,onOpenChange:oe,title:B,size:O,color:A,density:M,locale:Q,closeLabel:U.closeSidebar,extent:void 0===h?void 0:se,"aria-label":B?void 0:X??U.sidebar,className:_,style:F,children:K}):t("aside",{ref:ae,"aria-label":X??U.sidebar,className:m("relative flex min-w-0 shrink-0 flex-col","w-(--n-sidebar-w)",w[D],I?m("start"===J?"border-e":"border-s","[border-color:var(--n-line)]"):"","content"===G.scroll?"h-full":P?m("self-start","sticky [top:var(--n-layout-header,0px)]","[height:calc(100dvh-var(--n-layout-header,0px)-var(--n-layout-footer,0px))]"):"",d[Y],y,_),style:{...b(A,W),"--n-sidebar-w":se,...F},...V,children:[ce,j?e("div",{role:"separator","aria-orientation":"vertical","aria-label":U.resizeSidebar,tabIndex:0,className:m("absolute inset-y-0 z-1 w-2 cursor-col-resize","start"===J?"end-0 -me-1":"start-0 -ms-1","bg-transparent hover:bg-(--n-soft) data-[dragging]:bg-(--n-soft)",y,"[outline:none] focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-0"),onPointerDown:e=>{const t=ie.current;if(!t||0!==e.button)return;const r=e.currentTarget;r.setPointerCapture(e.pointerId),r.dataset.dragging="true";const n=document.body.style.getPropertyValue("-webkit-user-select");document.body.style.setProperty("-webkit-user-select","none");const o=e.clientX,s=t.getBoundingClientRect().width,i="rtl"===getComputedStyle(t).direction,a="start"===J===i?-1:1;let l=s;const d=e=>{l=de(s+(e.clientX-o)*a),z?.(l)},c=()=>{le.current=null,r.removeEventListener("pointermove",d),r.removeEventListener("pointerup",u),r.removeEventListener("pointercancel",u),delete r.dataset.dragging,n?document.body.style.setProperty("-webkit-user-select",n):document.body.style.removeProperty("-webkit-user-select")},u=()=>{c(),E?.(l)};le.current=c,r.addEventListener("pointermove",d),r.addEventListener("pointerup",u),r.addEventListener("pointercancel",u)},onKeyDown:e=>{if("ArrowLeft"!==e.key&&"ArrowRight"!==e.key)return;e.preventDefault();const t="rtl"===getComputedStyle(e.currentTarget).direction,r="start"===J===t?-1:1;(e=>{const t=ie.current;if(!t)return;const r=de(t.getBoundingClientRect().width+e);z?.(r),E?.(r)})(("ArrowRight"===e.key?16:-16)*r)}}):null]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{boxPaddingXClasses as n,boxPaddingYClasses as o}from"../box/Box.js";import{Drawer as a}from"../drawer/Drawer.js";import{beginPointerDrag as i}from"../../internal/drag.js";import{layoutMessages as l,useMessages as s}from"../../internal/i18n.js";import{drawerSide as d,expandedOnlyClasses as c,PageLayoutContext as u,SidebarSideContext as p,useCollapsed as f}from"../../internal/page-layout.js";import{cx as m,surfaceClasses as b,surfaceSlots as v,toLength as g,toPixels as h,transitionClasses as x}from"../../internal/styles.js";const y={xs:"11rem",sm:"13rem",md:"16rem",lg:"18rem",xl:"21rem"},w={solid:[b,"text-(--neba-fg) bg-(--n-panel-press)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[b,"text-(--neba-fg) bg-(--n-panel)","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"};export const Sidebar=/*@__PURE__*/r.forwardRef(function({side:b,width:j,minWidth:C=160,maxWidth:R=480,resizable:z=!1,onResize:k,onResizeEnd:S,collapseBelow:B,open:N,defaultOpen:O=!1,onOpenChange:D,sticky:M=!0,title:A,variant:E="outline",size:I="md",color:T="primary",density:W="default",elevation:L=0,divider:P=!0,padded:X=!0,label:_,locale:K,className:$,style:q,children:F,...G},H){const J=r.useContext(u),Q=r.useContext(p),U=b??Q??"start",V=K??J.locale,Y=s(l,V),Z=B??(J.present?J.collapseBelow:"none"),ee=f(Z),[te,re]=r.useState(O),ne=void 0!==N,oe=ne?N:J.present?J.open[U]:te,ae=e=>{ne||(J.present?J.setOpen(U,e):re(e)),D?.(e)},ie=g(j)??y[I],le=r.useRef(null),se=r.useCallback(e=>{le.current=e,"function"==typeof H?H(e):H&&(H.current=e)},[H]),de=r.useRef(null);r.useEffect(()=>()=>de.current?.(),[]);const ce=e=>{const t=le.current;if(!t)return e;const r=(e,r)=>null==e?r:"number"==typeof e?e:h(e,{percentOf:"undefined"==typeof window?0:window.innerWidth,relativeTo:t})??r,n=Math.min(r(R,480),Math.max(r(C,160),Math.round(e)));return t.style.setProperty("--n-sidebar-w",`${n}px`),n},ue=e("div",{className:m("min-h-0 flex-1 overflow-y-auto overscroll-contain",X?m(n[W][I],o[W][I]):""),children:F});return ee?e(a,{side:d(U),mode:"overlay",open:oe,onOpenChange:ae,title:A,size:I,color:T,density:W,locale:V,closeLabel:Y.closeSidebar,extent:void 0===j?void 0:ie,"aria-label":A?void 0:_??Y.sidebar,className:$,style:q,children:F}):t("aside",{ref:se,"aria-label":_??Y.sidebar,className:m("relative flex min-w-0 shrink-0 flex-col","w-(--n-sidebar-w)",w[E],P?m("start"===U?"border-e":"border-s","[border-color:var(--n-line)]"):"","content"===J.scroll?"h-full":M?m("self-start","sticky [top:var(--n-layout-header,0px)]","[height:calc(100dvh-var(--n-layout-header,0px)-var(--n-layout-footer,0px))]"):"",c[Z],x,$),style:{...v(T,L),"--n-sidebar-w":ie,...q},...G,children:[ue,z?e("div",{role:"separator","aria-orientation":"vertical","aria-label":Y.resizeSidebar,tabIndex:0,className:m("absolute inset-y-0 z-1 w-2 cursor-col-resize","start"===U?"end-0 -me-1":"start-0 -ms-1","bg-transparent hover:bg-(--n-soft) data-[dragging]:bg-(--n-soft)",x,"[outline:none] focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-0"),onPointerDown:e=>{const t=le.current;if(!t||0!==e.button)return;const r=e.currentTarget,n=e.clientX,o=t.getBoundingClientRect().width,a="rtl"===getComputedStyle(t).direction,l="start"===U===a?-1:1;let s=o;de.current=i({target:r,pointerId:e.pointerId,onMove:e=>{s=ce(o+(e.clientX-n)*l),k?.(s)},onEnd:()=>{de.current=null,S?.(s)}})},onKeyDown:e=>{if("ArrowLeft"!==e.key&&"ArrowRight"!==e.key)return;e.preventDefault();const t="rtl"===getComputedStyle(e.currentTarget).direction,r="start"===U===t?-1:1;(e=>{const t=le.current;if(!t)return;const r=ce(t.getBoundingClientRect().width+e);k?.(r),S?.(r)})(("ArrowRight"===e.key?16:-16)*r)}}):null]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e}from"react/jsx-runtime";import*as r from"react";import{useRender as l}from"@base-ui/react/use-render";import{controlHeightClasses as n,controlSquareClasses as d,surfaceSlots as s}from"../../internal/styles.js";const o={xs:"h-[0.6875rem]",sm:"h-[0.75rem]",md:"h-[0.8125rem]",lg:"h-[0.9375rem]",xl:"h-[1.0625rem]"},a={xs:"gap-[0.3125rem]",sm:"gap-[0.375rem]",md:"gap-[0.5625rem]",lg:"gap-[0.5625rem]",xl:"gap-[0.6875rem]"},m={xs:"rounded-[0.3125rem]",sm:"rounded-[0.3125rem]",md:"rounded-[0.375rem]",lg:"rounded-[0.4375rem]",xl:"rounded-[0.5rem]"},i={xs:"h-12",sm:"h-16",md:"h-20",lg:"h-28",xl:"h-36"},t={xs:"rounded-(--neba-radius-xs)",sm:"rounded-(--neba-radius-sm)",md:"rounded-(--neba-radius-md)",lg:"rounded-(--neba-radius-lg)",xl:"rounded-(--neba-radius-xl)"},u="relative overflow-hidden bg-(--n-soft-hover)";function f(e){if(void 0!==e)return"number"==typeof e?`${e}px`:e}export const Skeleton=/*@__PURE__*/r.forwardRef(function({shape:r="line",lines:h=1,size:c="md",color:x="secondary",width:g,height:p,animated:b=!0,label:w,render:y,className:$,style:v,...j},k){const N=b?"neba-skeleton":"",B="circle"===r?`rounded-full ${n[c]} ${d[c]} shrink-0`:"rect"===r?`w-full ${t[c]} ${void 0===p?i[c]:""}`:`w-full ${m[c]} ${o[c]}`,z=w?{role:"status","aria-busy":!0,"aria-label":w}:{"aria-hidden":!0},A="line"===r&&h>1;return l({render:y,ref:k,props:{className:(A?["flex w-full flex-col",a[c],$??""]:[u,N,B,$??""]).filter(Boolean).join(" "),style:{...s(x,0),width:f(g),height:f(p),...v},...z,...A?{children:Array.from({length:h},(r,l)=>e("div",{className:[u,N,m[c],o[c],l===h-1?"w-3/5":"w-full"].filter(Boolean).join(" ")},l))}:null,...j}})});
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as r from"react";import{useRender as l}from"@base-ui/react/use-render";import{controlHeightClasses as d,controlSquareClasses as n,cx as s,surfaceSlots as a}from"../../internal/styles.js";const o={xs:"h-[0.6875rem]",sm:"h-[0.75rem]",md:"h-[0.8125rem]",lg:"h-[0.9375rem]",xl:"h-[1.0625rem]"},m={xs:"gap-[0.3125rem]",sm:"gap-[0.375rem]",md:"gap-[0.5625rem]",lg:"gap-[0.5625rem]",xl:"gap-[0.6875rem]"},i={xs:"rounded-[0.3125rem]",sm:"rounded-[0.3125rem]",md:"rounded-[0.375rem]",lg:"rounded-[0.4375rem]",xl:"rounded-[0.5rem]"},t={xs:"h-12",sm:"h-16",md:"h-20",lg:"h-28",xl:"h-36"},u={xs:"rounded-(--neba-radius-xs)",sm:"rounded-(--neba-radius-sm)",md:"rounded-(--neba-radius-md)",lg:"rounded-(--neba-radius-lg)",xl:"rounded-(--neba-radius-xl)"},h="relative overflow-hidden bg-(--n-soft-hover)";function f(e){if(void 0!==e)return"number"==typeof e?`${e}px`:e}export const Skeleton=/*@__PURE__*/r.forwardRef(function({shape:r="line",lines:c=1,size:x="md",color:g="secondary",width:p,height:b,animated:w=!0,label:y,render:$,className:v,style:j,...k},N){const z=w?"neba-skeleton":"",A="circle"===r?`rounded-full ${d[x]} ${n[x]} shrink-0`:"rect"===r?`w-full ${u[x]} ${void 0===b?t[x]:""}`:`w-full ${i[x]} ${o[x]}`,B=y?{role:"status","aria-busy":!0,"aria-label":y}:{"aria-hidden":!0},R="line"===r&&c>1;return l({render:$,ref:N,props:{className:(R?["flex w-full flex-col",m[x],v??""]:[h,z,A,v??""]).filter(Boolean).join(" "),style:{...a(g,0),width:f(p),height:f(b),...j},...B,...R?{children:Array.from({length:c},(r,l)=>e("div",{className:s(h,z,i[x],o[x],l===c-1?"w-3/5":"w-full")},l))}:null,...k}})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import*as a from"react";import{Slider as n}from"@base-ui/react/slider";import{metaTextClasses as r,surfaceClasses as s,transitionClasses as o}from"../../internal/styles.js";const t={xs:"h-1",sm:"h-1.5",md:"h-1.5",lg:"h-2",xl:"h-2.5"},i={xs:"w-1",sm:"w-1.5",md:"w-1.5",lg:"w-2",xl:"w-2.5"},c={xs:"size-3",sm:"size-3.5",md:"size-4",lg:"size-5",xl:"size-6"},d={xs:"h-4",sm:"h-4.5",md:"h-5",lg:"h-6",xl:"h-7"},f={xs:"w-4",sm:"w-4.5",md:"w-5",lg:"w-6",xl:"w-7"},u="rounded-full bg-(--n-soft)",m=`rounded-full bg-(--n-fill) ${o}`,h=["rounded-full border bg-(--neba-surface)",s,"[border-color:var(--n-line-hover)]","[box-shadow:var(--neba-shadow-1),var(--neba-plate-glass)]","cursor-grab select-none active:cursor-grabbing",o,"hover:[box-shadow:var(--neba-shadow-2),0_0_0_4px_var(--n-soft)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2","data-[dragging]:[box-shadow:var(--neba-shadow-1),0_0_0_6px_var(--n-soft-hover)]"].join(" ");export const Slider=/*@__PURE__*/a.forwardRef(function({size:a="md",color:s="primary",orientation:o="horizontal",label:b,description:x,showValue:v=!1,disabled:g=!1,className:w,style:p,...$},_){const y="vertical"===o,N={"--n-fill":`var(--neba-${s}-fill)`,"--n-accent":`var(--neba-${s}-accent)`,"--n-soft":`var(--neba-${s}-soft)`,"--n-soft-hover":`var(--neba-${s}-soft-hover)`,"--n-line-hover":`var(--neba-${s}-line-hover)`,"--n-ring":`var(--neba-${s}-ring)`},j=$.value??$.defaultValue,z=Array.isArray(j)?j.length:1;return l(n.Root,{ref:_,orientation:o,disabled:g,className:["flex",y?"w-fit flex-col items-center gap-2":"w-full flex-col gap-1.5",g?"[filter:saturate(0.25)] opacity-70 [&_*]:cursor-not-allowed":"",w??""].filter(Boolean).join(" "),style:{...N,...p},...$,children:[b||v?l("div",{className:`flex w-full items-baseline gap-2 ${r[a]}`,children:[b?e(n.Label,{className:g?"font-medium text-(--neba-disabled-fg)":"font-medium text-(--neba-fg)",children:b}):null,v?e(n.Value,{className:"ms-auto tabular-nums text-(--neba-muted-fg)",children:"function"==typeof v?v:null}):null]}):null,e(n.Control,{className:["flex touch-none select-none items-center justify-center",y?`${f[a]} h-40 flex-col`:`w-full ${d[a]}`].join(" "),children:l(n.Track,{className:[u,y?`${i[a]} h-full`:`${t[a]} w-full`].join(" "),children:[e(n.Indicator,{className:m}),Array.from({length:z},(l,r)=>e(n.Thumb,{index:r,className:`${h} ${c[a]}`},r))]})}),x?e("div",{className:`${r[a]} text-(--neba-muted-fg)`,children:x}):null]})});
1
+ "use client";import{jsx as e,jsxs as l}from"react/jsx-runtime";import*as a from"react";import{Slider as s}from"@base-ui/react/slider";import{cx as r,metaTextClasses as n,surfaceClasses as o,transitionClasses as t}from"../../internal/styles.js";const i={xs:"h-1",sm:"h-1.5",md:"h-1.5",lg:"h-2",xl:"h-2.5"},c={xs:"w-1",sm:"w-1.5",md:"w-1.5",lg:"w-2",xl:"w-2.5"},d={xs:"size-3",sm:"size-3.5",md:"size-4",lg:"size-5",xl:"size-6"},f={xs:"h-4",sm:"h-4.5",md:"h-5",lg:"h-6",xl:"h-7"},u={xs:"w-4",sm:"w-4.5",md:"w-5",lg:"w-6",xl:"w-7"},m="rounded-full bg-(--n-soft)",h=`rounded-full bg-(--n-fill) ${t}`,b=["rounded-full border bg-(--neba-surface)",o,"[border-color:var(--n-line-hover)]","[box-shadow:var(--neba-shadow-1),var(--neba-plate-glass)]","cursor-grab select-none active:cursor-grabbing",t,"hover:[box-shadow:var(--neba-shadow-2),0_0_0_4px_var(--n-soft)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2","data-[dragging]:[box-shadow:var(--neba-shadow-1),0_0_0_6px_var(--n-soft-hover)]"].join(" ");export const Slider=/*@__PURE__*/a.forwardRef(function({size:a="md",color:o="primary",orientation:t="horizontal",label:x,description:v,showValue:g=!1,disabled:w=!1,className:p,style:$,..._},y){const N="vertical"===t,j={"--n-fill":`var(--neba-${o}-fill)`,"--n-accent":`var(--neba-${o}-accent)`,"--n-soft":`var(--neba-${o}-soft)`,"--n-soft-hover":`var(--neba-${o}-soft-hover)`,"--n-line-hover":`var(--neba-${o}-line-hover)`,"--n-ring":`var(--neba-${o}-ring)`},z=_.value??_.defaultValue,A=Array.isArray(z)?z.length:1;return l(s.Root,{ref:y,orientation:t,disabled:w,className:r("flex",N?"w-fit flex-col items-center gap-2":"w-full flex-col gap-1.5",w?"[filter:saturate(0.25)] opacity-70 [&_*]:cursor-not-allowed":"",p??""),style:{...j,...$},..._,children:[x||g?l("div",{className:`flex w-full items-baseline gap-2 ${n[a]}`,children:[x?e(s.Label,{className:w?"font-medium text-(--neba-disabled-fg)":"font-medium text-(--neba-fg)",children:x}):null,g?e(s.Value,{className:"ms-auto tabular-nums text-(--neba-muted-fg)",children:"function"==typeof g?g:null}):null]}):null,e(s.Control,{className:["flex touch-none select-none items-center justify-center",N?`${u[a]} h-40 flex-col`:`w-full ${f[a]}`].join(" "),children:l(s.Track,{className:[m,N?`${c[a]} h-full`:`${i[a]} w-full`].join(" "),children:[e(s.Indicator,{className:h}),Array.from({length:A},(l,r)=>e(s.Thumb,{index:r,className:`${b} ${d[a]}`},r))]})}),v?e("div",{className:`${n[a]} text-(--neba-muted-fg)`,children:v}):null]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{Button as i}from"../button/Button.js";import{spoilerMessages as r,useMessages as o}from"../../internal/i18n.js";import{boxPaddingClasses as l,boxPaddingXClasses as t,boxPaddingYClasses as s}from"../box/Box.js";import{hasContent as d,metaTextClasses as c,radiusClasses as m,surfaceClasses as v,surfaceSlots as u,transitionClasses as f}from"../../internal/styles.js";const b={solid:[v,"bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[v,"border bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"bg-transparent"},p="[background-color:color-mix(in_oklab,var(--neba-surface)_55%,transparent)]";export const Spoiler=/*@__PURE__*/a.forwardRef(function({revealed:v,defaultRevealed:x=!1,onRevealedChange:h,locale:j,label:g,hideLabel:y,description:w,action:N,reversible:k=!1,maxHeight:z,blur:B=10,padded:_=!0,variant:C="outline",size:R="md",color:H="primary",density:S="default",elevation:$=0,className:I,style:L,children:q,...A},D){const E=o(r,j),F=a.useId(),[G,J]=a.useState(x),K=v??G,M=e=>{void 0===v&&J(e),h?.(e)},O=!1===w?null:w??E.notice;return n("div",{ref:D,className:["relative isolate overflow-hidden",m[R],b[C],f,I??""].filter(Boolean).join(" "),style:{...u(H,$),...L},...A,children:[e("div",{id:F,className:["min-w-0",_?l[S][R]:"","[transition:filter_var(--neba-duration-fill)_var(--neba-ease)]","motion-reduce:[transition-duration:0ms]",K?"":"select-none"].filter(Boolean).join(" "),style:{filter:K?void 0:`blur(${B}px)`,maxHeight:K?void 0:z,overflow:K?void 0:"hidden"},inert:!K,children:q}),K?null:n("div",{className:["absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 text-center",l[S][R],p].join(" "),children:[d(O)?e("p",{className:`m-0 text-(--neba-muted-fg) ${c[R]}`,children:O}):null,N??e(i,{size:R,color:H,density:S,onClick:()=>M(!0),"aria-expanded":!1,"aria-controls":F,children:g??E.reveal})]}),K&&k?e("div",{className:["flex justify-end",t[S][R],s[S][R],"pt-0"].join(" "),children:e(i,{variant:"text",size:R,color:H,density:S,onClick:()=>M(!1),"aria-expanded":!0,"aria-controls":F,children:y??E.hide})}):null]})});
1
+ "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as n from"react";import{Button as r}from"../button/Button.js";import{spoilerMessages as i,useMessages as l}from"../../internal/i18n.js";import{boxPaddingClasses as o,boxPaddingXClasses as t,boxPaddingYClasses as s}from"../box/Box.js";import{cx as d,hasContent as c,metaTextClasses as m,radiusClasses as v,surfaceClasses as u,surfaceSlots as f,transitionClasses as b}from"../../internal/styles.js";const p={solid:[u,"bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[u,"border bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"bg-transparent"},x="[background-color:color-mix(in_oklab,var(--neba-surface)_55%,transparent)]";export const Spoiler=/*@__PURE__*/n.forwardRef(function({revealed:u,defaultRevealed:h=!1,onRevealedChange:j,locale:g,label:y,hideLabel:w,description:N,action:k,reversible:z=!1,maxHeight:_,blur:C=10,padded:R=!0,variant:B="outline",size:H="md",color:S="primary",density:$="default",elevation:I=0,className:L,style:q,children:A,...D},E){const F=l(i,g),G=n.useId(),[J,K]=n.useState(h),M=u??J,O=e=>{void 0===u&&K(e),j?.(e)},P=!1===N?null:N??F.notice;return a("div",{ref:E,className:d("relative isolate overflow-hidden",v[H],p[B],b,L??""),style:{...f(S,I),...q},...D,children:[e("div",{id:G,className:d("min-w-0",R?o[$][H]:"","[transition:filter_var(--neba-duration-fill)_var(--neba-ease)]","motion-reduce:[transition-duration:0ms]",M?"":"select-none"),style:{filter:M?void 0:`blur(${C}px)`,maxHeight:M?void 0:_,overflow:M?void 0:"hidden"},inert:!M,children:A}),M?null:a("div",{className:["absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 text-center",o[$][H],x].join(" "),children:[c(P)?e("p",{className:`m-0 text-(--neba-muted-fg) ${m[H]}`,children:P}):null,k??e(r,{size:H,color:S,density:$,onClick:()=>O(!0),"aria-expanded":!1,"aria-controls":G,children:y??F.reveal})]}),M&&z?e("div",{className:["flex justify-end",t[$][H],s[$][H],"pt-0"].join(" "),children:e(r,{variant:"text",size:H,color:S,density:$,onClick:()=>O(!1),"aria-expanded":!0,"aria-controls":G,children:w??F.hide})}):null]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as l from"react";import{Box as n}from"../box/Box.js";import{Chip as a}from"../chip/Chip.js";import{MinusIcon as r,TrendDownIcon as s,TrendUpIcon as m}from"../../internal/icons.js";import{numberFormatter as i}from"../../internal/format.js";import{hasContent as o,metaTextClasses as c,sheetSectionGapClasses as u}from"../../internal/styles.js";const d={xs:"text-[1.125rem]/[1.375rem]",sm:"text-[1.375rem]/[1.625rem]",md:"text-[1.75rem]/[2rem]",lg:"text-[2.25rem]/[2.5rem]",xl:"text-[2.875rem]/[3.25rem]"},x={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1rem]",lg:"text-[1.25rem]",xl:"text-[1.5rem]"},f={xs:"gap-y-0.5",sm:"gap-y-0.5",md:"gap-y-1",lg:"gap-y-1",xl:"gap-y-1.5"},p={start:"items-start text-start",center:"items-center text-center",end:"items-end text-end"},h={up:e(m,{}),down:e(s,{}),flat:e(r,{})};export const Statistic=/*@__PURE__*/l.forwardRef(function({size:l="md",color:r="primary",density:s="default",label:m,value:b,format:g,locale:j,prefix:w,unit:N,icon:y,previousValue:$,delta:v="percent",betterWhen:z="up",caption:B,align:M="start",className:k,children:C,...F},I){const R="number"==typeof b?b:null,S=null===R?b:i(j,g).format(R),V=null!==R&&void 0!==$?R-$:null,W=null!==V&&0!==$&&void 0!==$?V/Math.abs($):null,q=null===V?null:V>0?"up":V<0?"down":"flat";let A=null;if(null!==V&&null!==q&&"none"!==v){const e=V>0?"+":V<0?"-":"",t=`${e}${i(j,g).format(Math.abs(V))}`,l=null===W?null:`${e}${(100*Math.abs(W)).toFixed(1).replace(/\.0$/,"")}%`;A="absolute"===v?t:"both"===v?[l,t].filter(Boolean).join(" · "):l??t}const D=null===q||"flat"===q?"secondary":q===z?"success":"danger",E=null!==A||o(B);return t(n,{ref:I,size:l,color:r,density:s,className:["flex flex-col",u[l],p[M],k??""].filter(Boolean).join(" "),...F,children:[o(m)||o(y)?t("div",{className:["flex min-w-0 items-center gap-1.5 font-medium text-(--neba-muted-fg)",c[l]].join(" "),children:[o(y)?e("span",{className:"flex shrink-0 items-center",children:y}):null,o(m)?e("span",{className:"min-w-0 truncate",children:m}):null]}):null,t("div",{className:["flex min-w-0 flex-wrap items-baseline gap-1 font-semibold text-(--neba-fg) tabular-nums",d[l]].join(" "),children:[o(w)?e("span",{className:`font-medium text-(--neba-muted-fg) ${x[l]}`,children:w}):null,e("span",{className:"min-w-0 break-words",children:S}),o(N)?e("span",{className:`font-medium text-(--neba-muted-fg) ${x[l]}`,children:N}):null]}),E?t("div",{className:`flex min-w-0 flex-wrap items-center gap-x-2 ${f[l]}`,children:[null!==A&&null!==q?e(a,{size:l,variant:"text",color:D,startIcon:h[q],className:"tabular-nums",children:A}):null,o(B)?e("span",{className:`min-w-0 text-(--neba-muted-fg) ${c[l]}`,children:B}):null]}):null,C]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as l from"react";import{Box as n}from"../box/Box.js";import{Chip as a}from"../chip/Chip.js";import{MinusIcon as r,TrendDownIcon as s,TrendUpIcon as m}from"../../internal/icons.js";import{numberFormatter as i}from"../../internal/format.js";import{cx as o,hasContent as c,metaTextClasses as u,sheetSectionGapClasses as d}from"../../internal/styles.js";const x={xs:"text-[1.125rem]/[1.375rem]",sm:"text-[1.375rem]/[1.625rem]",md:"text-[1.75rem]/[2rem]",lg:"text-[2.25rem]/[2.5rem]",xl:"text-[2.875rem]/[3.25rem]"},f={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1rem]",lg:"text-[1.25rem]",xl:"text-[1.5rem]"},p={xs:"gap-y-0.5",sm:"gap-y-0.5",md:"gap-y-1",lg:"gap-y-1",xl:"gap-y-1.5"},h={start:"items-start text-start",center:"items-center text-center",end:"items-end text-end"},b={up:e(m,{}),down:e(s,{}),flat:e(r,{})};export const Statistic=/*@__PURE__*/l.forwardRef(function({size:l="md",color:r="primary",density:s="default",label:m,value:g,format:w,locale:N,prefix:j,unit:y,icon:$,previousValue:v,delta:z="percent",betterWhen:M="up",caption:k,align:B="start",className:C,children:F,...I},R){const S="number"==typeof g?g:null,V=null===S?g:i(N,w).format(S),W=null!==S&&void 0!==v?S-v:null,q=null!==W&&0!==v&&void 0!==v?W/Math.abs(v):null,A=null===W?null:W>0?"up":W<0?"down":"flat";let D=null;if(null!==W&&null!==A&&"none"!==z){const e=W>0?"+":W<0?"-":"",t=`${e}${i(N,w).format(Math.abs(W))}`,l=null===q?null:`${e}${(100*Math.abs(q)).toFixed(1).replace(/\.0$/,"")}%`;D="absolute"===z?t:"both"===z?[l,t].filter(Boolean).join(" · "):l??t}const E=null===A||"flat"===A?"secondary":A===M?"success":"danger",G=null!==D||c(k);return t(n,{ref:R,size:l,color:r,density:s,className:o("flex flex-col",d[l],h[B],C??""),...I,children:[c(m)||c($)?t("div",{className:["flex min-w-0 items-center gap-1.5 font-medium text-(--neba-muted-fg)",u[l]].join(" "),children:[c($)?e("span",{className:"flex shrink-0 items-center",children:$}):null,c(m)?e("span",{className:"min-w-0 truncate",children:m}):null]}):null,t("div",{className:["flex min-w-0 flex-wrap items-baseline gap-1 font-semibold text-(--neba-fg) tabular-nums",x[l]].join(" "),children:[c(j)?e("span",{className:`font-medium text-(--neba-muted-fg) ${f[l]}`,children:j}):null,e("span",{className:"min-w-0 break-words",children:V}),c(y)?e("span",{className:`font-medium text-(--neba-muted-fg) ${f[l]}`,children:y}):null]}),G?t("div",{className:`flex min-w-0 flex-wrap items-center gap-x-2 ${p[l]}`,children:[null!==D&&null!==A?e(a,{size:l,variant:"text",color:E,startIcon:b[A],className:"tabular-nums",children:D}):null,c(k)?e("span",{className:`min-w-0 text-(--neba-muted-fg) ${u[l]}`,children:k}):null]}):null,F]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as a,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{Switch as l}from"@base-ui/react/switch";import{Field as o}from"@base-ui/react/field";import{controlTextClasses as t,metaTextClasses as i,surfaceClasses as c,tickRowLeadingClasses as s}from"../../internal/styles.js";const d={xs:"h-3.5 w-6",sm:"h-4 w-7",md:"h-5 w-9",lg:"h-6 w-11",xl:"h-7 w-13"},b={xs:"data-[checked]:left-[calc(100%-0.75rem)]",sm:"data-[checked]:left-[calc(100%-0.875rem)]",md:"data-[checked]:left-[calc(100%-1.125rem)]",lg:"data-[checked]:left-[calc(100%-1.375rem)]",xl:"data-[checked]:left-[calc(100%-1.625rem)]"},h=["relative inline-flex shrink-0 border","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]","rounded-full","[transition-property:background-color,border-color,box-shadow]","[transition-duration:var(--neba-duration-fill),var(--neba-duration),var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),f=[c,"cursor-pointer bg-(--n-panel) [border-color:var(--n-line)]","hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)]","data-[checked]:bg-(--n-fill) data-[checked]:[border-color:transparent]","data-[checked]:hover:bg-(--n-fill-hover)"].join(" "),m=[c,"cursor-default bg-(--n-panel) [border-color:var(--n-line)]","[filter:saturate(0.55)]","data-[checked]:bg-(--n-fill) data-[checked]:[border-color:transparent]"].join(" "),u=["cursor-not-allowed bg-transparent [border-color:var(--neba-disabled-border)] shadow-none","data-[checked]:bg-(--neba-disabled-bg)"].join(" "),v=["absolute inset-y-0.5 left-0.5 aspect-square rounded-full bg-(--neba-surface)","[box-shadow:var(--neba-shadow-1)]","[transition:left_var(--neba-duration)_var(--neba-ease)]"].join(" ");export const Switch=/*@__PURE__*/n.forwardRef(function({size:n="md",color:c="primary",label:p,description:g,error:x,invalid:w,labelPlacement:k="end",disabled:j=!1,readOnly:$=!1,className:N,style:y,..._},R){const B=null!=x&&!1!==x&&""!==x,O=w??B,S=O?"danger":c,q={"--n-fill":`var(--neba-${S}-fill)`,"--n-fill-hover":`var(--neba-${S}-fill-hover)`,"--n-accent":`var(--neba-${S}-accent)`,"--n-panel":"var(--neba-panel)","--n-panel-hover":"var(--neba-panel-hover)","--n-line":`var(--neba-${S}-line)`,"--n-line-hover":`var(--neba-${S}-line-hover)`,"--n-ring":`var(--neba-${S}-ring)`},z=e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e(l.Root,{ref:R,className:[h,d[n],j?u:$?m:f].join(" "),disabled:j,readOnly:$,..._,children:e(l.Thumb,{className:`${v} ${b[n]}`})})}),D=p||g?a("span",{className:["flex min-w-0 flex-col gap-0.5","start"===k?"flex-1":""].filter(Boolean).join(" "),children:[p?e(o.Label,{className:["leading-[1.4]",j?"text-(--neba-disabled-fg)":"cursor-pointer text-(--neba-fg)"].join(" "),children:p}):null,g?e(o.Description,{className:`${i[n]} text-(--neba-muted-fg)`,children:g}):null]}):null;return a(o.Root,{disabled:j,invalid:O,className:["inline-flex flex-col gap-1 align-top",N??""].filter(Boolean).join(" "),style:{...q,...y},children:[e("div",{className:`flex items-start gap-2.5 ${t[n]} ${s}`,children:a(r,"start"===k?{children:[D,z]}:{children:[z,D]})}),B?e(o.Error,{match:!0,className:`${i[n]} text-(--n-accent)`,children:x}):null]})});
1
+ "use client";import{jsx as e,jsxs as a,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{Switch as l}from"@base-ui/react/switch";import{Field as t}from"@base-ui/react/field";import{controlTextClasses as o,cx as i,hitAreaClasses as c,metaTextClasses as s,surfaceClasses as d,tickRowLeadingClasses as b}from"../../internal/styles.js";const h={xs:"h-3.5 w-6",sm:"h-4 w-7",md:"h-5 w-9",lg:"h-6 w-11",xl:"h-7 w-13"},f={xs:"data-[checked]:left-[calc(100%-0.75rem)]",sm:"data-[checked]:left-[calc(100%-0.875rem)]",md:"data-[checked]:left-[calc(100%-1.125rem)]",lg:"data-[checked]:left-[calc(100%-1.375rem)]",xl:"data-[checked]:left-[calc(100%-1.625rem)]"},m=["relative inline-flex shrink-0 border",c,"[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]","rounded-full","[transition-property:background-color,border-color,box-shadow]","[transition-duration:var(--neba-duration-fill),var(--neba-duration),var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),u=[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]:[border-color:transparent]","data-[checked]:hover:bg-(--n-fill-hover)"].join(" "),v=[d,"cursor-default bg-(--n-panel) [border-color:var(--n-line)]","[filter:saturate(0.55)]","data-[checked]:bg-(--n-fill) data-[checked]:[border-color:transparent]"].join(" "),p=["cursor-not-allowed bg-transparent [border-color:var(--neba-disabled-border)] shadow-none","data-[checked]:bg-(--neba-disabled-bg)"].join(" "),g=["absolute inset-y-0.5 left-0.5 aspect-square rounded-full bg-(--neba-surface)","[box-shadow:var(--neba-shadow-1)]","[transition:left_var(--neba-duration)_var(--neba-ease)]"].join(" ");export const Switch=/*@__PURE__*/n.forwardRef(function({size:n="md",color:c="primary",label:d,description:x,error:w,invalid:k,labelPlacement:$="end",disabled:j=!1,readOnly:N=!1,className:y,style:_,...R},O){const S=null!=w&&!1!==w&&""!==w,q=k??S,z=q?"danger":c,D={"--n-fill":`var(--neba-${z}-fill)`,"--n-fill-hover":`var(--neba-${z}-fill-hover)`,"--n-accent":`var(--neba-${z}-accent)`,"--n-panel":"var(--neba-panel)","--n-panel-hover":"var(--neba-panel-hover)","--n-line":`var(--neba-${z}-line)`,"--n-line-hover":`var(--neba-${z}-line-hover)`,"--n-ring":`var(--neba-${z}-ring)`},E=e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e(l.Root,{ref:O,className:[m,h[n],j?p:N?v:u].join(" "),disabled:j,readOnly:N,...R,children:e(l.Thumb,{className:`${g} ${f[n]}`})})}),F=d||x?a("span",{className:i("flex min-w-0 flex-col gap-0.5","start"===$?"flex-1":""),children:[d?e(t.Label,{className:["leading-[1.4]",j?"text-(--neba-disabled-fg)":"cursor-pointer text-(--neba-fg)"].join(" "),children:d}):null,x?e(t.Description,{className:`${s[n]} text-(--neba-muted-fg)`,children:x}):null]}):null;return a(t.Root,{disabled:j,invalid:q,className:i("inline-flex flex-col gap-1 align-top",y??""),style:{...D,..._},children:[e("div",{className:`flex items-start gap-2.5 ${o[n]} ${b}`,children:a(r,"start"===$?{children:[F,E]}:{children:[E,F]})}),e(t.Error,S?{match:!0,className:`${s[n]} text-(--n-accent)`,children:w}:{className:`${s[n]} text-(--n-accent)`})]})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Box as r}from"../box/Box.js";import{tableMessages as n,useMessages as o}from"../../internal/i18n.js";import{controlTextLeadingClasses as l,metaTextClasses as a,paddingXValues as i}from"../../internal/styles.js";const s={default:{xs:"0.25rem",sm:"0.375rem",md:"0.625rem",lg:"0.75rem",xl:"0.875rem"},compact:{xs:"0.125rem",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.625rem"}},d=["[--n-row:transparent]","[transition:background-color_var(--neba-duration)_var(--neba-ease)]"].join(" "),c=["cursor-pointer [outline:none]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]"].join(" "),m={borderTop:"1px solid var(--n-line)",backgroundColor:"var(--n-row)"};export function Table({headers:p,items:u,getRowKey:h,caption:y,locale:b,empty:f,striped:x=!1,hoverable:g=!1,stickyHeader:v=!1,onRowClick:w,size:k="md",density:j="default",className:N,...$}){const B=o(n,b),C=i[j][k],A=s[j][k],_=Boolean(w),z=g||_,T={padding:`${A} ${C}`},D={...T,backgroundColor:"var(--n-panel-press)"};return e(r,{size:k,density:j,padded:!1,className:["overflow-x-auto",N??""].filter(Boolean).join(" "),...$,children:t("table",{className:`w-full text-start ${l[k]} text-(--neba-fg)`,style:{borderCollapse:"collapse"},children:[y?e("caption",{className:`${a[k]} text-(--neba-muted-fg)`,style:{...T,textAlign:"start"},children:y}):null,e("colgroup",{children:p.map(t=>e("col",{style:void 0===t.width?void 0:{width:"number"==typeof t.width?`${t.width}px`:t.width}},t.key))}),e("thead",{children:e("tr",{children:p.map(t=>e("th",{scope:"col",className:["font-semibold whitespace-nowrap text-(--neba-muted-fg)",v?"sticky top-0 z-10 [backdrop-filter:var(--neba-blur)]":""].filter(Boolean).join(" "),style:{...D,textAlign:t.align??"start"},children:t.label??t.key},t.key))})}),e("tbody",{children:0===u.length?e("tr",{className:d,style:m,children:e("td",{colSpan:p.length,className:"text-(--neba-muted-fg)",style:{padding:`2rem ${C}`,textAlign:"center"},children:f??B.empty})}):u.map((t,r)=>e("tr",{className:[d,x&&r%2==1?"[--n-row:var(--n-panel-hover)]":"",z?"hover:[--n-row:var(--n-soft)]":"",_?c:""].filter(Boolean).join(" "),style:m,tabIndex:_?0:void 0,onClick:w?()=>w(t,r):void 0,onKeyDown:w?e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),w(t,r)))}:void 0,children:p.map(n=>e("td",{style:{...T,textAlign:n.align??"start"},children:n.render?n.render(t,r):t[n.key]},n.key))},h?h(t,r):r))})]})})}
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Box as r}from"../box/Box.js";import{tableMessages as n,useMessages as l}from"../../internal/i18n.js";import{controlTextLeadingClasses as a,cx as o,metaTextClasses as s,paddingXValues as i}from"../../internal/styles.js";const d={default:{xs:"0.25rem",sm:"0.375rem",md:"0.625rem",lg:"0.75rem",xl:"0.875rem"},compact:{xs:"0.125rem",sm:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.625rem"}},c=["[--n-row:transparent]","[transition:background-color_var(--neba-duration)_var(--neba-ease)]"].join(" "),m=["cursor-pointer [outline:none]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]"].join(" "),p={borderTop:"1px solid var(--n-line)",backgroundColor:"var(--n-row)"};export function Table({headers:u,items:h,getRowKey:y,caption:b,locale:x,empty:g,striped:f=!1,hoverable:v=!1,stickyHeader:w=!1,onRowClick:k,size:j="md",density:N="default",className:$,...C}){const A=l(n,x),_=i[N][j],z=d[N][j],T=Boolean(k),B=v||T,D={padding:`${z} ${_}`},K={...D,backgroundColor:"var(--n-panel-press)"};return e(r,{size:j,density:N,padded:!1,className:o("overflow-x-auto",$??""),...C,children:t("table",{className:`w-full text-start ${a[j]} text-(--neba-fg)`,style:{borderCollapse:"collapse"},children:[b?e("caption",{className:`${s[j]} text-(--neba-muted-fg)`,style:{...D,textAlign:"start"},children:b}):null,e("colgroup",{children:u.map(t=>e("col",{style:void 0===t.width?void 0:{width:"number"==typeof t.width?`${t.width}px`:t.width}},t.key))}),e("thead",{children:e("tr",{children:u.map(t=>e("th",{scope:"col",className:o("font-semibold whitespace-nowrap text-(--neba-muted-fg)",w?"sticky top-0 z-10 [backdrop-filter:var(--neba-blur)]":""),style:{...K,textAlign:t.align??"start"},children:t.label??t.key},t.key))})}),e("tbody",{children:0===h.length?e("tr",{className:c,style:p,children:e("td",{colSpan:u.length,className:"text-(--neba-muted-fg)",style:{padding:`2rem ${_}`,textAlign:"center"},children:g??A.empty})}):h.map((t,r)=>e("tr",{className:o(c,f&&r%2==1?"[--n-row:var(--n-panel-hover)]":"",B?"hover:[--n-row:var(--n-soft)]":"",T?m:""),style:p,tabIndex:T?0:void 0,onClick:k?()=>k(t,r):void 0,onKeyDown:k?e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),k(t,r)))}:void 0,children:u.map(n=>e("td",{style:{...D,textAlign:n.align??"start"},children:n.render?n.render(t,r):t[n.key]},n.key))},y?y(t,r):r))})]})})}
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{Tabs as i}from"@base-ui/react/tabs";import{controlHeightClasses as o,controlTextClasses as l,gapClasses as n,hasContent as r,iconClasses as s,paddingXClasses as c,radiusClasses as d,surfaceClasses as f,surfaceSlots as u,transitionClasses as h}from"../../internal/styles.js";const b=/*@__PURE__*/a.createContext({variant:"outline",size:"md",density:"default",orientation:"horizontal",fullWidth:!1}),v={solid:{horizontal:`${f} inline-flex bg-(--n-panel) p-1 [box-shadow:var(--neba-plate-glass)]`,vertical:`${f} inline-flex flex-col bg-(--n-panel) p-1 [box-shadow:var(--neba-plate-glass)]`},outline:{horizontal:"flex border-b [border-color:var(--n-line)]",vertical:"flex flex-col border-e [border-color:var(--n-line)]"},text:{horizontal:"flex",vertical:"flex flex-col"}},p={solid:{horizontal:"absolute left-(--active-tab-left) top-(--active-tab-top) h-(--active-tab-height) w-(--active-tab-width)",vertical:"absolute left-(--active-tab-left) top-(--active-tab-top) h-(--active-tab-height) w-(--active-tab-width)"},outline:{horizontal:"absolute bottom-0 left-(--active-tab-left) h-0.5 w-(--active-tab-width)",vertical:"absolute end-0 top-(--active-tab-top) h-(--active-tab-height) w-0.5"},text:{horizontal:"absolute bottom-0 left-(--active-tab-left) h-0.5 w-(--active-tab-width)",vertical:"absolute end-0 top-(--active-tab-top) h-(--active-tab-height) w-0.5"}},x={solid:`${f} bg-(--n-panel-press) [box-shadow:var(--neba-shadow-1),var(--neba-plate-glass)]`,outline:"bg-(--n-accent)",text:"bg-(--n-accent)"},m={solid:"text-(--neba-muted-fg) hover:text-(--neba-fg) data-[active]:text-(--n-accent)",outline:"text-(--neba-muted-fg) hover:text-(--neba-fg) data-[active]:text-(--n-accent)",text:"text-(--neba-muted-fg) hover:text-(--neba-fg) data-[active]:text-(--n-accent)"};export const Tab=/*@__PURE__*/a.forwardRef(function({value:f,startIcon:u,endIcon:v,disabled:p=!1,className:x,children:g,...w},z){const{variant:y,size:j,density:N,fullWidth:k}=a.useContext(b);return t(i.Tab,{ref:z,value:f,disabled:p,className:["relative z-10 inline-flex shrink-0 cursor-pointer items-center justify-center select-none","whitespace-nowrap font-medium","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",o[j],l[j],n[j],c[N][j],"solid"===y?d[j]:"",h,s,m[y],"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]","data-[disabled]:cursor-not-allowed data-[disabled]:text-(--neba-disabled-fg)",k?"flex-1":"",x??""].filter(Boolean).join(" "),...w,children:[r(u)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:u}):null,g,r(v)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:v}):null]})});export const TabPanel=/*@__PURE__*/a.forwardRef(function({value:t,keepMounted:o=!1,className:l,children:n,...r},s){const{size:c}=a.useContext(b);return e(i.Panel,{ref:s,value:t,keepMounted:o,className:["min-w-0 flex-1 text-(--neba-fg)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2",d[c],l??""].filter(Boolean).join(" "),...r,children:n})});export const Tabs=/*@__PURE__*/a.forwardRef(function({variant:o="outline",size:l="md",color:n="primary",density:r="default",value:s,defaultValue:c,onValueChange:f,orientation:h="horizontal",activateOnFocus:m=!1,loopFocus:g=!0,fullWidth:w=!1,className:z,style:y,children:j,...N},k){const C=a.useMemo(()=>({variant:o,size:l,density:r,orientation:h,fullWidth:w}),[o,l,r,h,w]),T=[],V=[];return a.Children.forEach(j,e=>{a.isValidElement(e)&&e.type===TabPanel?V.push(e):null!=e&&!1!==e&&T.push(e)}),e(b.Provider,{value:C,children:t(i.Root,{ref:k,value:s,defaultValue:c,onValueChange:e=>f?.(e),orientation:h,className:["flex min-w-0","vertical"===h?"flex-row gap-4":"flex-col gap-4",z??""].filter(Boolean).join(" "),style:{...u(n,0),...y},...N,children:[t(i.List,{activateOnFocus:m,loopFocus:g,className:["relative shrink-0",v[o][h],"solid"===o?d[l]:"",w&&"horizontal"===h?"w-full":"","horizontal"===h?"overflow-x-auto overflow-y-hidden":""].filter(Boolean).join(" "),children:[T,e(i.Indicator,{className:["pointer-events-none",p[o][h],x[o],"solid"===o?d[l]:"rounded-full","[transition-property:left,top,width,height]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]"].join(" ")})]}),V]})})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{Tabs as i}from"@base-ui/react/tabs";import{controlHeightClasses as l,controlTextClasses as n,cx as o,gapClasses as r,hasContent as s,iconClasses as c,paddingXClasses as d,radiusClasses as u,surfaceClasses as f,surfaceSlots as h,transitionClasses as b}from"../../internal/styles.js";const v=/*@__PURE__*/a.createContext({variant:"outline",size:"md",density:"default",orientation:"horizontal",fullWidth:!1}),p={solid:{horizontal:`${f} inline-flex bg-(--n-panel) p-1 [box-shadow:var(--neba-plate-glass)]`,vertical:`${f} inline-flex flex-col bg-(--n-panel) p-1 [box-shadow:var(--neba-plate-glass)]`},outline:{horizontal:"flex border-b [border-color:var(--n-line)]",vertical:"flex flex-col border-e [border-color:var(--n-line)]"},text:{horizontal:"flex",vertical:"flex flex-col"}},x={solid:{horizontal:"absolute left-(--active-tab-left) top-(--active-tab-top) h-(--active-tab-height) w-(--active-tab-width)",vertical:"absolute left-(--active-tab-left) top-(--active-tab-top) h-(--active-tab-height) w-(--active-tab-width)"},outline:{horizontal:"absolute bottom-0 left-(--active-tab-left) h-0.5 w-(--active-tab-width)",vertical:"absolute end-0 top-(--active-tab-top) h-(--active-tab-height) w-0.5"},text:{horizontal:"absolute bottom-0 left-(--active-tab-left) h-0.5 w-(--active-tab-width)",vertical:"absolute end-0 top-(--active-tab-top) h-(--active-tab-height) w-0.5"}},m={solid:`${f} bg-(--n-panel-press) [box-shadow:var(--neba-shadow-1),var(--neba-plate-glass)]`,outline:"bg-(--n-accent)",text:"bg-(--n-accent)"},g={solid:"text-(--neba-muted-fg) hover:text-(--neba-fg) data-[active]:text-(--n-accent)",outline:"text-(--neba-muted-fg) hover:text-(--neba-fg) data-[active]:text-(--n-accent)",text:"text-(--neba-muted-fg) hover:text-(--neba-fg) data-[active]:text-(--n-accent)"};export const Tab=/*@__PURE__*/a.forwardRef(function({value:f,startIcon:h,endIcon:p,disabled:x=!1,className:m,children:w,...z},y){const{variant:N,size:j,density:k,fullWidth:C}=a.useContext(v);return t(i.Tab,{ref:y,value:f,disabled:x,className:o("relative z-10 inline-flex shrink-0 cursor-pointer items-center justify-center select-none","whitespace-nowrap font-medium","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",l[j],n[j],r[j],d[k][j],"solid"===N?u[j]:"",b,c,g[N],"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]","data-[disabled]:cursor-not-allowed data-[disabled]:text-(--neba-disabled-fg)",C?"flex-1":"",m??""),...z,children:[s(h)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:h}):null,w,s(p)?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:p}):null]})});export const TabPanel=/*@__PURE__*/a.forwardRef(function({value:t,keepMounted:l=!1,className:n,children:o,...r},s){const{size:c}=a.useContext(v);return e(i.Panel,{ref:s,value:t,keepMounted:l,className:["min-w-0 flex-1 text-(--neba-fg)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2",u[c],n??""].filter(Boolean).join(" "),...r,children:o})});export const Tabs=/*@__PURE__*/a.forwardRef(function({variant:l="outline",size:n="md",color:r="primary",density:s="default",value:c,defaultValue:d,onValueChange:f,orientation:b="horizontal",activateOnFocus:g=!1,loopFocus:w=!0,fullWidth:z=!1,className:y,style:N,children:j,...k},C){const T=a.useMemo(()=>({variant:l,size:n,density:s,orientation:b,fullWidth:z}),[l,n,s,b,z]),V=[],F=[];return a.Children.forEach(j,e=>{a.isValidElement(e)&&e.type===TabPanel?F.push(e):null!=e&&!1!==e&&V.push(e)}),e(v.Provider,{value:T,children:t(i.Root,{ref:C,value:c,defaultValue:d,onValueChange:e=>f?.(e),orientation:b,className:o("flex min-w-0","vertical"===b?"flex-row gap-4":"flex-col gap-4",y??""),style:{...h(r,0),...N},...k,children:[t(i.List,{activateOnFocus:g,loopFocus:w,className:o("relative shrink-0",p[l][b],"solid"===l?u[n]:"",z&&"horizontal"===b?"w-full":"","horizontal"===b?"overflow-x-auto overflow-y-hidden":""),children:[V,e(i.Indicator,{className:["pointer-events-none",x[l][b],m[l],"solid"===l?u[n]:"rounded-full","[transition-property:left,top,width,height]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]"].join(" ")})]}),F]})})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{Field as r}from"@base-ui/react/field";import{Input as i}from"@base-ui/react/input";import{controlHeightClasses as l,controlTextLeadingClasses as a,disabledClasses as s,fieldReadOnlyClasses as o,fieldRestClasses as c,focusWithinRingClasses as d,gapClasses as m,iconClasses as u,metaTextClasses as f,paddingXClasses as p,radiusClasses as x,stackGapClasses as h,surfaceSlots as g,transitionClasses as b}from"../../internal/styles.js";const y={xs:`${m.xs} ${x.xs} ${a.xs}`,sm:`${m.sm} ${x.sm} ${a.sm}`,md:`${m.md} ${x.md} ${a.md}`,lg:`${m.lg} ${x.lg} ${a.lg}`,xl:`${m.xl} ${x.xl} ${a.xl}`},$={xs:"min-h-5.5 py-[3px]",sm:"min-h-6.5 py-[4px]",md:"min-h-8 py-[5px]",lg:"min-h-10 py-[8px]",xl:"min-h-12 py-[10px]"},v={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},w=["group relative flex w-full cursor-text","[-webkit-tap-highlight-color:transparent]",b,"focus-within:[transition-duration:0ms]",d,u].join(" "),j=c,N=o;function k(){return t("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"animate-spin",children:[e("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2"}),e("path",{d:"M14.5 8A6.5 6.5 0 0 0 8 1.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}export const TextField=/*@__PURE__*/n.forwardRef(function({variant:a="outline",size:o="md",color:c="primary",density:d="default",elevation:m=0,multiline:u=!1,rows:x=3,resize:b="vertical",label:z,description:B,error:C,invalid:D,startIcon:O,endIcon:R,loading:W=!1,fullWidth:I=!1,readOnly:L=!1,disabled:T=!1,type:A="text",className:E,style:F,...M},P){const q=null!=C&&!1!==C&&""!==C,G=D??q,H=G?"danger":c,J=n.useRef(null),K=n.useCallback(e=>{J.current=e,"function"==typeof P?P(e):P&&(P.current=e)},[P]),Q=[w,y[o],u?`${$[o]} items-start`:`${l[o]} items-center`,p[d][o],T?s[a]:L?N[a]:j[a]].filter(Boolean).join(" "),S=["min-w-0 flex-1 bg-transparent [font:inherit] text-inherit","[outline:none]","placeholder:text-(--neba-muted-fg)","caret-(--n-accent) selection:bg-(--n-soft-press)","disabled:cursor-not-allowed",u?`block ${v[b]}`:"self-stretch"].join(" "),U="inline-flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg) transition-[color] duration-(--neba-duration) group-focus-within:text-(--n-accent)";return t(r.Root,{disabled:T,invalid:G,className:["flex-col align-top",h[o],I?"flex w-full":"inline-flex",E??""].filter(Boolean).join(" "),style:{...g(H,m),...F},children:[z?e(r.Label,{className:[f[o],"font-medium",T?"text-(--neba-disabled-fg)":"text-(--neba-fg)"].join(" "),children:z}):null,t("span",{className:Q,onPointerDown:e=>{e.target!==e.currentTarget||T||(e.preventDefault(),J.current?.focus())},children:[O?e("span",{className:U,children:O}):null,e(i,{ref:K,className:S,disabled:T,readOnly:L,"aria-busy":W||void 0,"data-loading":W||void 0,...u?{render:e("textarea",{rows:x})}:{type:A},...M}),W?e("span",{className:U,children:e(k,{})}):R?e("span",{className:U,children:R}):null]}),B?e(r.Description,{className:[f[o],"text-(--neba-muted-fg)"].join(" "),children:B}):null,q?e(r.Error,{match:!0,className:[f[o],"text-(--n-accent)"].join(" "),children:C}):null]})});
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{Field as r}from"@base-ui/react/field";import{Input as i}from"@base-ui/react/input";import{controlHeightClasses as l,controlTextLeadingClasses as a,cx as s,disabledClasses as o,fieldReadOnlyClasses as c,fieldRestClasses as d,focusWithinRingClasses as m,gapClasses as u,iconClasses as x,metaTextClasses as p,paddingXClasses as f,radiusClasses as h,stackGapClasses as g,surfaceSlots as b,transitionClasses as y}from"../../internal/styles.js";const $={xs:`${u.xs} ${h.xs} ${a.xs}`,sm:`${u.sm} ${h.sm} ${a.sm}`,md:`${u.md} ${h.md} ${a.md}`,lg:`${u.lg} ${h.lg} ${a.lg}`,xl:`${u.xl} ${h.xl} ${a.xl}`},v={xs:"min-h-5.5 py-[3px]",sm:"min-h-6.5 py-[4px]",md:"min-h-8 py-[5px]",lg:"min-h-10 py-[8px]",xl:"min-h-12 py-[10px]"},w={none:"resize-none",vertical:"resize-y",horizontal:"resize-x",both:"resize"},N=["group relative flex w-full cursor-text","[-webkit-tap-highlight-color:transparent]",y,"focus-within:[transition-duration:0ms]",m,x].join(" "),j=d,k=c;function z(){return t("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"animate-spin",children:[e("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2"}),e("path",{d:"M14.5 8A6.5 6.5 0 0 0 8 1.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}export const TextField=/*@__PURE__*/n.forwardRef(function({variant:a="outline",size:c="md",color:d="primary",density:m="default",elevation:u=0,multiline:x=!1,rows:h=3,resize:y="vertical",label:C,description:D,error:O,invalid:R,startIcon:W,endIcon:I,loading:L=!1,fullWidth:T=!1,readOnly:A=!1,disabled:B=!1,type:E="text",className:F,style:M,...P},q){const G=null!=O&&!1!==O&&""!==O,H=R??G,J=H?"danger":d,K=n.useRef(null),Q=n.useCallback(e=>{K.current=e,"function"==typeof q?q(e):q&&(q.current=e)},[q]),S=s(N,$[c],x?`${v[c]} items-start`:`${l[c]} items-center`,f[m][c],B?o[a]:A?k[a]:j[a]),U=["min-w-0 flex-1 bg-transparent [font:inherit] text-inherit","[outline:none]","placeholder:text-(--neba-muted-fg)","caret-(--n-accent) selection:bg-(--n-soft-press)","disabled:cursor-not-allowed",x?`block ${w[y]}`:"self-stretch"].join(" "),V="inline-flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg) transition-[color] duration-(--neba-duration) group-focus-within:text-(--n-accent)";return t(r.Root,{disabled:B,invalid:H,className:s("flex-col align-top",g[c],T?"flex w-full":"inline-flex",F??""),style:{...b(J,u),...M},children:[C?e(r.Label,{className:[p[c],"font-medium",B?"text-(--neba-disabled-fg)":"text-(--neba-fg)"].join(" "),children:C}):null,t("span",{className:S,onPointerDown:e=>{e.target!==e.currentTarget||B||(e.preventDefault(),K.current?.focus())},children:[W?e("span",{className:V,children:W}):null,e(i,{ref:Q,className:U,disabled:B,readOnly:A,"aria-busy":L||void 0,"data-loading":L||void 0,...x?{render:e("textarea",{rows:h})}:{type:E},...P}),L?e("span",{className:V,children:e(z,{})}):I?e("span",{className:V,children:I}):null]}),D?e(r.Description,{className:[p[c],"text-(--neba-muted-fg)"].join(" "),children:D}):null,e(r.Error,G?{match:!0,className:[p[c],"text-(--n-accent)"].join(" "),children:O}:{className:[p[c],"text-(--n-accent)"].join(" ")})]})});
@@ -1 +1 @@
1
- "use client";import{jsx as n,Fragment as e,jsxs as r}from"react/jsx-runtime";import*as i from"react";import{useRender as o}from"@base-ui/react/use-render";import{linkMessages as a,useMessages as t}from"../../internal/i18n.js";import{ExternalLinkIcon as l,LinkIcon as s}from"../../internal/icons.js";import{controlTextLeadingClasses as c,focusRingClasses as m,srOnlyClasses as u}from"../../internal/styles.js";const d={always:"[&.neba-link]:underline",hover:"[&.neba-link]:no-underline [&.neba-link]:hover:underline",none:"[&.neba-link]:no-underline"},p=["neba-link","cursor-pointer","[&_svg]:pointer-events-none [&_svg]:inline [&_svg]:size-[0.95em] [&_svg]:shrink-0",["[transition-property:color,text-decoration-color]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]"].join(" "),m,"focus-visible:rounded-[0.25rem]"].join(" ");export const TextLink=/*@__PURE__*/i.forwardRef(function({href:i,underline:m="always",color:b,size:f,newTab:v=!1,icon:h,locale:k,render:j,className:g,style:x,children:y,...w},_){const N=t(a,k),T=h??v,z=!0===T?n(v?l:s,{}):T,B=[p,f?c[f]:"",d[m],b?"[&.neba-link]:text-(--n-accent)":"[&.neba-link]:text-inherit",g??""].filter(Boolean).join(" "),C={"--n-underline":"color-mix(in oklab, currentColor 45%, transparent)","--n-underline-hover":"currentColor","--n-ring":`var(--neba-${b??"primary"}-ring)`,...b?{"--n-accent":`var(--neba-${b}-accent)`}:null},{rel:$,...F}=w,L=v?[...new Set([...($??"").split(/\s+/).filter(Boolean),"noopener","noreferrer"])].join(" "):$;return o({render:j??n("a",{}),ref:_,props:{href:i,target:v?"_blank":void 0,className:B,style:{...C,...x},children:r(e,{children:[y,z?n("span",{className:"ms-[0.25em]",children:z}):null,v?r(e,{children:[" ",n("span",{className:u,children:N.newTab})]}):null]}),...F,rel:L}})});
1
+ "use client";import{jsx as n,Fragment as e,jsxs as r}from"react/jsx-runtime";import*as i from"react";import{useRender as a}from"@base-ui/react/use-render";import{linkMessages as o,useMessages as t}from"../../internal/i18n.js";import{ExternalLinkIcon as l,LinkIcon as s}from"../../internal/icons.js";import{safeRel as c}from"../../internal/link.js";import{controlTextLeadingClasses as m,cx as u,focusRingClasses as d,srOnlyClasses as p}from"../../internal/styles.js";const b={always:"[&.neba-link]:underline",hover:"[&.neba-link]:no-underline [&.neba-link]:hover:underline",none:"[&.neba-link]:no-underline"},f=["neba-link","cursor-pointer","[&_svg]:pointer-events-none [&_svg]:inline [&_svg]:size-[0.95em] [&_svg]:shrink-0",["[transition-property:color,text-decoration-color]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]"].join(" "),d,"focus-visible:rounded-[0.25rem]"].join(" ");export const TextLink=/*@__PURE__*/i.forwardRef(function({href:i,underline:d="always",color:v,size:h,newTab:k=!1,icon:g,locale:j,render:x,className:y,style:w,children:_,...N},T){const z=t(o,j),C=g??k,$=!0===C?n(k?l:s,{}):C,F=u(f,h?m[h]:"",b[d],v?"[&.neba-link]:text-(--n-accent)":"[&.neba-link]:text-inherit",y??""),L={"--n-underline":"color-mix(in oklab, currentColor 45%, transparent)","--n-underline-hover":"currentColor","--n-ring":`var(--neba-${v??"primary"}-ring)`,...v?{"--n-accent":`var(--neba-${v}-accent)`}:null},R=k?"_blank":void 0,{rel:q,...A}=N,B=c(R,q);return a({render:x??n("a",{}),ref:T,props:{href:i,target:R,className:F,style:{...L,...w},children:r(e,{children:[_,$?n("span",{className:"ms-[0.25em]",children:$}):null,k?r(e,{children:[" ",n("span",{className:p,children:z.newTab})]}):null]}),...A,rel:B}})});
@@ -1 +1 @@
1
- "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as o from"react";import{Toast as i}from"@base-ui/react/toast";import{boxPaddingClasses as n}from"../box/Box.js";import{actionMessages as s,useMessages as a}from"../../internal/i18n.js";import{CloseIcon as r,severityIcon as l}from"../../internal/icons.js";import{controlSlots as c,focusRingClasses as d,hasContent as m,iconClasses as p,metaTextClasses as u,radiusClasses as f,sheetBodyClasses as b,sheetHeaderGapClasses as x,sheetSectionGapClasses as v,sheetTitleClasses as h,surfaceClasses as y}from"../../internal/styles.js";const g={"top-start":"top-0 items-start","top-center":"top-0 items-center","top-end":"top-0 items-end","bottom-start":"bottom-0 items-start flex-col-reverse","bottom-center":"bottom-0 items-center flex-col-reverse","bottom-end":"bottom-0 items-end flex-col-reverse"},w={solid:[y,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--neba-shadow-3),var(--neba-plate-solid)]"].join(" "),outline:[y,"border text-(--neba-fg) bg-(--n-panel-press)","[border-color:var(--n-line)]","[box-shadow:var(--neba-shadow-3),var(--neba-plate-glass)]"].join(" "),text:[y,"text-(--neba-fg) bg-(--n-panel-press)","[box-shadow:var(--neba-shadow-3),var(--neba-plate-glass)]"].join(" ")},j={solid:"",outline:"text-(--n-accent)",text:"text-(--n-accent)"};function N(e){const{color:t,variant:o,icon:i,actionLabel:n,onAction:s,...a}=e;return{...a,data:{color:t,variant:o,icon:i},actionProps:void 0===n?void 0:{children:n,onClick:s}}}export function useToast(){const e=i.useToastManager();return o.useMemo(()=>({add:t=>e.add(N(t)),close:t=>e.close(t),update:(t,o)=>e.update(t,N(o)),promise:(t,o)=>e.promise(t,{loading:N(o.loading),success:e=>N("function"==typeof o.success?o.success(e):o.success),error:e=>N("function"==typeof o.error?o.error(e):o.error)}),toasts:e.toasts}),[e])}function _({toast:o,variant:s,color:a,size:y,density:g,closeLabel:N,swipeDirection:_}){const T=o.data?.variant??s??"outline",z=o.data?.color??a,$=void 0===o.data?.icon?l(z):o.data.icon,k=j[T],D=m(o.title);return t(i.Root,{toast:o,swipeDirection:_,className:["pointer-events-auto flex w-full items-start",n[g??"default"][y],f[y],v[y],b[y],w[T],p,"[transition:opacity_var(--neba-duration)_var(--neba-ease)]","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0","data-[limited]:hidden",d,"[outline:none]"].filter(Boolean).join(" "),style:c(z,3,T),children:[m($)?e("span",{className:`flex h-[1lh] shrink-0 items-center ${k}`,children:$}):null,t("div",{className:`flex min-w-0 flex-1 flex-col ${x[y]}`,children:[e(i.Title,{className:`neba-title font-semibold ${h[y]} ${k}`}),e(i.Description,{className:D?""+("solid"===T?"":"text-(--neba-muted-fg)"):""})]}),e(i.Action,{className:["flex h-[1lh] shrink-0 cursor-pointer items-center rounded-full px-2","font-medium underline-offset-2",k||"text-(--n-on-solid)","hover:underline","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2",u[y]].join(" ")}),e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e(i.Close,{"aria-label":N,className:["inline-flex size-[1.15em] cursor-pointer items-center justify-center rounded-full","opacity-70 [transition:opacity_var(--neba-duration)_var(--neba-ease)]","hover:opacity-100 focus-visible:opacity-100","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),children:e(r,{})})})]})}function T(t){const{toasts:o}=i.useToastManager(),{position:n,width:s,...a}=t,r=[n.startsWith("top")?"up":"down","left","right"];return e(i.Portal,{children:e(i.Viewport,{className:["neba-portal pointer-events-none fixed inset-x-0 z-50 flex flex-col gap-2 p-4",g[n]].join(" "),children:o.map(t=>e("div",{className:"w-full",style:{maxWidth:"number"==typeof s?`${s}px`:s},children:e(_,{toast:t,swipeDirection:r,...a})},t.id))})})}export function ToastProvider({variant:o="outline",size:n="md",color:r="primary",density:l="default",position:c="bottom-end",timeout:d=5e3,limit:m=3,width:p=380,locale:u,closeLabel:f,children:b}){const x=a(s,u);return t(i.Provider,{timeout:d,limit:m,children:[b,e(T,{position:c,variant:o,size:n,color:r,density:l,width:p,closeLabel:f??x.close})]})}
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as o from"react";import{Toast as i}from"@base-ui/react/toast";import{boxPaddingClasses as n}from"../box/Box.js";import{actionMessages as s,useMessages as a}from"../../internal/i18n.js";import{CloseIcon as r,severityIcon as l}from"../../internal/icons.js";import{controlSlots as c,focusRingClasses as d,hasContent as m,iconClasses as u,metaTextClasses as p,radiusClasses as f,sheetBodyClasses as b,sheetHeaderGapClasses as x,sheetSectionGapClasses as v,sheetTitleClasses as h,surfaceClasses as y}from"../../internal/styles.js";const g={"top-start":"top-0 items-start","top-center":"top-0 items-center","top-end":"top-0 items-end","bottom-start":"bottom-0 items-start flex-col-reverse","bottom-center":"bottom-0 items-center flex-col-reverse","bottom-end":"bottom-0 items-end flex-col-reverse"},w={solid:[y,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--neba-shadow-3),var(--neba-plate-solid)]"].join(" "),outline:[y,"border text-(--neba-fg) bg-(--n-panel-press)","[border-color:var(--n-line)]","[box-shadow:var(--neba-shadow-3),var(--neba-plate-glass)]"].join(" "),text:[y,"text-(--neba-fg) bg-(--n-panel-press)","[box-shadow:var(--neba-shadow-3),var(--neba-plate-glass)]"].join(" ")},j={solid:"",outline:"text-(--n-accent)",text:"text-(--n-accent)"};function N(e){const{color:t,variant:o,icon:i,actionLabel:n,onAction:s,...a}=e;return{...a,data:{color:t,variant:o,icon:i},actionProps:void 0===n?void 0:{children:n,onClick:s}}}export function useToast(){const e=i.useToastManager();return o.useMemo(()=>({add:t=>e.add(N(t)),close:t=>e.close(t),update:(t,o)=>e.update(t,N(o)),promise:(t,o)=>e.promise(t,{loading:N(o.loading),success:e=>N("function"==typeof o.success?o.success(e):o.success),error:e=>N("function"==typeof o.error?o.error(e):o.error)}),toasts:e.toasts}),[e])}function _({toast:o,variant:s,color:a,size:y,density:g,closeLabel:N,swipeDirection:_}){const T=o.data?.variant??s??"outline",z=o.data?.color??a,$=void 0===o.data?.icon?l(z):o.data.icon,k=j[T],D=m(o.title);return t(i.Root,{toast:o,swipeDirection:_,className:["pointer-events-auto flex w-full items-start",n[g??"default"][y],f[y],v[y],b[y],w[T],u,"[transition:opacity_var(--neba-duration)_var(--neba-ease)]","data-[starting-style]:opacity-0 data-[ending-style]:opacity-0","data-[limited]:hidden",d,"[outline:none]"].filter(Boolean).join(" "),style:c(z,3,T),children:[m($)?e("span",{className:`flex h-[1lh] shrink-0 items-center ${k}`,children:$}):null,t("div",{className:`flex min-w-0 flex-1 flex-col ${x[y]}`,children:[e(i.Title,{className:`neba-title font-semibold ${h[y]} ${k}`}),e(i.Description,{className:D?""+("solid"===T?"":"text-(--neba-muted-fg)"):""})]}),e(i.Action,{className:["flex h-[1lh] shrink-0 cursor-pointer items-center rounded-full px-2","font-medium underline-offset-2",k||"text-(--n-on-solid)","hover:underline","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2",p[y]].join(" ")}),e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e(i.Close,{"aria-label":N,className:["inline-flex size-[1.15em] cursor-pointer items-center justify-center rounded-full","opacity-70 [transition:opacity_var(--neba-duration)_var(--neba-ease)]","hover:opacity-100 focus-visible:opacity-100","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),children:e(r,{})})})]})}function T(t){const{toasts:n}=i.useToastManager(),{position:s,width:a,...r}=t,l=o.useMemo(()=>[s.startsWith("top")?"up":"down","left","right"],[s]);return e(i.Portal,{children:e(i.Viewport,{className:["neba-portal pointer-events-none fixed inset-x-0 z-50 flex flex-col gap-2 p-4",g[s]].join(" "),children:n.map(t=>e("div",{className:"w-full",style:{maxWidth:"number"==typeof a?`${a}px`:a},children:e(_,{toast:t,swipeDirection:l,...r})},t.id))})})}export function ToastProvider({variant:o="outline",size:n="md",color:r="primary",density:l="default",position:c="bottom-end",timeout:d=5e3,limit:m=3,width:u=380,locale:p,closeLabel:f,children:b}){const x=a(s,p);return t(i.Provider,{timeout:d,limit:m,children:[b,e(T,{position:c,variant:o,size:n,color:r,density:l,width:u,closeLabel:f??x.close})]})}