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.
- package/README.md +7 -7
- package/dist/components/accordion/Accordion.js +1 -1
- package/dist/components/alert/Alert.js +1 -1
- package/dist/components/anchor/Anchor.d.ts +73 -0
- package/dist/components/anchor/Anchor.js +1 -0
- package/dist/components/anchor/index.d.ts +2 -0
- package/dist/components/anchor/index.js +1 -0
- package/dist/components/animate-marquee/AnimateMarquee.js +1 -1
- package/dist/components/app-logo/AppLogo.js +1 -1
- package/dist/components/aspect-ratio/AspectRatio.js +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/avatar-group/AvatarGroup.d.ts +47 -0
- package/dist/components/avatar-group/AvatarGroup.js +1 -0
- package/dist/components/avatar-group/index.d.ts +2 -0
- package/dist/components/avatar-group/index.js +1 -0
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/blockquote/Blockquote.js +1 -1
- package/dist/components/box/Box.js +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/button-group/ButtonGroup.js +1 -1
- package/dist/components/card/Card.js +1 -1
- package/dist/components/carousel/Carousel.js +1 -1
- package/dist/components/chat-bubble/ChatBubble.js +1 -1
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/command-palette/CommandPalette.d.ts +88 -0
- package/dist/components/command-palette/CommandPalette.js +1 -0
- package/dist/components/command-palette/index.d.ts +2 -0
- package/dist/components/command-palette/index.js +1 -0
- package/dist/components/container/Container.js +1 -1
- package/dist/components/data-list/DataList.d.ts +55 -0
- package/dist/components/data-list/DataList.js +1 -0
- package/dist/components/data-list/index.d.ts +2 -0
- package/dist/components/data-list/index.js +1 -0
- package/dist/components/data-table/DataTable.js +1 -1
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/drawer/Drawer.js +1 -1
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/fieldset/Fieldset.d.ts +33 -0
- package/dist/components/fieldset/Fieldset.js +1 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/components/fieldset/index.js +1 -0
- package/dist/components/file-picker/FilePicker.js +1 -1
- package/dist/components/floating-bottom-navigation/FloatingBottomNavigation.js +1 -1
- package/dist/components/form/Form.d.ts +58 -0
- package/dist/components/form/Form.js +1 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.js +1 -0
- package/dist/components/gauge-chart/GaugeChart.d.ts +62 -0
- package/dist/components/gauge-chart/GaugeChart.js +1 -0
- package/dist/components/gauge-chart/index.d.ts +2 -0
- package/dist/components/gauge-chart/index.js +1 -0
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/grid-container/GridContainer.js +1 -1
- package/dist/components/heatmap-chart/HeatmapChart.js +1 -1
- package/dist/components/highlight/Highlight.js +1 -1
- package/dist/components/hover-card/HoverCard.d.ts +78 -0
- package/dist/components/hover-card/HoverCard.js +1 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/how-to-steps/HowToSteps.d.ts +11 -25
- package/dist/components/how-to-steps/HowToSteps.js +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/list/List.js +1 -1
- package/dist/components/menu/Menu.d.ts +16 -4
- package/dist/components/menu/Menu.js +1 -1
- package/dist/components/menubar/Menubar.d.ts +56 -0
- package/dist/components/menubar/Menubar.js +1 -0
- package/dist/components/menubar/index.d.ts +2 -0
- package/dist/components/menubar/index.js +1 -0
- package/dist/components/meter/Meter.d.ts +52 -0
- package/dist/components/meter/Meter.js +1 -0
- package/dist/components/meter/index.d.ts +2 -0
- package/dist/components/meter/index.js +1 -0
- package/dist/components/mockup/Mockup.js +1 -1
- package/dist/components/navigation-menu/NavigationMenu.d.ts +100 -0
- package/dist/components/navigation-menu/NavigationMenu.js +1 -0
- package/dist/components/navigation-menu/index.d.ts +2 -0
- package/dist/components/navigation-menu/index.js +1 -0
- package/dist/components/number-field/NumberField.js +1 -1
- package/dist/components/otp-field/OtpField.js +1 -1
- package/dist/components/overlay/Overlay.js +1 -1
- package/dist/components/page-layout/PageLayout.js +1 -1
- package/dist/components/pagination/Pagination.js +1 -1
- package/dist/components/panes/Panes.js +1 -1
- package/dist/components/pie-chart/PieChart.js +1 -1
- package/dist/components/pill/Pill.js +1 -1
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/progress-box/ProgressBox.js +1 -1
- package/dist/components/progress-circular/ProgressCircular.js +1 -1
- package/dist/components/progress-linear/ProgressLinear.js +1 -1
- package/dist/components/radio-group/RadioGroup.js +1 -1
- package/dist/components/rating/Rating.js +1 -1
- package/dist/components/scroll-area/ScrollArea.d.ts +50 -0
- package/dist/components/scroll-area/ScrollArea.js +1 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-zone/ScrollZone.d.ts +35 -17
- package/dist/components/scroll-zone/ScrollZone.js +1 -1
- package/dist/components/segmented-button/SegmentedButton.js +1 -1
- package/dist/components/select/Select.js +1 -1
- package/dist/components/shortcut/Shortcut.js +1 -1
- package/dist/components/sidebar/Sidebar.js +1 -1
- package/dist/components/skeleton/Skeleton.js +1 -1
- package/dist/components/slider/Slider.js +1 -1
- package/dist/components/spoiler/Spoiler.js +1 -1
- package/dist/components/statistic/Statistic.js +1 -1
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/table/Table.js +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/text-field/TextField.js +1 -1
- package/dist/components/text-link/TextLink.js +1 -1
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toggle/Toggle.d.ts +53 -0
- package/dist/components/toggle/Toggle.js +1 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/index.js +1 -0
- package/dist/components/toggle-group/ToggleGroup.d.ts +51 -0
- package/dist/components/toggle-group/ToggleGroup.js +1 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/toolbar/Toolbar.js +1 -1
- package/dist/components/tooltip/Tooltip.js +1 -1
- package/dist/components/tour/Tour.d.ts +82 -0
- package/dist/components/tour/Tour.js +1 -0
- package/dist/components/tour/index.d.ts +2 -0
- package/dist/components/tour/index.js +1 -0
- package/dist/components/transfer/Transfer.d.ts +52 -0
- package/dist/components/transfer/Transfer.js +1 -0
- package/dist/components/transfer/index.d.ts +2 -0
- package/dist/components/transfer/index.js +1 -0
- package/dist/components/tree-view/TreeView.js +1 -1
- package/dist/components/typography/Typography.js +1 -1
- package/dist/components/window-pane/WindowPane.js +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +1 -1
- package/dist/internal/animate.d.ts +7 -1
- package/dist/internal/animate.js +1 -1
- package/dist/internal/avatar-group.d.ts +22 -0
- package/dist/internal/avatar-group.js +1 -0
- package/dist/internal/button-group.d.ts +6 -2
- package/dist/internal/chart-frame.d.ts +18 -1
- package/dist/internal/chart-frame.js +1 -1
- package/dist/internal/data-table.d.ts +0 -14
- package/dist/internal/data-table.js +1 -1
- package/dist/internal/drag.d.ts +62 -0
- package/dist/internal/drag.js +1 -0
- package/dist/internal/highlight.js +1 -1
- package/dist/internal/i18n.d.ts +82 -0
- package/dist/internal/i18n.js +1 -1
- package/dist/internal/link.d.ts +19 -0
- package/dist/internal/link.js +1 -0
- package/dist/internal/media.d.ts +29 -0
- package/dist/internal/media.js +1 -0
- package/dist/internal/observe.d.ts +42 -0
- package/dist/internal/observe.js +1 -0
- package/dist/internal/page-layout.js +1 -1
- package/dist/internal/picker.js +1 -1
- package/dist/internal/progress.d.ts +5 -0
- package/dist/internal/search.d.ts +33 -0
- package/dist/internal/search.js +1 -0
- package/dist/internal/styles.d.ts +39 -0
- package/dist/internal/styles.js +1 -1
- package/dist/locales/ar.js +1 -1
- package/dist/locales/de.js +1 -1
- package/dist/locales/es.js +1 -1
- package/dist/locales/fr.js +1 -1
- package/dist/locales/hi.js +1 -1
- package/dist/locales/id.js +1 -1
- package/dist/locales/it.js +1 -1
- package/dist/locales/ja.js +1 -1
- package/dist/locales/ko.js +1 -1
- package/dist/locales/nl.js +1 -1
- package/dist/locales/pl.js +1 -1
- package/dist/locales/pt.js +1 -1
- package/dist/locales/ru.js +1 -1
- package/dist/locales/th.js +1 -1
- package/dist/locales/tr.js +1 -1
- package/dist/locales/vi.js +1 -1
- package/dist/locales/zh-hans.js +1 -1
- package/dist/locales/zh-hant.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +104 -0
- package/dist/types.d.ts +16 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -146,21 +146,21 @@ Placement props are logical, not physical — `start`/`end` rather than `left`/`
|
|
|
146
146
|
|
|
147
147
|
### Components
|
|
148
148
|
|
|
149
|
-
**Inputs** — Button, IconButton, ButtonGroup, SegmentedButton, FloatingActionButton (with FloatingAction), TextField, NumberField, OtpField, Select, Combobox, Checkbox, RadioGroup, Switch, Slider, Rating, Menu (with submenus, checkbox and radio items), ContextMenu, FilePicker, Pagination, BottomNavigation, FloatingBottomNavigation, ColorPicker, DatePicker, TimePicker, DateTimePicker, DateRangePicker
|
|
149
|
+
**Inputs** — Button, IconButton, ButtonGroup, SegmentedButton, Toggle, ToggleGroup, Form, Fieldset, FloatingActionButton (with FloatingAction), TextField, NumberField, OtpField, Select, Combobox, Checkbox, RadioGroup, Switch, Slider, Rating, Menu (with submenus, checkbox and radio items), ContextMenu, Menubar, NavigationMenu, CommandPalette, FilePicker, Transfer, Pagination, BottomNavigation, FloatingBottomNavigation, ColorPicker, DatePicker, TimePicker, DateTimePicker, DateRangePicker
|
|
150
150
|
|
|
151
|
-
**Surfaces** — Box, Card, Accordion, Collapsible, Tabs, Carousel, Toolbar, Pill, Spoiler, HowToSteps, ChatBubble, Drawer, Popover, Mockup, WindowPane
|
|
151
|
+
**Surfaces** — Box, Card, Accordion, Collapsible, Tabs, Carousel, Toolbar, Pill, Spoiler, HowToSteps, ChatBubble, Drawer, Popover, Mockup, WindowPane, HoverCard
|
|
152
152
|
|
|
153
|
-
**Display** — Typography, TextLink, Blockquote, Highlight, Divider, Chip, Badge, Avatar, AppLogo, Icon, Shortcut, List, Table, DataTable, CodeBlock, Timeline, Breadcrumb, TreeView
|
|
153
|
+
**Display** — Typography, TextLink, Blockquote, Highlight, Divider, Chip, Badge, Avatar, AvatarGroup, AppLogo, Icon, Shortcut, List, DataList, Table, DataTable, CodeBlock, Timeline, Breadcrumb, Anchor, TreeView
|
|
154
154
|
|
|
155
|
-
**Charts** — Statistic, Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart
|
|
155
|
+
**Charts** — Statistic, Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart, GaugeChart
|
|
156
156
|
|
|
157
|
-
**Feedback** — Alert, Dialog, Toast, Tooltip, Overlay, Skeleton, Empty, ProgressLinear, ProgressCircular, ProgressBox
|
|
157
|
+
**Feedback** — Alert, Dialog, Toast, Tooltip, Overlay, Skeleton, Empty, ProgressLinear, ProgressCircular, ProgressBox, Meter, Tour
|
|
158
158
|
|
|
159
|
-
**Layout** — PageLayout (with Header, Footer and Sidebar), Container, Grid (with GridContainer), Panes, AspectRatio, ScrollZone
|
|
159
|
+
**Layout** — PageLayout (with Header, Footer and Sidebar), Container, Grid (with GridContainer), Panes, AspectRatio, ScrollZone, ScrollArea
|
|
160
160
|
|
|
161
161
|
**Transitions** — AnimateFade, AnimateGrow, AnimateZoom, AnimateSlide, AnimateRotate, AnimateBlink, AnimateAppear, AnimateTyping, AnimateLighting, AnimateMarquee, AnimateHeadline
|
|
162
162
|
|
|
163
|
-
**Recently added** — CodeBlock, HowToSteps, ScrollZone, FloatingBottomNavigation, WindowPane, Collapsible, Rating, BottomNavigation, FloatingActionButton, the charts (Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart), DataTable, Empty, Mockup, the eleven `Animate*` wrappers, ColorPicker, Drawer, Popover, Skeleton, AspectRatio
|
|
163
|
+
**Recently added** — GaugeChart, CommandPalette, Tour, Transfer, Anchor, DataList, AvatarGroup, NavigationMenu, Menubar, Form (with Fieldset), ScrollArea, HoverCard, Meter, Toggle (with ToggleGroup), CodeBlock, HowToSteps, ScrollZone, FloatingBottomNavigation, WindowPane, Collapsible, Rating, BottomNavigation, FloatingActionButton, the charts (Sparkline, LineChart, AreaChart, BarChart, PieChart, ScatterChart, TimelineChart, HeatmapChart), DataTable, Empty, Mockup, the eleven `Animate*` wrappers, ColorPicker, Drawer, Popover, Skeleton, AspectRatio
|
|
164
164
|
|
|
165
165
|
Each one has its own page — live previews, every prop, and the variations worth seeing — under [**All components**](https://neba.cdget.com/components/).
|
|
166
166
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{Accordion as t}from"@base-ui/react/accordion";import{boxPaddingXClasses as l,boxPaddingYClasses as
|
|
1
|
+
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{Accordion as t}from"@base-ui/react/accordion";import{boxPaddingXClasses as l,boxPaddingYClasses as r}from"../box/Box.js";import{ChevronIcon as s}from"../../internal/icons.js";import{cx as i,focusRingClasses as o,gapClasses as d,hasContent as c,iconClasses as m,metaTextClasses as u,radiusClasses as f,sheetBodyClasses as h,sheetHeaderGapClasses as b,sheetTitleClasses as x,surfaceClasses as p,surfaceSlots as v,transitionClasses as g}from"../../internal/styles.js";const N=/*@__PURE__*/a.createContext({size:"md",density:"default",dividers:!0}),j={solid:[p,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[p,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"},w={xs:f.xs,sm:f.xs,md:f.sm,lg:f.sm,xl:f.md};export const Accordion=/*@__PURE__*/a.forwardRef(function({variant:n="outline",size:l="md",color:r="primary",density:s="default",elevation:o=0,multiple:d=!1,value:c,defaultValue:m,onValueChange:u,dividers:h=!0,disabled:b=!1,hiddenUntilFound:x=!1,keepMounted:p=!1,className:w,style:y,children:k,...z},C){const V=a.useMemo(()=>({size:l,density:s,dividers:h}),[l,s,h]),$=i("flex flex-col",f[l],j[n],g,h?"overflow-hidden [&>div+div]:border-t [&>div+div]:[border-color:var(--n-line)]":"p-1",w??"");return e(N.Provider,{value:V,children:e(t.Root,{ref:C,multiple:d,value:c,defaultValue:m,onValueChange:e=>u?.(e),disabled:b,hiddenUntilFound:x,keepMounted:p,className:$,style:{...v(r,o),...y},...z,children:k})})});export const AccordionItem=/*@__PURE__*/a.forwardRef(function({value:f,title:p,subtitle:v,startIcon:j,action:y,disabled:k=!1,className:z,children:C,...V},$){const{size:_,density:A,dividers:I}=a.useContext(N),M=l[A][_],R=r[A][_];return n(t.Item,{ref:$,value:f,disabled:k,className:i("flex flex-col",z??""),...V,children:[n(t.Header,{className:"m-0 flex w-full items-center [font:inherit]",children:[n(t.Trigger,{className:i("flex min-w-0 flex-1 cursor-pointer items-center text-start",M,R,d[_],g,m,o,I?"":w[_],"hover:bg-(--n-soft)","data-[panel-open]:text-(--n-accent)","disabled:cursor-not-allowed disabled:bg-transparent disabled:text-(--neba-disabled-fg)"),children:[c(j)?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:j}):null,n("span",{className:`flex min-w-0 flex-1 flex-col ${b[_]}`,children:[c(p)?e("span",{className:`truncate font-semibold ${x[_]}`,children:p}):null,c(v)?e("span",{className:`truncate text-(--neba-muted-fg) ${u[_]}`,children:v}):null]}),e("span",{className:["flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)","[transition:rotate_var(--neba-duration)_var(--neba-ease)]","data-[panel-open]:rotate-180"].join(" "),children:e(s,{})})]}),c(y)?e("span",{className:`flex shrink-0 items-center ${M}`,children:y}):null]}),e(t.Panel,{className:["h-(--accordion-panel-height) overflow-hidden","[transition:height_var(--neba-duration)_var(--neba-ease)]","data-[starting-style]:h-0 data-[ending-style]:h-0"].join(" "),children:e("div",{className:["text-(--neba-muted-fg)",h[_],M,"compact"===A?"pb-2":"pb-4"].join(" "),children:C})})]})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{boxPaddingClasses as l}from"../box/Box.js";import{actionMessages as i,useMessages as s}from"../../internal/i18n.js";import{CloseIcon as a,severityIcon as o}from"../../internal/icons.js";import{transitionProps as r}from"../../internal/animate.js";import{controlSlots as c,
|
|
1
|
+
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{boxPaddingClasses as l}from"../box/Box.js";import{actionMessages as i,useMessages as s}from"../../internal/i18n.js";import{CloseIcon as a,severityIcon as o}from"../../internal/icons.js";import{transitionProps as r}from"../../internal/animate.js";import{controlSlots as c,cx as d,hasContent as m,iconClasses as f,radiusClasses as u,sheetBodyClasses as x,sheetHeaderGapClasses as b,sheetSectionGapClasses as v,sheetTitleClasses as h,surfaceClasses as p,transitionClasses as y}from"../../internal/styles.js";const j={solid:[p,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[p,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-(--n-soft)"},g={solid:"",outline:"text-(--n-accent)",text:"text-(--n-accent)"},N={solid:"",outline:"text-(--neba-muted-fg)",text:"text-(--neba-muted-fg)"},w={primary:"status",secondary:"status",info:"status",success:"status",warning:"alert",danger:"alert"};export const Alert=/*@__PURE__*/n.forwardRef(function({variant:n="outline",size:p="md",color:k="info",density:$="default",elevation:_=0,title:z,icon:C,action:A,onClose:B,locale:L,closeLabel:R,transition:q,className:D,style:E,children:F,...G},H){const I=s(i,L),J=void 0===C?o(k):C,K=g[n],M=m(z),O=r(q);return t("div",{ref:H,role:w[k],className:d("flex w-full items-start",l[$][p],u[p],v[p],x[p],y,j[n],f,O.className,D??""),style:{...c(k,_,n),...O.style,...E},...G,children:[m(J)?e("span",{className:`flex h-[1lh] shrink-0 items-center ${K}`,children:J}):null,t("div",{className:`flex min-w-0 flex-1 flex-col ${b[p]}`,children:[M?e("div",{className:`neba-title font-semibold ${h[p]} ${K}`,children:z}):null,m(F)?e("div",{className:M?N[n]:void 0,children:F}):null]}),m(A)?e("div",{className:"flex h-[1lh] shrink-0 items-center",children:A}):null,B?e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e("button",{type:"button","aria-label":R??I.dismiss,onClick:B,className:["inline-flex size-[1.15em] cursor-pointer items-center justify-center rounded-full","opacity-70 [transition:opacity_var(--neba-duration)_var(--neba-ease)]","hover:opacity-100 focus-visible:opacity-100","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),children:e(a,{})})}):null]})});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { NebaColor, NebaDensity, NebaSize } from '../../types.js';
|
|
3
|
+
/** One heading in the list. */
|
|
4
|
+
export interface AnchorItem {
|
|
5
|
+
/**
|
|
6
|
+
* The fragment it points at — `#getting-started`. The `id` it names is what
|
|
7
|
+
* the list watches, so a heading with no `id` cannot be tracked.
|
|
8
|
+
*/
|
|
9
|
+
href: string;
|
|
10
|
+
/** What the row says. */
|
|
11
|
+
label: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* How deep the heading sits, from `0`. Only the indent depends on it; the
|
|
14
|
+
* list is flat, because a nested `<ul>` inside a table of contents is read as
|
|
15
|
+
* a list inside a list and says nothing a reader needed.
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
depth?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface AnchorProps extends Omit<React.ComponentPropsWithoutRef<'nav'>, 'color' | 'children' | 'onChange'> {
|
|
21
|
+
/** The headings, in the order they appear on the page. */
|
|
22
|
+
items: readonly AnchorItem[];
|
|
23
|
+
/**
|
|
24
|
+
* Which row is marked, by its `href`. Given, the list stops tracking the
|
|
25
|
+
* scroll and says what it is told.
|
|
26
|
+
*/
|
|
27
|
+
activeHref?: string | null;
|
|
28
|
+
/** Called whenever the row the reader is in changes. */
|
|
29
|
+
onActiveChange?: (href: string | null) => void;
|
|
30
|
+
/**
|
|
31
|
+
* How far below the top of the scrollport a heading counts as reached, in
|
|
32
|
+
* pixels. Set it to the height of a sticky header, or the heading under the
|
|
33
|
+
* bar is never the one marked.
|
|
34
|
+
* @default 0
|
|
35
|
+
*/
|
|
36
|
+
offset?: number;
|
|
37
|
+
/**
|
|
38
|
+
* What scrolls, when it is not the document — the element a
|
|
39
|
+
* [PageLayout](../layout/page-layout) with `scroll="content"` puts the page
|
|
40
|
+
* inside, for instance.
|
|
41
|
+
*/
|
|
42
|
+
container?: React.RefObject<HTMLElement | null>;
|
|
43
|
+
/** Draws the rail down the leading edge, with the active row lit. @default true */
|
|
44
|
+
rail?: boolean;
|
|
45
|
+
/** @default 'md' */
|
|
46
|
+
size?: NebaSize;
|
|
47
|
+
/** @default 'primary' */
|
|
48
|
+
color?: NebaColor;
|
|
49
|
+
/** Tightens the rows and nothing else. @default 'default' */
|
|
50
|
+
density?: NebaDensity;
|
|
51
|
+
/**
|
|
52
|
+
* Which language the `<nav>` is named in — a BCP 47 tag such as `ko`, `pt-BR`
|
|
53
|
+
* or `zh-Hant`. Unsupported tags fall back to English.
|
|
54
|
+
*/
|
|
55
|
+
locale?: string;
|
|
56
|
+
/** The accessible name of the `<nav>`. Defaults to the `locale`'s word for it. */
|
|
57
|
+
label?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The list of headings on the page being read, with the one the reader is in
|
|
61
|
+
* marked.
|
|
62
|
+
*
|
|
63
|
+
* It is a real `<nav>` of real `<a href="#…">`s, which is what makes it work
|
|
64
|
+
* before any of this runs: the links jump to their headings with JavaScript
|
|
65
|
+
* turned off, and they are in the link list a screen reader can pull up. The
|
|
66
|
+
* tracking is the part that is added on top, not the part that is load-bearing.
|
|
67
|
+
*
|
|
68
|
+
* The headings are given as `items` rather than scraped out of the document.
|
|
69
|
+
* Anything that produces this list — an MDX pipeline, a CMS, a route's own
|
|
70
|
+
* frontmatter — already knows the ids, and a component that went looking for
|
|
71
|
+
* them would be guessing at which `<h2>`s were content and which were chrome.
|
|
72
|
+
*/
|
|
73
|
+
export declare const Anchor: React.ForwardRefExoticComponent<AnchorProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import*as n from"react";import{anchorMessages as r,useMessages as t}from"../../internal/i18n.js";import{controlTextLeadingClasses as o,cx as a,focusRingClasses as l,transitionClasses as i}from"../../internal/styles.js";const c={default:{xs:"py-1",sm:"py-1",md:"py-1.5",lg:"py-1.5",xl:"py-2"},compact:{xs:"py-0.5",sm:"py-0.5",md:"py-1",lg:"py-1",xl:"py-1"}},s={xs:8,sm:10,md:12,lg:14,xl:16},m=["block min-w-0 truncate no-underline","text-(--neba-muted-fg)",i,l,"hover:text-(--neba-fg)","aria-[current=location]:font-medium aria-[current=location]:text-(--n-accent)"].join(" "),d=["border-s [border-color:transparent]","[transition:border-color_var(--neba-duration)_var(--neba-ease)]","aria-[current=location]:[border-color:var(--n-accent)]"].join(" ");export const Anchor=/*@__PURE__*/n.forwardRef(function({items:l,activeHref:i,onActiveChange:u,offset:f=0,container:p,rail:h=!0,size:g="md",color:v="primary",density:b="default",locale:y,label:x,className:w,style:j,...E},H){const N=t(r,y),[R,A]=n.useState(null),L=void 0!==i,z=L?i:R,B=n.useRef(u);B.current=u;const C=n.useRef(l);C.current=l;const $=l.map(e=>e.href).join("\0");return n.useEffect(()=>{if(L)return;const e=p?.current??window;let n=0,r=null;const t=()=>{n=0;const e=function(e,n,r){const t=(r?r.getBoundingClientRect().top:0)+n+1;let o=null;for(const n of e){const e=document.getElementById(n.href.replace(/^#/,""));e&&e.getBoundingClientRect().top<=t&&(o=n.href)}return(r?r.scrollTop+r.clientHeight>=r.scrollHeight-2:window.innerHeight+window.scrollY>=document.documentElement.scrollHeight-2)&&e.length>0?e[e.length-1].href:o}(C.current,f,p?.current??null);e!==r&&(r=e,A(e),B.current?.(e))},o=()=>{0===n&&(n=requestAnimationFrame(t))};return t(),e.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o,{passive:!0}),()=>{0!==n&&cancelAnimationFrame(n),e.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[$,f,p,L]),e("nav",{ref:H,"aria-label":x??N.label,className:a("min-w-0",w??""),style:{"--n-accent":`var(--neba-${v}-accent)`,"--n-ring":`var(--neba-${v}-ring)`,...j},...E,children:e("ul",{className:a("m-0 flex list-none flex-col p-0",h?"border-s [border-color:var(--neba-border)]":""),children:l.map(n=>e("li",{className:h?"[margin-inline-start:-1px]":"",children:e("a",{href:n.href,"aria-current":z===n.href?"location":void 0,className:a(m,o[g],c[b][g],h?`${d} ps-3`:""),style:{marginInlineStart:n.depth?n.depth*s[g]:void 0},children:n.label})},n.href))})})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{Anchor}from"./Anchor.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{isInfinite as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{isInfinite as a,lengthValue as r,useAnimationRun as n}from"../../internal/animate.js";import{observeResize as i}from"../../internal/observe.js";import{cx as s}from"../../internal/styles.js";export const AnimateMarquee=/*@__PURE__*/t.forwardRef(function({duration:o,delay:m=0,repeat:l="infinite",alternate:u,paused:c,trigger:d="mount",play:f,once:p=!0,threshold:h=.2,easing:v,orientation:g="horizontal",reverse:y=!1,speed:b=60,gap:j="2rem",copies:q=2,pauseOnHover:x=!0,className:M,style:N,children:R,...S},w){const A=n({trigger:d,play:f,once:p,threshold:h,paused:c,infinite:a(l)}),G=t.useRef(null),H=t.useRef(null),[$,k]=t.useState(0),z="vertical"===g;t.useEffect(()=>{const e=G.current,t=H.current;if(!e||!t)return;const a=()=>{const a=getComputedStyle(e),r=parseFloat(z?a.rowGap:a.columnGap)||0,n=z?t.offsetHeight:t.offsetWidth;k(n+r)};a();const r=i(t,a),n=i(e,a);return()=>{r(),n()}},[z,R]);const C=o??($>0?$/b*1e3:12e3);return e("div",{ref:e=>{G.current=e,A.ref(e),"function"==typeof w?w(e):w&&(w.current=e)},className:s("neba-marquee",z&&"neba-marquee-vertical",M),style:{"--n-anim-gap":r(j),...v?{"--n-anim-ease":v}:{},"--n-anim-duration":`${Math.round(C)}ms`,"--n-anim-delay":`${m}ms`,"--n-anim-repeat":"infinite"===l?"infinite":String(l),"--n-anim-direction":y?u?"alternate-reverse":"reverse":u?"alternate":"normal","--n-anim-state":A.state,...N},"data-neba-animation":"marquee","data-state":A.state,"data-pause-on-hover":x?"":void 0,...A.handlers,...S,children:Array.from({length:Math.max(1,q)},(t,a)=>(t=>e("div",{ref:0===t?H:void 0,className:"neba-marquee-track","aria-hidden":0===t?void 0:"true",children:R},t))(a))})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import*as t from"react";import{useRender as s}from"@base-ui/react/use-render";import{initialsOf as a}from"../../internal/initials.js";import{controlHeightClasses as l,controlSlots as i,controlSquareClasses as o,cx as m,gapClasses as d,hasContent as c,srOnlyClasses as u,surfaceClasses as x,toLength as f,transitionClasses as g}from"../../internal/styles.js";const h={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.375rem]",xl:"text-[1.625rem]"},p={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.3125rem]",xl:"text-[1.5625rem]"},v={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},b={solid:[x,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[x,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft-press) [box-shadow:var(--n-elev)]"};export const AppLogo=/*@__PURE__*/t.forwardRef(function({src:t,srcSet:x,alt:w,name:j,initials:_,showName:
|
|
1
|
+
"use client";import{jsx as e,Fragment as r,jsxs as n}from"react/jsx-runtime";import*as t from"react";import{useRender as s}from"@base-ui/react/use-render";import{initialsOf as a}from"../../internal/initials.js";import{controlHeightClasses as l,controlSlots as i,controlSquareClasses as o,cx as m,gapClasses as d,hasContent as c,srOnlyClasses as u,surfaceClasses as x,toLength as f,transitionClasses as g}from"../../internal/styles.js";const h={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.375rem]",xl:"text-[1.625rem]"},p={xs:"text-[0.75rem]",sm:"text-[0.875rem]",md:"text-[1.0625rem]",lg:"text-[1.3125rem]",xl:"text-[1.5625rem]"},v={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},b={solid:[x,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[x,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft-press) [box-shadow:var(--n-elev)]"};export const AppLogo=/*@__PURE__*/t.forwardRef(function({src:t,srcSet:x,alt:w,name:j,initials:_,showName:y=!1,shape:N="bare",variant:k="solid",size:S="md",color:z="primary",elevation:A=0,padded:F=!0,height:L,href:P,imageProps:R,render:$,className:q,style:B,children:C,...D},E){const G="bare"!==N,H=c(C)?C:t?"image":null,I=G&&F,J=null===H&&!G,K=y&&!J&&c(j),M=w??j,O=_??(j?a(j):""),Q="image"===H&&!K&&c(M),T=J||Q,U=!T&&!K&&c(M),V=f(L),W=V?{height:V,width:G?V:void 0}:null,X=e("span",{"aria-hidden":!T||void 0,className:m("flex shrink-0 items-center justify-center overflow-hidden","font-semibold tracking-tight whitespace-nowrap",V?"":l[S],G?m(V?"":o[S],"circle"===N?"rounded-full":v[S],p[S],b[k]):m("w-auto text-(--neba-fg)",h[S]),"[&_svg]:w-auto [&_svg]:shrink-0",I?"[&_svg]:h-[72%] [&_svg]:max-w-[72%]":"[&_svg]:h-full [&_svg]:max-w-full",g),style:{...G?i(z,A,k):null,...W},children:"image"===H?e("img",{src:t,srcSet:x,alt:Q?M??"":"",className:m("w-auto object-contain",I?"h-[72%] max-w-[72%]":"h-full max-w-full"),decoding:"async",...R}):H??(J?j:O)});return s({render:$??e(P?"a":"span",{}),ref:E,props:{href:P,className:m("inline-flex max-w-full min-w-0 items-center align-middle","text-(--neba-fg) no-underline select-none",d[S],P?"cursor-pointer rounded-(--neba-radius-sm)":"",P?"focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2":"",q),style:{"--n-ring":`var(--neba-${z}-ring)`,...B},children:n(r,{children:[X,K?e("span",{className:m("min-w-0 truncate font-semibold",h[S]),children:j}):null,U?e("span",{className:u,children:M}):null]}),...D}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import*as e from"react";import{useRender as i}from"@base-ui/react/use-render";import{radiusClasses as
|
|
1
|
+
"use client";import*as e from"react";import{useRender as i}from"@base-ui/react/use-render";import{cx as o,radiusClasses as t}from"../../internal/styles.js";const c=["[&>img]:size-full","[&>video]:size-full","[&>canvas]:size-full","[&>svg]:size-full","[&>iframe]:size-full","[&>picture]:size-full","[&>picture>img]:size-full"].join(" "),r={cover:"[&>img]:object-cover [&>video]:object-cover [&>picture>img]:object-cover",contain:"[&>img]:object-contain [&>video]:object-contain [&>picture>img]:object-contain",fill:"[&>img]:object-fill [&>video]:object-fill [&>picture>img]:object-fill",none:"[&>img]:object-none [&>video]:object-none [&>picture>img]:object-none"};export const AspectRatio=/*@__PURE__*/e.forwardRef(function({ratio:e=1,fit:l="cover",rounded:n=!1,size:s="md",render:a,className:f,style:m,children:u,...d},b){const j=o("relative block w-full overflow-hidden",c,r[l],n?t[s]:"",f??"");return i({render:a,ref:b,props:{className:j,style:{aspectRatio:e,...m},children:u,...d}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{Avatar as
|
|
1
|
+
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as n from"react";import{Avatar as a}from"@base-ui/react/avatar";import{transitionProps as r}from"../../internal/animate.js";import{AvatarGroupContext as o}from"../../internal/avatar-group.js";import{initialsOf as s}from"../../internal/initials.js";import{controlHeightClasses as i,controlSlots as l,controlSquareClasses as d,cx as c,hasContent as m,srOnlyClasses as f,surfaceClasses as u,transitionClasses as v}from"../../internal/styles.js";const x={xs:"text-[0.5625rem]",sm:"text-[0.6875rem]",md:"text-[0.8125rem]",lg:"text-[1rem]",xl:"text-[1.1875rem]"},p={xs:"rounded-[0.375rem]",sm:"rounded-[0.4375rem]",md:"rounded-[0.5625rem]",lg:"rounded-[0.6875rem]",xl:"rounded-[0.875rem]"},h={solid:[u,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev)]"].join(" "),outline:[u,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft-press) [box-shadow:var(--n-elev)]"},g="after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit]",b={solid:`${g} after:[box-shadow:var(--neba-plate-solid)]`,outline:`${g} after:[box-shadow:var(--neba-plate-glass)]`,text:""},j=["relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden","align-middle font-semibold tracking-wide whitespace-nowrap leading-none","[&_svg]:pointer-events-none [&_svg]:size-[55%]",v].join(" ");function w(){return t("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z"}),e("path",{d:"M12 14.25c-4.28 0-7.75 2.42-7.75 5.4 0 .75.6 1.35 1.35 1.35h12.8c.75 0 1.35-.6 1.35-1.35 0-2.98-3.47-5.4-7.75-5.4Z"})]})}export const Avatar=/*@__PURE__*/n.forwardRef(function({src:u,srcSet:v,alt:g,name:y,initials:N,shape:z,variant:C,size:S,color:k,elevation:A,delay:B,imageProps:L,onLoadingStatusChange:M,transition:R,className:Z,style:$,children:_,...F},I){const P=n.useContext(o),q=z??P?.shape??"circle",D=C??P?.variant??"text",E=S??P?.size??"md",G=k??P?.color??"primary",H=A??P?.elevation??0,J=y?s(y):"",K=r(R),O=g??y,Q=m(_)?_:(N??J)||e(w,{}),T=m(_)||Boolean(N??J),U=c(j,i[E],d[E],x[E],"circle"===q?"rounded-full":p[E],h[D],b[D],K.className,Z??"");return t(a.Root,{ref:I,className:U,style:{...l(G,H,D),...K.style,...$},...F,children:[u?e(a.Image,{src:u,srcSet:v,alt:O??"",className:"size-full object-cover",decoding:"async",onLoadingStatusChange:M,...L}):null,t(a.Fallback,{delay:u?B:void 0,className:"flex size-full items-center justify-center",children:[O&&T?e("span",{className:f,children:O}):null,e("span",{"aria-hidden":!(!O||!T)||void 0,className:"contents",children:Q})]})]})});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type AvatarShape } from '../avatar/Avatar.js';
|
|
3
|
+
import type { NebaColor, NebaElevation, NebaSize, NebaVariant } from '../../types.js';
|
|
4
|
+
export interface AvatarGroupProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'color'> {
|
|
5
|
+
/**
|
|
6
|
+
* How many avatars are drawn before the rest become a count. Left out, every
|
|
7
|
+
* one of them is drawn.
|
|
8
|
+
*/
|
|
9
|
+
max?: number;
|
|
10
|
+
/**
|
|
11
|
+
* How many there are altogether, when the group was handed only the first
|
|
12
|
+
* few. Without it the count is worked out from the children, which is right
|
|
13
|
+
* only when all of them were passed.
|
|
14
|
+
*/
|
|
15
|
+
total?: number;
|
|
16
|
+
/**
|
|
17
|
+
* How far each avatar sits under the one before it — a CSS length, or a
|
|
18
|
+
* number of pixels. Left out it is a fraction of `size`, which keeps the
|
|
19
|
+
* overlap looking the same at every step.
|
|
20
|
+
*/
|
|
21
|
+
overlap?: number | string;
|
|
22
|
+
/** Passed to every avatar in the group. @default 'md' */
|
|
23
|
+
size?: NebaSize;
|
|
24
|
+
/** Passed to every avatar in the group. @default 'circle' */
|
|
25
|
+
shape?: AvatarShape;
|
|
26
|
+
/** Passed to every avatar in the group. @default 'text' */
|
|
27
|
+
variant?: NebaVariant;
|
|
28
|
+
/** Passed to every avatar in the group. @default 'primary' */
|
|
29
|
+
color?: NebaColor;
|
|
30
|
+
/** Passed to every avatar in the group. @default 0 */
|
|
31
|
+
elevation?: NebaElevation;
|
|
32
|
+
/** The avatars. */
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A stack of avatars, overlapping, with the ones that did not fit as a count.
|
|
37
|
+
*
|
|
38
|
+
* `size`, `shape`, `variant`, `color` and `elevation` are set once here rather
|
|
39
|
+
* than on every avatar — a stack whose fourth face is a size out is not a stack
|
|
40
|
+
* — and an avatar's own prop still wins, which is what lets one of them be
|
|
41
|
+
* marked out from the rest.
|
|
42
|
+
*
|
|
43
|
+
* The order is the DOM order, and the first avatar is on top: a stack read
|
|
44
|
+
* left to right is read front to back, so the one the group is *about* comes
|
|
45
|
+
* first rather than last.
|
|
46
|
+
*/
|
|
47
|
+
export declare const AvatarGroup: React.ForwardRefExoticComponent<AvatarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as r,jsxs as e}from"react/jsx-runtime";import*as a from"react";import{Avatar as t}from"../avatar/Avatar.js";import{AvatarGroupContext as i}from"../../internal/avatar-group.js";import{cx as n}from"../../internal/styles.js";const l={xs:"0.375rem",sm:"0.5rem",md:"0.625rem",lg:"0.75rem",xl:"0.875rem"};export const AvatarGroup=/*@__PURE__*/a.forwardRef(function({max:o,total:s,overlap:m,size:c="md",shape:v="circle",variant:p="text",color:f="primary",elevation:d=0,className:x,style:h,children:u,...g},j){const y=a.useMemo(()=>({size:c,shape:v,variant:p,color:f,elevation:d}),[c,v,p,f,d]),A=a.Children.toArray(u),M=void 0===o?A:A.slice(0,Math.max(0,o)),b=s??A.length,z=Math.max(0,b-M.length);return r(i.Provider,{value:y,children:e("div",{ref:j,className:n("isolate inline-flex items-center","[&>*:not(:first-child)]:[margin-inline-start:calc(var(--n-overlap)*-1)]","[&>*]:ring-2 [&>*]:ring-(--neba-surface)",x??""),style:{"--n-overlap":void 0===m?l[c]:"number"==typeof m?`${m}px`:m,...h},...g,children:[M,z>0?r(t,{initials:`+${z}`}):null]})})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{AvatarGroup}from"./AvatarGroup.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,Fragment as t,jsxs as m}from"react/jsx-runtime";import*as
|
|
1
|
+
"use client";import{jsx as e,Fragment as t,jsxs as m}from"react/jsx-runtime";import*as s from"react";import{controlSlots as n,cx as o,hasContent as a,srOnlyClasses as l,surfaceClasses as i,transitionClasses as r}from"../../internal/styles.js";const d={xs:"h-3.5 min-w-3.5",sm:"h-4 min-w-4",md:"h-4.5 min-w-4.5",lg:"h-5 min-w-5",xl:"h-6 min-w-6"},b={xs:"size-1.5",sm:"size-2",md:"size-2.5",lg:"size-2.5",xl:"size-3"},x={xs:"text-[0.5625rem]",sm:"text-[0.625rem]",md:"text-[0.6875rem]",lg:"text-[0.75rem]",xl:"text-[0.8125rem]"},p={default:{xs:"px-1",sm:"px-1",md:"px-1.5",lg:"px-1.5",xl:"px-2"},compact:{xs:"px-0.5",sm:"px-0.5",md:"px-1",lg:"px-1",xl:"px-1.5"}},c={xs:{badge:"-mt-1.5 -mb-1.5 -ms-1.5 -me-1.5",dot:"-mt-0.5 -mb-0.5 -ms-0.5 -me-0.5"},sm:{badge:"-mt-2 -mb-2 -ms-2 -me-2",dot:"-mt-1 -mb-1 -ms-1 -me-1"},md:{badge:"-mt-2 -mb-2 -ms-2 -me-2",dot:"-mt-1 -mb-1 -ms-1 -me-1"},lg:{badge:"-mt-2.5 -mb-2.5 -ms-2.5 -me-2.5",dot:"-mt-1 -mb-1 -ms-1 -me-1"},xl:{badge:"-mt-3 -mb-3 -ms-3 -me-3",dot:"-mt-1.5 -mb-1.5 -ms-1.5 -me-1.5"}},g={"top-start":"top-0 start-0","top-end":"top-0 end-0","bottom-start":"bottom-0 start-0","bottom-end":"bottom-0 end-0"},u={"top-start":"mt-[7%] ms-[7%]","top-end":"mt-[7%] me-[7%]","bottom-start":"mb-[7%] ms-[7%]","bottom-end":"mb-[7%] me-[7%]"},h={solid:[i,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[i,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-(--n-soft-press)"};export const Badge=/*@__PURE__*/s.forwardRef(function({variant:s="solid",size:i="md",color:f="primary",density:v="default",elevation:w=0,content:j,max:y=99,dot:z=!1,showZero:N=!1,invisible:k=!1,placement:$="top-end",overlap:q="square",label:B,className:F,style:R,children:Z,...A},C){const D=a(Z),E=!a(j)||0===j&&!N,G=z||E,H=k||E&&!z,I=o("pointer-events-none z-10 inline-flex shrink-0 items-center justify-center","font-semibold tabular-nums whitespace-nowrap","rounded-full",r,h[s],G?b[i]:[d[i],x[i],p[v][i]].join(" "),D?`absolute ${g[$]}`:"relative align-middle",D?G?c[i].dot:c[i].badge:"",D&&"circle"===q?u[$]:"",H?"invisible":"",F??""),J=function(e,t){return"number"==typeof e&&e>t?`${t}+`:e}(j,y),K=e("span",{ref:C,className:I,style:{...n(f,w,s),...R},"aria-hidden":!!H||void 0,...A,children:H?null:m(t,{children:[G||B?e("span",{className:l,children:B??J}):null,G?null:e("span",{"aria-hidden":!!B||void 0,children:J})]})});return D?m("span",{className:"relative inline-flex shrink-0 align-middle",children:[Z,K]}):K});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{boxPaddingClasses as n}from"../box/Box.js";import{transitionProps as a}from"../../internal/animate.js";import{
|
|
1
|
+
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{boxPaddingClasses as n}from"../box/Box.js";import{transitionProps as a}from"../../internal/animate.js";import{cx as l,hasContent as s,metaTextClasses as i,radiusClasses as o,surfaceClasses as c,surfaceSlots as m,transitionClasses as d}from"../../internal/styles.js";const x={xs:"text-[0.75rem]/[1.25rem]",sm:"text-[0.8125rem]/[1.375rem]",md:"text-[0.9375rem]/[1.625rem]",lg:"text-[1.0625rem]/[1.875rem]",xl:"text-[1.25rem]/[2.125rem]"},f={solid:[c,"bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[c,"border border-s-2 bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"bg-transparent"};function u(){return e("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e("path",{d:"M6.4 3.6c-2.3.9-3.7 2.8-3.7 5.1 0 2 1.2 3.3 2.8 3.3 1.4 0 2.5-1 2.5-2.4 0-1.3-.9-2.2-2.1-2.2-.2 0-.4 0-.6.1.3-1 1.1-1.8 2.2-2.3l-1.1-1.6ZM13.3 3.6c-2.3.9-3.7 2.8-3.7 5.1 0 2 1.2 3.3 2.8 3.3 1.4 0 2.5-1 2.5-2.4 0-1.3-.9-2.2-2.1-2.2-.2 0-.4 0-.6.1.3-1 1.1-1.8 2.2-2.3l-1.1-1.6Z",fill:"currentColor"})})}export const Blockquote=/*@__PURE__*/t.forwardRef(function({variant:t="text",size:c="md",color:b="primary",density:p="default",elevation:h=0,author:v,source:g,cite:j,icon:N,transition:y,className:w,style:k,children:z,...B},q){const M=a(y),Z=s(v)||s(g),C=void 0===N?e(u,{}):N,R=l("flex flex-col text-(--neba-fg)","border-s-2 [border-inline-start-color:var(--n-accent)]","text"===t?"":`${o[c]} rounded-s-none`,f[t],n[p][c],d,M.className,w??""),$=r("blockquote",{cite:j,className:x[c],children:[s(C)?e("span",{"aria-hidden":"true",className:"mb-1 block size-[2em] text-(--n-soft-press) [&>svg]:size-full",children:C}):null,z]}),A={...m(b,h),...M.style,...k};return Z?r("figure",{ref:q,className:R,style:A,...B,children:[$,r("figcaption",{className:["mt-2 flex flex-wrap items-baseline gap-x-1.5 text-(--neba-muted-fg)",i[c]].join(" "),children:[s(v)?r("span",{className:"font-medium text-(--neba-fg)",children:[e("span",{"aria-hidden":"true",children:"— "}),v]}):null,s(g)?e("cite",{className:"not-italic",children:g}):null]})]}):e("div",{ref:q,className:R,style:A,...B,children:$})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import*as e from"react";import{useRender as s}from"@base-ui/react/use-render";import{transitionProps as a}from"../../internal/animate.js";import{radiusClasses as o,surfaceClasses as
|
|
1
|
+
"use client";import*as e from"react";import{useRender as s}from"@base-ui/react/use-render";import{transitionProps as a}from"../../internal/animate.js";import{cx as t,radiusClasses as o,surfaceClasses as n,surfaceSlots as p,transitionClasses as l}from"../../internal/styles.js";const r=o;export const boxPaddingClasses={default:{xs:"p-2",sm:"p-3",md:"p-4",lg:"p-5",xl:"p-6"},compact:{xs:"p-1.5",sm:"p-2",md:"p-2.5",lg:"p-3",xl:"p-4"}};export const boxPaddingXClasses={default:{xs:"px-2",sm:"px-3",md:"px-4",lg:"px-5",xl:"px-6"},compact:{xs:"px-1.5",sm:"px-2",md:"px-2.5",lg:"px-3",xl:"px-4"}};export const boxPaddingYClasses={default:{xs:"py-2",sm:"py-3",md:"py-4",lg:"py-5",xl:"py-6"},compact:{xs:"py-1.5",sm:"py-2",md:"py-2.5",lg:"py-3",xl:"py-4"}};const x=["block",l].join(" "),d={solid:[n,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[n,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"};export const Box=/*@__PURE__*/e.forwardRef(function({variant:e="outline",size:o="md",color:n="primary",density:l="default",elevation:i=0,padded:m=!0,transition:c,render:b,className:g,style:y,children:f,...u},v){const h=a(c),j=t(x,r[o],m?boxPaddingClasses[l][o]:"",d[e],h.className,g??"");return s({render:b,ref:v,props:{className:j,style:{...p(n,i),...h.style,...y},children:f,...u}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{Button as t}from"@base-ui/react/button";import{useRender as a}from"@base-ui/react/use-render";import{ButtonGroupContext as l}from"../../internal/button-group.js";import{controlHeightClasses as s,controlSlots as i,controlSquareClasses as d,controlTextClasses as c,
|
|
1
|
+
"use client";import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import*as n from"react";import{Button as t}from"@base-ui/react/button";import{useRender as a}from"@base-ui/react/use-render";import{ButtonGroupContext as l}from"../../internal/button-group.js";import{controlHeightClasses as s,controlSlots as i,controlSquareClasses as d,controlTextClasses as c,cx as v,disabledClasses as p,focusRingClasses as x,gapClasses as b,iconClasses as u,paddingXClasses as m,pressTransitionClasses as g,radiusClasses as h,readOnlyFilterClasses as f,surfaceClasses as $,transitionClasses as y}from"../../internal/styles.js";const w={xs:`${s.xs} ${b.xs} ${h.xs} ${c.xs}`,sm:`${s.sm} ${b.sm} ${h.sm} ${c.sm}`,md:`${s.md} ${b.md} ${h.md} ${c.md}`,lg:`${s.lg} ${b.lg} ${h.lg} ${c.lg}`,xl:`${s.xl} ${b.xl} ${h.xl} ${c.xl}`},j={xs:`${d.xs} px-0`,sm:`${d.sm} px-0`,md:`${d.md} px-0`,lg:`${d.lg} px-0`,xl:`${d.xl} px-0`},k=["relative inline-flex shrink-0 select-none items-center justify-center","whitespace-nowrap align-middle font-medium leading-none","[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",y,g,x,u].join(" "),C={solid:[$,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[$,"border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--n-accent) bg-transparent"},P={solid:["hover:bg-(--n-fill-hover)","hover:[box-shadow:var(--n-elev-hover),var(--neba-plate-solid)]","active:bg-(--n-fill-active)","active:[box-shadow:var(--n-elev-press),var(--neba-plate-solid)]"].join(" "),outline:["hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)]","hover:[box-shadow:var(--n-elev-hover),var(--neba-plate-glass)]","active:bg-(--n-panel-press)","active:[box-shadow:var(--n-elev-press),var(--neba-plate-glass)]"].join(" "),text:"hover:bg-(--n-soft) active:bg-(--n-soft-hover)"},B={solid:[$,f,"cursor-default text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--neba-plate-solid)]"].join(" "),outline:[$,f,"cursor-default border text-(--n-accent) bg-(--n-panel)","[border-color:var(--n-line)] [box-shadow:var(--neba-plate-glass)]"].join(" "),text:`${f} cursor-default text-(--n-accent) bg-transparent`};function M(){return o("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",className:"animate-spin",children:[e("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2"}),e("path",{d:"M14.5 8A6.5 6.5 0 0 0 8 1.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}export const Button=/*@__PURE__*/n.forwardRef(function({variant:s,size:d,color:c,density:x,elevation:b,startIcon:u,endIcon:g,loading:h=!1,readOnly:f=!1,fullWidth:$=!1,disabled:y,render:N,className:W,style:z,children:E,onClick:I,onPointerMove:O,...A},D){const F=n.useContext(l),L=s??F?.variant??"solid",R=d??F?.size??"md",T=c??F?.color??"primary",X=x??F?.density??"default",Y=b??F?.elevation??0,q=y??F?.disabled??!1,G=h||f,H=v(k,w[R],null==E||!1===E?j[R]:m[X][R],q?p[L]:f?B[L]:C[L],q||G?"":[P[L],"neba-glow","cursor-pointer"].join(" "),h?"cursor-progress":"",$?"w-full":"",W??"");return a({render:N??e(t,{disabled:q}),ref:D,props:{className:H,style:{...i(T,Y,L),...z},"aria-disabled":G||void 0,"aria-busy":h||void 0,"data-loading":h||void 0,"data-readonly":f||void 0,onClick:e=>{if(G)return e.preventDefault(),void e.stopPropagation();I?.(e)},onPointerMove:e=>{if(!q&&!G){const o=e.currentTarget;o.style.setProperty("--n-mx",`${e.nativeEvent.offsetX}px`),o.style.setProperty("--n-my",`${e.nativeEvent.offsetY}px`)}O?.(e)},...A,children:o(r,{children:[h?e(M,{}):u,E,g]})}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import*as o from"react";import{ButtonGroupContext as i}from"../../internal/button-group.js";import{cx as n}from"../../internal/styles.js";const t={horizontal:"[&>*:not(:first-child)]:rounded-s-none [&>*:not(:last-child)]:rounded-e-none",vertical:"[&>*:not(:first-child)]:rounded-t-none [&>*:not(:last-child)]:rounded-b-none"},r={horizontal:"[&>*:not(:first-child)]:-ms-px",vertical:"[&>*:not(:first-child)]:-mt-px"},l=["inline-flex align-middle","[&>*]:relative [&>*:hover]:z-10 [&>*:focus-visible]:z-10","[&>*]:shrink-0"].join(" ");export const ButtonGroup=/*@__PURE__*/o.forwardRef(function({variant:s,size:a,color:d,density:c,elevation:f,orientation:u="horizontal",disabled:h,fullWidth:m=!1,className:v,children:p,...x},z){const b=o.useMemo(()=>({variant:s,size:a,color:d,density:c,elevation:f,disabled:h}),[s,a,d,c,f,h]);return e(i.Provider,{value:b,children:e("div",{ref:z,role:"group",className:n(l,"vertical"===u?"flex-col":"flex-row",t[u],"outline"===(s??"solid")?r[u]:"",m?"flex w-full [&>*]:flex-1":"",v??""),...x,children:p})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import*as
|
|
1
|
+
"use client";import{jsx as e,jsxs as l,Fragment as t}from"react/jsx-runtime";import*as s from"react";import{Box as n,boxPaddingXClasses as a,boxPaddingYClasses as r}from"../box/Box.js";import{cx as i,hasContent as c,metaTextClasses as o,sheetBodyClasses as d,sheetHeaderGapClasses as m,sheetSectionGapClasses as f,sheetTitleClasses as u}from"../../internal/styles.js";export const Card=/*@__PURE__*/s.forwardRef(function({size:s="md",density:x="default",title:h,subtitle:N,headerAction:p,footer:$,dividers:b=!1,className:v,children:y,...j},k){const g=a[x][s],w=r[x][s],z=b?`${g} ${w}`:g,A=c(h)||c(N)||c(p),B=l(t,{children:[c(h)||c(N)?l("div",{className:`flex min-w-0 flex-1 flex-col ${m[s]}`,children:[c(h)?e("div",{className:`neba-title font-semibold ${u[s]}`,children:h}):null,c(N)?e("div",{className:`text-(--neba-muted-fg) ${o[s]}`,children:N}):null]}):null,c(p)?e("div",{className:"ml-auto shrink-0",children:p}):null]}),C=[A?{key:"header",className:"flex items-start gap-3",content:B}:null,c(y)?{key:"content",className:d[s],content:y}:null,c($)?{key:"footer",className:`flex flex-wrap items-center gap-2 ${d[s]}`,content:$}:null].filter(e=>null!==e);return e(n,{ref:k,size:s,density:x,padded:!1,className:i("flex flex-col",b?"":`${w} ${f[s]}`,v??""),...j,children:C.map((l,t)=>e("div",{className:i(z,l.className,b&&t>0?"border-t [border-color:var(--n-line)]":""),children:l.content},l.key))})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{IconButton as n}from"../icon-button/IconButton.js";import{carouselMessages as a,fillMessage as o,useMessages as
|
|
1
|
+
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as t from"react";import{IconButton as n}from"../icon-button/IconButton.js";import{carouselMessages as a,fillMessage as o,useMessages as l}from"../../internal/i18n.js";import{ChevronIcon as i}from"../../internal/icons.js";import{usePrefersReducedMotion as s}from"../../internal/media.js";import{cx as c,radiusClasses as u,srOnlyClasses as d,surfaceClasses as f,surfaceSlots as m,transitionClasses as p}from"../../internal/styles.js";const b={solid:[f,"text-(--neba-fg) bg-(--n-panel-hover)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[f,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-transparent"},v={xs:"start-1 end-1",sm:"start-1.5 end-1.5",md:"start-2 end-2",lg:"start-3 end-3",xl:"start-4 end-4"},h={xs:{rest:"h-1 w-1",current:"h-1 w-3",gap:"gap-1"},sm:{rest:"h-1 w-1",current:"h-1 w-3.5",gap:"gap-1"},md:{rest:"h-1.5 w-1.5",current:"h-1.5 w-4",gap:"gap-1.5"},lg:{rest:"h-1.5 w-1.5",current:"h-1.5 w-5",gap:"gap-2"},xl:{rest:"h-2 w-2",current:"h-2 w-6",gap:"gap-2"}};export const Carousel=/*@__PURE__*/t.forwardRef(function({variant:f="outline",size:g="md",color:x="primary",density:w="default",elevation:j=0,value:y,defaultValue:N=0,onValueChange:k,loop:C=!0,autoPlay:M=!1,interval:R=5e3,arrows:I=!0,indicators:L=!0,locale:S,label:$,previousLabel:_,nextLabel:z,slideLabel:E,className:P,style:V,children:B,...T},W){const A=l(a,S),F=E??((e,r)=>o(A.slide,{index:String(e),total:String(r)})),q=t.Children.toArray(B),D=q.length,[G,H]=t.useState(N),J=Math.min(Math.max(y??G,0),Math.max(D-1,0)),K=t.useRef(null),O=t.useRef([]),Q=t.useRef(!1),U=t.useRef(!1),X=t.useRef(!1),[Y,Z]=t.useState(!1),ee=t.useCallback((e,r=!1)=>{if(0===D)return;const t=C?(e%D+D)%D:Math.min(Math.max(e,0),D-1);Q.current=r,void 0===y&&H(t),t!==J&&k?.(t)},[D,C,y,J,k]);t.useEffect(()=>{if(Q.current)return void(Q.current=!1);if(!U.current)return void(U.current=!0);O.current[J]?.scrollIntoView({block:"nearest",inline:"start"}),X.current=!0;const e=window.setTimeout(()=>{X.current=!1},700);return()=>window.clearTimeout(e)},[J]);const re=s();t.useEffect(()=>{if(!M||Y||re||D<2)return;const e=window.setInterval(()=>{document.hidden||ee(J+1)},R);return()=>window.clearInterval(e)},[M,Y,re,D,R,J,ee]);const te=J<=0,ne=J>=D-1;return r("div",{ref:W,role:"region","aria-roledescription":"carousel","aria-label":$??A.label,className:c("flex flex-col",P??""),style:{...m(x,j),...V},onPointerEnter:()=>Z(!0),onPointerLeave:()=>Z(!1),onFocus:()=>Z(!0),onBlur:()=>Z(!1),...T,children:[r("div",{className:["relative min-w-0 overflow-hidden",u[g],b[f],p].join(" "),children:[e("div",{ref:K,tabIndex:0,role:"group","aria-label":$??A.label,className:["flex min-w-0 snap-x snap-mandatory overflow-x-auto scroll-smooth","motion-reduce:scroll-auto","[scrollbar-width:none] [&::-webkit-scrollbar]:hidden","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:[outline-offset:-2px]"].join(" "),onScroll:()=>{const e=K.current;if(X.current||!e||0===e.clientWidth)return;const r=Math.round(Math.abs(e.scrollLeft)/e.clientWidth);r!==J&&r>=0&&r<D&&ee(r,!0)},children:q.map((r,t)=>e("div",{ref:e=>{O.current[t]=e},role:"group","aria-roledescription":"slide","aria-label":F(t+1,D),className:"w-full shrink-0 grow-0 basis-full snap-start",children:r},t))}),I&&D>1?r("div",{className:`pointer-events-none absolute inset-y-0 flex items-center ${v[g]}`,children:[e(n,{variant:"solid",size:g,color:x,density:w,elevation:1,label:_??A.previous,disabled:!C&&te,className:"pointer-events-auto",icon:e("span",{className:"flex items-center rotate-90 rtl:-rotate-90",children:e(i,{})}),onClick:()=>ee(J-1)}),e("span",{className:"flex-1"}),e(n,{variant:"solid",size:g,color:x,density:w,elevation:1,label:z??A.next,disabled:!C&&ne,className:"pointer-events-auto",icon:e("span",{className:"flex items-center -rotate-90 rtl:rotate-90",children:e(i,{})}),onClick:()=>ee(J+1)})]}):null]}),L&&D>1?e("div",{className:`flex shrink-0 items-center justify-center pt-2 ${h[g].gap}`,children:q.map((r,t)=>e("button",{type:"button","aria-label":F(t+1,D),"aria-current":t===J?"true":void 0,className:["cursor-pointer rounded-full","[transition-property:width,background-color]","[transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2",t===J?`${h[g].current} bg-(--n-accent)`:`${h[g].rest} bg-(--n-line-hover) hover:bg-(--n-accent)`].join(" "),onClick:()=>ee(t)},t))}):null,e("span",{className:d,"aria-live":M?"off":"polite",children:D>0?F(J+1,D):""})]})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as
|
|
1
|
+
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{chatMessages as l,useMessages as r}from"../../internal/i18n.js";import{CheckIcon as i,ClockIcon as t,DangerIcon as s,LinkIcon as o}from"../../internal/icons.js";import{safeRel as c}from"../../internal/link.js";import{controlSlots as d,cx as m,hasContent as p,metaTextClasses as u,radiusClasses as b,sheetBodyClasses as f,sheetHeaderGapClasses as v,srOnlyClasses as x,surfaceClasses as h,transitionClasses as g}from"../../internal/styles.js";const y={default:{xs:"px-2 py-1",sm:"px-2.5 py-1.5",md:"px-3 py-2",lg:"px-3.5 py-2.5",xl:"px-4 py-3"},compact:{xs:"px-1.5 py-0.5",sm:"px-2 py-1",md:"px-2.5 py-1.5",lg:"px-3 py-1.5",xl:"px-3.5 py-2"}},w={start:"[border-start-start-radius:0.25rem]",end:"[border-start-end-radius:0.25rem]"},k={solid:[h,"text-(--n-on-solid) bg-(--n-fill)","[box-shadow:var(--n-elev),var(--neba-plate-solid)]"].join(" "),outline:[h,"border text-(--neba-fg) bg-(--n-panel)","[border-color:var(--n-line)]","[box-shadow:var(--n-elev),var(--neba-plate-glass)]"].join(" "),text:"text-(--neba-fg) bg-(--n-soft) [box-shadow:var(--n-elev)]"};function N(){return n("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[e("path",{d:"m1.5 8.5 2.75 2.75L9.5 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M7 10.75 8.25 12l5.25-5.25",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})]})}const _={sending:e(t,{}),sent:e(i,{}),delivered:e(N,{}),read:e(N,{}),failed:e(s,{})},j={sending:"text-(--neba-muted-fg)",sent:"text-(--neba-muted-fg)",delivered:"text-(--neba-muted-fg)",read:"text-(--n-accent)",failed:"text-(--neba-danger-accent)"},C=["block overflow-hidden rounded-(--neba-radius-sm) border no-underline","[border-color:color-mix(in_oklab,currentColor_18%,transparent)]","[background-color:color-mix(in_oklab,currentColor_7%,transparent)]","hover:[background-color:color-mix(in_oklab,currentColor_12%,transparent)]","[transition-property:background-color] [transition-duration:var(--neba-duration)]","[transition-timing-function:var(--neba-ease)]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),L=["shrink-0 opacity-0","[transition:opacity_var(--neba-duration)_var(--neba-ease)]","group-hover/bubble:opacity-100 group-focus-within/bubble:opacity-100","[@media(hover:none)]:opacity-100"].join(" ");export const ChatBubble=/*@__PURE__*/a.forwardRef(function({side:a="start",name:i,time:t,avatar:s,status:o,statusLabel:c,typing:h=!1,media:N,preview:C,actions:W,locale:M,variant:R="outline",size:T="md",color:$="primary",density:q="default",elevation:A=0,className:D,style:E,children:F,...G},H){const I=r(l,M),J="end"===a,K=p(i)||p(t),O=h||p(F)||Boolean(C),P=["flex min-w-0 flex-col overflow-hidden",b[T],w[a],k[R],g].join(" "),Q=o?c??I[o]:"";return n("div",{ref:H,className:m("group/bubble flex w-full items-start gap-2",J?"flex-row-reverse":"",D??""),style:{...d($,A,R),...E},...G,children:[p(s)?e("div",{className:"shrink-0",children:s}):null,n("div",{className:["flex min-w-0 max-w-[min(100%,32rem)] flex-col",v[T],J?"items-end":"items-start"].join(" "),children:[K?n("div",{className:`flex items-baseline gap-2 ${u[T]}`,children:[p(i)?e("span",{className:"font-semibold",children:i}):null,p(t)?e("span",{className:"text-(--neba-muted-fg)",children:t}):null]}):null,n("div",{className:"flex min-w-0 items-center gap-1 "+(J?"flex-row-reverse":""),children:[n("div",{className:P,children:[p(N)?e("div",{className:"[&_img]:block [&_img]:w-full [&_video]:block [&_video]:w-full",children:N}):null,O?n("div",{className:[y[q][T],"flex min-w-0 flex-col gap-2",f[T]].join(" "),children:[h?e(z,{label:I.typing}):p(F)?e("div",{className:"min-w-0 break-words whitespace-pre-line",children:F}):null,C?e(B,{preview:C}):null]}):null]}),p(W)?e("div",{className:L,children:W}):null]}),o?n("div",{className:["flex items-center gap-1",u[T],j[o],"[&_svg]:size-[1.15em] [&_svg]:shrink-0"].join(" "),children:[_[o],e("span",{className:x,children:Q})]}):null]})]})});function z({label:a}){return n("div",{className:"flex items-center gap-1 py-[0.35em]",role:"status",children:[[0,1,2].map(n=>e("span",{"aria-hidden":"true",className:"neba-typing-dot size-[0.45em] rounded-full",style:{"--n-i":n}},n)),e("span",{className:x,children:a})]})}function B({preview:a}){const{url:l,title:r,description:i,image:t,site:s,newTab:d=!1}=a,m=d?"_blank":void 0;return n("a",{href:l,target:m,rel:c(m,void 0),className:C,children:[t?e("img",{src:t,alt:"",loading:"lazy",decoding:"async",className:"block h-28 w-full object-cover"}):null,n("div",{className:"flex flex-col gap-0.5 p-2",children:[p(s)?n("span",{className:"flex items-center gap-1 text-[0.85em] opacity-70 [&_svg]:size-[1em] [&_svg]:shrink-0",children:[e(o,{}),e("span",{className:"truncate",children:s})]}):null,p(r)?e("span",{className:"font-semibold",children:r}):null,p(i)?e("span",{className:"line-clamp-2 text-[0.9em] opacity-80",children:i}):null]})]})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as
|
|
1
|
+
"use client";import{jsx as e,jsxs as n}from"react/jsx-runtime";import*as a from"react";import{Checkbox as r}from"@base-ui/react/checkbox";import{Field as i}from"@base-ui/react/field";import{controlTextClasses as t,cx as l,hitAreaClasses as o,metaTextClasses as s,surfaceClasses as c,tickRadiusClasses as d,tickRowLeadingClasses as b,tickSizeClasses as h,transitionClasses as f}from"../../internal/styles.js";const m=["relative inline-flex shrink-0 items-center justify-center border",o,"[-webkit-tap-highlight-color:transparent] [touch-action:manipulation]",f,"active:[transition-duration:0ms]","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-2"].join(" "),u=[c,"cursor-pointer bg-(--n-panel) [border-color:var(--n-line)]","hover:bg-(--n-panel-hover) hover:[border-color:var(--n-line-hover)]","data-[checked]:bg-(--n-fill) data-[checked]:text-(--n-on-solid)","data-[checked]:[border-color:transparent]","data-[checked]:hover:bg-(--n-fill-hover)","data-[indeterminate]:bg-(--n-fill) data-[indeterminate]:text-(--n-on-solid)","data-[indeterminate]:[border-color:transparent]"].join(" "),v=[c,"cursor-default bg-(--n-panel) [border-color:var(--n-line)]","[filter:saturate(0.55)]","data-[checked]:bg-(--n-fill) data-[checked]:text-(--n-on-solid)","data-[checked]:[border-color:transparent]"].join(" "),p=["cursor-not-allowed bg-transparent [border-color:var(--neba-disabled-border)]","text-(--neba-disabled-fg) shadow-none","data-[checked]:bg-(--neba-disabled-bg)","data-[indeterminate]:bg-(--neba-disabled-bg)"].join(" ");function g(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2 6.2 4.6 8.8 10 3.4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function x(){return e("svg",{viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"size-full",children:e("path",{d:"M2.5 6h7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}export const Checkbox=/*@__PURE__*/a.forwardRef(function({size:a="md",color:o="primary",label:c,description:f,error:k,invalid:j,disabled:N=!1,readOnly:$=!1,className:y,style:w,...z},C){const L=null!=k&&!1!==k&&""!==k,R=j??L,B=R?"danger":o,M={"--n-fill":`var(--neba-${B}-fill)`,"--n-fill-hover":`var(--neba-${B}-fill-hover)`,"--n-on-solid":`var(--neba-${B}-on-solid)`,"--n-accent":`var(--neba-${B}-accent)`,"--n-panel":"var(--neba-panel)","--n-panel-hover":"var(--neba-panel-hover)","--n-line":`var(--neba-${B}-line)`,"--n-line-hover":`var(--neba-${B}-line-hover)`,"--n-ring":`var(--neba-${B}-ring)`},O=[m,h[a],d[a],N?p:$?v:u].join(" ");return n(i.Root,{disabled:N,invalid:R,className:l("inline-flex flex-col gap-1 align-top",y??""),style:{...M,...w},children:[n("div",{className:`flex items-start gap-2 ${t[a]} ${b}`,children:[e("span",{className:"flex h-[1lh] shrink-0 items-center",children:e(r.Root,{ref:C,className:O,disabled:N,readOnly:$,...z,children:e(r.Indicator,{className:"flex size-[70%] items-center justify-center",children:z.indeterminate?e(x,{}):e(g,{})})})}),c||f?n("span",{className:"flex min-w-0 flex-col gap-0.5",children:[c?e(i.Label,{className:["leading-[1.4]",N?"text-(--neba-disabled-fg)":"cursor-pointer text-(--neba-fg)"].join(" "),children:c}):null,f?e(i.Description,{className:`${s[a]} text-(--neba-muted-fg)`,children:f}):null]}):null]}),e(i.Error,L?{match:!0,className:`${s[a]} text-(--n-accent)`,children:k}:{className:`${s[a]} text-(--n-accent)`})]})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as l from"react";import{Combobox as
|
|
1
|
+
"use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as l from"react";import{Combobox as t}from"@base-ui/react/combobox";import{Field as n}from"@base-ui/react/field";import{Chip as i}from"../chip/Chip.js";import{actionMessages as r,comboboxMessages as s,fillMessage as o,useMessages as c}from"../../internal/i18n.js";import{CheckIcon as d,ChevronIcon as m,CloseIcon as u,PlusIcon as p}from"../../internal/icons.js";import{chipRemoveClasses as h,controlHeightClasses as b,controlTextLeadingClasses as f,cx as g,disabledClasses as x,fieldReadOnlyClasses as v,fieldRestClasses as y,focusWithinRingClasses as w,gapClasses as N,hasContent as C,iconClasses as j,metaTextClasses as L,paddingXClasses as $,radiusClasses as I,stackGapClasses as S,surfaceClasses as O,surfaceSlots as V,transitionClasses as _}from"../../internal/styles.js";const z=["group relative flex w-full cursor-text items-center","[-webkit-tap-highlight-color:transparent]",_,"focus-within:[transition-duration:0ms]",w,j].join(" "),A={xs:"min-h-5.5 py-0",sm:"min-h-6.5 py-[2px]",md:"min-h-8 py-[3px]",lg:"min-h-10 py-[4px]",xl:"min-h-12 py-[4px]"},M=[O,"max-h-[min(20rem,var(--available-height))] overflow-y-auto overscroll-contain","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(" "),k=["relative flex cursor-pointer items-center gap-2 select-none","rounded-(--neba-radius-xs) py-1.5 pe-2 ps-7",_,"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(" "),R=["inline-flex h-[1lh] shrink-0 cursor-pointer items-center justify-center","rounded-(--neba-radius-xs) text-(--neba-muted-fg)","[transition:color_var(--neba-duration)_var(--neba-ease)]","hover:text-(--n-accent)","focus-visible:[outline:2px_solid_var(--n-ring)] focus-visible:outline-offset-1","disabled:cursor-not-allowed disabled:text-(--neba-disabled-fg)"].join(" ");function T(e){return null==e?[]:Array.isArray(e)?e.slice():[e]}export function Combobox({variant:w="outline",size:j="md",color:O="primary",density:_="default",elevation:q=0,items:E,multiple:F,value:P,defaultValue:D,onValueChange:G,onInputValueChange:H,allowCustom:W=!0,customLabel:B,clearable:J=!1,locale:K,emptyMessage:Q,limit:U,placeholder:X,label:Y,description:Z,error:ee,invalid:ae,startIcon:le,fullWidth:te=!1,disabled:ne=!1,readOnly:ie=!1,required:re=!1,name:se,open:oe,defaultOpen:ce,onOpenChange:de,clearLabel:me,removeLabel:ue,inputRef:pe,id:he,className:be,style:fe,...ge}){const xe=c(s,K),ve=c(r,K),ye=ue??(e=>o(xe.remove,{label:e})),we=C(ee),Ne=ae??we,Ce=Ne?"danger":O,je=!0===F,Le=l.useMemo(()=>E.map(e=>({value:e.value,label:e.label??String(e.value),disabled:e.disabled})),[E]),[$e,Ie]=l.useState(()=>T(D)),Se=void 0===P?$e:T(P),[Oe,Ve]=l.useState(""),_e=l.useMemo(()=>new Map(Le.map(e=>[e.value,e])),[Le]),ze=l.useCallback(e=>_e.get(e)??{value:e,label:String(e),custom:!0},[_e]),Ae=Oe.trim(),Me=Ae.toLocaleLowerCase(),ke=""===Ae||Le.some(e=>e.label.toLocaleLowerCase()===Me||String(e.value).toLocaleLowerCase()===Me)||Se.some(e=>String(e).toLocaleLowerCase()===Me),Re=!W||ie||ne||ke?null:Ae,Te=l.useMemo(()=>null===Re?Le:[...Le,{value:Re,label:Re,custom:!0}],[Le,Re]),qe=je?Se.map(ze):Se.length>0?ze(Se[0]):null;const Ee=$[_][j],Fe=[z,f[j],I[j],N[j],je?A[j]:b[j],`${Ee} pe-1.5`,ne?x[w]:ie?v[w]:y[w]].join(" "),Pe=["min-w-0 flex-1 self-stretch 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"].join(" "),De=a=>e(t.Input,{ref:pe,placeholder:X,className:je?`${Pe} min-w-16 ${a?"ms-1.5":""}`:Pe});return a(n.Root,{disabled:ne,invalid:Ne,className:g("flex-col align-top",S[j],te?"flex w-full":"inline-flex",be??""),style:{...V(Ce,q),...fe},...ge,children:[Y?e(n.Label,{className:[L[j],"font-medium",ne?"text-(--neba-disabled-fg)":"text-(--neba-fg)"].join(" "),children:Y}):null,a(t.Root,{id:he,name:se,items:Te,multiple:je,value:qe,onValueChange:e=>{!function(e){void 0===P&&Ie(e),G?.(je?e:e[0]??null)}((null===e?[]:Array.isArray(e)?e:[e]).map(e=>e.value))},onInputValueChange:e=>{Ve(e),H?.(e)},open:oe,defaultOpen:ce,onOpenChange:e=>de?.(e),autoHighlight:!0,itemToStringLabel:e=>e.label,itemToStringValue:e=>String(e.value),isItemEqualToValue:(e,a)=>e.value===a.value,limit:U,disabled:ne,readOnly:ie,required:re,children:[a(t.InputGroup,{className:Fe,children:[le?e("span",{className:"flex h-[1lh] shrink-0 items-center text-(--neba-muted-fg)",children:le}):null,je?e(t.Chips,{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1",children:e(t.Value,{children:n=>a(l.Fragment,{children:[n.map(a=>e(t.Chip,{render:e(i,{variant:"outline",size:j,color:Ce,density:"compact",disabled:ne,endIcon:ie||ne?null:e(t.ChipRemove,{"aria-label":ye(a.label),className:h,children:e(u,{})})}),children:a.label},String(a.value))),De(n.length>0)]})})}):De(!1),J&&!ie?e(t.Clear,{"aria-label":me??ve.clear,className:R,children:e(u,{})}):null,e(t.Trigger,{"aria-label":"string"==typeof Y?void 0:"Open",className:R,children:e(t.Icon,{className:["flex items-center","[transition:rotate_var(--neba-duration)_var(--neba-ease)]","data-[popup-open]:rotate-180"].join(" "),children:e(m,{})})})]}),e(t.Portal,{children:e(t.Positioner,{className:"neba-portal z-50 [outline:none]",sideOffset:6,children:a(t.Popup,{className:`${M} ${I[j]} ${f[j]}`,style:V(Ce,3),children:[e(t.Empty,{className:"px-2 py-1.5 text-(--neba-muted-fg) empty:hidden",children:Q??xe.empty}),e(t.List,{children:n=>e(t.Item,{value:n,disabled:n.disabled,className:k,children:n.custom?a(l.Fragment,{children:[e("span",{className:"absolute start-1.5 flex size-4 items-center justify-center text-(--n-accent) [&_svg]:size-4",children:e(p,{})}),e("span",{className:"truncate",children:B?B(n.label):`Add “${n.label}”`})]}):a(l.Fragment,{children:[e(t.ItemIndicator,{className:"absolute start-1.5 flex size-4 items-center justify-center",children:e(d,{})}),e("span",{className:"truncate",children:n.label})]})},`${n.custom?"custom:":""}${String(n.value)}`)})]})})})]}),Z?e(n.Description,{className:`${L[j]} text-(--neba-muted-fg)`,children:Z}):null,e(n.Error,we?{match:!0,className:`${L[j]} text-(--n-accent)`,children:ee}:{className:`${L[j]} text-(--n-accent)`})]})}
|