@webority/ui-react 0.163.0 → 0.165.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -2
  3. package/dist/canvas-kit/kit.js +212 -212
  4. package/dist/canvas-kit/manifest.json +1127 -389
  5. package/dist/canvas-kit/release.json +6 -6
  6. package/dist/components/AppAccountSwitcher.js +1 -1
  7. package/dist/components/AppAlert.js +1 -1
  8. package/dist/components/AppAsyncBlock.js +1 -1
  9. package/dist/components/AppBreadcrumbs.js +1 -1
  10. package/dist/components/AppButton.js +1 -1
  11. package/dist/components/AppCard.js +1 -1
  12. package/dist/components/AppChartCard.js +1 -1
  13. package/dist/components/AppChoiceChip.js +1 -1
  14. package/dist/components/AppCodeBlock.js +1 -1
  15. package/dist/components/AppColorField.js +1 -1
  16. package/dist/components/AppCommentThread.js +1 -1
  17. package/dist/components/AppContextMenu.js +1 -1
  18. package/dist/components/AppDataTable.js +1 -1
  19. package/dist/components/AppDatePicker.js +1 -1
  20. package/dist/components/AppDateRangePicker.js +1 -1
  21. package/dist/components/AppDescriptions.js +1 -1
  22. package/dist/components/AppDrawer.js +1 -1
  23. package/dist/components/AppDropZone.js +1 -1
  24. package/dist/components/AppDropdown.js +1 -1
  25. package/dist/components/AppDueDate.js +1 -1
  26. package/dist/components/AppEntryGrid.js +1 -0
  27. package/dist/components/AppFileAttachment.js +1 -1
  28. package/dist/components/AppFilePicker.js +1 -1
  29. package/dist/components/AppFileViewer.js +1 -1
  30. package/dist/components/AppFilterBar.js +1 -1
  31. package/dist/components/AppFloatingButton.js +1 -1
  32. package/dist/components/AppForm.js +1 -1
  33. package/dist/components/AppFormulaSteps.js +1 -0
  34. package/dist/components/AppHoverCard.js +1 -1
  35. package/dist/components/AppImagePicker.js +1 -1
  36. package/dist/components/AppInlineEdit.js +1 -1
  37. package/dist/components/AppInput.js +1 -1
  38. package/dist/components/AppMarkdown.js +1 -1
  39. package/dist/components/AppMentionInput.js +1 -1
  40. package/dist/components/AppMetricStrip.js +1 -1
  41. package/dist/components/AppModal.js +1 -1
  42. package/dist/components/AppNotificationCenter.js +1 -1
  43. package/dist/components/AppNumberInput.js +1 -1
  44. package/dist/components/AppOtpInput.js +1 -1
  45. package/dist/components/AppPageHeader.js +1 -1
  46. package/dist/components/AppPhoneNumberInput.js +1 -1
  47. package/dist/components/AppPopover.js +1 -1
  48. package/dist/components/AppRadioGroup.js +1 -1
  49. package/dist/components/AppRating.js +1 -1
  50. package/dist/components/AppRichText.js +1 -1
  51. package/dist/components/AppRowActions.js +1 -0
  52. package/dist/components/AppScoreScale.js +1 -1
  53. package/dist/components/AppSearch.js +1 -1
  54. package/dist/components/AppSectionFeatures.js +1 -1
  55. package/dist/components/AppSectionLogos.js +1 -1
  56. package/dist/components/AppSelect.js +1 -1
  57. package/dist/components/AppShell.js +1 -1
  58. package/dist/components/AppSlider.js +1 -1
  59. package/dist/components/AppSparkline.js +1 -1
  60. package/dist/components/AppTextarea.js +1 -1
  61. package/dist/components/AppThemeToggle.js +1 -1
  62. package/dist/components/AppTimePicker.js +1 -1
  63. package/dist/components/AppToast.js +1 -1
  64. package/dist/components/AppTooltip.js +1 -1
  65. package/dist/components/AppWhatsNew.js +1 -1
  66. package/dist/components/AppWorkspaceSwitcher.js +1 -1
  67. package/dist/components/warnUnknownProps.js +1 -1
  68. package/dist/guidance.json +216 -141
  69. package/dist/hookForm/index.js +1 -0
  70. package/dist/lib/CheckField.js +1 -1
  71. package/dist/lib/formFields.js +1 -0
  72. package/dist/lib/indianGrouping.js +1 -0
  73. package/dist/lib/unsavedText.js +1 -0
  74. package/dist/lib/useOverlayRoot.js +1 -0
  75. package/dist/types/components/AppAccordion.d.ts +1 -1
  76. package/dist/types/components/AppAlert.d.ts +1 -1
  77. package/dist/types/components/AppAsyncBlock.d.ts +3 -3
  78. package/dist/types/components/AppBreadcrumbs.d.ts +6 -0
  79. package/dist/types/components/AppCard.d.ts +1 -1
  80. package/dist/types/components/AppChart.d.ts +12 -4
  81. package/dist/types/components/AppChip.d.ts +2 -2
  82. package/dist/types/components/AppCodeBlock.d.ts +1 -1
  83. package/dist/types/components/AppCommandPalette.d.ts +2 -2
  84. package/dist/types/components/AppDataTable.d.ts +32 -3
  85. package/dist/types/components/AppDateRangePicker.d.ts +4 -0
  86. package/dist/types/components/AppDescriptions.d.ts +7 -1
  87. package/dist/types/components/AppDrawer.d.ts +1 -1
  88. package/dist/types/components/AppDropdown.d.ts +7 -7
  89. package/dist/types/components/AppEntryGrid.d.ts +122 -0
  90. package/dist/types/components/AppFilePicker.d.ts +1 -1
  91. package/dist/types/components/AppFilterBar.d.ts +12 -1
  92. package/dist/types/components/AppFloatingDock.d.ts +2 -2
  93. package/dist/types/components/AppForm.d.ts +18 -0
  94. package/dist/types/components/AppFormActions.d.ts +1 -1
  95. package/dist/types/components/AppFormSection.d.ts +1 -1
  96. package/dist/types/components/AppFormulaSteps.d.ts +64 -0
  97. package/dist/types/components/AppIcon.d.ts +2 -2
  98. package/dist/types/components/AppInfoTip.d.ts +1 -1
  99. package/dist/types/components/AppInlineEdit.d.ts +5 -0
  100. package/dist/types/components/AppKpiTile.d.ts +1 -1
  101. package/dist/types/components/AppMeter.d.ts +1 -1
  102. package/dist/types/components/AppMetricStrip.d.ts +5 -0
  103. package/dist/types/components/AppModal.d.ts +9 -4
  104. package/dist/types/components/AppNumberInput.d.ts +7 -0
  105. package/dist/types/components/AppPageHeader.d.ts +5 -0
  106. package/dist/types/components/AppPopover.d.ts +3 -3
  107. package/dist/types/components/AppRequiredMark.d.ts +1 -1
  108. package/dist/types/components/AppResourceCard.d.ts +1 -1
  109. package/dist/types/components/AppResult.d.ts +2 -2
  110. package/dist/types/components/AppRowActions.d.ts +40 -0
  111. package/dist/types/components/AppScrollbar.d.ts +1 -1
  112. package/dist/types/components/AppSectionFeatures.d.ts +5 -1
  113. package/dist/types/components/AppSectionLogos.d.ts +1 -0
  114. package/dist/types/components/AppShell.d.ts +8 -6
  115. package/dist/types/components/AppSlider.d.ts +5 -0
  116. package/dist/types/components/AppSparkline.d.ts +3 -0
  117. package/dist/types/components/AppSpinner.d.ts +2 -2
  118. package/dist/types/components/AppSplash.d.ts +2 -2
  119. package/dist/types/components/AppTabs.d.ts +3 -3
  120. package/dist/types/components/AppToast.d.ts +6 -1
  121. package/dist/types/components/AppToolbar.d.ts +5 -5
  122. package/dist/types/components/AppTooltip.d.ts +5 -5
  123. package/dist/types/components/AppWorkspaceSwitcher.d.ts +3 -3
  124. package/dist/types/components/toastStore.d.ts +2 -2
  125. package/dist/types/components/warnUnknownProps.d.ts +3 -3
  126. package/dist/types/hookForm/index.d.ts +14 -0
  127. package/dist/types/index.d.ts +8 -6
  128. package/dist/types/lib/CheckField.d.ts +1 -1
  129. package/dist/types/lib/FieldMessage.d.ts +1 -1
  130. package/dist/types/lib/FileItemRow.d.ts +1 -1
  131. package/dist/types/lib/fileItem.d.ts +3 -3
  132. package/dist/types/lib/formFields.d.ts +12 -0
  133. package/dist/types/lib/indianGrouping.d.ts +2 -0
  134. package/dist/types/lib/unsavedText.d.ts +5 -0
  135. package/dist/types/lib/useOverlayRoot.d.ts +2 -0
  136. package/dist/ui-react.js +1 -1
  137. package/dist/web-core/dist/errors/extractApiError.js +2 -0
  138. package/dist/web-core/dist/errors/requestPlatform.js +1 -0
  139. package/package.json +21 -10
  140. package/dist/components/AppResizable.js +0 -1
  141. package/dist/components/AppResizableHandle.js +0 -1
  142. package/dist/components/AppResizablePanel.js +0 -1
  143. package/dist/components/AppRollingNumber.js +0 -1
  144. package/dist/components/AppRowSwitch.js +0 -1
  145. package/dist/lib/FocusPanel.js +0 -1
  146. package/dist/lib/pageScrollLock.js +0 -1
  147. package/dist/types/components/AppResizable.d.ts +0 -37
  148. package/dist/types/components/AppResizableHandle.d.ts +0 -14
  149. package/dist/types/components/AppResizablePanel.d.ts +0 -14
  150. package/dist/types/components/AppRollingNumber.d.ts +0 -30
  151. package/dist/types/components/AppRowSwitch.d.ts +0 -18
  152. package/dist/types/lib/FocusPanel.d.ts +0 -11
  153. package/dist/types/lib/pageScrollLock.d.ts +0 -1
