barua-ui 0.4.2 → 0.6.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/css/base.css +4 -1
- package/css/components/content.css +16 -1
- package/css/components/feedback.css +9 -0
- package/css/components/overlays.css +17 -0
- package/css/utilities.css +131 -0
- package/dist/index.cjs +306 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -4
- package/dist/index.d.ts +46 -4
- package/dist/index.js +300 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, ButtonHTMLAttributes, AnchorHTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, DialogHTMLAttributes, SVGProps, ElementType, TableHTMLAttributes, ImgHTMLAttributes } from 'react';
|
|
2
|
+
import { ReactNode, ButtonHTMLAttributes, AnchorHTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, DialogHTMLAttributes, SVGProps, ElementType, TableHTMLAttributes, ImgHTMLAttributes, RefObject } from 'react';
|
|
3
3
|
|
|
4
4
|
type BaruaTheme = "auto" | "light" | "dark";
|
|
5
5
|
type BaruaAccent = "blue" | "indigo" | "purple" | "pink" | "teal" | "green";
|
|
@@ -340,12 +340,12 @@ declare function Breadcrumbs({ items, className, ...rest }: {
|
|
|
340
340
|
items: Crumb[];
|
|
341
341
|
} & HTMLAttributes<HTMLElement>): react.JSX.Element;
|
|
342
342
|
|
|
343
|
-
declare const iconNames: readonly ["arrow-up-right", "
|
|
343
|
+
declare const iconNames: readonly ["archive", "arrow-left", "arrow-up-right", "badge-check", "bell", "bolt", "bookmark", "calendar", "camera", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "code", "copy", "display", "doc", "download", "drop", "ellipsis", "ellipsis-vertical", "envelope-open", "eye", "eye-off", "film", "filter", "flame", "folder", "forward", "garage", "gear", "gift", "globe", "grid", "heart", "house", "image-off", "info", "key", "lightbulb", "link", "lock", "mail", "menu", "message", "mic", "moon-stars", "music-note", "newspaper", "paperclip", "pause", "pencil", "people", "person", "person-plus", "photo", "pin", "play", "plus", "power", "refresh", "repeat", "reply", "reply-all", "search", "send", "share", "shield", "skip-back", "skip-forward", "sliders", "sparkles", "speaker", "star", "sun", "trash", "tv", "upload", "warning", "waveform", "wifi"];
|
|
344
344
|
type IconName = (typeof iconNames)[number];
|
|
345
345
|
interface IconProps extends Omit<SVGProps<SVGSVGElement>, "name"> {
|
|
346
346
|
name: IconName;
|
|
347
347
|
/** Matches the .b-icon size scale. */
|
|
348
|
-
size?: "sm" | "md" | "lg" | "xl";
|
|
348
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
349
349
|
/** Give the icon a label when it carries meaning on its own. */
|
|
350
350
|
title?: string;
|
|
351
351
|
}
|
|
@@ -1184,7 +1184,49 @@ interface ContextMenuTargetProps extends HTMLAttributes<HTMLElement> {
|
|
|
1184
1184
|
/** Right-click, or long-press, opens the named menu at the pointer. */
|
|
1185
1185
|
declare const ContextMenuTarget: react.ForwardRefExoticComponent<ContextMenuTargetProps & react.RefAttributes<HTMLElement>>;
|
|
1186
1186
|
|
|
1187
|
+
type ScrollGeometry = {
|
|
1188
|
+
x: number;
|
|
1189
|
+
y: number;
|
|
1190
|
+
width: number;
|
|
1191
|
+
height: number;
|
|
1192
|
+
contentWidth: number;
|
|
1193
|
+
contentHeight: number;
|
|
1194
|
+
/** 0 at the start, 1 at the end; 0 when there is nothing to scroll. */
|
|
1195
|
+
progressX: number;
|
|
1196
|
+
progressY: number;
|
|
1197
|
+
};
|
|
1198
|
+
/**
|
|
1199
|
+
* onScrollGeometryChange. Pass a ref to a scroll container, or nothing for
|
|
1200
|
+
* the page. Reads are coalesced to one per frame.
|
|
1201
|
+
*/
|
|
1202
|
+
declare function useScrollGeometry(ref?: RefObject<HTMLElement | null>, onChange?: (geometry: ScrollGeometry) => void): ScrollGeometry | null;
|
|
1203
|
+
/** onScrollVisibilityChange: true once this much of the element is on screen. */
|
|
1204
|
+
declare function useVisible(ref: RefObject<Element | null>, { threshold }?: {
|
|
1205
|
+
threshold?: number;
|
|
1206
|
+
}): boolean;
|
|
1207
|
+
type SnapPosition = {
|
|
1208
|
+
/** The id of the child in view, or null when it has none. */
|
|
1209
|
+
id: string | null;
|
|
1210
|
+
index: number;
|
|
1211
|
+
/** Scroll to a child by id or index. */
|
|
1212
|
+
to: (target: string | number) => void;
|
|
1213
|
+
};
|
|
1214
|
+
/** scrollPosition(id:): which snap child a scrolling container is showing. */
|
|
1215
|
+
declare function useSnapPosition(ref: RefObject<HTMLElement | null>): SnapPosition;
|
|
1216
|
+
type HapticKind = "selection" | "impact" | "success" | "warning" | "error";
|
|
1217
|
+
/**
|
|
1218
|
+
* sensoryFeedback. Android vibrates; iPhone Safari has no vibration API but
|
|
1219
|
+
* plays the system haptic when a switch toggles, so one is toggled off
|
|
1220
|
+
* screen. Returns false where nothing could be felt.
|
|
1221
|
+
*/
|
|
1222
|
+
declare function haptic(kind?: HapticKind): boolean;
|
|
1223
|
+
/**
|
|
1224
|
+
* customizationID: state that survives a reload, under a key. Shares its
|
|
1225
|
+
* storage with barua.js's data-b-persist, so the two can hand over.
|
|
1226
|
+
*/
|
|
1227
|
+
declare function usePersistedState<T>(key: string, initial: T): [T, (value: T | ((prev: T) => T)) => void];
|
|
1228
|
+
|
|
1187
1229
|
/** Join class names, skipping falsy values. */
|
|
1188
1230
|
declare function cn(...parts: Array<string | false | null | undefined>): string;
|
|
1189
1231
|
|
|
1190
|
-
export { Accordion, Account, type AccountProps, AccountSwitcher, ActionSheet, type ActionSheetAction, Alert, AlertDialog, type AlertDialogAction, type AlertProps, AppGrid, AppTile, AreaChart, AsyncImage, type AsyncImageProps, Audio, Auth, AuthCard, type AuthCardProps, Avatar, AvatarGroup, type AvatarProps, Axis, type AxisProps, BackButton, Badge, type BadgeProps, Banner, type BannerProps, Bars, type BarsProps, type BaruaAccent, BaruaProvider, type BaruaProviderProps, type BaruaTheme, Bento, Billboard, BillboardActions, BillboardArt, BillboardBody, BillboardLede, BillboardScrim, BillboardTitle, type BlockProps, BottomNav, BottomNavItem, BottomSheet, Breadcrumbs, BulkActions, Button, ButtonGroup, type ButtonGroupProps, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, CalendarDay, type CalendarDayProps, CalendarGrid, CalendarHeader, CalendarMonth, CalendarView, CalendarViewCell, CalendarViewHead, CalendarWeekday, Callout, Card, CardBody, CardEyebrow, CardFooter, CardGrid, CardHeader, type CardProps, CardRail, CardSubtitle, CardTitle, Carousel, CarouselDots, CarouselSlide, CarouselTrack, Chapter, type ChapterProps, Chart, ChartTip, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, type CircularProgressProps, CodeBlock, type CodeBlockProps, Columns, type ColumnsProps, Combobox, ComboboxEmpty, ComboboxList, ComboboxOption, type ComboboxOptionProps, CommandCenter, CommandCenterLabel, CommandCenterStatus, CommandCenterTile, CommandFooter, CommandGroupLabel, CommandInput, CommandItem, type CommandItemProps, CommandList, CommandPalette, type CommandPaletteProps, Container, type ContainerProps, ContextMenuTarget, type ContextMenuTargetProps, CountUp, type CountUpProps, type Crumb, Dashboard, DataGrid, DatePicker, DescriptionList, type DescriptionListProps, Disclosure, type DisclosureProps, Divider, type DividerProps, Dock, DockItem, DockTray, Donut, type DonutProps, type DonutSlice, DragHandle, Drawer, DrawerBody, DrawerHeader, type DrawerProps, Dropdown, type DropdownProps, Dropzone, type DropzoneProps, EmptyState, ErrorText, Event, type EventProps, Fab, type FabProps, FeatureRow, type FeatureRowProps, Feed, Field, type FieldProps, Fieldset, Figure, type FigureProps, FileBrowser, FileGrid, FileTile, type FileTileProps, FilterBar, FilterChip, type FilterChipProps, FitText, type FitTextProps, Footnote, Footnotes, Form, FormActions, FormRow, FormSection, type FormSectionProps, Gallery, Gantt, GanttBar, GanttRow, Gauge, type GaugeProps, GlassContainer, GlassInteractive, Grid, GridLines, type GridProps, GroupBox, Grow, HStack, Heatmap, Help, Hero, type HeroProps, HoverCard, HoverCardHost, Icon, type IconName, type IconProps, IconTile, type IconTileProps, ImageLens, ImageViewer, ImageViewerBar, Input, InputGroup, type InputGroupProps, type InputProps, Inspector, Kanban, KanbanColumn, type KanbanColumnProps, KanbanList, Kbd, Label, type LabelProps, Labeled, Landing, Legend, type LegendItem, type LegendProps, Lightbox, type LightboxProps, LineChart, LinearGauge, Link, LinkGroup, LiquidToggle, type LiquidToggleProps, List, ListFooter, ListHeader, ListItem, type ListItemProps, type ListProps, Log, MarketingNav, MarketingNavBrand, MarketingNavLinks, MediaPlaceholder, Menu, MenuBar, MenuBarItem, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, Modal, type ModalProps, type NavLinkProps, Notification, Onboarding, OnboardingFeature, type OnboardingFeatureProps, OnboardingHero, Optional, OtpInput, type OtpInputProps, Overline, Pagination, PaginationEllipsis, PaginationItem, type PaginationItemProps, type PaginationProps, PillNav, Popover, type PopoverProps, Poster, PosterFacts, PosterFrame, PosterGrid, PosterInitial, PosterMeta, PosterTitle, Progress, type ProgressProps, PromoBand, type PromoBandProps, Quote, type QuoteProps, RadarChart, Radio, Rail, RailItem, type RailProps, Range, type RangeProps, Resizable, ResizeHandle, Result, type ResultProps, Reveal, type RevealProps, type RevealVariant, SafeArea, ScatterChart, ScrollArea, type ScrollAreaProps, SearchField, SearchResult, type SearchResultProps, SearchResults, Section, Segmented, type SegmentedOption, Select, SelectionCount, Share, Sheet, Sidebar, SidebarGroup, SidebarHeading, SidebarItem, type SidebarItemProps, type SidebarProps, SiteFooter, SiteFooterGroup, SiteFooterGroups, SiteFooterHeading, SiteFooterLegal, Skeleton, SkipLink, Slider, SortControl, Spacer, Span, type SpanProps, Sparkline, type SparklineProps, SpecStrip, Spinner, Split, SplitButton, type SplitButtonProps, Stack, type StackProps, Stage, Stat, StatusBar, StatusBarItem, StatusDot, type Step, StepperInput, type StepperInputProps, Steps, type StepsProps, StoryCard, Swatch, Swatches, Switch, type SwitchProps, SysPage, type SysPageProps, type TabItem, TabPanel, Table, TableNum, type TableProps, TableSortHeader, TableWrap, Tabs, Tag, Task, TaskList, type TaskProps, TaskRow, Text, type TextProps, type TextRole, Textarea, ThemeScript, Thumb, type ThumbProps, Timeline, type TimelineEntry, type TimelineProps, Tip, type ToastOptions, ToastProvider, type ToastVariant, ToggleButton, type ToggleButtonProps, Toolbar, Tooltip, TopNav, TopNavBrand, TopNavLink, TopNavLinks, Tree, TreeItem, type TreeItemProps, Upload, UploadItem, type UploadItemProps, UploadPreview, UploadPreviews, VStack, Video, Wall, Waveform, Web, Workspace, WorkspaceMain, block, buttonClasses, cn, iconNames, useBaruaTheme, useToast };
|
|
1232
|
+
export { Accordion, Account, type AccountProps, AccountSwitcher, ActionSheet, type ActionSheetAction, Alert, AlertDialog, type AlertDialogAction, type AlertProps, AppGrid, AppTile, AreaChart, AsyncImage, type AsyncImageProps, Audio, Auth, AuthCard, type AuthCardProps, Avatar, AvatarGroup, type AvatarProps, Axis, type AxisProps, BackButton, Badge, type BadgeProps, Banner, type BannerProps, Bars, type BarsProps, type BaruaAccent, BaruaProvider, type BaruaProviderProps, type BaruaTheme, Bento, Billboard, BillboardActions, BillboardArt, BillboardBody, BillboardLede, BillboardScrim, BillboardTitle, type BlockProps, BottomNav, BottomNavItem, BottomSheet, Breadcrumbs, BulkActions, Button, ButtonGroup, type ButtonGroupProps, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, CalendarDay, type CalendarDayProps, CalendarGrid, CalendarHeader, CalendarMonth, CalendarView, CalendarViewCell, CalendarViewHead, CalendarWeekday, Callout, Card, CardBody, CardEyebrow, CardFooter, CardGrid, CardHeader, type CardProps, CardRail, CardSubtitle, CardTitle, Carousel, CarouselDots, CarouselSlide, CarouselTrack, Chapter, type ChapterProps, Chart, ChartTip, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, type CircularProgressProps, CodeBlock, type CodeBlockProps, Columns, type ColumnsProps, Combobox, ComboboxEmpty, ComboboxList, ComboboxOption, type ComboboxOptionProps, CommandCenter, CommandCenterLabel, CommandCenterStatus, CommandCenterTile, CommandFooter, CommandGroupLabel, CommandInput, CommandItem, type CommandItemProps, CommandList, CommandPalette, type CommandPaletteProps, Container, type ContainerProps, ContextMenuTarget, type ContextMenuTargetProps, CountUp, type CountUpProps, type Crumb, Dashboard, DataGrid, DatePicker, DescriptionList, type DescriptionListProps, Disclosure, type DisclosureProps, Divider, type DividerProps, Dock, DockItem, DockTray, Donut, type DonutProps, type DonutSlice, DragHandle, Drawer, DrawerBody, DrawerHeader, type DrawerProps, Dropdown, type DropdownProps, Dropzone, type DropzoneProps, EmptyState, ErrorText, Event, type EventProps, Fab, type FabProps, FeatureRow, type FeatureRowProps, Feed, Field, type FieldProps, Fieldset, Figure, type FigureProps, FileBrowser, FileGrid, FileTile, type FileTileProps, FilterBar, FilterChip, type FilterChipProps, FitText, type FitTextProps, Footnote, Footnotes, Form, FormActions, FormRow, FormSection, type FormSectionProps, Gallery, Gantt, GanttBar, GanttRow, Gauge, type GaugeProps, GlassContainer, GlassInteractive, Grid, GridLines, type GridProps, GroupBox, Grow, HStack, type HapticKind, Heatmap, Help, Hero, type HeroProps, HoverCard, HoverCardHost, Icon, type IconName, type IconProps, IconTile, type IconTileProps, ImageLens, ImageViewer, ImageViewerBar, Input, InputGroup, type InputGroupProps, type InputProps, Inspector, Kanban, KanbanColumn, type KanbanColumnProps, KanbanList, Kbd, Label, type LabelProps, Labeled, Landing, Legend, type LegendItem, type LegendProps, Lightbox, type LightboxProps, LineChart, LinearGauge, Link, LinkGroup, LiquidToggle, type LiquidToggleProps, List, ListFooter, ListHeader, ListItem, type ListItemProps, type ListProps, Log, MarketingNav, MarketingNavBrand, MarketingNavLinks, MediaPlaceholder, Menu, MenuBar, MenuBarItem, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, Modal, type ModalProps, type NavLinkProps, Notification, Onboarding, OnboardingFeature, type OnboardingFeatureProps, OnboardingHero, Optional, OtpInput, type OtpInputProps, Overline, Pagination, PaginationEllipsis, PaginationItem, type PaginationItemProps, type PaginationProps, PillNav, Popover, type PopoverProps, Poster, PosterFacts, PosterFrame, PosterGrid, PosterInitial, PosterMeta, PosterTitle, Progress, type ProgressProps, PromoBand, type PromoBandProps, Quote, type QuoteProps, RadarChart, Radio, Rail, RailItem, type RailProps, Range, type RangeProps, Resizable, ResizeHandle, Result, type ResultProps, Reveal, type RevealProps, type RevealVariant, SafeArea, ScatterChart, ScrollArea, type ScrollAreaProps, type ScrollGeometry, SearchField, SearchResult, type SearchResultProps, SearchResults, Section, Segmented, type SegmentedOption, Select, SelectionCount, Share, Sheet, Sidebar, SidebarGroup, SidebarHeading, SidebarItem, type SidebarItemProps, type SidebarProps, SiteFooter, SiteFooterGroup, SiteFooterGroups, SiteFooterHeading, SiteFooterLegal, Skeleton, SkipLink, Slider, type SnapPosition, SortControl, Spacer, Span, type SpanProps, Sparkline, type SparklineProps, SpecStrip, Spinner, Split, SplitButton, type SplitButtonProps, Stack, type StackProps, Stage, Stat, StatusBar, StatusBarItem, StatusDot, type Step, StepperInput, type StepperInputProps, Steps, type StepsProps, StoryCard, Swatch, Swatches, Switch, type SwitchProps, SysPage, type SysPageProps, type TabItem, TabPanel, Table, TableNum, type TableProps, TableSortHeader, TableWrap, Tabs, Tag, Task, TaskList, type TaskProps, TaskRow, Text, type TextProps, type TextRole, Textarea, ThemeScript, Thumb, type ThumbProps, Timeline, type TimelineEntry, type TimelineProps, Tip, type ToastOptions, ToastProvider, type ToastVariant, ToggleButton, type ToggleButtonProps, Toolbar, Tooltip, TopNav, TopNavBrand, TopNavLink, TopNavLinks, Tree, TreeItem, type TreeItemProps, Upload, UploadItem, type UploadItemProps, UploadPreview, UploadPreviews, VStack, Video, Wall, Waveform, Web, Workspace, WorkspaceMain, block, buttonClasses, cn, haptic, iconNames, useBaruaTheme, usePersistedState, useScrollGeometry, useSnapPosition, useToast, useVisible };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode, ButtonHTMLAttributes, AnchorHTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, DialogHTMLAttributes, SVGProps, ElementType, TableHTMLAttributes, ImgHTMLAttributes } from 'react';
|
|
2
|
+
import { ReactNode, ButtonHTMLAttributes, AnchorHTMLAttributes, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, DialogHTMLAttributes, SVGProps, ElementType, TableHTMLAttributes, ImgHTMLAttributes, RefObject } from 'react';
|
|
3
3
|
|
|
4
4
|
type BaruaTheme = "auto" | "light" | "dark";
|
|
5
5
|
type BaruaAccent = "blue" | "indigo" | "purple" | "pink" | "teal" | "green";
|
|
@@ -340,12 +340,12 @@ declare function Breadcrumbs({ items, className, ...rest }: {
|
|
|
340
340
|
items: Crumb[];
|
|
341
341
|
} & HTMLAttributes<HTMLElement>): react.JSX.Element;
|
|
342
342
|
|
|
343
|
-
declare const iconNames: readonly ["arrow-up-right", "
|
|
343
|
+
declare const iconNames: readonly ["archive", "arrow-left", "arrow-up-right", "badge-check", "bell", "bolt", "bookmark", "calendar", "camera", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "clock", "close", "code", "copy", "display", "doc", "download", "drop", "ellipsis", "ellipsis-vertical", "envelope-open", "eye", "eye-off", "film", "filter", "flame", "folder", "forward", "garage", "gear", "gift", "globe", "grid", "heart", "house", "image-off", "info", "key", "lightbulb", "link", "lock", "mail", "menu", "message", "mic", "moon-stars", "music-note", "newspaper", "paperclip", "pause", "pencil", "people", "person", "person-plus", "photo", "pin", "play", "plus", "power", "refresh", "repeat", "reply", "reply-all", "search", "send", "share", "shield", "skip-back", "skip-forward", "sliders", "sparkles", "speaker", "star", "sun", "trash", "tv", "upload", "warning", "waveform", "wifi"];
|
|
344
344
|
type IconName = (typeof iconNames)[number];
|
|
345
345
|
interface IconProps extends Omit<SVGProps<SVGSVGElement>, "name"> {
|
|
346
346
|
name: IconName;
|
|
347
347
|
/** Matches the .b-icon size scale. */
|
|
348
|
-
size?: "sm" | "md" | "lg" | "xl";
|
|
348
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
349
349
|
/** Give the icon a label when it carries meaning on its own. */
|
|
350
350
|
title?: string;
|
|
351
351
|
}
|
|
@@ -1184,7 +1184,49 @@ interface ContextMenuTargetProps extends HTMLAttributes<HTMLElement> {
|
|
|
1184
1184
|
/** Right-click, or long-press, opens the named menu at the pointer. */
|
|
1185
1185
|
declare const ContextMenuTarget: react.ForwardRefExoticComponent<ContextMenuTargetProps & react.RefAttributes<HTMLElement>>;
|
|
1186
1186
|
|
|
1187
|
+
type ScrollGeometry = {
|
|
1188
|
+
x: number;
|
|
1189
|
+
y: number;
|
|
1190
|
+
width: number;
|
|
1191
|
+
height: number;
|
|
1192
|
+
contentWidth: number;
|
|
1193
|
+
contentHeight: number;
|
|
1194
|
+
/** 0 at the start, 1 at the end; 0 when there is nothing to scroll. */
|
|
1195
|
+
progressX: number;
|
|
1196
|
+
progressY: number;
|
|
1197
|
+
};
|
|
1198
|
+
/**
|
|
1199
|
+
* onScrollGeometryChange. Pass a ref to a scroll container, or nothing for
|
|
1200
|
+
* the page. Reads are coalesced to one per frame.
|
|
1201
|
+
*/
|
|
1202
|
+
declare function useScrollGeometry(ref?: RefObject<HTMLElement | null>, onChange?: (geometry: ScrollGeometry) => void): ScrollGeometry | null;
|
|
1203
|
+
/** onScrollVisibilityChange: true once this much of the element is on screen. */
|
|
1204
|
+
declare function useVisible(ref: RefObject<Element | null>, { threshold }?: {
|
|
1205
|
+
threshold?: number;
|
|
1206
|
+
}): boolean;
|
|
1207
|
+
type SnapPosition = {
|
|
1208
|
+
/** The id of the child in view, or null when it has none. */
|
|
1209
|
+
id: string | null;
|
|
1210
|
+
index: number;
|
|
1211
|
+
/** Scroll to a child by id or index. */
|
|
1212
|
+
to: (target: string | number) => void;
|
|
1213
|
+
};
|
|
1214
|
+
/** scrollPosition(id:): which snap child a scrolling container is showing. */
|
|
1215
|
+
declare function useSnapPosition(ref: RefObject<HTMLElement | null>): SnapPosition;
|
|
1216
|
+
type HapticKind = "selection" | "impact" | "success" | "warning" | "error";
|
|
1217
|
+
/**
|
|
1218
|
+
* sensoryFeedback. Android vibrates; iPhone Safari has no vibration API but
|
|
1219
|
+
* plays the system haptic when a switch toggles, so one is toggled off
|
|
1220
|
+
* screen. Returns false where nothing could be felt.
|
|
1221
|
+
*/
|
|
1222
|
+
declare function haptic(kind?: HapticKind): boolean;
|
|
1223
|
+
/**
|
|
1224
|
+
* customizationID: state that survives a reload, under a key. Shares its
|
|
1225
|
+
* storage with barua.js's data-b-persist, so the two can hand over.
|
|
1226
|
+
*/
|
|
1227
|
+
declare function usePersistedState<T>(key: string, initial: T): [T, (value: T | ((prev: T) => T)) => void];
|
|
1228
|
+
|
|
1187
1229
|
/** Join class names, skipping falsy values. */
|
|
1188
1230
|
declare function cn(...parts: Array<string | false | null | undefined>): string;
|
|
1189
1231
|
|
|
1190
|
-
export { Accordion, Account, type AccountProps, AccountSwitcher, ActionSheet, type ActionSheetAction, Alert, AlertDialog, type AlertDialogAction, type AlertProps, AppGrid, AppTile, AreaChart, AsyncImage, type AsyncImageProps, Audio, Auth, AuthCard, type AuthCardProps, Avatar, AvatarGroup, type AvatarProps, Axis, type AxisProps, BackButton, Badge, type BadgeProps, Banner, type BannerProps, Bars, type BarsProps, type BaruaAccent, BaruaProvider, type BaruaProviderProps, type BaruaTheme, Bento, Billboard, BillboardActions, BillboardArt, BillboardBody, BillboardLede, BillboardScrim, BillboardTitle, type BlockProps, BottomNav, BottomNavItem, BottomSheet, Breadcrumbs, BulkActions, Button, ButtonGroup, type ButtonGroupProps, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, CalendarDay, type CalendarDayProps, CalendarGrid, CalendarHeader, CalendarMonth, CalendarView, CalendarViewCell, CalendarViewHead, CalendarWeekday, Callout, Card, CardBody, CardEyebrow, CardFooter, CardGrid, CardHeader, type CardProps, CardRail, CardSubtitle, CardTitle, Carousel, CarouselDots, CarouselSlide, CarouselTrack, Chapter, type ChapterProps, Chart, ChartTip, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, type CircularProgressProps, CodeBlock, type CodeBlockProps, Columns, type ColumnsProps, Combobox, ComboboxEmpty, ComboboxList, ComboboxOption, type ComboboxOptionProps, CommandCenter, CommandCenterLabel, CommandCenterStatus, CommandCenterTile, CommandFooter, CommandGroupLabel, CommandInput, CommandItem, type CommandItemProps, CommandList, CommandPalette, type CommandPaletteProps, Container, type ContainerProps, ContextMenuTarget, type ContextMenuTargetProps, CountUp, type CountUpProps, type Crumb, Dashboard, DataGrid, DatePicker, DescriptionList, type DescriptionListProps, Disclosure, type DisclosureProps, Divider, type DividerProps, Dock, DockItem, DockTray, Donut, type DonutProps, type DonutSlice, DragHandle, Drawer, DrawerBody, DrawerHeader, type DrawerProps, Dropdown, type DropdownProps, Dropzone, type DropzoneProps, EmptyState, ErrorText, Event, type EventProps, Fab, type FabProps, FeatureRow, type FeatureRowProps, Feed, Field, type FieldProps, Fieldset, Figure, type FigureProps, FileBrowser, FileGrid, FileTile, type FileTileProps, FilterBar, FilterChip, type FilterChipProps, FitText, type FitTextProps, Footnote, Footnotes, Form, FormActions, FormRow, FormSection, type FormSectionProps, Gallery, Gantt, GanttBar, GanttRow, Gauge, type GaugeProps, GlassContainer, GlassInteractive, Grid, GridLines, type GridProps, GroupBox, Grow, HStack, Heatmap, Help, Hero, type HeroProps, HoverCard, HoverCardHost, Icon, type IconName, type IconProps, IconTile, type IconTileProps, ImageLens, ImageViewer, ImageViewerBar, Input, InputGroup, type InputGroupProps, type InputProps, Inspector, Kanban, KanbanColumn, type KanbanColumnProps, KanbanList, Kbd, Label, type LabelProps, Labeled, Landing, Legend, type LegendItem, type LegendProps, Lightbox, type LightboxProps, LineChart, LinearGauge, Link, LinkGroup, LiquidToggle, type LiquidToggleProps, List, ListFooter, ListHeader, ListItem, type ListItemProps, type ListProps, Log, MarketingNav, MarketingNavBrand, MarketingNavLinks, MediaPlaceholder, Menu, MenuBar, MenuBarItem, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, Modal, type ModalProps, type NavLinkProps, Notification, Onboarding, OnboardingFeature, type OnboardingFeatureProps, OnboardingHero, Optional, OtpInput, type OtpInputProps, Overline, Pagination, PaginationEllipsis, PaginationItem, type PaginationItemProps, type PaginationProps, PillNav, Popover, type PopoverProps, Poster, PosterFacts, PosterFrame, PosterGrid, PosterInitial, PosterMeta, PosterTitle, Progress, type ProgressProps, PromoBand, type PromoBandProps, Quote, type QuoteProps, RadarChart, Radio, Rail, RailItem, type RailProps, Range, type RangeProps, Resizable, ResizeHandle, Result, type ResultProps, Reveal, type RevealProps, type RevealVariant, SafeArea, ScatterChart, ScrollArea, type ScrollAreaProps, SearchField, SearchResult, type SearchResultProps, SearchResults, Section, Segmented, type SegmentedOption, Select, SelectionCount, Share, Sheet, Sidebar, SidebarGroup, SidebarHeading, SidebarItem, type SidebarItemProps, type SidebarProps, SiteFooter, SiteFooterGroup, SiteFooterGroups, SiteFooterHeading, SiteFooterLegal, Skeleton, SkipLink, Slider, SortControl, Spacer, Span, type SpanProps, Sparkline, type SparklineProps, SpecStrip, Spinner, Split, SplitButton, type SplitButtonProps, Stack, type StackProps, Stage, Stat, StatusBar, StatusBarItem, StatusDot, type Step, StepperInput, type StepperInputProps, Steps, type StepsProps, StoryCard, Swatch, Swatches, Switch, type SwitchProps, SysPage, type SysPageProps, type TabItem, TabPanel, Table, TableNum, type TableProps, TableSortHeader, TableWrap, Tabs, Tag, Task, TaskList, type TaskProps, TaskRow, Text, type TextProps, type TextRole, Textarea, ThemeScript, Thumb, type ThumbProps, Timeline, type TimelineEntry, type TimelineProps, Tip, type ToastOptions, ToastProvider, type ToastVariant, ToggleButton, type ToggleButtonProps, Toolbar, Tooltip, TopNav, TopNavBrand, TopNavLink, TopNavLinks, Tree, TreeItem, type TreeItemProps, Upload, UploadItem, type UploadItemProps, UploadPreview, UploadPreviews, VStack, Video, Wall, Waveform, Web, Workspace, WorkspaceMain, block, buttonClasses, cn, iconNames, useBaruaTheme, useToast };
|
|
1232
|
+
export { Accordion, Account, type AccountProps, AccountSwitcher, ActionSheet, type ActionSheetAction, Alert, AlertDialog, type AlertDialogAction, type AlertProps, AppGrid, AppTile, AreaChart, AsyncImage, type AsyncImageProps, Audio, Auth, AuthCard, type AuthCardProps, Avatar, AvatarGroup, type AvatarProps, Axis, type AxisProps, BackButton, Badge, type BadgeProps, Banner, type BannerProps, Bars, type BarsProps, type BaruaAccent, BaruaProvider, type BaruaProviderProps, type BaruaTheme, Bento, Billboard, BillboardActions, BillboardArt, BillboardBody, BillboardLede, BillboardScrim, BillboardTitle, type BlockProps, BottomNav, BottomNavItem, BottomSheet, Breadcrumbs, BulkActions, Button, ButtonGroup, type ButtonGroupProps, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, CalendarDay, type CalendarDayProps, CalendarGrid, CalendarHeader, CalendarMonth, CalendarView, CalendarViewCell, CalendarViewHead, CalendarWeekday, Callout, Card, CardBody, CardEyebrow, CardFooter, CardGrid, CardHeader, type CardProps, CardRail, CardSubtitle, CardTitle, Carousel, CarouselDots, CarouselSlide, CarouselTrack, Chapter, type ChapterProps, Chart, ChartTip, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, type CircularProgressProps, CodeBlock, type CodeBlockProps, Columns, type ColumnsProps, Combobox, ComboboxEmpty, ComboboxList, ComboboxOption, type ComboboxOptionProps, CommandCenter, CommandCenterLabel, CommandCenterStatus, CommandCenterTile, CommandFooter, CommandGroupLabel, CommandInput, CommandItem, type CommandItemProps, CommandList, CommandPalette, type CommandPaletteProps, Container, type ContainerProps, ContextMenuTarget, type ContextMenuTargetProps, CountUp, type CountUpProps, type Crumb, Dashboard, DataGrid, DatePicker, DescriptionList, type DescriptionListProps, Disclosure, type DisclosureProps, Divider, type DividerProps, Dock, DockItem, DockTray, Donut, type DonutProps, type DonutSlice, DragHandle, Drawer, DrawerBody, DrawerHeader, type DrawerProps, Dropdown, type DropdownProps, Dropzone, type DropzoneProps, EmptyState, ErrorText, Event, type EventProps, Fab, type FabProps, FeatureRow, type FeatureRowProps, Feed, Field, type FieldProps, Fieldset, Figure, type FigureProps, FileBrowser, FileGrid, FileTile, type FileTileProps, FilterBar, FilterChip, type FilterChipProps, FitText, type FitTextProps, Footnote, Footnotes, Form, FormActions, FormRow, FormSection, type FormSectionProps, Gallery, Gantt, GanttBar, GanttRow, Gauge, type GaugeProps, GlassContainer, GlassInteractive, Grid, GridLines, type GridProps, GroupBox, Grow, HStack, type HapticKind, Heatmap, Help, Hero, type HeroProps, HoverCard, HoverCardHost, Icon, type IconName, type IconProps, IconTile, type IconTileProps, ImageLens, ImageViewer, ImageViewerBar, Input, InputGroup, type InputGroupProps, type InputProps, Inspector, Kanban, KanbanColumn, type KanbanColumnProps, KanbanList, Kbd, Label, type LabelProps, Labeled, Landing, Legend, type LegendItem, type LegendProps, Lightbox, type LightboxProps, LineChart, LinearGauge, Link, LinkGroup, LiquidToggle, type LiquidToggleProps, List, ListFooter, ListHeader, ListItem, type ListItemProps, type ListProps, Log, MarketingNav, MarketingNavBrand, MarketingNavLinks, MediaPlaceholder, Menu, MenuBar, MenuBarItem, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, Modal, type ModalProps, type NavLinkProps, Notification, Onboarding, OnboardingFeature, type OnboardingFeatureProps, OnboardingHero, Optional, OtpInput, type OtpInputProps, Overline, Pagination, PaginationEllipsis, PaginationItem, type PaginationItemProps, type PaginationProps, PillNav, Popover, type PopoverProps, Poster, PosterFacts, PosterFrame, PosterGrid, PosterInitial, PosterMeta, PosterTitle, Progress, type ProgressProps, PromoBand, type PromoBandProps, Quote, type QuoteProps, RadarChart, Radio, Rail, RailItem, type RailProps, Range, type RangeProps, Resizable, ResizeHandle, Result, type ResultProps, Reveal, type RevealProps, type RevealVariant, SafeArea, ScatterChart, ScrollArea, type ScrollAreaProps, type ScrollGeometry, SearchField, SearchResult, type SearchResultProps, SearchResults, Section, Segmented, type SegmentedOption, Select, SelectionCount, Share, Sheet, Sidebar, SidebarGroup, SidebarHeading, SidebarItem, type SidebarItemProps, type SidebarProps, SiteFooter, SiteFooterGroup, SiteFooterGroups, SiteFooterHeading, SiteFooterLegal, Skeleton, SkipLink, Slider, type SnapPosition, SortControl, Spacer, Span, type SpanProps, Sparkline, type SparklineProps, SpecStrip, Spinner, Split, SplitButton, type SplitButtonProps, Stack, type StackProps, Stage, Stat, StatusBar, StatusBarItem, StatusDot, type Step, StepperInput, type StepperInputProps, Steps, type StepsProps, StoryCard, Swatch, Swatches, Switch, type SwitchProps, SysPage, type SysPageProps, type TabItem, TabPanel, Table, TableNum, type TableProps, TableSortHeader, TableWrap, Tabs, Tag, Task, TaskList, type TaskProps, TaskRow, Text, type TextProps, type TextRole, Textarea, ThemeScript, Thumb, type ThumbProps, Timeline, type TimelineEntry, type TimelineProps, Tip, type ToastOptions, ToastProvider, type ToastVariant, ToggleButton, type ToggleButtonProps, Toolbar, Tooltip, TopNav, TopNavBrand, TopNavLink, TopNavLinks, Tree, TreeItem, type TreeItemProps, Upload, UploadItem, type UploadItemProps, UploadPreview, UploadPreviews, VStack, Video, Wall, Waveform, Web, Workspace, WorkspaceMain, block, buttonClasses, cn, haptic, iconNames, useBaruaTheme, usePersistedState, useScrollGeometry, useSnapPosition, useToast, useVisible };
|