@webority/ui-react 0.122.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 (191) hide show
  1. package/dist/canvas-kit/kit.js +31039 -32190
  2. package/dist/canvas-kit/manifest.json +115 -2
  3. package/dist/canvas-kit/release.json +6 -6
  4. package/dist/components/AppAccordion.js +1 -1
  5. package/dist/components/AppActionIcon.js +1 -1
  6. package/dist/components/AppAlert.js +1 -1
  7. package/dist/components/AppAsyncBlock.js +1 -1
  8. package/dist/components/AppAutocomplete.js +1 -1
  9. package/dist/components/AppAvatar.js +1 -1
  10. package/dist/components/AppAvatarGroup.js +1 -1
  11. package/dist/components/AppBadge.js +1 -1
  12. package/dist/components/AppBanner.js +1 -1
  13. package/dist/components/AppBreadcrumbs.js +1 -1
  14. package/dist/components/AppButton.js +1 -1
  15. package/dist/components/AppButtonGroup.js +1 -1
  16. package/dist/components/AppCalendar.js +1 -1
  17. package/dist/components/AppCard.js +1 -1
  18. package/dist/components/AppCarousel.js +1 -1
  19. package/dist/components/AppChart.js +1 -1
  20. package/dist/components/AppChartCard.js +1 -1
  21. package/dist/components/AppCheckbox.js +1 -1
  22. package/dist/components/AppChip.js +1 -1
  23. package/dist/components/AppChipGroup.js +1 -1
  24. package/dist/components/AppChoiceCard.js +1 -1
  25. package/dist/components/AppChoiceChip.js +1 -1
  26. package/dist/components/AppCodeBlock.js +1 -1
  27. package/dist/components/AppColorField.js +1 -1
  28. package/dist/components/AppColumnMenu.js +1 -1
  29. package/dist/components/AppCommandPalette.js +1 -1
  30. package/dist/components/AppCommentThread.js +1 -1
  31. package/dist/components/AppCompareTable.js +1 -1
  32. package/dist/components/AppConfirmDialog.js +1 -1
  33. package/dist/components/AppConfirmProvider.js +1 -1
  34. package/dist/components/AppConsentBanner.js +1 -1
  35. package/dist/components/AppContextMenu.js +1 -1
  36. package/dist/components/AppCopyButton.js +1 -1
  37. package/dist/components/AppCountryFlag.js +1 -1
  38. package/dist/components/AppCountrySelect.js +1 -1
  39. package/dist/components/AppDashboardCell.js +1 -1
  40. package/dist/components/AppDashboardGrid.js +1 -1
  41. package/dist/components/AppDataTable.js +1 -1
  42. package/dist/components/AppDatePicker.js +1 -1
  43. package/dist/components/AppDateRangePicker.js +1 -1
  44. package/dist/components/AppDescriptions.js +1 -1
  45. package/dist/components/AppDetailPane.js +1 -1
  46. package/dist/components/AppDrawer.js +1 -1
  47. package/dist/components/AppDropZone.js +1 -1
  48. package/dist/components/AppDropdown.js +1 -1
  49. package/dist/components/AppDueDate.js +1 -1
  50. package/dist/components/AppEmptyState.js +1 -1
  51. package/dist/components/AppErrorSummary.js +1 -1
  52. package/dist/components/AppFileAttachment.js +1 -1
  53. package/dist/components/AppFilePicker.js +1 -1
  54. package/dist/components/AppFileTiles.js +1 -1
  55. package/dist/components/AppFileViewer.js +1 -1
  56. package/dist/components/AppFilterBar.js +1 -1
  57. package/dist/components/AppFloatingDock.js +1 -1
  58. package/dist/components/AppFormActions.js +1 -1
  59. package/dist/components/AppFormRow.js +1 -1
  60. package/dist/components/AppFormSection.js +1 -1
  61. package/dist/components/AppHoverCard.js +1 -1
  62. package/dist/components/AppIcon.js +1 -1
  63. package/dist/components/AppImagePicker.js +1 -1
  64. package/dist/components/AppInfoTip.js +1 -1
  65. package/dist/components/AppInlineEdit.js +1 -1
  66. package/dist/components/AppInput.js +1 -1
  67. package/dist/components/AppInputGroup.js +1 -1
  68. package/dist/components/AppKanban.js +1 -1
  69. package/dist/components/AppKbd.js +1 -1
  70. package/dist/components/AppKpiTile.js +1 -1
  71. package/dist/components/AppLightbox.js +1 -1
  72. package/dist/components/AppLink.js +1 -1
  73. package/dist/components/AppMarkdown.js +1 -1
  74. package/dist/components/AppMentionInput.js +1 -1
  75. package/dist/components/AppMeter.js +1 -1
  76. package/dist/components/AppMetricStrip.js +1 -1
  77. package/dist/components/AppModal.js +1 -1
  78. package/dist/components/AppMultiSelect.js +1 -1
  79. package/dist/components/AppNavList.js +1 -1
  80. package/dist/components/AppNavigationMenu.js +1 -1
  81. package/dist/components/AppNotificationCenter.js +1 -1
  82. package/dist/components/AppNumberInput.js +1 -1
  83. package/dist/components/AppOnboardingChecklist.js +1 -1
  84. package/dist/components/AppOtpInput.js +1 -1
  85. package/dist/components/AppPageHeader.js +1 -1
  86. package/dist/components/AppPhoneNumberInput.js +1 -1
  87. package/dist/components/AppPopover.js +1 -1
  88. package/dist/components/AppPricingCard.js +1 -1
  89. package/dist/components/AppProgress.js +1 -1
  90. package/dist/components/AppQrCode.js +1 -1
  91. package/dist/components/AppRadio.js +1 -1
  92. package/dist/components/AppRadioGroup.js +1 -1
  93. package/dist/components/AppRating.js +1 -1
  94. package/dist/components/AppRecordPager.js +1 -1
  95. package/dist/components/AppRelativeTime.js +1 -1
  96. package/dist/components/AppRepeater.js +1 -1
  97. package/dist/components/AppRequiredMark.js +1 -1
  98. package/dist/components/AppResizable.js +1 -1
  99. package/dist/components/AppResizableHandle.js +1 -1
  100. package/dist/components/AppResizablePanel.js +1 -1
  101. package/dist/components/AppResourceCard.js +1 -1
  102. package/dist/components/AppResult.js +1 -1
  103. package/dist/components/AppRichText.js +1 -1
  104. package/dist/components/AppRollingNumber.js +1 -1
  105. package/dist/components/AppRouteError.js +1 -1
  106. package/dist/components/AppRowSwitch.js +1 -0
  107. package/dist/components/AppScoreScale.js +1 -1
  108. package/dist/components/AppScrollbar.js +1 -1
  109. package/dist/components/AppSearch.js +1 -1
  110. package/dist/components/AppSectionCallToAction.js +1 -1
  111. package/dist/components/AppSectionFaq.js +1 -1
  112. package/dist/components/AppSectionFeatures.js +1 -1
  113. package/dist/components/AppSectionHero.js +1 -1
  114. package/dist/components/AppSectionLeadCapture.js +1 -1
  115. package/dist/components/AppSectionLogos.js +1 -1
  116. package/dist/components/AppSectionPricing.js +1 -1
  117. package/dist/components/AppSectionTestimonials.js +1 -1
  118. package/dist/components/AppSegmented.js +1 -1
  119. package/dist/components/AppSelect.js +1 -1
  120. package/dist/components/AppSeoHead.js +1 -1
  121. package/dist/components/AppShell.js +1 -1
  122. package/dist/components/AppShortcutLegend.js +1 -1
  123. package/dist/components/AppShowMore.js +1 -1
  124. package/dist/components/AppSkeleton.js +1 -1
  125. package/dist/components/AppSkeletonLines.js +1 -1
  126. package/dist/components/AppSlider.js +1 -1
  127. package/dist/components/AppSortableList.js +1 -1
  128. package/dist/components/AppSparkline.js +1 -1
  129. package/dist/components/AppSpinner.js +1 -1
  130. package/dist/components/AppSplash.js +1 -1
  131. package/dist/components/AppSplitButton.js +1 -1
  132. package/dist/components/AppSplitView.js +1 -1
  133. package/dist/components/AppStatusBadge.js +1 -1
  134. package/dist/components/AppStepper.js +1 -1
  135. package/dist/components/AppSwitch.js +1 -1
  136. package/dist/components/AppTablePagination.js +1 -1
  137. package/dist/components/AppTableToolbar.js +1 -1
  138. package/dist/components/AppTabs.js +1 -1
  139. package/dist/components/AppTagInput.js +1 -1
  140. package/dist/components/AppTextarea.js +1 -1
  141. package/dist/components/AppThemeToggle.js +1 -1
  142. package/dist/components/AppTimePicker.js +1 -1
  143. package/dist/components/AppTimeline.js +1 -1
  144. package/dist/components/AppToast.js +1 -1
  145. package/dist/components/AppToolbar.js +1 -1
  146. package/dist/components/AppTooltip.js +1 -1
  147. package/dist/components/AppTour.js +1 -1
  148. package/dist/components/AppTreeView.js +1 -1
  149. package/dist/components/AppTruncate.js +1 -1
  150. package/dist/components/AppUpdateBar.js +1 -1
  151. package/dist/components/AppWhatsNew.js +1 -1
  152. package/dist/components/AppWizard.js +1 -1
  153. package/dist/components/AppWorkspaceSwitcher.js +1 -1
  154. package/dist/components/ModalIcons.js +1 -1
  155. package/dist/components/iconCatalogNames.g.js +1 -1
  156. package/dist/components/iconGlyphs.g.js +1 -1
  157. package/dist/components/iconVariants.g.js +1 -1
  158. package/dist/components/toast.js +1 -1
  159. package/dist/components/toastStore.js +1 -1
  160. package/dist/components/useWuiControl.js +1 -1
  161. package/dist/components/warnInvalidValue.js +1 -1
  162. package/dist/components/warnUnknownProps.js +1 -1
  163. package/dist/components/withTooltip.js +1 -1
  164. package/dist/guidance.json +60 -1
  165. package/dist/lib/CheckField.js +1 -1
  166. package/dist/lib/DiscardPrompt.js +1 -1
  167. package/dist/lib/FieldMessage.js +1 -1
  168. package/dist/lib/FileItemRow.js +1 -1
  169. package/dist/lib/FocusPanel.js +1 -1
  170. package/dist/lib/emptyIllustration.js +1 -1
  171. package/dist/lib/fileItem.js +1 -1
  172. package/dist/lib/initials.js +1 -1
  173. package/dist/lib/pageScrollLock.js +1 -1
  174. package/dist/lib/qrCode.js +1 -1
  175. package/dist/lib/sectionShell.js +1 -1
  176. package/dist/lib/shellCookie.js +1 -1
  177. package/dist/lib/shortcutChip.js +1 -1
  178. package/dist/lib/useFileDrop.js +1 -1
  179. package/dist/lib/useFloatingStack.js +1 -1
  180. package/dist/lib/useListQuery.js +1 -1
  181. package/dist/lib/wuiMarker.js +1 -1
  182. package/dist/markdown-core/dist/citations.js +1 -0
  183. package/dist/markdown-core/dist/inline.js +1 -1
  184. package/dist/types/components/AppAutocomplete.d.ts +7 -1
  185. package/dist/types/components/AppMarkdown.d.ts +4 -0
  186. package/dist/types/components/AppRowSwitch.d.ts +23 -0
  187. package/dist/types/components/iconGlyphs.g.d.ts +8 -0
  188. package/dist/types/components/iconVariants.g.d.ts +40 -0
  189. package/dist/types/index.d.ts +1 -0
  190. package/dist/ui-react.js +1 -1
  191. package/package.json +6 -6