@@ -1 +1 @@
1
- import{shortcutChip as e}from"../lib/shortcutChip.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./assertValidValue.js";import r from"./warnUnknownProps.js";import{cloneElement as i,useEffect as a,useId as o,useRef as s,useState as c}from"react";import{OverlayTrigger as l,Tooltip as u}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`neutral`,`primary`,`success`,`warning`,`danger`],m=[`inverse`],h=[`sm`,`md`,`lg`],g={start:`left`,end:`right`,top:`top`,bottom:`bottom`},_=[`auto`,`top`,`bottom`,`start`,`end`],v={modifiers:[{name:`offset`,options:{offset:[0,6]}}]};function y(y){let{marker:b,props:x}=t(`AppTooltip`,y),{content:S,children:C,placement:w=`top`,tone:T=`neutral`,variant:E,size:D=`md`,open:O,shortcut:k,className:A=``,...j}=x;r(`AppTooltip`,j),n(`AppTooltip`,`tone`,T,p),n(`AppTooltip`,`variant`,E,m),n(`AppTooltip`,`size`,D,h),n(`AppTooltip`,`placement`,w,_);let M=o(),[N,P]=c(!1),F=typeof O==`boolean`,I=[`wui-tooltip`,T&&T!==`neutral`?`tone-${T}`:``,E?`wui-tooltip-${E}`:``,D&&D!==`md`?`size-${D}`:``,A].filter(Boolean).join(` `),L=/* @__PURE__ */ f(u,{id:M,className:I,...b,children:[S,e(k,{inTooltip:!0})]}),R=e=>{C.props.onClick?.(e),j.onClick?.(e),P(!1)},z=s(!1),B=e=>{C.props.onFocusCapture?.(e),j.onFocusCapture?.(e),z.current=!e.currentTarget.matches?.(`:focus-visible`),queueMicrotask(()=>{z.current=!1})};return a(()=>{if(F||!N)return;let e=e=>{e.key===`Escape`&&(e.stopPropagation(),P(!1))};return document.addEventListener(`keydown`,e,!0),()=>document.removeEventListener(`keydown`,e,!0)},[F,N]),/* @__PURE__ */ d(l,{trigger:[`hover`,`focus`],placement:g[w]??`auto`,popperConfig:v,show:F?O:N,...F?null:{onToggle:e=>{let t=z.current;z.current=!1,e&&t||P(e)}},overlay:L,children:F?i(C,j):i(C,{...j,onClick:R,onFocusCapture:B})})}export{y as default};
1
+ import{shortcutChip as e}from"../lib/shortcutChip.js";import{useOverlayRoot as t}from"../lib/useOverlayRoot.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./assertValidValue.js";import i from"./warnUnknownProps.js";import{TOOLTIP_ATTRIBUTE as a,TOOLTIP_CLASS_ATTRIBUTE as o,TOOLTIP_ID_ATTRIBUTE as s,TOOLTIP_OPEN_ATTRIBUTE as c,TOOLTIP_PLACEMENT_ATTRIBUTE as l,wireTooltips as u}from"@webority/ui-elements/helpers";import{cloneElement as d,useEffect as f,useId as p}from"react";import{createPortal as m}from"react-dom";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";var v=[`neutral`,`primary`,`success`,`warning`,`danger`],y=[`inverse`],b=[`sm`,`md`,`lg`],x=[`auto`,`top`,`bottom`,`start`,`end`];function S(S){let{marker:C,props:w}=n(`AppTooltip`,S),{content:T,children:E,placement:D=`top`,tone:O=`neutral`,variant:k,size:A=`md`,open:j,shortcut:M,className:N=``,...P}=w;i(`AppTooltip`,P),r(`AppTooltip`,`tone`,O,v),r(`AppTooltip`,`variant`,k,y),r(`AppTooltip`,`size`,A,b),r(`AppTooltip`,`placement`,D,x);let F=p(),I=t();f(()=>{u(document)},[]);let L=[`wui-tooltip`,O&&O!==`neutral`?`tone-${O}`:``,k?`wui-tooltip-${k}`:``,A&&A!==`md`?`size-${A}`:``,N].filter(Boolean).join(` `),R=typeof T==`string`&&!M?.trim();f(()=>{if(!R&&!I)throw Error(`<AppTooltip> has no overlay root to mount its bubble in.`)},[R,I]);let z=R?{[a]:T,[l]:D,[o]:L}:{[s]:F};return z[c]=j?``:void 0,/* @__PURE__ */ _(h,{children:[d(E,{...P,...z}),!R&&I?m(/* @__PURE__ */ _(`div`,{id:F,className:`tooltip ${L}`,role:`tooltip`,popover:`manual`,...C,children:[/* @__PURE__ */ g(`div`,{className:`tooltip-arrow`}),/* @__PURE__ */ _(`div`,{className:`tooltip-inner`,children:[T,e(M,{inTooltip:!0})]})]}),I):null]})}export{S as default};
@@ -1 +1 @@
1
- import{linkTarget as e}from"../lib/linkTarget.js";import{TargetLink as t}from"../lib/TargetLink.js";import n from"../lib/useElementEntry.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppIcon.js";import a from"./assertValidValue.js";import o from"./warnUnknownProps.js";import{formatDate as s}from"@webority/ui-elements/helpers";import{useEffect as c,useRef as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`dot`,`count`],p=()=>import(`@webority/ui-elements/elements/whats-new`),m=e=>typeof e==`object`&&!!e&&`through`in e&&typeof e.through==`string`;function h(e){n(`wui-whats-new`,p);let{marker:t,props:h}=r(`AppWhatsNew`,e),{entries:_=[],storageKey:v,readThrough:y,indicator:b=`dot`,label:x=`What's new`,unreadLabel:S=`unread`,emptyText:C=`Nothing new yet`,onRead:w,linkComponent:T,className:E=``,...D}=h;o(`AppWhatsNew`,D),a(`AppWhatsNew`,`indicator`,b,f);let O=l(null),k=l(w);return k.current=w,c(()=>{let e=O.current;if(!e)return;let t=e=>{let t=e instanceof CustomEvent?e.detail:void 0;if(!m(t))throw Error(`wui-whats-new-read carried no read-through date`);k.current?.(t.through)};return e.addEventListener(`wui-whats-new-read`,t),()=>e.removeEventListener(`wui-whats-new-read`,t)},[]),/* @__PURE__ */ d(`wui-whats-new`,{ref:O,class:[`wui-whats-new`,E].filter(Boolean).join(` `),"storage-key":v||void 0,"read-through":y||void 0,indicator:b,...t,...D,children:[/* @__PURE__ */ d(`button`,{type:`button`,className:`u-action wui-whats-new-trigger`,"aria-haspopup":`dialog`,children:[/* @__PURE__ */ u(i,{name:`gift`,size:20}),/* @__PURE__ */ u(`span`,{className:`wui-whats-new-name`,children:x}),/* @__PURE__ */ u(`span`,{className:`wui-whats-new-unread`,children:` ${S}`}),/* @__PURE__ */ u(`span`,{className:`wui-whats-new-dot`,"aria-hidden":`true`})]}),/* @__PURE__ */ d(`div`,{className:`wui-whats-new-panel`,role:`dialog`,"aria-label":x,tabIndex:-1,children:[/* @__PURE__ */ u(`h2`,{className:`wui-whats-new-title`,children:x}),_.length>0?/* @__PURE__ */ u(`ol`,{className:`wui-whats-new-list`,children:_.map((e,t)=>/* @__PURE__ */ d(`li`,{className:`wui-whats-new-entry`,children:[/* @__PURE__ */ u(`time`,{className:`wui-whats-new-date`,dateTime:e.date,children:s(e.date)}),/* @__PURE__ */ u(`h3`,{className:`wui-whats-new-entry-title`,children:e.title}),e.body&&/* @__PURE__ */ u(`p`,{className:`wui-whats-new-body`,children:e.body}),e.imageSrc&&/* @__PURE__ */ u(`img`,{className:`wui-whats-new-image`,src:e.imageSrc,alt:e.imageAlt??``,loading:`lazy`}),e.href&&/* @__PURE__ */ u(g,{entry:e,linkComponent:T})]},e.id??`${e.date}-${t}`))}):/* @__PURE__ */ u(`p`,{className:`wui-whats-new-empty`,children:C})]})]})}function g({entry:n,linkComponent:r}){let i=e(r,{href:n.href});return/* @__PURE__ */ u(t,{link:i,className:`wui-whats-new-link`,children:n.linkLabel||`Learn more`})}export{h as default};
1
+ import{linkTarget as e}from"../lib/linkTarget.js";import{TargetLink as t}from"../lib/TargetLink.js";import n from"../lib/useElementEntry.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppIcon.js";import a from"./assertValidValue.js";import o from"./warnUnknownProps.js";import{formatDate as s}from"@webority/ui-elements/helpers";import{useEffect as c,useRef as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`dot`,`count`],p=()=>import(`@webority/ui-elements/elements/whats-new`),m=e=>typeof e==`object`&&!!e&&`through`in e&&typeof e.through==`string`;function h(e){n(`wui-whats-new`,p);let{marker:t,props:h}=r(`AppWhatsNew`,e),{entries:_=[],storageKey:v,readThrough:y,indicator:b=`dot`,label:x=`What's new`,unreadLabel:S=`unread`,emptyText:C=`Nothing new yet`,onRead:w,linkComponent:T,className:E=``,...D}=h;o(`AppWhatsNew`,D),a(`AppWhatsNew`,`indicator`,b,f);let O=l(null),k=l(w);return k.current=w,c(()=>{let e=O.current;if(!e)return;let t=e=>{let t=e instanceof CustomEvent?e.detail:void 0;if(!m(t))throw Error(`wui-whats-new-read carried no read-through date`);k.current?.(t.through)};return e.addEventListener(`wui-whats-new-read`,t),()=>e.removeEventListener(`wui-whats-new-read`,t)},[]),/* @__PURE__ */ d(`wui-whats-new`,{ref:O,class:[`wui-whats-new`,E].filter(Boolean).join(` `),"storage-key":v||void 0,"read-through":y||void 0,indicator:b,...t,...D,children:[/* @__PURE__ */ d(`button`,{type:`button`,className:`u-action wui-whats-new-trigger`,"aria-haspopup":`dialog`,children:[/* @__PURE__ */ u(i,{name:`gift`,size:20}),/* @__PURE__ */ u(`span`,{className:`wui-whats-new-name`,children:x}),/* @__PURE__ */ u(`span`,{className:`wui-whats-new-unread`,children:` ${S}`}),/* @__PURE__ */ u(`span`,{className:`wui-whats-new-dot`,"aria-hidden":`true`})]}),/* @__PURE__ */ d(`div`,{className:`wui-whats-new-panel`,popover:`auto`,role:`dialog`,"aria-label":x,tabIndex:-1,children:[/* @__PURE__ */ u(`h2`,{className:`wui-whats-new-title`,children:x}),_.length>0?/* @__PURE__ */ u(`ol`,{className:`wui-whats-new-list`,children:_.map((e,t)=>/* @__PURE__ */ d(`li`,{className:`wui-whats-new-entry`,children:[/* @__PURE__ */ u(`time`,{className:`wui-whats-new-date`,dateTime:e.date,children:s(e.date)}),/* @__PURE__ */ u(`h3`,{className:`wui-whats-new-entry-title`,children:e.title}),e.body&&/* @__PURE__ */ u(`p`,{className:`wui-whats-new-body`,children:e.body}),e.imageSrc&&/* @__PURE__ */ u(`img`,{className:`wui-whats-new-image`,src:e.imageSrc,alt:e.imageAlt??``,loading:`lazy`}),e.href&&/* @__PURE__ */ u(g,{entry:e,linkComponent:T})]},e.id??`${e.date}-${t}`))}):/* @__PURE__ */ u(`p`,{className:`wui-whats-new-empty`,children:C})]})]})}function g({entry:n,linkComponent:r}){let i=e(r,{href:n.href});return/* @__PURE__ */ u(t,{link:i,className:`wui-whats-new-link`,children:n.linkLabel||`Learn more`})}export{h as default};
@@ -1 +1 @@
1
- import{initialsOf as e}from"../lib/initials.js";import{linkTarget as t}from"../lib/linkTarget.js";import{TargetLink as n}from"../lib/TargetLink.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppIcon.js";import a from"./assertValidValue.js";import o from"./warnUnknownProps.js";import{forwardRef as s,useCallback as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{Dropdown as p}from"react-bootstrap";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";var _=[`sm`,`md`,`lg`],v=/* @__PURE__ */ new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);function y(e){let{marker:t,props:n}=r(`AppWorkspaceSwitcher`,e),{tenants:s=[],currentId:m,onSelect:y,menuLabel:C,footerAction:w,linkComponent:T,searchable:E=!1,onCreate:D,canCreate:O=!1,createLabel:k=`Create workspace`,compact:A=!1,size:j=`md`,ariaLabel:M,searchPlaceholder:N=`Search workspaces`,searchLabel:P=`Search workspaces`,noMatchText:F=`No workspaces match.`,...I}=n,{onToggle:L,...R}=I;o(`AppWorkspaceSwitcher`,R),a(`AppWorkspaceSwitcher`,`size`,j,_);let[z,B]=f(``),[V,H]=f(!1),U=d(null),W=c((e,t)=>{H(e),L?.(e,t)},[L]),G=s.find(e=>e.id===m)??s[0],K=u(()=>{let e=z.trim().toLowerCase();return!E||!e?s:s.filter(t=>String(t.name??``).toLowerCase().includes(e))},[s,z,E]);l(()=>{V&&E&&U.current?.focus()},[V,E]),l(()=>{if(!E)return;let e=U.current;if(!e)return;let t=e=>{v.has(e.key)?e.stopPropagation():e.key===`Escape`&&V&&(e.preventDefault(),e.stopPropagation(),W(!1,{source:`keydown`,originalEvent:e}))};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)},[E,V,W]);let q=G?.name??``,J=M??`Workspace ${q}`;return/* @__PURE__ */ g(p,{className:`workspace-switcher${j===`sm`?` workspace-switcher-sm`:``}${j===`lg`?` workspace-switcher-lg`:``}`,show:V,onToggle:W,...t,...R,children:[/* @__PURE__ */ h(p.Toggle,{as:S,compact:A,tenant:G,"aria-label":J}),/* @__PURE__ */ g(p.Menu,{className:`workspace-switcher-menu`,renderOnMount:!0,popperConfig:{strategy:`fixed`},children:[C?/* @__PURE__ */ h(`div`,{className:`workspace-switcher-menu-label`,children:C}):null,E?/* @__PURE__ */ g(`div`,{className:`workspace-switcher-search`,children:[/* @__PURE__ */ h(i,{name:`search`,size:14}),/* @__PURE__ */ h(`input`,{ref:U,type:`search`,className:`workspace-switcher-search-input`,placeholder:N,"aria-label":P,value:z,onChange:e=>B(e.target.value)})]}):null,/* @__PURE__ */ g(`div`,{className:`workspace-switcher-list`,children:[K.map(e=>/* @__PURE__ */ g(p.Item,{as:`button`,type:`button`,className:`workspace-switcher-option${e.id===G?.id?` is-active`:``}`,onClick:()=>y?.(e),children:[/* @__PURE__ */ h(b,{tenant:e}),/* @__PURE__ */ h(`span`,{className:`workspace-switcher-option-name`,children:e.name}),e.badge?/* @__PURE__ */ h(`span`,{className:`workspace-switcher-badge`,children:e.badge}):null,e.id===G?.id?/* @__PURE__ */ h(i,{name:`check`,size:16,className:`workspace-switcher-tick`}):null]},e.id)),K.length===0?/* @__PURE__ */ h(`div`,{className:`workspace-switcher-empty`,children:F}):null]}),O?/* @__PURE__ */ g(p.Item,{as:`button`,type:`button`,className:`workspace-switcher-create`,onClick:()=>D?.(),children:[/* @__PURE__ */ h(i,{name:`plus`,size:16}),k]}):null,w?/* @__PURE__ */ h(`div`,{className:`workspace-switcher-footer`,children:x(w,T)}):null]})]})}function b({tenant:t}){return t?.logoUrl?/* @__PURE__ */ h(`img`,{className:`workspace-switcher-mark`,src:t.logoUrl,alt:``,loading:`lazy`}):/* @__PURE__ */ h(`span`,{className:`workspace-switcher-mark`,children:e(t?.name,1)})}function x(e,r){if(typeof e!=`object`||!e||!(`label`in e))return e;let{label:a,icon:o,href:s}=e,c=/* @__PURE__ */ g(m,{children:[o?/* @__PURE__ */ h(i,{name:o,size:16}):null,a]});return s?/* @__PURE__ */ h(n,{link:t(r,{href:s}),className:`workspace-switcher-footer-action`,children:c}):/* @__PURE__ */ h(`button`,{className:`workspace-switcher-footer-action`,type:`button`,children:c})}var S=s(function({compact:e,tenant:t,"aria-label":n,className:r,...a},o){return/* @__PURE__ */ g(`button`,{ref:o,type:`button`,className:`workspace-switcher-trigger${e?` is-compact`:``}`,"aria-haspopup":`true`,"aria-label":n,...a,children:[/* @__PURE__ */ h(b,{tenant:t}),e?null:/* @__PURE__ */ g(m,{children:[/* @__PURE__ */ h(`span`,{className:`workspace-switcher-trigger-name`,children:t?.name}),/* @__PURE__ */ h(i,{name:`chevrons-up-down`,size:16,className:`workspace-switcher-chevron`})]})]})});export{y as default};
1
+ import{initialsOf as e}from"../lib/initials.js";import{linkTarget as t}from"../lib/linkTarget.js";import{TargetLink as n}from"../lib/TargetLink.js";import r from"../lib/useElementEntry.js";import{splitMarkerProps as i}from"../lib/wuiMarker.js";import a from"./AppIcon.js";import o from"./assertValidValue.js";import s from"./warnUnknownProps.js";import{useCallback as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";var g=[`sm`,`md`,`lg`],_=()=>import(`@webority/ui-elements/elements/dropdown`),v=/* @__PURE__ */ new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);function y(e){let{marker:t,props:n}=i(`AppWorkspaceSwitcher`,e),{tenants:p=[],currentId:y,onSelect:C,menuLabel:w,footerAction:T,linkComponent:E,searchable:D=!1,onCreate:O,canCreate:k=!1,createLabel:A=`Create workspace`,compact:j=!1,size:M=`md`,ariaLabel:N,searchPlaceholder:P=`Search workspaces`,searchLabel:F=`Search workspaces`,noMatchText:I=`No workspaces match.`,...L}=n,{onToggle:R,...z}=L;s(`AppWorkspaceSwitcher`,z),o(`AppWorkspaceSwitcher`,`size`,M,g),r(`wui-dropdown`,_);let[B,V]=f(``),[H,U]=f(!1),W=d(null),G=d(null),K=c((e,t)=>{U(e),R?.(e,t)},[R]),q=p.find(e=>e.id===y)??p[0],J=u(()=>{let e=B.trim().toLowerCase();return!D||!e?p:p.filter(t=>String(t.name??``).toLowerCase().includes(e))},[p,B,D]);l(()=>{H&&D&&W.current?.focus()},[H,D]),l(()=>{let e=G.current;if(!e)return;let t=t=>{if(t.target===e){if(!(t instanceof CustomEvent))throw TypeError(`<wui-dropdown> toggle arrived without its detail.`);K(t.detail.open,{source:t.detail.source})}};return e.addEventListener(`wui-dropdown-toggle`,t),()=>e.removeEventListener(`wui-dropdown-toggle`,t)},[K]),l(()=>{if(!D)return;let e=W.current;if(!e)return;let t=e=>{v.has(e.key)&&e.stopPropagation()};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)},[D]);let Y=q?.name??``,X=N??`Workspace ${Y}`;return/* @__PURE__ */ h(`wui-dropdown`,{ref:G,class:`dropdown workspace-switcher${M===`sm`?` workspace-switcher-sm`:``}${M===`lg`?` workspace-switcher-lg`:``}`,...t,...z,children:[/* @__PURE__ */ m(S,{compact:j,tenant:q,ariaLabel:X}),/* @__PURE__ */ h(`div`,{"data-wui-dropdown-menu":``,popover:`auto`,className:`dropdown-menu workspace-switcher-menu`,children:[w?/* @__PURE__ */ m(`div`,{className:`workspace-switcher-menu-label`,children:w}):null,D?/* @__PURE__ */ h(`div`,{className:`workspace-switcher-search`,children:[/* @__PURE__ */ m(a,{name:`search`,size:14}),/* @__PURE__ */ m(`input`,{ref:W,type:`search`,className:`workspace-switcher-search-input`,placeholder:P,"aria-label":F,value:B,onChange:e=>V(e.target.value)})]}):null,/* @__PURE__ */ h(`div`,{className:`workspace-switcher-list`,children:[J.map(e=>/* @__PURE__ */ h(`button`,{type:`button`,className:`dropdown-item workspace-switcher-option${e.id===q?.id?` is-active`:``}`,onClick:()=>C?.(e),children:[/* @__PURE__ */ m(b,{tenant:e}),/* @__PURE__ */ m(`span`,{className:`workspace-switcher-option-name`,children:e.name}),e.badge?/* @__PURE__ */ m(`span`,{className:`workspace-switcher-badge`,children:e.badge}):null,e.id===q?.id?/* @__PURE__ */ m(a,{name:`check`,size:16,className:`workspace-switcher-tick`}):null]},e.id)),J.length===0?/* @__PURE__ */ m(`div`,{className:`workspace-switcher-empty`,children:I}):null]}),k?/* @__PURE__ */ h(`button`,{type:`button`,className:`dropdown-item workspace-switcher-create`,onClick:()=>O?.(),children:[/* @__PURE__ */ m(a,{name:`plus`,size:16}),A]}):null,T?/* @__PURE__ */ m(`div`,{className:`workspace-switcher-footer`,children:x(T,E)}):null]})]})}function b({tenant:t}){return t?.logoUrl?/* @__PURE__ */ m(`img`,{className:`workspace-switcher-mark`,src:t.logoUrl,alt:``,loading:`lazy`}):/* @__PURE__ */ m(`span`,{className:`workspace-switcher-mark`,children:e(t?.name,1)})}function x(e,r){if(typeof e!=`object`||!e||!(`label`in e))return e;let{label:i,icon:o,href:s}=e,c=/* @__PURE__ */ h(p,{children:[o?/* @__PURE__ */ m(a,{name:o,size:16}):null,i]});return s?/* @__PURE__ */ m(n,{link:t(r,{href:s}),className:`workspace-switcher-footer-action`,children:c}):/* @__PURE__ */ m(`button`,{className:`workspace-switcher-footer-action`,type:`button`,children:c})}function S({compact:e,tenant:t,ariaLabel:n}){return/* @__PURE__ */ h(`button`,{type:`button`,"data-wui-dropdown-trigger":``,className:`workspace-switcher-trigger${e?` is-compact`:``}`,"aria-haspopup":`true`,"aria-expanded":`false`,"aria-label":n,children:[/* @__PURE__ */ m(b,{tenant:t}),e?null:/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ m(`span`,{className:`workspace-switcher-trigger-name`,children:t?.name}),/* @__PURE__ */ m(a,{name:`chevrons-up-down`,size:16,className:`workspace-switcher-chevron`})]})]})}export{y as default};
@@ -1 +1 @@
1
- import{devWarn as e}from"../lib/devWarn.js";var t=/* @__PURE__ */ new Set(/* @__PURE__ */ `id.title.role.style.className.class.tabIndex.lang.dir.hidden.slot.part.draggable.spellCheck.translate.inert.popover.name.type.value.defaultValue.checked.defaultChecked.placeholder.disabled.readOnly.required.autoFocus.autoComplete.form.formAction.formMethod.formNoValidate.formTarget.min.max.step.minLength.maxLength.pattern.multiple.accept.capture.rows.cols.wrap.list.htmlFor.inputMode.enterKeyHint.href.target.rel.download.ping.referrerPolicy.src.srcSet.alt.width.height.loading.decoding.sizes.crossOrigin.useMap.colSpan.rowSpan.headers.scope.span.key.ref.children.dangerouslySetInnerHTML.suppressHydrationWarning`.split(`.`)),n=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},r=e=>e.startsWith(`data-`)||e.startsWith(`aria-`)||/^on[A-Z]/.test(e),i=/* @__PURE__ */ new Set;function a(a,o){if(n()&&o&&!(`as`in o))for(let n of Object.keys(o)){if(r(n)||t.has(n))continue;let o=`${a}.${n}`;i.has(o)||(i.add(o),e(`[@webority/ui-react] <${a}> received an unknown prop "${n}". It is not part of the component's API and is not a valid HTML attribute, so it will either be dropped or land on the DOM — check the prop name against the component catalogue at https://ui-react.webority.dev.`))}}export{a as default};
1
+ import{devWarn as e}from"../lib/devWarn.js";var t=/* @__PURE__ */ new Set(/* @__PURE__ */ `id.title.role.style.className.class.tabIndex.lang.dir.hidden.slot.part.draggable.spellCheck.translate.inert.popover.name.type.value.defaultValue.checked.defaultChecked.placeholder.disabled.readOnly.required.autoFocus.autoComplete.form.formAction.formMethod.formNoValidate.formTarget.min.max.step.minLength.maxLength.pattern.multiple.accept.capture.rows.cols.wrap.list.htmlFor.inputMode.enterKeyHint.href.target.rel.download.ping.referrerPolicy.src.srcSet.alt.width.height.loading.decoding.sizes.crossOrigin.useMap.colSpan.rowSpan.headers.scope.span.key.ref.children.dangerouslySetInnerHTML.suppressHydrationWarning`.split(`.`)),n=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},r=e=>e.startsWith(`data-`)||e.startsWith(`aria-`)||/^on[A-Z]/.test(e),i=/* @__PURE__ */ new Set;function a(a,o){if(n()&&o&&!(`as`in o))for(let n of Object.keys(o)){if(r(n)||t.has(n))continue;let o=`${a}.${n}`;i.has(o)||(i.add(o),e(`[@webority/ui-react] <${a}> received an unknown prop "${n}". It is not part of the component's API and is not a valid HTML attribute, so it will either be dropped or land on the DOM. Check the prop name against the component catalogue at https://ui-react.webority.dev.`))}}export{a as default};
@@ -2,7 +2,7 @@
2
2
  "format": "webority-guidance/1",
