@webority/ui-react 0.121.0 → 0.124.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 (214) hide show
  1. package/dist/canvas-kit/kit.css +2 -0
  2. package/dist/canvas-kit/kit.js +33568 -34365
  3. package/dist/canvas-kit/manifest.json +240 -3
  4. package/dist/canvas-kit/release.json +8 -8
  5. package/dist/components/AppAccordion.js +1 -1
  6. package/dist/components/AppActionIcon.js +1 -1
  7. package/dist/components/AppAlert.js +1 -1
  8. package/dist/components/AppAsyncBlock.js +1 -1
  9. package/dist/components/AppAutocomplete.js +1 -1
  10. package/dist/components/AppAvatar.js +1 -1
  11. package/dist/components/AppAvatarGroup.js +1 -1
  12. package/dist/components/AppBadge.js +1 -1
  13. package/dist/components/AppBanner.js +1 -1
  14. package/dist/components/AppBreadcrumbs.js +1 -1
  15. package/dist/components/AppButton.js +1 -1
  16. package/dist/components/AppButtonGroup.js +1 -1
  17. package/dist/components/AppCalendar.js +1 -1
  18. package/dist/components/AppCard.js +1 -1
  19. package/dist/components/AppCarousel.js +1 -1
  20. package/dist/components/AppChart.js +1 -1
  21. package/dist/components/AppChartCard.js +1 -1
  22. package/dist/components/AppCheckbox.js +1 -1
  23. package/dist/components/AppChip.js +1 -1
  24. package/dist/components/AppChipGroup.js +1 -1
  25. package/dist/components/AppChoiceCard.js +1 -1
  26. package/dist/components/AppChoiceChip.js +1 -1
  27. package/dist/components/AppCodeBlock.js +1 -1
  28. package/dist/components/AppColorField.js +1 -1
  29. package/dist/components/AppColumnMenu.js +1 -1
  30. package/dist/components/AppCommandPalette.js +1 -1
  31. package/dist/components/AppCommentThread.js +1 -1
  32. package/dist/components/AppCompareTable.js +1 -1
  33. package/dist/components/AppConfirmDialog.js +1 -1
  34. package/dist/components/AppConfirmProvider.js +1 -0
  35. package/dist/components/AppConsentBanner.js +1 -1
  36. package/dist/components/AppContextMenu.js +1 -1
  37. package/dist/components/AppCopyButton.js +1 -1
  38. package/dist/components/AppCountryFlag.js +1 -1
  39. package/dist/components/AppCountrySelect.js +1 -1
  40. package/dist/components/AppDashboardCell.js +1 -1
  41. package/dist/components/AppDashboardGrid.js +1 -1
  42. package/dist/components/AppDataTable.js +1 -1
  43. package/dist/components/AppDatePicker.js +1 -1
  44. package/dist/components/AppDateRangePicker.js +1 -1
  45. package/dist/components/AppDescriptions.js +1 -1
  46. package/dist/components/AppDetailPane.js +1 -1
  47. package/dist/components/AppDrawer.js +1 -1
  48. package/dist/components/AppDropZone.js +1 -1
  49. package/dist/components/AppDropdown.js +1 -1
  50. package/dist/components/AppDueDate.js +1 -1
  51. package/dist/components/AppEmptyState.js +1 -1
  52. package/dist/components/AppErrorSummary.js +1 -1
  53. package/dist/components/AppFileAttachment.js +1 -1
  54. package/dist/components/AppFilePicker.js +1 -1
  55. package/dist/components/AppFileTiles.js +1 -1
  56. package/dist/components/AppFileViewer.js +1 -1
  57. package/dist/components/AppFilterBar.js +1 -1
  58. package/dist/components/AppFloatingDock.js +1 -1
  59. package/dist/components/AppFormActions.js +1 -1
  60. package/dist/components/AppFormRow.js +1 -1
  61. package/dist/components/AppFormSection.js +1 -1
  62. package/dist/components/AppHoverCard.js +1 -1
  63. package/dist/components/AppIcon.js +1 -1
  64. package/dist/components/AppImagePicker.js +1 -1
  65. package/dist/components/AppInfoTip.js +1 -1
  66. package/dist/components/AppInlineEdit.js +1 -1
  67. package/dist/components/AppInput.js +1 -1
  68. package/dist/components/AppInputGroup.js +1 -1
  69. package/dist/components/AppKanban.js +1 -1
  70. package/dist/components/AppKbd.js +1 -1
  71. package/dist/components/AppKpiTile.js +1 -1
  72. package/dist/components/AppLightbox.js +1 -1
  73. package/dist/components/AppLink.js +1 -1
  74. package/dist/components/AppMarkdown.js +1 -1
  75. package/dist/components/AppMentionInput.js +1 -1
  76. package/dist/components/AppMeter.js +1 -1
  77. package/dist/components/AppMetricStrip.js +1 -1
  78. package/dist/components/AppModal.js +1 -1
  79. package/dist/components/AppMultiSelect.js +1 -1
  80. package/dist/components/AppNavList.js +1 -1
  81. package/dist/components/AppNavigationMenu.js +1 -1
  82. package/dist/components/AppNotificationCenter.js +1 -1
  83. package/dist/components/AppNumberInput.js +1 -1
  84. package/dist/components/AppOnboardingChecklist.js +1 -1
  85. package/dist/components/AppOtpInput.js +1 -1
  86. package/dist/components/AppPageHeader.js +1 -1
  87. package/dist/components/AppPhoneNumberInput.js +1 -1
  88. package/dist/components/AppPopover.js +1 -1
  89. package/dist/components/AppPricingCard.js +1 -1
  90. package/dist/components/AppProgress.js +1 -1
  91. package/dist/components/AppQrCode.js +1 -1
  92. package/dist/components/AppRadio.js +1 -1
  93. package/dist/components/AppRadioGroup.js +1 -1
  94. package/dist/components/AppRating.js +1 -1
  95. package/dist/components/AppRecordPager.js +1 -1
  96. package/dist/components/AppRelativeTime.js +1 -1
  97. package/dist/components/AppRepeater.js +1 -1
  98. package/dist/components/AppRequiredMark.js +1 -1
  99. package/dist/components/AppResizable.js +1 -1
  100. package/dist/components/AppResizableHandle.js +1 -1
  101. package/dist/components/AppResizablePanel.js +1 -1
  102. package/dist/components/AppResourceCard.js +1 -1
  103. package/dist/components/AppResult.js +1 -1
  104. package/dist/components/AppRichText.js +1 -1
  105. package/dist/components/AppRollingNumber.js +1 -1
  106. package/dist/components/AppRouteError.js +1 -1
  107. package/dist/components/AppRowSwitch.js +1 -0
  108. package/dist/components/AppScoreScale.js +1 -1
  109. package/dist/components/AppScrollbar.js +1 -1
  110. package/dist/components/AppSearch.js +1 -1
  111. package/dist/components/AppSectionCallToAction.js +1 -1
  112. package/dist/components/AppSectionFaq.js +1 -1
  113. package/dist/components/AppSectionFeatures.js +1 -1
  114. package/dist/components/AppSectionHero.js +1 -1
  115. package/dist/components/AppSectionLeadCapture.js +1 -1
  116. package/dist/components/AppSectionLogos.js +1 -1
  117. package/dist/components/AppSectionPricing.js +1 -1
  118. package/dist/components/AppSectionTestimonials.js +1 -1
  119. package/dist/components/AppSegmented.js +1 -1
  120. package/dist/components/AppSelect.js +1 -1
  121. package/dist/components/AppSeoHead.js +1 -1
  122. package/dist/components/AppShell.js +1 -1
  123. package/dist/components/AppShortcutLegend.js +1 -1
  124. package/dist/components/AppShowMore.js +1 -1
  125. package/dist/components/AppSkeleton.js +1 -1
  126. package/dist/components/AppSkeletonLines.js +1 -1
  127. package/dist/components/AppSlider.js +1 -1
  128. package/dist/components/AppSortableList.js +1 -1
  129. package/dist/components/AppSparkline.js +1 -1
  130. package/dist/components/AppSpinner.js +1 -1
  131. package/dist/components/AppSplash.js +1 -1
  132. package/dist/components/AppSplitButton.js +1 -1
  133. package/dist/components/AppSplitView.js +1 -1
  134. package/dist/components/AppStatusBadge.js +1 -1
  135. package/dist/components/AppStepper.js +1 -1
  136. package/dist/components/AppSwitch.js +1 -1
  137. package/dist/components/AppTablePagination.js +1 -1
  138. package/dist/components/AppTableToolbar.js +1 -1
  139. package/dist/components/AppTabs.js +1 -1
  140. package/dist/components/AppTagInput.js +1 -1
  141. package/dist/components/AppTextarea.js +1 -1
  142. package/dist/components/AppThemeToggle.js +1 -1
  143. package/dist/components/AppTimePicker.js +1 -1
  144. package/dist/components/AppTimeline.js +1 -1
  145. package/dist/components/AppToast.js +1 -1
  146. package/dist/components/AppToolbar.js +1 -1
  147. package/dist/components/AppTooltip.js +1 -1
  148. package/dist/components/AppTour.js +1 -1
  149. package/dist/components/AppTreeView.js +1 -1
  150. package/dist/components/AppTruncate.js +1 -1
  151. package/dist/components/AppUpdateBar.js +1 -1
  152. package/dist/components/AppWhatsNew.js +1 -1
  153. package/dist/components/AppWizard.js +1 -1
  154. package/dist/components/AppWorkspaceSwitcher.js +1 -1
  155. package/dist/components/ModalIcons.js +1 -1
  156. package/dist/components/iconCatalogNames.g.js +1 -1
  157. package/dist/components/iconGlyphs.g.js +1 -1
  158. package/dist/components/iconVariants.g.js +1 -1
  159. package/dist/components/toast.js +1 -1
  160. package/dist/components/toastStore.js +1 -1
  161. package/dist/components/useWuiControl.js +1 -1
  162. package/dist/components/warnInvalidValue.js +1 -1
  163. package/dist/components/warnUnknownProps.js +1 -1
  164. package/dist/components/withTooltip.js +1 -1
  165. package/dist/guidance.json +60 -1
  166. package/dist/lib/CheckField.js +1 -1
  167. package/dist/lib/DiscardPrompt.js +1 -1
  168. package/dist/lib/FieldMessage.js +1 -1
  169. package/dist/lib/FileItemRow.js +1 -1
  170. package/dist/lib/FocusPanel.js +1 -1
  171. package/dist/lib/emptyIllustration.js +1 -1
  172. package/dist/lib/fileItem.js +1 -1
  173. package/dist/lib/flagStyles.js +1 -0
  174. package/dist/lib/initials.js +1 -1
  175. package/dist/lib/pageScrollLock.js +1 -0
  176. package/dist/lib/qrCode.js +1 -1
  177. package/dist/lib/sectionShell.js +1 -1
  178. package/dist/lib/shellCookie.js +1 -1
  179. package/dist/lib/shortcutChip.js +1 -1
  180. package/dist/lib/useFileDrop.js +1 -1
  181. package/dist/lib/useFloatingStack.js +1 -1
  182. package/dist/lib/useListQuery.js +1 -1
  183. package/dist/lib/wuiMarker.js +1 -1
  184. package/dist/markdown-core/dist/citations.js +1 -0
  185. package/dist/markdown-core/dist/inline.js +1 -1
  186. package/dist/types/components/AppAutocomplete.d.ts +12 -1
  187. package/dist/types/components/AppChart.d.ts +2 -0
  188. package/dist/types/components/AppColorField.d.ts +6 -0
  189. package/dist/types/components/AppConfirmDialog.d.ts +3 -0
  190. package/dist/types/components/AppConfirmProvider.d.ts +27 -0
  191. package/dist/types/components/AppCountrySelect.d.ts +5 -0
  192. package/dist/types/components/AppDatePicker.d.ts +5 -0
  193. package/dist/types/components/AppDateRangePicker.d.ts +5 -0
  194. package/dist/types/components/AppFilePicker.d.ts +6 -0
  195. package/dist/types/components/AppImagePicker.d.ts +6 -0
  196. package/dist/types/components/AppMarkdown.d.ts +4 -0
  197. package/dist/types/components/AppMultiSelect.d.ts +5 -0
  198. package/dist/types/components/AppNumberInput.d.ts +5 -0
  199. package/dist/types/components/AppOtpInput.d.ts +5 -0
  200. package/dist/types/components/AppPhoneNumberInput.d.ts +5 -0
  201. package/dist/types/components/AppRadioGroup.d.ts +6 -0
  202. package/dist/types/components/AppRepeater.d.ts +2 -2
  203. package/dist/types/components/AppRowSwitch.d.ts +23 -0
  204. package/dist/types/components/AppSelect.d.ts +5 -0
  205. package/dist/types/components/AppSlider.d.ts +5 -0
  206. package/dist/types/components/AppTagInput.d.ts +5 -0
  207. package/dist/types/components/AppTimePicker.d.ts +5 -0
  208. package/dist/types/components/iconGlyphs.g.d.ts +11 -0
  209. package/dist/types/components/iconVariants.g.d.ts +55 -0
  210. package/dist/types/index.d.ts +2 -0
  211. package/dist/types/lib/flagStyles.d.ts +2 -0
  212. package/dist/types/lib/pageScrollLock.d.ts +1 -0
  213. package/dist/ui-react.js +1 -1
  214. package/package.json +6 -6
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import{dismissAllToasts as t,pushToast as n}from"./toastStore.js";function r(){t()}var i=new Set([`success`,`info`,`warning`,`danger`]);function a(t,r=`info`){let a=`info`,o={};typeof r==`string`?(e(`toast`,`variant`,r,i),a=i.has(r)?r:`info`):typeof r==`object`&&r&&(o=r,e(`toast`,`variant`,o.variant,i),a=i.has(o.variant)?o.variant:`info`),n(t,a,o)}function o(e,t={}){n(e,`danger`,t)}a.promise=(e,t,n={})=>{let r=n.id||`promise-${Date.now()}-${Math.random()}`;return a(t.loading||`Loading...`,{...n,variant:`info`,id:r,duration:0}),e.then(e=>(a((typeof t.success==`function`?t.success(e):t.success)||`Done`,{...n,variant:`success`,id:r,duration:n.duration===void 0?5e3:n.duration}),e)).catch(e=>{throw a((typeof t.error==`function`?t.error(e):t.error)||`Error`,{...n,variant:`danger`,id:r,duration:n.duration===void 0?5e3:n.duration}),e})};export{r as dismissAll,o as errorToast,a as toast};
1
+ import{dismissAllToasts as e,pushToast as t}from"./toastStore.js";import n from"./warnInvalidValue.js";function r(){e()}var i=/* @__PURE__ */ new Set([`success`,`info`,`warning`,`danger`]);function a(e,r=`info`){let a=`info`,o={};typeof r==`string`?(n(`toast`,`variant`,r,i),a=i.has(r)?r:`info`):typeof r==`object`&&r&&(o=r,n(`toast`,`variant`,o.variant,i),a=i.has(o.variant)?o.variant:`info`),t(e,a,o)}function o(e,n={}){t(e,`danger`,n)}a.promise=(e,t,n={})=>{let r=n.id||`promise-${Date.now()}-${Math.random()}`;return a(t.loading||`Loading...`,{...n,variant:`info`,id:r,duration:0}),e.then(e=>(a((typeof t.success==`function`?t.success(e):t.success)||`Done`,{...n,variant:`success`,id:r,duration:n.duration===void 0?5e3:n.duration}),e)).catch(e=>{throw a((typeof t.error==`function`?t.error(e):t.error)||`Error`,{...n,variant:`danger`,id:r,duration:n.duration===void 0?5e3:n.duration}),e})};export{r as dismissAll,o as errorToast,a as toast};
@@ -1 +1 @@
1
- var e=[],t=new Set,n=new Map,r=new Set,i=0;function a(){for(let n of t)n(e)}function o(e){let t=n.get(e);t!==void 0&&(clearTimeout(t),n.delete(e))}function s(e,t){if(e.length<=6)return e;let n=[...e],i=[];for(;n.length>6;){let e=n.findIndex(e=>e.id!==t&&e.duration!==0);i.push(n.splice(e===-1?n.findIndex(e=>e.id!==t):e,1)[0])}for(let e of i)o(e.id),r.delete(e.id);return n}function c(i){return t.add(i),i(e),()=>{if(t.delete(i),t.size===0)for(let t of e)t.duration>0&&!n.has(t.id)&&(r.delete(t.id),n.set(t.id,setTimeout(()=>d(t.id),t.duration)))}}function l(t,c,l={}){let u=l.id,f=u||typeof t!=`string`?void 0:`${c}:${t}`;if(u){let i=e.find(e=>e.externalId===u);if(i){o(i.id);let s=l.duration===void 0?5e3:l.duration;e=e.map(e=>e.id===i.id?{...e,message:t,variant:c,title:l.title,duration:s,action:l.action,animation:l.animation,shape:l.shape,surface:l.surface,progress:l.progress}:e),a(),s>0&&!r.has(i.id)&&n.set(i.id,setTimeout(()=>d(i.id),s));return}}else if(f&&e.some(e=>e.key===f))return;let p=++i,m=l.duration===void 0?5e3:l.duration;e=s([...e,{id:p,externalId:u,message:t,variant:c,title:l.title,duration:m,action:l.action,animation:l.animation,shape:l.shape,surface:l.surface,progress:l.progress,key:f}],p),a(),m>0&&n.set(p,setTimeout(()=>d(p),m))}function u(e){o(e),r.add(e)}function d(t){o(t),r.delete(t);let n=e.filter(e=>e.id!==t);n.length!==e.length&&(e=n,a())}function f(){if(!(e.length===0&&n.size===0&&r.size===0)){for(let e of n.values())clearTimeout(e);n.clear(),r.clear(),e.length!==0&&(e=[],a())}}export{u as adoptToast,f as dismissAllToasts,d as dismissToast,l as pushToast,c as subscribeToasts};
1
+ var e=[],t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Set,i=0;function a(){for(let n of t)n(e)}function o(e){let t=n.get(e);t!==void 0&&(clearTimeout(t),n.delete(e))}function s(e,t){if(e.length<=6)return e;let n=[...e],i=[];for(;n.length>6;){let e=n.findIndex(e=>e.id!==t&&e.duration!==0);i.push(n.splice(e===-1?n.findIndex(e=>e.id!==t):e,1)[0])}for(let e of i)o(e.id),r.delete(e.id);return n}function c(i){return t.add(i),i(e),()=>{if(t.delete(i),t.size===0)for(let t of e)t.duration>0&&!n.has(t.id)&&(r.delete(t.id),n.set(t.id,setTimeout(()=>d(t.id),t.duration)))}}function l(t,c,l={}){let u=l.id,f=u||typeof t!=`string`?void 0:`${c}:${t}`;if(u){let i=e.find(e=>e.externalId===u);if(i){o(i.id);let s=l.duration===void 0?5e3:l.duration;e=e.map(e=>e.id===i.id?{...e,message:t,variant:c,title:l.title,duration:s,action:l.action,animation:l.animation,shape:l.shape,surface:l.surface,progress:l.progress}:e),a(),s>0&&!r.has(i.id)&&n.set(i.id,setTimeout(()=>d(i.id),s));return}}else if(f&&e.some(e=>e.key===f))return;let p=++i,m=l.duration===void 0?5e3:l.duration;e=s([...e,{id:p,externalId:u,message:t,variant:c,title:l.title,duration:m,action:l.action,animation:l.animation,shape:l.shape,surface:l.surface,progress:l.progress,key:f}],p),a(),m>0&&n.set(p,setTimeout(()=>d(p),m))}function u(e){o(e),r.add(e)}function d(t){o(t),r.delete(t);let n=e.filter(e=>e.id!==t);n.length!==e.length&&(e=n,a())}function f(){if(e.length!==0||n.size!==0||r.size!==0){for(let e of n.values())clearTimeout(e);n.clear(),r.clear(),e.length!==0&&(e=[],a())}}export{u as adoptToast,f as dismissAllToasts,d as dismissToast,l as pushToast,c as subscribeToasts};
@@ -1 +1 @@
1
- import{useCallback as e,useEffect as t,useInsertionEffect as n,useRef as r}from"react";function i({ref:i,value:c,onChange:l,readValue:u,writeValue:d,events:f=a,on:p}={}){let m=r(null),h=u??o,g=d??s,_=(f||a).join(`\0`),v=Object.keys(p??{}).join(`\0`),y=r(null);y.current===null&&(y.current={ref:i,value:c,onChange:l,read:h,write:g,eventKey:_,on:p}),n(()=>{y.current={ref:i,value:c,onChange:l,read:h,write:g,eventKey:_,on:p}});let b=r(null),x=e(()=>{let e=b.current;if(e){for(let t of e.names)e.el.removeEventListener(t,e.handler);for(let t of e.extraNames)e.el.removeEventListener(t,e.extraHandler);b.current=null}},[]),S=e(e=>{let t=y.current.eventKey?y.current.eventKey.split(`\0`):a,n=Object.keys(y.current.on??{}),r={el:e,names:t,extraNames:n,last:void 0};r.handler=()=>{let t=y.current.read(e);Object.is(t,r.last)||(r.last=t,y.current.onChange?.(t))},r.extraHandler=e=>y.current.on?.[e.type]?.(e);for(let n of t)e.addEventListener(n,r.handler);for(let t of n)e.addEventListener(t,r.extraHandler);b.current=r},[]),C=e(e=>{m.current=e;let t=y.current.ref;typeof t==`function`?t(e):t&&(t.current=e),x(),e&&(S(e),y.current.value!==void 0&&y.current.write(e,y.current.value))},[x,S]);return t(()=>{let e=m.current;if(!e||c===void 0)return;g(e,c);let t=b.current;t&&!Object.is(c,t.last)&&(t.last=void 0)},[c,g]),t(()=>{let e=m.current,t=b.current;!e||!t||(t.names.join(`\0`)!==(_||a.join(`\0`))||t.extraNames.join(`\0`)!==v)&&(x(),S(e))},[_,v,x,S]),{setRef:C,innerRef:m}}var a=[`change`];function o(e){return e.value}function s(e,t){let n=t??``;String(e.value??``)!==String(n)&&(e.value=n)}function c(e,t){let n=e||[],r=t||[];return n.length===r.length&&n.every((e,t)=>{let n=r[t];if(e===n)return!0;if(e==null||n==null||typeof e!=`object`||typeof n!=`object`)return Object.is(e,n);let i=Object.keys(e);return i.length===Object.keys(n).length&&i.every(t=>Object.is(e[t],n[t]))})}function l(e){return e.values}function u(e,t){let n=t||[],r=e.values||[];(n.length!==r.length||!n.every((e,t)=>e===r[t]))&&(e.values=n)}function d(e){return{start:e.start,end:e.end}}function f(e,t){if(t===void 0)return;let n=Number.parseFloat(t);Number.isFinite(n)&&e.value!==n&&(e.value=n)}export{i as default,c as optionsEqual,d as readRange,l as readValues,f as writeNumberValue,u as writeValues};
1
+ import{useCallback as e,useEffect as t,useInsertionEffect as n,useRef as r}from"react";function i({ref:i,value:c,onChange:l,readValue:u,writeValue:d,events:f=a,on:p}={}){let m=r(null),h=u??o,g=d??s,_=(f||a).join(`\0`),v=Object.keys(p??{}).join(`\0`),y=r(null);y.current===null&&(y.current={ref:i,value:c,onChange:l,read:h,write:g,eventKey:_,on:p}),n(()=>{y.current={ref:i,value:c,onChange:l,read:h,write:g,eventKey:_,on:p}});let b=r(null),x=e(()=>{let e=b.current;if(e){for(let t of e.names)e.el.removeEventListener(t,e.handler);for(let t of e.extraNames)e.el.removeEventListener(t,e.extraHandler);b.current=null}},[]),S=e(e=>{let t=y.current.eventKey?y.current.eventKey.split(`\0`):a,n=Object.keys(y.current.on??{}),r={el:e,names:t,extraNames:n,last:void 0};r.handler=()=>{let t=y.current.read(e);Object.is(t,r.last)||(r.last=t,y.current.onChange?.(t))},r.extraHandler=e=>y.current.on?.[e.type]?.(e);for(let n of t)e.addEventListener(n,r.handler);for(let t of n)e.addEventListener(t,r.extraHandler);b.current=r},[]),C=e(e=>{m.current=e;let t=y.current.ref;typeof t==`function`?t(e):t&&(t.current=e),x(),e&&(S(e),y.current.value!==void 0&&y.current.write(e,y.current.value))},[x,S]);return t(()=>{let e=m.current;if(!e||c===void 0)return;g(e,c);let t=b.current;t&&!Object.is(c,t.last)&&(t.last=void 0)},[c,g]),t(()=>{let e=m.current,t=b.current;e&&t&&(t.names.join(`\0`)!==(_||a.join(`\0`))||t.extraNames.join(`\0`)!==v)&&(x(),S(e))},[_,v,x,S]),{setRef:C,innerRef:m}}var a=[`change`];function o(e){return e.value}function s(e,t){let n=t??``;String(e.value??``)!==String(n)&&(e.value=n)}function c(e,t){let n=e||[],r=t||[];return n.length===r.length&&n.every((e,t)=>{let n=r[t];if(e===n)return!0;if(e==null||n==null||typeof e!=`object`||typeof n!=`object`)return Object.is(e,n);let i=Object.keys(e);return i.length===Object.keys(n).length&&i.every(t=>Object.is(e[t],n[t]))})}function l(e){return e.values}function u(e,t){let n=t||[],r=e.values||[];n.length===r.length&&n.every((e,t)=>e===r[t])||(e.values=n)}function d(e){return{start:e.start,end:e.end}}function f(e,t){if(t===void 0)return;let n=Number.parseFloat(t);Number.isFinite(n)&&e.value!==n&&(e.value=n)}export{i as default,c as optionsEqual,d as readRange,l as readValues,f as writeNumberValue,u as writeValues};
@@ -1 +1 @@
1
- import{devWarn as e}from"../lib/devWarn.js";var t=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},n=new Set;function r(r,i,a,o){if(!t()||a==null)return;let s=o instanceof Set?o:new Set(o);if(s.has(a))return;let c=`${r}.${i}.${String(a)}`;n.has(c)||(n.add(c),e(`[@webority/ui-react] <${r}> received ${i}="${String(a)}", which is not one of ${[...s].map(e=>`"${e}"`).join(` | `)}. The component fell back to its default, so this renders something other than what the call site asks for — check the value against the component catalogue at https://ui-react.webority.dev.`))}export{r as default};
1
+ import{devWarn as e}from"../lib/devWarn.js";var t=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},n=/* @__PURE__ */ new Set;function r(r,i,a,o){if(!t()||a==null)return;let s=o instanceof Set?o:new Set(o);if(s.has(a))return;let c=`${r}.${i}.${String(a)}`;n.has(c)||(n.add(c),e(`[@webority/ui-react] <${r}> received ${i}="${String(a)}", which is not one of ${[...s].map(e=>`"${e}"`).join(` | `)}. The component fell back to its default, so this renders something other than what the call site asks for — check the value against the component catalogue at https://ui-react.webority.dev.`))}export{r as default};
@@ -1 +1 @@
1
- import{devWarn as e}from"../lib/devWarn.js";var t=new Set(`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=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};
@@ -1 +1 @@
1
- import e from"./AppTooltip.js";import{jsx as t}from"react/jsx-runtime";function n(n,r,i,a){return r==null||r===``?n:t(e,{content:r,placement:i||`auto`,shortcut:a,children:n})}export{n as default};
1
+ import e from"./AppTooltip.js";import{jsx as t}from"react/jsx-runtime";function n(n,r,i,a){return r==null||r===``?n:/* @__PURE__ */ t(e,{content:r,placement:i||`auto`,shortcut:a,children:n})}export{n as default};
@@ -2,7 +2,7 @@
2
2
  "format": "webority-guidance/1",
3
3
  "package": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.121.0"
5
+ "version": "0.124.0"
6
6
  },
7
7
  "components": [
8
8
  {
@@ -6330,6 +6330,65 @@
6330
6330
  ]
6331
6331
  }
6332
6332
  },
6333
+ {
6334
+ "name": "AppRowSwitch",
6335
+ "usage": {
6336
+ "when": [
6337
+ "A setting on one row of a table that saves on its own, such as portal access or auto-reminders.",
6338
+ "Each row has its own state and the change must reach the server before the row shows it."
6339
+ ],
6340
+ "whenNot": [
6341
+ {
6342
+ "text": "The switch is a page-level setting with no table row.",
6343
+ "instead": "AppSwitch"
6344
+ },
6345
+ {
6346
+ "text": "The row action opens several choices.",
6347
+ "instead": "AppDropdown"
6348
+ },
6349
+ {
6350
+ "text": "The user submits several rows of settings together.",
6351
+ "instead": "AppCheckbox"
6352
+ }
6353
+ ],
6354
+ "do": [
6355
+ {
6356
+ "note": "The row keeps its saved state. The switch shows the next state only after the save resolves.",
6357
+ "example": [
6358
+ {
6359
+ "component": "AppRowSwitch",
6360
+ "props": {
6361
+ "label": "Portal access",
6362
+ "checked": true
6363
+ },
6364
+ "handlers": [
6365
+ "onToggle"
6366
+ ]
6367
+ }
6368
+ ]
6369
+ }
6370
+ ],
6371
+ "dont": [
6372
+ {
6373
+ "note": "A page-level switch in a row has no busy state, so a second flip can race the first save.",
6374
+ "example": [
6375
+ {
6376
+ "component": "AppSwitch",
6377
+ "props": {
6378
+ "label": "Portal access",
6379
+ "defaultChecked": true
6380
+ }
6381
+ }
6382
+ ]
6383
+ }
6384
+ ],
6385
+ "a11y": [
6386
+ "The control is a button with role switch and aria-checked, so a screen reader reads its state.",
6387
+ "label is the accessible name, read out with the state.",
6388
+ "While a save is pending the switch is busy and disabled, so a second flip cannot race the first."
6389
+ ]
6390
+ }
6391
+ },
6333
6392
  {
6334
6393
  "name": "AppScoreScale",
6335
6394
  "usage": {
@@ -1 +1 @@
1
- import e from"./FieldMessage.js";import{forwardRef as t,useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=t(function({label:t,id:a,name:o,error:s,hint:c,className:l=``,rest:u={},inputType:d,wrapperClass:f,rootProps:p},m){let h=n(),g=a||h,_=s?`${g}-error`:void 0,v=c?`${g}-hint`:void 0;return i(`div`,{className:`${f}${l?` ${l}`:``}`,...p,children:[r(`input`,{type:d,className:`form-check-input`,id:g,name:o,ref:m,"aria-invalid":s?`true`:`false`,"aria-describedby":_||v,...u}),t!=null&&r(`label`,{className:`form-check-label`,htmlFor:g,children:t}),r(e,{error:s,hint:c,errorId:_,hintId:v})]})});export{a as default};
1
+ import e from"./FieldMessage.js";import{forwardRef as t,useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=t(function({label:t,id:a,name:o,error:s,hint:c,className:l=``,rest:u={},inputType:d,wrapperClass:f,rootProps:p},m){let h=n(),g=a||h,_=s?`${g}-error`:void 0,v=c?`${g}-hint`:void 0;return/* @__PURE__ */ i(`div`,{className:`${f}${l?` ${l}`:``}`,...p,children:[/* @__PURE__ */ r(`input`,{type:d,className:`form-check-input`,id:g,name:o,ref:m,"aria-invalid":s?`true`:`false`,"aria-describedby":_||v,...u}),t!=null&&/* @__PURE__ */ r(`label`,{className:`form-check-label`,htmlFor:g,children:t}),/* @__PURE__ */ r(e,{error:s,hint:c,errorId:_,hintId:v})]})});export{a as default};
@@ -1 +1 @@
1
- import e from"../components/AppButton.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({text:r,confirmRef:i,onDiscard:a,onKeep:o}){return n(`div`,{className:`wui-drawer-discard`,role:`alert`,children:[t(`span`,{className:`wui-drawer-discard-text`,children:r}),t(e,{variant:`danger`,size:`sm`,"data-wui-discard-confirm":``,ref:i,onClick:a,children:`Discard`}),t(e,{variant:`secondary`,size:`sm`,"data-wui-discard-keep":``,onClick:o,children:`Keep editing`})]})}export{r as default};
1
+ import e from"../components/AppButton.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({text:r,confirmRef:i,onDiscard:a,onKeep:o}){return/* @__PURE__ */ n(`div`,{className:`wui-drawer-discard`,role:`alert`,children:[/* @__PURE__ */ t(`span`,{className:`wui-drawer-discard-text`,children:r}),/* @__PURE__ */ t(e,{variant:`danger`,size:`sm`,"data-wui-discard-confirm":``,ref:i,onClick:a,children:`Discard`}),/* @__PURE__ */ t(e,{variant:`secondary`,size:`sm`,"data-wui-discard-keep":``,onClick:o,children:`Keep editing`})]})}export{r as default};
@@ -1 +1 @@
1
- import{useEffect as e,useState as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";var i=150;function a({error:a,hint:o,errorId:s,hintId:c}){let[l,u]=t(a||null),[d,f]=t(!1);e(()=>{if(a){u(a),f(!1);return}if(!l)return;f(!0);let e=setTimeout(()=>{u(null),f(!1)},i);return()=>clearTimeout(e)},[a,l]);let p=a||l;return r(`div`,{className:`wui-field-message`,children:[o?n(`div`,{className:`field-hint`,id:c,children:o}):null,p?n(`div`,{className:`field-error${a?``:d?` wui-leaving`:``}`,id:a?s:void 0,children:p}):null]})}export{a as default};
1
+ import{useEffect as e,useState as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";var i=150;function a({error:a,hint:o,errorId:s,hintId:c}){let[l,u]=t(a||null),[d,f]=t(!1);e(()=>{if(a){u(a),f(!1);return}if(!l)return;f(!0);let e=setTimeout(()=>{u(null),f(!1)},i);return()=>clearTimeout(e)},[a,l]);let p=a||l;return/* @__PURE__ */ r(`div`,{className:`wui-field-message`,children:[o?/* @__PURE__ */ n(`div`,{className:`field-hint`,id:c,children:o}):null,p?/* @__PURE__ */ n(`div`,{className:`field-error${a?``:d?` wui-leaving`:``}`,id:a?s:void 0,children:p}):null]})}export{a as default};
@@ -1 +1 @@
1
- import e from"../components/AppIcon.js";import t from"../components/AppProgress.js";import{linkOf as n,nameOf as r,sizeLabelOf as i,uploadErrorOf as a,uploadProgressOf as o,useItemUrl as s}from"./fileItem.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({item:u,isImage:d,onRemove:f,noun:p=`attachment`}){let m=s(u,d),h=r(u),g=i(u),_=o(u),v=a(u),y=n(u);return l(`div`,{className:v?`attach-item wui-attach-failed`:`attach-item`,children:[c(`span`,{className:`attach-item-media`,children:m?c(`img`,{src:m,alt:h}):c(e,{name:`file-text`,size:18})}),l(`span`,{className:`attach-item-info`,children:[c(`span`,{className:`attach-name`,children:y?c(`a`,{href:y,children:h}):h}),g&&c(`span`,{className:`attach-size`,children:g}),_!==null&&c(t,{value:_,size:`sm`,label:`Uploading ${h}`,className:`wui-attach-progress`}),v&&c(`div`,{className:`wui-attach-error`,children:v})]}),c(`button`,{type:`button`,className:`attach-item-remove`,"aria-label":`Remove ${h||p}`,onClick:f,children:c(e,{name:`x`,size:16})})]})}export{u as default};
1
+ import e from"../components/AppIcon.js";import t from"../components/AppProgress.js";import{linkOf as n,nameOf as r,sizeLabelOf as i,uploadErrorOf as a,uploadProgressOf as o,useItemUrl as s}from"./fileItem.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({item:u,isImage:d,onRemove:f,noun:p=`attachment`}){let m=s(u,d),h=r(u),g=i(u),_=o(u),v=a(u),y=n(u);return/* @__PURE__ */ l(`div`,{className:v?`attach-item wui-attach-failed`:`attach-item`,children:[/* @__PURE__ */ c(`span`,{className:`attach-item-media`,children:m?/* @__PURE__ */ c(`img`,{src:m,alt:h}):/* @__PURE__ */ c(e,{name:`file-text`,size:18})}),/* @__PURE__ */ l(`span`,{className:`attach-item-info`,children:[/* @__PURE__ */ c(`span`,{className:`attach-name`,children:y?/* @__PURE__ */ c(`a`,{href:y,children:h}):h}),g&&/* @__PURE__ */ c(`span`,{className:`attach-size`,children:g}),_!==null&&/* @__PURE__ */ c(t,{value:_,size:`sm`,label:`Uploading ${h}`,className:`wui-attach-progress`}),v&&/* @__PURE__ */ c(`div`,{className:`wui-attach-error`,children:v})]}),/* @__PURE__ */ c(`button`,{type:`button`,className:`attach-item-remove`,"aria-label":`Remove ${h||p}`,onClick:f,children:/* @__PURE__ */ c(e,{name:`x`,size:16})})]})}export{u as default};
@@ -1 +1 @@
1
- import{useEffect as e,useRef as t}from"react";import{jsx as n}from"react/jsx-runtime";var r=`a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`;function i({triggerRef:i}){let a=t(null);return e(()=>{let e=i.current??document.activeElement;return a.current?.parentElement?.querySelector(r)?.focus(),()=>e?.focus?.()},[i]),n(`span`,{ref:a,hidden:!0})}export{i as default};
1
+ import{useEffect as e,useRef as t}from"react";import{jsx as n}from"react/jsx-runtime";var r=`a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`;function i({triggerRef:i}){let a=t(null);return e(()=>{let e=i.current??document.activeElement;return a.current?.parentElement?.querySelector(r)?.focus(),()=>e?.focus?.()},[i]),/* @__PURE__ */ n(`span`,{ref:a,hidden:!0})}export{i as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";var t={"no-results":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><rect class="wui-ill-card" x="30" y="16" width="64" height="80" rx="8"/><rect class="wui-ill-mute" x="40" y="28" width="30" height="5" rx="2.5"/><rect class="wui-ill-mute" x="40" y="40" width="44" height="5" rx="2.5"/><rect class="wui-ill-mute" x="40" y="52" width="36" height="5" rx="2.5"/><circle class="wui-ill-soft" cx="96" cy="66" r="22"/><circle class="wui-ill-accent-line" cx="96" cy="66" r="22"/><path class="wui-ill-accent-line wui-ill-thick" d="M112 82l14 14"/><path class="wui-ill-accent-line" d="M89 59l14 14M103 59l-14 14"/>`,"no-data":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><path class="wui-ill-ink" d="M30 20v76h100"/><rect class="wui-ill-dash" x="44" y="62" width="16" height="34" rx="3"/><rect class="wui-ill-dash" x="70" y="44" width="16" height="52" rx="3"/><rect class="wui-ill-dash" x="96" y="28" width="16" height="68" rx="3"/><circle class="wui-ill-accent" cx="122" cy="26" r="5"/>`,"empty-inbox":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><circle class="wui-ill-soft" cx="80" cy="24" r="14"/><path class="wui-ill-accent-line" d="M73 24l5 5 9-10"/><path class="wui-ill-card" d="M32 66l11-26a6 6 0 0 1 5.5-3.6h63a6 6 0 0 1 5.5 3.6L128 66v22a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8z"/><path class="wui-ill-ink" d="M32 66h30a6 6 0 0 1 6 6 12 12 0 0 0 24 0 6 6 0 0 1 6-6h30"/>`,"no-notifications":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><path class="wui-ill-ink" d="M80 22v-6"/><path class="wui-ill-card" d="M80 22c-14 0-24 10-24 24v14l-8 12h64l-8-12V46c0-14-10-24-24-24z"/><circle class="wui-ill-accent" cx="80" cy="84" r="6"/><path class="wui-ill-ink" d="M112 30h10l-10 12h10M126 16h7l-7 8h7"/>`,"no-files":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><path class="wui-ill-soft" d="M28 38a6 6 0 0 1 6-6h24l9 10h59a6 6 0 0 1 6 6v36a8 8 0 0 1-8 8H36a8 8 0 0 1-8-8z"/><path class="wui-ill-ink" d="M28 38a6 6 0 0 1 6-6h24l9 10h59a6 6 0 0 1 6 6v36a8 8 0 0 1-8 8H36a8 8 0 0 1-8-8z"/><path class="wui-ill-card" d="M28 58a6 6 0 0 1 6-6h92a6 6 0 0 1 6 6v28a8 8 0 0 1-8 8H36a8 8 0 0 1-8-8z"/><path class="wui-ill-accent-line" d="M80 66v16M72 74h16"/>`,"no-access":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><path class="wui-ill-ink" d="M62 54V44a18 18 0 0 1 36 0v10"/><rect class="wui-ill-card" x="52" y="54" width="56" height="42" rx="8"/><circle class="wui-ill-accent" cx="80" cy="71" r="5"/><path class="wui-ill-accent-line" d="M80 76v8"/>`,offline:`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><path class="wui-ill-card" d="M54 88a15 15 0 0 1-1.5-29.9 24 24 0 0 1 46.3-4.6A17 17 0 0 1 108 88z"/><path class="wui-ill-accent-line wui-ill-thick" d="M46 36l72 60"/>`,error:`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><rect class="wui-ill-card" x="44" y="16" width="72" height="82" rx="8"/><rect class="wui-ill-mute" x="56" y="26" width="30" height="5" rx="2.5"/><circle class="wui-ill-danger" cx="80" cy="60" r="20"/><path class="wui-ill-danger-line" d="M80 50v12"/><circle class="wui-ill-danger-fill" cx="80" cy="70" r="2.5"/><rect class="wui-ill-mute" x="62" y="86" width="36" height="5" rx="2.5"/>`},n=Object.keys(t);function r({name:n,className:r}){let i=n&&Object.hasOwn(t,n)?t[n]:void 0;return i?e(`svg`,{className:r?`wui-illustration ${r}`:`wui-illustration`,"data-illustration":n,viewBox:`0 0 160 120`,fill:`none`,"aria-hidden":`true`,focusable:`false`,dangerouslySetInnerHTML:{__html:i}}):null}export{t as ILLUSTRATION_BODIES,n as ILLUSTRATION_NAMES,r as default};
1
+ import{jsx as e}from"react/jsx-runtime";var t={"no-results":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><rect class="wui-ill-card" x="30" y="16" width="64" height="80" rx="8"/><rect class="wui-ill-mute" x="40" y="28" width="30" height="5" rx="2.5"/><rect class="wui-ill-mute" x="40" y="40" width="44" height="5" rx="2.5"/><rect class="wui-ill-mute" x="40" y="52" width="36" height="5" rx="2.5"/><circle class="wui-ill-soft" cx="96" cy="66" r="22"/><circle class="wui-ill-accent-line" cx="96" cy="66" r="22"/><path class="wui-ill-accent-line wui-ill-thick" d="M112 82l14 14"/><path class="wui-ill-accent-line" d="M89 59l14 14M103 59l-14 14"/>`,"no-data":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><path class="wui-ill-ink" d="M30 20v76h100"/><rect class="wui-ill-dash" x="44" y="62" width="16" height="34" rx="3"/><rect class="wui-ill-dash" x="70" y="44" width="16" height="52" rx="3"/><rect class="wui-ill-dash" x="96" y="28" width="16" height="68" rx="3"/><circle class="wui-ill-accent" cx="122" cy="26" r="5"/>`,"empty-inbox":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><circle class="wui-ill-soft" cx="80" cy="24" r="14"/><path class="wui-ill-accent-line" d="M73 24l5 5 9-10"/><path class="wui-ill-card" d="M32 66l11-26a6 6 0 0 1 5.5-3.6h63a6 6 0 0 1 5.5 3.6L128 66v22a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8z"/><path class="wui-ill-ink" d="M32 66h30a6 6 0 0 1 6 6 12 12 0 0 0 24 0 6 6 0 0 1 6-6h30"/>`,"no-notifications":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><path class="wui-ill-ink" d="M80 22v-6"/><path class="wui-ill-card" d="M80 22c-14 0-24 10-24 24v14l-8 12h64l-8-12V46c0-14-10-24-24-24z"/><circle class="wui-ill-accent" cx="80" cy="84" r="6"/><path class="wui-ill-ink" d="M112 30h10l-10 12h10M126 16h7l-7 8h7"/>`,"no-files":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><path class="wui-ill-soft" d="M28 38a6 6 0 0 1 6-6h24l9 10h59a6 6 0 0 1 6 6v36a8 8 0 0 1-8 8H36a8 8 0 0 1-8-8z"/><path class="wui-ill-ink" d="M28 38a6 6 0 0 1 6-6h24l9 10h59a6 6 0 0 1 6 6v36a8 8 0 0 1-8 8H36a8 8 0 0 1-8-8z"/><path class="wui-ill-card" d="M28 58a6 6 0 0 1 6-6h92a6 6 0 0 1 6 6v28a8 8 0 0 1-8 8H36a8 8 0 0 1-8-8z"/><path class="wui-ill-accent-line" d="M80 66v16M72 74h16"/>`,"no-access":`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><path class="wui-ill-ink" d="M62 54V44a18 18 0 0 1 36 0v10"/><rect class="wui-ill-card" x="52" y="54" width="56" height="42" rx="8"/><circle class="wui-ill-accent" cx="80" cy="71" r="5"/><path class="wui-ill-accent-line" d="M80 76v8"/>`,offline:`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><path class="wui-ill-card" d="M54 88a15 15 0 0 1-1.5-29.9 24 24 0 0 1 46.3-4.6A17 17 0 0 1 108 88z"/><path class="wui-ill-accent-line wui-ill-thick" d="M46 36l72 60"/>`,error:`<ellipse class="wui-ill-mute" cx="80" cy="104" rx="44" ry="6"/><rect class="wui-ill-card" x="44" y="16" width="72" height="82" rx="8"/><rect class="wui-ill-mute" x="56" y="26" width="30" height="5" rx="2.5"/><circle class="wui-ill-danger" cx="80" cy="60" r="20"/><path class="wui-ill-danger-line" d="M80 50v12"/><circle class="wui-ill-danger-fill" cx="80" cy="70" r="2.5"/><rect class="wui-ill-mute" x="62" y="86" width="36" height="5" rx="2.5"/>`},n=Object.keys(t);function r({name:n,className:r}){let i=n&&Object.hasOwn(t,n)?t[n]:void 0;return i?/* @__PURE__ */ e(`svg`,{className:r?`wui-illustration ${r}`:`wui-illustration`,"data-illustration":n,viewBox:`0 0 160 120`,fill:`none`,"aria-hidden":`true`,focusable:`false`,dangerouslySetInnerHTML:{__html:i}}):null}export{t as ILLUSTRATION_BODIES,n as ILLUSTRATION_NAMES,r as default};
@@ -1 +1 @@
1
- import{formatFileSize as e}from"@webority/ui-elements/helpers";import{useEffect as t,useState as n}from"react";function r(e){return e instanceof File?`${e.name}:${e.size}`:e?.url||e?.name||`item`}function i(e){return e instanceof File?e.name:e?.name}function a(t){if(t instanceof File)return e(t.size);let n=t?.sizeBytes;return Number.isFinite(n)&&n>=0?e(n):null}function o(e){return typeof e?.url==`string`&&e.url.length>0?e.url:null}function s(e){let t=e?.progress;return typeof t==`number`&&t>=0&&t<=99?t:null}function c(e){return typeof e?.error==`string`&&e.error.length>0?e.error:null}function l(e,r){let[i,a]=n(null);return t(()=>{if(!r){a(null);return}if(e instanceof File){let t=URL.createObjectURL(e);return a(t),()=>URL.revokeObjectURL(t)}a(e?.url||null)},[e,r]),i}export{r as keyOf,o as linkOf,i as nameOf,a as sizeLabelOf,c as uploadErrorOf,s as uploadProgressOf,l as useItemUrl};
1
+ import{formatFileSize as e}from"@webority/ui-elements/helpers";import{useEffect as t,useState as n}from"react";function r(e){return e instanceof File?`${e.name}:${e.size}`:e?.url||e?.name||`item`}function i(e){return e instanceof File?e.name:e?.name}function a(t){if(t instanceof File)return e(t.size);let n=t?.sizeBytes;return Number.isFinite(n)&&n>=0?e(n):null}function o(e){return typeof e?.url==`string`&&e.url.length>0?e.url:null}function s(e){let t=e?.progress;return typeof t==`number`&&t>=0&&t<=99?t:null}function c(e){return typeof e?.error==`string`&&e.error.length>0?e.error:null}function l(e,r){let[i,a]=n(null);return t(()=>{if(!r)a(null);else{if(e instanceof File){let t=URL.createObjectURL(e);return a(t),()=>URL.revokeObjectURL(t)}a(e?.url||null)}},[e,r]),i}export{r as keyOf,o as linkOf,i as nameOf,a as sizeLabelOf,c as uploadErrorOf,s as uploadProgressOf,l as useItemUrl};
@@ -0,0 +1 @@
1
+ import{devWarn as e}from"./devWarn.js";var t=null;function n(){return t??=import(`@webority/theme/css/flags`).catch(n=>{t=null,e(`[@webority/ui-react] the country flags failed to load:`,n?.message)}),t}export{n as loadFlagStyles};
@@ -1 +1 @@
1
- var e=new Set([`pvt`,`private`,`ltd`,`limited`,`llp`,`llc`,`inc`,`corp`,`co`]),t=/\p{L}/u,n=/\p{N}/u;function r(e){let t=``,n=0;for(let r of e)r===`(`?(n+=1,t+=` `):r===`)`?(n=Math.max(0,n-1),t+=` `):n===0&&(t+=r);return t}function i(e){return e.map(e=>{let t=e.toUpperCase();return Array.from(t).length===1?t:e}).join(``)}function a(a,o=2){let s=r(String(a??``)).split(/\s+/),c=e=>s.map(t=>Array.from(t).filter(t=>e.test(t))).filter(e=>e.length>0),l=c(t).filter(t=>!e.has(t.join(``).toLowerCase()));return l.length===0&&!s.some(e=>t.test(e))&&(l=c(n)),l.length===0?``:l.length===1?i(l[0].slice(0,o)):i([l[0][0],l[1][0]])}export{a as initialsOf};
1
+ var e=/* @__PURE__ */ new Set([`pvt`,`private`,`ltd`,`limited`,`llp`,`llc`,`inc`,`corp`,`co`]),t=/\p{L}/u,n=/\p{N}/u;function r(e){let t=``,n=0;for(let r of e)r===`(`?(n+=1,t+=` `):r===`)`?(n=Math.max(0,n-1),t+=` `):n===0&&(t+=r);return t}function i(e){return e.map(e=>{let t=e.toUpperCase();return Array.from(t).length===1?t:e}).join(``)}function a(a,o=2){let s=r(String(a??``)).split(/\s+/),c=e=>s.map(t=>Array.from(t).filter(t=>e.test(t))).filter(e=>e.length>0),l=c(t).filter(t=>!e.has(t.join(``).toLowerCase()));return l.length===0&&!s.some(e=>t.test(e))&&(l=c(n)),l.length===0?``:l.length===1?i(l[0].slice(0,o)):i([l[0][0],l[1][0]])}export{a as initialsOf};
@@ -0,0 +1 @@
1
+ var e=0,t=null;function n(){if(typeof window>`u`)return()=>{};let{body:n,documentElement:r}=document;e===0&&(t={y:window.scrollY,position:n.style.position,top:n.style.top,width:n.style.width,htmlOverflow:r.style.overflow},n.style.position=`fixed`,n.style.top=`-${t.y}px`,n.style.width=`100%`,r.style.overflow=`hidden`,r.setAttribute(`data-wui-scroll-locked`,``)),e+=1;let i=!1;return()=>{i||(i=!0,--e,e>0||(n.style.position=t.position,n.style.top=t.top,n.style.width=t.width,r.style.overflow=t.htmlOverflow,r.removeAttribute(`data-wui-scroll-locked`),window.scrollTo({top:t.y,left:0,behavior:`instant`}),t=null))}}export{n as lockPageScroll};
@@ -1 +1 @@
1
- var e={L:0,M:1,Q:2,H:3},t=[1,0,3,2],n=[`L`,`M`,`Q`,`H`],r=3,i=3,a=40,o=10,s=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],c=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];function l(t,n=`M`,{mask:r=-1,boostEcc:i=!0}={}){if(!Object.hasOwn(e,n))throw RangeError(`Unknown error correction level "${n}"`);if(!Number.isInteger(r)||r<-1||r>7)throw RangeError(`Mask must be -1 to 7`);let a=new TextEncoder().encode(String(t)),o=e[n],s=1,c=0;for(;c=d(a.length,s),!(c<=b(s,o)*8);s++)if(s>=40)throw RangeError(`Data too long for a QR code: ${a.length} bytes`);for(let e=1;e<=3;e++)i&&c<=b(s,e)*8&&(o=Math.max(o,e));let l=[];T(4,4,l),T(a.length,s<=9?8:16,l);for(let e of a)T(e,8,l);let u=b(s,o)*8;T(0,Math.min(4,u-l.length),l),T(0,(8-l.length%8)%8,l);for(let e=236;l.length<u;e^=253)T(e,8,l);let p=new Uint8Array(l.length/8);return l.forEach((e,t)=>{p[t>>>3]|=e<<7-(t&7)}),f(s,o,p,r)}function u(e,t=4){let{size:n}=e,r=``;for(let i=0;i<n;i++){let a=0;for(;a<n;){if(!e.isDark(i,a)){a++;continue}let o=a;for(;a<n&&e.isDark(i,a);)a++;let s=a-o;r+=`M${o+t} ${i+t}h${s}v1h-${s}z`}}return r}function d(e,t){let n=t<=9?8:16;return e>=1<<n?1/0:4+n+e*8}function f(e,r,i,a){let o=e*4+17,s=new Uint8Array(o*o),c=new Uint8Array(o*o),l=(e,t,n)=>{s[t*o+e]=+!!n,c[t*o+e]=1},u=e=>{let n=t[r]<<3|e,i=n;for(let e=0;e<10;e++)i=i<<1^(i>>>9)*1335;let a=(n<<10|i)^21522;for(let e=0;e<=5;e++)l(8,e,E(a,e));l(8,7,E(a,6)),l(8,8,E(a,7)),l(7,8,E(a,8));for(let e=9;e<15;e++)l(14-e,8,E(a,e));for(let e=0;e<8;e++)l(o-1-e,8,E(a,e));for(let e=8;e<15;e++)l(8,o-15+e,E(a,e));l(8,o-8,!0)},d=(e,t)=>{for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,s=t+n;a>=0&&a<o&&s>=0&&s<o&&l(a,s,i!==2&&i!==4)}},f=(e,t)=>{for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)l(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!==1)};for(let e=0;e<o;e++)l(6,e,e%2==0),l(e,6,e%2==0);d(3,3),d(o-4,3),d(3,o-4);let h=v(e,o),g=h.length;for(let e=0;e<g;e++)for(let t=0;t<g;t++)e===0&&t===0||e===0&&t===g-1||e===g-1&&t===0||f(h[e],h[t]);if(u(0),e>=7){let t=e;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;let n=e<<12|t;for(let e=0;e<18;e++){let t=E(n,e),r=o-11+e%3,i=Math.floor(e/3);l(r,i,t),l(i,r,t)}}let _=x(i,e,r),y=0,b=_.length*8;for(let e=o-1;e>=1;e-=2){e===6&&(e=5);for(let t=0;t<o;t++)for(let n=0;n<2;n++){let r=e-n,i=e+1&2?t:o-1-t;!c[i*o+r]&&y<b&&(s[i*o+r]=+!!E(_[y>>>3],7-(y&7)),y++)}}let S=e=>{for(let t=0;t<o;t++)for(let n=0;n<o;n++)!c[t*o+n]&&p(e,n,t)&&(s[t*o+n]^=1)},C=a;if(C===-1){let e=1/0;for(let t=0;t<8;t++){S(t),u(t);let n=m(s,o);n<e&&(C=t,e=n),S(t)}}return S(C),u(C),Object.freeze({size:o,version:e,ecc:n[r],mask:C,isDark:(e,t)=>e>=0&&e<o&&t>=0&&t<o&&s[e*o+t]===1})}function p(e,t,n){switch(e){case 0:return(t+n)%2==0;case 1:return n%2==0;case 2:return t%3==0;case 3:return(t+n)%3==0;case 4:return(Math.floor(t/3)+Math.floor(n/2))%2==0;case 5:return t*n%2+t*n%3==0;case 6:return(t*n%2+t*n%3)%2==0;default:return((t+n)%2+t*n%3)%2==0}}function m(e,t){let n=0,s=(n,r)=>e[r*t+n]===1;for(let e=0;e<2;e++)for(let i=0;i<t;i++){let o=!1,c=0,l=[0,0,0,0,0,0,0];for(let u=0;u<t;u++){let d=e===0?s(u,i):s(i,u);d===o?(c++,c===5?n+=r:c>5&&n++):(_(c,l,t),o||(n+=h(l)*a),o=d,c=1)}n+=g(o,c,l,t)*a}for(let e=0;e<t-1;e++)for(let r=0;r<t-1;r++){let t=s(r,e);t===s(r+1,e)&&t===s(r,e+1)&&t===s(r+1,e+1)&&(n+=i)}let c=0;for(let t of e)c+=t;let l=t*t,u=Math.ceil(Math.abs(c*20-l*10)/l)-1;return n+=u*o,n}function h(e){let t=e[1],n=t>0&&e[2]===t&&e[3]===t*3&&e[4]===t&&e[5]===t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}function g(e,t,n,r){let i=t;return e&&(_(i,n,r),i=0),i+=r,_(i,n,r),h(n)}function _(e,t,n){let r=t[0]===0?e+n:e;t.pop(),t.unshift(r)}function v(e,t){if(e===1)return[];let n=Math.floor(e/7)+2,r=Math.floor((e*8+n*3+5)/(n*4-4))*2,i=[6];for(let e=t-7;i.length<n;e-=r)i.splice(1,0,e);return i}function y(e){let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function b(e,t){return Math.floor(y(e)/8)-s[t][e]*c[t][e]}function x(e,t,n){let r=c[n][t],i=s[n][t],a=Math.floor(y(t)/8),o=r-a%r,l=Math.floor(a/r),u=[],d=S(i);for(let t=0,n=0;t<r;t++){let r=Array.from(e.subarray(n,n+l-i+(t<o?0:1)));n+=r.length;let a=C(r,d);t<o&&r.push(0),u.push(r.concat(a))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach((t,n)=>{(e!==l-i||n>=o)&&f.push(t[e])});return f}function S(e){let t=Array(e).fill(0);t[e-1]=1;let n=1;for(let r=0;r<e;r++){for(let e=0;e<t.length;e++)t[e]=w(t[e],n),e+1<t.length&&(t[e]^=t[e+1]);n=w(n,2)}return t}function C(e,t){let n=t.map(()=>0);for(let r of e){let e=r^n.shift();n.push(0),t.forEach((t,r)=>{n[r]^=w(t,e)})}return n}function w(e,t){let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return n}function T(e,t,n){for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function E(e,t){return(e>>>t&1)!=0}export{l as encodeQr,u as qrSvgPath};
1
+ var e={L:0,M:1,Q:2,H:3},t=[1,0,3,2],n=[`L`,`M`,`Q`,`H`],r=3,i=3,a=40,o=10,s=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],c=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];function l(t,n=`M`,{mask:r=-1,boostEcc:i=!0}={}){if(!Object.hasOwn(e,n))throw RangeError(`Unknown error correction level "${n}"`);if(!Number.isInteger(r)||r<-1||r>7)throw RangeError(`Mask must be -1 to 7`);let a=new TextEncoder().encode(String(t)),o=e[n],s=1,c=0;for(;c=d(a.length,s),!(c<=b(s,o)*8);s++)if(s>=40)throw RangeError(`Data too long for a QR code: ${a.length} bytes`);for(let e=1;e<=3;e++)i&&c<=b(s,e)*8&&(o=Math.max(o,e));let l=[];T(4,4,l),T(a.length,s<=9?8:16,l);for(let e of a)T(e,8,l);let u=b(s,o)*8;T(0,Math.min(4,u-l.length),l),T(0,(8-l.length%8)%8,l);for(let e=236;l.length<u;e^=253)T(e,8,l);let p=new Uint8Array(l.length/8);return l.forEach((e,t)=>{p[t>>>3]|=e<<7-(t&7)}),f(s,o,p,r)}function u(e,t=4){let{size:n}=e,r=``;for(let i=0;i<n;i++){let a=0;for(;a<n;){if(!e.isDark(i,a)){a++;continue}let o=a;for(;a<n&&e.isDark(i,a);)a++;let s=a-o;r+=`M${o+t} ${i+t}h${s}v1h-${s}z`}}return r}function d(e,t){let n=t<=9?8:16;return e>=1<<n?1/0:4+n+e*8}function f(e,r,i,a){let o=e*4+17,s=new Uint8Array(o*o),c=new Uint8Array(o*o),l=(e,t,n)=>{s[t*o+e]=+!!n,c[t*o+e]=1},u=e=>{let n=t[r]<<3|e,i=n;for(let e=0;e<10;e++)i=i<<1^(i>>>9)*1335;let a=(n<<10|i)^21522;for(let e=0;e<=5;e++)l(8,e,E(a,e));l(8,7,E(a,6)),l(8,8,E(a,7)),l(7,8,E(a,8));for(let e=9;e<15;e++)l(14-e,8,E(a,e));for(let e=0;e<8;e++)l(o-1-e,8,E(a,e));for(let e=8;e<15;e++)l(8,o-15+e,E(a,e));l(8,o-8,!0)},d=(e,t)=>{for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,s=t+n;a>=0&&a<o&&s>=0&&s<o&&l(a,s,i!==2&&i!==4)}},f=(e,t)=>{for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)l(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!==1)};for(let e=0;e<o;e++)l(6,e,e%2==0),l(e,6,e%2==0);d(3,3),d(o-4,3),d(3,o-4);let h=v(e,o),g=h.length;for(let e=0;e<g;e++)for(let t=0;t<g;t++)e===0&&t===0||e===0&&t===g-1||e===g-1&&t===0||f(h[e],h[t]);if(u(0),e>=7){let t=e;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;let n=e<<12|t;for(let e=0;e<18;e++){let t=E(n,e),r=o-11+e%3,i=Math.floor(e/3);l(r,i,t),l(i,r,t)}}let _=x(i,e,r),y=0,b=_.length*8;for(let e=o-1;e>=1;e-=2){e===6&&(e=5);for(let t=0;t<o;t++)for(let n=0;n<2;n++){let r=e-n,i=e+1&2?t:o-1-t;!c[i*o+r]&&y<b&&(s[i*o+r]=+!!E(_[y>>>3],7-(y&7)),y++)}}let S=e=>{for(let t=0;t<o;t++)for(let n=0;n<o;n++)!c[t*o+n]&&p(e,n,t)&&(s[t*o+n]^=1)},C=a;if(C===-1){let e=1/0;for(let t=0;t<8;t++){S(t),u(t);let n=m(s,o);n<e&&(C=t,e=n),S(t)}}return S(C),u(C),Object.freeze({size:o,version:e,ecc:n[r],mask:C,isDark:(e,t)=>e>=0&&e<o&&t>=0&&t<o&&s[e*o+t]===1})}function p(e,t,n){switch(e){case 0:return(t+n)%2==0;case 1:return n%2==0;case 2:return t%3==0;case 3:return(t+n)%3==0;case 4:return(Math.floor(t/3)+Math.floor(n/2))%2==0;case 5:return t*n%2+t*n%3==0;case 6:return(t*n%2+t*n%3)%2==0;default:return((t+n)%2+t*n%3)%2==0}}function m(e,t){let n=0,s=(n,r)=>e[r*t+n]===1;for(let e=0;e<2;e++)for(let i=0;i<t;i++){let o=!1,c=0,l=[0,0,0,0,0,0,0];for(let u=0;u<t;u++){let d=e===0?s(u,i):s(i,u);d===o?(c++,c===5?n+=r:c>5&&n++):(_(c,l,t),o||(n+=h(l)*a),o=d,c=1)}n+=g(o,c,l,t)*a}for(let e=0;e<t-1;e++)for(let r=0;r<t-1;r++){let t=s(r,e);t===s(r+1,e)&&t===s(r,e+1)&&t===s(r+1,e+1)&&(n+=i)}let c=0;for(let t of e)c+=t;let l=t*t,u=Math.ceil(Math.abs(c*20-l*10)/l)-1;return n+=u*o,n}function h(e){let t=e[1],n=t>0&&e[2]===t&&e[3]===t*3&&e[4]===t&&e[5]===t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}function g(e,t,n,r){let i=t;return e&&(_(i,n,r),i=0),i+=r,_(i,n,r),h(n)}function _(e,t,n){let r=t[0]===0?e+n:e;t.pop(),t.unshift(r)}function v(e,t){if(e===1)return[];let n=Math.floor(e/7)+2,r=Math.floor((e*8+n*3+5)/(n*4-4))*2,i=[6];for(let e=t-7;i.length<n;e-=r)i.splice(1,0,e);return i}function y(e){let t=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function b(e,t){return Math.floor(y(e)/8)-s[t][e]*c[t][e]}function x(e,t,n){let r=c[n][t],i=s[n][t],a=Math.floor(y(t)/8),o=r-a%r,l=Math.floor(a/r),u=[],d=S(i);for(let t=0,n=0;t<r;t++){let r=Array.from(e.subarray(n,n+l-i+(t<o?0:1)));n+=r.length;let a=C(r,d);t<o&&r.push(0),u.push(r.concat(a))}let f=[];for(let e=0;e<u[0].length;e++)u.forEach((t,n)=>{(e!==l-i||n>=o)&&f.push(t[e])});return f}function S(e){let t=Array(e).fill(0);t[e-1]=1;let n=1;for(let r=0;r<e;r++){for(let e=0;e<t.length;e++)t[e]=w(t[e],n),e+1<t.length&&(t[e]^=t[e+1]);n=w(n,2)}return t}function C(e,t){let n=t.map(()=>0);for(let r of e){let e=r^n.shift();n.push(0),t.forEach((t,r)=>{n[r]^=w(t,e)})}return n}function w(e,t){let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return n}function T(e,t,n){for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function E(e,t){return!!(e>>>t&1)}export{l as encodeQr,u as qrSvgPath};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";var n=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],r=[`start`,`center`],i=[`default`,`muted`],a=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`],o=[`display`,`body`];function s(e,t){return n.includes(e)?e:t}function c(e){return n[Math.min(n.indexOf(e)+1,5)]}function l({className:t,src:n,alt:r,width:i,height:a}){return e(`img`,{className:t,src:n,alt:r,width:i,height:a,loading:`lazy`,decoding:`async`})}function u({component:n,kind:r,title:i,as:o,eyebrow:s,subtitle:c,align:l,variant:u,eyebrowTone:d,titleFont:f,inset:p,actions:m,extraClass:h,className:g,rest:_,children:v}){if(i==null||i===``)throw Error(`${n} needs a title: every section opens with its heading.`);let y=o,b=_.id?`${_.id}-title`:void 0,x=a.includes(d),{style:S,...C}=_,w=p==null&&S===void 0?void 0:{"--wui-section-inset":p==null?void 0:`${p}px`,...S};return e(`section`,{className:[`wui-section`,`wui-section-${r}`,l===`center`?`wui-section-center`:``,u===`muted`?`wui-section-muted`:``,h,g].filter(Boolean).join(` `),style:w,"aria-labelledby":b,...C,children:t(`div`,{className:`wui-section-inner`,children:[t(`div`,{className:`wui-section-head`,children:[s!=null&&s!==``&&e(`div`,{className:x?`wui-section-eyebrow wui-section-eyebrow-pill wui-section-eyebrow-${d}`:`wui-section-eyebrow`,children:s}),e(y,{className:f===`body`?`wui-section-title wui-section-title-body`:`wui-section-title`,id:b,children:i}),c!=null&&c!==``&&e(`p`,{className:`wui-section-subtitle`,children:c}),m!=null&&m!==!1&&e(`div`,{className:`wui-section-actions`,children:m})]}),v]})})}export{r as SECTION_ALIGNS,a as SECTION_EYEBROW_TONES,n as SECTION_HEADINGS,o as SECTION_TITLE_FONTS,i as SECTION_VARIANTS,l as SectionImage,u as default,c as itemHeading,s as sectionHeading};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";var n=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],r=[`start`,`center`],i=[`default`,`muted`],a=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`],o=[`display`,`body`];function s(e,t){return n.includes(e)?e:t}function c(e){return n[Math.min(n.indexOf(e)+1,5)]}function l({className:t,src:n,alt:r,width:i,height:a}){return/* @__PURE__ */ e(`img`,{className:t,src:n,alt:r,width:i,height:a,loading:`lazy`,decoding:`async`})}function u({component:n,kind:r,title:i,as:o,eyebrow:s,subtitle:c,align:l,variant:u,eyebrowTone:d,titleFont:f,inset:p,actions:m,extraClass:h,className:g,rest:_,children:v}){if(i==null||i===``)throw Error(`${n} needs a title: every section opens with its heading.`);let y=o,b=_.id?`${_.id}-title`:void 0,x=a.includes(d),{style:S,...C}=_,w=p==null&&S===void 0?void 0:{"--wui-section-inset":p==null?void 0:`${p}px`,...S},T=[`wui-section`,`wui-section-${r}`,l===`center`?`wui-section-center`:``,u===`muted`?`wui-section-muted`:``,h,g].filter(Boolean).join(` `);return/* @__PURE__ */ e(`section`,{className:T,style:w,"aria-labelledby":b,...C,children:/* @__PURE__ */ t(`div`,{className:`wui-section-inner`,children:[/* @__PURE__ */ t(`div`,{className:`wui-section-head`,children:[s!=null&&s!==``&&/* @__PURE__ */ e(`div`,{className:x?`wui-section-eyebrow wui-section-eyebrow-pill wui-section-eyebrow-${d}`:`wui-section-eyebrow`,children:s}),/* @__PURE__ */ e(y,{className:f===`body`?`wui-section-title wui-section-title-body`:`wui-section-title`,id:b,children:i}),c!=null&&c!==``&&/* @__PURE__ */ e(`p`,{className:`wui-section-subtitle`,children:c}),m!=null&&m!==!1&&/* @__PURE__ */ e(`div`,{className:`wui-section-actions`,children:m})]}),v]})})}export{r as SECTION_ALIGNS,a as SECTION_EYEBROW_TONES,n as SECTION_HEADINGS,o as SECTION_TITLE_FONTS,i as SECTION_VARIANTS,l as SectionImage,u as default,c as itemHeading,s as sectionHeading};
@@ -1 +1 @@
1
- var e=`wui-shell-collapsed`,t=31536e3,n=e=>e instanceof DOMException&&e.name===`SecurityError`;function r(t=e,r=document){let i;try{i=r.cookie}catch(e){if(n(e))return null;throw e}for(let e of i.split(`;`)){let n=e.indexOf(`=`);if(n<0||e.slice(0,n).trim()!==t)continue;let r=e.slice(n+1).trim();return r===`1`||r!==`0`&&null}return null}function i(r,i=e,a=document){try{a.cookie=`${i}=${r?`1`:`0`}; Path=/; Max-Age=${t}; SameSite=Lax`}catch(e){if(!n(e))throw e}}var a=`wui-nav-folded`;function o(e=a,t=document){let r;try{r=t.cookie}catch(e){if(n(e))return new Set;throw e}for(let t of r.split(`;`)){let n=t.indexOf(`=`);if(!(n<0||t.slice(0,n).trim()!==e))return new Set(t.slice(n+1).trim().split(`.`).filter(Boolean))}return new Set}function s(e,r=a,i=document){try{i.cookie=`${r}=${[...e].join(`.`)}; Path=/; Max-Age=${t}; SameSite=Lax`}catch(e){if(!n(e))throw e}}export{e as SHELL_COLLAPSED_COOKIE,a as SHELL_FOLDED_COOKIE,o as readNavFolded,r as readShellCollapsed,s as writeNavFolded,i as writeShellCollapsed};
1
+ var e=`wui-shell-collapsed`,t=31536e3,n=e=>e instanceof DOMException&&e.name===`SecurityError`;function r(t=e,r=document){let i;try{i=r.cookie}catch(e){if(n(e))return null;throw e}for(let e of i.split(`;`)){let n=e.indexOf(`=`);if(n<0||e.slice(0,n).trim()!==t)continue;let r=e.slice(n+1).trim();return r===`1`||r!==`0`&&null}return null}function i(r,i=e,a=document){try{a.cookie=`${i}=${r?`1`:`0`}; Path=/; Max-Age=${t}; SameSite=Lax`}catch(e){if(!n(e))throw e}}var a=`wui-nav-folded`;function o(e=a,t=document){let r;try{r=t.cookie}catch(e){if(n(e))return/* @__PURE__ */ new Set;throw e}for(let t of r.split(`;`)){let n=t.indexOf(`=`);if(!(n<0||t.slice(0,n).trim()!==e))return new Set(t.slice(n+1).trim().split(`.`).filter(Boolean))}return/* @__PURE__ */ new Set}function s(e,r=a,i=document){try{i.cookie=`${r}=${[...e].join(`.`)}; Path=/; Max-Age=${t}; SameSite=Lax`}catch(e){if(!n(e))throw e}}export{e as SHELL_COLLAPSED_COOKIE,a as SHELL_FOLDED_COOKIE,o as readNavFolded,r as readShellCollapsed,s as writeNavFolded,i as writeShellCollapsed};
@@ -1 +1 @@
1
- import{ariaKeyShortcuts as e,shortcutKey as t}from"@webority/ui-elements/helpers";import{jsx as n}from"react/jsx-runtime";function r(e,{inTooltip:r=!1}={}){if(e==null||String(e).trim()===``)return null;let i=t(e);return r?n(`span`,{className:`wui-kbd`,children:i}):n(`kbd`,{className:`wui-kbd`,"aria-hidden":`true`,children:i})}function i(n){if(!(n==null||String(n).trim()===``))return e(t(n))}export{i as shortcutAria,r as shortcutChip};
1
+ import{ariaKeyShortcuts as e,shortcutKey as t}from"@webority/ui-elements/helpers";import{jsx as n}from"react/jsx-runtime";function r(e,{inTooltip:r=!1}={}){if(e==null||String(e).trim()===``)return null;let i=t(e);return r?/* @__PURE__ */ n(`span`,{className:`wui-kbd`,children:i}):/* @__PURE__ */ n(`kbd`,{className:`wui-kbd`,"aria-hidden":`true`,children:i})}function i(n){if(n!=null&&String(n).trim()!==``)return e(t(n))}export{i as shortcutAria,r as shortcutChip};
@@ -1 +1 @@
1
- import{acceptDroppedFiles as e}from"@webority/ui-elements/helpers";import{useRef as t,useState as n}from"react";function r({accept:r,maxSizeMb:i,multiple:a,disabled:o=!1,onFiles:s,onReject:c}){let[l,u]=n(!1),d=t(0);return{dragOver:l,dropProps:{onDragEnter:e=>{e.preventDefault(),!o&&(d.current+=1,u(!0))},onDragOver:e=>{e.preventDefault(),o||u(!0)},onDragLeave:e=>{e.preventDefault(),!o&&(d.current=Math.max(0,d.current-1),d.current===0&&u(!1))},onDrop:t=>{if(t.preventDefault(),d.current=0,u(!1),o)return;let{files:n,rejections:l}=e(t.dataTransfer?.files,{accept:r,maxSizeMb:i,multiple:a});n.length&&s(n),l.length&&c(l[0])}}}}export{r as default};
1
+ import{acceptDroppedFiles as e}from"@webority/ui-elements/helpers";import{useRef as t,useState as n}from"react";function r({accept:r,maxSizeMb:i,multiple:a,disabled:o=!1,onFiles:s,onReject:c}){let[l,u]=n(!1),d=t(0);return{dragOver:l,dropProps:{onDragEnter:e=>{e.preventDefault(),o||(d.current+=1,u(!0))},onDragOver:e=>{e.preventDefault(),o||u(!0)},onDragLeave:e=>{e.preventDefault(),o||(d.current=Math.max(0,d.current-1),d.current===0&&u(!1))},onDrop:t=>{if(t.preventDefault(),d.current=0,u(!1),o)return;let{files:n,rejections:l}=e(t.dataTransfer?.files,{accept:r,maxSizeMb:i,multiple:a});n.length&&s(n),l.length&&c(l[0])}}}}export{r as default};
@@ -1 +1 @@
1
- import e from"../components/warnInvalidValue.js";import{useLayoutEffect as t,useState as n}from"react";var r=[`end`,`start`],i=`.wui-floating-stack`,a={end:0,start:0};function o(e){let t=document.querySelector(`${i}[data-position="${e}"]`);return t||(t=document.createElement(`div`),t.className=`wui-floating-stack`,t.dataset.position=e,t.dataset.supportCapture=`exclude`,document.body.appendChild(t)),a[e]+=1,t}function s(e){--a[e],!(a[e]>0)&&document.querySelector(`${i}[data-position="${e}"]`)?.remove()}function c(i=`end`,a=!0){e(`useFloatingStack`,`position`,i,r);let c=r.includes(i)?i:`end`,[l,u]=n(null);return t(()=>{if(a)return u(o(c)),()=>{s(c),u(null)}},[c,a]),l}export{c as useFloatingStack};
1
+ import e from"../components/warnInvalidValue.js";import{useLayoutEffect as t,useState as n}from"react";var r=[`end`,`start`],i=`.wui-floating-stack`,a={end:0,start:0};function o(e){let t=document.querySelector(`${i}[data-position="${e}"]`);return t||(t=document.createElement(`div`),t.className=`wui-floating-stack`,t.dataset.position=e,t.dataset.supportCapture=`exclude`,document.body.appendChild(t)),a[e]+=1,t}function s(e){--a[e],a[e]>0||document.querySelector(`${i}[data-position="${e}"]`)?.remove()}function c(i=`end`,a=!0){e(`useFloatingStack`,`position`,i,r);let c=r.includes(i)?i:`end`,[l,u]=n(null);return t(()=>{if(a)return u(o(c)),()=>{s(c),u(null)}},[c,a]),l}export{c as useFloatingStack};
@@ -1 +1 @@
1
- import{buildListQuery as e,isFacetActive as t,listQueryParamNames as n,parseListQuery as r}from"./listQuery.js";import{useCallback as i,useEffect as a,useMemo as o,useRef as s,useState as c}from"react";function l(t,r){let i=new URL(window.location.href);for(let e of n(r))i.searchParams.delete(e);for(let[n,r]of e(t))i.searchParams.append(n,r);window.history.replaceState(window.history.state,``,`${i.pathname}${i.search}${i.hash}`)}function u({fetchPage:n,facets:u=[],defaults:d,debounceMs:f=250}){let[p,m]=c(()=>r(window.location.search,{facets:u,defaults:d})),[h,g]=c(null),[_,v]=c(!0),[y,b]=c(null),x=s(p),S=s(n),C=s(u),w=s(d),T=s(!1);a(()=>{S.current=n,C.current=u,w.current=d});let E=i((e,t=!1)=>{T.current=t,x.current=e,m(e),l(e,C.current)},[]);a(()=>{let e=()=>{let e=r(window.location.search,{facets:C.current,defaults:w.current});T.current=!1,x.current=e,m(e)};return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),a(()=>{let e=new AbortController,t=T.current?f:0;v(!0),b(null);let n=setTimeout(async()=>{try{let t=await S.current(x.current,{signal:e.signal});if(e.signal.aborted)return;g(t),v(!1)}catch(t){if(e.signal.aborted)return;b(t),v(!1)}},t);return()=>{clearTimeout(n),e.abort()}},[o(()=>e(p).toString(),[p]),f]);let D=i((e,t)=>{let n=C.current.find(t=>t.key===e);if(!n)throw Error(`useListQuery: no facet named "${e}".`);let r=x.current;E({...r,page:1,filters:{...r.filters,[e]:t}},n.type===`text`)},[E]),O=i((e,t)=>{let n=x.current,r=t??(n.sortBy===e&&n.sortOrder===`asc`?`desc`:`asc`);E({...n,page:1,sortBy:e,sortOrder:r})},[E]),k=i(e=>E({...x.current,page:Math.max(1,Math.trunc(e))}),[E]),A=i(e=>E({...x.current,page:1,pageSize:e}),[E]),j=i(()=>E(r(``,{facets:C.current,defaults:w.current})),[E]),M=h?.totalCount??0,N=h?.totalPages??0;a(()=>{!_&&N>0&&p.page>N&&k(N)},[_,N,p.page,k]);let P=u.some(e=>t(e,p.filters[e.key])),F={rows:h?.items??[],sort:p.sortBy?{key:p.sortBy,dir:p.sortOrder}:void 0,onSort:O,loading:_,emptyFiltered:P?`No records match the current filters.`:void 0,sourceCount:+!!P},I={page:p.page,totalPages:Math.max(1,N),pageSize:p.pageSize,onPageChange:k,onPageSizeChange:A};return{query:p,rows:F.rows,loading:_,error:y,totalCount:M,totalPages:N,setFilter:D,setSort:O,setPage:k,setPageSize:A,reset:j,tableProps:F,paginationProps:I}}export{u as useListQuery};
1
+ import{buildListQuery as e,isFacetActive as t,listQueryParamNames as n,parseListQuery as r}from"./listQuery.js";import{useCallback as i,useEffect as a,useMemo as o,useRef as s,useState as c}from"react";function l(t,r){let i=new URL(window.location.href);for(let e of n(r))i.searchParams.delete(e);for(let[n,r]of e(t))i.searchParams.append(n,r);window.history.replaceState(window.history.state,``,`${i.pathname}${i.search}${i.hash}`)}function u({fetchPage:n,facets:u=[],defaults:d,debounceMs:f=250}){let[p,m]=c(()=>r(window.location.search,{facets:u,defaults:d})),[h,g]=c(null),[_,v]=c(!0),[y,b]=c(null),x=s(p),S=s(n),C=s(u),w=s(d),T=s(!1);a(()=>{S.current=n,C.current=u,w.current=d});let E=i((e,t=!1)=>{T.current=t,x.current=e,m(e),l(e,C.current)},[]);a(()=>{let e=()=>{let e=r(window.location.search,{facets:C.current,defaults:w.current});T.current=!1,x.current=e,m(e)};return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]);let D=o(()=>e(p).toString(),[p]);a(()=>{let e=new AbortController,t=T.current?f:0;v(!0),b(null);let n=setTimeout(async()=>{try{let t=await S.current(x.current,{signal:e.signal});if(e.signal.aborted)return;g(t),v(!1)}catch(t){if(e.signal.aborted)return;b(t),v(!1)}},t);return()=>{clearTimeout(n),e.abort()}},[D,f]);let O=i((e,t)=>{let n=C.current.find(t=>t.key===e);if(!n)throw Error(`useListQuery: no facet named "${e}".`);let r=x.current;E({...r,page:1,filters:{...r.filters,[e]:t}},n.type===`text`)},[E]),k=i((e,t)=>{let n=x.current,r=t??(n.sortBy===e&&n.sortOrder===`asc`?`desc`:`asc`);E({...n,page:1,sortBy:e,sortOrder:r})},[E]),A=i(e=>E({...x.current,page:Math.max(1,Math.trunc(e))}),[E]),j=i(e=>E({...x.current,page:1,pageSize:e}),[E]),M=i(()=>E(r(``,{facets:C.current,defaults:w.current})),[E]),N=h?.totalCount??0,P=h?.totalPages??0;a(()=>{!_&&P>0&&p.page>P&&A(P)},[_,P,p.page,A]);let F=u.some(e=>t(e,p.filters[e.key])),I={rows:h?.items??[],sort:p.sortBy?{key:p.sortBy,dir:p.sortOrder}:void 0,onSort:k,loading:_,emptyFiltered:F?`No records match the current filters.`:void 0,sourceCount:+!!F},L={page:p.page,totalPages:Math.max(1,P),pageSize:p.pageSize,onPageChange:A,onPageSizeChange:j};return{query:p,rows:I.rows,loading:_,error:y,totalCount:N,totalPages:P,setFilter:O,setSort:k,setPage:A,setPageSize:j,reset:M,tableProps:I,paginationProps:L}}export{u as useListQuery};
@@ -1 +1 @@
1
- var e=`data-wui`,t=`data-wui-props`,n=`data-canvas`,r=`data-canvas-at`,i=`__WUI_MARKERS__`,a=`props`,o=new Set([`children`,`className`,`style`,`id`,`key`,`ref`,`as`,`linkComponent`,`src`]),s=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`;function c(){return globalThis[i]===a}function l(i,a){let l={[e]:i},u=a?.[n];typeof u==`string`&&u!==``&&(l[n]=u);let d=a?.[r];if(typeof d==`string`&&d!==``&&(l[r]=d),!c())return l;let f={};for(let[e,t]of Object.entries(a||{}))o.has(e)||e.startsWith(`aria-`)||e.startsWith(`data-`)||/^on[A-Z]/.test(e)||s(t)&&(f[e]=t);return l[t]=JSON.stringify(f),l}function u(e,t){let{[n]:i,[r]:a,...o}=t??{};return{marker:l(e,t),props:o}}export{r as WUI_CANVAS_AT_ATTRIBUTE,n as WUI_CANVAS_KEY_ATTRIBUTE,i as WUI_MARKERS_GLOBAL,a as WUI_MARKERS_PROPS_MODE,e as WUI_MARKER_ATTRIBUTE,t as WUI_MARKER_PROPS_ATTRIBUTE,u as splitMarkerProps,l as wuiMarkerAttributes,c as wuiMarkerPropsOn};
1
+ var e=`data-wui`,t=`data-wui-props`,n=`data-canvas`,r=`data-canvas-at`,i=`__WUI_MARKERS__`,a=`props`,o=/* @__PURE__ */ new Set([`children`,`className`,`style`,`id`,`key`,`ref`,`as`,`linkComponent`,`src`]),s=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`;function c(){return globalThis[i]===a}function l(i,a){let l={[e]:i},u=a?.[n];typeof u==`string`&&u!==``&&(l[n]=u);let d=a?.[r];if(typeof d==`string`&&d!==``&&(l[r]=d),!c())return l;let f={};for(let[e,t]of Object.entries(a||{}))o.has(e)||e.startsWith(`aria-`)||e.startsWith(`data-`)||/^on[A-Z]/.test(e)||s(t)&&(f[e]=t);return l[t]=JSON.stringify(f),l}function u(e,t){let{[n]:i,[r]:a,...o}=t??{};return{marker:l(e,t),props:o}}export{r as WUI_CANVAS_AT_ATTRIBUTE,n as WUI_CANVAS_KEY_ATTRIBUTE,i as WUI_MARKERS_GLOBAL,a as WUI_MARKERS_PROPS_MODE,e as WUI_MARKER_ATTRIBUTE,t as WUI_MARKER_PROPS_ATTRIBUTE,u as splitMarkerProps,l as wuiMarkerAttributes,c as wuiMarkerPropsOn};
@@ -0,0 +1 @@
1
+ var e=/\[([^[\]\n]+)\](?!\()/g;export{e as CITATION_RUN};
@@ -1 +1 @@
1
- var e=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`),t=/\[([^\]\n]+)\]\(((?:[^()\s]|\([^()\s]*\))+)\)/y,n=/!\[([^\]\n]*)\]\(((?:[^()\s]|\([^()\s]*\))+)\)/y,r=e=>/[\p{L}\p{N}]/u.test(e);function i(e,t){let n=0;for(let r=t-1;r>=0&&e.charAt(r)===`\\`;--r)n+=1;return n%2==1}function a(e,t,n){let a=n.length===1;for(let o=e.indexOf(n,t);o!==-1;o=e.indexOf(n,o+1)){let s=o>t&&!/\s/.test(e.charAt(t))&&!/\s/.test(e.charAt(o-1)),c=a&&(e.charAt(o+1)===n||e.charAt(o-1)===n),l=n===`_`&&r(e.charAt(o+n.length));if(s&&!c&&!l&&!i(e,o))return o}return-1}function o(i){let s=[],c=``,l=()=>{c&&=(s.push({type:`text`,text:c}),``)},u=0;for(;u<i.length;){let d=i.charAt(u),f=i.charAt(u+1);if(d===`\\`&&e.has(f)){c+=f,u+=2;continue}if(d==="`"){let e=i.indexOf("`",u+1);if(e>u+1){l(),s.push({type:`code`,text:i.slice(u+1,e)}),u=e+1;continue}}let p=d+f;if(p===`**`||p===`__`||p===`~~`){let e=a(i,u+2,p);if(e!==-1&&!(p===`__`&&r(i.charAt(u-1)))){l();let t=o(i.slice(u+2,e));p===`~~`?s.push({type:`strike`,children:t}):s.push({type:`strong`,children:t}),u=e+2;continue}c+=p,u+=2;continue}if(d===`*`||d===`_`){let e=a(i,u+1,d);if(e!==-1&&!(d===`_`&&r(i.charAt(u-1)))){l(),s.push({type:`em`,children:o(i.slice(u+1,e))}),u=e+1;continue}}if(d===`[`){t.lastIndex=u;let e=t.exec(i);if(e){l(),s.push({type:`link`,href:e[2],children:o(e[1])}),u+=e[0].length;continue}}if(d===`!`){n.lastIndex=u;let e=n.exec(i);if(e){l(),s.push({type:`image`,children:o(e[1])}),u+=e[0].length;continue}}c+=d,u+=1}return l(),s.map((e,t)=>({...e,key:t}))}export{o as parseInline};
1
+ import{CITATION_RUN as e}from"./citations.js";var t=/* @__PURE__ */ new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`),n=/\[([^\]\n]+)\]\(((?:[^()\s]|\([^()\s]*\))+)\)/y,r=/!\[([^\]\n]*)\]\(((?:[^()\s]|\([^()\s]*\))+)\)/y,i=new RegExp(e.source,`y`),a=e=>/[\p{L}\p{N}]/u.test(e);function o(e,t){let n=0;for(let r=t-1;r>=0&&e.charAt(r)===`\\`;--r)n+=1;return n%2==1}function s(e,t,n){let r=n.length===1;for(let i=e.indexOf(n,t);i!==-1;i=e.indexOf(n,i+1)){let s=i>t&&!/\s/.test(e.charAt(t))&&!/\s/.test(e.charAt(i-1)),c=r&&(e.charAt(i+1)===n||e.charAt(i-1)===n),l=n===`_`&&a(e.charAt(i+n.length));if(s&&!c&&!l&&!o(e,i))return i}return-1}function c(e,o){let l=o?.isCitation,u=[],d=``,f=()=>{d&&=(u.push({type:`text`,text:d}),``)},p=0;for(;p<e.length;){let m=e.charAt(p),h=e.charAt(p+1);if(m===`\\`&&t.has(h)){d+=h,p+=2;continue}if(m==="`"){let t=e.indexOf("`",p+1);if(t>p+1){f(),u.push({type:`code`,text:e.slice(p+1,t)}),p=t+1;continue}}let g=m+h;if(g===`**`||g===`__`||g===`~~`){let t=s(e,p+2,g);if(t!==-1&&!(g===`__`&&a(e.charAt(p-1)))){f();let n=c(e.slice(p+2,t),o);g===`~~`?u.push({type:`strike`,children:n}):u.push({type:`strong`,children:n}),p=t+2;continue}d+=g,p+=2}else{if(m===`*`||m===`_`){let t=s(e,p+1,m);if(t!==-1&&!(m===`_`&&a(e.charAt(p-1)))){f(),u.push({type:`em`,children:c(e.slice(p+1,t),o)}),p=t+1;continue}}if(m===`[`){n.lastIndex=p;let t=n.exec(e);if(t){f(),u.push({type:`link`,href:t[2],children:c(t[1])}),p+=t[0].length;continue}if(l){i.lastIndex=p;let t=i.exec(e);if(t&&l(t[1])){f(),u.push({type:`citation`,text:t[1]}),p+=t[0].length;continue}}}if(m===`!`){r.lastIndex=p;let t=r.exec(e);if(t){f(),u.push({type:`image`,children:c(t[1])}),p+=t[0].length;continue}}d+=m,p+=1}}return f(),u.map((e,t)=>({...e,key:t}))}export{c as parseInline};
@@ -5,13 +5,19 @@ declare const AppAutocomplete: import("react").ForwardRefExoticComponent<{
5
5
  onChange?: (value: string, meta?: {
6
6
  isCustom: boolean;
7
7
  }) => void;
8
- /** The options to filter as the user types. Each has a value and a label. */
8
+ /** The options to filter as the user types. Each has a value and a label, and may carry a photo or initials. */
9
9
  options?: Array<{
10
10
  value: string;
11
11
  label: import('react').ReactNode;
12
+ avatar?: string;
13
+ initials?: string;
12
14
  }>;
13
15
  /** Text shown for the value when the options do not contain it, such as a selection loaded from the server. */
14
16
  valueLabel?: string;
17
+ /** A photo URL shown beside the value when the options do not carry it. */
18
+ valueAvatar?: string;
19
+ /** Initials shown beside the value when the options do not carry them and there is no photo. */
20
+ valueInitials?: string;
15
21
  loadOptions?: (query: string, opts?: {
16
22
  signal?: AbortSignal;
17
23
  }) => Promise<{
@@ -56,6 +62,11 @@ declare const AppAutocomplete: import("react").ForwardRefExoticComponent<{
56
62
  * @default false
57
63
  */
58
64
  required?: boolean;
65
+ /**
66
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
67
+ * @default false
68
+ */
69
+ optional?: boolean;
59
70
  /** Help content shown in an info tip beside the label. */
60
71
  help?: import('react').ReactNode;
61
72
  /**
@@ -62,6 +62,8 @@ declare const AppChart: import("react").ForwardRefExoticComponent<{
62
62
  value: number;
63
63
  label: string;
64
64
  };
65
+ /** Caption under the total in the centre of a donut. Default Total. Donut only. */
66
+ centerLabel?: string;
65
67
  /**
66
68
  * In px, the axis labels included. A value that is not above 0 draws at the default.
67
69
  * @default 320
@@ -14,6 +14,7 @@
14
14
  * @param {(hex: string) => void} props.onChange
15
15
  * @param {import('react').ReactNode} [props.label]
16
16
  * @param {boolean} [props.required]
17
+ * @param {boolean} [props.optional] Ends the label with "(optional)". Required wins when both are set.
17
18
  * @param {string} [props.error]
18
19
  * @param {string} [props.hint]
19
20
  * @param {string} [props.name]
@@ -37,6 +38,11 @@ export default function AppColorField(props: {
37
38
  * @default false
38
39
  */
39
40
  required?: boolean;
41
+ /**
42
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
43
+ * @default false
44
+ */
45
+ optional?: boolean;
40
46
  /** Error message shown under the field. */
41
47
  error?: string;
42
48
  /** Helper text shown under the field. */
@@ -12,6 +12,7 @@
12
12
  * @param {boolean} [props.danger]
13
13
  * @param {"success"|"error"|"warning"|"info"|"delete"|"primary"} [props.tone]
14
14
  * @param {string} [props.image]
15
+ * @param {string | import('react').ReactNode} [props.icon] Overrides the tone's glyph; a string is an icon name.
15
16
  * @param {number} [props.iconSize]
16
17
  * @param {string} [props.confirmPhrase]
17
18
  * @param {() => void} props.onConfirm Runs when Confirm is pressed.
@@ -54,6 +55,8 @@ export default function AppConfirmDialog(props: {
54
55
  tone?: "success" | "error" | "warning" | "info" | "delete" | "primary";
55
56
  /** URL of a custom illustration that replaces the tone artwork. Any source size is fine: the theme boxes it to the same footprint. It is decorative, so the title and message carry the meaning. */
56
57
  image?: string;
58
+ /** Replaces the tone's glyph. A string is an icon name; a node is drawn as given. An image still wins over it. */
59
+ icon?: string | import('react').ReactNode;
57
60
  /** Width and height of the illustration in px, for the tone artwork and a custom image alike. Unset, it is 120px with a message and 84px without. */
58
61
  iconSize?: number;
59
62
  /** Exact text the user must type before Confirm unlocks, such as a workspace name. */
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Mount once near the root. A descendant calls `useConfirm()` and awaits the result:
3
+ * `const confirm = useConfirm(); if (!(await confirm({ title: "Delete?", danger: true }))) return;`
4
+ * The promise resolves true on confirm, and false on Cancel, Escape, the backdrop or unmount.
5
+ *
6
+ * @param {{ children: import('react').ReactNode }} props
7
+ */
8
+ export default function AppConfirmProvider(props: {
9
+ children: import('react').ReactNode;
10
+ }): import("react").JSX.Element;
11
+ /**
12
+ * @returns {(options: { title: import('react').ReactNode, message?: import('react').ReactNode,
13
+ * confirmLabel?: string, cancelLabel?: string, danger?: boolean, tone?: string,
14
+ * icon?: string | import('react').ReactNode, confirmPhrase?: string,
15
+ * onRun?: () => Promise<void> }) => Promise<boolean>}
16
+ */
17
+ export declare function useConfirm(): (options: {
18
+ title: import('react').ReactNode;
19
+ message?: import('react').ReactNode;
20
+ confirmLabel?: string;
21
+ cancelLabel?: string;
22
+ danger?: boolean;
23
+ tone?: string;
24
+ icon?: string | import('react').ReactNode;
25
+ confirmPhrase?: string;
26
+ onRun?: () => Promise<void>;
27
+ }) => Promise<boolean>;
@@ -56,6 +56,11 @@ declare const AppCountrySelect: import("react").ForwardRefExoticComponent<{
56
56
  * @default false
57
57
  */
58
58
  required?: boolean;
59
+ /**
60
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
61
+ * @default false
62
+ */
63
+ optional?: boolean;
59
64
  /** Error message shown under the field; marks the control invalid. */
60
65
  error?: string;
61
66
  /** Help text shown under the field when there is no error. */
@@ -10,6 +10,11 @@ declare const AppDatePicker: import("react").ForwardRefExoticComponent<{
10
10
  * @default false
11
11
  */
12
12
  required?: boolean;
13
+ /**
14
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
15
+ * @default false
16
+ */
17
+ optional?: boolean;
13
18
  /** Help text shown under the control. */
14
19
  hint?: string;
15
20
  /** An error message shown under the control. */
@@ -15,6 +15,11 @@ declare const AppDateRangePicker: import("react").ForwardRefExoticComponent<{
15
15
  * @default false
16
16
  */
17
17
  required?: boolean;
18
+ /**
19
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
20
+ * @default false
21
+ */
22
+ optional?: boolean;
18
23
  /** Help text shown under the control. */
19
24
  hint?: string;
20
25
  /** An error message shown under the control. */
@@ -22,6 +22,7 @@
22
22
  * @param {string} [props.accept]
23
23
  * @param {number} [props.maxSizeMb]
24
24
  * @param {boolean} [props.required]
25
+ * @param {boolean} [props.optional] Ends the label with "(optional)". Required wins when both are set.
25
26
  * @param {string} [props.error]
26
27
  * @param {string} [props.hint]
27
28
  * @param {boolean} [props.loading]
@@ -71,6 +72,11 @@ export default function AppFilePicker(props: {
71
72
  maxSizeMb?: number;
72
73
  /** Marks the field as required in its label. */
73
74
  required?: boolean;
75
+ /**
76
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
77
+ * @default false
78
+ */
79
+ optional?: boolean;
74
80
  /** A message from the page, shown below the control. */
75
81
  error?: string;
76
82
  /** Helper text below the control. An error (the page's or a rejected pick's) replaces it while it shows. */
@@ -34,6 +34,7 @@ import "@webority/ui-elements/elements/image-crop";
34
34
  * @param {string} [props.hint]
35
35
  * @param {string} [props.error]
36
36
  * @param {boolean} [props.required]
37
+ * @param {boolean} [props.optional] Ends the label with "(optional)". Required wins when both are set.
37
38
  * @param {string} [props.className] On the picker.
38
39
  * @param {string} [props.fieldClassName] On the .field wrapper.
39
40
  * @param {import('react').CSSProperties} [props.style]
@@ -134,6 +135,11 @@ export default function AppImagePicker(props: {
134
135
  * @default false
135
136
  */
136
137
  required?: boolean;
138
+ /**
139
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
140
+ * @default false
141
+ */
142
+ optional?: boolean;
137
143
  /**
138
144
  * Extra class on the picker.
139
145
  * @default ""
@@ -12,6 +12,8 @@ import "@webority/ui-elements/elements/markdown";
12
12
  * @param {string} [props.value]
13
13
  * @param {(href: string) => string|null|undefined} [props.resolveLink] Maps a `scheme:kind/id` link
14
14
  * to an in-app route such as "/support?ticket=3f2a", or null to show its label as text.
15
+ * @param {(inner: string) => boolean} [props.isCitation] Which `[inner]` runs are citations. Without it no run is one.
16
+ * @param {(citation: string) => void} [props.onOpenCitation] Opens a citation chip. Without it the chip is not a button.
15
17
  * @param {import('react').ElementType} [props.linkComponent] A router link. It receives `to` for an
16
18
  * in-app route. Without it an in-app route renders as a plain anchor.
17
19
  * @param {"app"|"web"} [props.links] "app" opens only routes from `resolveLink`; "web" (default) also opens web, mail and phone addresses.
@@ -22,6 +24,8 @@ export default function AppMarkdown(props: {
22
24
  /** The Markdown source. Missing text renders nothing. */
23
25
  value?: string;
24
26
  resolveLink?: (href: string) => string | null | undefined;
27
+ isCitation?: (inner: string) => boolean;
28
+ onOpenCitation?: (citation: string) => void;
25
29
  linkComponent?: import('react').ElementType;
26
30
  /**
27
31
  * App opens only routes from resolveLink. Web also opens web, mail and phone addresses in a new tab.
@@ -67,6 +67,11 @@ declare const AppMultiSelect: import("react").ForwardRefExoticComponent<{
67
67
  * @default false
68
68
  */
69
69
  required?: boolean;
70
+ /**
71
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
72
+ * @default false
73
+ */
74
+ optional?: boolean;
70
75
  /** Help content shown in an info tip beside the label. */
71
76
  help?: import('react').ReactNode;
72
77
  /**
@@ -9,6 +9,11 @@ declare const AppNumberInput: import("react").ForwardRefExoticComponent<{
9
9
  * @default false
10
10
  */
11
11
  required?: boolean;
12
+ /**
13
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
14
+ * @default false
15
+ */
16
+ optional?: boolean;
12
17
  /** An error message under the field. It sets the error state and aria-invalid on the input. */
13
18
  error?: string;
14
19
  /** Help text under the field, linked to the input for screen readers. */
@@ -21,6 +21,11 @@ declare const AppOtpInput: import("react").ForwardRefExoticComponent<{
21
21
  * @default false
22
22
  */
23
23
  required?: boolean;
24
+ /**
25
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
26
+ * @default false
27
+ */
28
+ optional?: boolean;
24
29
  /** Help text under the code. It is hidden while an error is shown. */
25
30
  hint?: string;
26
31
  /** The error message under the code. It replaces the hint and marks the field invalid. */
@@ -26,6 +26,11 @@ declare const AppPhoneNumberInput: import("react").ForwardRefExoticComponent<{
26
26
  * @default false
27
27
  */
28
28
  required?: boolean;
29
+ /**
30
+ * Ends the label with (optional) when the field is not required. Required wins when both are set.
31
+ * @default false
32
+ */
33
+ optional?: boolean;
29
34
  /** Help text under the field. The error replaces it while one is shown. */
30
35
  hint?: string;
31
36
  /** An error message under the field, which also turns the border red. */