@giddaa-housing/ui 2.1.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/generated/shared.css +1 -1
- package/css/theme.css +24 -0
- package/dist/accordion.js +1 -1
- package/dist/{button-BZIeyUw6.d.ts → button-DW5OijoR.d.ts} +1 -1
- package/dist/button-group.d.ts +1 -1
- package/dist/button-group.js +2 -2
- package/dist/button.d.ts +1 -1
- package/dist/button.js +4 -3
- package/dist/call-card.d.ts +131 -0
- package/dist/call-card.js +300 -0
- package/dist/carousel.js +12 -9
- package/dist/chat.d.ts +208 -0
- package/dist/chat.js +528 -0
- package/dist/checkbox.js +1 -1
- package/dist/combobox.js +1 -1
- package/dist/cta.d.ts +1 -1
- package/dist/data-table.d.ts +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/file-upload.js +3 -3
- package/dist/infinite-scroll.js +1 -1
- package/dist/infotip.js +1 -1
- package/dist/input-group.d.ts +1 -1
- package/dist/media-player.js +15 -8
- package/dist/message.d.ts +263 -0
- package/dist/message.js +524 -0
- package/dist/multi-step-form.js +10 -6
- package/dist/page-header.d.ts +6 -6
- package/dist/page-header.js +21 -7
- package/dist/pagination.d.ts +1 -1
- package/dist/popover.js +1 -1
- package/dist/price-tag.js +1 -1
- package/dist/property-listing-card.d.ts +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/rich-text-editor.js +3 -3
- package/dist/select.js +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +1 -1
- package/dist/sidebar.js +5 -5
- package/dist/skeleton.js +1 -1
- package/dist/slider.js +3 -2
- package/dist/styles.css +1870 -162
- package/dist/switch.js +3 -3
- package/dist/tabs.js +2 -2
- package/dist/time-picker.js +85 -7
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +2 -1
- package/dist/tooltip.js +9 -2
- package/dist/use-reduced-motion-BDvOK14x.js +17 -0
- package/package.json +13 -1
package/dist/input-group.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Button } from "./button-
|
|
1
|
+
import { t as Button } from "./button-DW5OijoR.js";
|
|
2
2
|
import { n as InputSize } from "./input-CfoEJ8A6.js";
|
|
3
3
|
import { n as TextareaSize } from "./textarea-IS_D8pXf.js";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
package/dist/media-player.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as cn } from "./cn-BI_4DMBf.js";
|
|
3
3
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
|
|
4
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
4
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js";
|
|
5
5
|
import { Captions, CaptionsOff, Maximize, Minimize, Pause, PictureInPicture2, Play, RefreshCcw, Repeat2, RotateCcw, RotateCw, Settings, TriangleAlert, Volume1, Volume2, VolumeX } from "lucide-react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import * as React from "react";
|
|
@@ -83,9 +83,13 @@ function MediaPlayer({ mediaStore, ...props }) {
|
|
|
83
83
|
const audio = props.audio ?? (hasAudioChild(props.children) ? true : void 0);
|
|
84
84
|
return /* @__PURE__ */ jsx(MediaProvider, {
|
|
85
85
|
mediaStore,
|
|
86
|
-
children: /* @__PURE__ */ jsx(
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
children: /* @__PURE__ */ jsx(TooltipProvider, {
|
|
87
|
+
delay: 300,
|
|
88
|
+
timeout: 400,
|
|
89
|
+
children: /* @__PURE__ */ jsx(MediaPlayerRoot, {
|
|
90
|
+
...props,
|
|
91
|
+
audio
|
|
92
|
+
})
|
|
89
93
|
})
|
|
90
94
|
});
|
|
91
95
|
}
|
|
@@ -311,7 +315,7 @@ function MediaControlButton({ className, shortcut, tooltip, ...props }) {
|
|
|
311
315
|
});
|
|
312
316
|
if (!tooltip) return button;
|
|
313
317
|
return /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
314
|
-
delay:
|
|
318
|
+
delay: void 0,
|
|
315
319
|
render: button
|
|
316
320
|
}), /* @__PURE__ */ jsxs(TooltipContent, {
|
|
317
321
|
className: "border-line-subtle px-2.5 py-1.5 text-gdt-xs font-bold",
|
|
@@ -411,6 +415,7 @@ function MediaPlayerVolume({ className, disabled, expandable = false, onClick, r
|
|
|
411
415
|
...props,
|
|
412
416
|
children: /* @__PURE__ */ jsx(Icon, {})
|
|
413
417
|
}), /* @__PURE__ */ jsx(Slider.Root, {
|
|
418
|
+
thumbAlignment: "edge",
|
|
414
419
|
"data-slot": "media-player-volume-slider",
|
|
415
420
|
className: cn("flex h-8 w-20 min-w-20 touch-none items-center", resolvedDisabled && "pointer-events-none opacity-45", expandable && "pointer-events-none opacity-0 transition-opacity group-hover/volume:pointer-events-auto group-hover/volume:opacity-100 group-focus-within/volume:pointer-events-auto group-focus-within/volume:opacity-100", rangeClassName),
|
|
416
421
|
disabled: resolvedDisabled,
|
|
@@ -660,6 +665,7 @@ function MediaPlayerSeek({ className, disabled, onValueChange, "aria-label": ari
|
|
|
660
665
|
end: segmentBounds[index + 1] ?? start
|
|
661
666
|
}));
|
|
662
667
|
return /* @__PURE__ */ jsxs(Slider.Root, {
|
|
668
|
+
thumbAlignment: "edge",
|
|
663
669
|
"data-slot": "media-player-seek",
|
|
664
670
|
className: cn("relative flex h-8 w-full min-w-0 touch-none items-center", resolvedDisabled && "pointer-events-none opacity-45", className),
|
|
665
671
|
disabled: resolvedDisabled,
|
|
@@ -758,15 +764,16 @@ function MediaPlayerSeek({ className, disabled, onValueChange, "aria-label": ari
|
|
|
758
764
|
}
|
|
759
765
|
}, `${bufferStart}-${bufferEnd}`) : null), /* @__PURE__ */ jsx("span", {
|
|
760
766
|
"data-slot": "media-player-seek-progress",
|
|
761
|
-
|
|
762
|
-
|
|
767
|
+
"data-dragging": dragValue !== null || void 0,
|
|
768
|
+
className: "absolute inset-y-0 left-0 w-full origin-left bg-surface-brand transition-transform duration-200 ease-linear data-[dragging=true]:transition-none",
|
|
769
|
+
style: { transform: `scaleX(${playedWidth / 100})` }
|
|
763
770
|
})]
|
|
764
771
|
}, start);
|
|
765
772
|
})
|
|
766
773
|
}), /* @__PURE__ */ jsx(Slider.Thumb, {
|
|
767
774
|
getAriaLabel: () => ariaLabel ?? "Media timeline",
|
|
768
775
|
getAriaValueText: (_formatted, value) => `${formatTime(value)} of ${formatTime(max)}`,
|
|
769
|
-
className: cn("size-3.5 -translate-x-1/2 rounded-full bg-surface-overlay shadow-2 ring-2 ring-surface-brand outline-none", "transition-[
|
|
776
|
+
className: cn("size-3.5 -translate-x-1/2 rounded-full bg-surface-overlay shadow-2 ring-2 ring-surface-brand outline-none", "transition-[scale] duration-[var(--duration-motion-press)] ease-gdt-out data-[dragging]:scale-125 motion-reduce:data-[dragging]:scale-100 data-[dragging]:transition-none", "focus-visible:[filter:drop-shadow(0_0_0.25rem_var(--color-line-focus))]")
|
|
770
777
|
})]
|
|
771
778
|
})]
|
|
772
779
|
});
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/message.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Which side of the conversation the message belongs to.
|
|
6
|
+
* Pure driver of fill, content colour, alignment, and which corner is the tail.
|
|
7
|
+
* `sent` = brand fill, aligned end, tail bottom-right.
|
|
8
|
+
* `received` = raised surface, aligned start, tail bottom-left.
|
|
9
|
+
*/
|
|
10
|
+
type MessageDirection = "sent" | "received";
|
|
11
|
+
/** Size ladder. Swaps padding, radius, tail, gaps, and type tokens. Never structural. */
|
|
12
|
+
type MessageSize = "sm" | "md" | "lg" | "xl";
|
|
13
|
+
/**
|
|
14
|
+
* Delivery state. Mirrors what the API actually emits — `READ | DELIVERED | FAILED`.
|
|
15
|
+
* There is no `sent`: the API never emits one.
|
|
16
|
+
*
|
|
17
|
+
* `read` — double-tick announced as read.
|
|
18
|
+
* `delivered` — the same design-system tick, announced as delivered.
|
|
19
|
+
* `failed` — the text "Failed to send", not a tick.
|
|
20
|
+
*/
|
|
21
|
+
type MessageStatus = "read" | "delivered" | "failed";
|
|
22
|
+
/** Styles the bubble itself — the surface inside `Message`, not `Message`'s root. */
|
|
23
|
+
declare const messageVariants: (props?: ({
|
|
24
|
+
direction?: "received" | "sent" | null | undefined;
|
|
25
|
+
size?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
26
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
27
|
+
type MessageGroupProps = React.ComponentProps<"div">;
|
|
28
|
+
/** Vertical stack of messages. Owns inter-message spacing only. */
|
|
29
|
+
declare function MessageGroup({ className, ...props }: MessageGroupProps): React.JSX.Element;
|
|
30
|
+
interface MessageProps extends React.ComponentProps<"div"> {
|
|
31
|
+
/** Conversation side — see {@link MessageDirection}. @default "sent" */
|
|
32
|
+
direction?: MessageDirection;
|
|
33
|
+
/** Size ladder — see {@link MessageSize}. @default "md" */
|
|
34
|
+
size?: MessageSize;
|
|
35
|
+
/** Render the timestamp in the meta row. @default true */
|
|
36
|
+
showTimestamp?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Render the read receipt in the meta row.
|
|
39
|
+
* **Scope: `direction="sent"` only** — ignored entirely when received.
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
showReadReceipt?: boolean;
|
|
43
|
+
/** Value for the `<time>` element. Omit to drop the timestamp regardless of `showTimestamp`. */
|
|
44
|
+
timestamp?: Date | string;
|
|
45
|
+
/** Machine-readable value for a string timestamp such as "10:12 AM". */
|
|
46
|
+
timestampDateTime?: Date | string;
|
|
47
|
+
/** Delivery state for the receipt. Ignored when received. @default "read" */
|
|
48
|
+
status?: MessageStatus;
|
|
49
|
+
/**
|
|
50
|
+
* Quiet attribution rendered below the bubble, e.g. "Asked by AI".
|
|
51
|
+
*
|
|
52
|
+
* **Scope: `direction="sent"` only** — ignored entirely when received.
|
|
53
|
+
*
|
|
54
|
+
* It sits outside the bubble rather than inside it because there is no
|
|
55
|
+
* `muted-on-brand` token: inside a sent bubble it could only be
|
|
56
|
+
* `text-fg-on-brand` at full strength, as loud as the message itself.
|
|
57
|
+
*/
|
|
58
|
+
footer?: React.ReactNode;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The bubble shell. Owns direction, size, surface, tail corner, and the meta row.
|
|
62
|
+
* Knows nothing about content type — it reacts to whichever slots are present,
|
|
63
|
+
* so attachments drop in without changing this component.
|
|
64
|
+
*
|
|
65
|
+
* The root is a column: the bubble, then an optional footer beneath it. That
|
|
66
|
+
* split exists only so `footer` has somewhere to live outside the surface —
|
|
67
|
+
* without a footer the column collapses to the bubble alone.
|
|
68
|
+
*/
|
|
69
|
+
declare function Message({ direction, size, showTimestamp, showReadReceipt, timestamp, timestampDateTime, status, footer, className, children, ...props }: MessageProps): React.JSX.Element;
|
|
70
|
+
type MessageFooterProps = React.ComponentProps<"div">;
|
|
71
|
+
/**
|
|
72
|
+
* Quiet attribution beneath the bubble — "Answered by AI", "Edited", "Sent via
|
|
73
|
+
* SMS". Rendered by the shell from its `footer` prop; exported for callers who
|
|
74
|
+
* compose their own.
|
|
75
|
+
*
|
|
76
|
+
* It owns layout and register only. What it says, and whether that is
|
|
77
|
+
* uppercased, is the caller's — this is a slot, not a label.
|
|
78
|
+
*/
|
|
79
|
+
declare function MessageFooter({ className, ...props }: MessageFooterProps): React.JSX.Element;
|
|
80
|
+
type MessageContentProps = useRender.ComponentProps<"div">;
|
|
81
|
+
/**
|
|
82
|
+
* The content region for prose. Attachment slots are sibling alternatives.
|
|
83
|
+
* Polymorphic via `render` — pass `render={<p />}` for paragraphs.
|
|
84
|
+
*/
|
|
85
|
+
declare function MessageContent({ className, render, ...props }: MessageContentProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
86
|
+
type MessageMetaProps = React.ComponentProps<"div">;
|
|
87
|
+
/** The meta row (timestamp + receipt). Not rendered when both are absent. */
|
|
88
|
+
declare function MessageMeta({ className, ...props }: MessageMetaProps): React.JSX.Element;
|
|
89
|
+
type MessageTimestampProps = React.ComponentProps<"time">;
|
|
90
|
+
/** Timestamp. Date values get an ISO `dateTime`; display strings require an explicit one. */
|
|
91
|
+
declare function MessageTimestamp({ className, children, dateTime, ...props }: MessageTimestampProps): React.JSX.Element | null;
|
|
92
|
+
type MessageReadReceiptProps = React.ComponentProps<"span">;
|
|
93
|
+
/**
|
|
94
|
+
* Delivery state indicator. Sent-only; returns nothing when the receipt is
|
|
95
|
+
* hidden or the message is received.
|
|
96
|
+
*
|
|
97
|
+
* `failed` renders text rather than a tick, so the message is legible instead of
|
|
98
|
+
* encoded in an icon nobody recognises.
|
|
99
|
+
*
|
|
100
|
+
* The tick is 14px at every size — the design pins it across the whole ladder.
|
|
101
|
+
*/
|
|
102
|
+
declare function MessageReadReceipt({ className, ...props }: MessageReadReceiptProps): React.JSX.Element | null;
|
|
103
|
+
type MessageMediaProps = React.ComponentProps<"div">;
|
|
104
|
+
/**
|
|
105
|
+
* The media box — the content region for `image` and `video`.
|
|
106
|
+
*
|
|
107
|
+
* A direct child of `Message`, replacing `MessageContent` rather than nesting
|
|
108
|
+
* inside it: Figma's bubble is `[content, meta]` with no wrapper.
|
|
109
|
+
*
|
|
110
|
+
* Owns the fixed per-size dimensions and radius, `bg-surface-overlay`, and the
|
|
111
|
+
* clip. Reads `size` from the shell via `group-data-*` — no spine props of its own.
|
|
112
|
+
*/
|
|
113
|
+
declare function MessageMedia({ className, ...props }: MessageMediaProps): React.JSX.Element;
|
|
114
|
+
interface MessageMediaImageProps extends Omit<useRender.ComponentProps<"img">, "alt"> {
|
|
115
|
+
/** Required — a chat photo is content, never decorative. */
|
|
116
|
+
alt: string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The image itself. Fills the box and crops via `object-cover`.
|
|
120
|
+
* Polymorphic via `render` for custom loaders.
|
|
121
|
+
*/
|
|
122
|
+
declare function MessageMediaImage({ className, render, ...props }: MessageMediaImageProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
123
|
+
type MessageMediaPlaceholderProps = React.ComponentProps<"div">;
|
|
124
|
+
/**
|
|
125
|
+
* The reserved-slot visual — a centred, decorative icon at
|
|
126
|
+
* `text-fg-caption-placeholder`. Children are the icon.
|
|
127
|
+
*/
|
|
128
|
+
declare function MessageMediaPlaceholder({ className, ...props }: MessageMediaPlaceholderProps): React.JSX.Element;
|
|
129
|
+
type MessageMediaPlayProps = React.ComponentProps<"button">;
|
|
130
|
+
/**
|
|
131
|
+
* The play control — a centred brand circle over the media.
|
|
132
|
+
*
|
|
133
|
+
* A real `<button>`, so focus and Enter/Space work without extra wiring.
|
|
134
|
+
* Labelled "Play video" by default; pass `aria-label` to override.
|
|
135
|
+
*
|
|
136
|
+
* The icon is nudged right for optical centring.
|
|
137
|
+
*/
|
|
138
|
+
declare function MessageMediaPlay({ className, type, "aria-label": ariaLabel, ...props }: MessageMediaPlayProps): React.JSX.Element;
|
|
139
|
+
type MessageMediaDurationProps = React.ComponentProps<"div">;
|
|
140
|
+
/**
|
|
141
|
+
* The duration badge, inset from the bottom-right of the media box.
|
|
142
|
+
*
|
|
143
|
+
* Children are the already-formatted string — the app owns the value, the
|
|
144
|
+
* component owns the presentation.
|
|
145
|
+
*/
|
|
146
|
+
declare function MessageMediaDuration({ className, ...props }: MessageMediaDurationProps): React.JSX.Element;
|
|
147
|
+
type MessageFileProps = React.ComponentProps<"div">;
|
|
148
|
+
/**
|
|
149
|
+
* The file row — icon chip, filename column, download control.
|
|
150
|
+
*
|
|
151
|
+
* A direct child of `Message`, in the same slot `MessageContent`, `MessageMedia`
|
|
152
|
+
* or `MessageVoice` would occupy. Reads `size` from the shell via `group-data-*`.
|
|
153
|
+
*/
|
|
154
|
+
declare function MessageFile({ className, ...props }: MessageFileProps): React.JSX.Element;
|
|
155
|
+
type MessageFileIconProps = React.ComponentProps<"div">;
|
|
156
|
+
/**
|
|
157
|
+
* The file-type icon chip. Children are the icon.
|
|
158
|
+
*
|
|
159
|
+
* `bg-fg-on-brand` is a foreground token used as a background, for the same
|
|
160
|
+
* reason as `MessageVoicePlay`: it preserves the intended contrast in dark
|
|
161
|
+
* mode.
|
|
162
|
+
*/
|
|
163
|
+
declare function MessageFileIcon({ className, ...props }: MessageFileIconProps): React.JSX.Element;
|
|
164
|
+
type MessageFileInfoProps = React.ComponentProps<"div">;
|
|
165
|
+
/**
|
|
166
|
+
* The filename column. `min-w-0` so its children can truncate against the
|
|
167
|
+
* shell's per-size `max-w` rather than pushing the bubble wider.
|
|
168
|
+
*/
|
|
169
|
+
declare function MessageFileInfo({ className, ...props }: MessageFileInfoProps): React.JSX.Element;
|
|
170
|
+
type MessageFileNameProps = React.ComponentProps<"p">;
|
|
171
|
+
/** The filename. Follows the body type ladder, semibold. Truncates. */
|
|
172
|
+
declare function MessageFileName({ className, ...props }: MessageFileNameProps): React.JSX.Element;
|
|
173
|
+
type MessageFileDetailProps = React.ComponentProps<"p">;
|
|
174
|
+
/**
|
|
175
|
+
* The secondary line — size and type, e.g. "248 KB · PDF". Follows the
|
|
176
|
+
* timestamp type ladder. The app formats it; the component only presents it.
|
|
177
|
+
*
|
|
178
|
+
* Received messages use secondary text; sent messages inherit on-brand text.
|
|
179
|
+
*/
|
|
180
|
+
declare function MessageFileDetail({ className, ...props }: MessageFileDetailProps): React.JSX.Element;
|
|
181
|
+
type MessageFileActionProps = useRender.ComponentProps<"button">;
|
|
182
|
+
/**
|
|
183
|
+
* The download control. Defaults to a `<button>`; pass `render={<a download />}`
|
|
184
|
+
* for a direct link. Labelled "Download file" by default.
|
|
185
|
+
*/
|
|
186
|
+
declare function MessageFileAction({ className, render, type, ...props }: MessageFileActionProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
187
|
+
type MessageVoiceProps = React.ComponentProps<"div">;
|
|
188
|
+
/**
|
|
189
|
+
* The voice-note row — play control alongside a waveform.
|
|
190
|
+
*
|
|
191
|
+
* A direct child of `Message`, in the same slot `MessageContent` or
|
|
192
|
+
* `MessageMedia` would occupy. Reads `size` from the shell via `group-data-*`.
|
|
193
|
+
*/
|
|
194
|
+
declare function MessageVoice({ className, ...props }: MessageVoiceProps): React.JSX.Element;
|
|
195
|
+
type MessageVoicePlayProps = React.ComponentProps<"button">;
|
|
196
|
+
/**
|
|
197
|
+
* The play control. A real `<button>`, so focus and Enter/Space work without
|
|
198
|
+
* extra wiring. Labelled "Play voice note" by default; pass `aria-label` to
|
|
199
|
+
* override.
|
|
200
|
+
*
|
|
201
|
+
* Direction controls the visual size and contrast treatment.
|
|
202
|
+
*/
|
|
203
|
+
declare function MessageVoicePlay({ className, type, "aria-label": ariaLabel, ...props }: MessageVoicePlayProps): React.JSX.Element;
|
|
204
|
+
type MessageVoiceWaveformProps = React.ComponentProps<"div">;
|
|
205
|
+
/**
|
|
206
|
+
* The waveform. Renders the built-in glyph unless children are supplied.
|
|
207
|
+
*
|
|
208
|
+
* Colour rides on `currentColor`, so the direction flip costs nothing.
|
|
209
|
+
*/
|
|
210
|
+
declare function MessageVoiceWaveform({ className, children, ...props }: MessageVoiceWaveformProps): React.JSX.Element;
|
|
211
|
+
type MessageVoiceDurationProps = React.ComponentProps<"p">;
|
|
212
|
+
/**
|
|
213
|
+
* The clip's length. Children are the already-formatted string — the app owns
|
|
214
|
+
* the value, the component owns the presentation.
|
|
215
|
+
*
|
|
216
|
+
* Follows the timestamp type ladder, and drops to `text-fg-primary` when
|
|
217
|
+
* received rather than inheriting the bubble's `text-fg-on-brand`.
|
|
218
|
+
*/
|
|
219
|
+
declare function MessageVoiceDuration({ className, ...props }: MessageVoiceDurationProps): React.JSX.Element;
|
|
220
|
+
/**
|
|
221
|
+
* How the marker presents itself.
|
|
222
|
+
*
|
|
223
|
+
* `default` — a full-width row. System notices, e.g. "Adaeze joined".
|
|
224
|
+
* `pill` — a centred chip. Date dividers, e.g. "Today".
|
|
225
|
+
*/
|
|
226
|
+
type MarkerVariant = "default" | "pill";
|
|
227
|
+
/** Variant styling for full-width notices and centred date-divider pills. */
|
|
228
|
+
declare const markerVariants: (props?: ({
|
|
229
|
+
variant?: "default" | "pill" | null | undefined;
|
|
230
|
+
size?: "lg" | "md" | "sm" | "xl" | null | undefined;
|
|
231
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
232
|
+
interface MarkerProps extends useRender.ComponentProps<"div"> {
|
|
233
|
+
/** Presentation — see {@link MarkerVariant}. @default "default" */
|
|
234
|
+
variant?: MarkerVariant;
|
|
235
|
+
/**
|
|
236
|
+
* Size ladder, matching the bubbles it sits among. @default "md"
|
|
237
|
+
*
|
|
238
|
+
* Unlike the parts inside `Message`, this is a real prop: a marker is a
|
|
239
|
+
* sibling of messages, not a child, so there is no shell above it to read
|
|
240
|
+
* `size` from. Pass it the same value the surrounding bubbles get.
|
|
241
|
+
*/
|
|
242
|
+
size?: MessageSize;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* A break in the conversation — a date divider, an unread line, a system notice.
|
|
246
|
+
*
|
|
247
|
+
* Deliberately takes no `direction`. A marker is not from anyone; it spans the
|
|
248
|
+
* conversation. Exposing `direction` would be a prop that does nothing in every
|
|
249
|
+
* state.
|
|
250
|
+
*
|
|
251
|
+
* Takes no role by default, because the same component serves three different
|
|
252
|
+
* meanings. Use `render` to give it real semantics where they exist — e.g.
|
|
253
|
+
* `render={<h3 />}` for a date heading, or a `role="separator"` for an unread line.
|
|
254
|
+
*/
|
|
255
|
+
declare function Marker({ className, variant, size, render, ...props }: MarkerProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
256
|
+
type MarkerIconProps = React.ComponentProps<"span">;
|
|
257
|
+
/** Decorative icon slot. Always hidden from assistive tech — the content carries the meaning. */
|
|
258
|
+
declare function MarkerIcon({ className, ...props }: MarkerIconProps): React.JSX.Element;
|
|
259
|
+
type MarkerContentProps = React.ComponentProps<"span">;
|
|
260
|
+
/** The marker's text. Wraps in a full-width row; stays on one line inside a pill. */
|
|
261
|
+
declare function MarkerContent({ className, ...props }: MarkerContentProps): React.JSX.Element;
|
|
262
|
+
//#endregion
|
|
263
|
+
export { Marker, MarkerContent, type MarkerContentProps, MarkerIcon, type MarkerIconProps, type MarkerProps, type MarkerVariant, Message, MessageContent, type MessageContentProps, type MessageDirection, MessageFile, MessageFileAction, type MessageFileActionProps, MessageFileDetail, type MessageFileDetailProps, MessageFileIcon, type MessageFileIconProps, MessageFileInfo, type MessageFileInfoProps, MessageFileName, type MessageFileNameProps, type MessageFileProps, MessageFooter, type MessageFooterProps, MessageGroup, type MessageGroupProps, MessageMedia, MessageMediaDuration, type MessageMediaDurationProps, MessageMediaImage, type MessageMediaImageProps, MessageMediaPlaceholder, type MessageMediaPlaceholderProps, MessageMediaPlay, type MessageMediaPlayProps, type MessageMediaProps, MessageMeta, type MessageMetaProps, type MessageProps, MessageReadReceipt, type MessageReadReceiptProps, type MessageSize, type MessageStatus, MessageTimestamp, type MessageTimestampProps, MessageVoice, MessageVoiceDuration, type MessageVoiceDurationProps, MessageVoicePlay, type MessageVoicePlayProps, type MessageVoiceProps, MessageVoiceWaveform, type MessageVoiceWaveformProps, markerVariants, messageVariants };
|