3
3
  "package": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.163.0"
5
+ "version": "0.165.0"
6
6
  },
7
7
  "components": [
8
8
  {
@@ -467,7 +467,7 @@
467
467
  "a11y": [
468
468
  "Each drawn state is marked with a data-state attribute on the wrapper: loading, error, empty or data. Idle draws no wrapper.",
469
469
  "With no skeleton, the loading state is an indeterminate progress bar labelled Loading.",
470
- "The error state is an empty state with a Retry button that calls the state's retry.",
470
+ "The error state is an empty state with a Try again button that calls the state's retry.",
471
471
  "The component sets no aria attributes of its own."
472
472
  ]
473
473
  }
@@ -3103,9 +3103,9 @@
3103
3103
  "do": [],
3104
3104
  "dont": [],
3105
3105
  "a11y": [
3106
- "The panel has role dialog with aria-modal and is named by ariaLabel, else by the title.",
3106
+ "The panel is a native dialog, named by ariaLabel, else by the title.",
3107
3107
  "The sheet handle is a vertical slider labelled Sheet height, and the close button is labelled Close.",
3108
- "Focus moves in on open, Tab stays inside, Escape leaves it open unless staticBackdrop is false, and focus returns to what opened it."
3108
+ "Focus moves in on open, Tab moves through the drawer, then on to the browser, without wrapping, Escape leaves it open unless staticBackdrop is false, and focus returns to what opened it."
3109
3109
  ]
3110
3110
  }
