@skdx/react-blocks 0.34.0 → 0.36.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.
Files changed (169) hide show
  1. package/dist/chat-composer/ChatComposer.cjs +2 -0
  2. package/dist/chat-composer/ChatComposer.d.cts +20 -0
  3. package/dist/chat-composer/ChatComposer.d.ts +20 -0
  4. package/dist/chat-composer/ChatComposer.js +2 -0
  5. package/dist/chat-composer/index.d.cts +2 -0
  6. package/dist/chat-composer/index.d.ts +2 -0
  7. package/dist/chat-composer/types.d.cts +96 -0
  8. package/dist/chat-composer/types.d.ts +96 -0
  9. package/dist/chat-message/ChatMessage.cjs +2 -0
  10. package/dist/chat-message/ChatMessage.d.cts +23 -0
  11. package/dist/chat-message/ChatMessage.d.ts +23 -0
  12. package/dist/chat-message/ChatMessage.js +2 -0
  13. package/dist/chat-message/index.d.cts +2 -0
  14. package/dist/chat-message/index.d.ts +2 -0
  15. package/dist/chat-message/types.d.cts +57 -0
  16. package/dist/chat-message/types.d.ts +57 -0
  17. package/dist/comment/Comment.cjs +2 -0
  18. package/dist/comment/Comment.d.cts +22 -0
  19. package/dist/comment/Comment.d.ts +22 -0
  20. package/dist/comment/Comment.js +2 -0
  21. package/dist/comment/index.d.cts +2 -0
  22. package/dist/comment/index.d.ts +2 -0
  23. package/dist/comment/types.d.cts +47 -0
  24. package/dist/comment/types.d.ts +47 -0
  25. package/dist/comment-thread/CommentThread.cjs +2 -0
  26. package/dist/comment-thread/CommentThread.d.cts +21 -0
  27. package/dist/comment-thread/CommentThread.d.ts +21 -0
  28. package/dist/comment-thread/CommentThread.js +2 -0
  29. package/dist/comment-thread/index.d.cts +2 -0
  30. package/dist/comment-thread/index.d.ts +2 -0
  31. package/dist/comment-thread/types.d.cts +46 -0
  32. package/dist/comment-thread/types.d.ts +46 -0
  33. package/dist/confirm-dialog/ConfirmDialog.cjs +2 -0
  34. package/dist/confirm-dialog/ConfirmDialog.d.cts +31 -0
  35. package/dist/confirm-dialog/ConfirmDialog.d.ts +31 -0
  36. package/dist/confirm-dialog/ConfirmDialog.js +2 -0
  37. package/dist/confirm-dialog/index.d.cts +2 -0
  38. package/dist/confirm-dialog/index.d.ts +2 -0
  39. package/dist/confirm-dialog/types.d.cts +114 -0
  40. package/dist/confirm-dialog/types.d.ts +114 -0
  41. package/dist/conversation-list/ConversationList.cjs +2 -0
  42. package/dist/conversation-list/ConversationList.d.cts +20 -0
  43. package/dist/conversation-list/ConversationList.d.ts +20 -0
  44. package/dist/conversation-list/ConversationList.js +2 -0
  45. package/dist/conversation-list/index.d.cts +2 -0
  46. package/dist/conversation-list/index.d.ts +2 -0
  47. package/dist/conversation-list/types.d.cts +94 -0
  48. package/dist/conversation-list/types.d.ts +94 -0
  49. package/dist/empty-state/EmptyState.cjs +2 -0
  50. package/dist/empty-state/EmptyState.d.cts +21 -0
  51. package/dist/empty-state/EmptyState.d.ts +21 -0
  52. package/dist/empty-state/EmptyState.js +2 -0
  53. package/dist/empty-state/index.d.cts +2 -0
  54. package/dist/empty-state/index.d.ts +2 -0
  55. package/dist/empty-state/types.d.cts +36 -0
  56. package/dist/empty-state/types.d.ts +36 -0
  57. package/dist/filter-bar/FilterBar.cjs +2 -0
  58. package/dist/filter-bar/FilterBar.d.cts +23 -0
  59. package/dist/filter-bar/FilterBar.d.ts +23 -0
  60. package/dist/filter-bar/FilterBar.js +2 -0
  61. package/dist/filter-bar/index.d.cts +2 -0
  62. package/dist/filter-bar/index.d.ts +2 -0
  63. package/dist/filter-bar/types.d.cts +81 -0
  64. package/dist/filter-bar/types.d.ts +81 -0
  65. package/dist/forgot-password-page/ForgotPasswordPage.cjs +2 -0
  66. package/dist/forgot-password-page/ForgotPasswordPage.d.cts +20 -0
  67. package/dist/forgot-password-page/ForgotPasswordPage.d.ts +20 -0
  68. package/dist/forgot-password-page/ForgotPasswordPage.js +2 -0
  69. package/dist/forgot-password-page/index.d.cts +2 -0
  70. package/dist/forgot-password-page/index.d.ts +2 -0
  71. package/dist/forgot-password-page/types.d.cts +54 -0
  72. package/dist/forgot-password-page/types.d.ts +54 -0
  73. package/dist/form-section/FormSection.cjs +2 -0
  74. package/dist/form-section/FormSection.d.cts +22 -0
  75. package/dist/form-section/FormSection.d.ts +22 -0
  76. package/dist/form-section/FormSection.js +2 -0
  77. package/dist/form-section/index.d.cts +2 -0
  78. package/dist/form-section/index.d.ts +2 -0
  79. package/dist/form-section/types.d.cts +27 -0
  80. package/dist/form-section/types.d.ts +27 -0
  81. package/dist/index.cjs +1 -1
  82. package/dist/index.d.cts +19 -0
  83. package/dist/index.d.ts +19 -0
  84. package/dist/index.js +1 -1
  85. package/dist/internal/AuthPanel.d.cts +54 -0
  86. package/dist/internal/AuthPanel.d.ts +54 -0
  87. package/dist/internal/Region.d.cts +17 -0
  88. package/dist/internal/Region.d.ts +17 -0
  89. package/dist/internal/formValue.d.cts +6 -0
  90. package/dist/internal/formValue.d.ts +6 -0
  91. package/dist/notification-center/NotificationCenter.cjs +2 -0
  92. package/dist/notification-center/NotificationCenter.d.cts +21 -0
  93. package/dist/notification-center/NotificationCenter.d.ts +21 -0
  94. package/dist/notification-center/NotificationCenter.js +2 -0
  95. package/dist/notification-center/index.d.cts +2 -0
  96. package/dist/notification-center/index.d.ts +2 -0
  97. package/dist/notification-center/types.d.cts +104 -0
  98. package/dist/notification-center/types.d.ts +104 -0
  99. package/dist/onboarding-checklist/OnboardingChecklist.cjs +2 -0
  100. package/dist/onboarding-checklist/OnboardingChecklist.d.cts +25 -0
  101. package/dist/onboarding-checklist/OnboardingChecklist.d.ts +25 -0
  102. package/dist/onboarding-checklist/OnboardingChecklist.js +2 -0
  103. package/dist/onboarding-checklist/index.d.cts +2 -0
  104. package/dist/onboarding-checklist/index.d.ts +2 -0
  105. package/dist/onboarding-checklist/types.d.cts +67 -0
  106. package/dist/onboarding-checklist/types.d.ts +67 -0
  107. package/dist/reset-password-page/ResetPasswordPage.cjs +2 -0
  108. package/dist/reset-password-page/ResetPasswordPage.d.cts +20 -0
  109. package/dist/reset-password-page/ResetPasswordPage.d.ts +20 -0
  110. package/dist/reset-password-page/ResetPasswordPage.js +2 -0
  111. package/dist/reset-password-page/index.d.cts +2 -0
  112. package/dist/reset-password-page/index.d.ts +2 -0
  113. package/dist/reset-password-page/types.d.cts +64 -0
  114. package/dist/reset-password-page/types.d.ts +64 -0
  115. package/dist/sign-in-page/SignInPage.cjs +1 -1
  116. package/dist/sign-in-page/SignInPage.d.cts +1 -1
  117. package/dist/sign-in-page/SignInPage.d.ts +1 -1
  118. package/dist/sign-in-page/SignInPage.js +1 -1
  119. package/dist/sign-up-page/SignUpPage.cjs +2 -0
  120. package/dist/sign-up-page/SignUpPage.d.cts +21 -0
  121. package/dist/sign-up-page/SignUpPage.d.ts +21 -0
  122. package/dist/sign-up-page/SignUpPage.js +2 -0
  123. package/dist/sign-up-page/index.d.cts +2 -0
  124. package/dist/sign-up-page/index.d.ts +2 -0
  125. package/dist/sign-up-page/types.d.cts +100 -0
  126. package/dist/sign-up-page/types.d.ts +100 -0
  127. package/dist/stat-card/StatCard.cjs +2 -0
  128. package/dist/stat-card/StatCard.d.cts +22 -0
  129. package/dist/stat-card/StatCard.d.ts +22 -0
  130. package/dist/stat-card/StatCard.js +2 -0
  131. package/dist/stat-card/index.d.cts +2 -0
  132. package/dist/stat-card/index.d.ts +2 -0
  133. package/dist/stat-card/types.d.cts +71 -0
  134. package/dist/stat-card/types.d.ts +71 -0
  135. package/dist/usage-card/UsageCard.cjs +2 -0
  136. package/dist/usage-card/UsageCard.d.cts +17 -0
  137. package/dist/usage-card/UsageCard.d.ts +17 -0
  138. package/dist/usage-card/UsageCard.js +2 -0
  139. package/dist/usage-card/index.d.cts +2 -0
  140. package/dist/usage-card/index.d.ts +2 -0
  141. package/dist/usage-card/types.d.cts +50 -0
  142. package/dist/usage-card/types.d.ts +50 -0
  143. package/dist/usage-card/usage.d.cts +18 -0
  144. package/dist/usage-card/usage.d.ts +18 -0
  145. package/dist/user-menu/UserMenu.cjs +2 -0
  146. package/dist/user-menu/UserMenu.d.cts +19 -0
  147. package/dist/user-menu/UserMenu.d.ts +19 -0
  148. package/dist/user-menu/UserMenu.js +2 -0
  149. package/dist/user-menu/index.d.cts +2 -0
  150. package/dist/user-menu/index.d.ts +2 -0
  151. package/dist/user-menu/types.d.cts +89 -0
  152. package/dist/user-menu/types.d.ts +89 -0
  153. package/dist/verification-page/VerificationPage.cjs +2 -0
  154. package/dist/verification-page/VerificationPage.d.cts +20 -0
  155. package/dist/verification-page/VerificationPage.d.ts +20 -0
  156. package/dist/verification-page/VerificationPage.js +2 -0
  157. package/dist/verification-page/index.d.cts +2 -0
  158. package/dist/verification-page/index.d.ts +2 -0
  159. package/dist/verification-page/types.d.cts +89 -0
  160. package/dist/verification-page/types.d.ts +89 -0
  161. package/dist/workspace-switcher/WorkspaceSwitcher.cjs +2 -0
  162. package/dist/workspace-switcher/WorkspaceSwitcher.d.cts +25 -0
  163. package/dist/workspace-switcher/WorkspaceSwitcher.d.ts +25 -0
  164. package/dist/workspace-switcher/WorkspaceSwitcher.js +2 -0
  165. package/dist/workspace-switcher/index.d.cts +2 -0
  166. package/dist/workspace-switcher/index.d.ts +2 -0
  167. package/dist/workspace-switcher/types.d.cts +151 -0
  168. package/dist/workspace-switcher/types.d.ts +151 -0
  169. package/package.json +194 -3