@@ -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{loadFlagStyles as o}from"../lib/flagStyles.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}=e(`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;n(`AppPhoneNumberInput`,M),t(`AppPhoneNumberInput`,`size`,A,f),c(()=>{O&&o()},[O]);let N=l(),P=x||N,F=D&&P?`${P}-error`:void 0,I=!D&&E&&P?`${P}-hint`:void 0,{setRef:L}=a({ref:p,value:g??``,onChange:_,events:[`input`,`change`]});return d(`div`,{...m,className:`field app-phone-number-input${A===`sm`?` phone-sm`:``}${A===`lg`?` phone-lg`:``}${j?` ${j}`:``}`,children:[S&&d(`label`,{className:`label`,htmlFor:P,children:[S,T&&!w&&u(`span`,{className:`label-optional`,children:` (optional)`}),w&&u(i,{})]}),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}),u(r,{error:D,hint:E,errorId:F,hintId:I})]})});export{p 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,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;n(`AppRadioGroup`,M),t(`AppRadioGroup`,`variant`,y,l);let N=o(),P=O||N,F=h||P,I=`${P}-error`,L=`${P}-hint`,R=g!==void 0;return c(`div`,{...d,className:`field${A?` ${A}`:``}`,children:[p!=null&&c(`span`,{className:`label`,id:`${P}-label`,children:[p,S&&!x&&s(`span`,{className:`label-optional`,children:` (optional)`}),x&&s(a,{}),E&&s(i,{label:D,children:E})]}),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 c(`div`,{className:`form-check`,children:[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)}}),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:w,hint:T,errorId:I,hintId:L})]})}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 i from"./AppLink.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;t(`AppRepeater`,C);let w=typeof b==`number`&&u.length>=b,T=!!m&&u.length>y;return o(`div`,{className:`repeater${S?` ${S}`:``}`,...c,...C,children:[u.length===0&&v&&a(`div`,{className:`repeater-empty`,children:v}),u.map((e,t)=>{let r=f?f(e,t):null;return o(`div`,{className:`repeater-row`,children:[(!!r||T)&&a(`span`,{className:`repeater-row-label`,children:r}),x&&a(`span`,{className:`repeater-index`,children:t+1}),a(`div`,{className:`repeater-body`,children:d(e,t)}),T&&a(n,{icon:`trash-2`,label:`${_} ${t+1}`,danger:!0,className:`repeater-remove`,onClick:()=>m(t)})]},e.id??t)}),g===`link`?a(i,{animation:`static`,size:`sm`,linkComponent:`button`,type:`button`,leftIcon:`plus`,className:`repeater-add`,disabled:w,onClick:p,children:h}):a(r,{variant:g,size:`sm`,leftIcon:`plus`,className:`repeater-add`,disabled:w,onClick:p,children:h})]})}export{s 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};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppAlert.js";import i from"./AppButton.js";import a from"./AppInput.js";import o from"./AppPhoneNumberInput.js";import s,{SECTION_ALIGNS as c,SECTION_HEADINGS as l,SECTION_VARIANTS as u,sectionHeading as d}from"../lib/sectionShell.js";import f from"./AppTextarea.js";import{useId as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var _=[`name`,`email`,`phone`,`company`,`message`],v={name:`Name`,email:`Email`,phone:`Phone number`,company:`Company`,message:`Message`},y={name:`name`,email:`email`,company:`organization`},b=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,x=`This field is required.`,S=`Enter an email address such as name@example.com.`,C=`We could not send your message. Please try again.`;function w(e,t){let n={};for(let{name:r,required:i=!1}of e){let e=t[r].trim();i&&e===``?n[r]=x:r===`email`&&e!==``&&!b.test(e)&&(n[r]=S)}return n}function T(b){let{marker:x,props:S}=e(`AppSectionLeadCapture`,b),{title:T,text:E,fields:D,onSubmit:O,submitLabel:k=`Send`,successTitle:A,successText:j,consent:M,as:N=`h2`,eyebrow:P,subtitle:F,align:I=`center`,variant:L=`default`,className:R=``,...z}=S;n(`AppSectionLeadCapture`,z),t(`AppSectionLeadCapture`,`as`,N,l),t(`AppSectionLeadCapture`,`align`,I,c),t(`AppSectionLeadCapture`,`variant`,L,u);for(let e of D)t(`AppSectionLeadCapture`,`fields.name`,e.name,_);let B=p(),[V,H]=m(()=>Object.fromEntries(D.map(e=>[e.name,``]))),[U,W]=m({}),[G,K]=m(null),[q,J]=m(!1),[Y,X]=m(!1),Z=(e,t)=>H(n=>({...n,[e]:t}));async function Q(e){if(e.preventDefault(),q)return;let t=w(D,V);if(W(t),K(null),Object.keys(t).length>0)return;let n=Object.fromEntries(Object.entries(V).map(([e,t])=>[e,t.trim()]));J(!0);try{await O(n),X(!0)}catch(e){K(typeof e?.message==`string`&&e.message!==``?e.message:C)}finally{J(!1)}}function $({name:e,label:t=v[e],required:n=!1}){let r=`${B}-${e}`,i=U[e];return e===`phone`?h(o,{id:r,name:e,label:t,required:n,value:V[e],onChange:t=>Z(e,t),error:i},e):e===`message`?h(f,{id:r,name:e,label:t,required:n,value:V[e],onChange:t=>Z(e,t.target.value),error:i},e):h(a,{id:r,name:e,type:e===`email`?`email`:`text`,autoComplete:y[e],label:t,required:n,value:V[e],onChange:t=>Z(e,t.target.value),error:i},e)}return g(s,{component:`AppSectionLeadCapture`,kind:`lead-capture`,title:T,as:d(N,`h2`),eyebrow:P,subtitle:F,align:I,variant:L,className:R,rest:{...x,...z},children:[E!=null&&E!==``&&h(`p`,{className:`wui-section-lead-text`,children:E}),Y?h(`div`,{className:`wui-section-lead-success`,children:h(r,{tone:`success`,title:A,children:j})}):g(`form`,{className:`wui-section-lead-form`,noValidate:!0,onSubmit:Q,children:[h(`div`,{className:`wui-section-lead-fields`,children:D.map($)}),G!=null&&h(r,{tone:`danger`,children:G}),h(i,{type:`submit`,variant:`primary`,loading:q,children:k}),M!=null&&M!==``&&h(`p`,{className:`wui-section-lead-consent`,children:M})]})]})}export{T 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"./AppAlert.js";import s from"./AppButton.js";import c from"./AppInput.js";import l from"./AppPhoneNumberInput.js";import u from"./AppTextarea.js";import d from"./warnInvalidValue.js";import f from"./warnUnknownProps.js";import{useId as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";var _=[`name`,`email`,`phone`,`company`,`message`],v={name:`Name`,email:`Email`,phone:`Phone number`,company:`Company`,message:`Message`},y={name:`name`,email:`email`,company:`organization`},b=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,x=`This field is required.`,S=`Enter an email address such as name@example.com.`,C=`We could not send your message. Please try again.`;function w(e,t){let n={};for(let{name:r,required:i=!1}of e){let e=t[r].trim();i&&e===``?n[r]=x:r===`email`&&e!==``&&!b.test(e)&&(n[r]=S)}return n}function T(b){let{marker:x,props:S}=a(`AppSectionLeadCapture`,b),{title:T,text:E,fields:D,onSubmit:O,submitLabel:k=`Send`,successTitle:A,successText:j,consent:M,as:N=`h2`,eyebrow:P,subtitle:F,align:I=`center`,variant:L=`default`,className:R=``,...z}=S;f(`AppSectionLeadCapture`,z),d(`AppSectionLeadCapture`,`as`,N,n),d(`AppSectionLeadCapture`,`align`,I,t),d(`AppSectionLeadCapture`,`variant`,L,r);for(let e of D)d(`AppSectionLeadCapture`,`fields.name`,e.name,_);let B=p(),[V,H]=m(()=>Object.fromEntries(D.map(e=>[e.name,``]))),[U,W]=m({}),[G,K]=m(null),[q,J]=m(!1),[Y,X]=m(!1),Z=(e,t)=>H(n=>({...n,[e]:t}));async function Q(e){if(e.preventDefault(),q)return;let t=w(D,V);if(W(t),K(null),Object.keys(t).length>0)return;let n=Object.fromEntries(Object.entries(V).map(([e,t])=>[e,t.trim()]));J(!0);try{await O(n),X(!0)}catch(e){K(typeof e?.message==`string`&&e.message!==``?e.message:C)}finally{J(!1)}}function $({name:e,label:t=v[e],required:n=!1}){let r=`${B}-${e}`,i=U[e];return e===`phone`?/* @__PURE__ */ h(l,{id:r,name:e,label:t,required:n,value:V[e],onChange:t=>Z(e,t),error:i},e):e===`message`?/* @__PURE__ */ h(u,{id:r,name:e,label:t,required:n,value:V[e],onChange:t=>Z(e,t.target.value),error:i},e):/* @__PURE__ */ h(c,{id:r,name:e,type:e===`email`?`email`:`text`,autoComplete:y[e],label:t,required:n,value:V[e],onChange:t=>Z(e,t.target.value),error:i},e)}return/* @__PURE__ */ g(e,{component:`AppSectionLeadCapture`,kind:`lead-capture`,title:T,as:i(N,`h2`),eyebrow:P,subtitle:F,align:I,variant:L,className:R,rest:{...x,...z},children:[E!=null&&E!==``&&/* @__PURE__ */ h(`p`,{className:`wui-section-lead-text`,children:E}),Y?/* @__PURE__ */ h(`div`,{className:`wui-section-lead-success`,children:/* @__PURE__ */ h(o,{tone:`success`,title:A,children:j})}):/* @__PURE__ */ g(`form`,{className:`wui-section-lead-form`,noValidate:!0,onSubmit:Q,children:[/* @__PURE__ */ h(`div`,{className:`wui-section-lead-fields`,children:D.map($)}),G!=null&&/* @__PURE__ */ h(o,{tone:`danger`,children:G}),/* @__PURE__ */ h(s,{type:`submit`,variant:`primary`,loading:q,children:k}),M!=null&&M!==``&&/* @__PURE__ */ h(`p`,{className:`wui-section-lead-consent`,children:M})]})]})}export{T 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,SectionImage as s,sectionHeading as c}from"../lib/sectionShell.js";import{jsx as l}from"react/jsx-runtime";var u=e=>typeof e==`string`&&e.trim()!==``?e:void 0;function d(d){let{marker:f,props:p}=e(`AppSectionLogos`,d),{title:m,items:h=[],as:g=`h2`,eyebrow:_,subtitle:v,align:y=`center`,variant:b=`default`,className:x=``,...S}=p;n(`AppSectionLogos`,S),t(`AppSectionLogos`,`as`,g,a),t(`AppSectionLogos`,`align`,y,i),t(`AppSectionLogos`,`variant`,b,o);for(let e of h){let t=u(e.src),n=u(e.name)??u(e.label),r=e.width>0&&e.height>0;if(!(t?(u(e.alt)??n)!==void 0&&r:n!==void 0))throw Error(`AppSectionLogos item "${e.src??``}" needs src, alt (the company's name), width and height: a logo without a size moves the page when it loads.`)}return l(r,{component:`AppSectionLogos`,kind:`logos`,title:m,as:c(g,`h2`),eyebrow:_,subtitle:v,align:y,variant:b,className:x,rest:{...f,...S},children:h.length>0&&l(`ul`,{className:`wui-section-logos-list`,children:h.map(e=>{let t=u(e.src),n=u(e.name)??u(e.label),r=t?l(s,{className:`wui-section-logo-img`,src:e.src,alt:u(e.alt)??n,width:e.width,height:e.height}):l(`span`,{className:`wui-section-logo-text`,children:n});return l(`li`,{className:`wui-section-logo`,children:e.href?l(`a`,{href:e.href,children:r}):r},e.key??t??n)})})})}export{d as default};
1
+ import e,{SECTION_ALIGNS as t,SECTION_HEADINGS as n,SECTION_VARIANTS as r,SectionImage 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";var u=e=>typeof e==`string`&&e.trim()!==``?e:void 0;function d(d){let{marker:f,props:p}=o(`AppSectionLogos`,d),{title:m,items:h=[],as:g=`h2`,eyebrow:_,subtitle:v,align:y=`center`,variant:b=`default`,className:x=``,...S}=p;c(`AppSectionLogos`,S),s(`AppSectionLogos`,`as`,g,n),s(`AppSectionLogos`,`align`,y,t),s(`AppSectionLogos`,`variant`,b,r);for(let e of h){let t=u(e.src),n=u(e.name)??u(e.label),r=e.width>0&&e.height>0;if(!(t?(u(e.alt)??n)!==void 0&&r:n!==void 0))throw Error(`AppSectionLogos item "${e.src??``}" needs src, alt (the company's name), width and height: a logo without a size moves the page when it loads.`)}return/* @__PURE__ */ l(e,{component:`AppSectionLogos`,kind:`logos`,title:m,as:a(g,`h2`),eyebrow:_,subtitle:v,align:y,variant:b,className:x,rest:{...f,...S},children:h.length>0&&/* @__PURE__ */ l(`ul`,{className:`wui-section-logos-list`,children:h.map(e=>{let t=u(e.src),n=u(e.name)??u(e.label),r=t?/* @__PURE__ */ l(i,{className:`wui-section-logo-img`,src:e.src,alt:u(e.alt)??n,width:e.width,height:e.height}):/* @__PURE__ */ l(`span`,{className:`wui-section-logo-text`,children:n});return/* @__PURE__ */ l(`li`,{className:`wui-section-logo`,children:e.href?/* @__PURE__ */ l(`a`,{href:e.href,children:r}):r},e.key??t??n)})})})}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 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(`AppSectionPricing`,l),{title:f,as:p=`h2`,eyebrow:m,subtitle:h,align:g=`center`,variant:_=`default`,children:v,className:y=``,...b}=d;return n(`AppSectionPricing`,b),t(`AppSectionPricing`,`as`,p,a),t(`AppSectionPricing`,`align`,g,i),t(`AppSectionPricing`,`variant`,_,o),c(r,{component:`AppSectionPricing`,kind:`pricing`,title:f,as:s(p,`h2`),eyebrow:m,subtitle:h,align:g,variant:_,className:y,rest:{...u,...b},children:v!=null&&v!==!1&&c(`div`,{className:`plan-grid`,children:v})})}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(`AppSectionPricing`,l),{title:f,as:p=`h2`,eyebrow:m,subtitle:h,align:g=`center`,variant:_=`default`,children:v,className:y=``,...b}=d;return s(`AppSectionPricing`,b),o(`AppSectionPricing`,`as`,p,n),o(`AppSectionPricing`,`align`,g,t),o(`AppSectionPricing`,`variant`,_,r),/* @__PURE__ */ c(e,{component:`AppSectionPricing`,kind:`pricing`,title:f,as:i(p,`h2`),eyebrow:m,subtitle:h,align:g,variant:_,className:y,rest:{...u,...b},children:v!=null&&v!==!1&&/* @__PURE__ */ c(`div`,{className:`plan-grid`,children:v})})}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,{SECTION_ALIGNS as i,SECTION_HEADINGS as a,SECTION_VARIANTS as o,SectionImage as s,sectionHeading as c}from"../lib/sectionShell.js";import{jsx as l,jsxs as u}from"react/jsx-runtime";function d(d){let{marker:f,props:p}=e(`AppSectionTestimonials`,d),{title:m,items:h=[],as:g=`h2`,eyebrow:_,subtitle:v,align:y=`center`,variant:b=`default`,className:x=``,...S}=p;return n(`AppSectionTestimonials`,S),t(`AppSectionTestimonials`,`as`,g,a),t(`AppSectionTestimonials`,`align`,y,i),t(`AppSectionTestimonials`,`variant`,b,o),l(r,{component:`AppSectionTestimonials`,kind:`testimonials`,title:m,as:c(g,`h2`),eyebrow:_,subtitle:v,align:y,variant:b,className:x,rest:{...f,...S},children:h.length>0&&l(`ul`,{className:`wui-section-testimonials-list`,children:h.map(e=>l(`li`,{children:u(`figure`,{className:`wui-section-testimonial`,children:[l(`blockquote`,{className:`wui-section-testimonial-quote`,children:e.quote}),u(`figcaption`,{className:`wui-section-testimonial-author`,children:[e.avatar&&l(s,{className:`wui-section-testimonial-avatar`,src:e.avatar,alt:``,width:48,height:48}),u(`span`,{className:`wui-section-testimonial-who`,children:[e.name&&l(`span`,{className:`wui-section-testimonial-name`,children:e.name}),e.role&&l(`span`,{className:`wui-section-testimonial-role`,children:e.role})]})]})]})},e.key??e.name))})})}export{d as default};
1
+ import e,{SECTION_ALIGNS as t,SECTION_HEADINGS as n,SECTION_VARIANTS as r,SectionImage 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,jsxs as u}from"react/jsx-runtime";function d(d){let{marker:f,props:p}=o(`AppSectionTestimonials`,d),{title:m,items:h=[],as:g=`h2`,eyebrow:_,subtitle:v,align:y=`center`,variant:b=`default`,className:x=``,...S}=p;return c(`AppSectionTestimonials`,S),s(`AppSectionTestimonials`,`as`,g,n),s(`AppSectionTestimonials`,`align`,y,t),s(`AppSectionTestimonials`,`variant`,b,r),/* @__PURE__ */ l(e,{component:`AppSectionTestimonials`,kind:`testimonials`,title:m,as:a(g,`h2`),eyebrow:_,subtitle:v,align:y,variant:b,className:x,rest:{...f,...S},children:h.length>0&&/* @__PURE__ */ l(`ul`,{className:`wui-section-testimonials-list`,children:h.map(e=>/* @__PURE__ */ l(`li`,{children:/* @__PURE__ */ u(`figure`,{className:`wui-section-testimonial`,children:[/* @__PURE__ */ l(`blockquote`,{className:`wui-section-testimonial-quote`,children:e.quote}),/* @__PURE__ */ u(`figcaption`,{className:`wui-section-testimonial-author`,children:[e.avatar&&/* @__PURE__ */ l(i,{className:`wui-section-testimonial-avatar`,src:e.avatar,alt:``,width:48,height:48}),/* @__PURE__ */ u(`span`,{className:`wui-section-testimonial-who`,children:[e.name&&/* @__PURE__ */ l(`span`,{className:`wui-section-testimonial-name`,children:e.name}),e.role&&/* @__PURE__ */ l(`span`,{className:`wui-section-testimonial-role`,children:e.role})]})]})]})},e.key??e.name))})})}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 r from"./AppIcon.js";import{useEffect as i,useId as a,useLayoutEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u={sm:`segmented-sm`,md:``,lg:`segmented-lg`};function d(d){let{marker:f,props:p}=e(`AppSegmented`,d),{options:m=[],value:h,onChange:g,label:_,name:v,size:y=`md`,fullWidth:b=!1,bordered:x=!0,disabled:S=!1,labelVisible:C=!1,className:w=``,...T}=p;n(`AppSegmented`,T),t(`AppSegmented`,`size`,y,Object.keys(u));let E=a(),D=v||E,O=s(null),k=s(null),A=[`segmented`,u[y]??``,b?`segmented-full`:``,x?``:`wui-segmented-borderless`,S?`is-disabled`:``,w].filter(Boolean).join(` `);o(()=>{let e=O.current,t=k.current;if(!e||!t)return;let n=n=>{let r=e.querySelector(`.segmented-option:has(.segmented-input:checked)`);if(!r||!e.offsetWidth){t.style.opacity=`0`;return}n||e.classList.remove(`is-animated`),t.style.width=`${r.offsetWidth}px`,t.style.transform=`translateX(${r.offsetLeft}px)`,t.style.opacity=`1`,n||requestAnimationFrame(()=>O.current?.classList.add(`is-animated`))};n(!0);let r=typeof ResizeObserver<`u`?new ResizeObserver(()=>n(!1)):null;return r?.observe(e),()=>r?.disconnect()},[h,m,y,b,C]),i(()=>{let e=requestAnimationFrame(()=>O.current?.classList.add(`is-animated`));return()=>cancelAnimationFrame(e)},[]);let j=C&&_,M=l(`div`,{ref:O,className:A,role:`radiogroup`,"aria-label":_,"aria-disabled":S||void 0,...j?void 0:f,...T,children:[c(`span`,{className:`segmented-thumb`,ref:k,"aria-hidden":`true`}),m.map(e=>l(`label`,{className:`segmented-option`,children:[c(`input`,{type:`radio`,className:`segmented-input`,name:D,value:e.value,checked:e.value===h,disabled:S||e.disabled,onChange:()=>g?.(e.value)}),e.icon&&c(r,{name:e.icon,size:13}),e.note?l(`span`,{className:`segmented-option-text`,children:[c(`span`,{className:`segmented-option-label`,children:e.label}),c(`span`,{className:`segmented-option-note`,children:e.note})]}):e.label,e.count!=null&&c(`span`,{className:`wui-segmented-option-count`,children:e.count})]},e.value))]},`group`);return j?l(`div`,{className:`field`,...f,children:[c(`span`,{className:`label`,"aria-hidden":`true`,children:_}),M]},`field`):M}export{d 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{useEffect as i,useId as a,useLayoutEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u={sm:`segmented-sm`,md:``,lg:`segmented-lg`};function d(d){let{marker:f,props:p}=e(`AppSegmented`,d),{options:m=[],value:h,onChange:g,label:_,name:v,size:y=`md`,fullWidth:b=!1,bordered:x=!0,disabled:S=!1,labelVisible:C=!1,className:w=``,...T}=p;r(`AppSegmented`,T),n(`AppSegmented`,`size`,y,Object.keys(u));let E=a(),D=v||E,O=s(null),k=s(null),A=[`segmented`,u[y]??``,b?`segmented-full`:``,x?``:`wui-segmented-borderless`,S?`is-disabled`:``,w].filter(Boolean).join(` `);o(()=>{let e=O.current,t=k.current;if(!e||!t)return;let n=n=>{let r=e.querySelector(`.segmented-option:has(.segmented-input:checked)`);!r||!e.offsetWidth?t.style.opacity=`0`:(n||e.classList.remove(`is-animated`),t.style.width=`${r.offsetWidth}px`,t.style.transform=`translateX(${r.offsetLeft}px)`,t.style.opacity=`1`,n||requestAnimationFrame(()=>O.current?.classList.add(`is-animated`)))};n(!0);let r=typeof ResizeObserver<`u`?new ResizeObserver(()=>n(!1)):null;return r?.observe(e),()=>r?.disconnect()},[h,m,y,b,C]),i(()=>{let e=requestAnimationFrame(()=>O.current?.classList.add(`is-animated`));return()=>cancelAnimationFrame(e)},[]);let j=C&&_,M=/* @__PURE__ */ l(`div`,{ref:O,className:A,role:`radiogroup`,"aria-label":_,"aria-disabled":S||void 0,...j?void 0:f,...T,children:[/* @__PURE__ */ c(`span`,{className:`segmented-thumb`,ref:k,"aria-hidden":`true`}),m.map(e=>/* @__PURE__ */ l(`label`,{className:`segmented-option`,children:[/* @__PURE__ */ c(`input`,{type:`radio`,className:`segmented-input`,name:D,value:e.value,checked:e.value===h,disabled:S||e.disabled,onChange:()=>g?.(e.value)}),e.icon&&/* @__PURE__ */ c(t,{name:e.icon,size:13}),e.note?/* @__PURE__ */ l(`span`,{className:`segmented-option-text`,children:[/* @__PURE__ */ c(`span`,{className:`segmented-option-label`,children:e.label}),/* @__PURE__ */ c(`span`,{className:`segmented-option-note`,children:e.note})]}):e.label,e.count!=null&&/* @__PURE__ */ c(`span`,{className:`wui-segmented-option-count`,children:e.count})]},e.value))]},`group`);return j?/* @__PURE__ */ l(`div`,{className:`field`,...f,children:[/* @__PURE__ */ c(`span`,{className:`label`,"aria-hidden":`true`,children:_}),M]},`field`):M}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 ee from"../lib/FieldMessage.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import a from"./useNodeLabels.js";import o,{optionsEqual as te}from"./useWuiControl.js";import{forwardRef as s,useEffect as ne,useId as c,useLayoutEffect as l,useRef as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import"@webority/ui-elements/elements/select";var m=[`sm`,`lg`,`xl`],h=[`off`,`border`,`above`],g=(e,t)=>({value:e.value,label:t,icon:e.icon}),_=s(function(s,_){let{marker:v,props:y}=e(`AppSelect`,s),{value:b,onChange:re,options:x=[],placeholder:ie=`Select...`,searchPlaceholder:ae=`Search...`,emptyText:oe,searchable:se=!1,clearable:ce=!1,size:S,icon:le,compact:ue=!1,valuePrefix:C,prefix:w,suffix:T,floatingLabel:E=`off`,disabled:D,open:O,label:k,required:A=!1,optional:j=!1,error:M,hint:N,help:P,helpLabel:F=`More information`,id:I,name:L,className:R=``,fieldClassName:de=``,"aria-label":z,"aria-labelledby":B,"aria-describedby":V,...H}=y;n(`AppSelect`,H),t(`AppSelect`,`size`,S,m),t(`AppSelect`,`floatingLabel`,E,h);let fe=c(),{setRef:pe,innerRef:U}=o({ref:_,value:b??``,onChange:re}),{portal:me,toElementOptions:W}=a(x),G=u({el:null,options:null,map:null});l(()=>{let e=U.current;if(!e||G.current.el===e&&G.current.options===x&&G.current.map===W)return;G.current={el:e,options:x,map:W};let t=W(x,g);te(t,e.options)||(e.options=t)});let K=I||fe,q=E!==`off`&&k,J=M&&K?`${K}-error`:void 0,Y=N&&K?`${K}-hint`:void 0,he=J||Y||V;ne(()=>{let e=U.current;e&&(C==null||C===``?e.removeAttribute(`prefix`):e.setAttribute(`prefix`,C))},[C,U]);let X=!q&&(w!=null||T!=null),Z=!k&&!M&&!N,Q=p(d,{children:[f(`wui-select`,{"aria-label":z||(typeof k==`string`?k:void 0),"aria-labelledby":B||void 0,"aria-describedby":he||void 0,"aria-invalid":M?`true`:void 0,ref:pe,value:b||void 0,id:K,name:L,placeholder:E!==`off`&&k?` `:ie,"search-placeholder":ae,"empty-text":oe||void 0,searchable:se?``:void 0,clearable:ce?``:void 0,size:S||void 0,icon:le||void 0,compact:ue?``:void 0,disabled:D?``:void 0,open:O?``:void 0,required:A?``:void 0,className:R||void 0,...Z&&!X?v:null,...H}),me]}),$=X?p(`div`,{...Z?v:null,className:`input-affixed`,children:[w!=null&&f(`span`,{className:`affix affix-pre`,children:w}),Q,T!=null&&f(`span`,{className:`affix affix-suf`,children:T})]}):Q;if(Z)return $;let ge=[`field`,de].filter(Boolean).join(` `);return p(`div`,{...v,className:ge,children:[k&&!q&&p(`label`,{className:`label`,htmlFor:K,children:[k,j&&!A&&f(`span`,{className:`label-optional`,children:` (optional)`}),A&&f(i,{}),P&&f(r,{label:F,children:P})]}),q?p(`div`,{className:E===`above`?`field-float wui-float-above`:`field-float`,children:[Q,p(`label`,{className:`float-label`,htmlFor:K,children:[k,j&&!A&&f(`span`,{className:`label-optional`,children:` (optional)`}),A&&f(i,{})]})]}):$,f(ee,{error:M,hint:N,errorId:J,hintId:Y})]})});export{_ as default};
1
+ import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import ee from"./AppInfoTip.js";import n from"./AppRequiredMark.js";import te from"./useNodeLabels.js";import r,{optionsEqual as ne}from"./useWuiControl.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import{forwardRef as o,useEffect as s,useId as c,useLayoutEffect as l,useRef as u}from"react";import{Fragment as re,jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/select";var ie=[`sm`,`lg`,`xl`],ae=[`off`,`border`,`above`],oe=(e,t)=>({value:e.value,label:t,icon:e.icon}),p=o(function(o,p){let{marker:m,props:h}=t(`AppSelect`,o),{value:g,onChange:se,options:_=[],placeholder:v=`Select...`,searchPlaceholder:y=`Search...`,emptyText:b,searchable:x=!1,clearable:ce=!1,size:S,icon:le,compact:ue=!1,valuePrefix:C,prefix:w,suffix:T,floatingLabel:E=`off`,disabled:D,open:O,label:k,required:A=!1,optional:j=!1,error:M,hint:N,help:P,helpLabel:F=`More information`,id:I,name:L,className:R=``,fieldClassName:z=``,"aria-label":de,"aria-labelledby":B,"aria-describedby":V,...H}=h;a(`AppSelect`,H),i(`AppSelect`,`size`,S,ie),i(`AppSelect`,`floatingLabel`,E,ae);let fe=c(),{setRef:pe,innerRef:U}=r({ref:p,value:g??``,onChange:se}),{portal:me,toElementOptions:W}=te(_),G=u({el:null,options:null,map:null});l(()=>{let e=U.current;if(!e||G.current.el===e&&G.current.options===_&&G.current.map===W)return;G.current={el:e,options:_,map:W};let t=W(_,oe);ne(t,e.options)||(e.options=t)});let K=I||fe,q=E!==`off`&&k,J=M&&K?`${K}-error`:void 0,Y=N&&K?`${K}-hint`:void 0,he=J||Y||V;s(()=>{let e=U.current;e&&(C==null||C===``?e.removeAttribute(`prefix`):e.setAttribute(`prefix`,C))},[C,U]);let X=!q&&(w!=null||T!=null),Z=!k&&!M&&!N,ge=/* @__PURE__ */ d(`wui-select`,{"aria-label":de||(typeof k==`string`?k:void 0),"aria-labelledby":B||void 0,"aria-describedby":he||void 0,"aria-invalid":M?`true`:void 0,ref:pe,value:g||void 0,id:K,name:L,placeholder:E!==`off`&&k?` `:v,"search-placeholder":y,"empty-text":b||void 0,searchable:x?``:void 0,clearable:ce?``:void 0,size:S||void 0,icon:le||void 0,compact:ue?``:void 0,disabled:D?``:void 0,open:O?``:void 0,required:A?``:void 0,className:R||void 0,...Z&&!X?m:null,...H}),Q=/* @__PURE__ */ f(re,{children:[ge,me]}),$=X?/* @__PURE__ */ f(`div`,{...Z?m:null,className:`input-affixed`,children:[w!=null&&/* @__PURE__ */ d(`span`,{className:`affix affix-pre`,children:w}),Q,T!=null&&/* @__PURE__ */ d(`span`,{className:`affix affix-suf`,children:T})]}):Q;if(Z)return $;let _e=[`field`,z].filter(Boolean).join(` `);return/* @__PURE__ */ f(`div`,{...m,className:_e,children:[k&&!q&&/* @__PURE__ */ f(`label`,{className:`label`,htmlFor:K,children:[k,j&&!A&&/* @__PURE__ */ d(`span`,{className:`label-optional`,children:` (optional)`}),A&&/* @__PURE__ */ d(n,{}),P&&/* @__PURE__ */ d(ee,{label:F,children:P})]}),q?/* @__PURE__ */ f(`div`,{className:E===`above`?`field-float wui-float-above`:`field-float`,children:[Q,/* @__PURE__ */ f(`label`,{className:`float-label`,htmlFor:K,children:[k,j&&!A&&/* @__PURE__ */ d(`span`,{className:`label-optional`,children:` (optional)`}),A&&/* @__PURE__ */ d(n,{})]})]}):$,/* @__PURE__ */ d(e,{error:M,hint:N,errorId:J,hintId:Y})]})});export{p as default};
@@ -1 +1 @@
1
- import e from"./warnInvalidValue.js";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";var i=[`website`,`article`],a=[`summary`,`summary_large_image`];function o(o){let{title:s,description:c,canonicalUrl:l,siteName:u,robots:d,image:f,imageAlt:p,jsonLd:m}=o;e(`AppSeoHead`,`type`,o.type,i),e(`AppSeoHead`,`twitterCard`,o.twitterCard,a);let h=i.includes(o.type)?o.type:`website`,g=a.includes(o.twitterCard)?o.twitterCard:`summary`,_=m?JSON.stringify(m).replace(/</g,`\\u003c`):null;return r(t,{children:[n(`title`,{children:s}),n(`meta`,{name:`description`,content:c}),n(`link`,{rel:`canonical`,href:l}),n(`meta`,{name:`robots`,content:d}),n(`meta`,{property:`og:type`,content:h}),n(`meta`,{property:`og:site_name`,content:u}),n(`meta`,{property:`og:title`,content:s}),n(`meta`,{property:`og:description`,content:c}),n(`meta`,{property:`og:url`,content:l}),f?n(`meta`,{property:`og:image`,content:f}):null,f&&p?n(`meta`,{property:`og:image:alt`,content:p}):null,n(`meta`,{name:`twitter:card`,content:g}),n(`meta`,{name:`twitter:title`,content:s}),n(`meta`,{name:`twitter:description`,content:c}),f?n(`meta`,{name:`twitter:image`,content:f}):null,f&&p?n(`meta`,{name:`twitter:image:alt`,content:p}):null,_?n(`script`,{type:`application/ld+json`,children:_}):null]})}export{o as default};
1
+ import e from"./warnInvalidValue.js";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";var i=[`website`,`article`],a=[`summary`,`summary_large_image`];function o(o){let{title:s,description:c,canonicalUrl:l,siteName:u,robots:d,image:f,imageAlt:p,jsonLd:m}=o;e(`AppSeoHead`,`type`,o.type,i),e(`AppSeoHead`,`twitterCard`,o.twitterCard,a);let h=i.includes(o.type)?o.type:`website`,g=a.includes(o.twitterCard)?o.twitterCard:`summary`,_=m?JSON.stringify(m).replace(/</g,`\\u003c`):null;return/* @__PURE__ */ r(t,{children:[/* @__PURE__ */ n(`title`,{children:s}),/* @__PURE__ */ n(`meta`,{name:`description`,content:c}),/* @__PURE__ */ n(`link`,{rel:`canonical`,href:l}),/* @__PURE__ */ n(`meta`,{name:`robots`,content:d}),/* @__PURE__ */ n(`meta`,{property:`og:type`,content:h}),/* @__PURE__ */ n(`meta`,{property:`og:site_name`,content:u}),/* @__PURE__ */ n(`meta`,{property:`og:title`,content:s}),/* @__PURE__ */ n(`meta`,{property:`og:description`,content:c}),/* @__PURE__ */ n(`meta`,{property:`og:url`,content:l}),f?/* @__PURE__ */ n(`meta`,{property:`og:image`,content:f}):null,f&&p?/* @__PURE__ */ n(`meta`,{property:`og:image:alt`,content:p}):null,/* @__PURE__ */ n(`meta`,{name:`twitter:card`,content:g}),/* @__PURE__ */ n(`meta`,{name:`twitter:title`,content:s}),/* @__PURE__ */ n(`meta`,{name:`twitter:description`,content:c}),f?/* @__PURE__ */ n(`meta`,{name:`twitter:image`,content:f}):null,f&&p?/* @__PURE__ */ n(`meta`,{name:`twitter:image:alt`,content:p}):null,_?/* @__PURE__ */ n(`script`,{type:`application/ld+json`,children:_}):null]})}export{o 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"./AppAvatar.js";import{navMatchScore as o}from"../lib/navMatch.js";import{SHELL_FOLDED_COOKIE as s,readNavFolded as c,readShellCollapsed as l,writeNavFolded as u,writeShellCollapsed as d}from"../lib/shellCookie.js";import{initScrollEdges as f}from"@webority/ui-elements/helpers";import{useEffect as p,useId as m,useMemo as h,useRef as g,useState as _}from"react";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";var x=99,S=4,C=5,w=/^[a-z0-9-]+$/,T=[`prefix`,`exact`],E=[`comfortable`,`compact`],D=[`default`,`primary`],O=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],k=new Set([`key`,`label`,`icon`,`iconVariant`,`iconSize`,`href`,`badge`,`badgeTone`,`badgeTitle`,`newUntil`,`trailingIcon`,`active`,`match`,`matchAlso`,`tab`,`tabLabel`,`children`]),A=e=>e>x?`${x}+`:String(e),j=new Intl.DateTimeFormat(`en-CA`,{timeZone:`Asia/Kolkata`}),M=e=>{if(typeof e!=`string`||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=new Date(`${e}T00:00:00Z`);return Number.isNaN(t.getTime())||t.toISOString().slice(0,10)!==e?!1:j.format(new Date)<=e};function ee(t){let{marker:a,props:o}=e(`AppShell`,t),{groups:m=[],brand:v,sidebarStart:x,sidebarStartCompact:S,sidebarFooter:C,topbarStart:w,topbarEnd:T,footer:k,launcher:A,children:j,collapsed:M,onCollapsedChange:ee,noSidebar:N=!1,density:P=`comfortable`,itemHeight:F,iconVariant:I,topbarTone:L=`default`,navLabel:z=`Main navigation`,linkComponent:B,currentPath:ce,rememberCollapsed:V=!1,collapsedCookie:H=`wui-shell-collapsed`,foldedCookie:U=s,tabBarLabel:le=`Quick navigation`,moreLabel:ue=`More`,userMenu:W,notifications:G,search:K,className:de=``,style:fe,...q}=o;r(`AppShell`,q),n(`AppShell`,`density`,P,E),n(`AppShell`,`topbarTone`,L,D),n(`AppShell`,`iconVariant`,I,O);let pe=F>0?{...fe,"--wui-nav-item-height":`${F}px`}:fe,[me,he]=_(()=>V&&M===void 0&&typeof document<`u`?l(H)??!1:!1),[J,Y]=_(!1),[ge,_e]=_(!1),[ve,ye]=_(!1),X=g(null),be=g(null),xe=g(null),Z=M??me,Se=()=>{let e=!Z;M===void 0&&he(e),V&&d(e,H),ee?.(e)},Ce=m.some(e=>e.collapsible),[we,Te]=_(()=>Ce&&typeof document<`u`?c(U):new Set),Ee=e=>{let t=new Set(we);t.has(e)?t.delete(e):t.add(e),Te(t),u(t,U)},Q=h(()=>te(m,ce),[m,ce]),$=N?null:ne(Q);p(()=>{let e=()=>_e(window.scrollY>4);return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),p(()=>{f()},[]),p(()=>{let e=X.current,t=e?.querySelector(`.app-nav-item[aria-current="page"]`);if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();n.top<r.top?e.scrollTop-=r.top-n.top:n.bottom>r.bottom&&(e.scrollTop+=n.bottom-r.bottom)},[]),p(()=>{let e=X.current;if(!e)return;let t=()=>ye(e.scrollHeight>e.clientHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[Q]);let De=!!k;return p(()=>{let e=xe.current,t=be.current;if(!De||!e||!t)return;let n=()=>t.style.setProperty(`--app-footer-h`,`${e.offsetHeight}px`);n();let r=typeof ResizeObserver>`u`?null:new ResizeObserver(n);return r?.observe(e),()=>{r?.disconnect(),t.style.removeProperty(`--app-footer-h`)}},[De]),p(()=>{if(!J)return;let e=e=>{e.key===`Escape`&&Y(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[J]),b(`div`,{ref:be,className:[`app-shell`,Z?`collapsed`:``,N?`no-sidebar`:``,J?`mobile-open`:``,de].filter(Boolean).join(` `),"data-density":P===`compact`?`compact`:void 0,"data-wui-folded-cookie":Ce?U:void 0,style:pe,...a,...q,children:[y(`a`,{className:`wui-skip-link`,href:`#main-content`,children:`Skip to content`}),b(`aside`,{className:`app-sidebar`,children:[v&&y(`div`,{className:`app-sidebar-brand`,children:v}),x&&y(`div`,{className:`app-sidebar-start`,children:x}),S&&y(`div`,{className:`app-sidebar-start-compact`,children:S}),y(`nav`,{className:`app-sidebar-scroll`,"aria-label":z,ref:X,tabIndex:ve?0:void 0,children:Q.map((e,t)=>{let n=e.items.map(e=>e.header==null?y(ie,{item:e,linkComponent:B,onNavigate:()=>Y(!1),iconVariant:I},e.key??e.href??e.label):y(`div`,{className:`wui-nav-header`,children:e.header},e.key??e.header));if(!e.collapsible)return b(`div`,{className:`app-nav-group`,children:[e.label&&y(`div`,{className:`app-nav-group-label`,children:e.label}),n,e.after&&y(`div`,{className:`wui-nav-group-after`,children:e.after})]},e.key??e.label??`group-${t}`);let r=!we.has(e.key)||!!R(e.items),a=`wui-nav-group-${e.key}`;return b(`div`,{className:`app-nav-group wui-nav-group-collapsible${r?``:` wui-nav-group-folded`}`,"data-wui-nav-group":e.key,children:[b(`button`,{type:`button`,className:`app-nav-group-label wui-nav-group-toggle`,"aria-expanded":r,"aria-controls":a,onClick:()=>Ee(e.key),children:[y(`span`,{className:`wui-nav-group-text`,children:e.label}),y(`span`,{className:`wui-nav-group-caret`,children:y(i,{name:`chevron-down`,size:16})})]}),b(`div`,{className:`wui-nav-group-body`,id:a,children:[n,e.after&&y(`div`,{className:`wui-nav-group-after`,children:e.after})]})]},e.key??`group-${t}`)})}),C&&y(`div`,{className:`app-sidebar-foot`,children:C}),!N&&y(`button`,{type:`button`,className:`app-sidebar-toggle`,onClick:Se,"aria-label":Z?`Expand navigation`:`Collapse navigation`,"aria-expanded":!Z,children:y(i,{name:`chevrons-left`,size:20})})]}),b(`div`,{className:`app-main`,children:[b(`header`,{className:`app-topbar${ge?` scrolled`:``}`,"data-tone":L===`primary`?`primary`:void 0,children:[b(`div`,{className:`app-topbar-start`,children:[y(`button`,{type:`button`,className:`app-topbar-menu`,onClick:()=>Y(!0),"aria-label":`Open navigation`,"aria-expanded":J,children:y(i,{name:`menu`,size:18})}),w,K&&y(se,{config:K})]}),b(`div`,{className:`app-topbar-end`,children:[T,G&&y(oe,{config:G}),W&&y(ae,{config:W,linkComponent:B})]})]}),y(`main`,{className:`app-content`,id:`main-content`,children:j}),k&&y(`footer`,{className:`app-footer`,ref:xe,children:k})]}),A&&y(`div`,{className:`wui-shell-launcher`,children:A}),$&&b(`nav`,{className:`wui-tabbar`,"aria-label":le,children:[$.tabs.map(e=>y(re,{tab:e,linkComponent:B,iconVariant:I},e.key??e.href)),$.hasMore&&b(`button`,{type:`button`,className:`wui-tabbar-item${$.moreActive?` active`:``}`,onClick:()=>Y(!0),children:[y(`span`,{className:`wui-tabbar-icon`,children:y(i,{name:`more`,size:24})}),y(`span`,{className:`wui-tabbar-label`,children:ue})]})]}),y(`button`,{type:`button`,className:`app-scrim`,onClick:()=>Y(!1),"aria-label":`Close navigation`,tabIndex:J?0:-1})]})}function te(e,t){for(let t of e)t.collapsible&&L(t);let i=(e,t=!1)=>(e??[]).map(e=>Array.isArray(e.children)?{...e,children:i(e.children)}:{...e}).filter(e=>P(e)?t:(e.children?.length??0)>0||!!e.href),a=e.map(e=>({...e,items:F(i(e.items,!0))})).filter(e=>e.items.some(e=>!P(e))),s=[],c=e=>{for(let t of e)P(t)||(s.push(t),t.children&&c(t.children))};for(let e of a)c(e.items);for(let e of s)r(`AppShell items`,N(e)),n(`AppShell`,`match`,e.match,T),n(`AppShell`,`iconVariant`,e.iconVariant,O);let l=null;if(t!=null&&!s.some(e=>e.active===!0)){let e=-1;for(let n of s){if(n.active!=null||n.children?.length&&!n.href)continue;let r=o(t,n.href,{exact:n.match===`exact`,also:n.matchAlso});if(r<0)continue;let i=n.match===`exact`&&o(t,n.href,{exact:!0})>=0?1/0:r;i>e&&(e=i,l=n)}}for(let e of s)e.active=e.active??e===l;return a}function N(e){return Object.fromEntries(Object.entries(e).filter(([e])=>!k.has(e)))}var P=e=>e.header!=null;function F(e){return e.filter((t,n)=>{if(!P(t))return!0;let r=e.findIndex((e,t)=>t>n&&P(e));return e.slice(n+1,r<0?void 0:r).length>0})}var I=new Set;function L(e){if(e.key!=null&&w.test(e.key))return;let n=e.key==null?`<AppShell> a collapsible group needs a key so its folded state can be remembered.`:`<AppShell> collapsible group key "${e.key}" must use lower-case letters, digits and hyphens.`,r=!0;try{r=process.env.NODE_ENV!==`production`}catch{r=!0}!r||I.has(n)||(I.add(n),t(n))}function ne(e){let t=[],n=e=>{for(let r of e)P(r)||(r.children?.length?n(r.children):t.push(r))};for(let t of e)n(t.items);let r=t.filter(e=>e.tab);if(r.length===0)return null;let i=r.length<t.length,a=i?S:C;if(r.length>a)throw Error(`<AppShell>: ${r.length} items carry tab: true, but the phone tab bar holds ${a} (${i?`4 plus More, because other items exist`:`5 when every item is a tab`}). Flag fewer items.`);return{tabs:r,hasMore:i,moreActive:t.some(e=>!e.tab&&e.active)}}function re({tab:e,linkComponent:t,iconVariant:n}){let r=`wui-tabbar-item${e.active?` active`:``}`,a=b(v,{children:[e.icon&&y(`span`,{className:`wui-tabbar-icon`,children:typeof e.icon==`string`?y(i,{name:e.icon,size:24,variant:e.iconVariant??n}):e.icon}),y(`span`,{className:`wui-tabbar-label`,children:e.tabLabel??e.label}),e.badge!=null&&y(`span`,{className:`wui-tabbar-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge})]}),o=e.active?`page`:void 0;return t?y(t,{className:r,to:e.href,"aria-current":o,children:a}):y(`a`,{className:r,href:e.href,"aria-current":o,children:a})}function R(e){for(let t of e){if(t.active)return t;let e=t.children?.length?R(t.children):void 0;if(e)return e}}function ie({item:e,linkComponent:t,onNavigate:n,depth:r=0,iconVariant:a}){let o=r>0,s=r>1?` wui-nav-depth-${Math.min(r,6)}`:``,c=Array.isArray(e.children)&&e.children.length>0,l=c?R(e.children):void 0,u=!!l,d=l?l.key??l.href??l.label:null,[f,m]=_(u);p(()=>{d!=null&&m(!0)},[d]);let h=typeof e.label==`string`?e.label:void 0,g=!o&&e.icon&&y(`span`,{className:`app-nav-icon`,children:typeof e.icon==`string`?y(i,{name:e.icon,size:e.iconSize??22,variant:e.iconVariant??a}):e.icon}),x=e.badge!=null&&y(`span`,{className:`app-nav-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge}),S=M(e.newUntil)&&y(`span`,{className:`wui-nav-new`,children:`New`}),C=b(v,{children:[g,y(`span`,{className:`app-nav-text`,children:e.label}),S,x,e.trailingIcon&&y(`span`,{className:`app-nav-trailing`,children:typeof e.trailingIcon==`string`?y(i,{name:e.trailingIcon,size:16}):e.trailingIcon})]}),w=e.active?`page`:void 0;if(c){let c=y(`div`,{className:`app-nav-sub${f?` expanded`:``}`,inert:!f,"aria-hidden":!f||void 0,children:y(`div`,{className:`app-nav-sub-inner`,children:e.children.map(e=>y(ie,{item:e,linkComponent:t,onNavigate:n,depth:r+1,iconVariant:a},e.key??e.href))})});if(e.href){let r=t?y(t,{className:`wui-nav-split-link`,to:e.href,"aria-current":w,onClick:n,children:C}):y(`a`,{className:`wui-nav-split-link`,href:e.href,"aria-current":w,onClick:n,children:C});return b(v,{children:[b(`div`,{className:`app-nav-item has-children wui-nav-split${o?` app-nav-subitem`:``}${u||e.active?` active`:``}${s}`,"data-label":h,children:[r,y(`button`,{type:`button`,className:`app-nav-caret wui-nav-split-toggle`,"aria-expanded":f,"aria-label":`Show or hide ${h??``} pages`,onClick:()=>m(e=>!e),children:y(i,{name:`chevron-right`,size:16})})]}),c]})}return b(v,{children:[b(`button`,{type:`button`,className:`app-nav-item${o?` app-nav-subitem`:``} has-children${u?` active`:``}${s}`,"aria-expanded":f,"data-label":h,onClick:()=>m(e=>!e),children:[g,y(`span`,{className:`app-nav-text`,children:e.label}),S,x,y(`span`,{className:`app-nav-caret`,children:y(i,{name:`chevron-right`,size:16})})]}),c]})}let T=`app-nav-item${o?` app-nav-subitem`:``}${e.active?` active`:``}${s}`;return t?y(t,{className:T,to:e.href,"aria-current":w,"data-label":h,onClick:n,children:C}):y(`a`,{className:T,href:e.href,"aria-current":w,"data-label":h,onClick:n,children:C})}function z(){let[e,t]=_(!1),n=g(null);return p(()=>{if(!e)return;let r=e=>{n.current?.contains(e.target)||t(!1)},i=e=>{e.key===`Escape`&&(t(!1),n.current?.querySelector(`button`)?.focus())};return document.addEventListener(`mousedown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,r),document.removeEventListener(`keydown`,i)}},[e]),{open:e,setOpen:t,ref:n}}function ae({config:e,linkComponent:t}){let n=m(),{open:r,setOpen:o,ref:s}=z(),{name:c,role:l,roles:u=[],photo:d,profileHref:f,profileLabel:p=`My profile`,onLogout:h,logoutAction:g,logoutLabel:_=`Sign out`,items:x=[]}=e;if(!c)throw Error(`<AppShell> userMenu.name is required; the trigger and the avatar are named from it.`);let S=u.map(e=>(e??``).trim()).filter(Boolean),C=()=>o(!1),w=(e,n,r,i)=>t?y(t,{className:`dropdown-item`,to:e,onClick:i,children:n},r):y(`a`,{className:`dropdown-item`,href:e,onClick:i,children:n},r),T=b(v,{children:[y(i,{name:`log-out`,size:18}),_]});return b(`div`,{className:`dropdown wui-usermenu`,ref:s,children:[b(`button`,{type:`button`,id:n,className:`wui-usermenu-trigger`,"aria-expanded":r,"aria-label":`Account menu for ${c}`,onClick:()=>o(e=>!e),children:[y(a,{name:c,src:d,tone:`auto`}),b(`span`,{className:`wui-usermenu-text`,children:[y(`span`,{className:`wui-usermenu-name`,children:c}),l&&y(`span`,{className:`wui-usermenu-role`,children:l})]}),y(i,{name:`chevron-down`,size:14,className:`wui-usermenu-caret`})]}),b(`div`,{className:`dropdown-menu dropdown-menu-end wui-usermenu-menu${r?` show`:``}`,"aria-labelledby":n,"data-bs-popper":r?`static`:void 0,children:[b(`div`,{className:`wui-usermenu-head`,children:[y(a,{name:c,src:d,size:`lg`,tone:`auto`}),b(`div`,{className:`wui-usermenu-who`,children:[y(`div`,{className:`wui-usermenu-name`,children:c}),l&&y(`div`,{className:`wui-usermenu-role`,children:l}),S.length>0&&b(`div`,{className:`wui-usermenu-roles`,children:[y(`span`,{className:`wui-usermenu-roles-label`,children:S.length===1?`Role:`:`Roles:`}),` ${S.join(`, `)}`]})]})]}),f&&w(f,b(v,{children:[y(i,{name:`user`,size:18}),p]}),void 0,C),x.map(e=>{if(e.divider)return y(`hr`,{className:`dropdown-divider`},e.key);let t=b(v,{children:[e.icon&&y(i,{name:e.icon,size:18}),e.label]}),n=()=>{e.onClick?.(),C()};return e.href?w(e.href,t,e.key,n):y(`button`,{type:`button`,className:`dropdown-item`,onClick:n,children:t},e.key)}),g?y(`form`,{method:`post`,action:g,className:`wui-usermenu-logout`,children:y(`button`,{type:`submit`,className:`dropdown-item danger`,children:T})}):h&&y(`button`,{type:`button`,className:`dropdown-item danger`,onClick:()=>{C(),h()},children:T})]})]})}function oe({config:e}){let t=m(),{open:n,setOpen:r,ref:a}=z(),{unread:o=0,items:s,loading:c=!1,onOpen:l,onMarkAllRead:u,viewAllHref:d,label:f=`Notifications`,emptyText:h=`You are all caught up.`}=e,[x,S]=_(``),C=g(o);p(()=>{C.current!==o&&(C.current=o,S(o===0?`No unread notifications`:`${A(o)} unread notifications`))},[o]);let w=null;return s?.length?w=y(`div`,{className:`wui-bell-items`,children:s.map((e,t)=>{let n=`wui-bell-item${e.read?` wui-bell-item-read`:``}`,r=b(v,{children:[y(`span`,{className:`wui-bell-dot`,"aria-hidden":`true`}),e.icon&&y(`span`,{className:`wui-bell-icon`,children:y(i,{name:e.icon,size:18})}),b(`span`,{className:`wui-bell-body`,children:[!e.read&&y(`span`,{className:`visually-hidden`,children:`Unread: `}),y(`span`,{className:`wui-bell-item-title`,children:e.title}),e.time&&y(`span`,{className:`wui-bell-when`,children:e.time})]})]});return e.href?y(`a`,{className:n,href:e.href,"data-id":e.id,children:r},e.id??t):y(`div`,{className:n,"data-id":e.id,children:r},e.id??t)})}):c?w=y(`div`,{className:`wui-bell-state`,children:`Loading…`}):s&&(w=y(`div`,{className:`wui-bell-state`,children:h})),b(`div`,{className:`dropdown wui-bell`,ref:a,children:[b(`button`,{type:`button`,id:t,className:`topbar-icon-btn wui-bell-trigger`,"aria-expanded":n,"aria-label":o===0?f:`${f}, ${A(o)} unread`,onClick:()=>{let e=!n;r(e),e&&l?.()},children:[y(i,{name:`notification`,size:20}),y(`span`,{className:`wui-bell-count`,"aria-hidden":`true`,hidden:o===0,children:A(o)})]}),y(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:x}),b(`div`,{className:`dropdown-menu dropdown-menu-end wui-bell-menu${n?` show`:``}`,"aria-labelledby":t,"data-bs-popper":n?`static`:void 0,children:[b(`div`,{className:`wui-bell-head`,children:[y(`span`,{className:`wui-bell-title`,children:f}),u&&y(`button`,{type:`button`,className:`wui-bell-markall`,onClick:u,children:`Mark all read`})]}),y(`div`,{className:`wui-bell-list`,"aria-busy":c||void 0,children:w}),d&&y(`a`,{className:`wui-bell-foot`,href:d,children:`View all`})]})]})}var B=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function se({config:e}){let t=m(),{value:n=``,onChange:r,results:a=null,loading:o=!1,onSelect:s,onSubmit:c,placeholder:l=`Search`}=e,[u,d]=_(!1),[f,v]=_(!1),[x,S]=_({results:null,index:-1}),C=x.results===a?x.index:-1,w=e=>S({results:a,index:e}),T=g(null),E=g(null),D=g([]),O=h(()=>(a??[]).flatMap(e=>e.hits??[]),[a]),k=a!=null&&!f,A=O.length;p(()=>{let e=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||B(e.target)||(e.preventDefault(),d(!0),E.current?.focus())},t=e=>{T.current?.contains(e.target)||(v(!0),d(!1))};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t)}},[]);let j=e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(!k||A===0)return;e.preventDefault(),w((C+(e.key===`ArrowDown`?1:-1)+A)%A)}else e.key===`Enter`?k&&C>=0&&D.current[C]?(e.preventDefault(),D.current[C].click()):c&&n.trim()!==``&&(e.preventDefault(),c(n.trim())):e.key===`Escape`&&(k?(e.preventDefault(),v(!0)):u&&(e.preventDefault(),d(!1)))},M=-1;return D.current=[],b(`div`,{className:`wui-topsearch${u?` is-open`:``}${o?` is-loading`:``}`,ref:T,children:[y(`button`,{type:`button`,className:`topbar-icon-btn wui-topsearch-open`,"aria-label":l,"aria-expanded":u,"aria-controls":`${t}-panel`,onClick:()=>{let e=!u;d(e),e&&E.current?.focus()},children:y(i,{name:`search`,size:20})}),b(`div`,{className:`wui-topsearch-panel`,id:`${t}-panel`,children:[b(`div`,{className:`search-wrap`,children:[y(i,{name:`search`,size:18,className:`search-icon`}),y(`input`,{ref:E,type:`search`,className:`form-control input search-input`,id:`${t}-input`,placeholder:l,"aria-label":l,role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":k,"aria-controls":`${t}-list`,"aria-activedescendant":k&&C>=0?`${t}-opt-${C}`:void 0,autoComplete:`off`,value:n,onChange:e=>{v(!1),r?.(e.target.value)},onKeyDown:j})]}),y(`div`,{className:`wui-topsearch-results`,id:`${t}-list`,role:`listbox`,"aria-label":`Search results`,hidden:!k,children:k&&b(`div`,{className:`wui-topsearch-groups`,role:`presentation`,children:[A===0&&b(`div`,{className:`wui-topsearch-empty`,role:`option`,"aria-disabled":`true`,"aria-selected":`false`,children:[`No results for “`,n,`”`]}),a.filter(e=>e.hits?.length).map((e,n)=>b(`div`,{className:`wui-topsearch-group`,role:`group`,"aria-label":e.label??``,children:[e.label&&y(`div`,{className:`wui-topsearch-group-label`,role:`presentation`,children:e.label}),e.hits.map(e=>{M+=1;let n=M;return b(`a`,{className:`wui-topsearch-hit${n===C?` is-active`:``}`,role:`option`,"aria-selected":n===C,id:`${t}-opt-${n}`,href:e.href,ref:e=>{D.current[n]=e},onClick:t=>s?.(e,t),children:[e.icon&&y(`span`,{className:`wui-topsearch-hit-icon`,children:y(i,{name:e.icon,size:18})}),b(`span`,{className:`wui-topsearch-hit-text`,children:[y(`span`,{className:`wui-topsearch-hit-title`,children:e.title}),e.subtitle&&y(`span`,{className:`wui-topsearch-hit-sub`,children:e.subtitle})]})]},`${e.href}-${n}`)})]},e.label??n))]})})]}),y(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:k?A===0?`No results`:`${A} ${A===1?`result`:`results`}`:``})]})}export{ee as default};
1
+ import{devWarn as e}from"../lib/devWarn.js";import{navMatchScore as t}from"../lib/navMatch.js";import{SHELL_FOLDED_COOKIE as n,readNavFolded as r,readShellCollapsed as i,writeNavFolded as a,writeShellCollapsed as o}from"../lib/shellCookie.js";import{splitMarkerProps as s}from"../lib/wuiMarker.js";import c from"./AppAvatar.js";import l from"./AppIcon.js";import u from"./warnInvalidValue.js";import d from"./warnUnknownProps.js";import{initScrollEdges as f}from"@webority/ui-elements/helpers";import{useEffect as p,useId as m,useMemo as h,useRef as g,useState as _}from"react";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";var x=99,S=4,C=5,w=/^[a-z0-9-]+$/,T=[`prefix`,`exact`],E=[`comfortable`,`compact`],D=[`default`,`primary`],O=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],k=/* @__PURE__ */ new Set([`key`,`label`,`icon`,`iconVariant`,`iconSize`,`href`,`badge`,`badgeTone`,`badgeTitle`,`newUntil`,`trailingIcon`,`active`,`match`,`matchAlso`,`tab`,`tabLabel`,`children`]),A=e=>e>x?`${x}+`:String(e),j=new Intl.DateTimeFormat(`en-CA`,{timeZone:`Asia/Kolkata`}),M=e=>{if(typeof e!=`string`||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=/* @__PURE__ */ new Date(`${e}T00:00:00Z`);return Number.isNaN(t.getTime())||t.toISOString().slice(0,10)!==e?!1:j.format(/* @__PURE__ */ new Date)<=e};function ee(e){let{marker:t,props:c}=s(`AppShell`,e),{groups:m=[],brand:v,sidebarStart:x,sidebarStartCompact:S,sidebarFooter:C,topbarStart:w,topbarEnd:T,footer:k,launcher:A,children:j,collapsed:M,onCollapsedChange:ee,noSidebar:N=!1,density:P=`comfortable`,itemHeight:F,iconVariant:I,topbarTone:L=`default`,navLabel:z=`Main navigation`,linkComponent:B,currentPath:ce,rememberCollapsed:V=!1,collapsedCookie:H=`wui-shell-collapsed`,foldedCookie:U=n,tabBarLabel:le=`Quick navigation`,moreLabel:ue=`More`,userMenu:W,notifications:G,search:K,className:de=``,style:fe,...q}=c;d(`AppShell`,q),u(`AppShell`,`density`,P,E),u(`AppShell`,`topbarTone`,L,D),u(`AppShell`,`iconVariant`,I,O);let pe=F>0?{...fe,"--wui-nav-item-height":`${F}px`}:fe,[me,he]=_(()=>V&&M===void 0&&typeof document<`u`?i(H)??!1:!1),[J,Y]=_(!1),[ge,_e]=_(!1),[ve,ye]=_(!1),X=g(null),be=g(null),xe=g(null),Z=M??me,Se=()=>{let e=!Z;M===void 0&&he(e),V&&o(e,H),ee?.(e)},Ce=m.some(e=>e.collapsible),[we,Te]=_(()=>Ce&&typeof document<`u`?r(U):/* @__PURE__ */ new Set),Ee=e=>{let t=new Set(we);t.has(e)?t.delete(e):t.add(e),Te(t),a(t,U)},Q=h(()=>te(m,ce),[m,ce]),$=N?null:ne(Q);p(()=>{let e=()=>_e(window.scrollY>4);return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),p(()=>{f()},[]),p(()=>{let e=X.current,t=e?.querySelector(`.app-nav-item[aria-current="page"]`);if(!e||!t)return;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();n.top<r.top?e.scrollTop-=r.top-n.top:n.bottom>r.bottom&&(e.scrollTop+=n.bottom-r.bottom)},[]),p(()=>{let e=X.current;if(!e)return;let t=()=>ye(e.scrollHeight>e.clientHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[Q]);let De=!!k;p(()=>{let e=xe.current,t=be.current;if(!De||!e||!t)return;let n=()=>t.style.setProperty(`--app-footer-h`,`${e.offsetHeight}px`);n();let r=typeof ResizeObserver>`u`?null:new ResizeObserver(n);return r?.observe(e),()=>{r?.disconnect(),t.style.removeProperty(`--app-footer-h`)}},[De]),p(()=>{if(!J)return;let e=e=>{e.key===`Escape`&&Y(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[J]);let Oe=[`app-shell`,Z?`collapsed`:``,N?`no-sidebar`:``,J?`mobile-open`:``,de].filter(Boolean).join(` `);return/* @__PURE__ */ b(`div`,{ref:be,className:Oe,"data-density":P===`compact`?`compact`:void 0,"data-wui-folded-cookie":Ce?U:void 0,style:pe,...t,...q,children:[/* @__PURE__ */ y(`a`,{className:`wui-skip-link`,href:`#main-content`,children:`Skip to content`}),/* @__PURE__ */ b(`aside`,{className:`app-sidebar`,children:[v&&/* @__PURE__ */ y(`div`,{className:`app-sidebar-brand`,children:v}),x&&/* @__PURE__ */ y(`div`,{className:`app-sidebar-start`,children:x}),S&&/* @__PURE__ */ y(`div`,{className:`app-sidebar-start-compact`,children:S}),/* @__PURE__ */ y(`nav`,{className:`app-sidebar-scroll`,"aria-label":z,ref:X,tabIndex:ve?0:void 0,children:Q.map((e,t)=>{let n=e.items.map(e=>e.header==null?/* @__PURE__ */ y(ie,{item:e,linkComponent:B,onNavigate:()=>Y(!1),iconVariant:I},e.key??e.href??e.label):/* @__PURE__ */ y(`div`,{className:`wui-nav-header`,children:e.header},e.key??e.header));if(!e.collapsible)return/* @__PURE__ */ b(`div`,{className:`app-nav-group`,children:[e.label&&/* @__PURE__ */ y(`div`,{className:`app-nav-group-label`,children:e.label}),n,e.after&&/* @__PURE__ */ y(`div`,{className:`wui-nav-group-after`,children:e.after})]},e.key??e.label??`group-${t}`);let r=!we.has(e.key)||!!R(e.items),i=`wui-nav-group-${e.key}`;return/* @__PURE__ */ b(`div`,{className:`app-nav-group wui-nav-group-collapsible${r?``:` wui-nav-group-folded`}`,"data-wui-nav-group":e.key,children:[/* @__PURE__ */ b(`button`,{type:`button`,className:`app-nav-group-label wui-nav-group-toggle`,"aria-expanded":r,"aria-controls":i,onClick:()=>Ee(e.key),children:[/* @__PURE__ */ y(`span`,{className:`wui-nav-group-text`,children:e.label}),/* @__PURE__ */ y(`span`,{className:`wui-nav-group-caret`,children:/* @__PURE__ */ y(l,{name:`chevron-down`,size:16})})]}),/* @__PURE__ */ b(`div`,{className:`wui-nav-group-body`,id:i,children:[n,e.after&&/* @__PURE__ */ y(`div`,{className:`wui-nav-group-after`,children:e.after})]})]},e.key??`group-${t}`)})}),C&&/* @__PURE__ */ y(`div`,{className:`app-sidebar-foot`,children:C}),!N&&/* @__PURE__ */ y(`button`,{type:`button`,className:`app-sidebar-toggle`,onClick:Se,"aria-label":Z?`Expand navigation`:`Collapse navigation`,"aria-expanded":!Z,children:/* @__PURE__ */ y(l,{name:`chevrons-left`,size:20})})]}),/* @__PURE__ */ b(`div`,{className:`app-main`,children:[/* @__PURE__ */ b(`header`,{className:`app-topbar${ge?` scrolled`:``}`,"data-tone":L===`primary`?`primary`:void 0,children:[/* @__PURE__ */ b(`div`,{className:`app-topbar-start`,children:[/* @__PURE__ */ y(`button`,{type:`button`,className:`app-topbar-menu`,onClick:()=>Y(!0),"aria-label":`Open navigation`,"aria-expanded":J,children:/* @__PURE__ */ y(l,{name:`menu`,size:18})}),w,K&&/* @__PURE__ */ y(se,{config:K})]}),/* @__PURE__ */ b(`div`,{className:`app-topbar-end`,children:[T,G&&/* @__PURE__ */ y(oe,{config:G}),W&&/* @__PURE__ */ y(ae,{config:W,linkComponent:B})]})]}),/* @__PURE__ */ y(`main`,{className:`app-content`,id:`main-content`,children:j}),k&&/* @__PURE__ */ y(`footer`,{className:`app-footer`,ref:xe,children:k})]}),A&&/* @__PURE__ */ y(`div`,{className:`wui-shell-launcher`,children:A}),$&&/* @__PURE__ */ b(`nav`,{className:`wui-tabbar`,"aria-label":le,children:[$.tabs.map(e=>/* @__PURE__ */ y(re,{tab:e,linkComponent:B,iconVariant:I},e.key??e.href)),$.hasMore&&/* @__PURE__ */ b(`button`,{type:`button`,className:`wui-tabbar-item${$.moreActive?` active`:``}`,onClick:()=>Y(!0),children:[/* @__PURE__ */ y(`span`,{className:`wui-tabbar-icon`,children:/* @__PURE__ */ y(l,{name:`more`,size:24})}),/* @__PURE__ */ y(`span`,{className:`wui-tabbar-label`,children:ue})]})]}),/* @__PURE__ */ y(`button`,{type:`button`,className:`app-scrim`,onClick:()=>Y(!1),"aria-label":`Close navigation`,tabIndex:J?0:-1})]})}function te(e,n){for(let t of e)t.collapsible&&L(t);let r=(e,t=!1)=>(e??[]).map(e=>Array.isArray(e.children)?{...e,children:r(e.children)}:{...e}).filter(e=>P(e)?t:(e.children?.length??0)>0||!!e.href),i=e.map(e=>({...e,items:F(r(e.items,!0))})).filter(e=>e.items.some(e=>!P(e))),a=[],o=e=>{for(let t of e)P(t)||(a.push(t),t.children&&o(t.children))};for(let e of i)o(e.items);for(let e of a)d(`AppShell items`,N(e)),u(`AppShell`,`match`,e.match,T),u(`AppShell`,`iconVariant`,e.iconVariant,O);let s=null;if(n!=null&&!a.some(e=>e.active===!0)){let e=-1;for(let r of a){if(r.active!=null||r.children?.length&&!r.href)continue;let i=t(n,r.href,{exact:r.match===`exact`,also:r.matchAlso});if(i<0)continue;let a=r.match===`exact`&&t(n,r.href,{exact:!0})>=0?1/0:i;a>e&&(e=a,s=r)}}for(let e of a)e.active=e.active??e===s;return i}function N(e){return Object.fromEntries(Object.entries(e).filter(([e])=>!k.has(e)))}var P=e=>e.header!=null;function F(e){return e.filter((t,n)=>{if(!P(t))return!0;let r=e.findIndex((e,t)=>t>n&&P(e));return e.slice(n+1,r<0?void 0:r).length>0})}var I=/* @__PURE__ */ new Set;function L(t){if(t.key!=null&&w.test(t.key))return;let n=t.key==null?`<AppShell> a collapsible group needs a key so its folded state can be remembered.`:`<AppShell> collapsible group key "${t.key}" must use lower-case letters, digits and hyphens.`,r=!0;try{r=process.env.NODE_ENV!==`production`}catch{r=!0}r&&!I.has(n)&&(I.add(n),e(n))}function ne(e){let t=[],n=e=>{for(let r of e)P(r)||(r.children?.length?n(r.children):t.push(r))};for(let t of e)n(t.items);let r=t.filter(e=>e.tab);if(r.length===0)return null;let i=r.length<t.length,a=i?S:C;if(r.length>a)throw Error(`<AppShell>: ${r.length} items carry tab: true, but the phone tab bar holds ${a} (${i?`4 plus More, because other items exist`:`5 when every item is a tab`}). Flag fewer items.`);return{tabs:r,hasMore:i,moreActive:t.some(e=>!e.tab&&e.active)}}function re({tab:e,linkComponent:t,iconVariant:n}){let r=`wui-tabbar-item${e.active?` active`:``}`,i=/* @__PURE__ */ b(v,{children:[e.icon&&/* @__PURE__ */ y(`span`,{className:`wui-tabbar-icon`,children:typeof e.icon==`string`?/* @__PURE__ */ y(l,{name:e.icon,size:24,variant:e.iconVariant??n}):e.icon}),/* @__PURE__ */ y(`span`,{className:`wui-tabbar-label`,children:e.tabLabel??e.label}),e.badge!=null&&/* @__PURE__ */ y(`span`,{className:`wui-tabbar-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge})]}),a=e.active?`page`:void 0;return t?/* @__PURE__ */ y(t,{className:r,to:e.href,"aria-current":a,children:i}):/* @__PURE__ */ y(`a`,{className:r,href:e.href,"aria-current":a,children:i})}function R(e){for(let t of e){if(t.active)return t;let e=t.children?.length?R(t.children):void 0;if(e)return e}}function ie({item:e,linkComponent:t,onNavigate:n,depth:r=0,iconVariant:i}){let a=r>0,o=r>1?` wui-nav-depth-${Math.min(r,6)}`:``,s=Array.isArray(e.children)&&e.children.length>0,c=s?R(e.children):void 0,u=!!c,d=c?c.key??c.href??c.label:null,[f,m]=_(u);p(()=>{d!=null&&m(!0)},[d]);let h=typeof e.label==`string`?e.label:void 0,g=!a&&e.icon&&/* @__PURE__ */ y(`span`,{className:`app-nav-icon`,children:typeof e.icon==`string`?/* @__PURE__ */ y(l,{name:e.icon,size:e.iconSize??22,variant:e.iconVariant??i}):e.icon}),x=e.badge!=null&&/* @__PURE__ */ y(`span`,{className:`app-nav-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge}),S=M(e.newUntil)&&/* @__PURE__ */ y(`span`,{className:`wui-nav-new`,children:`New`}),C=/* @__PURE__ */ b(v,{children:[g,/* @__PURE__ */ y(`span`,{className:`app-nav-text`,children:e.label}),S,x,e.trailingIcon&&/* @__PURE__ */ y(`span`,{className:`app-nav-trailing`,children:typeof e.trailingIcon==`string`?/* @__PURE__ */ y(l,{name:e.trailingIcon,size:16}):e.trailingIcon})]}),w=e.active?`page`:void 0;if(s){let s=/* @__PURE__ */ y(`div`,{className:`app-nav-sub${f?` expanded`:``}`,inert:!f,"aria-hidden":!f||void 0,children:/* @__PURE__ */ y(`div`,{className:`app-nav-sub-inner`,children:e.children.map(e=>/* @__PURE__ */ y(ie,{item:e,linkComponent:t,onNavigate:n,depth:r+1,iconVariant:i},e.key??e.href))})});if(e.href){let r=t?/* @__PURE__ */ y(t,{className:`wui-nav-split-link`,to:e.href,"aria-current":w,onClick:n,children:C}):/* @__PURE__ */ y(`a`,{className:`wui-nav-split-link`,href:e.href,"aria-current":w,onClick:n,children:C});return/* @__PURE__ */ b(v,{children:[/* @__PURE__ */ b(`div`,{className:`app-nav-item has-children wui-nav-split${a?` app-nav-subitem`:``}${u||e.active?` active`:``}${o}`,"data-label":h,children:[r,/* @__PURE__ */ y(`button`,{type:`button`,className:`app-nav-caret wui-nav-split-toggle`,"aria-expanded":f,"aria-label":`Show or hide ${h??``} pages`,onClick:()=>m(e=>!e),children:/* @__PURE__ */ y(l,{name:`chevron-right`,size:16})})]}),s]})}return/* @__PURE__ */ b(v,{children:[/* @__PURE__ */ b(`button`,{type:`button`,className:`app-nav-item${a?` app-nav-subitem`:``} has-children${u?` active`:``}${o}`,"aria-expanded":f,"data-label":h,onClick:()=>m(e=>!e),children:[g,/* @__PURE__ */ y(`span`,{className:`app-nav-text`,children:e.label}),S,x,/* @__PURE__ */ y(`span`,{className:`app-nav-caret`,children:/* @__PURE__ */ y(l,{name:`chevron-right`,size:16})})]}),s]})}let T=`app-nav-item${a?` app-nav-subitem`:``}${e.active?` active`:``}${o}`;return t?/* @__PURE__ */ y(t,{className:T,to:e.href,"aria-current":w,"data-label":h,onClick:n,children:C}):/* @__PURE__ */ y(`a`,{className:T,href:e.href,"aria-current":w,"data-label":h,onClick:n,children:C})}function z(){let[e,t]=_(!1),n=g(null);return p(()=>{if(!e)return;let r=e=>{n.current?.contains(e.target)||t(!1)},i=e=>{e.key===`Escape`&&(t(!1),n.current?.querySelector(`button`)?.focus())};return document.addEventListener(`mousedown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,r),document.removeEventListener(`keydown`,i)}},[e]),{open:e,setOpen:t,ref:n}}function ae({config:e,linkComponent:t}){let n=m(),{open:r,setOpen:i,ref:a}=z(),{name:o,role:s,roles:u=[],photo:d,profileHref:f,profileLabel:p=`My profile`,onLogout:h,logoutAction:g,logoutLabel:_=`Sign out`,items:x=[]}=e;if(!o)throw Error(`<AppShell> userMenu.name is required; the trigger and the avatar are named from it.`);let S=u.map(e=>(e??``).trim()).filter(Boolean),C=()=>i(!1),w=(e,n,r,i)=>t?/* @__PURE__ */ y(t,{className:`dropdown-item`,to:e,onClick:i,children:n},r):/* @__PURE__ */ y(`a`,{className:`dropdown-item`,href:e,onClick:i,children:n},r),T=/* @__PURE__ */ b(v,{children:[/* @__PURE__ */ y(l,{name:`log-out`,size:18}),_]});return/* @__PURE__ */ b(`div`,{className:`dropdown wui-usermenu`,ref:a,children:[/* @__PURE__ */ b(`button`,{type:`button`,id:n,className:`wui-usermenu-trigger`,"aria-expanded":r,"aria-label":`Account menu for ${o}`,onClick:()=>i(e=>!e),children:[/* @__PURE__ */ y(c,{name:o,src:d,tone:`auto`}),/* @__PURE__ */ b(`span`,{className:`wui-usermenu-text`,children:[/* @__PURE__ */ y(`span`,{className:`wui-usermenu-name`,children:o}),s&&/* @__PURE__ */ y(`span`,{className:`wui-usermenu-role`,children:s})]}),/* @__PURE__ */ y(l,{name:`chevron-down`,size:14,className:`wui-usermenu-caret`})]}),/* @__PURE__ */ b(`div`,{className:`dropdown-menu dropdown-menu-end wui-usermenu-menu${r?` show`:``}`,"aria-labelledby":n,"data-bs-popper":r?`static`:void 0,children:[/* @__PURE__ */ b(`div`,{className:`wui-usermenu-head`,children:[/* @__PURE__ */ y(c,{name:o,src:d,size:`lg`,tone:`auto`}),/* @__PURE__ */ b(`div`,{className:`wui-usermenu-who`,children:[/* @__PURE__ */ y(`div`,{className:`wui-usermenu-name`,children:o}),s&&/* @__PURE__ */ y(`div`,{className:`wui-usermenu-role`,children:s}),S.length>0&&/* @__PURE__ */ b(`div`,{className:`wui-usermenu-roles`,children:[/* @__PURE__ */ y(`span`,{className:`wui-usermenu-roles-label`,children:S.length===1?`Role:`:`Roles:`}),` ${S.join(`, `)}`]})]})]}),f&&w(f,/* @__PURE__ */ b(v,{children:[/* @__PURE__ */ y(l,{name:`user`,size:18}),p]}),void 0,C),x.map(e=>{if(e.divider)return/* @__PURE__ */ y(`hr`,{className:`dropdown-divider`},e.key);let t=/* @__PURE__ */ b(v,{children:[e.icon&&/* @__PURE__ */ y(l,{name:e.icon,size:18}),e.label]}),n=()=>{e.onClick?.(),C()};return e.href?w(e.href,t,e.key,n):/* @__PURE__ */ y(`button`,{type:`button`,className:`dropdown-item`,onClick:n,children:t},e.key)}),g?/* @__PURE__ */ y(`form`,{method:`post`,action:g,className:`wui-usermenu-logout`,children:/* @__PURE__ */ y(`button`,{type:`submit`,className:`dropdown-item danger`,children:T})}):h&&/* @__PURE__ */ y(`button`,{type:`button`,className:`dropdown-item danger`,onClick:()=>{C(),h()},children:T})]})]})}function oe({config:e}){let t=m(),{open:n,setOpen:r,ref:i}=z(),{unread:a=0,items:o,loading:s=!1,onOpen:c,onMarkAllRead:u,viewAllHref:d,label:f=`Notifications`,emptyText:h=`You are all caught up.`}=e,[x,S]=_(``),C=g(a);p(()=>{C.current!==a&&(C.current=a,S(a===0?`No unread notifications`:`${A(a)} unread notifications`))},[a]);let w=null;return o?.length?w=/* @__PURE__ */ y(`div`,{className:`wui-bell-items`,children:o.map((e,t)=>{let n=`wui-bell-item${e.read?` wui-bell-item-read`:``}`,r=/* @__PURE__ */ b(v,{children:[/* @__PURE__ */ y(`span`,{className:`wui-bell-dot`,"aria-hidden":`true`}),e.icon&&/* @__PURE__ */ y(`span`,{className:`wui-bell-icon`,children:/* @__PURE__ */ y(l,{name:e.icon,size:18})}),/* @__PURE__ */ b(`span`,{className:`wui-bell-body`,children:[!e.read&&/* @__PURE__ */ y(`span`,{className:`visually-hidden`,children:`Unread: `}),/* @__PURE__ */ y(`span`,{className:`wui-bell-item-title`,children:e.title}),e.time&&/* @__PURE__ */ y(`span`,{className:`wui-bell-when`,children:e.time})]})]});return e.href?/* @__PURE__ */ y(`a`,{className:n,href:e.href,"data-id":e.id,children:r},e.id??t):/* @__PURE__ */ y(`div`,{className:n,"data-id":e.id,children:r},e.id??t)})}):s?w=/* @__PURE__ */ y(`div`,{className:`wui-bell-state`,children:`Loading…`}):o&&(w=/* @__PURE__ */ y(`div`,{className:`wui-bell-state`,children:h})),/* @__PURE__ */ b(`div`,{className:`dropdown wui-bell`,ref:i,children:[/* @__PURE__ */ b(`button`,{type:`button`,id:t,className:`topbar-icon-btn wui-bell-trigger`,"aria-expanded":n,"aria-label":a===0?f:`${f}, ${A(a)} unread`,onClick:()=>{let e=!n;r(e),e&&c?.()},children:[/* @__PURE__ */ y(l,{name:`notification`,size:20}),/* @__PURE__ */ y(`span`,{className:`wui-bell-count`,"aria-hidden":`true`,hidden:a===0,children:A(a)})]}),/* @__PURE__ */ y(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:x}),/* @__PURE__ */ b(`div`,{className:`dropdown-menu dropdown-menu-end wui-bell-menu${n?` show`:``}`,"aria-labelledby":t,"data-bs-popper":n?`static`:void 0,children:[/* @__PURE__ */ b(`div`,{className:`wui-bell-head`,children:[/* @__PURE__ */ y(`span`,{className:`wui-bell-title`,children:f}),u&&/* @__PURE__ */ y(`button`,{type:`button`,className:`wui-bell-markall`,onClick:u,children:`Mark all read`})]}),/* @__PURE__ */ y(`div`,{className:`wui-bell-list`,"aria-busy":s||void 0,children:w}),d&&/* @__PURE__ */ y(`a`,{className:`wui-bell-foot`,href:d,children:`View all`})]})]})}var B=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function se({config:e}){let t=m(),{value:n=``,onChange:r,results:i=null,loading:a=!1,onSelect:o,onSubmit:s,placeholder:c=`Search`}=e,[u,d]=_(!1),[f,v]=_(!1),[x,S]=_({results:null,index:-1}),C=x.results===i?x.index:-1,w=e=>S({results:i,index:e}),T=g(null),E=g(null),D=g([]),O=h(()=>(i??[]).flatMap(e=>e.hits??[]),[i]),k=i!=null&&!f,A=O.length;p(()=>{let e=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||B(e.target)||(e.preventDefault(),d(!0),E.current?.focus())},t=e=>{T.current?.contains(e.target)||(v(!0),d(!1))};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t)}},[]);let j=e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(!k||A===0)return;e.preventDefault(),w((C+(e.key===`ArrowDown`?1:-1)+A)%A)}else e.key===`Enter`?k&&C>=0&&D.current[C]?(e.preventDefault(),D.current[C].click()):s&&n.trim()!==``&&(e.preventDefault(),s(n.trim())):e.key===`Escape`&&(k?(e.preventDefault(),v(!0)):u&&(e.preventDefault(),d(!1)))},M=-1;return D.current=[],/* @__PURE__ */ b(`div`,{className:`wui-topsearch${u?` is-open`:``}${a?` is-loading`:``}`,ref:T,children:[/* @__PURE__ */ y(`button`,{type:`button`,className:`topbar-icon-btn wui-topsearch-open`,"aria-label":c,"aria-expanded":u,"aria-controls":`${t}-panel`,onClick:()=>{let e=!u;d(e),e&&E.current?.focus()},children:/* @__PURE__ */ y(l,{name:`search`,size:20})}),/* @__PURE__ */ b(`div`,{className:`wui-topsearch-panel`,id:`${t}-panel`,children:[/* @__PURE__ */ b(`div`,{className:`search-wrap`,children:[/* @__PURE__ */ y(l,{name:`search`,size:18,className:`search-icon`}),/* @__PURE__ */ y(`input`,{ref:E,type:`search`,className:`form-control input search-input`,id:`${t}-input`,placeholder:c,"aria-label":c,role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":k,"aria-controls":`${t}-list`,"aria-activedescendant":k&&C>=0?`${t}-opt-${C}`:void 0,autoComplete:`off`,value:n,onChange:e=>{v(!1),r?.(e.target.value)},onKeyDown:j})]}),/* @__PURE__ */ y(`div`,{className:`wui-topsearch-results`,id:`${t}-list`,role:`listbox`,"aria-label":`Search results`,hidden:!k,children:k&&/* @__PURE__ */ b(`div`,{className:`wui-topsearch-groups`,role:`presentation`,children:[A===0&&/* @__PURE__ */ b(`div`,{className:`wui-topsearch-empty`,role:`option`,"aria-disabled":`true`,"aria-selected":`false`,children:[`No results for “`,n,`”`]}),i.filter(e=>e.hits?.length).map((e,n)=>/* @__PURE__ */ b(`div`,{className:`wui-topsearch-group`,role:`group`,"aria-label":e.label??``,children:[e.label&&/* @__PURE__ */ y(`div`,{className:`wui-topsearch-group-label`,role:`presentation`,children:e.label}),e.hits.map(e=>{M+=1;let n=M;return/* @__PURE__ */ b(`a`,{className:`wui-topsearch-hit${n===C?` is-active`:``}`,role:`option`,"aria-selected":n===C,id:`${t}-opt-${n}`,href:e.href,ref:e=>{D.current[n]=e},onClick:t=>o?.(e,t),children:[e.icon&&/* @__PURE__ */ y(`span`,{className:`wui-topsearch-hit-icon`,children:/* @__PURE__ */ y(l,{name:e.icon,size:18})}),/* @__PURE__ */ b(`span`,{className:`wui-topsearch-hit-text`,children:[/* @__PURE__ */ y(`span`,{className:`wui-topsearch-hit-title`,children:e.title}),e.subtitle&&/* @__PURE__ */ y(`span`,{className:`wui-topsearch-hit-sub`,children:e.subtitle})]})]},`${e.href}-${n}`)})]},e.label??n))]})})]}),/* @__PURE__ */ y(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:k?A===0?`No results`:`${A} ${A===1?`result`:`results`}`:``})]})}export{ee as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{shortcutChip as n}from"../lib/shortcutChip.js";import r from"./AppIcon.js";import{SHORTCUT_EVENT as i,SHORTCUT_TEXT as a,shortcutKey as o}from"@webority/ui-elements/helpers";import{useEffect as s,useId as c,useRef as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import"@webority/ui-elements/elements/shortcuts";var f=`wui-shortcuts-open-change`;function p(e){let t=[],n=new Map;for(let r of e){let e=r.group?.trim();e?n.has(e)?n.get(e).rows.push(r):n.set(e,{title:e,rows:[r]}):t.push(r)}return[{title:null,rows:t},...n.values()].filter(e=>e.rows.length>0)}function m(e){return u(`dl`,{className:`wui-shortcut-keys`,children:e.map(e=>d(`div`,{"data-shortcut":o(e.key),children:[u(`dt`,{children:u(`kbd`,{className:`wui-kbd`,children:o(e.key)})}),u(`dd`,{children:e.label})]},o(e.key)))})}function h(h){let{marker:g,props:_}=e(`AppShortcutLegend`,h),{shortcuts:v=[],items:y,search:b,open:x,onOpenChange:S,trigger:C=!0,className:w=``,...T}=_;t(`AppShortcutLegend`,T);let E=c(),D=l(null),O=v.filter(e=>o(e.key)!==`?`),k=p(O),A={key:`?`,label:a.help};k.length?k.at(-1).rows.push(A):k.push({title:null,rows:[A]});let j=k.find(e=>!e.title),M=k.filter(e=>e.title),N=l(O);N.current=O,s(()=>{let e=D.current;if(!e)return;let t=e=>{let t=N.current.find(t=>o(t.key)===e.detail.key&&typeof t.onPress==`function`);t&&(e.preventDefault(),t.onPress(e.detail.itemKey))};return e.addEventListener(i,t),()=>e.removeEventListener(i,t)},[]);let P=l(S);return P.current=S,s(()=>{let e=D.current;if(!e)return;let t=t=>{t.target===e&&P.current?.(t.detail.open)};return e.addEventListener(f,t),()=>e.removeEventListener(f,t)},[]),d(`wui-shortcuts`,{ref:D,class:[`wui-shortcut-legend`,w].filter(Boolean).join(` `),items:y||void 0,search:b||void 0,open:x,"no-trigger":C?void 0:``,...g,...T,children:[C&&d(`button`,{type:`button`,className:`wui-shortcut-toggle`,"aria-haspopup":`dialog`,"aria-expanded":`false`,"aria-controls":E,"aria-keyshortcuts":`?`,children:[n(`?`),` ${a.title}`]}),d(`div`,{className:`wui-shortcut-sheet`,id:E,role:`dialog`,"aria-label":a.title,hidden:!0,children:[d(`div`,{className:`wui-shortcut-sheet-head`,children:[u(`span`,{className:`wui-shortcut-sheet-title`,children:a.title}),u(`button`,{type:`button`,className:`wui-shortcut-close`,"aria-label":a.close,children:u(r,{name:`x`,size:16})})]}),j&&m(j.rows),M.map(e=>d(`section`,{className:`wui-shortcut-group`,children:[u(`h3`,{className:`wui-shortcut-group-title`,children:e.title}),m(e.rows)]},e.title))]})]})}export{h as default};
1
+ import{shortcutChip as e}from"../lib/shortcutChip.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppIcon.js";import r from"./warnUnknownProps.js";import{SHORTCUT_EVENT as i,SHORTCUT_TEXT as a,shortcutKey as o}from"@webority/ui-elements/helpers";import{useEffect as s,useId as c,useRef as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import"@webority/ui-elements/elements/shortcuts";var f=`wui-shortcuts-open-change`;function p(e){let t=[],n=/* @__PURE__ */ new Map;for(let r of e){let e=r.group?.trim();e?n.has(e)?n.get(e).rows.push(r):n.set(e,{title:e,rows:[r]}):t.push(r)}return[{title:null,rows:t},...n.values()].filter(e=>e.rows.length>0)}function m(e){return/* @__PURE__ */ u(`dl`,{className:`wui-shortcut-keys`,children:e.map(e=>/* @__PURE__ */ d(`div`,{"data-shortcut":o(e.key),children:[/* @__PURE__ */ u(`dt`,{children:/* @__PURE__ */ u(`kbd`,{className:`wui-kbd`,children:o(e.key)})}),/* @__PURE__ */ u(`dd`,{children:e.label})]},o(e.key)))})}function h(h){let{marker:g,props:_}=t(`AppShortcutLegend`,h),{shortcuts:v=[],items:y,search:b,open:x,onOpenChange:S,trigger:C=!0,className:w=``,...T}=_;r(`AppShortcutLegend`,T);let E=c(),D=l(null),O=v.filter(e=>o(e.key)!==`?`),k=p(O),A={key:`?`,label:a.help};k.length?k.at(-1).rows.push(A):k.push({title:null,rows:[A]});let j=k.find(e=>!e.title),M=k.filter(e=>e.title),N=l(O);N.current=O,s(()=>{let e=D.current;if(!e)return;let t=e=>{let t=N.current.find(t=>o(t.key)===e.detail.key&&typeof t.onPress==`function`);t&&(e.preventDefault(),t.onPress(e.detail.itemKey))};return e.addEventListener(i,t),()=>e.removeEventListener(i,t)},[]);let P=l(S);return P.current=S,s(()=>{let e=D.current;if(!e)return;let t=t=>{t.target===e&&P.current?.(t.detail.open)};return e.addEventListener(f,t),()=>e.removeEventListener(f,t)},[]),/* @__PURE__ */ d(`wui-shortcuts`,{ref:D,class:[`wui-shortcut-legend`,w].filter(Boolean).join(` `),items:y||void 0,search:b||void 0,open:x,"no-trigger":C?void 0:``,...g,...T,children:[C&&/* @__PURE__ */ d(`button`,{type:`button`,className:`wui-shortcut-toggle`,"aria-haspopup":`dialog`,"aria-expanded":`false`,"aria-controls":E,"aria-keyshortcuts":`?`,children:[e(`?`),` ${a.title}`]}),/* @__PURE__ */ d(`div`,{className:`wui-shortcut-sheet`,id:E,role:`dialog`,"aria-label":a.title,hidden:!0,children:[/* @__PURE__ */ d(`div`,{className:`wui-shortcut-sheet-head`,children:[/* @__PURE__ */ u(`span`,{className:`wui-shortcut-sheet-title`,children:a.title}),/* @__PURE__ */ u(`button`,{type:`button`,className:`wui-shortcut-close`,"aria-label":a.close,children:/* @__PURE__ */ u(n,{name:`x`,size:16})})]}),j&&m(j.rows),M.map(e=>/* @__PURE__ */ d(`section`,{className:`wui-shortcut-group`,children:[/* @__PURE__ */ u(`h3`,{className:`wui-shortcut-group-title`,children:e.title}),m(e.rows)]},e.title))]})]})}export{h as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{useId as n,useLayoutEffect as r,useRef as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/show-more";function s(s){let{marker:c,props:l}=e(`AppShowMore`,s),{children:u,lines:d=3,moreLabel:f=`Show more`,lessLabel:p=`Show less`,defaultExpanded:m=!1,id:h,className:g=``,..._}=l;t(`AppShowMore`,_);let v=n(),y=h||`show-more-${v.replace(/:/g,``)}`,b=`${y}-body`,x=i(null),S=i(m);return r(()=>{S.current&&x.current.toggle(!0)},[]),o(`wui-show-more`,{ref:x,class:[`wui-show-more`,g].filter(Boolean).join(` `),id:y,lines:d===3?void 0:String(d),"more-label":f===`Show more`?void 0:f,"less-label":p===`Show less`?void 0:p,...c,..._,children:[a(`div`,{className:`wui-show-more-body`,id:b,children:u}),a(`button`,{type:`button`,className:`btn btn-link btn-sm wui-show-more-toggle`,"aria-expanded":S.current?`true`:`false`,"aria-controls":b,hidden:!0,children:S.current?p:f})]})}export{s as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{useId as n,useLayoutEffect as r,useRef as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/show-more";function s(s){let{marker:c,props:l}=e(`AppShowMore`,s),{children:u,lines:d=3,moreLabel:f=`Show more`,lessLabel:p=`Show less`,defaultExpanded:m=!1,id:h,className:g=``,..._}=l;t(`AppShowMore`,_);let v=n(),y=h||`show-more-${v.replace(/:/g,``)}`,b=`${y}-body`,x=i(null),S=i(m);return r(()=>{S.current&&x.current.toggle(!0)},[]),/* @__PURE__ */ o(`wui-show-more`,{ref:x,class:[`wui-show-more`,g].filter(Boolean).join(` `),id:y,lines:d===3?void 0:String(d),"more-label":f===`Show more`?void 0:f,"less-label":p===`Show less`?void 0:p,...c,..._,children:[/* @__PURE__ */ a(`div`,{className:`wui-show-more-body`,id:b,children:u}),/* @__PURE__ */ a(`button`,{type:`button`,className:`btn btn-link btn-sm wui-show-more-toggle`,"aria-expanded":S.current?`true`:`false`,"aria-controls":b,hidden:!0,children:S.current?p:f})]})}export{s as default};