3111
3111
  },
@@ -3462,6 +3462,118 @@
3462
3462
  ]
3463
3463
  }
3464
3464
  },
3465
+ {
3466
+ "name": "AppEntryGrid",
3467
+ "usage": {
3468
+ "when": [
3469
+ "A person enters or corrects several lines of figures in one table, one line at a time.",
3470
+ "Each line is saved on its own, and the person moves through the lines with the keyboard."
3471
+ ],
3472
+ "whenNot": [
3473
+ {
3474
+ "text": "The table only shows records and nothing is typed into it.",
3475
+ "instead": "AppDataTable"
3476
+ },
3477
+ {
3478
+ "text": "One field on a record is edited in place.",
3479
+ "instead": "AppInlineEdit"
3480
+ }
3481
+ ],
3482
+ "do": [
3483
+ {
3484
+ "title": "Save each line as the person leaves it",
3485
+ "note": "Enter saves the line and moves to the next one, so the person never reaches for a save button per line.",
3486
+ "example": [
3487
+ {
3488
+ "component": "AppEntryGrid",
3489
+ "props": {
3490
+ "columns": [
3491
+ {
3492
+ "key": "item",
3493
+ "label": "Item"
3494
+ },
3495
+ {
3496
+ "key": "units",
3497
+ "label": "Units",
3498
+ "kind": "number"
3499
+ }
3500
+ ],
3501
+ "rows": [
3502
+ {
3503
+ "id": "L1",
3504
+ "item": "Blue pens",
3505
+ "units": 48
3506
+ }
3507
+ ]
3508
+ }
3509
+ }
3510
+ ]
3511
+ }
3512
+ ],
3513
+ "dont": [
3514
+ {
3515
+ "title": "Save each line as the person leaves it",
3516
+ "note": "A read-only table with no save path leaves the person's typing with nowhere to go.",
3517
+ "example": [
3518
+ {
3519
+ "component": "AppDataTable",
3520
+ "props": {
3521
+ "columns": [
3522
+ {
3523
+ "key": "item",
3524
+ "label": "Item"
3525
+ },
3526
+ {
3527
+ "key": "units",
3528
+ "label": "Units"
3529
+ }
3530
+ ],
3531
+ "rows": [
3532
+ {
3533
+ "id": "L1",
3534
+ "item": "Blue pens",
3535
+ "units": 48
3536
+ }
3537
+ ]
3538
+ }
3539
+ }
3540
+ ]
3541
+ }
3542
+ ],
3543
+ "a11y": [
3544
+ "The table is named by label, and the active line carries aria-current.",
3545
+ "Each status is a glyph with a visually hidden word, so a saving, saved or failed line is not shown by colour alone.",
3546
+ "A failed line shows its error in an alert region under the line."
3547
+ ],
3548
+ "keyboard": [
3549
+ {
3550
+ "key": "Enter",
3551
+ "does": "Saves the line; the page moves to the next line once the save succeeds.",
3552
+ "notes": "Does nothing inside a text area, a button, or an open menu."
3553
+ },
3554
+ {
3555
+ "key": "Ctrl+S",
3556
+ "does": "Saves the line and keeps the focus on it.",
3557
+ "notes": "Meta+S does the same on a Mac."
3558
+ },
3559
+ {
3560
+ "key": "Escape",
3561
+ "does": "Discards the changes on the line and restores its last saved values.",
3562
+ "notes": "Does nothing inside an open menu."
3563
+ },
3564
+ {
3565
+ "key": "Ctrl+ArrowUp and Ctrl+ArrowDown",
3566
+ "does": "Moves the active line up or down.",
3567
+ "notes": "Does nothing at the first or last line."
3568
+ },
3569
+ {
3570
+ "key": "Tab and Shift+Tab",
3571
+ "does": "Move between the fields of a line in page order.",
3572
+ "notes": "Never intercepted, so the person can always tab out of the grid."
3573
+ }
3574
+ ]
3575
+ }
3576
+ },
3465
3577
  {
3466
3578
  "name": "AppErrorBoundary",
3467
3579
  "usage": {
@@ -4007,6 +4119,94 @@
4007
4119
  ]
4008
4120
  }
