@webority/ui-react 0.94.0 → 0.95.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.
@@ -2,7 +2,7 @@
2
2
  "kind": "WeborityWeb",
3
3
  "library": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.94.0"
5
+ "version": "0.95.0"
6
6
  },
7
7
  "rendererProtocolVersion": 7,
8
8
  "platform": "Web",
@@ -5363,7 +5363,7 @@
5363
5363
  {
5364
5364
  "name": "AppConfirmDialog",
5365
5365
  "marker": "AppConfirmDialog",
5366
- "acceptsChildren": false,
5366
+ "acceptsChildren": true,
5367
5367
  "props": [
5368
5368
  {
5369
5369
  "name": "cancelLabel",
@@ -5559,7 +5559,8 @@
5559
5559
  "The title is an h3 that takes focus when the dialog opens.",
5560
5560
  "A custom image is hidden from assistive technology with an empty alt, so the title and message carry the meaning.",
5561
5561
  "The confirm-phrase field is named \"Type <phrase> to confirm\", and Confirm stays disabled until the phrase matches.",
5562
- "While loading, Cancel is disabled and the backdrop and Escape no longer close the dialog."
5562
+ "While loading, Cancel is disabled and the backdrop and Escape no longer close the dialog.",
5563
+ "Children draw left-aligned between the message and the confirm-phrase field, so a field placed there keeps its own label."
5563
5564
  ]
5564
5565
  }
5565
5566
  },
@@ -6246,6 +6247,12 @@
6246
6247
  "required": false,
6247
6248
  "description": "A column key: rows gather under a header row per value of it, in the order each value first appears, each header collapsing its rows and showing their count."
6248
6249
  },
6250
+ {
6251
+ "name": "headerTone",
6252
+ "type": "string",
6253
+ "required": false,
6254
+ "description": "The column header band's colour, a CSS colour or a $color token the Canvas renderer resolves."
6255
+ },
6249
6256
  {
6250
6257
  "name": "hiddenColumns",
6251
6258
  "type": "array",
@@ -6265,6 +6272,12 @@
6265
6272
  "required": false,
6266
6273
  "description": "Caps the table's height; the body scrolls inside it with the header pinned. Without it there is no scroll box for the header to stick to."
6267
6274
  },
6275
+ {
6276
+ "name": "pad",
6277
+ "type": "number",
6278
+ "required": false,
6279
+ "description": "The inset around the table, in px; the wrapper's 20px is the default and flush wins over it."
6280
+ },
6268
6281
  {
6269
6282
  "name": "pagination",
6270
6283
  "type": "object",
@@ -8812,11 +8825,39 @@
8812
8825
  "description": "side puts the title and description in a column beside the fields from lg up; below that it stacks.",
8813
8826
  "default": "stacked"
8814
8827
  },
8828
+ {
8829
+ "name": "rule",
8830
+ "type": "enum",
8831
+ "enum": [
8832
+ "line",
8833
+ "none"
8834
+ ],
8835
+ "required": false,
8836
+ "description": "none drops the hairline between consecutive sections and keeps the space.",
8837
+ "default": "line"
8838
+ },
8815
8839
  {
8816
8840
  "name": "title",
8817
8841
  "type": "node",
8818
8842
  "required": false,
8819
8843
  "description": "Section heading (h3)."
8844
+ },
8845
+ {
8846
+ "name": "titleFont",
8847
+ "type": "enum",
8848
+ "enum": [
8849
+ "body",
8850
+ "display"
8851
+ ],
8852
+ "required": false,
8853
+ "description": "display sets the title in the display face; body keeps the text face.",
8854
+ "default": "body"
8855
+ },
8856
+ {
8857
+ "name": "titleSize",
8858
+ "type": "number",
8859
+ "required": false,
8860
+ "description": "The title's font size in px; unset keeps the theme's 15px."
8820
8861
  }
8821
8862
  ],
8822
8863
  "itemsTakeAction": [],
@@ -16444,6 +16485,12 @@
16444
16485
  "required": false,
16445
16486
  "description": "A short label above the heading."
16446
16487
  },
16488
+ {
16489
+ "name": "inset",
16490
+ "type": "number",
16491
+ "required": false,
16492
+ "description": "The section's side inset in px; unset keeps the container padding."
16493
+ },
16447
16494
  {
16448
16495
  "name": "items",
16449
16496
  "type": "array",
@@ -16506,6 +16553,17 @@
16506
16553
  "required": true,
16507
16554
  "description": "The section's heading."
16508
16555
  },