@@ -0,0 +1,21 @@
1
+ import type * as React from 'react';
2
+ import type { CommentThreadProps } from './types.js';
3
+ /**
4
+ * A root comment with its replies, indented one level, collapsible with the
5
+ * consumer's own labels, plus slots for a load-more control and a composer.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <CommentThread
10
+ * replies={<Comment author="Alex">Agreed.</Comment>}
11
+ * showRepliesLabel="Show 1 reply"
12
+ * hideRepliesLabel="Hide replies"
13
+ * >
14
+ * <Comment author="Priya Shah">Looks good to me.</Comment>
15
+ * </CommentThread>
16
+ * ```
17
+ */
18
+ export declare const CommentThread: {
19
+ ({ children, replies, expanded: expandedProp, defaultExpanded, onExpandedChange, showRepliesLabel, hideRepliesLabel, loadMore, composer, ...props }: CommentThreadProps): React.ReactNode;
20
+ displayName: string;
21
+ };
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{CollapsibleContent as h,CollapsibleRoot as b,CollapsibleTrigger as k}from"@skdx/react/primitives/collapsible";function T(...e){let t="";for(let o of e)o&&(t=t?`${t} ${o}`:o);return t}function r(e,t,o){let a=t==="root",s=a?`skdx-${e}`:`skdx-${e}__${t}`,n={className:T(s,o),"data-part":t};return a&&(n["data-skdx-component"]=e),n}import*as p from"react";function f(e,t,o){let[a,s]=p.useState(t),n=e!==void 0;return[n?e:a,i=>{n||s(i),o?.(i)}]}import{jsx as d,jsxs as x}from"react/jsx-runtime";var v=({children:e,replies:t,expanded:o,defaultExpanded:a=!0,onExpandedChange:s,showRepliesLabel:n,hideRepliesLabel:c,loadMore:l,composer:i,...u})=>{let[m,C]=f(o,a,s),g=n?x(b,{open:m,onOpenChange:C,children:[d(k,{...r("comment-thread","toggle"),children:m?c??n:n}),d(h,{...r("comment-thread","replies"),children:t})]}):d("div",{...r("comment-thread","replies"),children:t});return x("div",{"data-state":m?"expanded":"collapsed",...u,...r("comment-thread","root",u.className),children:[d("div",{...r("comment-thread","comment"),children:e}),t?g:null,l?d("div",{...r("comment-thread","load-more"),children:l}):null,i?d("div",{...r("comment-thread","composer"),children:i}):null]})};v.displayName="CommentThread";export{v as CommentThread};
@@ -0,0 +1,2 @@
1
+ export { CommentThread } from './CommentThread.cjs';
2
+ export type { CommentThreadProps } from './types.cjs';
@@ -0,0 +1,2 @@
1
+ export { CommentThread } from './CommentThread.js';
2
+ export type { CommentThreadProps } from './types.js';
@@ -0,0 +1,46 @@
1
+ import type * as React from 'react';
2
+ /** Props for the {@link CommentThread} block. */
3
+ export interface CommentThreadProps extends React.ComponentPropsWithRef<'div'> {
4
+ /** The root Comment this thread replies to. */
5
+ children: React.ReactNode;
6
+ /**
7
+ * The reply Comments, rendered indented one level below the root comment.
8
+ * @default undefined — no replies region renders.
9
+ */
10
+ replies?: React.ReactNode | undefined;
11
+ /**
12
+ * Whether the replies are shown, for controlled usage paired with `onExpandedChange`.
13
+ * @default undefined — uncontrolled, seeded from `defaultExpanded`.
14
+ */
15
+ expanded?: boolean | undefined;
16
+ /**
17
+ * Whether the replies start shown, used only while uncontrolled.
18
+ * @default true
19
+ */
20
+ defaultExpanded?: boolean | undefined;
21
+ /**
22
+ * Fires with the new expanded state whenever the replies toggle is activated.
23
+ * @default undefined — no-op if omitted.
24
+ */
25
+ onExpandedChange?: ((expanded: boolean) => void) | undefined;
26
+ /**
27
+ * Text of the toggle button while the replies are hidden. A toggle only renders when this is given.
28
+ * @default undefined — no toggle renders and the replies are always shown.
29
+ */
30
+ showRepliesLabel?: string | undefined;
31
+ /**
32
+ * Text of the toggle button while the replies are shown.
33
+ * @default showRepliesLabel's value
34
+ */
35
+ hideRepliesLabel?: string | undefined;
36
+ /**
37
+ * Control that requests more replies, rendered below the replies region.
38
+ * @default undefined — no load-more region renders.
39
+ */
40
+ loadMore?: React.ReactNode | undefined;
41
+ /**
42
+ * Reply composer rendered at the end of the thread.
43
+ * @default undefined — no composer region renders.
44
+ */
45
+ composer?: React.ReactNode | undefined;
46
+ }
@@ -0,0 +1,46 @@
1
+ import type * as React from 'react';
2
+ /** Props for the {@link CommentThread} block. */
3
+ export interface CommentThreadProps extends React.ComponentPropsWithRef<'div'> {
4
+ /** The root Comment this thread replies to. */
5
+ children: React.ReactNode;
6
+ /**
7
+ * The reply Comments, rendered indented one level below the root comment.
8
+ * @default undefined — no replies region renders.
9
+ */
10
+ replies?: React.ReactNode | undefined;
11
+ /**
12
+ * Whether the replies are shown, for controlled usage paired with `onExpandedChange`.
13
+ * @default undefined — uncontrolled, seeded from `defaultExpanded`.
14
+ */
15
+ expanded?: boolean | undefined;
16
+ /**
17
+ * Whether the replies start shown, used only while uncontrolled.
18
+ * @default true
19
+ */
20
+ defaultExpanded?: boolean | undefined;
21
+ /**
22
+ * Fires with the new expanded state whenever the replies toggle is activated.
23
+ * @default undefined — no-op if omitted.
24
+ */
25
+ onExpandedChange?: ((expanded: boolean) => void) | undefined;
26
+ /**
27
+ * Text of the toggle button while the replies are hidden. A toggle only renders when this is given.
28
+ * @default undefined — no toggle renders and the replies are always shown.
29
+ */
30
+ showRepliesLabel?: string | undefined;
31
+ /**
32
+ * Text of the toggle button while the replies are shown.
33
+ * @default showRepliesLabel's value
34
+ */
35
+ hideRepliesLabel?: string | undefined;
36
+ /**
37
+ * Control that requests more replies, rendered below the replies region.
38
+ * @default undefined — no load-more region renders.
39
+ */
40
+ loadMore?: React.ReactNode | undefined;
41
+ /**
42
+ * Reply composer rendered at the end of the thread.
43
+ * @default undefined — no composer region renders.
44
+ */
45
+ composer?: React.ReactNode | undefined;
46
+ }
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ "use strict";var g=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var F=(t,o)=>{for(var n in o)g(t,n,{get:o[n],enumerable:!0})},S=(t,o,n,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of T(o))!B.call(t,r)&&r!==n&&g(t,r,{get:()=>o[r],enumerable:!(l=$(o,r))||l.enumerable});return t};var w=t=>S(g({},"__esModule",{value:!0}),t);var z={};F(z,{ConfirmDialog:()=>f});module.exports=w(z);var c=require("@skdx/react"),i=require("@skdx/react/primitives/dialog");function _(...t){let o="";for(let n of t)n&&(o=o?`${o} ${n}`:n);return o}function e(t,o,n){let l=o==="root",r=l?`skdx-${t}`:`skdx-${t}__${o}`,s={className:_(r,n),"data-part":o};return l&&(s["data-skdx-component"]=t),s}var a=require("react/jsx-runtime"),f=({open:t,defaultOpen:o=!1,onOpenChange:n,onOpenChangeComplete:l,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:x,onInteractOutside:k,onOpenAutoFocus:y,onCloseAutoFocus:P,trigger:m,title:b,description:u,confirmLabel:A="Confirm",cancelLabel:O="Cancel",destructive:D=!1,pending:d=!1,disabled:v=!1,size:R,onConfirm:h,onCancel:N,children:p,...C})=>(0,a.jsxs)(i.DialogRoot,{open:t,defaultOpen:o,onOpenChange:n,onOpenChangeComplete:l,role:"alertdialog",modal:!0,dismiss:d?"none":"escape",status:D?"danger":void 0,children:[m?(0,a.jsx)(i.DialogTrigger,{asChild:!0,children:m}):null,(0,a.jsxs)(i.DialogPortal,{children:[(0,a.jsx)(i.DialogOverlay,{}),(0,a.jsxs)(i.DialogContent,{onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:x,onInteractOutside:k,onOpenAutoFocus:y,onCloseAutoFocus:P,...C,size:R,...e("confirm-dialog","root",C.className),children:[(0,a.jsx)(i.DialogTitle,{...e("confirm-dialog","title"),children:b}),u?(0,a.jsx)(i.DialogDescription,{...e("confirm-dialog","description"),children:u}):null,p?(0,a.jsx)("div",{...e("confirm-dialog","body"),children:p}):null,(0,a.jsxs)("div",{...e("confirm-dialog","footer"),children:[(0,a.jsx)(i.DialogCancel,{asChild:!0,children:(0,a.jsx)(c.Button,{variant:"ghost",disabled:d,onClick:N,...e("confirm-dialog","cancel"),children:O})}),(0,a.jsx)(i.DialogAction,{asChild:!0,children:(0,a.jsx)(c.Button,{variant:D?"danger":"primary",loading:d,disabled:d||v,onClick:h,...e("confirm-dialog","confirm"),children:A})})]})]})]})]});f.displayName="ConfirmDialog";0&&(module.exports={ConfirmDialog});
@@ -0,0 +1,31 @@
1
+ import type * as React from 'react';
2
+ import type { ConfirmDialogProps } from './types.cjs';
3
+ /**
4
+ * Confirmation dialog block for a destructive, irreversible or sensitive
5
+ * action, composing the core alert dialog primitives with a `Button` footer
6
+ * and an externally controlled pending state that disables both buttons and
7
+ * blocks dismissal while the confirmed request is in flight.
8
+ *
9
+ * A synchronous confirmation with no pending state is served by the core
10
+ * `<Dialog role="alertdialog">` recipe alone.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <ConfirmDialog
15
+ * trigger={<Button variant="danger">Delete project</Button>}
16
+ * title="Delete this project?"
17
+ * description="This cannot be undone."
18
+ * destructive
19
+ * pending={isDeleting}
20
+ * onConfirm={(event) => {
21
+ * event.preventDefault();
22
+ * setDeleting(true);
23
+ * void deleteProject().finally(() => setDeleting(false));
24
+ * }}
25
+ * />
26
+ * ```
27
+ */
28
+ export declare const ConfirmDialog: {
29
+ ({ open, defaultOpen, onOpenChange, onOpenChangeComplete, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onOpenAutoFocus, onCloseAutoFocus, trigger, title, description, confirmLabel, cancelLabel, destructive, pending, disabled, size, onConfirm, onCancel, children, ...props }: ConfirmDialogProps): React.ReactNode;
30
+ displayName: string;
31
+ };
@@ -0,0 +1,31 @@
1
+ import type * as React from 'react';
2
+ import type { ConfirmDialogProps } from './types.js';
3
+ /**
4
+ * Confirmation dialog block for a destructive, irreversible or sensitive
5
+ * action, composing the core alert dialog primitives with a `Button` footer
6
+ * and an externally controlled pending state that disables both buttons and
7
+ * blocks dismissal while the confirmed request is in flight.
8
+ *
9
+ * A synchronous confirmation with no pending state is served by the core
10
+ * `<Dialog role="alertdialog">` recipe alone.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <ConfirmDialog
15
+ * trigger={<Button variant="danger">Delete project</Button>}
16
+ * title="Delete this project?"
17
+ * description="This cannot be undone."
18
+ * destructive
19
+ * pending={isDeleting}
20
+ * onConfirm={(event) => {
21
+ * event.preventDefault();
22
+ * setDeleting(true);
23
+ * void deleteProject().finally(() => setDeleting(false));
24
+ * }}
25
+ * />
26
+ * ```
27
+ */
28
+ export declare const ConfirmDialog: {
29
+ ({ open, defaultOpen, onOpenChange, onOpenChangeComplete, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onOpenAutoFocus, onCloseAutoFocus, trigger, title, description, confirmLabel, cancelLabel, destructive, pending, disabled, size, onConfirm, onCancel, children, ...props }: ConfirmDialogProps): React.ReactNode;
30
+ displayName: string;
31
+ };
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{Button as D}from"@skdx/react";import{DialogAction as $,DialogCancel as T,DialogContent as B,DialogDescription as F,DialogOverlay as S,DialogPortal as w,DialogRoot as _,DialogTitle as z,DialogTrigger as E}from"@skdx/react/primitives/dialog";function N(...a){let o="";for(let n of a)n&&(o=o?`${o} ${n}`:n);return o}function t(a,o,n){let r=o==="root",d=r?`skdx-${a}`:`skdx-${a}__${o}`,e={className:N(d,n),"data-part":o};return r&&(e["data-skdx-component"]=a),e}import{jsx as i,jsxs as s}from"react/jsx-runtime";var p=({open:a,defaultOpen:o=!1,onOpenChange:n,onOpenChangeComplete:r,onEscapeKeyDown:d,onPointerDownOutside:e,onFocusOutside:C,onInteractOutside:x,onOpenAutoFocus:k,onCloseAutoFocus:y,trigger:g,title:P,description:c,confirmLabel:b="Confirm",cancelLabel:A="Cancel",destructive:f=!1,pending:l=!1,disabled:O=!1,size:v,onConfirm:R,onCancel:h,children:m,...u})=>s(_,{open:a,defaultOpen:o,onOpenChange:n,onOpenChangeComplete:r,role:"alertdialog",modal:!0,dismiss:l?"none":"escape",status:f?"danger":void 0,children:[g?i(E,{asChild:!0,children:g}):null,s(w,{children:[i(S,{}),s(B,{onEscapeKeyDown:d,onPointerDownOutside:e,onFocusOutside:C,onInteractOutside:x,onOpenAutoFocus:k,onCloseAutoFocus:y,...u,size:v,...t("confirm-dialog","root",u.className),children:[i(z,{...t("confirm-dialog","title"),children:P}),c?i(F,{...t("confirm-dialog","description"),children:c}):null,m?i("div",{...t("confirm-dialog","body"),children:m}):null,s("div",{...t("confirm-dialog","footer"),children:[i(T,{asChild:!0,children:i(D,{variant:"ghost",disabled:l,onClick:h,...t("confirm-dialog","cancel"),children:A})}),i($,{asChild:!0,children:i(D,{variant:f?"danger":"primary",loading:l,disabled:l||O,onClick:R,...t("confirm-dialog","confirm"),children:b})})]})]})]})]});p.displayName="ConfirmDialog";export{p as ConfirmDialog};
@@ -0,0 +1,2 @@
1
+ export { ConfirmDialog } from './ConfirmDialog.cjs';
2
+ export type { ConfirmDialogProps } from './types.cjs';
@@ -0,0 +1,2 @@
1
+ export { ConfirmDialog } from './ConfirmDialog.js';
2
+ export type { ConfirmDialogProps } from './types.js';
@@ -0,0 +1,114 @@
1
+ import type * as React from 'react';
2
+ import type { DialogContent } from '@skdx/react/primitives/dialog';
3
+ type ContentProps = React.ComponentProps<typeof DialogContent>;
4
+ /** Props for the {@link ConfirmDialog} block. */
5
+ export interface ConfirmDialogProps extends Omit<React.ComponentPropsWithRef<'dialog'>, 'title' | 'open' | 'onCancel'> {
6
+ /**
7
+ * Whether the dialog is open, for controlled usage. Pair with `onOpenChange`.
8
+ * @default undefined — uncontrolled, tracks its own open state internally.
9
+ */
10
+ open?: boolean | undefined;
11
+ /**
12
+ * Whether the dialog starts open, for uncontrolled usage.
13
+ * @default false
14
+ */
15
+ defaultOpen?: boolean | undefined;
16
+ /**
17
+ * Fires with the new open state whenever the dialog opens or closes, controlled or not.
18
+ * @default undefined — no-op if omitted.
19
+ */
20
+ onOpenChange?: ((open: boolean) => void) | undefined;
21
+ /**
22
+ * Fires with the new open state once the enter or exit animation has settled.
23
+ * @default undefined — no-op if omitted.
24
+ */
25
+ onOpenChangeComplete?: ((open: boolean) => void) | undefined;
26
+ /**
27
+ * Fires when Escape is pressed while open; `preventDefault()` keeps it open.
28
+ * @default undefined — no-op if omitted.
29
+ */
30
+ onEscapeKeyDown?: ContentProps['onEscapeKeyDown'];
31
+ /**
32
+ * Fires on a pointer-down outside the content while open; `preventDefault()` keeps it open.
33
+ * @default undefined — no-op if omitted.
34
+ */
35
+ onPointerDownOutside?: ContentProps['onPointerDownOutside'];
36
+ /**
37
+ * Fires when focus moves outside the content while open; `preventDefault()` keeps it open.
38
+ * @default undefined — no-op if omitted.
39
+ */
40
+ onFocusOutside?: ContentProps['onFocusOutside'];
41
+ /**
42
+ * Fires for either kind of outside interaction, just before the specific event.
43
+ * @default undefined — no-op if omitted.
44
+ */
45
+ onInteractOutside?: ContentProps['onInteractOutside'];
46
+ /**
47
+ * Fires before focus moves into the content on open; `preventDefault()` leaves focus where it is.
48
+ * @default undefined — no-op if omitted.
49
+ */
50
+ onOpenAutoFocus?: ContentProps['onOpenAutoFocus'];
51
+ /**
52
+ * Fires before focus returns to the trigger on close; `preventDefault()` suppresses that return.
53
+ * @default undefined — no-op if omitted.
54
+ */
55
+ onCloseAutoFocus?: ContentProps['onCloseAutoFocus'];
56
+ /**
57
+ * Element that opens the dialog, decorated with the trigger's open behavior via `asChild`.
58
+ * @default undefined — no trigger renders; open the dialog through `open`/`onOpenChange` instead.
59
+ */
60
+ trigger?: React.ReactElement | undefined;
61
+ /** Heading text rendered into the panel's title, naming and labelling the dialog. */
62
+ title: string;
63
+ /**
64
+ * Supporting sentence rendered into the panel's description, read alongside the title.
65
+ * @default undefined — no description region renders.
66
+ */
67
+ description?: string | undefined;
68
+ /**
69
+ * Text of the button that carries out the confirmed action.
70
+ * @default 'Confirm'
71
+ */
72
+ confirmLabel?: string | undefined;
73
+ /**
74
+ * Text of the button that abandons the action.
75
+ * @default 'Cancel'
76
+ */
77
+ cancelLabel?: string | undefined;
78
+ /**
79
+ * Renders the confirm button in the skin's danger weight and marks the panel `data-status="danger"`, for an irreversible or destructive action.
80
+ * @default false
81
+ */
82
+ destructive?: boolean | undefined;
83
+ /**
84
+ * Marks the confirmed request as in flight: disables both buttons, renders the confirm button's loading state, and blocks Escape dismissal until it clears.
85
+ * @default false
86
+ */
87
+ pending?: boolean | undefined;
88
+ /**
89
+ * Disables the confirm button on its own, independent of `pending` — for example until a typed confirmation matches.
90
+ * @default false
91
+ */
92
+ disabled?: boolean | undefined;
93
+ /**
94
+ * Panel width rung the skin reads, fed to the underlying dialog panel.
95
+ * @default undefined — the skin's own default width.
96
+ */
97
+ size?: 'sm' | 'md' | 'lg' | (string & {}) | undefined;
98
+ /**
99
+ * Fires when the confirm button is activated, before the dialog closes. Call `event.preventDefault()` to hold the panel open while an async request runs, typically alongside `pending`.
100
+ * @default undefined — no-op if omitted.
101
+ */
102
+ onConfirm?: ((event: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
103
+ /**
104
+ * Fires when the cancel button is activated, before the dialog closes. Call `event.preventDefault()` to keep the panel open.
105
+ * @default undefined — no-op if omitted.
106
+ */
107
+ onCancel?: ((event: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
108
+ /**
109
+ * Extra content rendered between the description and the footer buttons.
110
+ * @default undefined — no body region renders.
111
+ */
112
+ children?: React.ReactNode | undefined;
113
+ }
114
+ export {};
@@ -0,0 +1,114 @@
1
+ import type * as React from 'react';
2
+ import type { DialogContent } from '@skdx/react/primitives/dialog';
3
+ type ContentProps = React.ComponentProps<typeof DialogContent>;
4
+ /** Props for the {@link ConfirmDialog} block. */
5
+ export interface ConfirmDialogProps extends Omit<React.ComponentPropsWithRef<'dialog'>, 'title' | 'open' | 'onCancel'> {
6
+ /**
7
+ * Whether the dialog is open, for controlled usage. Pair with `onOpenChange`.
8
+ * @default undefined — uncontrolled, tracks its own open state internally.
9
+ */
10
+ open?: boolean | undefined;
11
+ /**
12
+ * Whether the dialog starts open, for uncontrolled usage.
13
+ * @default false
14
+ */
15
+ defaultOpen?: boolean | undefined;
16
+ /**
17
+ * Fires with the new open state whenever the dialog opens or closes, controlled or not.
18
+ * @default undefined — no-op if omitted.
19
+ */
20
+ onOpenChange?: ((open: boolean) => void) | undefined;
21
+ /**
22
+ * Fires with the new open state once the enter or exit animation has settled.
23
+ * @default undefined — no-op if omitted.
24
+ */
25
+ onOpenChangeComplete?: ((open: boolean) => void) | undefined;
26
+ /**
27
+ * Fires when Escape is pressed while open; `preventDefault()` keeps it open.
28
+ * @default undefined — no-op if omitted.
29
+ */
30
+ onEscapeKeyDown?: ContentProps['onEscapeKeyDown'];
31
+ /**
32
+ * Fires on a pointer-down outside the content while open; `preventDefault()` keeps it open.
33
+ * @default undefined — no-op if omitted.
34
+ */
35
+ onPointerDownOutside?: ContentProps['onPointerDownOutside'];
36
+ /**
37
+ * Fires when focus moves outside the content while open; `preventDefault()` keeps it open.
38
+ * @default undefined — no-op if omitted.
39
+ */
40
+ onFocusOutside?: ContentProps['onFocusOutside'];
41
+ /**
42
+ * Fires for either kind of outside interaction, just before the specific event.
43
+ * @default undefined — no-op if omitted.
44
+ */
45
+ onInteractOutside?: ContentProps['onInteractOutside'];
46
+ /**
47
+ * Fires before focus moves into the content on open; `preventDefault()` leaves focus where it is.
48
+ * @default undefined — no-op if omitted.
49
+ */
50
+ onOpenAutoFocus?: ContentProps['onOpenAutoFocus'];
51
+ /**
52
+ * Fires before focus returns to the trigger on close; `preventDefault()` suppresses that return.
53
+ * @default undefined — no-op if omitted.
54
+ */
55
+ onCloseAutoFocus?: ContentProps['onCloseAutoFocus'];
56
+ /**
57
+ * Element that opens the dialog, decorated with the trigger's open behavior via `asChild`.
58
+ * @default undefined — no trigger renders; open the dialog through `open`/`onOpenChange` instead.
59
+ */
60
+ trigger?: React.ReactElement | undefined;
61
+ /** Heading text rendered into the panel's title, naming and labelling the dialog. */
62
+ title: string;
63
+ /**
64
+ * Supporting sentence rendered into the panel's description, read alongside the title.
65
+ * @default undefined — no description region renders.
66
+ */
67
+ description?: string | undefined;
68
+ /**
69
+ * Text of the button that carries out the confirmed action.
70
+ * @default 'Confirm'
71
+ */
72
+ confirmLabel?: string | undefined;
73
+ /**
74
+ * Text of the button that abandons the action.
75
+ * @default 'Cancel'
76
+ */
77
+ cancelLabel?: string | undefined;
78
+ /**
79
+ * Renders the confirm button in the skin's danger weight and marks the panel `data-status="danger"`, for an irreversible or destructive action.
80
+ * @default false
81
+ */
82
+ destructive?: boolean | undefined;
83
+ /**
84
+ * Marks the confirmed request as in flight: disables both buttons, renders the confirm button's loading state, and blocks Escape dismissal until it clears.
85
+ * @default false
86
+ */
87
+ pending?: boolean | undefined;
88
+ /**
89
+ * Disables the confirm button on its own, independent of `pending` — for example until a typed confirmation matches.
90
+ * @default false
91
+ */
92
+ disabled?: boolean | undefined;
93
+ /**
94
+ * Panel width rung the skin reads, fed to the underlying dialog panel.
95
+ * @default undefined — the skin's own default width.
96
+ */
97
+ size?: 'sm' | 'md' | 'lg' | (string & {}) | undefined;
98
+ /**
99
+ * Fires when the confirm button is activated, before the dialog closes. Call `event.preventDefault()` to hold the panel open while an async request runs, typically alongside `pending`.
100
+ * @default undefined — no-op if omitted.
101
+ */
102
+ onConfirm?: ((event: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
103
+ /**
104
+ * Fires when the cancel button is activated, before the dialog closes. Call `event.preventDefault()` to keep the panel open.
105
+ * @default undefined — no-op if omitted.
106
+ */
107
+ onCancel?: ((event: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
108
+ /**
109
+ * Extra content rendered between the description and the footer buttons.
110
+ * @default undefined — no body region renders.
111
+ */
112
+ children?: React.ReactNode | undefined;
113
+ }
114
+ export {};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ "use strict";var V=Object.create;var v=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var G=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var z=(e,t)=>{for(var n in t)v(e,n,{get:t[n],enumerable:!0})},R=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $(t))!_.call(e,i)&&i!==n&&v(e,i,{get:()=>t[i],enumerable:!(a=O(t,i))||a.enumerable});return e};var C=(e,t,n)=>(n=e!=null?V(G(e)):{},R(t||!e||!e.__esModule?v(n,"default",{value:e,enumerable:!0}):n,e)),B=e=>R(v({},"__esModule",{value:!0}),e);var H={};z(H,{ConversationList:()=>m});module.exports=B(H);var S=C(require("react"),1),r=require("@skdx/react"),d=require("@skdx/react/primitives/listbox"),N=require("../empty-state/EmptyState.cjs");function D(...e){let t="";for(let n of e)n&&(t=t?`${t} ${n}`:n);return t}function s(e,t,n){let a=t==="root",i=a?`skdx-${e}`:`skdx-${e}__${t}`,l={className:D(i,n),"data-part":t};return a&&(l["data-skdx-component"]=e),l}var k=C(require("react"),1);function w(e,t,n){let[a,i]=k.useState(t),l=e!==void 0;return[l?e:a,c=>{l||i(c),n?.(c)}]}var o=require("react/jsx-runtime"),E=[0,1,2];function F(e){let t=new Map([[void 0,[]]]);for(let n of e){let a=t.get(n.group);a?a.push(n):t.set(n.group,[n])}return[...t].filter(([,n])=>n.length>0)}function I(e,t){let n=e.timestamp!==void 0||e.badge!==void 0;return(0,o.jsxs)(d.ListboxItem,{value:e.id,disabled:e.disabled,textValue:e.title,"data-unread":e.unread?"":void 0,...s("conversation-list","item"),children:[t.renderLeading?(0,o.jsx)("span",{"aria-hidden":"true",...s("conversation-list","leading"),children:t.renderLeading(e)}):null,(0,o.jsxs)("span",{...s("conversation-list","body"),children:[(0,o.jsxs)("span",{...s("conversation-list","title"),children:[e.title,e.unread?(0,o.jsxs)(r.VisuallyHidden,{children:[" ",t.unreadLabel]}):null]}),e.preview?(0,o.jsx)("span",{...s("conversation-list","preview"),children:e.preview}):null]}),n?(0,o.jsxs)("span",{...s("conversation-list","meta"),children:[e.timestamp===void 0?null:(0,o.jsx)(r.Time,{value:e.timestamp,relative:!0,now:t.now,...s("conversation-list","time")}),e.badge===void 0?null:(0,o.jsx)(r.Badge,{size:"sm",...s("conversation-list","badge"),children:e.badge})]}):null]},e.id)}var m=({items:e,value:t,defaultValue:n,onValueChange:a,label:i="Conversations",unreadLabel:l="Unread",emptyTitle:g="No conversations",emptyDescription:b,loading:c=!1,now:P,renderLeading:T,...L})=>{let[h,A]=w(t,n??"",a),x={unreadLabel:l,now:P,renderLeading:T},p;return c?p=(0,o.jsx)("div",{"aria-hidden":"true",...s("conversation-list","loading"),children:E.map(u=>(0,o.jsx)(r.Skeleton,{},u))}):e.length===0?p=(0,o.jsx)(N.EmptyState,{size:"sm",title:g,description:b,...s("conversation-list","empty")}):p=(0,o.jsx)(d.Listbox,{"aria-label":i,value:h,onValueChange:u=>{A(u.selectedValue??"")},...s("conversation-list","list"),children:F(e).map(([u,y])=>u===void 0?(0,o.jsx)(S.Fragment,{children:y.map(f=>I(f,x))},"ungrouped"):(0,o.jsxs)(d.ListboxGroup,{...s("conversation-list","group"),children:[(0,o.jsx)(d.ListboxLabel,{...s("conversation-list","group-label"),children:u}),y.map(f=>I(f,x))]},u))}),(0,o.jsx)("div",{"aria-busy":c,...L,...s("conversation-list","root",L.className),children:p})};m.displayName="ConversationList";0&&(module.exports={ConversationList});
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import type { ConversationListProps } from './types.cjs';
3
+ /**
4
+ * Conversation navigation block: a single-select listbox of threads with a
5
+ * title, preview, relative timestamp, unread mark and badge, plus grouping and
6
+ * its own loading and empty states.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <ConversationList
11
+ * items={[{ id: 'a', title: 'Ada Lovelace', preview: 'Sounds good', unread: true }]}
12
+ * defaultValue="a"
13
+ * onValueChange={(id) => open(id)}
14
+ * />
15
+ * ```
16
+ */
17
+ export declare const ConversationList: {
18
+ ({ items, value: valueProp, defaultValue, onValueChange, label, unreadLabel, emptyTitle, emptyDescription, loading, now, renderLeading, ...props }: ConversationListProps): React.ReactNode;
19
+ displayName: string;
20
+ };
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import type { ConversationListProps } from './types.js';
3
+ /**
4
+ * Conversation navigation block: a single-select listbox of threads with a
5
+ * title, preview, relative timestamp, unread mark and badge, plus grouping and
6
+ * its own loading and empty states.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <ConversationList
11
+ * items={[{ id: 'a', title: 'Ada Lovelace', preview: 'Sounds good', unread: true }]}
12
+ * defaultValue="a"
13
+ * onValueChange={(id) => open(id)}
14
+ * />
15
+ * ```
16
+ */
17
+ export declare const ConversationList: {
18
+ ({ items, value: valueProp, defaultValue, onValueChange, label, unreadLabel, emptyTitle, emptyDescription, loading, now, renderLeading, ...props }: ConversationListProps): React.ReactNode;
19
+ displayName: string;
20
+ };
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import*as R from"react";import{Badge as P,Skeleton as T,Time as h,VisuallyHidden as A}from"@skdx/react";import{Listbox as V,ListboxGroup as O,ListboxItem as $,ListboxLabel as G}from"@skdx/react/primitives/listbox";import{EmptyState as _}from"../empty-state/EmptyState.js";function N(...e){let t="";for(let n of e)n&&(t=t?`${t} ${n}`:n);return t}function o(e,t,n){let a=t==="root",l=a?`skdx-${e}`:`skdx-${e}__${t}`,i={className:N(l,n),"data-part":t};return a&&(i["data-skdx-component"]=e),i}import*as L from"react";function x(e,t,n){let[a,l]=L.useState(t),i=e!==void 0;return[i?e:a,u=>{i||l(u),n?.(u)}]}import{jsx as s,jsxs as d}from"react/jsx-runtime";var z=[0,1,2];function B(e){let t=new Map([[void 0,[]]]);for(let n of e){let a=t.get(n.group);a?a.push(n):t.set(n.group,[n])}return[...t].filter(([,n])=>n.length>0)}function y(e,t){let n=e.timestamp!==void 0||e.badge!==void 0;return d($,{value:e.id,disabled:e.disabled,textValue:e.title,"data-unread":e.unread?"":void 0,...o("conversation-list","item"),children:[t.renderLeading?s("span",{"aria-hidden":"true",...o("conversation-list","leading"),children:t.renderLeading(e)}):null,d("span",{...o("conversation-list","body"),children:[d("span",{...o("conversation-list","title"),children:[e.title,e.unread?d(A,{children:[" ",t.unreadLabel]}):null]}),e.preview?s("span",{...o("conversation-list","preview"),children:e.preview}):null]}),n?d("span",{...o("conversation-list","meta"),children:[e.timestamp===void 0?null:s(h,{value:e.timestamp,relative:!0,now:t.now,...o("conversation-list","time")}),e.badge===void 0?null:s(P,{size:"sm",...o("conversation-list","badge"),children:e.badge})]}):null]},e.id)}var C=({items:e,value:t,defaultValue:n,onValueChange:a,label:l="Conversations",unreadLabel:i="Unread",emptyTitle:v="No conversations",emptyDescription:f,loading:u=!1,now:k,renderLeading:w,...m})=>{let[I,S]=x(t,n??"",a),g={unreadLabel:i,now:k,renderLeading:w},c;return u?c=s("div",{"aria-hidden":"true",...o("conversation-list","loading"),children:z.map(r=>s(T,{},r))}):e.length===0?c=s(_,{size:"sm",title:v,description:f,...o("conversation-list","empty")}):c=s(V,{"aria-label":l,value:I,onValueChange:r=>{S(r.selectedValue??"")},...o("conversation-list","list"),children:B(e).map(([r,b])=>r===void 0?s(R.Fragment,{children:b.map(p=>y(p,g))},"ungrouped"):d(O,{...o("conversation-list","group"),children:[s(G,{...o("conversation-list","group-label"),children:r}),b.map(p=>y(p,g))]},r))}),s("div",{"aria-busy":u,...m,...o("conversation-list","root",m.className),children:c})};C.displayName="ConversationList";export{C as ConversationList};
@@ -0,0 +1,2 @@
1
+ export { ConversationList } from './ConversationList.cjs';
2
+ export type { ConversationListItem, ConversationListProps } from './types.cjs';
@@ -0,0 +1,2 @@
1
+ export { ConversationList } from './ConversationList.js';
2
+ export type { ConversationListItem, ConversationListProps } from './types.js';
@@ -0,0 +1,94 @@
1
+ import type * as React from 'react';
2
+ import type { DateInput } from '@skdx/react';
3
+ /** One conversation or thread row rendered by the {@link ConversationList} block. */
4
+ export interface ConversationListItem {
5
+ /** Identifier committed as the list's selected value when this row is chosen. */
6
+ id: string;
7
+ /** Primary line of the row, and the text the list's typeahead matches on. */
8
+ title: string;
9
+ /**
10
+ * Secondary line under the title, clamped by the skin to two lines.
11
+ * @default undefined — no preview line renders in the row.
12
+ */
13
+ preview?: string | undefined;
14
+ /**
15
+ * Instant rendered as a relative timestamp in the row's meta column.
16
+ * @default undefined — no timestamp renders in the row.
17
+ */
18
+ timestamp?: DateInput | undefined;
19
+ /**
20
+ * Marks the row as not yet read, mirrored to `data-unread` on the option.
21
+ * @default false
22
+ */
23
+ unread?: boolean | undefined;
24
+ /**
25
+ * Short count or status text rendered into a small badge beside the timestamp.
26
+ * @default undefined — no badge renders in the row.
27
+ */
28
+ badge?: string | undefined;
29
+ /**
30
+ * Heading this row belongs under; rows sharing it render inside one group.
31
+ * @default undefined — the row renders ungrouped, ahead of every group.
32
+ */
33
+ group?: string | undefined;
34
+ /**
35
+ * Excludes this row from selection and from keyboard and typeahead navigation.
36
+ * @default false
37
+ */
38
+ disabled?: boolean | undefined;
39
+ }
40
+ /** Props for the {@link ConversationList} block. */
41
+ export interface ConversationListProps extends React.ComponentPropsWithRef<'div'> {
42
+ /** The conversations to render, in order, each one a selectable listbox option. */
43
+ items: ReadonlyArray<ConversationListItem>;
44
+ /**
45
+ * Selected conversation's id for controlled usage, paired with `onValueChange`.
46
+ * @default undefined — uncontrolled, tracking the selected id internally.
47
+ */
48
+ value?: string | undefined;
49
+ /**
50
+ * Conversation selected on first render, for uncontrolled usage of the list.
51
+ * @default undefined — no conversation is selected until one is chosen.
52
+ */
53
+ defaultValue?: string | undefined;
54
+ /**
55
+ * Fires with the newly selected conversation's id whenever the selection moves.
56
+ * @default undefined — the selection change is not reported anywhere.
57
+ */
58
+ onValueChange?: ((value: string) => void) | undefined;
59
+ /**
60
+ * Accessible name of the listbox holding the conversation rows.
61
+ * @default 'Conversations'
62
+ */
63
+ label?: string | undefined;
64
+ /**
65
+ * Visually hidden text appended to an unread row's title, so the mark is spoken.
66
+ * @default 'Unread'
67
+ */
68
+ unreadLabel?: string | undefined;
69
+ /**
70
+ * Heading of the empty state shown when `items` is empty and nothing is loading.
71
+ * @default 'No conversations'
72
+ */
73
+ emptyTitle?: string | undefined;
74
+ /**
75
+ * Supporting copy rendered under the empty state's heading, explaining the gap.
76
+ * @default undefined — the empty state renders its heading alone.
77
+ */
78
+ emptyDescription?: string | undefined;
79
+ /**
80
+ * Replaces the rows with decorative placeholder lines and marks the root `aria-busy`.
81
+ * @default false
82
+ */
83
+ loading?: boolean | undefined;
84
+ /**
85
+ * Reference instant the relative timestamps are measured from, to control re-renders.
86
+ * @default undefined — each timestamp reads the clock as it renders.
87
+ */
88
+ now?: Date | number | undefined;
89
+ /**
90
+ * Renders a decorative leading region for a row, such as an avatar or a status dot.
91
+ * @default undefined — no leading region renders in any row.
92
+ */
93
+ renderLeading?: ((item: ConversationListItem) => React.ReactNode) | undefined;
94
+ }