@webority/ui-react 0.121.0 → 0.124.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/canvas-kit/kit.css +2 -0
  2. package/dist/canvas-kit/kit.js +33568 -34365
  3. package/dist/canvas-kit/manifest.json +240 -3
  4. package/dist/canvas-kit/release.json +8 -8
  5. package/dist/components/AppAccordion.js +1 -1
  6. package/dist/components/AppActionIcon.js +1 -1
  7. package/dist/components/AppAlert.js +1 -1
  8. package/dist/components/AppAsyncBlock.js +1 -1
  9. package/dist/components/AppAutocomplete.js +1 -1
  10. package/dist/components/AppAvatar.js +1 -1
  11. package/dist/components/AppAvatarGroup.js +1 -1
  12. package/dist/components/AppBadge.js +1 -1
  13. package/dist/components/AppBanner.js +1 -1
  14. package/dist/components/AppBreadcrumbs.js +1 -1
  15. package/dist/components/AppButton.js +1 -1
  16. package/dist/components/AppButtonGroup.js +1 -1
  17. package/dist/components/AppCalendar.js +1 -1
  18. package/dist/components/AppCard.js +1 -1
  19. package/dist/components/AppCarousel.js +1 -1
  20. package/dist/components/AppChart.js +1 -1
  21. package/dist/components/AppChartCard.js +1 -1
  22. package/dist/components/AppCheckbox.js +1 -1
  23. package/dist/components/AppChip.js +1 -1
  24. package/dist/components/AppChipGroup.js +1 -1
  25. package/dist/components/AppChoiceCard.js +1 -1
  26. package/dist/components/AppChoiceChip.js +1 -1
  27. package/dist/components/AppCodeBlock.js +1 -1
  28. package/dist/components/AppColorField.js +1 -1
  29. package/dist/components/AppColumnMenu.js +1 -1
  30. package/dist/components/AppCommandPalette.js +1 -1
  31. package/dist/components/AppCommentThread.js +1 -1
  32. package/dist/components/AppCompareTable.js +1 -1
  33. package/dist/components/AppConfirmDialog.js +1 -1
  34. package/dist/components/AppConfirmProvider.js +1 -0
  35. package/dist/components/AppConsentBanner.js +1 -1
  36. package/dist/components/AppContextMenu.js +1 -1
  37. package/dist/components/AppCopyButton.js +1 -1
  38. package/dist/components/AppCountryFlag.js +1 -1
  39. package/dist/components/AppCountrySelect.js +1 -1
  40. package/dist/components/AppDashboardCell.js +1 -1
  41. package/dist/components/AppDashboardGrid.js +1 -1
  42. package/dist/components/AppDataTable.js +1 -1
  43. package/dist/components/AppDatePicker.js +1 -1
  44. package/dist/components/AppDateRangePicker.js +1 -1
  45. package/dist/components/AppDescriptions.js +1 -1
  46. package/dist/components/AppDetailPane.js +1 -1
  47. package/dist/components/AppDrawer.js +1 -1
  48. package/dist/components/AppDropZone.js +1 -1
  49. package/dist/components/AppDropdown.js +1 -1
  50. package/dist/components/AppDueDate.js +1 -1
  51. package/dist/components/AppEmptyState.js +1 -1
  52. package/dist/components/AppErrorSummary.js +1 -1
  53. package/dist/components/AppFileAttachment.js +1 -1
  54. package/dist/components/AppFilePicker.js +1 -1
  55. package/dist/components/AppFileTiles.js +1 -1
  56. package/dist/components/AppFileViewer.js +1 -1
  57. package/dist/components/AppFilterBar.js +1 -1
  58. package/dist/components/AppFloatingDock.js +1 -1
  59. package/dist/components/AppFormActions.js +1 -1
  60. package/dist/components/AppFormRow.js +1 -1
  61. package/dist/components/AppFormSection.js +1 -1
  62. package/dist/components/AppHoverCard.js +1 -1
  63. package/dist/components/AppIcon.js +1 -1
  64. package/dist/components/AppImagePicker.js +1 -1
  65. package/dist/components/AppInfoTip.js +1 -1
  66. package/dist/components/AppInlineEdit.js +1 -1
  67. package/dist/components/AppInput.js +1 -1
  68. package/dist/components/AppInputGroup.js +1 -1
  69. package/dist/components/AppKanban.js +1 -1
  70. package/dist/components/AppKbd.js +1 -1
  71. package/dist/components/AppKpiTile.js +1 -1
  72. package/dist/components/AppLightbox.js +1 -1
  73. package/dist/components/AppLink.js +1 -1
  74. package/dist/components/AppMarkdown.js +1 -1
  75. package/dist/components/AppMentionInput.js +1 -1
  76. package/dist/components/AppMeter.js +1 -1
  77. package/dist/components/AppMetricStrip.js +1 -1
  78. package/dist/components/AppModal.js +1 -1
  79. package/dist/components/AppMultiSelect.js +1 -1
  80. package/dist/components/AppNavList.js +1 -1
  81. package/dist/components/AppNavigationMenu.js +1 -1
  82. package/dist/components/AppNotificationCenter.js +1 -1
  83. package/dist/components/AppNumberInput.js +1 -1
  84. package/dist/components/AppOnboardingChecklist.js +1 -1
  85. package/dist/components/AppOtpInput.js +1 -1
  86. package/dist/components/AppPageHeader.js +1 -1
  87. package/dist/components/AppPhoneNumberInput.js +1 -1
  88. package/dist/components/AppPopover.js +1 -1
  89. package/dist/components/AppPricingCard.js +1 -1
  90. package/dist/components/AppProgress.js +1 -1
  91. package/dist/components/AppQrCode.js +1 -1
  92. package/dist/components/AppRadio.js +1 -1
  93. package/dist/components/AppRadioGroup.js +1 -1
  94. package/dist/components/AppRating.js +1 -1
  95. package/dist/components/AppRecordPager.js +1 -1
  96. package/dist/components/AppRelativeTime.js +1 -1
  97. package/dist/components/AppRepeater.js +1 -1
  98. package/dist/components/AppRequiredMark.js +1 -1
  99. package/dist/components/AppResizable.js +1 -1
  100. package/dist/components/AppResizableHandle.js +1 -1
  101. package/dist/components/AppResizablePanel.js +1 -1
  102. package/dist/components/AppResourceCard.js +1 -1
  103. package/dist/components/AppResult.js +1 -1
  104. package/dist/components/AppRichText.js +1 -1
  105. package/dist/components/AppRollingNumber.js +1 -1
  106. package/dist/components/AppRouteError.js +1 -1
  107. package/dist/components/AppRowSwitch.js +1 -0
  108. package/dist/components/AppScoreScale.js +1 -1
  109. package/dist/components/AppScrollbar.js +1 -1
  110. package/dist/components/AppSearch.js +1 -1
  111. package/dist/components/AppSectionCallToAction.js +1 -1
  112. package/dist/components/AppSectionFaq.js +1 -1
  113. package/dist/components/AppSectionFeatures.js +1 -1
  114. package/dist/components/AppSectionHero.js +1 -1
  115. package/dist/components/AppSectionLeadCapture.js +1 -1
  116. package/dist/components/AppSectionLogos.js +1 -1
  117. package/dist/components/AppSectionPricing.js +1 -1
  118. package/dist/components/AppSectionTestimonials.js +1 -1
  119. package/dist/components/AppSegmented.js +1 -1
  120. package/dist/components/AppSelect.js +1 -1
  121. package/dist/components/AppSeoHead.js +1 -1
  122. package/dist/components/AppShell.js +1 -1
  123. package/dist/components/AppShortcutLegend.js +1 -1
  124. package/dist/components/AppShowMore.js +1 -1
  125. package/dist/components/AppSkeleton.js +1 -1
  126. package/dist/components/AppSkeletonLines.js +1 -1
  127. package/dist/components/AppSlider.js +1 -1
  128. package/dist/components/AppSortableList.js +1 -1
  129. package/dist/components/AppSparkline.js +1 -1
  130. package/dist/components/AppSpinner.js +1 -1
  131. package/dist/components/AppSplash.js +1 -1
  132. package/dist/components/AppSplitButton.js +1 -1
  133. package/dist/components/AppSplitView.js +1 -1
  134. package/dist/components/AppStatusBadge.js +1 -1
  135. package/dist/components/AppStepper.js +1 -1
  136. package/dist/components/AppSwitch.js +1 -1
  137. package/dist/components/AppTablePagination.js +1 -1
  138. package/dist/components/AppTableToolbar.js +1 -1
  139. package/dist/components/AppTabs.js +1 -1
  140. package/dist/components/AppTagInput.js +1 -1
  141. package/dist/components/AppTextarea.js +1 -1
  142. package/dist/components/AppThemeToggle.js +1 -1
  143. package/dist/components/AppTimePicker.js +1 -1
  144. package/dist/components/AppTimeline.js +1 -1
  145. package/dist/components/AppToast.js +1 -1
  146. package/dist/components/AppToolbar.js +1 -1
  147. package/dist/components/AppTooltip.js +1 -1
  148. package/dist/components/AppTour.js +1 -1
  149. package/dist/components/AppTreeView.js +1 -1
  150. package/dist/components/AppTruncate.js +1 -1
  151. package/dist/components/AppUpdateBar.js +1 -1
  152. package/dist/components/AppWhatsNew.js +1 -1
  153. package/dist/components/AppWizard.js +1 -1
  154. package/dist/components/AppWorkspaceSwitcher.js +1 -1
  155. package/dist/components/ModalIcons.js +1 -1
  156. package/dist/components/iconCatalogNames.g.js +1 -1
  157. package/dist/components/iconGlyphs.g.js +1 -1
  158. package/dist/components/iconVariants.g.js +1 -1
  159. package/dist/components/toast.js +1 -1
  160. package/dist/components/toastStore.js +1 -1
  161. package/dist/components/useWuiControl.js +1 -1
  162. package/dist/components/warnInvalidValue.js +1 -1
  163. package/dist/components/warnUnknownProps.js +1 -1
  164. package/dist/components/withTooltip.js +1 -1
  165. package/dist/guidance.json +60 -1
  166. package/dist/lib/CheckField.js +1 -1
  167. package/dist/lib/DiscardPrompt.js +1 -1
  168. package/dist/lib/FieldMessage.js +1 -1
  169. package/dist/lib/FileItemRow.js +1 -1
  170. package/dist/lib/FocusPanel.js +1 -1
  171. package/dist/lib/emptyIllustration.js +1 -1
  172. package/dist/lib/fileItem.js +1 -1
  173. package/dist/lib/flagStyles.js +1 -0
  174. package/dist/lib/initials.js +1 -1
  175. package/dist/lib/pageScrollLock.js +1 -0
  176. package/dist/lib/qrCode.js +1 -1
  177. package/dist/lib/sectionShell.js +1 -1
  178. package/dist/lib/shellCookie.js +1 -1
  179. package/dist/lib/shortcutChip.js +1 -1
  180. package/dist/lib/useFileDrop.js +1 -1
  181. package/dist/lib/useFloatingStack.js +1 -1
  182. package/dist/lib/useListQuery.js +1 -1
  183. package/dist/lib/wuiMarker.js +1 -1
  184. package/dist/markdown-core/dist/citations.js +1 -0
  185. package/dist/markdown-core/dist/inline.js +1 -1
  186. package/dist/types/components/AppAutocomplete.d.ts +12 -1
  187. package/dist/types/components/AppChart.d.ts +2 -0
  188. package/dist/types/components/AppColorField.d.ts +6 -0
  189. package/dist/types/components/AppConfirmDialog.d.ts +3 -0
  190. package/dist/types/components/AppConfirmProvider.d.ts +27 -0
  191. package/dist/types/components/AppCountrySelect.d.ts +5 -0
  192. package/dist/types/components/AppDatePicker.d.ts +5 -0
  193. package/dist/types/components/AppDateRangePicker.d.ts +5 -0
  194. package/dist/types/components/AppFilePicker.d.ts +6 -0
  195. package/dist/types/components/AppImagePicker.d.ts +6 -0
  196. package/dist/types/components/AppMarkdown.d.ts +4 -0
  197. package/dist/types/components/AppMultiSelect.d.ts +5 -0
  198. package/dist/types/components/AppNumberInput.d.ts +5 -0
  199. package/dist/types/components/AppOtpInput.d.ts +5 -0
  200. package/dist/types/components/AppPhoneNumberInput.d.ts +5 -0
  201. package/dist/types/components/AppRadioGroup.d.ts +6 -0
  202. package/dist/types/components/AppRepeater.d.ts +2 -2
  203. package/dist/types/components/AppRowSwitch.d.ts +23 -0
  204. package/dist/types/components/AppSelect.d.ts +5 -0
  205. package/dist/types/components/AppSlider.d.ts +5 -0
  206. package/dist/types/components/AppTagInput.d.ts +5 -0
  207. package/dist/types/components/AppTimePicker.d.ts +5 -0
  208. package/dist/types/components/iconGlyphs.g.d.ts +11 -0
  209. package/dist/types/components/iconVariants.g.d.ts +55 -0
  210. package/dist/types/index.d.ts +2 -0
  211. package/dist/types/lib/flagStyles.d.ts +2 -0
  212. package/dist/types/lib/pageScrollLock.d.ts +1 -0
  213. package/dist/ui-react.js +1 -1
  214. package/package.json +6 -6
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./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:re}=e(`AppSelect`,s),{value:y,onChange:ie,options:b=[],placeholder:ae=`Select...`,searchPlaceholder:oe=`Search...`,emptyText:se,searchable:ce=!1,clearable:le=!1,size:x,icon:ue,compact:S=!1,valuePrefix:C,prefix:w,suffix:T,floatingLabel:E=`off`,disabled:D,open:O,label:k,required:A=!1,error:j,hint:M,help:N,helpLabel:P=`More information`,id:F,name:I,className:L=``,fieldClassName:de=``,"aria-label":R,"aria-labelledby":z,"aria-describedby":B,...V}=re;n(`AppSelect`,V),t(`AppSelect`,`size`,x,m),t(`AppSelect`,`floatingLabel`,E,h);let H=c(),{setRef:fe,innerRef:U}=o({ref:_,value:y??``,onChange:ie}),{portal:pe,toElementOptions:W}=a(b),G=u({el:null,options:null,map:null});l(()=>{let e=U.current;if(!e||G.current.el===e&&G.current.options===b&&G.current.map===W)return;G.current={el:e,options:b,map:W};let t=W(b,g);te(t,e.options)||(e.options=t)});let K=F||H,q=E!==`off`&&k,J=j&&K?`${K}-error`:void 0,Y=M&&K?`${K}-hint`:void 0,me=J||Y||B;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&&!j&&!M,Q=p(d,{children:[f(`wui-select`,{"aria-label":R||(typeof k==`string`?k:void 0),"aria-labelledby":z||void 0,"aria-describedby":me||void 0,"aria-invalid":j?`true`:void 0,ref:fe,value:y||void 0,id:K,name:I,placeholder:E!==`off`&&k?` `:ae,"search-placeholder":oe,"empty-text":se||void 0,searchable:ce?``:void 0,clearable:le?``:void 0,size:x||void 0,icon:ue||void 0,compact:S?``:void 0,disabled:D?``:void 0,open:O?``:void 0,required:A?``:void 0,className:L||void 0,...Z&&!X?v:null,...V}),pe]}),$=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 he=[`field`,de].filter(Boolean).join(` `);return p(`div`,{...v,className:he,children:[k&&!q&&p(`label`,{className:`label`,htmlFor:K,children:[k,A&&f(i,{}),N&&f(r,{label:P,children:N})]}),q?p(`div`,{className:E===`above`?`field-float wui-float-above`:`field-float`,children:[Q,p(`label`,{className:`float-label`,htmlFor:K,children:[k,A&&f(i,{})]})]}):$,f(ee,{error:j,hint:M,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};
@@ -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(`AppSkeleton`,r),{width:o=`100%`,height:s=14,radius:c=6,className:l=``,style:u,...d}=a;return t(`AppSkeleton`,d),n(`span`,{className:`skeleton${l?` ${l}`:``}`,"aria-hidden":`true`,style:{width:o,height:s,borderRadius:c,...u},...i,...d})}function i({rows:e=4,cols:t=5}){return Array.from({length:e}).map((e,i)=>n(`tr`,{children:Array.from({length:t}).map((e,t)=>n(`td`,{children:n(r,{width:t===0?`70%`:`50%`,height:12})},`col-${t}`))},`row-${i}`))}export{i as AppSkeletonRows,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(`AppSkeleton`,r),{width:o=`100%`,height:s=14,radius:c=6,className:l=``,style:u,...d}=a;return t(`AppSkeleton`,d),/* @__PURE__ */ n(`span`,{className:`skeleton${l?` ${l}`:``}`,"aria-hidden":`true`,style:{width:o,height:s,borderRadius:c,...u},...i,...d})}function i({rows:e=4,cols:t=5}){return Array.from({length:e}).map((e,i)=>/* @__PURE__ */ n(`tr`,{children:Array.from({length:t}).map((e,t)=>/* @__PURE__ */ n(`td`,{children:/* @__PURE__ */ n(r,{width:t===0?`70%`:`50%`,height:12})},`col-${t}`))},`row-${i}`))}export{i as AppSkeletonRows,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{jsx as r}from"react/jsx-runtime";var i=Array.from({length:12},(e,t)=>t+1),a=3;function o(o){let{marker:s,props:c}=e(`AppSkeletonLines`,o),{lines:l=a,lastLineWidth:u=`60%`,className:d=``,style:f,...p}=c;n(`AppSkeletonLines`,p),t(`AppSkeletonLines`,`lines`,l,i);let m=i.includes(l)?l:a;return r(`div`,{className:[`wui-skeleton-lines`,d].filter(Boolean).join(` `),"aria-hidden":`true`,style:f,...s,...p,children:Array.from({length:m},(e,t)=>r(`span`,{className:`skeleton`,style:t===m-1?{width:u}:void 0},`line-${t}`))})}export{o as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsx as r}from"react/jsx-runtime";var i=Array.from({length:12},(e,t)=>t+1),a=3;function o(o){let{marker:s,props:c}=e(`AppSkeletonLines`,o),{lines:l=a,lastLineWidth:u=`60%`,className:d=``,style:f,...p}=c;n(`AppSkeletonLines`,p),t(`AppSkeletonLines`,`lines`,l,i);let m=i.includes(l)?l:a;return/* @__PURE__ */ r(`div`,{className:[`wui-skeleton-lines`,d].filter(Boolean).join(` `),"aria-hidden":`true`,style:f,...s,...p,children:Array.from({length:m},(e,t)=>/* @__PURE__ */ r(`span`,{className:`skeleton`,style:t===m-1?{width:u}:void 0},`line-${t}`))})}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"../lib/FieldMessage.js";import i from"./AppRequiredMark.js";import a,{readRange as o,writeNumberValue as s}from"./useWuiControl.js";import{forwardRef as c,useEffect as l,useId as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/slider";var p=[`sm`,`md`,`lg`],m=c(function(c,m){let{marker:h,props:g}=e(`AppSlider`,c),{value:_,start:v,end:y,range:b=!1,onChange:x,label:S,required:C=!1,hint:w,error:T,name:E,startName:D,endName:O,min:k=0,max:A=100,step:j=1,disabled:M,size:N,showValue:P,unit:F,id:I,ariaLabel:L,className:R=``,fieldClassName:z=``,...B}=g;n(`AppSlider`,B),t(`AppSlider`,`size`,N,p);let V=u(),H=I||V,U=b,{setRef:W,innerRef:G}=a({ref:m,value:U?void 0:_,onChange:x,readValue:U?o:void 0,writeValue:U?void 0:s});l(()=>{if(!U)return;let e=G.current;e&&(v!==void 0&&v>e.end?(y!==void 0&&e.end!==y&&(e.end=y),v!==void 0&&e.start!==v&&(e.start=v)):(v!==void 0&&e.start!==v&&(e.start=v),y!==void 0&&e.end!==y&&(e.end=y)))},[v,y,U,G]);let K=!S&&!T&&!w,q=T?`${H}-error`:void 0,J=w?`${H}-hint`:void 0,Y=d(`wui-slider`,{ref:W,id:H,name:E||void 0,"start-name":D||void 0,"end-name":O||void 0,min:k,max:A,step:j,size:N||void 0,"aria-label":L||(typeof S==`string`?S:void 0),"aria-describedby":q||J,"aria-invalid":T?`true`:void 0,disabled:M?``:void 0,required:C?``:void 0,range:U?``:void 0,"show-value":P?``:void 0,unit:F||void 0,className:R||void 0,...K?h:null,...B});return K?Y:f(`div`,{...h,className:`field${z?` ${z}`:``}`,children:[S&&f(`label`,{className:`label`,htmlFor:H,children:[S,C&&d(i,{})]}),Y,d(r,{error:T,hint:w,errorId:q,hintId:J})]})});export{m as default};
1
+ import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppRequiredMark.js";import r,{readRange as i,writeNumberValue as a}from"./useWuiControl.js";import o from"./warnInvalidValue.js";import s from"./warnUnknownProps.js";import{forwardRef as c,useEffect as l,useId as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/slider";var p=[`sm`,`md`,`lg`],m=c(function(c,m){let{marker:h,props:g}=t(`AppSlider`,c),{value:_,start:v,end:y,range:b=!1,onChange:x,label:S,required:C=!1,optional:w=!1,hint:T,error:E,name:D,startName:O,endName:k,min:A=0,max:j=100,step:M=1,disabled:N,size:P,showValue:F,unit:I,id:L,ariaLabel:R,className:z=``,fieldClassName:B=``,...V}=g;s(`AppSlider`,V),o(`AppSlider`,`size`,P,p);let H=u(),U=L||H,W=b,{setRef:G,innerRef:K}=r({ref:m,value:W?void 0:_,onChange:x,readValue:W?i:void 0,writeValue:W?void 0:a});l(()=>{if(!W)return;let e=K.current;e&&(v!==void 0&&v>e.end?(y!==void 0&&e.end!==y&&(e.end=y),v!==void 0&&e.start!==v&&(e.start=v)):(v!==void 0&&e.start!==v&&(e.start=v),y!==void 0&&e.end!==y&&(e.end=y)))},[v,y,W,K]);let q=!S&&!E&&!T,J=E?`${U}-error`:void 0,Y=T?`${U}-hint`:void 0,X=/* @__PURE__ */ d(`wui-slider`,{ref:G,id:U,name:D||void 0,"start-name":O||void 0,"end-name":k||void 0,min:A,max:j,step:M,size:P||void 0,"aria-label":R||(typeof S==`string`?S:void 0),"aria-describedby":J||Y,"aria-invalid":E?`true`:void 0,disabled:N?``:void 0,required:C?``:void 0,range:W?``:void 0,"show-value":F?``:void 0,unit:I||void 0,className:z||void 0,...q?h:null,...V});return q?X:/* @__PURE__ */ f(`div`,{...h,className:`field${B?` ${B}`:``}`,children:[S&&/* @__PURE__ */ f(`label`,{className:`label`,htmlFor:U,children:[S,w&&!C&&/* @__PURE__ */ d(`span`,{className:`label-optional`,children:` (optional)`}),C&&/* @__PURE__ */ d(n,{})]}),X,/* @__PURE__ */ d(e,{error:E,hint:T,errorId:J,hintId:Y})]})});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 from"./useWuiControl.js";import{forwardRef as a,useEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/sortable";var u=[`vertical`,`horizontal`],d=[`always`,`hover`],f=(e,t)=>{e.controlled=!0;let n=e.order;(n.length!==t.length||t.some((e,t)=>e!==n[t]))&&(e.order=t)},p=a(function(a,p){let{marker:m,props:h}=e(`AppSortableList`,a),{items:g=[],onReorder:_,ariaLabel:v,handle:y=!1,group:b,name:x,disabled:S=!1,orientation:C=`vertical`,handleDisplay:w=`always`,bordered:T=!0,className:E=``,...D}=h;n(`AppSortableList`,D),t(`AppSortableList`,`orientation`,C,u),t(`AppSortableList`,`handleDisplay`,w,d);let O=w===`hover`,k=g.map(e=>e.id),A=s(k);o(()=>{A.current=k});let{setRef:j,innerRef:M}=i({ref:p,value:k,writeValue:f,on:{"wui-sortable:change":e=>{e.target===e.currentTarget&&(_?.(e.detail.ids,e.detail),requestAnimationFrame(()=>{M.current&&f(M.current,A.current)}))}}});return c(`wui-sortable`,{ref:j,role:`list`,"aria-label":v,name:x||void 0,group:b||void 0,orientation:C===`horizontal`?`horizontal`:void 0,"handle-display":O?`hover`:void 0,handle:y||O?``:void 0,disabled:S?``:void 0,borderless:T?void 0:``,className:`wui-sortable${E?` ${E}`:``}`,...m,...D,children:g.map(e=>l(`div`,{role:`listitem`,className:`wui-sortable-item`,"data-id":e.id,"data-label":e.label,"data-disabled":e.disabled?``:void 0,children:[c(`button`,{type:`button`,className:`wui-sortable-handle`,"aria-label":`Reorder ${e.label}`,disabled:S||e.disabled?!0:void 0,children:c(r,{name:`menu`,size:18})}),c(`div`,{className:`wui-sortable-body`,children:e.content??e.label})]},e.id))})});export{p as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./useWuiControl.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.js";import{forwardRef as a,useEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/sortable";var u=[`vertical`,`horizontal`],d=[`always`,`hover`],f=(e,t)=>{e.controlled=!0;let n=e.order;(n.length!==t.length||t.some((e,t)=>e!==n[t]))&&(e.order=t)},p=a(function(a,p){let{marker:m,props:h}=e(`AppSortableList`,a),{items:g=[],onReorder:_,ariaLabel:v,handle:y=!1,group:b,name:x,disabled:S=!1,orientation:C=`vertical`,handleDisplay:w=`always`,bordered:T=!0,className:E=``,...D}=h;i(`AppSortableList`,D),r(`AppSortableList`,`orientation`,C,u),r(`AppSortableList`,`handleDisplay`,w,d);let O=w===`hover`,k=g.map(e=>e.id),A=s(k);o(()=>{A.current=k});let{setRef:j,innerRef:M}=n({ref:p,value:k,writeValue:f,on:{"wui-sortable:change":e=>{e.target===e.currentTarget&&(_?.(e.detail.ids,e.detail),requestAnimationFrame(()=>{M.current&&f(M.current,A.current)}))}}});return/* @__PURE__ */ c(`wui-sortable`,{ref:j,role:`list`,"aria-label":v,name:x||void 0,group:b||void 0,orientation:C===`horizontal`?`horizontal`:void 0,"handle-display":O?`hover`:void 0,handle:y||O?``:void 0,disabled:S?``:void 0,borderless:T?void 0:``,className:`wui-sortable${E?` ${E}`:``}`,...m,...D,children:g.map(e=>/* @__PURE__ */ l(`div`,{role:`listitem`,className:`wui-sortable-item`,"data-id":e.id,"data-label":e.label,"data-disabled":e.disabled?``:void 0,children:[/* @__PURE__ */ c(`button`,{type:`button`,className:`wui-sortable-handle`,"aria-label":`Reorder ${e.label}`,disabled:S||e.disabled?!0:void 0,children:/* @__PURE__ */ c(t,{name:`menu`,size:18})}),/* @__PURE__ */ c(`div`,{className:`wui-sortable-body`,children:e.content??e.label})]},e.id))})});export{p as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnUnknownProps.js";import{jsx as r}from"react/jsx-runtime";var i=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},a=!1;function o(e){a||!i()||(a=!0,t(`[@webority/ui-react] <AppSparkline> left out ${e} value(s) in \`data\` that are not finite numbers.`))}var s=e=>typeof e==`number`&&Number.isFinite(e);function c(e,t,n){if(e.length<2)return`0,${n/2} ${t},${n/2}`;let r=Math.min(...e),i=Math.max(...e)-r,a=t/(e.length-1);return e.map((e,t)=>{let o=i===0?n/2:n-(e-r)/i*n;return`${t*a},${o}`}).join(` `)}var l=e=>String(Number(e.toFixed(2)));function u(e,t){let n=t?`${t} trend`:`Trend`;return e.length===1?`${n} has one value, ${l(e[0])}.`:`${n} from ${l(e[0])} to ${l(e[e.length-1])} across ${e.length} points.`}function d(t){let{marker:i,props:a}=e(`AppSparkline`,t),{data:l,label:d,width:f=48,height:p=16,className:m=``,...h}=a;n(`AppSparkline`,h);let g=Array.isArray(l)?l.filter(s):[];return Array.isArray(l)&&g.length<l.length&&o(l.length-g.length),g.length===0?null:r(`svg`,{className:`wui-sparkline${m?` ${m}`:``}`,width:f,height:p,viewBox:`0 0 ${f} ${p}`,role:`img`,"aria-label":u(g,d),...i,...h,children:r(`polyline`,{points:c(g,f,p),stroke:`currentColor`,fill:`none`})})}export{d as default};
1
+ import{devWarn as e}from"../lib/devWarn.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./warnUnknownProps.js";import{jsx as r}from"react/jsx-runtime";var i=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},a=!1;function o(t){!a&&i()&&(a=!0,e(`[@webority/ui-react] <AppSparkline> left out ${t} value(s) in \`data\` that are not finite numbers.`))}var s=e=>typeof e==`number`&&Number.isFinite(e);function c(e,t,n){if(e.length<2)return`0,${n/2} ${t},${n/2}`;let r=Math.min(...e),i=Math.max(...e)-r,a=t/(e.length-1);return e.map((e,t)=>{let o=i===0?n/2:n-(e-r)/i*n;return`${t*a},${o}`}).join(` `)}var l=e=>String(Number(e.toFixed(2)));function u(e,t){let n=t?`${t} trend`:`Trend`;return e.length===1?`${n} has one value, ${l(e[0])}.`:`${n} from ${l(e[0])} to ${l(e[e.length-1])} across ${e.length} points.`}function d(e){let{marker:i,props:a}=t(`AppSparkline`,e),{data:l,label:d,width:f=48,height:p=16,className:m=``,...h}=a;n(`AppSparkline`,h);let g=Array.isArray(l)?l.filter(s):[];return Array.isArray(l)&&g.length<l.length&&o(l.length-g.length),g.length===0?null:/* @__PURE__ */ r(`svg`,{className:`wui-sparkline${m?` ${m}`:``}`,width:f,height:p,viewBox:`0 0 ${f} ${p}`,role:`img`,"aria-label":u(g,d),...i,...h,children:/* @__PURE__ */ r(`polyline`,{points:c(g,f,p),stroke:`currentColor`,fill:`none`})})}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{jsx as r}from"react/jsx-runtime";var i=[`sm`,`md`];function a(a){let{marker:o,props:s}=e(`AppSpinner`,a),{size:c=`md`,label:l=`Loading`,className:u=``,...d}=s;n(`AppSpinner`,d),t(`AppSpinner`,`size`,typeof c==`string`&&!Number.isFinite(Number(c))?c:null,i);let{style:f,...p}=d,m=Number(c),h=Number.isFinite(m)&&m>0;return r(`span`,{className:`spinner-border${!h&&c===`sm`?` spinner-border-sm`:``}${u?` ${u}`:``}`,role:`status`,"aria-label":l,style:h?{width:`${m}px`,height:`${m}px`,borderWidth:`${Math.max(2,Math.round(m/8))}px`,...f}:f,...o,...p})}export{a as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsx as r}from"react/jsx-runtime";var i=[`sm`,`md`];function a(a){let{marker:o,props:s}=e(`AppSpinner`,a),{size:c=`md`,label:l=`Loading`,className:u=``,...d}=s;n(`AppSpinner`,d),t(`AppSpinner`,`size`,typeof c==`string`&&!Number.isFinite(Number(c))?c:null,i);let{style:f,...p}=d,m=Number(c),h=Number.isFinite(m)&&m>0,g=`spinner-border${!h&&c===`sm`?` spinner-border-sm`:``}${u?` ${u}`:``}`,_=h?{width:`${m}px`,height:`${m}px`,borderWidth:`${Math.max(2,Math.round(m/8))}px`,...f}:f;return/* @__PURE__ */ r(`span`,{className:g,role:`status`,"aria-label":l,style:_,...o,...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{jsx as r,jsxs as i}from"react/jsx-runtime";var a=[`bar`,`ring`,`dots`],o={sm:44,md:56,lg:72};function s(s){let{marker:c,props:l}=e(`AppSplash`,s),{logo:u,initials:d,text:f,subtext:p,variant:m=`bar`,size:h=`md`,label:g=`Loading`,className:_=``,...v}=l;n(`AppSplash`,v),t(`AppSplash`,`variant`,m,a),t(`AppSplash`,`size`,typeof h==`string`?h:null,Object.keys(o));let{style:y,...b}=v,x=typeof h==`number`?h:o[h]??o.md,S=m===`ring`?r(`span`,{className:`splash-ring`,"aria-hidden":`true`}):m===`dots`?i(`span`,{className:`splash-dots`,"aria-hidden":`true`,children:[r(`i`,{}),r(`i`,{}),r(`i`,{})]}):r(`span`,{className:`splash-bar`,"aria-hidden":`true`});return r(`div`,{className:`splash${_?` ${_}`:``}`,role:`status`,"aria-live":`polite`,"aria-label":g,style:{"--wui-splash-size":`${x}px`,...y},...c,...b,children:i(`div`,{className:`splash-inner`,children:[u||d&&r(`span`,{className:`splash-mark`,children:d}),S,f&&r(`span`,{className:`splash-text`,children:f}),p&&r(`span`,{className:`splash-subtext`,children:p})]})})}export{s as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=[`bar`,`ring`,`dots`],o={sm:44,md:56,lg:72};function s(s){let{marker:c,props:l}=e(`AppSplash`,s),{logo:u,initials:d,text:f,subtext:p,variant:m=`bar`,size:h=`md`,label:g=`Loading`,className:_=``,...v}=l;n(`AppSplash`,v),t(`AppSplash`,`variant`,m,a),t(`AppSplash`,`size`,typeof h==`string`?h:null,Object.keys(o));let{style:y,...b}=v,x=typeof h==`number`?h:o[h]??o.md,S=m===`ring`?/* @__PURE__ */ r(`span`,{className:`splash-ring`,"aria-hidden":`true`}):m===`dots`?/* @__PURE__ */ i(`span`,{className:`splash-dots`,"aria-hidden":`true`,children:[/* @__PURE__ */ r(`i`,{}),/* @__PURE__ */ r(`i`,{}),/* @__PURE__ */ r(`i`,{})]}):/* @__PURE__ */ r(`span`,{className:`splash-bar`,"aria-hidden":`true`});return/* @__PURE__ */ r(`div`,{className:`splash${_?` ${_}`:``}`,role:`status`,"aria-live":`polite`,"aria-label":g,style:{"--wui-splash-size":`${x}px`,...y},...c,...b,children:/* @__PURE__ */ i(`div`,{className:`splash-inner`,children:[u||d&&/* @__PURE__ */ r(`span`,{className:`splash-mark`,children:d}),S,f&&/* @__PURE__ */ r(`span`,{className:`splash-text`,children:f}),p&&/* @__PURE__ */ r(`span`,{className:`splash-subtext`,children:p})]})})}export{s as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i,{buttonVariantClass as a}from"./AppButton.js";import o from"./AppDropdown.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`sm`,`md`,`lg`],u=[`button`,`submit`,`reset`],d={sm:14,md:16,lg:20},f={sm:`btn-sm`,md:``,lg:`btn-lg`};function p(p){let{marker:m,props:h}=e(`AppSplitButton`,p),{label:g,items:_=[],onClick:v,href:y,type:b=`button`,variant:x=`primary`,size:S=`md`,disabled:C=!1,loading:w=!1,leftIcon:T,shortcut:E,menuLabel:D=`More actions`,align:O=`end`,linkComponent:k,className:A=``,...j}=h;n(`AppSplitButton`,j),t(`AppSplitButton`,`size`,S,l),t(`AppSplitButton`,`type`,b,u);let M=[`btn`,a(x),f[S]??``,`wui-split-toggle`].filter(Boolean).join(` `),N=s(r,{name:`chevron-down`,size:d[S]??d.md}),P=C||w;return c(`div`,{role:`group`,"aria-label":g,className:[`wui-split-button`,A].filter(Boolean).join(` `),...m,...j,children:[s(i,{variant:x,size:S,type:b,href:y,onClick:v,disabled:C,loading:w,leftIcon:T,shortcut:E,children:g}),P?s(`div`,{className:`wui-split-menu`,children:s(`button`,{type:`button`,className:M,disabled:!0,"aria-label":D,children:N})}):s(o,{className:`wui-split-menu`,trigger:N,toggleClassName:M,label:D,ariaLabel:D,align:O,items:_,linkComponent:k})]})}export{p as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t,{buttonVariantClass as n}from"./AppButton.js";import r from"./AppDropdown.js";import i from"./AppIcon.js";import a from"./warnInvalidValue.js";import o from"./warnUnknownProps.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`sm`,`md`,`lg`],u=[`button`,`submit`,`reset`],d={sm:14,md:16,lg:20},f={sm:`btn-sm`,md:``,lg:`btn-lg`};function p(p){let{marker:m,props:h}=e(`AppSplitButton`,p),{label:g,items:_=[],onClick:v,href:y,type:b=`button`,variant:x=`primary`,size:S=`md`,disabled:C=!1,loading:w=!1,leftIcon:T,shortcut:E,menuLabel:D=`More actions`,align:O=`end`,linkComponent:k,className:A=``,...j}=h;o(`AppSplitButton`,j),a(`AppSplitButton`,`size`,S,l),a(`AppSplitButton`,`type`,b,u);let M=[`btn`,n(x),f[S]??``,`wui-split-toggle`].filter(Boolean).join(` `),N=/* @__PURE__ */ s(i,{name:`chevron-down`,size:d[S]??d.md}),P=C||w;return/* @__PURE__ */ c(`div`,{role:`group`,"aria-label":g,className:[`wui-split-button`,A].filter(Boolean).join(` `),...m,...j,children:[/* @__PURE__ */ s(t,{variant:x,size:S,type:b,href:y,onClick:v,disabled:C,loading:w,leftIcon:T,shortcut:E,children:g}),P?/* @__PURE__ */ s(`div`,{className:`wui-split-menu`,children:/* @__PURE__ */ s(`button`,{type:`button`,className:M,disabled:!0,"aria-label":D,children:N})}):/* @__PURE__ */ s(r,{className:`wui-split-menu`,trigger:N,toggleClassName:M,label:D,ariaLabel:D,align:O,items:_,linkComponent:k})]})}export{p 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"./AppRecordPager.js";import i from"./AppShortcutLegend.js";import{LIST_KEYS as a,SELECT_KEY as o,shortcutKey as s}from"@webority/ui-elements/helpers";import{useEffect as c,useMemo as ee,useRef as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";var p={sm:576,md:768,lg:992,xl:1200,xxl:1400},te=Object.keys(p),m=[3,4,5,6,7,8],h=6,g=`.wui-split-items > .wui-split-item > .wui-split-link`,_=(e,t)=>e!=null&&String(e)===String(t),v=e=>{let t=window.matchMedia?.(`(min-width: ${p[e]}px)`);return!t||t.matches},ne=e=>typeof e==`string`||typeof e==`number`?String(e):`item`;function y(y){let{marker:b,props:x}=e(`AppSplitView`,y),{items:S=[],currentKey:C,onSelect:w,selectable:T=!1,selectedKeys:E,onToggle:D,onToggleAll:O,bulkActions:k,header:A,chips:j,pane:re,paneHeader:M,pager:ie=!0,shortcuts:ae,shortcutsEnabled:N=!0,empty:P=`Nothing here yet.`,loading:F=!1,listWidth:I=5,stackBelow:L=`xl`,className:R=``,...z}=x,B=ee(()=>new Set(E),[E]);n(`AppSplitView`,z),t(`AppSplitView`,`stackBelow`,L,te),t(`AppSplitView`,`listWidth`,I,m);let V=p[L]?L:`xl`,H=m.includes(I)?I:5,U=l(null),W=C!=null,G=T?B?.size??0:0,K=G>0,q=T&&S.length>0&&S.every(e=>B?.has(e.key)),oe=T&&!q&&S.some(e=>B?.has(e.key)),se=e=>{e&&(e.indeterminate=oe)},J=l(!1);c(()=>{if(!J.current){J.current=!0;return}C!=null&&U.current?.querySelector(`.wui-split-link[aria-current="true"]`)?.scrollIntoView?.({block:`nearest`})},[C]);let Y=(e,t)=>{t.button>0||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||w&&(e.href&&!v(V)||(t.preventDefault(),w(e.key)))},X=e=>{let t=[...U.current?.querySelectorAll(g)??[]];t[t.findIndex(e=>e.getAttribute(`aria-current`)===`true`)+e]?.click()},ce=[`wui-split-view`,W?`wui-split-reading`:``,R].filter(Boolean).join(` `),le=T?[...a,o]:a,ue=new Set([`J`,`K`,`Enter`,`?`,...T?[`X`]:[]]),de=[...le,...(ae??[]).filter(e=>!ue.has(s(e.key))).map(e=>({key:e.key,label:e.label,onPress:()=>e.onPress?.(C)}))],Z=S.findIndex(e=>_(C,e.key)),Q=ie&&!F&&S.length>0?d(r,{"data-split-pager":``,index:Z>=0?Z+1:void 0,total:S.length,onPrev:()=>X(-1),onNext:()=>X(1),prevLabel:`Previous item`,nextLabel:`Next item`}):null,fe=e=>{let t=_(C,e.key),n=T&&!!B?.has(e.key),r=e.badge!==void 0&&e.badge!==null&&e.badge!==``,i=f(u,{children:[f(`span`,{className:`wui-split-item-main`,children:[d(`span`,{className:`wui-split-item-title`,children:e.title}),e.meta!==void 0&&e.meta!==null&&d(`span`,{className:`wui-split-item-meta`,children:e.meta})]}),(e.trailing||r)&&f(`span`,{className:`wui-split-item-end`,children:[e.trailing,r&&d(`span`,{className:`wui-split-badge`,children:e.badge})]})]});return f(`li`,{className:[`wui-split-item`,t?`is-active`:``,n?`is-selected`:``].filter(Boolean).join(` `),"data-key":e.key,children:[T&&d(`input`,{type:`checkbox`,className:`wui-check wui-split-check`,checked:n,onChange:()=>D?.(e.key),"aria-label":`Select ${ne(e.title)}`}),e.href?d(`a`,{className:`wui-split-link`,href:e.href,"aria-current":t?`true`:void 0,onClick:t=>Y(e,t),children:i}):d(`button`,{type:`button`,className:`wui-split-link`,"aria-current":t?`true`:void 0,onClick:t=>Y(e,t),children:i})]},e.key)},$;return $=F?f(`div`,{className:`wui-split-items`,"aria-busy":`true`,tabIndex:0,children:[d(`span`,{className:`visually-hidden`,children:`Loading`}),Array.from({length:h},(e,t)=>f(`div`,{className:`wui-split-skeleton`,"aria-hidden":`true`,children:[d(`span`,{className:`skeleton wui-split-skeleton-title`}),d(`span`,{className:`skeleton wui-split-skeleton-meta`})]},t))]}):S.length?d(`ul`,{className:`wui-split-items`,"aria-label":`Items`,children:S.map(fe)}):d(`div`,{className:`wui-split-empty`,children:P}),f(`div`,{ref:U,className:ce,"data-stack-below":V,"data-list-width":H,"data-shortcut-scope":N?``:void 0,...b,...z,children:[f(`div`,{className:`wui-split-list`,children:[(A||T)&&f(`div`,{className:`wui-split-head`,children:[T&&d(`input`,{ref:se,type:`checkbox`,className:`wui-check wui-split-all`,checked:q,onChange:e=>O?.(e.target.checked),"aria-label":`Select all items`}),d(`div`,{className:`wui-split-head-main`,hidden:K,children:A}),T&&f(`div`,{className:`wui-split-head-bulk`,hidden:!K,children:[f(`span`,{className:`wui-split-count`,"aria-live":`polite`,children:[G,` selected`]}),k]})]}),j&&d(`div`,{className:`wui-split-chips`,children:j}),$,N&&f(`div`,{className:`wui-split-legend`,children:[f(`span`,{children:[d(`kbd`,{className:`wui-kbd`,children:`J`}),` `,d(`kbd`,{className:`wui-kbd`,children:`K`}),` Move`]}),f(`span`,{children:[d(`kbd`,{className:`wui-kbd`,children:`Enter`}),` Open`]}),d(i,{items:g,shortcuts:de})]})]}),f(`div`,{className:`wui-split-pane`,children:[(M||Q)&&f(`div`,{className:`wui-split-pane-head`,children:[M,Q]}),d(`section`,{className:`wui-split-pane-body`,"aria-label":`Reading pane`,tabIndex:0,children:re})]})]})}export{y as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppRecordPager.js";import n from"./AppShortcutLegend.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.js";import{LIST_KEYS as a,SELECT_KEY as o,shortcutKey as s}from"@webority/ui-elements/helpers";import{useEffect as c,useMemo as ee,useRef as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";var p={sm:576,md:768,lg:992,xl:1200,xxl:1400},te=Object.keys(p),m=[3,4,5,6,7,8],h=6,g=`.wui-split-items > .wui-split-item > .wui-split-link`,_=(e,t)=>e!=null&&String(e)===String(t),v=e=>{let t=window.matchMedia?.(`(min-width: ${p[e]}px)`);return!t||t.matches},ne=e=>typeof e==`string`||typeof e==`number`?String(e):`item`;function y(y){let{marker:b,props:x}=e(`AppSplitView`,y),{items:S=[],currentKey:C,onSelect:w,selectable:T=!1,selectedKeys:E,onToggle:D,onToggleAll:O,bulkActions:k,header:A,chips:j,pane:re,paneHeader:M,pager:ie=!0,shortcuts:ae,shortcutsEnabled:N=!0,empty:P=`Nothing here yet.`,loading:F=!1,listWidth:I=5,stackBelow:L=`xl`,className:R=``,...z}=x,B=ee(()=>new Set(E),[E]);i(`AppSplitView`,z),r(`AppSplitView`,`stackBelow`,L,te),r(`AppSplitView`,`listWidth`,I,m);let V=p[L]?L:`xl`,H=m.includes(I)?I:5,U=l(null),W=C!=null,G=T?B?.size??0:0,K=G>0,q=T&&S.length>0&&S.every(e=>B?.has(e.key)),oe=T&&!q&&S.some(e=>B?.has(e.key)),se=e=>{e&&(e.indeterminate=oe)},J=l(!1);c(()=>{J.current?C!=null&&U.current?.querySelector(`.wui-split-link[aria-current="true"]`)?.scrollIntoView?.({block:`nearest`}):J.current=!0},[C]);let Y=(e,t)=>{t.button>0||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||w&&(!e.href||v(V))&&(t.preventDefault(),w(e.key))},X=e=>{let t=[...U.current?.querySelectorAll(g)??[]];t[t.findIndex(e=>e.getAttribute(`aria-current`)===`true`)+e]?.click()},ce=[`wui-split-view`,W?`wui-split-reading`:``,R].filter(Boolean).join(` `),le=T?[...a,o]:a,ue=/* @__PURE__ */ new Set([`J`,`K`,`Enter`,`?`,...T?[`X`]:[]]),de=[...le,...(ae??[]).filter(e=>!ue.has(s(e.key))).map(e=>({key:e.key,label:e.label,onPress:()=>e.onPress?.(C)}))],Z=S.findIndex(e=>_(C,e.key)),Q=ie&&!F&&S.length>0?/* @__PURE__ */ d(t,{"data-split-pager":``,index:Z>=0?Z+1:void 0,total:S.length,onPrev:()=>X(-1),onNext:()=>X(1),prevLabel:`Previous item`,nextLabel:`Next item`}):null,fe=e=>{let t=_(C,e.key),n=T&&!!B?.has(e.key),r=e.badge!==void 0&&e.badge!==null&&e.badge!==``,i=/* @__PURE__ */ f(u,{children:[/* @__PURE__ */ f(`span`,{className:`wui-split-item-main`,children:[/* @__PURE__ */ d(`span`,{className:`wui-split-item-title`,children:e.title}),e.meta!==void 0&&e.meta!==null&&/* @__PURE__ */ d(`span`,{className:`wui-split-item-meta`,children:e.meta})]}),(e.trailing||r)&&/* @__PURE__ */ f(`span`,{className:`wui-split-item-end`,children:[e.trailing,r&&/* @__PURE__ */ d(`span`,{className:`wui-split-badge`,children:e.badge})]})]});return/* @__PURE__ */ f(`li`,{className:[`wui-split-item`,t?`is-active`:``,n?`is-selected`:``].filter(Boolean).join(` `),"data-key":e.key,children:[T&&/* @__PURE__ */ d(`input`,{type:`checkbox`,className:`wui-check wui-split-check`,checked:n,onChange:()=>D?.(e.key),"aria-label":`Select ${ne(e.title)}`}),e.href?/* @__PURE__ */ d(`a`,{className:`wui-split-link`,href:e.href,"aria-current":t?`true`:void 0,onClick:t=>Y(e,t),children:i}):/* @__PURE__ */ d(`button`,{type:`button`,className:`wui-split-link`,"aria-current":t?`true`:void 0,onClick:t=>Y(e,t),children:i})]},e.key)},$;return $=F?/* @__PURE__ */ f(`div`,{className:`wui-split-items`,"aria-busy":`true`,tabIndex:0,children:[/* @__PURE__ */ d(`span`,{className:`visually-hidden`,children:`Loading`}),Array.from({length:h},(e,t)=>/* @__PURE__ */ f(`div`,{className:`wui-split-skeleton`,"aria-hidden":`true`,children:[/* @__PURE__ */ d(`span`,{className:`skeleton wui-split-skeleton-title`}),/* @__PURE__ */ d(`span`,{className:`skeleton wui-split-skeleton-meta`})]},t))]}):S.length?/* @__PURE__ */ d(`ul`,{className:`wui-split-items`,"aria-label":`Items`,children:S.map(fe)}):/* @__PURE__ */ d(`div`,{className:`wui-split-empty`,children:P}),/* @__PURE__ */ f(`div`,{ref:U,className:ce,"data-stack-below":V,"data-list-width":H,"data-shortcut-scope":N?``:void 0,...b,...z,children:[/* @__PURE__ */ f(`div`,{className:`wui-split-list`,children:[(A||T)&&/* @__PURE__ */ f(`div`,{className:`wui-split-head`,children:[T&&/* @__PURE__ */ d(`input`,{ref:se,type:`checkbox`,className:`wui-check wui-split-all`,checked:q,onChange:e=>O?.(e.target.checked),"aria-label":`Select all items`}),/* @__PURE__ */ d(`div`,{className:`wui-split-head-main`,hidden:K,children:A}),T&&/* @__PURE__ */ f(`div`,{className:`wui-split-head-bulk`,hidden:!K,children:[/* @__PURE__ */ f(`span`,{className:`wui-split-count`,"aria-live":`polite`,children:[G,` selected`]}),k]})]}),j&&/* @__PURE__ */ d(`div`,{className:`wui-split-chips`,children:j}),$,N&&/* @__PURE__ */ f(`div`,{className:`wui-split-legend`,children:[/* @__PURE__ */ f(`span`,{children:[/* @__PURE__ */ d(`kbd`,{className:`wui-kbd`,children:`J`}),` `,/* @__PURE__ */ d(`kbd`,{className:`wui-kbd`,children:`K`}),` Move`]}),/* @__PURE__ */ f(`span`,{children:[/* @__PURE__ */ d(`kbd`,{className:`wui-kbd`,children:`Enter`}),` Open`]}),/* @__PURE__ */ d(n,{items:g,shortcuts:de})]})]}),/* @__PURE__ */ f(`div`,{className:`wui-split-pane`,children:[(M||Q)&&/* @__PURE__ */ f(`div`,{className:`wui-split-pane-head`,children:[M,Q]}),/* @__PURE__ */ d(`section`,{className:`wui-split-pane-body`,"aria-label":`Reading pane`,tabIndex:0,children:re})]})]})}export{y as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./withTooltip.js";import{jsx as i}from"react/jsx-runtime";var a=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function o(o){let{marker:s,props:c}=e(`AppStatusBadge`,o),{label:l,tone:u=`neutral`,className:d=``,tooltip:f,tooltipPlacement:p,...m}=c;return n(`AppStatusBadge`,m),t(`AppStatusBadge`,`tone`,u,a),l==null||l===``?`-`:r(i(`span`,{className:`status-label ${u}${d?` ${d}`:``}`,...s,...m,children:l}),f,p)}export{o as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./withTooltip.js";import{jsx as i}from"react/jsx-runtime";var a=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function o(o){let{marker:s,props:c}=e(`AppStatusBadge`,o),{label:l,tone:u=`neutral`,className:d=``,tooltip:f,tooltipPlacement:p,...m}=c;return n(`AppStatusBadge`,m),t(`AppStatusBadge`,`tone`,u,a),l==null||l===``?`-`:r(/* @__PURE__ */ i(`span`,{className:`status-label ${u}${d?` ${d}`:``}`,...s,...m,children:l}),f,p)}export{o as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{deriveStepStatus as i,stepperHeaderItems as a}from"@webority/ui-elements/helpers";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`steps`,`journey`],u=[`horizontal`,`vertical`],d=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],f=[`sm`,`md`,`lg`],p=[`primary`,`info`],m={sm:12,md:14,lg:18},h=[`done`,`active`,`pending`,`error`];function g(g){let{marker:_,props:v}=e(`AppStepper`,g),{steps:y=[],variant:b=`steps`,orientation:x=`horizontal`,iconVariant:S,size:C=`md`,iconSize:w,active:T,onStepClick:E,label:D=`Progress`,tone:O=`primary`,linkComponent:k,className:A=``,...j}=v;n(`AppStepper`,j),t(`AppStepper`,`variant`,b,l),t(`AppStepper`,`orientation`,x,u),t(`AppStepper`,`iconVariant`,S,d),t(`AppStepper`,`size`,C,f),t(`AppStepper`,`tone`,O,p);let M=w>0?w:m[C]??m.md;for(let e of y)t(`AppStepper`,`steps[].status`,e.status,h);let N=b===`journey`,P=[`stepper`,N&&`stepper-journey`,x===`vertical`&&`stepper-vertical`,C!==`md`&&f.includes(C)&&`wui-step-size-${C}`,O!==`primary`&&p.includes(O)&&`wui-step-tone-${O}`,A].filter(Boolean).join(` `),F=a(y,{statusOf:e=>y[e].status||i(e,T),journey:N,connectors:!0});return s(`nav`,{className:P,"aria-label":D,..._,...j,children:F.map(e=>{let t=e.index,n=y[t],i=e.className,a=e.glyph.number;e.glyph.icon&&(a=s(r,{name:e.glyph.icon,size:M,variant:S}));let l=c(o,{children:[s(`span`,{className:`step-circle`,children:a}),N?c(`span`,{className:`step-text`,children:[s(`span`,{className:`step-index`,children:`Step ${t+1}`}),s(`span`,{className:`step-label`,children:n.label}),n.description?s(`span`,{className:`step-desc`,children:n.description}):null]}):c(o,{children:[s(`span`,{className:`step-label`,children:n.label}),n.description?s(`span`,{className:`step-desc`,children:n.description}):null]})]}),u=e.current?`step`:void 0,d=n.key??`${n.label}-${t}`,f;return f=E?s(`button`,{type:`button`,className:i,"aria-current":u,onClick:()=>E(n,t),children:l},d):n.href?k?s(k,{className:i,to:n.href,"aria-current":u,children:l},d):s(`a`,{className:i,href:n.href,"aria-current":u,children:l},d):s(`div`,{className:i,"aria-current":u,children:l},d),e.line?[f,s(`span`,{className:`step-line${e.line.done?` done`:``}`,"aria-hidden":`true`},`${d}-line`)]:f})})}export{g 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{deriveStepStatus as i,stepperHeaderItems as a}from"@webority/ui-elements/helpers";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`steps`,`journey`],u=[`horizontal`,`vertical`],d=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],f=[`sm`,`md`,`lg`],p=[`primary`,`info`],m={sm:12,md:14,lg:18},h=[`done`,`active`,`pending`,`error`];function g(g){let{marker:_,props:v}=e(`AppStepper`,g),{steps:y=[],variant:b=`steps`,orientation:x=`horizontal`,iconVariant:S,size:C=`md`,iconSize:w,active:T,onStepClick:E,label:D=`Progress`,tone:O=`primary`,linkComponent:k,className:A=``,...j}=v;r(`AppStepper`,j),n(`AppStepper`,`variant`,b,l),n(`AppStepper`,`orientation`,x,u),n(`AppStepper`,`iconVariant`,S,d),n(`AppStepper`,`size`,C,f),n(`AppStepper`,`tone`,O,p);let M=w>0?w:m[C]??m.md;for(let e of y)n(`AppStepper`,`steps[].status`,e.status,h);let N=b===`journey`,P=[`stepper`,N&&`stepper-journey`,x===`vertical`&&`stepper-vertical`,C!==`md`&&f.includes(C)&&`wui-step-size-${C}`,O!==`primary`&&p.includes(O)&&`wui-step-tone-${O}`,A].filter(Boolean).join(` `),F=a(y,{statusOf:e=>y[e].status||i(e,T),journey:N,connectors:!0});return/* @__PURE__ */ s(`nav`,{className:P,"aria-label":D,..._,...j,children:F.map(e=>{let n=e.index,r=y[n],i=e.className,a=e.glyph.number;e.glyph.icon&&(a=/* @__PURE__ */ s(t,{name:e.glyph.icon,size:M,variant:S}));let l=/* @__PURE__ */ c(o,{children:[/* @__PURE__ */ s(`span`,{className:`step-circle`,children:a}),N?/* @__PURE__ */ c(`span`,{className:`step-text`,children:[/* @__PURE__ */ s(`span`,{className:`step-index`,children:`Step ${n+1}`}),/* @__PURE__ */ s(`span`,{className:`step-label`,children:r.label}),r.description?/* @__PURE__ */ s(`span`,{className:`step-desc`,children:r.description}):null]}):/* @__PURE__ */ c(o,{children:[/* @__PURE__ */ s(`span`,{className:`step-label`,children:r.label}),r.description?/* @__PURE__ */ s(`span`,{className:`step-desc`,children:r.description}):null]})]}),u=e.current?`step`:void 0,d=r.key??`${r.label}-${n}`,f;return f=E?/* @__PURE__ */ s(`button`,{type:`button`,className:i,"aria-current":u,onClick:()=>E(r,n),children:l},d):r.href?k?/* @__PURE__ */ s(k,{className:i,to:r.href,"aria-current":u,children:l},d):/* @__PURE__ */ s(`a`,{className:i,href:r.href,"aria-current":u,children:l},d):/* @__PURE__ */ s(`div`,{className:i,"aria-current":u,children:l},d),e.line?[f,/* @__PURE__ */ s(`span`,{className:`step-line${e.line.done?` done`:``}`,"aria-hidden":`true`},`${d}-line`)]:f})})}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/CheckField.js";import{forwardRef as i}from"react";import{jsx as a}from"react/jsx-runtime";var o=[`round`,`pill`,`circle`],s=i(function(i,s){let{marker:c,props:l}=e(`AppSwitch`,i),{label:u,id:d,name:f,error:p,hint:m,shape:h=`round`,className:g=``,checked:_,defaultChecked:v,onChange:y,...b}=l;n(`AppSwitch`,b),t(`AppSwitch`,`shape`,h,o);let x=`form-check form-switch${h===`circle`?` form-switch-circle`:h===`pill`?` form-switch-pill`:``}`,S={...b};return _!==void 0&&(S.checked=_),v!==void 0&&(S.defaultChecked=v),y!==void 0&&(S.onChange=y),_!==void 0&&y===void 0&&(S.readOnly=!0),a(r,{rootProps:c,ref:s,label:u,id:d,name:f,error:p,hint:m,className:g,rest:S,inputType:`checkbox`,wrapperClass:x})});export{s as default};
1
+ import e from"../lib/CheckField.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{forwardRef as i}from"react";import{jsx as a}from"react/jsx-runtime";var o=[`round`,`pill`,`circle`],s=i(function(i,s){let{marker:c,props:l}=t(`AppSwitch`,i),{label:u,id:d,name:f,error:p,hint:m,shape:h=`round`,className:g=``,checked:_,defaultChecked:v,onChange:y,...b}=l;r(`AppSwitch`,b),n(`AppSwitch`,`shape`,h,o);let x=`form-check form-switch${h===`circle`?` form-switch-circle`:h===`pill`?` form-switch-pill`:``}`,S={...b};return _!==void 0&&(S.checked=_),v!==void 0&&(S.defaultChecked=v),y!==void 0&&(S.onChange=y),_!==void 0&&y===void 0&&(S.readOnly=!0),/* @__PURE__ */ a(e,{rootProps:c,ref:s,label:u,id:d,name:f,error:p,hint:m,className:g,rest:S,inputType:`checkbox`,wrapperClass:x})});export{s as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{pageWindow as i}from"../lib/pageWindow.js";import a from"./AppSelect.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`numbered`,`prev-next`],l=[`sm`,`md`],u=[`footer`,`standalone`],d=[5,10,25,50];function f(f){let{marker:p,props:m}=e(`AppTablePagination`,f),{page:h,totalPages:g,total:_,pageSize:v,onPageChange:y,onPageSizeChange:b,pageSizes:x=d,mode:S=`numbered`,showPageSize:C=!0,siblings:w=2,size:T=`md`,variant:E=`footer`,ariaLabel:D=`Pagination`,className:O=``,...k}=m;n(`AppTablePagination`,k),t(`AppTablePagination`,`mode`,S,c),t(`AppTablePagination`,`size`,T,l),t(`AppTablePagination`,`variant`,E,u);let A=Number(v)||0,j=Number(_)||0,M=g===void 0?j<=0:g<=0,N=Math.max(1,g??Math.ceil(j/(A>0?A:10))),P=Math.min(Math.max(1,Number(h)||1),N),F=A>0&&!!b&&C!==!1;if(M||N<=1&&!F)return null;let I=A>0&&!x.includes(A)?[...x,A].sort((e,t)=>e-t):x,L=S===`numbered`,R=L?i(P,N,{siblingCount:w}):null;return s(`nav`,{className:[`table-pagination`,E===`standalone`&&`wui-table-pagination-standalone`,T===`sm`&&`wui-table-pagination-sm`,O].filter(Boolean).join(` `),"aria-label":D,...p,...k,children:[F&&o(`span`,{className:`tpg-rows`,children:o(a,{compact:!0,"aria-label":`Rows per page`,value:String(A),onChange:e=>b(Number(e)),options:I.map(e=>({value:String(e),label:`${e} per page`}))})}),!L&&s(`span`,{className:`tpg-range`,children:[`Page `,P,` of `,N]}),s(`div`,{className:`tpg-nav`,children:[o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>y?.(Math.max(1,P-1)),disabled:P<=1,"aria-label":`Previous page`,children:o(r,{name:`arrow-left`,size:18})}),L&&R.map(e=>typeof e==`number`?o(`button`,{type:`button`,className:`tpg-page${e===P?` is-active`:``}`,onClick:()=>y?.(e),"aria-current":e===P?`page`:void 0,"aria-label":`Page ${e}`,children:e},e):o(`span`,{className:`tpg-ellipsis`,"aria-hidden":`true`,children:`…`},e)),o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>y?.(Math.min(N,P+1)),disabled:P>=N,"aria-label":`Next page`,children:o(r,{name:`arrow-right`,size:18})})]})]})}export{f as default};
1
+ import{pageWindow as e}from"../lib/pageWindow.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppIcon.js";import r from"./AppSelect.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`numbered`,`prev-next`],l=[`sm`,`md`],u=[`footer`,`standalone`],d=[5,10,25,50];function f(f){let{marker:p,props:m}=t(`AppTablePagination`,f),{page:h,totalPages:g,total:_,pageSize:v,onPageChange:y,onPageSizeChange:b,pageSizes:x=d,mode:S=`numbered`,showPageSize:C=!0,siblings:w=2,size:T=`md`,variant:E=`footer`,ariaLabel:D=`Pagination`,className:O=``,...k}=m;a(`AppTablePagination`,k),i(`AppTablePagination`,`mode`,S,c),i(`AppTablePagination`,`size`,T,l),i(`AppTablePagination`,`variant`,E,u);let A=Number(v)||0,j=Number(_)||0,M=g===void 0?j<=0:g<=0,N=Math.max(1,g??Math.ceil(j/(A>0?A:10))),P=Math.min(Math.max(1,Number(h)||1),N),F=A>0&&!!b&&C!==!1;if(M||N<=1&&!F)return null;let I=A>0&&!x.includes(A)?[...x,A].sort((e,t)=>e-t):x,L=S===`numbered`,R=L?e(P,N,{siblingCount:w}):null,z=[`table-pagination`,E===`standalone`&&`wui-table-pagination-standalone`,T===`sm`&&`wui-table-pagination-sm`,O].filter(Boolean).join(` `);return/* @__PURE__ */ s(`nav`,{className:z,"aria-label":D,...p,...k,children:[F&&/* @__PURE__ */ o(`span`,{className:`tpg-rows`,children:/* @__PURE__ */ o(r,{compact:!0,"aria-label":`Rows per page`,value:String(A),onChange:e=>b(Number(e)),options:I.map(e=>({value:String(e),label:`${e} per page`}))})}),!L&&/* @__PURE__ */ s(`span`,{className:`tpg-range`,children:[`Page `,P,` of `,N]}),/* @__PURE__ */ s(`div`,{className:`tpg-nav`,children:[/* @__PURE__ */ o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>y?.(Math.max(1,P-1)),disabled:P<=1,"aria-label":`Previous page`,children:/* @__PURE__ */ o(n,{name:`arrow-left`,size:18})}),L&&R.map(e=>typeof e==`number`?/* @__PURE__ */ o(`button`,{type:`button`,className:`tpg-page${e===P?` is-active`:``}`,onClick:()=>y?.(e),"aria-current":e===P?`page`:void 0,"aria-label":`Page ${e}`,children:e},e):/* @__PURE__ */ o(`span`,{className:`tpg-ellipsis`,"aria-hidden":`true`,children:`…`},e)),/* @__PURE__ */ o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>y?.(Math.min(N,P+1)),disabled:P>=N,"aria-label":`Next page`,children:/* @__PURE__ */ o(n,{name:`arrow-right`,size:18})})]})]})}export{f as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppButton.js";import{formatNumber as r}from"@webority/ui-elements/helpers";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o(o){let{marker:s,props:c}=e(`AppTableToolbar`,o),{filters:l,actions:u,selectedCount:d=0,bulkActions:f,onClearSelection:p,totalCount:m,pageCount:h,onSelectAllMatching:g,allMatchingSelected:_=!1,className:v=``,...y}=c;t(`AppTableToolbar`,y);let b=d>0,x=typeof g==`function`&&typeof m==`number`,S=x&&_,C=e=>r(e,{decimals:0}),w=x&&!S&&b&&d>=(h??1)&&m>(h??d);return a(`div`,{className:`wui-table-toolbar${v?` ${v}`:``}`,...s,...y,children:[a(`div`,{className:`wui-table-toolbar-main`,hidden:b,children:[i(`div`,{className:`wui-table-toolbar-filters`,children:l}),i(`div`,{className:`wui-table-toolbar-actions`,children:u})]}),a(`div`,{className:`wui-table-toolbar-bulk`,hidden:!b,children:[a(`span`,{className:`wui-table-toolbar-count`,"aria-live":`polite`,children:[S?`All ${C(m)}`:C(d),` selected`]}),x&&a(`button`,{type:`button`,className:`btn btn-link btn-sm wui-table-toolbar-all`,hidden:!w,onClick:g,children:[`Select all `,C(m),` matching`]}),f,p&&i(n,{variant:`ghost`,size:`sm`,className:`wui-table-toolbar-clear`,onClick:p,children:S?`Clear selection`:`Clear`})]})]})}export{o as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppButton.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";function o(o){let{marker:s,props:c}=e(`AppTableToolbar`,o),{filters:l,actions:u,selectedCount:d=0,bulkActions:f,onClearSelection:p,totalCount:m,pageCount:h,onSelectAllMatching:g,allMatchingSelected:_=!1,className:v=``,...y}=c;n(`AppTableToolbar`,y);let b=d>0,x=typeof g==`function`&&typeof m==`number`,S=x&&_,C=e=>r(e,{decimals:0}),w=x&&!S&&b&&d>=(h??1)&&m>(h??d);return/* @__PURE__ */ a(`div`,{className:`wui-table-toolbar${v?` ${v}`:``}`,...s,...y,children:[/* @__PURE__ */ a(`div`,{className:`wui-table-toolbar-main`,hidden:b,children:[/* @__PURE__ */ i(`div`,{className:`wui-table-toolbar-filters`,children:l}),/* @__PURE__ */ i(`div`,{className:`wui-table-toolbar-actions`,children:u})]}),/* @__PURE__ */ a(`div`,{className:`wui-table-toolbar-bulk`,hidden:!b,children:[/* @__PURE__ */ a(`span`,{className:`wui-table-toolbar-count`,"aria-live":`polite`,children:[S?`All ${C(m)}`:C(d),` selected`]}),x&&/* @__PURE__ */ a(`button`,{type:`button`,className:`btn btn-link btn-sm wui-table-toolbar-all`,hidden:!w,onClick:g,children:[`Select all `,C(m),` matching`]}),f,p&&/* @__PURE__ */ i(t,{variant:`ghost`,size:`sm`,className:`wui-table-toolbar-clear`,onClick:p,children:S?`Clear selection`:`Clear`})]})]})}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"./AppTooltip.js";import i from"./AppIcon.js";import a from"./renderIconProp.js";import{formatNumber as o}from"@webority/ui-elements/helpers";import{cloneElement as s,useCallback as c,useEffect as l,useLayoutEffect as u,useRef as d,useState as f}from"react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import"@webority/ui-elements/elements/overflow";var ee=[`underline`,`pills`],te=[`horizontal`,`vertical`],ne=[`sm`,`md`,`lg`],re=[`automatic`,`manual`],g=[`scroll`,`menu`],_=[`success`,`warning`,`danger`,`info`],v=1,y=28,ie=.7;function b(b){let{marker:x,props:S}=e(`AppTabs`,b),{tabs:C,value:w,onChange:T,linkComponent:E,variant:D=`underline`,orientation:O=`horizontal`,size:k=`md`,fitted:A=!1,overflow:j=`scroll`,moreLabel:M=`More`,maxVisible:ae,activation:N=`automatic`,ariaLabel:oe,className:se=``,style:P,...F}=S;n(`AppTabs`,F),t(`AppTabs`,`variant`,D,ee),t(`AppTabs`,`orientation`,O,te),t(`AppTabs`,`size`,k,ne),t(`AppTabs`,`activation`,N,re),t(`AppTabs`,`overflow`,j,g);for(let e of C)t(`AppTabs`,`tabs[].tone`,e.tone,_);let I=d(null),L=d(null),R=O===`vertical`,z=(j===`menu`||ae!=null)&&!R,[B,V]=f(w);l(()=>{V(w)},[w]);let H=C.find(e=>!e.disabled)?.key,U=C.some(e=>e.key===B&&!e.disabled)?B:void 0,W=C.some(e=>e.key===w&&!e.disabled)?w:void 0,G=U??W??H,K=e=>{I.current?.querySelector(`[data-key="${CSS.escape(String(e))}"]`)?.focus()},q=c(()=>{let e=I.current,t=L.current;if(!e||!t||R||z)return;let n=e.scrollWidth-e.clientWidth;t.classList.toggle(`is-overflow-start`,e.scrollLeft>v),t.classList.toggle(`is-overflow-end`,n>v&&e.scrollLeft<n-v)},[R,z]),J=c(()=>{let e=I.current;if(!e)return;let t=e.querySelector(`.app-tab.active`);t?(R?(e.style.setProperty(`--wui-tab-y`,`${t.offsetTop}px`),e.style.setProperty(`--wui-tab-h`,`${t.offsetHeight}px`)):(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.toggleAttribute(`data-active-danger`,!!C.find(e=>e.key===w)?.danger)):e.style.setProperty(R?`--wui-tab-h`:`--wui-tab-w`,`0px`),e.setAttribute(`data-wui-tabs`,``),q()},[R,C,w,q]),Y=e=>!z||!I.current?.querySelector(`[data-key="${CSS.escape(String(e))}"][data-wui-overflow-hidden]`),X=c(()=>{let e=I.current;if(!e||R)return;let t=e.querySelector(`.app-tab.active`);if(!t)return;let n=y,r=t.offsetLeft,i=r+t.offsetWidth;r-n<e.scrollLeft?e.scrollLeft=Math.max(0,r-n):i+n>e.scrollLeft+e.clientWidth&&(e.scrollLeft=i+n-e.clientWidth)},[R]);u(()=>{J()},[J]),u(()=>{X()},[w,X]);let Z=d(J);l(()=>{Z.current=J},[J]),l(()=>{if(!document.fonts)return;let e=!0;return document.fonts.ready.then(()=>{e&&Z.current()}),()=>{e=!1}},[]),l(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>Z.current());return I.current&&e.observe(I.current),L.current&&e.observe(L.current),()=>e.disconnect()},[R,z]),l(()=>{let e=L.current;if(!z||!e)return;let t=()=>Z.current();return e.addEventListener(`wui-overflow-change`,t),()=>e.removeEventListener(`wui-overflow-change`,t)},[z]);function ce(e){let t=e.target?.dataset?.key;if(t==null)return;let n=C.findIndex(e=>e.key===t);if(n<0)return;let r=C.length,i=(e,t)=>{for(let n=1;n<=r;n++){let i=C[((e+t*n)%r+r)%r];if(!i.disabled&&Y(i.key))return i}return null},a=R?`ArrowDown`:`ArrowRight`,o=R?`ArrowUp`:`ArrowLeft`,s=null;if(e.key===a?s=i(n,1):e.key===o?s=i(n,-1):e.key===`Home`?s=C.find(e=>!e.disabled&&Y(e.key))??null:e.key===`End`&&(s=[...C].reverse().find(e=>!e.disabled&&Y(e.key))??null),!s)return;e.preventDefault(),V(s.key),K(s.key);let c=s.href!=null||s.to!=null;N===`automatic`&&!c&&T?.(s.key)}let Q=e=>{let t=I.current;t&&t.scrollBy({left:e*t.clientWidth*ie})},le=[`app-tabs`,D===`pills`?`app-tabs-pills`:``,R?`app-tabs-vertical`:``,k===`sm`?`app-tabs-sm`:``,k===`lg`?`app-tabs-lg`:``,A?`app-tabs-fitted`:``,se].filter(Boolean).join(` `),$=h(`div`,{ref:I,role:`tablist`,"aria-orientation":R?`vertical`:void 0,"aria-label":oe,className:le,style:P,"data-wui-overflow-list":z?``:void 0,...F,onKeyDown:ce,onScroll:q,children:[C.map(e=>{let t=e.key===w,n=e.href!=null||e.to!=null,i={role:`tab`,"data-key":e.key,"aria-selected":t,tabIndex:e.key===G?0:-1,className:`app-tab${t?` active`:``}${e.danger?` danger`:``}${n&&e.disabled?` disabled`:``}`},s=h(p,{children:[e.image?m(`img`,{className:`app-tab-img`,src:e.image,alt:e.imageAlt??``}):a(e.icon,{size:16,className:`app-tab-icon`}),m(`span`,{className:`wui-tab-label`,children:e.label}),(e.countLabel||e.count!=null)&&m(`span`,{className:`app-tab-count${e.tone?` ${e.tone}`:``}`,children:e.countLabel||o(e.count,{decimals:0})})]}),c;if(n){let t=e.to!=null&&E?E:`a`,n=e.rel??(e.target===`_blank`?`noopener noreferrer`:void 0),r=e.disabled?{"aria-disabled":!0}:t===`a`?{href:e.href??e.to,target:e.target,rel:n}:{to:e.to,target:e.target,rel:n},a=t=>{if(e.disabled){t.preventDefault();return}t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(V(e.key),T?.(e.key))};c=m(t,{...i,...r,onClick:a,children:s},e.key)}else c=m(`button`,{type:`button`,...i,disabled:e.disabled,onClick:()=>{e.disabled||(V(e.key),T?.(e.key))},children:s},e.key);return e.tooltip?m(r,{content:e.tooltip,children:c},e.key):c}),m(`span`,{className:`app-tab-indicator`,"aria-hidden":`true`,"data-wui-overflow-skip":``})]});return R?s($,x):z?m(`wui-overflow`,{...x,ref:L,class:`app-tabs-wrap`,label:M,children:$}):h(`div`,{...x,ref:L,className:`app-tabs-wrap`,children:[m(`button`,{type:`button`,className:`app-tabs-scroll-btn prev`,"aria-label":`Scroll tabs backward`,tabIndex:-1,onClick:()=>Q(-1),children:m(i,{name:`chevron-left`,size:16})}),$,m(`button`,{type:`button`,className:`app-tabs-scroll-btn next`,"aria-label":`Scroll tabs forward`,tabIndex:-1,onClick:()=>Q(1),children:m(i,{name:`chevron-right`,size:16})})]})}export{b as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./AppTooltip.js";import r from"./renderIconProp.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import{formatNumber as o}from"@webority/ui-elements/helpers";import{cloneElement as s,useCallback as c,useEffect as l,useLayoutEffect as u,useRef as d,useState as f}from"react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import"@webority/ui-elements/elements/overflow";var g=[`underline`,`pills`],ee=[`horizontal`,`vertical`],te=[`sm`,`md`,`lg`],ne=[`automatic`,`manual`],re=[`scroll`,`menu`],_=[`success`,`warning`,`danger`,`info`],v=1,y=28,b=.7;function x(x){let{marker:S,props:ie}=e(`AppTabs`,x),{tabs:C,value:w,onChange:T,linkComponent:E,variant:D=`underline`,orientation:O=`horizontal`,size:k=`md`,fitted:A=!1,overflow:j=`scroll`,moreLabel:M=`More`,maxVisible:ae,activation:N=`automatic`,ariaLabel:P,className:oe=``,style:F,...I}=ie;a(`AppTabs`,I),i(`AppTabs`,`variant`,D,g),i(`AppTabs`,`orientation`,O,ee),i(`AppTabs`,`size`,k,te),i(`AppTabs`,`activation`,N,ne),i(`AppTabs`,`overflow`,j,re);for(let e of C)i(`AppTabs`,`tabs[].tone`,e.tone,_);let L=d(null),R=d(null),z=O===`vertical`,B=(j===`menu`||ae!=null)&&!z,[V,H]=f(w);l(()=>{H(w)},[w]);let U=C.find(e=>!e.disabled)?.key,W=C.some(e=>e.key===V&&!e.disabled)?V:void 0,G=C.some(e=>e.key===w&&!e.disabled)?w:void 0,K=W??G??U,se=e=>{L.current?.querySelector(`[data-key="${CSS.escape(String(e))}"]`)?.focus()},q=c(()=>{let e=L.current,t=R.current;if(!e||!t||z||B)return;let n=e.scrollWidth-e.clientWidth;t.classList.toggle(`is-overflow-start`,e.scrollLeft>v),t.classList.toggle(`is-overflow-end`,n>v&&e.scrollLeft<n-v)},[z,B]),J=c(()=>{let e=L.current;if(!e)return;let t=e.querySelector(`.app-tab.active`);t?(z?(e.style.setProperty(`--wui-tab-y`,`${t.offsetTop}px`),e.style.setProperty(`--wui-tab-h`,`${t.offsetHeight}px`)):(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.toggleAttribute(`data-active-danger`,!!C.find(e=>e.key===w)?.danger)):e.style.setProperty(z?`--wui-tab-h`:`--wui-tab-w`,`0px`),e.setAttribute(`data-wui-tabs`,``),q()},[z,C,w,q]),Y=e=>!B||!L.current?.querySelector(`[data-key="${CSS.escape(String(e))}"][data-wui-overflow-hidden]`),X=c(()=>{let e=L.current;if(!e||z)return;let t=e.querySelector(`.app-tab.active`);if(!t)return;let n=y,r=t.offsetLeft,i=r+t.offsetWidth;r-n<e.scrollLeft?e.scrollLeft=Math.max(0,r-n):i+n>e.scrollLeft+e.clientWidth&&(e.scrollLeft=i+n-e.clientWidth)},[z]);u(()=>{J()},[J]),u(()=>{X()},[w,X]);let Z=d(J);l(()=>{Z.current=J},[J]),l(()=>{if(!document.fonts)return;let e=!0;return document.fonts.ready.then(()=>{e&&Z.current()}),()=>{e=!1}},[]),l(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>Z.current());return L.current&&e.observe(L.current),R.current&&e.observe(R.current),()=>e.disconnect()},[z,B]),l(()=>{let e=R.current;if(!B||!e)return;let t=()=>Z.current();return e.addEventListener(`wui-overflow-change`,t),()=>e.removeEventListener(`wui-overflow-change`,t)},[B]);function ce(e){let t=e.target?.dataset?.key;if(t==null)return;let n=C.findIndex(e=>e.key===t);if(n<0)return;let r=C.length,i=(e,t)=>{for(let n=1;n<=r;n++){let i=C[((e+t*n)%r+r)%r];if(!i.disabled&&Y(i.key))return i}return null},a=z?`ArrowDown`:`ArrowRight`,o=z?`ArrowUp`:`ArrowLeft`,s=null;if(e.key===a?s=i(n,1):e.key===o?s=i(n,-1):e.key===`Home`?s=C.find(e=>!e.disabled&&Y(e.key))??null:e.key===`End`&&(s=[...C].reverse().find(e=>!e.disabled&&Y(e.key))??null),!s)return;e.preventDefault(),H(s.key),se(s.key);let c=s.href!=null||s.to!=null;N===`automatic`&&!c&&T?.(s.key)}let Q=e=>{let t=L.current;t&&t.scrollBy({left:e*t.clientWidth*b})},le=[`app-tabs`,D===`pills`?`app-tabs-pills`:``,z?`app-tabs-vertical`:``,k===`sm`?`app-tabs-sm`:``,k===`lg`?`app-tabs-lg`:``,A?`app-tabs-fitted`:``,oe].filter(Boolean).join(` `),$=/* @__PURE__ */ h(`div`,{ref:L,role:`tablist`,"aria-orientation":z?`vertical`:void 0,"aria-label":P,className:le,style:F,"data-wui-overflow-list":B?``:void 0,...I,onKeyDown:ce,onScroll:q,children:[C.map(e=>{let t=e.key===w,i=e.href!=null||e.to!=null,a={role:`tab`,"data-key":e.key,"aria-selected":t,tabIndex:e.key===K?0:-1,className:`app-tab${t?` active`:``}${e.danger?` danger`:``}${i&&e.disabled?` disabled`:``}`},s=/* @__PURE__ */ h(p,{children:[e.image?/* @__PURE__ */ m(`img`,{className:`app-tab-img`,src:e.image,alt:e.imageAlt??``}):r(e.icon,{size:16,className:`app-tab-icon`}),/* @__PURE__ */ m(`span`,{className:`wui-tab-label`,children:e.label}),(e.countLabel||e.count!=null)&&/* @__PURE__ */ m(`span`,{className:`app-tab-count${e.tone?` ${e.tone}`:``}`,children:e.countLabel||o(e.count,{decimals:0})})]}),c;if(i){let t=e.to!=null&&E?E:`a`,n=e.rel??(e.target===`_blank`?`noopener noreferrer`:void 0),r=e.disabled?{"aria-disabled":!0}:t===`a`?{href:e.href??e.to,target:e.target,rel:n}:{to:e.to,target:e.target,rel:n},i=t=>{e.disabled?t.preventDefault():t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(H(e.key),T?.(e.key))};c=/* @__PURE__ */ m(t,{...a,...r,onClick:i,children:s},e.key)}else c=/* @__PURE__ */ m(`button`,{type:`button`,...a,disabled:e.disabled,onClick:()=>{e.disabled||(H(e.key),T?.(e.key))},children:s},e.key);return e.tooltip?/* @__PURE__ */ m(n,{content:e.tooltip,children:c},e.key):c}),/* @__PURE__ */ m(`span`,{className:`app-tab-indicator`,"aria-hidden":`true`,"data-wui-overflow-skip":``})]});return z?s($,S):B?/* @__PURE__ */ m(`wui-overflow`,{...S,ref:R,class:`app-tabs-wrap`,label:M,children:$}):/* @__PURE__ */ h(`div`,{...S,ref:R,className:`app-tabs-wrap`,children:[/* @__PURE__ */ m(`button`,{type:`button`,className:`app-tabs-scroll-btn prev`,"aria-label":`Scroll tabs backward`,tabIndex:-1,onClick:()=>Q(-1),children:/* @__PURE__ */ m(t,{name:`chevron-left`,size:16})}),$,/* @__PURE__ */ m(`button`,{type:`button`,className:`app-tabs-scroll-btn next`,"aria-label":`Scroll tabs forward`,tabIndex:-1,onClick:()=>Q(1),children:/* @__PURE__ */ m(t,{name:`chevron-right`,size:16})})]})}export{x as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o,{readValues as s,writeValues as c}from"./useWuiControl.js";import{forwardRef as l,useId as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/taginput";var p=[`sm`,`lg`],m=l(function(l,m){let{marker:h,props:g}=e(`AppTagInput`,l),{values:_,onChange:v,placeholder:y=`Add…`,name:b,label:x,error:S,hint:C,required:w=!1,size:T,maxTags:E,allowDuplicates:D=!1,disabled:O=!1,id:k,ariaLabel:A,className:j=``,fieldClassName:M=``,help:N,helpLabel:P=`More information`,...F}=g;n(`AppTagInput`,F),t(`AppTagInput`,`size`,T,p);let I=u(),L=k||I,{setRef:R}=o({ref:m,value:_,onChange:v,readValue:s,writeValue:c});return f(`div`,{...h,className:`field${M?` ${M}`:``}`,children:[x&&f(`label`,{className:`label`,htmlFor:L,children:[x,w&&d(a,{}),N&&d(i,{label:P,children:N})]}),d(`wui-taginput`,{"aria-label":A||(typeof x==`string`?x:void 0),"aria-describedby":S?`${L}-error`:C?`${L}-hint`:void 0,"aria-invalid":S?`true`:void 0,id:L,ref:R,name:b,placeholder:y,size:T||void 0,"max-tags":E===void 0?void 0:String(E),"allow-duplicates":D?``:void 0,disabled:O?``:void 0,required:w?``:void 0,className:j||void 0,...F}),d(r,{error:S,hint:C,errorId:`${L}-error`,hintId:`${L}-hint`})]})});export{m 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,{readValues as a,writeValues as o}from"./useWuiControl.js";import s from"./warnInvalidValue.js";import c from"./warnUnknownProps.js";import{forwardRef as l,useId as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/taginput";var p=[`sm`,`lg`],m=l(function(l,m){let{marker:h,props:g}=t(`AppTagInput`,l),{values:_,onChange:v,placeholder:y=`Add…`,name:b,label:x,error:S,hint:C,required:w=!1,optional:T=!1,size:E,maxTags:D,allowDuplicates:O=!1,disabled:k=!1,id:A,ariaLabel:j,className:M=``,fieldClassName:N=``,help:P,helpLabel:F=`More information`,...I}=g;c(`AppTagInput`,I),s(`AppTagInput`,`size`,E,p);let L=u(),R=A||L,{setRef:z}=i({ref:m,value:_,onChange:v,readValue:a,writeValue:o});return/* @__PURE__ */ f(`div`,{...h,className:`field${N?` ${N}`:``}`,children:[x&&/* @__PURE__ */ f(`label`,{className:`label`,htmlFor:R,children:[x,T&&!w&&/* @__PURE__ */ d(`span`,{className:`label-optional`,children:` (optional)`}),w&&/* @__PURE__ */ d(r,{}),P&&/* @__PURE__ */ d(n,{label:F,children:P})]}),/* @__PURE__ */ d(`wui-taginput`,{"aria-label":j||(typeof x==`string`?x:void 0),"aria-describedby":S?`${R}-error`:C?`${R}-hint`:void 0,"aria-invalid":S?`true`:void 0,id:R,ref:z,name:b,placeholder:y,size:E||void 0,"max-tags":D===void 0?void 0:String(D),"allow-duplicates":O?``:void 0,disabled:k?``:void 0,required:w?``:void 0,className:M||void 0,...I}),/* @__PURE__ */ d(e,{error:S,hint:C,errorId:`${R}-error`,hintId:`${R}-hint`})]})});export{m as default};
@@ -1 +1 @@
1
- import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import{forwardRef as o,useCallback as s,useEffect as c,useId as l,useLayoutEffect as u,useRef as d,useState as f}from"react";import{Form as p}from"react-bootstrap";import{jsx as m,jsxs as h}from"react/jsx-runtime";var g=o(function(o,g){let{marker:_,props:v}=e(`AppTextarea`,o),{label:y,required:b=!1,optional:x=!1,error:S,hint:C,help:w,helpLabel:T=`More information`,id:E,name:D,rows:O=4,autoGrow:k=!1,showCount:A=!1,maxLength:j,disabled:M=!1,readOnly:N=!1,className:P=``,fieldClassName:F=``,...I}=v;n(`AppTextarea`,I),c(()=>{x&&b&&typeof process<`u`&&process.env.NODE_ENV!==`production`&&t(`AppTextarea: optional and required together; optional ignored`)},[x,b]);let L=l(),R=E||L,z=[`textarea`,k?`autosize`:``,S?`error`:``,P].filter(Boolean).join(` `),B=S&&R?`${R}-error`:void 0,V=C&&R?`${R}-hint`:void 0,H=B||V,U=d(null),W=e=>{U.current=e,typeof g==`function`?g(e):g&&(g.current=e)},G=s(()=>{let e=U.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[]);u(()=>{k&&G()},[k,G,I.value]);let[K,q]=f(()=>String(I.value??I.defaultValue??``).length);c(()=>{!A||I.value===void 0||q(String(I.value??``).length)},[I.value,A]);let J=e=>{k&&G(),A&&q(e.target.value.length),I.onInput?.(e)};return h(p.Group,{..._,className:`field${F?` ${F}`:``}`,children:[y&&h(p.Label,{className:`label`,htmlFor:R,children:[y,x&&!b&&m(`span`,{className:`label-optional`,children:` (optional)`}),b&&m(a,{}),w&&m(i,{label:T,children:w})]}),m(p.Control,{as:`textarea`,id:R,name:D,rows:O,className:z,"aria-invalid":S?`true`:`false`,"aria-describedby":H,required:b,maxLength:j,disabled:M,readOnly:N,...I,ref:W,onInput:J}),m(r,{error:S,hint:C,errorId:B,hintId:V}),A&&h(`div`,{className:`field-count${j&&K>=j?` at-limit`:``}`,children:[K,j?` / ${j}`:``]})]})});export{g 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"./warnUnknownProps.js";import{forwardRef as o,useCallback as s,useEffect as c,useId as l,useLayoutEffect as u,useRef as d,useState as f}from"react";import{Form as p}from"react-bootstrap";import{jsx as m,jsxs as h}from"react/jsx-runtime";var g=o(function(o,g){let{marker:_,props:v}=n(`AppTextarea`,o),{label:y,required:b=!1,optional:x=!1,error:S,hint:C,help:w,helpLabel:T=`More information`,id:E,name:D,rows:O=4,autoGrow:k=!1,showCount:A=!1,maxLength:j,disabled:M=!1,readOnly:N=!1,className:P=``,fieldClassName:F=``,...I}=v;a(`AppTextarea`,I),c(()=>{x&&b&&typeof process<`u`&&process.env.NODE_ENV!==`production`&&e(`AppTextarea: optional and required together; optional ignored`)},[x,b]);let L=l(),R=E||L,z=[`textarea`,k?`autosize`:``,S?`error`:``,P].filter(Boolean).join(` `),B=S&&R?`${R}-error`:void 0,V=C&&R?`${R}-hint`:void 0,H=B||V,U=d(null),W=e=>{U.current=e,typeof g==`function`?g(e):g&&(g.current=e)},G=s(()=>{let e=U.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[]);u(()=>{k&&G()},[k,G,I.value]);let[K,q]=f(()=>String(I.value??I.defaultValue??``).length);c(()=>{A&&I.value!==void 0&&q(String(I.value??``).length)},[I.value,A]);let J=e=>{k&&G(),A&&q(e.target.value.length),I.onInput?.(e)};return/* @__PURE__ */ h(p.Group,{..._,className:`field${F?` ${F}`:``}`,children:[y&&/* @__PURE__ */ h(p.Label,{className:`label`,htmlFor:R,children:[y,x&&!b&&/* @__PURE__ */ m(`span`,{className:`label-optional`,children:` (optional)`}),b&&/* @__PURE__ */ m(i,{}),w&&/* @__PURE__ */ m(r,{label:T,children:w})]}),/* @__PURE__ */ m(p.Control,{as:`textarea`,id:R,name:D,rows:O,className:z,"aria-invalid":S?`true`:`false`,"aria-describedby":H,required:b,maxLength:j,disabled:M,readOnly:N,...I,ref:W,onInput:J}),/* @__PURE__ */ m(t,{error:S,hint:C,errorId:B,hintId:V}),A&&/* @__PURE__ */ h(`div`,{className:`field-count${j&&K>=j?` at-limit`:``}`,children:[K,j?` / ${j}`:``]})]})});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"./AppActionIcon.js";import i from"./AppSegmented.js";import{DEFAULT_THEME_EFFECT as a,DEFAULT_THEME_STORAGE_KEY as o,THEME_CHANGE_EVENT as s,THEME_EFFECTS as c,THEME_MODES as l,applyTheme as u,nextTheme as d,readStoredTheme as f,resolveTheme as p,storeTheme as m,transitionTheme as h,watchSystemTheme as g}from"@webority/ui-elements/helpers";import{useCallback as _,useEffect as v,useId as y,useState as b}from"react";import{jsx as x}from"react/jsx-runtime";import{flushSync as S}from"react-dom";var C={light:`sun`,dark:`moon`,auto:`monitor`},w={light:`light`,dark:`dark`,auto:`follows your device`},T=[`icon`,`segmented`],E={sm:16,md:20,lg:24,xl:28};function D(D){let{marker:O,props:k}=e(`AppThemeToggle`,D),{variant:A=`icon`,effect:j=a,includeAuto:M=!0,storageKey:N=o,duration:P,label:F=`Theme`,lightLabel:I=`Light`,darkLabel:L=`Dark`,autoLabel:R=`System`,name:z,size:B=`md`,tooltipPlacement:V=`auto`,onChange:H,className:U=``,...W}=k;n(`AppThemeToggle`,W),t(`AppThemeToggle`,`variant`,A,T),t(`AppThemeToggle`,`effect`,j,c),t(`AppThemeToggle`,`size`,B,Object.keys(E));let G=_(e=>e===`auto`&&!M?p(e):e,[M]),[K,q]=b(()=>G(typeof window>`u`?`auto`:f(N))),J=y(),Y=z||J;v(()=>{let e=document.documentElement.getAttribute(`data-theme`);l.includes(e)?q(G(e)):u(f(N))},[]),v(()=>{let e=e=>{let t=e.detail?.preference;l.includes(t)&&q(G(t))};return document.addEventListener(s,e),()=>document.removeEventListener(s,e)},[G]),v(()=>g(()=>{document.documentElement.getAttribute(`data-theme`)===`auto`&&u(`auto`)}),[]);let X=_((e,t)=>{let n=t?.getBoundingClientRect?.()??{left:0,top:0,width:0,height:0},r={x:n.left+n.width/2,y:n.top+n.height/2};h(()=>{u(e),m(e,N),S(()=>q(e)),H?.(e)},{effect:j,to:p(e),origin:r,duration:P})},[N,j,P,H]);if(A===`segmented`){let e=[{value:`light`,label:I,icon:C.light},{value:`dark`,label:L,icon:C.dark}];return M&&e.push({value:`auto`,label:R,icon:C.auto}),x(i,{...O,options:e,value:K,name:Y,label:F,size:B===`xl`?`lg`:B,className:[`wui-theme-toggle`,`wui-theme-toggle-segmented`,U].filter(Boolean).join(` `),onChange:e=>{if(e===K)return;let t=document.querySelector(`.segmented-input[name="${CSS.escape(Y)}"][value="${e}"]`);X(e,t?.closest(`.segmented-option`)??t)}})}return x(r,{...O,icon:C[K],label:`${F}: ${w[K]}`,size:E[B]??E.md,tooltipPlacement:V,onClick:e=>X(d(K,{includeAuto:M}),e.currentTarget),className:[`wui-theme-toggle`,U].filter(Boolean).join(` `)})}export{D as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppActionIcon.js";import n from"./AppSegmented.js";import r from"./warnInvalidValue.js";import i from"./warnUnknownProps.js";import{DEFAULT_THEME_EFFECT as a,DEFAULT_THEME_STORAGE_KEY as o,THEME_CHANGE_EVENT as s,THEME_EFFECTS as c,THEME_MODES as l,applyTheme as u,nextTheme as d,readStoredTheme as f,resolveTheme as p,storeTheme as m,transitionTheme as h,watchSystemTheme as g}from"@webority/ui-elements/helpers";import{useCallback as _,useEffect as v,useId as y,useState as b}from"react";import{jsx as x}from"react/jsx-runtime";import{flushSync as S}from"react-dom";var C={light:`sun`,dark:`moon`,auto:`monitor`},w={light:`light`,dark:`dark`,auto:`follows your device`},T=[`icon`,`segmented`],E={sm:16,md:20,lg:24,xl:28};function D(D){let{marker:O,props:k}=e(`AppThemeToggle`,D),{variant:A=`icon`,effect:j=a,includeAuto:M=!0,storageKey:N=o,duration:P,label:F=`Theme`,lightLabel:I=`Light`,darkLabel:L=`Dark`,autoLabel:R=`System`,name:z,size:B=`md`,tooltipPlacement:V=`auto`,onChange:H,className:U=``,...W}=k;i(`AppThemeToggle`,W),r(`AppThemeToggle`,`variant`,A,T),r(`AppThemeToggle`,`effect`,j,c),r(`AppThemeToggle`,`size`,B,Object.keys(E));let G=_(e=>e===`auto`&&!M?p(e):e,[M]),[K,q]=b(()=>G(typeof window>`u`?`auto`:f(N))),J=y(),Y=z||J;v(()=>{let e=document.documentElement.getAttribute(`data-theme`);l.includes(e)?q(G(e)):u(f(N))},[]),v(()=>{let e=e=>{let t=e.detail?.preference;l.includes(t)&&q(G(t))};return document.addEventListener(s,e),()=>document.removeEventListener(s,e)},[G]),v(()=>g(()=>{document.documentElement.getAttribute(`data-theme`)===`auto`&&u(`auto`)}),[]);let X=_((e,t)=>{let n=t?.getBoundingClientRect?.()??{left:0,top:0,width:0,height:0},r={x:n.left+n.width/2,y:n.top+n.height/2};h(()=>{u(e),m(e,N),S(()=>q(e)),H?.(e)},{effect:j,to:p(e),origin:r,duration:P})},[N,j,P,H]);if(A===`segmented`){let e=[{value:`light`,label:I,icon:C.light},{value:`dark`,label:L,icon:C.dark}];return M&&e.push({value:`auto`,label:R,icon:C.auto}),/* @__PURE__ */ x(n,{...O,options:e,value:K,name:Y,label:F,size:B===`xl`?`lg`:B,className:[`wui-theme-toggle`,`wui-theme-toggle-segmented`,U].filter(Boolean).join(` `),onChange:e=>{if(e===K)return;let t=document.querySelector(`.segmented-input[name="${CSS.escape(Y)}"][value="${e}"]`);X(e,t?.closest(`.segmented-option`)??t)}})}return/* @__PURE__ */ x(t,{...O,icon:C[K],label:`${F}: ${w[K]}`,size:E[B]??E.md,tooltipPlacement:V,onClick:e=>X(d(K,{includeAuto:M}),e.currentTarget),className:[`wui-theme-toggle`,U].filter(Boolean).join(` `)})}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"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o from"./useWuiControl.js";import{cloneElement as s,forwardRef as c,useId as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import"@webority/ui-elements/elements/timepicker";var f=[`sm`,`md`,`lg`],p=[`12`,`24`],m=c(function(c,m){let{marker:h,props:g}=e(`AppTimePicker`,c),{value:_,onChange:v,label:y,required:b=!1,hint:x,error:S,help:C,helpLabel:w=`More information`,name:T,min:E,max:D,step:O,format:k=24,placeholder:A=`Select time`,disabled:j,size:M,id:N,ariaLabel:P,className:F=``,fieldClassName:I=``,...L}=g;n(`AppTimePicker`,L),t(`AppTimePicker`,`size`,M,f);let R=String(k);t(`AppTimePicker`,`format`,R,p);let z=l(),B=N||T||z,{setRef:V}=o({ref:m,value:_??``,onChange:v}),H=!y&&!S&&!x,U=S?`${B}-error`:void 0,W=x?`${B}-hint`:void 0,G=u(`wui-timepicker`,{ref:V,value:_||void 0,id:B,name:T,min:E,max:D,step:O==null?void 0:String(O),format:R,placeholder:A,size:M||void 0,"aria-label":P||(typeof y==`string`?y:void 0),"aria-describedby":U||W,"aria-invalid":S?`true`:void 0,disabled:j?``:void 0,required:b?``:void 0,className:F||void 0,...L});return H?s(G,h):d(`div`,{...h,className:`field${I?` ${I}`:``}`,children:[y&&d(`label`,{className:`label`,htmlFor:B,children:[y,b&&u(a,{}),C&&u(i,{label:w,children:C})]}),G,u(r,{error:S,hint:x,errorId:U,hintId:W})]})});export{m as default};
1
+ import e from"../lib/FieldMessage.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i from"./useWuiControl.js";import a from"./warnInvalidValue.js";import o from"./warnUnknownProps.js";import{cloneElement as s,forwardRef as c,useId as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import"@webority/ui-elements/elements/timepicker";var f=[`sm`,`md`,`lg`],p=[`12`,`24`],m=c(function(c,m){let{marker:h,props:g}=t(`AppTimePicker`,c),{value:_,onChange:v,label:y,required:b=!1,optional:x=!1,hint:S,error:C,help:w,helpLabel:T=`More information`,name:E,min:D,max:O,step:k,format:A=24,placeholder:j=`Select time`,disabled:M,size:N,id:P,ariaLabel:F,className:I=``,fieldClassName:L=``,...R}=g;o(`AppTimePicker`,R),a(`AppTimePicker`,`size`,N,f);let z=String(A);a(`AppTimePicker`,`format`,z,p);let B=l(),V=P||E||B,{setRef:H}=i({ref:m,value:_??``,onChange:v}),U=!y&&!C&&!S,W=C?`${V}-error`:void 0,G=S?`${V}-hint`:void 0,K=/* @__PURE__ */ u(`wui-timepicker`,{ref:H,value:_||void 0,id:V,name:E,min:D,max:O,step:k==null?void 0:String(k),format:z,placeholder:j,size:N||void 0,"aria-label":F||(typeof y==`string`?y:void 0),"aria-describedby":W||G,"aria-invalid":C?`true`:void 0,disabled:M?``:void 0,required:b?``:void 0,className:I||void 0,...R});return U?s(K,h):/* @__PURE__ */ d(`div`,{...h,className:`field${L?` ${L}`:``}`,children:[y&&/* @__PURE__ */ d(`label`,{className:`label`,htmlFor:V,children:[y,x&&!b&&/* @__PURE__ */ u(`span`,{className:`label-optional`,children:` (optional)`}),b&&/* @__PURE__ */ u(r,{}),w&&/* @__PURE__ */ u(n,{label:T,children:w})]}),K,/* @__PURE__ */ u(e,{error:C,hint:S,errorId:W,hintId:G})]})});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{jsx as i,jsxs as a}from"react/jsx-runtime";var o=[`feed`,`progress`,`steps`],s=[`vertical`,`horizontal`],c=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],l=[`neutral`,`success`,`warning`,`danger`,`info`],u=[`sm`,`md`,`lg`],d={done:`check`,current:`clock`,"on-hold":`lock`,rejected:`x`,cancelled:`minus`,skipped:`arrow-right`,upcoming:null},f=e=>typeof e==`string`&&(/^https?:[/][/]/i.test(e)||e.startsWith(`/`)&&e[1]!==`/`&&e[1]!==`\\`)&&![...e].some(e=>e.charCodeAt(0)<=32||e.charCodeAt(0)===127);function p(e){if(!(e.byHref==null||e.byHref===``)){if(!f(e.byHref))throw Error(`<AppTimeline> items[].byHref must be a path starting with one '/', or an http:// or https:// address, with no spaces.`);if(!e.by)throw Error(`<AppTimeline> items[].byHref links the by name, so the item needs by.`)}}var m=e=>e.byHref?i(`a`,{className:`timeline-by-link`,href:e.byHref,children:e.by}):e.by;function h(f){let{marker:h,props:g}=e(`AppTimeline`,f),{items:_=[],variant:v=`feed`,orientation:y,iconVariant:b,size:x,className:S=``,style:C,...w}=g;n(`AppTimeline`,w),t(`AppTimeline`,`variant`,v,o),t(`AppTimeline`,`orientation`,y,s),t(`AppTimeline`,`iconVariant`,b,c),t(`AppTimeline`,`size`,typeof x==`string`?x:null,u);for(let e of _)t(`AppTimeline`,`items[].tone`,e.tone,l),p(e),v===`progress`&&t(`AppTimeline`,`items[].status`,e.status,Object.keys(d));let T=v===`progress`,E=v===`steps`,D=y===`horizontal`,O=b??(E?`bulk`:void 0),k=typeof x==`string`&&u.includes(x)?x:`md`,A=typeof x==`number`&&x>0?x:void 0,j=!A&&k!==`md`?` wui-timeline--${k}`:``,M=`${E?`timeline wui-timeline--steps${y===`vertical`?` wui-timeline--steps-vertical`:``}`:`timeline${T?` timeline--progress`:``}${D?` timeline--horizontal`:``}`}${j}${S?` ${S}`:``}`,N=E?A?Math.round(A*.43):{sm:19,md:24,lg:31}[k]:A?Math.round(A*.54):T?{sm:10,md:13,lg:17}[k]:{sm:10,md:12,lg:17}[k];return i(`ol`,{className:M,style:A?{...C,"--wui-timeline-dot":`${A}px`}:C,...h,...w,children:_.map((e,t)=>{let n=e.tone&&e.tone!==`neutral`?` ${e.tone}`:``;if(E){let o=e.eyebrow??`Step ${t+1}`;return a(`li`,{className:`timeline-item${n}`,children:[i(`span`,{className:`timeline-dot`,children:e.icon?i(r,{name:e.icon,size:N,variant:O}):null}),a(`div`,{className:`timeline-body`,children:[o!==``&&i(`div`,{className:`wui-timeline-eyebrow`,children:o}),i(`div`,{className:`timeline-title`,children:e.title}),e.description&&i(`div`,{className:`timeline-desc`,children:e.description})]})]},e.key??`${e.at}-${t}`)}let o=T?e.status:void 0,s=o?` is-${o}`:``,c=T?e.icon??(o?d[o]:void 0):e.icon||`circle`;return a(`li`,{className:`timeline-item${s}${n}`,children:[i(`span`,{className:`timeline-dot`,children:c?i(r,{name:c,size:N,variant:O}):null}),a(`div`,{className:`timeline-body`,children:[T?a(`div`,{className:`timeline-head`,children:[i(`div`,{className:`timeline-title`,children:e.title}),(e.at||e.time)&&a(`span`,{className:`timeline-when`,children:[e.at&&i(`span`,{className:`timeline-at`,title:e.atTitle||void 0,children:e.at}),e.time&&i(`span`,{className:`timeline-time`,children:e.time})]})]}):i(`div`,{className:`timeline-title`,children:e.title}),e.description&&i(`div`,{className:`timeline-desc`,children:e.description}),!T&&(e.at||e.time||e.by)&&a(`div`,{className:`timeline-meta`,children:[(e.at||e.time)&&a(`span`,{className:`timeline-when`,children:[e.at&&i(`span`,{className:`timeline-at`,title:e.atTitle||void 0,children:e.at}),e.time&&i(`span`,{className:`timeline-time`,children:e.time})]}),e.by&&i(`span`,{className:`timeline-by`,children:m(e)})]}),T&&e.by&&i(`div`,{className:`timeline-meta`,children:i(`span`,{className:`timeline-by`,children:m(e)})}),e.note&&i(`p`,{className:`timeline-note`,children:e.note})]})]},e.key??`${e.at}-${t}`)})})}export{h as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=[`feed`,`progress`,`steps`],s=[`vertical`,`horizontal`],c=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],l=[`neutral`,`success`,`warning`,`danger`,`info`],u=[`sm`,`md`,`lg`],d={done:`check`,current:`clock`,"on-hold":`lock`,rejected:`x`,cancelled:`minus`,skipped:`arrow-right`,upcoming:null},f=e=>typeof e==`string`&&(/^https?:[/][/]/i.test(e)||e.startsWith(`/`)&&e[1]!==`/`&&e[1]!==`\\`)&&![...e].some(e=>e.charCodeAt(0)<=32||e.charCodeAt(0)===127);function p(e){if(e.byHref!=null&&e.byHref!==``){if(!f(e.byHref))throw Error(`<AppTimeline> items[].byHref must be a path starting with one '/', or an http:// or https:// address, with no spaces.`);if(!e.by)throw Error(`<AppTimeline> items[].byHref links the by name, so the item needs by.`)}}var m=e=>e.byHref?/* @__PURE__ */ i(`a`,{className:`timeline-by-link`,href:e.byHref,children:e.by}):e.by;function h(f){let{marker:h,props:g}=e(`AppTimeline`,f),{items:_=[],variant:v=`feed`,orientation:y,iconVariant:b,size:x,className:S=``,style:C,...w}=g;r(`AppTimeline`,w),n(`AppTimeline`,`variant`,v,o),n(`AppTimeline`,`orientation`,y,s),n(`AppTimeline`,`iconVariant`,b,c),n(`AppTimeline`,`size`,typeof x==`string`?x:null,u);for(let e of _)n(`AppTimeline`,`items[].tone`,e.tone,l),p(e),v===`progress`&&n(`AppTimeline`,`items[].status`,e.status,Object.keys(d));let T=v===`progress`,E=v===`steps`,D=y===`horizontal`,O=b??(E?`bulk`:void 0),k=typeof x==`string`&&u.includes(x)?x:`md`,A=typeof x==`number`&&x>0?x:void 0,j=!A&&k!==`md`?` wui-timeline--${k}`:``,M=`${E?`timeline wui-timeline--steps${y===`vertical`?` wui-timeline--steps-vertical`:``}`:`timeline${T?` timeline--progress`:``}${D?` timeline--horizontal`:``}`}${j}${S?` ${S}`:``}`,N=E?A?Math.round(A*.43):{sm:19,md:24,lg:31}[k]:A?Math.round(A*.54):T?{sm:10,md:13,lg:17}[k]:{sm:10,md:12,lg:17}[k],P=A?{...C,"--wui-timeline-dot":`${A}px`}:C;return/* @__PURE__ */ i(`ol`,{className:M,style:P,...h,...w,children:_.map((e,n)=>{let r=e.tone&&e.tone!==`neutral`?` ${e.tone}`:``;if(E){let o=e.eyebrow??`Step ${n+1}`;return/* @__PURE__ */ a(`li`,{className:`timeline-item${r}`,children:[/* @__PURE__ */ i(`span`,{className:`timeline-dot`,children:e.icon?/* @__PURE__ */ i(t,{name:e.icon,size:N,variant:O}):null}),/* @__PURE__ */ a(`div`,{className:`timeline-body`,children:[o!==``&&/* @__PURE__ */ i(`div`,{className:`wui-timeline-eyebrow`,children:o}),/* @__PURE__ */ i(`div`,{className:`timeline-title`,children:e.title}),e.description&&/* @__PURE__ */ i(`div`,{className:`timeline-desc`,children:e.description})]})]},e.key??`${e.at}-${n}`)}let o=T?e.status:void 0,s=o?` is-${o}`:``,c=T?e.icon??(o?d[o]:void 0):e.icon||`circle`;return/* @__PURE__ */ a(`li`,{className:`timeline-item${s}${r}`,children:[/* @__PURE__ */ i(`span`,{className:`timeline-dot`,children:c?/* @__PURE__ */ i(t,{name:c,size:N,variant:O}):null}),/* @__PURE__ */ a(`div`,{className:`timeline-body`,children:[T?/* @__PURE__ */ a(`div`,{className:`timeline-head`,children:[/* @__PURE__ */ i(`div`,{className:`timeline-title`,children:e.title}),(e.at||e.time)&&/* @__PURE__ */ a(`span`,{className:`timeline-when`,children:[e.at&&/* @__PURE__ */ i(`span`,{className:`timeline-at`,title:e.atTitle||void 0,children:e.at}),e.time&&/* @__PURE__ */ i(`span`,{className:`timeline-time`,children:e.time})]})]}):/* @__PURE__ */ i(`div`,{className:`timeline-title`,children:e.title}),e.description&&/* @__PURE__ */ i(`div`,{className:`timeline-desc`,children:e.description}),!T&&(e.at||e.time||e.by)&&/* @__PURE__ */ a(`div`,{className:`timeline-meta`,children:[(e.at||e.time)&&/* @__PURE__ */ a(`span`,{className:`timeline-when`,children:[e.at&&/* @__PURE__ */ i(`span`,{className:`timeline-at`,title:e.atTitle||void 0,children:e.at}),e.time&&/* @__PURE__ */ i(`span`,{className:`timeline-time`,children:e.time})]}),e.by&&/* @__PURE__ */ i(`span`,{className:`timeline-by`,children:m(e)})]}),T&&e.by&&/* @__PURE__ */ i(`div`,{className:`timeline-meta`,children:/* @__PURE__ */ i(`span`,{className:`timeline-by`,children:m(e)})}),e.note&&/* @__PURE__ */ i(`p`,{className:`timeline-note`,children:e.note})]})]},e.key??`${e.at}-${n}`)})})}export{h as default};