@skdx/react-blocks 0.35.0 → 0.37.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.
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";var R=Object.create;var u=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var $=(t,a)=>{for(var o in a)u(t,o,{get:a[o],enumerable:!0})},f=(t,a,o,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of L(a))!I.call(t,d)&&d!==o&&u(t,d,{get:()=>a[d],enumerable:!(r=T(a,d))||r.enumerable});return t};var p=(t,a,o)=>(o=t!=null?R(S(t)):{},f(a||!t||!t.__esModule?u(o,"default",{value:t,enumerable:!0}):o,t)),A=t=>f(u({},"__esModule",{value:!0}),t);var C={};$(C,{DashboardLayout:()=>c});module.exports=A(C);var k=p(require("react"),1),x=require("@skdx/react");function O(...t){let a="";for(let o of t)o&&(a=a?`${a} ${o}`:o);return a}function e(t,a,o){let r=a==="root",d=r?`skdx-${t}`:`skdx-${t}__${a}`,s={className:O(d,o),"data-part":a};return r&&(s["data-skdx-component"]=t),s}var g=p(require("react"),1);function m(t,a,o){let[r,d]=g.useState(a),s=t!==void 0;return[s?t:r,i=>{s||d(i),o?.(i)}]}var n=require("react/jsx-runtime");function N({items:t}){return(0,n.jsx)("ul",{...e("dashboard-layout","nav-list"),children:t.map((a,o)=>{let r=a.kind??"item";return r==="divider"?(0,n.jsx)("li",{children:(0,n.jsx)("hr",{...e("dashboard-layout","nav-divider")})},o):r==="header"?(0,n.jsx)("li",{...e("dashboard-layout","nav-header"),children:a.label},o):(0,n.jsxs)("li",{children:[a.href===void 0?(0,n.jsx)("span",{...e("dashboard-layout","nav-item"),children:a.label}):(0,n.jsx)("a",{href:a.href,"aria-current":a.current?"page":void 0,...e("dashboard-layout","nav-item"),children:a.label}),a.children&&a.children.length>0?(0,n.jsx)(N,{items:a.children}):null]},o)})})}var c=({title:t,navigation:a,navOpen:o,defaultNavOpen:r=!0,navLabel:d="Main navigation",navToggleLabel:s="Toggle navigation",onNavOpenChange:b,branding:v,actions:i,children:D,...h})=>{let y=k.useId(),[l,P]=m(o,r,b);return(0,n.jsxs)("div",{"data-nav-open":l?"":void 0,...h,...e("dashboard-layout","root",h.className),children:[(0,n.jsxs)("header",{...e("dashboard-layout","app-bar"),children:[(0,n.jsx)(x.Button,{iconOnly:!0,"aria-expanded":l,"aria-controls":y,"aria-label":s,onClick:()=>{P(!l)},...e("dashboard-layout","nav-toggle"),children:"\u2630"}),(0,n.jsx)("div",{...e("dashboard-layout","branding"),children:v}),t?(0,n.jsx)("span",{...e("dashboard-layout","title"),children:t}):null,(0,n.jsx)("div",{...e("dashboard-layout","actions"),children:i})]}),(0,n.jsxs)("div",{...e("dashboard-layout","body"),children:[(0,n.jsx)("nav",{id:y,"aria-label":d,hidden:!l,...e("dashboard-layout","nav"),children:(0,n.jsx)(N,{items:a})}),(0,n.jsx)("main",{...e("dashboard-layout","content"),children:D})]})]})};c.displayName="DashboardLayout";0&&(module.exports={DashboardLayout});
2
+ "use strict";var R=Object.create;var u=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var $=(t,a)=>{for(var o in a)u(t,o,{get:a[o],enumerable:!0})},y=(t,a,o,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of L(a))!I.call(t,d)&&d!==o&&u(t,d,{get:()=>a[d],enumerable:!(r=T(a,d))||r.enumerable});return t};var p=(t,a,o)=>(o=t!=null?R(S(t)):{},y(a||!t||!t.__esModule?u(o,"default",{value:t,enumerable:!0}):o,t)),A=t=>y(u({},"__esModule",{value:!0}),t);var C={};$(C,{DashboardLayout:()=>c});module.exports=A(C);var k=p(require("react"),1),x=require("@skdx/react");function O(...t){let a="";for(let o of t)o&&(a=a?`${a} ${o}`:o);return a}function e(t,a,o){let r=a==="root",d=r?`skdx-${t}`:`skdx-${t}__${a}`,s={className:O(d,o),"data-part":a};return r&&(s["data-skdx-component"]=t),s}var g=p(require("react"),1);function m(t,a,o){let[r,d]=g.useState(a),s=t!==void 0;return[s?t:r,i=>{s||d(i),o?.(i)}]}var n=require("react/jsx-runtime");function N({items:t}){return(0,n.jsx)("ul",{...e("dashboard-layout","nav-list"),children:t.map((a,o)=>{let r=a.kind??"item";return r==="divider"?(0,n.jsx)("li",{children:(0,n.jsx)("hr",{...e("dashboard-layout","nav-divider")})},o):r==="header"?(0,n.jsx)("li",{...e("dashboard-layout","nav-header"),children:a.label},o):(0,n.jsxs)("li",{children:[a.href===void 0?(0,n.jsx)("span",{...e("dashboard-layout","nav-item"),children:a.label}):(0,n.jsx)("a",{href:a.href,"aria-current":a.current?"page":void 0,...e("dashboard-layout","nav-item"),children:a.label}),a.href===void 0&&a.children&&a.children.length>0?(0,n.jsx)(N,{items:a.children}):null]},o)})})}var c=({title:t,navigation:a,navOpen:o,defaultNavOpen:r=!0,navLabel:d="Main navigation",navToggleLabel:s="Toggle navigation",onNavOpenChange:b,branding:h,actions:i,children:D,...v})=>{let f=k.useId(),[l,P]=m(o,r,b);return(0,n.jsxs)("div",{"data-nav-open":l?"":void 0,...v,...e("dashboard-layout","root",v.className),children:[(0,n.jsxs)("header",{...e("dashboard-layout","app-bar"),children:[(0,n.jsx)(x.Button,{iconOnly:!0,"aria-expanded":l,"aria-controls":f,"aria-label":s,onClick:()=>{P(!l)},...e("dashboard-layout","nav-toggle"),children:"\u2630"}),(0,n.jsx)("div",{...e("dashboard-layout","branding"),children:h}),t?(0,n.jsx)("span",{...e("dashboard-layout","title"),children:t}):null,(0,n.jsx)("div",{...e("dashboard-layout","actions"),children:i})]}),(0,n.jsxs)("div",{...e("dashboard-layout","body"),children:[(0,n.jsx)("nav",{id:f,"aria-label":d,hidden:!l,...e("dashboard-layout","nav"),children:(0,n.jsx)(N,{items:a})}),(0,n.jsx)("main",{...e("dashboard-layout","content"),children:D})]})]})};c.displayName="DashboardLayout";0&&(module.exports={DashboardLayout});
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import*as p from"react";import{Button as D}from"@skdx/react";function N(...n){let a="";for(let e of n)e&&(a=a?`${a} ${e}`:e);return a}function t(n,a,e){let r=a==="root",s=r?`skdx-${n}`:`skdx-${n}__${a}`,d={className:N(s,e),"data-part":a};return r&&(d["data-skdx-component"]=n),d}import*as y from"react";function f(n,a,e){let[r,s]=y.useState(a),d=n!==void 0;return[d?n:r,i=>{d||s(i),e?.(i)}]}import{jsx as o,jsxs as u}from"react/jsx-runtime";function g({items:n}){return o("ul",{...t("dashboard-layout","nav-list"),children:n.map((a,e)=>{let r=a.kind??"item";return r==="divider"?o("li",{children:o("hr",{...t("dashboard-layout","nav-divider")})},e):r==="header"?o("li",{...t("dashboard-layout","nav-header"),children:a.label},e):u("li",{children:[a.href===void 0?o("span",{...t("dashboard-layout","nav-item"),children:a.label}):o("a",{href:a.href,"aria-current":a.current?"page":void 0,...t("dashboard-layout","nav-item"),children:a.label}),a.children&&a.children.length>0?o(g,{items:a.children}):null]},e)})})}var m=({title:n,navigation:a,navOpen:e,defaultNavOpen:r=!0,navLabel:s="Main navigation",navToggleLabel:d="Toggle navigation",onNavOpenChange:c,branding:b,actions:i,children:k,...v})=>{let h=p.useId(),[l,x]=f(e,r,c);return u("div",{"data-nav-open":l?"":void 0,...v,...t("dashboard-layout","root",v.className),children:[u("header",{...t("dashboard-layout","app-bar"),children:[o(D,{iconOnly:!0,"aria-expanded":l,"aria-controls":h,"aria-label":d,onClick:()=>{x(!l)},...t("dashboard-layout","nav-toggle"),children:"\u2630"}),o("div",{...t("dashboard-layout","branding"),children:b}),n?o("span",{...t("dashboard-layout","title"),children:n}):null,o("div",{...t("dashboard-layout","actions"),children:i})]}),u("div",{...t("dashboard-layout","body"),children:[o("nav",{id:h,"aria-label":s,hidden:!l,...t("dashboard-layout","nav"),children:o(g,{items:a})}),o("main",{...t("dashboard-layout","content"),children:k})]})]})};m.displayName="DashboardLayout";export{m as DashboardLayout};
2
+ import*as p from"react";import{Button as D}from"@skdx/react";function N(...n){let a="";for(let e of n)e&&(a=a?`${a} ${e}`:e);return a}function t(n,a,e){let r=a==="root",s=r?`skdx-${n}`:`skdx-${n}__${a}`,d={className:N(s,e),"data-part":a};return r&&(d["data-skdx-component"]=n),d}import*as f from"react";function y(n,a,e){let[r,s]=f.useState(a),d=n!==void 0;return[d?n:r,i=>{d||s(i),e?.(i)}]}import{jsx as o,jsxs as u}from"react/jsx-runtime";function g({items:n}){return o("ul",{...t("dashboard-layout","nav-list"),children:n.map((a,e)=>{let r=a.kind??"item";return r==="divider"?o("li",{children:o("hr",{...t("dashboard-layout","nav-divider")})},e):r==="header"?o("li",{...t("dashboard-layout","nav-header"),children:a.label},e):u("li",{children:[a.href===void 0?o("span",{...t("dashboard-layout","nav-item"),children:a.label}):o("a",{href:a.href,"aria-current":a.current?"page":void 0,...t("dashboard-layout","nav-item"),children:a.label}),a.href===void 0&&a.children&&a.children.length>0?o(g,{items:a.children}):null]},e)})})}var m=({title:n,navigation:a,navOpen:e,defaultNavOpen:r=!0,navLabel:s="Main navigation",navToggleLabel:d="Toggle navigation",onNavOpenChange:c,branding:b,actions:i,children:k,...h})=>{let v=p.useId(),[l,x]=y(e,r,c);return u("div",{"data-nav-open":l?"":void 0,...h,...t("dashboard-layout","root",h.className),children:[u("header",{...t("dashboard-layout","app-bar"),children:[o(D,{iconOnly:!0,"aria-expanded":l,"aria-controls":v,"aria-label":d,onClick:()=>{x(!l)},...t("dashboard-layout","nav-toggle"),children:"\u2630"}),o("div",{...t("dashboard-layout","branding"),children:b}),n?o("span",{...t("dashboard-layout","title"),children:n}):null,o("div",{...t("dashboard-layout","actions"),children:i})]}),u("div",{...t("dashboard-layout","body"),children:[o("nav",{id:v,"aria-label":s,hidden:!l,...t("dashboard-layout","nav"),children:o(g,{items:a})}),o("main",{...t("dashboard-layout","content"),children:k})]})]})};m.displayName="DashboardLayout";export{m as DashboardLayout};
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";var a=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var N=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})},B=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of U(e))!L.call(t,o)&&o!==r&&a(t,o,{get:()=>e[o],enumerable:!(i=v(e,o))||i.enumerable});return t};var M=t=>B(a({},"__esModule",{value:!0}),t);var O={};N(O,{ChatComposer:()=>P.ChatComposer,ChatMessage:()=>g.ChatMessage,Comment:()=>C.Comment,CommentThread:()=>f.CommentThread,ConfirmDialog:()=>d.ConfirmDialog,ConversationList:()=>x.ConversationList,DashboardLayout:()=>s.DashboardLayout,EmptyState:()=>m.EmptyState,FilterBar:()=>c.FilterBar,ForgotPasswordPage:()=>F.ForgotPasswordPage,FormSection:()=>h.FormSection,NotificationCenter:()=>S.NotificationCenter,OnboardingChecklist:()=>l.OnboardingChecklist,PageContainer:()=>n.PageContainer,ResetPasswordPage:()=>k.ResetPasswordPage,SignInPage:()=>p.SignInPage,SignUpPage:()=>w.SignUpPage,StatCard:()=>y.StatCard,UsageCard:()=>D.UsageCard,UserMenu:()=>b.UserMenu,VerificationPage:()=>u.VerificationPage,WorkspaceSwitcher:()=>I.WorkspaceSwitcher,defaultProviderLabel:()=>p.defaultProviderLabel});module.exports=M(O);var s=require("./dashboard-layout/DashboardLayout.cjs"),n=require("./page-container/PageContainer.cjs"),p=require("./sign-in-page/SignInPage.cjs"),m=require("./empty-state/EmptyState.cjs"),y=require("./stat-card/StatCard.cjs"),P=require("./chat-composer/ChatComposer.cjs"),g=require("./chat-message/ChatMessage.cjs"),C=require("./comment/Comment.cjs"),f=require("./comment-thread/CommentThread.cjs"),d=require("./confirm-dialog/ConfirmDialog.cjs"),x=require("./conversation-list/ConversationList.cjs"),c=require("./filter-bar/FilterBar.cjs"),h=require("./form-section/FormSection.cjs"),S=require("./notification-center/NotificationCenter.cjs"),l=require("./onboarding-checklist/OnboardingChecklist.cjs"),D=require("./usage-card/UsageCard.cjs"),b=require("./user-menu/UserMenu.cjs"),I=require("./workspace-switcher/WorkspaceSwitcher.cjs"),w=require("./sign-up-page/SignUpPage.cjs"),F=require("./forgot-password-page/ForgotPasswordPage.cjs"),k=require("./reset-password-page/ResetPasswordPage.cjs"),u=require("./verification-page/VerificationPage.cjs");0&&(module.exports={ChatComposer,ChatMessage,Comment,CommentThread,ConfirmDialog,ConversationList,DashboardLayout,EmptyState,FilterBar,ForgotPasswordPage,FormSection,NotificationCenter,OnboardingChecklist,PageContainer,ResetPasswordPage,SignInPage,SignUpPage,StatCard,UsageCard,UserMenu,VerificationPage,WorkspaceSwitcher,defaultProviderLabel});
2
+ "use strict";var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var U=Object.prototype.hasOwnProperty;var L=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})},N=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v(e))!U.call(t,o)&&o!==r&&a(t,o,{get:()=>e[o],enumerable:!(i=u(e,o))||i.enumerable});return t};var B=t=>N(a({},"__esModule",{value:!0}),t);var M={};L(M,{ChatComposer:()=>P.ChatComposer,ChatMessage:()=>g.ChatMessage,Comment:()=>C.Comment,CommentThread:()=>f.CommentThread,ConversationList:()=>d.ConversationList,DashboardLayout:()=>s.DashboardLayout,EmptyState:()=>m.EmptyState,FilterBar:()=>x.FilterBar,ForgotPasswordPage:()=>w.ForgotPasswordPage,FormSection:()=>c.FormSection,NotificationCenter:()=>h.NotificationCenter,OnboardingChecklist:()=>S.OnboardingChecklist,PageContainer:()=>n.PageContainer,ResetPasswordPage:()=>F.ResetPasswordPage,SignInPage:()=>p.SignInPage,SignUpPage:()=>I.SignUpPage,StatCard:()=>y.StatCard,UsageCard:()=>l.UsageCard,UserMenu:()=>b.UserMenu,VerificationPage:()=>k.VerificationPage,WorkspaceSwitcher:()=>D.WorkspaceSwitcher,defaultProviderLabel:()=>p.defaultProviderLabel});module.exports=B(M);var s=require("./dashboard-layout/DashboardLayout.cjs"),n=require("./page-container/PageContainer.cjs"),p=require("./sign-in-page/SignInPage.cjs"),m=require("./empty-state/EmptyState.cjs"),y=require("./stat-card/StatCard.cjs"),P=require("./chat-composer/ChatComposer.cjs"),g=require("./chat-message/ChatMessage.cjs"),C=require("./comment/Comment.cjs"),f=require("./comment-thread/CommentThread.cjs"),d=require("./conversation-list/ConversationList.cjs"),x=require("./filter-bar/FilterBar.cjs"),c=require("./form-section/FormSection.cjs"),h=require("./notification-center/NotificationCenter.cjs"),S=require("./onboarding-checklist/OnboardingChecklist.cjs"),l=require("./usage-card/UsageCard.cjs"),b=require("./user-menu/UserMenu.cjs"),D=require("./workspace-switcher/WorkspaceSwitcher.cjs"),I=require("./sign-up-page/SignUpPage.cjs"),w=require("./forgot-password-page/ForgotPasswordPage.cjs"),F=require("./reset-password-page/ResetPasswordPage.cjs"),k=require("./verification-page/VerificationPage.cjs");0&&(module.exports={ChatComposer,ChatMessage,Comment,CommentThread,ConversationList,DashboardLayout,EmptyState,FilterBar,ForgotPasswordPage,FormSection,NotificationCenter,OnboardingChecklist,PageContainer,ResetPasswordPage,SignInPage,SignUpPage,StatCard,UsageCard,UserMenu,VerificationPage,WorkspaceSwitcher,defaultProviderLabel});
package/dist/index.d.cts CHANGED
@@ -7,7 +7,6 @@ export { ChatComposer, type ChatComposerProps, type ChatComposerSendDetail, type
7
7
  export { ChatMessage, type ChatMessageProps } from './chat-message/index.cjs';
8
8
  export { Comment, type CommentProps } from './comment/index.cjs';
9
9
  export { CommentThread, type CommentThreadProps } from './comment-thread/index.cjs';
10
- export { ConfirmDialog, type ConfirmDialogProps } from './confirm-dialog/index.cjs';
11
10
  export { ConversationList, type ConversationListItem, type ConversationListProps, } from './conversation-list/index.cjs';
12
11
  export { FilterBar, type FilterBarFilter, type FilterBarProps } from './filter-bar/index.cjs';
13
12
  export { FormSection, type FormSectionProps } from './form-section/index.cjs';
package/dist/index.d.ts CHANGED
@@ -7,7 +7,6 @@ export { ChatComposer, type ChatComposerProps, type ChatComposerSendDetail, type
7
7
  export { ChatMessage, type ChatMessageProps } from './chat-message/index.js';
8
8
  export { Comment, type CommentProps } from './comment/index.js';
9
9
  export { CommentThread, type CommentThreadProps } from './comment-thread/index.js';
10
- export { ConfirmDialog, type ConfirmDialogProps } from './confirm-dialog/index.js';
11
10
  export { ConversationList, type ConversationListItem, type ConversationListProps, } from './conversation-list/index.js';
12
11
  export { FilterBar, type FilterBarFilter, type FilterBarProps } from './filter-bar/index.js';
13
12
  export { FormSection, type FormSectionProps } from './form-section/index.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{DashboardLayout as o}from"./dashboard-layout/DashboardLayout.js";import{PageContainer as p}from"./page-container/PageContainer.js";import{SignInPage as i,defaultProviderLabel as s}from"./sign-in-page/SignInPage.js";import{EmptyState as m}from"./empty-state/EmptyState.js";import{StatCard as P}from"./stat-card/StatCard.js";import{ChatComposer as C}from"./chat-composer/ChatComposer.js";import{ChatMessage as d}from"./chat-message/ChatMessage.js";import{Comment as c}from"./comment/Comment.js";import{CommentThread as S}from"./comment-thread/CommentThread.js";import{ConfirmDialog as D}from"./confirm-dialog/ConfirmDialog.js";import{ConversationList as I}from"./conversation-list/ConversationList.js";import{FilterBar as F}from"./filter-bar/FilterBar.js";import{FormSection as u}from"./form-section/FormSection.js";import{NotificationCenter as U}from"./notification-center/NotificationCenter.js";import{OnboardingChecklist as N}from"./onboarding-checklist/OnboardingChecklist.js";import{UsageCard as M}from"./usage-card/UsageCard.js";import{UserMenu as R}from"./user-menu/UserMenu.js";import{WorkspaceSwitcher as W}from"./workspace-switcher/WorkspaceSwitcher.js";import{SignUpPage as K}from"./sign-up-page/SignUpPage.js";import{ForgotPasswordPage as j}from"./forgot-password-page/ForgotPasswordPage.js";import{ResetPasswordPage as z}from"./reset-password-page/ResetPasswordPage.js";import{VerificationPage as G}from"./verification-page/VerificationPage.js";export{C as ChatComposer,d as ChatMessage,c as Comment,S as CommentThread,D as ConfirmDialog,I as ConversationList,o as DashboardLayout,m as EmptyState,F as FilterBar,j as ForgotPasswordPage,u as FormSection,U as NotificationCenter,N as OnboardingChecklist,p as PageContainer,z as ResetPasswordPage,i as SignInPage,K as SignUpPage,P as StatCard,M as UsageCard,R as UserMenu,G as VerificationPage,W as WorkspaceSwitcher,s as defaultProviderLabel};
2
+ import{DashboardLayout as o}from"./dashboard-layout/DashboardLayout.js";import{PageContainer as p}from"./page-container/PageContainer.js";import{SignInPage as i,defaultProviderLabel as s}from"./sign-in-page/SignInPage.js";import{EmptyState as m}from"./empty-state/EmptyState.js";import{StatCard as P}from"./stat-card/StatCard.js";import{ChatComposer as C}from"./chat-composer/ChatComposer.js";import{ChatMessage as d}from"./chat-message/ChatMessage.js";import{Comment as c}from"./comment/Comment.js";import{CommentThread as S}from"./comment-thread/CommentThread.js";import{ConversationList as b}from"./conversation-list/ConversationList.js";import{FilterBar as I}from"./filter-bar/FilterBar.js";import{FormSection as F}from"./form-section/FormSection.js";import{NotificationCenter as u}from"./notification-center/NotificationCenter.js";import{OnboardingChecklist as U}from"./onboarding-checklist/OnboardingChecklist.js";import{UsageCard as N}from"./usage-card/UsageCard.js";import{UserMenu as M}from"./user-menu/UserMenu.js";import{WorkspaceSwitcher as R}from"./workspace-switcher/WorkspaceSwitcher.js";import{SignUpPage as W}from"./sign-up-page/SignUpPage.js";import{ForgotPasswordPage as K}from"./forgot-password-page/ForgotPasswordPage.js";import{ResetPasswordPage as j}from"./reset-password-page/ResetPasswordPage.js";import{VerificationPage as z}from"./verification-page/VerificationPage.js";export{C as ChatComposer,d as ChatMessage,c as Comment,S as CommentThread,b as ConversationList,o as DashboardLayout,m as EmptyState,I as FilterBar,K as ForgotPasswordPage,F as FormSection,u as NotificationCenter,U as OnboardingChecklist,p as PageContainer,j as ResetPasswordPage,i as SignInPage,W as SignUpPage,P as StatCard,N as UsageCard,M as UserMenu,z as VerificationPage,R as WorkspaceSwitcher,s as defaultProviderLabel};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";var B=Object.create;var c=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var _=(t,e)=>{for(var r in e)c(t,r,{get:e[r],enumerable:!0})},b=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of E(e))!H.call(t,a)&&a!==r&&c(t,a,{get:()=>e[a],enumerable:!(o=C(e,a))||o.enumerable});return t};var q=(t,e,r)=>(r=t!=null?B(I(t)):{},b(e||!t||!t.__esModule?c(r,"default",{value:t,enumerable:!0}):r,t)),w=t=>b(c({},"__esModule",{value:!0}),t);var W={};_(W,{VerificationPage:()=>m});module.exports=w(W);var s=require("@skdx/react");var A=q(require("react"),1),u=require("@skdx/react"),l=require("react/jsx-runtime"),p=({parts:t,title:e,error:r,footer:o,children:a,...d})=>{let f=A.useId();return(0,l.jsx)("section",{"aria-labelledby":f,...d,...t.root,children:(0,l.jsxs)("div",{...t.panel,children:[(0,l.jsx)(u.Heading,{as:"h1",id:f,...t.title,children:e}),r?(0,l.jsx)(u.Alert,{status:"danger",...t.error,children:r}):null,a,o&&t.footer?(0,l.jsx)("div",{...t.footer,children:o}):null]})})};p.displayName="AuthPanel";function k(t,e){let r=t.get(e);return typeof r=="string"?r:""}function M(...t){let e="";for(let r of t)r&&(e=e?`${e} ${r}`:r);return e}function i(t,e,r){let o=e==="root",a=o?`skdx-${t}`:`skdx-${t}__${e}`,d={className:M(a,r),"data-part":e};return o&&(d["data-skdx-component"]=t),d}var n=require("react/jsx-runtime"),m=({title:t="Enter your verification code",description:e,error:r,pending:o=!1,codeLabel:a="Verification code",length:d=6,value:f,defaultValue:h,onValueChange:y,submitLabel:R="Verify",resendLabel:V="Resend code",resendDisabled:S=!1,resendHint:g,footer:N,onVerify:F,onResend:P,children:$,...x})=>{let D=v=>{v.preventDefault();let T=new FormData(v.currentTarget);F?.({code:k(T,"code")})};return(0,n.jsxs)(p,{...x,parts:{root:i("verification-page","root",x.className),panel:i("verification-page","panel"),title:i("verification-page","title"),error:i("verification-page","error"),footer:i("verification-page","footer")},title:t,error:r,footer:N,children:[e?(0,n.jsx)(s.Text,{as:"p",tone:"muted",...i("verification-page","description"),children:e}):null,(0,n.jsxs)(s.Form,{onSubmit:D,...i("verification-page","form"),children:[(0,n.jsx)(s.Field,{label:a,...i("verification-page","field"),children:(0,n.jsx)(s.PinInput,{"aria-label":a,name:"code",required:!0,otp:!0,length:d,value:f,defaultValue:h,onValueChange:y,...i("verification-page","code")})}),$,(0,n.jsx)(s.Button,{type:"submit",loading:o,disabled:o,...i("verification-page","submit"),children:R})]}),P?(0,n.jsxs)("div",{...i("verification-page","resend"),children:[(0,n.jsx)(s.Button,{type:"button",variant:"ghost",disabled:S,onClick:P,children:V}),g?(0,n.jsx)("span",{...i("verification-page","resend-hint"),children:g}):null]}):null]})};m.displayName="VerificationPage";0&&(module.exports={VerificationPage});
2
+ "use strict";var C=Object.create;var c=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var _=(t,e)=>{for(var r in e)c(t,r,{get:e[r],enumerable:!0})},b=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of I(e))!L.call(t,a)&&a!==r&&c(t,a,{get:()=>e[a],enumerable:!(n=E(e,a))||n.enumerable});return t};var q=(t,e,r)=>(r=t!=null?C(H(t)):{},b(e||!t||!t.__esModule?c(r,"default",{value:t,enumerable:!0}):r,t)),w=t=>b(c({},"__esModule",{value:!0}),t);var W={};_(W,{VerificationPage:()=>m});module.exports=w(W);var s=require("@skdx/react"),h=require("@skdx/react/primitives/field");var A=q(require("react"),1),u=require("@skdx/react"),l=require("react/jsx-runtime"),p=({parts:t,title:e,error:r,footer:n,children:a,...d})=>{let f=A.useId();return(0,l.jsx)("section",{"aria-labelledby":f,...d,...t.root,children:(0,l.jsxs)("div",{...t.panel,children:[(0,l.jsx)(u.Heading,{as:"h1",id:f,...t.title,children:e}),r?(0,l.jsx)(u.Alert,{status:"danger",...t.error,children:r}):null,a,n&&t.footer?(0,l.jsx)("div",{...t.footer,children:n}):null]})})};p.displayName="AuthPanel";function k(t,e){let r=t.get(e);return typeof r=="string"?r:""}function M(...t){let e="";for(let r of t)r&&(e=e?`${e} ${r}`:r);return e}function i(t,e,r){let n=e==="root",a=n?`skdx-${t}`:`skdx-${t}__${e}`,d={className:M(a,r),"data-part":e};return n&&(d["data-skdx-component"]=t),d}var o=require("react/jsx-runtime"),m=({title:t="Enter your verification code",description:e,error:r,pending:n=!1,codeLabel:a="Verification code",length:d=6,value:f,defaultValue:y,onValueChange:R,submitLabel:V="Verify",resendLabel:S="Resend code",resendDisabled:F=!1,resendHint:g,footer:N,onVerify:$,onResend:P,children:D,...x})=>{let T=v=>{v.preventDefault();let B=new FormData(v.currentTarget);$?.({code:k(B,"code")})};return(0,o.jsxs)(p,{...x,parts:{root:i("verification-page","root",x.className),panel:i("verification-page","panel"),title:i("verification-page","title"),error:i("verification-page","error"),footer:i("verification-page","footer")},title:t,error:r,footer:N,children:[e?(0,o.jsx)(s.Text,{as:"p",tone:"muted",...i("verification-page","description"),children:e}):null,(0,o.jsxs)(s.Form,{onSubmit:T,...i("verification-page","form"),children:[(0,o.jsxs)(s.Fieldset,{...i("verification-page","field"),children:[(0,o.jsx)(h.FieldLabel,{children:a}),(0,o.jsx)(s.PinInput,{"aria-label":a,name:"code",required:!0,otp:!0,length:d,value:f,defaultValue:y,onValueChange:R,...i("verification-page","code")})]}),D,(0,o.jsx)(s.Button,{type:"submit",loading:n,disabled:n,...i("verification-page","submit"),children:V})]}),P?(0,o.jsxs)("div",{...i("verification-page","resend"),children:[(0,o.jsx)(s.Button,{type:"button",variant:"ghost",disabled:F,onClick:P,children:S}),g?(0,o.jsx)("span",{...i("verification-page","resend-hint"),children:g}):null]}):null]})};m.displayName="VerificationPage";0&&(module.exports={VerificationPage});
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{Button as v,Field as E,Form as I,PinInput as H,Text as _}from"@skdx/react";import*as P from"react";import{Alert as D,Heading as T}from"@skdx/react";import{jsx as d,jsxs as B}from"react/jsx-runtime";var f=({parts:t,title:e,error:r,footer:a,children:o,...n})=>{let l=P.useId();return d("section",{"aria-labelledby":l,...n,...t.root,children:B("div",{...t.panel,children:[d(T,{as:"h1",id:l,...t.title,children:e}),r?d(D,{status:"danger",...t.error,children:r}):null,o,a&&t.footer?d("div",{...t.footer,children:a}):null]})})};f.displayName="AuthPanel";function x(t,e){let r=t.get(e);return typeof r=="string"?r:""}function C(...t){let e="";for(let r of t)r&&(e=e?`${e} ${r}`:r);return e}function i(t,e,r){let a=e==="root",o=a?`skdx-${t}`:`skdx-${t}__${e}`,n={className:C(o,r),"data-part":e};return a&&(n["data-skdx-component"]=t),n}import{jsx as s,jsxs as c}from"react/jsx-runtime";var b=({title:t="Enter your verification code",description:e,error:r,pending:a=!1,codeLabel:o="Verification code",length:n=6,value:l,defaultValue:A,onValueChange:k,submitLabel:h="Verify",resendLabel:y="Resend code",resendDisabled:R=!1,resendHint:u,footer:V,onVerify:S,onResend:p,children:N,...m})=>{let F=g=>{g.preventDefault();let $=new FormData(g.currentTarget);S?.({code:x($,"code")})};return c(f,{...m,parts:{root:i("verification-page","root",m.className),panel:i("verification-page","panel"),title:i("verification-page","title"),error:i("verification-page","error"),footer:i("verification-page","footer")},title:t,error:r,footer:V,children:[e?s(_,{as:"p",tone:"muted",...i("verification-page","description"),children:e}):null,c(I,{onSubmit:F,...i("verification-page","form"),children:[s(E,{label:o,...i("verification-page","field"),children:s(H,{"aria-label":o,name:"code",required:!0,otp:!0,length:n,value:l,defaultValue:A,onValueChange:k,...i("verification-page","code")})}),N,s(v,{type:"submit",loading:a,disabled:a,...i("verification-page","submit"),children:h})]}),p?c("div",{...i("verification-page","resend"),children:[s(v,{type:"button",variant:"ghost",disabled:R,onClick:p,children:y}),u?s("span",{...i("verification-page","resend-hint"),children:u}):null]}):null]})};b.displayName="VerificationPage";export{b as VerificationPage};
2
+ import{Button as v,Fieldset as E,Form as I,PinInput as H,Text as L}from"@skdx/react";import{FieldLabel as _}from"@skdx/react/primitives/field";import*as P from"react";import{Alert as D,Heading as T}from"@skdx/react";import{jsx as d,jsxs as B}from"react/jsx-runtime";var c=({parts:t,title:e,error:r,footer:a,children:o,...n})=>{let l=P.useId();return d("section",{"aria-labelledby":l,...n,...t.root,children:B("div",{...t.panel,children:[d(T,{as:"h1",id:l,...t.title,children:e}),r?d(D,{status:"danger",...t.error,children:r}):null,o,a&&t.footer?d("div",{...t.footer,children:a}):null]})})};c.displayName="AuthPanel";function x(t,e){let r=t.get(e);return typeof r=="string"?r:""}function C(...t){let e="";for(let r of t)r&&(e=e?`${e} ${r}`:r);return e}function i(t,e,r){let a=e==="root",o=a?`skdx-${t}`:`skdx-${t}__${e}`,n={className:C(o,r),"data-part":e};return a&&(n["data-skdx-component"]=t),n}import{jsx as s,jsxs as f}from"react/jsx-runtime";var b=({title:t="Enter your verification code",description:e,error:r,pending:a=!1,codeLabel:o="Verification code",length:n=6,value:l,defaultValue:A,onValueChange:k,submitLabel:h="Verify",resendLabel:y="Resend code",resendDisabled:R=!1,resendHint:u,footer:V,onVerify:S,onResend:p,children:F,...m})=>{let N=g=>{g.preventDefault();let $=new FormData(g.currentTarget);S?.({code:x($,"code")})};return f(c,{...m,parts:{root:i("verification-page","root",m.className),panel:i("verification-page","panel"),title:i("verification-page","title"),error:i("verification-page","error"),footer:i("verification-page","footer")},title:t,error:r,footer:V,children:[e?s(L,{as:"p",tone:"muted",...i("verification-page","description"),children:e}):null,f(I,{onSubmit:N,...i("verification-page","form"),children:[f(E,{...i("verification-page","field"),children:[s(_,{children:o}),s(H,{"aria-label":o,name:"code",required:!0,otp:!0,length:n,value:l,defaultValue:A,onValueChange:k,...i("verification-page","code")})]}),F,s(v,{type:"submit",loading:a,disabled:a,...i("verification-page","submit"),children:h})]}),p?f("div",{...i("verification-page","resend"),children:[s(v,{type:"button",variant:"ghost",disabled:R,onClick:p,children:y}),u?s("span",{...i("verification-page","resend-hint"),children:u}):null]}):null]})};b.displayName="VerificationPage";export{b as VerificationPage};
@@ -27,7 +27,7 @@ export interface VerificationPageProps extends React.ComponentPropsWithRef<'sect
27
27
  */
