@webority/ui-react 0.104.1 → 0.107.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-kit/kit.js +18175 -17507
- package/dist/canvas-kit/manifest.json +439 -5
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppAccordion.js +1 -1
- package/dist/components/AppCommentThread.js +1 -1
- package/dist/components/AppConfirmDialog.js +1 -1
- package/dist/components/AppDetailPane.js +1 -0
- package/dist/components/AppDrawer.js +1 -1
- package/dist/components/AppFilePicker.js +1 -1
- package/dist/components/AppFileTiles.js +1 -0
- package/dist/components/AppModal.js +1 -1
- package/dist/components/AppNavList.js +1 -0
- package/dist/components/AppPageHeader.js +1 -1
- package/dist/components/AppSortableList.js +1 -1
- package/dist/components/AppTablePagination.js +1 -1
- package/dist/guidance.json +131 -1
- package/dist/types/components/AppAccordion.d.ts +8 -1
- package/dist/types/components/AppCalendar.d.ts +6 -1
- package/dist/types/components/AppCommentThread.d.ts +18 -0
- package/dist/types/components/AppConfirmDialog.d.ts +6 -0
- package/dist/types/components/AppDetailPane.d.ts +33 -0
- package/dist/types/components/AppDrawer.d.ts +3 -3
- package/dist/types/components/AppFilePicker.d.ts +12 -0
- package/dist/types/components/AppFileTiles.d.ts +30 -0
- package/dist/types/components/AppModal.d.ts +3 -0
- package/dist/types/components/AppNavList.d.ts +35 -0
- package/dist/types/components/AppPageHeader.d.ts +6 -0
- package/dist/types/components/AppSortableList.d.ts +10 -0
- package/dist/types/components/AppTablePagination.d.ts +2 -2
- package/dist/types/index.d.ts +3 -0
- package/dist/ui-react.js +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{initialsOf as i}from"../lib/initials.js";import a from"./AppAvatar.js";import{parseMentionValue as o}from"@webority/ui-elements/elements/mention-input";import{formatDate as s,formatNumber as c,toInstant as l}from"@webority/ui-elements/helpers";import{Fragment as u,useEffect as d,useId as f,useRef as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{COMMENT_REACTIONS as g,COMMENT_TEXT as _}from"@webority/ui-elements/elements/comment-thread";var v=[`stacked`,`inline`];function y(r){let{comments:i=[],onPost:o,onReply:s,onEdit:c,onDelete:l,onReact:u,people:y,loadPeople:x,reactionChoices:S,allowReplies:C=!0,allowReactions:w=!0,composerPlaceholder:T,composer:E=`stacked`,author:D,postLabel:O=_.post,composerRows:k,readOnly:A=!1,label:j=_.listName,id:M,className:N=``,...P}=r;n(`AppCommentThread`,P),t(`AppCommentThread`,`composer`,E,v);let F=f(),I=M||`comment-thread-${F.replace(/[^a-zA-Z0-9_-]/g,``)}`,L=p(null),R=typeof x==`function`,z=S?.length?S:g,B=E===`inline`,V=k??(B?1:3),H=p(null);return H.current={onPost:o,onReply:s,onEdit:c,onDelete:l,onReact:u,loadPeople:x},d(()=>{let e=L.current;if(e)return e.submit=async({intent:e,commentId:t,parentId:n,body:r,emoji:i})=>{let a=H.current;e===`post`?await a.onPost?.(r):e===`reply`?await a.onReply?.(n,r):e===`edit`?await a.onEdit?.(t,r):e===`delete`?await a.onDelete?.(t):e===`react`&&await a.onReact?.(t,i)},()=>{e.submit=void 0}},[]),d(()=>{let e=L.current;!e||R||(e.people=y||[])},[y,R]),d(()=>{let e=L.current;if(!e||!R)return;let t=new WeakMap,n=async e=>{let n=e.target,r=(t.get(n)??0)+1;t.set(n,r),n.loading=!0;try{let i=await H.current.loadPeople(e.detail.query);t.get(n)===r&&(n.people=i||[])}catch{t.get(n)===r&&(n.people=[])}finally{t.get(n)===r&&(n.loading=!1)}};return e.addEventListener(`search`,n),()=>e.removeEventListener(`search`,n)},[R]),h(`wui-comment-thread`,{ref:L,id:I,class:N?`wui-comment-thread ${N}`:`wui-comment-thread`,controlled:``,"read-only":A?``:void 0,remote:R?``:void 0,"reaction-choices":S?.length?S.join(` `):void 0,"no-replies":C?void 0:``,"no-reactions":w?void 0:``,"composer-placeholder":T,...e(`AppCommentThread`,r),...P,children:[m(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:i.length?m(`ol`,{className:`wui-comment-list`,"aria-label":j,children:i.map(e=>m(b,{comment:e,topLevel:!0,readOnly:A,allowReplies:C,allowReactions:w},e.id))}):m(`p`,{className:`wui-comment-empty`,children:_.empty})}),!A&&w&&m(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":_.pickerName,"data-wui-picker":``,hidden:!0,children:z.map(e=>m(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!A&&h(`div`,{className:B?`wui-comment-composer wui-comment-composer-inline`:`wui-comment-composer`,"data-wui-composer":``,children:[B&&D?m(a,{name:D,size:`sm`,tone:`auto`,className:`wui-comment-composer-avatar`}):null,m(`wui-mention-input`,{id:`${I}-new`,class:`wui-mention-input`,label:_.composerLabel,placeholder:T??_.composerPlaceholder,rows:String(V),remote:R?``:void 0}),m(`div`,{className:`wui-comment-form-actions`,children:m(`button`,{type:`button`,className:B?`btn btn-outline-primary btn-sm`:`btn btn-primary btn-sm`,"data-wui-action":`post`,children:O})}),m(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]}),m(`span`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}function b({comment:e,topLevel:t=!1,readOnly:n,allowReplies:a,allowReactions:d}){let{id:f,author:p,at:g,value:v,edited:y,deleted:x,canEdit:S,canDelete:C,reactions:w=[],replies:T=[]}=e,E=p?.name||``,D=l(g),O=!n&&!x&&S,k=!n&&!x&&C,A=t&&a;return h(`li`,{className:`wui-comment`,"data-wui-comment":f,"data-value":v??``,"data-wui-deleted":x?``:void 0,children:[h(`div`,{className:`wui-comment-row`,children:[h(`span`,{className:`avatar avatar-sm wui-comment-avatar`,"aria-hidden":`true`,children:[m(`span`,{className:`avatar-face`,children:i(E)||`?`}),p?.src&&m(`img`,{className:`avatar-img`,src:p.src,alt:``,onError:e=>{e.currentTarget.hidden=!0}})]}),h(`div`,{className:`wui-comment-main`,children:[h(`div`,{className:`wui-comment-head`,children:[m(`span`,{className:`wui-comment-author`,children:E}),m(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(D)?new Date(D).toISOString():void 0,children:s(g,{pattern:`datetime`})}),y&&!x&&m(`span`,{className:`wui-comment-edited`,children:_.edited})]}),x?m(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:_.deleted}):m(`div`,{className:`wui-comment-text`,"data-wui-text":``,children:o(v).map((e,t)=>`text`in e?m(u,{children:e.text},t):h(`span`,{className:`wui-mention`,"data-mention-id":e.id,children:[`@`,e.label]},t))}),O&&m(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),d&&!x&&(w.length>0||!n)&&h(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":_.reactions,children:[w.map(e=>n?h(`span`,{className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,children:[m(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),m(`span`,{className:`wui-reaction-count`,children:c(e.count,{decimals:0})})]},e.emoji):h(`button`,{type:`button`,className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,"data-wui-emoji":e.emoji,"aria-pressed":e.mine?`true`:`false`,children:[m(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),m(`span`,{className:`wui-reaction-count`,children:c(e.count,{decimals:0})})]},e.emoji)),!n&&m(`button`,{type:`button`,className:`wui-reaction-add`,"data-wui-action":`react-menu`,"aria-label":_.addReaction,"aria-haspopup":`true`,"aria-expanded":`false`,children:m(r,{name:`emoji-smile`,size:16})})]}),!n&&!x&&(A||O||k)&&h(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[A&&m(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:_.reply}),O&&m(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:_.edit}),k&&m(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:_.delete})]}),k&&h(`div`,{className:`wui-comment-confirm`,"data-wui-confirm":``,hidden:!0,children:[m(`span`,{className:`wui-comment-confirm-text`,children:_.confirmDelete}),m(`button`,{type:`button`,className:`btn btn-danger btn-sm`,"data-wui-action":`confirm-delete`,children:_.delete}),m(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,"data-wui-action":`cancel-delete`,children:_.cancel})]}),!n&&m(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]})]}),t&&T.length>0&&m(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":_.repliesName(E),children:T.map(e=>m(b,{comment:e,readOnly:n,allowReactions:d},e.id))}),A&&!n&&!x&&m(`div`,{className:`wui-comment-reply`,"data-wui-reply":``,hidden:!0})]})}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppButton.js";import i from"./AppModal.js";import a from"./AppInput.js";import{MODAL_ICONS as o}from"./ModalIcons.js";import{useEffect as s,useState as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`sm`,`md`,`lg`,`xl`];function
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppButton.js";import i from"./AppModal.js";import a from"./AppInput.js";import{MODAL_ICONS as o}from"./ModalIcons.js";import{useEffect as s,useState as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`sm`,`md`,`lg`,`xl`],p=[`default`,`plain`];function m(m){let{open:h,title:g,variant:_=`default`,message:v,confirmLabel:y=`Confirm`,cancelLabel:b=`Cancel`,danger:x=!1,tone:S,image:C,iconSize:w,confirmPhrase:T,onConfirm:E,onClose:D,loading:O=!1,staticBackdrop:k=!1,placement:A=`center`,size:j=`md`,className:M=``,children:N,...P}=m;n(`AppConfirmDialog`,P),t(`AppConfirmDialog`,`tone`,S,Object.keys(o)),t(`AppConfirmDialog`,`size`,typeof j==`string`?j:null,f),t(`AppConfirmDialog`,`variant`,_,p);let[F,I]=c(``);if(s(()=>{h||I(``)},[h]),!h)return null;let L=!!T&&F.trim()!==T,R=_===`plain`,z=R?`sm`:`md`,B=R||C?null:o[S||(x?`delete`:`info`)],V=w>0?{"--wui-confirm-icon-size":`${w}px`}:void 0,H=()=>{O||D?.()};return u(i,{...e(`AppConfirmDialog`,m),...P,open:h,hideHeader:!0,title:g,onClose:H,staticBackdrop:k,placement:A,size:j,className:[`wui-confirm`,R&&`wui-confirm-plain`,M].filter(Boolean).join(` `),footer:d(`div`,{className:`wui-confirm-actions`,children:[u(r,{variant:R?`light`:`secondary`,size:z,disabled:O,onClick:H,children:b}),u(r,{variant:x?`danger`:`primary`,size:z,disabled:L,loading:O,onClick:E,children:y})]}),children:d(`div`,{className:`wui-confirm-content`,children:[!R&&C?u(`span`,{className:`wui-confirm-icon`,style:V,children:u(`img`,{src:C,alt:``,"aria-hidden":`true`})}):B&&u(`span`,{className:`wui-confirm-icon`,style:V,children:u(B,{size:120})}),u(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:g}),v&&u(`p`,{className:`wui-confirm-msg`,children:v}),N!=null&&N!==!1&&u(`div`,{className:`wui-confirm-body`,children:N}),T&&u(a,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:d(l,{children:[`Type `,u(`strong`,{children:T}),` to confirm`]}),value:F,onChange:e=>I(e.target.value),"aria-label":`Type ${T} to confirm`,disabled:O})]})})}export{m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{open:i=!1,onClose:a,label:o,sticky:s=!0,children:c,className:l=``,...u}=r;t(`AppDetailPane`,u);let d=e=>{u.onKeyDown?.(e),e.key===`Escape`&&a&&a()};return n(`aside`,{...e(`AppDetailPane`,r),...u,className:[`wui-detail-pane`,l].filter(Boolean).join(` `),"aria-label":o,"data-wui-pane-host":``,"data-sticky":s?``:void 0,hidden:!i,onKeyDown:d,children:c})}export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/DiscardPrompt.js";import{useEffect as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import"@webority/ui-elements/elements/drawer";var l=[`end`,`start`],u=[`sm`,`md`,`lg`],d=[50,90],f=e=>Array.isArray(e)&&e.length>0&&e.every(e=>Number.isFinite(e)&&e>=10&&e<=100);function p(p){let{open:m=!1,onClose:h,title:g,subtitle:_,ariaLabel:v,side:y=`end`,size:b=`md`,snapPoints:x=d,defaultSnap:S=0,onSnapChange:C,dismissible:w=!0,staticBackdrop:T=!1,confirmDiscard:E,dirty:D=!1,footer:O,className:k=``,children:A,...j}=p;n(`AppDrawer`,j),t(`AppDrawer`,`side`,y,l),t(`AppDrawer`,`size`,b,u),t(`AppDrawer`,`snapPoints`,f(x)?void 0:JSON.stringify(x),[`an array of numbers from 10 to 100`]);let M=a(null),N=a(null),P=a(null),[F,I]=o(!1);N.current={onClose:h,onSnapChange:C,confirmDiscard:E,dirty:D},i(()=>{m||I(!1)},[m]),i(()=>{F&&P.current?.focus()},[F]),i(()=>{let e=M.current;if(!e)return;let t=t=>{if(t.target===e){if(t.preventDefault(),N.current.confirmDiscard&&N.current.dirty){I(!0);return}N.current.onClose?.()}},n=t=>{t.target===e&&N.current.onSnapChange?.(t.detail.index,t.detail.percent)},r=n=>{n.target.closest?.(`[data-wui-dismiss]`)&&t({target:e,preventDefault(){}})};return e.addEventListener(`wui-drawer-close`,t),e.addEventListener(`wui-drawer-snap`,n),e.addEventListener(`click`,r),()=>{e.removeEventListener(`wui-drawer-close`,t),e.removeEventListener(`wui-drawer-snap`,n),e.removeEventListener(`click`,r)}},[]);let L=()=>{I(!1),M.current?.dispatchEvent(new CustomEvent(`wui:drawer:discard`,{bubbles:!0})),N.current.onClose?.()},R=f(x)?x:d;return c(`wui-drawer`,{ref:M,...e(`AppDrawer`,p),...j,class:[`wui-drawer`,k].filter(Boolean).join(` `),side:y,size:b,"snap-points":R.join(`,`),"default-snap":String(S),static:T?``:void 0,"confirm-discard":E||void 0,open:m?``:void 0,children:[s(`div`,{className:`wui-drawer-backdrop`,"data-wui-drawer-backdrop":``,"aria-hidden":`true`}),c(`div`,{className:`wui-drawer-panel`,role:`dialog`,"aria-modal":`true`,"aria-label":v||g||void 0,tabIndex:-1,children:[s(`div`,{className:`wui-drawer-grip`,"data-wui-drawer-grip":``,children:s(`div`,{className:`wui-drawer-handle`,role:`slider`,tabIndex:0,"aria-orientation":`vertical`,"aria-label":`Sheet height`})}),c(`div`,{className:`wui-drawer-header`,"data-wui-drawer-grip":``,children:[c(`div`,{className:`wui-drawer-headtext`,children:[g&&s(`div`,{className:`wui-drawer-title`,children:g}),_&&s(`div`,{className:`wui-drawer-subtitle`,children:_})]}),w&&s(`button`,{type:`button`,className:`wui-drawer-close`,"data-wui-drawer-close":``,"aria-label":`Close`,children:s(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:s(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),s(`div`,{className:`wui-drawer-body`,children:A}),(O||F)&&c(`div`,{className:F?`wui-drawer-footer wui-drawer-discarding`:`wui-drawer-footer`,children:[F&&s(r,{text:E,confirmRef:P,onDiscard:L,onKeep:()=>I(!1)}),O]})]})]})}export{p as default};
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/DiscardPrompt.js";import{useEffect as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import"@webority/ui-elements/elements/drawer";var l=[`end`,`start`],u=[`sm`,`md`,`lg`,`xl`],d=[50,90],f=e=>Array.isArray(e)&&e.length>0&&e.every(e=>Number.isFinite(e)&&e>=10&&e<=100);function p(p){let{open:m=!1,onClose:h,title:g,subtitle:_,ariaLabel:v,side:y=`end`,size:b=`md`,snapPoints:x=d,defaultSnap:S=0,onSnapChange:C,dismissible:w=!0,staticBackdrop:T=!1,confirmDiscard:E,dirty:D=!1,footer:O,className:k=``,children:A,...j}=p;n(`AppDrawer`,j),t(`AppDrawer`,`side`,y,l),t(`AppDrawer`,`size`,b,u),t(`AppDrawer`,`snapPoints`,f(x)?void 0:JSON.stringify(x),[`an array of numbers from 10 to 100`]);let M=a(null),N=a(null),P=a(null),[F,I]=o(!1);N.current={onClose:h,onSnapChange:C,confirmDiscard:E,dirty:D},i(()=>{m||I(!1)},[m]),i(()=>{F&&P.current?.focus()},[F]),i(()=>{let e=M.current;if(!e)return;let t=t=>{if(t.target===e){if(t.preventDefault(),N.current.confirmDiscard&&N.current.dirty){I(!0);return}N.current.onClose?.()}},n=t=>{t.target===e&&N.current.onSnapChange?.(t.detail.index,t.detail.percent)},r=n=>{n.target.closest?.(`[data-wui-dismiss]`)&&t({target:e,preventDefault(){}})};return e.addEventListener(`wui-drawer-close`,t),e.addEventListener(`wui-drawer-snap`,n),e.addEventListener(`click`,r),()=>{e.removeEventListener(`wui-drawer-close`,t),e.removeEventListener(`wui-drawer-snap`,n),e.removeEventListener(`click`,r)}},[]);let L=()=>{I(!1),M.current?.dispatchEvent(new CustomEvent(`wui:drawer:discard`,{bubbles:!0})),N.current.onClose?.()},R=f(x)?x:d;return c(`wui-drawer`,{ref:M,...e(`AppDrawer`,p),...j,class:[`wui-drawer`,k].filter(Boolean).join(` `),side:y,size:b,"snap-points":R.join(`,`),"default-snap":String(S),static:T?``:void 0,"confirm-discard":E||void 0,open:m?``:void 0,children:[s(`div`,{className:`wui-drawer-backdrop`,"data-wui-drawer-backdrop":``,"aria-hidden":`true`}),c(`div`,{className:`wui-drawer-panel`,role:`dialog`,"aria-modal":`true`,"aria-label":v||g||void 0,tabIndex:-1,children:[s(`div`,{className:`wui-drawer-grip`,"data-wui-drawer-grip":``,children:s(`div`,{className:`wui-drawer-handle`,role:`slider`,tabIndex:0,"aria-orientation":`vertical`,"aria-label":`Sheet height`})}),c(`div`,{className:`wui-drawer-header`,"data-wui-drawer-grip":``,children:[c(`div`,{className:`wui-drawer-headtext`,children:[g&&s(`div`,{className:`wui-drawer-title`,children:g}),_&&s(`div`,{className:`wui-drawer-subtitle`,children:_})]}),w&&s(`button`,{type:`button`,className:`wui-drawer-close`,"data-wui-drawer-close":``,"aria-label":`Close`,children:s(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:s(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),s(`div`,{className:`wui-drawer-body`,children:A}),(O||F)&&c(`div`,{className:F?`wui-drawer-footer wui-drawer-discarding`:`wui-drawer-footer`,children:[F&&s(r,{text:E,confirmRef:P,onDiscard:L,onKeep:()=>I(!1)}),O]})]})]})}export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./withTooltip.js";import a from"./AppIcon.js";import o from"../lib/FieldMessage.js";import ee from"./AppRequiredMark.js";import{keyOf as s}from"../lib/fileItem.js";import te from"../lib/FileItemRow.js";import{DEFAULT_MAX_SIZE_MB as ne,acceptLabel as c,isImageFile as l,isImageOnlyAccept as re,isPdfFile as ie,validateFile as u}from"@webority/ui-elements/helpers";import{useEffect as d,useId as ae,useRef as oe,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";var se=[`dropzone`,`button`];function h(h){let{label:g,value:_,name:ce,id:v,onPick:y,multiple:b=!1,variant:x=`dropzone`,buttonLabel:le=`Add file`,maxFiles:S,accept:C=`.jpg,.jpeg,.png`,maxSizeMb:w=ne,required:ue,error:T,hint:E,loading:D=!1,className:O=``,fieldClassName:k=``,style:A,"data-canvas":de,...j}=h;r(`AppFilePicker`,j),n(`AppFilePicker`,`variant`,x,se);let[fe,M]=f(null),[pe,N]=f(null),[P,F]=f(!1),[me,I]=f(``),L=oe(null),he=ae(),R=v||he;d(()=>{if(!b&&_ instanceof File&&l(_)){let e=URL.createObjectURL(_);return M(e),()=>URL.revokeObjectURL(e)}M(null)},[_,b]);let z=!b&&_&&!l(_)&&ie(_)?_ instanceof File?_:_.url:null;d(()=>{if(!z){N(null);return}let e=!0,n=null;return import(`@webority/ui-elements/file-viewer`).then(e=>e.renderPdfFirstPage(typeof z==`string`?{url:z}:z)).then(t=>{e&&(n=URL.createObjectURL(t),N(n))}).catch(e=>t(`[AppFilePicker] the PDF preview failed:`,e?.message)),()=>{e=!1,N(null),n&&URL.revokeObjectURL(n)}},[z]);let B=b?Array.isArray(_)?_:_?[_]:[]:[],V=T||me,H=V?`${R}-error`:void 0,U=E&&!V?`${R}-hint`:void 0,ge=H||U,W=re(C),_e=x===`button`,G=!b&&!!_,K=G&&(_ instanceof File?l(_):W||l(_)),ve=_?.name,q=K?_?.url||fe:pe,J=K?`image`:`file`,ye=g?`Change ${g}`:`Change ${J}`,Y=g?`Remove ${g}`:`Remove ${J}`,be=g?`${g} preview`:`Selected ${J} preview`,X=e=>{let t=u(e,{accept:C,maxSizeMb:w});return t?(I(t),!1):(I(``),y(e),!0)},Z=e=>{let t=Array.from(e||[]);if(!t.length)return;let n=Array.isArray(_)?_:_?[_]:[],r=new Set(n.map(s)),i=``,a=[];for(let e of t){let t=u(e,{accept:C,maxSizeMb:w});if(t){i||=t;continue}r.has(s(e))||(r.add(s(e)),a.push(e))}let o=n.concat(a);S&&o.length>S&&(o=o.slice(0,S),i||=`Up to ${S} files.`),I(i),y(o)},xe=e=>{if(b){Z(e.target.files);return}let t=e.target.files?.[0]||null;t&&(X(t)||(e.target.value=``))},Se=e=>{if(e.preventDefault(),F(!1),D)return;if(b){Z(e.dataTransfer.files);return}let t=e.dataTransfer.files?.[0];t&&X(t)},Ce=e=>{I(``),y(B.filter((t,n)=>n!==e))},we=()=>L.current?.click(),Q=D?p(`span`,{className:`wui-file-busy`,children:p(`span`,{className:`spinner-border spinner-border-sm`,role:`status`,"aria-label":`Loading`})}):null,$=p(`input`,{id:R,name:ce,ref:L,type:`file`,"aria-describedby":ge,accept:C,multiple:b||void 0,disabled:D||void 0,className:`visually-hidden`,onClick:e=>{e.currentTarget.value=``},onChange:xe,...j});return m(`div`,{...e(`AppFilePicker`,h),className:`field${k?` ${k}`:``}`,children:[m(`label`,{className:`label`,htmlFor:R,children:[g,ue&&p(ee,{})]}),_e?m(`div`,{className:`file-input wui-file-input-button-field${V?` error`:``}${O?` ${O}`:``}`,style:A,"aria-busy":D||void 0,children:[m(`label`,{htmlFor:R,className:`btn btn-outline-primary btn-sm`,children:[p(a,{name:`paperclip`,size:16}),le]}),$,Q]}):G?m(`div`,{className:`file-preview${V?` error`:``}${O?` ${O}`:``}`,style:A,"aria-busy":D||void 0,children:[m(`button`,{type:`button`,className:`file-preview-open`,"aria-label":ye,onClick:we,disabled:D,children:[q?p(`img`,{src:q,alt:be,className:`file-preview-img`}):m(`span`,{className:`file-preview-file`,children:[p(a,{name:`file-text`,size:28}),p(`span`,{className:`file-preview-file-name`,children:ve})]}),p(`span`,{className:`file-preview-overlay`,children:m(`span`,{className:`file-preview-cta`,children:[p(a,{name:K?`image`:`file-text`,size:16}),` `,K?`Change image`:`Change file`]})})]}),i(p(`button`,{type:`button`,className:`file-preview-remove`,"aria-label":Y,onClick:()=>y(null),disabled:D,children:p(a,{name:`x`,size:16})}),Y),$,Q]}):m(`div`,{className:`file-input file-input-tall${P?` dragging`:``}${V?` error`:``}${b&&B.length>0?` has-files`:``}${O?` ${O}`:``}`,style:A,"aria-busy":D||void 0,onDragOver:e=>{e.preventDefault(),!D&&!P&&F(!0)},onDragLeave:e=>{e.preventDefault(),F(!1)},onDrop:Se,children:[m(`label`,{htmlFor:R,className:`file-input-zone-label`,children:[p(`span`,{className:`file-input-icon`,children:p(a,{name:`upload`,size:24})}),m(`span`,{className:`file-input-title`,children:[p(`span`,{className:`browse`,children:`Click to upload`}),` or drag & drop`]}),p(`span`,{className:`file-input-text`,children:w>0?`${c(C)}, up to ${w} MB`:c(C)})]}),$,Q,b&&B.length>0&&p(`div`,{className:`attach-list`,children:B.map((e,t)=>p(te,{item:e,isImage:e instanceof File?l(e):W||l(e),noun:`file`,onRemove:()=>Ce(t)},s(e)))})]}),p(o,{error:V,hint:E,errorId:H,hintId:U})]})}export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{sizeLabelOf as n}from"../lib/fileItem.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";function o(e){let t=e.lastIndexOf(`.`),n=t>0?e.slice(t+1):``;return n.length>0?n.slice(0,4).toUpperCase():`FILE`}function s(e){let t=n({sizeBytes:e.sizeBytes});return t&&e.meta?a(r,{children:[t,` · `,e.meta]}):t||e.meta||null}function c(n){let{label:c,files:l=[],className:u=``,"data-canvas":d,...f}=n;if(t(`AppFileTiles`,f),l.some(e=>!e.name))throw Error(`<AppFileTiles> each file needs a name.`);return i(`ul`,{className:[`wui-file-tiles`,u].filter(Boolean).join(` `),"aria-label":c,...e(`AppFileTiles`,n),...f,children:l.map(e=>{let t=s(e),n=a(r,{children:[i(`span`,{className:`wui-file-tile-ext`,"aria-hidden":`true`,children:o(e.name)}),a(`span`,{className:`wui-file-tile-text`,children:[i(`span`,{className:`wui-file-tile-name`,children:e.name}),t?i(`span`,{className:`wui-file-tile-meta`,children:t}):null]})]});return i(`li`,{children:e.href?i(`a`,{className:`wui-file-tile`,href:e.href,children:n}):i(`div`,{className:`wui-file-tile`,children:n})},e.key)})})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./AppIcon.js";import a from"../lib/DiscardPrompt.js";import{useCallback as o,useEffect as s,useRef as c,useState as
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./AppIcon.js";import a from"../lib/DiscardPrompt.js";import{useCallback as o,useEffect as s,useRef as c,useState as l}from"react";import{Modal as ee}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`default`,`danger`,`success`,`warning`],p=[`center`,`top`],m=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,h={sm:380,md:440,lg:640,xl:880},g=`wui-modal-fullscreen`,_=!1;function v(){let e=!0;try{e=process.env.NODE_ENV!==`production`}catch{e=!0}!e||_||(_=!0,t("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."))}function y(e,t){if(e.key!==`Tab`)return;let n=Array.from(t.querySelectorAll(m));if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||a===t)?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),r.focus())}function te(){let e=[];for(let t of document.body.children)t.hasAttribute(`inert`)||t.matches(`.modal, .modal-backdrop`)||(t.setAttribute(`inert`,``),e.push(t));return e}function ne(){return typeof document<`u`&&document.querySelector(`wui-drawer[open], .offcanvas.show`)!==null}function b(t){let{open:_,eyebrow:b,title:x,subtitle:S,headerIcon:C,tone:w=`default`,dismissible:T=!0,onClose:E,onBack:D,backLabel:re=`Back`,headerActions:O,footer:k,size:A=`md`,placement:j=`center`,hideHeader:M=!1,staticBackdrop:N=!1,confirmDiscard:P,dirty:F=!1,ariaLabel:I,className:ie=``,children:ae,"data-canvas":oe,...L}=t;r(`AppModal`,L),n(`AppModal`,`tone`,w,f),n(`AppModal`,`placement`,j,p),n(`AppModal`,`size`,typeof A==`string`?A:null,[...Object.keys(h),`fullscreen`]);let{style:R,ref:z,"data-wui":B,"data-wui-props":V,...H}=L,U=B?{"data-wui":B,"data-wui-props":V}:e(`AppModal`,t),W=U[`data-wui`],G=U[`data-wui-props`];M&&!I&&typeof x!=`string`&&v();let K=c(null),q=c(null),[J,Y]=l(!1);s(()=>{_||Y(!1)},[_]),s(()=>{J&&q.current?.focus()},[J]),s(()=>{let e=K.current?.closest(`.modal`);e&&(P?e.setAttribute(`confirm-discard`,P):e.removeAttribute(`confirm-discard`))},[_,P]);let X=c(null),se=o(e=>{X.current=e,typeof z==`function`?z(e):z&&(z.current=e)},[z]);s(()=>{let e=X.current?.dialog;e&&(e.setAttribute(`data-wui`,W),G===void 0?e.removeAttribute(`data-wui-props`):e.setAttribute(`data-wui-props`,G))},[_,W,G]),s(()=>{if(!_)return;let e=K.current?.closest(`.modal-content`);if(!e)return;let t=()=>Array.from(e.querySelectorAll(m));(e.querySelector(`[data-autofocus]`)||t().find(e=>!e.classList.contains(`wui-modal-close`)&&!e.classList.contains(`wui-modal-back`))||t()[0]||e).focus?.();let n=e.closest(`.modal`),r=te(),i=e=>y(e,n);return n?.addEventListener(`keydown`,i),()=>{n?.removeEventListener(`keydown`,i);for(let e of r)e.removeAttribute(`inert`);n&&setTimeout(()=>{n.isConnected&&!n.classList.contains(`show`)&&n.dispatchEvent(new Event(`transitionend`,{bubbles:!0}))},500)}},[_]);let Z=()=>{if(P&&F){Y(!0);return}E?.()},ce=()=>{Y(!1),E?.()},le=()=>{Y(!1),(K.current?.querySelector(`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled])`))?.focus()},Q=A===`fullscreen`,ue=typeof A==`number`?A:h[A]??h.md,de=[`wui-modal`,w==="default"?``:`tone-${w}`,ie].filter(Boolean).join(` `),$=_&&ne(),fe=[`wui-modal-shell`,Q&&g,$&&`wui-modal-stacked`].filter(Boolean).join(` `);return d(ee,{...H,ref:se,show:_,onHide:Z,backdrop:!N||`static`,keyboard:!N,autoFocus:!1,enforceFocus:!0,restoreFocus:!0,centered:j!==`top`,className:fe,style:Q?R:{"--wui-modal-max-width":`${ue}px`,...R},dialogClassName:`wui-rb-dialog`,contentClassName:de,backdropClassName:$?`wui-modal-dim wui-modal-backdrop-stacked`:`wui-modal-dim`,"aria-label":I||(typeof x==`string`?x:void 0),children:[!M&&d(`div`,{className:`wui-modal-header`,children:[D&&u(`button`,{type:`button`,className:`wui-modal-back`,onClick:D,"aria-label":re,children:u(i,{name:`arrow-left`,size:18})}),d(`div`,{className:`wui-modal-heading`,children:[C&&u(`span`,{className:`wui-modal-headicon`,children:u(i,{name:C,size:18})}),d(`div`,{className:`wui-modal-headtext`,children:[b&&u(`div`,{className:`wui-modal-eyebrow`,children:b}),u(`div`,{className:`wui-modal-title`,children:x}),S&&u(`div`,{className:`wui-modal-subtitle`,children:S})]})]}),O&&u(`div`,{className:`wui-modal-header-actions`,children:O}),T&&u(`button`,{type:`button`,className:`wui-modal-close`,onClick:Z,"aria-label":`Close`,children:u(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:u(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),u(`div`,{className:`wui-modal-body`,ref:K,children:ae}),(k||J)&&d(`div`,{className:J?`wui-modal-footer wui-drawer-discarding`:`wui-modal-footer`,children:[J&&u(a,{text:P,confirmRef:q,onDiscard:ce,onKeep:le}),k]})]})}export{b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./renderIconProp.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`primary`,`info`,`success`,`warning`,`danger`,`neutral`];function c(r){let{label:i,items:o=[],linkComponent:c,className:u=``,...d}=r;n(`AppNavList`,d);let f=c??`a`,p=e=>c?{to:e}:{href:e};return a(`nav`,{className:[`wui-nav-list`,u].filter(Boolean).join(` `),"aria-label":i,...e(`AppNavList`,r),...d,children:o.map(e=>{if(e.divider)return a(`hr`,{className:`wui-nav-list-divider`},e.key);if(t(`AppNavList`,`dotTone`,e.dotTone,s),e.icon&&e.dotTone)throw Error(`<AppNavList> item takes icon or dotTone, not both.`);let n=!!e.active,r=n?`wui-nav-list-item is-active`:`wui-nav-list-item`,i=n?`page`:void 0,o=l(e);return e.to?a(f,{...p(e.to),className:r,"aria-current":i,children:o},e.key):a(`button`,{type:`button`,className:r,"aria-current":i,children:o},e.key)})})}function l(e){return o(i,{children:[u(e),a(`span`,{className:`wui-nav-list-label`,children:e.label}),e.count>0?a(`span`,{className:`wui-nav-list-count`,children:e.count}):null]})}function u(e){return e.dotTone?a(`span`,{className:`wui-nav-list-dot tone-${s.includes(e.dotTone)?e.dotTone:`neutral`}`,"aria-hidden":`true`}):r(e.icon,{size:18,className:`wui-nav-list-icon`})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{BreadcrumbTrailContext as i}from"./AppBreadcrumbs.js";import{formatNumber as a}from"@webority/ui-elements/helpers";import{useEffect as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u=[`primary`,`success`,`warning`,`danger`,`info`],d=[`sm`,`md`,`lg`,`bar`],f=[`start`,`center`],p=[`inline`,`below`],m=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{BreadcrumbTrailContext as i}from"./AppBreadcrumbs.js";import{formatNumber as a}from"@webority/ui-elements/helpers";import{useEffect as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u=[`primary`,`success`,`warning`,`danger`,`info`],d=[`sm`,`md`,`lg`,`bar`],f=[`start`,`center`],p=[`inline`,`below`],m=[`below`,`inline`],h=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function g(g){let{title:_,titleSlot:v,as:y=`h1`,subtitle:b,eyebrow:x,icon:S,tone:C=`primary`,status:w,breadcrumbs:T,actions:E,views:D,tools:O,meta:k,metaPlacement:A=`inline`,subtitlePlacement:j=`below`,bulkFor:M,bulk:N,size:P=`md`,align:F=`start`,divider:I=!1,sticky:L=!1,className:R=``,...z}=g;n(`AppPageHeader`,z),t(`AppPageHeader`,`tone`,C,u),t(`AppPageHeader`,`size`,P,d),t(`AppPageHeader`,`align`,F,f),t(`AppPageHeader`,`as`,y,h),t(`AppPageHeader`,`metaPlacement`,A,p),t(`AppPageHeader`,`subtitlePlacement`,j,m);let B=h.includes(y)?y:`h1`,V=P===`bar`,H=V&&A===`below`,U=!V&&j===`inline`,W=[`page-header`,P&&P!==`md`?`page-header-${P}`:``,F===`center`?`page-header-center`:``,I?`page-header-divider`:``,L?`page-header-sticky`:``,C&&C!==`primary`?`tone-${C}`:``,H?`wui-page-header-meta-below`:``,U?`wui-page-header-subtitle-inline`:``,R].filter(Boolean).join(` `),[G,K]=s(0),q=V?M:void 0;o(()=>{if(!q)return;document.getElementById(q)?.setAttribute(`data-wui-bulk-in-bar`,``);let e=e=>{typeof e.detail?.selected==`number`&&document.getElementById(q)?.contains(e.target)&&K(e.detail.selected)};return document.addEventListener(`selectionchange`,e),()=>{document.removeEventListener(`selectionchange`,e),document.getElementById(q)?.removeAttribute(`data-wui-bulk-in-bar`)}},[q]);let J=_!=null||v!=null?c(B,{className:v==null?`page-title`:`page-title wui-page-title-slot`,"aria-label":v!=null&&typeof _==`string`&&_!==``?_:void 0,children:v??_}):null;if(V)return l(`header`,{className:W,"data-wui-page-header-bar":``,"data-wui-bulk-for":M||void 0,...e(`AppPageHeader`,g),...z,children:[T!=null&&c(i.Provider,{value:!0,children:c(`div`,{className:`page-header-bar-crumbs`,children:T})}),J,w!=null&&c(`span`,{className:`page-status`,children:w}),D!=null&&c(`div`,{className:`page-header-bar-views`,"data-wui-bar-swap":``,hidden:M&&G>0?!0:void 0,children:D}),c(`span`,{className:`page-header-bar-spacer`,"aria-hidden":`true`}),k!=null&&!H&&c(`div`,{className:`page-header-bar-meta`,children:k}),O!=null&&c(`div`,{className:`page-header-bar-tools`,"data-wui-bar-swap":``,hidden:M&&G>0?!0:void 0,children:O}),M?l(`div`,{className:`page-header-bar-bulk`,"data-wui-bar-bulk":``,hidden:G===0||void 0,children:[c(`span`,{className:`page-header-bar-bulk-count`,"aria-live":`polite`,children:G>0?`${a(G,{decimals:0})} selected`:``}),N]}):null,E!=null&&c(`div`,{className:`page-actions`,children:E}),k!=null&&H&&c(`div`,{className:`page-header-bar-meta`,children:k})]});let Y=S==null?null:typeof S==`string`?c(r,{name:S,size:20}):S,X=b==null?null:c(`div`,{className:`page-subtitle`,children:b});return l(`div`,{className:W,...e(`AppPageHeader`,g),...z,children:[T!=null&&c(`div`,{className:`page-breadcrumbs`,children:T}),l(`div`,{className:`page-header-bar`,children:[l(`div`,{className:`page-header-lead`,children:[Y!=null&&c(`span`,{className:`page-header-icon`,children:Y}),l(`div`,{className:`page-header-titles`,children:[x!=null&&c(`div`,{className:`page-eyebrow`,children:x}),l(`div`,{className:`page-titlebar`,children:[J,w!=null&&c(`span`,{className:`page-status`,children:w}),U&&X]}),!U&&X]})]}),E!=null&&c(`div`,{className:`page-actions`,children:E})]})]})}export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"./useWuiControl.js";import{forwardRef as a,useEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/sortable";var u=[`vertical`,`horizontal`],d=(e,t)=>{e.controlled=!0;let n=e.order;(n.length!==t.length||t.some((e,t)=>e!==n[t]))&&(e.order=t)},
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"./useWuiControl.js";import{forwardRef as a,useEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/sortable";var u=[`vertical`,`horizontal`],d=[`always`,`hover`],f=(e,t)=>{e.controlled=!0;let n=e.order;(n.length!==t.length||t.some((e,t)=>e!==n[t]))&&(e.order=t)},p=a(function(a,p){let{items:m=[],onReorder:h,ariaLabel:g,handle:_=!1,group:v,name:y,disabled:b=!1,orientation:x=`vertical`,handleDisplay:S=`always`,bordered:C=!0,className:w=``,...T}=a;n(`AppSortableList`,T),t(`AppSortableList`,`orientation`,x,u),t(`AppSortableList`,`handleDisplay`,S,d);let E=S===`hover`,D=m.map(e=>e.id),O=s(D);o(()=>{O.current=D});let{setRef:k,innerRef:A}=i({ref:p,value:D,writeValue:f,on:{"wui-sortable:change":e=>{e.target===e.currentTarget&&(h?.(e.detail.ids,e.detail),requestAnimationFrame(()=>{A.current&&f(A.current,O.current)}))}}});return c(`wui-sortable`,{ref:k,role:`list`,"aria-label":g,name:y||void 0,group:v||void 0,orientation:x===`horizontal`?`horizontal`:void 0,"handle-display":E?`hover`:void 0,handle:_||E?``:void 0,disabled:b?``:void 0,borderless:C?void 0:``,className:`wui-sortable${w?` ${w}`:``}`,...e(`AppSortableList`,a),...T,children:m.map(e=>l(`div`,{role:`listitem`,className:`wui-sortable-item`,"data-id":e.id,"data-label":e.label,"data-disabled":e.disabled?``:void 0,children:[c(`button`,{type:`button`,className:`wui-sortable-handle`,"aria-label":`Reorder ${e.label}`,disabled:b||e.disabled?!0:void 0,children:c(r,{name:`menu`,size:18})}),c(`div`,{className:`wui-sortable-body`,children:e.content??e.label})]},e.id))})});export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{pageWindow as i}from"../lib/pageWindow.js";import a from"./AppSelectMini.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`numbered`,`prev-next`],l=[5,10,25,50];function u(u){let{page:d,totalPages:f,total:p,pageSize:m,onPageChange:h,onPageSizeChange:g,pageSizes:_=l,mode:v=`numbered`,showPageSize:y=!0,className:b=``,...x}=u;n(`AppTablePagination`,x),t(`AppTablePagination`,`mode`,v,c);let S=Number(d),C=Number(m)||0,w=Number(p)||0,
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{pageWindow as i}from"../lib/pageWindow.js";import a from"./AppSelectMini.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`numbered`,`prev-next`],l=[5,10,25,50];function u(u){let{page:d,totalPages:f,total:p,pageSize:m,onPageChange:h,onPageSizeChange:g,pageSizes:_=l,mode:v=`numbered`,showPageSize:y=!0,className:b=``,...x}=u;n(`AppTablePagination`,x),t(`AppTablePagination`,`mode`,v,c);let S=Number(d),C=Number(m)||0,w=C>0&&!_.includes(C)?[..._,C].sort((e,t)=>e-t):_,T=Number(p)||0,E=f??Math.max(1,Math.ceil(T/(C>0?C:10))),D=v===`numbered`,O=D?i(S,E):null;return s(`div`,{className:`table-pagination${b?` ${b}`:``}`,...e(`AppTablePagination`,u),...x,children:[y&&o(`span`,{className:`tpg-rows`,children:o(a,{value:C,onChange:e=>g?.(Number(e)),ariaLabel:`Rows per page`,options:w.map(e=>({value:e,label:`${e} per page`}))})}),!D&&s(`span`,{className:`tpg-range`,children:[`Page `,S,` of `,E]}),s(`div`,{className:`tpg-nav`,children:[o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>h?.(Math.max(1,S-1)),disabled:S<=1,"aria-label":`Previous page`,children:o(r,{name:`arrow-left`,size:18})}),D&&O.map(e=>typeof e==`number`?o(`button`,{type:`button`,className:`tpg-page${e===S?` is-active`:``}`,onClick:()=>h?.(e),"aria-current":e===S?`page`:void 0,"aria-label":`Page ${e}`,children:e},e):o(`span`,{className:`tpg-ellipsis`,"aria-hidden":`true`,children:`…`},e)),o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>h?.(Math.min(E,S+1)),disabled:S>=E,"aria-label":`Next page`,children:o(r,{name:`arrow-right`,size:18})})]})]})}export{u as default};
|
package/dist/guidance.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"format": "webority-guidance/1",
|
|
3
3
|
"package": {
|
|
4
4
|
"name": "@webority/ui-react",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.107.0"
|
|
6
6
|
},
|
|
7
7
|
"components": [
|
|
8
8
|
{
|
|
@@ -2813,6 +2813,81 @@
|
|
|
2813
2813
|
]
|
|
2814
2814
|
}
|
|
2815
2815
|
},
|
|
2816
|
+
{
|
|
2817
|
+
"name": "AppDetailPane",
|
|
2818
|
+
"usage": {
|
|
2819
|
+
"when": [
|
|
2820
|
+
"A person keeps working in a list and reads the details of one item beside it.",
|
|
2821
|
+
"Choosing an item should not change page, and the list must stay where it is."
|
|
2822
|
+
],
|
|
2823
|
+
"whenNot": [
|
|
2824
|
+
{
|
|
2825
|
+
"text": "The items form a queue the person works through one by one.",
|
|
2826
|
+
"instead": "AppSplitView"
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
"text": "The detail is an overlay that covers the page.",
|
|
2830
|
+
"instead": "AppDrawer"
|
|
2831
|
+
},
|
|
2832
|
+
{
|
|
2833
|
+
"text": "The detail is a short task that interrupts the flow.",
|
|
2834
|
+
"instead": "AppModal"
|
|
2835
|
+
}
|
|
2836
|
+
],
|
|
2837
|
+
"do": [
|
|
2838
|
+
{
|
|
2839
|
+
"note": "The pane sits beside the list it details. Escape inside it calls onClose.",
|
|
2840
|
+
"example": [
|
|
2841
|
+
{
|
|
2842
|
+
"component": "AppDetailPane",
|
|
2843
|
+
"props": {
|
|
2844
|
+
"label": "Request details",
|
|
2845
|
+
"open": true
|
|
2846
|
+
},
|
|
2847
|
+
"children": [
|
|
2848
|
+
{
|
|
2849
|
+
"component": "p",
|
|
2850
|
+
"children": "Expense claim: client travel. Dev Patel, Sales."
|
|
2851
|
+
}
|
|
2852
|
+
]
|
|
2853
|
+
}
|
|
2854
|
+
]
|
|
2855
|
+
}
|
|
2856
|
+
],
|
|
2857
|
+
"dont": [
|
|
2858
|
+
{
|
|
2859
|
+
"note": "Use a detail pane to cover the page or hold a multi-step task; use AppDrawer or AppModal for that.",
|
|
2860
|
+
"example": [
|
|
2861
|
+
{
|
|
2862
|
+
"component": "AppDetailPane",
|
|
2863
|
+
"props": {
|
|
2864
|
+
"label": "New leave request",
|
|
2865
|
+
"open": true
|
|
2866
|
+
},
|
|
2867
|
+
"children": [
|
|
2868
|
+
{
|
|
2869
|
+
"component": "p",
|
|
2870
|
+
"children": "Step 1 of 3: choose the leave type."
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
"component": "AppButton",
|
|
2874
|
+
"props": {
|
|
2875
|
+
"variant": "outline",
|
|
2876
|
+
"size": "sm"
|
|
2877
|
+
},
|
|
2878
|
+
"children": "Next"
|
|
2879
|
+
}
|
|
2880
|
+
]
|
|
2881
|
+
}
|
|
2882
|
+
]
|
|
2883
|
+
}
|
|
2884
|
+
],
|
|
2885
|
+
"a11y": [
|
|
2886
|
+
"The pane is a region named by label. Escape inside it calls onClose.",
|
|
2887
|
+
"A closed pane is hidden from assistive technology, so it is not read while it is closed."
|
|
2888
|
+
]
|
|
2889
|
+
}
|
|
2890
|
+
},
|
|
2816
2891
|
{
|
|
2817
2892
|
"name": "AppDrawer",
|
|
2818
2893
|
"usage": {
|
|
@@ -3361,6 +3436,32 @@
|
|
|
3361
3436
|
]
|
|
3362
3437
|
}
|
|
3363
3438
|
},
|
|
3439
|
+
{
|
|
3440
|
+
"name": "AppFileTiles",
|
|
3441
|
+
"usage": {
|
|
3442
|
+
"when": [
|
|
3443
|
+
"A few files attached to a record that the person reads rather than edits.",
|
|
3444
|
+
"Files that open or download from the page, each shown with its type and size."
|
|
3445
|
+
],
|
|
3446
|
+
"whenNot": [
|
|
3447
|
+
{
|
|
3448
|
+
"text": "The person picks or uploads the files.",
|
|
3449
|
+
"instead": "AppFileAttachment"
|
|
3450
|
+
},
|
|
3451
|
+
{
|
|
3452
|
+
"text": "One file to read in the page.",
|
|
3453
|
+
"instead": "AppFileViewer"
|
|
3454
|
+
}
|
|
3455
|
+
],
|
|
3456
|
+
"do": [],
|
|
3457
|
+
"dont": [],
|
|
3458
|
+
"a11y": [
|
|
3459
|
+
"The list takes its accessible name from label.",
|
|
3460
|
+
"The type tile is hidden from assistive technology; the file name carries the meaning.",
|
|
3461
|
+
"A file with an href is a link; a file without one is plain text."
|
|
3462
|
+
]
|
|
3463
|
+
}
|
|
3464
|
+
},
|
|
3364
3465
|
{
|
|
3365
3466
|
"name": "AppFileViewer",
|
|
3366
3467
|
"usage": {
|
|
@@ -4858,6 +4959,35 @@
|
|
|
4858
4959
|
]
|
|
4859
4960
|
}
|
|
4860
4961
|
},
|
|
4962
|
+
{
|
|
4963
|
+
"name": "AppNavList",
|
|
4964
|
+
"usage": {
|
|
4965
|
+
"when": [
|
|
4966
|
+
"A page has a short rail of destinations or groups, each with a count, beside its content.",
|
|
4967
|
+
"The rows pick one current destination, and some rows are coloured by a status dot."
|
|
4968
|
+
],
|
|
4969
|
+
"whenNot": [
|
|
4970
|
+
{
|
|
4971
|
+
"text": "A site's top navigation with dropdown panels.",
|
|
4972
|
+
"instead": "AppNavigationMenu"
|
|
4973
|
+
},
|
|
4974
|
+
{
|
|
4975
|
+
"text": "A signed-in app's sidebar of destinations.",
|
|
4976
|
+
"instead": "AppSidebarMenu"
|
|
4977
|
+
},
|
|
4978
|
+
{
|
|
4979
|
+
"text": "A choice between several values in a form.",
|
|
4980
|
+
"instead": "AppRadioGroup"
|
|
4981
|
+
}
|
|
4982
|
+
],
|
|
4983
|
+
"do": [],
|
|
4984
|
+
"dont": [],
|
|
4985
|
+
"a11y": [
|
|
4986
|
+
"The rows sit in a navigation landmark named by label, and the current row is marked with aria-current page.",
|
|
4987
|
+
"A dot is decorative: the row's label carries the meaning, so the dot is hidden from assistive tech."
|
|
4988
|
+
]
|
|
4989
|
+
}
|
|
4990
|
+
},
|
|
4861
4991
|
{
|
|
4862
4992
|
"name": "AppNavigationMenu",
|
|
4863
4993
|
"usage": {
|
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
* component only tracks which panes are open.
|
|
9
9
|
*
|
|
10
10
|
* @param {object} props
|
|
11
|
-
* @param {{ key?: string, title: import('react').ReactNode, content: import('react').ReactNode, open?: boolean }[]} props.items
|
|
11
|
+
* @param {{ key?: string, title: import('react').ReactNode, content: import('react').ReactNode, open?: boolean, count?: number }[]} props.items
|
|
12
12
|
* @param {boolean} [props.multiple]
|
|
13
13
|
* @param {string[]} [props.openItems]
|
|
14
|
+
* @param {"bordered"|"flat"} [props.variant]
|
|
14
15
|
* @param {string} [props.id]
|
|
15
16
|
* @param {string} [props.className]
|
|
16
17
|
*/
|
|
@@ -21,6 +22,7 @@ export default function AppAccordion(props: {
|
|
|
21
22
|
title: import('react').ReactNode;
|
|
22
23
|
content: import('react').ReactNode;
|
|
23
24
|
open?: boolean;
|
|
25
|
+
count?: number;
|
|
24
26
|
}[];
|
|
25
27
|
/**
|
|
26
28
|
* Allows more than one pane open at a time. Leave it off for a list the reader scans.
|
|
@@ -29,6 +31,11 @@ export default function AppAccordion(props: {
|
|
|
29
31
|
multiple?: boolean;
|
|
30
32
|
/** The keys of the panes that start open. It replaces each item's own open flag and is read again when its content changes. Without multiple only the first key opens. */
|
|
31
33
|
openItems?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* bordered (default) | flat: a text toggle with a leading chevron and an optional count chip, for a section header rather than a card of questions.
|
|
36
|
+
* @default "bordered"
|
|
37
|
+
*/
|
|
38
|
+
variant?: "bordered" | "flat";
|
|
32
39
|
/** Prefix for the generated pane ids. Set it when a pane needs a stable anchor to link to. */
|
|
33
40
|
id?: string;
|
|
34
41
|
/**
|
|
@@ -13,8 +13,13 @@ declare const AppCalendar: import("react").ForwardRefExoticComponent<{
|
|
|
13
13
|
allDay?: boolean;
|
|
14
14
|
tone?: 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
15
15
|
url?: string;
|
|
16
|
+
stack?: {
|
|
17
|
+
count: number;
|
|
18
|
+
url: string;
|
|
19
|
+
label: string;
|
|
20
|
+
};
|
|
16
21
|
}[];
|
|
17
|
-
/** Called with `start` and `
|
|
22
|
+
/** Called with `start`, `end` and `view` (month, week, day or list; IST days) whenever the visible period changes; answers a JSON list of events. */
|
|
18
23
|
eventsUrl?: string;
|
|
19
24
|
/** The view to show. Without it a calendar opens on the month, or on the list when it is narrower than a phone. */
|
|
20
25
|
view?: 'month' | 'week' | 'day' | 'list';
|
|
@@ -85,6 +85,10 @@ export type CommentThreadItem = {
|
|
|
85
85
|
* @param {boolean} [props.allowReplies] False leaves out the Reply action and the reply box; existing replies still show.
|
|
86
86
|
* @param {boolean} [props.allowReactions] False leaves out the reaction panel and the reaction chips.
|
|
87
87
|
* @param {string} [props.composerPlaceholder] The composer box's placeholder; without it the standard one.
|
|
88
|
+
* @param {"stacked"|"inline"} [props.composer] The box under the list, or one row with the author's avatar, the box and the post button.
|
|
89
|
+
* @param {string} [props.author] The name for the inline composer's avatar; ignored when stacked.
|
|
90
|
+
* @param {string} [props.postLabel] The post button's text; without it "Comment".
|
|
91
|
+
* @param {number} [props.composerRows] The composer box's rows; without it 3 stacked and 1 inline.
|
|
88
92
|
* @param {boolean} [props.readOnly]
|
|
89
93
|
* @param {string} [props.label]
|
|
90
94
|
* @param {string} [props.id]
|
|
@@ -128,6 +132,20 @@ export default function AppCommentThread(props: {
|
|
|
128
132
|
allowReactions?: boolean;
|
|
129
133
|
/** The composer box's placeholder. Without it the standard placeholder asks for a comment and names @ mentions. */
|
|
130
134
|
composerPlaceholder?: string;
|
|
135
|
+
/**
|
|
136
|
+
* stacked: the box under the list. inline: one row with the author's avatar, the box and the post button.
|
|
137
|
+
* @default "stacked"
|
|
138
|
+
*/
|
|
139
|
+
composer?: "stacked" | "inline";
|
|
140
|
+
/** The name for the inline composer's avatar. Ignored when stacked. */
|
|
141
|
+
author?: string;
|
|
142
|
+
/**
|
|
143
|
+
* The post button's text.
|
|
144
|
+
* @default "Comment"
|
|
145
|
+
*/
|
|
146
|
+
postLabel?: string;
|
|
147
|
+
/** The composer box's rows. Without it, 3 stacked and 1 inline. */
|
|
148
|
+
composerRows?: number;
|
|
131
149
|
/**
|
|
132
150
|
* Show the thread without the box, actions or reacting.
|
|
133
151
|
* @default false
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @param {object} props
|
|
5
5
|
* @param {boolean} props.open
|
|
6
6
|
* @param {string} props.title
|
|
7
|
+
* @param {'default'|'plain'} [props.variant] default keeps the illustration and equal-width actions; plain drops the illustration, starts the text at the edge and sizes the actions small, right-aligned.
|
|
7
8
|
* @param {import('react').ReactNode} [props.message]
|
|
8
9
|
* @param {import('react').ReactNode} [props.children] Extra content drawn between the message and the confirm-phrase field, such as a reason select or a note box.
|
|
9
10
|
* @param {string} [props.confirmLabel]
|
|
@@ -26,6 +27,11 @@ export default function AppConfirmDialog(props: {
|
|
|
26
27
|
open: boolean;
|
|
27
28
|
/** The dialog heading. */
|
|
28
29
|
title: string;
|
|
30
|
+
/**
|
|
31
|
+
* default keeps the status illustration and equal-width actions. plain drops the illustration, starts the text at the edge and sizes the actions small, right-aligned.
|
|
32
|
+
* @default "default"
|
|
33
|
+
*/
|
|
34
|
+
variant?: 'default' | 'plain';
|
|
29
35
|
/** The text that explains what the user is confirming. */
|
|
30
36
|
message?: import('react').ReactNode;
|
|
31
37
|
children?: import('react').ReactNode;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An in-page detail column beside a list. It is hidden until `open`, and Escape inside it calls
|
|
3
|
+
* `onClose`. Razor counterpart: `<app-detail-pane>`, filled by `WUI.pane.load`.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} props
|
|
6
|
+
* @param {boolean} [props.open] Shows the pane. Defaults to false.
|
|
7
|
+
* @param {() => void} [props.onClose] Called on Escape inside the pane.
|
|
8
|
+
* @param {string} props.label The accessible name of the pane region.
|
|
9
|
+
* @param {boolean} [props.sticky] Keeps the pane in view under the top bar while the list scrolls. Defaults to true.
|
|
10
|
+
* @param {import('react').ReactNode} [props.children]
|
|
11
|
+
* @param {string} [props.className]
|
|
12
|
+
*/
|
|
13
|
+
export default function AppDetailPane(props: {
|
|
14
|
+
/**
|
|
15
|
+
* Shows the pane. Closed, the pane is hidden and takes no room. The caller owns it and closes it in onClose.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
open?: boolean;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
/** The accessible name of the pane region. */
|
|
21
|
+
label: string;
|
|
22
|
+
/**
|
|
23
|
+
* Keeps the pane in view under the top bar while the list beside it scrolls.
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
sticky?: boolean;
|
|
27
|
+
children?: import('react').ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Extra classes on the pane.
|
|
30
|
+
* @default ""
|
|
31
|
+
*/
|
|
32
|
+
className?: string;
|
|
33
|
+
}): import("react").JSX.Element;
|
|
@@ -17,7 +17,7 @@ import "@webority/ui-elements/elements/drawer";
|
|
|
17
17
|
* @param {string} [props.subtitle]
|
|
18
18
|
* @param {string} [props.ariaLabel]
|
|
19
19
|
* @param {'end'|'start'} [props.side]
|
|
20
|
-
* @param {'sm'|'md'|'lg'} [props.size]
|
|
20
|
+
* @param {'sm'|'md'|'lg'|'xl'} [props.size]
|
|
21
21
|
* @param {number[]} [props.snapPoints]
|
|
22
22
|
* @param {number} [props.defaultSnap]
|
|
23
23
|
* @param {(index: number, percent: number) => void} [props.onSnapChange] Called when the sheet moves to another point.
|
|
@@ -48,10 +48,10 @@ export default function AppDrawer(props: {
|
|
|
48
48
|
*/
|
|
49
49
|
side?: 'end' | 'start';
|
|
50
50
|
/**
|
|
51
|
-
* The side drawer's width: 360, 480 or
|
|
51
|
+
* The side drawer's width: 360, 480, 640 or 720 px.
|
|
52
52
|
* @default "md"
|
|
53
53
|
*/
|
|
54
|
-
size?: 'sm' | 'md' | 'lg';
|
|
54
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
55
55
|
/**
|
|
56
56
|
* The sheet's resting heights, each 10 to 100 percent of the screen.
|
|
57
57
|
* @default [50,90]
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* @param {string} [props.id]
|
|
17
17
|
* @param {(file: File|null) => void | (files: File[]) => void} props.onPick single → File|null; multiple → File[]
|
|
18
18
|
* @param {boolean} [props.multiple]
|
|
19
|
+
* @param {"dropzone" | "button"} [props.variant] dropzone (default) | button: a small outline button that opens the file dialog; no previews.
|
|
20
|
+
* @param {string} [props.buttonLabel] The button form's text.
|
|
19
21
|
* @param {number} [props.maxFiles]
|
|
20
22
|
* @param {string} [props.accept]
|
|
21
23
|
* @param {number} [props.maxSizeMb]
|
|
@@ -48,6 +50,16 @@ export default function AppFilePicker(props: {
|
|
|
48
50
|
* @default false
|
|
49
51
|
*/
|
|
50
52
|
multiple?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* dropzone is the tall drop target. button is a small outline button that opens the file dialog, with no preview and no list.
|
|
55
|
+
* @default "dropzone"
|
|
56
|
+
*/
|
|
57
|
+
variant?: "dropzone" | "button";
|
|
58
|
+
/**
|
|
59
|
+
* The button form's text.
|
|
60
|
+
* @default "Add file"
|
|
61
|
+
*/
|
|
62
|
+
buttonLabel?: string;
|
|
51
63
|
/** Cap on total files in multiple mode. */
|
|
52
64
|
maxFiles?: number;
|
|
53
65
|
/**
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A read-only grid of files: a type tile, the name, then the size and a meta line. A file with an
|
|
3
|
+
* `href` is a link to it.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} props
|
|
6
|
+
* @param {string} props.label Accessible name of the list.
|
|
7
|
+
* @param {{ key: string|number, name: string, href?: string, sizeBytes?: number,
|
|
8
|
+
* meta?: import('react').ReactNode }[]} [props.files]
|
|
9
|
+
* @param {string} [props.className]
|
|
10
|
+
*/
|
|
11
|
+
export default function AppFileTiles(props: {
|
|
12
|
+
/** Accessible name of the list. */
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* The files, each { key, name, href, sizeBytes, meta }. name's extension makes the type tile; href makes the tile a link; sizeBytes is the size in bytes; meta is text after the size.
|
|
16
|
+
* @default []
|
|
17
|
+
*/
|
|
18
|
+
files?: {
|
|
19
|
+
key: string | number;
|
|
20
|
+
name: string;
|
|
21
|
+
href?: string;
|
|
22
|
+
sizeBytes?: number;
|
|
23
|
+
meta?: import('react').ReactNode;
|
|
24
|
+
}[];
|
|
25
|
+
/**
|
|
26
|
+
* Extra class names added to the list.
|
|
27
|
+
* @default ""
|
|
28
|
+
*/
|
|
29
|
+
className?: string;
|
|
30
|
+
}): import("react").JSX.Element;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* @param {() => void} props.onClose
|
|
13
13
|
* @param {() => void} [props.onBack] Shows a back arrow before the title and runs this when it is pressed.
|
|
14
14
|
* @param {string} [props.backLabel] The back arrow's accessible name.
|
|
15
|
+
* @param {import('react').ReactNode} [props.headerActions] Actions drawn beside the title, before the close button; not drawn while the header is hidden.
|
|
15
16
|
* @param {import('react').ReactNode} [props.footer]
|
|
16
17
|
* @param {'sm'|'md'|'lg'|'xl'|'fullscreen'|number} [props.size]
|
|
17
18
|
* @param {'center'|'top'} [props.placement]
|
|
@@ -51,6 +52,8 @@ export default function AppModal(props: {
|
|
|
51
52
|
* @default "Back"
|
|
52
53
|
*/
|
|
53
54
|
backLabel?: string;
|
|
55
|
+
/** Actions drawn beside the title, before the close button, such as Previous and Next. Not drawn while hideHeader is set. */
|
|
56
|
+
headerActions?: import('react').ReactNode;
|
|
54
57
|
/** Content pinned at the bottom, usually the action buttons. */
|
|
55
58
|
footer?: import('react').ReactNode;
|
|
56
59
|
/**
|