@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"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppRecordPager.js";import r from"./AppShortcutLegend.js";import{LIST_KEYS as i,SELECT_KEY as a,shortcutKey as o}from"@webority/ui-elements/helpers";import{useEffect as s,useRef as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f={sm:576,md:768,lg:992,xl:1200,xxl:1400},p=Object.keys(f),m=[3,4,5,6,7,8],h=6,g=`.wui-split-items > .wui-split-item > .wui-split-link`,_=(e,t)=>e!=null&&String(e)===String(t),v=e=>{let t=window.matchMedia?.(`(min-width: ${f[e]}px)`);return!t||t.matches},ee=e=>typeof e==`string`||typeof e==`number`?String(e):`item`;function y({items:y=[],currentKey:b,onSelect:x,selectable:S=!1,selectedKeys:C,onToggle:w,onToggleAll:T,bulkActions:E,header:D,chips:O,pane:k,paneHeader:A,pager:j=!0,shortcuts:te,shortcutsEnabled:M=!0,empty:ne=`Nothing here yet.`,loading:N=!1,listWidth:P=5,stackBelow:F=`xl`,className:I=``,...L}){t(`AppSplitView`,L),e(`AppSplitView`,`stackBelow`,F,p),e(`AppSplitView`,`listWidth`,P,m);let R=f[F]?F:`xl`,z=m.includes(P)?P:5,B=c(null),V=b!=null,H=S?C?.size??0:0,U=H>0,W=S&&y.length>0&&y.every(e=>C?.has(e.key)),G=S&&!W&&y.some(e=>C?.has(e.key)),K=e=>{e&&(e.indeterminate=G)},q=c(!1);s(()=>{if(!q.current){q.current=!0;return}b!=null&&B.current?.querySelector(`.wui-split-link[aria-current="true"]`)?.scrollIntoView?.({block:`nearest`})},[b]);let J=(e,t)=>{t.button>0||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||x&&(e.href&&!v(R)||(t.preventDefault(),x(e.key)))},Y=e=>{let t=[...B.current?.querySelectorAll(g)??[]];t[t.findIndex(e=>e.getAttribute(`aria-current`)===`true`)+e]?.click()},X=[`wui-split-view`,V?`wui-split-reading`:``,I].filter(Boolean).join(` `),re=S?[...i,a]:i,ie=new Set([`J`,`K`,`Enter`,`?`,...S?[`X`]:[]]),ae=[...re,...(te??[]).filter(e=>!ie.has(o(e.key))).map(e=>({key:e.key,label:e.label,onPress:()=>e.onPress?.(b)}))],Z=y.findIndex(e=>_(b,e.key)),Q=j&&!N&&y.length>0?u(n,{"data-split-pager":``,index:Z>=0?Z+1:void 0,total:y.length,onPrev:()=>Y(-1),onNext:()=>Y(1),prevLabel:`Previous item`,nextLabel:`Next item`}):null,oe=e=>{let t=_(b,e.key),n=S&&!!C?.has(e.key),r=e.badge!==void 0&&e.badge!==null&&e.badge!==``,i=d(l,{children:[d(`span`,{className:`wui-split-item-main`,children:[u(`span`,{className:`wui-split-item-title`,children:e.title}),e.meta!==void 0&&e.meta!==null&&u(`span`,{className:`wui-split-item-meta`,children:e.meta})]}),(e.trailing||r)&&d(`span`,{className:`wui-split-item-end`,children:[e.trailing,r&&u(`span`,{className:`wui-split-badge`,children:e.badge})]})]});return d(`li`,{className:[`wui-split-item`,t?`is-active`:``,n?`is-selected`:``].filter(Boolean).join(` `),"data-key":e.key,children:[S&&u(`input`,{type:`checkbox`,className:`wui-check wui-split-check`,checked:n,onChange:()=>w?.(e.key),"aria-label":`Select ${ee(e.title)}`}),e.href?u(`a`,{className:`wui-split-link`,href:e.href,"aria-current":t?`true`:void 0,onClick:t=>J(e,t),children:i}):u(`button`,{type:`button`,className:`wui-split-link`,"aria-current":t?`true`:void 0,onClick:t=>J(e,t),children:i})]},e.key)},$;return $=N?d(`div`,{className:`wui-split-items`,"aria-busy":`true`,tabIndex:0,children:[u(`span`,{className:`visually-hidden`,children:`Loading`}),Array.from({length:h},(e,t)=>d(`div`,{className:`wui-split-skeleton`,"aria-hidden":`true`,children:[u(`span`,{className:`skeleton wui-split-skeleton-title`}),u(`span`,{className:`skeleton wui-split-skeleton-meta`})]},t))]}):y.length?u(`ul`,{className:`wui-split-items`,"aria-label":`Items`,children:y.map(oe)}):u(`div`,{className:`wui-split-empty`,children:ne}),d(`div`,{ref:B,className:X,"data-stack-below":R,"data-list-width":z,"data-shortcut-scope":M?``:void 0,...L,children:[d(`div`,{className:`wui-split-list`,children:[(D||S)&&d(`div`,{className:`wui-split-head`,children:[S&&u(`input`,{ref:K,type:`checkbox`,className:`wui-check wui-split-all`,checked:W,onChange:e=>T?.(e.target.checked),"aria-label":`Select all items`}),u(`div`,{className:`wui-split-head-main`,hidden:U,children:D}),S&&d(`div`,{className:`wui-split-head-bulk`,hidden:!U,children:[d(`span`,{className:`wui-split-count`,"aria-live":`polite`,children:[H,` selected`]}),E]})]}),O&&u(`div`,{className:`wui-split-chips`,children:O}),$,M&&d(`div`,{className:`wui-split-legend`,children:[d(`span`,{children:[u(`kbd`,{className:`wui-kbd`,children:`J`}),` `,u(`kbd`,{className:`wui-kbd`,children:`K`}),` Move`]}),d(`span`,{children:[u(`kbd`,{className:`wui-kbd`,children:`Enter`}),` Open`]}),u(r,{items:g,shortcuts:ae})]})]}),d(`div`,{className:`wui-split-pane`,children:[(A||Q)&&d(`div`,{className:`wui-split-pane-head`,children:[A,Q]}),u(`section`,{className:`wui-split-pane-body`,"aria-label":`Reading pane`,tabIndex:0,children:k})]})]})}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"./AppRecordPager.js";import i from"./AppShortcutLegend.js";import{LIST_KEYS as a,SELECT_KEY as o,shortcutKey as s}from"@webority/ui-elements/helpers";import{useEffect as ee,useRef as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f={sm:576,md:768,lg:992,xl:1200,xxl:1400},p=Object.keys(f),m=[3,4,5,6,7,8],h=6,g=`.wui-split-items > .wui-split-item > .wui-split-link`,_=(e,t)=>e!=null&&String(e)===String(t),v=e=>{let t=window.matchMedia?.(`(min-width: ${f[e]}px)`);return!t||t.matches},y=e=>typeof e==`string`||typeof e==`number`?String(e):`item`;function b(b){let{items:x=[],currentKey:S,onSelect:C,selectable:w=!1,selectedKeys:T,onToggle:E,onToggleAll:D,bulkActions:O,header:k,chips:A,pane:j,paneHeader:M,pager:te=!0,shortcuts:ne,shortcutsEnabled:N=!0,empty:re=`Nothing here yet.`,loading:P=!1,listWidth:F=5,stackBelow:I=`xl`,className:L=``,...R}=b;n(`AppSplitView`,R),t(`AppSplitView`,`stackBelow`,I,p),t(`AppSplitView`,`listWidth`,F,m);let z=f[I]?I:`xl`,B=m.includes(F)?F:5,V=c(null),H=S!=null,U=w?T?.size??0:0,W=U>0,G=w&&x.length>0&&x.every(e=>T?.has(e.key)),K=w&&!G&&x.some(e=>T?.has(e.key)),q=e=>{e&&(e.indeterminate=K)},J=c(!1);ee(()=>{if(!J.current){J.current=!0;return}S!=null&&V.current?.querySelector(`.wui-split-link[aria-current="true"]`)?.scrollIntoView?.({block:`nearest`})},[S]);let Y=(e,t)=>{t.button>0||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||C&&(e.href&&!v(z)||(t.preventDefault(),C(e.key)))},X=e=>{let t=[...V.current?.querySelectorAll(g)??[]];t[t.findIndex(e=>e.getAttribute(`aria-current`)===`true`)+e]?.click()},ie=[`wui-split-view`,H?`wui-split-reading`:``,L].filter(Boolean).join(` `),ae=w?[...a,o]:a,oe=new Set([`J`,`K`,`Enter`,`?`,...w?[`X`]:[]]),se=[...ae,...(ne??[]).filter(e=>!oe.has(s(e.key))).map(e=>({key:e.key,label:e.label,onPress:()=>e.onPress?.(S)}))],Z=x.findIndex(e=>_(S,e.key)),Q=te&&!P&&x.length>0?u(r,{"data-split-pager":``,index:Z>=0?Z+1:void 0,total:x.length,onPrev:()=>X(-1),onNext:()=>X(1),prevLabel:`Previous item`,nextLabel:`Next item`}):null,ce=e=>{let t=_(S,e.key),n=w&&!!T?.has(e.key),r=e.badge!==void 0&&e.badge!==null&&e.badge!==``,i=d(l,{children:[d(`span`,{className:`wui-split-item-main`,children:[u(`span`,{className:`wui-split-item-title`,children:e.title}),e.meta!==void 0&&e.meta!==null&&u(`span`,{className:`wui-split-item-meta`,children:e.meta})]}),(e.trailing||r)&&d(`span`,{className:`wui-split-item-end`,children:[e.trailing,r&&u(`span`,{className:`wui-split-badge`,children:e.badge})]})]});return d(`li`,{className:[`wui-split-item`,t?`is-active`:``,n?`is-selected`:``].filter(Boolean).join(` `),"data-key":e.key,children:[w&&u(`input`,{type:`checkbox`,className:`wui-check wui-split-check`,checked:n,onChange:()=>E?.(e.key),"aria-label":`Select ${y(e.title)}`}),e.href?u(`a`,{className:`wui-split-link`,href:e.href,"aria-current":t?`true`:void 0,onClick:t=>Y(e,t),children:i}):u(`button`,{type:`button`,className:`wui-split-link`,"aria-current":t?`true`:void 0,onClick:t=>Y(e,t),children:i})]},e.key)},$;return $=P?d(`div`,{className:`wui-split-items`,"aria-busy":`true`,tabIndex:0,children:[u(`span`,{className:`visually-hidden`,children:`Loading`}),Array.from({length:h},(e,t)=>d(`div`,{className:`wui-split-skeleton`,"aria-hidden":`true`,children:[u(`span`,{className:`skeleton wui-split-skeleton-title`}),u(`span`,{className:`skeleton wui-split-skeleton-meta`})]},t))]}):x.length?u(`ul`,{className:`wui-split-items`,"aria-label":`Items`,children:x.map(ce)}):u(`div`,{className:`wui-split-empty`,children:re}),d(`div`,{ref:V,className:ie,"data-stack-below":z,"data-list-width":B,"data-shortcut-scope":N?``:void 0,...e(`AppSplitView`,b),...R,children:[d(`div`,{className:`wui-split-list`,children:[(k||w)&&d(`div`,{className:`wui-split-head`,children:[w&&u(`input`,{ref:q,type:`checkbox`,className:`wui-check wui-split-all`,checked:G,onChange:e=>D?.(e.target.checked),"aria-label":`Select all items`}),u(`div`,{className:`wui-split-head-main`,hidden:W,children:k}),w&&d(`div`,{className:`wui-split-head-bulk`,hidden:!W,children:[d(`span`,{className:`wui-split-count`,"aria-live":`polite`,children:[U,` selected`]}),O]})]}),A&&u(`div`,{className:`wui-split-chips`,children:A}),$,N&&d(`div`,{className:`wui-split-legend`,children:[d(`span`,{children:[u(`kbd`,{className:`wui-kbd`,children:`J`}),` `,u(`kbd`,{className:`wui-kbd`,children:`K`}),` Move`]}),d(`span`,{children:[u(`kbd`,{className:`wui-kbd`,children:`Enter`}),` Open`]}),u(i,{items:g,shortcuts:se})]})]}),d(`div`,{className:`wui-split-pane`,children:[(M||Q)&&d(`div`,{className:`wui-split-pane-head`,children:[M,Q]}),u(`section`,{className:`wui-split-pane-body`,"aria-label":`Reading pane`,tabIndex:0,children:j})]})]})}export{b as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./withTooltip.js";import{jsx as r}from"react/jsx-runtime";var i=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function a({label:a,tone:o=`neutral`,className:s=``,tooltip:c,tooltipPlacement:l,...u}){return t(`AppStatusBadge`,u),e(`AppStatusBadge`,`tone`,o,i),a==null||a===``?`-`:n(r(`span`,{className:`status-label ${o}${s?` ${s}`:``}`,...u,children:a}),c,l)}export{a 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{jsx as i}from"react/jsx-runtime";var a=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function o(o){let{label:s,tone:c=`neutral`,className:l=``,tooltip:u,tooltipPlacement:d,...f}=o;return n(`AppStatusBadge`,f),t(`AppStatusBadge`,`tone`,c,a),s==null||s===``?`-`:r(i(`span`,{className:`status-label ${c}${l?` ${l}`:``}`,...e(`AppStatusBadge`,o),...f,children:s}),u,d)}export{o 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=[`steps`,`journey`],s=[`horizontal`,`vertical`],c=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],l=[`sm`,`md`,`lg`],u=[`primary`,`info`],d={sm:12,md:14,lg:18},f=[`done`,`active`,`pending`,`error`];function p({steps:p=[],variant:h=`steps`,orientation:g=`horizontal`,iconVariant:_,size:v=`md`,iconSize:y,activeStep:b,onStepClick:x,label:S=`Progress`,tone:C=`primary`,linkComponent:w,className:T=``,...E}){t(`AppStepper`,E),e(`AppStepper`,`variant`,h,o),e(`AppStepper`,`orientation`,g,s),e(`AppStepper`,`iconVariant`,_,c),e(`AppStepper`,`size`,v,l),e(`AppStepper`,`tone`,C,u);let D=y>0?y:d[v]??d.md;for(let t of p)e(`AppStepper`,`steps[].status`,t.status,f);let O=h===`journey`;return i(`nav`,{className:[`stepper`,O&&`stepper-journey`,g===`vertical`&&`stepper-vertical`,v!==`md`&&l.includes(v)&&`wui-step-size-${v}`,C!==`primary`&&u.includes(C)&&`wui-step-tone-${C}`,T].filter(Boolean).join(` `),"aria-label":S,...E,children:p.map((e,t)=>{let o=e.status||m(t,b),s=`step${o===`pending`?``:` ${o}`}`,c;c=o===`done`?i(n,{name:`check`,size:D,variant:_}):o===`error`?i(n,{name:`alert-triangle`,size:D,variant:_}):e.icon?i(n,{name:e.icon,size:D,variant:_}):t+1;let l=a(r,{children:[i(`span`,{className:`step-circle`,children:c}),O?a(`span`,{className:`step-text`,children:[i(`span`,{className:`step-index`,children:`Step ${t+1}`}),i(`span`,{className:`step-label`,children:e.label}),e.description?i(`span`,{className:`step-desc`,children:e.description}):null]}):a(r,{children:[i(`span`,{className:`step-label`,children:e.label}),e.description?i(`span`,{className:`step-desc`,children:e.description}):null]})]}),u=o===`active`?`step`:void 0,d=e.key??`${e.label}-${t}`,f;return f=x?i(`button`,{type:`button`,className:s,"aria-current":u,onClick:()=>x(e,t),children:l},d):e.href?w?i(w,{className:s,to:e.href,"aria-current":u,children:l},d):i(`a`,{className:s,href:e.href,"aria-current":u,children:l},d):i(`div`,{className:s,"aria-current":u,children:l},d),O&&t<p.length-1?[f,i(`span`,{className:`step-line${o===`done`?` done`:``}`,"aria-hidden":`true`},`${d}-line`)]:f})})}function m(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}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{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`steps`,`journey`],c=[`horizontal`,`vertical`],l=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],u=[`sm`,`md`,`lg`],d=[`primary`,`info`],f={sm:12,md:14,lg:18},p=[`done`,`active`,`pending`,`error`];function m(m){let{steps:g=[],variant:_=`steps`,orientation:v=`horizontal`,iconVariant:y,size:b=`md`,iconSize:x,activeStep:S,onStepClick:C,label:w=`Progress`,tone:T=`primary`,linkComponent:E,className:D=``,...O}=m;n(`AppStepper`,O),t(`AppStepper`,`variant`,_,s),t(`AppStepper`,`orientation`,v,c),t(`AppStepper`,`iconVariant`,y,l),t(`AppStepper`,`size`,b,u),t(`AppStepper`,`tone`,T,d);let k=x>0?x:f[b]??f.md;for(let e of g)t(`AppStepper`,`steps[].status`,e.status,p);let A=_===`journey`;return a(`nav`,{className:[`stepper`,A&&`stepper-journey`,v===`vertical`&&`stepper-vertical`,b!==`md`&&u.includes(b)&&`wui-step-size-${b}`,T!==`primary`&&d.includes(T)&&`wui-step-tone-${T}`,D].filter(Boolean).join(` `),"aria-label":w,...e(`AppStepper`,m),...O,children:g.map((e,t)=>{let n=e.status||h(t,S),s=`step${n===`pending`?``:` ${n}`}`,c;c=n===`done`?a(r,{name:`check`,size:k,variant:y}):n===`error`?a(r,{name:`alert-triangle`,size:k,variant:y}):e.icon?a(r,{name:e.icon,size:k,variant:y}):t+1;let l=o(i,{children:[a(`span`,{className:`step-circle`,children:c}),A?o(`span`,{className:`step-text`,children:[a(`span`,{className:`step-index`,children:`Step ${t+1}`}),a(`span`,{className:`step-label`,children:e.label}),e.description?a(`span`,{className:`step-desc`,children:e.description}):null]}):o(i,{children:[a(`span`,{className:`step-label`,children:e.label}),e.description?a(`span`,{className:`step-desc`,children:e.description}):null]})]}),u=n===`active`?`step`:void 0,d=e.key??`${e.label}-${t}`,f;return f=C?a(`button`,{type:`button`,className:s,"aria-current":u,onClick:()=>C(e,t),children:l},d):e.href?E?a(E,{className:s,to:e.href,"aria-current":u,children:l},d):a(`a`,{className:s,href:e.href,"aria-current":u,children:l},d):a(`div`,{className:s,"aria-current":u,children:l},d),A&&t<g.length-1?[f,a(`span`,{className:`step-line${n===`done`?` done`:``}`,"aria-hidden":`true`},`${d}-line`)]:f})})}function h(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}export{m as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.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=[`round`,`pill`,`circle`],o=r(function({label:r,id:o,name:s,error:c,hint:l,shape:u=`round`,className:d=``,...f},p){return t(`AppSwitch`,f),e(`AppSwitch`,`shape`,u,a),i(n,{ref:p,label:r,id:o,name:s,error:c,hint:l,className:d,rest:f,inputType:`checkbox`,wrapperClass:`form-check form-switch${u===`circle`?` form-switch-circle`:u===`pill`?` form-switch-pill`:``}`})});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"../lib/CheckField.js";import{forwardRef as i}from"react";import{jsx as a}from"react/jsx-runtime";var o=[`round`,`pill`,`circle`],s=i(function(i,s){let{label:c,id:l,name:u,error:d,hint:f,shape:p=`round`,className:m=``,...h}=i;n(`AppSwitch`,h),t(`AppSwitch`,`shape`,p,o);let g=`form-check form-switch${p===`circle`?` form-switch-circle`:p===`pill`?` form-switch-pill`:``}`;return a(r,{rootProps:e(`AppSwitch`,i),ref:s,label:c,id:l,name:u,error:d,hint:f,className:m,rest:h,inputType:`checkbox`,wrapperClass:g})});export{s as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.js";import r,{ILLUSTRATION_NAMES as i}from"../lib/emptyIllustration.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({icon:s,illustration:c,title:l,text:u,action:d,...f}){t(`AppTableEmptyState`,f),typeof c==`string`&&e(`AppTableEmptyState`,`illustration`,c,i);let p=typeof c==`string`&&i.includes(c),m=c!=null&&typeof c!=`string`?c:null;return o(`div`,{className:`tbl-empty`,...f,children:[p?a(r,{name:c,className:`wui-empty-illustration`}):m?a(`span`,{className:`wui-empty-illustration wui-empty-illustration-custom`,"aria-hidden":`true`,children:m}):a(`span`,{className:`tbl-empty-icon`,children:n(s,{size:24})}),a(`div`,{className:`tbl-empty-title`,children:l}),u&&a(`div`,{className:`tbl-empty-text`,children:u}),d&&a(`div`,{className:`tbl-empty-action`,children:d})]})}export{s as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./renderIconProp.js";import i,{ILLUSTRATION_NAMES as a}from"../lib/emptyIllustration.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c(c){let{icon:l,illustration:u,title:d,text:f,action:p,...m}=c;n(`AppTableEmptyState`,m),typeof u==`string`&&t(`AppTableEmptyState`,`illustration`,u,a);let h=typeof u==`string`&&a.includes(u),g=u!=null&&typeof u!=`string`?u:null;return s(`div`,{className:`tbl-empty`,...e(`AppTableEmptyState`,c),...m,children:[h?o(i,{name:u,className:`wui-empty-illustration`}):g?o(`span`,{className:`wui-empty-illustration wui-empty-illustration-custom`,"aria-hidden":`true`,children:g}):o(`span`,{className:`tbl-empty-icon`,children:r(l,{size:24})}),o(`div`,{className:`tbl-empty-title`,children:d}),f&&o(`div`,{className:`tbl-empty-text`,children:f}),p&&o(`div`,{className:`tbl-empty-action`,children:p})]})}export{c as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{pageWindow as r}from"../lib/pageWindow.js";import i from"./AppSelectMini.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`numbered`,`prev-next`],c=[5,10,25,50];function l({page:l,totalPages:u,pageSize:d,onPageChange:f,onPageSizeChange:p,pageSizes:m=c,mode:h=`numbered`,showPageSize:g=!0,className:_=``,...v}){t(`AppTablePagination`,v),e(`AppTablePagination`,`mode`,h,s);let y=h===`numbered`,b=y?r(l,u):null;return o(`div`,{className:`table-pagination${_?` ${_}`:``}`,...v,children:[g&&a(`span`,{className:`tpg-rows`,children:a(i,{value:d,onChange:e=>p(Number(e)),ariaLabel:`Rows per page`,options:m.map(e=>({value:e,label:`${e} per page`}))})}),!y&&o(`span`,{className:`tpg-range`,children:[`Page `,l,` of `,u]}),o(`div`,{className:`tpg-nav`,children:[a(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>f(Math.max(1,l-1)),disabled:l<=1,"aria-label":`Previous page`,children:a(n,{name:`arrow-left`,size:18})}),y&&b.map(e=>typeof e==`number`?a(`button`,{type:`button`,className:`tpg-page${e===l?` is-active`:``}`,onClick:()=>f(e),"aria-current":e===l?`page`:void 0,"aria-label":`Page ${e}`,children:e},e):a(`span`,{className:`tpg-ellipsis`,"aria-hidden":`true`,children:`…`},e)),a(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>f(Math.min(u,l+1)),disabled:l>=u,"aria-label":`Next page`,children:a(n,{name:`arrow-right`,size:18})})]})]})}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{pageWindow as i}from"../lib/pageWindow.js";import a from"./AppSelectMini.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`numbered`,`prev-next`],l=[5,10,25,50];function u(u){let{page:d,totalPages:f,pageSize:p,onPageChange:m,onPageSizeChange:h,pageSizes:g=l,mode:_=`numbered`,showPageSize:v=!0,className:y=``,...b}=u;n(`AppTablePagination`,b),t(`AppTablePagination`,`mode`,_,c);let x=_===`numbered`,S=x?i(d,f):null;return s(`div`,{className:`table-pagination${y?` ${y}`:``}`,...e(`AppTablePagination`,u),...b,children:[v&&o(`span`,{className:`tpg-rows`,children:o(a,{value:p,onChange:e=>h(Number(e)),ariaLabel:`Rows per page`,options:g.map(e=>({value:e,label:`${e} per page`}))})}),!x&&s(`span`,{className:`tpg-range`,children:[`Page `,d,` of `,f]}),s(`div`,{className:`tpg-nav`,children:[o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>m(Math.max(1,d-1)),disabled:d<=1,"aria-label":`Previous page`,children:o(r,{name:`arrow-left`,size:18})}),x&&S.map(e=>typeof e==`number`?o(`button`,{type:`button`,className:`tpg-page${e===d?` is-active`:``}`,onClick:()=>m(e),"aria-current":e===d?`page`:void 0,"aria-label":`Page ${e}`,children:e},e):o(`span`,{className:`tpg-ellipsis`,"aria-hidden":`true`,children:`…`},e)),o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>m(Math.min(f,d+1)),disabled:d>=f,"aria-label":`Next page`,children:o(r,{name:`arrow-right`,size:18})})]})]})}export{u as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import{formatNumber as t}from"@webority/ui-elements/helpers";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({filters:i,actions:a,selectedCount:o=0,bulkActions:s,onClearSelection:c,totalCount:l,pageCount:u,onSelectAllMatching:d,allMatchingSelected:f=!1,className:p=``,...m}){e(`AppTableToolbar`,m);let h=o>0,g=typeof d==`function`&&typeof l==`number`,_=g&&f,v=e=>t(e,{decimals:0}),y=g&&!_&&h&&o>=(u??1)&&l>(u??o);return r(`div`,{className:`wui-table-toolbar${p?` ${p}`:``}`,...m,children:[r(`div`,{className:`wui-table-toolbar-main`,hidden:h,children:[n(`div`,{className:`wui-table-toolbar-filters`,children:i}),n(`div`,{className:`wui-table-toolbar-actions`,children:a})]}),r(`div`,{className:`wui-table-toolbar-bulk`,hidden:!h,children:[r(`span`,{className:`wui-table-toolbar-count`,"aria-live":`polite`,children:[_?`All ${v(l)}`:v(o),` selected`]}),g&&r(`button`,{type:`button`,className:`btn btn-link btn-sm wui-table-toolbar-all`,hidden:!y,onClick:d,children:[`Select all `,v(l),` matching`]}),s,c&&n(`button`,{type:`button`,className:`btn btn-ghost btn-sm wui-table-toolbar-clear`,onClick:c,children:_?`Clear selection`:`Clear`})]})]})}export{i as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{formatNumber as n}from"@webority/ui-elements/helpers";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{filters:o,actions:s,selectedCount:c=0,bulkActions:l,onClearSelection:u,totalCount:d,pageCount:f,onSelectAllMatching:p,allMatchingSelected:m=!1,className:h=``,...g}=a;t(`AppTableToolbar`,g);let _=c>0,v=typeof p==`function`&&typeof d==`number`,y=v&&m,b=e=>n(e,{decimals:0}),x=v&&!y&&_&&c>=(f??1)&&d>(f??c);return i(`div`,{className:`wui-table-toolbar${h?` ${h}`:``}`,...e(`AppTableToolbar`,a),...g,children:[i(`div`,{className:`wui-table-toolbar-main`,hidden:_,children:[r(`div`,{className:`wui-table-toolbar-filters`,children:o}),r(`div`,{className:`wui-table-toolbar-actions`,children:s})]}),i(`div`,{className:`wui-table-toolbar-bulk`,hidden:!_,children:[i(`span`,{className:`wui-table-toolbar-count`,"aria-live":`polite`,children:[y?`All ${b(d)}`:b(c),` selected`]}),v&&i(`button`,{type:`button`,className:`btn btn-link btn-sm wui-table-toolbar-all`,hidden:!x,onClick:p,children:[`Select all `,b(d),` matching`]}),l,u&&r(`button`,{type:`button`,className:`btn btn-ghost btn-sm wui-table-toolbar-clear`,onClick:u,children:y?`Clear selection`:`Clear`})]})]})}export{a as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppTooltip.js";import r from"./AppIcon.js";import i from"./renderIconProp.js";import{formatNumber as a}from"@webority/ui-elements/helpers";import{useCallback as o,useEffect as s,useLayoutEffect as c,useRef as l,useState as ee}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/overflow";var te=[`underline`,`pills`],p=[`horizontal`,`vertical`],m=[`sm`,`md`,`lg`],h=[`automatic`,`manual`],g=[`scroll`,`menu`],_=[`success`,`warning`,`danger`,`info`],v=1,y=28,ne=.7;function b({tabs:b,value:x,onChange:S,linkComponent:C,variant:w=`underline`,orientation:T=`horizontal`,size:E=`md`,fitted:D=!1,overflow:O=`scroll`,moreLabel:k=`More`,maxVisible:A,activation:j=`automatic`,ariaLabel:M,className:N=``,style:P,...F}){t(`AppTabs`,F),e(`AppTabs`,`variant`,w,te),e(`AppTabs`,`orientation`,T,p),e(`AppTabs`,`size`,E,m),e(`AppTabs`,`activation`,j,h),e(`AppTabs`,`overflow`,O,g);for(let t of b)e(`AppTabs`,`tabs[].tone`,t.tone,_);let I=l(null),L=l(null),R=T===`vertical`,z=(O===`menu`||A!=null)&&!R,[B,V]=ee(x);s(()=>{V(x)},[x]);let H=b.find(e=>!e.disabled)?.key,U=b.some(e=>e.key===B&&!e.disabled)?B:void 0,W=b.some(e=>e.key===x&&!e.disabled)?x:void 0,G=U??W??H,K=e=>{I.current?.querySelector(`[data-key="${CSS.escape(String(e))}"]`)?.focus()},q=o(()=>{let e=I.current,t=L.current;if(!e||!t||R||z)return;let n=e.scrollWidth-e.clientWidth;t.classList.toggle(`is-overflow-start`,e.scrollLeft>v),t.classList.toggle(`is-overflow-end`,n>v&&e.scrollLeft<n-v)},[R,z]),J=o(()=>{let e=I.current;if(!e)return;let t=e.querySelector(`.app-tab.active`);t?(R?(e.style.setProperty(`--wui-tab-y`,`${t.offsetTop}px`),e.style.setProperty(`--wui-tab-h`,`${t.offsetHeight}px`)):(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.toggleAttribute(`data-active-danger`,!!b.find(e=>e.key===x)?.danger)):e.style.setProperty(R?`--wui-tab-h`:`--wui-tab-w`,`0px`),e.setAttribute(`data-wui-tabs`,``),q()},[R,b,x,q]),Y=e=>!z||!I.current?.querySelector(`[data-key="${CSS.escape(String(e))}"][data-wui-overflow-hidden]`),X=o(()=>{let e=I.current;if(!e||R)return;let t=e.querySelector(`.app-tab.active`);if(!t)return;let n=y,r=t.offsetLeft,i=r+t.offsetWidth;r-n<e.scrollLeft?e.scrollLeft=Math.max(0,r-n):i+n>e.scrollLeft+e.clientWidth&&(e.scrollLeft=i+n-e.clientWidth)},[R]);c(()=>{J()},[J]),c(()=>{X()},[x,X]);let Z=l(J);s(()=>{Z.current=J},[J]),s(()=>{if(!document.fonts)return;let e=!0;return document.fonts.ready.then(()=>{e&&Z.current()}),()=>{e=!1}},[]),s(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>Z.current());return I.current&&e.observe(I.current),L.current&&e.observe(L.current),()=>e.disconnect()},[R,z]),s(()=>{let e=L.current;if(!z||!e)return;let t=()=>Z.current();return e.addEventListener(`wui-overflow-change`,t),()=>e.removeEventListener(`wui-overflow-change`,t)},[z]);function re(e){let t=e.target?.dataset?.key;if(t==null)return;let n=b.findIndex(e=>e.key===t);if(n<0)return;let r=b.length,i=(e,t)=>{for(let n=1;n<=r;n++){let i=b[((e+t*n)%r+r)%r];if(!i.disabled&&Y(i.key))return i}return null},a=R?`ArrowDown`:`ArrowRight`,o=R?`ArrowUp`:`ArrowLeft`,s=null;if(e.key===a?s=i(n,1):e.key===o?s=i(n,-1):e.key===`Home`?s=b.find(e=>!e.disabled&&Y(e.key))??null:e.key===`End`&&(s=[...b].reverse().find(e=>!e.disabled&&Y(e.key))??null),!s)return;e.preventDefault(),V(s.key),K(s.key);let c=s.href!=null||s.to!=null;j===`automatic`&&!c&&S?.(s.key)}let Q=e=>{let t=I.current;t&&t.scrollBy({left:e*t.clientWidth*ne})},ie=[`app-tabs`,w===`pills`?`app-tabs-pills`:``,R?`app-tabs-vertical`:``,E===`sm`?`app-tabs-sm`:``,E===`lg`?`app-tabs-lg`:``,D?`app-tabs-fitted`:``,N].filter(Boolean).join(` `),$=f(`div`,{ref:I,role:`tablist`,"aria-orientation":R?`vertical`:void 0,"aria-label":M,className:ie,style:P,"data-wui-overflow-list":z?``:void 0,...F,onKeyDown:re,onScroll:q,children:[b.map(e=>{let t=e.key===x,r=e.href!=null||e.to!=null,o={role:`tab`,"data-key":e.key,"aria-selected":t,tabIndex:e.key===G?0:-1,className:`app-tab${t?` active`:``}${e.danger?` danger`:``}${r&&e.disabled?` disabled`:``}`},s=f(u,{children:[e.image?d(`img`,{className:`app-tab-img`,src:e.image,alt:e.imageAlt??``}):i(e.icon,{size:16,className:`app-tab-icon`}),e.label,(e.countLabel||e.count!=null)&&d(`span`,{className:`app-tab-count${e.tone?` ${e.tone}`:``}`,children:e.countLabel||a(e.count,{decimals:0})})]}),c;if(r){let t=e.to!=null&&C?C:`a`,n=e.rel??(e.target===`_blank`?`noopener noreferrer`:void 0),r=e.disabled?{"aria-disabled":!0}:t===`a`?{href:e.href??e.to,target:e.target,rel:n}:{to:e.to,target:e.target,rel:n},i=t=>{if(e.disabled){t.preventDefault();return}t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(V(e.key),S?.(e.key))};c=d(t,{...o,...r,onClick:i,children:s},e.key)}else c=d(`button`,{type:`button`,...o,disabled:e.disabled,onClick:()=>{e.disabled||(V(e.key),S?.(e.key))},children:s},e.key);return e.tooltip?d(n,{content:e.tooltip,children:c},e.key):c}),d(`span`,{className:`app-tab-indicator`,"aria-hidden":`true`,"data-wui-overflow-skip":``})]});return R?$:z?d(`wui-overflow`,{ref:L,class:`app-tabs-wrap`,label:k,children:$}):f(`div`,{ref:L,className:`app-tabs-wrap`,children:[d(`button`,{type:`button`,className:`app-tabs-scroll-btn prev`,"aria-label":`Scroll tabs backward`,tabIndex:-1,onClick:()=>Q(-1),children:d(r,{name:`chevron-left`,size:16})}),$,d(`button`,{type:`button`,className:`app-tabs-scroll-btn next`,"aria-label":`Scroll tabs forward`,tabIndex:-1,onClick:()=>Q(1),children:d(r,{name:`chevron-right`,size:16})})]})}export{b as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppTooltip.js";import i from"./AppIcon.js";import a from"./renderIconProp.js";import{formatNumber as o}from"@webority/ui-elements/helpers";import{cloneElement as s,useCallback as c,useEffect as l,useLayoutEffect as u,useRef as d,useState as ee}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";import"@webority/ui-elements/elements/overflow";var h=[`underline`,`pills`],g=[`horizontal`,`vertical`],te=[`sm`,`md`,`lg`],ne=[`automatic`,`manual`],re=[`scroll`,`menu`],_=[`success`,`warning`,`danger`,`info`],v=1,y=28,b=.7;function x(x){let{tabs:S,value:C,onChange:w,linkComponent:T,variant:E=`underline`,orientation:D=`horizontal`,size:O=`md`,fitted:k=!1,overflow:A=`scroll`,moreLabel:j=`More`,maxVisible:M,activation:N=`automatic`,ariaLabel:ie,className:ae=``,style:P,...F}=x;n(`AppTabs`,F),t(`AppTabs`,`variant`,E,h),t(`AppTabs`,`orientation`,D,g),t(`AppTabs`,`size`,O,te),t(`AppTabs`,`activation`,N,ne),t(`AppTabs`,`overflow`,A,re);for(let e of S)t(`AppTabs`,`tabs[].tone`,e.tone,_);let I=d(null),L=d(null),R=D===`vertical`,z=(A===`menu`||M!=null)&&!R,[B,V]=ee(C);l(()=>{V(C)},[C]);let H=S.find(e=>!e.disabled)?.key,U=S.some(e=>e.key===B&&!e.disabled)?B:void 0,W=S.some(e=>e.key===C&&!e.disabled)?C:void 0,G=U??W??H,K=e=>{I.current?.querySelector(`[data-key="${CSS.escape(String(e))}"]`)?.focus()},q=c(()=>{let e=I.current,t=L.current;if(!e||!t||R||z)return;let n=e.scrollWidth-e.clientWidth;t.classList.toggle(`is-overflow-start`,e.scrollLeft>v),t.classList.toggle(`is-overflow-end`,n>v&&e.scrollLeft<n-v)},[R,z]),J=c(()=>{let e=I.current;if(!e)return;let t=e.querySelector(`.app-tab.active`);t?(R?(e.style.setProperty(`--wui-tab-y`,`${t.offsetTop}px`),e.style.setProperty(`--wui-tab-h`,`${t.offsetHeight}px`)):(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.toggleAttribute(`data-active-danger`,!!S.find(e=>e.key===C)?.danger)):e.style.setProperty(R?`--wui-tab-h`:`--wui-tab-w`,`0px`),e.setAttribute(`data-wui-tabs`,``),q()},[R,S,C,q]),Y=e=>!z||!I.current?.querySelector(`[data-key="${CSS.escape(String(e))}"][data-wui-overflow-hidden]`),X=c(()=>{let e=I.current;if(!e||R)return;let t=e.querySelector(`.app-tab.active`);if(!t)return;let n=y,r=t.offsetLeft,i=r+t.offsetWidth;r-n<e.scrollLeft?e.scrollLeft=Math.max(0,r-n):i+n>e.scrollLeft+e.clientWidth&&(e.scrollLeft=i+n-e.clientWidth)},[R]);u(()=>{J()},[J]),u(()=>{X()},[C,X]);let Z=d(J);l(()=>{Z.current=J},[J]),l(()=>{if(!document.fonts)return;let e=!0;return document.fonts.ready.then(()=>{e&&Z.current()}),()=>{e=!1}},[]),l(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>Z.current());return I.current&&e.observe(I.current),L.current&&e.observe(L.current),()=>e.disconnect()},[R,z]),l(()=>{let e=L.current;if(!z||!e)return;let t=()=>Z.current();return e.addEventListener(`wui-overflow-change`,t),()=>e.removeEventListener(`wui-overflow-change`,t)},[z]);function oe(e){let t=e.target?.dataset?.key;if(t==null)return;let n=S.findIndex(e=>e.key===t);if(n<0)return;let r=S.length,i=(e,t)=>{for(let n=1;n<=r;n++){let i=S[((e+t*n)%r+r)%r];if(!i.disabled&&Y(i.key))return i}return null},a=R?`ArrowDown`:`ArrowRight`,o=R?`ArrowUp`:`ArrowLeft`,s=null;if(e.key===a?s=i(n,1):e.key===o?s=i(n,-1):e.key===`Home`?s=S.find(e=>!e.disabled&&Y(e.key))??null:e.key===`End`&&(s=[...S].reverse().find(e=>!e.disabled&&Y(e.key))??null),!s)return;e.preventDefault(),V(s.key),K(s.key);let c=s.href!=null||s.to!=null;N===`automatic`&&!c&&w?.(s.key)}let Q=e=>{let t=I.current;t&&t.scrollBy({left:e*t.clientWidth*b})},se=[`app-tabs`,E===`pills`?`app-tabs-pills`:``,R?`app-tabs-vertical`:``,O===`sm`?`app-tabs-sm`:``,O===`lg`?`app-tabs-lg`:``,k?`app-tabs-fitted`:``,ae].filter(Boolean).join(` `),$=m(`div`,{ref:I,role:`tablist`,"aria-orientation":R?`vertical`:void 0,"aria-label":ie,className:se,style:P,"data-wui-overflow-list":z?``:void 0,...F,onKeyDown:oe,onScroll:q,children:[S.map(e=>{let t=e.key===C,n=e.href!=null||e.to!=null,i={role:`tab`,"data-key":e.key,"aria-selected":t,tabIndex:e.key===G?0:-1,className:`app-tab${t?` active`:``}${e.danger?` danger`:``}${n&&e.disabled?` disabled`:``}`},s=m(f,{children:[e.image?p(`img`,{className:`app-tab-img`,src:e.image,alt:e.imageAlt??``}):a(e.icon,{size:16,className:`app-tab-icon`}),e.label,(e.countLabel||e.count!=null)&&p(`span`,{className:`app-tab-count${e.tone?` ${e.tone}`:``}`,children:e.countLabel||o(e.count,{decimals:0})})]}),c;if(n){let t=e.to!=null&&T?T:`a`,n=e.rel??(e.target===`_blank`?`noopener noreferrer`:void 0),r=e.disabled?{"aria-disabled":!0}:t===`a`?{href:e.href??e.to,target:e.target,rel:n}:{to:e.to,target:e.target,rel:n},a=t=>{if(e.disabled){t.preventDefault();return}t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(V(e.key),w?.(e.key))};c=p(t,{...i,...r,onClick:a,children:s},e.key)}else c=p(`button`,{type:`button`,...i,disabled:e.disabled,onClick:()=>{e.disabled||(V(e.key),w?.(e.key))},children:s},e.key);return e.tooltip?p(r,{content:e.tooltip,children:c},e.key):c}),p(`span`,{className:`app-tab-indicator`,"aria-hidden":`true`,"data-wui-overflow-skip":``})]});return R?s($,e(`AppTabs`,x)):z?p(`wui-overflow`,{...e(`AppTabs`,x),ref:L,class:`app-tabs-wrap`,label:j,children:$}):m(`div`,{...e(`AppTabs`,x),ref:L,className:`app-tabs-wrap`,children:[p(`button`,{type:`button`,className:`app-tabs-scroll-btn prev`,"aria-label":`Scroll tabs backward`,tabIndex:-1,onClick:()=>Q(-1),children:p(i,{name:`chevron-left`,size:16})}),$,p(`button`,{type:`button`,className:`app-tabs-scroll-btn next`,"aria-label":`Scroll tabs forward`,tabIndex:-1,onClick:()=>Q(1),children:p(i,{name:`chevron-right`,size:16})})]})}export{x 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,{readValues as o,writeValues as s}from"./useWuiControl.js";import{forwardRef as c,useId as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import"@webority/ui-elements/elements/taginput";var f=[`sm`,`lg`],p=c(function({values:c,onChange:p,placeholder:m=`Add…`,name:h,label:g,error:_,hint:v,required:y=!1,size:b,maxTags:x,allowDuplicates:S=!1,disabled:C=!1,id:w,ariaLabel:T,className:E=``,fieldClassName:D=``,help:O,helpLabel:k=`More information`,...A},j){t(`AppTagInput`,A),e(`AppTagInput`,`size`,b,f);let M=l(),N=w||M,{setRef:P}=a({ref:j,value:c,onChange:p,readValue:o,writeValue:s});return d(`div`,{className:`field${D?` ${D}`:``}`,children:[g&&d(`label`,{className:`label`,htmlFor:N,children:[g,y&&u(i,{}),O&&u(r,{label:k,children:O})]}),u(`wui-taginput`,{"aria-label":T||(typeof g==`string`?g:void 0),"aria-describedby":_?`${N}-error`:v?`${N}-hint`:void 0,"aria-invalid":_?`true`:void 0,id:N,ref:P,name:h,placeholder:m,size:b||void 0,"max-tags":x===void 0?void 0:String(x),"allow-duplicates":S?``:void 0,disabled:C?``:void 0,required:y?``:void 0,className:E||void 0,...A}),u(n,{error:_,hint:v,errorId:`${N}-error`,hintId:`${N}-hint`})]})});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"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o,{readValues as s,writeValues as c}from"./useWuiControl.js";import{forwardRef as l,useId as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/taginput";var p=[`sm`,`lg`],m=l(function(l,m){let{values:h,onChange:g,placeholder:_=`Add…`,name:v,label:y,error:b,hint:x,required:S=!1,size:C,maxTags:w,allowDuplicates:T=!1,disabled:E=!1,id:D,ariaLabel:O,className:k=``,fieldClassName:A=``,help:j,helpLabel:M=`More information`,...N}=l;n(`AppTagInput`,N),t(`AppTagInput`,`size`,C,p);let P=u(),F=D||P,{setRef:I}=o({ref:m,value:h,onChange:g,readValue:s,writeValue:c});return f(`div`,{...e(`AppTagInput`,l),className:`field${A?` ${A}`:``}`,children:[y&&f(`label`,{className:`label`,htmlFor:F,children:[y,S&&d(a,{}),j&&d(i,{label:M,children:j})]}),d(`wui-taginput`,{"aria-label":O||(typeof y==`string`?y:void 0),"aria-describedby":b?`${F}-error`:x?`${F}-hint`:void 0,"aria-invalid":b?`true`:void 0,id:F,ref:I,name:v,placeholder:_,size:C||void 0,"max-tags":w===void 0?void 0:String(w),"allow-duplicates":T?``:void 0,disabled:E?``:void 0,required:S?``:void 0,className:k||void 0,...N}),d(r,{error:b,hint:x,errorId:`${F}-error`,hintId:`${F}-hint`})]})});export{m as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"../lib/FieldMessage.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import{forwardRef as i,useCallback as a,useEffect as o,useId as s,useLayoutEffect as c,useRef as l,useState as u}from"react";import{Form as d}from"react-bootstrap";import{jsx as f,jsxs as p}from"react/jsx-runtime";var m=i(function({label:i,required:m=!1,error:h,hint:g,help:_,helpLabel:v=`More information`,id:y,name:b,rows:x=4,autoGrow:S=!1,showCount:C=!1,maxLength:w,disabled:T=!1,readOnly:E=!1,className:D=``,fieldClassName:O=``,...k},A){e(`AppTextarea`,k);let j=s(),M=y||j,N=[`textarea`,S?`autosize`:``,h?`error`:``,D].filter(Boolean).join(` `),P=h&&M?`${M}-error`:void 0,F=g&&M?`${M}-hint`:void 0,I=P||F,L=l(null),R=e=>{L.current=e,typeof A==`function`?A(e):A&&(A.current=e)},z=a(()=>{let e=L.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[]);c(()=>{S&&z()},[S,z,k.value]);let[B,V]=u(()=>String(k.value??k.defaultValue??``).length);o(()=>{!C||k.value===void 0||V(String(k.value??``).length)},[k.value,C]);let H=e=>{S&&z(),C&&V(e.target.value.length),k.onInput?.(e)};return p(d.Group,{className:`field${O?` ${O}`:``}`,children:[i&&p(d.Label,{className:`label`,htmlFor:M,children:[i,m&&f(r,{}),_&&f(n,{label:v,children:_})]}),f(d.Control,{as:`textarea`,id:M,name:b,rows:x,className:N,"aria-invalid":h?`true`:`false`,"aria-describedby":I,required:m,maxLength:w,disabled:T,readOnly:E,...k,ref:R,onInput:H}),f(t,{error:h,hint:g,errorId:P,hintId:F}),C&&p(`div`,{className:`field-count${w&&B>=w?` at-limit`:``}`,children:[B,w?` / ${w}`:``]})]})});export{m as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"../lib/FieldMessage.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import{forwardRef as a,useCallback as o,useEffect as s,useId as c,useLayoutEffect as l,useRef as u,useState as d}from"react";import{Form as f}from"react-bootstrap";import{jsx as p,jsxs as m}from"react/jsx-runtime";var h=a(function(a,h){let{label:g,required:_=!1,error:v,hint:y,help:b,helpLabel:x=`More information`,id:S,name:C,rows:w=4,autoGrow:T=!1,showCount:E=!1,maxLength:D,disabled:O=!1,readOnly:k=!1,className:A=``,fieldClassName:j=``,...M}=a;t(`AppTextarea`,M);let N=c(),P=S||N,F=[`textarea`,T?`autosize`:``,v?`error`:``,A].filter(Boolean).join(` `),I=v&&P?`${P}-error`:void 0,L=y&&P?`${P}-hint`:void 0,R=I||L,z=u(null),B=e=>{z.current=e,typeof h==`function`?h(e):h&&(h.current=e)},V=o(()=>{let e=z.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[]);l(()=>{T&&V()},[T,V,M.value]);let[H,U]=d(()=>String(M.value??M.defaultValue??``).length);s(()=>{!E||M.value===void 0||U(String(M.value??``).length)},[M.value,E]);let W=e=>{T&&V(),E&&U(e.target.value.length),M.onInput?.(e)};return m(f.Group,{...e(`AppTextarea`,a),className:`field${j?` ${j}`:``}`,children:[g&&m(f.Label,{className:`label`,htmlFor:P,children:[g,_&&p(i,{}),b&&p(r,{label:x,children:b})]}),p(f.Control,{as:`textarea`,id:P,name:C,rows:w,className:F,"aria-invalid":v?`true`:`false`,"aria-describedby":R,required:_,maxLength:D,disabled:O,readOnly:k,...M,ref:B,onInput:W}),p(n,{error:v,hint:y,errorId:I,hintId:L}),E&&m(`div`,{className:`field-count${D&&H>=D?` at-limit`:``}`,children:[H,D?` / ${D}`:``]})]})});export{h as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppActionIcon.js";import r from"./AppSegmented.js";import{DEFAULT_THEME_EFFECT as i,DEFAULT_THEME_STORAGE_KEY as a,THEME_CHANGE_EVENT as o,THEME_EFFECTS as s,THEME_MODES as c,applyTheme as l,nextTheme as u,readStoredTheme as d,resolveTheme as f,storeTheme as p,transitionTheme as m,watchSystemTheme as h}from"@webority/ui-elements/helpers";import{useCallback as g,useEffect as _,useId as v,useState as y}from"react";import{jsx as b}from"react/jsx-runtime";import{flushSync as x}from"react-dom";var S={light:`sun`,dark:`moon`,auto:`monitor`},C={light:`light`,dark:`dark`,auto:`follows your device`},w=[`icon`,`segmented`],T={sm:16,md:20,lg:24,xl:28};function E({variant:E=`icon`,effect:D=i,includeAuto:O=!0,storageKey:k=a,duration:A,label:j=`Theme`,lightLabel:M=`Light`,darkLabel:N=`Dark`,autoLabel:P=`System`,name:F,size:I=`md`,tooltipPlacement:L=`auto`,onChange:R,className:z=``,...B}){t(`AppThemeToggle`,B),e(`AppThemeToggle`,`variant`,E,w),e(`AppThemeToggle`,`effect`,D,s),e(`AppThemeToggle`,`size`,I,Object.keys(T));let V=g(e=>e===`auto`&&!O?f(e):e,[O]),[H,U]=y(()=>V(typeof window>`u`?`auto`:d(k))),W=v(),G=F||W;_(()=>{let e=document.documentElement.getAttribute(`data-theme`);c.includes(e)?U(V(e)):l(d(k))},[]),_(()=>{let e=e=>{let t=e.detail?.preference;c.includes(t)&&U(V(t))};return document.addEventListener(o,e),()=>document.removeEventListener(o,e)},[V]),_(()=>h(()=>{document.documentElement.getAttribute(`data-theme`)===`auto`&&l(`auto`)}),[]);let K=g((e,t)=>{let n=t?.getBoundingClientRect?.()??{left:0,top:0,width:0,height:0},r={x:n.left+n.width/2,y:n.top+n.height/2};m(()=>{l(e),p(e,k),x(()=>U(e)),R?.(e)},{effect:D,to:f(e),origin:r,duration:A})},[k,D,A,R]);if(E===`segmented`){let e=[{value:`light`,label:M,icon:S.light},{value:`dark`,label:N,icon:S.dark}];return O&&e.push({value:`auto`,label:P,icon:S.auto}),b(r,{options:e,value:H,name:G,label:j,size:I===`xl`?`lg`:I,className:[`wui-theme-toggle`,`wui-theme-toggle-segmented`,z].filter(Boolean).join(` `),onChange:e=>{if(e===H)return;let t=document.querySelector(`.segmented-input[name="${CSS.escape(G)}"][value="${e}"]`);K(e,t?.closest(`.segmented-option`)??t)}})}return b(n,{icon:S[H],label:`${j}: ${C[H]}`,size:T[I]??T.md,tooltipPlacement:L,onClick:e=>K(u(H,{includeAuto:O}),e.currentTarget),className:[`wui-theme-toggle`,z].filter(Boolean).join(` `)})}export{E as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppActionIcon.js";import i from"./AppSegmented.js";import{DEFAULT_THEME_EFFECT as a,DEFAULT_THEME_STORAGE_KEY as o,THEME_CHANGE_EVENT as s,THEME_EFFECTS as c,THEME_MODES as l,applyTheme as u,nextTheme as d,readStoredTheme as f,resolveTheme as p,storeTheme as m,transitionTheme as h,watchSystemTheme as g}from"@webority/ui-elements/helpers";import{useCallback as _,useEffect as v,useId as y,useState as b}from"react";import{jsx as x}from"react/jsx-runtime";import{flushSync as S}from"react-dom";var C={light:`sun`,dark:`moon`,auto:`monitor`},w={light:`light`,dark:`dark`,auto:`follows your device`},T=[`icon`,`segmented`],E={sm:16,md:20,lg:24,xl:28};function D(D){let{variant:O=`icon`,effect:k=a,includeAuto:A=!0,storageKey:j=o,duration:M,label:N=`Theme`,lightLabel:P=`Light`,darkLabel:F=`Dark`,autoLabel:I=`System`,name:L,size:R=`md`,tooltipPlacement:z=`auto`,onChange:B,className:V=``,...H}=D;n(`AppThemeToggle`,H),t(`AppThemeToggle`,`variant`,O,T),t(`AppThemeToggle`,`effect`,k,c),t(`AppThemeToggle`,`size`,R,Object.keys(E));let U=_(e=>e===`auto`&&!A?p(e):e,[A]),[W,G]=b(()=>U(typeof window>`u`?`auto`:f(j))),K=y(),q=L||K;v(()=>{let e=document.documentElement.getAttribute(`data-theme`);l.includes(e)?G(U(e)):u(f(j))},[]),v(()=>{let e=e=>{let t=e.detail?.preference;l.includes(t)&&G(U(t))};return document.addEventListener(s,e),()=>document.removeEventListener(s,e)},[U]),v(()=>g(()=>{document.documentElement.getAttribute(`data-theme`)===`auto`&&u(`auto`)}),[]);let J=_((e,t)=>{let n=t?.getBoundingClientRect?.()??{left:0,top:0,width:0,height:0},r={x:n.left+n.width/2,y:n.top+n.height/2};h(()=>{u(e),m(e,j),S(()=>G(e)),B?.(e)},{effect:k,to:p(e),origin:r,duration:M})},[j,k,M,B]);if(O===`segmented`){let t=[{value:`light`,label:P,icon:C.light},{value:`dark`,label:F,icon:C.dark}];return A&&t.push({value:`auto`,label:I,icon:C.auto}),x(i,{...e(`AppThemeToggle`,D),options:t,value:W,name:q,label:N,size:R===`xl`?`lg`:R,className:[`wui-theme-toggle`,`wui-theme-toggle-segmented`,V].filter(Boolean).join(` `),onChange:e=>{if(e===W)return;let t=document.querySelector(`.segmented-input[name="${CSS.escape(q)}"][value="${e}"]`);J(e,t?.closest(`.segmented-option`)??t)}})}return x(r,{...e(`AppThemeToggle`,D),icon:C[W],label:`${N}: ${w[W]}`,size:E[R]??E.md,tooltipPlacement:z,onClick:e=>J(d(W,{includeAuto:A}),e.currentTarget),className:[`wui-theme-toggle`,V].filter(Boolean).join(` `)})}export{D 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"./useWuiControl.js";import{forwardRef as o,useId as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/timepicker";var u=[`sm`,`md`,`lg`],d=[`12`,`24`],f=o(function({value:o,onChange:f,label:p,required:m=!1,hint:h,error:g,help:_,helpLabel:v=`More information`,name:y,min:b,max:x,step:S,format:C=`24`,placeholder:w=`Select time`,disabled:T,size:E,id:D,ariaLabel:O,className:k=``,fieldClassName:A=``,...j},M){t(`AppTimePicker`,j),e(`AppTimePicker`,`size`,E,u),e(`AppTimePicker`,`format`,C,d);let N=s(),P=D||y||N,{setRef:F}=a({ref:M,value:o??``,onChange:f}),I=!p&&!g&&!h,L=g?`${P}-error`:void 0,R=h?`${P}-hint`:void 0,z=c(`wui-timepicker`,{ref:F,id:P,name:y,min:b,max:x,step:S==null?void 0:String(S),format:C,placeholder:w,size:E||void 0,"aria-label":O||(typeof p==`string`?p:void 0),"aria-describedby":L||R,"aria-invalid":g?`true`:void 0,disabled:T?``:void 0,required:m?``:void 0,className:k||void 0,...j});return I?z:l(`div`,{className:`field${A?` ${A}`:``}`,children:[p&&l(`label`,{className:`label`,htmlFor:P,children:[p,m&&c(i,{}),_&&c(r,{label:v,children:_})]}),z,c(n,{error:g,hint:h,errorId:L,hintId:R})]})});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"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o from"./useWuiControl.js";import{cloneElement as s,forwardRef as c,useId as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import"@webority/ui-elements/elements/timepicker";var f=[`sm`,`md`,`lg`],p=[`12`,`24`],m=c(function(c,m){let{value:h,onChange:g,label:_,required:v=!1,hint:y,error:b,help:x,helpLabel:S=`More information`,name:C,min:w,max:T,step:E,format:D=`24`,placeholder:O=`Select time`,disabled:k,size:A,id:j,ariaLabel:M,className:N=``,fieldClassName:P=``,...F}=c;n(`AppTimePicker`,F),t(`AppTimePicker`,`size`,A,f),t(`AppTimePicker`,`format`,D,p);let I=l(),L=j||C||I,{setRef:R}=o({ref:m,value:h??``,onChange:g}),z=!_&&!b&&!y,B=b?`${L}-error`:void 0,V=y?`${L}-hint`:void 0,H=u(`wui-timepicker`,{ref:R,id:L,name:C,min:w,max:T,step:E==null?void 0:String(E),format:D,placeholder:O,size:A||void 0,"aria-label":M||(typeof _==`string`?_:void 0),"aria-describedby":B||V,"aria-invalid":b?`true`:void 0,disabled:k?``:void 0,required:v?``:void 0,className:N||void 0,...F});return z?s(H,e(`AppTimePicker`,c)):d(`div`,{...e(`AppTimePicker`,c),className:`field${P?` ${P}`:``}`,children:[_&&d(`label`,{className:`label`,htmlFor:L,children:[_,v&&u(a,{}),x&&u(i,{label:S,children:x})]}),H,u(r,{error:b,hint:y,errorId:B,hintId:V})]})});export{m as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=[`feed`,`progress`,`steps`],o=[`vertical`,`horizontal`],s=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],c=[`neutral`,`success`,`warning`,`danger`,`info`],l=[`sm`,`md`,`lg`],u={done:`check`,current:`clock`,"on-hold":`lock`,rejected:`x`,cancelled:`minus`,skipped:`arrow-right`,upcoming:null},d=e=>typeof e==`string`&&(/^https?:[/][/]/i.test(e)||e.startsWith(`/`)&&e[1]!==`/`&&e[1]!==`\\`)&&![...e].some(e=>e.charCodeAt(0)<=32||e.charCodeAt(0)===127);function f(e){if(!(e.byHref==null||e.byHref===``)){if(!d(e.byHref))throw Error(`<AppTimeline> items[].byHref must be a path starting with one '/', or an http:// or https:// address, with no spaces.`);if(!e.by)throw Error(`<AppTimeline> items[].byHref links the by name, so the item needs by.`)}}var p=e=>e.byHref?r(`a`,{className:`timeline-by-link`,href:e.byHref,children:e.by}):e.by;function m({items:d=[],variant:m=`feed`,orientation:h,iconVariant:g,size:_,className:v=``,style:y,...b}){t(`AppTimeline`,b),e(`AppTimeline`,`variant`,m,a),e(`AppTimeline`,`orientation`,h,o),e(`AppTimeline`,`iconVariant`,g,s),e(`AppTimeline`,`size`,typeof _==`string`?_:null,l);for(let t of d)e(`AppTimeline`,`items[].tone`,t.tone,c),f(t),m===`progress`&&e(`AppTimeline`,`items[].status`,t.status,Object.keys(u));let x=m===`progress`,S=m===`steps`,C=h===`horizontal`,w=g??(S?`bulk`:void 0),T=typeof _==`string`&&l.includes(_)?_:`md`,E=typeof _==`number`&&_>0?_:void 0,D=!E&&T!==`md`?` wui-timeline--${T}`:``,O=`${S?`timeline wui-timeline--steps${h===`vertical`?` wui-timeline--steps-vertical`:``}`:`timeline${x?` timeline--progress`:``}${C?` timeline--horizontal`:``}`}${D}${v?` ${v}`:``}`,k=S?E?Math.round(E*.43):{sm:19,md:24,lg:31}[T]:E?Math.round(E*.54):x?{sm:10,md:13,lg:17}[T]:{sm:10,md:12,lg:17}[T];return r(`ol`,{className:O,style:E?{...y,"--wui-timeline-dot":`${E}px`}:y,...b,children:d.map((e,t)=>{let a=e.tone&&e.tone!==`neutral`?` ${e.tone}`:``;if(S){let o=e.eyebrow??`Step ${t+1}`;return i(`li`,{className:`timeline-item${a}`,children:[r(`span`,{className:`timeline-dot`,children:e.icon?r(n,{name:e.icon,size:k,variant:w}):null}),i(`div`,{className:`timeline-body`,children:[o!==``&&r(`div`,{className:`wui-timeline-eyebrow`,children:o}),r(`div`,{className:`timeline-title`,children:e.title}),e.description&&r(`div`,{className:`timeline-desc`,children:e.description})]})]},e.key??`${e.at}-${t}`)}let o=x?e.status:void 0,s=o?` is-${o}`:``,c=x?e.icon??(o?u[o]:void 0):e.icon||`circle`;return i(`li`,{className:`timeline-item${s}${a}`,children:[r(`span`,{className:`timeline-dot`,children:c?r(n,{name:c,size:k,variant:w}):null}),i(`div`,{className:`timeline-body`,children:[x?i(`div`,{className:`timeline-head`,children:[r(`div`,{className:`timeline-title`,children:e.title}),(e.at||e.time)&&i(`span`,{className:`timeline-when`,children:[e.at&&r(`span`,{className:`timeline-at`,title:e.atTitle||void 0,children:e.at}),e.time&&r(`span`,{className:`timeline-time`,children:e.time})]})]}):r(`div`,{className:`timeline-title`,children:e.title}),e.description&&r(`div`,{className:`timeline-desc`,children:e.description}),!x&&(e.at||e.time||e.by)&&i(`div`,{className:`timeline-meta`,children:[(e.at||e.time)&&i(`span`,{className:`timeline-when`,children:[e.at&&r(`span`,{className:`timeline-at`,title:e.atTitle||void 0,children:e.at}),e.time&&r(`span`,{className:`timeline-time`,children:e.time})]}),e.by&&r(`span`,{className:`timeline-by`,children:p(e)})]}),x&&e.by&&r(`div`,{className:`timeline-meta`,children:r(`span`,{className:`timeline-by`,children:p(e)})}),e.note&&r(`p`,{className:`timeline-note`,children:e.note})]})]},e.key??`${e.at}-${t}`)})})}export{m 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{jsx as i,jsxs as a}from"react/jsx-runtime";var o=[`feed`,`progress`,`steps`],s=[`vertical`,`horizontal`],c=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],l=[`neutral`,`success`,`warning`,`danger`,`info`],u=[`sm`,`md`,`lg`],d={done:`check`,current:`clock`,"on-hold":`lock`,rejected:`x`,cancelled:`minus`,skipped:`arrow-right`,upcoming:null},f=e=>typeof e==`string`&&(/^https?:[/][/]/i.test(e)||e.startsWith(`/`)&&e[1]!==`/`&&e[1]!==`\\`)&&![...e].some(e=>e.charCodeAt(0)<=32||e.charCodeAt(0)===127);function p(e){if(!(e.byHref==null||e.byHref===``)){if(!f(e.byHref))throw Error(`<AppTimeline> items[].byHref must be a path starting with one '/', or an http:// or https:// address, with no spaces.`);if(!e.by)throw Error(`<AppTimeline> items[].byHref links the by name, so the item needs by.`)}}var m=e=>e.byHref?i(`a`,{className:`timeline-by-link`,href:e.byHref,children:e.by}):e.by;function h(f){let{items:h=[],variant:g=`feed`,orientation:_,iconVariant:v,size:y,className:b=``,style:x,...S}=f;n(`AppTimeline`,S),t(`AppTimeline`,`variant`,g,o),t(`AppTimeline`,`orientation`,_,s),t(`AppTimeline`,`iconVariant`,v,c),t(`AppTimeline`,`size`,typeof y==`string`?y:null,u);for(let e of h)t(`AppTimeline`,`items[].tone`,e.tone,l),p(e),g===`progress`&&t(`AppTimeline`,`items[].status`,e.status,Object.keys(d));let C=g===`progress`,w=g===`steps`,T=_===`horizontal`,E=v??(w?`bulk`:void 0),D=typeof y==`string`&&u.includes(y)?y:`md`,O=typeof y==`number`&&y>0?y:void 0,k=!O&&D!==`md`?` wui-timeline--${D}`:``,A=`${w?`timeline wui-timeline--steps${_===`vertical`?` wui-timeline--steps-vertical`:``}`:`timeline${C?` timeline--progress`:``}${T?` timeline--horizontal`:``}`}${k}${b?` ${b}`:``}`,j=w?O?Math.round(O*.43):{sm:19,md:24,lg:31}[D]:O?Math.round(O*.54):C?{sm:10,md:13,lg:17}[D]:{sm:10,md:12,lg:17}[D];return i(`ol`,{className:A,style:O?{...x,"--wui-timeline-dot":`${O}px`}:x,...e(`AppTimeline`,f),...S,children:h.map((e,t)=>{let n=e.tone&&e.tone!==`neutral`?` ${e.tone}`:``;if(w){let o=e.eyebrow??`Step ${t+1}`;return a(`li`,{className:`timeline-item${n}`,children:[i(`span`,{className:`timeline-dot`,children:e.icon?i(r,{name:e.icon,size:j,variant:E}):null}),a(`div`,{className:`timeline-body`,children:[o!==``&&i(`div`,{className:`wui-timeline-eyebrow`,children:o}),i(`div`,{className:`timeline-title`,children:e.title}),e.description&&i(`div`,{className:`timeline-desc`,children:e.description})]})]},e.key??`${e.at}-${t}`)}let o=C?e.status:void 0,s=o?` is-${o}`:``,c=C?e.icon??(o?d[o]:void 0):e.icon||`circle`;return a(`li`,{className:`timeline-item${s}${n}`,children:[i(`span`,{className:`timeline-dot`,children:c?i(r,{name:c,size:j,variant:E}):null}),a(`div`,{className:`timeline-body`,children:[C?a(`div`,{className:`timeline-head`,children:[i(`div`,{className:`timeline-title`,children:e.title}),(e.at||e.time)&&a(`span`,{className:`timeline-when`,children:[e.at&&i(`span`,{className:`timeline-at`,title:e.atTitle||void 0,children:e.at}),e.time&&i(`span`,{className:`timeline-time`,children:e.time})]})]}):i(`div`,{className:`timeline-title`,children:e.title}),e.description&&i(`div`,{className:`timeline-desc`,children:e.description}),!C&&(e.at||e.time||e.by)&&a(`div`,{className:`timeline-meta`,children:[(e.at||e.time)&&a(`span`,{className:`timeline-when`,children:[e.at&&i(`span`,{className:`timeline-at`,title:e.atTitle||void 0,children:e.at}),e.time&&i(`span`,{className:`timeline-time`,children:e.time})]}),e.by&&i(`span`,{className:`timeline-by`,children:m(e)})]}),C&&e.by&&i(`div`,{className:`timeline-meta`,children:i(`span`,{className:`timeline-by`,children:m(e)})}),e.note&&i(`p`,{className:`timeline-note`,children:e.note})]})]},e.key??`${e.at}-${t}`)})})}export{h as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{adoptToast as r,dismissToast as i,subscribeToasts as a}from"./toastStore.js";import{useEffect as o,useRef as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";var d={success:{icon:`check-circle`,assertive:!1},info:{icon:`info`,assertive:!1},warning:{icon:`alert-triangle`,assertive:!0},danger:{icon:`alert-circle`,assertive:!0}},f={"top-start":`top-0 start-0`,"top-center":`top-0 start-50 translate-middle-x`,"top-end":`top-0 end-0`,"middle-center":`top-50 start-50 translate-middle`,"bottom-start":`bottom-0 start-0`,"bottom-center":`bottom-0 start-50 translate-middle-x`,"bottom-end":`bottom-0 end-0`},p=64,m=new Set([`rise`,`organic`,`jelly`,`spring`]),h=new Set([`rounded`,`pill`,`sharp`]),g=new Set([`auto`,`inverse`]);function _({position:n=`bottom-end`,maxVisible:r=4,animation:i=`rise`,shape:s=`rounded`,surface:d=`auto`,className:p=``,..._}){t(`AppToast`,_),e(`AppToast`,`position`,n,Object.keys(f)),e(`AppToast`,`animation`,i,m),e(`AppToast`,`shape`,s,h),e(`AppToast`,`surface`,d,g);let[y,b]=c([]);o(()=>a(b),[]);let x=Math.max(0,y.length-r),S=x?y.slice(x):y,C=f[n]??f[`bottom-end`];return u(`div`,{..._,className:`wui-toast-container toast-container position-fixed ${C} p-3 ${p}`.trim(),children:[x>0&&u(`div`,{className:`wui-toast-more`,"aria-hidden":`true`,children:[`+`,x,` more`]}),S.map(e=>l(v,{toast:e,defaultAnimation:i,defaultShape:s,defaultSurface:d},e.id))]})}function v({toast:e,defaultAnimation:t=`rise`,defaultShape:a=`rounded`,defaultSurface:f=`auto`}){let _=d[e.variant]??d.success,v=m.has(e.animation)?e.animation:t,y=h.has(e.shape)?e.shape:a,b=g.has(e.surface)?e.surface:f,x=(v!==`rise`&&m.has(v)?` wui-toast--anim-${v}`:``)+(y!==`rounded`&&h.has(y)?` wui-toast--shape-${y}`:``)+(b===`inverse`?` wui-toast--surface-inverse`:``),S=e.duration===0,[C,w]=c(0),[T,E]=c(!1),D=s(null),O=()=>i(e.id),k=s(null);o(()=>{if(e.duration===0)return;r(e.id);let t=k.current,n=t==null?``:getComputedStyle(t).animationName;if(t!=null&&(typeof t.getAnimations==`function`?t.getAnimations().length>0:n!==``&&n!==`none`))return;let a=setTimeout(()=>i(e.id),e.duration);return()=>clearTimeout(a)},[e.id,e.duration]);let A=e=>{e.button!==0||e.target.closest(`button`)||(D.current=e.clientX,E(!0),e.currentTarget.setPointerCapture?.(e.pointerId))},j=e=>{D.current!==null&&w(e.clientX-D.current)},M=()=>{D.current=null,E(!1),w(0)},N=e=>{if(D.current===null)return;let t=e.clientX-D.current;if(Math.abs(t)>p){O();return}M()},P=C?{transform:`translateX(${C}px)`,opacity:Math.max(0,1-Math.abs(C)/200)}:void 0;return u(`div`,{className:`toast show wui-toast wui-toast--${e.variant}${x}${T?` wui-toast--dragging`:``}`,role:_.assertive?`alert`:`status`,"aria-live":_.assertive?`assertive`:`polite`,"aria-atomic":`true`,style:P,onPointerDown:A,onPointerMove:j,onPointerUp:N,onPointerCancel:M,children:[l(`span`,{className:`wui-toast-icon`,"aria-hidden":`true`,children:l(n,{name:_.icon,size:20})}),u(`div`,{className:`wui-toast-content`,children:[e.title&&l(`div`,{className:`wui-toast-title`,children:e.title}),l(`div`,{className:`wui-toast-message`,children:e.message}),typeof e.progress==`number`&&u(`div`,{className:`wui-toast-task`,children:[l(`div`,{className:`wui-toast-track`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.min(100,Math.max(0,Math.round(e.progress))),children:l(`div`,{className:`wui-toast-track-fill`,style:{width:`${Math.min(100,Math.max(0,e.progress))}%`}})}),u(`span`,{className:`wui-toast-track-pct`,"aria-hidden":`true`,children:[Math.min(100,Math.max(0,Math.round(e.progress))),`%`]})]}),e.action&&l(`button`,{type:`button`,className:`wui-toast-action`,onClick:()=>{e.action.onClick?.(),O()},children:e.action.label})]}),l(`button`,{type:`button`,className:`btn-close wui-toast-close`,"aria-label":`Close`,onClick:O}),!S&&l(`div`,{ref:k,className:`wui-toast-progress`,style:{animationDuration:`${e.duration}ms`},onAnimationEnd:O})]})}export{_ 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{adoptToast as i,dismissToast as a,subscribeToasts as o}from"./toastStore.js";import{useEffect as s,useRef as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f={success:{icon:`check-circle`,assertive:!1},info:{icon:`info`,assertive:!1},warning:{icon:`alert-triangle`,assertive:!0},danger:{icon:`alert-circle`,assertive:!0}},p={"top-start":`top-0 start-0`,"top-center":`top-0 start-50 translate-middle-x`,"top-end":`top-0 end-0`,"middle-center":`top-50 start-50 translate-middle`,"bottom-start":`bottom-0 start-0`,"bottom-center":`bottom-0 start-50 translate-middle-x`,"bottom-end":`bottom-0 end-0`},m=64,h=new Set([`rise`,`organic`,`jelly`,`spring`]),g=new Set([`rounded`,`pill`,`sharp`]),_=new Set([`auto`,`inverse`]);function v(r){let{position:i=`bottom-end`,maxVisible:a=4,animation:c=`rise`,shape:f=`rounded`,surface:m=`auto`,className:v=``,...b}=r;n(`AppToast`,b),t(`AppToast`,`position`,i,Object.keys(p)),t(`AppToast`,`animation`,c,h),t(`AppToast`,`shape`,f,g),t(`AppToast`,`surface`,m,_);let[x,S]=l([]);s(()=>o(S),[]);let C=Math.max(0,x.length-a),w=C?x.slice(C):x,T=p[i]??p[`bottom-end`];return d(`div`,{...e(`AppToast`,r),...b,className:`wui-toast-container toast-container position-fixed ${T} p-3 ${v}`.trim(),children:[C>0&&d(`div`,{className:`wui-toast-more`,"aria-hidden":`true`,children:[`+`,C,` more`]}),w.map(e=>u(y,{toast:e,defaultAnimation:c,defaultShape:f,defaultSurface:m},e.id))]})}function y({toast:e,defaultAnimation:t=`rise`,defaultShape:n=`rounded`,defaultSurface:o=`auto`}){let p=f[e.variant]??f.success,v=h.has(e.animation)?e.animation:t,y=g.has(e.shape)?e.shape:n,b=_.has(e.surface)?e.surface:o,x=(v!==`rise`&&h.has(v)?` wui-toast--anim-${v}`:``)+(y!==`rounded`&&g.has(y)?` wui-toast--shape-${y}`:``)+(b===`inverse`?` wui-toast--surface-inverse`:``),S=e.duration===0,[C,w]=l(0),[T,E]=l(!1),D=c(null),O=()=>a(e.id),k=c(null);s(()=>{if(e.duration===0)return;i(e.id);let t=k.current,n=t==null?``:getComputedStyle(t).animationName;if(t!=null&&(typeof t.getAnimations==`function`?t.getAnimations().length>0:n!==``&&n!==`none`))return;let r=setTimeout(()=>a(e.id),e.duration);return()=>clearTimeout(r)},[e.id,e.duration]);let A=e=>{e.button!==0||e.target.closest(`button`)||(D.current=e.clientX,E(!0),e.currentTarget.setPointerCapture?.(e.pointerId))},j=e=>{D.current!==null&&w(e.clientX-D.current)},M=()=>{D.current=null,E(!1),w(0)},N=e=>{if(D.current===null)return;let t=e.clientX-D.current;if(Math.abs(t)>m){O();return}M()},P=C?{transform:`translateX(${C}px)`,opacity:Math.max(0,1-Math.abs(C)/200)}:void 0;return d(`div`,{className:`toast show wui-toast wui-toast--${e.variant}${x}${T?` wui-toast--dragging`:``}`,role:p.assertive?`alert`:`status`,"aria-live":p.assertive?`assertive`:`polite`,"aria-atomic":`true`,style:P,onPointerDown:A,onPointerMove:j,onPointerUp:N,onPointerCancel:M,children:[u(`span`,{className:`wui-toast-icon`,"aria-hidden":`true`,children:u(r,{name:p.icon,size:20})}),d(`div`,{className:`wui-toast-content`,children:[e.title&&u(`div`,{className:`wui-toast-title`,children:e.title}),u(`div`,{className:`wui-toast-message`,children:e.message}),typeof e.progress==`number`&&d(`div`,{className:`wui-toast-task`,children:[u(`div`,{className:`wui-toast-track`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.min(100,Math.max(0,Math.round(e.progress))),children:u(`div`,{className:`wui-toast-track-fill`,style:{width:`${Math.min(100,Math.max(0,e.progress))}%`}})}),d(`span`,{className:`wui-toast-track-pct`,"aria-hidden":`true`,children:[Math.min(100,Math.max(0,Math.round(e.progress))),`%`]})]}),e.action&&u(`button`,{type:`button`,className:`wui-toast-action`,onClick:()=>{e.action.onClick?.(),O()},children:e.action.label})]}),u(`button`,{type:`button`,className:`btn-close wui-toast-close`,"aria-label":`Close`,onClick:O}),!S&&u(`div`,{ref:k,className:`wui-toast-progress`,style:{animationDuration:`${e.duration}ms`},onAnimationEnd:O})]})}export{v as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./renderIconProp.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=[],actions:s=[],value:c,defaultValue:l,onSelect:u,label:d,name:f,disabled:p=!1,className:m=``,...h}){e(`AppToolbar`,h);let g=n(),_=f||g,[v,y]=r(l),b=c===void 0?v:c;return a(`div`,{className:[`toolbar`,p?`is-disabled`:``,m].filter(Boolean).join(` `),role:`toolbar`,"aria-label":d,"aria-disabled":p||void 0,...h,children:[o.map(e=>a(`label`,{className:`toolbar-item`,children:[i(`input`,{type:`radio`,className:`toolbar-input`,name:_,value:e.value,checked:e.value===b,disabled:p||e.disabled,onChange:()=>{c===void 0&&y(e.value),u?.(e.value)}}),i(`span`,{className:`toolbar-item-icon`,children:t(e.icon,{size:16})}),i(`span`,{className:`toolbar-item-label`,children:e.title})]},e.value)),s.length>0&&i(`span`,{className:`toolbar-sep`,"aria-hidden":`true`}),s.map((e,n)=>i(`button`,{type:`button`,className:`toolbar-action`,"aria-label":e.title,disabled:p||e.disabled,onClick:e.onClick,children:i(`span`,{className:`toolbar-item-icon`,children:t(e.icon,{size:16})})},e.key??`${e.title}-${n}`))]})}export{o as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.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=[],actions:l=[],value:u,defaultValue:d,onSelect:f,label:p,name:m,disabled:h=!1,className:g=``,..._}=s;t(`AppToolbar`,_);let v=r(),y=m||v,[b,x]=i(d),S=u===void 0?b:u;return o(`div`,{className:[`toolbar`,h?`is-disabled`:``,g].filter(Boolean).join(` `),role:`toolbar`,"aria-label":p,"aria-disabled":h||void 0,...e(`AppToolbar`,s),..._,children:[c.map(e=>o(`label`,{className:`toolbar-item`,children:[a(`input`,{type:`radio`,className:`toolbar-input`,name:y,value:e.value,checked:e.value===S,disabled:h||e.disabled,onChange:()=>{u===void 0&&x(e.value),f?.(e.value)}}),a(`span`,{className:`toolbar-item-icon`,children:n(e.icon,{size:16})}),a(`span`,{className:`toolbar-item-label`,children:e.title})]},e.value)),l.length>0&&a(`span`,{className:`toolbar-sep`,"aria-hidden":`true`}),l.map((e,t)=>a(`button`,{type:`button`,className:`toolbar-action`,"aria-label":e.title,disabled:h||e.disabled,onClick:e.onClick,children:a(`span`,{className:`toolbar-item-icon`,children:n(e.icon,{size:16})})},e.key??`${e.title}-${t}`))]})}export{s as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import"@webority/ui-elements/elements/tour";import{forwardRef as n,useEffect as r,useLayoutEffect as i,useRef as a}from"react";import{jsx as o}from"react/jsx-runtime";var s=[`image`,`video`],c=[`click`],l=n(function({open:n,onClose:l,tourId:u,steps:d,seenStore:f,onBeforeStep:p,labels:m,endDialog:h=!0,className:g,..._},v){t(`AppTour`,_);for(let t of d)e(`AppTour`,`steps[].mediaType`,t.mediaType,s),e(`AppTour`,`steps[].advanceOn`,t.advanceOn,c);let y=a(null),b=e=>{y.current=e,typeof v==`function`?v(e):v&&(v.current=e)};i(()=>{let e=y.current;e.seenStore=f??null,e.onBeforeStep=p??null}),i(()=>{let e=y.current;n?e.setAttribute(`open`,``):e.removeAttribute(`open`)},[n]);let x=a(l);return x.current=l,r(()=>{let e=y.current,t=e=>{let{reason:t,index:n,position:r,total:i}=e.detail;x.current?.(t,{index:n,position:r,total:i})};return e.addEventListener(`wui-tour:close`,t),()=>e.removeEventListener(`wui-tour:close`,t)},[]),o(`wui-tour`,{ref:b,"tour-id":u,"back-label":m?.back,"next-label":m?.next,"skip-label":m?.skip,"done-label":m?.done,"progress-label":m?.progress,"advance-label":m?.advance,"media-pause-label":m?.mediaPause,"media-play-label":m?.mediaPlay,"end-title":m?.endTitle,"end-message":m?.endMessage,"end-button":m?.endButton,"end-dialog":h===!1?`false`:void 0,class:g||void 0,..._,children:d.map(e=>o(`wui-tour-step`,{target:e.target,title:e.title,media:e.media,"media-alt":e.mediaAlt,"media-poster":e.mediaPoster,"media-type":e.mediaType,"advance-on":e.advanceOn,"action-label":e.actionLabel,children:e.description},`${e.target}|${e.description}`))})});export{l as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import"@webority/ui-elements/elements/tour";import{forwardRef as r,useEffect as i,useLayoutEffect as a,useRef as o}from"react";import{jsx as s}from"react/jsx-runtime";var c=[`image`,`video`],l=[`click`],u=r(function(r,u){let{open:d,onClose:f,tourId:p,steps:m,seenStore:h,onBeforeStep:g,labels:_,endDialog:v=!0,className:y,...b}=r;n(`AppTour`,b);for(let e of m)t(`AppTour`,`steps[].mediaType`,e.mediaType,c),t(`AppTour`,`steps[].advanceOn`,e.advanceOn,l);let x=o(null),S=e=>{x.current=e,typeof u==`function`?u(e):u&&(u.current=e)};a(()=>{let e=x.current;e.seenStore=h??null,e.onBeforeStep=g??null}),a(()=>{let e=x.current;d?e.setAttribute(`open`,``):e.removeAttribute(`open`)},[d]);let C=o(f);return C.current=f,i(()=>{let e=x.current,t=e=>{let{reason:t,index:n,position:r,total:i}=e.detail;C.current?.(t,{index:n,position:r,total:i})};return e.addEventListener(`wui-tour:close`,t),()=>e.removeEventListener(`wui-tour:close`,t)},[]),s(`wui-tour`,{ref:S,"tour-id":p,"back-label":_?.back,"next-label":_?.next,"skip-label":_?.skip,"done-label":_?.done,"progress-label":_?.progress,"advance-label":_?.advance,"media-pause-label":_?.mediaPause,"media-play-label":_?.mediaPlay,"end-title":_?.endTitle,"end-message":_?.endMessage,"end-button":_?.endButton,"end-dialog":v===!1?`false`:void 0,class:y||void 0,...e(`AppTour`,r),...b,children:m.map(e=>s(`wui-tour-step`,{target:e.target,title:e.title,media:e.media,"media-alt":e.mediaAlt,"media-poster":e.mediaPoster,"media-type":e.mediaType,"advance-on":e.advanceOn,"action-label":e.actionLabel,children:e.description},`${e.target}|${e.description}`))})});export{u as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n,{readValues as r,writeValues as i}from"./useWuiControl.js";import{forwardRef as a,useEffect as o,useRef as s}from"react";import{jsx as c}from"react/jsx-runtime";import"@webority/ui-elements/elements/tree";var l=[`none`,`single`,`multiple`],u=a(function({nodes:a,selection:u,selected:d,onSelect:f,checked:p,onCheck:m,loadChildren:h,loadUrl:g,onLoadError:_,name:v,loadingText:y,errorText:b,ariaLabel:x,id:S,className:C=``,...w},T){t(`AppTreeView`,w),e(`AppTreeView`,`selection`,u,l);let{setRef:E,innerRef:D}=n({ref:T,value:p,readValue:r,writeValue:i,on:{"wui-tree:check":e=>m?.(e.detail.values,{id:e.detail.id,checked:e.detail.checked}),"wui-tree:select":e=>{f?.(e.detail.id,e.detail.node),d!==void 0&&e.currentTarget.selected!==d&&(e.currentTarget.selected=d)},"wui-tree:error":e=>_?.(e.detail.id,e.detail.message)}});o(()=>{let e=D.current;e&&a!==void 0&&(e.nodes=a)},[a,D]),o(()=>{let e=D.current;e&&(e.loadChildren=h)},[h,D]);let O=s(!1);return o(()=>{let e=D.current;if(e){if(d===void 0){O.current&&(e.selected=null),O.current=!1;return}O.current=!0,e.selected!==d&&(e.selected=d)}},[d,D]),c(`wui-tree`,{ref:E,id:S||void 0,selection:u||void 0,name:v||void 0,"load-url":g||void 0,"loading-text":y||void 0,"error-text":b||void 0,"aria-label":x||void 0,className:C||void 0,...w})});export{u as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r,{readValues as i,writeValues as a}from"./useWuiControl.js";import{forwardRef as o,useEffect as s,useRef as c}from"react";import{jsx as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/tree";var u=[`none`,`single`,`multiple`],d=o(function(o,d){let{nodes:f,selection:p,selected:m,onSelect:h,checked:g,onCheck:_,loadChildren:v,loadUrl:y,onLoadError:b,name:x,loadingText:S,errorText:C,ariaLabel:w,id:T,className:E=``,...D}=o;n(`AppTreeView`,D),t(`AppTreeView`,`selection`,p,u);let{setRef:O,innerRef:k}=r({ref:d,value:g,readValue:i,writeValue:a,on:{"wui-tree:check":e=>_?.(e.detail.values,{id:e.detail.id,checked:e.detail.checked}),"wui-tree:select":e=>{h?.(e.detail.id,e.detail.node),m!==void 0&&e.currentTarget.selected!==m&&(e.currentTarget.selected=m)},"wui-tree:error":e=>b?.(e.detail.id,e.detail.message)}});s(()=>{let e=k.current;e&&f!==void 0&&(e.nodes=f)},[f,k]),s(()=>{let e=k.current;e&&(e.loadChildren=v)},[v,k]);let A=c(!1);return s(()=>{let e=k.current;if(e){if(m===void 0){A.current&&(e.selected=null),A.current=!1;return}A.current=!0,e.selected!==m&&(e.selected=m)}},[m,k]),l(`wui-tree`,{ref:O,id:T||void 0,selection:p||void 0,name:x||void 0,"load-url":y||void 0,"loading-text":S||void 0,"error-text":C||void 0,"aria-label":w||void 0,className:E||void 0,...e(`AppTreeView`,o),...D})});export{d as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import{jsx as t}from"react/jsx-runtime";import"@webority/ui-elements/elements/truncate";function n({children:n,lines:r=1,width:i,style:a,className:o=``,...s}){e(`AppTruncate`,s);let c=Number.isInteger(r)&&r>1,l={...c?{"--wui-truncate-lines":r}:null,...i?{"--wui-truncate-width":i}:null,...a};return t(`wui-truncate`,{class:[`wui-truncate`,c&&`wui-truncate-multi`,o].filter(Boolean).join(` `),style:Object.keys(l).length?l:void 0,...s,children:t(`span`,{className:`wui-truncate-text`,children:n})})}export{n as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";import"@webority/ui-elements/elements/truncate";function r(r){let{children:i,lines:a=1,width:o,style:s,className:c=``,...l}=r;t(`AppTruncate`,l);let u=Number.isInteger(a)&&a>1,d={...u?{"--wui-truncate-lines":a}:null,...o?{"--wui-truncate-width":o}:null,...s};return n(`wui-truncate`,{class:[`wui-truncate`,u&&`wui-truncate-multi`,c].filter(Boolean).join(` `),style:Object.keys(d).length?d:void 0,...e(`AppTruncate`,r),...l,children:n(`span`,{className:`wui-truncate-text`,children:i})})}export{r as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./AppButton.js";import n from"./AppBanner.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=()=>window.location.reload();function o({onReload:o=a,dismissible:s=!1,onDismiss:c,className:l=``,...u}){return e(`AppUpdateBar`,u),i(n,{tone:`info`,icon:`refresh-cw`,dismissible:s,onDismiss:c,className:l,...u,children:[r(`span`,{className:`me-3`,children:`A new version of this app is ready.`}),r(t,{size:`sm`,variant:`primary`,onClick:o,children:`Reload`})]})}export{o as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppButton.js";import r from"./AppBanner.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=()=>window.location.reload();function s(s){let{onReload:c=o,dismissible:l=!1,onDismiss:u,className:d=``,...f}=s;return t(`AppUpdateBar`,f),a(r,{tone:`info`,icon:`refresh-cw`,dismissible:l,onDismiss:u,className:d,...e(`AppUpdateBar`,s),...f,children:[i(`span`,{className:`me-3`,children:`A new version of this app is ready.`}),i(n,{size:`sm`,variant:`primary`,onClick:c,children:`Reload`})]})}export{s as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./AppIcon.js";import{formatDate as n}from"@webority/ui-elements/helpers";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/whats-new";function s({entries:s=[],storageKey:c,label:l=`What's new`,unreadLabel:u=`unread`,emptyText:d=`Nothing new yet`,onRead:f,className:p=``,...m}){e(`AppWhatsNew`,m);let h=i(null),g=i(f);return g.current=f,r(()=>{let e=h.current,t=e=>g.current?.(e.detail.through);return e.addEventListener(`wui-whats-new-read`,t),()=>e.removeEventListener(`wui-whats-new-read`,t)},[]),o(`wui-whats-new`,{ref:h,class:[`wui-whats-new`,p].filter(Boolean).join(` `),"storage-key":c||void 0,...m,children:[o(`button`,{type:`button`,className:`u-action wui-whats-new-trigger`,"aria-haspopup":`dialog`,children:[a(t,{name:`gift`,size:20}),a(`span`,{className:`wui-whats-new-name`,children:l}),a(`span`,{className:`wui-whats-new-unread`,children:` ${u}`}),a(`span`,{className:`wui-whats-new-dot`,"aria-hidden":`true`})]}),o(`div`,{className:`wui-whats-new-panel`,role:`dialog`,"aria-label":l,tabIndex:-1,children:[a(`h2`,{className:`wui-whats-new-title`,children:l}),s.length>0?a(`ol`,{className:`wui-whats-new-list`,children:s.map((e,t)=>o(`li`,{className:`wui-whats-new-entry`,children:[a(`time`,{className:`wui-whats-new-date`,dateTime:e.date,children:n(e.date)}),a(`h3`,{className:`wui-whats-new-entry-title`,children:e.title}),e.body&&a(`p`,{className:`wui-whats-new-body`,children:e.body}),e.imageSrc&&a(`img`,{className:`wui-whats-new-image`,src:e.imageSrc,alt:e.imageAlt??``,loading:`lazy`}),e.href&&a(`a`,{className:`wui-whats-new-link`,href:e.href,children:e.linkLabel||`Learn more`})]},e.id??`${e.date}-${t}`))}):a(`p`,{className:`wui-whats-new-empty`,children:d})]})]})}export{s as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{formatDate as r}from"@webority/ui-elements/helpers";import{useEffect as i,useRef as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import"@webority/ui-elements/elements/whats-new";function c(c){let{entries:l=[],storageKey:u,label:d=`What's new`,unreadLabel:f=`unread`,emptyText:p=`Nothing new yet`,onRead:m,className:h=``,...g}=c;t(`AppWhatsNew`,g);let _=a(null),v=a(m);return v.current=m,i(()=>{let e=_.current,t=e=>v.current?.(e.detail.through);return e.addEventListener(`wui-whats-new-read`,t),()=>e.removeEventListener(`wui-whats-new-read`,t)},[]),s(`wui-whats-new`,{ref:_,class:[`wui-whats-new`,h].filter(Boolean).join(` `),"storage-key":u||void 0,...e(`AppWhatsNew`,c),...g,children:[s(`button`,{type:`button`,className:`u-action wui-whats-new-trigger`,"aria-haspopup":`dialog`,children:[o(n,{name:`gift`,size:20}),o(`span`,{className:`wui-whats-new-name`,children:d}),o(`span`,{className:`wui-whats-new-unread`,children:` ${f}`}),o(`span`,{className:`wui-whats-new-dot`,"aria-hidden":`true`})]}),s(`div`,{className:`wui-whats-new-panel`,role:`dialog`,"aria-label":d,tabIndex:-1,children:[o(`h2`,{className:`wui-whats-new-title`,children:d}),l.length>0?o(`ol`,{className:`wui-whats-new-list`,children:l.map((e,t)=>s(`li`,{className:`wui-whats-new-entry`,children:[o(`time`,{className:`wui-whats-new-date`,dateTime:e.date,children:r(e.date)}),o(`h3`,{className:`wui-whats-new-entry-title`,children:e.title}),e.body&&o(`p`,{className:`wui-whats-new-body`,children:e.body}),e.imageSrc&&o(`img`,{className:`wui-whats-new-image`,src:e.imageSrc,alt:e.imageAlt??``,loading:`lazy`}),e.href&&o(`a`,{className:`wui-whats-new-link`,href:e.href,children:e.linkLabel||`Learn more`})]},e.id??`${e.date}-${t}`))}):o(`p`,{className:`wui-whats-new-empty`,children:p})]})]})}export{c as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Children as r,forwardRef as i,useEffect as a,useRef as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import"@webority/ui-elements/elements/wizard";var l=[`steps`,`journey`,`icons`,`tiles`],u=[`primary`,`success`,`warning`,`danger`,`info`],d=[`horizontal`,`vertical`],ee=[`center`,`start`],f=[`done`,`active`,`pending`,`error`],p=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],m=[`check`,`alert-triangle`,`minus`],h=[`sm`,`md`,`lg`],g={sm:14,md:16,lg:20},_=i(function({steps:i=[],children:_,active:v,defaultActive:y=0,onStepChange:b,onFinish:x,onSkip:S,beforeNext:C,onInvalid:w,onClose:T,variant:E=`steps`,tone:D,doneTone:O,orientation:k=`horizontal`,align:A=`center`,iconVariant:j,size:M=`md`,iconSize:N,skippable:P=!1,nonLinear:F=!1,hideStepper:I=!1,hideConnectors:L=!1,disabled:R=!1,label:z=`Progress`,backLabel:B=`Back`,nextLabel:V=`Next`,skipLabel:H=`Skip`,finishLabel:U=`Finish`,topBar:W=!1,barTitle:G,closeLabel:K=`Close`,className:q=``,...J},Y){t(`AppWizard`,J),e(`AppWizard`,`variant`,E,l),e(`AppWizard`,`tone`,D,u),e(`AppWizard`,`doneTone`,O,u),e(`AppWizard`,`orientation`,k,d),e(`AppWizard`,`align`,A,ee),e(`AppWizard`,`iconVariant`,j,p),e(`AppWizard`,`size`,M,h);let X=N>0?N:g[M]??g.md;for(let t of i)e(`AppWizard`,`steps[].status`,t.status,f);let Z=o(null),Q=e=>{Z.current=e,typeof Y==`function`?Y(e):Y&&(Y.current=e)},te=r.toArray(_),$=j&&j!==`linear`?[...new Set([...m,...i.map(e=>e.icon).filter(Boolean)])]:[],ne=[D&&`wui-step-tone-${D}`,O&&`wui-step-done-tone-${O}`,M!==`md`&&h.includes(M)&&`wui-step-size-${M}`,q].filter(Boolean).join(` `);return a(()=>{let e=Z.current;if(!e)return;let t=v===void 0?y:v;t&&(e.active=t)},[]),a(()=>{let e=Z.current;e&&v!==void 0&&Number(e.active)!==v&&(e.active=v)},[v]),a(()=>{let e=Z.current;e&&(e.beforeNext=C??null)},[C]),a(()=>{let e=Z.current;if(!e)return;let t=e=>b?.(e.detail.index,e.detail),n=e=>x?.(e.detail),r=e=>S?.(e.detail.index),i=e=>w?.(e.detail.index),a=e=>T?.(e.detail);return e.addEventListener(`wui-wizard:change`,t),e.addEventListener(`wui-wizard:finish`,n),e.addEventListener(`wui-wizard:skip`,r),e.addEventListener(`wui-wizard:invalid`,i),e.addEventListener(`wui-wizard:close`,a),()=>{e.removeEventListener(`wui-wizard:change`,t),e.removeEventListener(`wui-wizard:finish`,n),e.removeEventListener(`wui-wizard:skip`,r),e.removeEventListener(`wui-wizard:invalid`,i),e.removeEventListener(`wui-wizard:close`,a)}},[b,x,S,w,T]),c(`wui-wizard`,{ref:Q,variant:E,orientation:k,align:A===`start`?`start`:void 0,"icon-size":X===16?void 0:X,skippable:P?``:void 0,"non-linear":F?``:void 0,"hide-stepper":I?``:void 0,"hide-connectors":L?``:void 0,disabled:R?``:void 0,label:z,"back-label":B,"next-label":V,"skip-label":H,"finish-label":U,"top-bar":W?``:void 0,"bar-title":G||void 0,"close-label":K,className:ne||void 0,...J,children:[i.map((e,t)=>s(`wui-wizard-step`,{label:e.label,description:e.description||void 0,optional:e.optional?``:void 0,icon:e.icon||void 0,status:e.status||void 0,children:te[t]},e.key??`${e.label}-${t}`)),$.length>0&&s(`span`,{hidden:!0,"data-wui-glyphs":``,children:$.map(e=>s(n,{name:e,size:X,variant:j},e))})]})});export{_ 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{Children as i,forwardRef as a,useEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/wizard";var u=[`steps`,`journey`,`icons`,`tiles`],d=[`primary`,`success`,`warning`,`danger`,`info`],f=[`horizontal`,`vertical`],ee=[`center`,`start`],p=[`done`,`active`,`pending`,`error`],m=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],h=[`check`,`alert-triangle`,`minus`],g=[`sm`,`md`,`lg`],_={sm:14,md:16,lg:20},v=a(function(a,v){let{steps:y=[],children:b,active:x,defaultActive:te=0,onStepChange:S,onFinish:C,onSkip:w,beforeNext:T,onInvalid:E,onClose:D,variant:O=`steps`,tone:k,doneTone:A,orientation:j=`horizontal`,align:M=`center`,iconVariant:N,size:P=`md`,iconSize:F,skippable:I=!1,nonLinear:L=!1,hideStepper:R=!1,hideConnectors:z=!1,disabled:B=!1,label:V=`Progress`,backLabel:H=`Back`,nextLabel:U=`Next`,skipLabel:W=`Skip`,finishLabel:G=`Finish`,topBar:K=!1,barTitle:q,closeLabel:J=`Close`,className:Y=``,...X}=a;n(`AppWizard`,X),t(`AppWizard`,`variant`,O,u),t(`AppWizard`,`tone`,k,d),t(`AppWizard`,`doneTone`,A,d),t(`AppWizard`,`orientation`,j,f),t(`AppWizard`,`align`,M,ee),t(`AppWizard`,`iconVariant`,N,m),t(`AppWizard`,`size`,P,g);let Z=F>0?F:_[P]??_.md;for(let e of y)t(`AppWizard`,`steps[].status`,e.status,p);let Q=s(null),ne=e=>{Q.current=e,typeof v==`function`?v(e):v&&(v.current=e)},re=i.toArray(b),$=N&&N!==`linear`?[...new Set([...h,...y.map(e=>e.icon).filter(Boolean)])]:[],ie=[k&&`wui-step-tone-${k}`,A&&`wui-step-done-tone-${A}`,P!==`md`&&g.includes(P)&&`wui-step-size-${P}`,Y].filter(Boolean).join(` `);return o(()=>{let e=Q.current;if(!e)return;let t=x===void 0?te:x;t&&(e.active=t)},[]),o(()=>{let e=Q.current;e&&x!==void 0&&Number(e.active)!==x&&(e.active=x)},[x]),o(()=>{let e=Q.current;e&&(e.beforeNext=T??null)},[T]),o(()=>{let e=Q.current;if(!e)return;let t=e=>S?.(e.detail.index,e.detail),n=e=>C?.(e.detail),r=e=>w?.(e.detail.index),i=e=>E?.(e.detail.index),a=e=>D?.(e.detail);return e.addEventListener(`wui-wizard:change`,t),e.addEventListener(`wui-wizard:finish`,n),e.addEventListener(`wui-wizard:skip`,r),e.addEventListener(`wui-wizard:invalid`,i),e.addEventListener(`wui-wizard:close`,a),()=>{e.removeEventListener(`wui-wizard:change`,t),e.removeEventListener(`wui-wizard:finish`,n),e.removeEventListener(`wui-wizard:skip`,r),e.removeEventListener(`wui-wizard:invalid`,i),e.removeEventListener(`wui-wizard:close`,a)}},[S,C,w,E,D]),l(`wui-wizard`,{ref:ne,variant:O,orientation:j,align:M===`start`?`start`:void 0,"icon-size":Z===16?void 0:Z,skippable:I?``:void 0,"non-linear":L?``:void 0,"hide-stepper":R?``:void 0,"hide-connectors":z?``:void 0,disabled:B?``:void 0,label:V,"back-label":H,"next-label":U,"skip-label":W,"finish-label":G,"top-bar":K?``:void 0,"bar-title":q||void 0,"close-label":J,className:ie||void 0,...e(`AppWizard`,a),...X,children:[y.map((e,t)=>c(`wui-wizard-step`,{label:e.label,description:e.description||void 0,optional:e.optional?``:void 0,icon:e.icon||void 0,status:e.status||void 0,children:re[t]},e.key??`${e.label}-${t}`)),$.length>0&&c(`span`,{hidden:!0,"data-wui-glyphs":``,children:$.map(e=>c(r,{name:e,size:Z,variant:N},e))})]})});export{v as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{initialsOf as r}from"../lib/initials.js";import{forwardRef as i,useEffect as a,useMemo as o,useRef as s,useState as c}from"react";import{Dropdown as l}from"react-bootstrap";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`sm`,`md`,`lg`],m=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);function h({tenants:r=[],currentId:i,onSelect:u,menuLabel:h,footerAction:y,linkComponent:b,searchable:x=!1,onCreate:S,canCreate:C=!1,createLabel:w=`Create workspace`,compact:T=!1,size:E=`md`,ariaLabel:D,...O}){let{onToggle:k,...A}=O;t(`AppWorkspaceSwitcher`,A),e(`AppWorkspaceSwitcher`,`size`,E,p);let[j,M]=c(``),[N,P]=c(!1),F=s(null),I=(e,t)=>{P(e),k?.(e,t)},L=r.find(e=>e.id===i)??r[0],R=o(()=>{let e=j.trim().toLowerCase();return!x||!e?r:r.filter(t=>String(t.name??``).toLowerCase().includes(e))},[r,j,x]);a(()=>{N&&x&&F.current?.focus()},[N,x]),a(()=>{if(!x)return;let e=F.current;if(!e)return;let t=e=>{if(m.has(e.key)){e.stopPropagation();return}e.key===`Escape`&&N&&(e.preventDefault(),e.stopPropagation(),I(!1,{source:`keydown`,originalEvent:e}))};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)},[x,N]);let z=L?.name??``,B=D??`Workspace ${z}`;return f(l,{className:`workspace-switcher${E===`sm`?` workspace-switcher-sm`:``}${E===`lg`?` workspace-switcher-lg`:``}`,show:N,onToggle:I,...A,children:[d(l.Toggle,{as:v,compact:T,tenant:L,"aria-label":B}),f(l.Menu,{className:`workspace-switcher-menu`,renderOnMount:!0,popperConfig:{strategy:`fixed`},children:[h?d(`div`,{className:`workspace-switcher-menu-label`,children:h}):null,x?f(`div`,{className:`workspace-switcher-search`,children:[d(n,{name:`search`,size:14}),d(`input`,{ref:F,type:`search`,className:`workspace-switcher-search-input`,placeholder:`Search workspaces`,"aria-label":`Search workspaces`,value:j,onChange:e=>M(e.target.value)})]}):null,f(`div`,{className:`workspace-switcher-list`,children:[R.map(e=>f(l.Item,{as:`button`,type:`button`,className:`workspace-switcher-option${e.id===L?.id?` is-active`:``}`,onClick:()=>u?.(e),children:[d(g,{tenant:e}),d(`span`,{className:`workspace-switcher-option-name`,children:e.name}),e.badge?d(`span`,{className:`workspace-switcher-badge`,children:e.badge}):null,e.id===L?.id?d(n,{name:`check`,size:16,className:`workspace-switcher-tick`}):null]},e.id)),R.length===0?d(`div`,{className:`workspace-switcher-empty`,children:`No workspaces match.`}):null]}),C?f(l.Item,{as:`button`,type:`button`,className:`workspace-switcher-create`,onClick:()=>S?.(),children:[d(n,{name:`plus`,size:16}),w]}):null,y?d(`div`,{className:`workspace-switcher-footer`,children:_(y,b)}):null]})]})}function g({tenant:e}){return e?.logoUrl?d(`img`,{className:`workspace-switcher-mark`,src:e.logoUrl,alt:``,loading:`lazy`}):d(`span`,{className:`workspace-switcher-mark`,children:r(e?.name,1)})}function _(e,t){if(typeof e!=`object`||!e||!(`label`in e))return e;let{label:r,icon:i,href:a}=e;return f(a?t??`a`:`button`,{className:`workspace-switcher-footer-action`,...a?t?{to:a}:{href:a}:{type:`button`},children:[i?d(n,{name:i,size:16}):null,r]})}var v=i(function({compact:e,tenant:t,"aria-label":r,className:i,...a},o){return f(`button`,{ref:o,type:`button`,className:`workspace-switcher-trigger${e?` is-compact`:``}`,"aria-haspopup":`true`,"aria-label":r,...a,children:[d(g,{tenant:t}),e?null:f(u,{children:[d(`span`,{className:`workspace-switcher-trigger-name`,children:t?.name}),d(n,{name:`chevrons-up-down`,size:16,className:`workspace-switcher-chevron`})]})]})});export{h 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{initialsOf as i}from"../lib/initials.js";import{forwardRef as a,useEffect as o,useMemo 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=[`sm`,`md`,`lg`],h=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);function g(i){let{tenants:a=[],currentId:d,onSelect:g,menuLabel:b,footerAction:x,linkComponent:S,searchable:C=!1,onCreate:w,canCreate:T=!1,createLabel:E=`Create workspace`,compact:D=!1,size:O=`md`,ariaLabel:k,...A}=i,{onToggle:j,...M}=A;n(`AppWorkspaceSwitcher`,M),t(`AppWorkspaceSwitcher`,`size`,O,m);let[N,P]=l(``),[F,I]=l(!1),L=c(null),R=(e,t)=>{I(e),j?.(e,t)},z=a.find(e=>e.id===d)??a[0],B=s(()=>{let e=N.trim().toLowerCase();return!C||!e?a:a.filter(t=>String(t.name??``).toLowerCase().includes(e))},[a,N,C]);o(()=>{F&&C&&L.current?.focus()},[F,C]),o(()=>{if(!C)return;let e=L.current;if(!e)return;let t=e=>{if(h.has(e.key)){e.stopPropagation();return}e.key===`Escape`&&F&&(e.preventDefault(),e.stopPropagation(),R(!1,{source:`keydown`,originalEvent:e}))};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)},[C,F]);let V=z?.name??``,H=k??`Workspace ${V}`;return p(u,{className:`workspace-switcher${O===`sm`?` workspace-switcher-sm`:``}${O===`lg`?` workspace-switcher-lg`:``}`,show:F,onToggle:R,...e(`AppWorkspaceSwitcher`,i),...M,children:[f(u.Toggle,{as:y,compact:D,tenant:z,"aria-label":H}),p(u.Menu,{className:`workspace-switcher-menu`,renderOnMount:!0,popperConfig:{strategy:`fixed`},children:[b?f(`div`,{className:`workspace-switcher-menu-label`,children:b}):null,C?p(`div`,{className:`workspace-switcher-search`,children:[f(r,{name:`search`,size:14}),f(`input`,{ref:L,type:`search`,className:`workspace-switcher-search-input`,placeholder:`Search workspaces`,"aria-label":`Search workspaces`,value:N,onChange:e=>P(e.target.value)})]}):null,p(`div`,{className:`workspace-switcher-list`,children:[B.map(e=>p(u.Item,{as:`button`,type:`button`,className:`workspace-switcher-option${e.id===z?.id?` is-active`:``}`,onClick:()=>g?.(e),children:[f(_,{tenant:e}),f(`span`,{className:`workspace-switcher-option-name`,children:e.name}),e.badge?f(`span`,{className:`workspace-switcher-badge`,children:e.badge}):null,e.id===z?.id?f(r,{name:`check`,size:16,className:`workspace-switcher-tick`}):null]},e.id)),B.length===0?f(`div`,{className:`workspace-switcher-empty`,children:`No workspaces match.`}):null]}),T?p(u.Item,{as:`button`,type:`button`,className:`workspace-switcher-create`,onClick:()=>w?.(),children:[f(r,{name:`plus`,size:16}),E]}):null,x?f(`div`,{className:`workspace-switcher-footer`,children:v(x,S)}):null]})]})}function _({tenant:e}){return e?.logoUrl?f(`img`,{className:`workspace-switcher-mark`,src:e.logoUrl,alt:``,loading:`lazy`}):f(`span`,{className:`workspace-switcher-mark`,children:i(e?.name,1)})}function v(e,t){if(typeof e!=`object`||!e||!(`label`in e))return e;let{label:n,icon:i,href:a}=e;return p(a?t??`a`:`button`,{className:`workspace-switcher-footer-action`,...a?t?{to:a}:{href:a}:{type:`button`},children:[i?f(r,{name:i,size:16}):null,n]})}var y=a(function({compact:e,tenant:t,"aria-label":n,className:i,...a},o){return p(`button`,{ref:o,type:`button`,className:`workspace-switcher-trigger${e?` is-compact`:``}`,"aria-haspopup":`true`,"aria-label":n,...a,children:[f(_,{tenant:t}),e?null:p(d,{children:[f(`span`,{className:`workspace-switcher-trigger-name`,children:t?.name}),f(r,{name:`chevrons-up-down`,size:16,className:`workspace-switcher-chevron`})]})]})});export{g as default};
@@ -1 +1 @@
1
- import e from"./FieldMessage.js";import{forwardRef as t,useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=t(function({label:t,id:a,name:o,error:s,hint:c,className:l=``,rest:u={},inputType:d,wrapperClass:f},p){let m=n(),h=a||m,g=s?`${h}-error`:void 0,_=c?`${h}-hint`:void 0;return i(`div`,{className:`${f}${l?` ${l}`:``}`,children:[r(`input`,{type:d,className:`form-check-input`,id:h,name:o,ref:p,"aria-invalid":s?`true`:`false`,"aria-describedby":g||_,...u}),t!=null&&r(`label`,{className:`form-check-label`,htmlFor:h,children:t}),r(e,{error:s,hint:c,errorId:g,hintId:_})]})});export{a as default};
1
+ import e from"./FieldMessage.js";import{forwardRef as t,useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=t(function({label:t,id:a,name:o,error:s,hint:c,className:l=``,rest:u={},inputType:d,wrapperClass:f,rootProps:p},m){let h=n(),g=a||h,_=s?`${g}-error`:void 0,v=c?`${g}-hint`:void 0;return i(`div`,{className:`${f}${l?` ${l}`:``}`,...p,children:[r(`input`,{type:d,className:`form-check-input`,id:g,name:o,ref:m,"aria-invalid":s?`true`:`false`,"aria-describedby":_||v,...u}),t!=null&&r(`label`,{className:`form-check-label`,htmlFor:g,children:t}),r(e,{error:s,hint:c,errorId:_,hintId:v})]})});export{a as default};
@@ -0,0 +1 @@
1
+ var e=`data-wui`,t=`data-wui-props`,n=`__WUI_MARKERS__`,r=`props`,i=new Set([`children`,`className`,`style`,`id`,`key`,`ref`,`as`,`linkComponent`,`src`]),a=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`;function o(){return globalThis[n]===r}function s(n,r){let s={[e]:n};if(!o())return s;let c={};for(let[e,t]of Object.entries(r||{}))i.has(e)||e.startsWith(`aria-`)||e.startsWith(`data-`)||/^on[A-Z]/.test(e)||a(t)&&(c[e]=t);return s[t]=JSON.stringify(c),s}export{n as WUI_MARKERS_GLOBAL,r as WUI_MARKERS_PROPS_MODE,e as WUI_MARKER_ATTRIBUTE,t as WUI_MARKER_PROPS_ATTRIBUTE,s as wuiMarkerAttributes,o as wuiMarkerPropsOn};
@@ -14,7 +14,7 @@
14
14
  * needs a stable anchor to deep-link to; otherwise a unique one is generated.
15
15
  * @param {string} [props.className]
16
16
  */
17
- export default function AppAccordion({ items, multiple, id, className, ...rest }: {
17
+ export default function AppAccordion(props: {
18
18
  items: {
19
19
  key?: string;
20
20
  title: import('react').ReactNode;
@@ -34,7 +34,7 @@
34
34
  * @param {string} [props.accept] file types the chooser offers (the input's accept), file mode only
35
35
  * @param {boolean} [props.multiple=false] allow several files, file mode only
36
36
  */
37
- export default function AppActionIcon({ icon, iconVariant, label, tooltipPlacement, shortcut, danger, disabled, size, onClick, className, as, href, accept, multiple, onFiles, ...rest }: {
37
+ export default function AppActionIcon(props: {
38
38
  icon: string | import('react').ReactNode;
39
39
  iconVariant?: 'linear' | 'outline' | 'bold' | 'bulk' | 'broken' | 'twotone';
40
40
  label: string;
@@ -32,7 +32,7 @@
32
32
  * @param {"alert"|"status"|"none"} [props.role="alert"] "status" for non-assertive notices; "none" for
33
33
  * explanatory page content, which must not interrupt a screen reader.
34
34
  */
35
- export default function AppAlert({ variant, children, title, icon, iconVariant, iconSize, image, imageAlt, imageSize, className, onClose, dismissible, bordered, accent, size, action, role, ...rest }: {
35
+ export default function AppAlert(props: {
36
36
  variant?: "info" | "success" | "warning" | "danger";
37
37
  children: import('react').ReactNode;
38
38
  title?: import('react').ReactNode;
@@ -22,7 +22,7 @@
22
22
  * omitted.
23
23
  * @param {string} [props.className] Extra classes on the wrapper.
24
24
  */
25
- export default function AppAsyncBlock({ loading, error, empty, children, onRetry, skeleton, className, ...rest }: {
25
+ export default function AppAsyncBlock(props: {
26
26
  loading?: boolean;
27
27
  error?: string | import('react').ReactNode;
28
28
  empty?: boolean;
@@ -20,7 +20,7 @@
20
20
  * @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement="auto"] Preferred tooltip side; `auto` picks the side with the most room.
21
21
  * @param {string} [props.className]
22
22
  */
23
- export default function AppAvatar({ name, src, size, shape, tone, status, ring, label, icon, iconVariant, badge, href, onClick, linkComponent: Link, tooltip, tooltipPlacement, className, ...rest }: {
23
+ export default function AppAvatar(props: {
24
24
  name?: string;
25
25
  src?: string;
26
26
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | number | string;
@@ -1,8 +1 @@
1
- export default function AppAvatarGroup({ children, size, spacing, overflow, className, ...rest }: {
2
- [x: string]: any;
3
- children: any;
4
- className?: string;
5
- overflow: any;
6
- size: any;
7
- spacing?: string;
8
- }): import("react").JSX.Element;
1
+ export default function AppAvatarGroup(props: any): import("react").JSX.Element;
@@ -31,7 +31,7 @@ import "@webority/ui-elements/elements/image-crop";
31
31
  * @param {string} [props.fieldClassName] Extra class on the `.field` wrapper.
32
32
  * @param {object} [props.style] Inline style; lands on the picker with `className`.
33
33
  */
34
- export default function AppAvatarPicker({ value, initials, onPick, onRemove, name, removeName, accept, maxSizeMb, outputSize, size, label, hint, error, required, loading, disabled, ariaLabel, className, fieldClassName, style, ...rest }: {
34
+ export default function AppAvatarPicker(props: {
35
35
  value?: string | null;
36
36
  initials?: string;
37
37
  onPick: (file: File) => void;
@@ -13,7 +13,7 @@
13
13
  * @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement="auto"] Preferred tooltip side; `auto` picks the side with the most room.
14
14
  * @param {string} [props.className]
15
15
  */
16
- export default function AppBadge({ children, tone, dot, tooltip, tooltipPlacement, className, ...rest }: {
16
+ export default function AppBadge(props: {
17
17
  children: import('react').ReactNode;
18
18
  tone?: "neutral" | "primary" | "success" | "warning" | "danger" | "info";
19
19
  dot?: boolean;
@@ -12,7 +12,7 @@
12
12
  * @param {() => void} [props.onDismiss] Called after the banner is dismissed.
13
13
  * @param {string} [props.className]
14
14
  */
15
- export default function AppBanner({ tone, icon, children, dismissible, onDismiss, className, ...rest }: {
15
+ export default function AppBanner(props: {
16
16
  tone?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
17
17
  icon?: string | import('react').ReactNode;
18
18
  children: import('react').ReactNode;
@@ -18,7 +18,7 @@ export declare const BreadcrumbTrailContext: import("react").Context<boolean>;
18
18
  * @param {import('react').ElementType} [props.linkComponent] Component for `to` items (e.g. Link).
19
19
  * @param {string} [props.className]
20
20
  */
21
- export default function AppBreadcrumbs({ items, linkComponent, className, ...rest }: {
21
+ export default function AppBreadcrumbs(props: {
22
22
  items: {
23
23
  key?: string;
24
24
  label: string;
@@ -26,7 +26,7 @@ export declare function buttonVariantClass(variant: any): string;
26
26
  * @param {string} [props.className=""] Extra classes on the button.
27
27
  * @param {(event: import('react').MouseEvent<HTMLElement>) => void} [props.onClick] Runs on a click; ignored on a static button.
28
28
  */
29
- export default function AppButton({ children, variant, size, type, loading, disabled, block, leftIcon, rightIcon, href, static: isStatic, tooltip, tooltipPlacement, shortcut, animation, pinRightIcon, shape, iconVariant, className, ...rest }: {
29
+ export default function AppButton(props: {
30
30
  children: import('react').ReactNode;
31
31
  variant?: "primary" | "secondary" | "outline" | "ghost" | "text" | "danger" | "success" | "secondary-danger" | "outline-danger" | "light" | "warning" | "neutral" | "outline-light" | "outline-secondary" | "subtle";
32
32
  size?: "sm" | "md" | "lg";
@@ -13,7 +13,7 @@
13
13
  * @param {boolean} [props.fullWidth=false] Fill the container, the buttons sharing the row equally.
14
14
  * @param {string} [props.className]
15
15
  */
16
- export default function AppButtonGroup({ label, children, size, vertical, fullWidth, className, ...rest }: {
16
+ export default function AppButtonGroup(props: {
17
17
  label: string;
18
18
  children: import('react').ReactNode;
19
19
  size?: 'sm' | 'md' | 'lg';
@@ -35,7 +35,7 @@
35
35
  * @param {boolean} [props.dismissible] Show a close button at the end of the header (defaults to true when onClose is set).
36
36
  * @param {string} [props.closeLabel="Close"] Accessible name of the close button.
37
37
  */
38
- export default function AppCard({ title, subtitle, headerIcon, titleClassName, header, headerExtra, headerActions, footer, media, children, variant, tone, padding, maxWidth, className, bodyClassName, headerClassName, body, lifted, href, onClick, linkComponent: Link, onClose, dismissible, closeLabel, ...rest }: {
38
+ export default function AppCard(props: {
39
39
  title?: import('react').ReactNode;
40
40
  subtitle?: import('react').ReactNode;
41
41
  headerIcon?: string;
@@ -32,7 +32,7 @@ import "@webority/ui-elements/elements/carousel";
32
32
  * @param {import('react').CSSProperties} [props.style] Merged after the per-view custom properties.
33
33
  * @param {import('react').ReactNode} props.children The slides.
34
34
  */
35
- export default function AppCarousel({ label, autoplay, loop, perView, perViewMd, perViewLg, arrows, dots, previousLabel, nextLabel, dotLabel, pauseLabel, playLabel, className, children, style, ...rest }: {
35
+ export default function AppCarousel(props: {
36
36
  label: string;
37
37
  autoplay?: number;
38
38
  loop?: boolean;