@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"./AppIcon.js";import ee from"../lib/FieldMessage.js";import te from"./AppPopover.js";import ne from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import{MASK_INPUT_TYPES as re,MASK_NAMES as ie,attachInputMask as ae,evaluatePassword as oe,formatMasked as i,isMaskPattern as se,postedMasked as ce}from"@webority/ui-elements/helpers";import{forwardRef as a,useEffect as o,useId as le,useRef as s,useState as c}from"react";import{Form as l}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";var ue=[`sm`,`md`,`lg`],de=[`bare`],fe=[!0,!1,`above`],f=a(function({label:a,required:f=!1,error:pe,hint:p,help:m,helpLabel:me=`More information`,type:h=`text`,size:g=`md`,leftIcon:_,rightIcon:v,onRightIconClick:he,rightIconLabel:ge,unit:y,id:_e,name:ve,className:ye=``,fieldClassName:b=``,disabled:x=!1,clearable:S=!1,showCount:C=!1,maxLength:w,prefix:T,suffix:E,action:D,floatingLabel:O=!1,variant:k,passwordRequirements:A=!1,requirementsPlacement:j=`auto`,mask:M,postFormatted:N=!1,onMaskChange:P,...F},I){t(`AppInput`,F),e(`AppInput`,`size`,g,ue),e(`AppInput`,`variant`,k,de),e(`AppInput`,`floatingLabel`,O,fe),M!=null&&!se(M)&&e(`AppInput`,`mask`,M,ie),M!=null&&e(`AppInput`,`type`,h,re);let[L,be]=c(!1),[xe,Se]=c(``),R=pe||xe,Ce=le(),z=_e||Ce,B=h===`password`,we=B&&L?`text`:h,V=s(null),Te=e=>{V.current=e,typeof I==`function`?I(e):I&&(I.current=e)},H=String(F.value??F.defaultValue??``),[Ee,U]=c(()=>!!H),[W,G]=c(()=>H.length),K=S&&!x,q=S||C,J=B&&!!A,[De,Oe]=c(H);o(()=>{!J||F.value===void 0||Oe(String(F.value??``))},[F.value,J]),o(()=>{if(!q||F.value===void 0)return;let e=String(F.value??``);U(!!e),G(e.length)},[F.value,q]);let ke=e=>{U(!!e.target.value),G(e.target.value.length),F.onInput?.(e)},Ae=e=>{J&&Oe(e.target.value),q?ke(e):F.onInput?.(e)},je=M?{...F.value!==void 0&&{value:i(M,F.value)},...F.defaultValue!==void 0&&{defaultValue:i(M,F.defaultValue)}}:null,Me=s(P);Me.current=P,o(()=>{let e=V.current;if(!(!M||!e))return ae(e,{mask:M,postFormatted:N,onChange:(e,t)=>Me.current?.(e,t),onInvalidChange:Se})},[M,N]);let Ne=e=>M&&!N&&e?t=>{let n=t.target,ee=new Proxy(n,{get:(e,t)=>{if(t===`value`)return ce(M,e.value);let n=Reflect.get(e,t,e);return typeof n==`function`?n.bind(e):n}});e(Object.create(t,{target:{value:ee}}))}:e,Pe=K?u(`button`,{type:`button`,className:`input-clear`,onClick:()=>{let e=V.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set;t?t.call(e,``):e.value=``,e.dispatchEvent(new Event(`input`,{bubbles:!0})),U(!1),e.focus()},"aria-label":`Clear`,tabIndex:-1,hidden:!Ee,children:u(n,{name:`x`,size:16})}):null,Y=R&&z?`${z}-error`:void 0,Fe=p&&z?`${z}-hint`:void 0,X=J&&j===`inline`,Ie=X&&z?`${z}-requirements`:void 0,Le=Y||(X?Ie:Fe),Re=[`input`,g===`sm`?`input-sm`:``,g===`lg`?`input-lg`:``,R?`error`:``,B?`pw`:``,y?`num-input`:``,!(O&&a||T||E||y||B||v)&&S&&K?`has-clear`:``,k===`bare`?`input-bare`:``,ye].filter(Boolean).join(` `),Z=u(l.Control,{id:z,name:ve,type:we,className:Re,disabled:x,required:f,"aria-invalid":R?`true`:`false`,"aria-describedby":Le,maxLength:w,...F,onChange:Ne(F.onChange),onBlur:Ne(F.onBlur),...je,placeholder:O?` `:F.placeholder,ref:Te,onInput:q||J?Ae:F.onInput}),Q=A===!0||A,ze=Q&&typeof Q==`object`&&Q.title||`Password requirements`,Be=J?oe(De,Q):null,Ve=J?u(`ul`,{className:`pw-criteria`,"aria-live":`polite`,id:Ie,"aria-label":X?ze:void 0,children:Be.map(e=>d(`li`,{className:`pw-rule ${e.met?`met`:`unmet`}`,children:[u(`span`,{className:`pw-mark`,"aria-hidden":`true`}),u(`span`,{className:`pw-rule-text`,children:e.label}),u(`span`,{className:`visually-hidden`,children:e.met?`: met`:`: not met`})]},e.key))}):null,$;if(O&&a)$=d(`div`,{className:O===`above`?`field-float wui-float-above`:`field-float`,children:[Z,d(`label`,{className:`float-label`,htmlFor:z,children:[a,f&&u(r,{})]})]});else if(D)$=d(`div`,{className:`input-action-row`,children:[d(`div`,{className:_?`input-icon`:`input-wrap`,children:[_&&u(`span`,{className:`ic`,children:u(n,{name:_,size:16})}),Z]}),u(`div`,{className:`input-action`,children:D})]});else if(T||E)$=d(`div`,{className:`input-affixed`,children:[T!=null&&u(`span`,{className:`affix affix-pre`,children:T}),Z,E!=null&&u(`span`,{className:`affix affix-suf`,children:E})]});else if(y)$=d(`div`,{className:`input-with-unit`,children:[Z,u(`span`,{className:`unit`,children:y})]});else if(B){let e=d(`div`,{className:_?`input-icon`:`input-wrap`,children:[_&&u(`span`,{className:`ic`,children:u(n,{name:_,size:16})}),Z,d(`button`,{type:`button`,className:`pw-toggle${L?` pw-revealed`:``}`,onClick:()=>be(e=>!e),"aria-label":L?`Hide password`:`Show password`,tabIndex:-1,children:[u(n,{name:`eye`,size:18,className:`pw-eye`}),u(n,{name:`eye-off`,size:18,className:`pw-eye-off`})]})]});$=J&&!X?u(te,{trigger:e,triggerType:`focus`,placement:j,title:ze,className:`pw-popover`,children:Ve}):e}else $=v?d(`div`,{className:`input-wrap`,children:[Z,u(`button`,{type:`button`,className:`pw-toggle`,onClick:he,disabled:!he,tabIndex:-1,"aria-label":ge||v,children:u(n,{name:v,size:18})})]}):S?d(`div`,{className:_?`input-icon`:`input-wrap`,children:[_&&u(`span`,{className:`ic`,children:u(n,{name:_,size:16})}),Z,Pe]}):_?d(`div`,{className:`input-icon`,children:[u(`span`,{className:`ic`,children:u(n,{name:_,size:16})}),Z]}):Z;return d(l.Group,{className:`field${b?` ${b}`:``}`,children:[a&&!O&&d(l.Label,{className:`label`,htmlFor:z,children:[a,f&&u(r,{}),m&&u(ne,{label:me,children:m})]}),$,X&&u(`div`,{className:`wui-pw-inline`,children:Ve}),u(ee,{error:R,hint:X?null:p,errorId:Y,hintId:Fe}),C&&d(`div`,{className:`field-count${w&&W>=w?` at-limit`:``}`,children:[W,w?` / ${w}`:``]})]})});export{f as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import ee from"../lib/FieldMessage.js";import te from"./AppPopover.js";import ne from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import{MASK_INPUT_TYPES as re,MASK_NAMES as ie,attachInputMask as ae,evaluatePassword as oe,formatMasked as a,isMaskPattern as se,postedMasked as ce}from"@webority/ui-elements/helpers";import{forwardRef as o,useEffect as s,useId as le,useRef as c,useState as l}from"react";import{Form as u}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var ue=[`sm`,`md`,`lg`],de=[`bare`],fe=[!0,!1,`above`],p=o(function(o,p){let{label:m,required:h=!1,error:pe,hint:g,help:_,helpLabel:me=`More information`,type:v=`text`,size:y=`md`,leftIcon:b,rightIcon:x,onRightIconClick:he,rightIconLabel:ge,unit:S,id:_e,name:ve,className:ye=``,fieldClassName:C=``,disabled:w=!1,clearable:T=!1,showCount:E=!1,maxLength:D,prefix:O,suffix:k,action:A,floatingLabel:j=!1,variant:M,passwordRequirements:N=!1,requirementsPlacement:P=`auto`,mask:F,postFormatted:I=!1,onMaskChange:L,...R}=o;n(`AppInput`,R),t(`AppInput`,`size`,y,ue),t(`AppInput`,`variant`,M,de),t(`AppInput`,`floatingLabel`,j,fe),F!=null&&!se(F)&&t(`AppInput`,`mask`,F,ie),F!=null&&t(`AppInput`,`type`,v,re);let[z,be]=l(!1),[xe,Se]=l(``),B=pe||xe,Ce=le(),V=_e||Ce,H=v===`password`,we=H&&z?`text`:v,U=c(null),Te=e=>{U.current=e,typeof p==`function`?p(e):p&&(p.current=e)},W=String(R.value??R.defaultValue??``),[Ee,G]=l(()=>!!W),[De,Oe]=l(()=>W.length),ke=T&&!w,K=T||E,q=H&&!!N,[Ae,je]=l(W);s(()=>{!q||R.value===void 0||je(String(R.value??``))},[R.value,q]),s(()=>{if(!K||R.value===void 0)return;let e=String(R.value??``);G(!!e),Oe(e.length)},[R.value,K]);let Me=e=>{G(!!e.target.value),Oe(e.target.value.length),R.onInput?.(e)},Ne=e=>{q&&je(e.target.value),K?Me(e):R.onInput?.(e)},Pe=F?{...R.value!==void 0&&{value:a(F,R.value)},...R.defaultValue!==void 0&&{defaultValue:a(F,R.defaultValue)}}:null,Fe=c(L);Fe.current=L,s(()=>{let e=U.current;if(!(!F||!e))return ae(e,{mask:F,postFormatted:I,onChange:(e,t)=>Fe.current?.(e,t),onInvalidChange:Se})},[F,I]);let J=e=>F&&!I&&e?t=>{let n=t.target,r=new Proxy(n,{get:(e,t)=>{if(t===`value`)return ce(F,e.value);let n=Reflect.get(e,t,e);return typeof n==`function`?n.bind(e):n}});e(Object.create(t,{target:{value:r}}))}:e,Ie=ke?d(`button`,{type:`button`,className:`input-clear`,onClick:()=>{let e=U.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set;t?t.call(e,``):e.value=``,e.dispatchEvent(new Event(`input`,{bubbles:!0})),G(!1),e.focus()},"aria-label":`Clear`,tabIndex:-1,hidden:!Ee,children:d(r,{name:`x`,size:16})}):null,Le=B&&V?`${V}-error`:void 0,Re=g&&V?`${V}-hint`:void 0,Y=q&&P===`inline`,ze=Y&&V?`${V}-requirements`:void 0,Be=Le||(Y?ze:Re),Ve=[`input`,y===`sm`?`input-sm`:``,y===`lg`?`input-lg`:``,B?`error`:``,H?`pw`:``,S?`num-input`:``,!(j&&m||O||k||S||H||x)&&T&&ke?`has-clear`:``,M===`bare`?`input-bare`:``,ye].filter(Boolean).join(` `),X=d(u.Control,{id:V,name:ve,type:we,className:Ve,disabled:w,required:h,"aria-invalid":B?`true`:`false`,"aria-describedby":Be,maxLength:D,...R,onChange:J(R.onChange),onBlur:J(R.onBlur),...Pe,placeholder:j?` `:R.placeholder,ref:Te,onInput:K||q?Ne:R.onInput}),Z=N===!0||N,He=Z&&typeof Z==`object`&&Z.title||`Password requirements`,Ue=q?oe(Ae,Z):null,Q=q?d(`ul`,{className:`pw-criteria`,"aria-live":`polite`,id:ze,"aria-label":Y?He:void 0,children:Ue.map(e=>f(`li`,{className:`pw-rule ${e.met?`met`:`unmet`}`,children:[d(`span`,{className:`pw-mark`,"aria-hidden":`true`}),d(`span`,{className:`pw-rule-text`,children:e.label}),d(`span`,{className:`visually-hidden`,children:e.met?`: met`:`: not met`})]},e.key))}):null,$;if(j&&m)$=f(`div`,{className:j===`above`?`field-float wui-float-above`:`field-float`,children:[X,f(`label`,{className:`float-label`,htmlFor:V,children:[m,h&&d(i,{})]})]});else if(A)$=f(`div`,{className:`input-action-row`,children:[f(`div`,{className:b?`input-icon`:`input-wrap`,children:[b&&d(`span`,{className:`ic`,children:d(r,{name:b,size:16})}),X]}),d(`div`,{className:`input-action`,children:A})]});else if(O||k)$=f(`div`,{className:`input-affixed`,children:[O!=null&&d(`span`,{className:`affix affix-pre`,children:O}),X,k!=null&&d(`span`,{className:`affix affix-suf`,children:k})]});else if(S)$=f(`div`,{className:`input-with-unit`,children:[X,d(`span`,{className:`unit`,children:S})]});else if(H){let e=f(`div`,{className:b?`input-icon`:`input-wrap`,children:[b&&d(`span`,{className:`ic`,children:d(r,{name:b,size:16})}),X,f(`button`,{type:`button`,className:`pw-toggle${z?` pw-revealed`:``}`,onClick:()=>be(e=>!e),"aria-label":z?`Hide password`:`Show password`,tabIndex:-1,children:[d(r,{name:`eye`,size:18,className:`pw-eye`}),d(r,{name:`eye-off`,size:18,className:`pw-eye-off`})]})]});$=q&&!Y?d(te,{trigger:e,triggerType:`focus`,placement:P,title:He,className:`pw-popover`,children:Q}):e}else $=x?f(`div`,{className:`input-wrap`,children:[X,d(`button`,{type:`button`,className:`pw-toggle`,onClick:he,disabled:!he,tabIndex:-1,"aria-label":ge||x,children:d(r,{name:x,size:18})})]}):T?f(`div`,{className:b?`input-icon`:`input-wrap`,children:[b&&d(`span`,{className:`ic`,children:d(r,{name:b,size:16})}),X,Ie]}):b?f(`div`,{className:`input-icon`,children:[d(`span`,{className:`ic`,children:d(r,{name:b,size:16})}),X]}):X;return f(u.Group,{...e(`AppInput`,o),className:`field${C?` ${C}`:``}`,children:[m&&!j&&f(u.Label,{className:`label`,htmlFor:V,children:[m,h&&d(i,{}),_&&d(ne,{label:me,children:_})]}),$,Y&&d(`div`,{className:`wui-pw-inline`,children:Q}),d(ee,{error:B,hint:Y?null:g,errorId:Le,hintId:Re}),E&&f(`div`,{className:`field-count${D&&De>=D?` at-limit`:``}`,children:[De,D?` / ${D}`:``]})]})});export{p as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppRequiredMark.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a={sm:`wui-addon-group-sm`,md:``,lg:`wui-addon-group-lg`},o=e=>typeof e==`string`||typeof e==`number`?r(`span`,{className:`wui-addon`,children:e}):e;function s({children:s,leading:c,trailing:l,label:u,htmlFor:d,required:f=!1,size:p=`md`,className:m=``,...h}){t(`AppInputGroup`,h),e(`AppInputGroup`,`size`,p,Object.keys(a));let g=i(`div`,{className:[`wui-addon-group`,a[p]??``,u?``:m].filter(Boolean).join(` `),...u?{}:h,children:[o(c),s,o(l)]});return u?i(`div`,{className:[`field`,m].filter(Boolean).join(` `),...h,children:[i(`label`,{className:`label`,htmlFor:d,children:[u,f&&r(n,{})]}),g]}):g}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"./AppRequiredMark.js";import{cloneElement as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s={sm:`wui-addon-group-sm`,md:``,lg:`wui-addon-group-lg`},c=e=>typeof e==`string`||typeof e==`number`?a(`span`,{className:`wui-addon`,children:e}):e;function l(l){let{children:u,leading:d,trailing:f,label:p,htmlFor:m,required:h=!1,size:g=`md`,className:_=``,...v}=l;n(`AppInputGroup`,v),t(`AppInputGroup`,`size`,g,Object.keys(s));let y=o(`div`,{className:[`wui-addon-group`,s[g]??``,p?``:_].filter(Boolean).join(` `),...p?{}:v,children:[c(d),u,c(f)]});return p?o(`div`,{className:[`field`,_].filter(Boolean).join(` `),...e(`AppInputGroup`,l),...v,children:[o(`label`,{className:`label`,htmlFor:m,children:[p,h&&a(r,{})]}),y]}):i(y,e(`AppInputGroup`,l))}export{l as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{errorToast as r}from"./toast.js";import{formatValue as i}from"@webority/ui-elements/helpers";import{useEffect as a,useId as o,useMemo as s,useRef as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{KANBAN_SUMMARY_FORMATS as f,KANBAN_TEXT as p,KANBAN_TONES as m,kanbanOverflow as ee,kanbanSummaryFormat as h,kanbanVisibleLimit as te,sumKanbanValues as ne}from"@webority/ui-elements/elements/kanban";var g=e=>e.key??e.id,_=e=>e.column,v=[`rupees`,`paise`],re=[`inline`,`stacked`];function y({columns:y=[],cards:b=[],renderCard:ie,renderColumnActions:ae,getCardKey:x=g,getCardColumn:S=_,getCardValue:C,cardLabel:w,isCardLocked:T,onLocked:oe,onMove:se,accept:E,filter:D,boardId:O,ariaLabel:k=`Board`,emptyText:A=p.empty,readOnly:j=!1,swipeHint:ce=!1,fill:le=!1,columnWidth:M,fillOffset:N,activeCardKey:P,headLayout:F=`inline`,summaryFormat:I,summaryUnit:L,className:R=``,id:z,...B}){t(`AppKanban`,B),e(`AppKanban`,`summaryFormat`,I,f),e(`AppKanban`,`summaryUnit`,L,v),e(`AppKanban`,`headLayout`,F,re);for(let t of y)e(`AppKanban`,`columns[].tone`,t.tone,m);let V=o(),H=z||`kanban-${V.replace(/[^a-zA-Z0-9_-]/g,``)}`,U=c(null),[W,G]=l(()=>new Map),[K,q]=l(()=>new Set),[ue,J]=l(()=>new Set),de=s(()=>new Map(b.map(e=>[String(x(e)),e])),[b,x]),Y=c(null);Y.current={accept:E,onMove:se,onLocked:oe,byKey:de,columns:y};let X=I&&f.includes(I)&&(L==null||v.includes(L))?h(I,L):null,Z=s(()=>{let e=new Map(y.map(e=>[e.key,[]])),t=[];for(let n of b){let r=String(x(n)),i=W.get(r);i?t.push([n,i]):e.get(S(n))?.push(n)}for(let[n,r]of t){let t=e.get(r.to);t&&t.splice(Math.min(r.index,t.length),0,n)}return e},[y,b,W,x,S]);a(()=>{let e=U.current;if(!e)return;e.accept=(e,t,n)=>{let r=Y.current.accept;return!r||r(Y.current.byKey.get(e.getAttribute(`data-wui-card`)),t,n)};let t=e=>{let{key:t,from:n,to:i,index:a}=e.detail,o=Y.current.onMove,s=Y.current.byKey.get(t);if(!o||!s)return;let c=Y.current.columns.find(e=>e.key===i)?.visibleLimit!=null;c&&J(e=>new Set(e).add(t)),G(e=>new Map(e).set(t,{to:i,index:a}));let l=()=>G(e=>{let n=new Map(e);return n.delete(t),n}),u;try{u=o({card:s,key:t,from:n,to:i,index:a})}catch(e){u=Promise.reject(e)}Promise.resolve(u).then(l,e=>{l(),c&&J(e=>{let n=new Set(e);return n.delete(t),n}),r(e?.message||p.failed.server)})},n=e=>{let{key:t,reason:n}=e.detail,r=Y.current.byKey.get(t);r&&Y.current.onLocked?.({card:r,key:t,reason:n})};return e.addEventListener(`wui:kanban:move`,t),e.addEventListener(`wui:kanban:locked`,n),()=>{e.removeEventListener(`wui:kanban:move`,t),e.removeEventListener(`wui:kanban:locked`,n),e.accept=void 0}},[]);let Q=e=>!D||D(e)!==!1,fe=(e,t)=>{K.has(e)&&J(e=>{let n=new Set(e);for(let e of t)n.delete(String(x(e)));return n}),q(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})},$={};return M!=null&&($[`--wui-kanban-column-width`]=`${M}px`),N!=null&&($[`--wui-kanban-fill-offset`]=`${N}px`),d(`wui-kanban`,{ref:U,id:H,class:R?`wui-kanban ${R}`:`wui-kanban`,role:`region`,"aria-label":k,"board-id":O||void 0,"summary-format":X?I:void 0,"summary-unit":X&&L?L:void 0,readonly:j?``:void 0,fill:le?``:void 0,"data-head-layout":F===`stacked`?`stacked`:void 0,style:$,controlled:``,...B,children:[u(`nav`,{className:`wui-kanban-switcher`,"aria-label":`Board columns`,children:y.map((e,t)=>d(`button`,{type:`button`,className:`wui-kanban-switch`,"data-wui-switch":e.key,"aria-controls":`${H}-${e.key}`,"aria-current":t===0?`true`:void 0,children:[u(`span`,{className:`wui-kanban-switch-title`,children:e.title}),u(`span`,{className:`wui-kanban-count`,"data-wui-count":``,children:(Z.get(e.key)||[]).filter(Q).length})]},e.key))}),ce&&d(`p`,{className:`wui-kanban-hint`,"aria-hidden":`true`,children:[u(n,{name:`arrow-swap-horizontal`,size:14}),p.swipeHint]}),u(`div`,{className:`wui-kanban-board`,"data-wui-scroller":``,children:y.map(e=>{let t=`${H}-${e.key}`,r=Z.get(e.key)||[],a=r.filter(Q),o=!!(e.collapsible&&e.collapsed),s=te(e.visibleLimit),c=K.has(e.key),l=ee(a.map(e=>String(x(e))),s,c,ue),f=typeof e.summary==`function`?e.summary(a):e.summary;X&&(f=i(ne(a.map(e=>C?.(e))),X));let h=ae?.(e,a);return d(`section`,{className:`wui-kanban-column`,id:t,"data-wui-column":e.key,"data-tone":e.tone&&m.includes(e.tone)?e.tone:`neutral`,"aria-labelledby":`${t}-title`,"data-accept-from":e.acceptFrom?e.acceptFrom.join(` `):void 0,"data-collapsible":e.collapsible?``:void 0,"data-collapsed":o?``:void 0,children:[d(`header`,{className:`wui-kanban-head`,children:[u(`span`,{className:`wui-kanban-dot`,"aria-hidden":`true`}),u(`h2`,{className:`wui-kanban-title`,id:`${t}-title`,children:e.href?u(`a`,{href:e.href,children:e.title}):e.title}),u(`span`,{className:`wui-kanban-count`,"data-wui-count":``,children:a.length}),e.collapsible&&u(`span`,{className:`wui-kanban-lock`,"aria-hidden":`true`,children:u(n,{name:`lock`,size:14})}),h!=null&&h!==!1&&u(`div`,{className:`wui-kanban-actions`,"data-wui-no-drag":``,children:h}),e.collapsible&&u(`button`,{type:`button`,className:`wui-kanban-collapse`,"data-wui-collapse":``,"aria-expanded":o?`false`:`true`,"aria-controls":`${t}-body`,"aria-label":o?p.expand(e.title):p.collapse(e.title),children:u(n,{name:`chevron-left`,size:16})}),f!=null&&u(`div`,{className:`wui-kanban-summary`,"data-wui-summary":``,children:f})]}),u(`p`,{className:`wui-kanban-drop-note`,"data-wui-drop-note":``,hidden:!0}),u(`div`,{className:`wui-kanban-body`,id:`${t}-body`,"data-wui-body":``,children:r.map(e=>{let t=String(x(e)),n=W.has(t);return u(`article`,{className:`wui-kanban-card`,"data-wui-card":t,tabIndex:0,"aria-label":w?w(e):void 0,"data-wui-locked":T?.(e)?``:void 0,"data-wui-value":C?C(e)??void 0:void 0,"aria-current":P!=null&&t===String(P)?`true`:void 0,"aria-busy":n?`true`:void 0,"data-wui-saving":n?``:void 0,"data-wui-overflow":l.has(t)?``:void 0,hidden:!Q(e),children:ie?.(e)},t)})}),s!=null&&u(`button`,{type:`button`,className:`wui-kanban-more`,"data-wui-more":``,"aria-controls":`${t}-body`,"aria-expanded":c?`true`:`false`,hidden:c?a.length<=s:l.size===0,onClick:()=>fe(e.key,r),children:c?p.fewer:p.more(l.size)}),u(`p`,{className:`wui-kanban-empty`,"data-wui-empty":``,hidden:a.length>0,children:e.emptyText??A})]},e.key)})}),u(`p`,{className:`visually-hidden`,id:`${H}-help`,"data-wui-help":``,children:p.help}),u(`div`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}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"./AppIcon.js";import{errorToast as i}from"./toast.js";import{formatValue as a}from"@webority/ui-elements/helpers";import{useEffect as o,useId as s,useMemo as c,useRef as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{KANBAN_SUMMARY_FORMATS as p,KANBAN_TEXT as m,KANBAN_TONES as h,kanbanOverflow as g,kanbanSummaryFormat as _,kanbanVisibleLimit as v,sumKanbanValues as ee}from"@webority/ui-elements/elements/kanban";var te=e=>e.key??e.id,ne=e=>e.column,y=[`rupees`,`paise`],re=[`inline`,`stacked`];function b(b){let{columns:x=[],cards:S=[],renderCard:ie,renderColumnActions:ae,getCardKey:C=te,getCardColumn:w=ne,getCardValue:T,cardLabel:E,isCardLocked:D,onLocked:O,onMove:k,accept:A,filter:j,boardId:oe,ariaLabel:se=`Board`,emptyText:ce=m.empty,readOnly:le=!1,swipeHint:ue=!1,fill:M=!1,columnWidth:N,fillOffset:P,activeCardKey:F,headLayout:I=`inline`,summaryFormat:L,summaryUnit:R,className:z=``,id:B,...V}=b;n(`AppKanban`,V),t(`AppKanban`,`summaryFormat`,L,p),t(`AppKanban`,`summaryUnit`,R,y),t(`AppKanban`,`headLayout`,I,re);for(let e of x)t(`AppKanban`,`columns[].tone`,e.tone,h);let H=s(),U=B||`kanban-${H.replace(/[^a-zA-Z0-9_-]/g,``)}`,W=l(null),[G,K]=u(()=>new Map),[q,de]=u(()=>new Set),[fe,J]=u(()=>new Set),pe=c(()=>new Map(S.map(e=>[String(C(e)),e])),[S,C]),Y=l(null);Y.current={accept:A,onMove:k,onLocked:O,byKey:pe,columns:x};let X=L&&p.includes(L)&&(R==null||y.includes(R))?_(L,R):null,Z=c(()=>{let e=new Map(x.map(e=>[e.key,[]])),t=[];for(let n of S){let r=String(C(n)),i=G.get(r);i?t.push([n,i]):e.get(w(n))?.push(n)}for(let[n,r]of t){let t=e.get(r.to);t&&t.splice(Math.min(r.index,t.length),0,n)}return e},[x,S,G,C,w]);o(()=>{let e=W.current;if(!e)return;e.accept=(e,t,n)=>{let r=Y.current.accept;return!r||r(Y.current.byKey.get(e.getAttribute(`data-wui-card`)),t,n)};let t=e=>{let{key:t,from:n,to:r,index:a}=e.detail,o=Y.current.onMove,s=Y.current.byKey.get(t);if(!o||!s)return;let c=Y.current.columns.find(e=>e.key===r)?.visibleLimit!=null;c&&J(e=>new Set(e).add(t)),K(e=>new Map(e).set(t,{to:r,index:a}));let l=()=>K(e=>{let n=new Map(e);return n.delete(t),n}),u;try{u=o({card:s,key:t,from:n,to:r,index:a})}catch(e){u=Promise.reject(e)}Promise.resolve(u).then(l,e=>{l(),c&&J(e=>{let n=new Set(e);return n.delete(t),n}),i(e?.message||m.failed.server)})},n=e=>{let{key:t,reason:n}=e.detail,r=Y.current.byKey.get(t);r&&Y.current.onLocked?.({card:r,key:t,reason:n})};return e.addEventListener(`wui:kanban:move`,t),e.addEventListener(`wui:kanban:locked`,n),()=>{e.removeEventListener(`wui:kanban:move`,t),e.removeEventListener(`wui:kanban:locked`,n),e.accept=void 0}},[]);let Q=e=>!j||j(e)!==!1,me=(e,t)=>{q.has(e)&&J(e=>{let n=new Set(e);for(let e of t)n.delete(String(C(e)));return n}),de(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})},$={};return N!=null&&($[`--wui-kanban-column-width`]=`${N}px`),P!=null&&($[`--wui-kanban-fill-offset`]=`${P}px`),f(`wui-kanban`,{ref:W,id:U,class:z?`wui-kanban ${z}`:`wui-kanban`,role:`region`,"aria-label":se,"board-id":oe||void 0,"summary-format":X?L:void 0,"summary-unit":X&&R?R:void 0,readonly:le?``:void 0,fill:M?``:void 0,"data-head-layout":I===`stacked`?`stacked`:void 0,style:$,controlled:``,...e(`AppKanban`,b),...V,children:[d(`nav`,{className:`wui-kanban-switcher`,"aria-label":`Board columns`,children:x.map((e,t)=>f(`button`,{type:`button`,className:`wui-kanban-switch`,"data-wui-switch":e.key,"aria-controls":`${U}-${e.key}`,"aria-current":t===0?`true`:void 0,children:[d(`span`,{className:`wui-kanban-switch-title`,children:e.title}),d(`span`,{className:`wui-kanban-count`,"data-wui-count":``,children:(Z.get(e.key)||[]).filter(Q).length})]},e.key))}),ue&&f(`p`,{className:`wui-kanban-hint`,"aria-hidden":`true`,children:[d(r,{name:`arrow-swap-horizontal`,size:14}),m.swipeHint]}),d(`div`,{className:`wui-kanban-board`,"data-wui-scroller":``,children:x.map(e=>{let t=`${U}-${e.key}`,n=Z.get(e.key)||[],i=n.filter(Q),o=!!(e.collapsible&&e.collapsed),s=v(e.visibleLimit),c=q.has(e.key),l=g(i.map(e=>String(C(e))),s,c,fe),u=typeof e.summary==`function`?e.summary(i):e.summary;X&&(u=a(ee(i.map(e=>T?.(e))),X));let p=ae?.(e,i);return f(`section`,{className:`wui-kanban-column`,id:t,"data-wui-column":e.key,"data-tone":e.tone&&h.includes(e.tone)?e.tone:`neutral`,"aria-labelledby":`${t}-title`,"data-accept-from":e.acceptFrom?e.acceptFrom.join(` `):void 0,"data-collapsible":e.collapsible?``:void 0,"data-collapsed":o?``:void 0,children:[f(`header`,{className:`wui-kanban-head`,children:[d(`span`,{className:`wui-kanban-dot`,"aria-hidden":`true`}),d(`h2`,{className:`wui-kanban-title`,id:`${t}-title`,children:e.href?d(`a`,{href:e.href,children:e.title}):e.title}),d(`span`,{className:`wui-kanban-count`,"data-wui-count":``,children:i.length}),e.collapsible&&d(`span`,{className:`wui-kanban-lock`,"aria-hidden":`true`,children:d(r,{name:`lock`,size:14})}),p!=null&&p!==!1&&d(`div`,{className:`wui-kanban-actions`,"data-wui-no-drag":``,children:p}),e.collapsible&&d(`button`,{type:`button`,className:`wui-kanban-collapse`,"data-wui-collapse":``,"aria-expanded":o?`false`:`true`,"aria-controls":`${t}-body`,"aria-label":o?m.expand(e.title):m.collapse(e.title),children:d(r,{name:`chevron-left`,size:16})}),u!=null&&d(`div`,{className:`wui-kanban-summary`,"data-wui-summary":``,children:u})]}),d(`p`,{className:`wui-kanban-drop-note`,"data-wui-drop-note":``,hidden:!0}),d(`div`,{className:`wui-kanban-body`,id:`${t}-body`,"data-wui-body":``,children:n.map(e=>{let t=String(C(e)),n=G.has(t);return d(`article`,{className:`wui-kanban-card`,"data-wui-card":t,tabIndex:0,"aria-label":E?E(e):void 0,"data-wui-locked":D?.(e)?``:void 0,"data-wui-value":T?T(e)??void 0:void 0,"aria-current":F!=null&&t===String(F)?`true`:void 0,"aria-busy":n?`true`:void 0,"data-wui-saving":n?``:void 0,"data-wui-overflow":l.has(t)?``:void 0,hidden:!Q(e),children:ie?.(e)},t)})}),s!=null&&d(`button`,{type:`button`,className:`wui-kanban-more`,"data-wui-more":``,"aria-controls":`${t}-body`,"aria-expanded":c?`true`:`false`,hidden:c?i.length<=s:l.size===0,onClick:()=>me(e.key,n),children:c?m.fewer:m.more(l.size)}),d(`p`,{className:`wui-kanban-empty`,"data-wui-empty":``,hidden:i.length>0,children:e.emptyText??ce})]},e.key)})}),d(`p`,{className:`visually-hidden`,id:`${U}-help`,"data-wui-help":``,children:m.help}),d(`div`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}export{b as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import{shortcutKey as t}from"@webority/ui-elements/helpers";import{jsx as n}from"react/jsx-runtime";function r({children:r,className:i=``,...a}){e(`AppKbd`,a);let o=typeof r==`string`||typeof r==`number`?t(r):r;return n(`kbd`,{className:[`wui-kbd`,i].filter(Boolean).join(` `),...a,children:o})}export{r as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{shortcutKey as n}from"@webority/ui-elements/helpers";import{jsx as r}from"react/jsx-runtime";function i(i){let{children:a,className:o=``,...s}=i;t(`AppKbd`,s);let c=typeof a==`string`||typeof a==`number`?n(a):a;return r(`kbd`,{className:[`wui-kbd`,o].filter(Boolean).join(` `),...e(`AppKbd`,i),...s,children:c})}export{i as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import r from"./renderIconProp.js";import i from"./AppSparkline.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`plain`,`filled`,`accent`,`spotlight`],c=[`sm`,`md`,`lg`],l=[`primary`,`success`,`warning`,`danger`,`info`,`neutral`],u=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],d=[`up`,`down`,`flat`],f=[`success`,`danger`,`neutral`],p={success:` wui-kpi-delta--success`,danger:` wui-kpi-delta--danger`,neutral:` wui-kpi-delta--neutral`};function m(e){if(typeof e!=`string`)return`flat`;let t=e.trim();return t.startsWith(`+`)?`up`:t.startsWith(`-`)||t.startsWith(`−`)?`down`:`flat`}function h({label:h,value:g,caption:_,icon:v,iconTone:y,iconVariant:b,delta:x,deltaDirection:S,deltaTone:C,sparkline:w,variant:T=`plain`,size:E=`md`,valueSize:D,inline:O=!1,attention:k=!1,href:A,linkComponent:j,className:M=``,style:N,iconClassName:P=``,labelClassName:F=``,valueClassName:I=``,captionClassName:L=``,deltaClassName:R=``,sparklineClassName:z=``,...B}){t(`AppKpiTile`,B),e(`AppKpiTile`,`variant`,T,s),e(`AppKpiTile`,`size`,E,c),e(`AppKpiTile`,`iconTone`,y,l),e(`AppKpiTile`,`iconVariant`,b,u),e(`AppKpiTile`,`deltaDirection`,S,d),e(`AppKpiTile`,`deltaTone`,C,f);let V=`kpi${O?` kpi-inline`:``}${T===`filled`?` kpi-filled`:T===`accent`?` kpi-accent`:T===`spotlight`?` kpi-spotlight`:``}${E===`lg`?` kpi-lg`:E===`sm`?` kpi-sm`:``}${k?` kpi-attention`:``}${M?` ${M}`:``}`,H=typeof D==`number`&&D>0?{...N,"--wui-kpi-value-size":`${D}px`}:N,U=S??m(x),W=U===`up`?`arrow-up`:U===`down`?`arrow-down`:null,G=Object.hasOwn(p,C??``)?p[C]:``,K=A==null?`div`:j||`a`,q=A==null?{}:j?{to:A}:{href:A};return o(K,{className:V,style:H,...B,...q,children:[v&&a(`span`,{className:`kpi-icon${y?` kpi-icon-${y}`:``}${P?` ${P}`:``}`,children:r(v,{size:20,variant:b})}),a(`div`,{className:`kpi-label${F?` ${F}`:``}`,children:h}),a(`div`,{className:`kpi-value${I?` ${I}`:``}`,children:g}),_&&a(`div`,{className:`kpi-caption${L?` ${L}`:``}`,children:_}),x&&o(`div`,{className:`kpi-delta${U===`flat`?``:` ${U}`}${G}${R?` ${R}`:``}`,children:[W&&a(n,{name:W,size:13}),x]}),w&&w.length>0&&a(i,{data:w,className:`kpi-sparkline${z?` ${z}`:``}`})]})}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 i from"./renderIconProp.js";import a from"./AppSparkline.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`plain`,`filled`,`accent`,`spotlight`],l=[`sm`,`md`,`lg`],u=[`primary`,`success`,`warning`,`danger`,`info`,`neutral`],d=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],f=[`up`,`down`,`flat`],p=[`success`,`danger`,`neutral`],m={success:` wui-kpi-delta--success`,danger:` wui-kpi-delta--danger`,neutral:` wui-kpi-delta--neutral`};function h(e){if(typeof e!=`string`)return`flat`;let t=e.trim();return t.startsWith(`+`)?`up`:t.startsWith(`-`)||t.startsWith(`−`)?`down`:`flat`}function g(g){let{label:_,value:v,caption:y,icon:b,iconTone:x,iconVariant:S,delta:C,deltaDirection:w,deltaTone:T,sparkline:E,variant:D=`plain`,size:O=`md`,valueSize:k,inline:A=!1,attention:j=!1,href:M,linkComponent:N,className:P=``,style:F,iconClassName:I=``,labelClassName:L=``,valueClassName:R=``,captionClassName:z=``,deltaClassName:B=``,sparklineClassName:V=``,...H}=g;n(`AppKpiTile`,H),t(`AppKpiTile`,`variant`,D,c),t(`AppKpiTile`,`size`,O,l),t(`AppKpiTile`,`iconTone`,x,u),t(`AppKpiTile`,`iconVariant`,S,d),t(`AppKpiTile`,`deltaDirection`,w,f),t(`AppKpiTile`,`deltaTone`,T,p);let U=`kpi${A?` kpi-inline`:``}${D===`filled`?` kpi-filled`:D===`accent`?` kpi-accent`:D===`spotlight`?` kpi-spotlight`:``}${O===`lg`?` kpi-lg`:O===`sm`?` kpi-sm`:``}${j?` kpi-attention`:``}${P?` ${P}`:``}`,W=typeof k==`number`&&k>0?{...F,"--wui-kpi-value-size":`${k}px`}:F,G=w??h(C),K=G===`up`?`arrow-up`:G===`down`?`arrow-down`:null,q=Object.hasOwn(m,T??``)?m[T]:``,J=M==null?`div`:N||`a`,Y=M==null?{}:N?{to:M}:{href:M};return s(J,{className:U,style:W,...e(`AppKpiTile`,g),...H,...Y,children:[b&&o(`span`,{className:`kpi-icon${x?` kpi-icon-${x}`:``}${I?` ${I}`:``}`,children:i(b,{size:20,variant:S})}),o(`div`,{className:`kpi-label${L?` ${L}`:``}`,children:_}),o(`div`,{className:`kpi-value${R?` ${R}`:``}`,children:v}),y&&o(`div`,{className:`kpi-caption${z?` ${z}`:``}`,children:y}),C&&s(`div`,{className:`kpi-delta${G===`flat`?``:` ${G}`}${q}${B?` ${B}`:``}`,children:[K&&o(r,{name:K,size:13}),C]}),E&&E.length>0&&o(a,{data:E,className:`kpi-sparkline${V?` ${V}`:``}`})]})}export{g as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import{useEffect as t,useRef as n}from"react";import{jsx as r}from"react/jsx-runtime";import"@webority/ui-elements/elements/lightbox";function i({items:i=[],download:a=!1,label:o,onChange:s,onClose:c,className:l=``,...u}){e(`AppLightbox`,u);let d=n(null),f=n({onChange:s,onClose:c});return t(()=>{f.current={onChange:s,onClose:c}}),t(()=>{let e=d.current,t=e=>f.current.onChange?.(e.detail.index),n=()=>f.current.onClose?.();return e.addEventListener(`wui-lightbox:change`,t),e.addEventListener(`wui-lightbox:close`,n),()=>{e.removeEventListener(`wui-lightbox:change`,t),e.removeEventListener(`wui-lightbox:close`,n)}},[]),r(`wui-lightbox`,{ref:d,class:[`wui-lightbox`,l].filter(Boolean).join(` `),download:a?``:void 0,label:o||void 0,...u,children:i.map(e=>r(`a`,{className:`wui-lightbox-item`,href:e.src,"data-caption":e.caption||void 0,"data-name":e.name||void 0,children:r(`img`,{src:e.thumb||e.src,alt:e.alt??e.caption??``,loading:`lazy`})},e.key??e.src))})}export{i as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{useEffect as n,useRef as r}from"react";import{jsx as i}from"react/jsx-runtime";import"@webority/ui-elements/elements/lightbox";function a(a){let{items:o=[],download:s=!1,label:c,onChange:l,onClose:u,className:d=``,...f}=a;t(`AppLightbox`,f);let p=r(null),m=r({onChange:l,onClose:u});return n(()=>{m.current={onChange:l,onClose:u}}),n(()=>{let e=p.current,t=e=>m.current.onChange?.(e.detail.index),n=()=>m.current.onClose?.();return e.addEventListener(`wui-lightbox:change`,t),e.addEventListener(`wui-lightbox:close`,n),()=>{e.removeEventListener(`wui-lightbox:change`,t),e.removeEventListener(`wui-lightbox:close`,n)}},[]),i(`wui-lightbox`,{ref:p,class:[`wui-lightbox`,d].filter(Boolean).join(` `),download:s?``:void 0,label:c||void 0,...e(`AppLightbox`,a),...f,children:o.map(e=>i(`a`,{className:`wui-lightbox-item`,href:e.src,"data-caption":e.caption||void 0,"data-name":e.name||void 0,children:i(`img`,{src:e.thumb||e.src,alt:e.alt??e.caption??``,loading:`lazy`})},e.key??e.src))})}export{a as default};
@@ -1 +1 @@
1
- import{devWarn as e}from"../lib/devWarn.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s={sm:13,md:15,lg:18},c=[`underline`,`underline-center`,`static`,`slide`,`icon`,`highlight`,`bracket`,`fade`,`grow`,`glow`,`shine`,`none`];function l(e,t,n){if(!e)return null;let i=`wui-link__ic wui-link__ic--${t}`;return typeof e==`string`?a(`span`,{className:i,children:a(r,{name:e,size:s[n]??s.md})}):a(`span`,{className:i,children:e})}function u({children:r,label:u,href:d,animation:f=`underline`,leftIcon:p=null,rightIcon:m=null,size:h=`md`,surface:g=`default`,external:_=!1,disabled:v=!1,linkComponent:y,className:b=``,...x}){n(`AppLink`,x),t(`AppLink`,`animation`,f,c),t(`AppLink`,`size`,h,Object.keys(s)),t(`AppLink`,`surface`,g,[`default`,`dark`]),!d&&x.onClick&&e(`[@webority/ui-react] AppLink has onClick but no href, so it renders an anchor that keyboards cannot reach. Use AppButton for an action, or pass href.`);let S=c.includes(f)?f:`underline`,C=S===`icon`&&!m&&!p?`arrow-right`:m,w=[`wui-link`,`wui-link--${S}`,h===`md`?``:`wui-link--${h}`,v?`is-disabled`:``,g===`dark`?`wui-link--surface-dark`:``,b].filter(Boolean).join(` `),T=o(i,{children:[l(p,`left`,h),a(`span`,{className:`wui-link__label`,children:r??u}),l(C,`right`,h)]});return v?a(`span`,{className:w,"aria-disabled":`true`,...x,children:T}):y&&!_?a(y,{className:w,to:d,...x,children:T}):a(`a`,{className:w,href:d,target:_?`_blank`:void 0,rel:_?`noopener noreferrer`:void 0,...x,children:T})}export{u as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./AppIcon.js";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c={sm:13,md:15,lg:18},l=[`underline`,`underline-center`,`static`,`slide`,`icon`,`highlight`,`bracket`,`fade`,`grow`,`glow`,`shine`,`none`];function u(e,t,n){if(!e)return null;let r=`wui-link__ic wui-link__ic--${t}`;return typeof e==`string`?o(`span`,{className:r,children:o(i,{name:e,size:c[n]??c.md})}):o(`span`,{className:r,children:e})}function d(i){let{children:d,label:f,href:p,animation:m=`underline`,leftIcon:h=null,rightIcon:g=null,size:_=`md`,surface:v=`default`,external:y=!1,disabled:b=!1,linkComponent:x,className:S=``,...C}=i;r(`AppLink`,C),n(`AppLink`,`animation`,m,l),n(`AppLink`,`size`,_,Object.keys(c)),n(`AppLink`,`surface`,v,[`default`,`dark`]),!p&&C.onClick&&t(`[@webority/ui-react] AppLink has onClick but no href, so it renders an anchor that keyboards cannot reach. Use AppButton for an action, or pass href.`);let w=l.includes(m)?m:`underline`,T=w===`icon`&&!g&&!h?`arrow-right`:g,E=[`wui-link`,`wui-link--${w}`,_===`md`?``:`wui-link--${_}`,b?`is-disabled`:``,v===`dark`?`wui-link--surface-dark`:``,S].filter(Boolean).join(` `),D=s(a,{children:[u(h,`left`,_),o(`span`,{className:`wui-link__label`,children:d??f}),u(T,`right`,_)]});return b?o(`span`,{className:E,"aria-disabled":`true`,...e(`AppLink`,i),...C,children:D}):x&&!y?o(x,{className:E,to:p,...e(`AppLink`,i),...C,children:D}):o(`a`,{className:E,href:p,target:y?`_blank`:void 0,rel:y?`noopener noreferrer`:void 0,...e(`AppLink`,i),...C,children:D})}export{d as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./withTooltip.js";import r from"./AppIcon.js";import i from"./AppAlert.js";import a from"./AppButton.js";import ee from"../lib/FieldMessage.js";import te from"./AppRequiredMark.js";import ne from"./AppModal.js";import{DEFAULT_MAX_SIZE_MB as re,validateFile as o}from"@webority/ui-elements/helpers";import{useCallback as ie,useEffect as s,useId as ae,useRef as c,useState as l}from"react";import{Fragment as oe,jsx as u,jsxs as d}from"react/jsx-runtime";import"@webority/ui-elements/elements/image-crop";var se=[`stacked`,`inline`,`profile`],ce=[`initials`,`avatar`],le=[`circle`,`rounded`,`square`],f={sm:72,md:120,lg:160},ue=`That image could not be cropped. Choose another one.`,de=`That image could not be opened. Choose another one.`;function p({value:p,fallback:fe,name:pe,onPick:me,onRemove:m,loading:h=!1,disabled:g=!1,accept:_=`image/png,image/jpeg,image/webp`,maxSizeMb:v=re,crop:y,overlayIcon:he=`image`,overlayLabel:b=`Update photo`,ariaLabel:ge=`Upload photo`,removeLabel:_e=`Remove photo`,label:ve,hint:x,error:ye,layout:S=`stacked`,title:C,subtitle:w,required:be=!1,variant:T=`initials`,size:E=`md`,shape:D=`circle`,className:O=``,...k}){t(`AppLogoPicker`,k),e(`AppLogoPicker`,`layout`,S,se),e(`AppLogoPicker`,`variant`,T,ce),e(`AppLogoPicker`,`shape`,D,le),e(`AppLogoPicker`,`size`,typeof E==`string`?E:null,Object.keys(f));let A=y===`free`?null:typeof y==`number`&&Number.isFinite(y)&&y>0?y:void 0;y!=null&&A===void 0&&e(`AppLogoPicker`,`crop`,String(y),[`free`,`a positive number`]);let j=c(null),M=c(null),N=ae(),[P,F]=l(null),[xe,I]=l(``),[Se,L]=l(!1),[R,z]=l(!1),[B,V]=l(null),[H,U]=l(!1),[W,G]=l(`loading`),[K,q]=l(``),Ce=ie(e=>{if(M.current=e,!e)return;let t=()=>G(`ready`),n=()=>G(`error`);return e.addEventListener(`load`,t),e.addEventListener(`error`,n),()=>{e.removeEventListener(`load`,t),e.removeEventListener(`error`,n),M.current=null}},[]);s(()=>()=>B&&URL.revokeObjectURL(B.url),[B]),s(()=>()=>P&&URL.revokeObjectURL(P),[P]),s(()=>{F(null),L(!1)},[p]);let J=h||g,Y=P||(p&&!Se?p:null),X=ye||xe,we=x&&!X?`${N}-hint`:void 0,Te=X?`${N}-error`:void 0,Ee=!J&&(!!P||!!Y&&!!m),De=()=>{J||j.current?.click()},Oe=e=>{I(``),L(!1),F(URL.createObjectURL(e)),me(e)},ke=e=>{let t=A!==void 0&&e.type!==`image/svg+xml`,n=o(e,{accept:_,maxSizeMb:t?0:v});if(n){I(n);return}if(t){I(``),G(`loading`),q(``),V({file:e,url:URL.createObjectURL(e)});return}Oe(e)},Ae=async()=>{let{file:e}=B;U(!0),q(``);let t=null;try{t=await M.current?.toFile({name:e.name,type:e.type,maxBytes:v>0?v*1024*1024:0})}catch{t=null}if(U(!1),!t){q(ue);return}V(null);let n=o(t,{accept:_,maxSizeMb:v});n?I(n):Oe(t)},je=()=>{H||V(null)},Me=e=>{let t=e.target.files?.[0];e.target.value=``,t&&ke(t)},Ne=e=>{if(e.preventDefault(),z(!1),J)return;let t=e.dataTransfer.files?.[0];t&&ke(t)},Pe=()=>{F(null),I(``),L(!1),j.current&&(j.current.value=``),m?.()},Z=typeof E==`number`?E:f[E]??f.md,Fe=Math.max(14,Math.round(Z*.18)),Ie=Math.round(Z*.5),Le=[`set-uploader`,T===`avatar`?`set-uploader--avatar`:``,D===`rounded`?`set-uploader--rounded`:D===`square`?`set-uploader--square`:``,R&&`is-dragging`].filter(Boolean).join(` `),Re=S===`inline`,ze=S===`profile`,Q=d(`div`,{className:`set-uploader-shell`,style:{"--wui-logo-size":`${Z}px`},children:[u(`button`,{type:`button`,className:Le,onClick:De,disabled:J,"aria-busy":h||void 0,"aria-label":ge,"aria-describedby":Te||we,onDragOver:e=>{e.preventDefault(),!J&&!R&&z(!0)},onDragLeave:e=>{e.preventDefault(),z(!1)},onDrop:Ne,...k,children:d(`span`,{className:`set-uploader-ring`,"data-overlay-label":b,children:[Y?u(`img`,{className:`set-uploader-img`,src:Y,alt:``,onError:()=>L(!0)}):u(`span`,{className:`set-uploader-logo`,children:fe||T===`avatar`&&u(r,{name:`user`,size:Ie})}),h?u(`span`,{className:`set-uploader-overlay is-loading`,"aria-hidden":`true`,children:u(r,{name:`refresh-cw`,size:Fe,className:`wui-spin`})}):!g&&d(`span`,{className:`set-uploader-overlay`,children:[u(r,{name:he,size:Fe}),u(`span`,{children:b})]})]})}),n(u(`button`,{type:`button`,className:`set-uploader-remove`,hidden:!Ee,"aria-label":_e,onClick:Pe,children:u(r,{name:`x`,size:14})}),Ee?_e:null),u(`input`,{id:N,ref:j,type:`file`,name:pe,hidden:!0,accept:_,onChange:Me,disabled:J}),A!==void 0&&d(ne,{open:!!B,title:`Crop photo`,subtitle:`Drag the frame and zoom to choose what to keep.`,size:`lg`,staticBackdrop:!0,dismissible:!H,onClose:je,footer:d(oe,{children:[u(a,{type:`button`,variant:`secondary`,disabled:H,onClick:je,children:`Cancel`}),u(a,{type:`button`,variant:`primary`,loading:H,disabled:W!==`ready`,onClick:Ae,children:`Apply`})]}),children:[W===`error`&&u(i,{variant:`danger`,children:de}),K&&u(i,{variant:`danger`,children:K}),B&&W!==`error`&&u(`wui-image-crop`,{ref:Ce,src:B.url,aspect:A??`free`,round:A===1&&D===`circle`})]})]}),Be=x&&!X?u(`div`,{className:`set-uploader-hint`,id:we,children:x}):null,Ve=X?u(ee,{error:X,errorId:Te}):null,$=ve&&d(`label`,{className:`label`,htmlFor:N,children:[ve,be&&u(te,{})]}),He=d(`div`,{className:`set-uploader-meta`,children:[C&&u(`div`,{className:`set-uploader-title`,children:C}),w&&u(`div`,{className:`set-uploader-subtitle`,children:w}),Be,Ve]});return Re?d(`div`,{className:`field set-uploader-field set-uploader-field--inline${O?` ${O}`:``}`,children:[$,d(`div`,{className:`set-uploader-row`,children:[Q,He]})]}):ze?d(`div`,{className:`field set-uploader-field set-uploader-field--profile${O?` ${O}`:``}`,children:[$,Q,He]}):d(`div`,{className:`field set-uploader-field${O?` ${O}`:``}`,children:[$,Q,Be,Ve]})}export{p as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import ee from"./withTooltip.js";import r from"./AppIcon.js";import i from"./AppAlert.js";import a from"./AppButton.js";import te from"../lib/FieldMessage.js";import ne from"./AppRequiredMark.js";import re from"./AppModal.js";import{DEFAULT_MAX_SIZE_MB as ie,validateFile as o}from"@webority/ui-elements/helpers";import{useCallback as ae,useEffect as s,useId as oe,useRef as se,useState as c}from"react";import{Fragment as ce,jsx as l,jsxs as u}from"react/jsx-runtime";import"@webority/ui-elements/elements/image-crop";var le=[`stacked`,`inline`,`profile`],ue=[`initials`,`avatar`],de=[`circle`,`rounded`,`square`],d={sm:72,md:120,lg:160},fe=`That image could not be cropped. Choose another one.`,pe=`That image could not be opened. Choose another one.`;function f(f){let{value:p,fallback:me,name:he,onPick:ge,onRemove:m,loading:h=!1,disabled:g=!1,accept:_=`image/png,image/jpeg,image/webp`,maxSizeMb:v=ie,crop:y,overlayIcon:_e=`image`,overlayLabel:b=`Update photo`,ariaLabel:ve=`Upload photo`,removeLabel:ye=`Remove photo`,label:be,hint:x,error:xe,layout:S=`stacked`,title:C,subtitle:w,required:Se=!1,variant:T=`initials`,size:E=`md`,shape:D=`circle`,className:O=``,...Ce}=f;n(`AppLogoPicker`,Ce),t(`AppLogoPicker`,`layout`,S,le),t(`AppLogoPicker`,`variant`,T,ue),t(`AppLogoPicker`,`shape`,D,de),t(`AppLogoPicker`,`size`,typeof E==`string`?E:null,Object.keys(d));let k=y===`free`?null:typeof y==`number`&&Number.isFinite(y)&&y>0?y:void 0;y!=null&&k===void 0&&t(`AppLogoPicker`,`crop`,String(y),[`free`,`a positive number`]);let A=se(null),j=se(null),M=oe(),[N,P]=c(null),[we,F]=c(``),[Te,I]=c(!1),[L,R]=c(!1),[z,B]=c(null),[V,H]=c(!1),[U,W]=c(`loading`),[G,K]=c(``),Ee=ae(e=>{if(j.current=e,!e)return;let t=()=>W(`ready`),n=()=>W(`error`);return e.addEventListener(`load`,t),e.addEventListener(`error`,n),()=>{e.removeEventListener(`load`,t),e.removeEventListener(`error`,n),j.current=null}},[]);s(()=>()=>z&&URL.revokeObjectURL(z.url),[z]),s(()=>()=>N&&URL.revokeObjectURL(N),[N]),s(()=>{P(null),I(!1)},[p]);let q=h||g,J=N||(p&&!Te?p:null),Y=xe||we,De=x&&!Y?`${M}-hint`:void 0,Oe=Y?`${M}-error`:void 0,ke=!q&&(!!N||!!J&&!!m),Ae=()=>{q||A.current?.click()},je=e=>{F(``),I(!1),P(URL.createObjectURL(e)),ge(e)},Me=e=>{let t=k!==void 0&&e.type!==`image/svg+xml`,n=o(e,{accept:_,maxSizeMb:t?0:v});if(n){F(n);return}if(t){F(``),W(`loading`),K(``),B({file:e,url:URL.createObjectURL(e)});return}je(e)},Ne=async()=>{let{file:e}=z;H(!0),K(``);let t=null;try{t=await j.current?.toFile({name:e.name,type:e.type,maxBytes:v>0?v*1024*1024:0})}catch{t=null}if(H(!1),!t){K(fe);return}B(null);let n=o(t,{accept:_,maxSizeMb:v});n?F(n):je(t)},Pe=()=>{V||B(null)},Fe=e=>{let t=e.target.files?.[0];e.target.value=``,t&&Me(t)},Ie=e=>{if(e.preventDefault(),R(!1),q)return;let t=e.dataTransfer.files?.[0];t&&Me(t)},Le=()=>{P(null),F(``),I(!1),A.current&&(A.current.value=``),m?.()},X=typeof E==`number`?E:d[E]??d.md,Re=Math.max(14,Math.round(X*.18)),ze=Math.round(X*.5),Be=[`set-uploader`,T===`avatar`?`set-uploader--avatar`:``,D===`rounded`?`set-uploader--rounded`:D===`square`?`set-uploader--square`:``,L&&`is-dragging`].filter(Boolean).join(` `),Ve=S===`inline`,He=S===`profile`,Z=u(`div`,{className:`set-uploader-shell`,style:{"--wui-logo-size":`${X}px`},children:[l(`button`,{type:`button`,className:Be,onClick:Ae,disabled:q,"aria-busy":h||void 0,"aria-label":ve,"aria-describedby":Oe||De,onDragOver:e=>{e.preventDefault(),!q&&!L&&R(!0)},onDragLeave:e=>{e.preventDefault(),R(!1)},onDrop:Ie,...Ce,children:u(`span`,{className:`set-uploader-ring`,"data-overlay-label":b,children:[J?l(`img`,{className:`set-uploader-img`,src:J,alt:``,onError:()=>I(!0)}):l(`span`,{className:`set-uploader-logo`,children:me||T===`avatar`&&l(r,{name:`user`,size:ze})}),h?l(`span`,{className:`set-uploader-overlay is-loading`,"aria-hidden":`true`,children:l(r,{name:`refresh-cw`,size:Re,className:`wui-spin`})}):!g&&u(`span`,{className:`set-uploader-overlay`,children:[l(r,{name:_e,size:Re}),l(`span`,{children:b})]})]})}),ee(l(`button`,{type:`button`,className:`set-uploader-remove`,hidden:!ke,"aria-label":ye,onClick:Le,children:l(r,{name:`x`,size:14})}),ke?ye:null),l(`input`,{id:M,ref:A,type:`file`,name:he,hidden:!0,accept:_,onChange:Fe,disabled:q}),k!==void 0&&u(re,{open:!!z,title:`Crop photo`,subtitle:`Drag the frame and zoom to choose what to keep.`,size:`lg`,staticBackdrop:!0,dismissible:!V,onClose:Pe,footer:u(ce,{children:[l(a,{type:`button`,variant:`secondary`,disabled:V,onClick:Pe,children:`Cancel`}),l(a,{type:`button`,variant:`primary`,loading:V,disabled:U!==`ready`,onClick:Ne,children:`Apply`})]}),children:[U===`error`&&l(i,{variant:`danger`,children:pe}),G&&l(i,{variant:`danger`,children:G}),z&&U!==`error`&&l(`wui-image-crop`,{ref:Ee,src:z.url,aspect:k??`free`,round:k===1&&D===`circle`})]})]}),Ue=x&&!Y?l(`div`,{className:`set-uploader-hint`,id:De,children:x}):null,We=Y?l(te,{error:Y,errorId:Oe}):null,Q=be&&u(`label`,{className:`label`,htmlFor:M,children:[be,Se&&l(ne,{})]}),$=u(`div`,{className:`set-uploader-meta`,children:[C&&l(`div`,{className:`set-uploader-title`,children:C}),w&&l(`div`,{className:`set-uploader-subtitle`,children:w}),Ue,We]});return Ve?u(`div`,{...e(`AppLogoPicker`,f),className:`field set-uploader-field set-uploader-field--inline${O?` ${O}`:``}`,children:[Q,u(`div`,{className:`set-uploader-row`,children:[Z,$]})]}):He?u(`div`,{...e(`AppLogoPicker`,f),className:`field set-uploader-field set-uploader-field--profile${O?` ${O}`:``}`,children:[Q,Z,$]}):u(`div`,{...e(`AppLogoPicker`,f),className:`field set-uploader-field${O?` ${O}`:``}`,children:[Q,Z,Ue,We]})}export{f as default};
@@ -0,0 +1 @@
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppCodeBlock.js";import r from"./AppLink.js";import{Fragment as i,useMemo as a}from"react";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import"@webority/ui-elements/elements/markdown";import{linkRoute as l,parseBlocks as u,parseInline as d}from"@webority/ui-elements/chat-core";var f=/^https?:/i,p=/^(mailto|tel):/i;function m(n){let{value:r,className:i=``,linkComponent:o,resolveLink:c,...l}=n;t(`AppMarkdown`,l);let d=a(()=>u(r),[r]);return s(`wui-markdown`,{class:[`wui-markdown`,i].filter(Boolean).join(` `),...e(`AppMarkdown`,n),...l,children:d.map(e=>s(b,{block:e,resolveLink:c,linkComponent:o},e.key))})}function h(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n],i=e[n+1];if(r.type===`text`&&r.text.endsWith(`!`)&&i?.type===`link`){let e=r.text.slice(0,-1);e&&t.push({type:`text`,text:e,key:r.key}),t.push({type:`image`,children:i.children,key:i.key}),n+=1}else t.push(r)}return t}function g({token:e,resolveLink:t,linkComponent:n}){let i=s(_,{tokens:e.children,resolveLink:t,linkComponent:n}),a=l(e.href,t);return a?s(r,{href:a,linkComponent:n,animation:`static`,children:i}):f.test(e.href)?s(r,{href:e.href,external:!0,animation:`static`,children:i}):p.test(e.href)?s(r,{href:e.href,animation:`static`,children:i}):s(o,{children:i})}function _({tokens:e,resolveLink:t,linkComponent:n}){return h(e).map(e=>{switch(e.type){case`code`:return s(`code`,{children:e.text},e.key);case`strong`:return s(`strong`,{children:s(_,{tokens:e.children,resolveLink:t,linkComponent:n})},e.key);case`em`:return s(`em`,{children:s(_,{tokens:e.children,resolveLink:t,linkComponent:n})},e.key);case`image`:return c(i,{children:[`[`,s(_,{tokens:e.children,resolveLink:t,linkComponent:n}),`]`]},e.key);case`link`:return s(g,{token:e,resolveLink:t,linkComponent:n},e.key);default:return s(i,{children:e.text},e.key)}})}function v({text:e,resolveLink:t,linkComponent:n}){return s(_,{tokens:d(e),resolveLink:t,linkComponent:n})}function y({block:e,resolveLink:t,linkComponent:n}){let r=e=>s(v,{text:e,resolveLink:t,linkComponent:n});return s(`div`,{className:`table-responsive`,children:c(`table`,{className:`table`,children:[s(`thead`,{children:s(`tr`,{children:e.header.map((e,t)=>s(`th`,{scope:`col`,children:r(e)},t))})}),s(`tbody`,{children:e.rows.map((t,n)=>s(`tr`,{children:e.header.map((e,n)=>s(`td`,{children:r(t[n]??``)},n))},n))})]})})}function b({block:e,resolveLink:t,linkComponent:r}){let a=e=>s(v,{text:e,resolveLink:t,linkComponent:r});switch(e.type){case`paragraph`:return s(`p`,{children:e.lines.map((e,t)=>c(i,{children:[t>0&&s(`br`,{}),a(e)]},t))});case`heading`:return s(`h2`,{children:a(e.text)});case`list`:{let t=e.items.map((e,t)=>s(`li`,{children:a(e)},t));return e.ordered?s(`ol`,{start:e.start===1?void 0:e.start,children:t}):s(`ul`,{children:t})}case`table`:return s(y,{block:e,resolveLink:t,linkComponent:r});case`code`:return s(n,{code:e.text,language:`text`});case`rule`:return s(`hr`,{});default:return null}}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 i from"./useWuiControl.js";import{forwardRef as a,useEffect as o,useId as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/mention-input";var u=a(function({value:a,onChange:u,people:d,loadPeople:f,minChars:p,debounce:m,onSubmit:h,rows:g=3,placeholder:_,disabled:v=!1,name:y,id:b,label:x,error:S,hint:C,required:w=!1,help:T,helpLabel:E=`More information`,className:D=``,fieldClassName:O=``,...k},A){e(`AppMentionInput`,k);let j=typeof f==`function`,M=s(),N=b||`mention-${M.replace(/[^a-zA-Z0-9_-]/g,``)}`,P=S?`${N}-error`:C?`${N}-hint`:void 0,{setRef:F,innerRef:I}=i({ref:A,value:a??``,on:{change:e=>{e.target===e.currentTarget&&u?.(e.currentTarget.value,{mentions:e.currentTarget.mentions})},"wui:mention-input:submit":()=>h?.()}});return o(()=>{let e=I.current;!e||j||(e.people=d||[])},[d,j,I]),o(()=>{let e=I.current;if(!e||!j)return;let t=0,n=null,r=async r=>{let i=++t;n?.abort(),n=typeof AbortController==`function`?new AbortController:null,e.loading=!0;try{let a=await f(r.detail.query,{signal:n?.signal});i===t&&(e.people=a||[])}catch{i===t&&(e.people=[])}finally{i===t&&(e.loading=!1)}};return e.addEventListener(`search`,r),()=>{t=-1,n?.abort(),e.removeEventListener(`search`,r),e.loading=!1}},[j,f,I]),l(`div`,{className:`field${O?` ${O}`:``}`,children:[x&&l(`label`,{className:`label`,htmlFor:`${N}-text`,children:[x,w&&c(r,{}),T&&c(n,{label:E,children:T})]}),c(`wui-mention-input`,{ref:F,id:N,class:D?`wui-mention-input ${D}`:`wui-mention-input`,label:typeof x==`string`?x:void 0,placeholder:_||void 0,rows:String(g),name:y||void 0,remote:j?``:void 0,"min-chars":p==null?void 0:String(p),debounce:m==null?void 0:String(m),disabled:v?``:void 0,"aria-describedby":P,"aria-invalid":S?`true`:void 0,...k}),c(t,{error:S,hint:C,errorId:`${N}-error`,hintId:`${N}-hint`})]})});export{u 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 a from"./useWuiControl.js";import{forwardRef as o,useEffect as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import"@webority/ui-elements/elements/mention-input";var d=o(function(o,d){let{value:f,onChange:p,people:m,loadPeople:h,minChars:g,debounce:_,onSubmit:v,rows:y=3,placeholder:b,disabled:x=!1,name:S,id:C,label:w,error:T,hint:E,required:D=!1,help:O,helpLabel:k=`More information`,className:A=``,fieldClassName:j=``,...M}=o;t(`AppMentionInput`,M);let N=typeof h==`function`,P=c(),F=C||`mention-${P.replace(/[^a-zA-Z0-9_-]/g,``)}`,I=T?`${F}-error`:E?`${F}-hint`:void 0,{setRef:L,innerRef:R}=a({ref:d,value:f??``,on:{change:e=>{e.target===e.currentTarget&&p?.(e.currentTarget.value,{mentions:e.currentTarget.mentions})},"wui:mention-input:submit":()=>v?.()}});return s(()=>{let e=R.current;!e||N||(e.people=m||[])},[m,N,R]),s(()=>{let e=R.current;if(!e||!N)return;let t=0,n=null,r=async r=>{let i=++t;n?.abort(),n=typeof AbortController==`function`?new AbortController:null,e.loading=!0;try{let a=await h(r.detail.query,{signal:n?.signal});i===t&&(e.people=a||[])}catch{i===t&&(e.people=[])}finally{i===t&&(e.loading=!1)}};return e.addEventListener(`search`,r),()=>{t=-1,n?.abort(),e.removeEventListener(`search`,r),e.loading=!1}},[N,h,R]),u(`div`,{...e(`AppMentionInput`,o),className:`field${j?` ${j}`:``}`,children:[w&&u(`label`,{className:`label`,htmlFor:`${F}-text`,children:[w,D&&l(i,{}),O&&l(r,{label:k,children:O})]}),l(`wui-mention-input`,{ref:L,id:F,class:A?`wui-mention-input ${A}`:`wui-mention-input`,label:typeof w==`string`?w:void 0,placeholder:b||void 0,rows:String(y),name:S||void 0,remote:N?``:void 0,"min-chars":g==null?void 0:String(g),debounce:_==null?void 0:String(_),disabled:x?``:void 0,"aria-describedby":I,"aria-invalid":T?`true`:void 0,...M}),l(n,{error:T,hint:E,errorId:`${F}-error`,hintId:`${F}-hint`})]})});export{d as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import{shortcutAria as t,shortcutChip as n}from"../lib/shortcutChip.js";import r from"./renderIconProp.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/menubar";function o({menus:t=[],ariaLabel:n=`Application menu`,linkComponent:r,className:o=``,...c}){return e(`AppMenubar`,c),i(`wui-menubar`,{class:[`wui-menubar`,o].filter(Boolean).join(` `),role:`menubar`,"aria-label":n,...c,children:t.map((e,t)=>a(`div`,{className:`wui-menubar-menu`,role:`none`,children:[i(`button`,{type:`button`,className:`wui-menubar-trigger`,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":`false`,"aria-disabled":e.disabled?`true`:void 0,tabIndex:t===0?0:-1,"data-key":e.key,children:e.label}),i(`div`,{className:`dropdown-menu wui-menubar-panel`,role:`menu`,"aria-label":e.label,tabIndex:-1,children:s(e.items??[],r)})]},e.key))})}function s(e,o){return e.map(e=>{if(e.divider)return i(`hr`,{className:`dropdown-divider`},e.key);let c=r(e.icon,{size:16});if(e.items?.length)return a(`div`,{className:`wui-menubar-sub`,role:`none`,children:[a(`button`,{type:`button`,className:`dropdown-item wui-menubar-subtrigger${e.danger?` danger`:``}${e.disabled?` disabled`:``}`,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":`false`,"aria-disabled":e.disabled?`true`:void 0,tabIndex:-1,"data-key":e.key,children:[c,e.label,r(`chevron-right`,{size:14,className:`wui-menubar-chevron`})]}),i(`div`,{className:`dropdown-menu wui-menubar-panel wui-menubar-subpanel`,role:`menu`,"aria-label":e.label,tabIndex:-1,children:s(e.items,o)})]},e.key);let l=!!e.to&&!e.disabled;return a(l?o??`a`:`button`,{...l?o?{to:e.to}:{href:e.to}:{type:`button`},className:`dropdown-item${e.danger?` danger`:``}${e.disabled?` disabled`:``}`,role:`menuitem`,tabIndex:-1,"data-key":e.key,"aria-disabled":e.disabled?`true`:void 0,"aria-keyshortcuts":t(e.shortcut),onClick:e.disabled?void 0:e.onClick,children:[c,e.label,n(e.shortcut)]},e.key)})}export{o as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{shortcutAria as n,shortcutChip as r}from"../lib/shortcutChip.js";import i from"./renderIconProp.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/menubar";function s(n){let{menus:r=[],ariaLabel:i=`Application menu`,linkComponent:s,className:l=``,...u}=n;return t(`AppMenubar`,u),a(`wui-menubar`,{class:[`wui-menubar`,l].filter(Boolean).join(` `),role:`menubar`,"aria-label":i,...e(`AppMenubar`,n),...u,children:r.map((e,t)=>o(`div`,{className:`wui-menubar-menu`,role:`none`,children:[a(`button`,{type:`button`,className:`wui-menubar-trigger`,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":`false`,"aria-disabled":e.disabled?`true`:void 0,tabIndex:t===0?0:-1,"data-key":e.key,children:e.label}),a(`div`,{className:`dropdown-menu wui-menubar-panel`,role:`menu`,"aria-label":e.label,tabIndex:-1,children:c(e.items??[],s)})]},e.key))})}function c(e,t){return e.map(e=>{if(e.divider)return a(`hr`,{className:`dropdown-divider`},e.key);let s=i(e.icon,{size:16});if(e.items?.length)return o(`div`,{className:`wui-menubar-sub`,role:`none`,children:[o(`button`,{type:`button`,className:`dropdown-item wui-menubar-subtrigger${e.danger?` danger`:``}${e.disabled?` disabled`:``}`,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":`false`,"aria-disabled":e.disabled?`true`:void 0,tabIndex:-1,"data-key":e.key,children:[s,e.label,i(`chevron-right`,{size:14,className:`wui-menubar-chevron`})]}),a(`div`,{className:`dropdown-menu wui-menubar-panel wui-menubar-subpanel`,role:`menu`,"aria-label":e.label,tabIndex:-1,children:c(e.items,t)})]},e.key);let l=!!e.to&&!e.disabled;return o(l?t??`a`:`button`,{...l?t?{to:e.to}:{href:e.to}:{type:`button`},className:`dropdown-item${e.danger?` danger`:``}${e.disabled?` disabled`:``}`,role:`menuitem`,tabIndex:-1,"data-key":e.key,"aria-disabled":e.disabled?`true`:void 0,"aria-keyshortcuts":n(e.shortcut),onClick:e.disabled?void 0:e.onClick,children:[s,e.label,r(e.shortcut)]},e.key)})}export{s as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";var i=[`high`,`low`],a=[`sm`,`md`],o=[`info`,`success`,`warning`,`danger`,`neutral`];function s(e,t,n){let r=n-t;if(!(r>0))return 0;let i=Math.min(100,Math.max(0,(e-t)/r*100));return Number(i.toFixed(2))}function c(e,t,n,r,i){if(t==null&&n==null)return i;let a=`mid`;return t!=null&&e<=t?a=`low`:n!=null&&e>=n&&(a=`high`),r===`low`?a===`low`?`success`:a===`high`?`danger`:`warning`:a===`high`?`success`:a===`low`?`danger`:`warning`}function l({value:l=0,min:u=0,max:d=100,tone:f=`info`,optimum:p=`high`,low:m,high:h,size:g=`md`,label:_,showLabel:v=!1,className:y=``,...b}){t(`AppMeter`,b),e(`AppMeter`,`tone`,f,o),e(`AppMeter`,`optimum`,p,i),e(`AppMeter`,`size`,g,a);let x=c(l,m,h,p,o.includes(f)?f:`info`),S=s(l,u,d),C=v&&!!_,w=n(`div`,{className:`progress${g===`sm`?` progress-sm`:``}${!C&&y?` ${y}`:``}`,role:`meter`,"aria-valuenow":l,"aria-valuemin":u,"aria-valuemax":d,"aria-label":_||void 0,...b,children:n(`div`,{className:`progress-bar wui-progress-${x}`,style:{width:`${S}%`}})});return C?r(`div`,{className:`wui-progress-labelled${y?` ${y}`:``}`,children:[n(`div`,{className:`wui-progress-label`,"aria-hidden":`true`,children:_}),w]}):w}export{l as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{cloneElement as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=[`high`,`low`],s=[`sm`,`md`],c=[`info`,`success`,`warning`,`danger`,`neutral`];function l(e,t,n){let r=n-t;if(!(r>0))return 0;let i=Math.min(100,Math.max(0,(e-t)/r*100));return Number(i.toFixed(2))}function u(e,t,n,r,i){if(t==null&&n==null)return i;let a=`mid`;return t!=null&&e<=t?a=`low`:n!=null&&e>=n&&(a=`high`),r===`low`?a===`low`?`success`:a===`high`?`danger`:`warning`:a===`high`?`success`:a===`low`?`danger`:`warning`}function d(d){let{value:f=0,min:p=0,max:m=100,tone:h=`info`,optimum:g=`high`,low:_,high:v,size:y=`md`,label:b,showLabel:x=!1,className:S=``,...C}=d;n(`AppMeter`,C),t(`AppMeter`,`tone`,h,c),t(`AppMeter`,`optimum`,g,o),t(`AppMeter`,`size`,y,s);let w=u(f,_,v,g,c.includes(h)?h:`info`),T=l(f,p,m),E=x&&!!b,D=i(`div`,{className:`progress${y===`sm`?` progress-sm`:``}${!E&&S?` ${S}`:``}`,role:`meter`,"aria-valuenow":f,"aria-valuemin":p,"aria-valuemax":m,"aria-label":b||void 0,...C,children:i(`div`,{className:`progress-bar wui-progress-${w}`,style:{width:`${T}%`}})});return E?a(`div`,{...e(`AppMeter`,d),className:`wui-progress-labelled${S?` ${S}`:``}`,children:[i(`div`,{className:`wui-progress-label`,"aria-hidden":`true`,children:b}),D]}):r(D,e(`AppMeter`,d))}export{d as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";var a=[3,4,5],o=[`sm`,`md`],s=[`neutral`,`success`,`warning`,`danger`,`info`];function c({items:c=[],columns:l=4,size:u=`md`,className:d=``,...f}){return t(`AppMetricStrip`,f),e(`AppMetricStrip`,`columns`,l,a),e(`AppMetricStrip`,`size`,u,o),r(`div`,{className:[`wui-metric-strip`,`wui-metric-strip-cols-${l}`,u===`sm`?`wui-metric-strip-sm`:``,d].filter(Boolean).join(` `),...f,children:c.map((t,a)=>{e(`AppMetricStrip`,`tone`,t.tone,s);let o=`wui-metric${t.tone&&t.tone!==`neutral`?` wui-metric-tone-${t.tone}`:``}`,c=i(n,{children:[r(`div`,{className:`wui-metric-label`,children:t.label}),r(`div`,{className:`wui-metric-value`,children:t.value}),t.note&&r(`div`,{className:`wui-metric-note`,children:t.note})]}),l=`${t.label}-${a}`;return t.href?r(`a`,{href:t.href,className:o,children:c},l):r(`div`,{className:o,children:c},l)})})}export{c as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";var o=[3,4,5],s=[`sm`,`md`],c=[`neutral`,`success`,`warning`,`danger`,`info`];function l(l){let{items:u=[],columns:d=4,size:f=`md`,className:p=``,...m}=l;return n(`AppMetricStrip`,m),t(`AppMetricStrip`,`columns`,d,o),t(`AppMetricStrip`,`size`,f,s),i(`div`,{className:[`wui-metric-strip`,`wui-metric-strip-cols-${d}`,f===`sm`?`wui-metric-strip-sm`:``,p].filter(Boolean).join(` `),...e(`AppMetricStrip`,l),...m,children:u.map((e,n)=>{t(`AppMetricStrip`,`tone`,e.tone,c);let o=`wui-metric${e.tone&&e.tone!==`neutral`?` wui-metric-tone-${e.tone}`:``}`,s=a(r,{children:[i(`div`,{className:`wui-metric-label`,children:e.label}),i(`div`,{className:`wui-metric-value`,children:e.value}),e.note&&i(`div`,{className:`wui-metric-note`,children:e.note})]}),l=`${e.label}-${n}`;return e.href?i(`a`,{href:e.href,className:o,children:s},l):i(`div`,{className:o,children:s},l)})})}export{l as default};
@@ -1 +1 @@
1
- import{devWarn as e}from"../lib/devWarn.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"../lib/DiscardPrompt.js";import{useEffect as a,useRef as o,useState as s}from"react";import{Modal as c}from"react-bootstrap";import{jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`default`,`danger`,`success`,`warning`],f=[`center`,`top`],p=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,m={sm:380,md:440,lg:640,xl:880},h=`wui-modal-fullscreen`,g=!1;function _(){let t=!0;try{t=process.env.NODE_ENV!==`production`}catch{t=!0}!t||g||(g=!0,e("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."))}function v(e,t){if(e.key!==`Tab`)return;let n=Array.from(t.querySelectorAll(p));if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||a===t)?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),r.focus())}function y(){let e=[];for(let t of document.body.children)t.hasAttribute(`inert`)||t.matches(`.modal, .modal-backdrop`)||(t.setAttribute(`inert`,``),e.push(t));return e}function b({open:e,eyebrow:g,title:b,subtitle:x,headerIcon:S,tone:C=`default`,dismissible:w=!0,onClose:T,footer:E,size:D=`md`,placement:O=`center`,hideHeader:k=!1,staticBackdrop:A=!1,confirmDiscard:j,dirty:M=!1,ariaLabel:N,className:P=``,children:F,...I}){n(`AppModal`,I),t(`AppModal`,`tone`,C,d),t(`AppModal`,`placement`,O,f),t(`AppModal`,`size`,typeof D==`string`?D:null,[...Object.keys(m),`fullscreen`]);let{style:L,...R}=I;k&&!N&&typeof b!=`string`&&_();let z=o(null),B=o(null),[V,H]=s(!1);a(()=>{e||H(!1)},[e]),a(()=>{V&&B.current?.focus()},[V]),a(()=>{let e=z.current?.closest(`.modal`);e&&(j?e.setAttribute(`confirm-discard`,j):e.removeAttribute(`confirm-discard`))},[e,j]),a(()=>{if(!e)return;let t=z.current?.closest(`.modal-content`);if(!t)return;let n=()=>Array.from(t.querySelectorAll(p));(t.querySelector(`[data-autofocus]`)||n().find(e=>!e.classList.contains(`wui-modal-close`))||n()[0]||t).focus?.();let r=t.closest(`.modal`),i=y(),a=e=>v(e,r);return r?.addEventListener(`keydown`,a),()=>{r?.removeEventListener(`keydown`,a);for(let e of i)e.removeAttribute(`inert`);r&&setTimeout(()=>{r.isConnected&&!r.classList.contains(`show`)&&r.dispatchEvent(new Event(`transitionend`,{bubbles:!0}))},500)}},[e]);let U=()=>{if(j&&M){H(!0);return}T?.()},W=()=>{H(!1),T?.()},G=()=>{H(!1),(z.current?.querySelector(`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled])`))?.focus()},K=D===`fullscreen`,q=typeof D==`number`?D:m[D]??m.md,J=[`wui-modal`,C==="default"?``:`tone-${C}`,P].filter(Boolean).join(` `);return u(c,{...R,show:e,onHide:U,backdrop:!A||`static`,keyboard:!A,autoFocus:!1,enforceFocus:!0,restoreFocus:!0,centered:O!==`top`,className:K?`wui-modal-shell ${h}`:`wui-modal-shell`,style:K?L:{"--wui-modal-max-width":`${q}px`,...L},dialogClassName:`wui-rb-dialog`,contentClassName:J,backdropClassName:`wui-modal-dim`,"aria-label":N||(typeof b==`string`?b:void 0),children:[!k&&u(`div`,{className:`wui-modal-header`,children:[u(`div`,{className:`wui-modal-heading`,children:[S&&l(`span`,{className:`wui-modal-headicon`,children:l(r,{name:S,size:18})}),u(`div`,{className:`wui-modal-headtext`,children:[g&&l(`div`,{className:`wui-modal-eyebrow`,children:g}),l(`div`,{className:`wui-modal-title`,children:b}),x&&l(`div`,{className:`wui-modal-subtitle`,children:x})]})]}),w&&l(`button`,{type:`button`,className:`wui-modal-close`,onClick:U,"aria-label":`Close`,children:l(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:l(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),l(`div`,{className:`wui-modal-body`,ref:z,children:F}),(E||V)&&u(`div`,{className:V?`wui-modal-footer wui-drawer-discarding`:`wui-modal-footer`,children:[V&&l(i,{text:j,confirmRef:B,onDiscard:W,onKeep:G}),E]})]})}export{b as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./AppIcon.js";import a from"../lib/DiscardPrompt.js";import{useCallback as o,useEffect as s,useRef as c,useState as l}from"react";import{Modal as ee}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`default`,`danger`,`success`,`warning`],p=[`center`,`top`],m=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,h={sm:380,md:440,lg:640,xl:880},g=`wui-modal-fullscreen`,_=!1;function v(){let e=!0;try{e=process.env.NODE_ENV!==`production`}catch{e=!0}!e||_||(_=!0,t("[@webority/ui-react] <AppModal hideHeader> has no accessible name — pass `ariaLabel` (or a string `title`)."))}function y(e,t){if(e.key!==`Tab`)return;let n=Array.from(t.querySelectorAll(m));if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||a===t)?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),r.focus())}function b(){let e=[];for(let t of document.body.children)t.hasAttribute(`inert`)||t.matches(`.modal, .modal-backdrop`)||(t.setAttribute(`inert`,``),e.push(t));return e}function x(t){let{open:_,eyebrow:x,title:S,subtitle:C,headerIcon:w,tone:T=`default`,dismissible:te=!0,onClose:E,footer:D,size:O=`md`,placement:k=`center`,hideHeader:A=!1,staticBackdrop:j=!1,confirmDiscard:M,dirty:N=!1,ariaLabel:P,className:F=``,children:I,...L}=t;r(`AppModal`,L),n(`AppModal`,`tone`,T,f),n(`AppModal`,`placement`,k,p),n(`AppModal`,`size`,typeof O==`string`?O:null,[...Object.keys(h),`fullscreen`]);let{style:R,ref:z,"data-wui":B,"data-wui-props":V,...H}=L,U=B?{"data-wui":B,"data-wui-props":V}:e(`AppModal`,t),W=U[`data-wui`],G=U[`data-wui-props`];A&&!P&&typeof S!=`string`&&v();let K=c(null),q=c(null),[J,Y]=l(!1);s(()=>{_||Y(!1)},[_]),s(()=>{J&&q.current?.focus()},[J]),s(()=>{let e=K.current?.closest(`.modal`);e&&(M?e.setAttribute(`confirm-discard`,M):e.removeAttribute(`confirm-discard`))},[_,M]);let X=c(null),Z=o(e=>{X.current=e,typeof z==`function`?z(e):z&&(z.current=e)},[z]);s(()=>{let e=X.current?.dialog;e&&(e.setAttribute(`data-wui`,W),G===void 0?e.removeAttribute(`data-wui-props`):e.setAttribute(`data-wui-props`,G))},[_,W,G]),s(()=>{if(!_)return;let e=K.current?.closest(`.modal-content`);if(!e)return;let t=()=>Array.from(e.querySelectorAll(m));(e.querySelector(`[data-autofocus]`)||t().find(e=>!e.classList.contains(`wui-modal-close`))||t()[0]||e).focus?.();let n=e.closest(`.modal`),r=b(),i=e=>y(e,n);return n?.addEventListener(`keydown`,i),()=>{n?.removeEventListener(`keydown`,i);for(let e of r)e.removeAttribute(`inert`);n&&setTimeout(()=>{n.isConnected&&!n.classList.contains(`show`)&&n.dispatchEvent(new Event(`transitionend`,{bubbles:!0}))},500)}},[_]);let Q=()=>{if(M&&N){Y(!0);return}E?.()},ne=()=>{Y(!1),E?.()},re=()=>{Y(!1),(K.current?.querySelector(`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled])`))?.focus()},$=O===`fullscreen`,ie=typeof O==`number`?O:h[O]??h.md,ae=[`wui-modal`,T==="default"?``:`tone-${T}`,F].filter(Boolean).join(` `);return d(ee,{...H,ref:Z,show:_,onHide:Q,backdrop:!j||`static`,keyboard:!j,autoFocus:!1,enforceFocus:!0,restoreFocus:!0,centered:k!==`top`,className:$?`wui-modal-shell ${g}`:`wui-modal-shell`,style:$?R:{"--wui-modal-max-width":`${ie}px`,...R},dialogClassName:`wui-rb-dialog`,contentClassName:ae,backdropClassName:`wui-modal-dim`,"aria-label":P||(typeof S==`string`?S:void 0),children:[!A&&d(`div`,{className:`wui-modal-header`,children:[d(`div`,{className:`wui-modal-heading`,children:[w&&u(`span`,{className:`wui-modal-headicon`,children:u(i,{name:w,size:18})}),d(`div`,{className:`wui-modal-headtext`,children:[x&&u(`div`,{className:`wui-modal-eyebrow`,children:x}),u(`div`,{className:`wui-modal-title`,children:S}),C&&u(`div`,{className:`wui-modal-subtitle`,children:C})]})]}),te&&u(`button`,{type:`button`,className:`wui-modal-close`,onClick:Q,"aria-label":`Close`,children:u(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:u(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),u(`div`,{className:`wui-modal-body`,ref:K,children:I}),(D||J)&&d(`div`,{className:J?`wui-modal-footer wui-drawer-discarding`:`wui-modal-footer`,children:[J&&u(a,{text:M,confirmRef:q,onDiscard:ne,onKeep:re}),D]})]})}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 from"./useNodeLabels.js";import o,{optionsEqual as s,readValues as c,writeValues as l}from"./useWuiControl.js";import{forwardRef as u,useEffect as d,useId as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import"@webority/ui-elements/elements/multiselect";var h=[`sm`,`lg`],g=[],_=(e,t)=>({...e,label:t}),v=u(function({values:u,onChange:v,options:y,placeholder:b=`Select…`,searchPlaceholder:x=`Search…`,searchable:S=!0,disabled:C=!1,icon:w,size:T,collapseChips:E=!1,allowCustom:D=!1,validateCustom:O,customPattern:k,customInvalidMessage:A,name:j,id:M,label:N,error:P,hint:F,required:I=!1,help:L,helpLabel:R=`More information`,fieldClassName:z=``,...B},V){t(`AppMultiSelect`,B),e(`AppMultiSelect`,`size`,T,h);let H=f(),U=M||H,{setRef:W,innerRef:G}=o({ref:V,value:u,onChange:v,readValue:c,writeValue:l}),K=y||g,{portal:q,toElementOptions:J}=a(K);return d(()=>{let e=G.current;if(!e)return;let t=J(K,_);s(t,e.options)||(e.options=t)},[K,G,J]),d(()=>{let e=G.current;e&&(e.validateCustom=O??null)},[O,G]),m(`div`,{className:`field${z?` ${z}`:``}`,children:[N&&m(`label`,{className:`label`,htmlFor:U,children:[N,I&&p(i,{}),L&&p(r,{label:R,children:L})]}),p(`wui-multiselect`,{"aria-label":typeof N==`string`?N:void 0,"aria-describedby":P?`${U}-error`:F?`${U}-hint`:void 0,"aria-invalid":P?`true`:void 0,id:U,ref:W,name:j,placeholder:b,"search-placeholder":x,icon:w||void 0,size:T||void 0,"collapse-chips":E?``:void 0,"allow-custom":D?``:void 0,"custom-pattern":k||void 0,"custom-invalid-message":A||void 0,searchable:S?``:void 0,disabled:C?``:void 0,required:I?``:void 0,...B}),q,p(n,{error:P,hint:F,errorId:`${U}-error`,hintId:`${U}-hint`})]})});export{v as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o from"./useNodeLabels.js";import s,{optionsEqual as c,readValues as l,writeValues as u}from"./useWuiControl.js";import{forwardRef as d,useEffect as f,useId as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import"@webority/ui-elements/elements/multiselect";var g=[`sm`,`lg`],_=[],v=(e,t)=>({...e,label:t}),y=d(function(d,y){let{values:b,onChange:x,options:S,placeholder:C=`Select…`,searchPlaceholder:w=`Search…`,searchable:T=!0,disabled:E=!1,icon:D,size:O,collapseChips:k=!1,allowCustom:A=!1,validateCustom:j,customPattern:M,customInvalidMessage:N,name:P,id:F,label:I,error:L,hint:R,required:z=!1,help:B,helpLabel:V=`More information`,fieldClassName:H=``,...U}=d;n(`AppMultiSelect`,U),t(`AppMultiSelect`,`size`,O,g);let W=p(),G=F||W,{setRef:K,innerRef:q}=s({ref:y,value:b,onChange:x,readValue:l,writeValue:u}),J=S||_,{portal:Y,toElementOptions:X}=o(J);return f(()=>{let e=q.current;if(!e)return;let t=X(J,v);c(t,e.options)||(e.options=t)},[J,q,X]),f(()=>{let e=q.current;e&&(e.validateCustom=j??null)},[j,q]),h(`div`,{...e(`AppMultiSelect`,d),className:`field${H?` ${H}`:``}`,children:[I&&h(`label`,{className:`label`,htmlFor:G,children:[I,z&&m(a,{}),B&&m(i,{label:V,children:B})]}),m(`wui-multiselect`,{"aria-label":typeof I==`string`?I:void 0,"aria-describedby":L?`${G}-error`:R?`${G}-hint`:void 0,"aria-invalid":L?`true`:void 0,id:G,ref:K,name:P,placeholder:C,"search-placeholder":w,icon:D||void 0,size:O||void 0,"collapse-chips":k?``:void 0,"allow-custom":A?``:void 0,"custom-pattern":M||void 0,"custom-invalid-message":N||void 0,searchable:T?``:void 0,disabled:E?``:void 0,required:z?``:void 0,...U}),Y,m(r,{error:L,hint:R,errorId:`${G}-error`,hintId:`${G}-hint`})]})});export{y as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./renderIconProp.js";import{useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import"@webority/ui-elements/elements/navigation-menu";function a({items:a=[],ariaLabel:o=`Main`,linkComponent:s,className:c=``,...l}){e(`AppNavigationMenu`,l);let u=n(),d=s??`a`,f=e=>s?{to:e}:{href:e};return r(`wui-navigation-menu`,{class:[`wui-nav-menu`,c].filter(Boolean).join(` `),...l,children:r(`nav`,{"aria-label":o,children:r(`ul`,{className:`wui-nav-menu-list`,children:a.map(e=>{if(!e.links?.length)return r(`li`,{className:`wui-nav-menu-item`,children:r(d,{...f(e.to),className:`wui-nav-menu-toplink`,"aria-current":e.current?`page`:void 0,children:e.label})},e.key);let n=`${u}-${e.key}`;return i(`li`,{className:`wui-nav-menu-item`,children:[i(`button`,{type:`button`,className:`wui-nav-menu-trigger`,"aria-expanded":`false`,"aria-controls":n,"data-key":e.key,children:[e.label,t(`chevron-down`,{size:14,className:`wui-nav-menu-chevron`})]}),r(`div`,{className:`wui-nav-menu-panel`,id:n,children:r(`ul`,{className:`wui-nav-menu-links`,children:e.links.map(e=>r(`li`,{children:i(d,{...f(e.to),className:`wui-nav-menu-link`,"aria-current":e.current?`page`:void 0,children:[t(e.icon,{size:18}),i(`span`,{className:`wui-nav-menu-link-text`,children:[r(`span`,{className:`wui-nav-menu-link-label`,children:e.label}),e.description?r(`span`,{className:`wui-nav-menu-link-desc`,children:e.description}):null]})]})},e.key))})})]},e.key)})})})})}export{a 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}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/navigation-menu";function o(o){let{items:s=[],ariaLabel:c=`Main`,linkComponent:l,className:u=``,...d}=o;t(`AppNavigationMenu`,d);let f=r(),p=l??`a`,m=e=>l?{to:e}:{href:e};return i(`wui-navigation-menu`,{class:[`wui-nav-menu`,u].filter(Boolean).join(` `),...e(`AppNavigationMenu`,o),...d,children:i(`nav`,{"aria-label":c,children:i(`ul`,{className:`wui-nav-menu-list`,children:s.map(e=>{if(!e.links?.length)return i(`li`,{className:`wui-nav-menu-item`,children:i(p,{...m(e.to),className:`wui-nav-menu-toplink`,"aria-current":e.current?`page`:void 0,children:e.label})},e.key);let t=`${f}-${e.key}`;return a(`li`,{className:`wui-nav-menu-item`,children:[a(`button`,{type:`button`,className:`wui-nav-menu-trigger`,"aria-expanded":`false`,"aria-controls":t,"data-key":e.key,children:[e.label,n(`chevron-down`,{size:14,className:`wui-nav-menu-chevron`})]}),i(`div`,{className:`wui-nav-menu-panel`,id:t,children:i(`ul`,{className:`wui-nav-menu-links`,children:e.links.map(e=>i(`li`,{children:a(p,{...m(e.to),className:`wui-nav-menu-link`,"aria-current":e.current?`page`:void 0,children:[n(e.icon,{size:18}),a(`span`,{className:`wui-nav-menu-link-text`,children:[i(`span`,{className:`wui-nav-menu-link-label`,children:e.label}),e.description?i(`span`,{className:`wui-nav-menu-link-desc`,children:e.description}):null]})]})},e.key))})})]},e.key)})})})})}export{o as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./AppIcon.js";import{NOTIFICATION_TEXT as n,groupNotificationsByDay as r,notificationCountText as i,notificationTime as a,notificationTriggerLabel as o,notificationUnreadAnnouncement as s}from"@webority/ui-elements/helpers";import{useEffect as c,useId as l,useLayoutEffect as u,useRef as d,useState as f}from"react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import"@webority/ui-elements/elements/notification-center";function g({items:a,unread:p,label:g=n.label,emptyText:v=n.empty,viewAllHref:y,defaultOpen:b=!1,now:x,onMarkAllRead:S,onItemClick:C,onOpenChange:w,className:T=``,...E}){if(e(`AppNotificationCenter`,E),!Array.isArray(a))throw Error(`<AppNotificationCenter> items is required: pass the notifications, newest first.`);let D=l(),O=l(),k=d(null),A=d(w);A.current=w,c(()=>{let e=k.current,t=e=>A.current?.(e.detail.open);return e.addEventListener(`wui:notification-center:toggle`,t),()=>e.removeEventListener(`wui:notification-center:toggle`,t)},[]);let j=d(b);u(()=>{if(!j.current)return;let e=k.current;e.setAttribute(`open`,``),e.querySelector(`.wui-notification-center-trigger`)?.setAttribute(`aria-expanded`,`true`)},[]);let M=p??a.filter(e=>!e.read).length,[N,P]=f(``),F=d(M);c(()=>{F.current!==M&&(F.current=M,P(s(M)))},[M]);let I=r(a,x);return h(`wui-notification-center`,{ref:k,class:[`wui-notification-center`,T].filter(Boolean).join(` `),label:g,controlled:``,...E,children:[h(`button`,{type:`button`,className:`topbar-icon-btn wui-notification-center-trigger`,"aria-expanded":j.current?`true`:`false`,"aria-controls":D,"aria-haspopup":`dialog`,"aria-label":o(g,M),children:[m(t,{name:`notification`,size:20}),m(`span`,{className:`wui-notification-center-count`,"aria-hidden":`true`,hidden:M===0,children:i(M)})]}),m(`span`,{className:`visually-hidden wui-notification-center-live`,"aria-live":`polite`,children:N}),h(`div`,{className:`wui-notification-center-panel`,id:D,role:`dialog`,"aria-labelledby":O,tabIndex:-1,children:[h(`div`,{className:`wui-notification-center-head`,children:[m(`h2`,{className:`wui-notification-center-title`,id:O,children:g}),S&&m(`button`,{type:`button`,className:`wui-notification-center-markall`,disabled:M===0,onClick:S,children:n.markAll})]}),I.length===0?m(`p`,{className:`wui-notification-center-empty`,children:v}):m(`div`,{className:`wui-notification-center-list`,children:I.map(e=>h(`section`,{"aria-labelledby":`${D}-${e.key}`,children:[m(`h3`,{className:`wui-notification-center-day`,id:`${D}-${e.key}`,children:e.heading}),m(`ul`,{className:`wui-notification-center-items`,children:e.items.map(e=>m(`li`,{children:m(_,{item:e,onItemClick:C})},e.id))})]},e.key))}),y&&m(`a`,{className:`wui-notification-center-foot`,href:y,children:n.viewAll})]})]})}function _({item:e,onItemClick:r}){let i=`wui-notification-center-item${e.read?` wui-notification-center-item-read`:``}`,o=a(e.at),s=h(p,{children:[m(`span`,{className:`wui-notification-center-dot`,"aria-hidden":`true`}),e.icon&&m(`span`,{className:`wui-notification-center-icon`,children:m(t,{name:e.icon,size:18})}),h(`span`,{className:`wui-notification-center-body`,children:[!e.read&&m(`span`,{className:`visually-hidden wui-notification-center-unread-label`,children:n.unreadPrefix}),m(`span`,{className:`wui-notification-center-item-title`,children:e.title}),e.text&&m(`span`,{className:`wui-notification-center-item-text`,children:e.text}),o&&m(`time`,{className:`wui-notification-center-when`,dateTime:String(e.at),children:o})]})]}),c=r?t=>r(e,t):void 0;return e.href?m(`a`,{className:i,href:e.href,"data-id":e.id,onClick:c,children:s}):m(`button`,{type:`button`,className:i,"data-id":e.id,onClick:c,children:s})}export{g as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{NOTIFICATION_TEXT as r,groupNotificationsByDay as i,notificationCountText as a,notificationTime as o,notificationTriggerLabel as s,notificationUnreadAnnouncement as c}from"@webority/ui-elements/helpers";import{useEffect as l,useId as u,useLayoutEffect as d,useRef as f,useState as p}from"react";import{Fragment as m,jsx as h,jsxs as g}from"react/jsx-runtime";import"@webority/ui-elements/elements/notification-center";function _(o){let{items:m,unread:_,label:y=r.label,emptyText:b=r.empty,viewAllHref:x,defaultOpen:S=!1,now:C,onMarkAllRead:w,onItemClick:T,onOpenChange:E,className:D=``,...O}=o;if(t(`AppNotificationCenter`,O),!Array.isArray(m))throw Error(`<AppNotificationCenter> items is required: pass the notifications, newest first.`);let k=u(),A=u(),j=f(null),M=f(E);M.current=E,l(()=>{let e=j.current,t=e=>M.current?.(e.detail.open);return e.addEventListener(`wui:notification-center:toggle`,t),()=>e.removeEventListener(`wui:notification-center:toggle`,t)},[]);let N=f(S);d(()=>{if(!N.current)return;let e=j.current;e.setAttribute(`open`,``),e.querySelector(`.wui-notification-center-trigger`)?.setAttribute(`aria-expanded`,`true`)},[]);let P=_??m.filter(e=>!e.read).length,[F,I]=p(``),L=f(P);l(()=>{L.current!==P&&(L.current=P,I(c(P)))},[P]);let R=i(m,C);return g(`wui-notification-center`,{ref:j,class:[`wui-notification-center`,D].filter(Boolean).join(` `),label:y,controlled:``,...e(`AppNotificationCenter`,o),...O,children:[g(`button`,{type:`button`,className:`topbar-icon-btn wui-notification-center-trigger`,"aria-expanded":N.current?`true`:`false`,"aria-controls":k,"aria-haspopup":`dialog`,"aria-label":s(y,P),children:[h(n,{name:`notification`,size:20}),h(`span`,{className:`wui-notification-center-count`,"aria-hidden":`true`,hidden:P===0,children:a(P)})]}),h(`span`,{className:`visually-hidden wui-notification-center-live`,"aria-live":`polite`,children:F}),g(`div`,{className:`wui-notification-center-panel`,id:k,role:`dialog`,"aria-labelledby":A,tabIndex:-1,children:[g(`div`,{className:`wui-notification-center-head`,children:[h(`h2`,{className:`wui-notification-center-title`,id:A,children:y}),w&&h(`button`,{type:`button`,className:`wui-notification-center-markall`,disabled:P===0,onClick:w,children:r.markAll})]}),R.length===0?h(`p`,{className:`wui-notification-center-empty`,children:b}):h(`div`,{className:`wui-notification-center-list`,children:R.map(e=>g(`section`,{"aria-labelledby":`${k}-${e.key}`,children:[h(`h3`,{className:`wui-notification-center-day`,id:`${k}-${e.key}`,children:e.heading}),h(`ul`,{className:`wui-notification-center-items`,children:e.items.map(e=>h(`li`,{children:h(v,{item:e,onItemClick:T})},e.id))})]},e.key))}),x&&h(`a`,{className:`wui-notification-center-foot`,href:x,children:r.viewAll})]})]})}function v({item:e,onItemClick:t}){let i=`wui-notification-center-item${e.read?` wui-notification-center-item-read`:``}`,a=o(e.at),s=g(m,{children:[h(`span`,{className:`wui-notification-center-dot`,"aria-hidden":`true`}),e.icon&&h(`span`,{className:`wui-notification-center-icon`,children:h(n,{name:e.icon,size:18})}),g(`span`,{className:`wui-notification-center-body`,children:[!e.read&&h(`span`,{className:`visually-hidden wui-notification-center-unread-label`,children:r.unreadPrefix}),h(`span`,{className:`wui-notification-center-item-title`,children:e.title}),e.text&&h(`span`,{className:`wui-notification-center-item-text`,children:e.text}),a&&h(`time`,{className:`wui-notification-center-when`,dateTime:String(e.at),children:a})]})]}),c=t?n=>t(e,n):void 0;return e.href?h(`a`,{className:i,href:e.href,"data-id":e.id,onClick:c,children:s}):h(`button`,{type:`button`,className:i,"data-id":e.id,onClick:c,children:s})}export{_ as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import r from"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import{forwardRef as o,useEffect as s,useId as c,useState as l}from"react";import{Form as u}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`sm`,`md`,`lg`],m=e=>{if(e===``||e===null)return null;let t=parseFloat(e);return Number.isNaN(t)?null:t},h=(e,t)=>t>0&&Number.isFinite(e)?e.toFixed(t):String(e??``),g=o(function({label:o,required:g=!1,error:_,hint:v,help:y,helpLabel:b=`More information`,value:x,onChange:S,min:C,max:w,step:T=1,precision:E=0,unit:D,size:O=`md`,id:k,name:A,className:j=``,fieldClassName:M=``,disabled:N=!1,...P},F){t(`AppNumberInput`,P),e(`AppNumberInput`,`size`,O,p);let I=c(),L=k||I,R=e=>{if(E===0)return Math.round(e);let t=10**E;return Math.round(e*t)/t},z=e=>{let t=e;return typeof C==`number`&&(t=Math.max(t,C)),typeof w==`number`&&(t=Math.min(t,w)),t},B=e=>h(e,E),[V,H]=l(()=>B(x));s(()=>{H(e=>m(e)===(x??``)?e:h(x,E))},[x,E]);let U=e=>{let t=(m(V)??z(0))+e*T,n=z(R(t));H(B(n)),S?.(n)},W=m(V),G=N||W!==null&&typeof C==`number`&&W<=C,K=N||W!==null&&typeof w==`number`&&W>=w,q=_&&L?`${L}-error`:void 0,J=v&&L?`${L}-hint`:void 0,Y=q||J,X=[`input`,O===`sm`?`input-sm`:``,O===`lg`?`input-lg`:``,_?`error`:``,`num-input`,j].filter(Boolean).join(` `),Z=RegExp(`^${typeof C==`number`&&C>=0?``:`-?`}\\d*${E>0?`(\\.\\d*)?`:``}$`),Q=e=>{let t=e.target.value;if(!Z.test(t))return;H(t);let n=m(t);n!==null&&S?.(n)},$=e=>{let t=m(e.target.value);if(t===null)H(``),S?.(``);else{let e=z(R(t));H(B(e)),S?.(e)}P.onBlur?.(e)},ee=e=>{e.key===`ArrowUp`?(e.preventDefault(),U(1)):e.key===`ArrowDown`&&(e.preventDefault(),U(-1)),P.onKeyDown?.(e)},te=d(u.Control,{...P,id:L,name:A,type:`text`,inputMode:E>0?`decimal`:`numeric`,className:X,disabled:N,required:g,"aria-invalid":_?`true`:`false`,"aria-describedby":Y,value:V,ref:F,onChange:Q,onBlur:$,onKeyDown:ee}),ne=f(`div`,{className:[`num-wrap`,O===`sm`?`num-wrap-sm`:``,O===`lg`?`num-wrap-lg`:``].filter(Boolean).join(` `),children:[d(`button`,{type:`button`,className:`num-btn`,"aria-label":`Decrease`,tabIndex:-1,disabled:G,onClick:()=>U(-1),children:d(n,{name:`minus`,size:16})}),te,D&&d(`span`,{className:`affix`,children:D}),d(`button`,{type:`button`,className:`num-btn`,"aria-label":`Increase`,tabIndex:-1,disabled:K,onClick:()=>U(1),children:d(n,{name:`plus`,size:16})})]});return f(u.Group,{className:`field${M?` ${M}`:``}`,children:[o&&f(u.Label,{className:`label`,htmlFor:L,children:[o,g&&d(a,{}),y&&d(i,{label:b,children:y})]}),ne,d(r,{error:_,hint:v,errorId:q,hintId:J})]})});export{g as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"../lib/FieldMessage.js";import a from"./AppInfoTip.js";import o from"./AppRequiredMark.js";import{forwardRef as s,useEffect as c,useId 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=[`sm`,`md`,`lg`],h=e=>{if(e===``||e===null)return null;let t=parseFloat(e);return Number.isNaN(t)?null:t},g=(e,t)=>t>0&&Number.isFinite(e)?e.toFixed(t):String(e??``),_=s(function(s,_){let{label:v,required:y=!1,error:b,hint:x,help:S,helpLabel:C=`More information`,value:w,onChange:T,min:E,max:D,step:O=1,precision:k=0,unit:A,size:j=`md`,id:M,name:N,className:P=``,fieldClassName:F=``,disabled:I=!1,...L}=s;n(`AppNumberInput`,L),t(`AppNumberInput`,`size`,j,m);let R=l(),z=M||R,B=e=>{if(k===0)return Math.round(e);let t=10**k;return Math.round(e*t)/t},V=e=>{let t=e;return typeof E==`number`&&(t=Math.max(t,E)),typeof D==`number`&&(t=Math.min(t,D)),t},H=e=>g(e,k),[U,W]=u(()=>H(w));c(()=>{W(e=>h(e)===(w??``)?e:g(w,k))},[w,k]);let G=e=>{let t=(h(U)??V(0))+e*O,n=V(B(t));W(H(n)),T?.(n)},K=h(U),q=I||K!==null&&typeof E==`number`&&K<=E,J=I||K!==null&&typeof D==`number`&&K>=D,Y=b&&z?`${z}-error`:void 0,X=x&&z?`${z}-hint`:void 0,Z=Y||X,Q=[`input`,j===`sm`?`input-sm`:``,j===`lg`?`input-lg`:``,b?`error`:``,`num-input`,P].filter(Boolean).join(` `),$=RegExp(`^${typeof E==`number`&&E>=0?``:`-?`}\\d*${k>0?`(\\.\\d*)?`:``}$`),ee=e=>{let t=e.target.value;if(!$.test(t))return;W(t);let n=h(t);n!==null&&T?.(n)},te=e=>{let t=h(e.target.value);if(t===null)W(``),T?.(``);else{let e=V(B(t));W(H(e)),T?.(e)}L.onBlur?.(e)},ne=e=>{e.key===`ArrowUp`?(e.preventDefault(),G(1)):e.key===`ArrowDown`&&(e.preventDefault(),G(-1)),L.onKeyDown?.(e)},re=f(d.Control,{...L,id:z,name:N,type:`text`,inputMode:k>0?`decimal`:`numeric`,className:Q,disabled:I,required:y,"aria-invalid":b?`true`:`false`,"aria-describedby":Z,value:U,ref:_,onChange:ee,onBlur:te,onKeyDown:ne}),ie=p(`div`,{className:[`num-wrap`,j===`sm`?`num-wrap-sm`:``,j===`lg`?`num-wrap-lg`:``].filter(Boolean).join(` `),children:[f(`button`,{type:`button`,className:`num-btn`,"aria-label":`Decrease`,tabIndex:-1,disabled:q,onClick:()=>G(-1),children:f(r,{name:`minus`,size:16})}),re,A&&f(`span`,{className:`affix`,children:A}),f(`button`,{type:`button`,className:`num-btn`,"aria-label":`Increase`,tabIndex:-1,disabled:J,onClick:()=>G(1),children:f(r,{name:`plus`,size:16})})]});return p(d.Group,{...e(`AppNumberInput`,s),className:`field${F?` ${F}`:``}`,children:[v&&p(d.Label,{className:`label`,htmlFor:z,children:[v,y&&f(o,{}),S&&f(a,{label:C,children:S})]}),ie,f(i,{error:b,hint:x,errorId:Y,hintId:X})]})});export{_ as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import r from"./AppActionIcon.js";import{useCallback as i,useId as a,useRef as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import"@webority/ui-elements/elements/onboarding-checklist";var l=[`done`,`current`,`skipped`,`todo`],u={done:`Done: `,skipped:`Skipped: `};function d(e){let t=e.map(e=>l.includes(e.status)?e.status:`todo`);if(!t.includes(`current`)){let e=t.indexOf(`todo`);e>=0&&(t[e]=`current`)}return t}function f(e,t){return e===`done`?s(n,{name:`check`,size:14}):e===`skipped`?s(n,{name:`minus`,size:14}):t+1}function p(e,t){return e.href?t?s(t,{className:`wui-onboarding-label`,to:e.href,children:e.label}):s(`a`,{className:`wui-onboarding-label`,href:e.href,children:e.label}):s(`span`,{className:`wui-onboarding-label`,children:e.label})}function m({steps:m=[],title:h=`Get started`,defaultCollapsed:g,defaultDismissed:_=!1,storageKey:v,dismissLabel:y=`Dismiss checklist`,restoreLabel:b=`Show setup checklist`,onDismiss:x,onRestore:S,onCollapsedChange:C,linkComponent:w,className:T=``,...E}){t(`AppOnboardingChecklist`,E);for(let t of m)e(`AppOnboardingChecklist`,`steps[].status`,t.status,l);let D=a().replace(/[^a-zA-Z0-9_-]/g,``),O=`wui-onboarding-${D}-title`,k=`wui-onboarding-${D}-steps`,A=m.length===0,j=o(null);j.current={onDismiss:x,onRestore:S,onCollapsedChange:C};let M=i(e=>{if(!e)return;let t=()=>j.current.onDismiss?.(),n=()=>j.current.onRestore?.(),r=e=>j.current.onCollapsedChange?.(e.detail.collapsed);return e.addEventListener(`wui:onboarding:dismiss`,t),e.addEventListener(`wui:onboarding:restore`,n),e.addEventListener(`wui:onboarding:collapse`,r),()=>{e.removeEventListener(`wui:onboarding:dismiss`,t),e.removeEventListener(`wui:onboarding:restore`,n),e.removeEventListener(`wui:onboarding:collapse`,r)}},[]);if(A)return null;let N=d(m),P=N.filter(e=>e===`done`).length,F=N.filter(e=>e===`skipped`).length,I=P+F===m.length,L=g??I,R=`${P} of ${m.length} done${F?`, ${F} skipped`:``}`;return c(`wui-onboarding-checklist`,{ref:M,class:[`wui-onboarding`,I?`is-complete`:``,T].filter(Boolean).join(` `),"storage-key":v||void 0,...E,children:[c(`section`,{className:`wui-onboarding-card`,"aria-labelledby":O,hidden:_||void 0,children:[c(`header`,{className:`wui-onboarding-head`,children:[c(`button`,{type:`button`,className:`wui-onboarding-toggle`,"aria-expanded":!L,"aria-controls":k,children:[s(`span`,{className:`wui-onboarding-title`,id:O,children:h}),s(`span`,{className:`wui-onboarding-count`,children:R}),s(`span`,{className:`wui-onboarding-chevron`,"aria-hidden":`true`,children:s(n,{name:`chevron-down`,size:16})})]}),s(r,{icon:`x`,label:y,size:16,className:`wui-onboarding-dismiss`})]}),s(`div`,{className:`wui-onboarding-bar`,role:`progressbar`,"aria-labelledby":O,"aria-valuemin":0,"aria-valuemax":m.length,"aria-valuenow":P,"aria-valuetext":R,children:N.map((e,t)=>s(`span`,{className:`wui-onboarding-seg is-${e}`},m[t].key??`${m[t].label}-${t}`))}),s(`ol`,{className:`wui-onboarding-steps`,id:k,hidden:L||void 0,children:m.map((e,t)=>{let n=N[t];return c(`li`,{className:`wui-onboarding-step is-${n}`,"aria-current":n===`current`?`step`:void 0,children:[s(`span`,{className:`wui-onboarding-mark`,"aria-hidden":`true`,children:f(n,t)}),c(`span`,{className:`wui-onboarding-body`,children:[u[n]?s(`span`,{className:`visually-hidden`,children:u[n]}):null,p(e,w),e.description?s(`span`,{className:`wui-onboarding-desc`,children:e.description}):null]})]},e.key??`${e.label}-${t}`)})})]}),c(`button`,{type:`button`,className:`wui-onboarding-restore`,hidden:!_||void 0,children:[s(n,{name:`task-square`,size:16}),s(`span`,{children:b}),s(`span`,{className:`wui-onboarding-count`,children:R})]})]})}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 i from"./AppActionIcon.js";import{useCallback as a,useId as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/onboarding-checklist";var u=[`done`,`current`,`skipped`,`todo`],d={done:`Done: `,skipped:`Skipped: `};function f(e){let t=e.map(e=>u.includes(e.status)?e.status:`todo`);if(!t.includes(`current`)){let e=t.indexOf(`todo`);e>=0&&(t[e]=`current`)}return t}function p(e,t){return e===`done`?c(r,{name:`check`,size:14}):e===`skipped`?c(r,{name:`minus`,size:14}):t+1}function m(e,t){return e.href?t?c(t,{className:`wui-onboarding-label`,to:e.href,children:e.label}):c(`a`,{className:`wui-onboarding-label`,href:e.href,children:e.label}):c(`span`,{className:`wui-onboarding-label`,children:e.label})}function h(h){let{steps:g=[],title:_=`Get started`,defaultCollapsed:v,defaultDismissed:y=!1,storageKey:b,dismissLabel:x=`Dismiss checklist`,restoreLabel:S=`Show setup checklist`,onDismiss:C,onRestore:w,onCollapsedChange:T,linkComponent:E,className:D=``,...O}=h;n(`AppOnboardingChecklist`,O);for(let e of g)t(`AppOnboardingChecklist`,`steps[].status`,e.status,u);let k=o().replace(/[^a-zA-Z0-9_-]/g,``),A=`wui-onboarding-${k}-title`,j=`wui-onboarding-${k}-steps`,M=g.length===0,N=s(null);N.current={onDismiss:C,onRestore:w,onCollapsedChange:T};let P=a(e=>{if(!e)return;let t=()=>N.current.onDismiss?.(),n=()=>N.current.onRestore?.(),r=e=>N.current.onCollapsedChange?.(e.detail.collapsed);return e.addEventListener(`wui:onboarding:dismiss`,t),e.addEventListener(`wui:onboarding:restore`,n),e.addEventListener(`wui:onboarding:collapse`,r),()=>{e.removeEventListener(`wui:onboarding:dismiss`,t),e.removeEventListener(`wui:onboarding:restore`,n),e.removeEventListener(`wui:onboarding:collapse`,r)}},[]);if(M)return null;let F=f(g),I=F.filter(e=>e===`done`).length,L=F.filter(e=>e===`skipped`).length,R=I+L===g.length,z=v??R,B=`${I} of ${g.length} done${L?`, ${L} skipped`:``}`;return l(`wui-onboarding-checklist`,{ref:P,class:[`wui-onboarding`,R?`is-complete`:``,D].filter(Boolean).join(` `),"storage-key":b||void 0,...e(`AppOnboardingChecklist`,h),...O,children:[l(`section`,{className:`wui-onboarding-card`,"aria-labelledby":A,hidden:y||void 0,children:[l(`header`,{className:`wui-onboarding-head`,children:[l(`button`,{type:`button`,className:`wui-onboarding-toggle`,"aria-expanded":!z,"aria-controls":j,children:[c(`span`,{className:`wui-onboarding-title`,id:A,children:_}),c(`span`,{className:`wui-onboarding-count`,children:B}),c(`span`,{className:`wui-onboarding-chevron`,"aria-hidden":`true`,children:c(r,{name:`chevron-down`,size:16})})]}),c(i,{icon:`x`,label:x,size:16,className:`wui-onboarding-dismiss`})]}),c(`div`,{className:`wui-onboarding-bar`,role:`progressbar`,"aria-labelledby":A,"aria-valuemin":0,"aria-valuemax":g.length,"aria-valuenow":I,"aria-valuetext":B,children:F.map((e,t)=>c(`span`,{className:`wui-onboarding-seg is-${e}`},g[t].key??`${g[t].label}-${t}`))}),c(`ol`,{className:`wui-onboarding-steps`,id:j,hidden:z||void 0,children:g.map((e,t)=>{let n=F[t];return l(`li`,{className:`wui-onboarding-step is-${n}`,"aria-current":n===`current`?`step`:void 0,children:[c(`span`,{className:`wui-onboarding-mark`,"aria-hidden":`true`,children:p(n,t)}),l(`span`,{className:`wui-onboarding-body`,children:[d[n]?c(`span`,{className:`visually-hidden`,children:d[n]}):null,m(e,E),e.description?c(`span`,{className:`wui-onboarding-desc`,children:e.description}):null]})]},e.key??`${e.label}-${t}`)})})]}),l(`button`,{type:`button`,className:`wui-onboarding-restore`,hidden:!y||void 0,children:[c(r,{name:`task-square`,size:16}),c(`span`,{children:S}),c(`span`,{className:`wui-onboarding-count`,children:B})]})]})}export{h as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"../lib/FieldMessage.js";import r from"./AppRequiredMark.js";import i from"./useWuiControl.js";import{forwardRef as a,useId as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import"@webority/ui-elements/elements/otp";var l=[`numeric`,`alphanumeric`],u=a(function({value:a,onChange:u,onComplete:d,length:f=6,mode:p=`numeric`,label:m,required:h=!1,hint:g,error:_,disabled:v=!1,name:y,id:b,className:x=``,fieldClassName:S=``,...C},w){t(`AppOtpInput`,C),e(`AppOtpInput`,`mode`,p,l);let T=o(),E=b||T,D=_?`${E}-error`:void 0,O=g?`${E}-hint`:void 0,k=D||O,{setRef:A}=i({ref:w,value:a??``,onChange:u,on:{complete:e=>d?.(e.detail)}}),j=s(`wui-otp`,{"aria-label":typeof m==`string`?m:void 0,ref:A,id:E,name:y,length:String(f),mode:p,"aria-describedby":k,"aria-invalid":_?`true`:void 0,disabled:v?``:void 0,required:h?``:void 0,className:x||void 0,...C});return!m&&!_&&!g?j:c(`div`,{className:`field${S?` ${S}`:``}`,children:[m&&c(`label`,{className:`label`,htmlFor:E,children:[m,h&&s(r,{})]}),j,s(n,{error:_,hint:g,errorId:D,hintId:O})]})});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 from"../lib/FieldMessage.js";import i from"./AppRequiredMark.js";import a from"./useWuiControl.js";import{cloneElement as o,forwardRef as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import"@webority/ui-elements/elements/otp";var d=[`numeric`,`alphanumeric`],f=s(function(s,f){let{value:p,onChange:m,onComplete:h,length:g=6,mode:_=`numeric`,label:v,required:y=!1,hint:b,error:x,disabled:S=!1,name:C,id:w,className:T=``,fieldClassName:E=``,...D}=s;n(`AppOtpInput`,D),t(`AppOtpInput`,`mode`,_,d);let O=c(),k=w||O,A=x?`${k}-error`:void 0,j=b?`${k}-hint`:void 0,M=A||j,{setRef:N}=a({ref:f,value:p??``,onChange:m,on:{complete:e=>h?.(e.detail)}}),P=l(`wui-otp`,{"aria-label":typeof v==`string`?v:void 0,ref:N,id:k,name:C,length:String(g),mode:_,"aria-describedby":M,"aria-invalid":x?`true`:void 0,disabled:S?``:void 0,required:y?``:void 0,className:T||void 0,...D});return!v&&!x&&!b?o(P,e(`AppOtpInput`,s)):u(`div`,{...e(`AppOtpInput`,s),className:`field${E?` ${E}`:``}`,children:[v&&u(`label`,{className:`label`,htmlFor:k,children:[v,y&&l(i,{})]}),P,l(r,{error:x,hint:b,errorId:A,hintId:j})]})});export{f as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{BreadcrumbTrailContext as r}from"./AppBreadcrumbs.js";import{formatNumber as i}from"@webority/ui-elements/helpers";import{useEffect as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`primary`,`success`,`warning`,`danger`,`info`],u=[`sm`,`md`,`lg`,`bar`],d=[`start`,`center`],f=[`inline`,`below`],p=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function m({title:m,as:h=`h1`,subtitle:g,eyebrow:_,icon:v,tone:y=`primary`,status:b,breadcrumbs:x,actions:S,views:C,tools:w,meta:T,metaPlacement:E=`inline`,bulkFor:D,bulk:O,size:k=`md`,align:A=`start`,divider:j=!1,sticky:M=!1,className:N=``,...P}){t(`AppPageHeader`,P),e(`AppPageHeader`,`tone`,y,l),e(`AppPageHeader`,`size`,k,u),e(`AppPageHeader`,`align`,A,d),e(`AppPageHeader`,`as`,h,p),e(`AppPageHeader`,`metaPlacement`,E,f);let F=p.includes(h)?h:`h1`,I=k===`bar`,L=I&&E===`below`,R=[`page-header`,k&&k!==`md`?`page-header-${k}`:``,A===`center`?`page-header-center`:``,j?`page-header-divider`:``,M?`page-header-sticky`:``,y&&y!==`primary`?`tone-${y}`:``,L?`wui-page-header-meta-below`:``,N].filter(Boolean).join(` `),[z,B]=o(0),V=I?D:void 0;if(a(()=>{if(!V)return;document.getElementById(V)?.setAttribute(`data-wui-bulk-in-bar`,``);let e=e=>{typeof e.detail?.selected==`number`&&document.getElementById(V)?.contains(e.target)&&B(e.detail.selected)};return document.addEventListener(`selectionchange`,e),()=>{document.removeEventListener(`selectionchange`,e),document.getElementById(V)?.removeAttribute(`data-wui-bulk-in-bar`)}},[V]),I)return c(`header`,{className:R,"data-wui-page-header-bar":``,"data-wui-bulk-for":D||void 0,...P,children:[x!=null&&s(r.Provider,{value:!0,children:s(`div`,{className:`page-header-bar-crumbs`,children:x})}),m!=null&&s(F,{className:`page-title`,children:m}),b!=null&&s(`span`,{className:`page-status`,children:b}),C!=null&&s(`div`,{className:`page-header-bar-views`,"data-wui-bar-swap":``,hidden:D&&z>0?!0:void 0,children:C}),s(`span`,{className:`page-header-bar-spacer`,"aria-hidden":`true`}),T!=null&&!L&&s(`div`,{className:`page-header-bar-meta`,children:T}),w!=null&&s(`div`,{className:`page-header-bar-tools`,"data-wui-bar-swap":``,hidden:D&&z>0?!0:void 0,children:w}),D?c(`div`,{className:`page-header-bar-bulk`,"data-wui-bar-bulk":``,hidden:z===0||void 0,children:[s(`span`,{className:`page-header-bar-bulk-count`,"aria-live":`polite`,children:z>0?`${i(z,{decimals:0})} selected`:``}),O]}):null,S!=null&&s(`div`,{className:`page-actions`,children:S}),T!=null&&L&&s(`div`,{className:`page-header-bar-meta`,children:T})]});let H=v==null?null:typeof v==`string`?s(n,{name:v,size:20}):v;return c(`div`,{className:R,...P,children:[x!=null&&s(`div`,{className:`page-breadcrumbs`,children:x}),c(`div`,{className:`page-header-bar`,children:[c(`div`,{className:`page-header-lead`,children:[H!=null&&s(`span`,{className:`page-header-icon`,children:H}),c(`div`,{className:`page-header-titles`,children:[_!=null&&s(`div`,{className:`page-eyebrow`,children:_}),c(`div`,{className:`page-titlebar`,children:[m!=null&&s(F,{className:`page-title`,children:m}),b!=null&&s(`span`,{className:`page-status`,children:b})]}),g!=null&&s(`div`,{className:`page-subtitle`,children:g})]})]}),S!=null&&s(`div`,{className:`page-actions`,children:S})]})]})}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{BreadcrumbTrailContext as i}from"./AppBreadcrumbs.js";import{formatNumber as a}from"@webority/ui-elements/helpers";import{useEffect as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u=[`primary`,`success`,`warning`,`danger`,`info`],d=[`sm`,`md`,`lg`,`bar`],f=[`start`,`center`],p=[`inline`,`below`],m=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function h(h){let{title:g,as:_=`h1`,subtitle:v,eyebrow:y,icon:b,tone:x=`primary`,status:S,breadcrumbs:C,actions:w,views:T,tools:E,meta:D,metaPlacement:O=`inline`,bulkFor:k,bulk:A,size:j=`md`,align:M=`start`,divider:N=!1,sticky:P=!1,className:F=``,...I}=h;n(`AppPageHeader`,I),t(`AppPageHeader`,`tone`,x,u),t(`AppPageHeader`,`size`,j,d),t(`AppPageHeader`,`align`,M,f),t(`AppPageHeader`,`as`,_,m),t(`AppPageHeader`,`metaPlacement`,O,p);let L=m.includes(_)?_:`h1`,R=j===`bar`,z=R&&O===`below`,B=[`page-header`,j&&j!==`md`?`page-header-${j}`:``,M===`center`?`page-header-center`:``,N?`page-header-divider`:``,P?`page-header-sticky`:``,x&&x!==`primary`?`tone-${x}`:``,z?`wui-page-header-meta-below`:``,F].filter(Boolean).join(` `),[V,H]=s(0),U=R?k:void 0;if(o(()=>{if(!U)return;document.getElementById(U)?.setAttribute(`data-wui-bulk-in-bar`,``);let e=e=>{typeof e.detail?.selected==`number`&&document.getElementById(U)?.contains(e.target)&&H(e.detail.selected)};return document.addEventListener(`selectionchange`,e),()=>{document.removeEventListener(`selectionchange`,e),document.getElementById(U)?.removeAttribute(`data-wui-bulk-in-bar`)}},[U]),R)return l(`header`,{className:B,"data-wui-page-header-bar":``,"data-wui-bulk-for":k||void 0,...e(`AppPageHeader`,h),...I,children:[C!=null&&c(i.Provider,{value:!0,children:c(`div`,{className:`page-header-bar-crumbs`,children:C})}),g!=null&&c(L,{className:`page-title`,children:g}),S!=null&&c(`span`,{className:`page-status`,children:S}),T!=null&&c(`div`,{className:`page-header-bar-views`,"data-wui-bar-swap":``,hidden:k&&V>0?!0:void 0,children:T}),c(`span`,{className:`page-header-bar-spacer`,"aria-hidden":`true`}),D!=null&&!z&&c(`div`,{className:`page-header-bar-meta`,children:D}),E!=null&&c(`div`,{className:`page-header-bar-tools`,"data-wui-bar-swap":``,hidden:k&&V>0?!0:void 0,children:E}),k?l(`div`,{className:`page-header-bar-bulk`,"data-wui-bar-bulk":``,hidden:V===0||void 0,children:[c(`span`,{className:`page-header-bar-bulk-count`,"aria-live":`polite`,children:V>0?`${a(V,{decimals:0})} selected`:``}),A]}):null,w!=null&&c(`div`,{className:`page-actions`,children:w}),D!=null&&z&&c(`div`,{className:`page-header-bar-meta`,children:D})]});let W=b==null?null:typeof b==`string`?c(r,{name:b,size:20}):b;return l(`div`,{className:B,...e(`AppPageHeader`,h),...I,children:[C!=null&&c(`div`,{className:`page-breadcrumbs`,children:C}),l(`div`,{className:`page-header-bar`,children:[l(`div`,{className:`page-header-lead`,children:[W!=null&&c(`span`,{className:`page-header-icon`,children:W}),l(`div`,{className:`page-header-titles`,children:[y!=null&&c(`div`,{className:`page-eyebrow`,children:y}),l(`div`,{className:`page-titlebar`,children:[g!=null&&c(L,{className:`page-title`,children:g}),S!=null&&c(`span`,{className:`page-status`,children:S})]}),v!=null&&c(`div`,{className:`page-subtitle`,children:v})]})]}),w!=null&&c(`div`,{className:`page-actions`,children:w})]})]})}export{h as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{pageWindow as n}from"../lib/pageWindow.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=[`sm`,`md`];function o({page:o,totalPages:s,onChange:c,siblings:l=1,size:u=`md`,ariaLabel:d=`Pagination`,className:f,...p}){if(t(`AppPagination`,p),e(`AppPagination`,`size`,u,a),s<=1)return null;let m=n(o,s,{siblingCount:l});return r(`nav`,{className:[`pagination-nav`,u&&`pagination-${u}`,f].filter(Boolean).join(` `),"aria-label":d,...p,children:i(`ul`,{className:`pagination`,children:[r(`li`,{className:`page-item${o<=1?` disabled`:``}`,children:r(`button`,{type:`button`,className:`page-link`,onClick:()=>c(Math.max(1,o-1)),disabled:o<=1,"aria-label":`Previous page`,children:`Previous`})}),m.map(e=>typeof e==`number`?r(`li`,{className:`page-item${e===o?` active`:``}`,children:r(`button`,{type:`button`,className:`page-link`,onClick:()=>c(e),"aria-current":e===o?`page`:void 0,"aria-label":`Page ${e}`,children:e})},e):r(`li`,{className:`page-item disabled`,children:r(`span`,{className:`page-ellipsis`,"aria-hidden":`true`,children:`…`})},e)),r(`li`,{className:`page-item${o>=s?` disabled`:``}`,children:r(`button`,{type:`button`,className:`page-link`,onClick:()=>c(Math.min(s,o+1)),disabled:o>=s,"aria-label":`Next page`,children:`Next`})})]})})}export{o as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{pageWindow as r}from"../lib/pageWindow.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=[`sm`,`md`];function s(s){let{page:c,totalPages:l,onChange:u,siblings:d=1,size:f=`md`,ariaLabel:p=`Pagination`,className:m,...h}=s;if(n(`AppPagination`,h),t(`AppPagination`,`size`,f,o),l<=1)return null;let g=r(c,l,{siblingCount:d});return i(`nav`,{className:[`pagination-nav`,f&&`pagination-${f}`,m].filter(Boolean).join(` `),"aria-label":p,...e(`AppPagination`,s),...h,children:a(`ul`,{className:`pagination`,children:[i(`li`,{className:`page-item${c<=1?` disabled`:``}`,children:i(`button`,{type:`button`,className:`page-link`,onClick:()=>u(Math.max(1,c-1)),disabled:c<=1,"aria-label":`Previous page`,children:`Previous`})}),g.map(e=>typeof e==`number`?i(`li`,{className:`page-item${e===c?` active`:``}`,children:i(`button`,{type:`button`,className:`page-link`,onClick:()=>u(e),"aria-current":e===c?`page`:void 0,"aria-label":`Page ${e}`,children:e})},e):i(`li`,{className:`page-item disabled`,children:i(`span`,{className:`page-ellipsis`,"aria-hidden":`true`,children:`…`})},e)),i(`li`,{className:`page-item${c>=l?` disabled`:``}`,children:i(`button`,{type:`button`,className:`page-link`,onClick:()=>u(Math.min(l,c+1)),disabled:c>=l,"aria-label":`Next page`,children:`Next`})})]})})}export{s as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"../lib/FieldMessage.js";import r from"./AppRequiredMark.js";import i from"./useWuiControl.js";import{forwardRef as a,useId as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import"@webority/ui-elements/elements/phone";var l=[`sm`,`md`,`lg`],u=a(function({value:a,onChange:u,country:d,disabled:f=!1,name:p,id:m,label:h=`Phone number`,placeholder:g,required:_=!1,hint:v,error:y,showFlag:b=!0,showDialCode:x=!0,size:S=`md`,fieldClassName:C=``,...w},T){t(`AppPhoneNumberInput`,w),e(`AppPhoneNumberInput`,`size`,S,l);let E=o(),D=m||E,O=y&&D?`${D}-error`:void 0,k=!y&&v&&D?`${D}-hint`:void 0,{setRef:A}=i({ref:T,value:a??``,onChange:u,events:[`input`,`change`]});return c(`div`,{className:`field app-phone-number-input${S===`sm`?` phone-sm`:``}${S===`lg`?` phone-lg`:``}${C?` ${C}`:``}`,children:[h&&c(`label`,{className:`label`,htmlFor:D,children:[h,_&&s(r,{})]}),s(`wui-phone`,{ref:A,id:D,name:p,"aria-label":typeof h==`string`?h:void 0,"aria-describedby":O||k,"aria-invalid":y?`true`:void 0,country:d,placeholder:g,required:_?``:void 0,disabled:f?``:void 0,"hide-flag":b?void 0:``,"hide-dial":x?void 0:``,"external-error":``,...w}),s(n,{error:y,hint:v,errorId:O,hintId:k})]})});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 from"../lib/FieldMessage.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/phone";var u=[`sm`,`md`,`lg`],d=o(function(o,d){let{value:f,onChange:p,country:m,disabled:h=!1,name:g,id:_,label:v=`Phone number`,placeholder:y,required:b=!1,hint:x,error:S,showFlag:C=!0,showDialCode:w=!0,size:T=`md`,fieldClassName:E=``,...D}=o;n(`AppPhoneNumberInput`,D),t(`AppPhoneNumberInput`,`size`,T,u);let O=s(),k=_||O,A=S&&k?`${k}-error`:void 0,j=!S&&x&&k?`${k}-hint`:void 0,{setRef:M}=a({ref:d,value:f??``,onChange:p,events:[`input`,`change`]});return l(`div`,{...e(`AppPhoneNumberInput`,o),className:`field app-phone-number-input${T===`sm`?` phone-sm`:``}${T===`lg`?` phone-lg`:``}${E?` ${E}`:``}`,children:[v&&l(`label`,{className:`label`,htmlFor:k,children:[v,b&&c(i,{})]}),c(`wui-phone`,{ref:M,id:k,name:g,"aria-label":typeof v==`string`?v:void 0,"aria-describedby":A||j,"aria-invalid":S?`true`:void 0,country:m,placeholder:y,required:b?``:void 0,disabled:h?``:void 0,"hide-flag":C?void 0:``,"hide-dial":w?void 0:``,"external-error":``,...D}),c(r,{error:S,hint:x,errorId:A,hintId:j})]})});export{d as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"./AppIcon.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({name:i,price:a,unit:o,tagline:s,features:c=[],cta:l,featured:u=!1,current:d=!1,badge:f=`Most popular`,className:p=``,...m}){return e(`AppPricingCard`,m),r(`div`,{className:[`plan-card`,u?`featured`:``,d?`current`:``,p].filter(Boolean).join(` `),...m,children:[u&&f&&n(`span`,{className:`plan-badge`,children:f}),n(`div`,{className:`plan-name`,children:i}),r(`div`,{className:`plan-price`,children:[a,o&&n(`span`,{className:`plan-price-unit`,children:o})]}),s&&n(`div`,{className:`plan-tagline`,children:s}),c.length>0&&n(`ul`,{className:`plan-features`,children:c.map((e,i)=>{let a=e.included!==!1;return r(`li`,{className:a?void 0:`excluded`,children:[n(`span`,{className:`plan-feature-icon`,children:n(t,{name:a?`check`:`x`,size:16})}),e.text]},e.text?`feat-${i}-${e.text}`:`feat-${i}`)})}),l&&n(`div`,{className:`plan-cta`,children:l})]})}export{i as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{name:o,price:s,unit:c,tagline:l,features:u=[],cta:d,featured:f=!1,current:p=!1,badge:m=`Most popular`,className:h=``,...g}=a;return t(`AppPricingCard`,g),i(`div`,{className:[`plan-card`,f?`featured`:``,p?`current`:``,h].filter(Boolean).join(` `),...e(`AppPricingCard`,a),...g,children:[f&&m&&r(`span`,{className:`plan-badge`,children:m}),r(`div`,{className:`plan-name`,children:o}),i(`div`,{className:`plan-price`,children:[s,c&&r(`span`,{className:`plan-price-unit`,children:c})]}),l&&r(`div`,{className:`plan-tagline`,children:l}),u.length>0&&r(`ul`,{className:`plan-features`,children:u.map((e,t)=>{let a=e.included!==!1;return i(`li`,{className:a?void 0:`excluded`,children:[r(`span`,{className:`plan-feature-icon`,children:r(n,{name:a?`check`:`x`,size:16})}),e.text]},e.text?`feat-${t}-${e.text}`:`feat-${t}`)})}),d&&r(`div`,{className:`plan-cta`,children:d})]})}export{a as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";var i=[`sm`,`md`],a=[`info`,`success`,`warning`,`danger`,`neutral`];function o(e,t){if(!(t>0))return 0;let n=Math.min(100,Math.max(0,e/t*100));return Number(n.toFixed(2))}function s({value:s=0,max:c=100,tone:l=`info`,size:u=`md`,label:d,showLabel:f=!1,striped:p=!1,animated:m=!1,indeterminate:h=!1,className:g=``,..._}){t(`AppProgress`,_),e(`AppProgress`,`tone`,l,a),e(`AppProgress`,`size`,u,i);let v=a.includes(l)?l:`info`,y=o(s,c),b=!h&&f&&!!d,x=`progress${u===`sm`?` progress-sm`:``}${!b&&g?` ${g}`:``}`,S=[`progress-bar`,`wui-progress-${v}`,p||m?`progress-bar-striped`:``,m?`progress-bar-animated`:``,h?`wui-progress-indeterminate`:``].filter(Boolean).join(` `),C=n(`div`,{className:x,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":c,...h?{}:{"aria-valuenow":s},"aria-label":d||void 0,..._,children:n(`div`,{className:S,style:h?void 0:{width:`${y}%`}})});return b?r(`div`,{className:`wui-progress-labelled${g?` ${g}`:``}`,children:[n(`div`,{className:`wui-progress-label`,"aria-hidden":`true`,children:d}),C]}):C}export{s as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{cloneElement as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=[`sm`,`md`],s=[`info`,`success`,`warning`,`danger`,`neutral`];function c(e,t){if(!(t>0))return 0;let n=Math.min(100,Math.max(0,e/t*100));return Number(n.toFixed(2))}function l(l){let{value:u=0,max:d=100,tone:f=`info`,size:p=`md`,label:m,showLabel:h=!1,striped:g=!1,animated:_=!1,indeterminate:v=!1,className:y=``,...b}=l;n(`AppProgress`,b),t(`AppProgress`,`tone`,f,s),t(`AppProgress`,`size`,p,o);let x=s.includes(f)?f:`info`,S=c(u,d),C=!v&&h&&!!m,w=`progress${p===`sm`?` progress-sm`:``}${!C&&y?` ${y}`:``}`,T=[`progress-bar`,`wui-progress-${x}`,g||_?`progress-bar-striped`:``,_?`progress-bar-animated`:``,v?`wui-progress-indeterminate`:``].filter(Boolean).join(` `),E=i(`div`,{className:w,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":d,...v?{}:{"aria-valuenow":u},"aria-label":m||void 0,...b,children:i(`div`,{className:T,style:v?void 0:{width:`${S}%`}})});return C?a(`div`,{...e(`AppProgress`,l),className:`wui-progress-labelled${y?` ${y}`:``}`,children:[i(`div`,{className:`wui-progress-label`,"aria-hidden":`true`,children:m}),E]}):r(E,e(`AppProgress`,l))}export{l as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import{encodeQr as t,qrSvgPath as n}from"../lib/qrCode.js";import{useMemo as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=4;function s({value:s,size:c=240,title:l=`QR code`,className:u,style:d,...f}){e(`AppQrCode`,f);let p=r(()=>{if(!s)return null;let e=t(String(s));return{modules:e.size+o*2,path:n(e,o)}},[s]);if(!p)return null;let{modules:m,path:h}=p,g=Math.max(1,Math.floor(Number(c)/m)||1)*m;return a(`svg`,{viewBox:`0 0 ${m} ${m}`,width:g,height:g,role:`img`,"aria-label":l,shapeRendering:`crispEdges`,className:u||void 0,style:d,...f,children:[i(`rect`,{width:m,height:m,fill:`#ffffff`}),i(`path`,{d:h,fill:`#000000`})]})}export{s as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{encodeQr as n,qrSvgPath as r}from"../lib/qrCode.js";import{useMemo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=4;function c(c){let{value:l,size:u=240,title:d=`QR code`,className:f,style:p,...m}=c;t(`AppQrCode`,m);let h=i(()=>{if(!l)return null;let e=n(String(l));return{modules:e.size+s*2,path:r(e,s)}},[l]);if(!h)return null;let{modules:g,path:_}=h,v=Math.max(1,Math.floor(Number(u)/g)||1)*g;return o(`svg`,{viewBox:`0 0 ${g} ${g}`,width:v,height:v,role:`img`,"aria-label":d,shapeRendering:`crispEdges`,className:f||void 0,style:p,...e(`AppQrCode`,c),...m,children:[a(`rect`,{width:g,height:g,fill:`#ffffff`}),a(`path`,{d:_,fill:`#000000`})]})}export{c as default};
@@ -1 +1 @@
1
- import e from"./warnUnknownProps.js";import t from"../lib/CheckField.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";var i=n(function({label:n,id:i,name:a,error:o,hint:s,className:c=``,...l},u){return e(`AppRadio`,l),r(t,{ref:u,label:n,id:i,name:a,error:o,hint:s,className:c,rest:l,inputType:`radio`,wrapperClass:`form-check`})});export{i as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"../lib/CheckField.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=r(function(r,a){let{label:o,id:s,name:c,error:l,hint:u,className:d=``,...f}=r;return t(`AppRadio`,f),i(n,{rootProps:e(`AppRadio`,r),ref:a,label:o,id:s,name:c,error:l,hint:u,className:d,rest:f,inputType:`radio`,wrapperClass:`form-check`})});export{a as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"../lib/FieldMessage.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import{useId as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`default`,`card`];function l({label:l,options:u=[],name:d,value:f,defaultValue:p,onChange:m,variant:h=`default`,inline:g=!1,required:_=!1,disabled:v=!1,error:y,hint:b,help:x,helpLabel:S=`More information`,id:C,className:w=``,fieldClassName:T=``,style:E,...D}){t(`AppRadioGroup`,D),e(`AppRadioGroup`,`variant`,h,c);let O=a(),k=C||O,A=d||k,j=`${k}-error`,M=`${k}-hint`,N=f!==void 0;return s(`div`,{className:`field${T?` ${T}`:``}`,children:[l!=null&&s(`span`,{className:`label`,id:`${k}-label`,children:[l,_&&o(i,{}),x&&o(r,{label:S,children:x})]}),o(`div`,{className:[`wui-radio-group`,h===`card`?`wui-radio-group-card`:``,g?`wui-radio-group-inline`:``,w].filter(Boolean).join(` `),style:E,id:k,role:`radiogroup`,"aria-labelledby":l==null?void 0:`${k}-label`,"aria-required":_?`true`:void 0,"aria-invalid":y?`true`:void 0,"aria-describedby":y?j:b?M:void 0,...D,children:u.map((e,t)=>{let n=`${k}-${t}`,r=e.description==null?void 0:`${n}-desc`;return s(`div`,{className:`form-check`,children:[o(`input`,{type:`radio`,className:`form-check-input`,id:n,name:A,value:e.value,disabled:v||e.disabled||void 0,required:_||void 0,"aria-describedby":r,...N?{checked:f===e.value,onChange:()=>m?.(e.value)}:{defaultChecked:p===e.value,onChange:()=>m?.(e.value)}}),o(`label`,{className:`form-check-label`,htmlFor:n,children:e.label}),r&&o(`div`,{className:`wui-radio-option-desc`,id:r,children:e.description})]},e.value)})}),o(n,{error:y,hint:b,errorId:j,hintId:M})]})}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"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import{useId as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`default`,`card`];function u(u){let{label:d,options:f=[],name:p,value:m,defaultValue:h,onChange:g,variant:_=`default`,inline:v=!1,required:y=!1,disabled:b=!1,error:x,hint:S,help:C,helpLabel:w=`More information`,id:T,className:E=``,fieldClassName:D=``,style:O,...k}=u;n(`AppRadioGroup`,k),t(`AppRadioGroup`,`variant`,_,l);let A=o(),j=T||A,M=p||j,N=`${j}-error`,P=`${j}-hint`,F=m!==void 0;return c(`div`,{...e(`AppRadioGroup`,u),className:`field${D?` ${D}`:``}`,children:[d!=null&&c(`span`,{className:`label`,id:`${j}-label`,children:[d,y&&s(a,{}),C&&s(i,{label:w,children:C})]}),s(`div`,{className:[`wui-radio-group`,_===`card`?`wui-radio-group-card`:``,v?`wui-radio-group-inline`:``,E].filter(Boolean).join(` `),style:O,id:j,role:`radiogroup`,"aria-labelledby":d==null?void 0:`${j}-label`,"aria-required":y?`true`:void 0,"aria-invalid":x?`true`:void 0,"aria-describedby":x?N:S?P:void 0,...k,children:f.map((e,t)=>{let n=`${j}-${t}`,r=e.description==null?void 0:`${n}-desc`;return c(`div`,{className:`form-check`,children:[s(`input`,{type:`radio`,className:`form-check-input`,id:n,name:M,value:e.value,disabled:b||e.disabled||void 0,required:y||void 0,"aria-describedby":r,...F?{checked:m===e.value,onChange:()=>g?.(e.value)}:{defaultChecked:h===e.value,onChange:()=>g?.(e.value)}}),s(`label`,{className:`form-check-label`,htmlFor:n,children:e.label}),r&&s(`div`,{className:`wui-radio-option-desc`,id:r,children:e.description})]},e.value)})}),s(r,{error:x,hint:S,errorId:N,hintId:P})]})}export{u as default};