@botiverse/raft-ui 0.29.0 → 0.30.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 +14 -0
- package/dist/{inbox-item-B-IdTaxl.mjs → inbox-item-69Tx19JG.mjs} +230 -1
- package/dist/index.mjs +1 -227
- package/dist/wip.d.mts +64 -1
- package/dist/wip.mjs +243 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [0.30.0](https://github.com/botiverse/raft-design/compare/v0.29.0...v0.30.0) (2026-10-23)
|
|
2
|
+
|
|
3
|
+
### Design System
|
|
4
|
+
|
|
5
|
+
- **A dialog whose job is to choose keeps an open list**: when choosing is the dialog's main content (a computer to move an agent to, people to add), the choices stay open as a list at any count, not a select: a radio circle for one choice, a checkbox for several. A search field shows always when people look for something they know by name, and from 6 choices when they choose by comparing. Filtering never clears the choice; the chosen rows stay first. A row may have two description lines, and a details button at its end outside the row's label. ([#767](https://github.com/botiverse/raft-design/pull/767), [#772](https://github.com/botiverse/raft-design/pull/772))
|
|
6
|
+
- Why: a dropdown hides what people came to compare (stdrc, xxchan).
|
|
7
|
+
- Affects: a rule for products; raft-ui adds `ChoiceList` (wip).
|
|
8
|
+
- Docs: https://raft-design.botiverse.build/components/choice-list/
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **ChoiceList** (wip, `@botiverse/raft-ui/wip`): an always-open list to choose one (`value: string | null`) or several (`multiple`, `string[]`), built on Base UI RadioGroup / CheckboxGroup. `items` take a label, search text, up to two description lines, media, a row-end action and disabled; `search="auto" | "always"`; `searchLabel` and `clearSearchLabel` are required. Rows are 36px with a mouse and 44px on a touch screen. ([#772](https://github.com/botiverse/raft-design/pull/772))
|
|
13
|
+
- Docs: https://raft-design.botiverse.build/components/choice-list/
|
|
14
|
+
|
|
1
15
|
## [0.29.0](https://github.com/botiverse/raft-design/compare/v0.28.0...v0.29.0) (2026-10-23)
|
|
2
16
|
|
|
3
17
|
### Design System
|
|
@@ -16,6 +16,9 @@ import { Menu } from "@base-ui/react/menu";
|
|
|
16
16
|
import { Popover } from "@base-ui/react/popover";
|
|
17
17
|
import { PointerSensor, TouchSensor, useSensor } from "@dnd-kit/core";
|
|
18
18
|
import { PreviewCard } from "@base-ui/react/preview-card";
|
|
19
|
+
import { Input } from "@base-ui/react/input";
|
|
20
|
+
import { Radio } from "@base-ui/react/radio";
|
|
21
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
19
22
|
import { Toggle } from "@base-ui/react/toggle";
|
|
20
23
|
import { Toolbar } from "@base-ui/react/toolbar";
|
|
21
24
|
//#region src/lib/decision-width.ts
|
|
@@ -3499,6 +3502,232 @@ function useOverflowTitle(ref, title) {
|
|
|
3499
3502
|
}, [own, ref]);
|
|
3500
3503
|
}
|
|
3501
3504
|
//#endregion
|
|
3505
|
+
//#region src/components/input-group/input-group.tsx
|
|
3506
|
+
const inputGroup = tv$1({
|
|
3507
|
+
slots: {
|
|
3508
|
+
root: [
|
|
3509
|
+
"group/input-group relative flex w-full min-w-0 items-center",
|
|
3510
|
+
"has-data-[input-group-trim=inline-end]:[--ig-control-pr:0]",
|
|
3511
|
+
"h-control overflow-hidden rounded-control border-[1.5px] border-line-field bg-layer-card text-foreground",
|
|
3512
|
+
"shadow-none transition-shadow duration-90 ease-out has-focus-visible:shadow-focus",
|
|
3513
|
+
"has-[[data-slot=input-group-control][data-invalid]]:border-danger-strong",
|
|
3514
|
+
"has-[[data-slot=input-group-control]:disabled]:cursor-not-allowed has-[[data-slot=input-group-control]:disabled]:border-line-hairline has-[[data-slot=input-group-control]:disabled]:bg-fill-muted",
|
|
3515
|
+
"has-[[data-slot=input-group-control]:disabled]:[--ig-addon-fg:var(--foreground-disabled)]",
|
|
3516
|
+
"has-[[data-slot=input-group-control]:disabled]:[--ig-text-fg:var(--foreground-disabled)]"
|
|
3517
|
+
],
|
|
3518
|
+
addon: [
|
|
3519
|
+
"flex shrink-0 items-center justify-center gap-2 px-3",
|
|
3520
|
+
"select-none",
|
|
3521
|
+
"text-(--ig-addon-fg,var(--ig-addon-fg-default,var(--foreground-hint)))",
|
|
3522
|
+
"[&>svg:not([class*='size-'])]:size-4.5"
|
|
3523
|
+
],
|
|
3524
|
+
text: [
|
|
3525
|
+
"flex min-w-0 max-w-1/2 shrink-0 items-center px-3",
|
|
3526
|
+
"select-none",
|
|
3527
|
+
"font-mono text-mono-code",
|
|
3528
|
+
"text-(--ig-text-fg,var(--ig-text-fg-default,var(--foreground-hint)))"
|
|
3529
|
+
],
|
|
3530
|
+
textInner: ["min-w-0 truncate"],
|
|
3531
|
+
control: [
|
|
3532
|
+
"min-w-0 flex-1 bg-transparent pl-3 outline-none",
|
|
3533
|
+
"pr-(--ig-control-pr,0.75rem)",
|
|
3534
|
+
"h-full py-0 font-heading text-field font-field",
|
|
3535
|
+
"text-foreground placeholder:text-foreground-hint",
|
|
3536
|
+
"disabled:cursor-not-allowed disabled:text-foreground-disabled disabled:placeholder:text-foreground-disabled"
|
|
3537
|
+
]
|
|
3538
|
+
},
|
|
3539
|
+
variants: {
|
|
3540
|
+
align: {
|
|
3541
|
+
"inline-start": {
|
|
3542
|
+
addon: "order-first",
|
|
3543
|
+
text: "order-first"
|
|
3544
|
+
},
|
|
3545
|
+
"inline-end": {
|
|
3546
|
+
addon: "order-last",
|
|
3547
|
+
text: "order-last"
|
|
3548
|
+
}
|
|
3549
|
+
},
|
|
3550
|
+
variant: {
|
|
3551
|
+
default: {},
|
|
3552
|
+
container: {
|
|
3553
|
+
addon: [
|
|
3554
|
+
"self-stretch",
|
|
3555
|
+
"[--ig-addon-fg-default:var(--foreground-hint)]",
|
|
3556
|
+
"border-line-hairline bg-fill-muted"
|
|
3557
|
+
],
|
|
3558
|
+
text: [
|
|
3559
|
+
"self-stretch",
|
|
3560
|
+
"[--ig-text-fg-default:var(--foreground-hint)]",
|
|
3561
|
+
"border-line-hairline bg-fill-muted"
|
|
3562
|
+
]
|
|
3563
|
+
}
|
|
3564
|
+
}
|
|
3565
|
+
},
|
|
3566
|
+
compoundVariants: [
|
|
3567
|
+
{
|
|
3568
|
+
variant: "default",
|
|
3569
|
+
align: "inline-start",
|
|
3570
|
+
class: {
|
|
3571
|
+
addon: "[&~[data-slot=input-group-control]]:pl-0",
|
|
3572
|
+
text: "[&~[data-slot=input-group-control]]:pl-0"
|
|
3573
|
+
}
|
|
3574
|
+
},
|
|
3575
|
+
{
|
|
3576
|
+
variant: "container",
|
|
3577
|
+
align: "inline-start",
|
|
3578
|
+
class: {
|
|
3579
|
+
addon: "border-r",
|
|
3580
|
+
text: "border-r"
|
|
3581
|
+
}
|
|
3582
|
+
},
|
|
3583
|
+
{
|
|
3584
|
+
variant: "container",
|
|
3585
|
+
align: "inline-end",
|
|
3586
|
+
class: {
|
|
3587
|
+
addon: "border-l",
|
|
3588
|
+
text: "border-l"
|
|
3589
|
+
}
|
|
3590
|
+
},
|
|
3591
|
+
{
|
|
3592
|
+
variant: "default",
|
|
3593
|
+
align: "inline-start",
|
|
3594
|
+
class: {
|
|
3595
|
+
addon: "pr-2",
|
|
3596
|
+
text: "pr-0.5"
|
|
3597
|
+
}
|
|
3598
|
+
},
|
|
3599
|
+
{
|
|
3600
|
+
variant: "default",
|
|
3601
|
+
align: "inline-end",
|
|
3602
|
+
class: {
|
|
3603
|
+
addon: [
|
|
3604
|
+
"pl-2",
|
|
3605
|
+
"*:data-[slot=button]:size-control-embedded *:data-[slot=button]:rounded-chip",
|
|
3606
|
+
"[&>[data-slot=button]_svg:not([class*='size-'])]:size-4",
|
|
3607
|
+
"[&>[data-slot=button]:last-child]:me-[calc(var(--control-embedded-inset)-0.75rem-1px)]"
|
|
3608
|
+
],
|
|
3609
|
+
text: "pl-0.5"
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
],
|
|
3613
|
+
defaultVariants: {
|
|
3614
|
+
align: "inline-start",
|
|
3615
|
+
variant: "default"
|
|
3616
|
+
}
|
|
3617
|
+
});
|
|
3618
|
+
function InputGroup({ className, ...props }) {
|
|
3619
|
+
const { root } = inputGroup();
|
|
3620
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3621
|
+
"data-slot": "input-group",
|
|
3622
|
+
className: root({ className }),
|
|
3623
|
+
...props
|
|
3624
|
+
});
|
|
3625
|
+
}
|
|
3626
|
+
function InputGroupAddonRoot({ align = "inline-start", variant = "default", className, ...props }) {
|
|
3627
|
+
const { addon } = inputGroup({
|
|
3628
|
+
align,
|
|
3629
|
+
variant
|
|
3630
|
+
});
|
|
3631
|
+
return /* @__PURE__ */ jsx("div", {
|
|
3632
|
+
"data-slot": "input-group-addon",
|
|
3633
|
+
"data-align": align,
|
|
3634
|
+
"data-variant": variant,
|
|
3635
|
+
"data-input-group-trim": variant === "default" && align === "inline-end" ? align : void 0,
|
|
3636
|
+
className: addon({ className }),
|
|
3637
|
+
...props
|
|
3638
|
+
});
|
|
3639
|
+
}
|
|
3640
|
+
function TextAddon({ align = "inline-start", variant = "default", className, ref, title, children, ...props }) {
|
|
3641
|
+
const { text, textInner } = inputGroup({
|
|
3642
|
+
align,
|
|
3643
|
+
variant
|
|
3644
|
+
});
|
|
3645
|
+
const overflowRef = useOverflowTitle(ref, title);
|
|
3646
|
+
return /* @__PURE__ */ jsx("span", {
|
|
3647
|
+
ref: overflowRef,
|
|
3648
|
+
title,
|
|
3649
|
+
"data-slot": "input-group-text",
|
|
3650
|
+
"data-align": align,
|
|
3651
|
+
"data-variant": variant,
|
|
3652
|
+
"data-input-group-trim": variant === "default" && align === "inline-end" ? align : void 0,
|
|
3653
|
+
className: text({ className }),
|
|
3654
|
+
...props,
|
|
3655
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
3656
|
+
"data-slot": "input-group-text-value",
|
|
3657
|
+
className: textInner(),
|
|
3658
|
+
children
|
|
3659
|
+
})
|
|
3660
|
+
});
|
|
3661
|
+
}
|
|
3662
|
+
const InputGroupAddon = Object.assign(InputGroupAddonRoot, { Text: TextAddon });
|
|
3663
|
+
function InputGroupInput({ className, suppressPasswordManager, "data-invalid": dataInvalid, ...props }) {
|
|
3664
|
+
const { control } = inputGroup();
|
|
3665
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
3666
|
+
"data-slot": "input-group-control",
|
|
3667
|
+
className: control({ className: [suppressPasswordManager && "keeper-ignore", className] }),
|
|
3668
|
+
"data-1p-ignore": suppressPasswordManager ? "true" : void 0,
|
|
3669
|
+
"data-bwignore": suppressPasswordManager ? "true" : void 0,
|
|
3670
|
+
"data-form-type": suppressPasswordManager ? "other" : void 0,
|
|
3671
|
+
"data-lpignore": suppressPasswordManager ? "true" : void 0,
|
|
3672
|
+
...props,
|
|
3673
|
+
"data-invalid": dataInvalid || void 0,
|
|
3674
|
+
"aria-invalid": dataInvalid ? "true" : void 0
|
|
3675
|
+
});
|
|
3676
|
+
}
|
|
3677
|
+
//#endregion
|
|
3678
|
+
//#region src/components/radio-group/radio-group.tsx
|
|
3679
|
+
const radioGroup = tv$1({ slots: {
|
|
3680
|
+
root: [
|
|
3681
|
+
"grid w-full gap-2",
|
|
3682
|
+
"data-disabled:[&>label]:cursor-not-allowed data-disabled:[&>label]:text-foreground-disabled",
|
|
3683
|
+
"data-disabled:[&>label_*]:text-foreground-disabled",
|
|
3684
|
+
"font-sans [&>label]:font-semibold"
|
|
3685
|
+
],
|
|
3686
|
+
item: [
|
|
3687
|
+
"relative inline-flex shrink-0 touch-manipulation items-center justify-center rounded-full outline-none",
|
|
3688
|
+
"data-disabled:cursor-not-allowed",
|
|
3689
|
+
"after:absolute after:-inset-x-3 after:-inset-y-2 after:content-['']",
|
|
3690
|
+
"pointer-coarse:after:-inset-y-[calc(--spacing(3)+1.5px)]",
|
|
3691
|
+
"[label>&]:my-[max(0px,calc((1lh-1.25rem)/2))]",
|
|
3692
|
+
"[label>&]:after:-inset-y-[calc(max(0px,(1lh-1.25rem)/2)+5.5px)]",
|
|
3693
|
+
"size-5 border-[1.5px] border-line-strong bg-layer-card text-foreground",
|
|
3694
|
+
"focus-visible:shadow-focus",
|
|
3695
|
+
"data-disabled:border-foreground-disabled data-disabled:bg-fill-muted data-disabled:text-foreground-disabled"
|
|
3696
|
+
],
|
|
3697
|
+
indicator: ["pointer-events-none flex size-full items-center justify-center"],
|
|
3698
|
+
dot: ["block rounded-full bg-current", "size-2"]
|
|
3699
|
+
} });
|
|
3700
|
+
function RadioGroup$1({ className, ...props }) {
|
|
3701
|
+
const { root } = radioGroup();
|
|
3702
|
+
return /* @__PURE__ */ jsx(RadioGroup, {
|
|
3703
|
+
"data-slot": "radio-group",
|
|
3704
|
+
className: root({ className }),
|
|
3705
|
+
...props
|
|
3706
|
+
});
|
|
3707
|
+
}
|
|
3708
|
+
function RadioGroupIndicator({ className, children, ...props }) {
|
|
3709
|
+
const { indicator, dot } = radioGroup();
|
|
3710
|
+
return /* @__PURE__ */ jsx(Radio.Indicator, {
|
|
3711
|
+
"data-slot": "radio-group-indicator",
|
|
3712
|
+
className: indicator({ className }),
|
|
3713
|
+
...props,
|
|
3714
|
+
children: children ?? /* @__PURE__ */ jsx("span", {
|
|
3715
|
+
"data-slot": "radio-group-dot",
|
|
3716
|
+
className: dot()
|
|
3717
|
+
})
|
|
3718
|
+
});
|
|
3719
|
+
}
|
|
3720
|
+
function RadioGroupItem({ appearance = "default", className, children, ...props }) {
|
|
3721
|
+
const { item } = radioGroup();
|
|
3722
|
+
const itemClassName = appearance === "none" ? cn("sr-only", "data-disabled:cursor-not-allowed", className) : item({ className });
|
|
3723
|
+
return /* @__PURE__ */ jsx(Radio.Root, {
|
|
3724
|
+
"data-slot": "radio-group-item",
|
|
3725
|
+
className: itemClassName,
|
|
3726
|
+
...props,
|
|
3727
|
+
children: children ?? (appearance === "default" ? /* @__PURE__ */ jsx(RadioGroupIndicator, {}) : null)
|
|
3728
|
+
});
|
|
3729
|
+
}
|
|
3730
|
+
//#endregion
|
|
3502
3731
|
//#region src/components/avatar/avatar.tsx
|
|
3503
3732
|
const avatar = tv$1({
|
|
3504
3733
|
slots: {
|
|
@@ -5996,4 +6225,4 @@ function InboxItemActions({ className, render, reveal, ...props }) {
|
|
|
5996
6225
|
});
|
|
5997
6226
|
}
|
|
5998
6227
|
//#endregion
|
|
5999
|
-
export { MessageTextSelectionToolbarSeparator as $,
|
|
6228
|
+
export { MessageTextSelectionToolbarSeparator as $, headEdgePull as $i, PopoverClose as $n, ListRowBody as $r, MessageItemSearchMatch as $t, MessageList as A, DialogSurface as Ai, PreviewCardHeader as An, DropdownMenuShortcut as Ar, MessageItemBadgeSeparator as At, MessageQuotedPreviewHeader as B, buttonVariants as Bi, MobileNavServerPopoverDestination as Bn, PanelScrollContent as Br, MessageItemInlineStatus as Bt, MessageListJumpPill as C, DialogFooter as Ci, PreviewCardActions as Cn, DropdownMenuLinkItem as Cr, MessageReactionTooltipContent as Ct, MessageListEndFade as D, DialogOverlay as Di, PreviewCardDescription as Dn, DropdownMenuRadioItem as Dr, MessageReactionTooltipNames as Dt, MessageListDateDivider as E, DialogNav as Ei, PreviewCardContent as En, DropdownMenuRadioGroup as Er, MessageReactionTooltipNameText as Et, MessageQuotedPreviewAuthorDelegatedBy as F, TextLink as Fi, PreviewCardTitle as Fn, KbdGroup as Fr, MessageItemDelegatedAvatar as Ft, MessageQuotedPreviewUnavailable as G, withOverlayLayer as Gi, MobileNavServerPopoverRowBody as Gn, ScrollAreaCorner as Gr, MessageItemSenderGroup as Gt, MessageQuotedPreviewText as H, defaultNativeButton as Hi, MobileNavServerPopoverGroup as Hn, PanelSection as Hr, MessageItemSender as Ht, MessageQuotedPreviewAuthorMeta as I, TextLinkExternalIcon as Ii, PreviewCardTrigger as In, Panel as Ir, MessageItemDelegatedBy as It, MessageEmbedFooter as J, ThemeStateContext as Ji, Popover$1 as Jn, ScrollAreaViewport as Jr, MessageItemBody as Jt, MessageEmbed as K, useThemeScopeProps as Ki, MobileNavServerPopoverRowDescription as Kn, ScrollAreaScrollbar as Kr, MessageItemTime as Kt, MessageQuotedPreviewAuthorName as L, textLinkVariants as Li, MobileNavServerItem as Ln, PanelBody as Lr, MessageItemDelegatedByButton as Lt, MessageQuotedPreviewAttachment as M, DialogTrigger as Mi, PreviewCardPopup as Mn, DropdownMenuSubmenuTrigger as Mr, MessageItemSavedIndicator as Mt, MessageQuotedPreviewAttachments as N, PanelAction as Ni, PreviewCardPortal as Nn, DropdownMenuTrigger as Nr, MessageItemToolbar as Nt, MessageListHistoryLimited as O, DialogPortal as Oi, PreviewCardEyebrow as On, DropdownMenuRadioItemIndicator as Or, MessageReactionTooltipSeparator as Ot, MessageQuotedPreviewAuthor as P, panelToggleAction as Pi, PreviewCardSeparator as Pn, Kbd as Pr, MessageItemToolbarButton as Pt, MessageTextSelectionToolbarButton as Q, controlIconInset as Qi, PopoverBody as Qn, ListRow as Qr, MessageItemFooter as Qt, MessageQuotedPreviewChannel as R, DialogSheetReset as Ri, MobileNavServerPopover as Rn, PanelFooter as Rr, MessageItemDelegatedByName as Rt, MessageListJumpControls as S, DialogDescription as Si, PreviewCard$1 as Sn, DropdownMenuLabel as Sr, MessageReactionQuickRow as St, MessageListJumpPillGroup as T, DialogHeader as Ti, PreviewCardBody as Tn, DropdownMenuPortal as Tr, MessageReactionTooltipName as Tt, MessageQuotedPreviewThread as U, OverlayLayerProvider as Ui, MobileNavServerPopoverList as Un, ScrollArea$1 as Ur, MessageItemSenderBadges as Ut, MessageQuotedPreviewLoading as V, Spinner as Vi, MobileNavServerPopoverDestinations as Vn, PanelScrollViewport as Vr, MessageItemMeta as Vt, MessageQuotedPreviewTimestamp as W, useParentOverlayKind as Wi, MobileNavServerPopoverRow as Wn, ScrollAreaContent as Wr, MessageItemSenderButton as Wt, messageEmbed as X, stackedActions as Xi, PopoverArrow as Xn, CheckboxIndicator as Xr, MessageItemEdited as Xt, MessageEmbedHeader as Y, tv$1 as Yi, PopoverActions as Yn, Checkbox$1 as Yr, MessageItemContent as Yt, MessageTextSelectionToolbar as Z, useStackedActions as Zi, PopoverBackdrop as Zn, Status as Zr, MessageItemEmbedded as Zt, InboxItemTrailing as _, useMobileViewport as _i, useOverflowTitle as _n, DropdownMenuContent as _r, MessageReactionErrorIndicator as _t, InboxItemContext as a, ListRowMeta as ai, Avatar$1 as an, PopoverSeparator as ar, MessageReferenceIcon as at, useLatestRef as b, DialogClose as bi, observeTruncation as bn, DropdownMenuItemCount as br, MessageReactionPickerStatic as bt, InboxItemLeading as c, ListRowValue as ci, AvatarGroup as cn, PopoverViewport as cr, MessageReferencePending as ct, InboxItemMetadata as d, TooltipPortal as di, RadioGroup$1 as dn, MobileNavItem as dr, MessageReferenceText as dt, headEdges as ea, ListRowBottom as ei, MessageItemAvatarSlot as en, PopoverContent as er, MessageMultiSelect as et, InboxItemSelection as f, TooltipProvider as fi, RadioGroupIndicator as fn, MobileNavLabel as fr, MessageReferenceUnavailable as ft, InboxItemTitle as g, DialogSheetContent as gi, InputGroupInput as gn, DropdownMenuCheckboxItemIndicator as gr, MessageReactionCount as gt, InboxItemTimestamp as h, DialogCommit as hi, InputGroupAddon as hn, DropdownMenuCheckboxItem as hr, MessageReactionChip as ht, InboxItemContent as i, ListRowIcon as ii, searchHit as in, PopoverPortal as ir, MessageReferenceChip as it, MessageQuotedPreview as j, DialogTitle as ji, PreviewCardMeta as jn, DropdownMenuSubmenu as jr, MessageItemReadReceipt as jt, MessageListNotice as k, DialogSheetBack as ki, PreviewCardFooter as kn, DropdownMenuSeparator as kr, MessageItemBadge as kt, InboxItemMarks as l, Tooltip$1 as li, AvatarGroupCount as ln, useHoldThenMoveTouchSensor as lr, MessageReferenceReadMark as lt, InboxItemSubtitle as m, Badge as mi, InputGroup as mn, DropdownMenu as mr, MessageReactionAddButton as mt, InboxItemActions as n, ListRowDescription as ni, MessageItemGutter as nn, PopoverHeader as nr, MessageMultiSelectToolbar as nt, InboxItemHeading as o, ListRowTitle as oi, AvatarBadge as on, PopoverTitle as or, MessageReferenceIndicator as ot, InboxItemSender as p, TooltipTrigger as pi, RadioGroupItem as pn, MobileNavRoot as pr, inlineChip as pt, MessageEmbedContent as q, useTheme as qi, MobileNavServerPopoverRowLabel as qn, ScrollAreaThumb as qr, MessageItemAttachments as qt, InboxItemBody as r, ListRowGroup as ri, MessageItem as rn, PopoverPopup as rr, MessageMultiSelectToolbarActions as rt, InboxItemHoverTarget as s, ListRowTop as si, AvatarFallback as sn, PopoverTrigger as sr, MessageReferenceLabel as st, InboxItem as t, decisionWidth as ta, ListRowChevron as ti, MessageItemContinuationTime as tn, PopoverDescription as tr, MessageMultiSelectCheckbox as tt, InboxItemMessage as u, TooltipContent as ui, AvatarImage as un, useMouseOnlyPointerSensor as ur, MessageReferenceSuffix as ut, InboxItemTrigger as v, Dialog$1 as vi, measureContent as vn, DropdownMenuFooter as vr, MessageReactionGlyph as vt, MessageListJumpPillDismiss as w, DialogFooterNote as wi, PreviewCardArrow as wn, DropdownMenuPopup as wr, MessageReactionTooltipMeta as wt, Skeleton as x, DialogContent as xi, readNow as xn, DropdownMenuItemLabel as xr, MessageReactionQuickButton as xt, inboxItem as y, DialogBody as yi, measureElement as yn, DropdownMenuItem as yr, MessageReactionPickerContent as yt, MessageQuotedPreviewContent as z, Button$1 as zi, MobileNavServerPopoverContent as zn, PanelHeaderRoot as zr, MessageItemHeader as zt };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "./cn.mjs";
|
|
2
|
-
import { $ as MessageTextSelectionToolbarSeparator, $n as
|
|
2
|
+
import { $ as MessageTextSelectionToolbarSeparator, $i as headEdgePull, $n as PopoverClose, $r as ListRowBody, $t as MessageItemSearchMatch, A as MessageList, Ai as DialogSurface, An as PreviewCardHeader, Ar as DropdownMenuShortcut, At as MessageItemBadgeSeparator, B as MessageQuotedPreviewHeader, Bi as buttonVariants, Br as PanelScrollContent, Bt as MessageItemInlineStatus, Ci as DialogFooter, Ct as MessageReactionTooltipContent, D as MessageListEndFade, Di as DialogOverlay, Dn as PreviewCardDescription, Dr as DropdownMenuRadioItem, Dt as MessageReactionTooltipNames, E as MessageListDateDivider, Ei as DialogNav, En as PreviewCardContent, Er as DropdownMenuRadioGroup, Et as MessageReactionTooltipNameText, Fi as TextLink, Fn as PreviewCardTitle, Fr as KbdGroup, G as MessageQuotedPreviewUnavailable, Gi as withOverlayLayer, Gr as ScrollAreaCorner, Gt as MessageItemSenderGroup, H as MessageQuotedPreviewText, Hi as defaultNativeButton, Hr as PanelSection, Ht as MessageItemSender, I as MessageQuotedPreviewAuthorMeta, Ii as TextLinkExternalIcon, In as PreviewCardTrigger, Ir as Panel, J as MessageEmbedFooter, Ji as ThemeStateContext, Jn as Popover, Jr as ScrollAreaViewport, Jt as MessageItemBody, K as MessageEmbed, Ki as useThemeScopeProps, Kr as ScrollAreaScrollbar, Kt as MessageItemTime, L as MessageQuotedPreviewAuthorName, Li as textLinkVariants, Lr as PanelBody, M as MessageQuotedPreviewAttachment, Mi as DialogTrigger, Mn as PreviewCardPopup, Mr as DropdownMenuSubmenuTrigger, Mt as MessageItemSavedIndicator, N as MessageQuotedPreviewAttachments, Ni as PanelAction, Nn as PreviewCardPortal, Nr as DropdownMenuTrigger, Nt as MessageItemToolbar, O as MessageListHistoryLimited, Oi as DialogPortal, Or as DropdownMenuRadioItemIndicator, Ot as MessageReactionTooltipSeparator, P as MessageQuotedPreviewAuthor, Pi as panelToggleAction, Pn as PreviewCardSeparator, Pr as Kbd, Pt as MessageItemToolbarButton, Q as MessageTextSelectionToolbarButton, Qi as controlIconInset, Qr as ListRow, Qt as MessageItemFooter, R as MessageQuotedPreviewChannel, Ri as DialogSheetReset, Rr as PanelFooter, Si as DialogDescription, Sn as PreviewCard, Sr as DropdownMenuLabel, St as MessageReactionQuickRow, Ti as DialogHeader, Tr as DropdownMenuPortal, Tt as MessageReactionTooltipName, U as MessageQuotedPreviewThread, Ur as ScrollArea, Ut as MessageItemSenderBadges, V as MessageQuotedPreviewLoading, Vi as Spinner, Vr as PanelScrollViewport, Vt as MessageItemMeta, W as MessageQuotedPreviewTimestamp, Wi as useParentOverlayKind, Wr as ScrollAreaContent, Wt as MessageItemSenderButton, X as messageEmbed, Xi as stackedActions, Xn as PopoverArrow, Xr as CheckboxIndicator, Xt as MessageItemEdited, Y as MessageEmbedHeader, Yi as tv, Yr as Checkbox, Yt as MessageItemContent, Z as MessageTextSelectionToolbar, Zi as useStackedActions, Zn as PopoverBackdrop, Zr as Status, Zt as MessageItemEmbedded, _ as InboxItemTrailing, _i as useMobileViewport, _n as useOverflowTitle, _r as DropdownMenuContent, _t as MessageReactionErrorIndicator, a as InboxItemContext, ai as ListRowMeta, an as Avatar, ar as PopoverSeparator, b as useLatestRef, bi as DialogClose, br as DropdownMenuItemCount, bt as MessageReactionPickerStatic, c as InboxItemLeading, ci as ListRowValue, cn as AvatarGroup, cr as PopoverViewport, ct as MessageReferencePending, d as InboxItemMetadata, di as TooltipPortal, dn as RadioGroup, dr as MobileNavItem, dt as MessageReferenceText, ea as headEdges, ei as ListRowBottom, en as MessageItemAvatarSlot, er as PopoverContent, et as MessageMultiSelect, f as InboxItemSelection, fi as TooltipProvider, fn as RadioGroupIndicator, fr as MobileNavLabel, ft as MessageReferenceUnavailable, g as InboxItemTitle, gn as InputGroupInput, gr as DropdownMenuCheckboxItemIndicator, gt as MessageReactionCount, h as InboxItemTimestamp, hn as InputGroupAddon, hr as DropdownMenuCheckboxItem, ht as MessageReactionChip, i as InboxItemContent, ii as ListRowIcon, in as searchHit, ir as PopoverPortal, it as MessageReferenceChip, j as MessageQuotedPreview, ji as DialogTitle, jr as DropdownMenuSubmenu, jt as MessageItemReadReceipt, k as MessageListNotice, kr as DropdownMenuSeparator, kt as MessageItemBadge, l as InboxItemMarks, li as Tooltip, ln as AvatarGroupCount, lr as useHoldThenMoveTouchSensor, lt as MessageReferenceReadMark, m as InboxItemSubtitle, mi as Badge, mn as InputGroup, mr as DropdownMenu, mt as MessageReactionAddButton, n as InboxItemActions, ni as ListRowDescription, nn as MessageItemGutter, nr as PopoverHeader, nt as MessageMultiSelectToolbar, o as InboxItemHeading, oi as ListRowTitle, on as AvatarBadge, or as PopoverTitle, ot as MessageReferenceIndicator, p as InboxItemSender, pi as TooltipTrigger, pn as RadioGroupItem, pr as MobileNavRoot, pt as inlineChip, q as MessageEmbedContent, qi as useTheme, qr as ScrollAreaThumb, qt as MessageItemAttachments, r as InboxItemBody, ri as ListRowGroup, rn as MessageItem, rr as PopoverPopup, rt as MessageMultiSelectToolbarActions, s as InboxItemHoverTarget, si as ListRowTop, sn as AvatarFallback, sr as PopoverTrigger, st as MessageReferenceLabel, t as InboxItem, ta as decisionWidth, ti as ListRowChevron, tn as MessageItemContinuationTime, tr as PopoverDescription, tt as MessageMultiSelectCheckbox, u as InboxItemMessage, ui as TooltipContent, un as AvatarImage, ur as useMouseOnlyPointerSensor, ut as MessageReferenceSuffix, v as InboxItemTrigger, vi as Dialog, vr as DropdownMenuFooter, vt as MessageReactionGlyph, wn as PreviewCardArrow, wr as DropdownMenuPopup, wt as MessageReactionTooltipMeta, x as Skeleton, xi as DialogContent, xr as DropdownMenuItemLabel, xt as MessageReactionQuickButton, yi as DialogBody, yr as DropdownMenuItem, yt as MessageReactionPickerContent, z as MessageQuotedPreviewContent, zi as Button, zr as PanelHeaderRoot, zt as MessageItemHeader } from "./inbox-item-69Tx19JG.mjs";
|
|
3
3
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
4
4
|
import { AlertTriangle, Bell, Check, CheckCircle2, ChevronDown, ChevronLeft, ChevronRight, CircleCheck, Copy, FileText, Image, Info, TriangleAlert, Upload, X, Zap } from "lucide-react";
|
|
5
5
|
import { Children, cloneElement, createContext, createElement, isValidElement, use, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -3174,179 +3174,6 @@ function FieldValidity(props) {
|
|
|
3174
3174
|
return /* @__PURE__ */ jsx(Field$1.Validity, { ...props });
|
|
3175
3175
|
}
|
|
3176
3176
|
//#endregion
|
|
3177
|
-
//#region src/components/input-group/input-group.tsx
|
|
3178
|
-
const inputGroup = tv({
|
|
3179
|
-
slots: {
|
|
3180
|
-
root: [
|
|
3181
|
-
"group/input-group relative flex w-full min-w-0 items-center",
|
|
3182
|
-
"has-data-[input-group-trim=inline-end]:[--ig-control-pr:0]",
|
|
3183
|
-
"h-control overflow-hidden rounded-control border-[1.5px] border-line-field bg-layer-card text-foreground",
|
|
3184
|
-
"shadow-none transition-shadow duration-90 ease-out has-focus-visible:shadow-focus",
|
|
3185
|
-
"has-[[data-slot=input-group-control][data-invalid]]:border-danger-strong",
|
|
3186
|
-
"has-[[data-slot=input-group-control]:disabled]:cursor-not-allowed has-[[data-slot=input-group-control]:disabled]:border-line-hairline has-[[data-slot=input-group-control]:disabled]:bg-fill-muted",
|
|
3187
|
-
"has-[[data-slot=input-group-control]:disabled]:[--ig-addon-fg:var(--foreground-disabled)]",
|
|
3188
|
-
"has-[[data-slot=input-group-control]:disabled]:[--ig-text-fg:var(--foreground-disabled)]"
|
|
3189
|
-
],
|
|
3190
|
-
addon: [
|
|
3191
|
-
"flex shrink-0 items-center justify-center gap-2 px-3",
|
|
3192
|
-
"select-none",
|
|
3193
|
-
"text-(--ig-addon-fg,var(--ig-addon-fg-default,var(--foreground-hint)))",
|
|
3194
|
-
"[&>svg:not([class*='size-'])]:size-4.5"
|
|
3195
|
-
],
|
|
3196
|
-
text: [
|
|
3197
|
-
"flex min-w-0 max-w-1/2 shrink-0 items-center px-3",
|
|
3198
|
-
"select-none",
|
|
3199
|
-
"font-mono text-mono-code",
|
|
3200
|
-
"text-(--ig-text-fg,var(--ig-text-fg-default,var(--foreground-hint)))"
|
|
3201
|
-
],
|
|
3202
|
-
textInner: ["min-w-0 truncate"],
|
|
3203
|
-
control: [
|
|
3204
|
-
"min-w-0 flex-1 bg-transparent pl-3 outline-none",
|
|
3205
|
-
"pr-(--ig-control-pr,0.75rem)",
|
|
3206
|
-
"h-full py-0 font-heading text-field font-field",
|
|
3207
|
-
"text-foreground placeholder:text-foreground-hint",
|
|
3208
|
-
"disabled:cursor-not-allowed disabled:text-foreground-disabled disabled:placeholder:text-foreground-disabled"
|
|
3209
|
-
]
|
|
3210
|
-
},
|
|
3211
|
-
variants: {
|
|
3212
|
-
align: {
|
|
3213
|
-
"inline-start": {
|
|
3214
|
-
addon: "order-first",
|
|
3215
|
-
text: "order-first"
|
|
3216
|
-
},
|
|
3217
|
-
"inline-end": {
|
|
3218
|
-
addon: "order-last",
|
|
3219
|
-
text: "order-last"
|
|
3220
|
-
}
|
|
3221
|
-
},
|
|
3222
|
-
variant: {
|
|
3223
|
-
default: {},
|
|
3224
|
-
container: {
|
|
3225
|
-
addon: [
|
|
3226
|
-
"self-stretch",
|
|
3227
|
-
"[--ig-addon-fg-default:var(--foreground-hint)]",
|
|
3228
|
-
"border-line-hairline bg-fill-muted"
|
|
3229
|
-
],
|
|
3230
|
-
text: [
|
|
3231
|
-
"self-stretch",
|
|
3232
|
-
"[--ig-text-fg-default:var(--foreground-hint)]",
|
|
3233
|
-
"border-line-hairline bg-fill-muted"
|
|
3234
|
-
]
|
|
3235
|
-
}
|
|
3236
|
-
}
|
|
3237
|
-
},
|
|
3238
|
-
compoundVariants: [
|
|
3239
|
-
{
|
|
3240
|
-
variant: "default",
|
|
3241
|
-
align: "inline-start",
|
|
3242
|
-
class: {
|
|
3243
|
-
addon: "[&~[data-slot=input-group-control]]:pl-0",
|
|
3244
|
-
text: "[&~[data-slot=input-group-control]]:pl-0"
|
|
3245
|
-
}
|
|
3246
|
-
},
|
|
3247
|
-
{
|
|
3248
|
-
variant: "container",
|
|
3249
|
-
align: "inline-start",
|
|
3250
|
-
class: {
|
|
3251
|
-
addon: "border-r",
|
|
3252
|
-
text: "border-r"
|
|
3253
|
-
}
|
|
3254
|
-
},
|
|
3255
|
-
{
|
|
3256
|
-
variant: "container",
|
|
3257
|
-
align: "inline-end",
|
|
3258
|
-
class: {
|
|
3259
|
-
addon: "border-l",
|
|
3260
|
-
text: "border-l"
|
|
3261
|
-
}
|
|
3262
|
-
},
|
|
3263
|
-
{
|
|
3264
|
-
variant: "default",
|
|
3265
|
-
align: "inline-start",
|
|
3266
|
-
class: {
|
|
3267
|
-
addon: "pr-2",
|
|
3268
|
-
text: "pr-0.5"
|
|
3269
|
-
}
|
|
3270
|
-
},
|
|
3271
|
-
{
|
|
3272
|
-
variant: "default",
|
|
3273
|
-
align: "inline-end",
|
|
3274
|
-
class: {
|
|
3275
|
-
addon: [
|
|
3276
|
-
"pl-2",
|
|
3277
|
-
"*:data-[slot=button]:size-control-embedded *:data-[slot=button]:rounded-chip",
|
|
3278
|
-
"[&>[data-slot=button]_svg:not([class*='size-'])]:size-4",
|
|
3279
|
-
"[&>[data-slot=button]:last-child]:me-[calc(var(--control-embedded-inset)-0.75rem-1px)]"
|
|
3280
|
-
],
|
|
3281
|
-
text: "pl-0.5"
|
|
3282
|
-
}
|
|
3283
|
-
}
|
|
3284
|
-
],
|
|
3285
|
-
defaultVariants: {
|
|
3286
|
-
align: "inline-start",
|
|
3287
|
-
variant: "default"
|
|
3288
|
-
}
|
|
3289
|
-
});
|
|
3290
|
-
function InputGroup({ className, ...props }) {
|
|
3291
|
-
const { root } = inputGroup();
|
|
3292
|
-
return /* @__PURE__ */ jsx("div", {
|
|
3293
|
-
"data-slot": "input-group",
|
|
3294
|
-
className: root({ className }),
|
|
3295
|
-
...props
|
|
3296
|
-
});
|
|
3297
|
-
}
|
|
3298
|
-
function InputGroupAddonRoot({ align = "inline-start", variant = "default", className, ...props }) {
|
|
3299
|
-
const { addon } = inputGroup({
|
|
3300
|
-
align,
|
|
3301
|
-
variant
|
|
3302
|
-
});
|
|
3303
|
-
return /* @__PURE__ */ jsx("div", {
|
|
3304
|
-
"data-slot": "input-group-addon",
|
|
3305
|
-
"data-align": align,
|
|
3306
|
-
"data-variant": variant,
|
|
3307
|
-
"data-input-group-trim": variant === "default" && align === "inline-end" ? align : void 0,
|
|
3308
|
-
className: addon({ className }),
|
|
3309
|
-
...props
|
|
3310
|
-
});
|
|
3311
|
-
}
|
|
3312
|
-
function TextAddon({ align = "inline-start", variant = "default", className, ref, title, children, ...props }) {
|
|
3313
|
-
const { text, textInner } = inputGroup({
|
|
3314
|
-
align,
|
|
3315
|
-
variant
|
|
3316
|
-
});
|
|
3317
|
-
const overflowRef = useOverflowTitle(ref, title);
|
|
3318
|
-
return /* @__PURE__ */ jsx("span", {
|
|
3319
|
-
ref: overflowRef,
|
|
3320
|
-
title,
|
|
3321
|
-
"data-slot": "input-group-text",
|
|
3322
|
-
"data-align": align,
|
|
3323
|
-
"data-variant": variant,
|
|
3324
|
-
"data-input-group-trim": variant === "default" && align === "inline-end" ? align : void 0,
|
|
3325
|
-
className: text({ className }),
|
|
3326
|
-
...props,
|
|
3327
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
3328
|
-
"data-slot": "input-group-text-value",
|
|
3329
|
-
className: textInner(),
|
|
3330
|
-
children
|
|
3331
|
-
})
|
|
3332
|
-
});
|
|
3333
|
-
}
|
|
3334
|
-
const InputGroupAddon = Object.assign(InputGroupAddonRoot, { Text: TextAddon });
|
|
3335
|
-
function InputGroupInput({ className, suppressPasswordManager, "data-invalid": dataInvalid, ...props }) {
|
|
3336
|
-
const { control } = inputGroup();
|
|
3337
|
-
return /* @__PURE__ */ jsx(Input$1, {
|
|
3338
|
-
"data-slot": "input-group-control",
|
|
3339
|
-
className: control({ className: [suppressPasswordManager && "keeper-ignore", className] }),
|
|
3340
|
-
"data-1p-ignore": suppressPasswordManager ? "true" : void 0,
|
|
3341
|
-
"data-bwignore": suppressPasswordManager ? "true" : void 0,
|
|
3342
|
-
"data-form-type": suppressPasswordManager ? "other" : void 0,
|
|
3343
|
-
"data-lpignore": suppressPasswordManager ? "true" : void 0,
|
|
3344
|
-
...props,
|
|
3345
|
-
"data-invalid": dataInvalid || void 0,
|
|
3346
|
-
"aria-invalid": dataInvalid ? "true" : void 0
|
|
3347
|
-
});
|
|
3348
|
-
}
|
|
3349
|
-
//#endregion
|
|
3350
3177
|
//#region src/components/combobox/combobox.tsx
|
|
3351
3178
|
const combobox = tv({
|
|
3352
3179
|
slots: {
|
|
@@ -4165,59 +3992,6 @@ function SelectArrow({ className, ...props }) {
|
|
|
4165
3992
|
});
|
|
4166
3993
|
}
|
|
4167
3994
|
//#endregion
|
|
4168
|
-
//#region src/components/radio-group/radio-group.tsx
|
|
4169
|
-
const radioGroup = tv({ slots: {
|
|
4170
|
-
root: [
|
|
4171
|
-
"grid w-full gap-2",
|
|
4172
|
-
"data-disabled:[&>label]:cursor-not-allowed data-disabled:[&>label]:text-foreground-disabled",
|
|
4173
|
-
"data-disabled:[&>label_*]:text-foreground-disabled",
|
|
4174
|
-
"font-sans [&>label]:font-semibold"
|
|
4175
|
-
],
|
|
4176
|
-
item: [
|
|
4177
|
-
"relative inline-flex shrink-0 touch-manipulation items-center justify-center rounded-full outline-none",
|
|
4178
|
-
"data-disabled:cursor-not-allowed",
|
|
4179
|
-
"after:absolute after:-inset-x-3 after:-inset-y-2 after:content-['']",
|
|
4180
|
-
"pointer-coarse:after:-inset-y-[calc(--spacing(3)+1.5px)]",
|
|
4181
|
-
"[label>&]:my-[max(0px,calc((1lh-1.25rem)/2))]",
|
|
4182
|
-
"[label>&]:after:-inset-y-[calc(max(0px,(1lh-1.25rem)/2)+5.5px)]",
|
|
4183
|
-
"size-5 border-[1.5px] border-line-strong bg-layer-card text-foreground",
|
|
4184
|
-
"focus-visible:shadow-focus",
|
|
4185
|
-
"data-disabled:border-foreground-disabled data-disabled:bg-fill-muted data-disabled:text-foreground-disabled"
|
|
4186
|
-
],
|
|
4187
|
-
indicator: ["pointer-events-none flex size-full items-center justify-center"],
|
|
4188
|
-
dot: ["block rounded-full bg-current", "size-2"]
|
|
4189
|
-
} });
|
|
4190
|
-
function RadioGroup({ className, ...props }) {
|
|
4191
|
-
const { root } = radioGroup();
|
|
4192
|
-
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
4193
|
-
"data-slot": "radio-group",
|
|
4194
|
-
className: root({ className }),
|
|
4195
|
-
...props
|
|
4196
|
-
});
|
|
4197
|
-
}
|
|
4198
|
-
function RadioGroupIndicator({ className, children, ...props }) {
|
|
4199
|
-
const { indicator, dot } = radioGroup();
|
|
4200
|
-
return /* @__PURE__ */ jsx(Radio.Indicator, {
|
|
4201
|
-
"data-slot": "radio-group-indicator",
|
|
4202
|
-
className: indicator({ className }),
|
|
4203
|
-
...props,
|
|
4204
|
-
children: children ?? /* @__PURE__ */ jsx("span", {
|
|
4205
|
-
"data-slot": "radio-group-dot",
|
|
4206
|
-
className: dot()
|
|
4207
|
-
})
|
|
4208
|
-
});
|
|
4209
|
-
}
|
|
4210
|
-
function RadioGroupItem({ appearance = "default", className, children, ...props }) {
|
|
4211
|
-
const { item } = radioGroup();
|
|
4212
|
-
const itemClassName = appearance === "none" ? cn("sr-only", "data-disabled:cursor-not-allowed", className) : item({ className });
|
|
4213
|
-
return /* @__PURE__ */ jsx(Radio.Root, {
|
|
4214
|
-
"data-slot": "radio-group-item",
|
|
4215
|
-
className: itemClassName,
|
|
4216
|
-
...props,
|
|
4217
|
-
children: children ?? (appearance === "default" ? /* @__PURE__ */ jsx(RadioGroupIndicator, {}) : null)
|
|
4218
|
-
});
|
|
4219
|
-
}
|
|
4220
|
-
//#endregion
|
|
4221
3995
|
//#region src/components/switch/switch.tsx
|
|
4222
3996
|
const switchRecipe = tv({ slots: {
|
|
4223
3997
|
root: [
|
package/dist/wip.d.mts
CHANGED
|
@@ -706,4 +706,67 @@ type PullToRefreshIndicatorProps = Omit<ComponentProps<"div">, "children"> & {
|
|
|
706
706
|
*/
|
|
707
707
|
export declare function PullToRefreshIndicator({ pull, label, className, style, ...props }: PullToRefreshIndicatorProps): import("react").JSX.Element;
|
|
708
708
|
//#endregion
|
|
709
|
-
|
|
709
|
+
//#region src/components/choice-list/choice-list.d.ts
|
|
710
|
+
type ChoiceListItem = {
|
|
711
|
+
value: string;
|
|
712
|
+
/** The row's name. The radio or checkbox is named by this alone. */
|
|
713
|
+
label: ReactNode;
|
|
714
|
+
/** What the search matches, case-insensitively. Defaults to `label` when it is a string. */
|
|
715
|
+
searchText?: string;
|
|
716
|
+
/**
|
|
717
|
+
* Up to two lines under the name, each cut to one line. An empty line
|
|
718
|
+
* (null, false or "") is not drawn. Colour inside a line is the caller's.
|
|
719
|
+
*/
|
|
720
|
+
description?: ReactNode | readonly ReactNode[];
|
|
721
|
+
/** Drawn before the radio's or checkbox's row text: an avatar, an icon. */
|
|
722
|
+
media?: ReactNode;
|
|
723
|
+
/**
|
|
724
|
+
* A button at the end of the row, such as one that opens details. It sits
|
|
725
|
+
* outside the row's label and the group: clicking it chooses nothing, and
|
|
726
|
+
* it is a Tab stop of its own after the group, in row order.
|
|
727
|
+
*/
|
|
728
|
+
action?: ReactNode;
|
|
729
|
+
disabled?: boolean;
|
|
730
|
+
};
|
|
731
|
+
type ChoiceListCommonProps = {
|
|
732
|
+
items: readonly ChoiceListItem[];
|
|
733
|
+
/**
|
|
734
|
+
* When the search box shows. `"always"` when people look for an item they
|
|
735
|
+
* know by name, such as a person: the box shows at any count, and with a
|
|
736
|
+
* mouse or trackpad focus starts in it. `"auto"` when people choose by
|
|
737
|
+
* comparing the rows: the box shows only above 5 items.
|
|
738
|
+
*/
|
|
739
|
+
search?: "auto" | "always";
|
|
740
|
+
"aria-label"?: string;
|
|
741
|
+
"aria-labelledby"?: string;
|
|
742
|
+
disabled?: boolean;
|
|
743
|
+
/**
|
|
744
|
+
* The search box's accessible name. Required: any list can come to search,
|
|
745
|
+
* since `"auto"` shows the box once the items, usually from data, pass 5.
|
|
746
|
+
*/
|
|
747
|
+
searchLabel: string;
|
|
748
|
+
searchPlaceholder?: string;
|
|
749
|
+
/** The search box's text when the list first draws, such as a search carried over. */
|
|
750
|
+
defaultSearchValue?: string;
|
|
751
|
+
/** The clear button's accessible name. */
|
|
752
|
+
clearSearchLabel: string;
|
|
753
|
+
/** The line under the chosen rows when nothing else matches. */
|
|
754
|
+
noMatchLabel?: ReactNode;
|
|
755
|
+
/** The line drawn when there are no items at all. */
|
|
756
|
+
empty?: ReactNode;
|
|
757
|
+
className?: string;
|
|
758
|
+
};
|
|
759
|
+
type ChoiceListSingleProps = ChoiceListCommonProps & {
|
|
760
|
+
multiple?: false;
|
|
761
|
+
value: string | null;
|
|
762
|
+
onValueChange: (value: string) => void;
|
|
763
|
+
};
|
|
764
|
+
type ChoiceListMultipleProps = ChoiceListCommonProps & {
|
|
765
|
+
multiple: true;
|
|
766
|
+
value: readonly string[];
|
|
767
|
+
onValueChange: (value: string[]) => void;
|
|
768
|
+
};
|
|
769
|
+
type ChoiceListProps = ChoiceListSingleProps | ChoiceListMultipleProps;
|
|
770
|
+
export declare function ChoiceList(props: ChoiceListProps): import("react").JSX.Element;
|
|
771
|
+
//#endregion
|
|
772
|
+
export { Dialog as AnnouncementDialog, DialogClose as AnnouncementDialogClose, DialogTrigger as AnnouncementDialogTrigger, type ChoiceListItem, type ChoiceListMultipleProps, type ChoiceListProps, type ChoiceListSingleProps, 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, type InboxItemSkeletonListProps, type InboxItemSkeletonProps, type ListRowSkeletonProps, 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, MessageReferenceReadMark, type MessageReferenceReadMarkProps, 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 PullToRefresh, type PullToRefreshIndicatorProps, type PullToRefreshPlatform, type PullToRefreshState, type UseCommentMarginFitsOptions, type UsePullToRefreshOptions };
|
package/dist/wip.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $r as
|
|
2
|
-
import { Check, ChevronDown, LoaderCircle, Plus, X } from "lucide-react";
|
|
1
|
+
import { $r as ListRowBody, Bn as MobileNavServerPopoverDestination, C as MessageListJumpPill, Cn as PreviewCardActions, Cr as DropdownMenuLinkItem, F as MessageQuotedPreviewAuthorDelegatedBy, Fi as TextLink, Ft as MessageItemDelegatedAvatar, Gn as MobileNavServerPopoverRowBody, Hi as defaultNativeButton, Hn as MobileNavServerPopoverGroup, It as MessageItemDelegatedBy, Ki as useThemeScopeProps, Kn as MobileNavServerPopoverRowDescription, Ln as MobileNavServerItem, Lt as MessageItemDelegatedByButton, Mi as DialogTrigger, On as PreviewCardEyebrow, Qn as PopoverBody, Qr as ListRow, Rn as MobileNavServerPopover, Rt as MessageItemDelegatedByName, S as MessageListJumpControls, T as MessageListJumpPillGroup, Tn as PreviewCardBody, Ui as OverlayLayerProvider, Un as MobileNavServerPopoverList, Vi as Spinner, Vn as MobileNavServerPopoverDestinations, Wi as useParentOverlayKind, Wn as MobileNavServerPopoverRow, Yi as tv, Yn as PopoverActions, Yr as Checkbox, _ as InboxItemTrailing, _n as useOverflowTitle, a as InboxItemContext, ai as ListRowMeta, at as MessageReferenceIcon, b as useLatestRef, bi as DialogClose, bn as observeTruncation, c as InboxItemLeading, dn as RadioGroup, ei as ListRowBottom, g as InboxItemTitle, gi as DialogSheetContent, gn as InputGroupInput, h as InboxItemTimestamp, hi as DialogCommit, hn as InputGroupAddon, i as InboxItemContent, ji as DialogTitle, jn as PreviewCardMeta, ki as DialogSheetBack, kn as PreviewCardFooter, li as Tooltip, lr as useHoldThenMoveTouchSensor, lt as MessageReferenceReadMark, mn as InputGroup, ni as ListRowDescription, o as InboxItemHeading, oi as ListRowTitle, pi as TooltipTrigger, pn as RadioGroupItem, qi as useTheme, qn as MobileNavServerPopoverRowLabel, r as InboxItemBody, si as ListRowTop, t as InboxItem, ui as TooltipContent, vi as Dialog, vn as measureContent, w as MessageListJumpPillDismiss, wi as DialogFooterNote, x as Skeleton, xi as DialogContent, xn as readNow, y as inboxItem, yn as measureElement, zi as Button$1, zn as MobileNavServerPopoverContent } from "./inbox-item-69Tx19JG.mjs";
|
|
2
|
+
import { Check, ChevronDown, LoaderCircle, Plus, Search, 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";
|
|
5
5
|
import { Button } from "@base-ui/react/button";
|
|
@@ -7,6 +7,7 @@ import { mergeProps } from "@base-ui/react/merge-props";
|
|
|
7
7
|
import { useRender } from "@base-ui/react/use-render";
|
|
8
8
|
import { Combobox } from "@base-ui/react/combobox";
|
|
9
9
|
import { Meter as Meter$1 } from "@base-ui/react/meter";
|
|
10
|
+
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
10
11
|
//#region src/lib/phone-media.ts
|
|
11
12
|
/**
|
|
12
13
|
* A phone: a touch screen narrower than the desktop layout. The complement, on
|
|
@@ -2327,4 +2328,243 @@ function PullToRefreshIndicator({ pull, label, className, style, ...props }) {
|
|
|
2327
2328
|
});
|
|
2328
2329
|
}
|
|
2329
2330
|
//#endregion
|
|
2330
|
-
|
|
2331
|
+
//#region src/components/choice-list/choice-list.recipe.ts
|
|
2332
|
+
const choiceList = tv({
|
|
2333
|
+
slots: {
|
|
2334
|
+
root: ["grid min-w-0 gap-2"],
|
|
2335
|
+
searchInput: ["[&::-webkit-search-cancel-button]:appearance-none"],
|
|
2336
|
+
frame: ["min-w-0 rounded-container border border-line-hairline bg-layer-card p-1"],
|
|
2337
|
+
rows: ["grid grid-cols-[minmax(0,1fr)_auto] gap-x-0 gap-y-0.5"],
|
|
2338
|
+
group: ["col-span-2 col-start-1 grid grid-cols-subgrid grid-rows-subgrid gap-x-0 gap-y-0.5"],
|
|
2339
|
+
item: [
|
|
2340
|
+
"col-span-2 flex min-w-0 items-start gap-2.5 rounded-chip px-2.5",
|
|
2341
|
+
"min-h-option py-option-inset",
|
|
2342
|
+
"pointer-coarse:min-h-11 pointer-coarse:py-[calc((--spacing(11)-1lh)/2)]",
|
|
2343
|
+
"text-left font-sans text-subhead",
|
|
2344
|
+
"not-data-disabled:hover:bg-brand-soft not-data-disabled:active:overlay-medium",
|
|
2345
|
+
"data-disabled:cursor-not-allowed"
|
|
2346
|
+
],
|
|
2347
|
+
media: ["flex h-lh shrink-0 items-center"],
|
|
2348
|
+
body: ["grid min-w-0 flex-1 gap-0.5"],
|
|
2349
|
+
label: ["truncate font-semibold text-foreground", "in-data-disabled:text-foreground-disabled"],
|
|
2350
|
+
description: ["block truncate font-sans text-footnote font-normal text-foreground-muted", "in-data-disabled:text-foreground-disabled"],
|
|
2351
|
+
action: [
|
|
2352
|
+
"relative z-10 col-start-2 flex h-lh items-center self-start pr-1",
|
|
2353
|
+
"mt-option-inset pointer-coarse:mt-[calc((--spacing(11)-1lh)/2)]",
|
|
2354
|
+
"font-sans text-subhead"
|
|
2355
|
+
],
|
|
2356
|
+
note: ["px-2.5 py-2 font-sans text-callout text-foreground-hint"]
|
|
2357
|
+
},
|
|
2358
|
+
variants: {
|
|
2359
|
+
scroll: { true: { frame: ["max-h-72 overflow-y-auto overscroll-contain"] } },
|
|
2360
|
+
hasAction: { true: { item: ["pr-11"] } }
|
|
2361
|
+
}
|
|
2362
|
+
});
|
|
2363
|
+
//#endregion
|
|
2364
|
+
//#region src/components/choice-list/choice-list.tsx
|
|
2365
|
+
const SEARCH_ABOVE = 5;
|
|
2366
|
+
const MAX_DESCRIPTION_LINES = 2;
|
|
2367
|
+
function isDrawn(line) {
|
|
2368
|
+
return line !== null && line !== void 0 && line !== false && line !== "";
|
|
2369
|
+
}
|
|
2370
|
+
function descriptionLines(description) {
|
|
2371
|
+
return (Array.isArray(description) ? description : [description]).filter(isDrawn);
|
|
2372
|
+
}
|
|
2373
|
+
const NOT_TEXT_INPUTS = /* @__PURE__ */ new Set([
|
|
2374
|
+
"button",
|
|
2375
|
+
"checkbox",
|
|
2376
|
+
"radio",
|
|
2377
|
+
"submit",
|
|
2378
|
+
"reset",
|
|
2379
|
+
"image",
|
|
2380
|
+
"file",
|
|
2381
|
+
"range",
|
|
2382
|
+
"color"
|
|
2383
|
+
]);
|
|
2384
|
+
function isTextEntry(element) {
|
|
2385
|
+
if (!(element instanceof HTMLElement)) return false;
|
|
2386
|
+
if (element.isContentEditable || element instanceof HTMLTextAreaElement) return true;
|
|
2387
|
+
if (element instanceof HTMLSelectElement) return true;
|
|
2388
|
+
return element instanceof HTMLInputElement && !NOT_TEXT_INPUTS.has(element.type);
|
|
2389
|
+
}
|
|
2390
|
+
function searchTextOf(item) {
|
|
2391
|
+
if (item.searchText !== void 0) return item.searchText;
|
|
2392
|
+
return typeof item.label === "string" ? item.label : "";
|
|
2393
|
+
}
|
|
2394
|
+
function visibleItems(items, needle, pinned, chosen) {
|
|
2395
|
+
if (!needle) return {
|
|
2396
|
+
rows: items,
|
|
2397
|
+
noMatch: false
|
|
2398
|
+
};
|
|
2399
|
+
const matches = (item) => searchTextOf(item).toLowerCase().includes(needle);
|
|
2400
|
+
const isPinned = (item) => pinned.includes(item.value);
|
|
2401
|
+
const top = items.filter((item) => isPinned(item) || chosen.includes(item.value) && !matches(item));
|
|
2402
|
+
const rest = items.filter((item) => !top.includes(item) && matches(item));
|
|
2403
|
+
return {
|
|
2404
|
+
rows: [...top, ...rest],
|
|
2405
|
+
noMatch: !items.some(matches)
|
|
2406
|
+
};
|
|
2407
|
+
}
|
|
2408
|
+
function ChoiceList(props) {
|
|
2409
|
+
const { items, search = "auto", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, disabled = false, searchLabel, searchPlaceholder, defaultSearchValue = "", clearSearchLabel, noMatchLabel, empty, className } = props;
|
|
2410
|
+
const value = props.value;
|
|
2411
|
+
const chosen = useMemo(() => value === null ? [] : typeof value === "string" ? [value] : value, [value]);
|
|
2412
|
+
const [query, setQuery] = useState(defaultSearchValue);
|
|
2413
|
+
const [pinned, setPinned] = useState(chosen);
|
|
2414
|
+
const inputRef = useRef(null);
|
|
2415
|
+
const baseId = useId();
|
|
2416
|
+
const searchable = items.length > 0 && (search === "always" || items.length > SEARCH_ABOVE);
|
|
2417
|
+
const [wasSearchable, setWasSearchable] = useState(searchable);
|
|
2418
|
+
if (wasSearchable !== searchable) {
|
|
2419
|
+
setWasSearchable(searchable);
|
|
2420
|
+
if (!searchable) setQuery("");
|
|
2421
|
+
}
|
|
2422
|
+
const { rows, noMatch } = visibleItems(items, searchable ? query.trim().toLowerCase() : "", pinned, chosen);
|
|
2423
|
+
const hasAction = rows.some((item) => item.action !== void 0 && item.action !== null);
|
|
2424
|
+
const slots = choiceList({ scroll: searchable });
|
|
2425
|
+
useEffect(() => {
|
|
2426
|
+
if (process.env.NODE_ENV === "production") return;
|
|
2427
|
+
if (!ariaLabel && !ariaLabelledBy) console.warn("raft-ui: a ChoiceList has neither aria-label nor aria-labelledby.");
|
|
2428
|
+
if (items.some((item) => descriptionLines(item.description).length > MAX_DESCRIPTION_LINES)) console.warn(`raft-ui: a ChoiceList item has more than ${MAX_DESCRIPTION_LINES} description lines; only the first ${MAX_DESCRIPTION_LINES} are drawn.`);
|
|
2429
|
+
}, [
|
|
2430
|
+
ariaLabel,
|
|
2431
|
+
ariaLabelledBy,
|
|
2432
|
+
items
|
|
2433
|
+
]);
|
|
2434
|
+
const focusSearch = search === "always" && searchable;
|
|
2435
|
+
const focusedSearch = useRef(false);
|
|
2436
|
+
useEffect(() => {
|
|
2437
|
+
if (!focusSearch || focusedSearch.current) return;
|
|
2438
|
+
focusedSearch.current = true;
|
|
2439
|
+
const input = inputRef.current;
|
|
2440
|
+
if (!input || typeof window.matchMedia !== "function") return;
|
|
2441
|
+
if (!window.matchMedia("(pointer: fine)").matches) return;
|
|
2442
|
+
if (isTextEntry(document.activeElement)) return;
|
|
2443
|
+
input.focus({ preventScroll: true });
|
|
2444
|
+
}, [focusSearch]);
|
|
2445
|
+
const changeQuery = useCallback((event) => {
|
|
2446
|
+
setQuery(event.currentTarget.value);
|
|
2447
|
+
setPinned(chosen);
|
|
2448
|
+
}, [chosen]);
|
|
2449
|
+
const clearQuery = useCallback(() => {
|
|
2450
|
+
setQuery("");
|
|
2451
|
+
setPinned(chosen);
|
|
2452
|
+
inputRef.current?.focus();
|
|
2453
|
+
}, [chosen]);
|
|
2454
|
+
const groupProps = {
|
|
2455
|
+
"aria-label": ariaLabel,
|
|
2456
|
+
"aria-labelledby": ariaLabelledBy,
|
|
2457
|
+
disabled,
|
|
2458
|
+
className: slots.group(),
|
|
2459
|
+
style: { gridRow: `1 / span ${rows.length}` }
|
|
2460
|
+
};
|
|
2461
|
+
const rowElements = rows.map((item) => {
|
|
2462
|
+
const id = `${baseId}-${items.indexOf(item)}`;
|
|
2463
|
+
const lines = descriptionLines(item.description).slice(0, MAX_DESCRIPTION_LINES);
|
|
2464
|
+
const rowDisabled = disabled || item.disabled === true;
|
|
2465
|
+
const markProps = {
|
|
2466
|
+
value: item.value,
|
|
2467
|
+
disabled: item.disabled,
|
|
2468
|
+
"aria-labelledby": `${id}-label`,
|
|
2469
|
+
"aria-describedby": lines.length > 0 ? `${id}-description` : void 0
|
|
2470
|
+
};
|
|
2471
|
+
return /* @__PURE__ */ jsxs("label", {
|
|
2472
|
+
"data-slot": "choice-list-item",
|
|
2473
|
+
"data-disabled": rowDisabled ? "" : void 0,
|
|
2474
|
+
className: slots.item({ hasAction }),
|
|
2475
|
+
children: [
|
|
2476
|
+
props.multiple ? /* @__PURE__ */ jsx(Checkbox, { ...markProps }) : /* @__PURE__ */ jsx(RadioGroupItem, { ...markProps }),
|
|
2477
|
+
item.media !== void 0 && item.media !== null ? /* @__PURE__ */ jsx("span", {
|
|
2478
|
+
"data-slot": "choice-list-media",
|
|
2479
|
+
className: slots.media(),
|
|
2480
|
+
children: item.media
|
|
2481
|
+
}) : null,
|
|
2482
|
+
/* @__PURE__ */ jsxs("span", {
|
|
2483
|
+
"data-slot": "choice-list-body",
|
|
2484
|
+
className: slots.body(),
|
|
2485
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2486
|
+
id: `${id}-label`,
|
|
2487
|
+
"data-slot": "choice-list-label",
|
|
2488
|
+
className: slots.label(),
|
|
2489
|
+
children: item.label
|
|
2490
|
+
}), lines.length > 0 ? /* @__PURE__ */ jsx("span", {
|
|
2491
|
+
id: `${id}-description`,
|
|
2492
|
+
className: "contents",
|
|
2493
|
+
children: lines.map((line, index) => /* @__PURE__ */ jsx("span", {
|
|
2494
|
+
"data-slot": "choice-list-description",
|
|
2495
|
+
className: slots.description(),
|
|
2496
|
+
children: line
|
|
2497
|
+
}, index))
|
|
2498
|
+
}) : null]
|
|
2499
|
+
})
|
|
2500
|
+
]
|
|
2501
|
+
}, item.value);
|
|
2502
|
+
});
|
|
2503
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2504
|
+
"data-slot": "choice-list",
|
|
2505
|
+
className: slots.root({ className }),
|
|
2506
|
+
children: [searchable ? /* @__PURE__ */ jsxs(InputGroup, {
|
|
2507
|
+
"data-slot": "choice-list-search",
|
|
2508
|
+
children: [
|
|
2509
|
+
/* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Search, { "aria-hidden": true }) }),
|
|
2510
|
+
/* @__PURE__ */ jsx(InputGroupInput, {
|
|
2511
|
+
ref: inputRef,
|
|
2512
|
+
type: "search",
|
|
2513
|
+
value: query,
|
|
2514
|
+
onChange: changeQuery,
|
|
2515
|
+
"aria-label": searchLabel,
|
|
2516
|
+
placeholder: searchPlaceholder,
|
|
2517
|
+
disabled,
|
|
2518
|
+
autoComplete: "off",
|
|
2519
|
+
className: slots.searchInput()
|
|
2520
|
+
}),
|
|
2521
|
+
query ? /* @__PURE__ */ jsx(InputGroupAddon, {
|
|
2522
|
+
align: "inline-end",
|
|
2523
|
+
children: /* @__PURE__ */ jsx(Button$1, {
|
|
2524
|
+
variant: "ghost",
|
|
2525
|
+
size: "icon-md",
|
|
2526
|
+
"aria-label": clearSearchLabel,
|
|
2527
|
+
onClick: clearQuery,
|
|
2528
|
+
children: /* @__PURE__ */ jsx(X, { "aria-hidden": true })
|
|
2529
|
+
})
|
|
2530
|
+
}) : null
|
|
2531
|
+
]
|
|
2532
|
+
}) : null, /* @__PURE__ */ jsx("div", {
|
|
2533
|
+
"data-slot": "choice-list-frame",
|
|
2534
|
+
className: slots.frame(),
|
|
2535
|
+
children: items.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
2536
|
+
"data-slot": "choice-list-note",
|
|
2537
|
+
className: slots.note(),
|
|
2538
|
+
children: empty
|
|
2539
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [rows.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
2540
|
+
"data-slot": "choice-list-rows",
|
|
2541
|
+
className: slots.rows(),
|
|
2542
|
+
children: [props.multiple ? /* @__PURE__ */ jsx(CheckboxGroup, {
|
|
2543
|
+
"data-slot": "choice-list-group",
|
|
2544
|
+
value: props.value,
|
|
2545
|
+
onValueChange: props.onValueChange,
|
|
2546
|
+
...groupProps,
|
|
2547
|
+
children: rowElements
|
|
2548
|
+
}) : /* @__PURE__ */ jsx(RadioGroup, {
|
|
2549
|
+
"data-slot": "choice-list-group",
|
|
2550
|
+
value: props.value,
|
|
2551
|
+
onValueChange: props.onValueChange,
|
|
2552
|
+
...groupProps,
|
|
2553
|
+
children: rowElements
|
|
2554
|
+
}), rows.map((item, index) => item.action !== void 0 && item.action !== null ? /* @__PURE__ */ jsx("div", {
|
|
2555
|
+
"data-slot": "choice-list-action",
|
|
2556
|
+
className: slots.action(),
|
|
2557
|
+
style: { gridRow: index + 1 },
|
|
2558
|
+
children: item.action
|
|
2559
|
+
}, item.value) : null)]
|
|
2560
|
+
}) : null, searchable ? /* @__PURE__ */ jsx("p", {
|
|
2561
|
+
role: "status",
|
|
2562
|
+
"data-slot": "choice-list-status",
|
|
2563
|
+
className: noMatch ? slots.note() : "sr-only",
|
|
2564
|
+
children: noMatch ? noMatchLabel : null
|
|
2565
|
+
}) : null] })
|
|
2566
|
+
})]
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
//#endregion
|
|
2570
|
+
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, ChoiceList, ComboboxSelect, CommentCard, CommentCardMeta, CommentCardQuote, CommentCardTrigger, CommentEntry, CommentEntryAuthor, CommentEntryBody, CommentEntryHeader, CommentEntryTime, CommentMargin, CommentMarginItem, CommentMarker, DialogCommit, DialogFooterNote, DialogSheetBack, DialogSheetContent, DropdownMenuLinkItem, Ellipsis, EllipsisToggle, InboxItemLeadingBadge, InboxItemSkeleton, InboxItemSkeletonList, ListRowSkeleton, MessageItemDelegatedAvatar, MessageItemDelegatedBy, MessageItemDelegatedByButton, MessageItemDelegatedByName, MessageListJumpControls, MessageListJumpPill, MessageListJumpPillDismiss, MessageListJumpPillGroup, MessageQuotedPreviewAuthorDelegatedBy, MessageReferenceIcon, MessageReferenceReadMark, Meter, MeterHeader, MeterIndicator, MeterLabel, MeterTrack, MeterValue, MobileNavServerItem, MobileNavServerPopover, MobileNavServerPopoverContent, MobileNavServerPopoverDestination, MobileNavServerPopoverDestinations, MobileNavServerPopoverGroup, MobileNavServerPopoverList, MobileNavServerPopoverRow, MobileNavServerPopoverRowBody, MobileNavServerPopoverRowDescription, MobileNavServerPopoverRowLabel, OverlayLayerProvider, PULL_TO_REFRESH_DAMPING, PULL_TO_REFRESH_HOLD_DISTANCE, PULL_TO_REFRESH_MAX_DISTANCE, PULL_TO_REFRESH_POINTER_QUERY, PULL_TO_REFRESH_SNAP_BACK_MS, PULL_TO_REFRESH_THRESHOLD, PopoverActions, PopoverBody, PreviewCardActions, PreviewCardBody, PreviewCardEyebrow, PreviewCardFooter, PreviewCardMeta, PullToRefreshIndicator, resolveCommentMarginLayout, setCommentHighlights, useCommentMarginFits, useHoldThenMoveTouchSensor, useParentOverlayKind, usePullToRefresh, useTruncated };
|