@atom63/ui-react 0.2.0-beta.12 → 0.2.0-beta.13
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 +12 -0
- package/dist/{button-oVOZ5VpA.d.ts → button-DMnQeAEL.d.ts} +2 -1
- package/dist/calendar/index.d.ts +2 -1
- package/dist/{chunk-CVKG2VJD.js → chunk-IFBF2IA3.js} +14 -5
- package/dist/chunk-IFBF2IA3.js.map +1 -0
- package/dist/{chunk-CN4A5CNH.js → chunk-RLF45GBS.js} +149 -49
- package/dist/chunk-RLF45GBS.js.map +1 -0
- package/dist/{chunk-R67OZVA2.js → chunk-WL27K6MO.js} +3 -2
- package/dist/chunk-WL27K6MO.js.map +1 -0
- package/dist/{chunk-X5L5DEUZ.js → chunk-ZEY2VU4O.js} +3 -3
- package/dist/{chunk-X5L5DEUZ.js.map → chunk-ZEY2VU4O.js.map} +1 -1
- package/dist/{destination-link-DMLeR-oF.d.ts → destination-link-BHVQyWry.d.ts} +2 -1
- package/dist/{index-B06li5uo.d.ts → index-CbgpSG4j.d.ts} +16 -7
- package/dist/index.d.ts +77 -26
- package/dist/index.js +239 -86
- package/dist/index.js.map +1 -1
- package/dist/layout/index.d.ts +2 -1
- package/dist/media/index.d.ts +5 -4
- package/dist/media/index.js +35 -7
- package/dist/media/index.js.map +1 -1
- package/dist/media/media-lightbox/parts/index.d.ts +5 -4
- package/dist/media/media-lightbox/parts/index.js +2 -2
- package/dist/preview/index.d.ts +2 -3
- package/dist/preview/index.js +1 -1
- package/dist/theme/index.d.ts +3 -2
- package/dist/theme/index.js +1 -1
- package/dist/{types-Dxe5IzjE.d.ts → types-KQLxlHQZ.d.ts} +21 -0
- package/package.json +11 -10
- package/src/components/alert/alert.css +18 -15
- package/src/components/autocomplete/autocomplete.css +20 -4
- package/src/components/chat-typing-indicator/chat-typing-indicator.css +22 -0
- package/src/components/command/command.css +20 -0
- package/src/components/destination-link/destination-link.css +28 -0
- package/src/components/drawer/drawer.css +6 -2
- package/src/components/empty/empty.css +2 -4
- package/src/components/load-more-trigger/load-more-trigger.css +17 -0
- package/src/components/marquee/marquee.css +25 -3
- package/src/components/menu/menu.css +36 -1
- package/src/components/navigation-menu/navigation-menu.css +22 -4
- package/src/components/panel-setting-button/panel-setting-button.css +14 -0
- package/src/components/progress/progress.css +24 -2
- package/src/components/radio/radio.css +14 -0
- package/src/components/rating/rating.css +17 -0
- package/src/components/segmented-control/segmented-control.css +14 -0
- package/src/components/select/select.css +8 -0
- package/src/components/separator/separator.css +3 -1
- package/src/components/sheet/sheet.css +8 -4
- package/src/components/sidebar/sidebar.css +11 -4
- package/src/components/switch/switch.css +16 -1
- package/src/components/tabs/tabs.css +10 -0
- package/src/components/toggle/toggle.css +14 -8
- package/src/components/toggle-group/toggle-group.css +9 -0
- package/src/media/media-lightbox/media-lightbox.css +31 -1
- package/src/styles/recipes.css +1 -0
- package/src/styles/utilities.css +3 -0
- package/dist/chunk-CN4A5CNH.js.map +0 -1
- package/dist/chunk-CVKG2VJD.js.map +0 -1
- package/dist/chunk-R67OZVA2.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { InputGroup, InputGroupTextarea, InputGroupAddon, Separator, InputGroupInput, InputGroupButton, Sheet, SheetPopup, SheetHeader, SheetTitle, SheetDescription, Input, Tooltip, TooltipTrigger, TooltipPopup } from './chunk-
|
|
2
|
-
export { AlertDialog, AlertDialogAction, AlertDialogBackdrop, AlertDialogCancel, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogCreateHandle, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogPopup, AlertDialogPortal, AlertDialogPrimitive, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport, Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompletePrimitive, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, AvatarPrimitive, ButtonGroup, ButtonGroupProvider, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardCursorLabel, CardDescription, CardFooter, CardHeader, CardLabel, CardMedia, CardMediaOverlay, CardMediaOverlayBottom, CardMediaOverlayIconButton, CardMediaOverlayImage, CardMediaOverlayScrim, CardMediaOverlayTopRight, CardTags, CardTitle, Command, CommandCollection, CommandCreateHandle, CommandDialog, CommandDialogBackdrop, CommandDialogPopup, CommandDialogPortal, CommandDialogTrigger, CommandDialogViewport, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandInput, CommandItem, CommandList, CommandPanel, CommandSeparator, CommandShortcut, Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogCreateHandle, DialogDescription, DialogFooter, DialogHeader, DialogBackdrop as DialogOverlay, DialogPanel, DialogPopup, DialogPortal, DialogPrimitive, DialogTitle, DialogTrigger, DialogViewport, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputPrimitive, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, NavigationMenuViewport, Progress, ProgressIndicator, ProgressLabel, ProgressPrimitive, ProgressTrack, ProgressValue, ScrollableList, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPopup, SelectSeparator, SelectTrigger, SelectValue, Separator, SeparatorPrimitive, Sheet, SheetBackdrop, SheetClose, SheetPopup as SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetBackdrop as SheetOverlay, SheetPanel, SheetPopup, SheetPortal, SheetPrimitive, SheetTitle, SheetTrigger, SheetViewport, Textarea, Tooltip, TooltipPopup as TooltipContent, TooltipCreateHandle, TooltipPopup, TooltipPrimitive, TooltipProvider, TooltipTrigger, cardLinkClassName, getReactRendererConformance, navigationMenuTriggerStyle, reactRendererConformance, scrollableListControlClassNames, selectTriggerDefaultClassName, useAutocompleteFilter, useButtonGroupContext, useCardCursor } from './chunk-
|
|
3
|
-
export { Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle, SegmentedControl, Slider, SliderValue } from './chunk-
|
|
1
|
+
import { InputGroup, InputGroupTextarea, InputGroupAddon, mergeRefs, Separator, InputGroupInput, InputGroupButton, Sheet, SheetPopup, SheetHeader, SheetTitle, SheetDescription, Input, Tooltip, TooltipTrigger, TooltipPopup } from './chunk-RLF45GBS.js';
|
|
2
|
+
export { AlertDialog, AlertDialogAction, AlertDialogBackdrop, AlertDialogCancel, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogCreateHandle, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogPopup, AlertDialogPortal, AlertDialogPrimitive, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport, Autocomplete, AutocompleteClear, AutocompleteCollection, AutocompleteEmpty, AutocompleteGroup, AutocompleteGroupLabel, AutocompleteInput, AutocompleteItem, AutocompleteList, AutocompletePopup, AutocompletePrimitive, AutocompleteRow, AutocompleteSeparator, AutocompleteStatus, AutocompleteTrigger, AutocompleteValue, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, AvatarPrimitive, ButtonGroup, ButtonGroupProvider, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardCursorLabel, CardDescription, CardFooter, CardHeader, CardLabel, CardMedia, CardMediaOverlay, CardMediaOverlayBottom, CardMediaOverlayIconButton, CardMediaOverlayImage, CardMediaOverlayScrim, CardMediaOverlayTopRight, CardTags, CardTitle, Command, CommandCollection, CommandCreateHandle, CommandDialog, CommandDialogBackdrop, CommandDialogPopup, CommandDialogPortal, CommandDialogTrigger, CommandDialogViewport, CommandEmpty, CommandFooter, CommandGroup, CommandGroupLabel, CommandInput, CommandItem, CommandList, CommandPanel, CommandSeparator, CommandShortcut, Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogCreateHandle, DialogDescription, DialogFooter, DialogHeader, DialogBackdrop as DialogOverlay, DialogPanel, DialogPopup, DialogPortal, DialogPrimitive, DialogTitle, DialogTrigger, DialogViewport, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputPrimitive, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, NavigationMenuViewport, Progress, ProgressIndicator, ProgressLabel, ProgressPrimitive, ProgressTrack, ProgressValue, ScrollableList, Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectPopup, SelectSeparator, SelectTrigger, SelectValue, Separator, SeparatorPrimitive, Sheet, SheetBackdrop, SheetClose, SheetPopup as SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetBackdrop as SheetOverlay, SheetPanel, SheetPopup, SheetPortal, SheetPrimitive, SheetTitle, SheetTrigger, SheetViewport, Textarea, Tooltip, TooltipPopup as TooltipContent, TooltipCreateHandle, TooltipPopup, TooltipPrimitive, TooltipProvider, TooltipTrigger, cardLinkClassName, getReactRendererConformance, navigationMenuTriggerStyle, reactRendererConformance, scrollableListControlClassNames, selectTriggerDefaultClassName, useAutocompleteFilter, useButtonGroupContext, useCardCursor } from './chunk-RLF45GBS.js';
|
|
3
|
+
export { Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle, SegmentedControl, Slider, SliderValue } from './chunk-IFBF2IA3.js';
|
|
4
4
|
import { Button } from './chunk-R7IQ3IL5.js';
|
|
5
5
|
export { ATOM63_FLYOUT_TRANSITION, ATOM63_FLYOUT_TRANSITION_CSS, ATOM63_MOTION_EASE, ATOM63_MOTION_EASE_CSS, ATOM63_OVERLAY_MOTION_DURATION_CSS, ATOM63_OVERLAY_MOTION_DURATION_MS, ATOM63_OVERLAY_MOTION_EASE, ATOM63_OVERLAY_MOTION_EASE_CSS, Button, ScrollArea, ScrollBar } from './chunk-R7IQ3IL5.js';
|
|
6
|
-
export { DestinationIndicator, DestinationLink } from './chunk-
|
|
6
|
+
export { DestinationIndicator, DestinationLink } from './chunk-WL27K6MO.js';
|
|
7
7
|
import { usePortalContainer } from './chunk-UPPHQLZ2.js';
|
|
8
8
|
export { PortalContainerProvider, usePortalContainer } from './chunk-UPPHQLZ2.js';
|
|
9
9
|
import { cn } from './chunk-AJLHJRK6.js';
|
|
10
10
|
import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
|
|
11
11
|
import * as React3 from 'react';
|
|
12
|
-
import { forwardRef, createContext, useState, useRef, useEffect, useId,
|
|
12
|
+
import { forwardRef, createContext, useState, useRef, useEffect, useId, useContext, useCallback, isValidElement, cloneElement } from 'react';
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
|
-
import { getCrossRendererContract, loadMoreTriggerContract, tabsContract, toggleContract, toggleGroupContract, defaultUIEnvironment, alertContract, amountContract, animatedCheckContract, badgeContract, carouselContract, chatComposerContract, chatMessageContract, checkboxContract, connectedPanelContract, emptyContract, feedbackStateContract, itemContract, kbdContract, marqueeContract, messageContract, paginationContract, radioContract, ratingContract, searchFieldContract, sidebarContract, textTickerContract, sidebarNavTreeContract, switchContract, tableContract, toasterContract } from '@atom63/ui-foundation';
|
|
14
|
+
import { getCrossRendererContract, loadMoreTriggerContract, tabsContract, toggleContract, toggleGroupContract, defaultUIEnvironment, alertContract, amountContract, animatedCheckContract, badgeContract, carouselContract, chatComposerContract, chatMessageContract, checkboxContract, connectedPanelContract, emptyContract, feedbackStateContract, itemContract, kbdContract, marqueeContract, messageContract, paginationContract, progressiveBlurContract, radioContract, ratingContract, searchFieldContract, sidebarContract, textTickerContract, sidebarNavTreeContract, switchContract, tableContract, toasterContract } from '@atom63/ui-foundation';
|
|
15
15
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
16
16
|
import { useRender } from '@base-ui/react/use-render';
|
|
17
|
-
import { LoaderCircle, AlertCircle, CheckCircle, ChevronRight, Ellipsis, ArrowLeft, ArrowRight, Square, AudioLines, ArrowUp, ChevronDown, Copy, Minus, Check, CheckCheck, Clock, ChevronLeft, PanelLeft, TriangleAlertIcon, CircleCheckIcon, Loader2Icon, InfoIcon, OctagonXIcon, Star, CircleDashed, CircleX, CircleCheck, WifiOff, SearchX, RefreshCw, Inbox, FileSearch, AlertTriangle } from 'lucide-react';
|
|
17
|
+
import { LoaderCircle, AlertCircle, CheckCircle, ChevronRight, Ellipsis, ArrowLeft, ArrowRight, Square, AudioLines, ArrowUp, ChevronDown, Copy, Minus, Play, Pause, Check, CheckCheck, Clock, ChevronLeft, PanelLeft, TriangleAlertIcon, CircleCheckIcon, Loader2Icon, InfoIcon, OctagonXIcon, Star, CircleDashed, CircleX, CircleCheck, WifiOff, SearchX, RefreshCw, Inbox, FileSearch, AlertTriangle } from 'lucide-react';
|
|
18
18
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
19
19
|
import { useReducedMotion, AnimatePresence, motion } from 'motion/react';
|
|
20
20
|
import { Collapsible as Collapsible$1 } from '@base-ui/react/collapsible';
|
|
@@ -37,6 +37,7 @@ import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
|
|
|
37
37
|
import { createPortal } from 'react-dom';
|
|
38
38
|
import { Toggle as Toggle$1 } from '@base-ui/react/toggle';
|
|
39
39
|
import { ToggleGroup as ToggleGroup$1 } from '@base-ui/react/toggle-group';
|
|
40
|
+
import { DirectionProvider } from '@base-ui/react/direction-provider';
|
|
40
41
|
|
|
41
42
|
var AccordionRootContext = React3.createContext({ hiddenUntilFound: false, keepMounted: false });
|
|
42
43
|
var AccordionItemContext = React3.createContext(null);
|
|
@@ -194,6 +195,13 @@ function AccordionContent({
|
|
|
194
195
|
}
|
|
195
196
|
);
|
|
196
197
|
}
|
|
198
|
+
var alertRoles = {
|
|
199
|
+
default: "status",
|
|
200
|
+
error: "alert",
|
|
201
|
+
info: "status",
|
|
202
|
+
success: "status",
|
|
203
|
+
warning: "alert"
|
|
204
|
+
};
|
|
197
205
|
function Alert({ className, variant, ...props }) {
|
|
198
206
|
const alertVariant = variant ?? alertContract.defaultVariant;
|
|
199
207
|
return /* @__PURE__ */ jsx(
|
|
@@ -202,7 +210,7 @@ function Alert({ className, variant, ...props }) {
|
|
|
202
210
|
className: cn("a63-Alert", className),
|
|
203
211
|
"data-slot": "alert",
|
|
204
212
|
"data-variant": alertVariant,
|
|
205
|
-
role:
|
|
213
|
+
role: alertRoles[alertVariant],
|
|
206
214
|
...props
|
|
207
215
|
}
|
|
208
216
|
);
|
|
@@ -976,6 +984,38 @@ function ChatComposer({
|
|
|
976
984
|
}
|
|
977
985
|
);
|
|
978
986
|
}
|
|
987
|
+
function ChatTypingIndicator({
|
|
988
|
+
className,
|
|
989
|
+
label = "Assistant is typing",
|
|
990
|
+
...props
|
|
991
|
+
}) {
|
|
992
|
+
const [announced, setAnnounced] = React3.useState(false);
|
|
993
|
+
React3.useEffect(() => {
|
|
994
|
+
const timer = setTimeout(() => setAnnounced(true), 100);
|
|
995
|
+
return () => clearTimeout(timer);
|
|
996
|
+
}, []);
|
|
997
|
+
return /* @__PURE__ */ jsxs(
|
|
998
|
+
"span",
|
|
999
|
+
{
|
|
1000
|
+
className: cn("a63-ChatTypingIndicator", className),
|
|
1001
|
+
"data-slot": "chat-typing-indicator",
|
|
1002
|
+
role: "status",
|
|
1003
|
+
...props,
|
|
1004
|
+
children: [
|
|
1005
|
+
/* @__PURE__ */ jsx("span", { className: "a63-ChatTypingIndicator-label", children: announced ? label : null }),
|
|
1006
|
+
[0, 1, 2].map((index) => /* @__PURE__ */ jsx(
|
|
1007
|
+
"span",
|
|
1008
|
+
{
|
|
1009
|
+
"aria-hidden": "true",
|
|
1010
|
+
className: "a63-ChatTypingIndicator-dot",
|
|
1011
|
+
"data-slot": "chat-typing-indicator-dot"
|
|
1012
|
+
},
|
|
1013
|
+
index
|
|
1014
|
+
))
|
|
1015
|
+
]
|
|
1016
|
+
}
|
|
1017
|
+
);
|
|
1018
|
+
}
|
|
979
1019
|
function ChatMessageList({ className, ...props }) {
|
|
980
1020
|
return /* @__PURE__ */ jsx(
|
|
981
1021
|
"div",
|
|
@@ -987,6 +1027,11 @@ function ChatMessageList({ className, ...props }) {
|
|
|
987
1027
|
}
|
|
988
1028
|
);
|
|
989
1029
|
}
|
|
1030
|
+
function holdsTypingIndicator(children) {
|
|
1031
|
+
return React3.Children.toArray(children).some(
|
|
1032
|
+
(child) => React3.isValidElement(child) && child.type === ChatTypingIndicator
|
|
1033
|
+
);
|
|
1034
|
+
}
|
|
990
1035
|
var DEFAULT_LABELS = { assistant: "Assistant", user: "You" };
|
|
991
1036
|
function ChatMessage({
|
|
992
1037
|
actions,
|
|
@@ -1002,7 +1047,7 @@ function ChatMessage({
|
|
|
1002
1047
|
return /* @__PURE__ */ jsxs(
|
|
1003
1048
|
"article",
|
|
1004
1049
|
{
|
|
1005
|
-
"aria-busy": streaming || void 0,
|
|
1050
|
+
"aria-busy": streaming && !holdsTypingIndicator(children) || void 0,
|
|
1006
1051
|
"aria-label": label ?? DEFAULT_LABELS[from],
|
|
1007
1052
|
className: cn("a63-ChatMessage", className),
|
|
1008
1053
|
"data-appearance": from === "user" ? "bubble" : appearance,
|
|
@@ -1178,31 +1223,6 @@ function ChatStep({
|
|
|
1178
1223
|
}
|
|
1179
1224
|
);
|
|
1180
1225
|
}
|
|
1181
|
-
function ChatTypingIndicator({
|
|
1182
|
-
className,
|
|
1183
|
-
label = "Assistant is typing",
|
|
1184
|
-
...props
|
|
1185
|
-
}) {
|
|
1186
|
-
return /* @__PURE__ */ jsx(
|
|
1187
|
-
"span",
|
|
1188
|
-
{
|
|
1189
|
-
"aria-label": label,
|
|
1190
|
-
className: cn("a63-ChatTypingIndicator", className),
|
|
1191
|
-
"data-slot": "chat-typing-indicator",
|
|
1192
|
-
role: "status",
|
|
1193
|
-
...props,
|
|
1194
|
-
children: [0, 1, 2].map((index) => /* @__PURE__ */ jsx(
|
|
1195
|
-
"span",
|
|
1196
|
-
{
|
|
1197
|
-
"aria-hidden": "true",
|
|
1198
|
-
className: "a63-ChatTypingIndicator-dot",
|
|
1199
|
-
"data-slot": "chat-typing-indicator-dot"
|
|
1200
|
-
},
|
|
1201
|
-
index
|
|
1202
|
-
))
|
|
1203
|
-
}
|
|
1204
|
-
);
|
|
1205
|
-
}
|
|
1206
1226
|
var CheckIcon = /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", fill: "none", viewBox: "0 0 16 16", children: /* @__PURE__ */ jsx(
|
|
1207
1227
|
"path",
|
|
1208
1228
|
{
|
|
@@ -1622,7 +1642,16 @@ function ContextMenuGroup(props) {
|
|
|
1622
1642
|
return /* @__PURE__ */ jsx(ContextMenu$1.Group, { "data-slot": "context-menu-group", ...props });
|
|
1623
1643
|
}
|
|
1624
1644
|
function ContextMenuPortal(props) {
|
|
1625
|
-
|
|
1645
|
+
const { container, ...portalProps } = props;
|
|
1646
|
+
const contextPortalContainer = usePortalContainer();
|
|
1647
|
+
return /* @__PURE__ */ jsx(
|
|
1648
|
+
ContextMenu$1.Portal,
|
|
1649
|
+
{
|
|
1650
|
+
container: container ?? contextPortalContainer,
|
|
1651
|
+
"data-slot": "context-menu-portal",
|
|
1652
|
+
...portalProps
|
|
1653
|
+
}
|
|
1654
|
+
);
|
|
1626
1655
|
}
|
|
1627
1656
|
function ContextMenuSub(props) {
|
|
1628
1657
|
return /* @__PURE__ */ jsx(ContextMenu$1.SubmenuRoot, { "data-slot": "context-menu-sub", ...props });
|
|
@@ -1638,7 +1667,7 @@ function ContextMenuContent({
|
|
|
1638
1667
|
sideOffset = 4,
|
|
1639
1668
|
...props
|
|
1640
1669
|
}) {
|
|
1641
|
-
return /* @__PURE__ */ jsx(
|
|
1670
|
+
return /* @__PURE__ */ jsx(ContextMenuPortal, { ...portalProps, children: /* @__PURE__ */ jsx(
|
|
1642
1671
|
ContextMenu$1.Positioner,
|
|
1643
1672
|
{
|
|
1644
1673
|
className: "a63-Menu-positioner",
|
|
@@ -1700,7 +1729,7 @@ function ContextMenuSubContent({
|
|
|
1700
1729
|
sideOffset = 6,
|
|
1701
1730
|
...props
|
|
1702
1731
|
}) {
|
|
1703
|
-
return /* @__PURE__ */ jsx(
|
|
1732
|
+
return /* @__PURE__ */ jsx(ContextMenuPortal, { ...portalProps, children: /* @__PURE__ */ jsx(
|
|
1704
1733
|
ContextMenu$1.Positioner,
|
|
1705
1734
|
{
|
|
1706
1735
|
className: "a63-Menu-positioner",
|
|
@@ -1953,7 +1982,16 @@ function DrawerTrigger({
|
|
|
1953
1982
|
return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", render: slot.render, ...props, children: slot.children });
|
|
1954
1983
|
}
|
|
1955
1984
|
function DrawerPortal(props) {
|
|
1956
|
-
|
|
1985
|
+
const { container, ...portalProps } = props;
|
|
1986
|
+
const contextPortalContainer = usePortalContainer();
|
|
1987
|
+
return /* @__PURE__ */ jsx(
|
|
1988
|
+
Drawer$1.Portal,
|
|
1989
|
+
{
|
|
1990
|
+
container: container ?? contextPortalContainer,
|
|
1991
|
+
"data-slot": "drawer-portal",
|
|
1992
|
+
...portalProps
|
|
1993
|
+
}
|
|
1994
|
+
);
|
|
1957
1995
|
}
|
|
1958
1996
|
function DrawerClose({
|
|
1959
1997
|
asChild,
|
|
@@ -2392,6 +2430,7 @@ function EmptyErrorDetail({
|
|
|
2392
2430
|
"data-slot": "empty-error-toggle",
|
|
2393
2431
|
onClick: () => setExpanded((value) => !value),
|
|
2394
2432
|
size: "sm",
|
|
2433
|
+
tone: "muted",
|
|
2395
2434
|
type: "button",
|
|
2396
2435
|
variant: "ghost",
|
|
2397
2436
|
children: expanded ? "Hide details" : "Show details"
|
|
@@ -2498,6 +2537,7 @@ function FeedbackState({
|
|
|
2498
2537
|
description,
|
|
2499
2538
|
error,
|
|
2500
2539
|
icon,
|
|
2540
|
+
level = 3,
|
|
2501
2541
|
query,
|
|
2502
2542
|
showIcon = true,
|
|
2503
2543
|
size = feedbackStateContract.defaultSize,
|
|
@@ -2511,17 +2551,25 @@ function FeedbackState({
|
|
|
2511
2551
|
return /* @__PURE__ */ jsxs(
|
|
2512
2552
|
"div",
|
|
2513
2553
|
{
|
|
2514
|
-
"aria-
|
|
2515
|
-
"aria-live": state === "error" ? "assertive" : state === "loading" ? "polite" : void 0,
|
|
2554
|
+
"aria-live": state === "error" ? "assertive" : "polite",
|
|
2516
2555
|
className: cn("a63-FeedbackState", className),
|
|
2517
2556
|
"data-size": size,
|
|
2518
2557
|
"data-slot": "feedback-state",
|
|
2519
2558
|
"data-state": state,
|
|
2520
|
-
role: state === "error" ? "alert" :
|
|
2559
|
+
role: state === "error" ? "alert" : "status",
|
|
2521
2560
|
children: [
|
|
2522
2561
|
/* @__PURE__ */ jsxs("div", { className: "a63-FeedbackState-header", "data-slot": "feedback-state-header", children: [
|
|
2523
2562
|
showIcon && iconNode ? /* @__PURE__ */ jsx("div", { className: "a63-FeedbackState-media", "data-slot": "feedback-state-media", children: iconNode }) : null,
|
|
2524
|
-
/* @__PURE__ */ jsx(
|
|
2563
|
+
/* @__PURE__ */ jsx(
|
|
2564
|
+
"div",
|
|
2565
|
+
{
|
|
2566
|
+
"aria-level": level,
|
|
2567
|
+
className: "a63-FeedbackState-title",
|
|
2568
|
+
"data-slot": "feedback-state-title",
|
|
2569
|
+
role: "heading",
|
|
2570
|
+
children: finalTitle
|
|
2571
|
+
}
|
|
2572
|
+
),
|
|
2525
2573
|
/* @__PURE__ */ jsx("div", { className: "a63-FeedbackState-description", "data-slot": "feedback-state-description", children: finalDescription })
|
|
2526
2574
|
] }),
|
|
2527
2575
|
actions && actions.length > 0 ? /* @__PURE__ */ jsx("div", { className: "a63-FeedbackState-content", "data-slot": "feedback-state-content", children: actions.map((action) => /* @__PURE__ */ jsx(
|
|
@@ -2559,20 +2607,74 @@ function FieldLegend({
|
|
|
2559
2607
|
function FieldGroup({ className, ...props }) {
|
|
2560
2608
|
return /* @__PURE__ */ jsx("div", { className: cn("a63-FieldGroup", className), "data-slot": "field-group", ...props });
|
|
2561
2609
|
}
|
|
2610
|
+
var FieldContext = React3.createContext(null);
|
|
2611
|
+
var CONTROL_SELECTOR = 'input:not([type="hidden"]), select, textarea, [role="combobox"], [role="checkbox"], [role="switch"], [role="radiogroup"], [role="slider"]';
|
|
2612
|
+
function findControl(root) {
|
|
2613
|
+
const label = root.querySelector("label[for]");
|
|
2614
|
+
const labelled = label ? root.ownerDocument.getElementById(label.htmlFor) : null;
|
|
2615
|
+
return labelled ?? root.querySelector(CONTROL_SELECTOR);
|
|
2616
|
+
}
|
|
2617
|
+
function useFieldPart(kind, idProp, active) {
|
|
2618
|
+
const generatedId = React3.useId();
|
|
2619
|
+
const id = idProp ?? generatedId;
|
|
2620
|
+
const field = React3.useContext(FieldContext);
|
|
2621
|
+
React3.useLayoutEffect(
|
|
2622
|
+
() => active ? field?.register(id, kind) : void 0,
|
|
2623
|
+
[active, field, id, kind]
|
|
2624
|
+
);
|
|
2625
|
+
return id;
|
|
2626
|
+
}
|
|
2562
2627
|
function Field({
|
|
2563
2628
|
className,
|
|
2564
2629
|
orientation = "vertical",
|
|
2630
|
+
ref,
|
|
2565
2631
|
...props
|
|
2566
2632
|
}) {
|
|
2567
|
-
|
|
2633
|
+
const rootRef = React3.useRef(null);
|
|
2634
|
+
const [parts, setParts] = React3.useState([]);
|
|
2635
|
+
const context = React3.useMemo(
|
|
2636
|
+
() => ({
|
|
2637
|
+
register: (id, kind) => {
|
|
2638
|
+
setParts((current) => [...current, { id, kind }]);
|
|
2639
|
+
return () => setParts((current) => current.filter((part) => part.id !== id));
|
|
2640
|
+
}
|
|
2641
|
+
}),
|
|
2642
|
+
[]
|
|
2643
|
+
);
|
|
2644
|
+
React3.useLayoutEffect(() => {
|
|
2645
|
+
const control = rootRef.current ? findControl(rootRef.current) : null;
|
|
2646
|
+
if (!control || parts.length === 0) {
|
|
2647
|
+
return void 0;
|
|
2648
|
+
}
|
|
2649
|
+
const existing = (control.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean);
|
|
2650
|
+
const added = parts.map((part) => part.id).filter((id) => !existing.includes(id));
|
|
2651
|
+
control.setAttribute("aria-describedby", [...existing, ...added].join(" "));
|
|
2652
|
+
const markInvalid = parts.some((part) => part.kind === "error") && !control.hasAttribute("aria-invalid");
|
|
2653
|
+
if (markInvalid) {
|
|
2654
|
+
control.setAttribute("aria-invalid", "true");
|
|
2655
|
+
}
|
|
2656
|
+
return () => {
|
|
2657
|
+
const remaining = (control.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((id) => id && !added.includes(id));
|
|
2658
|
+
if (remaining.length > 0) {
|
|
2659
|
+
control.setAttribute("aria-describedby", remaining.join(" "));
|
|
2660
|
+
} else {
|
|
2661
|
+
control.removeAttribute("aria-describedby");
|
|
2662
|
+
}
|
|
2663
|
+
if (markInvalid) {
|
|
2664
|
+
control.removeAttribute("aria-invalid");
|
|
2665
|
+
}
|
|
2666
|
+
};
|
|
2667
|
+
}, [parts]);
|
|
2668
|
+
return /* @__PURE__ */ jsx(FieldContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
|
|
2568
2669
|
"div",
|
|
2569
2670
|
{
|
|
2570
2671
|
className: cn("a63-Field", className),
|
|
2571
2672
|
"data-slot": "field",
|
|
2572
2673
|
"data-orientation": orientation,
|
|
2674
|
+
ref: React3.useMemo(() => mergeRefs(rootRef, ref), [ref]),
|
|
2573
2675
|
...props
|
|
2574
2676
|
}
|
|
2575
|
-
);
|
|
2677
|
+
) });
|
|
2576
2678
|
}
|
|
2577
2679
|
function FieldContent({ className, ...props }) {
|
|
2578
2680
|
return /* @__PURE__ */ jsx("div", { className: cn("a63-FieldContent", className), "data-slot": "field-content", ...props });
|
|
@@ -2585,9 +2687,19 @@ function FieldTitle({ className, ...props }) {
|
|
|
2585
2687
|
}
|
|
2586
2688
|
function FieldDescription({
|
|
2587
2689
|
className,
|
|
2690
|
+
id: idProp,
|
|
2588
2691
|
...props
|
|
2589
2692
|
}) {
|
|
2590
|
-
|
|
2693
|
+
const id = useFieldPart("description", idProp, true);
|
|
2694
|
+
return /* @__PURE__ */ jsx(
|
|
2695
|
+
"p",
|
|
2696
|
+
{
|
|
2697
|
+
className: cn("a63-FieldDescription", className),
|
|
2698
|
+
"data-slot": "field-description",
|
|
2699
|
+
id,
|
|
2700
|
+
...props
|
|
2701
|
+
}
|
|
2702
|
+
);
|
|
2591
2703
|
}
|
|
2592
2704
|
function FieldSeparator({
|
|
2593
2705
|
children,
|
|
@@ -2612,9 +2724,10 @@ function FieldError({
|
|
|
2612
2724
|
className,
|
|
2613
2725
|
children,
|
|
2614
2726
|
errors,
|
|
2727
|
+
id: idProp,
|
|
2615
2728
|
...props
|
|
2616
2729
|
}) {
|
|
2617
|
-
const content = useMemo(() => {
|
|
2730
|
+
const content = React3.useMemo(() => {
|
|
2618
2731
|
if (children) {
|
|
2619
2732
|
return children;
|
|
2620
2733
|
}
|
|
@@ -2627,6 +2740,7 @@ function FieldError({
|
|
|
2627
2740
|
}
|
|
2628
2741
|
return /* @__PURE__ */ jsx("ul", { className: "a63-FieldError-list", children: uniqueErrors.map((error) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, error.message)) });
|
|
2629
2742
|
}, [children, errors]);
|
|
2743
|
+
const id = useFieldPart("error", idProp, Boolean(content));
|
|
2630
2744
|
if (!content) {
|
|
2631
2745
|
return null;
|
|
2632
2746
|
}
|
|
@@ -2636,6 +2750,7 @@ function FieldError({
|
|
|
2636
2750
|
role: "alert",
|
|
2637
2751
|
className: cn("a63-FieldError", className),
|
|
2638
2752
|
"data-slot": "field-error",
|
|
2753
|
+
id,
|
|
2639
2754
|
...props,
|
|
2640
2755
|
children: content
|
|
2641
2756
|
}
|
|
@@ -2967,10 +3082,8 @@ var LoadMoreTrigger = forwardRef(
|
|
|
2967
3082
|
variant = loadMoreTriggerContract.defaultVariant
|
|
2968
3083
|
}, ref) => {
|
|
2969
3084
|
const resolvedState = state ?? (isLoading ? "loading" : hasMore ? "idle" : "hidden");
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
}
|
|
2973
|
-
if (children) {
|
|
3085
|
+
const isHidden = resolvedState === "hidden";
|
|
3086
|
+
if (children && !isHidden) {
|
|
2974
3087
|
return /* @__PURE__ */ jsx(
|
|
2975
3088
|
"div",
|
|
2976
3089
|
{
|
|
@@ -2983,21 +3096,20 @@ var LoadMoreTrigger = forwardRef(
|
|
|
2983
3096
|
}
|
|
2984
3097
|
);
|
|
2985
3098
|
}
|
|
2986
|
-
const tone = stateTones[resolvedState] ?? "neutral";
|
|
2987
|
-
const isStatus = resolvedState !== "idle";
|
|
3099
|
+
const tone = isHidden ? void 0 : stateTones[resolvedState] ?? "neutral";
|
|
2988
3100
|
return /* @__PURE__ */ jsx(
|
|
2989
3101
|
"div",
|
|
2990
3102
|
{
|
|
2991
|
-
"aria-live":
|
|
3103
|
+
"aria-live": "polite",
|
|
2992
3104
|
className: cn("a63-LoadMoreTrigger", className),
|
|
2993
|
-
"data-has-message": "",
|
|
3105
|
+
"data-has-message": isHidden ? void 0 : "",
|
|
2994
3106
|
"data-state": resolvedState,
|
|
2995
3107
|
"data-slot": "load-more-trigger",
|
|
2996
3108
|
"data-tone": tone,
|
|
2997
3109
|
"data-variant": variant,
|
|
2998
|
-
ref,
|
|
2999
|
-
role:
|
|
3000
|
-
children: /* @__PURE__ */ jsxs(
|
|
3110
|
+
ref: isHidden ? void 0 : ref,
|
|
3111
|
+
role: "status",
|
|
3112
|
+
children: isHidden ? null : /* @__PURE__ */ jsxs(
|
|
3001
3113
|
"div",
|
|
3002
3114
|
{
|
|
3003
3115
|
className: "a63-LoadMoreTrigger-message",
|
|
@@ -3051,8 +3163,9 @@ LoadMoreTrigger.displayName = "LoadMoreTrigger";
|
|
|
3051
3163
|
function Marquee({
|
|
3052
3164
|
className,
|
|
3053
3165
|
reverse = false,
|
|
3054
|
-
pauseOnHover =
|
|
3055
|
-
paused
|
|
3166
|
+
pauseOnHover = true,
|
|
3167
|
+
paused,
|
|
3168
|
+
pauseLabel = "Pause",
|
|
3056
3169
|
style,
|
|
3057
3170
|
children,
|
|
3058
3171
|
vertical = false,
|
|
@@ -3060,9 +3173,11 @@ function Marquee({
|
|
|
3060
3173
|
gap = marqueeContract.defaultGap,
|
|
3061
3174
|
...props
|
|
3062
3175
|
}) {
|
|
3176
|
+
const [userPaused, setUserPaused] = useState(false);
|
|
3177
|
+
const isPaused = paused ?? userPaused;
|
|
3063
3178
|
const reducedMotion = Boolean(useReducedMotion());
|
|
3064
3179
|
const scrollRegion = reducedMotion ? { "aria-label": "Scrolling content", role: "group", tabIndex: 0 } : void 0;
|
|
3065
|
-
return /* @__PURE__ */
|
|
3180
|
+
return /* @__PURE__ */ jsxs(
|
|
3066
3181
|
"div",
|
|
3067
3182
|
{
|
|
3068
3183
|
className: cn("a63-Marquee", className),
|
|
@@ -3071,21 +3186,35 @@ function Marquee({
|
|
|
3071
3186
|
...scrollRegion,
|
|
3072
3187
|
...props,
|
|
3073
3188
|
style: { "--gap": gap, ...style },
|
|
3074
|
-
children:
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3189
|
+
children: [
|
|
3190
|
+
Array.from({ length: repeat }, (_, trackIndex) => /* @__PURE__ */ jsx(
|
|
3191
|
+
"div",
|
|
3192
|
+
{
|
|
3193
|
+
"aria-hidden": trackIndex > 0 || void 0,
|
|
3194
|
+
className: "a63-Marquee-track",
|
|
3195
|
+
"data-orientation": vertical ? "vertical" : "horizontal",
|
|
3196
|
+
"data-paused": isPaused ? "" : void 0,
|
|
3197
|
+
"data-pause-on-hover": pauseOnHover ? "" : void 0,
|
|
3198
|
+
"data-reverse": reverse ? "" : void 0,
|
|
3199
|
+
"data-slot": "marquee-track",
|
|
3200
|
+
inert: trackIndex > 0 ? true : void 0,
|
|
3201
|
+
children
|
|
3202
|
+
},
|
|
3203
|
+
`marquee-track-${trackIndex}`
|
|
3204
|
+
)),
|
|
3205
|
+
paused === void 0 && !reducedMotion ? /* @__PURE__ */ jsx(
|
|
3206
|
+
Button,
|
|
3207
|
+
{
|
|
3208
|
+
"aria-label": pauseLabel,
|
|
3209
|
+
"aria-pressed": userPaused,
|
|
3210
|
+
className: "a63-Marquee-control",
|
|
3211
|
+
onClick: () => setUserPaused((value) => !value),
|
|
3212
|
+
size: "icon-sm",
|
|
3213
|
+
variant: "secondary",
|
|
3214
|
+
children: userPaused ? /* @__PURE__ */ jsx(Play, { "aria-hidden": true }) : /* @__PURE__ */ jsx(Pause, { "aria-hidden": true })
|
|
3215
|
+
}
|
|
3216
|
+
) : null
|
|
3217
|
+
]
|
|
3089
3218
|
}
|
|
3090
3219
|
);
|
|
3091
3220
|
}
|
|
@@ -3629,8 +3758,8 @@ function buildMask(position, from, to) {
|
|
|
3629
3758
|
}
|
|
3630
3759
|
function ProgressiveBlur({
|
|
3631
3760
|
className,
|
|
3632
|
-
height =
|
|
3633
|
-
position =
|
|
3761
|
+
height = progressiveBlurContract.defaultHeight,
|
|
3762
|
+
position = progressiveBlurContract.defaultPosition,
|
|
3634
3763
|
blurLevels = [0.5, 1, 2, 4, 8, 16, 32, 64]
|
|
3635
3764
|
}) {
|
|
3636
3765
|
const count = blurLevels.length;
|
|
@@ -3839,14 +3968,28 @@ function SearchField({
|
|
|
3839
3968
|
disabled,
|
|
3840
3969
|
endAddon,
|
|
3841
3970
|
inputClassName,
|
|
3971
|
+
invalid,
|
|
3842
3972
|
onClear,
|
|
3843
3973
|
onValueChange,
|
|
3974
|
+
ref,
|
|
3975
|
+
size,
|
|
3844
3976
|
spellCheck = false,
|
|
3845
3977
|
value,
|
|
3846
3978
|
variant = searchFieldContract.defaultVariant,
|
|
3847
3979
|
...props
|
|
3848
3980
|
}) {
|
|
3849
3981
|
const inputRef = React3.useRef(null);
|
|
3982
|
+
const setInputRef = React3.useCallback(
|
|
3983
|
+
(node) => {
|
|
3984
|
+
inputRef.current = node;
|
|
3985
|
+
if (typeof ref === "function") {
|
|
3986
|
+
ref(node);
|
|
3987
|
+
} else if (ref) {
|
|
3988
|
+
ref.current = node;
|
|
3989
|
+
}
|
|
3990
|
+
},
|
|
3991
|
+
[ref]
|
|
3992
|
+
);
|
|
3850
3993
|
const isControlled = value !== void 0;
|
|
3851
3994
|
const [internalValue, setInternalValue] = React3.useState(defaultValue);
|
|
3852
3995
|
const currentValue = isControlled ? value : internalValue;
|
|
@@ -3864,6 +4007,8 @@ function SearchField({
|
|
|
3864
4007
|
"data-search-state": state,
|
|
3865
4008
|
"data-slot": "search-field",
|
|
3866
4009
|
disabled,
|
|
4010
|
+
invalid,
|
|
4011
|
+
size: typeof size === "number" ? void 0 : size,
|
|
3867
4012
|
variant,
|
|
3868
4013
|
children: [
|
|
3869
4014
|
/* @__PURE__ */ jsx(InputGroupAddon, { "data-slot": "search-field-icon", children: /* @__PURE__ */ jsx(SearchIcon, {}) }),
|
|
@@ -3874,7 +4019,8 @@ function SearchField({
|
|
|
3874
4019
|
autoComplete,
|
|
3875
4020
|
inputClassName,
|
|
3876
4021
|
onChange: (event) => updateValue(event.currentTarget.value),
|
|
3877
|
-
ref:
|
|
4022
|
+
ref: setInputRef,
|
|
4023
|
+
size: typeof size === "number" ? size : void 0,
|
|
3878
4024
|
spellCheck,
|
|
3879
4025
|
type: "search",
|
|
3880
4026
|
value: currentValue
|
|
@@ -4098,6 +4244,7 @@ function Sidebar({
|
|
|
4098
4244
|
className: cn("a63-Sidebar-container", className),
|
|
4099
4245
|
"data-side": side,
|
|
4100
4246
|
"data-slot": "sidebar-container",
|
|
4247
|
+
inert: state === "collapsed" && collapsible === "offcanvas",
|
|
4101
4248
|
...props,
|
|
4102
4249
|
children: /* @__PURE__ */ jsx("div", { className: "a63-Sidebar-inner", "data-sidebar": "sidebar", "data-slot": "sidebar-inner", children })
|
|
4103
4250
|
}
|
|
@@ -4331,6 +4478,7 @@ function SidebarMenuButton({
|
|
|
4331
4478
|
defaultTagName: "button",
|
|
4332
4479
|
props: mergeProps(
|
|
4333
4480
|
{
|
|
4481
|
+
"aria-current": isActive ? "page" : void 0,
|
|
4334
4482
|
className: cn("a63-Sidebar-menu-button", className),
|
|
4335
4483
|
"data-active": isActive,
|
|
4336
4484
|
"data-sidebar": "menu-button",
|
|
@@ -4369,7 +4517,7 @@ function SidebarMenuButton({
|
|
|
4369
4517
|
{
|
|
4370
4518
|
align: "center",
|
|
4371
4519
|
hidden: state !== "collapsed" || isMobile,
|
|
4372
|
-
side: "
|
|
4520
|
+
side: "inline-end",
|
|
4373
4521
|
...tooltipProps
|
|
4374
4522
|
}
|
|
4375
4523
|
)
|
|
@@ -4494,6 +4642,7 @@ function SidebarMenuSubButton({
|
|
|
4494
4642
|
defaultTagName: "a",
|
|
4495
4643
|
props: mergeProps(
|
|
4496
4644
|
{
|
|
4645
|
+
"aria-current": isActive ? "page" : void 0,
|
|
4497
4646
|
className: cn("a63-Sidebar-menu-sub-button", className),
|
|
4498
4647
|
"data-active": isActive,
|
|
4499
4648
|
"data-sidebar": "menu-sub-button",
|
|
@@ -4758,6 +4907,7 @@ function SidebarNavCollapsibleItem({
|
|
|
4758
4907
|
render: /* @__PURE__ */ jsx(
|
|
4759
4908
|
SidebarMenuButton,
|
|
4760
4909
|
{
|
|
4910
|
+
"aria-current": void 0,
|
|
4761
4911
|
className: cn("a63-SidebarNavTree-item", "a63-SidebarNavTree-row-trigger"),
|
|
4762
4912
|
isActive,
|
|
4763
4913
|
size: "sm",
|
|
@@ -4925,10 +5075,10 @@ function TabsPanel({
|
|
|
4925
5075
|
}
|
|
4926
5076
|
var variantStyles = {
|
|
4927
5077
|
default: {
|
|
4928
|
-
"--border-radius": "var(--radius)",
|
|
4929
|
-
"--normal-bg": "var(--
|
|
4930
|
-
"--normal-border": "var(--border)",
|
|
4931
|
-
"--normal-text": "var(--
|
|
5078
|
+
"--border-radius": "var(--radius-lg)",
|
|
5079
|
+
"--normal-bg": "var(--a63-surface-overlay)",
|
|
5080
|
+
"--normal-border": "var(--a63-border-subtle)",
|
|
5081
|
+
"--normal-text": "var(--a63-text-primary)"
|
|
4932
5082
|
},
|
|
4933
5083
|
inverse: {
|
|
4934
5084
|
"--border-radius": "var(--radius-pill)",
|
|
@@ -5314,6 +5464,7 @@ function UIProvider({
|
|
|
5314
5464
|
className,
|
|
5315
5465
|
density,
|
|
5316
5466
|
designLanguage,
|
|
5467
|
+
dir,
|
|
5317
5468
|
input,
|
|
5318
5469
|
mode,
|
|
5319
5470
|
render,
|
|
@@ -5343,13 +5494,15 @@ function UIProvider({
|
|
|
5343
5494
|
...input !== void 0 && { "data-a63-input": input },
|
|
5344
5495
|
...mode !== void 0 && { "data-a63-mode": resolvedMode },
|
|
5345
5496
|
...surface !== void 0 && { "data-a63-surface": surface },
|
|
5346
|
-
...theme !== void 0 && { "data-a63-theme": theme }
|
|
5497
|
+
...theme !== void 0 && { "data-a63-theme": theme },
|
|
5498
|
+
...dir !== void 0 && { dir }
|
|
5347
5499
|
};
|
|
5348
|
-
|
|
5500
|
+
const element = useRender({
|
|
5349
5501
|
defaultTagName: "div",
|
|
5350
5502
|
props: mergeProps(defaultProps, props),
|
|
5351
5503
|
render
|
|
5352
|
-
})
|
|
5504
|
+
});
|
|
5505
|
+
return /* @__PURE__ */ jsx(UIEnvironmentContext.Provider, { value: environment, children: dir === "ltr" || dir === "rtl" ? /* @__PURE__ */ jsx(DirectionProvider, { direction: dir, children: element }) : element });
|
|
5353
5506
|
}
|
|
5354
5507
|
function useUIEnvironment() {
|
|
5355
5508
|
return React3.useContext(UIEnvironmentContext);
|