4009
4121
  },
4122
+ {
4123
+ "name": "AppFormulaSteps",
4124
+ "usage": {
4125
+ "when": [
4126
+ "Show how a figure on the page is reached, line by line, with the real numbers.",
4127
+ "The server computes the figure and the page only shows it: the lines display that result, and the page does no arithmetic of its own."
4128
+ ],
4129
+ "whenNot": [
4130
+ {
4131
+ "text": "The figures are many rows the user scans, sorts or edits.",
4132
+ "instead": "AppDataTable"
4133
+ },
4134
+ {
4135
+ "text": "The figures are a trend or a comparison shown as a picture.",
4136
+ "instead": "AppChart"
4137
+ },
4138
+ {
4139
+ "text": "The figure is a single value with no working to show.",
4140
+ "instead": "a plain value in the page text"
4141
+ }
4142
+ ],
4143
+ "do": [
4144
+ {
4145
+ "title": "End with the result line",
4146
+ "note": "Give each line the amount it stands for, and end with one equal line for the result.",
4147
+ "example": [
4148
+ {
4149
+ "component": "AppFormulaSteps",
4150
+ "props": {
4151
+ "label": "TDS on a bill",
4152
+ "steps": [
4153
+ {
4154
+ "key": "a",
4155
+ "label": "Bill amount",
4156
+ "result": "₹10,00,000.00"
4157
+ },
4158
+ {
4159
+ "key": "b",
4160
+ "sign": "minus",
4161
+ "label": "TDS",
4162
+ "result": "₹1,000.00"
4163
+ },
4164
+ {
4165
+ "key": "c",
4166
+ "sign": "equal",
4167
+ "label": "Net payable",
4168
+ "result": "₹9,99,000.00"
4169
+ }
4170
+ ]
4171
+ }
4172
+ }
4173
+ ]
4174
+ }
4175
+ ],
4176
+ "dont": [
4177
+ {
4178
+ "title": "End with the result line",
4179
+ "note": "A list of amounts with no equal line leaves the reader to add them up and find the total.",
4180
+ "example": [
4181
+ {
4182
+ "component": "AppFormulaSteps",
4183
+ "props": {
4184
+ "label": "TDS on a bill",
4185
+ "steps": [
4186
+ {
4187
+ "key": "a",
4188
+ "label": "Bill amount",
4189
+ "result": "₹10,00,000.00"
4190
+ },
4191
+ {
4192
+ "key": "b",
4193
+ "sign": "minus",
4194
+ "label": "TDS",
4195
+ "result": "₹1,000.00"
4196
+ }
4197
+ ]
4198
+ }
4199
+ }
4200
+ ]
4201
+ }
4202
+ ],
4203
+ "a11y": [
4204
+ "The lines are an ordered list with an accessible name, so a screen reader announces the count and reads each line in order.",
4205
+ "A screen reader reads each operator as its word, such as minus or times, taken from the sign-word props.",
4206
+ "Each operator glyph is hidden from assistive tech, so the symbol itself is never read out."
4207
+ ]
4208
+ }
4209
+ },
4010
4210
  {
4011
4211
  "name": "AppHoverCard",
4012
4212
  "usage": {
@@ -5041,8 +5241,8 @@
5041
5241
  }
5042
5242
  ],
