@webority/ui-react 0.103.0 → 0.104.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-kit/kit.js +6081 -6015
- package/dist/canvas-kit/manifest.json +45 -1
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppCheckbox.js +1 -1
- package/dist/components/AppChoiceCard.js +1 -1
- package/dist/components/AppCommentThread.js +1 -1
- package/dist/components/AppShell.js +1 -1
- package/dist/guidance.json +1 -1
- package/dist/types/components/AppCheckbox.d.ts +2 -0
- package/dist/types/components/AppChoiceCard.d.ts +3 -0
- package/dist/types/components/AppCommentThread.d.ts +15 -0
- package/dist/types/components/AppShell.d.ts +4 -0
- package/package.json +5 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"kind": "WeborityWeb",
|
|
3
3
|
"library": {
|
|
4
4
|
"name": "@webority/ui-react",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.104.1"
|
|
6
6
|
},
|
|
7
7
|
"rendererProtocolVersion": 12,
|
|
8
8
|
"platform": "Web",
|
|
@@ -3401,6 +3401,15 @@
|
|
|
3401
3401
|
"type": "string",
|
|
3402
3402
|
"required": false,
|
|
3403
3403
|
"description": "The form field name, sent with the value on submit."
|
|
3404
|
+
},
|
|
3405
|
+
{
|
|
3406
|
+
"name": "shape",
|
|
3407
|
+
"type": "enum",
|
|
3408
|
+
"enum": [
|
|
3409
|
+
"circle"
|
|
3410
|
+
],
|
|
3411
|
+
"required": false,
|
|
3412
|
+
"description": "circle draws a round box with the tick inside, for a task that is completed. Omit it for the square box."
|
|
3404
3413
|
}
|
|
3405
3414
|
],
|
|
3406
3415
|
"itemsTakeAction": [],
|
|
@@ -3913,6 +3922,15 @@
|
|
|
3913
3922
|
"required": true,
|
|
3914
3923
|
"description": "Shared form name. Cards with the same name form one group."
|
|
3915
3924
|
},
|
|
3925
|
+
{
|
|
3926
|
+
"name": "selectedStyle",
|
|
3927
|
+
"type": "enum",
|
|
3928
|
+
"enum": [
|
|
3929
|
+
"filled"
|
|
3930
|
+
],
|
|
3931
|
+
"required": false,
|
|
3932
|
+
"description": "`filled` fills the checked card's icon disc with the primary colour and draws the glyph in the on-primary colour. Unset keeps the soft selected look."
|
|
3933
|
+
},
|
|
3916
3934
|
{
|
|
3917
3935
|
"name": "size",
|
|
3918
3936
|
"type": "enum",
|
|
@@ -4959,6 +4977,20 @@
|
|
|
4959
4977
|
"marker": "AppCommentThread",
|
|
4960
4978
|
"acceptsChildren": false,
|
|
4961
4979
|
"props": [
|
|
4980
|
+
{
|
|
4981
|
+
"name": "allowReactions",
|
|
4982
|
+
"type": "boolean",
|
|
4983
|
+
"required": false,
|
|
4984
|
+
"description": "False leaves out the reaction panel and the reaction chips.",
|
|
4985
|
+
"default": true
|
|
4986
|
+
},
|
|
4987
|
+
{
|
|
4988
|
+
"name": "allowReplies",
|
|
4989
|
+
"type": "boolean",
|
|
4990
|
+
"required": false,
|
|
4991
|
+
"description": "False leaves out the Reply action and the reply box; existing replies still show.",
|
|
4992
|
+
"default": true
|
|
4993
|
+
},
|
|
4962
4994
|
{
|
|
4963
4995
|
"name": "className",
|
|
4964
4996
|
"type": "string",
|
|
@@ -5165,6 +5197,12 @@
|
|
|
5165
5197
|
"description": "Top-level comments, oldest first.",
|
|
5166
5198
|
"default": []
|
|
5167
5199
|
},
|
|
5200
|
+
{
|
|
5201
|
+
"name": "composerPlaceholder",
|
|
5202
|
+
"type": "string",
|
|
5203
|
+
"required": false,
|
|
5204
|
+
"description": "The composer box's placeholder. Without it the standard placeholder asks for a comment and names @ mentions."
|
|
5205
|
+
},
|
|
5168
5206
|
{
|
|
5169
5207
|
"name": "id",
|
|
5170
5208
|
"type": "string",
|
|
@@ -18542,6 +18580,12 @@
|
|
|
18542
18580
|
"required": false,
|
|
18543
18581
|
"description": "Extra path prefixes that also make this row the current page."
|
|
18544
18582
|
},
|
|
18583
|
+
{
|
|
18584
|
+
"name": "newUntil",
|
|
18585
|
+
"type": "string",
|
|
18586
|
+
"required": false,
|
|
18587
|
+
"description": "An ISO date (yyyy-MM-dd, India time). A green New pill shows after the label through that day, and none after it."
|
|
18588
|
+
},
|
|
18545
18589
|
{
|
|
18546
18590
|
"name": "tab",
|
|
18547
18591
|
"type": "boolean",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webority-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.104.1",
|
|
4
4
|
"platform": "Web",
|
|
5
5
|
"kitModuleVersion": 2,
|
|
6
6
|
"rendererProtocolVersion": 12,
|
|
7
7
|
"library": {
|
|
8
8
|
"name": "@webority/ui-react",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.104.1"
|
|
10
10
|
},
|
|
11
11
|
"files": {
|
|
12
12
|
"manifest.json": {
|
|
13
|
-
"sha256": "
|
|
14
|
-
"bytes":
|
|
13
|
+
"sha256": "d12442e56cb94b638de89630fd2525976020e0351ec4a6844011bd23ea7433c5",
|
|
14
|
+
"bytes": 856258
|
|
15
15
|
},
|
|
16
16
|
"kit.js": {
|
|
17
|
-
"sha256": "
|
|
18
|
-
"bytes":
|
|
17
|
+
"sha256": "0d592747ae4031546a0d852ea735e00cf49f71870e90f5f923029b24f7cc76fe",
|
|
18
|
+
"bytes": 10887627
|
|
19
19
|
},
|
|
20
20
|
"kit.css": {
|
|
21
21
|
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/CheckField.js";import{forwardRef as i}from"react";import{jsx as a}from"react/jsx-runtime";var o=[`circle`],s=i(function(i,s){let{label:c,id:l,name:u,error:d,hint:f,shape:p,className:m=``,...h}=i;n(`AppCheckbox`,h),t(`AppCheckbox`,`shape`,p,o);let g=p===`circle`?`form-check form-check-circle`:`form-check`;return a(r,{rootProps:e(`AppCheckbox`,i),ref:s,label:c,id:l,name:u,error:d,hint:f,className:m,rest:h,inputType:`checkbox`,wrapperClass:g})});export{s 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{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s={sm:` wui-struct-card-sm`,md:``,lg:` wui-struct-card-lg`},c={inline:``,stacked:` wui-struct-card-stacked`},l={sm:16,md:18,lg:22};function
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s={sm:` wui-struct-card-sm`,md:``,lg:` wui-struct-card-lg`},c={inline:``,stacked:` wui-struct-card-stacked`},l={filled:` wui-struct-card-filled`},u={sm:16,md:18,lg:22};function d(d){let{name:f,multiple:p=!1,value:m,checked:h,onChange:g,icon:_,iconNode:v,iconSize:y,image:b,imageAlt:x=``,children:S,title:C,description:w,checkIcon:T=`check`,checkSize:E=18,hideCheck:D=!1,disabled:O=!1,size:k=`md`,layout:A=`inline`,selectedStyle:j,className:M=``,...N}=d;n(`AppChoiceCard`,N),t(`AppChoiceCard`,`size`,k,Object.keys(s)),t(`AppChoiceCard`,`layout`,A,Object.keys(c)),t(`AppChoiceCard`,`selectedStyle`,j,Object.keys(l));let P=s[k]??``,F=c[A]??``,I=l[j]??``,L=y??u[k]??u.md;return o(`label`,{className:`struct-card${b?` struct-card-img-card`:``}${P}${F}${I}${D?` wui-struct-card-no-check`:``}${M?` ${M}`:``}`,"aria-disabled":O||void 0,...e(`AppChoiceCard`,d),...N,children:[a(`input`,{type:p?`checkbox`:`radio`,name:f,value:m,className:`struct-card-input`,checked:h,onChange:g,disabled:O}),b?a(`span`,{className:`struct-card-media`,children:a(`img`,{className:`struct-card-img`,src:b,alt:x})}):v||_?a(`span`,{className:`struct-card-ic`,children:v||o(i,{children:[a(`span`,{className:`wui-struct-card-glyph`,children:a(r,{name:_,size:L})}),a(`span`,{className:`wui-struct-card-glyph-on`,children:a(r,{name:_,size:L,variant:`bold`})})]})}):null,a(`span`,{className:`struct-card-body`,children:S||o(i,{children:[C&&a(`span`,{className:`struct-card-title`,children:C}),w&&a(`span`,{className:`struct-card-desc`,children:w})]})}),!D&&a(`span`,{className:`struct-card-check`,children:a(r,{name:T,size:E})})]})}export{d as default};
|
|
@@ -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{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,
|
|
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,allowReplies:b=!0,allowReactions:x=!0,composerPlaceholder:S,readOnly:C=!1,label:w=h.listName,id:T,className:E=``,...D}=n;t(`AppCommentThread`,D);let O=u(),k=T||`comment-thread-${O.replace(/[^a-zA-Z0-9_-]/g,``)}`,A=d(null),j=typeof v==`function`,M=y?.length?y:m,N=d(null);return N.current={onPost:i,onReply:a,onEdit:o,onDelete:s,onReact:c,loadPeople:v},l(()=>{let e=A.current;if(e)return e.submit=async({intent:e,commentId:t,parentId:n,body:r,emoji:i})=>{let a=N.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=A.current;!e||j||(e.people=g||[])},[g,j]),l(()=>{let e=A.current;if(!e||!j)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 N.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)},[j]),p(`wui-comment-thread`,{ref:A,id:k,class:E?`wui-comment-thread ${E}`:`wui-comment-thread`,controlled:``,"read-only":C?``:void 0,remote:j?``:void 0,"reaction-choices":y?.length?y.join(` `):void 0,"no-replies":b?void 0:``,"no-reactions":x?void 0:``,"composer-placeholder":S,...e(`AppCommentThread`,n),...D,children:[f(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:r.length?f(`ol`,{className:`wui-comment-list`,"aria-label":w,children:r.map(e=>f(_,{comment:e,topLevel:!0,readOnly:C,allowReplies:b,allowReactions:x},e.id))}):f(`p`,{className:`wui-comment-empty`,children:h.empty})}),!C&&x&&f(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":h.pickerName,"data-wui-picker":``,hidden:!0,children:M.map(e=>f(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!C&&p(`div`,{className:`wui-comment-composer`,"data-wui-composer":``,children:[f(`wui-mention-input`,{id:`${k}-new`,class:`wui-mention-input`,label:h.composerLabel,placeholder:S??h.composerPlaceholder,rows:`3`,remote:j?``: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,allowReplies:u,allowReactions:d}){let{id:m,author:g,at:v,value:y,edited:b,deleted:x,canEdit:S,canDelete:C,reactions:w=[],replies:T=[]}=e,E=g?.name||``,D=s(v),O=!l&&!x&&S,k=!l&&!x&&C,A=t&&u;return p(`li`,{className:`wui-comment`,"data-wui-comment":m,"data-value":y??``,"data-wui-deleted":x?``: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(E)||`?`}),g?.src&&f(`img`,{className:`avatar-img`,src:g.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:E}),f(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(D)?new Date(D).toISOString():void 0,children:a(v,{pattern:`datetime`})}),b&&!x&&f(`span`,{className:`wui-comment-edited`,children:h.edited})]}),x?f(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:h.deleted}):f(`div`,{className:`wui-comment-text`,"data-wui-text":``,children:i(y).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))}),O&&f(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),d&&!x&&(w.length>0||!l)&&p(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":h.reactions,children:[w.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&&!x&&(A||O||k)&&p(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[A&&f(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:h.reply}),O&&f(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:h.edit}),k&&f(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:h.delete})]}),k&&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&&T.length>0&&f(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":h.repliesName(E),children:T.map(e=>f(_,{comment:e,readOnly:l,allowReactions:d},e.id))}),A&&!l&&!x&&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{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./AppIcon.js";import a from"./AppAvatar.js";import{navMatchScore as o}from"../lib/navMatch.js";import{SHELL_FOLDED_COOKIE as s,readNavFolded as c,readShellCollapsed as l,writeNavFolded as u,writeShellCollapsed as d}from"../lib/shellCookie.js";import{initScrollEdges as f}from"@webority/ui-elements/helpers";import{useEffect as p,useId as m,useMemo as h,useRef as g,useState as _}from"react";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";var x=99,S=4,C=5,w=/^[a-z0-9-]+$/,T=[`prefix`,`exact`],E=[`comfortable`,`compact`],D=[`default`,`primary`],O=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],k=new Set([`key`,`label`,`icon`,`iconVariant`,`iconSize`,`href`,`badge`,`badgeTone`,`badgeTitle`,`trailingIcon`,`active`,`match`,`matchAlso`,`tab`,`tabLabel`,`children`]),A=e=>e>x?`${x}+`:String(e);function j(t){let{groups:a=[],brand:o,sidebarStart:m,sidebarStartCompact:v,sidebarFooter:x,topbarStart:S,topbarEnd:C,footer:w,launcher:T,children:k,collapsed:A,onCollapsedChange:j,noSidebar:N=!1,density:P=`comfortable`,itemHeight:F,iconVariant:I,topbarTone:L=`default`,navLabel:B=`Main navigation`,linkComponent:V,currentPath:H,rememberCollapsed:U=!1,collapsedCookie:W=`wui-shell-collapsed`,foldedCookie:G=s,tabBarLabel:ae=`Quick navigation`,moreLabel:oe=`More`,userMenu:K,notifications:q,search:se,className:ce=``,style:le,...ue}=t;r(`AppShell`,ue),n(`AppShell`,`density`,P,E),n(`AppShell`,`topbarTone`,L,D),n(`AppShell`,`iconVariant`,I,O);let de=F>0?{...le,"--wui-nav-item-height":`${F}px`}:le,[fe,pe]=_(()=>U&&A===void 0&&typeof document<`u`?l(W)??!1:!1),[J,Y]=_(!1),[me,he]=_(!1),[ge,_e]=_(!1),X=g(null),Z=A??fe,ve=()=>{let e=!Z;A===void 0&&pe(e),U&&d(e,W),j?.(e)},ye=a.some(e=>e.collapsible),[be,xe]=_(()=>ye&&typeof document<`u`?c(G):new Set),Se=e=>{let t=new Set(be);t.has(e)?t.delete(e):t.add(e),xe(t),u(t,G)},Q=h(()=>M(a,H),[a,H]),$=N?null:ee(Q);return p(()=>{let e=()=>he(window.scrollY>4);return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),p(()=>{f()},[]),p(()=>{let e=X.current,t=e?.querySelector(`.app-nav-item[aria-current="page"]`);if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();n.top<r.top?e.scrollTop-=r.top-n.top:n.bottom>r.bottom&&(e.scrollTop+=n.bottom-r.bottom)},[]),p(()=>{let e=X.current;if(!e)return;let t=()=>_e(e.scrollHeight>e.clientHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[Q]),p(()=>{if(!J)return;let e=e=>{e.key===`Escape`&&Y(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[J]),b(`div`,{className:[`app-shell`,Z?`collapsed`:``,N?`no-sidebar`:``,J?`mobile-open`:``,ce].filter(Boolean).join(` `),"data-density":P===`compact`?`compact`:void 0,"data-wui-folded-cookie":ye?G:void 0,style:de,...e(`AppShell`,t),...ue,children:[y(`a`,{className:`wui-skip-link`,href:`#main-content`,children:`Skip to content`}),b(`aside`,{className:`app-sidebar`,children:[o&&y(`div`,{className:`app-sidebar-brand`,children:o}),m&&y(`div`,{className:`app-sidebar-start`,children:m}),v&&y(`div`,{className:`app-sidebar-start-compact`,children:v}),y(`nav`,{className:`app-sidebar-scroll`,"aria-label":B,ref:X,tabIndex:ge?0:void 0,children:Q.map((e,t)=>{let n=e.items.map(e=>e.header==null?y(z,{item:e,linkComponent:V,onNavigate:()=>Y(!1),iconVariant:I},e.key??e.href??e.label):y(`div`,{className:`wui-nav-header`,children:e.header},e.key??e.header));if(!e.collapsible)return b(`div`,{className:`app-nav-group`,children:[e.label&&y(`div`,{className:`app-nav-group-label`,children:e.label}),n,e.after&&y(`div`,{className:`wui-nav-group-after`,children:e.after})]},e.key??e.label??`group-${t}`);let r=!be.has(e.key)||!!R(e.items),a=`wui-nav-group-${e.key}`;return b(`div`,{className:`app-nav-group wui-nav-group-collapsible${r?``:` wui-nav-group-folded`}`,"data-wui-nav-group":e.key,children:[b(`button`,{type:`button`,className:`app-nav-group-label wui-nav-group-toggle`,"aria-expanded":r,"aria-controls":a,onClick:()=>Se(e.key),children:[y(`span`,{className:`wui-nav-group-text`,children:e.label}),y(`span`,{className:`wui-nav-group-caret`,children:y(i,{name:`chevron-down`,size:16})})]}),b(`div`,{className:`wui-nav-group-body`,id:a,children:[n,e.after&&y(`div`,{className:`wui-nav-group-after`,children:e.after})]})]},e.key??`group-${t}`)})}),x&&y(`div`,{className:`app-sidebar-foot`,children:x}),!N&&y(`button`,{type:`button`,className:`app-sidebar-toggle`,onClick:ve,"aria-label":Z?`Expand navigation`:`Collapse navigation`,"aria-expanded":!Z,children:y(i,{name:`chevrons-left`,size:20})})]}),b(`div`,{className:`app-main`,children:[b(`header`,{className:`app-topbar${me?` scrolled`:``}`,"data-tone":L===`primary`?`primary`:void 0,children:[b(`div`,{className:`app-topbar-start`,children:[y(`button`,{type:`button`,className:`app-topbar-menu`,onClick:()=>Y(!0),"aria-label":`Open navigation`,"aria-expanded":J,children:y(i,{name:`menu`,size:18})}),S,se&&y(ie,{config:se})]}),b(`div`,{className:`app-topbar-end`,children:[C,q&&y(re,{config:q}),K&&y(ne,{config:K,linkComponent:V})]})]}),y(`main`,{className:`app-content`,id:`main-content`,children:k}),w&&y(`footer`,{className:`app-footer`,children:w})]}),T&&y(`div`,{className:`wui-shell-launcher`,children:T}),$&&b(`nav`,{className:`wui-tabbar`,"aria-label":ae,children:[$.tabs.map(e=>y(te,{tab:e,linkComponent:V,iconVariant:I},e.key??e.href)),$.hasMore&&b(`button`,{type:`button`,className:`wui-tabbar-item${$.moreActive?` active`:``}`,onClick:()=>Y(!0),children:[y(`span`,{className:`wui-tabbar-icon`,children:y(i,{name:`more`,size:24})}),y(`span`,{className:`wui-tabbar-label`,children:oe})]})]}),y(`button`,{type:`button`,className:`app-scrim`,onClick:()=>Y(!1),"aria-label":`Close navigation`,tabIndex:J?0:-1})]})}function M(e,t){for(let t of e)t.collapsible&&L(t);let i=(e,t=!1)=>(e??[]).map(e=>Array.isArray(e.children)?{...e,children:i(e.children)}:{...e}).filter(e=>P(e)?t:(e.children?.length??0)>0||!!e.href),a=e.map(e=>({...e,items:F(i(e.items,!0))})).filter(e=>e.items.some(e=>!P(e))),s=[],c=e=>{for(let t of e)P(t)||(s.push(t),t.children&&c(t.children))};for(let e of a)c(e.items);for(let e of s)r(`AppShell items`,N(e)),n(`AppShell`,`match`,e.match,T),n(`AppShell`,`iconVariant`,e.iconVariant,O);let l=null;if(t!=null&&!s.some(e=>e.active===!0)){let e=-1;for(let n of s){if(n.active!=null||n.children?.length&&!n.href)continue;let r=o(t,n.href,{exact:n.match===`exact`,also:n.matchAlso});if(r<0)continue;let i=n.match===`exact`&&o(t,n.href,{exact:!0})>=0?1/0:r;i>e&&(e=i,l=n)}}for(let e of s)e.active=e.active??e===l;return a}function N(e){return Object.fromEntries(Object.entries(e).filter(([e])=>!k.has(e)))}var P=e=>e.header!=null;function F(e){return e.filter((t,n)=>{if(!P(t))return!0;let r=e.findIndex((e,t)=>t>n&&P(e));return e.slice(n+1,r<0?void 0:r).length>0})}var I=new Set;function L(e){if(e.key!=null&&w.test(e.key))return;let n=e.key==null?`<AppShell> a collapsible group needs a key so its folded state can be remembered.`:`<AppShell> collapsible group key "${e.key}" must use lower-case letters, digits and hyphens.`,r=!0;try{r=process.env.NODE_ENV!==`production`}catch{r=!0}!r||I.has(n)||(I.add(n),t(n))}function ee(e){let t=[],n=e=>{for(let r of e)P(r)||(r.children?.length?n(r.children):t.push(r))};for(let t of e)n(t.items);let r=t.filter(e=>e.tab);if(r.length===0)return null;let i=r.length<t.length,a=i?S:C;if(r.length>a)throw Error(`<AppShell>: ${r.length} items carry tab: true, but the phone tab bar holds ${a} (${i?`4 plus More, because other items exist`:`5 when every item is a tab`}). Flag fewer items.`);return{tabs:r,hasMore:i,moreActive:t.some(e=>!e.tab&&e.active)}}function te({tab:e,linkComponent:t,iconVariant:n}){let r=`wui-tabbar-item${e.active?` active`:``}`,a=b(v,{children:[e.icon&&y(`span`,{className:`wui-tabbar-icon`,children:typeof e.icon==`string`?y(i,{name:e.icon,size:24,variant:e.iconVariant??n}):e.icon}),y(`span`,{className:`wui-tabbar-label`,children:e.tabLabel??e.label}),e.badge!=null&&y(`span`,{className:`wui-tabbar-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge})]}),o=e.active?`page`:void 0;return t?y(t,{className:r,to:e.href,"aria-current":o,children:a}):y(`a`,{className:r,href:e.href,"aria-current":o,children:a})}function R(e){for(let t of e){if(t.active)return t;let e=t.children?.length?R(t.children):void 0;if(e)return e}}function z({item:e,linkComponent:t,onNavigate:n,depth:r=0,iconVariant:a}){let o=r>0,s=r>1?` wui-nav-depth-${Math.min(r,6)}`:``,c=Array.isArray(e.children)&&e.children.length>0,l=c?R(e.children):void 0,u=!!l,d=l?l.key??l.href??l.label:null,[f,m]=_(u);p(()=>{d!=null&&m(!0)},[d]);let h=typeof e.label==`string`?e.label:void 0,g=!o&&e.icon&&y(`span`,{className:`app-nav-icon`,children:typeof e.icon==`string`?y(i,{name:e.icon,size:e.iconSize??22,variant:e.iconVariant??a}):e.icon}),x=e.badge!=null&&y(`span`,{className:`app-nav-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge}),S=b(v,{children:[g,y(`span`,{className:`app-nav-text`,children:e.label}),x,e.trailingIcon&&y(`span`,{className:`app-nav-trailing`,children:typeof e.trailingIcon==`string`?y(i,{name:e.trailingIcon,size:16}):e.trailingIcon})]}),C=e.active?`page`:void 0;if(c){let c=y(`div`,{className:`app-nav-sub${f?` expanded`:``}`,inert:!f,"aria-hidden":!f||void 0,children:y(`div`,{className:`app-nav-sub-inner`,children:e.children.map(e=>y(z,{item:e,linkComponent:t,onNavigate:n,depth:r+1,iconVariant:a},e.key??e.href))})});if(e.href){let r=t?y(t,{className:`wui-nav-split-link`,to:e.href,"aria-current":C,onClick:n,children:S}):y(`a`,{className:`wui-nav-split-link`,href:e.href,"aria-current":C,onClick:n,children:S});return b(v,{children:[b(`div`,{className:`app-nav-item has-children wui-nav-split${o?` app-nav-subitem`:``}${u||e.active?` active`:``}${s}`,"data-label":h,children:[r,y(`button`,{type:`button`,className:`app-nav-caret wui-nav-split-toggle`,"aria-expanded":f,"aria-label":`Show or hide ${h??``} pages`,onClick:()=>m(e=>!e),children:y(i,{name:`chevron-right`,size:16})})]}),c]})}return b(v,{children:[b(`button`,{type:`button`,className:`app-nav-item${o?` app-nav-subitem`:``} has-children${u?` active`:``}${s}`,"aria-expanded":f,"data-label":h,onClick:()=>m(e=>!e),children:[g,y(`span`,{className:`app-nav-text`,children:e.label}),x,y(`span`,{className:`app-nav-caret`,children:y(i,{name:`chevron-right`,size:16})})]}),c]})}let w=`app-nav-item${o?` app-nav-subitem`:``}${e.active?` active`:``}${s}`;return t?y(t,{className:w,to:e.href,"aria-current":C,"data-label":h,onClick:n,children:S}):y(`a`,{className:w,href:e.href,"aria-current":C,"data-label":h,onClick:n,children:S})}function B(){let[e,t]=_(!1),n=g(null);return p(()=>{if(!e)return;let r=e=>{n.current?.contains(e.target)||t(!1)},i=e=>{e.key===`Escape`&&(t(!1),n.current?.querySelector(`button`)?.focus())};return document.addEventListener(`mousedown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,r),document.removeEventListener(`keydown`,i)}},[e]),{open:e,setOpen:t,ref:n}}function ne({config:e,linkComponent:t}){let n=m(),{open:r,setOpen:o,ref:s}=B(),{name:c,role:l,roles:u=[],photo:d,profileHref:f,profileLabel:p=`My profile`,onLogout:h,logoutAction:g,logoutLabel:_=`Sign out`,items:x=[]}=e;if(!c)throw Error(`<AppShell> userMenu.name is required; the trigger and the avatar are named from it.`);let S=u.map(e=>(e??``).trim()).filter(Boolean),C=()=>o(!1),w=(e,n,r,i)=>t?y(t,{className:`dropdown-item`,to:e,onClick:i,children:n},r):y(`a`,{className:`dropdown-item`,href:e,onClick:i,children:n},r),T=b(v,{children:[y(i,{name:`log-out`,size:18}),_]});return b(`div`,{className:`dropdown wui-usermenu`,ref:s,children:[b(`button`,{type:`button`,id:n,className:`wui-usermenu-trigger`,"aria-expanded":r,"aria-label":`Account menu for ${c}`,onClick:()=>o(e=>!e),children:[y(a,{name:c,src:d,tone:`auto`}),b(`span`,{className:`wui-usermenu-text`,children:[y(`span`,{className:`wui-usermenu-name`,children:c}),l&&y(`span`,{className:`wui-usermenu-role`,children:l})]}),y(i,{name:`chevron-down`,size:14,className:`wui-usermenu-caret`})]}),b(`div`,{className:`dropdown-menu dropdown-menu-end wui-usermenu-menu${r?` show`:``}`,"aria-labelledby":n,"data-bs-popper":r?`static`:void 0,children:[b(`div`,{className:`wui-usermenu-head`,children:[y(a,{name:c,src:d,size:`lg`,tone:`auto`}),b(`div`,{className:`wui-usermenu-who`,children:[y(`div`,{className:`wui-usermenu-name`,children:c}),l&&y(`div`,{className:`wui-usermenu-role`,children:l}),S.length>0&&b(`div`,{className:`wui-usermenu-roles`,children:[y(`span`,{className:`wui-usermenu-roles-label`,children:S.length===1?`Role:`:`Roles:`}),` ${S.join(`, `)}`]})]})]}),f&&w(f,b(v,{children:[y(i,{name:`user`,size:18}),p]}),void 0,C),x.map(e=>{if(e.divider)return y(`hr`,{className:`dropdown-divider`},e.key);let t=b(v,{children:[e.icon&&y(i,{name:e.icon,size:18}),e.label]}),n=()=>{e.onClick?.(),C()};return e.href?w(e.href,t,e.key,n):y(`button`,{type:`button`,className:`dropdown-item`,onClick:n,children:t},e.key)}),g?y(`form`,{method:`post`,action:g,className:`wui-usermenu-logout`,children:y(`button`,{type:`submit`,className:`dropdown-item danger`,children:T})}):h&&y(`button`,{type:`button`,className:`dropdown-item danger`,onClick:()=>{C(),h()},children:T})]})]})}function re({config:e}){let t=m(),{open:n,setOpen:r,ref:a}=B(),{unread:o=0,items:s,loading:c=!1,onOpen:l,onMarkAllRead:u,viewAllHref:d,label:f=`Notifications`,emptyText:h=`You are all caught up.`}=e,[x,S]=_(``),C=g(o);p(()=>{C.current!==o&&(C.current=o,S(o===0?`No unread notifications`:`${A(o)} unread notifications`))},[o]);let w=null;return s?.length?w=y(`div`,{className:`wui-bell-items`,children:s.map((e,t)=>{let n=`wui-bell-item${e.read?` wui-bell-item-read`:``}`,r=b(v,{children:[y(`span`,{className:`wui-bell-dot`,"aria-hidden":`true`}),e.icon&&y(`span`,{className:`wui-bell-icon`,children:y(i,{name:e.icon,size:18})}),b(`span`,{className:`wui-bell-body`,children:[!e.read&&y(`span`,{className:`visually-hidden`,children:`Unread: `}),y(`span`,{className:`wui-bell-item-title`,children:e.title}),e.time&&y(`span`,{className:`wui-bell-when`,children:e.time})]})]});return e.href?y(`a`,{className:n,href:e.href,"data-id":e.id,children:r},e.id??t):y(`div`,{className:n,"data-id":e.id,children:r},e.id??t)})}):c?w=y(`div`,{className:`wui-bell-state`,children:`Loading…`}):s&&(w=y(`div`,{className:`wui-bell-state`,children:h})),b(`div`,{className:`dropdown wui-bell`,ref:a,children:[b(`button`,{type:`button`,id:t,className:`topbar-icon-btn wui-bell-trigger`,"aria-expanded":n,"aria-label":o===0?f:`${f}, ${A(o)} unread`,onClick:()=>{let e=!n;r(e),e&&l?.()},children:[y(i,{name:`notification`,size:20}),y(`span`,{className:`wui-bell-count`,"aria-hidden":`true`,hidden:o===0,children:A(o)})]}),y(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:x}),b(`div`,{className:`dropdown-menu dropdown-menu-end wui-bell-menu${n?` show`:``}`,"aria-labelledby":t,"data-bs-popper":n?`static`:void 0,children:[b(`div`,{className:`wui-bell-head`,children:[y(`span`,{className:`wui-bell-title`,children:f}),u&&y(`button`,{type:`button`,className:`wui-bell-markall`,onClick:u,children:`Mark all read`})]}),y(`div`,{className:`wui-bell-list`,"aria-busy":c||void 0,children:w}),d&&y(`a`,{className:`wui-bell-foot`,href:d,children:`View all`})]})]})}var V=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function ie({config:e}){let t=m(),{value:n=``,onChange:r,results:a=null,loading:o=!1,onSelect:s,onSubmit:c,placeholder:l=`Search`}=e,[u,d]=_(!1),[f,v]=_(!1),[x,S]=_({results:null,index:-1}),C=x.results===a?x.index:-1,w=e=>S({results:a,index:e}),T=g(null),E=g(null),D=g([]),O=h(()=>(a??[]).flatMap(e=>e.hits??[]),[a]),k=a!=null&&!f,A=O.length;p(()=>{let e=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||V(e.target)||(e.preventDefault(),d(!0),E.current?.focus())},t=e=>{T.current?.contains(e.target)||(v(!0),d(!1))};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t)}},[]);let j=e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(!k||A===0)return;e.preventDefault(),w((C+(e.key===`ArrowDown`?1:-1)+A)%A)}else e.key===`Enter`?k&&C>=0&&D.current[C]?(e.preventDefault(),D.current[C].click()):c&&n.trim()!==``&&(e.preventDefault(),c(n.trim())):e.key===`Escape`&&(k?(e.preventDefault(),v(!0)):u&&(e.preventDefault(),d(!1)))},M=-1;return D.current=[],b(`div`,{className:`wui-topsearch${u?` is-open`:``}${o?` is-loading`:``}`,ref:T,children:[y(`button`,{type:`button`,className:`topbar-icon-btn wui-topsearch-open`,"aria-label":l,"aria-expanded":u,"aria-controls":`${t}-panel`,onClick:()=>{let e=!u;d(e),e&&E.current?.focus()},children:y(i,{name:`search`,size:20})}),b(`div`,{className:`wui-topsearch-panel`,id:`${t}-panel`,children:[b(`div`,{className:`search-wrap`,children:[y(i,{name:`search`,size:18,className:`search-icon`}),y(`input`,{ref:E,type:`search`,className:`form-control input search-input`,id:`${t}-input`,placeholder:l,"aria-label":l,role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":k,"aria-controls":`${t}-list`,"aria-activedescendant":k&&C>=0?`${t}-opt-${C}`:void 0,autoComplete:`off`,value:n,onChange:e=>{v(!1),r?.(e.target.value)},onKeyDown:j})]}),y(`div`,{className:`wui-topsearch-results`,id:`${t}-list`,role:`listbox`,"aria-label":`Search results`,hidden:!k,children:k&&b(`div`,{className:`wui-topsearch-groups`,role:`presentation`,children:[A===0&&b(`div`,{className:`wui-topsearch-empty`,role:`option`,"aria-disabled":`true`,"aria-selected":`false`,children:[`No results for “`,n,`”`]}),a.filter(e=>e.hits?.length).map((e,n)=>b(`div`,{className:`wui-topsearch-group`,role:`group`,"aria-label":e.label??``,children:[e.label&&y(`div`,{className:`wui-topsearch-group-label`,role:`presentation`,children:e.label}),e.hits.map(e=>{M+=1;let n=M;return b(`a`,{className:`wui-topsearch-hit${n===C?` is-active`:``}`,role:`option`,"aria-selected":n===C,id:`${t}-opt-${n}`,href:e.href,ref:e=>{D.current[n]=e},onClick:t=>s?.(e,t),children:[e.icon&&y(`span`,{className:`wui-topsearch-hit-icon`,children:y(i,{name:e.icon,size:18})}),b(`span`,{className:`wui-topsearch-hit-text`,children:[y(`span`,{className:`wui-topsearch-hit-title`,children:e.title}),e.subtitle&&y(`span`,{className:`wui-topsearch-hit-sub`,children:e.subtitle})]})]},`${e.href}-${n}`)})]},e.label??n))]})})]}),y(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:k?A===0?`No results`:`${A} ${A===1?`result`:`results`}`:``})]})}export{j 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 a from"./AppAvatar.js";import{navMatchScore as o}from"../lib/navMatch.js";import{SHELL_FOLDED_COOKIE as s,readNavFolded as c,readShellCollapsed as l,writeNavFolded as u,writeShellCollapsed as d}from"../lib/shellCookie.js";import{initScrollEdges as f}from"@webority/ui-elements/helpers";import{useEffect as p,useId as m,useMemo as h,useRef as g,useState as _}from"react";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";var x=99,S=4,C=5,w=/^[a-z0-9-]+$/,T=[`prefix`,`exact`],E=[`comfortable`,`compact`],D=[`default`,`primary`],O=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],k=new Set([`key`,`label`,`icon`,`iconVariant`,`iconSize`,`href`,`badge`,`badgeTone`,`badgeTitle`,`newUntil`,`trailingIcon`,`active`,`match`,`matchAlso`,`tab`,`tabLabel`,`children`]),A=e=>e>x?`${x}+`:String(e),j=new Intl.DateTimeFormat(`en-CA`,{timeZone:`Asia/Kolkata`}),M=e=>{if(typeof e!=`string`||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isNaN(t.getTime())||t.toISOString().slice(0,10)!==e?!1:j.format(new Date)<=e};function N(t){let{groups:a=[],brand:o,sidebarStart:m,sidebarStartCompact:v,sidebarFooter:x,topbarStart:S,topbarEnd:C,footer:w,launcher:T,children:k,collapsed:A,onCollapsedChange:j,noSidebar:M=!1,density:N=`comfortable`,itemHeight:P,iconVariant:F,topbarTone:I=`default`,navLabel:L=`Main navigation`,linkComponent:R,currentPath:V,rememberCollapsed:H=!1,collapsedCookie:oe=`wui-shell-collapsed`,foldedCookie:U=s,tabBarLabel:se=`Quick navigation`,moreLabel:ce=`More`,userMenu:W,notifications:G,search:K,className:le=``,style:q,...ue}=t;r(`AppShell`,ue),n(`AppShell`,`density`,N,E),n(`AppShell`,`topbarTone`,I,D),n(`AppShell`,`iconVariant`,F,O);let de=P>0?{...q,"--wui-nav-item-height":`${P}px`}:q,[fe,pe]=_(()=>H&&A===void 0&&typeof document<`u`?l(oe)??!1:!1),[J,Y]=_(!1),[me,he]=_(!1),[ge,_e]=_(!1),X=g(null),Z=A??fe,ve=()=>{let e=!Z;A===void 0&&pe(e),H&&d(e,oe),j?.(e)},ye=a.some(e=>e.collapsible),[be,xe]=_(()=>ye&&typeof document<`u`?c(U):new Set),Se=e=>{let t=new Set(be);t.has(e)?t.delete(e):t.add(e),xe(t),u(t,U)},Q=h(()=>ee(a,V),[a,V]),$=M?null:te(Q);return p(()=>{let e=()=>he(window.scrollY>4);return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),p(()=>{f()},[]),p(()=>{let e=X.current,t=e?.querySelector(`.app-nav-item[aria-current="page"]`);if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();n.top<r.top?e.scrollTop-=r.top-n.top:n.bottom>r.bottom&&(e.scrollTop+=n.bottom-r.bottom)},[]),p(()=>{let e=X.current;if(!e)return;let t=()=>_e(e.scrollHeight>e.clientHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[Q]),p(()=>{if(!J)return;let e=e=>{e.key===`Escape`&&Y(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[J]),b(`div`,{className:[`app-shell`,Z?`collapsed`:``,M?`no-sidebar`:``,J?`mobile-open`:``,le].filter(Boolean).join(` `),"data-density":N===`compact`?`compact`:void 0,"data-wui-folded-cookie":ye?U:void 0,style:de,...e(`AppShell`,t),...ue,children:[y(`a`,{className:`wui-skip-link`,href:`#main-content`,children:`Skip to content`}),b(`aside`,{className:`app-sidebar`,children:[o&&y(`div`,{className:`app-sidebar-brand`,children:o}),m&&y(`div`,{className:`app-sidebar-start`,children:m}),v&&y(`div`,{className:`app-sidebar-start-compact`,children:v}),y(`nav`,{className:`app-sidebar-scroll`,"aria-label":L,ref:X,tabIndex:ge?0:void 0,children:Q.map((e,t)=>{let n=e.items.map(e=>e.header==null?y(B,{item:e,linkComponent:R,onNavigate:()=>Y(!1),iconVariant:F},e.key??e.href??e.label):y(`div`,{className:`wui-nav-header`,children:e.header},e.key??e.header));if(!e.collapsible)return b(`div`,{className:`app-nav-group`,children:[e.label&&y(`div`,{className:`app-nav-group-label`,children:e.label}),n,e.after&&y(`div`,{className:`wui-nav-group-after`,children:e.after})]},e.key??e.label??`group-${t}`);let r=!be.has(e.key)||!!z(e.items),a=`wui-nav-group-${e.key}`;return b(`div`,{className:`app-nav-group wui-nav-group-collapsible${r?``:` wui-nav-group-folded`}`,"data-wui-nav-group":e.key,children:[b(`button`,{type:`button`,className:`app-nav-group-label wui-nav-group-toggle`,"aria-expanded":r,"aria-controls":a,onClick:()=>Se(e.key),children:[y(`span`,{className:`wui-nav-group-text`,children:e.label}),y(`span`,{className:`wui-nav-group-caret`,children:y(i,{name:`chevron-down`,size:16})})]}),b(`div`,{className:`wui-nav-group-body`,id:a,children:[n,e.after&&y(`div`,{className:`wui-nav-group-after`,children:e.after})]})]},e.key??`group-${t}`)})}),x&&y(`div`,{className:`app-sidebar-foot`,children:x}),!M&&y(`button`,{type:`button`,className:`app-sidebar-toggle`,onClick:ve,"aria-label":Z?`Expand navigation`:`Collapse navigation`,"aria-expanded":!Z,children:y(i,{name:`chevrons-left`,size:20})})]}),b(`div`,{className:`app-main`,children:[b(`header`,{className:`app-topbar${me?` scrolled`:``}`,"data-tone":I===`primary`?`primary`:void 0,children:[b(`div`,{className:`app-topbar-start`,children:[y(`button`,{type:`button`,className:`app-topbar-menu`,onClick:()=>Y(!0),"aria-label":`Open navigation`,"aria-expanded":J,children:y(i,{name:`menu`,size:18})}),S,K&&y(ae,{config:K})]}),b(`div`,{className:`app-topbar-end`,children:[C,G&&y(ie,{config:G}),W&&y(re,{config:W,linkComponent:R})]})]}),y(`main`,{className:`app-content`,id:`main-content`,children:k}),w&&y(`footer`,{className:`app-footer`,children:w})]}),T&&y(`div`,{className:`wui-shell-launcher`,children:T}),$&&b(`nav`,{className:`wui-tabbar`,"aria-label":se,children:[$.tabs.map(e=>y(ne,{tab:e,linkComponent:R,iconVariant:F},e.key??e.href)),$.hasMore&&b(`button`,{type:`button`,className:`wui-tabbar-item${$.moreActive?` active`:``}`,onClick:()=>Y(!0),children:[y(`span`,{className:`wui-tabbar-icon`,children:y(i,{name:`more`,size:24})}),y(`span`,{className:`wui-tabbar-label`,children:ce})]})]}),y(`button`,{type:`button`,className:`app-scrim`,onClick:()=>Y(!1),"aria-label":`Close navigation`,tabIndex:J?0:-1})]})}function ee(e,t){for(let t of e)t.collapsible&&R(t);let i=(e,t=!1)=>(e??[]).map(e=>Array.isArray(e.children)?{...e,children:i(e.children)}:{...e}).filter(e=>F(e)?t:(e.children?.length??0)>0||!!e.href),a=e.map(e=>({...e,items:I(i(e.items,!0))})).filter(e=>e.items.some(e=>!F(e))),s=[],c=e=>{for(let t of e)F(t)||(s.push(t),t.children&&c(t.children))};for(let e of a)c(e.items);for(let e of s)r(`AppShell items`,P(e)),n(`AppShell`,`match`,e.match,T),n(`AppShell`,`iconVariant`,e.iconVariant,O);let l=null;if(t!=null&&!s.some(e=>e.active===!0)){let e=-1;for(let n of s){if(n.active!=null||n.children?.length&&!n.href)continue;let r=o(t,n.href,{exact:n.match===`exact`,also:n.matchAlso});if(r<0)continue;let i=n.match===`exact`&&o(t,n.href,{exact:!0})>=0?1/0:r;i>e&&(e=i,l=n)}}for(let e of s)e.active=e.active??e===l;return a}function P(e){return Object.fromEntries(Object.entries(e).filter(([e])=>!k.has(e)))}var F=e=>e.header!=null;function I(e){return e.filter((t,n)=>{if(!F(t))return!0;let r=e.findIndex((e,t)=>t>n&&F(e));return e.slice(n+1,r<0?void 0:r).length>0})}var L=new Set;function R(e){if(e.key!=null&&w.test(e.key))return;let n=e.key==null?`<AppShell> a collapsible group needs a key so its folded state can be remembered.`:`<AppShell> collapsible group key "${e.key}" must use lower-case letters, digits and hyphens.`,r=!0;try{r=process.env.NODE_ENV!==`production`}catch{r=!0}!r||L.has(n)||(L.add(n),t(n))}function te(e){let t=[],n=e=>{for(let r of e)F(r)||(r.children?.length?n(r.children):t.push(r))};for(let t of e)n(t.items);let r=t.filter(e=>e.tab);if(r.length===0)return null;let i=r.length<t.length,a=i?S:C;if(r.length>a)throw Error(`<AppShell>: ${r.length} items carry tab: true, but the phone tab bar holds ${a} (${i?`4 plus More, because other items exist`:`5 when every item is a tab`}). Flag fewer items.`);return{tabs:r,hasMore:i,moreActive:t.some(e=>!e.tab&&e.active)}}function ne({tab:e,linkComponent:t,iconVariant:n}){let r=`wui-tabbar-item${e.active?` active`:``}`,a=b(v,{children:[e.icon&&y(`span`,{className:`wui-tabbar-icon`,children:typeof e.icon==`string`?y(i,{name:e.icon,size:24,variant:e.iconVariant??n}):e.icon}),y(`span`,{className:`wui-tabbar-label`,children:e.tabLabel??e.label}),e.badge!=null&&y(`span`,{className:`wui-tabbar-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge})]}),o=e.active?`page`:void 0;return t?y(t,{className:r,to:e.href,"aria-current":o,children:a}):y(`a`,{className:r,href:e.href,"aria-current":o,children:a})}function z(e){for(let t of e){if(t.active)return t;let e=t.children?.length?z(t.children):void 0;if(e)return e}}function B({item:e,linkComponent:t,onNavigate:n,depth:r=0,iconVariant:a}){let o=r>0,s=r>1?` wui-nav-depth-${Math.min(r,6)}`:``,c=Array.isArray(e.children)&&e.children.length>0,l=c?z(e.children):void 0,u=!!l,d=l?l.key??l.href??l.label:null,[f,m]=_(u);p(()=>{d!=null&&m(!0)},[d]);let h=typeof e.label==`string`?e.label:void 0,g=!o&&e.icon&&y(`span`,{className:`app-nav-icon`,children:typeof e.icon==`string`?y(i,{name:e.icon,size:e.iconSize??22,variant:e.iconVariant??a}):e.icon}),x=e.badge!=null&&y(`span`,{className:`app-nav-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge}),S=M(e.newUntil)&&y(`span`,{className:`wui-nav-new`,children:`New`}),C=b(v,{children:[g,y(`span`,{className:`app-nav-text`,children:e.label}),S,x,e.trailingIcon&&y(`span`,{className:`app-nav-trailing`,children:typeof e.trailingIcon==`string`?y(i,{name:e.trailingIcon,size:16}):e.trailingIcon})]}),w=e.active?`page`:void 0;if(c){let c=y(`div`,{className:`app-nav-sub${f?` expanded`:``}`,inert:!f,"aria-hidden":!f||void 0,children:y(`div`,{className:`app-nav-sub-inner`,children:e.children.map(e=>y(B,{item:e,linkComponent:t,onNavigate:n,depth:r+1,iconVariant:a},e.key??e.href))})});if(e.href){let r=t?y(t,{className:`wui-nav-split-link`,to:e.href,"aria-current":w,onClick:n,children:C}):y(`a`,{className:`wui-nav-split-link`,href:e.href,"aria-current":w,onClick:n,children:C});return b(v,{children:[b(`div`,{className:`app-nav-item has-children wui-nav-split${o?` app-nav-subitem`:``}${u||e.active?` active`:``}${s}`,"data-label":h,children:[r,y(`button`,{type:`button`,className:`app-nav-caret wui-nav-split-toggle`,"aria-expanded":f,"aria-label":`Show or hide ${h??``} pages`,onClick:()=>m(e=>!e),children:y(i,{name:`chevron-right`,size:16})})]}),c]})}return b(v,{children:[b(`button`,{type:`button`,className:`app-nav-item${o?` app-nav-subitem`:``} has-children${u?` active`:``}${s}`,"aria-expanded":f,"data-label":h,onClick:()=>m(e=>!e),children:[g,y(`span`,{className:`app-nav-text`,children:e.label}),S,x,y(`span`,{className:`app-nav-caret`,children:y(i,{name:`chevron-right`,size:16})})]}),c]})}let T=`app-nav-item${o?` app-nav-subitem`:``}${e.active?` active`:``}${s}`;return t?y(t,{className:T,to:e.href,"aria-current":w,"data-label":h,onClick:n,children:C}):y(`a`,{className:T,href:e.href,"aria-current":w,"data-label":h,onClick:n,children:C})}function V(){let[e,t]=_(!1),n=g(null);return p(()=>{if(!e)return;let r=e=>{n.current?.contains(e.target)||t(!1)},i=e=>{e.key===`Escape`&&(t(!1),n.current?.querySelector(`button`)?.focus())};return document.addEventListener(`mousedown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,r),document.removeEventListener(`keydown`,i)}},[e]),{open:e,setOpen:t,ref:n}}function re({config:e,linkComponent:t}){let n=m(),{open:r,setOpen:o,ref:s}=V(),{name:c,role:l,roles:u=[],photo:d,profileHref:f,profileLabel:p=`My profile`,onLogout:h,logoutAction:g,logoutLabel:_=`Sign out`,items:x=[]}=e;if(!c)throw Error(`<AppShell> userMenu.name is required; the trigger and the avatar are named from it.`);let S=u.map(e=>(e??``).trim()).filter(Boolean),C=()=>o(!1),w=(e,n,r,i)=>t?y(t,{className:`dropdown-item`,to:e,onClick:i,children:n},r):y(`a`,{className:`dropdown-item`,href:e,onClick:i,children:n},r),T=b(v,{children:[y(i,{name:`log-out`,size:18}),_]});return b(`div`,{className:`dropdown wui-usermenu`,ref:s,children:[b(`button`,{type:`button`,id:n,className:`wui-usermenu-trigger`,"aria-expanded":r,"aria-label":`Account menu for ${c}`,onClick:()=>o(e=>!e),children:[y(a,{name:c,src:d,tone:`auto`}),b(`span`,{className:`wui-usermenu-text`,children:[y(`span`,{className:`wui-usermenu-name`,children:c}),l&&y(`span`,{className:`wui-usermenu-role`,children:l})]}),y(i,{name:`chevron-down`,size:14,className:`wui-usermenu-caret`})]}),b(`div`,{className:`dropdown-menu dropdown-menu-end wui-usermenu-menu${r?` show`:``}`,"aria-labelledby":n,"data-bs-popper":r?`static`:void 0,children:[b(`div`,{className:`wui-usermenu-head`,children:[y(a,{name:c,src:d,size:`lg`,tone:`auto`}),b(`div`,{className:`wui-usermenu-who`,children:[y(`div`,{className:`wui-usermenu-name`,children:c}),l&&y(`div`,{className:`wui-usermenu-role`,children:l}),S.length>0&&b(`div`,{className:`wui-usermenu-roles`,children:[y(`span`,{className:`wui-usermenu-roles-label`,children:S.length===1?`Role:`:`Roles:`}),` ${S.join(`, `)}`]})]})]}),f&&w(f,b(v,{children:[y(i,{name:`user`,size:18}),p]}),void 0,C),x.map(e=>{if(e.divider)return y(`hr`,{className:`dropdown-divider`},e.key);let t=b(v,{children:[e.icon&&y(i,{name:e.icon,size:18}),e.label]}),n=()=>{e.onClick?.(),C()};return e.href?w(e.href,t,e.key,n):y(`button`,{type:`button`,className:`dropdown-item`,onClick:n,children:t},e.key)}),g?y(`form`,{method:`post`,action:g,className:`wui-usermenu-logout`,children:y(`button`,{type:`submit`,className:`dropdown-item danger`,children:T})}):h&&y(`button`,{type:`button`,className:`dropdown-item danger`,onClick:()=>{C(),h()},children:T})]})]})}function ie({config:e}){let t=m(),{open:n,setOpen:r,ref:a}=V(),{unread:o=0,items:s,loading:c=!1,onOpen:l,onMarkAllRead:u,viewAllHref:d,label:f=`Notifications`,emptyText:h=`You are all caught up.`}=e,[x,S]=_(``),C=g(o);p(()=>{C.current!==o&&(C.current=o,S(o===0?`No unread notifications`:`${A(o)} unread notifications`))},[o]);let w=null;return s?.length?w=y(`div`,{className:`wui-bell-items`,children:s.map((e,t)=>{let n=`wui-bell-item${e.read?` wui-bell-item-read`:``}`,r=b(v,{children:[y(`span`,{className:`wui-bell-dot`,"aria-hidden":`true`}),e.icon&&y(`span`,{className:`wui-bell-icon`,children:y(i,{name:e.icon,size:18})}),b(`span`,{className:`wui-bell-body`,children:[!e.read&&y(`span`,{className:`visually-hidden`,children:`Unread: `}),y(`span`,{className:`wui-bell-item-title`,children:e.title}),e.time&&y(`span`,{className:`wui-bell-when`,children:e.time})]})]});return e.href?y(`a`,{className:n,href:e.href,"data-id":e.id,children:r},e.id??t):y(`div`,{className:n,"data-id":e.id,children:r},e.id??t)})}):c?w=y(`div`,{className:`wui-bell-state`,children:`Loading…`}):s&&(w=y(`div`,{className:`wui-bell-state`,children:h})),b(`div`,{className:`dropdown wui-bell`,ref:a,children:[b(`button`,{type:`button`,id:t,className:`topbar-icon-btn wui-bell-trigger`,"aria-expanded":n,"aria-label":o===0?f:`${f}, ${A(o)} unread`,onClick:()=>{let e=!n;r(e),e&&l?.()},children:[y(i,{name:`notification`,size:20}),y(`span`,{className:`wui-bell-count`,"aria-hidden":`true`,hidden:o===0,children:A(o)})]}),y(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:x}),b(`div`,{className:`dropdown-menu dropdown-menu-end wui-bell-menu${n?` show`:``}`,"aria-labelledby":t,"data-bs-popper":n?`static`:void 0,children:[b(`div`,{className:`wui-bell-head`,children:[y(`span`,{className:`wui-bell-title`,children:f}),u&&y(`button`,{type:`button`,className:`wui-bell-markall`,onClick:u,children:`Mark all read`})]}),y(`div`,{className:`wui-bell-list`,"aria-busy":c||void 0,children:w}),d&&y(`a`,{className:`wui-bell-foot`,href:d,children:`View all`})]})]})}var H=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function ae({config:e}){let t=m(),{value:n=``,onChange:r,results:a=null,loading:o=!1,onSelect:s,onSubmit:c,placeholder:l=`Search`}=e,[u,d]=_(!1),[f,v]=_(!1),[x,S]=_({results:null,index:-1}),C=x.results===a?x.index:-1,w=e=>S({results:a,index:e}),T=g(null),E=g(null),D=g([]),O=h(()=>(a??[]).flatMap(e=>e.hits??[]),[a]),k=a!=null&&!f,A=O.length;p(()=>{let e=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||H(e.target)||(e.preventDefault(),d(!0),E.current?.focus())},t=e=>{T.current?.contains(e.target)||(v(!0),d(!1))};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t)}},[]);let j=e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(!k||A===0)return;e.preventDefault(),w((C+(e.key===`ArrowDown`?1:-1)+A)%A)}else e.key===`Enter`?k&&C>=0&&D.current[C]?(e.preventDefault(),D.current[C].click()):c&&n.trim()!==``&&(e.preventDefault(),c(n.trim())):e.key===`Escape`&&(k?(e.preventDefault(),v(!0)):u&&(e.preventDefault(),d(!1)))},M=-1;return D.current=[],b(`div`,{className:`wui-topsearch${u?` is-open`:``}${o?` is-loading`:``}`,ref:T,children:[y(`button`,{type:`button`,className:`topbar-icon-btn wui-topsearch-open`,"aria-label":l,"aria-expanded":u,"aria-controls":`${t}-panel`,onClick:()=>{let e=!u;d(e),e&&E.current?.focus()},children:y(i,{name:`search`,size:20})}),b(`div`,{className:`wui-topsearch-panel`,id:`${t}-panel`,children:[b(`div`,{className:`search-wrap`,children:[y(i,{name:`search`,size:18,className:`search-icon`}),y(`input`,{ref:E,type:`search`,className:`form-control input search-input`,id:`${t}-input`,placeholder:l,"aria-label":l,role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":k,"aria-controls":`${t}-list`,"aria-activedescendant":k&&C>=0?`${t}-opt-${C}`:void 0,autoComplete:`off`,value:n,onChange:e=>{v(!1),r?.(e.target.value)},onKeyDown:j})]}),y(`div`,{className:`wui-topsearch-results`,id:`${t}-list`,role:`listbox`,"aria-label":`Search results`,hidden:!k,children:k&&b(`div`,{className:`wui-topsearch-groups`,role:`presentation`,children:[A===0&&b(`div`,{className:`wui-topsearch-empty`,role:`option`,"aria-disabled":`true`,"aria-selected":`false`,children:[`No results for “`,n,`”`]}),a.filter(e=>e.hits?.length).map((e,n)=>b(`div`,{className:`wui-topsearch-group`,role:`group`,"aria-label":e.label??``,children:[e.label&&y(`div`,{className:`wui-topsearch-group-label`,role:`presentation`,children:e.label}),e.hits.map(e=>{M+=1;let n=M;return b(`a`,{className:`wui-topsearch-hit${n===C?` is-active`:``}`,role:`option`,"aria-selected":n===C,id:`${t}-opt-${n}`,href:e.href,ref:e=>{D.current[n]=e},onClick:t=>s?.(e,t),children:[e.icon&&y(`span`,{className:`wui-topsearch-hit-icon`,children:y(i,{name:e.icon,size:18})}),b(`span`,{className:`wui-topsearch-hit-text`,children:[y(`span`,{className:`wui-topsearch-hit-title`,children:e.title}),e.subtitle&&y(`span`,{className:`wui-topsearch-hit-sub`,children:e.subtitle})]})]},`${e.href}-${n}`)})]},e.label??n))]})})]}),y(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:k?A===0?`No results`:`${A} ${A===1?`result`:`results`}`:``})]})}export{N as default};
|
package/dist/guidance.json
CHANGED
|
@@ -16,6 +16,8 @@ declare const AppCheckbox: import("react").ForwardRefExoticComponent<{
|
|
|
16
16
|
error?: string;
|
|
17
17
|
/** Helper text below the control. Hidden while an error is shown. */
|
|
18
18
|
hint?: string;
|
|
19
|
+
/** circle draws a round box with the tick inside, for a task that is completed. Omit it for the square box. */
|
|
20
|
+
shape?: 'circle';
|
|
19
21
|
/**
|
|
20
22
|
* Extra classes on the element.
|
|
21
23
|
* @default ""
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* @param {boolean} [props.disabled]
|
|
22
22
|
* @param {'sm'|'md'|'lg'} [props.size]
|
|
23
23
|
* @param {'inline'|'stacked'} [props.layout]
|
|
24
|
+
* @param {'filled'} [props.selectedStyle] `filled` fills the checked card's icon disc with primary.
|
|
24
25
|
* @param {string} [props.className]
|
|
25
26
|
*/
|
|
26
27
|
export default function AppChoiceCard(props: {
|
|
@@ -84,6 +85,8 @@ export default function AppChoiceCard(props: {
|
|
|
84
85
|
* @default "inline"
|
|
85
86
|
*/
|
|
86
87
|
layout?: 'inline' | 'stacked';
|
|
88
|
+
/** `filled` fills the checked card's icon disc with the primary colour and draws the glyph in the on-primary colour. Unset keeps the soft selected look. */
|
|
89
|
+
selectedStyle?: 'filled';
|
|
87
90
|
/**
|
|
88
91
|
* Extra class names added to the card.
|
|
89
92
|
* @default ""
|
|
@@ -82,6 +82,9 @@ export type CommentThreadItem = {
|
|
|
82
82
|
* @param {(query: string) => Promise<{ value: string, label: string, description?: string, src?: string }[]>} [props.loadPeople]
|
|
83
83
|
* Look people up instead of `people`.
|
|
84
84
|
* @param {string[]} [props.reactionChoices]
|
|
85
|
+
* @param {boolean} [props.allowReplies] False leaves out the Reply action and the reply box; existing replies still show.
|
|
86
|
+
* @param {boolean} [props.allowReactions] False leaves out the reaction panel and the reaction chips.
|
|
87
|
+
* @param {string} [props.composerPlaceholder] The composer box's placeholder; without it the standard one.
|
|
85
88
|
* @param {boolean} [props.readOnly]
|
|
86
89
|
* @param {string} [props.label]
|
|
87
90
|
* @param {string} [props.id]
|
|
@@ -113,6 +116,18 @@ export default function AppCommentThread(props: {
|
|
|
113
116
|
}[]>;
|
|
114
117
|
/** The reactions the panel offers. Without it the panel offers a thumbs up, heart, party, smile, eyes and folded hands. */
|
|
115
118
|
reactionChoices?: string[];
|
|
119
|
+
/**
|
|
120
|
+
* False leaves out the Reply action and the reply box; existing replies still show.
|
|
121
|
+
* @default true
|
|
122
|
+
*/
|
|
123
|
+
allowReplies?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* False leaves out the reaction panel and the reaction chips.
|
|
126
|
+
* @default true
|
|
127
|
+
*/
|
|
128
|
+
allowReactions?: boolean;
|
|
129
|
+
/** The composer box's placeholder. Without it the standard placeholder asks for a comment and names @ mentions. */
|
|
130
|
+
composerPlaceholder?: string;
|
|
116
131
|
/**
|
|
117
132
|
* Show the thread without the box, actions or reacting.
|
|
118
133
|
* @default false
|
|
@@ -34,6 +34,10 @@ export type NavItemShape = {
|
|
|
34
34
|
* The badge's hover text, e.g. 3 invoices overdue.
|
|
35
35
|
*/
|
|
36
36
|
badgeTitle?: string;
|
|
37
|
+
/**
|
|
38
|
+
* An ISO date (yyyy-MM-dd, India time). A green "New" pill shows after the label through that day, and none after it.
|
|
39
|
+
*/
|
|
40
|
+
newUntil?: string;
|
|
37
41
|
/**
|
|
38
42
|
* A right-aligned secondary glyph (lock, external arrow, new dot).
|
|
39
43
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.104.1",
|
|
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.
|
|
33
|
-
"@webority/ui-elements": "0.
|
|
32
|
+
"@webority/theme": "0.104.1",
|
|
33
|
+
"@webority/ui-elements": "0.104.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@webority/analytics": "^0.28.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/canvas-kit": "0.
|
|
60
|
-
"@webority/tokens": "0.
|
|
59
|
+
"@webority/canvas-kit": "0.104.1",
|
|
60
|
+
"@webority/tokens": "0.104.1"
|
|
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",
|