@botiverse/raft-ui 0.21.2 → 0.22.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/CHANGELOG.md +51 -0
- package/dist/{inbox-item.recipe-CuJPcy-3.mjs → inbox-item.recipe-3j4DHKZ2.mjs} +1586 -288
- package/dist/{index-C1FHbVfH.d.mts → index-DT1Hg5N-.d.mts} +235 -9
- package/dist/index.d.mts +6 -77
- package/dist/index.mjs +47 -449
- package/dist/styles.css +7 -6
- package/dist/wip.d.mts +44 -3
- package/dist/wip.mjs +2 -2
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -625,9 +625,9 @@ textarea:-webkit-autofill:disabled {
|
|
|
625
625
|
background-image: linear-gradient(var(--fill-medium), var(--fill-medium));
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
-
/* A mark that leads a line of text: the icon
|
|
629
|
-
|
|
630
|
-
text, centred on it, and stays there when the text wraps
|
|
628
|
+
/* A mark that leads a line of text: the icon at the start of a banner, a
|
|
629
|
+
toast or a panel notice, or the status light of a chip, sits on the first
|
|
630
|
+
line of its text, centred on it, and stays there when the text wraps
|
|
631
631
|
(design/foundations/alignment.md#a-mark-that-leads-text). In Space
|
|
632
632
|
Grotesk's metrics the centre of the line box is the centre of the cap
|
|
633
633
|
height (to 0.006em); Chromium's rounding can lift the letters 0.5px, which
|
|
@@ -641,9 +641,10 @@ textarea:-webkit-autofill:disabled {
|
|
|
641
641
|
|
|
642
642
|
`lead-dot` places a status light the same way, in a box one line tall,
|
|
643
643
|
and keeps it at its one size beside text, 9px with a 1.5px ink edge
|
|
644
|
-
(status.md#sizes). It is kept at 9px inside components (
|
|
645
|
-
|
|
646
|
-
|
|
644
|
+
(status.md#sizes). It is kept at 9px inside components (Badge,
|
|
645
|
+
PanelActivity, a panel header); when placing Status yourself, don't pass
|
|
646
|
+
a size. A notice never uses a status light to say what kind of notice
|
|
647
|
+
it is; it leads with its intent's icon (status.md#sizes). */
|
|
647
648
|
@utility lead-icon {
|
|
648
649
|
flex-shrink: 0;
|
|
649
650
|
align-self: start;
|
package/dist/wip.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $o as VariantProps, Aa as DropdownMenuLinkItemProps, Br as PreviewCardMetaProps, Ci as MobileNavServerPopoverRowBody, Cn as MessageItemDelegatedByProps, Cr as PreviewCardActions, Di as MobileNavServerPopoverRowLabel, Do as DialogFooterNoteProps, Dr as PreviewCardBody, E as MessageQuotedPreviewAuthorDelegatedByProps, Ei as MobileNavServerPopoverRowDescriptionProps, Eo as DialogFooterNote, Fr as PreviewCardFooter, Ir as PreviewCardFooterProps, Li as PopoverBody, Mi as PopoverActionsProps, Nr as PreviewCardEyebrow, Oi as MobileNavServerPopoverRowLabelProps, Or as PreviewCardBodyProps, Pr as PreviewCardEyebrowProps, Ri as PopoverBodyProps, Ro as DialogSheetBack, Si as MobileNavServerPopoverRow, Sn as MessageItemDelegatedByNameProps, So as DialogContentProps, T as MessageQuotedPreviewAuthorDelegatedBy, Ti as MobileNavServerPopoverRowDescription, Uo as DialogTitleProps, Wo as DialogTrigger, Yo as ButtonProps, _i as MobileNavServerPopoverGroup, _n as MessageItemDelegatedAvatarProps, a as MessageListJumpPillDismissProps, bi as MobileNavServerPopoverListProps, bn as MessageItemDelegatedByButtonProps, c as MessageListJumpPillProps, ci as MobileNavServerItem, di as MobileNavServerPopoverContent, dt as MessageReferenceIcon, es as DataAttributes, fi as MobileNavServerPopoverContentProps, fo as DialogCommit, ft as MessageReferenceIconProps, gi as MobileNavServerPopoverDestinationsProps, gn as MessageItemDelegatedAvatar, go as Dialog, hi as MobileNavServerPopoverDestinations, ho as DialogSheetContentProps, i as MessageListJumpPillDismiss, ji as PopoverActions, ka as DropdownMenuLinkItem, ki as MobileNavServerPopoverRowProps, li as MobileNavServerItemProps, mi as MobileNavServerPopoverDestinationProps, mo as DialogSheetContent, n as MessageListJumpControlsProps, o as MessageListJumpPillGroup, pi as MobileNavServerPopoverDestination, po as DialogCommitProps, r as MessageListJumpPill, s as MessageListJumpPillGroupProps, t as MessageListJumpControls, ts as StyledProps, ui as MobileNavServerPopover, uo as TextLinkProps, vi as MobileNavServerPopoverGroupProps, vn as MessageItemDelegatedBy, wi as MobileNavServerPopoverRowBodyProps, wr as PreviewCardActionsProps, xi as MobileNavServerPopoverProps, xn as MessageItemDelegatedByName, yi as MobileNavServerPopoverList, yn as MessageItemDelegatedByButton, yo as DialogClose, zo as DialogSheetBackProps, zr as PreviewCardMeta } from "./index-DT1Hg5N-.mjs";
|
|
2
2
|
import { CSSProperties, ComponentProps, ComponentPropsWithRef, PointerEvent, ReactNode, RefObject } from "react";
|
|
3
3
|
import { Button } from "@base-ui/react/button";
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
-
import { Combobox } from "@base-ui/react/combobox";
|
|
6
5
|
import { PointerSensor, TouchSensor, TouchSensorOptions } from "@dnd-kit/core";
|
|
6
|
+
import { Combobox } from "@base-ui/react/combobox";
|
|
7
7
|
import { Meter as Meter$1 } from "@base-ui/react/meter";
|
|
8
8
|
//#region src/components/combobox-select/combobox-select.types.d.ts
|
|
9
9
|
type ComboboxSelectValue = string | number;
|
|
@@ -500,4 +500,45 @@ export declare function MeterTrack({ className, ...props }: MeterTrackProps): im
|
|
|
500
500
|
type MeterIndicatorProps = StyledProps<Meter$1.Indicator.Props>;
|
|
501
501
|
export declare function MeterIndicator({ className, ...props }: MeterIndicatorProps): import("react").JSX.Element;
|
|
502
502
|
//#endregion
|
|
503
|
-
|
|
503
|
+
//#region src/lib/overlay-depth.d.ts
|
|
504
|
+
/**
|
|
505
|
+
* A modal surface: a centred dialog (Dialog, AlertDialog, or an app's own
|
|
506
|
+
* modal) or a sheet (Drawer).
|
|
507
|
+
*/
|
|
508
|
+
type OverlayLayerKind = "dialog" | "drawer";
|
|
509
|
+
type OverlayLayerProviderProps = {
|
|
510
|
+
/**
|
|
511
|
+
* What the surface is. Use `"dialog"` for an app's own modal, whatever it
|
|
512
|
+
* looks like: `"drawer"` is for a Base UI Drawer, which nests under another
|
|
513
|
+
* drawer by itself and only draws its own scrim over a `"dialog"`.
|
|
514
|
+
*/
|
|
515
|
+
kind: OverlayLayerKind;
|
|
516
|
+
/** Whether it dims what is under it. A non-modal surface adds nothing. */
|
|
517
|
+
modal: boolean;
|
|
518
|
+
children?: ReactNode;
|
|
519
|
+
};
|
|
520
|
+
/**
|
|
521
|
+
* Tells everything under it that a modal surface is open, so a raft-ui
|
|
522
|
+
* Dialog, AlertDialog or Drawer opened from inside draws the lighter nested
|
|
523
|
+
* scrim (design/foundations/elevation.md#stacked-overlays). raft-ui's own
|
|
524
|
+
* roots add one by themselves; an app's own modal (its own backdrop, Esc and
|
|
525
|
+
* focus) wraps its scrim and its content in one to join the stack, and reads
|
|
526
|
+
* `useParentOverlayKind` inside it to pick its own scrim. Modal overlays only:
|
|
527
|
+
* a non-modal one passes `modal={false}`, adds nothing, and must not call
|
|
528
|
+
* `useParentOverlayKind` (it would read the layer below as its own).
|
|
529
|
+
*/
|
|
530
|
+
export declare function OverlayLayerProvider({ kind, modal, children }: OverlayLayerProviderProps): import("react").JSX.Element;
|
|
531
|
+
/**
|
|
532
|
+
* The modal surface this overlay's own surface was opened from, or null when
|
|
533
|
+
* it is the first. Call it inside the surface's own `OverlayLayerProvider`
|
|
534
|
+
* (for raft-ui's overlays, inside their root): the last entry is the surface
|
|
535
|
+
* itself and the one before it is its parent. Not null means the surface is
|
|
536
|
+
* stacked over another and draws `layer-backdrop-nested` instead of
|
|
537
|
+
* `layer-backdrop`. Modal overlays only: under `modal={false}` nothing is
|
|
538
|
+
* added, so the last entry is the parent and this returns the wrong layer. It reads React context, so it sees the surfaces whose
|
|
539
|
+
* tree this one is rendered in, portals included; one opened from outside
|
|
540
|
+
* that tree is not stacked on it here.
|
|
541
|
+
*/
|
|
542
|
+
export declare function useParentOverlayKind(): OverlayLayerKind | null;
|
|
543
|
+
//#endregion
|
|
544
|
+
export { Dialog as AnnouncementDialog, DialogClose as AnnouncementDialogClose, DialogTrigger as AnnouncementDialogTrigger, type ComboboxSelectGroup, type ComboboxSelectMessages, type ComboboxSelectOption, type ComboboxSelectProps, type ComboboxSelectSelection, type ComboboxSelectValue, type CommentCardMetaProps, type CommentCardProps, type CommentCardQuoteProps, type CommentCardTriggerProps, type CommentEntryAuthorProps, type CommentEntryBodyProps, type CommentEntryHeaderProps, type CommentEntryProps, type CommentEntryTimeProps, type CommentMarginItemProps, type CommentMarginLayout, type CommentMarginLayoutItem, type CommentMarginLayoutOptions, type CommentMarginProps, type CommentMarkerProps, DialogCommit, type DialogCommitProps, DialogFooterNote, type DialogFooterNoteProps, DialogSheetBack, type DialogSheetBackProps, DialogSheetContent, type DialogSheetContentProps, DropdownMenuLinkItem, type DropdownMenuLinkItemProps, type EllipsisProps, type EllipsisState, type EllipsisToggleProps, type HoldThenMoveOptions, type InboxItemLeadingBadgeProps, MessageItemDelegatedAvatar, type MessageItemDelegatedAvatarProps, MessageItemDelegatedBy, MessageItemDelegatedByButton, type MessageItemDelegatedByButtonProps, MessageItemDelegatedByName, type MessageItemDelegatedByNameProps, type MessageItemDelegatedByProps, MessageListJumpControls, type MessageListJumpControlsProps, MessageListJumpPill, MessageListJumpPillDismiss, type MessageListJumpPillDismissProps, MessageListJumpPillGroup, type MessageListJumpPillGroupProps, type MessageListJumpPillProps, MessageQuotedPreviewAuthorDelegatedBy, type MessageQuotedPreviewAuthorDelegatedByProps, MessageReferenceIcon, type MessageReferenceIconProps, type MeterHeaderProps, type MeterIndicatorProps, type MeterLabelProps, type MeterProps, type MeterTrackProps, type MeterValueProps, MobileNavServerItem, type MobileNavServerItemProps, MobileNavServerPopover, MobileNavServerPopoverContent, type MobileNavServerPopoverContentProps, MobileNavServerPopoverDestination, type MobileNavServerPopoverDestinationProps, MobileNavServerPopoverDestinations, type MobileNavServerPopoverDestinationsProps, MobileNavServerPopoverGroup, type MobileNavServerPopoverGroupProps, MobileNavServerPopoverList, type MobileNavServerPopoverListProps, type MobileNavServerPopoverProps, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, type MobileNavServerPopoverRowBodyProps, MobileNavServerPopoverRowDescription, type MobileNavServerPopoverRowDescriptionProps, MobileNavServerPopoverRowLabel, type MobileNavServerPopoverRowLabelProps, type MobileNavServerPopoverRowProps, type OverlayLayerKind, type OverlayLayerProviderProps, PopoverActions, type PopoverActionsProps, PopoverBody, type PopoverBodyProps, PreviewCardActions, type PreviewCardActionsProps, PreviewCardBody, type PreviewCardBodyProps, PreviewCardEyebrow, type PreviewCardEyebrowProps, PreviewCardFooter, type PreviewCardFooterProps, PreviewCardMeta, type PreviewCardMetaProps, type UseCommentMarginFitsOptions };
|
package/dist/wip.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Br as DialogFooterNote, Er as TooltipContent, Gr as DialogSheetBack, Gt as measureContent, In as useHoldThenMoveTouchSensor, Ir as DialogClose, Jr as DialogTrigger, Jt as readNow, Kt as measureElement, Lr as DialogContent, Mr as DialogSheetContent, Pr as Dialog, Qt as PreviewCardBody, Sn as PopoverActions, Tn as PopoverBody, Tr as Tooltip, Wt as useOverflowTitle, Xn as DropdownMenuLinkItem, Xt as PreviewCardActions, Zr as TextLink, _n as MobileNavServerPopoverRow, _t as MessageItemDelegatedByName, a as MessageListJumpPillGroup, ai as useParentOverlayKind, bn as MobileNavServerPopoverRowLabel, ci as useTheme, dn as MobileNavServerPopover, ei as Button$1, fn as MobileNavServerPopoverContent, gn as MobileNavServerPopoverList, gt as MessageItemDelegatedByButton, h as MessageQuotedPreviewAuthorDelegatedBy, hn as MobileNavServerPopoverGroup, ht as MessageItemDelegatedBy, i as MessageListJumpPillDismiss, ii as OverlayLayerProvider, in as PreviewCardMeta, jr as DialogCommit, kr as TooltipTrigger, mn as MobileNavServerPopoverDestinations, mt as MessageItemDelegatedAvatar, n as MessageListJumpControls, nn as PreviewCardFooter, pn as MobileNavServerPopoverDestination, qr as DialogTitle, qt as observeTruncation, r as MessageListJumpPill, ri as defaultNativeButton, si as useThemeScopeProps, t as inboxItem, tn as PreviewCardEyebrow, ui as tv, un as MobileNavServerItem, vn as MobileNavServerPopoverRowBody, yn as MobileNavServerPopoverRowDescription, z as MessageReferenceIcon } from "./inbox-item.recipe-3j4DHKZ2.mjs";
|
|
2
2
|
import { Check, ChevronDown, LoaderCircle, Plus, X } from "lucide-react";
|
|
3
3
|
import { createContext, use, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1614,4 +1614,4 @@ function MeterIndicator({ className, ...props }) {
|
|
|
1614
1614
|
});
|
|
1615
1615
|
}
|
|
1616
1616
|
//#endregion
|
|
1617
|
-
export { Dialog as AnnouncementDialog, AnnouncementDialogAction, AnnouncementDialogBody, DialogClose as AnnouncementDialogClose, AnnouncementDialogContent, AnnouncementDialogFooter, AnnouncementDialogHeader, AnnouncementDialogLabel, AnnouncementDialogPicture, AnnouncementDialogSecondaryAction, AnnouncementDialogText, AnnouncementDialogTitle, DialogTrigger as AnnouncementDialogTrigger, COMMENT_HIGHLIGHT, COMMENT_HIGHLIGHT_ACTIVE, ComboboxSelect, CommentCard, CommentCardMeta, CommentCardQuote, CommentCardTrigger, CommentEntry, CommentEntryAuthor, CommentEntryBody, CommentEntryHeader, CommentEntryTime, CommentMargin, CommentMarginItem, CommentMarker, DropdownMenuLinkItem, Ellipsis, EllipsisToggle, InboxItemLeadingBadge, MessageItemDelegatedAvatar, MessageItemDelegatedBy, MessageItemDelegatedByButton, MessageItemDelegatedByName, MessageListJumpControls, MessageListJumpPill, MessageListJumpPillDismiss, MessageListJumpPillGroup, MessageQuotedPreviewAuthorDelegatedBy, Meter, MeterHeader, MeterIndicator, MeterLabel, MeterTrack, MeterValue, resolveCommentMarginLayout, setCommentHighlights, useCommentMarginFits, useHoldThenMoveTouchSensor, useTruncated };
|
|
1617
|
+
export { Dialog as AnnouncementDialog, AnnouncementDialogAction, AnnouncementDialogBody, DialogClose as AnnouncementDialogClose, AnnouncementDialogContent, AnnouncementDialogFooter, AnnouncementDialogHeader, AnnouncementDialogLabel, AnnouncementDialogPicture, AnnouncementDialogSecondaryAction, AnnouncementDialogText, AnnouncementDialogTitle, DialogTrigger as AnnouncementDialogTrigger, COMMENT_HIGHLIGHT, COMMENT_HIGHLIGHT_ACTIVE, ComboboxSelect, CommentCard, CommentCardMeta, CommentCardQuote, CommentCardTrigger, CommentEntry, CommentEntryAuthor, CommentEntryBody, CommentEntryHeader, CommentEntryTime, CommentMargin, CommentMarginItem, CommentMarker, DialogCommit, DialogFooterNote, DialogSheetBack, DialogSheetContent, DropdownMenuLinkItem, Ellipsis, EllipsisToggle, InboxItemLeadingBadge, MessageItemDelegatedAvatar, MessageItemDelegatedBy, MessageItemDelegatedByButton, MessageItemDelegatedByName, MessageListJumpControls, MessageListJumpPill, MessageListJumpPillDismiss, MessageListJumpPillGroup, MessageQuotedPreviewAuthorDelegatedBy, MessageReferenceIcon, Meter, MeterHeader, MeterIndicator, MeterLabel, MeterTrack, MeterValue, MobileNavServerItem, MobileNavServerPopover, MobileNavServerPopoverContent, MobileNavServerPopoverDestination, MobileNavServerPopoverDestinations, MobileNavServerPopoverGroup, MobileNavServerPopoverList, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, MobileNavServerPopoverRowDescription, MobileNavServerPopoverRowLabel, OverlayLayerProvider, PopoverActions, PopoverBody, PreviewCardActions, PreviewCardBody, PreviewCardEyebrow, PreviewCardFooter, PreviewCardMeta, resolveCommentMarginLayout, setCommentHighlights, useCommentMarginFits, useHoldThenMoveTouchSensor, useParentOverlayKind, useTruncated };
|