28
28
  pending?: boolean | undefined;
29
29
  /**
30
- * Field label and accessible name of the derived pin input holding the code.
30
+ * Legend of the code fieldset and accessible name of the derived pin input holding the code.
31
31
  * @default 'Verification code'
32
32
  */
33
33
  codeLabel?: string | undefined;
@@ -27,7 +27,7 @@ export interface VerificationPageProps extends React.ComponentPropsWithRef<'sect
27
27
  */
28
28
  pending?: boolean | undefined;
29
29
  /**
30
- * Field label and accessible name of the derived pin input holding the code.
30
+ * Legend of the code fieldset and accessible name of the derived pin input holding the code.
31
31
  * @default 'Verification code'
32
32
  */
33
33
  codeLabel?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skdx/react-blocks",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "description": "React blocks for the SkandaDX design system — page-level compositions of @skdx/react styled by @skdx/skins",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -73,16 +73,6 @@
73
73
  "default": "./dist/comment-thread/CommentThread.cjs"
74
74
  }
75
75
  },
76
- "./confirm-dialog": {
77
- "import": {
78
- "types": "./dist/confirm-dialog/index.d.ts",
79
- "default": "./dist/confirm-dialog/ConfirmDialog.js"
80
- },
81
- "require": {
82
- "types": "./dist/confirm-dialog/index.d.cts",
83
- "default": "./dist/confirm-dialog/ConfirmDialog.cjs"
84
- }
85
- },
86
76
  "./conversation-list": {
87
77
  "import": {
88
78
  "types": "./dist/conversation-list/index.d.ts",
@@ -265,7 +255,7 @@
265
255
  "peerDependencies": {
266
256
  "react": "^19.0.0",
267
257
  "react-dom": "^19.0.0",
268
- "@skdx/react": "^0.35.0"
258
+ "@skdx/react": "^0.37.0"
269
259
  },
270
260
  "devDependencies": {
271
261
  "@testing-library/jest-dom": "^6.9.1",
@@ -283,8 +273,8 @@
283
273
  "tsup": "^8.5.1",
284
274
  "typescript": "^6.0.3",
285
275
  "vitest": "^4.1.10",
286
- "@skdx/shared": "0.35.0",
287
- "@skdx/react": "0.35.0"
276
+ "@skdx/react": "0.37.0",
277
+ "@skdx/shared": "0.37.0"
288
278
  },
289
279
  "scripts": {
290
280
  "lint": "eslint . --cache --cache-location node_modules/.cache/eslint/",
@@ -1,2 +0,0 @@
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});
@@ -1,31 +0,0 @@
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
- };
@@ -1,31 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
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};
@@ -1,2 +0,0 @@
1
- export { ConfirmDialog } from './ConfirmDialog.cjs';
2
- export type { ConfirmDialogProps } from './types.cjs';
@@ -1,2 +0,0 @@
1
- export { ConfirmDialog } from './ConfirmDialog.js';
2
- export type { ConfirmDialogProps } from './types.js';
@@ -1,114 +0,0 @@
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 {};
@@ -1,114 +0,0 @@
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 {};