@webority/ui-react 0.121.0 → 0.124.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/canvas-kit/kit.css +2 -0
  2. package/dist/canvas-kit/kit.js +33568 -34365
  3. package/dist/canvas-kit/manifest.json +240 -3
  4. package/dist/canvas-kit/release.json +8 -8
  5. package/dist/components/AppAccordion.js +1 -1
  6. package/dist/components/AppActionIcon.js +1 -1
  7. package/dist/components/AppAlert.js +1 -1
  8. package/dist/components/AppAsyncBlock.js +1 -1
  9. package/dist/components/AppAutocomplete.js +1 -1
  10. package/dist/components/AppAvatar.js +1 -1
  11. package/dist/components/AppAvatarGroup.js +1 -1
  12. package/dist/components/AppBadge.js +1 -1
  13. package/dist/components/AppBanner.js +1 -1
  14. package/dist/components/AppBreadcrumbs.js +1 -1
  15. package/dist/components/AppButton.js +1 -1
  16. package/dist/components/AppButtonGroup.js +1 -1
  17. package/dist/components/AppCalendar.js +1 -1
  18. package/dist/components/AppCard.js +1 -1
  19. package/dist/components/AppCarousel.js +1 -1
  20. package/dist/components/AppChart.js +1 -1
  21. package/dist/components/AppChartCard.js +1 -1
  22. package/dist/components/AppCheckbox.js +1 -1
  23. package/dist/components/AppChip.js +1 -1
  24. package/dist/components/AppChipGroup.js +1 -1
  25. package/dist/components/AppChoiceCard.js +1 -1
  26. package/dist/components/AppChoiceChip.js +1 -1
  27. package/dist/components/AppCodeBlock.js +1 -1
  28. package/dist/components/AppColorField.js +1 -1
  29. package/dist/components/AppColumnMenu.js +1 -1
  30. package/dist/components/AppCommandPalette.js +1 -1
  31. package/dist/components/AppCommentThread.js +1 -1
  32. package/dist/components/AppCompareTable.js +1 -1
  33. package/dist/components/AppConfirmDialog.js +1 -1
  34. package/dist/components/AppConfirmProvider.js +1 -0
  35. package/dist/components/AppConsentBanner.js +1 -1
  36. package/dist/components/AppContextMenu.js +1 -1
  37. package/dist/components/AppCopyButton.js +1 -1
  38. package/dist/components/AppCountryFlag.js +1 -1
  39. package/dist/components/AppCountrySelect.js +1 -1
  40. package/dist/components/AppDashboardCell.js +1 -1
  41. package/dist/components/AppDashboardGrid.js +1 -1
  42. package/dist/components/AppDataTable.js +1 -1
  43. package/dist/components/AppDatePicker.js +1 -1
  44. package/dist/components/AppDateRangePicker.js +1 -1
  45. package/dist/components/AppDescriptions.js +1 -1
  46. package/dist/components/AppDetailPane.js +1 -1
  47. package/dist/components/AppDrawer.js +1 -1
  48. package/dist/components/AppDropZone.js +1 -1
  49. package/dist/components/AppDropdown.js +1 -1
  50. package/dist/components/AppDueDate.js +1 -1
  51. package/dist/components/AppEmptyState.js +1 -1
  52. package/dist/components/AppErrorSummary.js +1 -1
  53. package/dist/components/AppFileAttachment.js +1 -1
  54. package/dist/components/AppFilePicker.js +1 -1
  55. package/dist/components/AppFileTiles.js +1 -1
  56. package/dist/components/AppFileViewer.js +1 -1
  57. package/dist/components/AppFilterBar.js +1 -1
  58. package/dist/components/AppFloatingDock.js +1 -1
  59. package/dist/components/AppFormActions.js +1 -1
  60. package/dist/components/AppFormRow.js +1 -1
  61. package/dist/components/AppFormSection.js +1 -1
  62. package/dist/components/AppHoverCard.js +1 -1
  63. package/dist/components/AppIcon.js +1 -1
  64. package/dist/components/AppImagePicker.js +1 -1
  65. package/dist/components/AppInfoTip.js +1 -1
  66. package/dist/components/AppInlineEdit.js +1 -1
  67. package/dist/components/AppInput.js +1 -1
  68. package/dist/components/AppInputGroup.js +1 -1
  69. package/dist/components/AppKanban.js +1 -1
  70. package/dist/components/AppKbd.js +1 -1
  71. package/dist/components/AppKpiTile.js +1 -1
  72. package/dist/components/AppLightbox.js +1 -1
  73. package/dist/components/AppLink.js +1 -1
  74. package/dist/components/AppMarkdown.js +1 -1
  75. package/dist/components/AppMentionInput.js +1 -1
  76. package/dist/components/AppMeter.js +1 -1
  77. package/dist/components/AppMetricStrip.js +1 -1
  78. package/dist/components/AppModal.js +1 -1
  79. package/dist/components/AppMultiSelect.js +1 -1
  80. package/dist/components/AppNavList.js +1 -1
  81. package/dist/components/AppNavigationMenu.js +1 -1
  82. package/dist/components/AppNotificationCenter.js +1 -1
  83. package/dist/components/AppNumberInput.js +1 -1
  84. package/dist/components/AppOnboardingChecklist.js +1 -1
  85. package/dist/components/AppOtpInput.js +1 -1
  86. package/dist/components/AppPageHeader.js +1 -1
  87. package/dist/components/AppPhoneNumberInput.js +1 -1
  88. package/dist/components/AppPopover.js +1 -1
  89. package/dist/components/AppPricingCard.js +1 -1
  90. package/dist/components/AppProgress.js +1 -1
  91. package/dist/components/AppQrCode.js +1 -1
  92. package/dist/components/AppRadio.js +1 -1
  93. package/dist/components/AppRadioGroup.js +1 -1
  94. package/dist/components/AppRating.js +1 -1
  95. package/dist/components/AppRecordPager.js +1 -1
  96. package/dist/components/AppRelativeTime.js +1 -1
  97. package/dist/components/AppRepeater.js +1 -1
  98. package/dist/components/AppRequiredMark.js +1 -1
  99. package/dist/components/AppResizable.js +1 -1
  100. package/dist/components/AppResizableHandle.js +1 -1
  101. package/dist/components/AppResizablePanel.js +1 -1
  102. package/dist/components/AppResourceCard.js +1 -1
  103. package/dist/components/AppResult.js +1 -1
  104. package/dist/components/AppRichText.js +1 -1
  105. package/dist/components/AppRollingNumber.js +1 -1
  106. package/dist/components/AppRouteError.js +1 -1
  107. package/dist/components/AppRowSwitch.js +1 -0
  108. package/dist/components/AppScoreScale.js +1 -1
  109. package/dist/components/AppScrollbar.js +1 -1
  110. package/dist/components/AppSearch.js +1 -1
  111. package/dist/components/AppSectionCallToAction.js +1 -1
  112. package/dist/components/AppSectionFaq.js +1 -1
  113. package/dist/components/AppSectionFeatures.js +1 -1
  114. package/dist/components/AppSectionHero.js +1 -1
  115. package/dist/components/AppSectionLeadCapture.js +1 -1
  116. package/dist/components/AppSectionLogos.js +1 -1
  117. package/dist/components/AppSectionPricing.js +1 -1
  118. package/dist/components/AppSectionTestimonials.js +1 -1
  119. package/dist/components/AppSegmented.js +1 -1
  120. package/dist/components/AppSelect.js +1 -1
  121. package/dist/components/AppSeoHead.js +1 -1
  122. package/dist/components/AppShell.js +1 -1
  123. package/dist/components/AppShortcutLegend.js +1 -1
  124. package/dist/components/AppShowMore.js +1 -1
  125. package/dist/components/AppSkeleton.js +1 -1
  126. package/dist/components/AppSkeletonLines.js +1 -1
  127. package/dist/components/AppSlider.js +1 -1
  128. package/dist/components/AppSortableList.js +1 -1
  129. package/dist/components/AppSparkline.js +1 -1
  130. package/dist/components/AppSpinner.js +1 -1
  131. package/dist/components/AppSplash.js +1 -1
  132. package/dist/components/AppSplitButton.js +1 -1
  133. package/dist/components/AppSplitView.js +1 -1
  134. package/dist/components/AppStatusBadge.js +1 -1
  135. package/dist/components/AppStepper.js +1 -1
  136. package/dist/components/AppSwitch.js +1 -1
  137. package/dist/components/AppTablePagination.js +1 -1
  138. package/dist/components/AppTableToolbar.js +1 -1
  139. package/dist/components/AppTabs.js +1 -1
  140. package/dist/components/AppTagInput.js +1 -1
  141. package/dist/components/AppTextarea.js +1 -1
  142. package/dist/components/AppThemeToggle.js +1 -1
  143. package/dist/components/AppTimePicker.js +1 -1
  144. package/dist/components/AppTimeline.js +1 -1
  145. package/dist/components/AppToast.js +1 -1
  146. package/dist/components/AppToolbar.js +1 -1
  147. package/dist/components/AppTooltip.js +1 -1
  148. package/dist/components/AppTour.js +1 -1
  149. package/dist/components/AppTreeView.js +1 -1
  150. package/dist/components/AppTruncate.js +1 -1
  151. package/dist/components/AppUpdateBar.js +1 -1
  152. package/dist/components/AppWhatsNew.js +1 -1
  153. package/dist/components/AppWizard.js +1 -1
  154. package/dist/components/AppWorkspaceSwitcher.js +1 -1
  155. package/dist/components/ModalIcons.js +1 -1
  156. package/dist/components/iconCatalogNames.g.js +1 -1
  157. package/dist/components/iconGlyphs.g.js +1 -1
  158. package/dist/components/iconVariants.g.js +1 -1
  159. package/dist/components/toast.js +1 -1
  160. package/dist/components/toastStore.js +1 -1
  161. package/dist/components/useWuiControl.js +1 -1
  162. package/dist/components/warnInvalidValue.js +1 -1
  163. package/dist/components/warnUnknownProps.js +1 -1
  164. package/dist/components/withTooltip.js +1 -1
  165. package/dist/guidance.json +60 -1
  166. package/dist/lib/CheckField.js +1 -1
  167. package/dist/lib/DiscardPrompt.js +1 -1
  168. package/dist/lib/FieldMessage.js +1 -1
  169. package/dist/lib/FileItemRow.js +1 -1
  170. package/dist/lib/FocusPanel.js +1 -1
  171. package/dist/lib/emptyIllustration.js +1 -1
  172. package/dist/lib/fileItem.js +1 -1
  173. package/dist/lib/flagStyles.js +1 -0
  174. package/dist/lib/initials.js +1 -1
  175. package/dist/lib/pageScrollLock.js +1 -0
  176. package/dist/lib/qrCode.js +1 -1
  177. package/dist/lib/sectionShell.js +1 -1
  178. package/dist/lib/shellCookie.js +1 -1
  179. package/dist/lib/shortcutChip.js +1 -1
  180. package/dist/lib/useFileDrop.js +1 -1
  181. package/dist/lib/useFloatingStack.js +1 -1
  182. package/dist/lib/useListQuery.js +1 -1
  183. package/dist/lib/wuiMarker.js +1 -1
  184. package/dist/markdown-core/dist/citations.js +1 -0
  185. package/dist/markdown-core/dist/inline.js +1 -1
  186. package/dist/types/components/AppAutocomplete.d.ts +12 -1
  187. package/dist/types/components/AppChart.d.ts +2 -0
  188. package/dist/types/components/AppColorField.d.ts +6 -0
  189. package/dist/types/components/AppConfirmDialog.d.ts +3 -0
  190. package/dist/types/components/AppConfirmProvider.d.ts +27 -0
  191. package/dist/types/components/AppCountrySelect.d.ts +5 -0
  192. package/dist/types/components/AppDatePicker.d.ts +5 -0
  193. package/dist/types/components/AppDateRangePicker.d.ts +5 -0
  194. package/dist/types/components/AppFilePicker.d.ts +6 -0
  195. package/dist/types/components/AppImagePicker.d.ts +6 -0
  196. package/dist/types/components/AppMarkdown.d.ts +4 -0
  197. package/dist/types/components/AppMultiSelect.d.ts +5 -0
  198. package/dist/types/components/AppNumberInput.d.ts +5 -0
  199. package/dist/types/components/AppOtpInput.d.ts +5 -0
  200. package/dist/types/components/AppPhoneNumberInput.d.ts +5 -0
  201. package/dist/types/components/AppRadioGroup.d.ts +6 -0
  202. package/dist/types/components/AppRepeater.d.ts +2 -2
  203. package/dist/types/components/AppRowSwitch.d.ts +23 -0
  204. package/dist/types/components/AppSelect.d.ts +5 -0
  205. package/dist/types/components/AppSlider.d.ts +5 -0
  206. package/dist/types/components/AppTagInput.d.ts +5 -0
  207. package/dist/types/components/AppTimePicker.d.ts +5 -0
  208. package/dist/types/components/iconGlyphs.g.d.ts +11 -0
  209. package/dist/types/components/iconVariants.g.d.ts +55 -0
  210. package/dist/types/index.d.ts +2 -0
  211. package/dist/types/lib/flagStyles.d.ts +2 -0
  212. package/dist/types/lib/pageScrollLock.d.ts +1 -0
  213. package/dist/ui-react.js +1 -1
  214. package/package.json +6 -6