16556
+ {
16557
+ "name": "titleFont",
16558
+ "type": "enum",
16559
+ "enum": [
16560
+ "body",
16561
+ "display"
16562
+ ],
16563
+ "required": false,
16564
+ "description": "The heading's face: display for the brand face, body for the text face.",
16565
+ "default": "display"
16566
+ },
16509
16567
  {
16510
16568
  "name": "variant",
16511
16569
  "type": "enum",
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "webority-web",
3
- "version": "0.94.0",
3
+ "version": "0.95.0",
4
4
  "platform": "Web",
5
5
  "kitModuleVersion": 2,
6
6
  "rendererProtocolVersion": 7,
7
7
  "library": {
8
8
  "name": "@webority/ui-react",
9
- "version": "0.94.0"
9
+ "version": "0.95.0"
10
10
  },
11
11
  "files": {
12
12
  "manifest.json": {
13
- "sha256": "db29d8a4856ad6c367007fecfd804c308c06bda38fd2a05eb158a667350aa516",
14
- "bytes": 834608
13
+ "sha256": "6d67f97e3c91f45b4fb41be886bbf585a291578ea21385067c5339523f7f7320",
14
+ "bytes": 836515
15
15
  },
16
16
  "kit.js": {
17
- "sha256": "a8ec68f3827a35d3073d65c2624b88d9e3bf937ddfea2eeda3e2f5082f16c5e9",
18
- "bytes": 10845132
17
+ "sha256": "092a8160e2557bdb8d82c61d1a2729d06b629ce83d3c070cec50f84eef744e9b",
18
+ "bytes": 10847993
19
19
  },
20
20
  "kit.css": {
21
21
  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{initialsOf as r}from"../lib/initials.js";import{formatDate as i,formatNumber as a,toInstant as o}from"@webority/ui-elements/helpers";import{Fragment as s,useEffect as c,useId as l,useRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{COMMENT_REACTIONS as p,COMMENT_TEXT as m}from"@webority/ui-elements/elements/comment-thread";import{parseMentionValue as h}from"@webority/ui-elements/elements/mention-input";function g(n){let{comments:r=[],onPost:i,onReply:a,onEdit:o,onDelete:s,onReact:h,people:g,loadPeople:v,reactionChoices:y,readOnly:b=!1,label:x=m.listName,id:S,className:C=``,...w}=n;t(`AppCommentThread`,w);let T=l(),E=S||`comment-thread-${T.replace(/[^a-zA-Z0-9_-]/g,``)}`,D=u(null),O=typeof v==`function`,k=y?.length?y:p,A=u(null);return A.current={onPost:i,onReply:a,onEdit:o,onDelete:s,onReact:h,loadPeople:v},c(()=>{let e=D.current;if(e)return e.submit=async({intent:e,commentId:t,parentId:n,body:r,emoji:i})=>{let a=A.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}},[]),c(()=>{let e=D.current;!e||O||(e.people=g||[])},[g,O]),c(()=>{let e=D.current;if(!e||!O)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 A.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)},[O]),f(`wui-comment-thread`,{ref:D,id:E,class:C?`wui-comment-thread ${C}`:`wui-comment-thread`,controlled:``,"read-only":b?``:void 0,remote:O?``:void 0,"reaction-choices":y?.length?y.join(` `):void 0,...e(`AppCommentThread`,n),...w,children:[d(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:r.length?d(`ol`,{className:`wui-comment-list`,"aria-label":x,children:r.map(e=>d(_,{comment:e,topLevel:!0,readOnly:b},e.id))}):d(`p`,{className:`wui-comment-empty`,children:m.empty})}),!b&&d(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":m.pickerName,"data-wui-picker":``,hidden:!0,children:k.map(e=>d(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!b&&f(`div`,{className:`wui-comment-composer`,"data-wui-composer":``,children:[d(`wui-mention-input`,{id:`${E}-new`,class:`wui-mention-input`,label:m.composerLabel,placeholder:m.composerPlaceholder,rows:`3`,remote:O?``:void 0}),d(`div`,{className:`wui-comment-form-actions`,children:d(`button`,{type:`button`,className:`btn btn-primary btn-sm`,"data-wui-action":`post`,children:m.post})}),d(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]}),d(`span`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}function _({comment:e,topLevel:t=!1,readOnly:c}){let{id:l,author:u,at:p,value:g,edited:v,deleted:y,canEdit:b,canDelete:x,reactions:S=[],replies:C=[]}=e,w=u?.name||``,T=o(p),E=!c&&!y&&b,D=!c&&!y&&x;return f(`li`,{className:`wui-comment`,"data-wui-comment":l,"data-value":g??``,"data-wui-deleted":y?``:void 0,children:[f(`div`,{className:`wui-comment-row`,children:[f(`span`,{className:`avatar avatar-sm wui-comment-avatar`,"aria-hidden":`true`,children:[d(`span`,{className:`avatar-face`,children:r(w)||`?`}),u?.src&&d(`img`,{className:`avatar-img`,src:u.src,alt:``,onError:e=>{e.currentTarget.hidden=!0}})]}),f(`div`,{className:`wui-comment-main`,children:[f(`div`,{className:`wui-comment-head`,children:[d(`span`,{className:`wui-comment-author`,children:w}),d(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(T)?new Date(T).toISOString():void 0,children:i(p,{pattern:`datetime`})}),v&&!y&&d(`span`,{className:`wui-comment-edited`,children:m.edited})]}),y?d(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:m.deleted}):d(`div`,{className:`wui-comment-text`,"data-wui-text":``,children:h(g).map((e,t)=>`text`in e?d(s,{children:e.text},t):f(`span`,{className:`wui-mention`,"data-mention-id":e.id,children:[`@`,e.label]},t))}),E&&d(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),!y&&(S.length>0||!c)&&f(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":m.reactions,children:[S.map(e=>c?f(`span`,{className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,children:[d(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),d(`span`,{className:`wui-reaction-count`,children:a(e.count,{decimals:0})})]},e.emoji):f(`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:[d(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),d(`span`,{className:`wui-reaction-count`,children:a(e.count,{decimals:0})})]},e.emoji)),!c&&d(`button`,{type:`button`,className:`wui-reaction-add`,"data-wui-action":`react-menu`,"aria-label":m.addReaction,"aria-haspopup":`true`,"aria-expanded":`false`,children:d(n,{name:`emoji-smile`,size:16})})]}),!c&&!y&&(t||E||D)&&f(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[t&&d(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:m.reply}),E&&d(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:m.edit}),D&&d(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:m.delete})]}),D&&f(`div`,{className:`wui-comment-confirm`,"data-wui-confirm":``,hidden:!0,children:[d(`span`,{className:`wui-comment-confirm-text`,children:m.confirmDelete}),d(`button`,{type:`button`,className:`btn btn-danger btn-sm`,"data-wui-action":`confirm-delete`,children:m.delete}),d(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,"data-wui-action":`cancel-delete`,children:m.cancel})]}),!c&&d(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]})]}),t&&C.length>0&&d(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":m.repliesName(w),children:C.map(e=>d(_,{comment:e,readOnly:c},e.id))}),t&&!c&&!y&&d(`div`,{className:`wui-comment-reply`,"data-wui-reply":``,hidden:!0})]})}export{g as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{initialsOf as r}from"../lib/initials.js";import{parseMentionValue as i}from"@webority/ui-elements/elements/mention-input";import{formatDate as a,formatNumber as o,toInstant as s}from"@webority/ui-elements/helpers";import{Fragment as c,useEffect as l,useId as u,useRef as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{COMMENT_REACTIONS as m,COMMENT_TEXT as h}from"@webority/ui-elements/elements/comment-thread";function g(n){let{comments:r=[],onPost:i,onReply:a,onEdit:o,onDelete:s,onReact:c,people:g,loadPeople:v,reactionChoices:y,readOnly:b=!1,label:x=h.listName,id:S,className:C=``,...w}=n;t(`AppCommentThread`,w);let T=u(),E=S||`comment-thread-${T.replace(/[^a-zA-Z0-9_-]/g,``)}`,D=d(null),O=typeof v==`function`,k=y?.length?y:m,A=d(null);return A.current={onPost:i,onReply:a,onEdit:o,onDelete:s,onReact:c,loadPeople:v},l(()=>{let e=D.current;if(e)return e.submit=async({intent:e,commentId:t,parentId:n,body:r,emoji:i})=>{let a=A.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}},[]),l(()=>{let e=D.current;!e||O||(e.people=g||[])},[g,O]),l(()=>{let e=D.current;if(!e||!O)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 A.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)},[O]),p(`wui-comment-thread`,{ref:D,id:E,class:C?`wui-comment-thread ${C}`:`wui-comment-thread`,controlled:``,"read-only":b?``:void 0,remote:O?``:void 0,"reaction-choices":y?.length?y.join(` `):void 0,...e(`AppCommentThread`,n),...w,children:[f(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:r.length?f(`ol`,{className:`wui-comment-list`,"aria-label":x,children:r.map(e=>f(_,{comment:e,topLevel:!0,readOnly:b},e.id))}):f(`p`,{className:`wui-comment-empty`,children:h.empty})}),!b&&f(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":h.pickerName,"data-wui-picker":``,hidden:!0,children:k.map(e=>f(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!b&&p(`div`,{className:`wui-comment-composer`,"data-wui-composer":``,children:[f(`wui-mention-input`,{id:`${E}-new`,class:`wui-mention-input`,label:h.composerLabel,placeholder:h.composerPlaceholder,rows:`3`,remote:O?``:void 0}),f(`div`,{className:`wui-comment-form-actions`,children:f(`button`,{type:`button`,className:`btn btn-primary btn-sm`,"data-wui-action":`post`,children:h.post})}),f(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]}),f(`span`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}function _({comment:e,topLevel:t=!1,readOnly:l}){let{id:u,author:d,at:m,value:g,edited:v,deleted:y,canEdit:b,canDelete:x,reactions:S=[],replies:C=[]}=e,w=d?.name||``,T=s(m),E=!l&&!y&&b,D=!l&&!y&&x;return p(`li`,{className:`wui-comment`,"data-wui-comment":u,"data-value":g??``,"data-wui-deleted":y?``:void 0,children:[p(`div`,{className:`wui-comment-row`,children:[p(`span`,{className:`avatar avatar-sm wui-comment-avatar`,"aria-hidden":`true`,children:[f(`span`,{className:`avatar-face`,children:r(w)||`?`}),d?.src&&f(`img`,{className:`avatar-img`,src:d.src,alt:``,onError:e=>{e.currentTarget.hidden=!0}})]}),p(`div`,{className:`wui-comment-main`,children:[p(`div`,{className:`wui-comment-head`,children:[f(`span`,{className:`wui-comment-author`,children:w}),f(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(T)?new Date(T).toISOString():void 0,children:a(m,{pattern:`datetime`})}),v&&!y&&f(`span`,{className:`wui-comment-edited`,children:h.edited})]}),y?f(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:h.deleted}):f(`div`,{className:`wui-comment-text`,"data-wui-text":``,children:i(g).map((e,t)=>`text`in e?f(c,{children:e.text},t):p(`span`,{className:`wui-mention`,"data-mention-id":e.id,children:[`@`,e.label]},t))}),E&&f(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),!y&&(S.length>0||!l)&&p(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":h.reactions,children:[S.map(e=>l?p(`span`,{className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,children:[f(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),f(`span`,{className:`wui-reaction-count`,children:o(e.count,{decimals:0})})]},e.emoji):p(`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:[f(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),f(`span`,{className:`wui-reaction-count`,children:o(e.count,{decimals:0})})]},e.emoji)),!l&&f(`button`,{type:`button`,className:`wui-reaction-add`,"data-wui-action":`react-menu`,"aria-label":h.addReaction,"aria-haspopup":`true`,"aria-expanded":`false`,children:f(n,{name:`emoji-smile`,size:16})})]}),!l&&!y&&(t||E||D)&&p(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[t&&f(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:h.reply}),E&&f(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:h.edit}),D&&f(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:h.delete})]}),D&&p(`div`,{className:`wui-comment-confirm`,"data-wui-confirm":``,hidden:!0,children:[f(`span`,{className:`wui-comment-confirm-text`,children:h.confirmDelete}),f(`button`,{type:`button`,className:`btn btn-danger btn-sm`,"data-wui-action":`confirm-delete`,children:h.delete}),f(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,"data-wui-action":`cancel-delete`,children:h.cancel})]}),!l&&f(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]})]}),t&&C.length>0&&f(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":h.repliesName(w),children:C.map(e=>f(_,{comment:e,readOnly:l},e.id))}),t&&!l&&!y&&f(`div`,{className:`wui-comment-reply`,"data-wui-reply":``,hidden:!0})]})}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"./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 p(p){let{open:m,title:h,message:g,confirmLabel:_=`Confirm`,cancelLabel:v=`Cancel`,danger:y=!1,tone:b,image:x,iconSize:S,confirmPhrase:C,onConfirm:w,onClose:T,loading:E=!1,staticBackdrop:D=!1,placement:O=`center`,size:k=`md`,className:A=``,...j}=p;n(`AppConfirmDialog`,j),t(`AppConfirmDialog`,`tone`,b,Object.keys(o)),t(`AppConfirmDialog`,`size`,typeof k==`string`?k:null,f);let[M,N]=c(``);if(s(()=>{m||N(``)},[m]),!m)return null;let P=!!C&&M.trim()!==C,F=x?null:o[b||(y?`delete`:`info`)],I=S>0?{"--wui-confirm-icon-size":`${S}px`}:void 0,L=()=>{E||T?.()};return u(i,{...e(`AppConfirmDialog`,p),...j,open:m,hideHeader:!0,title:h,onClose:L,staticBackdrop:D,placement:O,size:k,className:[`wui-confirm`,A].filter(Boolean).join(` `),footer:d(`div`,{className:`wui-confirm-actions`,children:[u(r,{variant:`secondary`,disabled:E,onClick:L,children:v}),u(r,{variant:y?`danger`:`primary`,disabled:P,loading:E,onClick:w,children:_})]}),children:d(`div`,{className:`wui-confirm-content`,children:[x?u(`span`,{className:`wui-confirm-icon`,style:I,children:u(`img`,{src:x,alt:``,"aria-hidden":`true`})}):F&&u(`span`,{className:`wui-confirm-icon`,style:I,children:u(F,{size:120})}),u(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:h}),g&&u(`p`,{className:`wui-confirm-msg`,children:g}),C&&u(a,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:d(l,{children:[`Type `,u(`strong`,{children:C}),` to confirm`]}),value:M,onChange:e=>N(e.target.value),"aria-label":`Type ${C} to confirm`,disabled:E})]})})}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"./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 p(p){let{open:m,title:h,message:g,confirmLabel:_=`Confirm`,cancelLabel:v=`Cancel`,danger:y=!1,tone:b,image:x,iconSize:S,confirmPhrase:C,onConfirm:w,onClose:T,loading:E=!1,staticBackdrop:D=!1,placement:O=`center`,size:k=`md`,className:A=``,children:j,...M}=p;n(`AppConfirmDialog`,M),t(`AppConfirmDialog`,`tone`,b,Object.keys(o)),t(`AppConfirmDialog`,`size`,typeof k==`string`?k:null,f);let[N,P]=c(``);if(s(()=>{m||P(``)},[m]),!m)return null;let F=!!C&&N.trim()!==C,I=x?null:o[b||(y?`delete`:`info`)],L=S>0?{"--wui-confirm-icon-size":`${S}px`}:void 0,R=()=>{E||T?.()};return u(i,{...e(`AppConfirmDialog`,p),...M,open:m,hideHeader:!0,title:h,onClose:R,staticBackdrop:D,placement:O,size:k,className:[`wui-confirm`,A].filter(Boolean).join(` `),footer:d(`div`,{className:`wui-confirm-actions`,children:[u(r,{variant:`secondary`,disabled:E,onClick:R,children:v}),u(r,{variant:y?`danger`:`primary`,disabled:F,loading:E,onClick:w,children:_})]}),children:d(`div`,{className:`wui-confirm-content`,children:[x?u(`span`,{className:`wui-confirm-icon`,style:L,children:u(`img`,{src:x,alt:``,"aria-hidden":`true`})}):I&&u(`span`,{className:`wui-confirm-icon`,style:L,children:u(I,{size:120})}),u(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:h}),g&&u(`p`,{className:`wui-confirm-msg`,children:g}),j!=null&&j!==!1&&u(`div`,{className:`wui-confirm-body`,children:j}),C&&u(a,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:d(l,{children:[`Type `,u(`strong`,{children:C}),` to confirm`]}),value:N,onChange:e=>P(e.target.value),"aria-label":`Type ${C} to confirm`,disabled:E})]})})}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"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./AppIcon.js";import{AppSkeletonRows as a}from"./AppSkeleton.js";import o from"./AppTablePagination.js";import{attachRowDrag as s,attachScrollEdges as c,syncTargets as ee}from"@webority/ui-elements/helpers";import{Children as l,Fragment as te,useEffect as u,useLayoutEffect as d,useMemo as ne,useRef as f,useState as p}from"react";import{Fragment as re,jsx as m,jsxs as h}from"react/jsx-runtime";import{COLUMN_MAX_WIDTH as ie,COLUMN_MIN_WIDTH as ae,DATA_TABLE_TEXT as oe,PIN_AT_VAR as se,PIN_SIDES as ce,ROW_HEIGHTS as le,ROW_MOVE_LIMIT as ue,ROW_SAVE_ERROR_CLASS as de,groupCount as fe,groupItems as pe,measureRows as me,pinAtValue as he,pinClasses as ge,planPins as _e,playRowMoves as ve,rowOrderChanged as ye,saveOutcomeText as be,settledRows as xe,virtualRange as Se}from"@webority/ui-elements/elements/data-table";var Ce=[`comfortable`,`cozy`,`compact`],we=[`auto`,`fixed`],g=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},_=new Set;function v(e,n){_.has(e)||!g()||(_.add(e),t(`[@webority/ui-react] <AppDataTable> ${n}`))}var Te=100,Ee=e=>e.id,De=(e,t,n)=>{let r=!!t?.(e),i=r?``:n?.(e)||``;return{state:r?`saving`:i?`error`:null,message:i}};function Oe(e){return e===`end`?`wui-cell-end`:e===`num`?`num`:e===`center`?`text-center`:``}function ke(e){return e==null||e===``?`-`:Array.isArray(e)?l.toArray(e):typeof e==`boolean`?String(e):e}function Ae(e){if(!e||!(e.total>0))return!1;let t=e.pageSizes?.length?e.pageSizes:[e.pageSize];return e.total>Math.min(...t)}function y(t){let{columns:l,rows:g,rowKey:_=Ee,sort:y,onSort:je,loading:b=!1,skeletonRows:Me=5,empty:Ne=`No records found.`,emptyFiltered:Pe,sourceCount:Fe,rowActions:x,rowActionsLabel:Ie,pagination:S,ariaLabel:Le,className:Re=``,wrapperClassName:ze=``,selectable:C=!1,selectedIds:w,isRowSelectable:T,onToggleRow:E,onToggleAll:Be,onSelectRange:Ve,renderExpanded:He,density:D=`comfortable`,tableLayout:Ue=`auto`,striped:We=!1,flush:Ge=!1,rowDrag:O=!1,maxHeight:k,stickyFirstColumn:Ke=!1,stickyActions:qe=!1,stackOnMobile:A=!1,hiddenColumns:Je,rowStatus:Ye,rowHref:j,onRowClick:Xe,activeRowKey:Ze,resizableColumns:M=!1,viewKey:Qe,groupBy:N,groupLabel:$e,virtual:P=!1,rowSaving:F,rowSaveError:I,...et}=t;r(`AppDataTable`,et);let tt=Je?.length?new Set(Je):null;l=tt?l.filter(e=>!(e.hideable&&tt.has(e.key))):l,n(`AppDataTable`,`density`,D,Ce),n(`AppDataTable`,`tableLayout`,Ue,we);for(let e of l)n(`AppDataTable`,`column.pin`,e.pin,ce);let nt=[`table table-ledger`,D===`cozy`||D===`compact`?`wui-table-${D}`:``,We?`wui-table-striped`:``,Ke?`wui-table-sticky-first`:``,qe?`wui-table-sticky-actions`:``,A?`wui-table-stack`:``,Re].filter(Boolean).join(` `),L=typeof He==`function`,[rt,it]=p(()=>new Set),at=e=>it(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),ot=l.some(e=>typeof e.footer==`function`),R=typeof j==`function`||typeof Xe==`function`,st=e=>!!e.target.closest(`a, button, input, select, textarea, label, [role='menu'], [role='menuitem'], .dropdown`),ct=(e,t)=>{if(st(t)||(Xe&&Xe(e),!j))return;let n=j(e);n&&(t.ctrlKey||t.metaKey||t.button===1?window.open(n,`_blank`,`noopener`):window.location.assign(n))},z=k!==void 0,lt=[`table-wrap`,z?`wui-table-scroll`:``,Ge?`wui-table-flush`:``,ze].filter(Boolean).join(` `),ut=z?{maxHeight:k}:void 0,B=Math.max(1,l.length+ +!!x+ +!!C+ +!!L),dt=l.some(e=>e.pin===`start`||e.pin===`end`),V=dt||M||!!N||P,H=+!!L+ +!!C,ft=dt?_e([...L?[`lead`]:[],...C?[`lead`]:[],...l.map(e=>e.pin===`start`||e.pin===`end`?e.pin:null),...x?[null]:[]]):[],U=(e,t=``)=>{let n=ft[e];return n?{className:`${t.trim()} ${ge(n)}`.trim(),style:{[se]:he(n.side,n.ordinal)}}:{className:t,style:void 0}},pt=(e,t)=>ft[e]?{...t,...U(e).style}:t,mt=l.length-1+ +!!x;Qe&&!M&&v(`view-key`,"`viewKey` remembers resized widths: add `resizableColumns`."),P&&!z&&v(`virtual-height`,"`virtual` needs `maxHeight`: without a scroll box every row renders."),P&&(L||A)&&v(`virtual-shape`,"`virtual` takes rows of one height, so it is off with `renderExpanded` or `stackOnMobile`."),!P&&g?.length>500&&v(`rows-without-virtual`,`renders more than 500 rows without virtual: add virtual with maxHeight, or page the data.`);let W=P&&z&&!L&&!A&&!b&&g?.length>0,G=(e,t)=>!T||!!T(e,t),ht=C&&g?g.reduce((e,t,n)=>e+ +!!G(t,n),0):0,K=C&&g?g.reduce((e,t,n)=>e+(G(t,n)&&w?.has(_(t,n))?1:0),0):0,gt=ht>0&&K===ht,_t=K>0&&!gt,vt=e=>{e&&(e.indeterminate=_t)},yt=f(null),bt=(e,t)=>{let n=yt.current;yt.current=e;let r=t&&n!==null?g.findIndex((e,t)=>_(e,t)===n):-1,i=g.findIndex((t,n)=>_(t,n)===e);if(r<0||i<0||r===i){E?.(e);return}let a=!w?.has(e),o=Math.min(r,i),s=g.slice(o,Math.max(r,i)+1).map((e,t)=>[e,o+t]).filter(([e,t])=>G(e,t)).map(([e,t])=>_(e,t)).filter(e=>(w?.has(e)||!1)!==a);if(Ve)Ve(s,a);else for(let e of s)E?.(e)},xt=e=>{if(!T){Be?.(e);return}(g||[]).forEach((t,n)=>{let r=_(t,n);G(t,n)&&(w?.has(r)||!1)!==e&&E?.(r)})},[St,Ct]=p(()=>new Set),wt=e=>Ct(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),q=ne(()=>{let e=(g||[]).map((e,t)=>({row:e,i:t}));return N?pe(e,({row:e})=>String(e[N]??``)).flatMap(e=>[{group:e,open:!St.has(e.key)},...St.has(e.key)?[]:e.items]):e},[g,N,St]),J=f(null),Tt=f(null);u(()=>{let e=J.current;if(!e)return;let t=e=>{let t=e.target.closest?.(`.u-name`);t&&!t.title&&(t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight)&&(t.title=t.textContent.trim())},n=e=>{let t=e.target.closest?.(`tbody > tr[aria-rowindex]`)?.getAttribute(`aria-rowindex`);Tt.current=t?Number(t)-2:null},r=t=>{e.contains(t.relatedTarget)||(Tt.current=null)};e.addEventListener(`mouseover`,t),e.addEventListener(`focusin`,t),e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,r);let i=c(e);return()=>{e.removeEventListener(`mouseover`,t),e.removeEventListener(`focusin`,t),e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,r),i()}},[V]),u(()=>{if(!O||!J.current)return;let e=s(J.current);return ee(document),e},[O,V]);let Et=f(!1);u(()=>{!Et.current&&(Et.current=!0,K===0)||J.current?.querySelector(`table`)?.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:{selected:K,total:g?.length??0,keys:g?g.flatMap((e,t)=>{let n=_(e,t);return G(e,t)&&w?.has(n)?[String(n)]:[]}):[]}}))},[C,K]);let[Dt,Ot]=p({top:0,height:0}),[Y,kt]=p(le[D]??le.comfortable);u(()=>{let e=J.current;if(!W||!e)return;let t=0,n=()=>{t=0;let n=e.querySelector(`:scope > table > thead`)?.getBoundingClientRect().height||0,r={top:Math.max(0,e.scrollTop-n),height:e.clientHeight};Ot(e=>e.top===r.top&&e.height===r.height?e:r)},r=()=>{t||=requestAnimationFrame(n)};e.addEventListener(`scroll`,r,{passive:!0});let i=typeof ResizeObserver<`u`?new ResizeObserver(r):null;return i?.observe(e),n(),()=>{e.removeEventListener(`scroll`,r),i?.disconnect(),t&&cancelAnimationFrame(t)}},[W,V]),d(()=>{if(!W)return;let e=(J.current?.querySelector(`:scope > table > tbody > tr:not(.wui-virtual-spacer, .wui-group-row)`))?.getBoundingClientRect().height;e>0&&Math.abs(e-Y)>.5&&kt(e)},[D,g?.length,P,W]);let X={start:0,end:q.length,before:0,after:0};if(W){X=Se({scrollTop:Dt.top,viewport:Dt.height||Number.parseFloat(k)||0,rowHeight:Y,count:q.length});let e=Tt.current;e!==null&&e>=0&&e<q.length&&(e<X.start&&X.start-e<=Te&&(X={...X,start:e,before:e*Y}),e>=X.end&&e-X.end<Te&&(X={...X,end:e+1,after:(q.length-e-1)*Y}))}let At=f(null),Z=f(null),jt=f(null),Mt=!P&&!b&&g?.length>0&&g.length<=ue;d(()=>{let e=At.current;if(!Mt||!e){Z.current=null,jt.current=null;return}let t=g.map((e,t)=>_(e,t));ye(jt.current,t)&&ve(e.rows,Z.current),Z.current=me(e.rows),jt.current=t});let Nt=typeof F==`function`||typeof I==`function`,Pt=f(null),Ft=f(null);u(()=>{if(!Nt){Ft.current=null;return}let e=l[0]?.key,t=new Map;(g||[]).forEach((n,r)=>{let i=e===void 0?void 0:n[e],a=typeof i==`string`||typeof i==`number`?String(i):``;t.set(_(n,r),{...De(n,F,I),label:a})});let n=be(xe(Ft.current,t));Ft.current=t,n&&Pt.current&&(Pt.current.textContent=n)},[g,F,I,_]);let It=Pe!==void 0&&(Fe===void 0||Fe>0)?Pe:Ne,Lt=({group:e,open:t},n)=>{let r=e.items[0].row[N],a=e.items.map(e=>e.row);return m(`tr`,{className:`wui-group-row`,"data-group-key":e.key,"aria-rowindex":W?n+2:void 0,children:m(`th`,{className:`wui-group-cell`,scope:`rowgroup`,colSpan:B,children:h(`button`,{type:`button`,className:`wui-group-toggle`,"aria-expanded":t,onClick:()=>wt(e.key),children:[m(i,{name:`chevron-down`,size:16}),m(`span`,{className:`wui-group-label`,children:$e?$e(r,a):ke(r)}),m(`span`,{className:`wui-group-count`,"aria-hidden":`true`,children:fe(e.items.length)}),m(`span`,{className:`visually-hidden wui-group-rows`,children:`, ${oe.rows(e.items.length)}`})]})})},`group:${e.key}`)},Rt=({row:e,i:t},n)=>{let r=_(e,t),a=L&&rt.has(r),o=Ze!=null&&String(Ze)===String(r),s=String(r).replace(/[^a-z0-9]/gi,`_`),c=U(0,`wui-expand-cell`),ee=U(+!!L,`wui-select-cell`),u=Nt?De(e,F,I):null,d=G(e,t);return h(te,{children:[h(`tr`,{className:[C&&d&&w?.has(r)?`is-selected`:``,R?`wui-row-link`:``,o?`wui-row-active`:``].filter(Boolean).join(` `)||void 0,"aria-current":o?`true`:void 0,"aria-rowindex":W?n+2:void 0,"aria-busy":u?.state===`saving`?`true`:void 0,"data-wui-save-state":u?.state||void 0,"data-status":Ye?.(e)||void 0,"data-href":j?.(e)||void 0,"data-row-key":O?String(r):void 0,tabIndex:R?0:void 0,onClick:R?t=>ct(e,t):void 0,onAuxClick:R&&j?t=>t.button===1&&ct(e,t):void 0,onKeyDown:R?t=>{t.key===`Enter`&&t.target===t.currentTarget&&ct(e,t)}:void 0,children:[L&&m(`td`,{className:c.className,style:c.style,children:m(`button`,{type:`button`,className:`wui-expand-toggle${a?` is-open`:``}`,"aria-expanded":a,"aria-controls":a?`${s}-expanded`:void 0,"aria-label":a?`Collapse row`:`Expand row`,onClick:()=>at(r),children:m(i,{name:`chevron-down`,size:16})})}),C&&m(`td`,{className:ee.className,style:ee.style,children:m(`input`,{type:`checkbox`,className:`wui-check`,checked:d&&(w?.has(r)||!1),disabled:!d,onChange:e=>bt(r,e.nativeEvent.shiftKey),onMouseDown:e=>{e.shiftKey&&e.preventDefault()},"aria-label":`Select row`})}),l.map((t,n)=>h(`td`,{className:U(H+n,(n===0?`wui-name-cell `:``)+(t.nowrap?`text-nowrap `:``)+Oe(t.align)+(t.cellClassName?` ${t.cellClassName}`:``)).className,style:pt(H+n,t.cellStyle),"data-label":A&&typeof t.label==`string`?t.label:void 0,children:[t.render?t.render(e):ke(e[t.key]),n===0&&u?.state===`error`&&m(`span`,{className:de,children:u.message})]},t.key)),x&&m(`td`,{children:m(`div`,{className:`u-row-actions`,children:x(e)})})]}),a&&m(`tr`,{className:`wui-row-expanded`,children:m(`td`,{id:`${s}-expanded`,colSpan:B,children:He(e)})})]},r)},zt=(e,t)=>e.group?Lt(e,t):Rt(e,t),Bt=(e,t)=>W?m(`tr`,{className:`wui-virtual-spacer`,"aria-hidden":`true`,hidden:t===0,children:m(`td`,{colSpan:B,style:{height:t}})},e):null,Q=U(0,`wui-expand-cell`),$=U(+!!L,`wui-select-cell`);return h(re,{children:[h(V?`wui-data-table`:`div`,{ref:J,...V?{class:lt,resizable:M?``:void 0,"view-key":Qe||void 0,"data-wui-row-drag":O?``:void 0}:{className:lt,"data-wui-row-drag":O?``:void 0},style:ut,tabIndex:0,...e(`AppDataTable`,t),...et,children:[h(`table`,{className:nt,"aria-label":Le,"aria-rowcount":W?q.length+1:void 0,style:Ue===`fixed`?{tableLayout:`fixed`}:void 0,children:[m(`thead`,{children:h(`tr`,{"aria-rowindex":W?1:void 0,children:[L&&m(`th`,{className:Q.className,style:Q.style,children:m(`span`,{className:`visually-hidden`,children:`Expand`})}),C&&m(`th`,{className:$.className,style:$.style,children:m(`input`,{ref:vt,type:`checkbox`,className:`wui-check`,checked:gt,onChange:e=>xt(e.target.checked),"aria-label":`Select all rows`})}),l.map((e,t)=>{let n=!!(e.sortable&&je),r=y&&y.key===e.key,a=e.align===`num`||e.align===`end`,o=n&&m(`span`,{className:`sort-icon${a?` wui-sort-lead`:``}`,children:m(i,{name:`chevrons-up-down`,size:14})}),s=M&&t!==mt,c=e.width||e.minWidth?{width:e.width,minWidth:e.minWidth}:void 0;return h(`th`,{className:U(H+t,(n?`sortable `:``)+(t===0?`wui-name-cell `:``)+(e.nowrap?`text-nowrap `:``)+(e.grow?`wui-col-grow `:``)+(s?`wui-col-resizable `:``)+Oe(e.align)).className,style:pt(H+t,c),"data-key":V?e.key:void 0,"aria-label":s&&typeof e.label==`string`?e.label:void 0,"data-pin":e.pin===`start`||e.pin===`end`?e.pin:void 0,tabIndex:n?0:void 0,"aria-sort":r?y.dir===`asc`?`ascending`:`descending`:n?`none`:void 0,onClick:n?()=>je(e.key):void 0,onKeyDown:n?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),je(e.key))}:void 0,children:[a&&o,e.label,!a&&o,s&&m(`span`,{className:`wui-col-resize`,role:`separator`,"aria-orientation":`vertical`,"aria-valuemin":ae,"aria-valuemax":ie,tabIndex:0,"aria-label":oe.resize(typeof e.label==`string`?e.label:e.key)})]},e.key)}),x&&(Ie?m(`th`,{className:`wui-cell-end`,children:Ie}):m(`th`,{className:`wui-cell-end`,children:m(`span`,{className:`visually-hidden`,children:`Actions`})}))]})}),m(`tbody`,{ref:At,children:b?m(a,{rows:Me,cols:B}):g?.length?h(re,{children:[Bt(`before`,X.before),q.slice(X.start,X.end).map((e,t)=>zt(e,X.start+t)),Bt(`after`,X.after)]}):null}),ot&&!b&&g?.length>0&&m(`tfoot`,{children:h(`tr`,{children:[L&&m(`td`,{className:Q.className,style:Q.style}),C&&m(`td`,{className:$.className,style:$.style}),l.map((e,t)=>m(`td`,{className:U(H+t,(t===0?`wui-name-cell `:``)+(e.nowrap?`text-nowrap `:``)+Oe(e.align)).className,style:pt(H+t,void 0),children:e.footer?e.footer(g):null},e.key)),x&&m(`td`,{})]})})]}),!b&&!g?.length&&m(`div`,{className:`tbl-empty-block`,children:typeof It==`string`?m(`div`,{className:`tbl-empty-plain`,children:It}):It})]}),Ae(S)&&m(o,{page:S.page,totalPages:S.totalPages,pageSize:S.pageSize,onPageChange:S.setPage,onPageSizeChange:S.setPageSize,pageSizes:S.pageSizes,mode:S.mode}),Nt&&m(`div`,{ref:Pt,className:`visually-hidden`,role:`status`,"aria-live":`polite`,"data-wui-table-status":``})]})}export{y as default};
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{AppSkeletonRows as a}from"./AppSkeleton.js";import o from"./AppTablePagination.js";import{attachRowDrag as s,attachScrollEdges as c,syncTargets as l}from"@webority/ui-elements/helpers";import{Children as u,Fragment as ee,useEffect as d,useLayoutEffect as f,useMemo as te,useRef as p,useState as m}from"react";import{Fragment as ne,jsx as h,jsxs as g}from"react/jsx-runtime";import{COLUMN_MAX_WIDTH as re,COLUMN_MIN_WIDTH as ie,DATA_TABLE_TEXT as ae,PIN_AT_VAR as oe,PIN_SIDES as se,ROW_HEIGHTS as ce,ROW_MOVE_LIMIT as le,ROW_SAVE_ERROR_CLASS as ue,groupCount as de,groupItems as fe,measureRows as pe,pinAtValue as me,pinClasses as he,planPins as ge,playRowMoves as _e,rowOrderChanged as ve,saveOutcomeText as ye,settledRows as be,virtualRange as xe}from"@webority/ui-elements/elements/data-table";var Se=[`comfortable`,`cozy`,`compact`],Ce=[`auto`,`fixed`],_=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},v=new Set;function y(e,n){v.has(e)||!_()||(v.add(e),t(`[@webority/ui-react] <AppDataTable> ${n}`))}var we=100,Te=e=>e.id,Ee=(e,t,n)=>{let r=!!t?.(e),i=r?``:n?.(e)||``;return{state:r?`saving`:i?`error`:null,message:i}};function b(e){return e===`end`?`wui-cell-end`:e===`num`?`num`:e===`center`?`text-center`:``}function De(e){return e==null||e===``?`-`:Array.isArray(e)?u.toArray(e):typeof e==`boolean`?String(e):e}function Oe(e){if(!e||!(e.total>0))return!1;let t=e.pageSizes?.length?e.pageSizes:[e.pageSize];return e.total>Math.min(...t)}function x(t){let{columns:u,rows:_,rowKey:v=Te,sort:x,onSort:S,loading:C=!1,skeletonRows:ke=5,empty:Ae=`No records found.`,emptyFiltered:je,sourceCount:Me,rowActions:w,rowActionsLabel:Ne,pagination:T,ariaLabel:Pe,className:Fe=``,wrapperClassName:Ie=``,selectable:E=!1,selectedIds:D,isRowSelectable:O,onToggleRow:Le,onToggleAll:Re,onSelectRange:ze,renderExpanded:Be,density:k=`comfortable`,tableLayout:Ve=`auto`,striped:He=!1,flush:Ue=!1,pad:We,headerTone:Ge,rowDrag:A=!1,maxHeight:Ke,stickyFirstColumn:qe=!1,stickyActions:Je=!1,stackOnMobile:j=!1,hiddenColumns:Ye,rowStatus:Xe,rowHref:M,onRowClick:Ze,activeRowKey:Qe,resizableColumns:N=!1,viewKey:$e,groupBy:P,groupLabel:et,virtual:F=!1,rowSaving:I,rowSaveError:L,...tt}=t;r(`AppDataTable`,tt);let{style:nt,...rt}=tt,it=Ye?.length?new Set(Ye):null;u=it?u.filter(e=>!(e.hideable&&it.has(e.key))):u,n(`AppDataTable`,`density`,k,Se),n(`AppDataTable`,`tableLayout`,Ve,Ce);for(let e of u)n(`AppDataTable`,`column.pin`,e.pin,se);let at=[`table table-ledger`,k===`cozy`||k===`compact`?`wui-table-${k}`:``,He?`wui-table-striped`:``,qe?`wui-table-sticky-first`:``,Je?`wui-table-sticky-actions`:``,j?`wui-table-stack`:``,Fe].filter(Boolean).join(` `),R=typeof Be==`function`,[ot,st]=m(()=>new Set),ct=e=>st(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),lt=u.some(e=>typeof e.footer==`function`),z=typeof M==`function`||typeof Ze==`function`,ut=e=>!!e.target.closest(`a, button, input, select, textarea, label, [role='menu'], [role='menuitem'], .dropdown`),dt=(e,t)=>{if(ut(t)||(Ze&&Ze(e),!M))return;let n=M(e);n&&(t.ctrlKey||t.metaKey||t.button===1?window.open(n,`_blank`,`noopener`):window.location.assign(n))},B=Ke!==void 0,ft=[`table-wrap`,B?`wui-table-scroll`:``,Ue?`wui-table-flush`:``,Ie].filter(Boolean).join(` `),pt={maxHeight:B?Ke:void 0,"--wui-table-pad":We!=null&&!Ue?`${We}px`:void 0,"--wui-table-header-bg":Ge??void 0},mt=Object.values(pt).some(e=>e!==void 0)||nt!==void 0?{...pt,...nt}:void 0,V=Math.max(1,u.length+ +!!w+ +!!E+ +!!R),ht=u.some(e=>e.pin===`start`||e.pin===`end`),H=ht||N||!!P||F,U=+!!R+ +!!E,gt=ht?ge([...R?[`lead`]:[],...E?[`lead`]:[],...u.map(e=>e.pin===`start`||e.pin===`end`?e.pin:null),...w?[null]:[]]):[],W=(e,t=``)=>{let n=gt[e];return n?{className:`${t.trim()} ${he(n)}`.trim(),style:{[oe]:me(n.side,n.ordinal)}}:{className:t,style:void 0}},_t=(e,t)=>gt[e]?{...t,...W(e).style}:t,vt=u.length-1+ +!!w;$e&&!N&&y(`view-key`,"`viewKey` remembers resized widths: add `resizableColumns`."),F&&!B&&y(`virtual-height`,"`virtual` needs `maxHeight`: without a scroll box every row renders."),F&&(R||j)&&y(`virtual-shape`,"`virtual` takes rows of one height, so it is off with `renderExpanded` or `stackOnMobile`."),!F&&_?.length>500&&y(`rows-without-virtual`,`renders more than 500 rows without virtual: add virtual with maxHeight, or page the data.`);let G=F&&B&&!R&&!j&&!C&&_?.length>0,K=(e,t)=>!O||!!O(e,t),yt=E&&_?_.reduce((e,t,n)=>e+ +!!K(t,n),0):0,q=E&&_?_.reduce((e,t,n)=>e+(K(t,n)&&D?.has(v(t,n))?1:0),0):0,bt=yt>0&&q===yt,xt=q>0&&!bt,St=e=>{e&&(e.indeterminate=xt)},Ct=p(null),wt=(e,t)=>{let n=Ct.current;Ct.current=e;let r=t&&n!==null?_.findIndex((e,t)=>v(e,t)===n):-1,i=_.findIndex((t,n)=>v(t,n)===e);if(r<0||i<0||r===i){Le?.(e);return}let a=!D?.has(e),o=Math.min(r,i),s=_.slice(o,Math.max(r,i)+1).map((e,t)=>[e,o+t]).filter(([e,t])=>K(e,t)).map(([e,t])=>v(e,t)).filter(e=>(D?.has(e)||!1)!==a);if(ze)ze(s,a);else for(let e of s)Le?.(e)},Tt=e=>{if(!O){Re?.(e);return}(_||[]).forEach((t,n)=>{let r=v(t,n);K(t,n)&&(D?.has(r)||!1)!==e&&Le?.(r)})},[Et,Dt]=m(()=>new Set),Ot=e=>Dt(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),J=te(()=>{let e=(_||[]).map((e,t)=>({row:e,i:t}));return P?fe(e,({row:e})=>String(e[P]??``)).flatMap(e=>[{group:e,open:!Et.has(e.key)},...Et.has(e.key)?[]:e.items]):e},[_,P,Et]),Y=p(null),kt=p(null);d(()=>{let e=Y.current;if(!e)return;let t=e=>{let t=e.target.closest?.(`.u-name`);t&&!t.title&&(t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight)&&(t.title=t.textContent.trim())},n=e=>{let t=e.target.closest?.(`tbody > tr[aria-rowindex]`)?.getAttribute(`aria-rowindex`);kt.current=t?Number(t)-2:null},r=t=>{e.contains(t.relatedTarget)||(kt.current=null)};e.addEventListener(`mouseover`,t),e.addEventListener(`focusin`,t),e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,r);let i=c(e);return()=>{e.removeEventListener(`mouseover`,t),e.removeEventListener(`focusin`,t),e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,r),i()}},[H]),d(()=>{if(!A||!Y.current)return;let e=s(Y.current);return l(document),e},[A,H]);let At=p(!1);d(()=>{!At.current&&(At.current=!0,q===0)||Y.current?.querySelector(`table`)?.dispatchEvent(new CustomEvent(`selectionchange`,{bubbles:!0,detail:{selected:q,total:_?.length??0,keys:_?_.flatMap((e,t)=>{let n=v(e,t);return K(e,t)&&D?.has(n)?[String(n)]:[]}):[]}}))},[E,q]);let[jt,Mt]=m({top:0,height:0}),[X,Nt]=m(ce[k]??ce.comfortable);d(()=>{let e=Y.current;if(!G||!e)return;let t=0,n=()=>{t=0;let n=e.querySelector(`:scope > table > thead`)?.getBoundingClientRect().height||0,r={top:Math.max(0,e.scrollTop-n),height:e.clientHeight};Mt(e=>e.top===r.top&&e.height===r.height?e:r)},r=()=>{t||=requestAnimationFrame(n)};e.addEventListener(`scroll`,r,{passive:!0});let i=typeof ResizeObserver<`u`?new ResizeObserver(r):null;return i?.observe(e),n(),()=>{e.removeEventListener(`scroll`,r),i?.disconnect(),t&&cancelAnimationFrame(t)}},[G,H]),f(()=>{if(!G)return;let e=(Y.current?.querySelector(`:scope > table > tbody > tr:not(.wui-virtual-spacer, .wui-group-row)`))?.getBoundingClientRect().height;e>0&&Math.abs(e-X)>.5&&Nt(e)},[k,_?.length,F,G]);let Z={start:0,end:J.length,before:0,after:0};if(G){Z=xe({scrollTop:jt.top,viewport:jt.height||Number.parseFloat(Ke)||0,rowHeight:X,count:J.length});let e=kt.current;e!==null&&e>=0&&e<J.length&&(e<Z.start&&Z.start-e<=we&&(Z={...Z,start:e,before:e*X}),e>=Z.end&&e-Z.end<we&&(Z={...Z,end:e+1,after:(J.length-e-1)*X}))}let Pt=p(null),Ft=p(null),It=p(null),Lt=!F&&!C&&_?.length>0&&_.length<=le;f(()=>{let e=Pt.current;if(!Lt||!e){Ft.current=null,It.current=null;return}let t=_.map((e,t)=>v(e,t));ve(It.current,t)&&_e(e.rows,Ft.current),Ft.current=pe(e.rows),It.current=t});let Rt=typeof I==`function`||typeof L==`function`,zt=p(null),Bt=p(null);d(()=>{if(!Rt){Bt.current=null;return}let e=u[0]?.key,t=new Map;(_||[]).forEach((n,r)=>{let i=e===void 0?void 0:n[e],a=typeof i==`string`||typeof i==`number`?String(i):``;t.set(v(n,r),{...Ee(n,I,L),label:a})});let n=ye(be(Bt.current,t));Bt.current=t,n&&zt.current&&(zt.current.textContent=n)},[_,I,L,v]);let Vt=je!==void 0&&(Me===void 0||Me>0)?je:Ae,Ht=({group:e,open:t},n)=>{let r=e.items[0].row[P],a=e.items.map(e=>e.row);return h(`tr`,{className:`wui-group-row`,"data-group-key":e.key,"aria-rowindex":G?n+2:void 0,children:h(`th`,{className:`wui-group-cell`,scope:`rowgroup`,colSpan:V,children:g(`button`,{type:`button`,className:`wui-group-toggle`,"aria-expanded":t,onClick:()=>Ot(e.key),children:[h(i,{name:`chevron-down`,size:16}),h(`span`,{className:`wui-group-label`,children:et?et(r,a):De(r)}),h(`span`,{className:`wui-group-count`,"aria-hidden":`true`,children:de(e.items.length)}),h(`span`,{className:`visually-hidden wui-group-rows`,children:`, ${ae.rows(e.items.length)}`})]})})},`group:${e.key}`)},Ut=({row:e,i:t},n)=>{let r=v(e,t),a=R&&ot.has(r),o=Qe!=null&&String(Qe)===String(r),s=String(r).replace(/[^a-z0-9]/gi,`_`),c=W(0,`wui-expand-cell`),l=W(+!!R,`wui-select-cell`),d=Rt?Ee(e,I,L):null,f=K(e,t);return g(ee,{children:[g(`tr`,{className:[E&&f&&D?.has(r)?`is-selected`:``,z?`wui-row-link`:``,o?`wui-row-active`:``].filter(Boolean).join(` `)||void 0,"aria-current":o?`true`:void 0,"aria-rowindex":G?n+2:void 0,"aria-busy":d?.state===`saving`?`true`:void 0,"data-wui-save-state":d?.state||void 0,"data-status":Xe?.(e)||void 0,"data-href":M?.(e)||void 0,"data-row-key":A?String(r):void 0,tabIndex:z?0:void 0,onClick:z?t=>dt(e,t):void 0,onAuxClick:z&&M?t=>t.button===1&&dt(e,t):void 0,onKeyDown:z?t=>{t.key===`Enter`&&t.target===t.currentTarget&&dt(e,t)}:void 0,children:[R&&h(`td`,{className:c.className,style:c.style,children:h(`button`,{type:`button`,className:`wui-expand-toggle${a?` is-open`:``}`,"aria-expanded":a,"aria-controls":a?`${s}-expanded`:void 0,"aria-label":a?`Collapse row`:`Expand row`,onClick:()=>ct(r),children:h(i,{name:`chevron-down`,size:16})})}),E&&h(`td`,{className:l.className,style:l.style,children:h(`input`,{type:`checkbox`,className:`wui-check`,checked:f&&(D?.has(r)||!1),disabled:!f,onChange:e=>wt(r,e.nativeEvent.shiftKey),onMouseDown:e=>{e.shiftKey&&e.preventDefault()},"aria-label":`Select row`})}),u.map((t,n)=>g(`td`,{className:W(U+n,(n===0?`wui-name-cell `:``)+(t.nowrap?`text-nowrap `:``)+b(t.align)+(t.cellClassName?` ${t.cellClassName}`:``)).className,style:_t(U+n,t.cellStyle),"data-label":j&&typeof t.label==`string`?t.label:void 0,children:[t.render?t.render(e):De(e[t.key]),n===0&&d?.state===`error`&&h(`span`,{className:ue,children:d.message})]},t.key)),w&&h(`td`,{children:h(`div`,{className:`u-row-actions`,children:w(e)})})]}),a&&h(`tr`,{className:`wui-row-expanded`,children:h(`td`,{id:`${s}-expanded`,colSpan:V,children:Be(e)})})]},r)},Wt=(e,t)=>e.group?Ht(e,t):Ut(e,t),Gt=(e,t)=>G?h(`tr`,{className:`wui-virtual-spacer`,"aria-hidden":`true`,hidden:t===0,children:h(`td`,{colSpan:V,style:{height:t}})},e):null,Q=W(0,`wui-expand-cell`),$=W(+!!R,`wui-select-cell`);return g(ne,{children:[g(H?`wui-data-table`:`div`,{ref:Y,...H?{class:ft,resizable:N?``:void 0,"view-key":$e||void 0,"data-wui-row-drag":A?``:void 0}:{className:ft,"data-wui-row-drag":A?``:void 0},style:mt,tabIndex:0,...e(`AppDataTable`,t),...rt,children:[g(`table`,{className:at,"aria-label":Pe,"aria-rowcount":G?J.length+1:void 0,style:Ve===`fixed`?{tableLayout:`fixed`}:void 0,children:[h(`thead`,{children:g(`tr`,{"aria-rowindex":G?1:void 0,children:[R&&h(`th`,{className:Q.className,style:Q.style,children:h(`span`,{className:`visually-hidden`,children:`Expand`})}),E&&h(`th`,{className:$.className,style:$.style,children:h(`input`,{ref:St,type:`checkbox`,className:`wui-check`,checked:bt,onChange:e=>Tt(e.target.checked),"aria-label":`Select all rows`})}),u.map((e,t)=>{let n=!!(e.sortable&&S),r=x&&x.key===e.key,a=e.align===`num`||e.align===`end`,o=n&&h(`span`,{className:`sort-icon${a?` wui-sort-lead`:``}`,children:h(i,{name:`chevrons-up-down`,size:14})}),s=N&&t!==vt,c=e.width||e.minWidth?{width:e.width,minWidth:e.minWidth}:void 0;return g(`th`,{className:W(U+t,(n?`sortable `:``)+(t===0?`wui-name-cell `:``)+(e.nowrap?`text-nowrap `:``)+(e.grow?`wui-col-grow `:``)+(s?`wui-col-resizable `:``)+b(e.align)).className,style:_t(U+t,c),"data-key":H?e.key:void 0,"aria-label":s&&typeof e.label==`string`?e.label:void 0,"data-pin":e.pin===`start`||e.pin===`end`?e.pin:void 0,tabIndex:n?0:void 0,"aria-sort":r?x.dir===`asc`?`ascending`:`descending`:n?`none`:void 0,onClick:n?()=>S(e.key):void 0,onKeyDown:n?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),S(e.key))}:void 0,children:[a&&o,e.label,!a&&o,s&&h(`span`,{className:`wui-col-resize`,role:`separator`,"aria-orientation":`vertical`,"aria-valuemin":ie,"aria-valuemax":re,tabIndex:0,"aria-label":ae.resize(typeof e.label==`string`?e.label:e.key)})]},e.key)}),w&&(Ne?h(`th`,{className:`wui-cell-end`,children:Ne}):h(`th`,{className:`wui-cell-end`,children:h(`span`,{className:`visually-hidden`,children:`Actions`})}))]})}),h(`tbody`,{ref:Pt,children:C?h(a,{rows:ke,cols:V}):_?.length?g(ne,{children:[Gt(`before`,Z.before),J.slice(Z.start,Z.end).map((e,t)=>Wt(e,Z.start+t)),Gt(`after`,Z.after)]}):null}),lt&&!C&&_?.length>0&&h(`tfoot`,{children:g(`tr`,{children:[R&&h(`td`,{className:Q.className,style:Q.style}),E&&h(`td`,{className:$.className,style:$.style}),u.map((e,t)=>h(`td`,{className:W(U+t,(t===0?`wui-name-cell `:``)+(e.nowrap?`text-nowrap `:``)+b(e.align)).className,style:_t(U+t,void 0),children:e.footer?e.footer(_):null},e.key)),w&&h(`td`,{})]})})]}),!C&&!_?.length&&h(`div`,{className:`tbl-empty-block`,children:typeof Vt==`string`?h(`div`,{className:`tbl-empty-plain`,children:Vt}):Vt})]}),Oe(T)&&h(o,{page:T.page,totalPages:T.totalPages,pageSize:T.pageSize,onPageChange:T.setPage,onPageSizeChange:T.setPageSize,pageSizes:T.pageSizes,mode:T.mode}),Rt&&h(`div`,{ref:zt,className:`visually-hidden`,role:`status`,"aria-live":`polite`,"data-wui-table-status":``})]})}export{x as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=[`stacked`,`side`],o=[`top`,`start`],s=[`comfortable`,`compact`],c=[2,3,4];function l(l){let{children:u,title:d,description:f,layout:p=`stacked`,labels:m=`top`,density:h=`comfortable`,headingLevel:g=3,className:_=``,...v}=l;n(`AppFormSection`,v),t(`AppFormSection`,`layout`,p,a),t(`AppFormSection`,`labels`,m,o),t(`AppFormSection`,`density`,h,s),t(`AppFormSection`,`headingLevel`,g,c);let y=c.includes(g)?`h${g}`:`h3`;return i(`section`,{className:[`form-section`,p===`side`?`wui-form-side`:``,m===`start`?`wui-form-labels-start`:``,h===`compact`?`wui-form-compact`:``,_].filter(Boolean).join(` `),...e(`AppFormSection`,l),...v,children:[(d!=null||f!=null)&&i(`div`,{className:`form-section-head`,children:[d!=null&&r(y,{className:`form-section-title`,children:d}),f!=null&&r(`p`,{className:`form-section-desc`,children:f})]}),r(`div`,{className:`form-section-body`,children:u})]})}export{l as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=[`stacked`,`side`],o=[`top`,`start`],s=[`comfortable`,`compact`],c=[2,3,4],l=[`body`,`display`],u=[`line`,`none`];function d(d){let{children:f,title:p,description:m,layout:h=`stacked`,labels:g=`top`,density:_=`comfortable`,headingLevel:v=3,titleFont:y=`body`,titleSize:b,rule:x=`line`,className:S=``,...C}=d;n(`AppFormSection`,C);let{style:w,...T}=C;t(`AppFormSection`,`layout`,h,a),t(`AppFormSection`,`labels`,g,o),t(`AppFormSection`,`density`,_,s),t(`AppFormSection`,`headingLevel`,v,c),t(`AppFormSection`,`titleFont`,y,l),t(`AppFormSection`,`rule`,x,u);let E=c.includes(v)?`h${v}`:`h3`;return i(`section`,{className:[`form-section`,h===`side`?`wui-form-side`:``,g===`start`?`wui-form-labels-start`:``,_===`compact`?`wui-form-compact`:``,y===`display`?`wui-form-title-display`:``,x===`none`?`wui-form-rule-none`:``,S].filter(Boolean).join(` `),style:b==null&&w===void 0?void 0:{"--wui-form-title-size":b==null?void 0:`${b}px`,...w},...e(`AppFormSection`,d),...T,children:[(p!=null||m!=null)&&i(`div`,{className:`form-section-head`,children:[p!=null&&r(E,{className:`form-section-title`,children:p}),m!=null&&r(`p`,{className:`form-section-desc`,children:m})]}),r(`div`,{className:`form-section-body`,children:f})]})}export{d as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"../lib/FieldMessage.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import a from"./useWuiControl.js";import{forwardRef as o,useEffect as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import"@webority/ui-elements/elements/mention-input";var d=o(function(o,d){let{value:f,onChange:p,people:m,loadPeople:h,minChars:g,debounce:_,onSubmit:v,rows:y=3,placeholder:b,disabled:x=!1,name:S,id:C,label:w,error:T,hint:E,required:D=!1,help:O,helpLabel:k=`More information`,className:A=``,fieldClassName:j=``,"data-canvas":M,...N}=o;t(`AppMentionInput`,N);let P=typeof h==`function`,F=c(),I=C||`mention-${F.replace(/[^a-zA-Z0-9_-]/g,``)}`,L=T?`${I}-error`:E?`${I}-hint`:void 0,{setRef:R,innerRef:z}=a({ref:d,value:f??``,on:{change:e=>{e.target===e.currentTarget&&p?.(e.currentTarget.value,{mentions:e.currentTarget.mentions})},"wui:mention-input:submit":()=>v?.()}});return s(()=>{let e=z.current;!e||P||(e.people=m||[])},[m,P,z]),s(()=>{let e=z.current;if(!e||!P)return;let t=0,n=null,r=async r=>{let i=++t;n?.abort(),n=typeof AbortController==`function`?new AbortController:null,e.loading=!0;try{let a=await h(r.detail.query,{signal:n?.signal});i===t&&(e.people=a||[])}catch{i===t&&(e.people=[])}finally{i===t&&(e.loading=!1)}};return e.addEventListener(`search`,r),()=>{t=-1,n?.abort(),e.removeEventListener(`search`,r),e.loading=!1}},[P,h,z]),u(`div`,{...e(`AppMentionInput`,o),className:`field${j?` ${j}`:``}`,children:[w&&u(`label`,{className:`label`,htmlFor:`${I}-text`,children:[w,D&&l(i,{}),O&&l(r,{label:k,children:O})]}),l(`wui-mention-input`,{ref:R,id:I,class:A?`wui-mention-input ${A}`:`wui-mention-input`,label:typeof w==`string`?w:void 0,placeholder:b||void 0,rows:String(y),name:S||void 0,remote:P?``:void 0,"min-chars":g==null?void 0:String(g),debounce:_==null?void 0:String(_),disabled:x?``:void 0,"aria-describedby":L,"aria-invalid":T?`true`:void 0,...N}),l(n,{error:T,hint:E,errorId:`${I}-error`,hintId:`${I}-hint`})]})});export{d as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"../lib/FieldMessage.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import a from"./useWuiControl.js";import"@webority/ui-elements/elements/mention-input";import{forwardRef as o,useEffect as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";var d=o(function(o,d){let{value:f,onChange:p,people:m,loadPeople:h,minChars:g,debounce:_,onSubmit:v,rows:y=3,placeholder:b,disabled:x=!1,name:S,id:C,label:w,error:T,hint:E,required:D=!1,help:O,helpLabel:k=`More information`,className:A=``,fieldClassName:j=``,"data-canvas":M,...N}=o;t(`AppMentionInput`,N);let P=typeof h==`function`,F=c(),I=C||`mention-${F.replace(/[^a-zA-Z0-9_-]/g,``)}`,L=T?`${I}-error`:E?`${I}-hint`:void 0,{setRef:R,innerRef:z}=a({ref:d,value:f??``,on:{change:e=>{e.target===e.currentTarget&&p?.(e.currentTarget.value,{mentions:e.currentTarget.mentions})},"wui:mention-input:submit":()=>v?.()}});return s(()=>{let e=z.current;!e||P||(e.people=m||[])},[m,P,z]),s(()=>{let e=z.current;if(!e||!P)return;let t=0,n=null,r=async r=>{let i=++t;n?.abort(),n=typeof AbortController==`function`?new AbortController:null,e.loading=!0;try{let a=await h(r.detail.query,{signal:n?.signal});i===t&&(e.people=a||[])}catch{i===t&&(e.people=[])}finally{i===t&&(e.loading=!1)}};return e.addEventListener(`search`,r),()=>{t=-1,n?.abort(),e.removeEventListener(`search`,r),e.loading=!1}},[P,h,z]),u(`div`,{...e(`AppMentionInput`,o),className:`field${j?` ${j}`:``}`,children:[w&&u(`label`,{className:`label`,htmlFor:`${I}-text`,children:[w,D&&l(i,{}),O&&l(r,{label:k,children:O})]}),l(`wui-mention-input`,{ref:R,id:I,class:A?`wui-mention-input ${A}`:`wui-mention-input`,label:typeof w==`string`?w:void 0,placeholder:b||void 0,rows:String(y),name:S||void 0,remote:P?``:void 0,"min-chars":g==null?void 0:String(g),debounce:_==null?void 0:String(_),disabled:x?``:void 0,"aria-describedby":L,"aria-invalid":T?`true`:void 0,...N}),l(n,{error:T,hint:E,errorId:`${I}-error`,hintId:`${I}-hint`})]})});export{d 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,{SECTION_ALIGNS as a,SECTION_HEADINGS as o,SECTION_VARIANTS as s,itemHeading as c,sectionHeading as l}from"../lib/sectionShell.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`grid`,`rows`];function p(p){let{title:m,items:h=[],layout:g=`grid`,as:_=`h2`,eyebrow:v,subtitle:y,align:b=`center`,variant:x=`default`,className:S=``,...C}=p;n(`AppSectionFeatures`,C),t(`AppSectionFeatures`,`layout`,g,f),t(`AppSectionFeatures`,`as`,_,o),t(`AppSectionFeatures`,`align`,b,a),t(`AppSectionFeatures`,`variant`,x,s);let w=l(_,`h2`),T=c(w);return u(i,{component:`AppSectionFeatures`,kind:`features`,title:m,as:w,eyebrow:v,subtitle:y,align:b,variant:x,extraClass:g===`rows`?`wui-section-features-rows`:``,className:S,rest:{...e(`AppSectionFeatures`,p),...C},children:h.length>0&&u(`ul`,{className:`wui-section-features-list`,children:h.map(e=>d(`li`,{className:`wui-section-feature`,children:[e.media!=null&&u(`div`,{className:`wui-section-media`,children:e.media}),d(`div`,{className:`wui-section-feature-body`,children:[e.icon&&u(`span`,{className:`wui-section-feature-icon`,children:u(r,{name:e.icon,size:24})}),u(T,{className:`wui-section-feature-title`,children:e.title}),e.description!=null&&e.description!==``&&u(`div`,{className:`wui-section-feature-text`,children:e.description})]})]},e.key??e.title))})})}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"./AppIcon.js";import i,{SECTION_ALIGNS as a,SECTION_HEADINGS as o,SECTION_TITLE_FONTS as s,SECTION_VARIANTS as c,itemHeading as l,sectionHeading as u}from"../lib/sectionShell.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`grid`,`rows`];function m(m){let{title:h,items:g=[],layout:_=`grid`,as:v=`h2`,eyebrow:y,subtitle:b,align:x=`center`,variant:S=`default`,titleFont:C=`display`,inset:w,className:T=``,...E}=m;n(`AppSectionFeatures`,E),t(`AppSectionFeatures`,`layout`,_,p),t(`AppSectionFeatures`,`as`,v,o),t(`AppSectionFeatures`,`align`,x,a),t(`AppSectionFeatures`,`variant`,S,c),t(`AppSectionFeatures`,`titleFont`,C,s);let D=u(v,`h2`),O=l(D);return d(i,{component:`AppSectionFeatures`,kind:`features`,title:h,as:D,eyebrow:y,subtitle:b,align:x,variant:S,titleFont:C,inset:w,extraClass:_===`rows`?`wui-section-features-rows`:``,className:T,rest:{...e(`AppSectionFeatures`,m),...E},children:g.length>0&&d(`ul`,{className:`wui-section-features-list`,children:g.map(e=>f(`li`,{className:`wui-section-feature`,children:[e.media!=null&&d(`div`,{className:`wui-section-media`,children:e.media}),f(`div`,{className:`wui-section-feature-body`,children:[e.icon&&d(`span`,{className:`wui-section-feature-icon`,children:d(r,{name:e.icon,size:24})}),d(O,{className:`wui-section-feature-title`,children:e.title}),e.description!=null&&e.description!==``&&d(`div`,{className:`wui-section-feature-text`,children:e.description})]})]},e.key??e.title))})})}export{m as default};
@@ -2,7 +2,7 @@
2
2
  "format": "webority-guidance/1",
3
3
  "package": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.94.0"
5
+ "version": "0.95.0"
6
6
  },
7
7
  "components": [
8
8
  {
@@ -2342,7 +2342,8 @@
2342
2342
  "The title is an h3 that takes focus when the dialog opens.",
2343
2343
  "A custom image is hidden from assistive technology with an empty alt, so the title and message carry the meaning.",
2344
2344
  "The confirm-phrase field is named \"Type <phrase> to confirm\", and Confirm stays disabled until the phrase matches.",
2345
- "While loading, Cancel is disabled and the backdrop and Escape no longer close the dialog."
2345
+ "While loading, Cancel is disabled and the backdrop and Escape no longer close the dialog.",
2346
+ "Children draw left-aligned between the message and the confirm-phrase field, so a field placed there keeps its own label."
2346
2347
  ]
2347
2348
  }
2348
2349
  },
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";var n=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],r=[`start`,`center`],i=[`default`,`muted`],a=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function o(e,t){return n.includes(e)?e:t}function s(e){return n[Math.min(n.indexOf(e)+1,5)]}function c({className:t,src:n,alt:r,width:i,height:a}){return e(`img`,{className:t,src:n,alt:r,width:i,height:a,loading:`lazy`,decoding:`async`})}function l({component:n,kind:r,title:i,as:o,eyebrow:s,subtitle:c,align:l,variant:u,eyebrowTone:d,actions:f,extraClass:p,className:m,rest:h,children:g}){if(i==null||i===``)throw Error(`${n} needs a title: every section opens with its heading.`);let _=o,v=h.id?`${h.id}-title`:void 0,y=a.includes(d);return e(`section`,{className:[`wui-section`,`wui-section-${r}`,l===`center`?`wui-section-center`:``,u===`muted`?`wui-section-muted`:``,p,m].filter(Boolean).join(` `),"aria-labelledby":v,...h,children:t(`div`,{className:`wui-section-inner`,children:[t(`div`,{className:`wui-section-head`,children:[s!=null&&s!==``&&e(`div`,{className:y?`wui-section-eyebrow wui-section-eyebrow-pill wui-section-eyebrow-${d}`:`wui-section-eyebrow`,children:s}),e(_,{className:`wui-section-title`,id:v,children:i}),c!=null&&c!==``&&e(`p`,{className:`wui-section-subtitle`,children:c}),f!=null&&f!==!1&&e(`div`,{className:`wui-section-actions`,children:f})]}),g]})})}export{r as SECTION_ALIGNS,a as SECTION_EYEBROW_TONES,n as SECTION_HEADINGS,i as SECTION_VARIANTS,c as SectionImage,l as default,s as itemHeading,o as sectionHeading};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";var n=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],r=[`start`,`center`],i=[`default`,`muted`],a=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`],o=[`display`,`body`];function s(e,t){return n.includes(e)?e:t}function c(e){return n[Math.min(n.indexOf(e)+1,5)]}function l({className:t,src:n,alt:r,width:i,height:a}){return e(`img`,{className:t,src:n,alt:r,width:i,height:a,loading:`lazy`,decoding:`async`})}function u({component:n,kind:r,title:i,as:o,eyebrow:s,subtitle:c,align:l,variant:u,eyebrowTone:d,titleFont:f,inset:p,actions:m,extraClass:h,className:g,rest:_,children:v}){if(i==null||i===``)throw Error(`${n} needs a title: every section opens with its heading.`);let y=o,b=_.id?`${_.id}-title`:void 0,x=a.includes(d),{style:S,...C}=_,w=p==null&&S===void 0?void 0:{"--wui-section-inset":p==null?void 0:`${p}px`,...S};return e(`section`,{className:[`wui-section`,`wui-section-${r}`,l===`center`?`wui-section-center`:``,u===`muted`?`wui-section-muted`:``,h,g].filter(Boolean).join(` `),style:w,"aria-labelledby":b,...C,children:t(`div`,{className:`wui-section-inner`,children:[t(`div`,{className:`wui-section-head`,children:[s!=null&&s!==``&&e(`div`,{className:x?`wui-section-eyebrow wui-section-eyebrow-pill wui-section-eyebrow-${d}`:`wui-section-eyebrow`,children:s}),e(y,{className:f===`body`?`wui-section-title wui-section-title-body`:`wui-section-title`,id:b,children:i}),c!=null&&c!==``&&e(`p`,{className:`wui-section-subtitle`,children:c}),m!=null&&m!==!1&&e(`div`,{className:`wui-section-actions`,children:m})]}),v]})})}export{r as SECTION_ALIGNS,a as SECTION_EYEBROW_TONES,n as SECTION_HEADINGS,o as SECTION_TITLE_FONTS,i as SECTION_VARIANTS,l as SectionImage,u as default,c as itemHeading,s as sectionHeading};
@@ -5,6 +5,7 @@
5
5
  * @param {boolean} props.open
6
6
  * @param {string} props.title
7
7
  * @param {import('react').ReactNode} [props.message]
8
+ * @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.
8
9
  * @param {string} [props.confirmLabel]
9
10
  * @param {string} [props.cancelLabel]
10
11
  * @param {boolean} [props.danger]
@@ -27,6 +28,7 @@ export default function AppConfirmDialog(props: {
27
28
  title: string;
28
29
  /** The text that explains what the user is confirming. */
29
30
  message?: import('react').ReactNode;
31
+ children?: import('react').ReactNode;
30
32
  /**
31
33
  * The confirm button's text.
32
34
  * @default "Confirm"
@@ -6,7 +6,7 @@
6
6
  * surface reaches the same list through `<app-data-table src>`, which fetches HTML rows itself.
7
7
  *
8
8
  * @param {object} props
9
- * @param {object[]} props.columns
9
+ * @param {{ key: string, label: import('react').ReactNode, sortable?: boolean, align?: 'end'|'num'|'center', width?: string|number, minWidth?: string|number, nowrap?: boolean, cellClassName?: string, cellStyle?: object, hideable?: boolean, pin?: 'start'|'end', grow?: boolean }[]} props.columns
10
10
  * @param {object[]} props.rows
11
11
  * @param {(row: object, index: number) => string|number} [props.rowKey]
12
12
  * @param {{ key: string, dir: "asc"|"desc" }} [props.sort]
@@ -26,6 +26,8 @@
26
26
  * @param {'auto'|'fixed'} [props.tableLayout]
27
27
  * @param {boolean} [props.striped]
28
28
  * @param {boolean} [props.flush]
29
+ * @param {number} [props.pad] The inset around the table in px; flush wins over it.
30
+ * @param {string} [props.headerTone] The column header band's colour, a CSS colour or a $color token.
29
31
  * @param {boolean} [props.rowDrag]
30
32
  * @param {string|number} [props.maxHeight]
31
33
  * @param {string[]} [props.hiddenColumns]
@@ -74,7 +76,20 @@
74
76
  */
75
77
  export default function AppDataTable(props: {
76
78
  /** The columns, each an object with a key and a label, plus optional settings such as sortable, hideable, pin, align and grow. */
77
- columns: object[];
79
+ columns: {
80
+ key: string;
81
+ label: import('react').ReactNode;
82
+ sortable?: boolean;
83
+ align?: 'end' | 'num' | 'center';
84
+ width?: string | number;
85
+ minWidth?: string | number;
86
+ nowrap?: boolean;
87
+ cellClassName?: string;
88
+ cellStyle?: object;
89
+ hideable?: boolean;
90
+ pin?: 'start' | 'end';
91
+ grow?: boolean;
92
+ }[];
78
93
  /** The row objects shown in the table, one per row, read through each column's key. */
79
94
  rows: object[];
80
95
  rowKey?: (row: object, index: number) => string | number;
@@ -140,6 +155,10 @@ export default function AppDataTable(props: {
140
155
  * @default false
141
156
  */
142
157
  flush?: boolean;
158
+ /** The inset around the table, in px; the wrapper's 20px is the default and flush wins over it. */
159
+ pad?: number;
160
+ /** The column header band's colour, a CSS colour or a $color token the Canvas renderer resolves. */
161
+ headerTone?: string;
143
162
  /**
144
163
  * Rows drag onto page elements marked data-wui-drop-target; a ticked row drags the whole selection. Fires wui:row-drop with keys and target on the wrapper.
145
164
  * @default false
@@ -14,6 +14,9 @@
14
14
  * @param {'top'|'start'} [props.labels]
15
15
  * @param {'comfortable'|'compact'} [props.density]
16
16
  * @param {2|3|4} [props.headingLevel]
17
+ * @param {'body'|'display'} [props.titleFont]
18
+ * @param {number} [props.titleSize] The title's font size in px.
19
+ * @param {'line'|'none'} [props.rule] The hairline between consecutive sections.
17
20
  * @param {string} [props.className]
18
21
  */
19
22
  export default function AppFormSection(props: {
@@ -42,6 +45,18 @@ export default function AppFormSection(props: {
42
45
  * @default 3
43
46
  */
44
47
  headingLevel?: 2 | 3 | 4;
48
+ /**
49
+ * display sets the title in the display face; body keeps the text face.
50
+ * @default "body"
51
+ */
52
+ titleFont?: 'body' | 'display';
53
+ /** The title's font size in px; unset keeps the theme's 15px. */
54
+ titleSize?: number;
55
+ /**
56
+ * none drops the hairline between consecutive sections and keeps the space.
57
+ * @default "line"
58
+ */
59
+ rule?: 'line' | 'none';
45
60
  /** Extra class names added to the root element. */
46
61
  className?: string;
47
62
  }): import("react").JSX.Element;
@@ -15,6 +15,8 @@
15
15
  * @param {import('react').ReactNode} [props.subtitle]
16
16
  * @param {"start"|"center"} [props.align]
17
17
  * @param {"default"|"muted"} [props.variant]
18
+ * @param {"display"|"body"} [props.titleFont]
19
+ * @param {number} [props.inset] The section's side inset in px.
18
20
  * @param {string} [props.className]
19
21
  */
20
22
  export default function AppSectionFeatures(props: {
@@ -55,6 +57,13 @@ export default function AppSectionFeatures(props: {
55
57
  * @default "default"
56
58
  */
57
59
  variant?: "default" | "muted";
60
+ /**
61
+ * The heading's face: display for the brand face, body for the text face.
62
+ * @default "display"
63
+ */
64
+ titleFont?: "display" | "body";
65
+ /** The section's side inset in px; unset keeps the container padding. */
66
+ inset?: number;
58
67
  /**
59
68
  * Extra class names for the root element.
60
69
  * @default ""
@@ -1,3 +1,4 @@
1
+ export { mentionedIds, parseMentionValue } from "@webority/ui-elements/elements/mention-input";
1
2
  export { createLocalSeenStore } from "@webority/ui-elements/elements/tour";
2
3
  export { postedMasked, themeBootScript } from "@webority/ui-elements/helpers";
3
4
  export { default as AppAccordion } from "./components/AppAccordion.jsx";
@@ -2,6 +2,7 @@ export declare const SECTION_HEADINGS: string[];
2
2
  export declare const SECTION_ALIGNS: string[];
3
3
  export declare const SECTION_VARIANTS: string[];
4
4
  export declare const SECTION_EYEBROW_TONES: string[];
5
+ export declare const SECTION_TITLE_FONTS: string[];
5
6
  /** The heading tag for the section title: `as` when it is a heading, otherwise the section's default. */
6
7
  export declare function sectionHeading(as: any, fallback: any): any;
7
8
  /** The level under a section title, for an item's title (h2 gives h3; h6 stays h6). */
@@ -27,7 +28,7 @@ export declare function SectionImage({ className, src, alt, width, height }: {
27
28
  * a generated one would differ from Razor's on every render.
28
29
  * @internal not exported from the package barrel
29
30
  */
30
- export default function SectionShell({ component, kind, title, as, eyebrow, subtitle, align, variant, eyebrowTone, actions, extraClass, className, rest, children, }: {
31
+ export default function SectionShell({ component, kind, title, as, eyebrow, subtitle, align, variant, eyebrowTone, titleFont, inset, actions, extraClass, className, rest, children, }: {
31
32
  actions: any;
32
33
  align: any;
33
34
  as: any;
@@ -37,9 +38,11 @@ export default function SectionShell({ component, kind, title, as, eyebrow, subt
37
38
  extraClass: any;
38
39
  eyebrow: any;
39
40
  eyebrowTone: any;
41
+ inset: any;
40
42
  kind: any;
41
43
  rest: any;
42
44
  subtitle: any;
43
45
  title: any;
46
+ titleFont: any;
44
47
  variant: any;
45
48
  }): import("react").JSX.Element;
package/dist/ui-react.js CHANGED
@@ -1 +1 @@
1
- import e from"./components/AppTooltip.js";import t,{iconNames as n,registerIcons as r}from"./components/AppIcon.js";import i from"./components/AppAccordion.js";import a from"./components/AppActionIcon.js";import o from"./components/AppAlert.js";import s from"./components/AppButton.js";import c from"./components/AppEmptyState.js";import l from"./components/AppProgress.js";import u from"./components/AppAsyncBlock.js";import d from"./components/AppPopover.js";import f from"./components/AppInfoTip.js";import p from"./components/AppRequiredMark.js";import m from"./components/AppAutocomplete.js";import h from"./components/AppAvatar.js";import g from"./components/AppAvatarGroup.js";import _ from"./components/AppModal.js";import v from"./components/AppAvatarPicker.js";import y from"./components/AppBadge.js";import b from"./components/AppBanner.js";import x from"./components/AppBreadcrumbs.js";import S from"./components/AppButtonGroup.js";import C from"./components/AppCalendar.js";import w from"./components/AppCard.js";import T from"./components/AppCarousel.js";import E from"./components/AppChart.js";import D from"./components/AppDropdown.js";import O from"./components/AppSegmented.js";import k from"./components/AppChartCard.js";import A from"./components/AppCheckbox.js";import j from"./components/AppChip.js";import M from"./components/AppChipGroup.js";import N from"./components/AppChoiceCard.js";import P from"./components/AppChoiceChip.js";import F from"./components/AppCodeBlock.js";import I from"./components/AppColorField.js";import L from"./components/AppColumnMenu.js";import R from"./components/AppSpinner.js";import z from"./components/AppCommandPalette.js";import B from"./components/AppCommentThread.js";import V from"./components/AppCompareTable.js";import H from"./components/AppInput.js";import{MODAL_ICONS as U}from"./components/ModalIcons.js";import W from"./components/AppConfirmDialog.js";import G from"./components/AppConsentBanner.js";import K from"./components/AppContextMenu.js";import q from"./components/AppCopyButton.js";import J from"./components/AppCountrySelect.js";import Y from"./components/AppDashboardCell.js";import X from"./components/AppDashboardGrid.js";import Z,{AppSkeletonRows as Q}from"./components/AppSkeleton.js";import $ from"./components/AppSelectMini.js";import ee from"./components/AppTablePagination.js";import te from"./components/AppDataTable.js";import ne from"./components/AppDatePicker.js";import re from"./components/AppDateRangePicker.js";import ie from"./components/AppDescriptions.js";import ae from"./components/AppDrawer.js";import oe from"./components/AppDropZone.js";import se from"./components/AppDueDate.js";import ce from"./components/AppErrorSummary.js";import le from"./components/AppFileAttachment.js";import ue from"./components/AppFilePicker.js";import de from"./components/AppFileViewer.js";import{buildListQuery as fe,parseListQuery as pe}from"./lib/listQuery.js";import me from"./components/AppMultiSelect.js";import he from"./components/AppSearch.js";import ge from"./components/AppSelect.js";import _e from"./components/AppSwitch.js";import ve from"./components/AppFilterBar.js";import ye from"./components/AppFloatingDock.js";import be from"./components/AppFormActions.js";import xe from"./components/AppFormRow.js";import Se from"./components/AppFormSection.js";import Ce from"./components/AppHoverCard.js";import we from"./components/AppInfoList.js";import Te from"./components/AppInlineEdit.js";import Ee from"./components/AppInputGroup.js";import{dismissAll as De,errorToast as Oe,toast as ke}from"./components/toast.js";import Ae from"./components/AppKanban.js";import je from"./components/AppKbd.js";import Me from"./components/AppSparkline.js";import Ne from"./components/AppKpiTile.js";import Pe from"./components/AppLightbox.js";import Fe from"./components/AppLink.js";import Ie from"./components/AppLogoPicker.js";import Le from"./components/AppMarkdown.js";import Re from"./components/AppMentionInput.js";import ze from"./components/AppMenubar.js";import Be from"./components/AppMeter.js";import Ve from"./components/AppMetricStrip.js";import He from"./components/AppNavigationMenu.js";import Ue from"./components/AppNotificationCenter.js";import We from"./components/AppNumberInput.js";import Ge from"./components/AppOnboardingChecklist.js";import Ke from"./components/AppOtpInput.js";import qe from"./components/AppPageHeader.js";import Je from"./components/AppPagination.js";import Ye from"./components/AppPhoneNumberInput.js";import Xe from"./components/AppPricingCard.js";import Ze from"./components/AppQrCode.js";import Qe from"./components/AppRadio.js";import $e from"./components/AppRadioGroup.js";import et from"./components/AppRating.js";import tt from"./components/AppRecordPager.js";import nt from"./components/AppRelativeTime.js";import rt from"./components/AppRepeater.js";import it from"./components/AppResizable.js";import at from"./components/AppResizableHandle.js";import ot from"./components/AppResizablePanel.js";import st from"./components/AppResourceCard.js";import ct from"./components/AppResult.js";import lt from"./components/AppRichText.js";import ut from"./components/AppRollingNumber.js";import dt from"./components/AppRouteError.js";import ft from"./components/AppScoreScale.js";import pt from"./components/AppScrollbar.js";import mt from"./components/AppSectionCallToAction.js";import ht from"./components/AppSectionFaq.js";import gt from"./components/AppSectionFeatures.js";import _t from"./components/AppSectionHero.js";import vt from"./components/AppSectionLogos.js";import yt from"./components/AppSectionPricing.js";import bt from"./components/AppSectionTestimonials.js";import xt from"./components/AppShell.js";import St from"./components/AppShortcutLegend.js";import Ct from"./components/AppShowMore.js";import wt from"./components/AppSidebarMenu.js";import Tt from"./components/AppSlider.js";import Et from"./components/AppSortableList.js";import Dt from"./components/AppSplash.js";import Ot from"./components/AppSplitButton.js";import kt from"./components/AppSplitView.js";import At from"./components/AppStatusBadge.js";import jt from"./components/AppStepper.js";import Mt from"./components/AppTableEmptyState.js";import Nt from"./components/AppTableToolbar.js";import Pt from"./components/AppTabs.js";import Ft from"./components/AppTagInput.js";import It from"./components/AppTextarea.js";import Lt from"./components/AppThemeToggle.js";import Rt from"./components/AppTimeline.js";import zt from"./components/AppTimePicker.js";import Bt from"./components/AppToast.js";import Vt from"./components/AppToolbar.js";import Ht from"./components/AppTour.js";import Ut from"./components/AppTreeView.js";import Wt from"./components/AppTruncate.js";import Gt from"./components/AppUpdateBar.js";import Kt from"./components/AppWhatsNew.js";import qt from"./components/AppWizard.js";import Jt from"./components/AppWorkspaceSwitcher.js";import{useCommandPaletteShortcut as Yt}from"./lib/useCommandPaletteShortcut.js";import{useFloatingStack as Xt}from"./lib/useFloatingStack.js";import{useListQuery as Zt}from"./lib/useListQuery.js";import{useListShortcuts as Qt}from"./lib/useListShortcuts.js";import{usePagination as $t}from"./lib/usePagination.js";import{useTableView as en}from"./lib/useTableView.js";import{createLocalSeenStore as tn}from"@webority/ui-elements/elements/tour";import{postedMasked as nn,themeBootScript as rn}from"@webority/ui-elements/helpers";export{i as AppAccordion,a as AppActionIcon,o as AppAlert,u as AppAsyncBlock,m as AppAutocomplete,h as AppAvatar,g as AppAvatarGroup,v as AppAvatarPicker,y as AppBadge,b as AppBanner,x as AppBreadcrumbs,s as AppButton,S as AppButtonGroup,C as AppCalendar,w as AppCard,T as AppCarousel,E as AppChart,k as AppChartCard,A as AppCheckbox,j as AppChip,M as AppChipGroup,N as AppChoiceCard,P as AppChoiceChip,F as AppCodeBlock,I as AppColorField,L as AppColumnMenu,z as AppCommandPalette,B as AppCommentThread,V as AppCompareTable,W as AppConfirmDialog,G as AppConsentBanner,K as AppContextMenu,q as AppCopyButton,J as AppCountrySelect,Y as AppDashboardCell,X as AppDashboardGrid,te as AppDataTable,ne as AppDatePicker,re as AppDateRangePicker,ie as AppDescriptions,ae as AppDrawer,oe as AppDropZone,D as AppDropdown,se as AppDueDate,c as AppEmptyState,ce as AppErrorSummary,le as AppFileAttachment,ue as AppFilePicker,de as AppFileViewer,ve as AppFilterBar,ye as AppFloatingDock,be as AppFormActions,xe as AppFormRow,Se as AppFormSection,Ce as AppHoverCard,t as AppIcon,we as AppInfoList,f as AppInfoTip,Te as AppInlineEdit,H as AppInput,Ee as AppInputGroup,Ae as AppKanban,je as AppKbd,Ne as AppKpiTile,Pe as AppLightbox,Fe as AppLink,Ie as AppLogoPicker,Le as AppMarkdown,Re as AppMentionInput,ze as AppMenubar,Be as AppMeter,Ve as AppMetricStrip,_ as AppModal,me as AppMultiSelect,He as AppNavigationMenu,Ue as AppNotificationCenter,We as AppNumberInput,Ge as AppOnboardingChecklist,Ke as AppOtpInput,qe as AppPageHeader,Je as AppPagination,Ye as AppPhoneNumberInput,d as AppPopover,Xe as AppPricingCard,l as AppProgress,Ze as AppQrCode,Qe as AppRadio,$e as AppRadioGroup,et as AppRating,tt as AppRecordPager,nt as AppRelativeTime,rt as AppRepeater,p as AppRequiredMark,it as AppResizable,at as AppResizableHandle,ot as AppResizablePanel,st as AppResourceCard,ct as AppResult,lt as AppRichText,ut as AppRollingNumber,dt as AppRouteError,ft as AppScoreScale,pt as AppScrollbar,he as AppSearch,mt as AppSectionCallToAction,ht as AppSectionFaq,gt as AppSectionFeatures,_t as AppSectionHero,vt as AppSectionLogos,yt as AppSectionPricing,bt as AppSectionTestimonials,O as AppSegmented,ge as AppSelect,$ as AppSelectMini,xt as AppShell,St as AppShortcutLegend,Ct as AppShowMore,wt as AppSidebarMenu,Z as AppSkeleton,Q as AppSkeletonRows,Tt as AppSlider,Et as AppSortableList,Me as AppSparkline,R as AppSpinner,Dt as AppSplash,Ot as AppSplitButton,kt as AppSplitView,At as AppStatusBadge,jt as AppStepper,_e as AppSwitch,Mt as AppTableEmptyState,ee as AppTablePagination,Nt as AppTableToolbar,Pt as AppTabs,Ft as AppTagInput,It as AppTextarea,Lt as AppThemeToggle,zt as AppTimePicker,Rt as AppTimeline,Bt as AppToast,Vt as AppToolbar,e as AppTooltip,Ht as AppTour,Ut as AppTreeView,Wt as AppTruncate,Gt as AppUpdateBar,Kt as AppWhatsNew,qt as AppWizard,Jt as AppWorkspaceSwitcher,U as MODAL_ICONS,fe as buildListQuery,tn as createLocalSeenStore,De as dismissAll,Oe as errorToast,n as iconNames,pe as parseListQuery,nn as postedMasked,r as registerIcons,rn as themeBootScript,ke as toast,Yt as useCommandPaletteShortcut,Xt as useFloatingStack,Zt as useListQuery,Qt as useListShortcuts,$t as usePagination,en as useTableView};
1
+ import e from"./components/AppTooltip.js";import t,{iconNames as n,registerIcons as r}from"./components/AppIcon.js";import i from"./components/AppAccordion.js";import a from"./components/AppActionIcon.js";import o from"./components/AppAlert.js";import s from"./components/AppButton.js";import c from"./components/AppEmptyState.js";import l from"./components/AppProgress.js";import u from"./components/AppAsyncBlock.js";import d from"./components/AppPopover.js";import f from"./components/AppInfoTip.js";import p from"./components/AppRequiredMark.js";import m from"./components/AppAutocomplete.js";import h from"./components/AppAvatar.js";import g from"./components/AppAvatarGroup.js";import _ from"./components/AppModal.js";import v from"./components/AppAvatarPicker.js";import y from"./components/AppBadge.js";import b from"./components/AppBanner.js";import x from"./components/AppBreadcrumbs.js";import S from"./components/AppButtonGroup.js";import C from"./components/AppCalendar.js";import w from"./components/AppCard.js";import T from"./components/AppCarousel.js";import E from"./components/AppChart.js";import D from"./components/AppDropdown.js";import O from"./components/AppSegmented.js";import k from"./components/AppChartCard.js";import A from"./components/AppCheckbox.js";import j from"./components/AppChip.js";import M from"./components/AppChipGroup.js";import N from"./components/AppChoiceCard.js";import P from"./components/AppChoiceChip.js";import F from"./components/AppCodeBlock.js";import I from"./components/AppColorField.js";import L from"./components/AppColumnMenu.js";import R from"./components/AppSpinner.js";import z from"./components/AppCommandPalette.js";import B from"./components/AppCommentThread.js";import V from"./components/AppCompareTable.js";import H from"./components/AppInput.js";import{MODAL_ICONS as U}from"./components/ModalIcons.js";import W from"./components/AppConfirmDialog.js";import G from"./components/AppConsentBanner.js";import K from"./components/AppContextMenu.js";import q from"./components/AppCopyButton.js";import J from"./components/AppCountrySelect.js";import Y from"./components/AppDashboardCell.js";import X from"./components/AppDashboardGrid.js";import Z,{AppSkeletonRows as Q}from"./components/AppSkeleton.js";import $ from"./components/AppSelectMini.js";import ee from"./components/AppTablePagination.js";import te from"./components/AppDataTable.js";import ne from"./components/AppDatePicker.js";import re from"./components/AppDateRangePicker.js";import ie from"./components/AppDescriptions.js";import ae from"./components/AppDrawer.js";import oe from"./components/AppDropZone.js";import se from"./components/AppDueDate.js";import ce from"./components/AppErrorSummary.js";import le from"./components/AppFileAttachment.js";import ue from"./components/AppFilePicker.js";import de from"./components/AppFileViewer.js";import{buildListQuery as fe,parseListQuery as pe}from"./lib/listQuery.js";import me from"./components/AppMultiSelect.js";import he from"./components/AppSearch.js";import ge from"./components/AppSelect.js";import _e from"./components/AppSwitch.js";import ve from"./components/AppFilterBar.js";import ye from"./components/AppFloatingDock.js";import be from"./components/AppFormActions.js";import xe from"./components/AppFormRow.js";import Se from"./components/AppFormSection.js";import Ce from"./components/AppHoverCard.js";import we from"./components/AppInfoList.js";import Te from"./components/AppInlineEdit.js";import Ee from"./components/AppInputGroup.js";import{dismissAll as De,errorToast as Oe,toast as ke}from"./components/toast.js";import Ae from"./components/AppKanban.js";import je from"./components/AppKbd.js";import Me from"./components/AppSparkline.js";import Ne from"./components/AppKpiTile.js";import Pe from"./components/AppLightbox.js";import Fe from"./components/AppLink.js";import Ie from"./components/AppLogoPicker.js";import Le from"./components/AppMarkdown.js";import Re from"./components/AppMentionInput.js";import ze from"./components/AppMenubar.js";import Be from"./components/AppMeter.js";import Ve from"./components/AppMetricStrip.js";import He from"./components/AppNavigationMenu.js";import Ue from"./components/AppNotificationCenter.js";import We from"./components/AppNumberInput.js";import Ge from"./components/AppOnboardingChecklist.js";import Ke from"./components/AppOtpInput.js";import qe from"./components/AppPageHeader.js";import Je from"./components/AppPagination.js";import Ye from"./components/AppPhoneNumberInput.js";import Xe from"./components/AppPricingCard.js";import Ze from"./components/AppQrCode.js";import Qe from"./components/AppRadio.js";import $e from"./components/AppRadioGroup.js";import et from"./components/AppRating.js";import tt from"./components/AppRecordPager.js";import nt from"./components/AppRelativeTime.js";import rt from"./components/AppRepeater.js";import it from"./components/AppResizable.js";import at from"./components/AppResizableHandle.js";import ot from"./components/AppResizablePanel.js";import st from"./components/AppResourceCard.js";import ct from"./components/AppResult.js";import lt from"./components/AppRichText.js";import ut from"./components/AppRollingNumber.js";import dt from"./components/AppRouteError.js";import ft from"./components/AppScoreScale.js";import pt from"./components/AppScrollbar.js";import mt from"./components/AppSectionCallToAction.js";import ht from"./components/AppSectionFaq.js";import gt from"./components/AppSectionFeatures.js";import _t from"./components/AppSectionHero.js";import vt from"./components/AppSectionLogos.js";import yt from"./components/AppSectionPricing.js";import bt from"./components/AppSectionTestimonials.js";import xt from"./components/AppShell.js";import St from"./components/AppShortcutLegend.js";import Ct from"./components/AppShowMore.js";import wt from"./components/AppSidebarMenu.js";import Tt from"./components/AppSlider.js";import Et from"./components/AppSortableList.js";import Dt from"./components/AppSplash.js";import Ot from"./components/AppSplitButton.js";import kt from"./components/AppSplitView.js";import At from"./components/AppStatusBadge.js";import jt from"./components/AppStepper.js";import Mt from"./components/AppTableEmptyState.js";import Nt from"./components/AppTableToolbar.js";import Pt from"./components/AppTabs.js";import Ft from"./components/AppTagInput.js";import It from"./components/AppTextarea.js";import Lt from"./components/AppThemeToggle.js";import Rt from"./components/AppTimeline.js";import zt from"./components/AppTimePicker.js";import Bt from"./components/AppToast.js";import Vt from"./components/AppToolbar.js";import Ht from"./components/AppTour.js";import Ut from"./components/AppTreeView.js";import Wt from"./components/AppTruncate.js";import Gt from"./components/AppUpdateBar.js";import Kt from"./components/AppWhatsNew.js";import qt from"./components/AppWizard.js";import Jt from"./components/AppWorkspaceSwitcher.js";import{useCommandPaletteShortcut as Yt}from"./lib/useCommandPaletteShortcut.js";import{useFloatingStack as Xt}from"./lib/useFloatingStack.js";import{useListQuery as Zt}from"./lib/useListQuery.js";import{useListShortcuts as Qt}from"./lib/useListShortcuts.js";import{usePagination as $t}from"./lib/usePagination.js";import{useTableView as en}from"./lib/useTableView.js";import{mentionedIds as tn,parseMentionValue as nn}from"@webority/ui-elements/elements/mention-input";import{createLocalSeenStore as rn}from"@webority/ui-elements/elements/tour";import{postedMasked as an,themeBootScript as on}from"@webority/ui-elements/helpers";export{i as AppAccordion,a as AppActionIcon,o as AppAlert,u as AppAsyncBlock,m as AppAutocomplete,h as AppAvatar,g as AppAvatarGroup,v as AppAvatarPicker,y as AppBadge,b as AppBanner,x as AppBreadcrumbs,s as AppButton,S as AppButtonGroup,C as AppCalendar,w as AppCard,T as AppCarousel,E as AppChart,k as AppChartCard,A as AppCheckbox,j as AppChip,M as AppChipGroup,N as AppChoiceCard,P as AppChoiceChip,F as AppCodeBlock,I as AppColorField,L as AppColumnMenu,z as AppCommandPalette,B as AppCommentThread,V as AppCompareTable,W as AppConfirmDialog,G as AppConsentBanner,K as AppContextMenu,q as AppCopyButton,J as AppCountrySelect,Y as AppDashboardCell,X as AppDashboardGrid,te as AppDataTable,ne as AppDatePicker,re as AppDateRangePicker,ie as AppDescriptions,ae as AppDrawer,oe as AppDropZone,D as AppDropdown,se as AppDueDate,c as AppEmptyState,ce as AppErrorSummary,le as AppFileAttachment,ue as AppFilePicker,de as AppFileViewer,ve as AppFilterBar,ye as AppFloatingDock,be as AppFormActions,xe as AppFormRow,Se as AppFormSection,Ce as AppHoverCard,t as AppIcon,we as AppInfoList,f as AppInfoTip,Te as AppInlineEdit,H as AppInput,Ee as AppInputGroup,Ae as AppKanban,je as AppKbd,Ne as AppKpiTile,Pe as AppLightbox,Fe as AppLink,Ie as AppLogoPicker,Le as AppMarkdown,Re as AppMentionInput,ze as AppMenubar,Be as AppMeter,Ve as AppMetricStrip,_ as AppModal,me as AppMultiSelect,He as AppNavigationMenu,Ue as AppNotificationCenter,We as AppNumberInput,Ge as AppOnboardingChecklist,Ke as AppOtpInput,qe as AppPageHeader,Je as AppPagination,Ye as AppPhoneNumberInput,d as AppPopover,Xe as AppPricingCard,l as AppProgress,Ze as AppQrCode,Qe as AppRadio,$e as AppRadioGroup,et as AppRating,tt as AppRecordPager,nt as AppRelativeTime,rt as AppRepeater,p as AppRequiredMark,it as AppResizable,at as AppResizableHandle,ot as AppResizablePanel,st as AppResourceCard,ct as AppResult,lt as AppRichText,ut as AppRollingNumber,dt as AppRouteError,ft as AppScoreScale,pt as AppScrollbar,he as AppSearch,mt as AppSectionCallToAction,ht as AppSectionFaq,gt as AppSectionFeatures,_t as AppSectionHero,vt as AppSectionLogos,yt as AppSectionPricing,bt as AppSectionTestimonials,O as AppSegmented,ge as AppSelect,$ as AppSelectMini,xt as AppShell,St as AppShortcutLegend,Ct as AppShowMore,wt as AppSidebarMenu,Z as AppSkeleton,Q as AppSkeletonRows,Tt as AppSlider,Et as AppSortableList,Me as AppSparkline,R as AppSpinner,Dt as AppSplash,Ot as AppSplitButton,kt as AppSplitView,At as AppStatusBadge,jt as AppStepper,_e as AppSwitch,Mt as AppTableEmptyState,ee as AppTablePagination,Nt as AppTableToolbar,Pt as AppTabs,Ft as AppTagInput,It as AppTextarea,Lt as AppThemeToggle,zt as AppTimePicker,Rt as AppTimeline,Bt as AppToast,Vt as AppToolbar,e as AppTooltip,Ht as AppTour,Ut as AppTreeView,Wt as AppTruncate,Gt as AppUpdateBar,Kt as AppWhatsNew,qt as AppWizard,Jt as AppWorkspaceSwitcher,U as MODAL_ICONS,fe as buildListQuery,rn as createLocalSeenStore,De as dismissAll,Oe as errorToast,n as iconNames,tn as mentionedIds,pe as parseListQuery,nn as parseMentionValue,an as postedMasked,r as registerIcons,on as themeBootScript,ke as toast,Yt as useCommandPaletteShortcut,Xt as useFloatingStack,Zt as useListQuery,Qt as useListShortcuts,$t as usePagination,en as useTableView};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.94.0",
3
+ "version": "0.95.0",
4
4
  "description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
- "@webority/theme": "0.94.0",
33
- "@webority/ui-elements": "0.94.0"
32
+ "@webority/theme": "0.95.0",
33
+ "@webority/ui-elements": "0.95.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@webority/analytics": "^0.26.0",
@@ -56,8 +56,8 @@
56
56
  "typescript": "^7.0.2",
57
57
  "vite": "^8.0.12",
58
58
  "vitest": "5.0.1",
59
- "@webority/tokens": "0.94.0",
60
- "@webority/canvas-kit": "0.94.0"
59
+ "@webority/canvas-kit": "0.95.0",
60
+ "@webority/tokens": "0.95.0"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "vite build && tsc -p tsconfig.json && node ../../scripts/inject-meta-docs.mjs && node ../canvas-kit/dist/cli.js build --config canvas-kit.json --out dist/canvas-kit && node ../canvas-kit/dist/cli.js guidance --config canvas-kit.json --out dist/guidance.json && node ../../scripts/sync-rcl-assets.mjs analytics",