5043
5243
  "a11y": [
5044
- "Focus stays inside the dialog: Tab and Shift+Tab wrap between its first and last control.",
5045
- "The page behind an open dialog is made inert, and the dialog is named by a plain-text title or by ariaLabel; a headerless dialog with neither warns in development.",
5244
+ "Focus opens on the first control. Tab moves through the dialog and then to the browser's bar, without wrapping.",
5245
+ "The dialog is named by a plain-text title or by ariaLabel; a headerless dialog with neither warns in development.",
5046
5246
  "An outside click leaves it open by default (staticBackdrop); Escape closes it unless closeOnEscape is false."
5047
5247
  ]
5048
5248
  }
@@ -6330,70 +6530,6 @@
6330
6530
  ]
6331
6531
  }
6332
6532
  },
6333
- {
6334
- "name": "AppResizable",
6335
- "usage": {
6336
- "when": [
6337
- "A reading pane, editor or preview whose ideal size depends on the person and the task.",
6338
- "Layouts a person returns to: add a storageKey."
6339
- ],
6340
- "whenNot": [
6341
- {
6342
- "text": "A fixed list beside an open item that stacks on phones.",
6343
- "instead": "AppSplitView"
6344
- },
6345
- {
6346
- "text": "Collapsing a region rather than sizing it.",
6347
- "instead": "AppAccordion"
6348
- }
6349
- ],
6350
- "do": [],
6351
- "dont": [],
6352
- "a11y": [
6353
- "Each handle is a keyboard-focusable separator named by its label.",
6354
- "Arrow keys along the axis move it 5%, with Shift 20%; Home and End take the panel before it to its minimum or maximum; a double click restores the default sizes.",
6355
- "The group writes each handle's current size and limits as aria-valuenow, aria-valuemin and aria-valuemax."
6356
- ]
6357
- }
6358
- },
6359
- {
6360
- "name": "AppResizableHandle",
6361
- "usage": {
6362
- "when": [
6363
- "Between two AppResizablePanels inside an AppResizable, as the divider the person drags."
6364
- ],
6365
- "whenNot": [
6366
- {
6367
- "text": "Outside an AppResizable group: there are no panels for it to resize.",
6368
- "instead": "AppResizable"
6369
- }
6370
- ],
6371
- "do": [],
6372
- "dont": [],
6373
- "a11y": [
6374
- "It is a focusable separator (role separator, one tab stop) named by its label.",
6375
- "Arrow keys, Home and End resize the panel before it against the panel after it, and its current size and limits are announced."
6376
- ]
6377
- }
6378
- },
6379
- {
6380
- "name": "AppResizablePanel",
6381
- "usage": {
6382
- "when": [
6383
- "Inside an AppResizable, one for each region whose size the person can change."
6384
- ],
6385
- "whenNot": [
6386
- {
6387
- "text": "Content that must keep a fixed size beside a resizable region. Place it outside the group."
6388
- }
6389
- ],
6390
- "do": [],
6391
- "dont": [],
6392
- "a11y": [
6393
- "The panel is a plain div with no role or aria attributes; the content inside carries its own semantics."
6394
- ]
6395
- }
6396
- },
6397
6533
  {
6398
6534
  "name": "AppResourceCard",
6399
6535
  "usage": {
@@ -6553,31 +6689,6 @@
6553
6689
  ]
6554
6690
  }