@@ -1 +1 @@
1
- import{splitMarkerProps 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"@webority/ui-elements/elements/mention-input";import{forwardRef as o,useEffect as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";var d=o(function(o,d){let{marker:f,props:p}=e(`AppMentionInput`,o),{value:m,onChange:h,people:g,loadPeople:_,minChars:v,debounce:y,onSubmit:b,rows:x=3,placeholder:S,disabled:C=!1,name:w,id:T,label:E,error:D,hint:O,required:k=!1,help:A,helpLabel:j=`More information`,className:M=``,fieldClassName:N=``,...P}=p;t(`AppMentionInput`,P);let F=typeof _==`function`,I=c(),L=T||`mention-${I.replace(/[^a-zA-Z0-9_-]/g,``)}`,R=D?`${L}-error`:O?`${L}-hint`:void 0,{setRef:z,innerRef:B}=a({ref:d,value:m??``,on:{change:e=>{e.target===e.currentTarget&&h?.(e.currentTarget.value,{mentions:e.currentTarget.mentions})},"wui:mention-input:submit":()=>b?.()}});return s(()=>{let e=B.current;!e||F||(e.people=g||[])},[g,F,B]),s(()=>{let e=B.current;if(!e||!F)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 _(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}},[F,_,B]),u(`div`,{...f,className:`field${N?` ${N}`:``}`,children:[E&&u(`label`,{className:`label`,htmlFor:`${L}-text`,children:[E,k&&l(i,{}),A&&l(r,{label:j,children:A})]}),l(`wui-mention-input`,{ref:z,id:L,class:M?`wui-mention-input ${M}`:`wui-mention-input`,label:typeof E==`string`?E:void 0,placeholder:S||void 0,rows:String(x),name:w||void 0,remote:F?``:void 0,"min-chars":v==null?void 0:String(v),debounce:y==null?void 0:String(y),disabled:C?``:void 0,"aria-describedby":R,"aria-invalid":D?`true`:void 0,...P}),l(n,{error:D,hint:O,errorId:`${L}-error`,hintId:`${L}-hint`})]})});export{d as default};
1
+ import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i from"./useWuiControl.js";import a from"./warnUnknownProps.js";import"@webority/ui-elements/elements/mention-input";import{forwardRef as o,useEffect as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";var d=o(function(o,d){let{marker:f,props:p}=t(`AppMentionInput`,o),{value:m,onChange:h,people:g,loadPeople:_,minChars:v,debounce:y,onSubmit:b,rows:x=3,placeholder:S,disabled:C=!1,name:w,id:T,label:E,error:D,hint:O,required:k=!1,help:A,helpLabel:j=`More information`,className:M=``,fieldClassName:N=``,...P}=p;a(`AppMentionInput`,P);let F=typeof _==`function`,I=c(),L=T||`mention-${I.replace(/[^a-zA-Z0-9_-]/g,``)}`,R=D?`${L}-error`:O?`${L}-hint`:void 0,{setRef:z,innerRef:B}=i({ref:d,value:m??``,on:{change:e=>{e.target===e.currentTarget&&h?.(e.currentTarget.value,{mentions:e.currentTarget.mentions})},"wui:mention-input:submit":()=>b?.()}});return s(()=>{let e=B.current;e&&!F&&(e.people=g||[])},[g,F,B]),s(()=>{let e=B.current;if(!e||!F)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 _(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}},[F,_,B]),/* @__PURE__ */ u(`div`,{...f,className:`field${N?` ${N}`:``}`,children:[E&&/* @__PURE__ */ u(`label`,{className:`label`,htmlFor:`${L}-text`,children:[E,k&&/* @__PURE__ */ l(r,{}),A&&/* @__PURE__ */ l(n,{label:j,children:A})]}),/* @__PURE__ */ l(`wui-mention-input`,{ref:z,id:L,class:M?`wui-mention-input ${M}`:`wui-mention-input`,label:typeof E==`string`?E:void 0,placeholder:S||void 0,rows:String(x),name:w||void 0,remote:F?``:void 0,"min-chars":v==null?void 0:String(v),debounce:y==null?void 0:String(y),disabled:C?``:void 0,"aria-describedby":R,"aria-invalid":D?`true`:void 0,...P}),/* @__PURE__ */ l(e,{error:D,hint:O,errorId:`${L}-error`,hintId:`${L}-hint`})]})});export{d as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:f,props:p}=e(`AppMeter`,d),{value:m=0,min:h=0,max:g=100,tone:_=`info`,optimum:v=`high`,low:y,high:b,size:x=`md`,label:S,showLabel:C=!1,className:w=``,...T}=p;n(`AppMeter`,T),t(`AppMeter`,`tone`,_,c),t(`AppMeter`,`optimum`,v,o),t(`AppMeter`,`size`,x,s);let E=u(m,y,b,v,c.includes(_)?_:`info`),D=l(m,h,g),O=C&&!!S,k=i(`div`,{className:`progress${x===`sm`?` progress-sm`:``}${!O&&w?` ${w}`:``}`,role:`meter`,"aria-valuenow":m,"aria-valuemin":h,"aria-valuemax":g,"aria-label":S||void 0,...T,children:i(`div`,{className:`progress-bar wui-progress-${E}`,style:{width:`${D}%`}})});return O?a(`div`,{...f,className:`wui-progress-labelled${w?` ${w}`:``}`,children:[i(`div`,{className:`wui-progress-label`,"aria-hidden":`true`,children:S}),k]}):r(k,f)}export{d as default};
1
+ import{splitMarkerProps 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{marker:f,props:p}=e(`AppMeter`,d),{value:m=0,min:h=0,max:g=100,tone:_=`info`,optimum:v=`high`,low:y,high:b,size:x=`md`,label:S,showLabel:C=!1,className:w=``,...T}=p;n(`AppMeter`,T),t(`AppMeter`,`tone`,_,c),t(`AppMeter`,`optimum`,v,o),t(`AppMeter`,`size`,x,s);let E=u(m,y,b,v,c.includes(_)?_:`info`),D=l(m,h,g),O=C&&!!S,k=`progress${x===`sm`?` progress-sm`:``}${!O&&w?` ${w}`:``}`,A=/* @__PURE__ */ i(`div`,{className:k,role:`meter`,"aria-valuenow":m,"aria-valuemin":h,"aria-valuemax":g,"aria-label":S||void 0,...T,children:/* @__PURE__ */ i(`div`,{className:`progress-bar wui-progress-${E}`,style:{width:`${D}%`}})});return O?/* @__PURE__ */ a(`div`,{...f,className:`wui-progress-labelled${w?` ${w}`:``}`,children:[/* @__PURE__ */ i(`div`,{className:`wui-progress-label`,"aria-hidden":`true`,children:S}),A]}):r(A,f)}export{d as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:u,props:d}=e(`AppMetricStrip`,l),{items:f=[],columns:p=4,size:m=`md`,className:h=``,...g}=d;return n(`AppMetricStrip`,g),t(`AppMetricStrip`,`columns`,p,o),t(`AppMetricStrip`,`size`,m,s),i(`div`,{className:[`wui-metric-strip`,`wui-metric-strip-cols-${p}`,m===`sm`?`wui-metric-strip-sm`:``,h].filter(Boolean).join(` `),...u,...g,children:f.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
+ import{splitMarkerProps 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{marker:u,props:d}=e(`AppMetricStrip`,l),{items:f=[],columns:p=4,size:m=`md`,className:h=``,...g}=d;n(`AppMetricStrip`,g),t(`AppMetricStrip`,`columns`,p,o),t(`AppMetricStrip`,`size`,m,s);let _=[`wui-metric-strip`,`wui-metric-strip-cols-${p}`,m===`sm`?`wui-metric-strip-sm`:``,h].filter(Boolean).join(` `);return/* @__PURE__ */ i(`div`,{className:_,...u,...g,children:f.map((e,n)=>{t(`AppMetricStrip`,`tone`,e.tone,c);let o=`wui-metric${e.tone&&e.tone!==`neutral`?` wui-metric-tone-${e.tone}`:``}`,s=/* @__PURE__ */ a(r,{children:[/* @__PURE__ */ i(`div`,{className:`wui-metric-label`,children:e.label}),/* @__PURE__ */ i(`div`,{className:`wui-metric-value`,children:e.value}),e.note&&/* @__PURE__ */ i(`div`,{className:`wui-metric-note`,children:e.note})]}),l=`${e.label}-${n}`;return e.href?/* @__PURE__ */ i(`a`,{href:e.href,className:o,children:s},l):/* @__PURE__ */ i(`div`,{className:o,children:s},l)})})}export{l as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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 u}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`default`,`danger`,`success`,`warning`],ee=[`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 te(){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 ne(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 re(){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 ie(){return typeof document<`u`&&document.querySelector(`wui-drawer[open], .offcanvas.show`)!==null}function v(t){let{marker:_,props:v}=e(`AppModal`,t),{open:y,eyebrow:b,title:x,subtitle:S,headerIcon:C,tone:w=`default`,dismissible:T=!0,onClose:E,onBack:D,backLabel:ae=`Back`,headerActions:O,footer:k,size:A=`md`,placement:j=`center`,hideHeader:M=!1,staticBackdrop:N=!1,confirmDiscard:P,dirty:F=!1,ariaLabel:I,className:oe=``,children:se,...L}=v;r(`AppModal`,L),n(`AppModal`,`tone`,w,p),n(`AppModal`,`placement`,j,ee),n(`AppModal`,`size`,typeof A==`string`?A: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}:_,W=U[`data-wui`],G=U[`data-wui-props`];M&&!I&&typeof x!=`string`&&te();let K=c(null),q=c(null),[J,Y]=l(!1);s(()=>{y||Y(!1)},[y]),s(()=>{J&&q.current?.focus()},[J]),s(()=>{let e=K.current?.closest(`.modal`);e&&(P?e.setAttribute(`confirm-discard`,P):e.removeAttribute(`confirm-discard`))},[y,P]);let X=c(null),ce=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))},[y,W,G]),s(()=>{if(!y)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`)&&!e.classList.contains(`wui-modal-back`))||t()[0]||e).focus?.();let n=e.closest(`.modal`),r=re(),i=e=>ne(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)}},[y]);let Z=()=>{if(P&&F){Y(!0);return}E?.()},le=()=>{Y(!1),E?.()},ue=()=>{Y(!1),(K.current?.querySelector(`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled])`))?.focus()},Q=A===`fullscreen`,de=typeof A==`number`?A:h[A]??h.md,fe=[`wui-modal`,w==="default"?``:`tone-${w}`,oe].filter(Boolean).join(` `),$=y&&ie(),pe=[`wui-modal-shell`,Q&&g,$&&`wui-modal-stacked`].filter(Boolean).join(` `);return f(u,{...H,ref:ce,show:y,onHide:Z,backdrop:!N||`static`,keyboard:!N,autoFocus:!1,enforceFocus:!0,restoreFocus:!0,centered:j!==`top`,className:pe,style:Q?R:{"--wui-modal-max-width":`${de}px`,...R},dialogClassName:`wui-rb-dialog`,contentClassName:fe,backdropClassName:$?`wui-modal-dim wui-modal-backdrop-stacked`:`wui-modal-dim`,"aria-label":I||(typeof x==`string`?x:void 0),children:[!M&&f(`div`,{className:`wui-modal-header`,children:[D&&d(`button`,{type:`button`,className:`wui-modal-back`,onClick:D,"aria-label":ae,children:d(i,{name:`arrow-left`,size:18})}),f(`div`,{className:`wui-modal-heading`,children:[C&&d(`span`,{className:`wui-modal-headicon`,children:d(i,{name:C,size:18})}),f(`div`,{className:`wui-modal-headtext`,children:[b&&d(`div`,{className:`wui-modal-eyebrow`,children:b}),d(`div`,{className:`wui-modal-title`,children:x}),S&&d(`div`,{className:`wui-modal-subtitle`,children:S})]})]}),O&&d(`div`,{className:`wui-modal-header-actions`,children:O}),T&&d(`button`,{type:`button`,className:`wui-modal-close`,onClick:Z,"aria-label":`Close`,children:d(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:d(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),d(`div`,{className:`wui-modal-body`,ref:K,children:se}),(k||J)&&f(`div`,{className:J?`wui-modal-footer wui-drawer-discarding`:`wui-modal-footer`,children:[J&&d(a,{text:P,confirmRef:q,onDiscard:le,onKeep:ue}),k]})]})}export{v as default};
1
+ import e from"../lib/DiscardPrompt.js";import{devWarn as t}from"../lib/devWarn.js";import{lockPageScroll as n}from"../lib/pageScrollLock.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppIcon.js";import a from"./warnInvalidValue.js";import o from"./warnUnknownProps.js";import{useCallback as s,useEffect as c,useRef as l,useState as ee}from"react";import{Modal as te}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";var ne=[`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 re(){let e=!0;try{e=process.env.NODE_ENV!==`production`}catch{e=!0}e&&!g&&(g=!0,t("[@webority/ui-react] <AppModal hideHeader> has no accessible name: pass `ariaLabel` (or a string `title`)."))}function ie(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 _(){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 ae(){return typeof document<`u`&&document.querySelector(`wui-drawer[open], .offcanvas.show`)!==null}function v(t){let{marker:g,props:v}=r(`AppModal`,t),{open:y,eyebrow:b,title:x,subtitle:S,headerIcon:C,tone:w=`default`,dismissible:T=!0,onClose:E,onBack:D,backLabel:O=`Back`,headerActions:k,footer:A,size:j=`md`,placement:M=`center`,hideHeader:N=!1,staticBackdrop:P=!1,confirmDiscard:F,dirty:oe=!1,ariaLabel:I,className:se=``,children:ce,...L}=v;o(`AppModal`,L),a(`AppModal`,`tone`,w,ne),a(`AppModal`,`placement`,M,f),a(`AppModal`,`size`,typeof j==`string`?j:null,[...Object.keys(m),`fullscreen`]);let{style:R,ref:z,"data-wui":B,"data-wui-props":V,...H}=L,U=B?{"data-wui":B,"data-wui-props":V}:g,W=U[`data-wui`],G=U[`data-wui-props`];N&&!I&&typeof x!=`string`&&re();let K=l(null),q=l(null),[J,Y]=ee(!1);c(()=>{y||Y(!1)},[y]),c(()=>{J&&q.current?.focus()},[J]),c(()=>{if(y)return n()},[y]),c(()=>{let e=K.current?.closest(`.modal`);e&&(F?e.setAttribute(`confirm-discard`,F):e.removeAttribute(`confirm-discard`))},[y,F]);let X=l(null),le=s(e=>{X.current=e,typeof z==`function`?z(e):z&&(z.current=e)},[z]);c(()=>{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))},[y,W,G]),c(()=>{if(!y)return;let e=K.current?.closest(`.modal-content`);if(!e)return;let t=()=>Array.from(e.querySelectorAll(p));(e.querySelector(`[data-autofocus]`)||t().find(e=>!e.classList.contains(`wui-modal-close`)&&!e.classList.contains(`wui-modal-back`))||t()[0]||e).focus?.();let n=e.closest(`.modal`),r=_(),i=e=>ie(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)}},[y]);let Z=()=>{F&&oe?Y(!0):E?.()},ue=()=>{Y(!1),E?.()},de=()=>{Y(!1),(K.current?.querySelector(`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled])`))?.focus()},Q=j===`fullscreen`,fe=typeof j==`number`?j:m[j]??m.md,pe=[`wui-modal`,w==="default"?``:`tone-${w}`,se].filter(Boolean).join(` `),$=y&&ae(),me=[`wui-modal-shell`,Q&&h,$&&`wui-modal-stacked`].filter(Boolean).join(` `);return/* @__PURE__ */ d(te,{...H,ref:le,show:y,onHide:Z,backdrop:!P||`static`,keyboard:!P,autoFocus:!1,enforceFocus:!0,restoreFocus:!0,centered:M!==`top`,className:me,style:Q?R:{"--wui-modal-max-width":`${fe}px`,...R},dialogClassName:`wui-rb-dialog`,contentClassName:pe,backdropClassName:$?`wui-modal-dim wui-modal-backdrop-stacked`:`wui-modal-dim`,"aria-label":I||(typeof x==`string`?x:void 0),children:[!N&&/* @__PURE__ */ d(`div`,{className:`wui-modal-header`,children:[D&&/* @__PURE__ */ u(`button`,{type:`button`,className:`wui-modal-back`,onClick:D,"aria-label":O,children:/* @__PURE__ */ u(i,{name:`arrow-left`,size:18})}),/* @__PURE__ */ d(`div`,{className:`wui-modal-heading`,children:[C&&/* @__PURE__ */ u(`span`,{className:`wui-modal-headicon`,children:/* @__PURE__ */ u(i,{name:C,size:18})}),/* @__PURE__ */ d(`div`,{className:`wui-modal-headtext`,children:[b&&/* @__PURE__ */ u(`div`,{className:`wui-modal-eyebrow`,children:b}),/* @__PURE__ */ u(`div`,{className:`wui-modal-title`,children:x}),S&&/* @__PURE__ */ u(`div`,{className:`wui-modal-subtitle`,children:S})]})]}),k&&/* @__PURE__ */ u(`div`,{className:`wui-modal-header-actions`,children:k}),T&&/* @__PURE__ */ u(`button`,{type:`button`,className:`wui-modal-close`,onClick:Z,"aria-label":`Close`,children:/* @__PURE__ */ 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:/* @__PURE__ */ u(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),/* @__PURE__ */ u(`div`,{className:`wui-modal-body`,ref:K,children:ce}),(A||J)&&/* @__PURE__ */ d(`div`,{className:J?`wui-modal-footer wui-drawer-discarding`:`wui-modal-footer`,children:[J&&/* @__PURE__ */ u(e,{text:F,confirmRef:q,onDiscard:ue,onKeep:de}),A]})]})}export{v as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:b,props:x}=e(`AppMultiSelect`,d),{values:S,onChange:C,options:w,placeholder:T=`Select…`,searchPlaceholder:E=`Search…`,searchable:D=!0,disabled:O=!1,icon:k,size:A,collapseChips:j=!1,allowCustom:M=!1,validateCustom:N,customPattern:P,customInvalidMessage:F,name:I,id:L,label:R,error:z,hint:B,required:V=!1,help:H,helpLabel:U=`More information`,fieldClassName:W=``,...G}=x;n(`AppMultiSelect`,G),t(`AppMultiSelect`,`size`,A,g);let K=p(),q=L||K,{setRef:J,innerRef:Y}=s({ref:y,value:S,onChange:C,readValue:l,writeValue:u}),X=w||_,{portal:Z,toElementOptions:Q}=o(X);return f(()=>{let e=Y.current;if(!e)return;let t=Q(X,v);c(t,e.options)||(e.options=t)},[X,Y,Q]),f(()=>{let e=Y.current;e&&(e.validateCustom=N??null)},[N,Y]),h(`div`,{...b,className:`field${W?` ${W}`:``}`,children:[R&&h(`label`,{className:`label`,htmlFor:q,children:[R,V&&m(a,{}),H&&m(i,{label:U,children:H})]}),m(`wui-multiselect`,{"aria-label":typeof R==`string`?R:void 0,"aria-describedby":z?`${q}-error`:B?`${q}-hint`:void 0,"aria-invalid":z?`true`:void 0,id:q,ref:J,name:I,placeholder:T,"search-placeholder":E,icon:k||void 0,size:A||void 0,"collapse-chips":j?``:void 0,"allow-custom":M?``:void 0,"custom-pattern":P||void 0,"custom-invalid-message":F||void 0,searchable:D?``:void 0,disabled:O?``:void 0,required:V?``:void 0,...G}),Z,m(r,{error:z,hint:B,errorId:`${q}-error`,hintId:`${q}-hint`})]})});export{y as default};
1
+ import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i from"./useNodeLabels.js";import a,{optionsEqual as o,readValues as s,writeValues as c}from"./useWuiControl.js";import l from"./warnInvalidValue.js";import u from"./warnUnknownProps.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{marker:b,props:x}=t(`AppMultiSelect`,d),{values:S,onChange:C,options:w,placeholder:T=`Select…`,searchPlaceholder:E=`Search…`,searchable:D=!0,disabled:O=!1,icon:k,size:A,collapseChips:j=!1,allowCustom:M=!1,validateCustom:N,customPattern:P,customInvalidMessage:F,name:I,id:L,label:R,error:z,hint:B,required:V=!1,optional:H=!1,help:U,helpLabel:W=`More information`,fieldClassName:G=``,...K}=x;u(`AppMultiSelect`,K),l(`AppMultiSelect`,`size`,A,g);let q=p(),J=L||q,{setRef:Y,innerRef:X}=a({ref:y,value:S,onChange:C,readValue:s,writeValue:c}),Z=w||_,{portal:Q,toElementOptions:$}=i(Z);return f(()=>{let e=X.current;if(!e)return;let t=$(Z,v);o(t,e.options)||(e.options=t)},[Z,X,$]),f(()=>{let e=X.current;e&&(e.validateCustom=N??null)},[N,X]),/* @__PURE__ */ h(`div`,{...b,className:`field${G?` ${G}`:``}`,children:[R&&/* @__PURE__ */ h(`label`,{className:`label`,htmlFor:J,children:[R,H&&!V&&/* @__PURE__ */ m(`span`,{className:`label-optional`,children:` (optional)`}),V&&/* @__PURE__ */ m(r,{}),U&&/* @__PURE__ */ m(n,{label:W,children:U})]}),/* @__PURE__ */ m(`wui-multiselect`,{"aria-label":typeof R==`string`?R:void 0,"aria-describedby":z?`${J}-error`:B?`${J}-hint`:void 0,"aria-invalid":z?`true`:void 0,id:J,ref:Y,name:I,placeholder:T,"search-placeholder":E,icon:k||void 0,size:A||void 0,"collapse-chips":j?``:void 0,"allow-custom":M?``:void 0,"custom-pattern":P||void 0,"custom-invalid-message":F||void 0,searchable:D?``:void 0,disabled:O?``:void 0,required:V?``:void 0,...K}),Q,/* @__PURE__ */ m(e,{error:z,hint:B,errorId:`${J}-error`,hintId:`${J}-hint`})]})});export{y as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./renderIconProp.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`primary`,`info`,`success`,`warning`,`danger`,`neutral`];function c(r){let{marker:i,props:o}=e(`AppNavList`,r),{label:c,items:u=[],linkComponent:d,className:f=``,...p}=o;n(`AppNavList`,p);let m=d??`a`,h=e=>d?{to:e}:{href:e};return a(`nav`,{className:[`wui-nav-list`,f].filter(Boolean).join(` `),"aria-label":c,...i,...p,children:u.map(e=>{if(e.divider)return a(`hr`,{className:`wui-nav-list-divider`},e.key);if(t(`AppNavList`,`dotTone`,e.dotTone,s),e.icon&&e.dotTone)throw Error(`<AppNavList> item takes icon or dotTone, not both.`);let n=!!e.active,r=n?`wui-nav-list-item is-active`:`wui-nav-list-item`,i=n?`page`:void 0,o=l(e);return e.to?a(m,{...h(e.to),className:r,"aria-current":i,children:o},e.key):a(`button`,{type:`button`,className:r,"aria-current":i,children:o},e.key)})})}function l(e){return o(i,{children:[u(e),a(`span`,{className:`wui-nav-list-label`,children:e.label}),e.count>0?a(`span`,{className:`wui-nav-list-count`,children:e.count}):null]})}function u(e){return e.dotTone?a(`span`,{className:`wui-nav-list-dot tone-${s.includes(e.dotTone)?e.dotTone:`neutral`}`,"aria-hidden":`true`}):r(e.icon,{size:18,className:`wui-nav-list-icon`})}export{c as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./renderIconProp.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`primary`,`info`,`success`,`warning`,`danger`,`neutral`];function c(t){let{marker:i,props:o}=e(`AppNavList`,t),{label:c,items:u=[],linkComponent:d,className:f=``,...p}=o;r(`AppNavList`,p);let m=d??`a`,h=e=>d?{to:e}:{href:e};return/* @__PURE__ */ a(`nav`,{className:[`wui-nav-list`,f].filter(Boolean).join(` `),"aria-label":c,...i,...p,children:u.map(e=>{if(e.divider)return/* @__PURE__ */ a(`hr`,{className:`wui-nav-list-divider`},e.key);if(n(`AppNavList`,`dotTone`,e.dotTone,s),e.icon&&e.dotTone)throw Error(`<AppNavList> item takes icon or dotTone, not both.`);let t=!!e.active,r=t?`wui-nav-list-item is-active`:`wui-nav-list-item`,i=t?`page`:void 0,o=l(e);return e.to?/* @__PURE__ */ a(m,{...h(e.to),className:r,"aria-current":i,children:o},e.key):/* @__PURE__ */ a(`button`,{type:`button`,className:r,"aria-current":i,children:o},e.key)})})}function l(e){return/* @__PURE__ */ o(i,{children:[u(e),/* @__PURE__ */ a(`span`,{className:`wui-nav-list-label`,children:e.label}),e.count>0?/* @__PURE__ */ a(`span`,{className:`wui-nav-list-count`,children:e.count}):null]})}function u(e){if(!e.dotTone)return t(e.icon,{size:18,className:`wui-nav-list-icon`});let n=s.includes(e.dotTone)?e.dotTone:`neutral`;return/* @__PURE__ */ a(`span`,{className:`wui-nav-list-dot tone-${n}`,"aria-hidden":`true`})}export{c as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:s,props:c}=e(`AppNavigationMenu`,o),{items:l=[],ariaLabel:u=`Main`,linkComponent:d,className:f=``,...p}=c;t(`AppNavigationMenu`,p);let m=r(),h=d??`a`,g=e=>d?{to:e}:{href:e};return i(`wui-navigation-menu`,{class:[`wui-nav-menu`,f].filter(Boolean).join(` `),...s,...p,children:i(`nav`,{"aria-label":u,children:i(`ul`,{className:`wui-nav-menu-list`,children:l.map(e=>{if(!e.links?.length)return i(`li`,{className:`wui-nav-menu-item`,children:i(h,{...g(e.to),className:`wui-nav-menu-toplink`,"aria-current":e.current?`page`:void 0,children:e.label})},e.key);let t=`${m}-${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(h,{...g(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
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./renderIconProp.js";import n from"./warnUnknownProps.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{marker:s,props:c}=e(`AppNavigationMenu`,o),{items:l=[],ariaLabel:u=`Main`,linkComponent:d,className:f=``,...p}=c;n(`AppNavigationMenu`,p);let m=r(),h=d??`a`,g=e=>d?{to:e}:{href:e};return/* @__PURE__ */ i(`wui-navigation-menu`,{class:[`wui-nav-menu`,f].filter(Boolean).join(` `),...s,...p,children:/* @__PURE__ */ i(`nav`,{"aria-label":u,children:/* @__PURE__ */ i(`ul`,{className:`wui-nav-menu-list`,children:l.map(e=>{if(!e.links?.length)return/* @__PURE__ */ i(`li`,{className:`wui-nav-menu-item`,children:/* @__PURE__ */ i(h,{...g(e.to),className:`wui-nav-menu-toplink`,"aria-current":e.current?`page`:void 0,children:e.label})},e.key);let n=`${m}-${e.key}`;return/* @__PURE__ */ a(`li`,{className:`wui-nav-menu-item`,children:[/* @__PURE__ */ a(`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`})]}),/* @__PURE__ */ i(`div`,{className:`wui-nav-menu-panel`,id:n,children:/* @__PURE__ */ i(`ul`,{className:`wui-nav-menu-links`,children:e.links.map(e=>/* @__PURE__ */ i(`li`,{children:/* @__PURE__ */ a(h,{...g(e.to),className:`wui-nav-menu-link`,"aria-current":e.current?`page`:void 0,children:[t(e.icon,{size:18}),/* @__PURE__ */ a(`span`,{className:`wui-nav-menu-link-text`,children:[/* @__PURE__ */ i(`span`,{className:`wui-nav-menu-link-label`,children:e.label}),e.description?/* @__PURE__ */ i(`span`,{className:`wui-nav-menu-link-desc`,children:e.description}):null]})]})},e.key))})})]},e.key)})})})})}export{o as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"./AppTabs.js";import{NOTIFICATION_TEXT as a,groupNotificationsByDay as o,notificationCountText as s,notificationTime as c,notificationTriggerLabel as l,notificationUnreadAnnouncement as u}from"@webority/ui-elements/helpers";import{useEffect as d,useId as f,useLayoutEffect as p,useRef as m,useState as h}from"react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import"@webority/ui-elements/elements/notification-center";var y=[`all`,`unread`,`archived`],b={all:`All`,unread:`Unread`,archived:`Archived`},x=`a, button, input, select, textarea`;function S(t){let{marker:c,props:g}=e(`AppNotificationCenter`,t),{items:y,unread:b,label:x=a.label,emptyText:S=a.empty,viewAllHref:E,defaultOpen:D=!1,now:O,onMarkAllRead:k,onItemClick:A,renderItem:j,tabs:M,onTabChange:N,onOpenChange:P,className:F=``,...I}=g;if(n(`AppNotificationCenter`,I),!Array.isArray(y))throw Error(`<AppNotificationCenter> items is required: pass the notifications, newest first.`);let L=C(M),[R,z]=h(L[0]?.key),B=L.some(e=>e.key===R)?R:L[0]?.key,V=e=>{e!==B&&(z(e),N?.(e))},H=f(),U=f(),W=m(null),G=m(P);G.current=P,d(()=>{let e=W.current,t=e=>G.current?.(e.detail.open);return e.addEventListener(`wui:notification-center:toggle`,t),()=>e.removeEventListener(`wui:notification-center:toggle`,t)},[]);let K=m(D);p(()=>{if(!K.current)return;let e=W.current;e.setAttribute(`open`,``),e.querySelector(`.wui-notification-center-trigger`)?.setAttribute(`aria-expanded`,`true`)},[]);let q=b??y.filter(e=>!e.read&&!e.archived).length,[J,Y]=h(``),X=m(q);d(()=>{X.current!==q&&(X.current=q,Y(u(q)))},[q]);let Z=o(L.length>0?w(y,B):y,O);return v(`wui-notification-center`,{ref:W,class:[`wui-notification-center`,F].filter(Boolean).join(` `),label:x,controlled:``,...c,...I,children:[v(`button`,{type:`button`,className:`topbar-icon-btn wui-notification-center-trigger`,"aria-expanded":K.current?`true`:`false`,"aria-controls":H,"aria-haspopup":`dialog`,"aria-label":l(x,q),children:[_(r,{name:`notification`,size:20}),_(`span`,{className:`wui-notification-center-count`,"aria-hidden":`true`,hidden:q===0,children:s(q)})]}),_(`span`,{className:`visually-hidden wui-notification-center-live`,"aria-live":`polite`,children:J}),v(`div`,{className:`wui-notification-center-panel`,id:H,role:`dialog`,"aria-labelledby":U,tabIndex:-1,children:[v(`div`,{className:`wui-notification-center-head`,children:[_(`h2`,{className:`wui-notification-center-title`,id:U,children:x}),k&&_(`button`,{type:`button`,className:`wui-notification-center-markall`,disabled:q===0,onClick:k,children:a.markAll})]}),L.length>0&&_(`div`,{className:`wui-notification-center-tabs`,children:_(i,{tabs:L,value:B,onChange:V,size:`sm`,fitted:!0,ariaLabel:x})}),Z.length===0?_(`p`,{className:`wui-notification-center-empty`,children:S}):_(`div`,{className:`wui-notification-center-list`,children:Z.map(e=>v(`section`,{"aria-labelledby":`${H}-${e.key}`,children:[_(`h3`,{className:`wui-notification-center-day`,id:`${H}-${e.key}`,children:e.heading}),_(`ul`,{className:`wui-notification-center-items`,children:e.items.map(e=>_(`li`,{children:_(T,{item:e,onItemClick:A,renderItem:j})},e.id))})]},e.key))}),E&&_(`a`,{className:`wui-notification-center-foot`,href:E,children:a.viewAll})]})]})}function C(e){return e===!0?y.map(e=>({key:e,label:b[e]})):Array.isArray(e)?e.map(e=>(t(`AppNotificationCenter`,`tabs[].key`,e.key,y),{key:e.key,label:e.label??b[e.key]})):[]}function w(e,t){if(t===`archived`)return e.filter(e=>e.archived);let n=e.filter(e=>!e.archived);return t===`unread`?n.filter(e=>!e.read):n}function T({item:e,onItemClick:t,renderItem:n}){let i=`wui-notification-center-item${e.read?` wui-notification-center-item-read`:``}`,o=!e.read&&_(`span`,{className:`visually-hidden wui-notification-center-unread-label`,children:a.unreadPrefix}),s=_(`span`,{className:`wui-notification-center-dot`,"aria-hidden":`true`});if(n){let r=t?n=>{n.target.closest(x)||t(e,n)}:void 0;return v(`div`,{className:i,"data-id":e.id,tabIndex:-1,onClick:r,children:[s,v(`span`,{className:`wui-notification-center-body`,children:[o,n(e)]})]})}let l=c(e.at),u=v(g,{children:[s,e.icon&&_(`span`,{className:`wui-notification-center-icon`,children:_(r,{name:e.icon,size:18})}),v(`span`,{className:`wui-notification-center-body`,children:[o,_(`span`,{className:`wui-notification-center-item-title`,children:e.title}),e.text&&_(`span`,{className:`wui-notification-center-item-text`,children:e.text}),l&&_(`time`,{className:`wui-notification-center-when`,dateTime:String(e.at),children:l})]})]}),d=t?n=>t(e,n):void 0;return e.href?_(`a`,{className:i,href:e.href,"data-id":e.id,onClick:d,children:u}):_(`button`,{type:`button`,className:i,"data-id":e.id,onClick:d,children:u})}export{S as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./AppTabs.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.js";import{NOTIFICATION_TEXT as a,groupNotificationsByDay as o,notificationCountText as s,notificationTime as c,notificationTriggerLabel as l,notificationUnreadAnnouncement as u}from"@webority/ui-elements/helpers";import{useEffect as d,useId as f,useLayoutEffect as p,useRef as m,useState as h}from"react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";import"@webority/ui-elements/elements/notification-center";var y=[`all`,`unread`,`archived`],b={all:`All`,unread:`Unread`,archived:`Archived`},x=`a, button, input, select, textarea`;function S(r){let{marker:c,props:g}=e(`AppNotificationCenter`,r),{items:y,unread:b,label:x=a.label,emptyText:S=a.empty,viewAllHref:E,defaultOpen:D=!1,now:O,onMarkAllRead:k,onItemClick:A,renderItem:j,tabs:M,onTabChange:N,onOpenChange:P,className:F=``,...I}=g;if(i(`AppNotificationCenter`,I),!Array.isArray(y))throw Error(`<AppNotificationCenter> items is required: pass the notifications, newest first.`);let L=C(M),[R,z]=h(L[0]?.key),B=L.some(e=>e.key===R)?R:L[0]?.key,V=e=>{e!==B&&(z(e),N?.(e))},H=f(),U=f(),W=m(null),G=m(P);G.current=P,d(()=>{let e=W.current,t=e=>G.current?.(e.detail.open);return e.addEventListener(`wui:notification-center:toggle`,t),()=>e.removeEventListener(`wui:notification-center:toggle`,t)},[]);let K=m(D);p(()=>{if(!K.current)return;let e=W.current;e.setAttribute(`open`,``),e.querySelector(`.wui-notification-center-trigger`)?.setAttribute(`aria-expanded`,`true`)},[]);let q=b??y.filter(e=>!e.read&&!e.archived).length,[J,Y]=h(``),X=m(q);d(()=>{X.current!==q&&(X.current=q,Y(u(q)))},[q]);let Z=o(L.length>0?w(y,B):y,O),Q=[`wui-notification-center`,F].filter(Boolean).join(` `);return/* @__PURE__ */ v(`wui-notification-center`,{ref:W,class:Q,label:x,controlled:``,...c,...I,children:[/* @__PURE__ */ v(`button`,{type:`button`,className:`topbar-icon-btn wui-notification-center-trigger`,"aria-expanded":K.current?`true`:`false`,"aria-controls":H,"aria-haspopup":`dialog`,"aria-label":l(x,q),children:[/* @__PURE__ */ _(t,{name:`notification`,size:20}),/* @__PURE__ */ _(`span`,{className:`wui-notification-center-count`,"aria-hidden":`true`,hidden:q===0,children:s(q)})]}),/* @__PURE__ */ _(`span`,{className:`visually-hidden wui-notification-center-live`,"aria-live":`polite`,children:J}),/* @__PURE__ */ v(`div`,{className:`wui-notification-center-panel`,id:H,role:`dialog`,"aria-labelledby":U,tabIndex:-1,children:[/* @__PURE__ */ v(`div`,{className:`wui-notification-center-head`,children:[/* @__PURE__ */ _(`h2`,{className:`wui-notification-center-title`,id:U,children:x}),k&&/* @__PURE__ */ _(`button`,{type:`button`,className:`wui-notification-center-markall`,disabled:q===0,onClick:k,children:a.markAll})]}),L.length>0&&/* @__PURE__ */ _(`div`,{className:`wui-notification-center-tabs`,children:/* @__PURE__ */ _(n,{tabs:L,value:B,onChange:V,size:`sm`,fitted:!0,ariaLabel:x})}),Z.length===0?/* @__PURE__ */ _(`p`,{className:`wui-notification-center-empty`,children:S}):/* @__PURE__ */ _(`div`,{className:`wui-notification-center-list`,children:Z.map(e=>/* @__PURE__ */ v(`section`,{"aria-labelledby":`${H}-${e.key}`,children:[/* @__PURE__ */ _(`h3`,{className:`wui-notification-center-day`,id:`${H}-${e.key}`,children:e.heading}),/* @__PURE__ */ _(`ul`,{className:`wui-notification-center-items`,children:e.items.map(e=>/* @__PURE__ */ _(`li`,{children:/* @__PURE__ */ _(T,{item:e,onItemClick:A,renderItem:j})},e.id))})]},e.key))}),E&&/* @__PURE__ */ _(`a`,{className:`wui-notification-center-foot`,href:E,children:a.viewAll})]})]})}function C(e){return e===!0?y.map(e=>({key:e,label:b[e]})):Array.isArray(e)?e.map(e=>(r(`AppNotificationCenter`,`tabs[].key`,e.key,y),{key:e.key,label:e.label??b[e.key]})):[]}function w(e,t){if(t===`archived`)return e.filter(e=>e.archived);let n=e.filter(e=>!e.archived);return t===`unread`?n.filter(e=>!e.read):n}function T({item:e,onItemClick:n,renderItem:r}){let i=`wui-notification-center-item${e.read?` wui-notification-center-item-read`:``}`,o=!e.read&&/* @__PURE__ */ _(`span`,{className:`visually-hidden wui-notification-center-unread-label`,children:a.unreadPrefix}),s=/* @__PURE__ */ _(`span`,{className:`wui-notification-center-dot`,"aria-hidden":`true`});if(r){let t=n?t=>{t.target.closest(x)||n(e,t)}:void 0;return/* @__PURE__ */ v(`div`,{className:i,"data-id":e.id,tabIndex:-1,onClick:t,children:[s,/* @__PURE__ */ v(`span`,{className:`wui-notification-center-body`,children:[o,r(e)]})]})}let l=c(e.at),u=/* @__PURE__ */ v(g,{children:[s,e.icon&&/* @__PURE__ */ _(`span`,{className:`wui-notification-center-icon`,children:/* @__PURE__ */ _(t,{name:e.icon,size:18})}),/* @__PURE__ */ v(`span`,{className:`wui-notification-center-body`,children:[o,/* @__PURE__ */ _(`span`,{className:`wui-notification-center-item-title`,children:e.title}),e.text&&/* @__PURE__ */ _(`span`,{className:`wui-notification-center-item-text`,children:e.text}),l&&/* @__PURE__ */ _(`time`,{className:`wui-notification-center-when`,dateTime:String(e.at),children:l})]})]}),d=n?t=>n(e,t):void 0;return e.href?/* @__PURE__ */ _(`a`,{className:i,href:e.href,"data-id":e.id,onClick:d,children:u}):/* @__PURE__ */ _(`button`,{type:`button`,className:i,"data-id":e.id,onClick:d,children:u})}export{S as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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 ee 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(o,g){let{marker:_,props:v}=e(`AppNumberInput`,o),{label:y,required:b=!1,error:x,hint:S,help:C,helpLabel:w=`More information`,value:T,onChange:E,min:D,max:O,step:k=1,precision:A=0,unit:j,size:M=`md`,id:N,name:P,className:F=``,fieldClassName:I=``,disabled:L=!1,readOnly:R=!1,...z}=v;n(`AppNumberInput`,z),t(`AppNumberInput`,`size`,M,p);let B=c(),V=N||B,H=e=>{if(A===0)return Math.round(e);let t=10**A;return Math.round(e*t)/t},U=e=>{let t=e;return typeof D==`number`&&(t=Math.max(t,D)),typeof O==`number`&&(t=Math.min(t,O)),t},W=e=>h(e,A),[G,K]=l(()=>W(T));s(()=>{K(e=>m(e)===(T??null)?e:h(T,A))},[T,A]);let q=e=>{let t=(m(G)??U(0))+e*k,n=U(H(t));K(W(n)),E?.(n)},J=m(G),Y=L||R||J!==null&&typeof D==`number`&&J<=D,X=L||R||J!==null&&typeof O==`number`&&J>=O,Z=x&&V?`${V}-error`:void 0,Q=S&&V?`${V}-hint`:void 0,$=Z||Q,te=[`input`,M===`sm`?`input-sm`:``,M===`lg`?`input-lg`:``,x?`error`:``,`num-input`,F].filter(Boolean).join(` `),ne=RegExp(`^${typeof D==`number`&&D>=0?``:`-?`}\\d*${A>0?`(\\.\\d*)?`:``}$`),re=e=>{let t=e.target.value;if(!ne.test(t))return;K(t);let n=m(t);n!==null&&E?.(n)},ie=e=>{if(R){z.onBlur?.(e);return}let t=m(e.target.value);if(t===null)K(``),E?.(null);else{let e=U(H(t));K(W(e)),E?.(e)}z.onBlur?.(e)},ae=e=>{if(R){z.onKeyDown?.(e);return}e.key===`ArrowUp`?(e.preventDefault(),q(1)):e.key===`ArrowDown`&&(e.preventDefault(),q(-1)),z.onKeyDown?.(e)},oe=d(u.Control,{...z,id:V,name:P,type:`text`,inputMode:A>0?`decimal`:`numeric`,className:te,disabled:L,readOnly:R,required:b,"aria-invalid":x?`true`:`false`,"aria-describedby":$,value:G,ref:g,onChange:re,onBlur:ie,onKeyDown:ae}),se=f(`div`,{className:[`num-wrap`,M===`sm`?`num-wrap-sm`:``,M===`lg`?`num-wrap-lg`:``].filter(Boolean).join(` `),children:[d(`button`,{type:`button`,className:`num-btn`,"aria-label":`Decrease`,tabIndex:-1,disabled:Y,onClick:()=>q(-1),children:d(r,{name:`minus`,size:16})}),oe,j&&d(`span`,{className:`affix`,children:j}),d(`button`,{type:`button`,className:`num-btn`,"aria-label":`Increase`,tabIndex:-1,disabled:X,onClick:()=>q(1),children:d(r,{name:`plus`,size:16})})]});return f(u.Group,{..._,className:`field${I?` ${I}`:``}`,children:[y&&f(u.Label,{className:`label`,htmlFor:V,children:[y,b&&d(a,{}),C&&d(ee,{label:w,children:C})]}),se,d(i,{error:x,hint:S,errorId:Z,hintId:Q})]})});export{g as default};
1
+ import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppIcon.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import a from"./warnInvalidValue.js";import o from"./warnUnknownProps.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{marker:v,props:y}=t(`AppNumberInput`,s),{label:b,required:x=!1,optional:S=!1,error:C,hint:w,help:T,helpLabel:E=`More information`,value:D,onChange:O,min:k,max:A,step:j=1,precision:M=0,unit:N,size:P=`md`,id:F,name:I,className:ee=``,fieldClassName:L=``,disabled:R=!1,readOnly:z=!1,...B}=y;o(`AppNumberInput`,B),a(`AppNumberInput`,`size`,P,m);let V=l(),H=F||V,U=e=>{if(M===0)return Math.round(e);let t=10**M;return Math.round(e*t)/t},W=e=>{let t=e;return typeof k==`number`&&(t=Math.max(t,k)),typeof A==`number`&&(t=Math.min(t,A)),t},G=e=>g(e,M),[K,q]=u(()=>G(D));c(()=>{q(e=>h(e)===(D??null)?e:g(D,M))},[D,M]);let J=e=>{let t=(h(K)??W(0))+e*j,n=W(U(t));q(G(n)),O?.(n)},Y=h(K),X=R||z||Y!==null&&typeof k==`number`&&Y<=k,Z=R||z||Y!==null&&typeof A==`number`&&Y>=A,Q=C&&H?`${H}-error`:void 0,$=w&&H?`${H}-hint`:void 0,te=Q||$,ne=[`input`,P===`sm`?`input-sm`:``,P===`lg`?`input-lg`:``,C?`error`:``,`num-input`,ee].filter(Boolean).join(` `),re=RegExp(`^${typeof k==`number`&&k>=0?``:`-?`}\\d*${M>0?`(\\.\\d*)?`:``}$`),ie=e=>{let t=e.target.value;if(!re.test(t))return;q(t);let n=h(t);n!==null&&O?.(n)},ae=e=>{if(z){B.onBlur?.(e);return}let t=h(e.target.value);if(t===null)q(``),O?.(null);else{let e=W(U(t));q(G(e)),O?.(e)}B.onBlur?.(e)},oe=e=>{z||(e.key===`ArrowUp`?(e.preventDefault(),J(1)):e.key===`ArrowDown`&&(e.preventDefault(),J(-1))),B.onKeyDown?.(e)},se=/* @__PURE__ */ f(d.Control,{...B,id:H,name:I,type:`text`,inputMode:M>0?`decimal`:`numeric`,className:ne,disabled:R,readOnly:z,required:x,"aria-invalid":C?`true`:`false`,"aria-describedby":te,value:K,ref:_,onChange:ie,onBlur:ae,onKeyDown:oe}),ce=[`num-wrap`,P===`sm`?`num-wrap-sm`:``,P===`lg`?`num-wrap-lg`:``].filter(Boolean).join(` `),le=/* @__PURE__ */ p(`div`,{className:ce,children:[/* @__PURE__ */ f(`button`,{type:`button`,className:`num-btn`,"aria-label":`Decrease`,tabIndex:-1,disabled:X,onClick:()=>J(-1),children:/* @__PURE__ */ f(n,{name:`minus`,size:16})}),se,N&&/* @__PURE__ */ f(`span`,{className:`affix`,children:N}),/* @__PURE__ */ f(`button`,{type:`button`,className:`num-btn`,"aria-label":`Increase`,tabIndex:-1,disabled:Z,onClick:()=>J(1),children:/* @__PURE__ */ f(n,{name:`plus`,size:16})})]});return/* @__PURE__ */ p(d.Group,{...v,className:`field${L?` ${L}`:``}`,children:[b&&/* @__PURE__ */ p(d.Label,{className:`label`,htmlFor:H,children:[b,S&&!x&&/* @__PURE__ */ f(`span`,{className:`label-optional`,children:` (optional)`}),x&&/* @__PURE__ */ f(i,{}),T&&/* @__PURE__ */ f(r,{label:E,children:T})]}),le,/* @__PURE__ */ f(e,{error:C,hint:w,errorId:Q,hintId:$})]})});export{_ as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:g,props:_}=e(`AppOnboardingChecklist`,h),{steps:v=[],title:y=`Get started`,defaultCollapsed:b,defaultDismissed:x=!1,storageKey:S,dismissLabel:C=`Dismiss checklist`,restoreLabel:w=`Show setup checklist`,onDismiss:T,onRestore:E,onCollapsedChange:D,linkComponent:O,className:k=``,...A}=_;n(`AppOnboardingChecklist`,A);for(let e of v)t(`AppOnboardingChecklist`,`steps[].status`,e.status,u);let j=o().replace(/[^a-zA-Z0-9_-]/g,``),M=`wui-onboarding-${j}-title`,N=`wui-onboarding-${j}-steps`,P=v.length===0,F=s(null);F.current={onDismiss:T,onRestore:E,onCollapsedChange:D};let I=a(e=>{if(!e)return;let t=()=>F.current.onDismiss?.(),n=()=>F.current.onRestore?.(),r=e=>F.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(P)return null;let L=f(v),R=L.filter(e=>e===`done`).length,z=L.filter(e=>e===`skipped`).length,B=R+z===v.length,V=b??B,H=`${R} of ${v.length} done${z?`, ${z} skipped`:``}`;return l(`wui-onboarding-checklist`,{ref:I,class:[`wui-onboarding`,B?`is-complete`:``,k].filter(Boolean).join(` `),"storage-key":S||void 0,...g,...A,children:[l(`section`,{className:`wui-onboarding-card`,"aria-labelledby":M,hidden:x||void 0,children:[l(`header`,{className:`wui-onboarding-head`,children:[l(`button`,{type:`button`,className:`wui-onboarding-toggle`,"aria-expanded":!V,"aria-controls":N,children:[c(`span`,{className:`wui-onboarding-title`,id:M,children:y}),c(`span`,{className:`wui-onboarding-count`,children:H}),c(`span`,{className:`wui-onboarding-chevron`,"aria-hidden":`true`,children:c(r,{name:`chevron-down`,size:16})})]}),c(i,{icon:`x`,label:C,size:16,className:`wui-onboarding-dismiss`})]}),c(`div`,{className:`wui-onboarding-bar`,role:`progressbar`,"aria-labelledby":M,"aria-valuemin":0,"aria-valuemax":v.length,"aria-valuenow":R,"aria-valuetext":H,children:L.map((e,t)=>c(`span`,{className:`wui-onboarding-seg is-${e}`},v[t].key??`${v[t].label}-${t}`))}),c(`ol`,{className:`wui-onboarding-steps`,id:N,hidden:V||void 0,children:v.map((e,t)=>{let n=L[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,O),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:!x||void 0,children:[c(r,{name:`task-square`,size:16}),c(`span`,{children:w}),c(`span`,{className:`wui-onboarding-count`,children:H})]})]})}export{h as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppActionIcon.js";import n from"./AppIcon.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.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`?/* @__PURE__ */ c(n,{name:`check`,size:14}):e===`skipped`?/* @__PURE__ */ c(n,{name:`minus`,size:14}):t+1}function m(e,t){return e.href?t?/* @__PURE__ */ c(t,{className:`wui-onboarding-label`,to:e.href,children:e.label}):/* @__PURE__ */ c(`a`,{className:`wui-onboarding-label`,href:e.href,children:e.label}):/* @__PURE__ */ c(`span`,{className:`wui-onboarding-label`,children:e.label})}function h(h){let{marker:g,props:_}=e(`AppOnboardingChecklist`,h),{steps:v=[],title:y=`Get started`,defaultCollapsed:b,defaultDismissed:x=!1,storageKey:S,dismissLabel:C=`Dismiss checklist`,restoreLabel:w=`Show setup checklist`,onDismiss:T,onRestore:E,onCollapsedChange:D,linkComponent:O,className:k=``,...A}=_;i(`AppOnboardingChecklist`,A);for(let e of v)r(`AppOnboardingChecklist`,`steps[].status`,e.status,u);let j=o().replace(/[^a-zA-Z0-9_-]/g,``),M=`wui-onboarding-${j}-title`,N=`wui-onboarding-${j}-steps`,P=v.length===0,F=s(null);F.current={onDismiss:T,onRestore:E,onCollapsedChange:D};let I=a(e=>{if(!e)return;let t=()=>F.current.onDismiss?.(),n=()=>F.current.onRestore?.(),r=e=>F.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(P)return null;let L=f(v),R=L.filter(e=>e===`done`).length,z=L.filter(e=>e===`skipped`).length,B=R+z===v.length,V=b??B,H=`${R} of ${v.length} done${z?`, ${z} skipped`:``}`;return/* @__PURE__ */ l(`wui-onboarding-checklist`,{ref:I,class:[`wui-onboarding`,B?`is-complete`:``,k].filter(Boolean).join(` `),"storage-key":S||void 0,...g,...A,children:[/* @__PURE__ */ l(`section`,{className:`wui-onboarding-card`,"aria-labelledby":M,hidden:x||void 0,children:[/* @__PURE__ */ l(`header`,{className:`wui-onboarding-head`,children:[/* @__PURE__ */ l(`button`,{type:`button`,className:`wui-onboarding-toggle`,"aria-expanded":!V,"aria-controls":N,children:[/* @__PURE__ */ c(`span`,{className:`wui-onboarding-title`,id:M,children:y}),/* @__PURE__ */ c(`span`,{className:`wui-onboarding-count`,children:H}),/* @__PURE__ */ c(`span`,{className:`wui-onboarding-chevron`,"aria-hidden":`true`,children:/* @__PURE__ */ c(n,{name:`chevron-down`,size:16})})]}),/* @__PURE__ */ c(t,{icon:`x`,label:C,size:16,className:`wui-onboarding-dismiss`})]}),/* @__PURE__ */ c(`div`,{className:`wui-onboarding-bar`,role:`progressbar`,"aria-labelledby":M,"aria-valuemin":0,"aria-valuemax":v.length,"aria-valuenow":R,"aria-valuetext":H,children:L.map((e,t)=>/* @__PURE__ */ c(`span`,{className:`wui-onboarding-seg is-${e}`},v[t].key??`${v[t].label}-${t}`))}),/* @__PURE__ */ c(`ol`,{className:`wui-onboarding-steps`,id:N,hidden:V||void 0,children:v.map((e,t)=>{let n=L[t];return/* @__PURE__ */ l(`li`,{className:`wui-onboarding-step is-${n}`,"aria-current":n===`current`?`step`:void 0,children:[/* @__PURE__ */ c(`span`,{className:`wui-onboarding-mark`,"aria-hidden":`true`,children:p(n,t)}),/* @__PURE__ */ l(`span`,{className:`wui-onboarding-body`,children:[d[n]?/* @__PURE__ */ c(`span`,{className:`visually-hidden`,children:d[n]}):null,m(e,O),e.description?/* @__PURE__ */ c(`span`,{className:`wui-onboarding-desc`,children:e.description}):null]})]},e.key??`${e.label}-${t}`)})})]}),/* @__PURE__ */ l(`button`,{type:`button`,className:`wui-onboarding-restore`,hidden:!x||void 0,children:[/* @__PURE__ */ c(n,{name:`task-square`,size:16}),/* @__PURE__ */ c(`span`,{children:w}),/* @__PURE__ */ c(`span`,{className:`wui-onboarding-count`,children:H})]})]})}export{h as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:p,props:m}=e(`AppOtpInput`,s),{value:h,onChange:g,onComplete:_,length:v=6,mode:y=`numeric`,label:b,required:x=!1,hint:S,error:C,disabled:w=!1,name:T,id:E,className:D=``,fieldClassName:O=``,...k}=m;n(`AppOtpInput`,k),t(`AppOtpInput`,`mode`,y,d);let A=c(),j=E||A,M=C?`${j}-error`:void 0,N=S?`${j}-hint`:void 0,P=M||N,{setRef:F}=a({ref:f,value:h??``,onChange:g,on:{complete:e=>_?.(e.detail)}}),I=l(`wui-otp`,{"aria-label":typeof b==`string`?b:void 0,ref:F,id:j,name:T,length:String(v),mode:y,"aria-describedby":P,"aria-invalid":C?`true`:void 0,disabled:w?``:void 0,required:x?``:void 0,className:D||void 0,...k});return!b&&!C&&!S?o(I,p):u(`div`,{...p,className:`field${O?` ${O}`:``}`,children:[b&&u(`label`,{className:`label`,htmlFor:j,children:[b,x&&l(i,{})]}),I,l(r,{error:C,hint:S,errorId:M,hintId:N})]})});export{f as default};
1
+ import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppRequiredMark.js";import r from"./useWuiControl.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.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{marker:p,props:m}=t(`AppOtpInput`,s),{value:h,onChange:g,onComplete:_,length:v=6,mode:y=`numeric`,label:b,required:x=!1,optional:S=!1,hint:C,error:w,disabled:T=!1,name:E,id:D,className:O=``,fieldClassName:k=``,...A}=m;a(`AppOtpInput`,A),i(`AppOtpInput`,`mode`,y,d);let j=c(),M=D||j,N=w?`${M}-error`:void 0,P=C?`${M}-hint`:void 0,F=N||P,{setRef:I}=r({ref:f,value:h??``,onChange:g,on:{complete:e=>_?.(e.detail)}}),L=/* @__PURE__ */ l(`wui-otp`,{"aria-label":typeof b==`string`?b:void 0,ref:I,id:M,name:E,length:String(v),mode:y,"aria-describedby":F,"aria-invalid":w?`true`:void 0,disabled:T?``:void 0,required:x?``:void 0,className:O||void 0,...A});return!b&&!w&&!C?o(L,p):/* @__PURE__ */ u(`div`,{...p,className:`field${k?` ${k}`:``}`,children:[b&&/* @__PURE__ */ u(`label`,{className:`label`,htmlFor:M,children:[b,S&&!x&&/* @__PURE__ */ l(`span`,{className:`label-optional`,children:` (optional)`}),x&&/* @__PURE__ */ l(n,{})]}),L,/* @__PURE__ */ l(e,{error:w,hint:C,errorId:N,hintId:P})]})});export{f as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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=[`below`,`inline`],h=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function g(g){let{marker:_,props:v}=e(`AppPageHeader`,g),{title:y,titleSlot:b,as:x=`h1`,subtitle:S,eyebrow:C,icon:w,tone:T=`primary`,status:E,breadcrumbs:D,actions:O,views:k,tools:A,meta:j,metaPlacement:M=`inline`,subtitlePlacement:N=`below`,bulkFor:P,bulk:F,size:I=`md`,align:L=`start`,divider:R=!1,sticky:z=!1,className:B=``,...V}=v;n(`AppPageHeader`,V),t(`AppPageHeader`,`tone`,T,u),t(`AppPageHeader`,`size`,I,d),t(`AppPageHeader`,`align`,L,f),t(`AppPageHeader`,`as`,x,h),t(`AppPageHeader`,`metaPlacement`,M,p),t(`AppPageHeader`,`subtitlePlacement`,N,m);let H=h.includes(x)?x:`h1`,U=I===`bar`,W=U&&M===`below`,G=!U&&N===`inline`,K=[`page-header`,I&&I!==`md`?`page-header-${I}`:``,L===`center`?`page-header-center`:``,R?`page-header-divider`:``,z?`page-header-sticky`:``,T&&T!==`primary`?`tone-${T}`:``,W?`wui-page-header-meta-below`:``,G?`wui-page-header-subtitle-inline`:``,B].filter(Boolean).join(` `),[q,J]=s(0),Y=U?P:void 0;o(()=>{if(!Y)return;document.getElementById(Y)?.setAttribute(`data-wui-bulk-in-bar`,``);let e=e=>{typeof e.detail?.selected==`number`&&document.getElementById(Y)?.contains(e.target)&&J(e.detail.selected)};return document.addEventListener(`selectionchange`,e),()=>{document.removeEventListener(`selectionchange`,e),document.getElementById(Y)?.removeAttribute(`data-wui-bulk-in-bar`)}},[Y]);let X=y!=null||b!=null?c(H,{className:b==null?`page-title`:`page-title wui-page-title-slot`,"aria-label":b!=null&&typeof y==`string`&&y!==``?y:void 0,children:b??y}):null;if(U)return l(`header`,{className:K,"data-wui-page-header-bar":``,"data-wui-bulk-for":P||void 0,..._,...V,children:[D!=null&&c(i.Provider,{value:!0,children:c(`div`,{className:`page-header-bar-crumbs`,children:D})}),X,E!=null&&c(`span`,{className:`page-status`,children:E}),k!=null&&c(`div`,{className:`page-header-bar-views`,"data-wui-bar-swap":``,hidden:P&&q>0?!0:void 0,children:k}),c(`span`,{className:`page-header-bar-spacer`,"aria-hidden":`true`}),j!=null&&!W&&c(`div`,{className:`page-header-bar-meta`,children:j}),A!=null&&c(`div`,{className:`page-header-bar-tools`,"data-wui-bar-swap":``,hidden:P&&q>0?!0:void 0,children:A}),P?l(`div`,{className:`page-header-bar-bulk`,"data-wui-bar-bulk":``,hidden:q===0||void 0,children:[c(`span`,{className:`page-header-bar-bulk-count`,"aria-live":`polite`,children:q>0?`${a(q,{decimals:0})} selected`:``}),F]}):null,O!=null&&c(`div`,{className:`page-actions`,children:O}),j!=null&&W&&c(`div`,{className:`page-header-bar-meta`,children:j})]});let Z=w==null?null:typeof w==`string`?c(r,{name:w,size:20}):w,Q=S==null?null:c(`div`,{className:`page-subtitle`,children:S});return l(`div`,{className:K,..._,...V,children:[D!=null&&c(`div`,{className:`page-breadcrumbs`,children:D}),l(`div`,{className:`page-header-bar`,children:[l(`div`,{className:`page-header-lead`,children:[Z!=null&&c(`span`,{className:`page-header-icon`,children:Z}),l(`div`,{className:`page-header-titles`,children:[C!=null&&c(`div`,{className:`page-eyebrow`,children:C}),l(`div`,{className:`page-titlebar`,children:[X,E!=null&&c(`span`,{className:`page-status`,children:E}),G&&Q]}),!G&&Q]})]}),O!=null&&c(`div`,{className:`page-actions`,children:O})]})]})}export{g as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{BreadcrumbTrailContext as t}from"./AppBreadcrumbs.js";import n from"./AppIcon.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.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=[`below`,`inline`],h=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function g(g){let{marker:_,props:v}=e(`AppPageHeader`,g),{title:y,titleSlot:b,as:x=`h1`,subtitle:S,eyebrow:C,icon:w,tone:T=`primary`,status:E,breadcrumbs:D,actions:O,views:k,tools:A,meta:j,metaPlacement:M=`inline`,subtitlePlacement:N=`below`,bulkFor:P,bulk:F,size:I=`md`,align:L=`start`,divider:R=!1,sticky:z=!1,className:B=``,...V}=v;i(`AppPageHeader`,V),r(`AppPageHeader`,`tone`,T,u),r(`AppPageHeader`,`size`,I,d),r(`AppPageHeader`,`align`,L,f),r(`AppPageHeader`,`as`,x,h),r(`AppPageHeader`,`metaPlacement`,M,p),r(`AppPageHeader`,`subtitlePlacement`,N,m);let H=h.includes(x)?x:`h1`,U=I===`bar`,W=U&&M===`below`,G=!U&&N===`inline`,K=[`page-header`,I&&I!==`md`?`page-header-${I}`:``,L===`center`?`page-header-center`:``,R?`page-header-divider`:``,z?`page-header-sticky`:``,T&&T!==`primary`?`tone-${T}`:``,W?`wui-page-header-meta-below`:``,G?`wui-page-header-subtitle-inline`:``,B].filter(Boolean).join(` `),[q,J]=s(0),Y=U?P:void 0;o(()=>{if(!Y)return;document.getElementById(Y)?.setAttribute(`data-wui-bulk-in-bar`,``);let e=e=>{typeof e.detail?.selected==`number`&&document.getElementById(Y)?.contains(e.target)&&J(e.detail.selected)};return document.addEventListener(`selectionchange`,e),()=>{document.removeEventListener(`selectionchange`,e),document.getElementById(Y)?.removeAttribute(`data-wui-bulk-in-bar`)}},[Y]);let X=y!=null||b!=null?/* @__PURE__ */ c(H,{className:b==null?`page-title`:`page-title wui-page-title-slot`,"aria-label":b!=null&&typeof y==`string`&&y!==``?y:void 0,children:b??y}):null;if(U)return/* @__PURE__ */ l(`header`,{className:K,"data-wui-page-header-bar":``,"data-wui-bulk-for":P||void 0,..._,...V,children:[D!=null&&/* @__PURE__ */ c(t.Provider,{value:!0,children:/* @__PURE__ */ c(`div`,{className:`page-header-bar-crumbs`,children:D})}),X,E!=null&&/* @__PURE__ */ c(`span`,{className:`page-status`,children:E}),k!=null&&/* @__PURE__ */ c(`div`,{className:`page-header-bar-views`,"data-wui-bar-swap":``,hidden:P&&q>0?!0:void 0,children:k}),/* @__PURE__ */ c(`span`,{className:`page-header-bar-spacer`,"aria-hidden":`true`}),j!=null&&!W&&/* @__PURE__ */ c(`div`,{className:`page-header-bar-meta`,children:j}),A!=null&&/* @__PURE__ */ c(`div`,{className:`page-header-bar-tools`,"data-wui-bar-swap":``,hidden:P&&q>0?!0:void 0,children:A}),P?/* @__PURE__ */ l(`div`,{className:`page-header-bar-bulk`,"data-wui-bar-bulk":``,hidden:q===0||void 0,children:[/* @__PURE__ */ c(`span`,{className:`page-header-bar-bulk-count`,"aria-live":`polite`,children:q>0?`${a(q,{decimals:0})} selected`:``}),F]}):null,O!=null&&/* @__PURE__ */ c(`div`,{className:`page-actions`,children:O}),j!=null&&W&&/* @__PURE__ */ c(`div`,{className:`page-header-bar-meta`,children:j})]});let Z=w==null?null:typeof w==`string`?/* @__PURE__ */ c(n,{name:w,size:20}):w,Q=S==null?null:/* @__PURE__ */ c(`div`,{className:`page-subtitle`,children:S});return/* @__PURE__ */ l(`div`,{className:K,..._,...V,children:[D!=null&&/* @__PURE__ */ c(`div`,{className:`page-breadcrumbs`,children:D}),/* @__PURE__ */ l(`div`,{className:`page-header-bar`,children:[/* @__PURE__ */ l(`div`,{className:`page-header-lead`,children:[Z!=null&&/* @__PURE__ */ c(`span`,{className:`page-header-icon`,children:Z}),/* @__PURE__ */ l(`div`,{className:`page-header-titles`,children:[C!=null&&/* @__PURE__ */ c(`div`,{className:`page-eyebrow`,children:C}),/* @__PURE__ */ l(`div`,{className:`page-titlebar`,children:[X,E!=null&&/* @__PURE__ */ c(`span`,{className:`page-status`,children:E}),G&&Q]}),!G&&Q]})]}),O!=null&&/* @__PURE__ */ c(`div`,{className:`page-actions`,children:O})]})]})}export{g as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:f,props:p}=e(`AppPhoneNumberInput`,o),{value:m,onChange:h,country:g,disabled:_=!1,name:v,id:y,label:b=`Phone number`,placeholder:x,required:S=!1,hint:C,error:w,showFlag:T=!0,showDialCode:E=!0,size:D=`md`,fieldClassName:O=``,...k}=p;n(`AppPhoneNumberInput`,k),t(`AppPhoneNumberInput`,`size`,D,u);let A=s(),j=y||A,M=w&&j?`${j}-error`:void 0,N=!w&&C&&j?`${j}-hint`:void 0,{setRef:P}=a({ref:d,value:m??``,onChange:h,events:[`input`,`change`]});return l(`div`,{...f,className:`field app-phone-number-input${D===`sm`?` phone-sm`:``}${D===`lg`?` phone-lg`:``}${O?` ${O}`:``}`,children:[b&&l(`label`,{className:`label`,htmlFor:j,children:[b,S&&c(i,{})]}),c(`wui-phone`,{ref:P,id:j,name:v,"aria-label":typeof b==`string`?b:void 0,"aria-describedby":M||N,"aria-invalid":w?`true`:void 0,country:g,placeholder:x,required:S?``:void 0,disabled:_?``:void 0,"hide-flag":T?void 0:``,"hide-dial":E?void 0:``,"external-error":``,...k}),c(r,{error:w,hint:C,errorId:M,hintId:N})]})});export{d as default};
1
+ import e from"../lib/FieldMessage.js";import{loadFlagStyles as t}from"../lib/flagStyles.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppRequiredMark.js";import i from"./useWuiControl.js";import a from"./warnInvalidValue.js";import o from"./warnUnknownProps.js";import{forwardRef as s,useEffect as c,useId as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import"@webority/ui-elements/elements/phone";var f=[`sm`,`md`,`lg`],p=s(function(s,p){let{marker:m,props:h}=n(`AppPhoneNumberInput`,s),{value:g,onChange:_,country:v,disabled:y=!1,name:b,id:x,label:S=`Phone number`,placeholder:C,required:w=!1,optional:T=!1,hint:E,error:D,showFlag:O=!0,showDialCode:k=!0,size:A=`md`,fieldClassName:j=``,...M}=h;o(`AppPhoneNumberInput`,M),a(`AppPhoneNumberInput`,`size`,A,f),c(()=>{O&&t()},[O]);let N=l(),P=x||N,F=D&&P?`${P}-error`:void 0,I=!D&&E&&P?`${P}-hint`:void 0,{setRef:L}=i({ref:p,value:g??``,onChange:_,events:[`input`,`change`]});return/* @__PURE__ */ d(`div`,{...m,className:`field app-phone-number-input${A===`sm`?` phone-sm`:``}${A===`lg`?` phone-lg`:``}${j?` ${j}`:``}`,children:[S&&/* @__PURE__ */ d(`label`,{className:`label`,htmlFor:P,children:[S,T&&!w&&/* @__PURE__ */ u(`span`,{className:`label-optional`,children:` (optional)`}),w&&/* @__PURE__ */ u(r,{})]}),/* @__PURE__ */ u(`wui-phone`,{ref:L,id:P,name:b,"aria-label":typeof S==`string`?S:void 0,"aria-describedby":F||I,"aria-invalid":D?`true`:void 0,country:v,placeholder:C,required:w?``:void 0,disabled:y?``:void 0,"hide-flag":O?void 0:``,"hide-dial":k?void 0:``,"external-error":``,...M}),/* @__PURE__ */ u(e,{error:D,hint:E,errorId:F,hintId:I})]})});export{p as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"../lib/FocusPanel.js";import{cloneElement as r,useEffect as i,useId as a,useRef as o,useState as s}from"react";import{OverlayTrigger as c,Popover as l}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f={start:`left`,end:`right`,top:`top`,bottom:`bottom`,auto:`auto`},p={modifiers:[{name:`computeStyles`,options:{gpuAcceleration:!1}}]},m=[`dialog`];function h({trigger:h,children:g,title:_,placement:v=`bottom`,triggerType:y=`click`,onToggle:b,className:x=``,show:S,role:C,labelledBy:w,autoFocus:T=!1,openDelay:E=80,closeDelay:D=220,...O}){t(`AppPopover`,O),e(`AppPopover`,`role`,C,m);let k=a(),A=`${k}-title`,j=o(null),[M,N]=s(!1),P=S!==void 0,F=P?S:M,I=C===`dialog`,L=y===`hover`||Array.isArray(y)&&y.includes(`hover`),R=L&&!P,z=o(null),B=o(M);B.current=M;let V=()=>{clearTimeout(z.current),z.current=null},H=(e,t)=>{V(),z.current=setTimeout(()=>{z.current=null,e!==B.current&&(N(e),b?.(e))},t)};i(()=>()=>clearTimeout(z.current),[]),i(()=>{if(!R||!M)return;let e=e=>{e.key===`Escape`&&(clearTimeout(z.current),z.current=null,N(!1),b?.(!1))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[R,M,b]);let U=e=>{if(R){H(e,e?E:D);return}P||N(e),b?.(e)},W=I?{role:`dialog`,"aria-modal":`false`,"aria-labelledby":w??(_?A:void 0)}:{},G=R?{onMouseEnter:V,onMouseLeave:()=>H(!1,D),onFocus:V,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||H(!1,D)}}:{},K=d(l,{id:k,className:x||void 0,...W,...G,children:[T&&u(n,{triggerRef:j}),_&&u(l.Header,{as:`div`,id:A,children:_}),g==null?null:u(l.Body,{children:g})]}),{onClick:q,"aria-expanded":J,...Y}=O,X=h.props[`aria-expanded`],Z,Q=y===`click`||Array.isArray(y)&&y.includes(`click`);J===void 0?X===void 0?Q&&(Z=F):Z=X:Z=J;let $=r(h,{...Y,...Z===void 0?{}:{"aria-expanded":Z},onClick:e=>{j.current=e.currentTarget,q?.(e),typeof h.props.onClick==`function`&&h.props.onClick(e)}}),ee=y===`click`;return u(c,{trigger:y,placement:f[v]||v,popperConfig:p,overlay:K,rootClose:ee||I,delay:P&&L?{show:E,hide:D}:void 0,onToggle:U,...P||L?{show:F}:{},children:$})}export{h as default};
1
+ import e from"../lib/FocusPanel.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{cloneElement as r,useEffect as i,useId as a,useRef as o,useState as s}from"react";import{OverlayTrigger as c,Popover as l}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f={start:`left`,end:`right`,top:`top`,bottom:`bottom`,auto:`auto`},p={modifiers:[{name:`computeStyles`,options:{gpuAcceleration:!1}}]},m=[`dialog`];function h({trigger:h,children:g,title:_,placement:v=`bottom`,triggerType:y=`click`,onToggle:b,className:x=``,show:S,role:C,labelledBy:w,autoFocus:T=!1,openDelay:E=80,closeDelay:D=220,...O}){n(`AppPopover`,O),t(`AppPopover`,`role`,C,m);let k=a(),A=`${k}-title`,j=o(null),[M,N]=s(!1),P=S!==void 0,F=P?S:M,I=C===`dialog`,L=y===`hover`||Array.isArray(y)&&y.includes(`hover`),R=L&&!P,z=o(null),B=o(M);B.current=M;let V=()=>{clearTimeout(z.current),z.current=null},H=(e,t)=>{V(),z.current=setTimeout(()=>{z.current=null,e!==B.current&&(N(e),b?.(e))},t)};i(()=>()=>clearTimeout(z.current),[]),i(()=>{if(!R||!M)return;let e=e=>{e.key===`Escape`&&(clearTimeout(z.current),z.current=null,N(!1),b?.(!1))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[R,M,b]);let U=e=>{R?H(e,e?E:D):(P||N(e),b?.(e))},W=I?{role:`dialog`,"aria-modal":`false`,"aria-labelledby":w??(_?A:void 0)}:{},G=R?{onMouseEnter:V,onMouseLeave:()=>H(!1,D),onFocus:V,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||H(!1,D)}}:{},K=/* @__PURE__ */ d(l,{id:k,className:x||void 0,...W,...G,children:[T&&/* @__PURE__ */ u(e,{triggerRef:j}),_&&/* @__PURE__ */ u(l.Header,{as:`div`,id:A,children:_}),g==null?null:/* @__PURE__ */ u(l.Body,{children:g})]}),{onClick:q,"aria-expanded":J,...Y}=O,X=h.props[`aria-expanded`],Z,Q=y===`click`||Array.isArray(y)&&y.includes(`click`);J===void 0?X===void 0?Q&&(Z=F):Z=X:Z=J;let $=r(h,{...Y,...Z===void 0?{}:{"aria-expanded":Z},onClick:e=>{j.current=e.currentTarget,q?.(e),typeof h.props.onClick==`function`&&h.props.onClick(e)}}),ee=y===`click`;return/* @__PURE__ */ u(c,{trigger:y,placement:f[v]||v,popperConfig:p,overlay:K,rootClose:ee||I,delay:P&&L?{show:E,hide:D}:void 0,onToggle:U,...P||L?{show:F}:{},children:$})}export{h as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:o,props:s}=e(`AppPricingCard`,a),{name:c,price:l,unit:u,tagline:d,features:f=[],cta:p,featured:m=!1,current:h=!1,badge:g=`Most popular`,className:_=``,...v}=s;return t(`AppPricingCard`,v),i(`div`,{className:[`plan-card`,m?`featured`:``,h?`current`:``,_].filter(Boolean).join(` `),...o,...v,children:[m&&g&&r(`span`,{className:`plan-badge`,children:g}),r(`div`,{className:`plan-name`,children:c}),i(`div`,{className:`plan-price`,children:[l,u&&r(`span`,{className:`plan-price-unit`,children:u})]}),d&&r(`div`,{className:`plan-tagline`,children:d}),f.length>0&&r(`ul`,{className:`plan-features`,children:f.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}`)})}),p&&r(`div`,{className:`plan-cta`,children:p})]})}export{a as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./warnUnknownProps.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{marker:o,props:s}=e(`AppPricingCard`,a),{name:c,price:l,unit:u,tagline:d,features:f=[],cta:p,featured:m=!1,current:h=!1,badge:g=`Most popular`,className:_=``,...v}=s;n(`AppPricingCard`,v);let y=[`plan-card`,m?`featured`:``,h?`current`:``,_].filter(Boolean).join(` `);return/* @__PURE__ */ i(`div`,{className:y,...o,...v,children:[m&&g&&/* @__PURE__ */ r(`span`,{className:`plan-badge`,children:g}),/* @__PURE__ */ r(`div`,{className:`plan-name`,children:c}),/* @__PURE__ */ i(`div`,{className:`plan-price`,children:[l,u&&/* @__PURE__ */ r(`span`,{className:`plan-price-unit`,children:u})]}),d&&/* @__PURE__ */ r(`div`,{className:`plan-tagline`,children:d}),f.length>0&&/* @__PURE__ */ r(`ul`,{className:`plan-features`,children:f.map((e,n)=>{let a=e.included!==!1;return/* @__PURE__ */ i(`li`,{className:a?void 0:`excluded`,children:[/* @__PURE__ */ r(`span`,{className:`plan-feature-icon`,children:/* @__PURE__ */ r(t,{name:a?`check`:`x`,size:16})}),e.text]},e.text?`feat-${n}-${e.text}`:`feat-${n}`)})}),p&&/* @__PURE__ */ r(`div`,{className:`plan-cta`,children:p})]})}export{a as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:u,props:d}=e(`AppProgress`,l),{value:f=0,max:p=100,tone:m=`info`,size:h=`md`,label:g,showLabel:_=!1,striped:v=!1,animated:y=!1,indeterminate:b=!1,className:x=``,...S}=d;n(`AppProgress`,S),t(`AppProgress`,`tone`,m,s),t(`AppProgress`,`size`,h,o);let C=s.includes(m)?m:`info`,w=c(f,p),T=!b&&_&&!!g,E=`progress${h===`sm`?` progress-sm`:``}${!T&&x?` ${x}`:``}`,D=[`progress-bar`,`wui-progress-${C}`,v||y?`progress-bar-striped`:``,y?`progress-bar-animated`:``,b?`wui-progress-indeterminate`:``].filter(Boolean).join(` `),O=i(`div`,{className:E,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":p,...b?{}:{"aria-valuenow":f},"aria-label":g||void 0,...S,children:i(`div`,{className:D,style:b?void 0:{width:`${w}%`}})});return T?a(`div`,{...u,className:`wui-progress-labelled${x?` ${x}`:``}`,children:[i(`div`,{className:`wui-progress-label`,"aria-hidden":`true`,children:g}),O]}):r(O,u)}export{l as default};
1
+ import{splitMarkerProps 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{marker:u,props:d}=e(`AppProgress`,l),{value:f=0,max:p=100,tone:m=`info`,size:h=`md`,label:g,showLabel:_=!1,striped:v=!1,animated:y=!1,indeterminate:b=!1,className:x=``,...S}=d;n(`AppProgress`,S),t(`AppProgress`,`tone`,m,s),t(`AppProgress`,`size`,h,o);let C=s.includes(m)?m:`info`,w=c(f,p),T=!b&&_&&!!g,E=`progress${h===`sm`?` progress-sm`:``}${!T&&x?` ${x}`:``}`,D=[`progress-bar`,`wui-progress-${C}`,v||y?`progress-bar-striped`:``,y?`progress-bar-animated`:``,b?`wui-progress-indeterminate`:``].filter(Boolean).join(` `),O=/* @__PURE__ */ i(`div`,{className:E,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":p,...b?{}:{"aria-valuenow":f},"aria-label":g||void 0,...S,children:/* @__PURE__ */ i(`div`,{className:D,style:b?void 0:{width:`${w}%`}})});return T?/* @__PURE__ */ a(`div`,{...u,className:`wui-progress-labelled${x?` ${x}`:``}`,children:[/* @__PURE__ */ i(`div`,{className:`wui-progress-label`,"aria-hidden":`true`,children:g}),O]}):r(O,u)}export{l as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:l,props:u}=e(`AppQrCode`,c),{value:d,size:f=240,title:p=`QR code`,className:m,style:h,...g}=u;t(`AppQrCode`,g);let _=i(()=>{if(!d)return null;let e=n(String(d));return{modules:e.size+s*2,path:r(e,s)}},[d]);if(!_)return null;let{modules:v,path:y}=_,b=Math.max(1,Math.floor(Number(f)/v)||1)*v;return o(`svg`,{viewBox:`0 0 ${v} ${v}`,width:b,height:b,role:`img`,"aria-label":p,shapeRendering:`crispEdges`,className:m||void 0,style:h,...l,...g,children:[a(`rect`,{width:v,height:v,fill:`#ffffff`}),a(`path`,{d:y,fill:`#000000`})]})}export{c as default};
1
+ import{encodeQr as e,qrSvgPath as t}from"../lib/qrCode.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./warnUnknownProps.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{marker:l,props:u}=n(`AppQrCode`,c),{value:d,size:f=240,title:p=`QR code`,className:m,style:h,...g}=u;r(`AppQrCode`,g);let _=i(()=>{if(!d)return null;let n=e(String(d));return{modules:n.size+8,path:t(n,s)}},[d]);if(!_)return null;let{modules:v,path:y}=_,b=Math.max(1,Math.floor(Number(f)/v)||1)*v;return/* @__PURE__ */ o(`svg`,{viewBox:`0 0 ${v} ${v}`,width:b,height:b,role:`img`,"aria-label":p,shapeRendering:`crispEdges`,className:m||void 0,style:h,...l,...g,children:[/* @__PURE__ */ a(`rect`,{width:v,height:v,fill:`#ffffff`}),/* @__PURE__ */ a(`path`,{d:y,fill:`#000000`})]})}export{c as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:o,props:s}=e(`AppRadio`,r),{label:c,id:l,name:u,error:d,hint:f,className:p=``,...m}=s;return t(`AppRadio`,m),i(n,{rootProps:o,ref:a,label:c,id:l,name:u,error:d,hint:f,className:p,rest:m,inputType:`radio`,wrapperClass:`form-check`})});export{a as default};
1
+ import e from"../lib/CheckField.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./warnUnknownProps.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=r(function(r,a){let{marker:o,props:s}=t(`AppRadio`,r),{label:c,id:l,name:u,error:d,hint:f,className:p=``,...m}=s;return n(`AppRadio`,m),/* @__PURE__ */ i(e,{rootProps:o,ref:a,label:c,id:l,name:u,error:d,hint:f,className:p,rest:m,inputType:`radio`,wrapperClass:`form-check`})});export{a as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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{marker:d,props:f}=e(`AppRadioGroup`,u),{label:p,options:m=[],name:h,value:g,defaultValue:_,onChange:v,variant:y=`default`,inline:b=!1,required:x=!1,disabled:S=!1,error:C,hint:w,help:T,helpLabel:E=`More information`,id:D,className:O=``,fieldClassName:k=``,style:A,...j}=f;n(`AppRadioGroup`,j),t(`AppRadioGroup`,`variant`,y,l);let M=o(),N=D||M,P=h||N,F=`${N}-error`,I=`${N}-hint`,L=g!==void 0;return c(`div`,{...d,className:`field${k?` ${k}`:``}`,children:[p!=null&&c(`span`,{className:`label`,id:`${N}-label`,children:[p,x&&s(a,{}),T&&s(i,{label:E,children:T})]}),s(`div`,{className:[`wui-radio-group`,y===`card`?`wui-radio-group-card`:``,b?`wui-radio-group-inline`:``,O].filter(Boolean).join(` `),style:A,id:N,role:`radiogroup`,"aria-labelledby":p==null?void 0:`${N}-label`,"aria-required":x?`true`:void 0,"aria-invalid":C?`true`:void 0,"aria-describedby":C?F:w?I:void 0,...j,children:m.map((e,t)=>{let n=`${N}-${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:P,value:e.value,disabled:S||e.disabled||void 0,required:x||void 0,"aria-describedby":r,...L?{checked:g===e.value,onChange:()=>v?.(e.value)}:{defaultChecked:_===e.value,onChange:()=>v?.(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:C,hint:w,errorId:F,hintId:I})]})}export{u as default};
1
+ import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.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{marker:d,props:f}=t(`AppRadioGroup`,u),{label:p,options:m=[],name:h,value:g,defaultValue:_,onChange:v,variant:y=`default`,inline:b=!1,required:x=!1,optional:S=!1,disabled:C=!1,error:w,hint:T,help:E,helpLabel:D=`More information`,id:O,className:k=``,fieldClassName:A=``,style:j,...M}=f;a(`AppRadioGroup`,M),i(`AppRadioGroup`,`variant`,y,l);let N=o(),P=O||N,F=h||P,I=`${P}-error`,L=`${P}-hint`,R=g!==void 0;return/* @__PURE__ */ c(`div`,{...d,className:`field${A?` ${A}`:``}`,children:[p!=null&&/* @__PURE__ */ c(`span`,{className:`label`,id:`${P}-label`,children:[p,S&&!x&&/* @__PURE__ */ s(`span`,{className:`label-optional`,children:` (optional)`}),x&&/* @__PURE__ */ s(r,{}),E&&/* @__PURE__ */ s(n,{label:D,children:E})]}),/* @__PURE__ */ s(`div`,{className:[`wui-radio-group`,y===`card`?`wui-radio-group-card`:``,b?`wui-radio-group-inline`:``,k].filter(Boolean).join(` `),style:j,id:P,role:`radiogroup`,"aria-labelledby":p==null?void 0:`${P}-label`,"aria-required":x?`true`:void 0,"aria-invalid":w?`true`:void 0,"aria-describedby":w?I:T?L:void 0,...M,children:m.map((e,t)=>{let n=`${P}-${t}`,r=e.description==null?void 0:`${n}-desc`;return/* @__PURE__ */ c(`div`,{className:`form-check`,children:[/* @__PURE__ */ s(`input`,{type:`radio`,className:`form-check-input`,id:n,name:F,value:e.value,disabled:C||e.disabled||void 0,required:x||void 0,"aria-describedby":r,...R?{checked:g===e.value,onChange:()=>v?.(e.value)}:{defaultChecked:_===e.value,onChange:()=>v?.(e.value)}}),/* @__PURE__ */ s(`label`,{className:`form-check-label`,htmlFor:n,children:e.label}),r&&/* @__PURE__ */ s(`div`,{className:`wui-radio-option-desc`,id:r,children:e.description})]},e.value)})}),/* @__PURE__ */ s(e,{error:w,hint:T,errorId:I,hintId:L})]})}export{u as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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"./AppRequiredMark.js";import{useId as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/rating";var u={sm:16,md:20,lg:28},d=e=>String(Math.round(e*100)/100),f=(e,t,n)=>e>=t?`full`:n&&e>=t-.5?`half`:`empty`;function p(r){let{marker:p,props:h}=e(`AppRating`,r),{value:g,defaultValue:_,onChange:v,max:y=5,readOnly:b=!1,half:x=!1,showValue:S=!1,size:C=`md`,label:w,name:T,required:E=!1,disabled:D=!1,error:O,hint:k,id:A,className:j=``,fieldClassName:M=``,...N}=h;n(`AppRating`,N),t(`AppRating`,`size`,C,Object.keys(u));let P=o(),[F,I]=s(_),L=u[C]??u.md,R=Array.from({length:y},(e,t)=>t+1),z=(...e)=>[`wui-rating`,`wui-rating-${C}`,...e,j].filter(Boolean).join(` `);if(b){let e=Number.isFinite(Number(g))?Math.min(Math.max(Number(g),0),y):0,t=x?Math.round(e*2)/2:Math.round(e),n=`${typeof w==`string`&&w?`${w}: `:``}${d(e)} out of ${y}`;return l(`span`,{className:z(`wui-rating-display`),id:A,role:`img`,"aria-label":n,...p,...N,children:[c(`span`,{className:`wui-rating-stars`,"aria-hidden":`true`,children:R.map(e=>c(`span`,{className:`wui-rating-star wui-rating-star-${f(t,e,x)}`,children:c(m,{px:L})},e))}),S&&c(`span`,{className:`wui-rating-value`,"aria-hidden":`true`,children:d(e)})]})}let B=A||P,V=T||B,H=`${B}-error`,U=`${B}-hint`,W=Math.round(Number(g===void 0?F:g))||0,G=e=>{I(e),v?.(e)};return l(`div`,{...p,className:`field${M?` ${M}`:``}`,children:[w!=null&&l(`span`,{className:`label`,id:`${B}-label`,children:[w,E&&c(a,{})]}),c(`wui-rating`,{class:z(`wui-rating-input`),id:B,role:`radiogroup`,"aria-labelledby":w==null?void 0:`${B}-label`,"aria-label":w==null?`Rating`:void 0,"aria-required":E?`true`:void 0,"aria-invalid":O?`true`:void 0,"aria-describedby":O?H:k?U:void 0,disabled:D?``:void 0,...N,children:R.map(e=>l(`label`,{className:`wui-rating-star wui-rating-star-${W>=e?`full`:`empty`}`,"data-value":e,children:[c(`input`,{type:`radio`,className:`visually-hidden`,name:V,value:e,"aria-label":`${e} ${e===1?`star`:`stars`}`,checked:W===e,onChange:()=>G(e),disabled:D||void 0,required:E||void 0}),c(m,{px:L})]},e))}),c(i,{error:O,hint:k,errorId:H,hintId:U})]})}function m({px:e}){return l(`span`,{className:`wui-rating-glyphs`,"aria-hidden":`true`,children:[c(r,{name:`star`,size:e}),c(`span`,{className:`wui-rating-fill`,children:c(r,{name:`star`,variant:`bold`,size:e})})]})}export{p as default};
1
+ import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppIcon.js";import r from"./AppRequiredMark.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import{useId as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/rating";var u={sm:16,md:20,lg:28},d=e=>String(Math.round(e*100)/100),f=(e,t,n)=>e>=t?`full`:n&&e>=t-.5?`half`:`empty`;function p(n){let{marker:p,props:h}=t(`AppRating`,n),{value:g,defaultValue:_,onChange:v,max:y=5,readOnly:b=!1,half:x=!1,showValue:S=!1,size:C=`md`,label:w,name:T,required:E=!1,disabled:D=!1,error:O,hint:k,id:A,className:j=``,fieldClassName:M=``,...N}=h;a(`AppRating`,N),i(`AppRating`,`size`,C,Object.keys(u));let P=o(),[F,I]=s(_),L=u[C]??u.md,R=Array.from({length:y},(e,t)=>t+1),z=(...e)=>[`wui-rating`,`wui-rating-${C}`,...e,j].filter(Boolean).join(` `);if(b){let e=Number.isFinite(Number(g))?Math.min(Math.max(Number(g),0),y):0,t=x?Math.round(e*2)/2:Math.round(e),n=`${typeof w==`string`&&w?`${w}: `:``}${d(e)} out of ${y}`;return/* @__PURE__ */ l(`span`,{className:z(`wui-rating-display`),id:A,role:`img`,"aria-label":n,...p,...N,children:[/* @__PURE__ */ c(`span`,{className:`wui-rating-stars`,"aria-hidden":`true`,children:R.map(e=>/* @__PURE__ */ c(`span`,{className:`wui-rating-star wui-rating-star-${f(t,e,x)}`,children:/* @__PURE__ */ c(m,{px:L})},e))}),S&&/* @__PURE__ */ c(`span`,{className:`wui-rating-value`,"aria-hidden":`true`,children:d(e)})]})}let B=A||P,V=T||B,H=`${B}-error`,U=`${B}-hint`,W=Math.round(Number(g===void 0?F:g))||0,G=e=>{I(e),v?.(e)};return/* @__PURE__ */ l(`div`,{...p,className:`field${M?` ${M}`:``}`,children:[w!=null&&/* @__PURE__ */ l(`span`,{className:`label`,id:`${B}-label`,children:[w,E&&/* @__PURE__ */ c(r,{})]}),/* @__PURE__ */ c(`wui-rating`,{class:z(`wui-rating-input`),id:B,role:`radiogroup`,"aria-labelledby":w==null?void 0:`${B}-label`,"aria-label":w==null?`Rating`:void 0,"aria-required":E?`true`:void 0,"aria-invalid":O?`true`:void 0,"aria-describedby":O?H:k?U:void 0,disabled:D?``:void 0,...N,children:R.map(e=>/* @__PURE__ */ l(`label`,{className:`wui-rating-star wui-rating-star-${W>=e?`full`:`empty`}`,"data-value":e,children:[/* @__PURE__ */ c(`input`,{type:`radio`,className:`visually-hidden`,name:V,value:e,"aria-label":`${e} ${e===1?`star`:`stars`}`,checked:W===e,onChange:()=>G(e),disabled:D||void 0,required:E||void 0}),/* @__PURE__ */ c(m,{px:L})]},e))}),/* @__PURE__ */ c(e,{error:O,hint:k,errorId:H,hintId:U})]})}function m({px:e}){return/* @__PURE__ */ l(`span`,{className:`wui-rating-glyphs`,"aria-hidden":`true`,children:[/* @__PURE__ */ c(n,{name:`star`,size:e}),/* @__PURE__ */ c(`span`,{className:`wui-rating-fill`,children:/* @__PURE__ */ c(n,{name:`star`,variant:`bold`,size:e})})]})}export{p as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppActionIcon.js";import{formatNumber as r}from"@webority/ui-elements/helpers";import{jsx as i,jsxs as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/record-pager";var o=e=>r(e,{decimals:0});function s(r){let{marker:s,props:c}=e(`AppRecordPager`,r),{index:l,total:u,prevHref:d,onPrev:f,nextHref:p,onNext:m,prevLabel:h=`Previous`,nextLabel:g=`Next`,keys:_=!1,className:v=``,...y}=c;t(`AppRecordPager`,y);let b=Number(l),x=Number(u),S=Number.isInteger(b)&&Number.isInteger(x)&&b>=1&&b<=x,C=S&&b>1&&!!(d||f),w=S&&b<x&&!!(p||m);return a(`wui-record-pager`,{class:[`wui-record-pager`,v].filter(Boolean).join(` `),keys:_?``:void 0,...s,...y,children:[i(`span`,{className:`wui-record-pager-position`,"aria-live":`polite`,children:S?`${o(b)} of ${o(x)}`:``}),i(n,{icon:`chevron-left`,label:h,size:18,className:`wui-record-pager-prev`,href:d||void 0,onClick:f,disabled:!C,shortcut:_?`K`:void 0}),i(n,{icon:`chevron-right`,label:g,size:18,className:`wui-record-pager-next`,href:p||void 0,onClick:m,disabled:!w,shortcut:_?`J`:void 0})]})}export{s as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppActionIcon.js";import n from"./warnUnknownProps.js";import{formatNumber as r}from"@webority/ui-elements/helpers";import{jsx as i,jsxs as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/record-pager";var o=e=>r(e,{decimals:0});function s(r){let{marker:s,props:c}=e(`AppRecordPager`,r),{index:l,total:u,prevHref:d,onPrev:f,nextHref:p,onNext:m,prevLabel:h=`Previous`,nextLabel:g=`Next`,keys:_=!1,className:v=``,...y}=c;n(`AppRecordPager`,y);let b=Number(l),x=Number(u),S=Number.isInteger(b)&&Number.isInteger(x)&&b>=1&&b<=x,C=S&&b>1&&!!(d||f),w=S&&b<x&&!!(p||m);return/* @__PURE__ */ a(`wui-record-pager`,{class:[`wui-record-pager`,v].filter(Boolean).join(` `),keys:_?``:void 0,...s,...y,children:[/* @__PURE__ */ i(`span`,{className:`wui-record-pager-position`,"aria-live":`polite`,children:S?`${o(b)} of ${o(x)}`:``}),/* @__PURE__ */ i(t,{icon:`chevron-left`,label:h,size:18,className:`wui-record-pager-prev`,href:d||void 0,onClick:f,disabled:!C,shortcut:_?`K`:void 0}),/* @__PURE__ */ i(t,{icon:`chevron-right`,label:g,size:18,className:`wui-record-pager-next`,href:p||void 0,onClick:m,disabled:!w,shortcut:_?`J`:void 0})]})}export{s as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./withTooltip.js";import{EMPTY_VALUE as r,formatDate as i,toInstant as a}from"@webority/ui-elements/helpers";import{jsx as o}from"react/jsx-runtime";import{relativeTimeTitle as s}from"@webority/ui-elements/elements/relative-time";function c(c){let{marker:l,props:u}=e(`AppRelativeTime`,c),{value:d,tooltipPlacement:f=`auto`,className:p=``,...m}=u;t(`AppRelativeTime`,m);let h=a(d),g=Number.isFinite(h),_=g?typeof d==`string`?d.trim():new Date(h).toISOString():void 0;return n(o(`wui-relative-time`,{class:[`wui-relative-time`,p].filter(Boolean).join(` `),...l,...m,children:o(`time`,{dateTime:_,children:g?i(h):r})}),g?s(h):void 0,f)}export{c as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./withTooltip.js";import{EMPTY_VALUE as r,formatDate as i,toInstant as a}from"@webority/ui-elements/helpers";import{jsx as o}from"react/jsx-runtime";import{relativeTimeTitle as s}from"@webority/ui-elements/elements/relative-time";function c(c){let{marker:l,props:u}=e(`AppRelativeTime`,c),{value:d,tooltipPlacement:f=`auto`,className:p=``,...m}=u;t(`AppRelativeTime`,m);let h=a(d),g=Number.isFinite(h),_=g?typeof d==`string`?d.trim():new Date(h).toISOString():void 0;return n(/* @__PURE__ */ o(`wui-relative-time`,{class:[`wui-relative-time`,p].filter(Boolean).join(` `),...l,...m,children:/* @__PURE__ */ o(`time`,{dateTime:_,children:g?i(h):r})}),g?s(h):void 0,f)}export{c as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppActionIcon.js";import r from"./AppButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o(o){let{marker:s,props:c}=e(`AppRepeater`,o),{rows:l=[],renderRow:u,rowLabel:d,onAdd:f,onRemove:p,addLabel:m=`Add another`,addVariant:h=`secondary`,removeLabel:g=`Remove row`,emptyText:_,min:v=0,max:y,numbered:b=!0,className:x=``,...S}=c;t(`AppRepeater`,S);let C=typeof y==`number`&&l.length>=y,w=!!p&&l.length>v;return a(`div`,{className:`repeater${x?` ${x}`:``}`,...s,...S,children:[l.length===0&&_&&i(`div`,{className:`repeater-empty`,children:_}),l.map((e,t)=>{let r=d?d(e,t):null;return a(`div`,{className:`repeater-row`,children:[(!!r||w)&&i(`span`,{className:`repeater-row-label`,children:r}),b&&i(`span`,{className:`repeater-index`,children:t+1}),i(`div`,{className:`repeater-body`,children:u(e,t)}),w&&i(n,{icon:`trash-2`,label:`${g} ${t+1}`,danger:!0,className:`repeater-remove`,onClick:()=>p(t)})]},e.id??t)}),i(r,{variant:h,size:`sm`,leftIcon:`plus`,className:`repeater-add`,disabled:C,onClick:f,children:m})]})}export{o as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppActionIcon.js";import n from"./AppButton.js";import r from"./AppLink.js";import i from"./warnUnknownProps.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(s){let{marker:c,props:l}=e(`AppRepeater`,s),{rows:u=[],renderRow:d,rowLabel:f,onAdd:p,onRemove:m,addLabel:h=`Add another`,addVariant:g=`secondary`,removeLabel:_=`Remove row`,emptyText:v,min:y=0,max:b,numbered:x=!0,className:S=``,...C}=l;i(`AppRepeater`,C);let w=typeof b==`number`&&u.length>=b,T=!!m&&u.length>y;return/* @__PURE__ */ o(`div`,{className:`repeater${S?` ${S}`:``}`,...c,...C,children:[u.length===0&&v&&/* @__PURE__ */ a(`div`,{className:`repeater-empty`,children:v}),u.map((e,n)=>{let r=f?f(e,n):null;return/* @__PURE__ */ o(`div`,{className:`repeater-row`,children:[(!!r||T)&&/* @__PURE__ */ a(`span`,{className:`repeater-row-label`,children:r}),x&&/* @__PURE__ */ a(`span`,{className:`repeater-index`,children:n+1}),/* @__PURE__ */ a(`div`,{className:`repeater-body`,children:d(e,n)}),T&&/* @__PURE__ */ a(t,{icon:`trash-2`,label:`${_} ${n+1}`,danger:!0,className:`repeater-remove`,onClick:()=>m(n)})]},e.id??n)}),g===`link`?/* @__PURE__ */ a(r,{animation:`static`,size:`sm`,linkComponent:`button`,type:`button`,leftIcon:`plus`,className:`repeater-add`,disabled:w,onClick:p,children:h}):/* @__PURE__ */ a(n,{variant:g,size:`sm`,leftIcon:`plus`,className:`repeater-add`,disabled:w,onClick:p,children:h})]})}export{s as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{jsx as t}from"react/jsx-runtime";function n(n){return t(`span`,{...e(`AppRequiredMark`,n),className:`required`,"aria-hidden":`true`,children:`*`})}export{n as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{jsx as t}from"react/jsx-runtime";function n(n){return/* @__PURE__ */ t(`span`,{...e(`AppRequiredMark`,n),className:`required`,"aria-hidden":`true`,children:`*`})}export{n as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{createContext as r,useEffect as i,useRef as a}from"react";import{jsx as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/resizable";var s=[`horizontal`,`vertical`],c=r(`horizontal`);function l(r){let{marker:l,props:u}=e(`AppResizable`,r),{direction:d=`horizontal`,storageKey:f,onChange:p,children:m,className:h=``,...g}=u;n(`AppResizable`,g),t(`AppResizable`,`direction`,d,s);let _=a(null),v=d===`vertical`;return i(()=>{let e=_.current;if(!e||!p)return;let t=t=>{t.target===e&&p(t.detail.sizes)};return e.addEventListener(`wui-resizable:change`,t),()=>e.removeEventListener(`wui-resizable:change`,t)},[p]),o(c.Provider,{value:v?`vertical`:`horizontal`,children:o(`wui-resizable`,{ref:_,class:[`wui-resizable`,h].filter(Boolean).join(` `),direction:v?`vertical`:`horizontal`,"storage-key":f||void 0,...l,...g,children:m})})}export{c as ResizableDirection,l as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{createContext as r,useEffect as i,useRef as a}from"react";import{jsx as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/resizable";var s=[`horizontal`,`vertical`],c=r(`horizontal`);function l(r){let{marker:l,props:u}=e(`AppResizable`,r),{direction:d=`horizontal`,storageKey:f,onChange:p,children:m,className:h=``,...g}=u;n(`AppResizable`,g),t(`AppResizable`,`direction`,d,s);let _=a(null),v=d===`vertical`;return i(()=>{let e=_.current;if(!e||!p)return;let t=t=>{t.target===e&&p(t.detail.sizes)};return e.addEventListener(`wui-resizable:change`,t),()=>e.removeEventListener(`wui-resizable:change`,t)},[p]),/* @__PURE__ */ o(c.Provider,{value:v?`vertical`:`horizontal`,children:/* @__PURE__ */ o(`wui-resizable`,{ref:_,class:[`wui-resizable`,h].filter(Boolean).join(` `),direction:v?`vertical`:`horizontal`,"storage-key":f||void 0,...l,...g,children:m})})}export{c as ResizableDirection,l as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{ResizableDirection as n}from"./AppResizable.js";import{useContext as r}from"react";import{jsx as i}from"react/jsx-runtime";function a(a){let{marker:o,props:s}=e(`AppResizableHandle`,a),{label:c=`Resize panels`,className:l=``,...u}=s;t(`AppResizableHandle`,u);let d=r(n);return i(`div`,{className:[`wui-resizable-handle`,l].filter(Boolean).join(` `),role:`separator`,tabIndex:0,"aria-orientation":d===`vertical`?`horizontal`:`vertical`,"aria-label":c,...o,...u})}export{a as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{ResizableDirection as t}from"./AppResizable.js";import n from"./warnUnknownProps.js";import{useContext as r}from"react";import{jsx as i}from"react/jsx-runtime";function a(a){let{marker:o,props:s}=e(`AppResizableHandle`,a),{label:c=`Resize panels`,className:l=``,...u}=s;n(`AppResizableHandle`,u);let d=r(t);return/* @__PURE__ */ i(`div`,{className:[`wui-resizable-handle`,l].filter(Boolean).join(` `),role:`separator`,tabIndex:0,"aria-orientation":d===`vertical`?`horizontal`:`vertical`,"aria-label":c,...o,...u})}export{a as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{marker:i,props:a}=e(`AppResizablePanel`,r),{defaultSize:o,minSize:s,maxSize:c,children:l,className:u=``,style:d,...f}=a;return t(`AppResizablePanel`,f),n(`div`,{className:[`wui-resizable-panel`,u].filter(Boolean).join(` `),"data-default-size":o,"data-min-size":s,"data-max-size":c,style:o?{flex:`${o} 1 0px`,...d}:d,...i,...f,children:l})}export{r as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{marker:i,props:a}=e(`AppResizablePanel`,r),{defaultSize:o,minSize:s,maxSize:c,children:l,className:u=``,style:d,...f}=a;return t(`AppResizablePanel`,f),/* @__PURE__ */ n(`div`,{className:[`wui-resizable-panel`,u].filter(Boolean).join(` `),"data-default-size":o,"data-min-size":s,"data-max-size":c,style:o?{flex:`${o} 1 0px`,...d}:d,...i,...f,children:l})}export{r as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";function o(o){let{marker:s,props:c}=e(`AppResourceCard`,o),{icon:l,title:u,text:d,href:f,external:p=!1,linkComponent:m,className:h=``,...g}=c;t(`AppResourceCard`,g);let _=a(r,{children:[i(`span`,{className:`res-card-icon`,children:i(n,{name:l,size:18})}),a(`span`,{className:`res-card-body`,children:[i(`span`,{className:`res-card-title`,children:u}),d&&i(`span`,{className:`res-card-text`,children:d})]})]}),v=`res-card${h?` ${h}`:``}`;return m&&!p?i(m,{className:v,to:f,...s,...g,children:_}):i(`a`,{className:v,href:f,target:p?`_blank`:void 0,rel:p?`noopener noreferrer`:void 0,...s,...g,children:_})}export{o as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./warnUnknownProps.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";function o(o){let{marker:s,props:c}=e(`AppResourceCard`,o),{icon:l,title:u,text:d,href:f,external:p=!1,linkComponent:m,className:h=``,...g}=c;n(`AppResourceCard`,g);let _=/* @__PURE__ */ a(r,{children:[/* @__PURE__ */ i(`span`,{className:`res-card-icon`,children:/* @__PURE__ */ i(t,{name:l,size:18})}),/* @__PURE__ */ a(`span`,{className:`res-card-body`,children:[/* @__PURE__ */ i(`span`,{className:`res-card-title`,children:u}),d&&/* @__PURE__ */ i(`span`,{className:`res-card-text`,children:d})]})]}),v=`res-card${h?` ${h}`:``}`;return m&&!p?/* @__PURE__ */ i(m,{className:v,to:f,...s,...g,children:_}):/* @__PURE__ */ i(`a`,{className:v,href:f,target:p?`_blank`:void 0,rel:p?`noopener noreferrer`:void 0,...s,...g,children:_})}export{o as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./renderIconProp.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o={success:{icon:`check-circle`,tone:`success`},error:{icon:`x-circle`,tone:`danger`},warning:{icon:`alert-triangle`,tone:`warning`},info:{icon:`info`,tone:`info`},403:{tone:`muted`},404:{tone:`muted`},500:{tone:`muted`}};function s(s){let{marker:c,props:l}=e(`AppResult`,s),{status:u=`info`,title:d,subtitle:f,icon:p,actions:m,children:h,headingLevel:g=2,className:_=``,...v}=l;n(`AppResult`,v),t(`AppResult`,`status`,u,Object.keys(o)),t(`AppResult`,`headingLevel`,g,[1,2,3]);let y=[1,2,3].includes(g)?`h${g}`:`h2`,b=o[u]||o.info,x=b.tone,S=/^\d+$/.test(u),C=p??(S?null:b.icon);return a(`div`,{className:[`result`,`result-${x}`,_].filter(Boolean).join(` `),...c,...v,children:[S?i(`div`,{className:`result-code`,"aria-hidden":`true`,children:u}):C?i(`div`,{className:`result-icon`,children:r(C,{size:48})}):null,d!=null&&i(y,{className:`result-title`,children:d}),f!=null&&i(`div`,{className:`result-subtitle`,children:f}),m&&i(`div`,{className:`result-actions`,children:m}),h&&i(`div`,{className:`result-extra`,children:h})]})}export{s as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./renderIconProp.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o={success:{icon:`check-circle`,tone:`success`},error:{icon:`x-circle`,tone:`danger`},warning:{icon:`alert-triangle`,tone:`warning`},info:{icon:`info`,tone:`info`},403:{tone:`muted`},404:{tone:`muted`},500:{tone:`muted`}};function s(s){let{marker:c,props:l}=e(`AppResult`,s),{status:u=`info`,title:d,subtitle:f,icon:p,actions:m,children:h,headingLevel:g=2,className:_=``,...v}=l;r(`AppResult`,v),n(`AppResult`,`status`,u,Object.keys(o)),n(`AppResult`,`headingLevel`,g,[1,2,3]);let y=[1,2,3].includes(g)?`h${g}`:`h2`,b=o[u]||o.info,x=b.tone,S=/^\d+$/.test(u),C=p??(S?null:b.icon),w=[`result`,`result-${x}`,_].filter(Boolean).join(` `);return/* @__PURE__ */ a(`div`,{className:w,...c,...v,children:[S?/* @__PURE__ */ i(`div`,{className:`result-code`,"aria-hidden":`true`,children:u}):C?/* @__PURE__ */ i(`div`,{className:`result-icon`,children:t(C,{size:48})}):null,d!=null&&/* @__PURE__ */ i(y,{className:`result-title`,children:d}),f!=null&&/* @__PURE__ */ i(`div`,{className:`result-subtitle`,children:f}),m&&/* @__PURE__ */ i(`div`,{className:`result-actions`,children:m}),h&&/* @__PURE__ */ i(`div`,{className:`result-extra`,children:h})]})}export{s as default};
@@ -1 +1 @@
1
- import{splitMarkerProps 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"../lib/FieldMessage.js";import a from"./AppInfoTip.js";import o from"./AppRequiredMark.js";import s from"./useWuiControl.js";import{forwardRef as c,useEffect as l,useId as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`html`,`markdown`],h=[`input`,`change`],g=`The editor couldn't load. Reload the page and try again.`,_=c(function(c,_){let{marker:v,props:y}=e(`AppRichText`,c),{value:b,onChange:x,format:S,placeholder:C,name:w,label:T,error:E,hint:D,required:O=!1,disabled:k=!1,readOnly:A=!1,id:j,ariaLabel:M,className:N=``,fieldClassName:P=``,help:F,helpLabel:I=`More information`,...L}=y;r(`AppRichText`,L),n(`AppRichText`,`format`,S,m);let R=u(),z=j||R,[B,V]=d(!1),{setRef:H}=s({ref:_,value:b,onChange:x,events:h});return l(()=>{let e=!0;return import(`@webority/ui-elements/rich-text`).catch(n=>{t(`[AppRichText] the editor failed to load:`,n?.message),e&&V(!0)}),()=>{e=!1}},[]),p(`div`,{...v,className:`field${P?` ${P}`:``}`,children:[T&&p(`label`,{className:`label`,htmlFor:z,children:[T,O&&f(o,{}),F&&f(a,{label:I,children:F})]}),B?f(`div`,{className:`field-error`,role:`status`,children:g}):f(`wui-rich-text`,{ref:H,id:z,role:`group`,name:w,format:S||void 0,placeholder:C,"aria-label":M||(typeof T==`string`?T:void 0),"aria-describedby":E?`${z}-error`:D?`${z}-hint`:void 0,"aria-invalid":E?`true`:void 0,required:O?``:void 0,disabled:k?``:void 0,readonly:A?``:void 0,className:N||void 0,...L},S||`html`),f(i,{error:E,hint:D,errorId:`${z}-error`,hintId:`${z}-hint`})]})});export{_ as default};
1
+ import{devWarn as e}from"../lib/devWarn.js";import t from"../lib/FieldMessage.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import a from"./useWuiControl.js";import o from"./warnInvalidValue.js";import s from"./warnUnknownProps.js";import{forwardRef as c,useEffect as l,useId as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`html`,`markdown`],h=[`input`,`change`],g=`The editor couldn't load. Reload the page and try again.`,_=c(function(c,_){let{marker:v,props:y}=n(`AppRichText`,c),{value:b,onChange:x,format:S,placeholder:C,name:w,label:T,error:E,hint:D,required:O=!1,disabled:k=!1,readOnly:A=!1,id:j,ariaLabel:M,className:N=``,fieldClassName:P=``,help:F,helpLabel:I=`More information`,...L}=y;s(`AppRichText`,L),o(`AppRichText`,`format`,S,m);let R=u(),z=j||R,[B,V]=d(!1),{setRef:H}=a({ref:_,value:b,onChange:x,events:h});return l(()=>{let t=!0;return import(`@webority/ui-elements/rich-text`).catch(n=>{e(`[AppRichText] the editor failed to load:`,n?.message),t&&V(!0)}),()=>{t=!1}},[]),/* @__PURE__ */ p(`div`,{...v,className:`field${P?` ${P}`:``}`,children:[T&&/* @__PURE__ */ p(`label`,{className:`label`,htmlFor:z,children:[T,O&&/* @__PURE__ */ f(i,{}),F&&/* @__PURE__ */ f(r,{label:I,children:F})]}),B?/* @__PURE__ */ f(`div`,{className:`field-error`,role:`status`,children:g}):/* @__PURE__ */ f(`wui-rich-text`,{ref:H,id:z,role:`group`,name:w,format:S||void 0,placeholder:C,"aria-label":M||(typeof T==`string`?T:void 0),"aria-describedby":E?`${z}-error`:D?`${z}-hint`:void 0,"aria-invalid":E?`true`:void 0,required:O?``:void 0,disabled:k?``:void 0,readonly:A?``:void 0,className:N||void 0,...L},S||`html`),/* @__PURE__ */ f(t,{error:E,hint:D,errorId:`${z}-error`,hintId:`${z}-hint`})]})});export{_ as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{MONEY_UNITS as r,formatValue as i}from"@webority/ui-elements/helpers";import{jsx as a,jsxs as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/rolling-number";var s=[`number`,`currency`,`percent`];function c(c){let{marker:l,props:u}=e(`AppRollingNumber`,c),{value:d,format:f=`number`,unit:p,decimals:m,duration:h,className:g=``,..._}=u;n(`AppRollingNumber`,_),t(`AppRollingNumber`,`format`,f,s),t(`AppRollingNumber`,`unit`,p,r);let v=typeof d==`string`&&d.trim()!==``?Number(d):d,y=typeof v==`number`&&Number.isFinite(v),b=i(y?v:null,{style:f,unit:p,decimals:m});return o(`wui-rolling-number`,{class:[`wui-rolling-number`,g].filter(Boolean).join(` `),value:y?String(v):void 0,format:f,unit:p,decimals:m===void 0?void 0:String(m),duration:h===void 0?void 0:String(h),...l,..._,children:[a(`span`,{className:`wui-rolling-number-text`,children:b}),a(`span`,{className:`wui-rolling-number-roll`,"aria-hidden":`true`})]})}export{c as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{MONEY_UNITS as r,formatValue as i}from"@webority/ui-elements/helpers";import{jsx as a,jsxs as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/rolling-number";var s=[`number`,`currency`,`percent`];function c(c){let{marker:l,props:u}=e(`AppRollingNumber`,c),{value:d,format:f=`number`,unit:p,decimals:m,duration:h,className:g=``,..._}=u;n(`AppRollingNumber`,_),t(`AppRollingNumber`,`format`,f,s),t(`AppRollingNumber`,`unit`,p,r);let v=typeof d==`string`&&d.trim()!==``?Number(d):d,y=typeof v==`number`&&Number.isFinite(v),b=i(y?v:null,{style:f,unit:p,decimals:m});return/* @__PURE__ */ o(`wui-rolling-number`,{class:[`wui-rolling-number`,g].filter(Boolean).join(` `),value:y?String(v):void 0,format:f,unit:p,decimals:m===void 0?void 0:String(m),duration:h===void 0?void 0:String(h),...l,..._,children:[/* @__PURE__ */ a(`span`,{className:`wui-rolling-number-text`,children:b}),/* @__PURE__ */ a(`span`,{className:`wui-rolling-number-roll`,"aria-hidden":`true`})]})}export{c as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppButton.js";import i from"./AppResult.js";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`error`,`stale-build`,`not-found`],l=()=>window.location.reload();function u(u){let{marker:d,props:f}=e(`AppRouteError`,u),{kind:p=`error`,homeHref:m=`/`,onRetry:h=l,brand:g,fullPage:_=!0,children:v,className:y=``,...b}=f;n(`AppRouteError`,b),t(`AppRouteError`,`kind`,p,c);let x=e=>o(r,{variant:e,leftIcon:`home`,href:m,children:`Go to the home page`}),S;return S=p===`stale-build`?o(i,{status:`info`,icon:`refresh-cw`,title:`A new version is ready`,subtitle:`This app was updated while you had it open. Reload to get the new version.`,actions:o(r,{variant:`primary`,leftIcon:`refresh-cw`,onClick:h,children:`Reload`}),children:v}):p===`not-found`?o(i,{status:`404`,title:`We could not find that page`,subtitle:`Check the address, or go to the home page.`,actions:x(`primary`),children:v}):o(i,{status:`500`,title:`This page did not load`,subtitle:`Something went wrong on our side. Try again in a moment.`,actions:s(a,{children:[o(r,{variant:`primary`,leftIcon:`refresh-cw`,onClick:h,children:`Try again`}),x(`outline`)]}),children:v}),s(`div`,{className:[_?`d-flex flex-column align-items-center justify-content-center min-vh-100 px-3`:`d-flex flex-column align-items-center py-5 px-3`,y].filter(Boolean).join(` `),...d,...b,children:[g&&o(`div`,{className:`mb-4`,children:g}),o(`div`,{className:`col-12 col-md-8 col-lg-6`,children:S})]})}export{u as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppButton.js";import n from"./AppResult.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.js";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`error`,`stale-build`,`not-found`],l=()=>window.location.reload();function u(u){let{marker:d,props:f}=e(`AppRouteError`,u),{kind:p=`error`,homeHref:m=`/`,onRetry:h=l,brand:g,fullPage:_=!0,children:v,className:y=``,...b}=f;i(`AppRouteError`,b),r(`AppRouteError`,`kind`,p,c);let x=e=>/* @__PURE__ */ o(t,{variant:e,leftIcon:`home`,href:m,children:`Go to the home page`}),S;return S=p===`stale-build`?/* @__PURE__ */ o(n,{status:`info`,icon:`refresh-cw`,title:`A new version is ready`,subtitle:`This app was updated while you had it open. Reload to get the new version.`,actions:/* @__PURE__ */ o(t,{variant:`primary`,leftIcon:`refresh-cw`,onClick:h,children:`Reload`}),children:v}):p===`not-found`?/* @__PURE__ */ o(n,{status:`404`,title:`We could not find that page`,subtitle:`Check the address, or go to the home page.`,actions:x(`primary`),children:v}):/* @__PURE__ */ o(n,{status:`500`,title:`This page did not load`,subtitle:`Something went wrong on our side. Try again in a moment.`,actions:/* @__PURE__ */ s(a,{children:[/* @__PURE__ */ o(t,{variant:`primary`,leftIcon:`refresh-cw`,onClick:h,children:`Try again`}),x(`outline`)]}),children:v}),/* @__PURE__ */ s(`div`,{className:[_?`d-flex flex-column align-items-center justify-content-center min-vh-100 px-3`:`d-flex flex-column align-items-center py-5 px-3`,y].filter(Boolean).join(` `),...d,...b,children:[g&&/* @__PURE__ */ o(`div`,{className:`mb-4`,children:g}),/* @__PURE__ */ o(`div`,{className:`col-12 col-md-8 col-lg-6`,children:S})]})}export{u as default};
@@ -0,0 +1 @@
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{useState as t}from"react";import{jsx as n}from"react/jsx-runtime";function r(r){let{marker:i,props:a}=e(`AppRowSwitch`,r),{checked:o,label:s,disabled:c=!1,onToggle:l}=a,[u,d]=t(!1),f=async()=>{d(!0);try{await l(!o)}finally{d(!1)}};return/* @__PURE__ */ n(`button`,{type:`button`,role:`switch`,"aria-checked":o?`true`:`false`,"aria-label":s,"aria-busy":u?`true`:void 0,...i,className:`wui-row-switch`,disabled:c||u,onClick:f,children:/* @__PURE__ */ n(`span`,{className:`wui-row-switch__track`,children:/* @__PURE__ */ n(`span`,{className:`wui-row-switch__thumb`})})})}export{r as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"../lib/FieldMessage.js";import{useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{value:o=null,onChange:s,min:c=0,max:l=10,label:u,lowLabel:d,highLabel:f,name:p,disabled:m=!1,error:h,hint:g,id:_,className:v=``,fieldClassName:y=``}=a,b=n(),x=_||b,S=p||x,C=`${x}-error`,w=`${x}-hint`,T=Array.from({length:Math.max(0,l-c+1)},(e,t)=>c+t),E=d!=null||f!=null;return i(`div`,{...e(`AppScoreScale`,a),className:`field${y?` ${y}`:``}`,children:[u!=null&&r(`span`,{className:`label`,id:`${x}-label`,children:u}),i(`div`,{className:`wui-score-scale${v?` ${v}`:``}`,id:x,role:`radiogroup`,"aria-labelledby":u==null?void 0:`${x}-label`,"aria-label":u==null?`Score`:void 0,"aria-invalid":h?`true`:void 0,"aria-describedby":h?C:g?w:void 0,children:[T.map(e=>i(`label`,{className:`wui-score-scale__item${o===e?` wui-score-scale__item--selected`:``}`,children:[r(`input`,{type:`radio`,className:`visually-hidden`,name:S,value:e,checked:o===e,disabled:m,onChange:()=>s?.(e)}),e]},e)),E&&i(`span`,{className:`wui-score-scale__ends`,children:[r(`span`,{children:d}),r(`span`,{children:f})]})]}),r(t,{error:h,hint:g,errorId:C,hintId:w})]})}export{a as default};
1
+ import e from"../lib/FieldMessage.js";import{wuiMarkerAttributes as t}from"../lib/wuiMarker.js";import{useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{value:o=null,onChange:s,min:c=0,max:l=10,label:u,lowLabel:d,highLabel:f,name:p,disabled:m=!1,error:h,hint:g,id:_,className:v=``,fieldClassName:y=``}=a,b=n(),x=_||b,S=p||x,C=`${x}-error`,w=`${x}-hint`,T=Array.from({length:Math.max(0,l-c+1)},(e,t)=>c+t),E=d!=null||f!=null;return/* @__PURE__ */ i(`div`,{...t(`AppScoreScale`,a),className:`field${y?` ${y}`:``}`,children:[u!=null&&/* @__PURE__ */ r(`span`,{className:`label`,id:`${x}-label`,children:u}),/* @__PURE__ */ i(`div`,{className:`wui-score-scale${v?` ${v}`:``}`,id:x,role:`radiogroup`,"aria-labelledby":u==null?void 0:`${x}-label`,"aria-label":u==null?`Score`:void 0,"aria-invalid":h?`true`:void 0,"aria-describedby":h?C:g?w:void 0,children:[T.map(e=>/* @__PURE__ */ i(`label`,{className:`wui-score-scale__item${o===e?` wui-score-scale__item--selected`:``}`,children:[/* @__PURE__ */ r(`input`,{type:`radio`,className:`visually-hidden`,name:S,value:e,checked:o===e,disabled:m,onChange:()=>s?.(e)}),e]},e)),E&&/* @__PURE__ */ i(`span`,{className:`wui-score-scale__ends`,children:[/* @__PURE__ */ r(`span`,{children:d}),/* @__PURE__ */ r(`span`,{children:f})]})]}),/* @__PURE__ */ r(e,{error:h,hint:g,errorId:C,hintId:w})]})}export{a as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{marker:i,props:a}=e(`AppScrollbar`,r),{children:o,className:s=``,maxHeight:c,style:l,...u}=a;return t(`AppScrollbar`,u),n(`div`,{className:s?`wui-scroll ${s}`:`wui-scroll`,style:c==null?l:{maxHeight:c,...l},...i,...u,children:o})}export{r as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{marker:i,props:a}=e(`AppScrollbar`,r),{children:o,className:s=``,maxHeight:c,style:l,...u}=a;t(`AppScrollbar`,u);let d=s?`wui-scroll ${s}`:`wui-scroll`;return/* @__PURE__ */ n(`div`,{className:d,style:c==null?l:{maxHeight:c,...l},...i,...u,children:o})}export{r as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{isTypingTarget as i}from"@webority/ui-elements/helpers";import{useCallback as a,useEffect as o,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";import{flushSync as f}from"react-dom";var p=[`sm`,`lg`];function m(m){let{marker:h,props:g}=e(`AppSearch`,m),{value:_,onChange:v,placeholder:y=`Search…`,ariaLabel:b,iconSize:x,size:S,loading:C=!1,collapsible:w=!1,disabled:T=!1,className:E=``,form:D,onKeyDown:O,...k}=g;n(`AppSearch`,k),t(`AppSearch`,`size`,S,p);let A=x??18,[j,M]=c(!!_),N=s(null),P=s(null),F=!w||j||!!_,I=a(()=>{M(!0),requestAnimationFrame(()=>N.current?.focus())},[]),L=()=>{f(()=>v?.(``)),N.current?.form?.requestSubmit()};o(()=>{if(!w)return;let e=e=>{e.key!==`/`||e.ctrlKey||e.altKey||e.metaKey||i(e.target)||[...document.querySelectorAll(`.search-wrap.wui-search-collapsible`)].find(e=>e.offsetParent!==null)===P.current&&(e.preventDefault(),I())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[w,I]);let R=[`search-wrap`,_?`has-value`:``,S===`sm`?`search-sm`:S===`lg`?`search-lg`:``,C?`is-loading`:``,w?`wui-search-collapsible`:``,w&&!F?`is-collapsed`:``,E].filter(Boolean).join(` `);return d(`div`,{...h,className:R,style:x==null?void 0:{"--wui-search-icon-size":`${x}px`},ref:P,onBlur:e=>{w&&!e.currentTarget.contains(e.relatedTarget)&&!_&&M(!1)},children:[w&&u(`button`,{type:`button`,className:`wui-search-toggle`,"aria-label":b||y,"aria-expanded":F?`true`:`false`,onClick:I,children:u(r,{name:`search`,size:A})}),C&&u(`span`,{className:`search-spinner`,"aria-hidden":`true`}),u(r,{name:`search`,size:A,className:`search-icon`}),u(l.Control,{ref:N,type:`search`,className:`input search-input`,placeholder:y,value:_,onChange:e=>v?.(e.target.value),onKeyDown:e=>{O?.(e),w&&e.key===`Escape`&&!_&&M(!1)},"aria-label":b,form:D,disabled:T,...k}),!T&&u(`button`,{type:`button`,className:`search-clear`,"aria-label":`Clear search`,onClick:L,hidden:!_,children:u(r,{name:`x`,size:16})})]})}export{m as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{isTypingTarget as i}from"@webority/ui-elements/helpers";import{useCallback as a,useEffect as o,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";import{flushSync as f}from"react-dom";var p=[`sm`,`lg`];function m(m){let{marker:h,props:g}=e(`AppSearch`,m),{value:_,onChange:v,placeholder:y=`Search…`,ariaLabel:b,iconSize:x,size:S,loading:C=!1,collapsible:w=!1,disabled:T=!1,className:E=``,form:D,onKeyDown:O,...k}=g;r(`AppSearch`,k),n(`AppSearch`,`size`,S,p);let A=x??18,[j,M]=c(!!_),N=s(null),P=s(null),F=!w||j||!!_,I=a(()=>{M(!0),requestAnimationFrame(()=>N.current?.focus())},[]),L=()=>{f(()=>v?.(``)),N.current?.form?.requestSubmit()};o(()=>{if(!w)return;let e=e=>{e.key!==`/`||e.ctrlKey||e.altKey||e.metaKey||i(e.target)||[...document.querySelectorAll(`.search-wrap.wui-search-collapsible`)].find(e=>e.offsetParent!==null)===P.current&&(e.preventDefault(),I())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[w,I]);let R=[`search-wrap`,_?`has-value`:``,S===`sm`?`search-sm`:S===`lg`?`search-lg`:``,C?`is-loading`:``,w?`wui-search-collapsible`:``,w&&!F?`is-collapsed`:``,E].filter(Boolean).join(` `);return/* @__PURE__ */ d(`div`,{...h,className:R,style:x==null?void 0:{"--wui-search-icon-size":`${x}px`},ref:P,onBlur:e=>{w&&!e.currentTarget.contains(e.relatedTarget)&&!_&&M(!1)},children:[w&&/* @__PURE__ */ u(`button`,{type:`button`,className:`wui-search-toggle`,"aria-label":b||y,"aria-expanded":F?`true`:`false`,onClick:I,children:/* @__PURE__ */ u(t,{name:`search`,size:A})}),C&&/* @__PURE__ */ u(`span`,{className:`search-spinner`,"aria-hidden":`true`}),/* @__PURE__ */ u(t,{name:`search`,size:A,className:`search-icon`}),/* @__PURE__ */ u(l.Control,{ref:N,type:`search`,className:`input search-input`,placeholder:y,value:_,onChange:e=>v?.(e.target.value),onKeyDown:e=>{O?.(e),w&&e.key===`Escape`&&!_&&M(!1)},"aria-label":b,form:D,disabled:T,...k}),!T&&/* @__PURE__ */ u(`button`,{type:`button`,className:`search-clear`,"aria-label":`Clear search`,onClick:L,hidden:!_,children:/* @__PURE__ */ u(t,{name:`x`,size:16})})]})}export{m as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r,{SECTION_ALIGNS as i,SECTION_HEADINGS as a,SECTION_VARIANTS as o,sectionHeading as s}from"../lib/sectionShell.js";import{jsx as c}from"react/jsx-runtime";function l(l){let{marker:u,props:d}=e(`AppSectionCallToAction`,l),{title:f,actions:p,as:m=`h2`,eyebrow:h,subtitle:g,align:_=`center`,variant:v=`default`,className:y=``,...b}=d;return n(`AppSectionCallToAction`,b),t(`AppSectionCallToAction`,`as`,m,a),t(`AppSectionCallToAction`,`align`,_,i),t(`AppSectionCallToAction`,`variant`,v,o),c(r,{component:`AppSectionCallToAction`,kind:`call-to-action`,title:f,as:s(m,`h2`),eyebrow:h,subtitle:g,align:_,variant:v,actions:p,className:y,rest:{...u,...b}})}export{l as default};
1
+ import e,{SECTION_ALIGNS as t,SECTION_HEADINGS as n,SECTION_VARIANTS as r,sectionHeading as i}from"../lib/sectionShell.js";import{splitMarkerProps as a}from"../lib/wuiMarker.js";import o from"./warnInvalidValue.js";import s from"./warnUnknownProps.js";import{jsx as c}from"react/jsx-runtime";function l(l){let{marker:u,props:d}=a(`AppSectionCallToAction`,l),{title:f,actions:p,as:m=`h2`,eyebrow:h,subtitle:g,align:_=`center`,variant:v=`default`,className:y=``,...b}=d;return s(`AppSectionCallToAction`,b),o(`AppSectionCallToAction`,`as`,m,n),o(`AppSectionCallToAction`,`align`,_,t),o(`AppSectionCallToAction`,`variant`,v,r),/* @__PURE__ */ c(e,{component:`AppSectionCallToAction`,kind:`call-to-action`,title:f,as:i(m,`h2`),eyebrow:h,subtitle:g,align:_,variant:v,actions:p,className:y,rest:{...u,...b}})}export{l as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppAccordion.js";import i,{SECTION_ALIGNS as a,SECTION_HEADINGS as o,SECTION_VARIANTS as s,sectionHeading as c}from"../lib/sectionShell.js";import{Children as l,cloneElement as u,isValidElement as d}from"react";import{jsx as f}from"react/jsx-runtime";function p(e,t){return Array.isArray(t)?l.map(e,e=>!d(e)||e.type!==r?e:u(e,{openItems:t.map(t=>e.props.items?.[t]?.key??String(t))})):e}function m(r){let{marker:l,props:u}=e(`AppSectionFaq`,r),{title:d,as:m=`h2`,eyebrow:h,subtitle:g,align:_=`center`,variant:v=`default`,children:y,openItems:b,className:x=``,...S}=u;return n(`AppSectionFaq`,S),t(`AppSectionFaq`,`as`,m,o),t(`AppSectionFaq`,`align`,_,a),t(`AppSectionFaq`,`variant`,v,s),f(i,{component:`AppSectionFaq`,kind:`faq`,title:d,as:c(m,`h2`),eyebrow:h,subtitle:g,align:_,variant:v,className:x,rest:{...l,...S},children:y!=null&&y!==!1&&f(`div`,{className:`wui-section-faq-body`,children:p(y,b)})})}export{m as default};
1
+ import e,{SECTION_ALIGNS as t,SECTION_HEADINGS as n,SECTION_VARIANTS as r,sectionHeading as i}from"../lib/sectionShell.js";import{splitMarkerProps as a}from"../lib/wuiMarker.js";import o from"./AppAccordion.js";import s from"./warnInvalidValue.js";import c from"./warnUnknownProps.js";import{Children as l,cloneElement as u,isValidElement as d}from"react";import{jsx as f}from"react/jsx-runtime";function p(e,t){return Array.isArray(t)?l.map(e,e=>{if(!d(e)||e.type!==o)return e;let n=t.map(t=>e.props.items?.[t]?.key??String(t));return u(e,{openItems:n})}):e}function m(o){let{marker:l,props:u}=a(`AppSectionFaq`,o),{title:d,as:m=`h2`,eyebrow:h,subtitle:g,align:_=`center`,variant:v=`default`,children:y,openItems:b,className:x=``,...S}=u;return c(`AppSectionFaq`,S),s(`AppSectionFaq`,`as`,m,n),s(`AppSectionFaq`,`align`,_,t),s(`AppSectionFaq`,`variant`,v,r),/* @__PURE__ */ f(e,{component:`AppSectionFaq`,kind:`faq`,title:d,as:i(m,`h2`),eyebrow:h,subtitle:g,align:_,variant:v,className:x,rest:{...l,...S},children:y!=null&&y!==!1&&/* @__PURE__ */ f(`div`,{className:`wui-section-faq-body`,children:p(y,b)})})}export{m as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i,{SECTION_ALIGNS as a,SECTION_HEADINGS as o,SECTION_TITLE_FONTS as s,SECTION_VARIANTS as c,itemHeading as l,sectionHeading as u}from"../lib/sectionShell.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`grid`,`rows`];function m(m){let{marker:h,props:g}=e(`AppSectionFeatures`,m),{title:_,items:v=[],layout:y=`grid`,as:b=`h2`,eyebrow:x,subtitle:S,align:C=`center`,variant:w=`default`,titleFont:T=`display`,inset:E,className:D=``,...O}=g;n(`AppSectionFeatures`,O),t(`AppSectionFeatures`,`layout`,y,p),t(`AppSectionFeatures`,`as`,b,o),t(`AppSectionFeatures`,`align`,C,a),t(`AppSectionFeatures`,`variant`,w,c),t(`AppSectionFeatures`,`titleFont`,T,s);let k=u(b,`h2`),A=l(k);return d(i,{component:`AppSectionFeatures`,kind:`features`,title:_,as:k,eyebrow:x,subtitle:S,align:C,variant:w,titleFont:T,inset:E,extraClass:y===`rows`?`wui-section-features-rows`:``,className:D,rest:{...h,...O},children:v.length>0&&d(`ul`,{className:`wui-section-features-list`,children:v.map(e=>f(`li`,{className:`wui-section-feature`,children:[e.media!=null&&d(`div`,{className:`wui-section-media`,children:e.media}),f(`div`,{className:`wui-section-feature-body`,children:[e.icon&&d(`span`,{className:`wui-section-feature-icon`,children:d(r,{name:e.icon,size:24})}),d(A,{className:`wui-section-feature-title`,children:e.title}),e.description!=null&&e.description!==``&&d(`div`,{className:`wui-section-feature-text`,children:e.description})]})]},e.key??e.title))})})}export{m as default};
1
+ import e,{SECTION_ALIGNS as t,SECTION_HEADINGS as n,SECTION_TITLE_FONTS as r,SECTION_VARIANTS as i,itemHeading as a,sectionHeading as o}from"../lib/sectionShell.js";import{splitMarkerProps as s}from"../lib/wuiMarker.js";import c from"./AppIcon.js";import l from"./warnInvalidValue.js";import u from"./warnUnknownProps.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`grid`,`rows`];function m(m){let{marker:h,props:g}=s(`AppSectionFeatures`,m),{title:_,items:v=[],layout:y=`grid`,as:b=`h2`,eyebrow:x,subtitle:S,align:C=`center`,variant:w=`default`,titleFont:T=`display`,inset:E,className:D=``,...O}=g;u(`AppSectionFeatures`,O),l(`AppSectionFeatures`,`layout`,y,p),l(`AppSectionFeatures`,`as`,b,n),l(`AppSectionFeatures`,`align`,C,t),l(`AppSectionFeatures`,`variant`,w,i),l(`AppSectionFeatures`,`titleFont`,T,r);let k=o(b,`h2`),A=a(k);return/* @__PURE__ */ d(e,{component:`AppSectionFeatures`,kind:`features`,title:_,as:k,eyebrow:x,subtitle:S,align:C,variant:w,titleFont:T,inset:E,extraClass:y===`rows`?`wui-section-features-rows`:``,className:D,rest:{...h,...O},children:v.length>0&&/* @__PURE__ */ d(`ul`,{className:`wui-section-features-list`,children:v.map(e=>/* @__PURE__ */ f(`li`,{className:`wui-section-feature`,children:[e.media!=null&&/* @__PURE__ */ d(`div`,{className:`wui-section-media`,children:e.media}),/* @__PURE__ */ f(`div`,{className:`wui-section-feature-body`,children:[e.icon&&/* @__PURE__ */ d(`span`,{className:`wui-section-feature-icon`,children:/* @__PURE__ */ d(c,{name:e.icon,size:24})}),/* @__PURE__ */ d(A,{className:`wui-section-feature-title`,children:e.title}),e.description!=null&&e.description!==``&&/* @__PURE__ */ d(`div`,{className:`wui-section-feature-text`,children:e.description})]})]},e.key??e.title))})})}export{m as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r,{SECTION_ALIGNS as i,SECTION_EYEBROW_TONES as a,SECTION_HEADINGS as o,SECTION_VARIANTS as s,sectionHeading as c}from"../lib/sectionShell.js";import{jsx as l}from"react/jsx-runtime";function u(u){let{marker:d,props:f}=e(`AppSectionHero`,u),{title:p,as:m=`h1`,eyebrow:h,subtitle:g,align:_=`start`,variant:v=`default`,eyebrowTone:y,actions:b,media:x,className:S=``,...C}=f;return n(`AppSectionHero`,C),t(`AppSectionHero`,`as`,m,o),t(`AppSectionHero`,`align`,_,i),t(`AppSectionHero`,`variant`,v,s),y!==void 0&&t(`AppSectionHero`,`eyebrowTone`,y,a),l(r,{component:`AppSectionHero`,kind:`hero`,title:p,as:c(m,`h1`),eyebrow:h,subtitle:g,align:_,variant:v,eyebrowTone:y,actions:b,className:S,rest:{...d,...C},children:x!=null&&x!==!1&&l(`div`,{className:`wui-section-media`,children:x})})}export{u as default};
1
+ import e,{SECTION_ALIGNS as t,SECTION_EYEBROW_TONES as n,SECTION_HEADINGS as r,SECTION_VARIANTS as i,sectionHeading as a}from"../lib/sectionShell.js";import{splitMarkerProps as o}from"../lib/wuiMarker.js";import s from"./warnInvalidValue.js";import c from"./warnUnknownProps.js";import{jsx as l}from"react/jsx-runtime";function u(u){let{marker:d,props:f}=o(`AppSectionHero`,u),{title:p,as:m=`h1`,eyebrow:h,subtitle:g,align:_=`start`,variant:v=`default`,eyebrowTone:y,actions:b,media:x,className:S=``,...C}=f;return c(`AppSectionHero`,C),s(`AppSectionHero`,`as`,m,r),s(`AppSectionHero`,`align`,_,t),s(`AppSectionHero`,`variant`,v,i),y!==void 0&&s(`AppSectionHero`,`eyebrowTone`,y,n),/* @__PURE__ */ l(e,{component:`AppSectionHero`,kind:`hero`,title:p,as:a(m,`h1`),eyebrow:h,subtitle:g,align:_,variant:v,eyebrowTone:y,actions:b,className:S,rest:{...d,...C},children:x!=null&&x!==!1&&/* @__PURE__ */ l(`div`,{className:`wui-section-media`,children:x})})}export{u as default};