@webority/ui-react 0.83.4 → 0.84.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 (272) hide show
  1. package/dist/components/AppAccordion.js +1 -1
  2. package/dist/components/AppActionIcon.js +1 -1
  3. package/dist/components/AppAlert.js +1 -1
  4. package/dist/components/AppAsyncBlock.js +1 -1
  5. package/dist/components/AppAutocomplete.js +1 -1
  6. package/dist/components/AppAvatar.js +1 -1
  7. package/dist/components/AppAvatarGroup.js +1 -1
  8. package/dist/components/AppAvatarPicker.js +1 -1
  9. package/dist/components/AppBadge.js +1 -1
  10. package/dist/components/AppBanner.js +1 -1
  11. package/dist/components/AppBreadcrumbs.js +1 -1
  12. package/dist/components/AppButton.js +1 -1
  13. package/dist/components/AppButtonGroup.js +1 -1
  14. package/dist/components/AppCalendar.js +1 -1
  15. package/dist/components/AppCard.js +1 -1
  16. package/dist/components/AppCarousel.js +1 -1
  17. package/dist/components/AppChart.js +1 -1
  18. package/dist/components/AppChartCard.js +1 -1
  19. package/dist/components/AppCheckbox.js +1 -1
  20. package/dist/components/AppChip.js +1 -1
  21. package/dist/components/AppChipGroup.js +1 -1
  22. package/dist/components/AppChoiceCard.js +1 -1
  23. package/dist/components/AppChoiceChip.js +1 -1
  24. package/dist/components/AppCodeBlock.js +1 -1
  25. package/dist/components/AppColorField.js +1 -1
  26. package/dist/components/AppColumnMenu.js +1 -1
  27. package/dist/components/AppCommandPalette.js +1 -1
  28. package/dist/components/AppCommentThread.js +1 -1
  29. package/dist/components/AppCompareTable.js +1 -1
  30. package/dist/components/AppConfirmDialog.js +1 -1
  31. package/dist/components/AppConsentBanner.js +1 -1
  32. package/dist/components/AppContextMenu.js +1 -1
  33. package/dist/components/AppCopyButton.js +1 -1
  34. package/dist/components/AppCountrySelect.js +1 -1
  35. package/dist/components/AppDashboardCell.js +1 -1
  36. package/dist/components/AppDashboardGrid.js +1 -1
  37. package/dist/components/AppDataTable.js +1 -1
  38. package/dist/components/AppDatePicker.js +1 -1
  39. package/dist/components/AppDateRangePicker.js +1 -1
  40. package/dist/components/AppDescriptions.js +1 -1
  41. package/dist/components/AppDrawer.js +1 -1
  42. package/dist/components/AppDropZone.js +1 -1
  43. package/dist/components/AppDropdown.js +1 -1
  44. package/dist/components/AppDueDate.js +1 -1
  45. package/dist/components/AppEmptyState.js +1 -1
  46. package/dist/components/AppErrorSummary.js +1 -1
  47. package/dist/components/AppFileAttachment.js +1 -1
  48. package/dist/components/AppFilePicker.js +1 -1
  49. package/dist/components/AppFileViewer.js +1 -1
  50. package/dist/components/AppFilterBar.js +1 -1
  51. package/dist/components/AppFloatingDock.js +1 -1
  52. package/dist/components/AppFormActions.js +1 -1
  53. package/dist/components/AppFormRow.js +1 -1
  54. package/dist/components/AppFormSection.js +1 -1
  55. package/dist/components/AppHoverCard.js +1 -1
  56. package/dist/components/AppIcon.js +1 -1
  57. package/dist/components/AppInfoList.js +1 -1
  58. package/dist/components/AppInfoTip.js +1 -1
  59. package/dist/components/AppInlineEdit.js +1 -1
  60. package/dist/components/AppInput.js +1 -1
  61. package/dist/components/AppInputGroup.js +1 -1
  62. package/dist/components/AppKanban.js +1 -1
  63. package/dist/components/AppKbd.js +1 -1
  64. package/dist/components/AppKpiTile.js +1 -1
  65. package/dist/components/AppLightbox.js +1 -1
  66. package/dist/components/AppLink.js +1 -1
  67. package/dist/components/AppLogoPicker.js +1 -1
  68. package/dist/components/AppMarkdown.js +1 -0
  69. package/dist/components/AppMentionInput.js +1 -1
  70. package/dist/components/AppMenubar.js +1 -1
  71. package/dist/components/AppMeter.js +1 -1
  72. package/dist/components/AppMetricStrip.js +1 -1
  73. package/dist/components/AppModal.js +1 -1
  74. package/dist/components/AppMultiSelect.js +1 -1
  75. package/dist/components/AppNavigationMenu.js +1 -1
  76. package/dist/components/AppNotificationCenter.js +1 -1
  77. package/dist/components/AppNumberInput.js +1 -1
  78. package/dist/components/AppOnboardingChecklist.js +1 -1
  79. package/dist/components/AppOtpInput.js +1 -1
  80. package/dist/components/AppPageHeader.js +1 -1
  81. package/dist/components/AppPagination.js +1 -1
  82. package/dist/components/AppPhoneNumberInput.js +1 -1
  83. package/dist/components/AppPricingCard.js +1 -1
  84. package/dist/components/AppProgress.js +1 -1
  85. package/dist/components/AppQrCode.js +1 -1
  86. package/dist/components/AppRadio.js +1 -1
  87. package/dist/components/AppRadioGroup.js +1 -1
  88. package/dist/components/AppRating.js +1 -1
  89. package/dist/components/AppRecordPager.js +1 -1
  90. package/dist/components/AppRelativeTime.js +1 -1
  91. package/dist/components/AppRepeater.js +1 -1
  92. package/dist/components/AppRequiredMark.js +1 -1
  93. package/dist/components/AppResizable.js +1 -1
  94. package/dist/components/AppResizableHandle.js +1 -1
  95. package/dist/components/AppResizablePanel.js +1 -1
  96. package/dist/components/AppResourceCard.js +1 -1
  97. package/dist/components/AppResult.js +1 -1
  98. package/dist/components/AppRichText.js +1 -1
  99. package/dist/components/AppRollingNumber.js +1 -1
  100. package/dist/components/AppRouteError.js +1 -1
  101. package/dist/components/AppScoreScale.js +1 -1
  102. package/dist/components/AppScrollbar.js +1 -1
  103. package/dist/components/AppSearch.js +1 -1
  104. package/dist/components/AppSectionCallToAction.js +1 -1
  105. package/dist/components/AppSectionFaq.js +1 -1
  106. package/dist/components/AppSectionFeatures.js +1 -1
  107. package/dist/components/AppSectionHero.js +1 -1
  108. package/dist/components/AppSectionLogos.js +1 -1
  109. package/dist/components/AppSectionPricing.js +1 -1
  110. package/dist/components/AppSectionTestimonials.js +1 -1
  111. package/dist/components/AppSegmented.js +1 -1
  112. package/dist/components/AppSelect.js +1 -1
  113. package/dist/components/AppSelectMini.js +1 -1
  114. package/dist/components/AppShell.js +1 -1
  115. package/dist/components/AppShortcutLegend.js +1 -1
  116. package/dist/components/AppShowMore.js +1 -1
  117. package/dist/components/AppSidebarMenu.js +1 -1
  118. package/dist/components/AppSkeleton.js +1 -1
  119. package/dist/components/AppSlider.js +1 -1
  120. package/dist/components/AppSortableList.js +1 -1
  121. package/dist/components/AppSparkline.js +1 -1
  122. package/dist/components/AppSpinner.js +1 -1
  123. package/dist/components/AppSplash.js +1 -1
  124. package/dist/components/AppSplitButton.js +1 -1
  125. package/dist/components/AppSplitView.js +1 -1
  126. package/dist/components/AppStatusBadge.js +1 -1
  127. package/dist/components/AppStepper.js +1 -1
  128. package/dist/components/AppSwitch.js +1 -1
  129. package/dist/components/AppTableEmptyState.js +1 -1
  130. package/dist/components/AppTablePagination.js +1 -1
  131. package/dist/components/AppTableToolbar.js +1 -1
  132. package/dist/components/AppTabs.js +1 -1
  133. package/dist/components/AppTagInput.js +1 -1
  134. package/dist/components/AppTextarea.js +1 -1
  135. package/dist/components/AppThemeToggle.js +1 -1
  136. package/dist/components/AppTimePicker.js +1 -1
  137. package/dist/components/AppTimeline.js +1 -1
  138. package/dist/components/AppToast.js +1 -1
  139. package/dist/components/AppToolbar.js +1 -1
  140. package/dist/components/AppTour.js +1 -1
  141. package/dist/components/AppTreeView.js +1 -1
  142. package/dist/components/AppTruncate.js +1 -1
  143. package/dist/components/AppUpdateBar.js +1 -1
  144. package/dist/components/AppWhatsNew.js +1 -1
  145. package/dist/components/AppWizard.js +1 -1
  146. package/dist/components/AppWorkspaceSwitcher.js +1 -1
  147. package/dist/lib/CheckField.js +1 -1
  148. package/dist/lib/wuiMarker.js +1 -0
  149. package/dist/types/components/AppAccordion.d.ts +1 -1
  150. package/dist/types/components/AppActionIcon.d.ts +1 -1
  151. package/dist/types/components/AppAlert.d.ts +1 -1
  152. package/dist/types/components/AppAsyncBlock.d.ts +1 -1
  153. package/dist/types/components/AppAvatar.d.ts +1 -1
  154. package/dist/types/components/AppAvatarGroup.d.ts +1 -8
  155. package/dist/types/components/AppAvatarPicker.d.ts +1 -1
  156. package/dist/types/components/AppBadge.d.ts +1 -1
  157. package/dist/types/components/AppBanner.d.ts +1 -1
  158. package/dist/types/components/AppBreadcrumbs.d.ts +1 -1
  159. package/dist/types/components/AppButton.d.ts +1 -1
  160. package/dist/types/components/AppButtonGroup.d.ts +1 -1
  161. package/dist/types/components/AppCard.d.ts +1 -1
  162. package/dist/types/components/AppCarousel.d.ts +1 -1
  163. package/dist/types/components/AppChartCard.d.ts +1 -1
  164. package/dist/types/components/AppChip.d.ts +1 -1
  165. package/dist/types/components/AppChipGroup.d.ts +1 -1
  166. package/dist/types/components/AppChoiceCard.d.ts +1 -4
  167. package/dist/types/components/AppChoiceChip.d.ts +1 -1
  168. package/dist/types/components/AppCodeBlock.d.ts +1 -1
  169. package/dist/types/components/AppColorField.d.ts +1 -1
  170. package/dist/types/components/AppColumnMenu.d.ts +1 -1
  171. package/dist/types/components/AppCommandPalette.d.ts +1 -1
  172. package/dist/types/components/AppCommentThread.d.ts +1 -1
  173. package/dist/types/components/AppCompareTable.d.ts +1 -1
  174. package/dist/types/components/AppConfirmDialog.d.ts +1 -20
  175. package/dist/types/components/AppConsentBanner.d.ts +1 -1
  176. package/dist/types/components/AppContextMenu.d.ts +1 -1
  177. package/dist/types/components/AppCopyButton.d.ts +1 -1
  178. package/dist/types/components/AppDashboardCell.d.ts +1 -1
  179. package/dist/types/components/AppDashboardGrid.d.ts +1 -1
  180. package/dist/types/components/AppDataTable.d.ts +1 -1
  181. package/dist/types/components/AppDescriptions.d.ts +1 -1
  182. package/dist/types/components/AppDrawer.d.ts +1 -1
  183. package/dist/types/components/AppDropZone.d.ts +1 -1
  184. package/dist/types/components/AppDropdown.d.ts +1 -1
  185. package/dist/types/components/AppDueDate.d.ts +1 -1
  186. package/dist/types/components/AppEmptyState.d.ts +1 -1
  187. package/dist/types/components/AppErrorSummary.d.ts +1 -1
  188. package/dist/types/components/AppFileAttachment.d.ts +1 -3
  189. package/dist/types/components/AppFilePicker.d.ts +1 -1
  190. package/dist/types/components/AppFilterBar.d.ts +1 -1
  191. package/dist/types/components/AppFloatingDock.d.ts +1 -1
  192. package/dist/types/components/AppFormActions.d.ts +1 -1
  193. package/dist/types/components/AppFormRow.d.ts +1 -1
  194. package/dist/types/components/AppFormSection.d.ts +1 -1
  195. package/dist/types/components/AppHoverCard.d.ts +1 -1
  196. package/dist/types/components/AppIcon.d.ts +1 -1
  197. package/dist/types/components/AppInfoList.d.ts +1 -1
  198. package/dist/types/components/AppInfoTip.d.ts +1 -8
  199. package/dist/types/components/AppInlineEdit.d.ts +1 -1
  200. package/dist/types/components/AppInputGroup.d.ts +1 -1
  201. package/dist/types/components/AppKanban.d.ts +1 -1
  202. package/dist/types/components/AppKbd.d.ts +1 -1
  203. package/dist/types/components/AppKpiTile.d.ts +1 -1
  204. package/dist/types/components/AppLightbox.d.ts +1 -1
  205. package/dist/types/components/AppLink.d.ts +1 -15
  206. package/dist/types/components/AppLogoPicker.d.ts +1 -33
  207. package/dist/types/components/AppMarkdown.d.ts +24 -0
  208. package/dist/types/components/AppMenubar.d.ts +1 -1
  209. package/dist/types/components/AppMeter.d.ts +1 -1
  210. package/dist/types/components/AppMetricStrip.d.ts +1 -1
  211. package/dist/types/components/AppModal.d.ts +1 -1
  212. package/dist/types/components/AppNavigationMenu.d.ts +1 -1
  213. package/dist/types/components/AppNotificationCenter.d.ts +1 -1
  214. package/dist/types/components/AppOnboardingChecklist.d.ts +1 -1
  215. package/dist/types/components/AppPageHeader.d.ts +1 -1
  216. package/dist/types/components/AppPagination.d.ts +1 -1
  217. package/dist/types/components/AppPricingCard.d.ts +1 -1
  218. package/dist/types/components/AppProgress.d.ts +1 -1
  219. package/dist/types/components/AppQrCode.d.ts +1 -1
  220. package/dist/types/components/AppRadioGroup.d.ts +1 -1
  221. package/dist/types/components/AppRating.d.ts +1 -1
  222. package/dist/types/components/AppRecordPager.d.ts +1 -1
  223. package/dist/types/components/AppRelativeTime.d.ts +1 -1
  224. package/dist/types/components/AppRepeater.d.ts +1 -1
  225. package/dist/types/components/AppRequiredMark.d.ts +1 -1
  226. package/dist/types/components/AppResizable.d.ts +1 -1
  227. package/dist/types/components/AppResizableHandle.d.ts +1 -1
  228. package/dist/types/components/AppResizablePanel.d.ts +1 -1
  229. package/dist/types/components/AppResourceCard.d.ts +1 -1
  230. package/dist/types/components/AppResult.d.ts +1 -1
  231. package/dist/types/components/AppRollingNumber.d.ts +1 -1
  232. package/dist/types/components/AppRouteError.d.ts +1 -1
  233. package/dist/types/components/AppScoreScale.d.ts +1 -1
  234. package/dist/types/components/AppScrollbar.d.ts +1 -1
  235. package/dist/types/components/AppSearch.d.ts +1 -2
  236. package/dist/types/components/AppSectionCallToAction.d.ts +1 -1
  237. package/dist/types/components/AppSectionFaq.d.ts +1 -1
  238. package/dist/types/components/AppSectionFeatures.d.ts +1 -1
  239. package/dist/types/components/AppSectionHero.d.ts +1 -1
  240. package/dist/types/components/AppSectionLogos.d.ts +1 -1
  241. package/dist/types/components/AppSectionPricing.d.ts +1 -1
  242. package/dist/types/components/AppSectionTestimonials.d.ts +1 -1
  243. package/dist/types/components/AppSegmented.d.ts +1 -1
  244. package/dist/types/components/AppSelectMini.d.ts +1 -15
  245. package/dist/types/components/AppShell.d.ts +1 -1
  246. package/dist/types/components/AppShortcutLegend.d.ts +1 -1
  247. package/dist/types/components/AppShowMore.d.ts +1 -1
  248. package/dist/types/components/AppSidebarMenu.d.ts +1 -22
  249. package/dist/types/components/AppSkeleton.d.ts +1 -1
  250. package/dist/types/components/AppSparkline.d.ts +1 -1
  251. package/dist/types/components/AppSpinner.d.ts +1 -1
  252. package/dist/types/components/AppSplash.d.ts +1 -1
  253. package/dist/types/components/AppSplitButton.d.ts +1 -1
  254. package/dist/types/components/AppSplitView.d.ts +1 -1
  255. package/dist/types/components/AppStatusBadge.d.ts +1 -1
  256. package/dist/types/components/AppStepper.d.ts +1 -1
  257. package/dist/types/components/AppTableEmptyState.d.ts +1 -1
  258. package/dist/types/components/AppTablePagination.d.ts +1 -1
  259. package/dist/types/components/AppTableToolbar.d.ts +1 -1
  260. package/dist/types/components/AppTabs.d.ts +1 -1
  261. package/dist/types/components/AppThemeToggle.d.ts +1 -1
  262. package/dist/types/components/AppTimeline.d.ts +1 -1
  263. package/dist/types/components/AppToast.d.ts +1 -1
  264. package/dist/types/components/AppToolbar.d.ts +1 -1
  265. package/dist/types/components/AppTruncate.d.ts +1 -1
  266. package/dist/types/components/AppUpdateBar.d.ts +1 -1
  267. package/dist/types/components/AppWhatsNew.d.ts +1 -1
  268. package/dist/types/components/AppWorkspaceSwitcher.d.ts +1 -1
  269. package/dist/types/index.d.ts +1 -0
  270. package/dist/types/lib/wuiMarker.d.ts +26 -0
  271. package/dist/ui-react.js +1 -1
  272. package/package.json +3 -3
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./AppIcon.js";import{useId as n,useState as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o({items:o=[],multiple:s=!1,id:c,className:l=``,...u}){e(`AppAccordion`,u);let d=n(),f=c||d,[p,m]=r(()=>{let e=o.map((e,t)=>({item:e,key:e.key??String(t)})).filter(({item:e})=>e.open).map(({key:e})=>e);return new Set(s?e:e.slice(0,1))}),h=(e,t)=>e.key??String(t),g=e=>{m(t=>{let n=new Set(s?t:[]);return t.has(e)?n.delete(e):n.add(e),n})};return i(`div`,{className:`faq-list${l?` ${l}`:``}`,...u,children:o.map((e,n)=>{let r=h(e,n),o=p.has(r),s=`${f}-${n}`,c=`${s}-q`;return a(`div`,{className:`faq-item${o?` open`:``}`,children:[a(`button`,{type:`button`,className:`faq-q`,id:c,"aria-expanded":o,"aria-controls":s,onClick:()=>g(r),children:[e.title,i(`span`,{className:`faq-q-icon`,children:i(t,{name:`chevron-down`,size:18})})]}),i(`section`,{className:`faq-a-wrap`,id:s,"aria-labelledby":c,inert:!o,"aria-hidden":!o||void 0,children:i(`div`,{className:`faq-a-inner`,children:e.content})})]},r)})})}export{o as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{useId as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(s){let{items:c=[],multiple:l=!1,id:u,className:d=``,...f}=s;t(`AppAccordion`,f);let p=r(),m=u||p,[h,g]=i(()=>{let e=c.map((e,t)=>({item:e,key:e.key??String(t)})).filter(({item:e})=>e.open).map(({key:e})=>e);return new Set(l?e:e.slice(0,1))}),_=(e,t)=>e.key??String(t),v=e=>{g(t=>{let n=new Set(l?t:[]);return t.has(e)?n.delete(e):n.add(e),n})};return a(`div`,{className:`faq-list${d?` ${d}`:``}`,...e(`AppAccordion`,s),...f,children:c.map((e,t)=>{let r=_(e,t),i=h.has(r),s=`${m}-${t}`,c=`${s}-q`;return o(`div`,{className:`faq-item${i?` open`:``}`,children:[o(`button`,{type:`button`,className:`faq-q`,id:c,"aria-expanded":i,"aria-controls":s,onClick:()=>v(r),children:[e.title,a(`span`,{className:`faq-q-icon`,children:a(n,{name:`chevron-down`,size:18})})]}),a(`section`,{className:`faq-a-wrap`,id:s,"aria-labelledby":c,inert:!i,"aria-hidden":!i||void 0,children:a(`div`,{className:`faq-a-inner`,children:e.content})})]},r)})})}export{s as default};
@@ -1 +1 @@
1
- import{devWarn as e}from"../lib/devWarn.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{shortcutAria as r}from"../lib/shortcutChip.js";import i from"./withTooltip.js";import a from"./renderIconProp.js";import{useRef as o}from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";var u=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`];function d({icon:d,iconVariant:f,label:p,tooltipPlacement:m=`auto`,shortcut:h,danger:g=!1,disabled:_=!1,size:v=20,onClick:y,className:b=``,as:x,href:S,accept:C,multiple:w=!1,onFiles:T,...E}){n(`AppActionIcon`,x===void 0?E:{...E,as:x}),t(`AppActionIcon`,`iconVariant`,f,u);let D=typeof T==`function`;D&&(x!==void 0||S!==void 0)&&e(`AppActionIcon: file mode renders a button; href and as are ignored.`),!D&&(C!==void 0||w)&&e(`AppActionIcon: accept and multiple apply only in file mode (pass onFiles).`);let O=o(null),k=e=>{let t=[...e.target.files];e.target.value=``,t.length>0&&T(t)},A=[`u-action`,g?`danger`:``,b].filter(Boolean).join(` `),{style:j,...M}=E,N={"--wui-action-size":`${v+16}px`,...j},P=D?`button`:x??(S?`a`:`button`),F=P===`button`,I=i(c(P,{type:F?`button`:void 0,href:F||_?void 0:S,className:A,style:N,"aria-label":p,"aria-keyshortcuts":r(h),disabled:F?_:void 0,"aria-disabled":!F&&_?`true`:void 0,role:!F&&_?`link`:void 0,tabIndex:!F&&_?-1:void 0,onClick:e=>{if(_){e.preventDefault(),e.stopPropagation();return}y?.(e),D&&!e.defaultPrevented&&O.current?.click()},...M,children:a(d,{size:v,variant:f})}),p,m,h);return D?l(s,{children:[I,c(`input`,{type:`file`,ref:O,className:`wui-action-icon-file`,hidden:!0,tabIndex:-1,"aria-hidden":`true`,accept:C,multiple:w,onChange:k,onClick:e=>e.stopPropagation()})]}):I}export{d as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{shortcutAria as i}from"../lib/shortcutChip.js";import a from"./withTooltip.js";import o from"./renderIconProp.js";import{useRef as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`];function f(f){let{icon:p,iconVariant:m,label:h,tooltipPlacement:g=`auto`,shortcut:_,danger:v=!1,disabled:y=!1,size:b=20,onClick:x,className:S=``,as:C,href:w,accept:T,multiple:E=!1,onFiles:D,...O}=f;r(`AppActionIcon`,C===void 0?O:{...O,as:C}),n(`AppActionIcon`,`iconVariant`,m,d);let k=typeof D==`function`;k&&(C!==void 0||w!==void 0)&&t(`AppActionIcon: file mode renders a button; href and as are ignored.`),!k&&(T!==void 0||E)&&t(`AppActionIcon: accept and multiple apply only in file mode (pass onFiles).`);let A=s(null),j=e=>{let t=[...e.target.files];e.target.value=``,t.length>0&&D(t)},M=[`u-action`,v?`danger`:``,S].filter(Boolean).join(` `),{style:N,...P}=O,F={"--wui-action-size":`${b+16}px`,...N},I=k?`button`:C??(w?`a`:`button`),L=I===`button`,R=a(l(I,{type:L?`button`:void 0,href:L||y?void 0:w,className:M,style:F,"aria-label":h,"aria-keyshortcuts":i(_),disabled:L?y:void 0,"aria-disabled":!L&&y?`true`:void 0,role:!L&&y?`link`:void 0,tabIndex:!L&&y?-1:void 0,onClick:e=>{if(y){e.preventDefault(),e.stopPropagation();return}x?.(e),k&&!e.defaultPrevented&&A.current?.click()},...e(`AppActionIcon`,f),...P,children:o(p,{size:b,variant:m})}),h,g,_);return k?u(c,{children:[R,l(`input`,{type:`file`,ref:A,className:`wui-action-icon-file`,hidden:!0,tabIndex:-1,"aria-hidden":`true`,accept:T,multiple:E,onChange:j,onClick:e=>e.stopPropagation()})]}):R}export{f as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Alert as r}from"react-bootstrap";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s={info:`info`,success:`check`,warning:`alert-triangle`,danger:`x`},c=[`info`,`success`,`warning`,`danger`],l=[`sm`,`md`,`lg`],u=[`alert`,`status`,`none`],d=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`];function f(e,t,r,i,o,s){return i?a(`span`,{className:`alert-icon alert-icon-image`,style:s>0?{width:s,height:s}:void 0,children:a(`img`,{src:i,alt:o})}):e?typeof e==`string`?a(`span`,{className:`alert-icon`,children:a(n,{name:e,size:t,variant:r})}):a(`span`,{className:`alert-icon`,children:e}):null}function p({variant:n=`info`,children:p,title:m,icon:h,iconVariant:g,iconSize:_,image:v,imageAlt:y=``,imageSize:b,className:x=``,onClose:S,dismissible:C,bordered:w=!0,accent:T=!1,size:E=`md`,action:D,role:O=`alert`,...k}){t(`AppAlert`,k),e(`AppAlert`,`variant`,n,c),e(`AppAlert`,`size`,E,l),e(`AppAlert`,`role`,O,u),e(`AppAlert`,`iconVariant`,g,d);let A=h===void 0?s[n]:h===`none`?null:h,j=!!v||!!A,M=D!=null&&D!==!1,N=m?a(`div`,{className:`alert-heading`,children:m}):null,P=j&&!!N&&!!p,F=_>0?_:E===`lg`?P?17:15:P?13:11;return a(r,{variant:n,className:[j?`alert-has-icon`:``,M?`alert-has-action`:``,P?`alert-stack`:``,w?``:`alert-borderless`,T?`alert-accent`:``,E===`sm`?`alert-sm`:``,E===`lg`?`alert-lg`:``,x].filter(Boolean).join(` `)||void 0,onClose:S,dismissible:C??typeof S==`function`,transition:!1,role:O===`none`?void 0:O,...k,children:j||M?o(i,{children:[j&&f(A,F,g,v,y,b),o(`div`,{className:`alert-content`,children:[N,p]}),M&&a(`div`,{className:`alert-action`,children:D})]}):o(i,{children:[N,p]})})}export{p as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{Alert as i}from"react-bootstrap";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c={info:`info`,success:`check`,warning:`alert-triangle`,danger:`x`},l=[`info`,`success`,`warning`,`danger`],u=[`sm`,`md`,`lg`],d=[`alert`,`status`,`none`],f=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`];function p(e,t,n,i,a,s){return i?o(`span`,{className:`alert-icon alert-icon-image`,style:s>0?{width:s,height:s}:void 0,children:o(`img`,{src:i,alt:a})}):e?typeof e==`string`?o(`span`,{className:`alert-icon`,children:o(r,{name:e,size:t,variant:n})}):o(`span`,{className:`alert-icon`,children:e}):null}function m(r){let{variant:m=`info`,children:h,title:g,icon:_,iconVariant:v,iconSize:y,image:b,imageAlt:x=``,imageSize:S,className:C=``,onClose:w,dismissible:T,bordered:E=!0,accent:D=!1,size:O=`md`,action:k,role:A=`alert`,...j}=r;n(`AppAlert`,j),t(`AppAlert`,`variant`,m,l),t(`AppAlert`,`size`,O,u),t(`AppAlert`,`role`,A,d),t(`AppAlert`,`iconVariant`,v,f);let M=_===void 0?c[m]:_===`none`?null:_,N=!!b||!!M,P=k!=null&&k!==!1,F=g?o(`div`,{className:`alert-heading`,children:g}):null,I=N&&!!F&&!!h,L=y>0?y:O===`lg`?I?17:15:I?13:11;return o(i,{variant:m,className:[N?`alert-has-icon`:``,P?`alert-has-action`:``,I?`alert-stack`:``,E?``:`alert-borderless`,D?`alert-accent`:``,O===`sm`?`alert-sm`:``,O===`lg`?`alert-lg`:``,C].filter(Boolean).join(` `)||void 0,onClose:w,dismissible:T??typeof w==`function`,transition:!1,role:A===`none`?void 0:A,...e(`AppAlert`,r),...j,children:N||P?s(a,{children:[N&&p(M,L,v,b,x,S),s(`div`,{className:`alert-content`,children:[F,h]}),P&&o(`div`,{className:`alert-action`,children:k})]}):s(a,{children:[F,h]})})}export{m as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./AppButton.js";import n from"./AppEmptyState.js";import r from"./AppProgress.js";import{jsx as i}from"react/jsx-runtime";function a({loading:a=!1,error:o=null,empty:s=!1,children:c,onRetry:l,skeleton:u,className:d=``,...f}){e(`AppAsyncBlock`,f);let p=`async-block${d?` ${d}`:``}`;return a?i(`div`,{className:p,"data-state":`loading`,...f,children:u??i(r,{value:0,indeterminate:!0,size:`sm`,label:`Loading`})}):o?i(`div`,{className:p,"data-state":`error`,...f,children:i(n,{icon:`alert-circle`,title:`Something went wrong`,text:o,action:l?i(t,{variant:`secondary`,onClick:l,children:`Retry`}):null})}):s?i(`div`,{className:p,"data-state":`empty`,...f,children:i(n,{icon:`inbox`,title:`Nothing to show yet`})}):i(`div`,{className:p,"data-state":`content`,...f,children:c})}export{a as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppButton.js";import r from"./AppEmptyState.js";import i from"./AppProgress.js";import{jsx as a}from"react/jsx-runtime";function o(o){let{loading:s=!1,error:c=null,empty:l=!1,children:u,onRetry:d,skeleton:f,className:p=``,...m}=o;t(`AppAsyncBlock`,m);let h=`async-block${p?` ${p}`:``}`;return s?a(`div`,{className:h,"data-state":`loading`,...e(`AppAsyncBlock`,o),...m,children:f??a(i,{value:0,indeterminate:!0,size:`sm`,label:`Loading`})}):c?a(`div`,{className:h,"data-state":`error`,...e(`AppAsyncBlock`,o),...m,children:a(r,{icon:`alert-circle`,title:`Something went wrong`,text:c,action:d?a(n,{variant:`secondary`,onClick:d,children:`Retry`}):null})}):l?a(`div`,{className:h,"data-state":`empty`,...e(`AppAsyncBlock`,o),...m,children:a(r,{icon:`inbox`,title:`Nothing to show yet`})}):a(`div`,{className:h,"data-state":`content`,...e(`AppAsyncBlock`,o),...m,children:u})}export{o as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"../lib/FieldMessage.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import a from"./useNodeLabels.js";import o,{optionsEqual as s}from"./useWuiControl.js";import{forwardRef as c,useEffect as l,useId as u,useRef as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import"@webority/ui-elements/elements/autocomplete";var m=[`sm`,`lg`],h=[],g=(e,t)=>({...e,label:t}),_=(e,t,n)=>{if(n==null||t==null||t===``)return e;let r=String(t);return e.some(e=>String(e.value)===r)?e:[...e,{value:r,label:n}]},v=c(function({value:c,onChange:v,options:y,valueLabel:b,loadOptions:x,placeholder:S=`Search…`,minChars:C,debounce:w,disabled:T=!1,size:E,allowCustom:D=!1,name:O,id:k,label:A,error:j,hint:M,required:N=!1,help:P,helpLabel:F=`More information`,fieldClassName:I=``,...L},R){t(`AppAutocomplete`,L),e(`AppAutocomplete`,`size`,E,m);let z=typeof x==`function`,B=u(),V=k||B,{setRef:H,innerRef:U}=o({ref:R,value:c??``,on:{change:e=>v?.(e.currentTarget.value,{isCustom:!!e.detail?.isCustom})}}),W=y||h,{portal:G,toElementOptions:K}=a(W),q=d(!1);return l(()=>{let e=U.current;if(!e||z&&q.current)return;let t=K(_(W,c,b),g);s(t,e.options)||(e.options=t)},[W,z,U,K,c,b]),l(()=>{let e=U.current;if(!e||!z||!q.current)return;let t=e.options,n=_(t,c,b);n!==t&&(e.options=n)},[c,b,z,U]),l(()=>{let e=U.current;if(!e||!z)return;let t=0,n=null,r=async r=>{let i=++t;n?.abort(),n=typeof AbortController==`function`?new AbortController:null,e.loading=!0;try{let a=await x(r.detail.query,{signal:n?.signal});i===t&&(q.current=!0,e.options=a||[])}catch{i===t&&(q.current=!0,e.options=[])}finally{i===t&&(e.loading=!1)}};return e.addEventListener(`search`,r),()=>{t=-1,n?.abort(),e.removeEventListener(`search`,r),e.loading=!1}},[z,x,U]),p(`div`,{className:`field${I?` ${I}`:``}`,children:[A&&p(`label`,{className:`label`,htmlFor:V,children:[A,N&&f(i,{}),P&&f(r,{label:F,children:P})]}),f(`wui-autocomplete`,{"aria-label":typeof A==`string`?A:void 0,"aria-describedby":j?`${V}-error`:M?`${V}-hint`:void 0,"aria-invalid":j?`true`:void 0,id:V,ref:H,name:O,placeholder:S,remote:z?``:void 0,"min-chars":C==null?void 0:String(C),debounce:w==null?void 0:String(w),size:E||void 0,"allow-custom":D?``:void 0,disabled:T?``:void 0,required:N?``:void 0,...L}),G,f(n,{error:j,hint:M,errorId:`${V}-error`,hintId:`${V}-hint`})]})});export{v as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o from"./useNodeLabels.js";import s,{optionsEqual as c}from"./useWuiControl.js";import{forwardRef as l,useEffect as u,useId as d,useRef as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import"@webority/ui-elements/elements/autocomplete";var h=[`sm`,`lg`],g=[],_=(e,t)=>({...e,label:t}),v=(e,t,n)=>{if(n==null||t==null||t===``)return e;let r=String(t);return e.some(e=>String(e.value)===r)?e:[...e,{value:r,label:n}]},y=l(function(l,y){let{value:b,onChange:x,options:S,valueLabel:C,loadOptions:w,placeholder:T=`Search…`,minChars:E,debounce:D,disabled:O=!1,size:k,allowCustom:A=!1,name:j,id:M,label:N,error:P,hint:F,required:I=!1,help:L,helpLabel:R=`More information`,fieldClassName:z=``,...B}=l;n(`AppAutocomplete`,B),t(`AppAutocomplete`,`size`,k,h);let V=typeof w==`function`,H=d(),U=M||H,{setRef:W,innerRef:G}=s({ref:y,value:b??``,on:{change:e=>x?.(e.currentTarget.value,{isCustom:!!e.detail?.isCustom})}}),K=S||g,{portal:q,toElementOptions:J}=o(K),Y=f(!1);return u(()=>{let e=G.current;if(!e||V&&Y.current)return;let t=J(v(K,b,C),_);c(t,e.options)||(e.options=t)},[K,V,G,J,b,C]),u(()=>{let e=G.current;if(!e||!V||!Y.current)return;let t=e.options,n=v(t,b,C);n!==t&&(e.options=n)},[b,C,V,G]),u(()=>{let e=G.current;if(!e||!V)return;let t=0,n=null,r=async r=>{let i=++t;n?.abort(),n=typeof AbortController==`function`?new AbortController:null,e.loading=!0;try{let a=await w(r.detail.query,{signal:n?.signal});i===t&&(Y.current=!0,e.options=a||[])}catch{i===t&&(Y.current=!0,e.options=[])}finally{i===t&&(e.loading=!1)}};return e.addEventListener(`search`,r),()=>{t=-1,n?.abort(),e.removeEventListener(`search`,r),e.loading=!1}},[V,w,G]),m(`div`,{...e(`AppAutocomplete`,l),className:`field${z?` ${z}`:``}`,children:[N&&m(`label`,{className:`label`,htmlFor:U,children:[N,I&&p(a,{}),L&&p(i,{label:R,children:L})]}),p(`wui-autocomplete`,{"aria-label":typeof N==`string`?N:void 0,"aria-describedby":P?`${U}-error`:F?`${U}-hint`:void 0,"aria-invalid":P?`true`:void 0,id:U,ref:W,name:j,placeholder:T,remote:V?``:void 0,"min-chars":E==null?void 0:String(E),debounce:D==null?void 0:String(D),size:k||void 0,"allow-custom":A?``:void 0,disabled:O?``:void 0,required:I?``:void 0,...B}),q,p(r,{error:P,hint:F,errorId:`${U}-error`,hintId:`${U}-hint`})]})});export{y as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./withTooltip.js";import r from"./renderIconProp.js";import{initialsOf as i}from"../lib/initials.js";import{useEffect as a,useState as o}from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";var u=[`circle`,`rounded`,`square`],d=[`primary`,`neutral`,`success`,`warning`,`danger`,`info`,`auto`],f=[`none`,`online`,`offline`,`away`,`busy`],p=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],m=new Set([`xs`,`sm`,`md`,`lg`,`xl`,`2xl`]),h={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function g(e){return i(e)||`?`}function _(e){let t=e||``,n=0;for(let e=0;e<t.length;e+=1)n=Math.imul(n,31)+t.charCodeAt(e)>>>0;return n%360}function v(e){if(typeof e==`number`)return e;if(h[e]!=null)return h[e];let t=Number.parseInt(e,10);return Number.isNaN(t)?32:t}function y({name:i,src:h,size:y=`md`,shape:b=`circle`,tone:x=`primary`,status:S=`none`,ring:C=!1,label:w,icon:T,iconVariant:E,badge:D,href:O,onClick:k,linkComponent:A,tooltip:j,tooltipPlacement:M,className:N=``,...P}){t(`AppAvatar`,P),e(`AppAvatar`,`shape`,b,u),e(`AppAvatar`,`tone`,x,d),e(`AppAvatar`,`status`,S,f),e(`AppAvatar`,`iconVariant`,E,p);let{style:F,...I}=P,[L,R]=o(!1);a(()=>{R(!1)},[h]);let z=typeof y==`string`&&m.has(y),B=z?null:typeof y==`number`||/^\d+$/.test(y)?`${y}px`:y,V=O!=null||k!=null,H=h!=null&&h!==``&&!L,U=[`avatar`,z&&y!==`md`?`avatar-${y}`:``,b===`circle`?``:`avatar-${b}`,x===`primary`?``:`avatar-${x}`,C?`avatar-ring`:``,V?`avatar-clickable`:``,N].filter(Boolean).join(` `),W={};B&&(W[`--avatar-size`]=B),x===`auto`&&(W[`--avatar-hue`]=_(i));let G=Object.keys(W).length||F?{...W,...F}:void 0,K=c(`span`,{className:`avatar-face`,"aria-hidden":`true`,children:T!=null&&T!==!1&&T!==``?r(T,{size:Math.round(v(y)*.55),variant:E}):g(i)}),q=l(s,{children:[S!==`none`&&c(`span`,{className:`avatar-status avatar-status-${S}`,"aria-hidden":`true`}),D!=null&&c(`span`,{className:`avatar-badge`,children:D}),w!=null&&c(`span`,{className:`avatar-label`,"aria-hidden":`true`,children:w})]}),J=l(s,{children:[K,H&&c(`img`,{className:`avatar-img`,src:h,alt:V?``:i||`Profile photo`,onError:()=>R(!0)}),q]});if(O!=null){let e=A||`a`,t=A?{to:O}:{href:O};return n(c(e,{className:U,style:G,...I,"aria-label":w||i,...t,onClick:k,children:J}),j,M)}if(k!=null)return n(c(`button`,{type:`button`,className:U,style:G,...I,"aria-label":w||i,onClick:k,children:J}),j,M);if(H)return n(c(`span`,{className:U,style:G,...I,children:J}),j,M);let Y=w?.trim()||i?.trim();return n(Y?c(`span`,{className:U,style:G,...I,role:`img`,"aria-label":Y,children:J}):c(`span`,{className:U,style:G,...I,"aria-hidden":`true`,children:J}),j,M)}export{y as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./withTooltip.js";import i from"./renderIconProp.js";import{initialsOf as a}from"../lib/initials.js";import{useEffect as o,useState as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`circle`,`rounded`,`square`],f=[`primary`,`neutral`,`success`,`warning`,`danger`,`info`,`auto`],p=[`none`,`online`,`offline`,`away`,`busy`],m=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],h=new Set([`xs`,`sm`,`md`,`lg`,`xl`,`2xl`]),g={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function _(e){return a(e)||`?`}function v(e){let t=e||``,n=0;for(let e=0;e<t.length;e+=1)n=Math.imul(n,31)+t.charCodeAt(e)>>>0;return n%360}function y(e){if(typeof e==`number`)return e;if(g[e]!=null)return g[e];let t=Number.parseInt(e,10);return Number.isNaN(t)?32:t}function b(a){let{name:g,src:b,size:x=`md`,shape:S=`circle`,tone:C=`primary`,status:w=`none`,ring:T=!1,label:E,icon:D,iconVariant:O,badge:k,href:A,onClick:j,linkComponent:M,tooltip:N,tooltipPlacement:P,className:F=``,...I}=a;n(`AppAvatar`,I),t(`AppAvatar`,`shape`,S,d),t(`AppAvatar`,`tone`,C,f),t(`AppAvatar`,`status`,w,p),t(`AppAvatar`,`iconVariant`,O,m);let{style:L,...R}=I,[z,B]=s(!1);o(()=>{B(!1)},[b]);let V=typeof x==`string`&&h.has(x),H=V?null:typeof x==`number`||/^\d+$/.test(x)?`${x}px`:x,U=A!=null||j!=null,W=b!=null&&b!==``&&!z,G=[`avatar`,V&&x!==`md`?`avatar-${x}`:``,S===`circle`?``:`avatar-${S}`,C===`primary`?``:`avatar-${C}`,T?`avatar-ring`:``,U?`avatar-clickable`:``,F].filter(Boolean).join(` `),K={};H&&(K[`--avatar-size`]=H),C===`auto`&&(K[`--avatar-hue`]=v(g));let q=Object.keys(K).length||L?{...K,...L}:void 0,J=l(`span`,{className:`avatar-face`,"aria-hidden":`true`,children:D!=null&&D!==!1&&D!==``?i(D,{size:Math.round(y(x)*.55),variant:O}):_(g)}),Y=u(c,{children:[w!==`none`&&l(`span`,{className:`avatar-status avatar-status-${w}`,"aria-hidden":`true`}),k!=null&&l(`span`,{className:`avatar-badge`,children:k}),E!=null&&l(`span`,{className:`avatar-label`,"aria-hidden":`true`,children:E})]}),X=u(c,{children:[J,W&&l(`img`,{className:`avatar-img`,src:b,alt:U?``:g||`Profile photo`,onError:()=>B(!0)}),Y]});if(A!=null){let t=M||`a`,n=M?{to:A}:{href:A};return r(l(t,{className:G,style:q,...e(`AppAvatar`,a),...R,"aria-label":E||g,...n,onClick:j,children:X}),N,P)}if(j!=null)return r(l(`button`,{type:`button`,className:G,style:q,...e(`AppAvatar`,a),...R,"aria-label":E||g,onClick:j,children:X}),N,P);if(W)return r(l(`span`,{className:G,style:q,...e(`AppAvatar`,a),...R,children:X}),N,P);let Z=E?.trim()||g?.trim();return r(Z?l(`span`,{className:G,style:q,...e(`AppAvatar`,a),...R,role:`img`,"aria-label":Z,children:X}):l(`span`,{className:G,style:q,...e(`AppAvatar`,a),...R,"aria-hidden":`true`,children:X}),N,P)}export{b as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{jsxs as n}from"react/jsx-runtime";var r=[`tight`,`normal`,`loose`],i={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function a(e){return e==null?null:typeof e==`number`?`${e}px`:i[e]==null?/^\d+$/.test(e)?`${e}px`:e:`${i[e]}px`}function o({children:i,size:o,spacing:s=`normal`,overflow:c,className:l=``,...u}){t(`AppAvatarGroup`,u),e(`AppAvatarGroup`,`spacing`,s,r);let{style:d,...f}=u,p=[`avatar-group`,s===`normal`?``:`avatar-group-${s}`,l].filter(Boolean).join(` `),m=a(o),h=m?{"--avatar-size":m,...d}:d,g=typeof c==`string`?Number.parseInt(c,10):c;return n(`div`,{className:p,style:h,...f,children:[i,g>0&&n(`span`,{className:`avatar avatar-more`,role:`img`,"aria-label":`${g} more`,children:[`+`,g]})]})}export{o as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsxs as r}from"react/jsx-runtime";var i=[`tight`,`normal`,`loose`],a={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function o(e){return e==null?null:typeof e==`number`?`${e}px`:a[e]==null?/^\d+$/.test(e)?`${e}px`:e:`${a[e]}px`}function s(a){let{children:s,size:c,spacing:l=`normal`,overflow:u,className:d=``,...f}=a;n(`AppAvatarGroup`,f),t(`AppAvatarGroup`,`spacing`,l,i);let{style:p,...m}=f,h=[`avatar-group`,l===`normal`?``:`avatar-group-${l}`,d].filter(Boolean).join(` `),g=o(c),_=g?{"--avatar-size":g,...p}:p,v=typeof u==`string`?Number.parseInt(u,10):u;return r(`div`,{className:h,style:_,...e(`AppAvatarGroup`,a),...m,children:[s,v>0&&r(`span`,{className:`avatar avatar-more`,role:`img`,"aria-label":`${v} more`,children:[`+`,v]})]})}export{s as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import r from"./AppAlert.js";import i from"./AppButton.js";import ee from"../lib/FieldMessage.js";import te from"./AppRequiredMark.js";import ne from"./AppModal.js";import{AVATAR_ACCEPT as re,AVATAR_MAX_SIZE_MB as ie,AVATAR_OUTPUT_SIZE as ae,AVATAR_PREVIEW_SIZES as a,AVATAR_TEXT as o,avatarCropOptions as oe,avatarUnreadableMessage as se,validateFile as ce}from"@webority/ui-elements/helpers";import{useCallback as le,useEffect as s,useId as ue,useRef as c,useState as l}from"react";import{Fragment as de,jsx as u,jsxs as d}from"react/jsx-runtime";import"@webority/ui-elements/elements/image-crop";var f={sm:64,md:96,lg:128},fe=a.join(` `);function p({value:a,initials:p,onPick:pe,onRemove:m,name:h,removeName:g,accept:_=re,maxSizeMb:me=ie,outputSize:he=ae,size:v=`md`,label:y,hint:b,error:ge,required:_e=!1,loading:x=!1,disabled:ve=!1,ariaLabel:ye,className:S=``,fieldClassName:C=``,style:be,...w}){t(`AppAvatarPicker`,w),e(`AppAvatarPicker`,`size`,typeof v==`string`?v:null,Object.keys(f));let T=ue(),E=c(null),D=c(null),O=c(null),[k,A]=l(null),[j,M]=l(!1),[xe,N]=l(!1),[Se,P]=l(``),[F,I]=l(!1),[L,R]=l(null),[z,B]=l(`loading`),[V,H]=l(``),[U,W]=l(!1),Ce=le(e=>{if(O.current=e,!e)return;let t=()=>{B(`ready`),e.querySelector(`.wui-crop-stage`)?.focus()},n=()=>B(`error`);return e.addEventListener(`load`,t),e.addEventListener(`error`,n),()=>{e.removeEventListener(`load`,t),e.removeEventListener(`error`,n),O.current=null}},[]);s(()=>()=>L&&URL.revokeObjectURL(L.url),[L]),s(()=>()=>k&&URL.revokeObjectURL(k),[k]),s(()=>{A(null),M(!1),N(!1)},[a]);let G=x||ve,K=j?null:k||(a&&!xe?a:null),q=!!K,we=!G&&q&&!!(m||g),J=ge||Se,Y=b&&!J?`${T}-hint`:void 0,X=J?`${T}-error`:void 0,Z=X||Y,Q=q?o.change:o.choose,$=typeof v==`number`?v:f[v]??f.md,Te=()=>{G||E.current?.click()},Ee=()=>{G||D.current?.click()},De=e=>{let t=ce(e,{accept:_,maxSizeMb:me});if(t){P(t);return}P(``),B(`loading`),H(``),R({file:e,url:URL.createObjectURL(e)})},Oe=e=>{let t=e.target.files?.[0];e.target.value=``,t&&De(t)},ke=e=>{if(e.preventDefault(),I(!1),G)return;let t=e.dataTransfer?.files?.[0];t&&De(t)},Ae=e=>{if(h&&E.current&&typeof DataTransfer==`function`){let t=new DataTransfer;t.items.add(e),E.current.files=t.files}M(!1),N(!1),A(URL.createObjectURL(e)),pe(e)},je=async()=>{let{file:e}=L;W(!0),H(``);let t=null;try{t=await O.current?.toFile(oe(e,he))}catch{t=null}if(W(!1),!t){H(o.cropFailed);return}R(null),Ae(t)},Me=()=>{U||R(null)},Ne=()=>{A(null),M(!0),P(``),E.current&&(E.current.value=``),m?.()};return d(`div`,{className:`field wui-avatar-picker-field${C?` ${C}`:``}`,children:[y&&d(`label`,{className:`label`,htmlFor:T,children:[y,_e&&u(te,{})]}),d(`div`,{className:`wui-avatar-picker${F?` is-dragging`:``}${S?` ${S}`:``}`,style:{"--wui-avatar-size":`${$}px`,...be},onDragOver:e=>{e.preventDefault(),!G&&!F&&I(!0)},onDragLeave:()=>I(!1),onDrop:ke,children:[d(`button`,{type:`button`,className:`wui-avatar-picker-face`,tabIndex:-1,"aria-label":ye||Q,"aria-describedby":Z,"aria-busy":x||void 0,disabled:G,onClick:Te,...w,children:[K?u(`img`,{className:`wui-avatar-picker-img`,src:K,alt:``,onError:()=>N(!0)}):u(`span`,{className:`wui-avatar-picker-placeholder`,"aria-hidden":`true`,children:p||u(n,{name:`user`,size:Math.round($*.5)})}),u(`span`,{className:`wui-avatar-picker-badge`,"aria-hidden":`true`,children:x?u(n,{name:`refresh-cw`,size:14,className:`wui-spin`}):u(n,{name:`camera`,size:14})})]}),d(`div`,{className:`wui-avatar-picker-actions`,children:[u(`button`,{type:`button`,className:`btn btn-secondary btn-sm`,disabled:G,"aria-describedby":Z,onClick:Te,children:Q}),d(`button`,{type:`button`,className:`btn btn-secondary btn-sm wui-avatar-picker-camera`,disabled:G,onClick:Ee,children:[u(n,{name:`camera`,size:16}),o.camera]}),u(`button`,{type:`button`,className:`btn btn-secondary-danger btn-sm`,hidden:!we,onClick:Ne,children:o.remove})]}),u(`input`,{id:T,ref:E,type:`file`,name:h,hidden:!0,accept:_,disabled:G,onChange:Oe}),u(`input`,{ref:D,type:`file`,hidden:!0,accept:`image/*`,capture:`user`,disabled:G,onChange:Oe}),g&&u(`input`,{type:`hidden`,name:g,value:`true`,disabled:!j})]}),u(ee,{error:J,hint:b,errorId:X,hintId:Y}),d(ne,{open:!!L,title:o.dialogTitle,subtitle:o.dialogSubtitle,dismissible:!U,staticBackdrop:U,onClose:Me,footer:d(de,{children:[u(i,{type:`button`,variant:`secondary`,disabled:U,onClick:Me,children:o.cancel}),u(i,{type:`button`,variant:`primary`,loading:U,disabled:z!==`ready`,onClick:je,children:o.save})]}),children:[z===`error`&&L&&u(r,{variant:`danger`,children:se(L.file)}),V&&u(r,{variant:`danger`,children:V}),L&&z!==`error`&&u(`wui-image-crop`,{ref:Ce,src:L.url,aspect:`1`,round:!0,rotatable:!0,previews:fe})]})]})}export{p as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"./AppAlert.js";import a from"./AppButton.js";import ee from"../lib/FieldMessage.js";import te from"./AppRequiredMark.js";import ne from"./AppModal.js";import{AVATAR_ACCEPT as re,AVATAR_MAX_SIZE_MB as ie,AVATAR_OUTPUT_SIZE as ae,AVATAR_PREVIEW_SIZES as o,AVATAR_TEXT as s,avatarCropOptions as oe,avatarUnreadableMessage as se,validateFile as ce}from"@webority/ui-elements/helpers";import{useCallback as le,useEffect as c,useId as ue,useRef as l,useState as u}from"react";import{Fragment as de,jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/image-crop";var p={sm:64,md:96,lg:128},fe=o.join(` `);function m(o){let{value:m,initials:pe,onPick:me,onRemove:h,name:g,removeName:_,accept:v=re,maxSizeMb:he=ie,outputSize:ge=ae,size:y=`md`,label:b,hint:x,error:_e,required:ve=!1,loading:S=!1,disabled:ye=!1,ariaLabel:be,className:C=``,fieldClassName:w=``,style:xe,...T}=o;n(`AppAvatarPicker`,T),t(`AppAvatarPicker`,`size`,typeof y==`string`?y:null,Object.keys(p));let E=ue(),D=l(null),O=l(null),k=l(null),[A,j]=u(null),[M,N]=u(!1),[Se,P]=u(!1),[Ce,F]=u(``),[I,L]=u(!1),[R,z]=u(null),[B,V]=u(`loading`),[H,U]=u(``),[W,G]=u(!1),we=le(e=>{if(k.current=e,!e)return;let t=()=>{V(`ready`),e.querySelector(`.wui-crop-stage`)?.focus()},n=()=>V(`error`);return e.addEventListener(`load`,t),e.addEventListener(`error`,n),()=>{e.removeEventListener(`load`,t),e.removeEventListener(`error`,n),k.current=null}},[]);c(()=>()=>R&&URL.revokeObjectURL(R.url),[R]),c(()=>()=>A&&URL.revokeObjectURL(A),[A]),c(()=>{j(null),N(!1),P(!1)},[m]);let K=S||ye,q=M?null:A||(m&&!Se?m:null),J=!!q,Te=!K&&J&&!!(h||_),Y=_e||Ce,X=x&&!Y?`${E}-hint`:void 0,Z=Y?`${E}-error`:void 0,Ee=Z||X,De=J?s.change:s.choose,Oe=typeof y==`number`?y:p[y]??p.md,Q=()=>{K||D.current?.click()},ke=()=>{K||O.current?.click()},Ae=e=>{let t=ce(e,{accept:v,maxSizeMb:he});if(t){F(t);return}F(``),V(`loading`),U(``),z({file:e,url:URL.createObjectURL(e)})},je=e=>{let t=e.target.files?.[0];e.target.value=``,t&&Ae(t)},Me=e=>{if(e.preventDefault(),L(!1),K)return;let t=e.dataTransfer?.files?.[0];t&&Ae(t)},Ne=e=>{if(g&&D.current&&typeof DataTransfer==`function`){let t=new DataTransfer;t.items.add(e),D.current.files=t.files}N(!1),P(!1),j(URL.createObjectURL(e)),me(e)},Pe=async()=>{let{file:e}=R;G(!0),U(``);let t=null;try{t=await k.current?.toFile(oe(e,ge))}catch{t=null}if(G(!1),!t){U(s.cropFailed);return}z(null),Ne(t)},$=()=>{W||z(null)},Fe=()=>{j(null),N(!0),F(``),D.current&&(D.current.value=``),h?.()};return f(`div`,{...e(`AppAvatarPicker`,o),className:`field wui-avatar-picker-field${w?` ${w}`:``}`,children:[b&&f(`label`,{className:`label`,htmlFor:E,children:[b,ve&&d(te,{})]}),f(`div`,{className:`wui-avatar-picker${I?` is-dragging`:``}${C?` ${C}`:``}`,style:{"--wui-avatar-size":`${Oe}px`,...xe},onDragOver:e=>{e.preventDefault(),!K&&!I&&L(!0)},onDragLeave:()=>L(!1),onDrop:Me,children:[f(`button`,{type:`button`,className:`wui-avatar-picker-face`,tabIndex:-1,"aria-label":be||De,"aria-describedby":Ee,"aria-busy":S||void 0,disabled:K,onClick:Q,...T,children:[q?d(`img`,{className:`wui-avatar-picker-img`,src:q,alt:``,onError:()=>P(!0)}):d(`span`,{className:`wui-avatar-picker-placeholder`,"aria-hidden":`true`,children:pe||d(r,{name:`user`,size:Math.round(Oe*.5)})}),d(`span`,{className:`wui-avatar-picker-badge`,"aria-hidden":`true`,children:S?d(r,{name:`refresh-cw`,size:14,className:`wui-spin`}):d(r,{name:`camera`,size:14})})]}),f(`div`,{className:`wui-avatar-picker-actions`,children:[d(`button`,{type:`button`,className:`btn btn-secondary btn-sm`,disabled:K,"aria-describedby":Ee,onClick:Q,children:De}),f(`button`,{type:`button`,className:`btn btn-secondary btn-sm wui-avatar-picker-camera`,disabled:K,onClick:ke,children:[d(r,{name:`camera`,size:16}),s.camera]}),d(`button`,{type:`button`,className:`btn btn-secondary-danger btn-sm`,hidden:!Te,onClick:Fe,children:s.remove})]}),d(`input`,{id:E,ref:D,type:`file`,name:g,hidden:!0,accept:v,disabled:K,onChange:je}),d(`input`,{ref:O,type:`file`,hidden:!0,accept:`image/*`,capture:`user`,disabled:K,onChange:je}),_&&d(`input`,{type:`hidden`,name:_,value:`true`,disabled:!M})]}),d(ee,{error:Y,hint:x,errorId:Z,hintId:X}),f(ne,{open:!!R,title:s.dialogTitle,subtitle:s.dialogSubtitle,dismissible:!W,staticBackdrop:W,onClose:$,footer:f(de,{children:[d(a,{type:`button`,variant:`secondary`,disabled:W,onClick:$,children:s.cancel}),d(a,{type:`button`,variant:`primary`,loading:W,disabled:B!==`ready`,onClick:Pe,children:s.save})]}),children:[B===`error`&&R&&d(i,{variant:`danger`,children:se(R.file)}),H&&d(i,{variant:`danger`,children:H}),R&&B!==`error`&&d(`wui-image-crop`,{ref:we,src:R.url,aspect:`1`,round:!0,rotatable:!0,previews:fe})]})]})}export{m as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./withTooltip.js";import{Badge as r}from"react-bootstrap";import{jsx as i}from"react/jsx-runtime";var a=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function o({children:o,tone:s,dot:c=!1,tooltip:l,tooltipPlacement:u,className:d=``,...f}){return t(`AppBadge`,f),e(`AppBadge`,`tone`,s,a),n(i(r,{bg:!1,className:[s&&s!==`neutral`?`badge-${s}`:``,c?`badge-dot`:``,d].filter(Boolean).join(` `)||void 0,...f,children:o}),l,u)}export{o as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./withTooltip.js";import{Badge as i}from"react-bootstrap";import{jsx as a}from"react/jsx-runtime";var o=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function s(s){let{children:c,tone:l,dot:u=!1,tooltip:d,tooltipPlacement:f,className:p=``,...m}=s;return n(`AppBadge`,m),t(`AppBadge`,`tone`,l,o),r(a(i,{bg:!1,className:[l&&l!==`neutral`?`badge-${l}`:``,u?`badge-dot`:``,p].filter(Boolean).join(` `)||void 0,...e(`AppBadge`,s),...m,children:c}),d,f)}export{s as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import r from"./renderIconProp.js";import{useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`info`,`success`,`warning`,`danger`,`neutral`];function c({tone:c=`info`,icon:l,children:u,dismissible:d=!1,onDismiss:f,className:p=``,...m}){t(`AppBanner`,m),e(`AppBanner`,`tone`,c,s);let[h,g]=i(!0);if(!h)return null;let _=s.includes(c)?c:`info`,v=()=>{g(!1),f?.()};return o(`div`,{className:`wui-banner wui-banner-${_}${p?` ${p}`:``}`,role:`status`,...m,children:[l&&a(`span`,{className:`wui-banner-icon`,children:r(l,{size:18})}),a(`div`,{className:`wui-banner-body`,children:u}),d&&a(`button`,{type:`button`,className:`wui-banner-dismiss`,"aria-label":`Dismiss`,onClick:v,children:a(n,{name:`x`,size:18})})]})}export{c as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"./renderIconProp.js";import{useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`info`,`success`,`warning`,`danger`,`neutral`];function l(l){let{tone:u=`info`,icon:d,children:f,dismissible:p=!1,onDismiss:m,className:h=``,...g}=l;n(`AppBanner`,g),t(`AppBanner`,`tone`,u,c);let[_,v]=a(!0);if(!_)return null;let y=c.includes(u)?u:`info`,b=()=>{v(!1),m?.()};return s(`div`,{className:`wui-banner wui-banner-${y}${h?` ${h}`:``}`,role:`status`,...e(`AppBanner`,l),...g,children:[d&&o(`span`,{className:`wui-banner-icon`,children:i(d,{size:18})}),o(`div`,{className:`wui-banner-body`,children:f}),p&&o(`button`,{type:`button`,className:`wui-banner-dismiss`,"aria-label":`Dismiss`,onClick:b,children:o(r,{name:`x`,size:18})})]})}export{l as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./renderIconProp.js";import{createContext as n,useContext as r}from"react";import{Breadcrumb as i}from"react-bootstrap";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=n(!1);function c({items:n=[],linkComponent:c,className:l=``,...u}){e(`AppBreadcrumbs`,u);let d=r(s);return a(i,{className:l||void 0,...u,children:n.map((e,r)=>{let a=!d&&r===n.length-1,s=e.icon?t(e.icon,{size:14}):null,l={};return a||(l=e.to&&c?{linkAs:c,linkProps:{to:e.to}}:e.to||e.href?{href:e.to||e.href}:{linkAs:`span`}),o(i.Item,{active:a,...l,children:[s,e.label]},e.key??`${e.label}-${r}`)})})}export{s as BreadcrumbTrailContext,c as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.js";import{createContext as r,useContext as i}from"react";import{Breadcrumb as a}from"react-bootstrap";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=r(!1);function l(r){let{items:l=[],linkComponent:u,className:d=``,...f}=r;t(`AppBreadcrumbs`,f);let p=i(c);return o(a,{className:d||void 0,...e(`AppBreadcrumbs`,r),...f,children:l.map((e,t)=>{let r=!p&&t===l.length-1,i=e.icon?n(e.icon,{size:14}):null,o={};return r||(o=e.to&&u?{linkAs:u,linkProps:{to:e.to}}:e.to||e.href?{href:e.to||e.href}:{linkAs:`span`}),s(a.Item,{active:r,...o,children:[i,e.label]},e.key??`${e.label}-${t}`)})})}export{c as BreadcrumbTrailContext,l as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{shortcutAria as n,shortcutChip as r}from"../lib/shortcutChip.js";import i from"./withTooltip.js";import a from"./AppIcon.js";import o from"./warnDeprecatedValue.js";import{Button as s}from"react-bootstrap";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u={primary:`primary`,secondary:`secondary`,outline:`outline-primary`,ghost:`ghost`,text:`text`,danger:`danger`,success:`success`,"secondary-danger":`secondary-danger`,"outline-danger":`outline-danger`,light:`light`,warning:`warning`,neutral:`neutral`,"outline-light":`outline-light`,"outline-secondary":`outline-secondary`},d={subtle:{use:`neutral`,removeIn:`0.79.0`}};function f(e){return`btn-${u[d[e]?.use??e]??`primary`}`}var p={sm:14,md:16,lg:20},m=[`sheen`,`fill`,`expand`,`glow`,`roll`,`none`],h=[`rounded`,`pill`,`sharp`],g=[`button`,`submit`,`reset`],_=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],v=e=>e===`pill`||e===`sharp`?`wui-btn-shape-${e}`:``;function y(e){return l(`span`,{className:`wui-btn-roll`,children:[c(`span`,{className:`wui-btn-roll__a`,children:e}),c(`span`,{className:`wui-btn-roll__b`,"aria-hidden":`true`,children:e})]})}function b(e,t,n,r){if(!e)return null;let i=n=>typeof e==`string`?c(a,{name:e,size:p[t]??p.md,variant:r,className:n}):c(`span`,{className:[`d-inline-flex`,n].filter(Boolean).join(` `),children:e});return l(`span`,{className:n?`wui-btn-roll-ico wui-btn-pin-icon`:`wui-btn-roll-ico ms-2`,"aria-hidden":`true`,children:[i(),i(`wui-btn-roll-ico__next`)]})}function x(e,t,n,r){if(!e)return null;let i=t===`left`?`me-2`:`ms-2`;return typeof e==`string`?c(a,{name:e,size:p[n]??p.md,variant:r,className:i}):c(`span`,{className:`d-inline-flex ${i}`,children:e})}function S(e,t,n){return e?c(`span`,{className:`wui-btn-pin-icon`,"aria-hidden":`true`,children:typeof e==`string`?c(a,{name:e,size:p[t]??p.md,variant:n}):e}):null}function C({children:a,variant:f=`primary`,size:C=`md`,type:w=`button`,loading:T=!1,disabled:E=!1,block:D=!1,leftIcon:O=null,rightIcon:k=null,href:A,static:j=!1,tooltip:M,tooltipPlacement:N,shortcut:P,animation:F,pinRightIcon:I=!1,shape:L=`rounded`,iconVariant:R,className:z=``,...B}){t(`AppButton`,B),F!==void 0&&e(`AppButton`,`animation`,F,m);let V=F===`roll`&&!j,H=I&&k!=null&&k!==``&&!j&&!T;o(`AppButton`,`variant`,f,d);let U=d[f]?.use??f;if(e(`AppButton`,`variant`,U,Object.keys(u)),e(`AppButton`,`size`,C,Object.keys(p)),e(`AppButton`,`shape`,L,h),e(`AppButton`,`type`,w,g),R!==void 0&&e(`AppButton`,`iconVariant`,R,_),j){let e=[`btn`,`btn-${u[U]??`primary`}`,C===`sm`?`btn-sm`:C===`lg`?`btn-lg`:``,D?`w-100`:``,v(L),`btn-static`,z].filter(Boolean).join(` `),{onClick:t,...n}=B;return i(l(`span`,{className:e,...n,children:[x(O,`left`,C,R),a,x(k,`right`,C,R)]}),M,N)}let W=[D?`w-100`:``,T?`is-loading`:``,F&&m.includes(F)?`btn-anim-${F}`:``,H?`wui-btn-pin-end`:``,v(L),z].filter(Boolean).join(` `),G=(B.as===void 0||B.as===`button`)&&A===void 0&&B.to===void 0,K=G?{}:{role:void 0,tabIndex:E||T?-1:void 0},q=M!=null&&M!==``;return i(l(s,{type:G?w:void 0,href:A,variant:u[U]??`primary`,size:C===`md`?void 0:C,disabled:E||T,"aria-busy":T||void 0,"aria-keyshortcuts":n(P),className:W||void 0,...K,...B,children:[T&&c(`span`,{className:`spinner-border spinner-border-sm me-2`,"aria-hidden":`true`}),!T&&x(O,`left`,C,R),V?y(a):a,!T&&(V?b(k,C,H,R):H?S(k,C,R):x(k,`right`,C,R)),!q&&r(P)]}),M,N,P)}export{f as buttonVariantClass,C as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{shortcutAria as r,shortcutChip as i}from"../lib/shortcutChip.js";import a from"./withTooltip.js";import o from"./AppIcon.js";import s from"./warnDeprecatedValue.js";import{Button as c}from"react-bootstrap";import{jsx as l,jsxs as u}from"react/jsx-runtime";var d={primary:`primary`,secondary:`secondary`,outline:`outline-primary`,ghost:`ghost`,text:`text`,danger:`danger`,success:`success`,"secondary-danger":`secondary-danger`,"outline-danger":`outline-danger`,light:`light`,warning:`warning`,neutral:`neutral`,"outline-light":`outline-light`,"outline-secondary":`outline-secondary`},f={subtle:{use:`neutral`,removeIn:`0.79.0`}};function p(e){return`btn-${d[f[e]?.use??e]??`primary`}`}var m={sm:14,md:16,lg:20},h=[`sheen`,`fill`,`expand`,`glow`,`roll`,`none`],g=[`rounded`,`pill`,`sharp`],_=[`button`,`submit`,`reset`],v=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],y=e=>e===`pill`||e===`sharp`?`wui-btn-shape-${e}`:``;function b(e){return u(`span`,{className:`wui-btn-roll`,children:[l(`span`,{className:`wui-btn-roll__a`,children:e}),l(`span`,{className:`wui-btn-roll__b`,"aria-hidden":`true`,children:e})]})}function x(e,t,n,r){if(!e)return null;let i=n=>typeof e==`string`?l(o,{name:e,size:m[t]??m.md,variant:r,className:n}):l(`span`,{className:[`d-inline-flex`,n].filter(Boolean).join(` `),children:e});return u(`span`,{className:n?`wui-btn-roll-ico wui-btn-pin-icon`:`wui-btn-roll-ico ms-2`,"aria-hidden":`true`,children:[i(),i(`wui-btn-roll-ico__next`)]})}function S(e,t,n,r){if(!e)return null;let i=t===`left`?`me-2`:`ms-2`;return typeof e==`string`?l(o,{name:e,size:m[n]??m.md,variant:r,className:i}):l(`span`,{className:`d-inline-flex ${i}`,children:e})}function C(e,t,n){return e?l(`span`,{className:`wui-btn-pin-icon`,"aria-hidden":`true`,children:typeof e==`string`?l(o,{name:e,size:m[t]??m.md,variant:n}):e}):null}function w(o){let{children:p,variant:w=`primary`,size:T=`md`,type:E=`button`,loading:D=!1,disabled:O=!1,block:k=!1,leftIcon:A=null,rightIcon:j=null,href:M,static:N=!1,tooltip:P,tooltipPlacement:F,shortcut:I,animation:L,pinRightIcon:R=!1,shape:z=`rounded`,iconVariant:B,className:V=``,...H}=o;n(`AppButton`,H),L!==void 0&&t(`AppButton`,`animation`,L,h);let U=L===`roll`&&!N,W=R&&j!=null&&j!==``&&!N&&!D;s(`AppButton`,`variant`,w,f);let G=f[w]?.use??w;if(t(`AppButton`,`variant`,G,Object.keys(d)),t(`AppButton`,`size`,T,Object.keys(m)),t(`AppButton`,`shape`,z,g),t(`AppButton`,`type`,E,_),B!==void 0&&t(`AppButton`,`iconVariant`,B,v),N){let t=[`btn`,`btn-${d[G]??`primary`}`,T===`sm`?`btn-sm`:T===`lg`?`btn-lg`:``,k?`w-100`:``,y(z),`btn-static`,V].filter(Boolean).join(` `),{onClick:n,...r}=H;return a(u(`span`,{className:t,...e(`AppButton`,o),...r,children:[S(A,`left`,T,B),p,S(j,`right`,T,B)]}),P,F)}let K=[k?`w-100`:``,D?`is-loading`:``,L&&h.includes(L)?`btn-anim-${L}`:``,W?`wui-btn-pin-end`:``,y(z),V].filter(Boolean).join(` `),q=(H.as===void 0||H.as===`button`)&&M===void 0&&H.to===void 0,J=q?{}:{role:void 0,tabIndex:O||D?-1:void 0},Y=P!=null&&P!==``;return a(u(c,{type:q?E:void 0,href:M,variant:d[G]??`primary`,size:T===`md`?void 0:T,disabled:O||D,"aria-busy":D||void 0,"aria-keyshortcuts":r(I),className:K||void 0,...J,...e(`AppButton`,o),...H,children:[D&&l(`span`,{className:`spinner-border spinner-border-sm me-2`,"aria-hidden":`true`}),!D&&S(A,`left`,T,B),U?b(p):p,!D&&(U?x(j,T,W,B):W?C(j,T,B):S(j,`right`,T,B)),!Y&&i(I)]}),P,F,I)}export{p as buttonVariantClass,w as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";var r={sm:`btn-group-sm`,md:``,lg:`btn-group-lg`};function i({label:i,children:a,size:o=`md`,vertical:s=!1,fullWidth:c=!1,className:l=``,...u}){return t(`AppButtonGroup`,u),e(`AppButtonGroup`,`size`,o,Object.keys(r)),n(`div`,{role:`group`,"aria-label":i,className:[s?`btn-group-vertical`:`btn-group`,`wui-btn-group`,r[o]??``,c?`wui-btn-group-full`:``,l].filter(Boolean).join(` `),...u,children:a})}export{i as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsx as r}from"react/jsx-runtime";var i={sm:`btn-group-sm`,md:``,lg:`btn-group-lg`};function a(a){let{label:o,children:s,size:c=`md`,vertical:l=!1,fullWidth:u=!1,className:d=``,...f}=a;return n(`AppButtonGroup`,f),t(`AppButtonGroup`,`size`,c,Object.keys(i)),r(`div`,{role:`group`,"aria-label":o,className:[l?`btn-group-vertical`:`btn-group`,`wui-btn-group`,i[c]??``,u?`wui-btn-group-full`:``,d].filter(Boolean).join(` `),...e(`AppButtonGroup`,a),...f,children:s})}export{a as default};
@@ -1 +1 @@
1
- import{devWarn as e}from"../lib/devWarn.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{forwardRef as r,useCallback as i,useEffect as a,useLayoutEffect as o,useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";var u=`wui-calendar:event-click`,d=`wui-calendar:date-click`,f=`wui-calendar:range-change`,p=[`month`,`week`,`day`,`list`],m=`This calendar couldn't load. Try again in a moment.`,h=r(function({label:r,events:h,eventsUrl:g,view:_,date:v,emptyText:y,errorText:b,firstDay:x,onEventClick:S,onDateClick:C,onRangeChange:w,className:T=``,style:E,...D},O){n(`AppCalendar`,D),t(`AppCalendar`,`view`,_,p);let k=s(null),A=s(``),j=s({onEventClick:S,onDateClick:C,onRangeChange:w}),[M,N]=c(!1),P=i(e=>{k.current=e,typeof O==`function`?O(e):O&&(O.current=e)},[O]);return a(()=>{j.current={onEventClick:S,onDateClick:C,onRangeChange:w}}),o(()=>{let e=k.current;if(!e)return;let t=h==null?``:JSON.stringify(h);t!==A.current&&(A.current=t,e.events=h??null)}),a(()=>{let e=k.current,t=[[u,e=>{j.current.onEventClick?.(e.detail)===!1&&e.preventDefault()}],[d,e=>j.current.onDateClick?.(e.detail)],[f,e=>j.current.onRangeChange?.(e.detail)]];for(let[n,r]of t)e.addEventListener(n,r);return()=>{for(let[n,r]of t)e.removeEventListener(n,r)}},[]),a(()=>{let t=!0;return import(`@webority/ui-elements/calendar`).catch(n=>{e(`[AppCalendar] the calendar failed to load:`,n?.message),t&&N(!0)}),()=>{t=!1}},[]),M?l(`div`,{className:T||void 0,style:E,role:`status`,children:l(`p`,{className:`wui-calendar-status-text`,children:b||m})}):l(`wui-calendar`,{ref:P,label:r||void 0,"events-url":g||void 0,view:_||void 0,date:v||void 0,"empty-text":y||void 0,"error-text":b||void 0,"first-day":x==null?void 0:String(x),className:T||void 0,style:E,...D})});export{h as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{forwardRef as i,useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import{jsx as u}from"react/jsx-runtime";var d=`wui-calendar:event-click`,f=`wui-calendar:date-click`,p=`wui-calendar:range-change`,m=[`month`,`week`,`day`,`list`],h=`This calendar couldn't load. Try again in a moment.`,g=i(function(i,g){let{label:_,events:v,eventsUrl:y,view:b,date:x,emptyText:S,errorText:C,firstDay:w,onEventClick:T,onDateClick:E,onRangeChange:D,className:O=``,style:k,...A}=i;r(`AppCalendar`,A),n(`AppCalendar`,`view`,b,m);let j=c(null),M=c(``),N=c({onEventClick:T,onDateClick:E,onRangeChange:D}),[P,F]=l(!1),I=a(e=>{j.current=e,typeof g==`function`?g(e):g&&(g.current=e)},[g]);return o(()=>{N.current={onEventClick:T,onDateClick:E,onRangeChange:D}}),s(()=>{let e=j.current;if(!e)return;let t=v==null?``:JSON.stringify(v);t!==M.current&&(M.current=t,e.events=v??null)}),o(()=>{let e=j.current,t=[[d,e=>{N.current.onEventClick?.(e.detail)===!1&&e.preventDefault()}],[f,e=>N.current.onDateClick?.(e.detail)],[p,e=>N.current.onRangeChange?.(e.detail)]];for(let[n,r]of t)e.addEventListener(n,r);return()=>{for(let[n,r]of t)e.removeEventListener(n,r)}},[]),o(()=>{let e=!0;return import(`@webority/ui-elements/calendar`).catch(n=>{t(`[AppCalendar] the calendar failed to load:`,n?.message),e&&F(!0)}),()=>{e=!1}},[]),P?u(`div`,{...e(`AppCalendar`,i),className:O||void 0,style:k,role:`status`,children:u(`p`,{className:`wui-calendar-status-text`,children:C||h})}):u(`wui-calendar`,{ref:I,label:_||void 0,"events-url":y||void 0,view:b||void 0,date:x||void 0,"empty-text":S||void 0,"error-text":C||void 0,"first-day":w==null?void 0:String(w),className:O||void 0,style:k,...e(`AppCalendar`,i),...A})});export{g as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{useState as r}from"react";import{Card as i}from"react-bootstrap";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`default`,`elevated`,`outlined`,`muted`,`accent`],l=[`primary`,`success`,`warning`,`danger`,`info`],u=[`none`,`sm`,`md`,`lg`],d={xs:320,sm:420,md:560,lg:720};function f({title:f,subtitle:p,headerIcon:m,titleClassName:h=``,header:g,headerExtra:_,headerActions:v,footer:y,media:b,children:x,variant:S=`default`,tone:C=`primary`,padding:w=`md`,maxWidth:T,className:E=``,bodyClassName:D=``,headerClassName:O=``,body:k=!0,lifted:A=!1,href:j,onClick:M,linkComponent:N,onClose:P,dismissible:F,closeLabel:I=`Close`,...L}){let[R,z]=r(!1);t(`AppCard`,L),e(`AppCard`,`variant`,S,c),e(`AppCard`,`tone`,C,l),e(`AppCard`,`padding`,w,u);let{style:B,...V}=L,H=j!=null||M!=null,U=[S&&S!=="default"?`card-${S}`:``,S===`accent`&&C&&C!==`primary`?`tone-${C}`:``,w&&w!==`md`?`card-pad-${w}`:``,A?`card-lifted`:``,T==null?``:`card-constrained`,H?`card-clickable`:``,E].filter(Boolean).join(` `)||void 0,W=T==null?void 0:d[T]==null?typeof T==`number`?`${T}px`:T:`${d[T]}px`,G=W?{"--card-max-width":W,...B}:B,K={};j==null?M!=null&&(K={role:`button`,tabIndex:0,onClick:M,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),M(e))}}):(K=N?{as:N,to:j}:{as:`a`,href:j},M&&(K.onClick=M));let q=F??typeof P==`function`,J=q?o(`button`,{type:`button`,className:`card-close`,"aria-label":I,onClick:e=>{e.preventDefault(),e.stopPropagation(),z(!0),P?.()},onKeyDown:e=>e.stopPropagation(),children:o(n,{name:`x`,size:16})}):null,Y=f!=null||p!=null||m!=null,X=g!=null||Y||_!=null||v!=null||q,Z=m==null?null:typeof m==`string`?o(n,{name:m,size:18}):m;return R?null:s(i,{className:U,style:G,...V,...K,children:[b!=null&&o(`div`,{className:`card-media`,children:b}),X&&s(i.Header,{className:O||void 0,children:[g??s(a,{children:[Y&&s(`div`,{className:`card-header-main`,children:[Z!=null&&o(`span`,{className:`card-header-icon`,children:Z}),s(`div`,{className:`card-header-titles`,children:[f!=null&&o(`div`,{className:[`card-title`,h].filter(Boolean).join(` `),children:f}),p!=null&&o(`div`,{className:`card-subtitle`,children:p})]})]}),_,v!=null&&o(`div`,{className:`card-header-actions`,children:v})]}),J]}),k?o(i.Body,{className:D||void 0,children:x}):x,y!=null&&o(`div`,{className:`card-footer`,children:y})]})}export{f as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{useState as i}from"react";import{Card as a}from"react-bootstrap";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`default`,`elevated`,`outlined`,`muted`,`accent`],u=[`primary`,`success`,`warning`,`danger`,`info`],d=[`none`,`sm`,`md`,`lg`],f={xs:320,sm:420,md:560,lg:720};function p(p){let{title:m,subtitle:h,headerIcon:g,titleClassName:_=``,header:v,headerExtra:y,headerActions:b,footer:x,media:S,children:C,variant:w=`default`,tone:T=`primary`,padding:E=`md`,maxWidth:D,className:O=``,bodyClassName:k=``,headerClassName:A=``,body:j=!0,lifted:M=!1,href:N,onClick:P,linkComponent:F,onClose:I,dismissible:L,closeLabel:R=`Close`,...z}=p,[B,V]=i(!1);n(`AppCard`,z),t(`AppCard`,`variant`,w,l),t(`AppCard`,`tone`,T,u),t(`AppCard`,`padding`,E,d);let{style:H,...U}=z,W=N!=null||P!=null,G=[w&&w!=="default"?`card-${w}`:``,w===`accent`&&T&&T!==`primary`?`tone-${T}`:``,E&&E!==`md`?`card-pad-${E}`:``,M?`card-lifted`:``,D==null?``:`card-constrained`,W?`card-clickable`:``,O].filter(Boolean).join(` `)||void 0,K=D==null?void 0:f[D]==null?typeof D==`number`?`${D}px`:D:`${f[D]}px`,q=K?{"--card-max-width":K,...H}:H,J={};N==null?P!=null&&(J={role:`button`,tabIndex:0,onClick:P,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),P(e))}}):(J=F?{as:F,to:N}:{as:`a`,href:N},P&&(J.onClick=P));let Y=L??typeof I==`function`,X=Y?s(`button`,{type:`button`,className:`card-close`,"aria-label":R,onClick:e=>{e.preventDefault(),e.stopPropagation(),V(!0),I?.()},onKeyDown:e=>e.stopPropagation(),children:s(r,{name:`x`,size:16})}):null,Z=m!=null||h!=null||g!=null,Q=v!=null||Z||y!=null||b!=null||Y,$=g==null?null:typeof g==`string`?s(r,{name:g,size:18}):g;return B?null:c(a,{className:G,style:q,...e(`AppCard`,p),...U,...J,children:[S!=null&&s(`div`,{className:`card-media`,children:S}),Q&&c(a.Header,{className:A||void 0,children:[v??c(o,{children:[Z&&c(`div`,{className:`card-header-main`,children:[$!=null&&s(`span`,{className:`card-header-icon`,children:$}),c(`div`,{className:`card-header-titles`,children:[m!=null&&s(`div`,{className:[`card-title`,_].filter(Boolean).join(` `),children:m}),h!=null&&s(`div`,{className:`card-subtitle`,children:h})]})]}),y,b!=null&&s(`div`,{className:`card-header-actions`,children:b})]}),X]}),j?s(a.Body,{className:k||void 0,children:C}):C,x!=null&&s(`div`,{className:`card-footer`,children:x})]})}export{p as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./AppIcon.js";import{Children as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import"@webority/ui-elements/elements/carousel";function a({label:a,autoplay:o,loop:s=!1,perView:c,perViewMd:l,perViewLg:u,arrows:d=!0,dots:f=!0,previousLabel:p=`Previous slide`,nextLabel:m=`Next slide`,dotLabel:h=`Go to slide`,pauseLabel:g=`Pause`,playLabel:_=`Play`,className:v=``,children:y,style:b,...x}){e(`AppCarousel`,x);let S=Number(o)>0?Math.round(Number(o)):0,C={...c>1?{"--wui-carousel-per-view":c}:null,...l>=1?{"--wui-carousel-per-view-md":l}:null,...u>=1?{"--wui-carousel-per-view-lg":u}:null};return i(`wui-carousel`,{class:[`wui-carousel`,v].filter(Boolean).join(` `),role:`region`,"aria-roledescription":`carousel`,"aria-label":a,autoplay:S||void 0,loop:s?``:void 0,"dot-label":h===`Go to slide`?void 0:h,"pause-label":g===`Pause`?void 0:g,"play-label":_===`Play`?void 0:_,style:Object.keys(C).length||b?{...C,...b}:void 0,...x,children:[S?i(`button`,{type:`button`,className:`wui-carousel-pause`,children:[r(`span`,{className:`wui-carousel-pause-icon`,"aria-hidden":`true`}),r(`span`,{className:`wui-carousel-pause-text`,children:g})]}):null,i(`div`,{className:`wui-carousel-stage`,children:[d?r(`button`,{type:`button`,className:`wui-carousel-arrow wui-carousel-prev`,"aria-label":p,children:r(t,{name:`chevron-left`,size:20})}):null,r(`div`,{className:`wui-carousel-track`,tabIndex:0,role:`group`,"aria-label":a,children:n.map(n.toArray(y),e=>r(`div`,{className:`wui-carousel-slide`,role:`group`,"aria-roledescription":`slide`,children:e}))}),d?r(`button`,{type:`button`,className:`wui-carousel-arrow wui-carousel-next`,"aria-label":m,children:r(t,{name:`chevron-right`,size:20})}):null]}),f?r(`div`,{className:`wui-carousel-dots`}):null,r(`span`,{className:`visually-hidden`,"data-wui-status":``,"aria-live":`polite`,"aria-atomic":`true`})]})}export{a as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Children as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/carousel";function o(o){let{label:s,autoplay:c,loop:l=!1,perView:u,perViewMd:d,perViewLg:f,arrows:p=!0,dots:m=!0,previousLabel:h=`Previous slide`,nextLabel:g=`Next slide`,dotLabel:_=`Go to slide`,pauseLabel:v=`Pause`,playLabel:y=`Play`,className:b=``,children:x,style:S,...C}=o;t(`AppCarousel`,C);let w=Number(c)>0?Math.round(Number(c)):0,T={...u>1?{"--wui-carousel-per-view":u}:null,...d>=1?{"--wui-carousel-per-view-md":d}:null,...f>=1?{"--wui-carousel-per-view-lg":f}:null};return a(`wui-carousel`,{class:[`wui-carousel`,b].filter(Boolean).join(` `),role:`region`,"aria-roledescription":`carousel`,"aria-label":s,autoplay:w||void 0,loop:l?``:void 0,"dot-label":_===`Go to slide`?void 0:_,"pause-label":v===`Pause`?void 0:v,"play-label":y===`Play`?void 0:y,style:Object.keys(T).length||S?{...T,...S}:void 0,...e(`AppCarousel`,o),...C,children:[w?a(`button`,{type:`button`,className:`wui-carousel-pause`,children:[i(`span`,{className:`wui-carousel-pause-icon`,"aria-hidden":`true`}),i(`span`,{className:`wui-carousel-pause-text`,children:v})]}):null,a(`div`,{className:`wui-carousel-stage`,children:[p?i(`button`,{type:`button`,className:`wui-carousel-arrow wui-carousel-prev`,"aria-label":h,children:i(n,{name:`chevron-left`,size:20})}):null,i(`div`,{className:`wui-carousel-track`,tabIndex:0,role:`group`,"aria-label":s,children:r.map(r.toArray(x),e=>i(`div`,{className:`wui-carousel-slide`,role:`group`,"aria-roledescription":`slide`,children:e}))}),p?i(`button`,{type:`button`,className:`wui-carousel-arrow wui-carousel-next`,"aria-label":g,children:i(n,{name:`chevron-right`,size:20})}):null]}),m?i(`div`,{className:`wui-carousel-dots`}):null,i(`span`,{className:`visually-hidden`,"data-wui-status":``,"aria-live":`polite`,"aria-atomic":`true`})]})}export{o as default};
@@ -1 +1 @@
1
- import{devWarn as e}from"../lib/devWarn.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{forwardRef as r,useCallback as i,useEffect as a,useLayoutEffect as o,useRef as s,useState as c}from"react";import{jsx as l}from"react/jsx-runtime";var u=`wui-chart:select`,d=`wui-chart:legend-change`,f=`wui-chart:ready`,p=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],m=[`none`,`stacked`,`percent`],h=[`ready`,`loading`,`empty`,`error`],g=[`auto`,`svg`,`canvas`],_=[`chart`,`table`],v=`This chart couldn't load. Try again in a moment.`,y=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},b=!1;function x(){b||!y()||(b=!0,e("[@webority/ui-react] <AppChart> has no `title`, which names the chart for assistive tech and its exported files."))}var S=e=>e===``?void 0:e,C=e=>Array.isArray(e)?e.map(C):e==null||Object.getPrototypeOf(e)!==Object.prototype?e:Object.fromEntries(Object.entries(e).filter(([,e])=>e!==``).map(([e,t])=>[e,C(t)])),w=e=>({type:S(e.type),title:S(e.title),description:S(e.description),data:e.data,x:C(e.x),series:C(e.series),group:C(e.group),to:C(e.to),size:C(e.size),trend:e.trend,zoom:e.zoom,bands:C(e.bands),stack:S(e.stack),y:C(e.y),target:C(e.target),height:e.height>0?e.height:void 0,state:S(e.state),emptyText:S(e.emptyText),errorText:S(e.errorText),renderer:S(e.renderer)}),T=(e,t)=>t!=null&&Object.keys(e).every(n=>Object.is(e[n],t[n])),E=e=>{try{return JSON.stringify(e)}catch{return null}},D=r(function({type:r,title:y,description:b,data:S,x:C,series:D,group:O,to:k,size:A,trend:j,zoom:M,bands:N,stack:P,y:F,target:I,height:L,state:R,emptyText:z,errorText:B,renderer:V,view:H,onSelect:U,onLegendChange:W,onReady:G,className:K=``,style:q,...J},Y){n(`AppChart`,J),t(`AppChart`,`type`,r,p),t(`AppChart`,`stack`,P,m),t(`AppChart`,`state`,R,h),t(`AppChart`,`renderer`,V,g),t(`AppChart`,`view`,H,_),y||x();let X=s(null),Z=s({props:null,signature:null}),Q=s({onSelect:U,onLegendChange:W,onReady:G}),[$,ee]=c(!1),te=i(e=>{X.current=e,typeof Y==`function`?Y(e):Y&&(Y.current=e)},[Y]);return a(()=>{Q.current={onSelect:U,onLegendChange:W,onReady:G}}),o(()=>{let e=X.current;if(!e)return;let t={type:r,title:y,description:b,data:S,x:C,series:D,group:O,to:k,size:A,trend:j,zoom:M,bands:N,stack:P,y:F,target:I,height:L,state:R,emptyText:z,errorText:B,renderer:V};if(T(t,Z.current.props))return;Z.current.props=t;let n=w(t),i=E(n);i!==null&&i===Z.current.signature||(Z.current.signature=i,e.spec=n)}),a(()=>{let e=X.current,t=e=>t=>Q.current[e]?.(t.detail),n=[[u,t(`onSelect`)],[d,t(`onLegendChange`)],[f,t(`onReady`)]];for(let[t,r]of n)e.addEventListener(t,r);return()=>{for(let[t,r]of n)e.removeEventListener(t,r)}},[]),a(()=>{let t=!0;return import(`@webority/ui-elements/chart`).catch(n=>{e(`[AppChart] the chart failed to load:`,n?.message),t&&ee(!0)}),()=>{t=!1}},[]),$?l(`div`,{className:K||void 0,style:q,role:`status`,children:l(`p`,{className:`wui-chart-state-text`,children:B||v})}):l(`wui-chart`,{ref:te,view:H||void 0,className:K||void 0,style:q,...J})});export{D as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{forwardRef as i,useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import{jsx as u}from"react/jsx-runtime";var d=`wui-chart:select`,f=`wui-chart:legend-change`,p=`wui-chart:ready`,m=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],h=[`none`,`stacked`,`percent`],g=[`ready`,`loading`,`empty`,`error`],ee=[`auto`,`svg`,`canvas`],_=[`chart`,`table`],v=`This chart couldn't load. Try again in a moment.`,y=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},b=!1;function x(){b||!y()||(b=!0,t("[@webority/ui-react] <AppChart> has no `title`, which names the chart for assistive tech and its exported files."))}var S=e=>e===``?void 0:e,C=e=>Array.isArray(e)?e.map(C):e==null||Object.getPrototypeOf(e)!==Object.prototype?e:Object.fromEntries(Object.entries(e).filter(([,e])=>e!==``).map(([e,t])=>[e,C(t)])),w=e=>({type:S(e.type),title:S(e.title),description:S(e.description),data:e.data,x:C(e.x),series:C(e.series),group:C(e.group),to:C(e.to),size:C(e.size),trend:e.trend,zoom:e.zoom,bands:C(e.bands),stack:S(e.stack),y:C(e.y),target:C(e.target),height:e.height>0?e.height:void 0,state:S(e.state),emptyText:S(e.emptyText),errorText:S(e.errorText),renderer:S(e.renderer)}),T=(e,t)=>t!=null&&Object.keys(e).every(n=>Object.is(e[n],t[n])),E=e=>{try{return JSON.stringify(e)}catch{return null}},D=i(function(i,y){let{type:b,title:S,description:C,data:D,x:O,series:k,group:A,to:j,size:M,trend:N,zoom:P,bands:F,stack:I,y:L,target:R,height:z,state:B,emptyText:V,errorText:H,renderer:U,view:W,onSelect:G,onLegendChange:K,onReady:q,className:J=``,style:Y,...X}=i;r(`AppChart`,X),n(`AppChart`,`type`,b,m),n(`AppChart`,`stack`,I,h),n(`AppChart`,`state`,B,g),n(`AppChart`,`renderer`,U,ee),n(`AppChart`,`view`,W,_),S||x();let Z=c(null),Q=c({props:null,signature:null}),$=c({onSelect:G,onLegendChange:K,onReady:q}),[te,ne]=l(!1),re=a(e=>{Z.current=e,typeof y==`function`?y(e):y&&(y.current=e)},[y]);return o(()=>{$.current={onSelect:G,onLegendChange:K,onReady:q}}),s(()=>{let e=Z.current;if(!e)return;let t={type:b,title:S,description:C,data:D,x:O,series:k,group:A,to:j,size:M,trend:N,zoom:P,bands:F,stack:I,y:L,target:R,height:z,state:B,emptyText:V,errorText:H,renderer:U};if(T(t,Q.current.props))return;Q.current.props=t;let n=w(t),r=E(n);r!==null&&r===Q.current.signature||(Q.current.signature=r,e.spec=n)}),o(()=>{let e=Z.current,t=e=>t=>$.current[e]?.(t.detail),n=[[d,t(`onSelect`)],[f,t(`onLegendChange`)],[p,t(`onReady`)]];for(let[t,r]of n)e.addEventListener(t,r);return()=>{for(let[t,r]of n)e.removeEventListener(t,r)}},[]),o(()=>{let e=!0;return import(`@webority/ui-elements/chart`).catch(n=>{t(`[AppChart] the chart failed to load:`,n?.message),e&&ne(!0)}),()=>{e=!1}},[]),te?u(`div`,{...e(`AppChart`,i),className:J||void 0,style:Y,role:`status`,children:u(`p`,{className:`wui-chart-state-text`,children:H||v})}):u(`wui-chart`,{ref:re,view:W||void 0,className:J||void 0,style:Y,...e(`AppChart`,i),...X})});export{D as default};
@@ -1 +1 @@
1
- import{devWarn as e}from"../lib/devWarn.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import r from"./AppButton.js";import i from"./AppCard.js";import a from"./AppDropdown.js";import o from"./AppSegmented.js";import{useLayoutEffect as s,useRef as c,useState as l}from"react";import{Dropdown as u}from"react-bootstrap";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";var m=[{value:`chart`,label:`Chart`,icon:`chart`},{value:`table`,label:`Table`,icon:`grid`}],h=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},g=!1;function _(){g||!h()||(g=!0,e("[@webority/ui-react] <AppChartCard> has no `title`, which is the card's heading and names its menu button."))}var v=e=>e.getAttribute(`view`)===`table`?`table`:`chart`;function y({title:e,subtitle:h,toolbar:g=!0,onRetry:y,footer:b,children:x,className:S=``,...C}){t(`AppChartCard`,C),e||_();let w=c(null),T=c(null),[E,D]=l(`chart`),O=c(E);O.current=E;let[k,A]=l(!0),j=()=>w.current?.querySelector(`wui-chart`);s(()=>{let e=w.current,t=()=>{let t=e.querySelector(`wui-chart`);if(t){if(t===T.current){D(v(t));return}T.current=t,t.hasAttribute(`view`)?D(v(t)):O.current!==`chart`&&t.setAttribute(`view`,O.current)}};t();let n=new MutationObserver(t);return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`view`]}),()=>n.disconnect()},[]);let M=p(d,{children:[f(`button`,{type:`button`,className:`topbar-icon-btn wui-chart-card-tool wui-chart-card-legend-tool`,"aria-pressed":k,"aria-label":`Show legend`,title:`Show or hide the legend`,onClick:()=>A(!k),children:f(n,{name:`list`,size:16})}),f(o,{size:`sm`,label:`View`,options:m,value:E,onChange:e=>{D(e),j()?.setAttribute(`view`,e)}}),p(a,{icon:`more-horizontal`,label:e?`More actions for ${e}`:`More actions`,children:[p(u.Item,{as:`button`,type:`button`,onClick:()=>j()?.exportPng?.(),children:[f(n,{name:`image`,size:16}),`Download PNG`]}),p(u.Item,{as:`button`,type:`button`,onClick:()=>j()?.exportCsv?.(),children:[f(n,{name:`download`,size:16}),`Download CSV`]})]})]}),N=[`wui-chart-card`,k?``:`wui-chart-card-legend-off`,S].filter(Boolean).join(` `);return p(i,{title:e,subtitle:h,headerActions:g?M:void 0,footer:b,className:N,...C,children:[f(`div`,{ref:w,children:x}),y&&f(`div`,{className:`wui-chart-card-retry`,children:f(r,{variant:`outline`,size:`sm`,onClick:y,children:`Try again`})})]})}export{y as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"./AppButton.js";import a from"./AppCard.js";import o from"./AppDropdown.js";import s from"./AppSegmented.js";import{useLayoutEffect as c,useRef as l,useState as u}from"react";import{Dropdown as d}from"react-bootstrap";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";var h=[{value:`chart`,label:`Chart`,icon:`chart`},{value:`table`,label:`Table`,icon:`grid`}],g=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},_=!1;function v(){_||!g()||(_=!0,t("[@webority/ui-react] <AppChartCard> has no `title`, which is the card's heading and names its menu button."))}var y=e=>e.getAttribute(`view`)===`table`?`table`:`chart`;function b(t){let{title:g,subtitle:_,toolbar:b=!0,onRetry:x,footer:S,children:C,className:w=``,...T}=t;n(`AppChartCard`,T),g||v();let E=l(null),D=l(null),[O,k]=u(`chart`),A=l(O);A.current=O;let[j,M]=u(!0),N=()=>E.current?.querySelector(`wui-chart`);c(()=>{let e=E.current,t=()=>{let t=e.querySelector(`wui-chart`);if(t){if(t===D.current){k(y(t));return}D.current=t,t.hasAttribute(`view`)?k(y(t)):A.current!==`chart`&&t.setAttribute(`view`,A.current)}};t();let n=new MutationObserver(t);return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`view`]}),()=>n.disconnect()},[]);let P=m(f,{children:[p(`button`,{type:`button`,className:`topbar-icon-btn wui-chart-card-tool wui-chart-card-legend-tool`,"aria-pressed":j,"aria-label":`Show legend`,title:`Show or hide the legend`,onClick:()=>M(!j),children:p(r,{name:`list`,size:16})}),p(s,{size:`sm`,label:`View`,options:h,value:O,onChange:e=>{k(e),N()?.setAttribute(`view`,e)}}),m(o,{icon:`more-horizontal`,label:g?`More actions for ${g}`:`More actions`,children:[m(d.Item,{as:`button`,type:`button`,onClick:()=>N()?.exportPng?.(),children:[p(r,{name:`image`,size:16}),`Download PNG`]}),m(d.Item,{as:`button`,type:`button`,onClick:()=>N()?.exportCsv?.(),children:[p(r,{name:`download`,size:16}),`Download CSV`]})]})]}),F=[`wui-chart-card`,j?``:`wui-chart-card-legend-off`,w].filter(Boolean).join(` `);return m(a,{title:g,subtitle:_,headerActions:b?P:void 0,footer:S,className:F,...e(`AppChartCard`,t),...T,children:[p(`div`,{ref:E,children:C}),x&&p(`div`,{className:`wui-chart-card-retry`,children:p(i,{variant:`outline`,size:`sm`,onClick:x,children:`Try again`})})]})}export{b as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"../lib/CheckField.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";var i=n(function({label:n,id:i,name:a,error:o,hint:s,className:c=``,...l},u){return e(`AppCheckbox`,l),r(t,{ref:u,label:n,id:i,name:a,error:o,hint:s,className:c,rest:l,inputType:`checkbox`,wrapperClass:`form-check`})});export{i as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"../lib/CheckField.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=r(function(r,a){let{label:o,id:s,name:c,error:l,hint:u,className:d=``,...f}=r;return t(`AppCheckbox`,f),i(n,{rootProps:e(`AppCheckbox`,r),ref:a,label:o,id:s,name:c,error:l,hint:u,className:d,rest:f,inputType:`checkbox`,wrapperClass:`form-check`})});export{a as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";var o=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`],s=[`soft`,`outline`,`solid`],c=[`sm`,`md`];function l({label:l,children:u,tone:d=`neutral`,variant:f=`soft`,size:p=`md`,leadingIcon:m,avatar:h,onRemove:g,onClick:_,disabled:v=!1,removeLabel:y,className:b=``,...x}){t(`AppChip`,x),e(`AppChip`,`tone`,d,o),e(`AppChip`,`variant`,f,s),e(`AppChip`,`size`,p,c);let S=l??u,C={},w={};for(let[e,t]of Object.entries(x))_&&(e.startsWith(`aria-`)||e.startsWith(`data-`))?C[e]=t:w[e]=t;let T=[`chip`,d&&d!==`neutral`?d:``,f===`outline`?`chip-outline`:f===`solid`?`chip-solid`:``,p===`sm`?`chip-sm`:``,_?`chip-clickable`:``,g?`chip-removable`:``,v?`is-disabled`:``,b].filter(Boolean).join(` `),E=h?i(`span`,{className:`chip-avatar`,children:typeof h==`string`?i(`img`,{src:h,alt:``}):h}):m?i(`span`,{className:`chip-ic`,children:i(n,{name:m,size:p===`sm`?12:14})}):null,D=_?a(`button`,{type:`button`,className:`chip-body`,...C,onClick:_,disabled:v,children:[E,i(`span`,{className:`chip-label`,children:S})]}):a(r,{children:[E,i(`span`,{className:`chip-label`,children:S})]});return a(`span`,{className:T,...w,children:[D,g&&i(`button`,{type:`button`,className:`chip-remove`,onClick:g,disabled:v,"aria-label":y||(typeof S==`string`?`Remove ${S}`:`Remove`),children:i(n,{name:`x`,size:p===`sm`?12:14})})]})}export{l as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`],c=[`soft`,`outline`,`solid`],l=[`sm`,`md`];function u(u){let{label:d,children:f,tone:p=`neutral`,variant:m=`soft`,size:h=`md`,leadingIcon:g,avatar:_,onRemove:v,onClick:y,disabled:b=!1,removeLabel:x,className:S=``,...C}=u;n(`AppChip`,C),t(`AppChip`,`tone`,p,s),t(`AppChip`,`variant`,m,c),t(`AppChip`,`size`,h,l);let w=d??f,T={},E={};for(let[e,t]of Object.entries(C))y&&(e.startsWith(`aria-`)||e.startsWith(`data-`))?T[e]=t:E[e]=t;let D=[`chip`,p&&p!==`neutral`?p:``,m===`outline`?`chip-outline`:m===`solid`?`chip-solid`:``,h===`sm`?`chip-sm`:``,y?`chip-clickable`:``,v?`chip-removable`:``,b?`is-disabled`:``,S].filter(Boolean).join(` `),O=_?a(`span`,{className:`chip-avatar`,children:typeof _==`string`?a(`img`,{src:_,alt:``}):_}):g?a(`span`,{className:`chip-ic`,children:a(r,{name:g,size:h===`sm`?12:14})}):null,k=y?o(`button`,{type:`button`,className:`chip-body`,...T,onClick:y,disabled:b,children:[O,a(`span`,{className:`chip-label`,children:w})]}):o(i,{children:[O,a(`span`,{className:`chip-label`,children:w})]});return o(`span`,{className:D,...e(`AppChip`,u),...E,children:[k,v&&a(`button`,{type:`button`,className:`chip-remove`,onClick:v,disabled:b,"aria-label":x||(typeof w==`string`?`Remove ${w}`:`Remove`),children:a(r,{name:`x`,size:h===`sm`?12:14})})]})}export{u as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";import"@webority/ui-elements/elements/overflow";var r=[`wrap`,`menu`];function i({children:i,overflow:a=`wrap`,moreLabel:o=`More`,label:s,className:c=``,...l}){t(`AppChipGroup`,l),e(`AppChipGroup`,`overflow`,a,r);let u=e=>[e,c].filter(Boolean).join(` `);return a===`menu`?n(`wui-overflow`,{class:`wui-chip-group-host`,label:o,children:n(`div`,{role:`group`,"aria-label":s,className:u(`wui-chip-group wui-chip-group-nowrap`),"data-wui-overflow-list":``,...l,children:i})}):n(`div`,{role:`group`,"aria-label":s,className:u(`wui-chip-group`),...l,children:i})}export{i as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsx as r}from"react/jsx-runtime";import"@webority/ui-elements/elements/overflow";var i=[`wrap`,`menu`];function a(a){let{children:o,overflow:s=`wrap`,moreLabel:c=`More`,label:l,className:u=``,...d}=a;n(`AppChipGroup`,d),t(`AppChipGroup`,`overflow`,s,i);let f=e=>[e,u].filter(Boolean).join(` `);return s===`menu`?r(`wui-overflow`,{...e(`AppChipGroup`,a),class:`wui-chip-group-host`,label:c,children:r(`div`,{role:`group`,"aria-label":l,className:f(`wui-chip-group wui-chip-group-nowrap`),"data-wui-overflow-list":``,...d,children:o})}):r(`div`,{role:`group`,"aria-label":l,className:f(`wui-chip-group`),...e(`AppChipGroup`,a),...d,children:o})}export{a as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";var o={sm:` wui-struct-card-sm`,md:``,lg:` wui-struct-card-lg`},s={inline:``,stacked:` wui-struct-card-stacked`},c={sm:16,md:18,lg:22};function l({name:l,multiple:u=!1,value:d,checked:f,onChange:p,icon:m,iconNode:h,iconSize:g,image:_,imageAlt:v=``,children:y,title:b,description:x,checkIcon:S=`check`,checkSize:C=18,hideCheck:w=!1,disabled:T=!1,size:E=`md`,layout:D=`inline`,className:O=``,...k}){t(`AppChoiceCard`,k),e(`AppChoiceCard`,`size`,E,Object.keys(o)),e(`AppChoiceCard`,`layout`,D,Object.keys(s));let A=o[E]??``,j=s[D]??``,M=g??c[E]??c.md;return a(`label`,{className:`struct-card${_?` struct-card-img-card`:``}${A}${j}${w?` wui-struct-card-no-check`:``}${f?` checked`:``}${O?` ${O}`:``}`,"aria-disabled":T||void 0,...k,children:[i(`input`,{type:u?`checkbox`:`radio`,name:l,value:d,className:`struct-card-input`,checked:f,onChange:p,disabled:T}),_?i(`span`,{className:`struct-card-media`,children:i(`img`,{className:`struct-card-img`,src:_,alt:v})}):h||m?i(`span`,{className:`struct-card-ic`,children:h||i(n,{name:m,size:M,variant:f?`bold`:void 0})}):null,i(`span`,{className:`struct-card-body`,children:y||a(r,{children:[b&&i(`span`,{className:`struct-card-title`,children:b}),x&&i(`span`,{className:`struct-card-desc`,children:x})]})}),!w&&i(`span`,{className:`struct-card-check`,children:i(n,{name:S,size:C})})]})}export{l as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s={sm:` wui-struct-card-sm`,md:``,lg:` wui-struct-card-lg`},c={inline:``,stacked:` wui-struct-card-stacked`},l={sm:16,md:18,lg:22};function u(u){let{name:d,multiple:f=!1,value:p,checked:m,onChange:h,icon:g,iconNode:_,iconSize:v,image:y,imageAlt:b=``,children:x,title:S,description:C,checkIcon:w=`check`,checkSize:T=18,hideCheck:E=!1,disabled:D=!1,size:O=`md`,layout:k=`inline`,className:A=``,...j}=u;n(`AppChoiceCard`,j),t(`AppChoiceCard`,`size`,O,Object.keys(s)),t(`AppChoiceCard`,`layout`,k,Object.keys(c));let M=s[O]??``,N=c[k]??``,P=v??l[O]??l.md;return o(`label`,{className:`struct-card${y?` struct-card-img-card`:``}${M}${N}${E?` wui-struct-card-no-check`:``}${m?` checked`:``}${A?` ${A}`:``}`,"aria-disabled":D||void 0,...e(`AppChoiceCard`,u),...j,children:[a(`input`,{type:f?`checkbox`:`radio`,name:d,value:p,className:`struct-card-input`,checked:m,onChange:h,disabled:D}),y?a(`span`,{className:`struct-card-media`,children:a(`img`,{className:`struct-card-img`,src:y,alt:b})}):_||g?a(`span`,{className:`struct-card-ic`,children:_||a(r,{name:g,size:P,variant:m?`bold`:void 0})}):null,a(`span`,{className:`struct-card-body`,children:x||o(i,{children:[S&&a(`span`,{className:`struct-card-title`,children:S}),C&&a(`span`,{className:`struct-card-desc`,children:C})]})}),!E&&a(`span`,{className:`struct-card-check`,children:a(r,{name:w,size:T})})]})}export{u as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";var i=[`sm`,`md`,`lg`];function a({multiple:a=!0,label:o,name:s,value:c,checked:l,onChange:u,children:d,count:f,size:p=`md`,disabled:m=!1,className:h=``,...g}){return t(`AppChoiceChip`,g),e(`AppChoiceChip`,`size`,p,i),r(`label`,{className:`choice-chip${l?` checked`:``}${p===`sm`?` choice-chip-sm`:p===`lg`?` choice-chip-lg`:``}${h?` ${h}`:``}`,...g,children:[n(`input`,{type:a?`checkbox`:`radio`,name:s,value:c,checked:l,disabled:m,onChange:u}),n(`span`,{children:o??d}),f!=null&&n(`span`,{className:`count`,children:f})]})}export{a as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=[`sm`,`md`,`lg`];function o(o){let{multiple:s=!0,label:c,name:l,value:u,checked:d,onChange:f,children:p,count:m,size:h=`md`,disabled:g=!1,className:_=``,...v}=o;return n(`AppChoiceChip`,v),t(`AppChoiceChip`,`size`,h,a),i(`label`,{className:`choice-chip${d?` checked`:``}${h===`sm`?` choice-chip-sm`:h===`lg`?` choice-chip-lg`:``}${_?` ${_}`:``}`,...e(`AppChoiceChip`,o),...v,children:[r(`input`,{type:s?`checkbox`:`radio`,name:l,value:u,checked:d,disabled:g,onChange:f}),r(`span`,{children:c??p}),m!=null&&r(`span`,{className:`count`,children:m})]})}export{o as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";import"@webority/ui-elements/elements/code-block";var r=[`text`,`json`,`js`,`cs`,`sql`,`bash`,`http`,`html`,`css`];function i({code:i,language:a=`text`,lineNumbers:o=!1,wrap:s=!1,label:c,copyLabel:l,copiedLabel:u,className:d=``,...f}){return t(`AppCodeBlock`,f),e(`AppCodeBlock`,`language`,a,r),n(`wui-code-block`,{class:[`wui-code-block`,d].filter(Boolean).join(` `),language:a===`text`?void 0:a,"line-numbers":o?``:void 0,wrap:s?``:void 0,label:c||void 0,"copy-label":l||void 0,"copied-label":u||void 0,...f,children:n(`pre`,{className:`wui-code-source`,children:n(`code`,{children:i??``})})})}export{i as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsx as r}from"react/jsx-runtime";import"@webority/ui-elements/elements/code-block";var i=[`text`,`json`,`js`,`cs`,`sql`,`bash`,`http`,`html`,`css`];function a(a){let{code:o,language:s=`text`,lineNumbers:c=!1,wrap:l=!1,label:u,copyLabel:d,copiedLabel:f,className:p=``,...m}=a;return n(`AppCodeBlock`,m),t(`AppCodeBlock`,`language`,s,i),r(`wui-code-block`,{class:[`wui-code-block`,p].filter(Boolean).join(` `),language:s===`text`?void 0:s,"line-numbers":c?``:void 0,wrap:l?``:void 0,label:u||void 0,"copy-label":d||void 0,"copied-label":f||void 0,...e(`AppCodeBlock`,a),...m,children:r(`pre`,{className:`wui-code-source`,children:r(`code`,{children:o??``})})})}export{a as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"../lib/FieldMessage.js";import r from"./AppRequiredMark.js";import{useId as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`sm`,`md`,`lg`];function c({value:c=`#000000`,onChange:l,label:u,required:d=!1,error:f,hint:p,name:m,id:h,disabled:g=!1,size:_=`md`,className:v=``,fieldClassName:y=``,...b}){t(`AppColorField`,b),e(`AppColorField`,`size`,_,s);let x=i(),S=h||x,C=f?`${S}-error`:p?`${S}-hint`:void 0,w=e=>/^#[0-9a-f]{6}$/i.test(e),T=_===`sm`?` color-field-sm`:_===`lg`?` color-field-lg`:``,E=_===`sm`?` input-sm`:_===`lg`?` input-lg`:``;return o(`div`,{className:`field${y?` ${y}`:``}`,children:[u&&o(`label`,{className:`label`,htmlFor:S,children:[u,d&&a(r,{})]}),o(`div`,{className:`color-field${T}`,children:[a(`input`,{type:`color`,className:`color-field-swatch`,value:w(c)?c:`#000000`,onChange:e=>l?.(e.target.value),disabled:g,"aria-label":`${u||`Colour`}, colour picker`,tabIndex:-1}),a(`input`,{type:`text`,className:`input color-field-hex${E}${f?` error`:``}${v?` ${v}`:``}`,id:S,name:m,value:c,onChange:e=>l?.(e.target.value),placeholder:`#4F46E5`,spellCheck:!1,maxLength:7,required:d,disabled:g,"aria-invalid":f?`true`:`false`,"aria-describedby":C,...b})]}),a(n,{error:f,hint:p,errorId:`${S}-error`,hintId:`${S}-hint`})]})}export{c as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppRequiredMark.js";import{useId as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`sm`,`md`,`lg`];function l(l){let{value:u=`#000000`,onChange:d,label:f,required:p=!1,error:m,hint:h,name:g,id:_,disabled:v=!1,size:y=`md`,className:b=``,fieldClassName:x=``,...S}=l;n(`AppColorField`,S),t(`AppColorField`,`size`,y,c);let C=a(),w=_||C,T=m?`${w}-error`:h?`${w}-hint`:void 0,E=e=>/^#[0-9a-f]{6}$/i.test(e),D=y===`sm`?` color-field-sm`:y===`lg`?` color-field-lg`:``,O=y===`sm`?` input-sm`:y===`lg`?` input-lg`:``;return s(`div`,{...e(`AppColorField`,l),className:`field${x?` ${x}`:``}`,children:[f&&s(`label`,{className:`label`,htmlFor:w,children:[f,p&&o(i,{})]}),s(`div`,{className:`color-field${D}`,children:[o(`input`,{type:`color`,className:`color-field-swatch`,value:E(u)?u:`#000000`,onChange:e=>d?.(e.target.value),disabled:v,"aria-label":`${f||`Colour`}, colour picker`,tabIndex:-1}),o(`input`,{type:`text`,className:`input color-field-hex${O}${m?` error`:``}${b?` ${b}`:``}`,id:w,name:g,value:u,onChange:e=>d?.(e.target.value),placeholder:`#4F46E5`,spellCheck:!1,maxLength:7,required:p,disabled:v,"aria-invalid":m?`true`:`false`,"aria-describedby":T,...S})]}),o(r,{error:m,hint:h,errorId:`${w}-error`,hintId:`${w}-hint`})]})}export{l as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./AppDropdown.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({columns:i,hiddenColumns:a=[],onToggle:o,label:s=`Columns`,className:c=``,...l}){e(`AppColumnMenu`,l);let u=i.filter(e=>e.hideable);return r(t,{icon:`layout-grid`,label:s,menuClassName:`wui-column-menu${c?` ${c}`:``}`,children:[n(`div`,{className:`wui-column-menu-title`,children:s}),u.map(e=>r(`label`,{className:`wui-column-menu-item`,children:[n(`input`,{type:`checkbox`,className:`wui-check`,checked:!a.includes(e.key),onChange:()=>o(e.key)}),e.label]},e.key))]})}export{i as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppDropdown.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{columns:o,hiddenColumns:s=[],onToggle:c,label:l=`Columns`,className:u=``,...d}=a;t(`AppColumnMenu`,d);let f=o.filter(e=>e.hideable);return i(n,{icon:`layout-grid`,label:l,menuClassName:`wui-column-menu${u?` ${u}`:``}`,...e(`AppColumnMenu`,a),children:[r(`div`,{className:`wui-column-menu-title`,children:l}),f.map(e=>i(`label`,{className:`wui-column-menu-item`,children:[r(`input`,{type:`checkbox`,className:`wui-check`,checked:!s.includes(e.key),onChange:()=>c(e.key)}),e.label]},e.key))]})}export{a as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import{shortcutAria as t,shortcutChip as n}from"../lib/shortcutChip.js";import r from"./AppIcon.js";import i from"./renderIconProp.js";import a from"./AppModal.js";import o from"./AppSpinner.js";import{matchSegments as s}from"@webority/ui-elements/helpers";import{Fragment as c,useEffect as l,useId as u,useLayoutEffect as d,useRef as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import"@webority/ui-elements/elements/command-palette";var h=`lg`;function g({open:t,onClose:n,query:r=``,onQueryChange:i,placeholder:o=`Search…`,groups:s=[],path:c=[],onPathChange:l,rootLabel:d,backLabel:f=`Back`,recentsKey:m,recentsLimit:g,recentsLabel:v,loading:y=!1,emptyText:b=`No results`,footer:x,ariaLabel:S=`Search`,highlight:C=!0,id:w,className:T=``,...E}){e(`AppCommandPalette`,E);let D=u(),O=w||D;return p(a,{open:t,onClose:n,hideHeader:!0,placement:`top`,size:h,ariaLabel:S,className:`wui-cmd-card${T?` ${T}`:``}`,children:p(_,{baseId:O,query:r,onQueryChange:i,placeholder:o,groups:s,path:c,onPathChange:l,rootLabel:d,backLabel:f,recentsKey:m,recentsLimit:g,recentsLabel:v,loading:y,emptyText:b,footer:x,ariaLabel:S,highlight:C,onClose:n,rest:E})})}function _({baseId:e,query:a,onQueryChange:s,placeholder:c,groups:u,path:h,onPathChange:g,rootLabel:_,backLabel:b,recentsKey:x,recentsLimit:S,recentsLabel:C,loading:w,emptyText:T,footer:E,ariaLabel:D,highlight:O,onClose:k,rest:A}){let j=f(null),M=`${e}-list`,N=u.filter(e=>e.items?.length),P=!w&&a.trim()!==``&&N.length===0;return d(()=>{j.current?.refresh?.()}),l(()=>{let e=j.current,t=e=>{let t=u.find(t=>String(t.key)===e.detail.groupKey)?.items?.find(t=>String(t.key)===e.detail.key);if(t){if(e.preventDefault(),t.page){s?.(``),g?.([...h,{key:t.page.key,label:t.page.label}]);return}t.onSelect?.(),k?.()}},n=e=>{e.preventDefault(),s?.(``),g?.(e.detail.path)};return e.addEventListener(`wui-command-palette:select`,t),e.addEventListener(`wui-command-palette:navigate`,n),()=>{e.removeEventListener(`wui-command-palette:select`,t),e.removeEventListener(`wui-command-palette:navigate`,n)}},[u,h,k,s,g]),m(`wui-command-palette`,{ref:j,path:JSON.stringify(h),"root-label":_,"recents-key":x,"recents-limit":S,"recents-label":C,...A,children:[m(`div`,{className:`wui-cmd-search`,children:[p(`span`,{className:`wui-cmd-search-icon`,"aria-hidden":`true`,children:p(r,{name:`search`,size:18})}),p(`input`,{className:`wui-cmd-input`,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":M,"aria-autocomplete":`list`,"aria-label":D,placeholder:c,autoComplete:`off`,spellCheck:!1,"data-autofocus":``,value:a,onChange:e=>s?.(e.target.value)}),w&&p(o,{size:`sm`,className:`wui-cmd-spinner`})]}),m(`div`,{className:`wui-cmd-crumbs`,hidden:!0,children:[p(`button`,{type:`button`,className:`wui-cmd-back`,"aria-label":b,children:p(r,{name:`chevron-left`,size:16})}),p(`ol`,{className:`wui-cmd-trail`})]}),m(`div`,{className:`wui-cmd-list`,role:`listbox`,id:M,"aria-label":`Results`,"aria-busy":w?`true`:void 0,hidden:N.length===0,children:[p(`div`,{className:`wui-cmd-recents`}),N.map(o=>{let s=`${e}-${y(o.key)}`;return m(`div`,{className:`wui-cmd-group`,role:`group`,"aria-labelledby":s,children:[p(`div`,{className:`wui-cmd-group-label`,role:`presentation`,id:s,children:o.label}),o.items.map(e=>{let c=`${s}-${y(e.key)}`,l=e.description==null?null:`${c}-desc`,u=e.meta==null?null:`${c}-meta`;return m(`div`,{className:`wui-cmd-item`,role:`option`,id:c,"data-group-key":String(o.key),"data-key":String(e.key),"data-opens":e.page?String(e.page.key):void 0,"aria-label":e.ariaLabel||(typeof e.label==`string`?e.label:``)||void 0,"aria-describedby":[l,u].filter(Boolean).join(` `)||void 0,"aria-disabled":e.disabled?`true`:void 0,"aria-keyshortcuts":t(e.shortcut),children:[e.icon!=null&&p(`span`,{className:`wui-cmd-item-icon`,"aria-hidden":`true`,children:i(e.icon,{size:18})}),m(`span`,{className:`wui-cmd-item-text`,children:[p(`span`,{className:`wui-cmd-item-label`,children:O?v(e.label,a):e.label}),l&&p(`span`,{className:`wui-cmd-item-desc`,id:l,children:e.description})]}),u&&p(`span`,{className:`wui-cmd-item-meta`,id:u,children:e.meta}),n(e.shortcut),e.page&&p(`span`,{className:`wui-cmd-item-chevron`,"aria-hidden":`true`,children:p(r,{name:`chevron-right`,size:16})})]},e.key)})]},o.key)})]}),p(`div`,{className:`wui-cmd-empty`,role:`status`,children:P?T:null}),E!=null&&p(`div`,{className:`wui-cmd-footer`,children:E})]})}function v(e,t){if(typeof e!=`string`)return e;let n=s(e,t);if(n.length===1&&!n[0].match)return e;let r=0;return n.map(e=>{let t=r;return r+=e.text.length,e.match?p(`mark`,{className:`wui-cmd-mark`,children:e.text},t):p(c,{children:e.text},t)})}function y(e){return String(e).replace(/\s+/g,`_`)}export{g as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{shortcutAria as n,shortcutChip as r}from"../lib/shortcutChip.js";import i from"./AppIcon.js";import a from"./renderIconProp.js";import o from"./AppModal.js";import s from"./AppSpinner.js";import{matchSegments as c}from"@webority/ui-elements/helpers";import{Fragment as l,useEffect as u,useId as d,useLayoutEffect as f,useRef as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import"@webority/ui-elements/elements/command-palette";var g=`lg`;function _(n){let{open:r,onClose:i,query:a=``,onQueryChange:s,placeholder:c=`Search…`,groups:l=[],path:u=[],onPathChange:f,rootLabel:p,backLabel:h=`Back`,recentsKey:_,recentsLimit:y,recentsLabel:b,loading:x=!1,emptyText:S=`No results`,footer:C,ariaLabel:w=`Search`,highlight:T=!0,id:E,className:D=``,...O}=n;t(`AppCommandPalette`,O);let k=d(),A=E||k;return m(o,{...e(`AppCommandPalette`,n),open:r,onClose:i,hideHeader:!0,placement:`top`,size:g,ariaLabel:w,className:`wui-cmd-card${D?` ${D}`:``}`,children:m(v,{baseId:A,query:a,onQueryChange:s,placeholder:c,groups:l,path:u,onPathChange:f,rootLabel:p,backLabel:h,recentsKey:_,recentsLimit:y,recentsLabel:b,loading:x,emptyText:S,footer:C,ariaLabel:w,highlight:T,onClose:i,rest:O})})}function v({baseId:e,query:t,onQueryChange:o,placeholder:c,groups:l,path:d,onPathChange:g,rootLabel:_,backLabel:v,recentsKey:x,recentsLimit:S,recentsLabel:C,loading:w,emptyText:T,footer:E,ariaLabel:D,highlight:O,onClose:k,rest:A}){let j=p(null),M=`${e}-list`,N=l.filter(e=>e.items?.length),P=!w&&t.trim()!==``&&N.length===0;return f(()=>{j.current?.refresh?.()}),u(()=>{let e=j.current,t=e=>{let t=l.find(t=>String(t.key)===e.detail.groupKey)?.items?.find(t=>String(t.key)===e.detail.key);if(t){if(e.preventDefault(),t.page){o?.(``),g?.([...d,{key:t.page.key,label:t.page.label}]);return}t.onSelect?.(),k?.()}},n=e=>{e.preventDefault(),o?.(``),g?.(e.detail.path)};return e.addEventListener(`wui-command-palette:select`,t),e.addEventListener(`wui-command-palette:navigate`,n),()=>{e.removeEventListener(`wui-command-palette:select`,t),e.removeEventListener(`wui-command-palette:navigate`,n)}},[l,d,k,o,g]),h(`wui-command-palette`,{ref:j,path:JSON.stringify(d),"root-label":_,"recents-key":x,"recents-limit":S,"recents-label":C,...A,children:[h(`div`,{className:`wui-cmd-search`,children:[m(`span`,{className:`wui-cmd-search-icon`,"aria-hidden":`true`,children:m(i,{name:`search`,size:18})}),m(`input`,{className:`wui-cmd-input`,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":M,"aria-autocomplete":`list`,"aria-label":D,placeholder:c,autoComplete:`off`,spellCheck:!1,"data-autofocus":``,value:t,onChange:e=>o?.(e.target.value)}),w&&m(s,{size:`sm`,className:`wui-cmd-spinner`})]}),h(`div`,{className:`wui-cmd-crumbs`,hidden:!0,children:[m(`button`,{type:`button`,className:`wui-cmd-back`,"aria-label":v,children:m(i,{name:`chevron-left`,size:16})}),m(`ol`,{className:`wui-cmd-trail`})]}),h(`div`,{className:`wui-cmd-list`,role:`listbox`,id:M,"aria-label":`Results`,"aria-busy":w?`true`:void 0,hidden:N.length===0,children:[m(`div`,{className:`wui-cmd-recents`}),N.map(o=>{let s=`${e}-${b(o.key)}`;return h(`div`,{className:`wui-cmd-group`,role:`group`,"aria-labelledby":s,children:[m(`div`,{className:`wui-cmd-group-label`,role:`presentation`,id:s,children:o.label}),o.items.map(e=>{let c=`${s}-${b(e.key)}`,l=e.description==null?null:`${c}-desc`,u=e.meta==null?null:`${c}-meta`;return h(`div`,{className:`wui-cmd-item`,role:`option`,id:c,"data-group-key":String(o.key),"data-key":String(e.key),"data-opens":e.page?String(e.page.key):void 0,"aria-label":e.ariaLabel||(typeof e.label==`string`?e.label:``)||void 0,"aria-describedby":[l,u].filter(Boolean).join(` `)||void 0,"aria-disabled":e.disabled?`true`:void 0,"aria-keyshortcuts":n(e.shortcut),children:[e.icon!=null&&m(`span`,{className:`wui-cmd-item-icon`,"aria-hidden":`true`,children:a(e.icon,{size:18})}),h(`span`,{className:`wui-cmd-item-text`,children:[m(`span`,{className:`wui-cmd-item-label`,children:O?y(e.label,t):e.label}),l&&m(`span`,{className:`wui-cmd-item-desc`,id:l,children:e.description})]}),u&&m(`span`,{className:`wui-cmd-item-meta`,id:u,children:e.meta}),r(e.shortcut),e.page&&m(`span`,{className:`wui-cmd-item-chevron`,"aria-hidden":`true`,children:m(i,{name:`chevron-right`,size:16})})]},e.key)})]},o.key)})]}),m(`div`,{className:`wui-cmd-empty`,role:`status`,children:P?T:null}),E!=null&&m(`div`,{className:`wui-cmd-footer`,children:E})]})}function y(e,t){if(typeof e!=`string`)return e;let n=c(e,t);if(n.length===1&&!n[0].match)return e;let r=0;return n.map(e=>{let t=r;return r+=e.text.length,e.match?m(`mark`,{className:`wui-cmd-mark`,children:e.text},t):m(l,{children:e.text},t)})}function b(e){return String(e).replace(/\s+/g,`_`)}export{_ as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./AppIcon.js";import{initialsOf as n}from"../lib/initials.js";import{formatDate as r,formatNumber as i,toInstant as a}from"@webority/ui-elements/helpers";import{Fragment as o,useEffect as s,useId as c,useRef as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{COMMENT_REACTIONS as f,COMMENT_TEXT as p}from"@webority/ui-elements/elements/comment-thread";import{parseMentionValue as m}from"@webority/ui-elements/elements/mention-input";function h({comments:t=[],onPost:n,onReply:r,onEdit:i,onDelete:a,onReact:o,people:m,loadPeople:h,reactionChoices:_,readOnly:v=!1,label:y=p.listName,id:b,className:x=``,...S}){e(`AppCommentThread`,S);let C=c(),w=b||`comment-thread-${C.replace(/[^a-zA-Z0-9_-]/g,``)}`,T=l(null),E=typeof h==`function`,D=_?.length?_:f,O=l(null);return O.current={onPost:n,onReply:r,onEdit:i,onDelete:a,onReact:o,loadPeople:h},s(()=>{let e=T.current;if(e)return e.submit=async({intent:e,commentId:t,parentId:n,body:r,emoji:i})=>{let a=O.current;e===`post`?await a.onPost?.(r):e===`reply`?await a.onReply?.(n,r):e===`edit`?await a.onEdit?.(t,r):e===`delete`?await a.onDelete?.(t):e===`react`&&await a.onReact?.(t,i)},()=>{e.submit=void 0}},[]),s(()=>{let e=T.current;!e||E||(e.people=m||[])},[m,E]),s(()=>{let e=T.current;if(!e||!E)return;let t=new WeakMap,n=async e=>{let n=e.target,r=(t.get(n)??0)+1;t.set(n,r),n.loading=!0;try{let i=await O.current.loadPeople(e.detail.query);t.get(n)===r&&(n.people=i||[])}catch{t.get(n)===r&&(n.people=[])}finally{t.get(n)===r&&(n.loading=!1)}};return e.addEventListener(`search`,n),()=>e.removeEventListener(`search`,n)},[E]),d(`wui-comment-thread`,{ref:T,id:w,class:x?`wui-comment-thread ${x}`:`wui-comment-thread`,controlled:``,"read-only":v?``:void 0,remote:E?``:void 0,"reaction-choices":_?.length?_.join(` `):void 0,...S,children:[u(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:t.length?u(`ol`,{className:`wui-comment-list`,"aria-label":y,children:t.map(e=>u(g,{comment:e,topLevel:!0,readOnly:v},e.id))}):u(`p`,{className:`wui-comment-empty`,children:p.empty})}),!v&&u(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":p.pickerName,"data-wui-picker":``,hidden:!0,children:D.map(e=>u(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!v&&d(`div`,{className:`wui-comment-composer`,"data-wui-composer":``,children:[u(`wui-mention-input`,{id:`${w}-new`,class:`wui-mention-input`,label:p.composerLabel,placeholder:p.composerPlaceholder,rows:`3`,remote:E?``:void 0}),u(`div`,{className:`wui-comment-form-actions`,children:u(`button`,{type:`button`,className:`btn btn-primary btn-sm`,"data-wui-action":`post`,children:p.post})}),u(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]}),u(`span`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}function g({comment:e,topLevel:s=!1,readOnly:c}){let{id:l,author:f,at:h,value:_,edited:v,deleted:y,canEdit:b,canDelete:x,reactions:S=[],replies:C=[]}=e,w=f?.name||``,T=a(h),E=!c&&!y&&b,D=!c&&!y&&x;return d(`li`,{className:`wui-comment`,"data-wui-comment":l,"data-value":_??``,"data-wui-deleted":y?``:void 0,children:[d(`div`,{className:`wui-comment-row`,children:[d(`span`,{className:`avatar avatar-sm wui-comment-avatar`,"aria-hidden":`true`,children:[u(`span`,{className:`avatar-face`,children:n(w)||`?`}),f?.src&&u(`img`,{className:`avatar-img`,src:f.src,alt:``,onError:e=>{e.currentTarget.hidden=!0}})]}),d(`div`,{className:`wui-comment-main`,children:[d(`div`,{className:`wui-comment-head`,children:[u(`span`,{className:`wui-comment-author`,children:w}),u(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(T)?new Date(T).toISOString():void 0,children:r(h,{pattern:`datetime`})}),v&&!y&&u(`span`,{className:`wui-comment-edited`,children:p.edited})]}),y?u(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:p.deleted}):u(`div`,{className:`wui-comment-text`,"data-wui-text":``,children:m(_).map((e,t)=>`text`in e?u(o,{children:e.text},t):d(`span`,{className:`wui-mention`,"data-mention-id":e.id,children:[`@`,e.label]},t))}),E&&u(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),!y&&(S.length>0||!c)&&d(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":p.reactions,children:[S.map(e=>c?d(`span`,{className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,children:[u(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),u(`span`,{className:`wui-reaction-count`,children:i(e.count,{decimals:0})})]},e.emoji):d(`button`,{type:`button`,className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,"data-wui-emoji":e.emoji,"aria-pressed":e.mine?`true`:`false`,children:[u(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),u(`span`,{className:`wui-reaction-count`,children:i(e.count,{decimals:0})})]},e.emoji)),!c&&u(`button`,{type:`button`,className:`wui-reaction-add`,"data-wui-action":`react-menu`,"aria-label":p.addReaction,"aria-haspopup":`true`,"aria-expanded":`false`,children:u(t,{name:`emoji-smile`,size:16})})]}),!c&&!y&&(s||E||D)&&d(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[s&&u(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:p.reply}),E&&u(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:p.edit}),D&&u(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:p.delete})]}),D&&d(`div`,{className:`wui-comment-confirm`,"data-wui-confirm":``,hidden:!0,children:[u(`span`,{className:`wui-comment-confirm-text`,children:p.confirmDelete}),u(`button`,{type:`button`,className:`btn btn-danger btn-sm`,"data-wui-action":`confirm-delete`,children:p.delete}),u(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,"data-wui-action":`cancel-delete`,children:p.cancel})]}),!c&&u(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]})]}),s&&C.length>0&&u(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":p.repliesName(w),children:C.map(e=>u(g,{comment:e,readOnly:c},e.id))}),s&&!c&&!y&&u(`div`,{className:`wui-comment-reply`,"data-wui-reply":``,hidden:!0})]})}export{h as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{initialsOf as r}from"../lib/initials.js";import{formatDate as i,formatNumber as a,toInstant as o}from"@webority/ui-elements/helpers";import{Fragment as s,useEffect as c,useId as l,useRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{COMMENT_REACTIONS as p,COMMENT_TEXT as m}from"@webority/ui-elements/elements/comment-thread";import{parseMentionValue as h}from"@webority/ui-elements/elements/mention-input";function g(n){let{comments:r=[],onPost:i,onReply:a,onEdit:o,onDelete:s,onReact:h,people:g,loadPeople:v,reactionChoices:y,readOnly:b=!1,label:x=m.listName,id:S,className:C=``,...w}=n;t(`AppCommentThread`,w);let T=l(),E=S||`comment-thread-${T.replace(/[^a-zA-Z0-9_-]/g,``)}`,D=u(null),O=typeof v==`function`,k=y?.length?y:p,A=u(null);return A.current={onPost:i,onReply:a,onEdit:o,onDelete:s,onReact:h,loadPeople:v},c(()=>{let e=D.current;if(e)return e.submit=async({intent:e,commentId:t,parentId:n,body:r,emoji:i})=>{let a=A.current;e===`post`?await a.onPost?.(r):e===`reply`?await a.onReply?.(n,r):e===`edit`?await a.onEdit?.(t,r):e===`delete`?await a.onDelete?.(t):e===`react`&&await a.onReact?.(t,i)},()=>{e.submit=void 0}},[]),c(()=>{let e=D.current;!e||O||(e.people=g||[])},[g,O]),c(()=>{let e=D.current;if(!e||!O)return;let t=new WeakMap,n=async e=>{let n=e.target,r=(t.get(n)??0)+1;t.set(n,r),n.loading=!0;try{let i=await A.current.loadPeople(e.detail.query);t.get(n)===r&&(n.people=i||[])}catch{t.get(n)===r&&(n.people=[])}finally{t.get(n)===r&&(n.loading=!1)}};return e.addEventListener(`search`,n),()=>e.removeEventListener(`search`,n)},[O]),f(`wui-comment-thread`,{ref:D,id:E,class:C?`wui-comment-thread ${C}`:`wui-comment-thread`,controlled:``,"read-only":b?``:void 0,remote:O?``:void 0,"reaction-choices":y?.length?y.join(` `):void 0,...e(`AppCommentThread`,n),...w,children:[d(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:r.length?d(`ol`,{className:`wui-comment-list`,"aria-label":x,children:r.map(e=>d(_,{comment:e,topLevel:!0,readOnly:b},e.id))}):d(`p`,{className:`wui-comment-empty`,children:m.empty})}),!b&&d(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":m.pickerName,"data-wui-picker":``,hidden:!0,children:k.map(e=>d(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!b&&f(`div`,{className:`wui-comment-composer`,"data-wui-composer":``,children:[d(`wui-mention-input`,{id:`${E}-new`,class:`wui-mention-input`,label:m.composerLabel,placeholder:m.composerPlaceholder,rows:`3`,remote:O?``:void 0}),d(`div`,{className:`wui-comment-form-actions`,children:d(`button`,{type:`button`,className:`btn btn-primary btn-sm`,"data-wui-action":`post`,children:m.post})}),d(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]}),d(`span`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}function _({comment:e,topLevel:t=!1,readOnly:c}){let{id:l,author:u,at:p,value:g,edited:v,deleted:y,canEdit:b,canDelete:x,reactions:S=[],replies:C=[]}=e,w=u?.name||``,T=o(p),E=!c&&!y&&b,D=!c&&!y&&x;return f(`li`,{className:`wui-comment`,"data-wui-comment":l,"data-value":g??``,"data-wui-deleted":y?``:void 0,children:[f(`div`,{className:`wui-comment-row`,children:[f(`span`,{className:`avatar avatar-sm wui-comment-avatar`,"aria-hidden":`true`,children:[d(`span`,{className:`avatar-face`,children:r(w)||`?`}),u?.src&&d(`img`,{className:`avatar-img`,src:u.src,alt:``,onError:e=>{e.currentTarget.hidden=!0}})]}),f(`div`,{className:`wui-comment-main`,children:[f(`div`,{className:`wui-comment-head`,children:[d(`span`,{className:`wui-comment-author`,children:w}),d(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(T)?new Date(T).toISOString():void 0,children:i(p,{pattern:`datetime`})}),v&&!y&&d(`span`,{className:`wui-comment-edited`,children:m.edited})]}),y?d(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:m.deleted}):d(`div`,{className:`wui-comment-text`,"data-wui-text":``,children:h(g).map((e,t)=>`text`in e?d(s,{children:e.text},t):f(`span`,{className:`wui-mention`,"data-mention-id":e.id,children:[`@`,e.label]},t))}),E&&d(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),!y&&(S.length>0||!c)&&f(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":m.reactions,children:[S.map(e=>c?f(`span`,{className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,children:[d(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),d(`span`,{className:`wui-reaction-count`,children:a(e.count,{decimals:0})})]},e.emoji):f(`button`,{type:`button`,className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,"data-wui-emoji":e.emoji,"aria-pressed":e.mine?`true`:`false`,children:[d(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),d(`span`,{className:`wui-reaction-count`,children:a(e.count,{decimals:0})})]},e.emoji)),!c&&d(`button`,{type:`button`,className:`wui-reaction-add`,"data-wui-action":`react-menu`,"aria-label":m.addReaction,"aria-haspopup":`true`,"aria-expanded":`false`,children:d(n,{name:`emoji-smile`,size:16})})]}),!c&&!y&&(t||E||D)&&f(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[t&&d(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:m.reply}),E&&d(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:m.edit}),D&&d(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:m.delete})]}),D&&f(`div`,{className:`wui-comment-confirm`,"data-wui-confirm":``,hidden:!0,children:[d(`span`,{className:`wui-comment-confirm-text`,children:m.confirmDelete}),d(`button`,{type:`button`,className:`btn btn-danger btn-sm`,"data-wui-action":`confirm-delete`,children:m.delete}),d(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,"data-wui-action":`cancel-delete`,children:m.cancel})]}),!c&&d(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]})]}),t&&C.length>0&&d(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":m.repliesName(w),children:C.map(e=>d(_,{comment:e,readOnly:c},e.id))}),t&&!c&&!y&&d(`div`,{className:`wui-comment-reply`,"data-wui-reply":``,hidden:!0})]})}export{g as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./AppIcon.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({columns:i=[],rows:a=[],caption:o,className:s=``,...c}){e(`AppCompareTable`,c);let l=e=>e===!0?n(`span`,{className:`compare-yes`,children:n(t,{name:`check`,size:16})}):e===!1?n(`span`,{className:`compare-no`,children:`-`}):e;return n(`div`,{className:`compare-table${s?` ${s}`:``}`,...c,children:r(`table`,{children:[o&&n(`caption`,{className:`visually-hidden`,children:o}),n(`thead`,{children:n(`tr`,{children:i.map((e,t)=>n(`th`,{scope:`col`,className:e.highlight?`is-highlight`:void 0,children:e.label},e.label?`col-${t}-${e.label}`:`col-${t}`))})}),n(`tbody`,{children:a.map((e,t)=>r(`tr`,{children:[n(`th`,{scope:`row`,children:e.label}),e.values.map((e,t)=>n(`td`,{className:i[t+1]?.highlight?`is-highlight`:void 0,children:l(e)},i[t+1]?.label??t))]},e.key??`${e.label}-${t}`))})]})})}export{i as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{columns:o=[],rows:s=[],caption:c,className:l=``,...u}=a;t(`AppCompareTable`,u);let d=e=>e===!0?r(`span`,{className:`compare-yes`,children:r(n,{name:`check`,size:16})}):e===!1?r(`span`,{className:`compare-no`,children:`-`}):e;return r(`div`,{className:`compare-table${l?` ${l}`:``}`,...e(`AppCompareTable`,a),...u,children:i(`table`,{children:[c&&r(`caption`,{className:`visually-hidden`,children:c}),r(`thead`,{children:r(`tr`,{children:o.map((e,t)=>r(`th`,{scope:`col`,className:e.highlight?`is-highlight`:void 0,children:e.label},e.label?`col-${t}-${e.label}`:`col-${t}`))})}),r(`tbody`,{children:s.map((e,t)=>i(`tr`,{children:[r(`th`,{scope:`row`,children:e.label}),e.values.map((e,t)=>r(`td`,{className:o[t+1]?.highlight?`is-highlight`:void 0,children:d(e)},o[t+1]?.label??t))]},e.key??`${e.label}-${t}`))})]})})}export{a as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppButton.js";import r from"./AppModal.js";import i from"./AppInput.js";import{MODAL_ICONS as a}from"./ModalIcons.js";import{useEffect as o,useState as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`sm`,`md`,`lg`,`xl`];function f({open:f,title:p,message:m,confirmLabel:h=`Confirm`,cancelLabel:g=`Cancel`,danger:_=!1,tone:v,image:y,iconSize:b,confirmPhrase:x,onConfirm:S,onClose:C,loading:w=!1,staticBackdrop:T=!1,placement:E=`center`,size:D=`md`,className:O=``,...k}){t(`AppConfirmDialog`,k),e(`AppConfirmDialog`,`tone`,v,Object.keys(a)),e(`AppConfirmDialog`,`size`,typeof D==`string`?D:null,d);let[A,j]=s(``);if(o(()=>{f||j(``)},[f]),!f)return null;let M=!!x&&A.trim()!==x,N=y?null:a[v||(_?`delete`:`info`)],P=b>0?{"--wui-confirm-icon-size":`${b}px`}:void 0,F=()=>{w||C?.()};return l(r,{...k,open:f,hideHeader:!0,title:p,onClose:F,staticBackdrop:T,placement:E,size:D,className:[`wui-confirm`,O].filter(Boolean).join(` `),footer:u(`div`,{className:`wui-confirm-actions`,children:[l(n,{variant:`secondary`,disabled:w,onClick:F,children:g}),l(n,{variant:_?`danger`:`primary`,disabled:M,loading:w,onClick:S,children:h})]}),children:u(`div`,{className:`wui-confirm-content`,children:[y?l(`span`,{className:`wui-confirm-icon`,style:P,children:l(`img`,{src:y,alt:``,"aria-hidden":`true`})}):N&&l(`span`,{className:`wui-confirm-icon`,style:P,children:l(N,{size:120})}),l(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:p}),m&&l(`p`,{className:`wui-confirm-msg`,children:m}),x&&l(i,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:u(c,{children:[`Type `,l(`strong`,{children:x}),` to confirm`]}),value:A,onChange:e=>j(e.target.value),"aria-label":`Type ${x} to confirm`,disabled:w})]})})}export{f as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppButton.js";import i from"./AppModal.js";import a from"./AppInput.js";import{MODAL_ICONS as o}from"./ModalIcons.js";import{useEffect as s,useState as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`sm`,`md`,`lg`,`xl`];function p(p){let{open:m,title:h,message:g,confirmLabel:_=`Confirm`,cancelLabel:v=`Cancel`,danger:y=!1,tone:b,image:x,iconSize:S,confirmPhrase:C,onConfirm:w,onClose:T,loading:E=!1,staticBackdrop:D=!1,placement:O=`center`,size:k=`md`,className:A=``,...j}=p;n(`AppConfirmDialog`,j),t(`AppConfirmDialog`,`tone`,b,Object.keys(o)),t(`AppConfirmDialog`,`size`,typeof k==`string`?k:null,f);let[M,N]=c(``);if(s(()=>{m||N(``)},[m]),!m)return null;let P=!!C&&M.trim()!==C,F=x?null:o[b||(y?`delete`:`info`)],I=S>0?{"--wui-confirm-icon-size":`${S}px`}:void 0,L=()=>{E||T?.()};return u(i,{...e(`AppConfirmDialog`,p),...j,open:m,hideHeader:!0,title:h,onClose:L,staticBackdrop:D,placement:O,size:k,className:[`wui-confirm`,A].filter(Boolean).join(` `),footer:d(`div`,{className:`wui-confirm-actions`,children:[u(r,{variant:`secondary`,disabled:E,onClick:L,children:v}),u(r,{variant:y?`danger`:`primary`,disabled:P,loading:E,onClick:w,children:_})]}),children:d(`div`,{className:`wui-confirm-content`,children:[x?u(`span`,{className:`wui-confirm-icon`,style:I,children:u(`img`,{src:x,alt:``,"aria-hidden":`true`})}):F&&u(`span`,{className:`wui-confirm-icon`,style:I,children:u(F,{size:120})}),u(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:h}),g&&u(`p`,{className:`wui-confirm-msg`,children:g}),C&&u(a,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:d(l,{children:[`Type `,u(`strong`,{children:C}),` to confirm`]}),value:M,onChange:e=>N(e.target.value),"aria-label":`Type ${C} to confirm`,disabled:E})]})})}export{p as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./useWuiControl.js";import{useEffect as r}from"react";import{jsx as i}from"react/jsx-runtime";import"@webority/ui-elements/elements/consent-banner";import{getConsent as a,saveConsent as o}from"@webority/analytics/site";var s=[`bottom-left`,`bottom-right`,`bar`],c=[`analytics`,`functional`,`marketing`];function l({heading:l,description:u,policyHref:d,policyLabel:f,analyticsDescription:p,functionalDescription:m,marketingDescription:h,categories:g,position:_=`bottom-left`,standalone:v=!1,className:y=``,style:b,...x}){t(`AppConsentBanner`,x),e(`AppConsentBanner`,`position`,_,s);for(let t of g??[])e(`AppConsentBanner`,`categories`,t,c);let{setRef:S,innerRef:C}=n({on:{"wui-consent-save":e=>{o(e.detail),C.current&&(C.current.preferences=a())}}});return r(()=>{let e=C.current;if(!e)return;let t=a();e.preferences=t,t.decided||e.open()},[C]),i(`wui-consent-banner`,{ref:S,position:_,heading:l||void 0,description:u||void 0,"policy-href":d||void 0,"policy-label":f||void 0,"analytics-description":p||void 0,"functional-description":m||void 0,"marketing-description":h||void 0,categories:g?.length?g.join(` `):void 0,standalone:v||void 0,class:y||void 0,style:b,...x})}export{l as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./useWuiControl.js";import{useEffect as i}from"react";import{jsx as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/consent-banner";import{getConsent as o,saveConsent as s}from"@webority/analytics/site";var c=[`bottom-left`,`bottom-right`,`bar`],l=[`analytics`,`functional`,`marketing`];function u(u){let{heading:d,description:f,policyHref:p,policyLabel:m,analyticsDescription:h,functionalDescription:g,marketingDescription:_,categories:v,position:y=`bottom-left`,standalone:b=!1,className:x=``,style:S,...C}=u;n(`AppConsentBanner`,C),t(`AppConsentBanner`,`position`,y,c);for(let e of v??[])t(`AppConsentBanner`,`categories`,e,l);let{setRef:w,innerRef:T}=r({on:{"wui-consent-save":e=>{s(e.detail),T.current&&(T.current.preferences=o())}}});return i(()=>{let e=T.current;if(!e)return;let t=o();e.preferences=t,t.decided||e.open()},[T]),a(`wui-consent-banner`,{ref:w,position:y,heading:d||void 0,description:f||void 0,"policy-href":p||void 0,"policy-label":m||void 0,"analytics-description":h||void 0,"functional-description":g||void 0,"marketing-description":_||void 0,categories:v?.length?v.join(` `):void 0,standalone:b||void 0,class:x||void 0,style:S,...e(`AppConsentBanner`,u),...C})}export{u as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./renderIconProp.js";import{useEffect as n,useRef as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/context-menu";function o({items:o=[],target:s,children:c,ariaLabel:l=`Context menu`,disabled:u=!1,onOpen:d,menuClassName:f=``,linkComponent:p,...m}){e(`AppContextMenu`,m);let h=r(null);return n(()=>{let e=h.current;if(!d)return;let t=e=>d(e.detail);return e.addEventListener(`wui-context-menu:open`,t),()=>e.removeEventListener(`wui-context-menu:open`,t)},[d]),a(`wui-context-menu`,{ref:h,target:s,disabled:u,...m,children:[c,i(`div`,{className:`dropdown-menu wui-context-menu-panel${f?` ${f}`:``}`,role:`menu`,"aria-label":l,tabIndex:-1,children:o.map(e=>{if(e.divider)return i(`hr`,{className:`dropdown-divider`},e.key);let n=!!e.to&&!e.disabled;return a(n?p??`a`:`button`,{...n?p?{to:e.to}:{href:e.to}:{type:`button`},className:`dropdown-item${e.danger?` danger`:``}${e.disabled?` disabled`:``}`,role:`menuitem`,tabIndex:-1,"data-key":e.key,"aria-disabled":e.disabled?`true`:void 0,onClick:e.disabled?void 0:e.onClick,children:[e.image?i(`img`,{src:e.image,alt:``}):t(e.icon,{size:16}),e.label]},e.key)})})]})}export{o as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.js";import{useEffect as r,useRef as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/context-menu";function s(s){let{items:c=[],target:l,children:u,ariaLabel:d=`Context menu`,disabled:f=!1,onOpen:p,menuClassName:m=``,linkComponent:h,...g}=s;t(`AppContextMenu`,g);let _=i(null);return r(()=>{let e=_.current;if(!p)return;let t=e=>p(e.detail);return e.addEventListener(`wui-context-menu:open`,t),()=>e.removeEventListener(`wui-context-menu:open`,t)},[p]),o(`wui-context-menu`,{ref:_,target:l,disabled:f,...e(`AppContextMenu`,s),...g,children:[u,a(`div`,{className:`dropdown-menu wui-context-menu-panel${m?` ${m}`:``}`,role:`menu`,"aria-label":d,tabIndex:-1,children:c.map(e=>{if(e.divider)return a(`hr`,{className:`dropdown-divider`},e.key);let t=!!e.to&&!e.disabled;return o(t?h??`a`:`button`,{...t?h?{to:e.to}:{href:e.to}:{type:`button`},className:`dropdown-item${e.danger?` danger`:``}${e.disabled?` disabled`:``}`,role:`menuitem`,tabIndex:-1,"data-key":e.key,"aria-disabled":e.disabled?`true`:void 0,onClick:e.disabled?void 0:e.onClick,children:[e.image?a(`img`,{src:e.image,alt:``}):n(e.icon,{size:16}),e.label]},e.key)})})]})}export{s as default};