6555
6691
  },
6556
- {
6557
- "name": "AppRollingNumber",
6558
- "usage": {
6559
- "when": [
6560
- "A total or count that changes while the person is looking: a cart, a dashboard tile, a live counter."
6561
- ],
6562
- "whenNot": [
6563
- {
6564
- "text": "A figure that is set once on load, or a table cell in a long list.",
6565
- "instead": "plain text"
6566
- },
6567
- {
6568
- "text": "A KPI with a label, trend and sparkline.",
6569
- "instead": "AppKpiTile"
6570
- }
6571
- ],
6572
- "do": [],
6573
- "dont": [],
6574
- "a11y": [
6575
- "The rolling digits are hidden from assistive technology, and the final value sits next to them as plain text.",
6576
- "A change is not announced on every roll: wrap the figure in your own live region where a change should be announced.",
6577
- "Under reduced motion the figure just changes."
6578
- ]
6579
- }
6580
- },
6581
6692
  {
6582
6693
  "name": "AppRouteError",
6583
6694
  "usage": {
@@ -6642,63 +6753,27 @@
6642
6753
  }
6643
6754
  },
6644
6755
  {
6645
- "name": "AppRowSwitch",
6756
+ "name": "AppRowActions",
6646
6757
  "usage": {
6647
6758
  "when": [
6648
- "A setting on one row of a table that saves on its own, such as portal access or auto-reminders.",
6649
- "Each row has its own state and the change must reach the server before the row shows it."
6759
+ "The actions at the end of a table or list row, one list that shows as icon buttons from sm up and as one menu on a phone."
6650
6760
  ],
6651
6761
  "whenNot": [
6652
6762
  {
6653
- "text": "The switch is a page-level setting with no table row.",
6654
- "instead": "AppSwitch"
6655
- },
6656
- {
6657
- "text": "The row action opens several choices.",
6763
+ "text": "A menu that is not a row's own actions.",
6658
6764
  "instead": "AppDropdown"
6659
6765
  },
6660
6766
  {
6661
- "text": "The user submits several rows of settings together.",
6662
- "instead": "AppCheckbox"
6663
- }
6664
- ],
6665
- "do": [
6666
- {
6667
- "title": "Wait for the save before flipping",
6668
- "note": "The row keeps its saved state. The switch shows the next state only after the save resolves.",
6669
- "example": [
6670
- {
6671
- "component": "AppRowSwitch",
6672
- "props": {
6673
- "label": "Portal access",
6674
- "checked": true
6675
- },
6676
- "handlers": [
6677
- "onToggle"
6678
- ]
6679
- }
6680
- ]
6681
- }
6682
- ],
6683
- "dont": [
6684
- {
6685
- "title": "Wait for the save before flipping",
6686
- "note": "A page-level switch in a row has no busy state, so a second flip can race the first save.",
6687
- "example": [
6688
- {
6689
- "component": "AppSwitch",
6690
- "props": {
6691
- "label": "Portal access",
6692
- "defaultChecked": true
6693
- }
6694
- }
6695
- ]
6767
+ "text": "Bulk actions on the selected rows.",
6768
+ "instead": "AppTableToolbar"
6696
6769
  }
6697
6770
  ],
6771
+ "do": [],
6772
+ "dont": [],
6698
6773
  "a11y": [
6699
- "The control is a button with role switch and aria-checked, so a screen reader reads its state.",
6700
- "label is the accessible name, read out with the state.",
6701
- "While a save is pending the switch is busy and disabled, so a second flip cannot race the first."
6774
+ "Each icon button is named by its label and shows it as a tooltip; a disabled one names its disabledReason too.",
6775
+ "The menu trigger is named by menuLabel; Enter or Space opens the menu, arrows move through its rows, and Escape closes it and returns focus to the trigger.",
6776
+ "Below sm only the menu is shown, so every action is reachable by a touch target and by the keyboard."
6702
6777
  ]
6703
6778
  }
6704
6779
  },
@@ -0,0 +1 @@
1
+ import{extractApiError as e}from"../web-core/dist/errors/extractApiError.js";import{useState as t}from"react";var n=e=>e.length>0,r=(e,t,n)=>{if(typeof e==`object`&&e){if(`type`in e&&typeof e.type==`string`)n[t]=`message`in e&&typeof e.message==`string`?e.message:``;else for(let[i,a]of Object.entries(e))r(a,t===``?i:`${t}.${i}`,n)}};function i(i,a){let[o,s]=t([]),c={};return r(i.formState.errors,``,c),{onSubmit:async(t,r)=>{s([]);let o=!1;return await i.handleSubmit(async t=>{try{await a.onSubmit(t,r)}catch(t){let r=e(t);if(r.offline){s([r.message]);return}if(r.status>0){let e=Object.entries(r.fieldErrors);e.length===0&&s([r.message]);for(let[t,r]of e)n(t)&&i.setError(t,{type:`server`,message:r});return}throw t}i.reset(i.getValues()),o=!0})(t),o},fieldErrors:c,formErrors:o,noValidate:!0}}export{i as useHookForm};
@@ -1 +1 @@
1
- import e from"./FieldMessage.js";import{FIELD_BUSY_CLASS as t}from"./fieldState.js";import{forwardRef as n,useId as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=()=>{},s=n(function({label:n,id:s,name:c,error:l,hint:u,className:d=``,rest:f={},inputType:p,wrapperClass:m,rootProps:h,readOnly:g=!1,loading:_=!1,size:v=`md`,controlOnly:y=!1},b){let x=r(),S=s||x,C=l?`${S}-error`:void 0,w=u?`${S}-hint`:void 0,T=v===`sm`?` form-check-sm`:v===`lg`?` form-check-lg`:``,{onClick:E,...D}=f;(g||_)&&D.checked!==void 0&&D.onChange===void 0&&(D.onChange=o);let O=_?`form-check-input ${t}`:`form-check-input`,k=y&&d?`${O} ${d}`:O,A=/* @__PURE__ */ i(`input`,{...y?h:void 0,type:p,className:k,id:S,name:c,ref:b,"aria-invalid":l?`true`:`false`,"aria-describedby":C||w,"aria-readonly":g||void 0,"aria-busy":_||void 0,onClick:e=>{g||_?e.preventDefault():E?.(e)},...D});return y?A:/* @__PURE__ */ a(`div`,{className:`${m}${T}${d?` ${d}`:``}`,...h,children:[A,n!=null&&/* @__PURE__ */ i(`label`,{className:`form-check-label`,htmlFor:S,children:n}),/* @__PURE__ */ i(e,{error:l,hint:u,errorId:C,hintId:w})]})});export{s as default};
1
+ import e from"./FieldMessage.js";import{FIELD_BUSY_CLASS as t}from"./fieldState.js";import{useFieldError as n}from"./formFields.js";import{forwardRef as r,useId as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=()=>{},c=r(function({label:r,id:c,name:l,error:u,hint:d,className:f=``,rest:p={},inputType:m,wrapperClass:h,rootProps:g,readOnly:_=!1,loading:v=!1,size:y=`md`,controlOnly:b=!1},x){let S=n(l),C=b?u:u??S,w=i(),T=c||w,E=C?`${T}-error`:void 0,D=d?`${T}-hint`:void 0,O=y===`sm`?` form-check-sm`:y===`lg`?` form-check-lg`:``,{onClick:k,...A}=p;(_||v)&&A.checked!==void 0&&A.onChange===void 0&&(A.onChange=s);let j=v?`form-check-input ${t}`:`form-check-input`,M=b&&f?`${j} ${f}`:j,N=/* @__PURE__ */ a(`input`,{...b?g:void 0,type:m,className:M,id:T,name:l,ref:x,"aria-invalid":C?`true`:`false`,"aria-describedby":E||D,"aria-readonly":_||void 0,"aria-busy":v||void 0,onClick:e=>{_||v?e.preventDefault():k?.(e)},...A});return b?N:/* @__PURE__ */ o(`div`,{className:`${h}${O}${f?` ${f}`:``}`,...g,children:[N,r!=null&&/* @__PURE__ */ a(`label`,{className:`form-check-label`,htmlFor:T,children:r}),/* @__PURE__ */ a(e,{error:C,hint:d,errorId:E,hintId:D})]})});export{c as default};
@@ -0,0 +1 @@
1
+ import{createContext as e,useContext as t,useEffect as n}from"react";var r=e(null);function i(e){let i=t(r),o=e?a(e):void 0,s=i?.claim;return n(()=>{if(o!==void 0&&s!==void 0)return s(o)},[s,o]),o!==void 0&&i?i.errorOf(o):void 0}function a(e){return e.replace(/\[(\w+)\]/g,`.$1`).replace(/^\./,``)}export{r as FormFieldsContext,a as toFieldName,i as useFieldError};
@@ -0,0 +1 @@
1
+ var e=e=>e.length<=3?e:`${e.slice(0,-3).replace(/\B(?=(\d{2})+(?!\d))/g,`,`)},${e.slice(-3)}`,t=t=>{let n=/^(-?)(\d*)(\..*)?$/.exec(t);return n?`${n[1]??``}${e(n[2]??``)}${n[3]??``}`:t};export{e as groupIndianDigits,t as groupIndianText};
@@ -0,0 +1 @@
1
+ var e=Object.freeze({title:`Leave without saving?`,message:`Your changes on this page are not saved. If you leave now, they are lost.`,leaveLabel:`Leave`});export{e as UNSAVED_TEXT};
@@ -0,0 +1 @@
1
+ import{onOverlayRootChange as e,overlayRoot as t}from"@webority/ui-elements/helpers";import{useSyncExternalStore as n}from"react";var r=t=>e(()=>t());function i(){return n(r,()=>t(),()=>null)}export{i as useOverlayRoot};
@@ -35,7 +35,7 @@ export interface AppAccordionProps extends ComponentPropsWithoutRef<"div"> {
35
35
  className?: string | undefined;
36
36
  }
37
37
  /**
38
- * Collapsible panes — an FAQ list, a set of grouped settings, a "more detail"
38
+ * Collapsible panes: an FAQ list, a set of grouped settings, a "more detail"
39
39
  * disclosure. Renders the theme's `.wui-accordion` markup, the same as the Razor
40
40
  * `<app-accordion>`.
41
41
  *
@@ -57,7 +57,7 @@ export interface AppAlertProps extends Omit<ComponentPropsWithoutRef<"div">, "ti
57
57
  role?: "alert" | "status" | "none" | undefined;
58
58
  }
59
59
  /**
60
- * The shared tinted banner — wraps react-bootstrap <Alert> (same `.alert` /
60
+ * The shared tinted banner wraps react-bootstrap <Alert> (same `.alert` /
61
61
  * `.alert-{variant}` classes Bootstrap + the theme already style). Screens must
62
62
  * use this instead of raw `className="alert alert-…"`.
63
63
  *
@@ -21,17 +21,17 @@ export interface AppAsyncBlockProps<T> extends Omit<ComponentPropsWithoutRef<"di
21
21
  loadingLabel?: string | undefined;
22
22
  /**
23
23
  * Replaces the built-in English text, for other languages.
24
- * @default "Something went wrong"
24
+ * @default "That didn't load"
25
25
  */
26
26
  errorTitle?: string | undefined;
27
27
  /**
28
28
  * Replaces the built-in English text, for other languages.
29
- * @default "Retry"
29
+ * @default "Try again"
30
30
  */
31
31
  retryLabel?: string | undefined;
32
32
  /**
33
33
  * Replaces the built-in English text, for other languages.
34
- * @default "Nothing to show yet"
34
+ * @default "Nothing here yet"
35
35
  */
36
36
  emptyTitle?: string | undefined;
37
37
  }
@@ -23,6 +23,11 @@ export interface AppBreadcrumbsProps extends ComponentPropsWithoutRef<"nav"> {
23
23
  * @default "Show hidden levels"
24
24
  */
25
25
  moreLabel?: string | undefined;
26
+ /**
27
+ * false keeps the trail on one line; items do not wrap.
28
+ * @default true
29
+ */
30
+ wrap?: boolean | undefined;
26
31
  }
27
32
  /** True inside a bar page header: every crumb is a parent link and none is the current page. */
28
33
  export declare const BreadcrumbTrailContext: Context<boolean>;
@@ -45,5 +50,6 @@ export declare const BreadcrumbTrailContext: Context<boolean>;
45
50
  * @param {string} [props.className]
46
51
  * @param {number} [props.maxItems] Below md, show only the last this many crumbs, with an ellipsis menu holding the rest. A whole number of 1 or more.
47
52
  * @param {string} [props.moreLabel] The accessible name of the ellipsis button. Default "Show hidden levels".
53
+ * @param {boolean} [props.wrap] false keeps the trail on one line; items do not wrap. Default true.
48
54
  */
49
55
  export default function AppBreadcrumbs(props: AppBreadcrumbsProps): ReactElement;
@@ -101,7 +101,7 @@ export interface AppCardProps extends Omit<React.ComponentPropsWithoutRef<"div">
101
101
  closeLabel?: string | undefined;
102
102
  }
103
103
  /**
104
- * The shared surface card — wraps react-bootstrap <Card> and the theme's `.card` chrome.
104
+ * The shared surface card wraps react-bootstrap <Card> and the theme's `.card` chrome.
105
105
  *
106
106
  * Beyond a plain surface it carries visual variants, a tone-tinted accent stripe, a padding
107
107
  * scale, an optional capped/centred width, a header (icon + title + subtitle + actions), a