@webority/ui-react 0.106.0 → 0.108.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 (195) hide show
  1. package/dist/canvas-kit/kit.js +26159 -26822
  2. package/dist/canvas-kit/manifest.json +1130 -1695
  3. package/dist/canvas-kit/release.json +6 -6
  4. package/dist/components/AppAccordion.js +1 -1
  5. package/dist/components/AppActionIcon.js +1 -1
  6. package/dist/components/AppAlert.js +1 -1
  7. package/dist/components/AppAsyncBlock.js +1 -1
  8. package/dist/components/AppAutocomplete.js +1 -1
  9. package/dist/components/AppAvatar.js +1 -1
  10. package/dist/components/AppAvatarGroup.js +1 -1
  11. package/dist/components/AppBadge.js +1 -1
  12. package/dist/components/AppBanner.js +1 -1
  13. package/dist/components/AppBreadcrumbs.js +1 -1
  14. package/dist/components/AppButton.js +1 -1
  15. package/dist/components/AppButtonGroup.js +1 -1
  16. package/dist/components/AppCalendar.js +1 -1
  17. package/dist/components/AppCard.js +1 -1
  18. package/dist/components/AppCarousel.js +1 -1
  19. package/dist/components/AppChart.js +1 -1
  20. package/dist/components/AppChartCard.js +1 -1
  21. package/dist/components/AppCheckbox.js +1 -1
  22. package/dist/components/AppChip.js +1 -1
  23. package/dist/components/AppChipGroup.js +1 -1
  24. package/dist/components/AppChoiceCard.js +1 -1
  25. package/dist/components/AppChoiceChip.js +1 -1
  26. package/dist/components/AppCodeBlock.js +1 -1
  27. package/dist/components/AppColorField.js +1 -1
  28. package/dist/components/AppColumnMenu.js +1 -1
  29. package/dist/components/AppCommandPalette.js +1 -1
  30. package/dist/components/AppCommentThread.js +1 -1
  31. package/dist/components/AppCompareTable.js +1 -1
  32. package/dist/components/AppConfirmDialog.js +1 -1
  33. package/dist/components/AppConsentBanner.js +1 -1
  34. package/dist/components/AppContextMenu.js +1 -1
  35. package/dist/components/AppCopyButton.js +1 -1
  36. package/dist/components/AppCountryFlag.js +1 -1
  37. package/dist/components/AppCountrySelect.js +1 -1
  38. package/dist/components/AppDashboardCell.js +1 -1
  39. package/dist/components/AppDashboardGrid.js +1 -1
  40. package/dist/components/AppDataTable.js +1 -1
  41. package/dist/components/AppDatePicker.js +1 -1
  42. package/dist/components/AppDateRangePicker.js +1 -1
  43. package/dist/components/AppDescriptions.js +1 -1
  44. package/dist/components/AppDetailPane.js +1 -1
  45. package/dist/components/AppDrawer.js +1 -1
  46. package/dist/components/AppDropZone.js +1 -1
  47. package/dist/components/AppDropdown.js +1 -1
  48. package/dist/components/AppDueDate.js +1 -1
  49. package/dist/components/AppEmptyState.js +1 -1
  50. package/dist/components/AppErrorSummary.js +1 -1
  51. package/dist/components/AppFileAttachment.js +1 -1
  52. package/dist/components/AppFilePicker.js +1 -1
  53. package/dist/components/AppFileTiles.js +1 -1
  54. package/dist/components/AppFileViewer.js +1 -1
  55. package/dist/components/AppFilterBar.js +1 -1
  56. package/dist/components/AppFloatingDock.js +1 -1
  57. package/dist/components/AppFormActions.js +1 -1
  58. package/dist/components/AppFormRow.js +1 -1
  59. package/dist/components/AppFormSection.js +1 -1
  60. package/dist/components/AppHoverCard.js +1 -1
  61. package/dist/components/AppIcon.js +1 -1
  62. package/dist/components/AppImagePicker.js +1 -0
  63. package/dist/components/AppInfoTip.js +1 -1
  64. package/dist/components/AppInlineEdit.js +1 -1
  65. package/dist/components/AppInput.js +1 -1
  66. package/dist/components/AppInputGroup.js +1 -1
  67. package/dist/components/AppKanban.js +1 -1
  68. package/dist/components/AppKbd.js +1 -1
  69. package/dist/components/AppKpiTile.js +1 -1
  70. package/dist/components/AppLightbox.js +1 -1
  71. package/dist/components/AppLink.js +1 -1
  72. package/dist/components/AppMarkdown.js +1 -1
  73. package/dist/components/AppMentionInput.js +1 -1
  74. package/dist/components/AppMeter.js +1 -1
  75. package/dist/components/AppMetricStrip.js +1 -1
  76. package/dist/components/AppModal.js +1 -1
  77. package/dist/components/AppMultiSelect.js +1 -1
  78. package/dist/components/AppNavList.js +1 -1
  79. package/dist/components/AppNavigationMenu.js +1 -1
  80. package/dist/components/AppNotificationCenter.js +1 -1
  81. package/dist/components/AppNumberInput.js +1 -1
  82. package/dist/components/AppOnboardingChecklist.js +1 -1
  83. package/dist/components/AppOtpInput.js +1 -1
  84. package/dist/components/AppPageHeader.js +1 -1
  85. package/dist/components/AppPhoneNumberInput.js +1 -1
  86. package/dist/components/AppPricingCard.js +1 -1
  87. package/dist/components/AppProgress.js +1 -1
  88. package/dist/components/AppQrCode.js +1 -1
  89. package/dist/components/AppRadio.js +1 -1
  90. package/dist/components/AppRadioGroup.js +1 -1
  91. package/dist/components/AppRating.js +1 -1
  92. package/dist/components/AppRecordPager.js +1 -1
  93. package/dist/components/AppRelativeTime.js +1 -1
  94. package/dist/components/AppRepeater.js +1 -1
  95. package/dist/components/AppResizable.js +1 -1
  96. package/dist/components/AppResizableHandle.js +1 -1
  97. package/dist/components/AppResizablePanel.js +1 -1
  98. package/dist/components/AppResourceCard.js +1 -1
  99. package/dist/components/AppResult.js +1 -1
  100. package/dist/components/AppRichText.js +1 -1
  101. package/dist/components/AppRollingNumber.js +1 -1
  102. package/dist/components/AppRouteError.js +1 -1
  103. package/dist/components/AppScrollbar.js +1 -1
  104. package/dist/components/AppSearch.js +1 -1
  105. package/dist/components/AppSectionCallToAction.js +1 -1
  106. package/dist/components/AppSectionFaq.js +1 -1
  107. package/dist/components/AppSectionFeatures.js +1 -1
  108. package/dist/components/AppSectionHero.js +1 -1
  109. package/dist/components/AppSectionLeadCapture.js +1 -0
  110. package/dist/components/AppSectionLogos.js +1 -1
  111. package/dist/components/AppSectionPricing.js +1 -1
  112. package/dist/components/AppSectionTestimonials.js +1 -1
  113. package/dist/components/AppSegmented.js +1 -1
  114. package/dist/components/AppSelect.js +1 -1
  115. package/dist/components/AppSeoHead.js +1 -0
  116. package/dist/components/AppShell.js +1 -1
  117. package/dist/components/AppShortcutLegend.js +1 -1
  118. package/dist/components/AppShowMore.js +1 -1
  119. package/dist/components/AppSkeleton.js +1 -1
  120. package/dist/components/AppSkeletonLines.js +1 -1
  121. package/dist/components/AppSlider.js +1 -1
  122. package/dist/components/AppSortableList.js +1 -1
  123. package/dist/components/AppSparkline.js +1 -1
  124. package/dist/components/AppSpinner.js +1 -1
  125. package/dist/components/AppSplash.js +1 -1
  126. package/dist/components/AppSplitButton.js +1 -1
  127. package/dist/components/AppSplitView.js +1 -1
  128. package/dist/components/AppStatusBadge.js +1 -1
  129. package/dist/components/AppStepper.js +1 -1
  130. package/dist/components/AppSwitch.js +1 -1
  131. package/dist/components/AppTablePagination.js +1 -1
  132. package/dist/components/AppTableToolbar.js +1 -1
  133. package/dist/components/AppTabs.js +1 -1
  134. package/dist/components/AppTagInput.js +1 -1
  135. package/dist/components/AppTextarea.js +1 -1
  136. package/dist/components/AppThemeToggle.js +1 -1
  137. package/dist/components/AppTimePicker.js +1 -1
  138. package/dist/components/AppTimeline.js +1 -1
  139. package/dist/components/AppToast.js +1 -1
  140. package/dist/components/AppToolbar.js +1 -1
  141. package/dist/components/AppTooltip.js +1 -1
  142. package/dist/components/AppTour.js +1 -1
  143. package/dist/components/AppTreeView.js +1 -1
  144. package/dist/components/AppTruncate.js +1 -1
  145. package/dist/components/AppUpdateBar.js +1 -1
  146. package/dist/components/AppWhatsNew.js +1 -1
  147. package/dist/components/AppWizard.js +1 -1
  148. package/dist/components/AppWorkspaceSwitcher.js +1 -1
  149. package/dist/components/iconCatalogNames.g.js +1 -1
  150. package/dist/components/iconGlyphs.g.js +1 -1
  151. package/dist/components/iconVariants.g.js +1 -1
  152. package/dist/guidance.json +119 -600
  153. package/dist/lib/useCommandPaletteShortcut.js +1 -1
  154. package/dist/lib/useFileDrop.js +1 -0
  155. package/dist/lib/wuiMarker.js +1 -1
  156. package/dist/types/components/AppAccordion.d.ts +1 -1
  157. package/dist/types/components/AppCompareTable.d.ts +45 -10
  158. package/dist/types/components/AppDescriptions.d.ts +10 -8
  159. package/dist/types/components/AppDrawer.d.ts +37 -0
  160. package/dist/types/components/AppEmptyState.d.ts +12 -5
  161. package/dist/types/components/AppImagePicker.d.ts +149 -0
  162. package/dist/types/components/AppInlineEdit.d.ts +0 -1
  163. package/dist/types/components/AppNavigationMenu.d.ts +1 -1
  164. package/dist/types/components/AppNotificationCenter.d.ts +16 -1
  165. package/dist/types/components/AppRecordPager.d.ts +2 -2
  166. package/dist/types/components/AppSectionLeadCapture.d.ts +67 -0
  167. package/dist/types/components/AppSelect.d.ts +7 -0
  168. package/dist/types/components/AppSeoHead.d.ts +42 -0
  169. package/dist/types/components/AppShortcutLegend.d.ts +13 -1
  170. package/dist/types/components/AppStepper.d.ts +2 -2
  171. package/dist/types/components/AppTablePagination.d.ts +36 -11
  172. package/dist/types/components/AppWhatsNew.d.ts +11 -2
  173. package/dist/types/components/iconGlyphs.g.d.ts +1 -0
  174. package/dist/types/components/iconVariants.g.d.ts +5 -0
  175. package/dist/types/index.d.ts +3 -8
  176. package/dist/types/lib/useFileDrop.d.ts +24 -0
  177. package/dist/types/lib/wuiMarker.d.ts +10 -0
  178. package/dist/ui-react.js +1 -1
  179. package/package.json +5 -5
  180. package/dist/components/AppAvatarPicker.js +0 -1
  181. package/dist/components/AppInfoList.js +0 -1
  182. package/dist/components/AppLogoPicker.js +0 -1
  183. package/dist/components/AppMenubar.js +0 -1
  184. package/dist/components/AppPagination.js +0 -1
  185. package/dist/components/AppSelectMini.js +0 -1
  186. package/dist/components/AppSidebarMenu.js +0 -1
  187. package/dist/components/AppTableEmptyState.js +0 -1
  188. package/dist/types/components/AppAvatarPicker.d.ts +0 -92
  189. package/dist/types/components/AppInfoList.d.ts +0 -29
  190. package/dist/types/components/AppLogoPicker.d.ts +0 -125
  191. package/dist/types/components/AppMenubar.d.ts +0 -50
  192. package/dist/types/components/AppPagination.d.ts +0 -39
  193. package/dist/types/components/AppSelectMini.d.ts +0 -53
  194. package/dist/types/components/AppSidebarMenu.d.ts +0 -90
  195. package/dist/types/components/AppTableEmptyState.d.ts +0 -22
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{defaultSize:i,minSize:a,maxSize:o,children:s,className:c=``,style:l,...u}=r;return t(`AppResizablePanel`,u),n(`div`,{className:[`wui-resizable-panel`,c].filter(Boolean).join(` `),"data-default-size":i,"data-min-size":a,"data-max-size":o,style:i?{flex:`${i} 1 0px`,...l}:l,...e(`AppResizablePanel`,r),...u,children:s})}export{r as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{marker:i,props:a}=e(`AppResizablePanel`,r),{defaultSize:o,minSize:s,maxSize:c,children:l,className:u=``,style:d,...f}=a;return t(`AppResizablePanel`,f),n(`div`,{className:[`wui-resizable-panel`,u].filter(Boolean).join(` `),"data-default-size":o,"data-min-size":s,"data-max-size":c,style:o?{flex:`${o} 1 0px`,...d}:d,...i,...f,children:l})}export{r as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";function o(o){let{icon:s,title:c,text:l,href:u,external:d=!1,linkComponent:f,className:p=``,...m}=o;t(`AppResourceCard`,m);let h=a(r,{children:[i(`span`,{className:`res-card-icon`,children:i(n,{name:s,size:18})}),a(`span`,{className:`res-card-body`,children:[i(`span`,{className:`res-card-title`,children:c}),l&&i(`span`,{className:`res-card-text`,children:l})]})]}),g=`res-card${p?` ${p}`:``}`;return f&&!d?i(f,{className:g,to:u,...e(`AppResourceCard`,o),...m,children:h}):i(`a`,{className:g,href:u,target:d?`_blank`:void 0,rel:d?`noopener noreferrer`:void 0,...e(`AppResourceCard`,o),...m,children:h})}export{o as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";function o(o){let{marker:s,props:c}=e(`AppResourceCard`,o),{icon:l,title:u,text:d,href:f,external:p=!1,linkComponent:m,className:h=``,...g}=c;t(`AppResourceCard`,g);let _=a(r,{children:[i(`span`,{className:`res-card-icon`,children:i(n,{name:l,size:18})}),a(`span`,{className:`res-card-body`,children:[i(`span`,{className:`res-card-title`,children:u}),d&&i(`span`,{className:`res-card-text`,children:d})]})]}),v=`res-card${h?` ${h}`:``}`;return m&&!p?i(m,{className:v,to:f,...s,...g,children:_}):i(`a`,{className:v,href:f,target:p?`_blank`:void 0,rel:p?`noopener noreferrer`:void 0,...s,...g,children:_})}export{o as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./renderIconProp.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o={success:{icon:`check-circle`,tone:`success`},error:{icon:`x-circle`,tone:`danger`},warning:{icon:`alert-triangle`,tone:`warning`},info:{icon:`info`,tone:`info`},403:{tone:`muted`},404:{tone:`muted`},500:{tone:`muted`}};function s(s){let{status:c=`info`,title:l,subtitle:u,icon:d,actions:f,children:p,headingLevel:m=2,className:h=``,...g}=s;n(`AppResult`,g),t(`AppResult`,`status`,c,Object.keys(o)),t(`AppResult`,`headingLevel`,m,[1,2,3]);let _=[1,2,3].includes(m)?`h${m}`:`h2`,v=o[c]||o.info,y=v.tone,b=/^\d+$/.test(c),x=d??(b?null:v.icon);return a(`div`,{className:[`result`,`result-${y}`,h].filter(Boolean).join(` `),...e(`AppResult`,s),...g,children:[b?i(`div`,{className:`result-code`,"aria-hidden":`true`,children:c}):x?i(`div`,{className:`result-icon`,children:r(x,{size:48})}):null,l!=null&&i(_,{className:`result-title`,children:l}),u!=null&&i(`div`,{className:`result-subtitle`,children:u}),f&&i(`div`,{className:`result-actions`,children:f}),p&&i(`div`,{className:`result-extra`,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 r from"./renderIconProp.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o={success:{icon:`check-circle`,tone:`success`},error:{icon:`x-circle`,tone:`danger`},warning:{icon:`alert-triangle`,tone:`warning`},info:{icon:`info`,tone:`info`},403:{tone:`muted`},404:{tone:`muted`},500:{tone:`muted`}};function s(s){let{marker:c,props:l}=e(`AppResult`,s),{status:u=`info`,title:d,subtitle:f,icon:p,actions:m,children:h,headingLevel:g=2,className:_=``,...v}=l;n(`AppResult`,v),t(`AppResult`,`status`,u,Object.keys(o)),t(`AppResult`,`headingLevel`,g,[1,2,3]);let y=[1,2,3].includes(g)?`h${g}`:`h2`,b=o[u]||o.info,x=b.tone,S=/^\d+$/.test(u),C=p??(S?null:b.icon);return a(`div`,{className:[`result`,`result-${x}`,_].filter(Boolean).join(` `),...c,...v,children:[S?i(`div`,{className:`result-code`,"aria-hidden":`true`,children:u}):C?i(`div`,{className:`result-icon`,children:r(C,{size:48})}):null,d!=null&&i(y,{className:`result-title`,children:d}),f!=null&&i(`div`,{className:`result-subtitle`,children:f}),m&&i(`div`,{className:`result-actions`,children:m}),h&&i(`div`,{className:`result-extra`,children:h})]})}export{s as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"../lib/FieldMessage.js";import a from"./AppInfoTip.js";import o from"./AppRequiredMark.js";import s from"./useWuiControl.js";import{forwardRef as c,useEffect as l,useId as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`html`,`markdown`],h=[`input`,`change`],g=`The editor couldn't load. Reload the page and try again.`,_=c(function(c,_){let{value:v,onChange:y,format:b,placeholder:x,name:S,label:C,error:w,hint:T,required:E=!1,disabled:D=!1,readOnly:O=!1,id:k,ariaLabel:A,className:j=``,fieldClassName:M=``,help:N,helpLabel:P=`More information`,"data-canvas":F,...I}=c;r(`AppRichText`,I),n(`AppRichText`,`format`,b,m);let L=u(),R=k||L,[z,B]=d(!1),{setRef:V}=s({ref:_,value:v,onChange:y,events:h});return l(()=>{let e=!0;return import(`@webority/ui-elements/rich-text`).catch(n=>{t(`[AppRichText] the editor failed to load:`,n?.message),e&&B(!0)}),()=>{e=!1}},[]),p(`div`,{...e(`AppRichText`,c),className:`field${M?` ${M}`:``}`,children:[C&&p(`label`,{className:`label`,htmlFor:R,children:[C,E&&f(o,{}),N&&f(a,{label:P,children:N})]}),z?f(`div`,{className:`field-error`,role:`status`,children:g}):f(`wui-rich-text`,{ref:V,id:R,role:`group`,name:S,format:b||void 0,placeholder:x,"aria-label":A||(typeof C==`string`?C:void 0),"aria-describedby":w?`${R}-error`:T?`${R}-hint`:void 0,"aria-invalid":w?`true`:void 0,required:E?``:void 0,disabled:D?``:void 0,readonly:O?``:void 0,className:j||void 0,...I},b||`html`),f(i,{error:w,hint:T,errorId:`${R}-error`,hintId:`${R}-hint`})]})});export{_ as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"../lib/FieldMessage.js";import a from"./AppInfoTip.js";import o from"./AppRequiredMark.js";import s from"./useWuiControl.js";import{forwardRef as c,useEffect as l,useId as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`html`,`markdown`],h=[`input`,`change`],g=`The editor couldn't load. Reload the page and try again.`,_=c(function(c,_){let{marker:v,props:y}=e(`AppRichText`,c),{value:b,onChange:x,format:S,placeholder:C,name:w,label:T,error:E,hint:D,required:O=!1,disabled:k=!1,readOnly:A=!1,id:j,ariaLabel:M,className:N=``,fieldClassName:P=``,help:F,helpLabel:I=`More information`,...L}=y;r(`AppRichText`,L),n(`AppRichText`,`format`,S,m);let R=u(),z=j||R,[B,V]=d(!1),{setRef:H}=s({ref:_,value:b,onChange:x,events:h});return l(()=>{let e=!0;return import(`@webority/ui-elements/rich-text`).catch(n=>{t(`[AppRichText] the editor failed to load:`,n?.message),e&&V(!0)}),()=>{e=!1}},[]),p(`div`,{...v,className:`field${P?` ${P}`:``}`,children:[T&&p(`label`,{className:`label`,htmlFor:z,children:[T,O&&f(o,{}),F&&f(a,{label:I,children:F})]}),B?f(`div`,{className:`field-error`,role:`status`,children:g}):f(`wui-rich-text`,{ref:H,id:z,role:`group`,name:w,format:S||void 0,placeholder:C,"aria-label":M||(typeof T==`string`?T:void 0),"aria-describedby":E?`${z}-error`:D?`${z}-hint`:void 0,"aria-invalid":E?`true`:void 0,required:O?``:void 0,disabled:k?``:void 0,readonly:A?``:void 0,className:N||void 0,...L},S||`html`),f(i,{error:E,hint:D,errorId:`${z}-error`,hintId:`${z}-hint`})]})});export{_ as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{MONEY_UNITS as r,formatValue as i}from"@webority/ui-elements/helpers";import{jsx as a,jsxs as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/rolling-number";var s=[`number`,`currency`,`percent`];function c(c){let{value:l,format:u=`number`,unit:d,decimals:f,duration:p,className:m=``,...h}=c;n(`AppRollingNumber`,h),t(`AppRollingNumber`,`format`,u,s),t(`AppRollingNumber`,`unit`,d,r);let g=typeof l==`string`&&l.trim()!==``?Number(l):l,_=typeof g==`number`&&Number.isFinite(g),v=i(_?g:null,{style:u,unit:d,decimals:f});return o(`wui-rolling-number`,{class:[`wui-rolling-number`,m].filter(Boolean).join(` `),value:_?String(g):void 0,format:u,unit:d,decimals:f===void 0?void 0:String(f),duration:p===void 0?void 0:String(p),...e(`AppRollingNumber`,c),...h,children:[a(`span`,{className:`wui-rolling-number-text`,children:v}),a(`span`,{className:`wui-rolling-number-roll`,"aria-hidden":`true`})]})}export{c as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{MONEY_UNITS as r,formatValue as i}from"@webority/ui-elements/helpers";import{jsx as a,jsxs as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/rolling-number";var s=[`number`,`currency`,`percent`];function c(c){let{marker:l,props:u}=e(`AppRollingNumber`,c),{value:d,format:f=`number`,unit:p,decimals:m,duration:h,className:g=``,..._}=u;n(`AppRollingNumber`,_),t(`AppRollingNumber`,`format`,f,s),t(`AppRollingNumber`,`unit`,p,r);let v=typeof d==`string`&&d.trim()!==``?Number(d):d,y=typeof v==`number`&&Number.isFinite(v),b=i(y?v:null,{style:f,unit:p,decimals:m});return o(`wui-rolling-number`,{class:[`wui-rolling-number`,g].filter(Boolean).join(` `),value:y?String(v):void 0,format:f,unit:p,decimals:m===void 0?void 0:String(m),duration:h===void 0?void 0:String(h),...l,..._,children:[a(`span`,{className:`wui-rolling-number-text`,children:b}),a(`span`,{className:`wui-rolling-number-roll`,"aria-hidden":`true`})]})}export{c as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppButton.js";import i from"./AppResult.js";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`error`,`stale-build`,`not-found`],l=()=>window.location.reload();function u(u){let{kind:d=`error`,homeHref:f=`/`,onRetry:p=l,brand:m,fullPage:h=!0,children:g,className:_=``,...v}=u;n(`AppRouteError`,v),t(`AppRouteError`,`kind`,d,c);let y=e=>o(r,{variant:e,leftIcon:`home`,href:f,children:`Go to the home page`}),b;return b=d===`stale-build`?o(i,{status:`info`,icon:`refresh-cw`,title:`A new version is ready`,subtitle:`This app was updated while you had it open. Reload to get the new version.`,actions:o(r,{variant:`primary`,leftIcon:`refresh-cw`,onClick:p,children:`Reload`}),children:g}):d===`not-found`?o(i,{status:`404`,title:`We could not find that page`,subtitle:`Check the address, or go to the home page.`,actions:y(`primary`),children:g}):o(i,{status:`500`,title:`This page did not load`,subtitle:`Something went wrong on our side. Try again in a moment.`,actions:s(a,{children:[o(r,{variant:`primary`,leftIcon:`refresh-cw`,onClick:p,children:`Try again`}),y(`outline`)]}),children:g}),s(`div`,{className:[h?`d-flex flex-column align-items-center justify-content-center min-vh-100 px-3`:`d-flex flex-column align-items-center py-5 px-3`,_].filter(Boolean).join(` `),...e(`AppRouteError`,u),...v,children:[m&&o(`div`,{className:`mb-4`,children:m}),o(`div`,{className:`col-12 col-md-8 col-lg-6`,children:b})]})}export{u as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppButton.js";import i from"./AppResult.js";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`error`,`stale-build`,`not-found`],l=()=>window.location.reload();function u(u){let{marker:d,props:f}=e(`AppRouteError`,u),{kind:p=`error`,homeHref:m=`/`,onRetry:h=l,brand:g,fullPage:_=!0,children:v,className:y=``,...b}=f;n(`AppRouteError`,b),t(`AppRouteError`,`kind`,p,c);let x=e=>o(r,{variant:e,leftIcon:`home`,href:m,children:`Go to the home page`}),S;return S=p===`stale-build`?o(i,{status:`info`,icon:`refresh-cw`,title:`A new version is ready`,subtitle:`This app was updated while you had it open. Reload to get the new version.`,actions:o(r,{variant:`primary`,leftIcon:`refresh-cw`,onClick:h,children:`Reload`}),children:v}):p===`not-found`?o(i,{status:`404`,title:`We could not find that page`,subtitle:`Check the address, or go to the home page.`,actions:x(`primary`),children:v}):o(i,{status:`500`,title:`This page did not load`,subtitle:`Something went wrong on our side. Try again in a moment.`,actions:s(a,{children:[o(r,{variant:`primary`,leftIcon:`refresh-cw`,onClick:h,children:`Try again`}),x(`outline`)]}),children:v}),s(`div`,{className:[_?`d-flex flex-column align-items-center justify-content-center min-vh-100 px-3`:`d-flex flex-column align-items-center py-5 px-3`,y].filter(Boolean).join(` `),...d,...b,children:[g&&o(`div`,{className:`mb-4`,children:g}),o(`div`,{className:`col-12 col-md-8 col-lg-6`,children:S})]})}export{u as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{children:i,className:a=``,maxHeight:o,style:s,...c}=r;return t(`AppScrollbar`,c),n(`div`,{className:a?`wui-scroll ${a}`:`wui-scroll`,style:o==null?s:{maxHeight:o,...s},...e(`AppScrollbar`,r),...c,children:i})}export{r as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{marker:i,props:a}=e(`AppScrollbar`,r),{children:o,className:s=``,maxHeight:c,style:l,...u}=a;return t(`AppScrollbar`,u),n(`div`,{className:s?`wui-scroll ${s}`:`wui-scroll`,style:c==null?l:{maxHeight:c,...l},...i,...u,children:o})}export{r as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{isTypingTarget as i}from"@webority/ui-elements/helpers";import{useCallback as a,useEffect as o,useRef as s,useState as c}from"react";import{Form as l}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{flushSync as f}from"react-dom";var p=[`sm`,`lg`];function m(m){let{value:h,onChange:g,placeholder:_=`Search…`,ariaLabel:v,iconSize:y,size:b,loading:x=!1,collapsible:S=!1,disabled:C=!1,className:w=``,form:T,onKeyDown:E,"data-canvas":D,...O}=m;n(`AppSearch`,O),t(`AppSearch`,`size`,b,p);let k=y??18,[A,j]=c(!!h),M=s(null),N=s(null),P=!S||A||!!h,F=a(()=>{j(!0),requestAnimationFrame(()=>M.current?.focus())},[]),I=()=>{f(()=>g?.(``)),M.current?.form?.requestSubmit()};o(()=>{if(!S)return;let e=e=>{e.key!==`/`||e.ctrlKey||e.altKey||e.metaKey||i(e.target)||[...document.querySelectorAll(`.search-wrap.wui-search-collapsible`)].find(e=>e.offsetParent!==null)===N.current&&(e.preventDefault(),F())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[S,F]);let L=[`search-wrap`,h?`has-value`:``,b===`sm`?`search-sm`:b===`lg`?`search-lg`:``,x?`is-loading`:``,S?`wui-search-collapsible`:``,S&&!P?`is-collapsed`:``,w].filter(Boolean).join(` `);return d(`div`,{...e(`AppSearch`,m),className:L,style:y==null?void 0:{"--wui-search-icon-size":`${y}px`},ref:N,onBlur:e=>{S&&!e.currentTarget.contains(e.relatedTarget)&&!h&&j(!1)},children:[S&&u(`button`,{type:`button`,className:`wui-search-toggle`,"aria-label":v||_,"aria-expanded":P?`true`:`false`,onClick:F,children:u(r,{name:`search`,size:k})}),x&&u(`span`,{className:`search-spinner`,"aria-hidden":`true`}),u(r,{name:`search`,size:k,className:`search-icon`}),u(l.Control,{ref:M,type:`search`,className:`input search-input`,placeholder:_,value:h,onChange:e=>g?.(e.target.value),onKeyDown:e=>{E?.(e),S&&e.key===`Escape`&&!h&&j(!1)},"aria-label":v,form:T,disabled:C,...O}),!C&&u(`button`,{type:`button`,className:`search-clear`,"aria-label":`Clear search`,onClick:I,hidden:!h,children:u(r,{name:`x`,size:16})})]})}export{m as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{isTypingTarget as i}from"@webority/ui-elements/helpers";import{useCallback as a,useEffect as o,useRef as s,useState as c}from"react";import{Form as l}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{flushSync as f}from"react-dom";var p=[`sm`,`lg`];function m(m){let{marker:h,props:g}=e(`AppSearch`,m),{value:_,onChange:v,placeholder:y=`Search…`,ariaLabel:b,iconSize:x,size:S,loading:C=!1,collapsible:w=!1,disabled:T=!1,className:E=``,form:D,onKeyDown:O,...k}=g;n(`AppSearch`,k),t(`AppSearch`,`size`,S,p);let A=x??18,[j,M]=c(!!_),N=s(null),P=s(null),F=!w||j||!!_,I=a(()=>{M(!0),requestAnimationFrame(()=>N.current?.focus())},[]),L=()=>{f(()=>v?.(``)),N.current?.form?.requestSubmit()};o(()=>{if(!w)return;let e=e=>{e.key!==`/`||e.ctrlKey||e.altKey||e.metaKey||i(e.target)||[...document.querySelectorAll(`.search-wrap.wui-search-collapsible`)].find(e=>e.offsetParent!==null)===P.current&&(e.preventDefault(),I())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[w,I]);let R=[`search-wrap`,_?`has-value`:``,S===`sm`?`search-sm`:S===`lg`?`search-lg`:``,C?`is-loading`:``,w?`wui-search-collapsible`:``,w&&!F?`is-collapsed`:``,E].filter(Boolean).join(` `);return d(`div`,{...h,className:R,style:x==null?void 0:{"--wui-search-icon-size":`${x}px`},ref:P,onBlur:e=>{w&&!e.currentTarget.contains(e.relatedTarget)&&!_&&M(!1)},children:[w&&u(`button`,{type:`button`,className:`wui-search-toggle`,"aria-label":b||y,"aria-expanded":F?`true`:`false`,onClick:I,children:u(r,{name:`search`,size:A})}),C&&u(`span`,{className:`search-spinner`,"aria-hidden":`true`}),u(r,{name:`search`,size:A,className:`search-icon`}),u(l.Control,{ref:N,type:`search`,className:`input search-input`,placeholder:y,value:_,onChange:e=>v?.(e.target.value),onKeyDown:e=>{O?.(e),w&&e.key===`Escape`&&!_&&M(!1)},"aria-label":b,form:D,disabled:T,...k}),!T&&u(`button`,{type:`button`,className:`search-clear`,"aria-label":`Clear search`,onClick:L,hidden:!_,children:u(r,{name:`x`,size:16})})]})}export{m as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes 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{title:u,actions:d,as:f=`h2`,eyebrow:p,subtitle:m,align:h=`center`,variant:g=`default`,className:_=``,...v}=l;return n(`AppSectionCallToAction`,v),t(`AppSectionCallToAction`,`as`,f,a),t(`AppSectionCallToAction`,`align`,h,i),t(`AppSectionCallToAction`,`variant`,g,o),c(r,{component:`AppSectionCallToAction`,kind:`call-to-action`,title:u,as:s(f,`h2`),eyebrow:p,subtitle:m,align:h,variant:g,actions:d,className:_,rest:{...e(`AppSectionCallToAction`,l),...v}})}export{l as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r,{SECTION_ALIGNS as i,SECTION_HEADINGS as a,SECTION_VARIANTS as o,sectionHeading as s}from"../lib/sectionShell.js";import{jsx as c}from"react/jsx-runtime";function l(l){let{marker:u,props:d}=e(`AppSectionCallToAction`,l),{title:f,actions:p,as:m=`h2`,eyebrow:h,subtitle:g,align:_=`center`,variant:v=`default`,className:y=``,...b}=d;return n(`AppSectionCallToAction`,b),t(`AppSectionCallToAction`,`as`,m,a),t(`AppSectionCallToAction`,`align`,_,i),t(`AppSectionCallToAction`,`variant`,v,o),c(r,{component:`AppSectionCallToAction`,kind:`call-to-action`,title:f,as:s(m,`h2`),eyebrow:h,subtitle:g,align:_,variant:v,actions:p,className:y,rest:{...u,...b}})}export{l as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppAccordion.js";import i,{SECTION_ALIGNS as a,SECTION_HEADINGS as o,SECTION_VARIANTS as s,sectionHeading as c}from"../lib/sectionShell.js";import{Children as l,cloneElement as u,isValidElement as d}from"react";import{jsx as f}from"react/jsx-runtime";function p(e,t){return Array.isArray(t)?l.map(e,e=>!d(e)||e.type!==r?e:u(e,{openItems:t.map(t=>e.props.items?.[t]?.key??String(t))})):e}function m(r){let{title:l,as:u=`h2`,eyebrow:d,subtitle:m,align:h=`center`,variant:g=`default`,children:_,openItems:v,className:y=``,...b}=r;return n(`AppSectionFaq`,b),t(`AppSectionFaq`,`as`,u,o),t(`AppSectionFaq`,`align`,h,a),t(`AppSectionFaq`,`variant`,g,s),f(i,{component:`AppSectionFaq`,kind:`faq`,title:l,as:c(u,`h2`),eyebrow:d,subtitle:m,align:h,variant:g,className:y,rest:{...e(`AppSectionFaq`,r),...b},children:_!=null&&_!==!1&&f(`div`,{className:`wui-section-faq-body`,children:p(_,v)})})}export{m as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppAccordion.js";import i,{SECTION_ALIGNS as a,SECTION_HEADINGS as o,SECTION_VARIANTS as s,sectionHeading as c}from"../lib/sectionShell.js";import{Children as l,cloneElement as u,isValidElement as d}from"react";import{jsx as f}from"react/jsx-runtime";function p(e,t){return Array.isArray(t)?l.map(e,e=>!d(e)||e.type!==r?e:u(e,{openItems:t.map(t=>e.props.items?.[t]?.key??String(t))})):e}function m(r){let{marker:l,props:u}=e(`AppSectionFaq`,r),{title:d,as:m=`h2`,eyebrow:h,subtitle:g,align:_=`center`,variant:v=`default`,children:y,openItems:b,className:x=``,...S}=u;return n(`AppSectionFaq`,S),t(`AppSectionFaq`,`as`,m,o),t(`AppSectionFaq`,`align`,_,a),t(`AppSectionFaq`,`variant`,v,s),f(i,{component:`AppSectionFaq`,kind:`faq`,title:d,as:c(m,`h2`),eyebrow:h,subtitle:g,align:_,variant:v,className:x,rest:{...l,...S},children:y!=null&&y!==!1&&f(`div`,{className:`wui-section-faq-body`,children:p(y,b)})})}export{m as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i,{SECTION_ALIGNS as a,SECTION_HEADINGS as o,SECTION_TITLE_FONTS as s,SECTION_VARIANTS as c,itemHeading as l,sectionHeading as u}from"../lib/sectionShell.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`grid`,`rows`];function m(m){let{title:h,items:g=[],layout:_=`grid`,as:v=`h2`,eyebrow:y,subtitle:b,align:x=`center`,variant:S=`default`,titleFont:C=`display`,inset:w,className:T=``,...E}=m;n(`AppSectionFeatures`,E),t(`AppSectionFeatures`,`layout`,_,p),t(`AppSectionFeatures`,`as`,v,o),t(`AppSectionFeatures`,`align`,x,a),t(`AppSectionFeatures`,`variant`,S,c),t(`AppSectionFeatures`,`titleFont`,C,s);let D=u(v,`h2`),O=l(D);return d(i,{component:`AppSectionFeatures`,kind:`features`,title:h,as:D,eyebrow:y,subtitle:b,align:x,variant:S,titleFont:C,inset:w,extraClass:_===`rows`?`wui-section-features-rows`:``,className:T,rest:{...e(`AppSectionFeatures`,m),...E},children:g.length>0&&d(`ul`,{className:`wui-section-features-list`,children:g.map(e=>f(`li`,{className:`wui-section-feature`,children:[e.media!=null&&d(`div`,{className:`wui-section-media`,children:e.media}),f(`div`,{className:`wui-section-feature-body`,children:[e.icon&&d(`span`,{className:`wui-section-feature-icon`,children:d(r,{name:e.icon,size:24})}),d(O,{className:`wui-section-feature-title`,children:e.title}),e.description!=null&&e.description!==``&&d(`div`,{className:`wui-section-feature-text`,children:e.description})]})]},e.key??e.title))})})}export{m as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i,{SECTION_ALIGNS as a,SECTION_HEADINGS as o,SECTION_TITLE_FONTS as s,SECTION_VARIANTS as c,itemHeading as l,sectionHeading as u}from"../lib/sectionShell.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`grid`,`rows`];function m(m){let{marker:h,props:g}=e(`AppSectionFeatures`,m),{title:_,items:v=[],layout:y=`grid`,as:b=`h2`,eyebrow:x,subtitle:S,align:C=`center`,variant:w=`default`,titleFont:T=`display`,inset:E,className:D=``,...O}=g;n(`AppSectionFeatures`,O),t(`AppSectionFeatures`,`layout`,y,p),t(`AppSectionFeatures`,`as`,b,o),t(`AppSectionFeatures`,`align`,C,a),t(`AppSectionFeatures`,`variant`,w,c),t(`AppSectionFeatures`,`titleFont`,T,s);let k=u(b,`h2`),A=l(k);return d(i,{component:`AppSectionFeatures`,kind:`features`,title:_,as:k,eyebrow:x,subtitle:S,align:C,variant:w,titleFont:T,inset:E,extraClass:y===`rows`?`wui-section-features-rows`:``,className:D,rest:{...h,...O},children:v.length>0&&d(`ul`,{className:`wui-section-features-list`,children:v.map(e=>f(`li`,{className:`wui-section-feature`,children:[e.media!=null&&d(`div`,{className:`wui-section-media`,children:e.media}),f(`div`,{className:`wui-section-feature-body`,children:[e.icon&&d(`span`,{className:`wui-section-feature-icon`,children:d(r,{name:e.icon,size:24})}),d(A,{className:`wui-section-feature-title`,children:e.title}),e.description!=null&&e.description!==``&&d(`div`,{className:`wui-section-feature-text`,children:e.description})]})]},e.key??e.title))})})}export{m as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r,{SECTION_ALIGNS as i,SECTION_EYEBROW_TONES as a,SECTION_HEADINGS as o,SECTION_VARIANTS as s,sectionHeading as c}from"../lib/sectionShell.js";import{jsx as l}from"react/jsx-runtime";function u(u){let{title:d,as:f=`h1`,eyebrow:p,subtitle:m,align:h=`start`,variant:g=`default`,eyebrowTone:_,actions:v,media:y,className:b=``,...x}=u;return n(`AppSectionHero`,x),t(`AppSectionHero`,`as`,f,o),t(`AppSectionHero`,`align`,h,i),t(`AppSectionHero`,`variant`,g,s),_!==void 0&&t(`AppSectionHero`,`eyebrowTone`,_,a),l(r,{component:`AppSectionHero`,kind:`hero`,title:d,as:c(f,`h1`),eyebrow:p,subtitle:m,align:h,variant:g,eyebrowTone:_,actions:v,className:b,rest:{...e(`AppSectionHero`,u),...x},children:y!=null&&y!==!1&&l(`div`,{className:`wui-section-media`,children:y})})}export{u as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r,{SECTION_ALIGNS as i,SECTION_EYEBROW_TONES as a,SECTION_HEADINGS as o,SECTION_VARIANTS as s,sectionHeading as c}from"../lib/sectionShell.js";import{jsx as l}from"react/jsx-runtime";function u(u){let{marker:d,props:f}=e(`AppSectionHero`,u),{title:p,as:m=`h1`,eyebrow:h,subtitle:g,align:_=`start`,variant:v=`default`,eyebrowTone:y,actions:b,media:x,className:S=``,...C}=f;return n(`AppSectionHero`,C),t(`AppSectionHero`,`as`,m,o),t(`AppSectionHero`,`align`,_,i),t(`AppSectionHero`,`variant`,v,s),y!==void 0&&t(`AppSectionHero`,`eyebrowTone`,y,a),l(r,{component:`AppSectionHero`,kind:`hero`,title:p,as:c(m,`h1`),eyebrow:h,subtitle:g,align:_,variant:v,eyebrowTone:y,actions:b,className:S,rest:{...d,...C},children:x!=null&&x!==!1&&l(`div`,{className:`wui-section-media`,children:x})})}export{u as default};
@@ -0,0 +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,{variant:`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,{variant:`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 +1 @@
1
- import{wuiMarkerAttributes 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{title:f,items:p=[],as:m=`h2`,eyebrow:h,subtitle:g,align:_=`center`,variant:v=`default`,className:y=``,...b}=d;n(`AppSectionLogos`,b),t(`AppSectionLogos`,`as`,m,a),t(`AppSectionLogos`,`align`,_,i),t(`AppSectionLogos`,`variant`,v,o);for(let e of p){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:f,as:c(m,`h2`),eyebrow:h,subtitle:g,align:_,variant:v,className:y,rest:{...e(`AppSectionLogos`,d),...b},children:p.length>0&&l(`ul`,{className:`wui-section-logos-list`,children:p.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{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 +1 @@
1
- import{wuiMarkerAttributes 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{title:u,as:d=`h2`,eyebrow:f,subtitle:p,align:m=`center`,variant:h=`default`,children:g,className:_=``,...v}=l;return n(`AppSectionPricing`,v),t(`AppSectionPricing`,`as`,d,a),t(`AppSectionPricing`,`align`,m,i),t(`AppSectionPricing`,`variant`,h,o),c(r,{component:`AppSectionPricing`,kind:`pricing`,title:u,as:s(d,`h2`),eyebrow:f,subtitle:p,align:m,variant:h,className:_,rest:{...e(`AppSectionPricing`,l),...v},children:g!=null&&g!==!1&&c(`div`,{className:`plan-grid`,children:g})})}export{l as default};
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 +1 @@
1
- import{wuiMarkerAttributes 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{title:f,items:p=[],as:m=`h2`,eyebrow:h,subtitle:g,align:_=`center`,variant:v=`default`,className:y=``,...b}=d;return n(`AppSectionTestimonials`,b),t(`AppSectionTestimonials`,`as`,m,a),t(`AppSectionTestimonials`,`align`,_,i),t(`AppSectionTestimonials`,`variant`,v,o),l(r,{component:`AppSectionTestimonials`,kind:`testimonials`,title:f,as:c(m,`h2`),eyebrow:h,subtitle:g,align:_,variant:v,className:y,rest:{...e(`AppSectionTestimonials`,d),...b},children:p.length>0&&l(`ul`,{className:`wui-section-testimonials-list`,children:p.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{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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{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{options:f=[],value:p,onChange:m,label:h,name:g,size:_=`md`,fullWidth:v=!1,bordered:y=!0,disabled:b=!1,labelVisible:x=!1,className:S=``,"data-canvas":C,...w}=d;n(`AppSegmented`,w),t(`AppSegmented`,`size`,_,Object.keys(u));let T=a(),E=g||T,D=s(null),O=s(null),k=[`segmented`,u[_]??``,v?`segmented-full`:``,y?``:`wui-segmented-borderless`,b?`is-disabled`:``,S].filter(Boolean).join(` `);o(()=>{let e=D.current,t=O.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(()=>D.current?.classList.add(`is-animated`))};n(!0);let r=typeof ResizeObserver<`u`?new ResizeObserver(()=>n(!1)):null;return r?.observe(e),()=>r?.disconnect()},[p,f,_,v,x]),i(()=>{let e=requestAnimationFrame(()=>D.current?.classList.add(`is-animated`));return()=>cancelAnimationFrame(e)},[]);let A=x&&h,j=e(`AppSegmented`,d),M=l(`div`,{ref:D,className:k,role:`radiogroup`,"aria-label":h,"aria-disabled":b||void 0,...A?void 0:j,...w,children:[c(`span`,{className:`segmented-thumb`,ref:O,"aria-hidden":`true`}),f.map(e=>l(`label`,{className:`segmented-option`,children:[c(`input`,{type:`radio`,className:`segmented-input`,name:E,value:e.value,checked:e.value===p,disabled:b||e.disabled,onChange:()=>m?.(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 A?l(`div`,{className:`field`,...j,children:[c(`span`,{className:`label`,"aria-hidden":`true`,children:h}),M]},`field`):M}export{d as default};
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 +1 @@
1
- import{wuiMarkerAttributes 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 s}from"./useWuiControl.js";import{forwardRef as c,useId as te,useLayoutEffect as ne,useRef as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/select";var re=[`sm`,`lg`,`xl`],ie=[`off`,`border`,`above`],p=(e,t)=>({value:e.value,label:t,icon:e.icon}),m=c(function(c,m){let{value:h,onChange:g,options:_=[],placeholder:v=`Select...`,searchPlaceholder:ae=`Search...`,emptyText:oe,searchable:se=!1,clearable:ce=!1,size:y,icon:le,prefix:b,suffix:x,floatingLabel:S=`off`,disabled:C,open:w,label:T,required:E=!1,error:D,hint:O,help:k,helpLabel:A=`More information`,id:j,name:M,className:N=``,fieldClassName:P=``,"aria-label":F,"aria-labelledby":I,"aria-describedby":ue,"data-canvas":de,...L}=c;n(`AppSelect`,L),t(`AppSelect`,`size`,y,re),t(`AppSelect`,`floatingLabel`,S,ie);let R=te(),{setRef:z,innerRef:B}=o({ref:m,value:h??``,onChange:g}),{portal:V,toElementOptions:H}=a(_),U=l({el:null,options:null,map:null});ne(()=>{let e=B.current;if(!e||U.current.el===e&&U.current.options===_&&U.current.map===H)return;U.current={el:e,options:_,map:H};let t=H(_,p);s(t,e.options)||(e.options=t)});let W=j||R,G=S!==`off`&&T,K=D&&W?`${W}-error`:void 0,q=O&&W?`${W}-hint`:void 0,J=K||q||ue,Y=!G&&(b!=null||x!=null),X=!T&&!D&&!O,Z=e(`AppSelect`,c),Q=f(u,{children:[d(`wui-select`,{"aria-label":F||(typeof T==`string`?T:void 0),"aria-labelledby":I||void 0,"aria-describedby":J||void 0,"aria-invalid":D?`true`:void 0,ref:z,value:h||void 0,id:W,name:M,placeholder:S!==`off`&&T?` `:v,"search-placeholder":ae,"empty-text":oe||void 0,searchable:se?``:void 0,clearable:ce?``:void 0,size:y||void 0,icon:le||void 0,disabled:C?``:void 0,open:w?``:void 0,required:E?``:void 0,className:N||void 0,...X&&!Y?Z:null,...L}),V]}),$=Y?f(`div`,{...X?Z:null,className:`input-affixed`,children:[b!=null&&d(`span`,{className:`affix affix-pre`,children:b}),Q,x!=null&&d(`span`,{className:`affix affix-suf`,children:x})]}):Q;if(X)return $;let fe=[`field`,P].filter(Boolean).join(` `);return f(`div`,{...Z,className:fe,children:[T&&!G&&f(`label`,{className:`label`,htmlFor:W,children:[T,E&&d(i,{}),k&&d(r,{label:A,children:k})]}),G?f(`div`,{className:S===`above`?`field-float wui-float-above`:`field-float`,children:[Q,f(`label`,{className:`float-label`,htmlFor:W,children:[T,E&&d(i,{})]})]}):$,d(ee,{error:D,hint:O,errorId:K,hintId:q})]})});export{m as default};
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};
@@ -0,0 +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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./AppIcon.js";import a from"./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 N(t){let{groups:a=[],brand:o,sidebarStart:m,sidebarStartCompact:v,sidebarFooter:x,topbarStart:S,topbarEnd:C,footer:w,launcher:T,children:k,collapsed:A,onCollapsedChange:j,noSidebar:M=!1,density:N=`comfortable`,itemHeight:P,iconVariant:F,topbarTone:I=`default`,navLabel:L=`Main navigation`,linkComponent:R,currentPath:V,rememberCollapsed:H=!1,collapsedCookie:oe=`wui-shell-collapsed`,foldedCookie:U=s,tabBarLabel:se=`Quick navigation`,moreLabel:ce=`More`,userMenu:W,notifications:G,search:K,className:le=``,style:q,...ue}=t;r(`AppShell`,ue),n(`AppShell`,`density`,N,E),n(`AppShell`,`topbarTone`,I,D),n(`AppShell`,`iconVariant`,F,O);let de=P>0?{...q,"--wui-nav-item-height":`${P}px`}:q,[fe,pe]=_(()=>H&&A===void 0&&typeof document<`u`?l(oe)??!1:!1),[J,Y]=_(!1),[me,he]=_(!1),[ge,_e]=_(!1),X=g(null),Z=A??fe,ve=()=>{let e=!Z;A===void 0&&pe(e),H&&d(e,oe),j?.(e)},ye=a.some(e=>e.collapsible),[be,xe]=_(()=>ye&&typeof document<`u`?c(U):new Set),Se=e=>{let t=new Set(be);t.has(e)?t.delete(e):t.add(e),xe(t),u(t,U)},Q=h(()=>ee(a,V),[a,V]),$=M?null:te(Q);return p(()=>{let e=()=>he(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=()=>_e(e.scrollHeight>e.clientHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[Q]),p(()=>{if(!J)return;let e=e=>{e.key===`Escape`&&Y(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[J]),b(`div`,{className:[`app-shell`,Z?`collapsed`:``,M?`no-sidebar`:``,J?`mobile-open`:``,le].filter(Boolean).join(` `),"data-density":N===`compact`?`compact`:void 0,"data-wui-folded-cookie":ye?U:void 0,style:de,...e(`AppShell`,t),...ue,children:[y(`a`,{className:`wui-skip-link`,href:`#main-content`,children:`Skip to content`}),b(`aside`,{className:`app-sidebar`,children:[o&&y(`div`,{className:`app-sidebar-brand`,children:o}),m&&y(`div`,{className:`app-sidebar-start`,children:m}),v&&y(`div`,{className:`app-sidebar-start-compact`,children:v}),y(`nav`,{className:`app-sidebar-scroll`,"aria-label":L,ref:X,tabIndex:ge?0:void 0,children:Q.map((e,t)=>{let n=e.items.map(e=>e.header==null?y(B,{item:e,linkComponent:R,onNavigate:()=>Y(!1),iconVariant:F},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=!be.has(e.key)||!!z(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:()=>Se(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}`)})}),x&&y(`div`,{className:`app-sidebar-foot`,children:x}),!M&&y(`button`,{type:`button`,className:`app-sidebar-toggle`,onClick:ve,"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${me?` scrolled`:``}`,"data-tone":I===`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})}),S,K&&y(ae,{config:K})]}),b(`div`,{className:`app-topbar-end`,children:[C,G&&y(ie,{config:G}),W&&y(re,{config:W,linkComponent:R})]})]}),y(`main`,{className:`app-content`,id:`main-content`,children:k}),w&&y(`footer`,{className:`app-footer`,children:w})]}),T&&y(`div`,{className:`wui-shell-launcher`,children:T}),$&&b(`nav`,{className:`wui-tabbar`,"aria-label":se,children:[$.tabs.map(e=>y(ne,{tab:e,linkComponent:R,iconVariant:F},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:ce})]})]}),y(`button`,{type:`button`,className:`app-scrim`,onClick:()=>Y(!1),"aria-label":`Close navigation`,tabIndex:J?0:-1})]})}function ee(e,t){for(let t of e)t.collapsible&&R(t);let i=(e,t=!1)=>(e??[]).map(e=>Array.isArray(e.children)?{...e,children:i(e.children)}:{...e}).filter(e=>F(e)?t:(e.children?.length??0)>0||!!e.href),a=e.map(e=>({...e,items:I(i(e.items,!0))})).filter(e=>e.items.some(e=>!F(e))),s=[],c=e=>{for(let t of e)F(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`,P(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 P(e){return Object.fromEntries(Object.entries(e).filter(([e])=>!k.has(e)))}var F=e=>e.header!=null;function I(e){return e.filter((t,n)=>{if(!F(t))return!0;let r=e.findIndex((e,t)=>t>n&&F(e));return e.slice(n+1,r<0?void 0:r).length>0})}var L=new Set;function R(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||L.has(n)||(L.add(n),t(n))}function te(e){let t=[],n=e=>{for(let r of e)F(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 ne({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 z(e){for(let t of e){if(t.active)return t;let e=t.children?.length?z(t.children):void 0;if(e)return e}}function B({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?z(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(B,{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 V(){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 re({config:e,linkComponent:t}){let n=m(),{open:r,setOpen:o,ref:s}=V(),{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 ie({config:e}){let t=m(),{open:n,setOpen:r,ref:a}=V(),{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 H=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function ae({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||H(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{N as default};
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:B=`Main navigation`,linkComponent:V,currentPath:H,rememberCollapsed:U=!1,collapsedCookie:W=`wui-shell-collapsed`,foldedCookie:G=s,tabBarLabel:se=`Quick navigation`,moreLabel:ce=`More`,userMenu:K,notifications:q,search:le,className:ue=``,style:de,...fe}=o;r(`AppShell`,fe),n(`AppShell`,`density`,P,E),n(`AppShell`,`topbarTone`,L,D),n(`AppShell`,`iconVariant`,I,O);let pe=F>0?{...de,"--wui-nav-item-height":`${F}px`}:de,[me,he]=_(()=>U&&M===void 0&&typeof document<`u`?l(W)??!1:!1),[J,Y]=_(!1),[ge,_e]=_(!1),[ve,ye]=_(!1),X=g(null),Z=M??me,be=()=>{let e=!Z;M===void 0&&he(e),U&&d(e,W),ee?.(e)},xe=m.some(e=>e.collapsible),[Se,Ce]=_(()=>xe&&typeof document<`u`?c(G):new Set),we=e=>{let t=new Set(Se);t.has(e)?t.delete(e):t.add(e),Ce(t),u(t,G)},Q=h(()=>te(m,H),[m,H]),$=N?null:ne(Q);return 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]),p(()=>{if(!J)return;let e=e=>{e.key===`Escape`&&Y(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[J]),b(`div`,{className:[`app-shell`,Z?`collapsed`:``,N?`no-sidebar`:``,J?`mobile-open`:``,ue].filter(Boolean).join(` `),"data-density":P===`compact`?`compact`:void 0,"data-wui-folded-cookie":xe?G:void 0,style:pe,...a,...fe,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":B,ref:X,tabIndex:ve?0:void 0,children:Q.map((e,t)=>{let n=e.items.map(e=>e.header==null?y(z,{item:e,linkComponent:V,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=!Se.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:()=>we(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:be,"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,le&&y(oe,{config:le})]}),b(`div`,{className:`app-topbar-end`,children:[T,q&&y(ae,{config:q}),K&&y(ie,{config:K,linkComponent:V})]})]}),y(`main`,{className:`app-content`,id:`main-content`,children:j}),k&&y(`footer`,{className:`app-footer`,children:k})]}),A&&y(`div`,{className:`wui-shell-launcher`,children:A}),$&&b(`nav`,{className:`wui-tabbar`,"aria-label":se,children:[$.tabs.map(e=>y(re,{tab:e,linkComponent:V,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:ce})]})]}),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 z({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(z,{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 B(){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 ie({config:e,linkComponent:t}){let n=m(),{open:r,setOpen:o,ref:s}=B(),{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 ae({config:e}){let t=m(),{open:n,setOpen:r,ref:a}=B(),{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 V=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function oe({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||V(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 +1 @@
1
- import{wuiMarkerAttributes 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";function f(f){let{shortcuts:p=[],items:m,search:h,className:g=``,..._}=f;t(`AppShortcutLegend`,_);let v=c(),y=l(null),b=p.filter(e=>o(e.key)!==`?`),x=l(b);return x.current=b,s(()=>{let e=y.current;if(!e)return;let t=e=>{let t=x.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)},[]),d(`wui-shortcuts`,{ref:y,class:[`wui-shortcut-legend`,g].filter(Boolean).join(` `),items:m||void 0,search:h||void 0,...e(`AppShortcutLegend`,f),..._,children:[d(`button`,{type:`button`,className:`wui-shortcut-toggle`,"aria-haspopup":`dialog`,"aria-expanded":`false`,"aria-controls":v,"aria-keyshortcuts":`?`,children:[n(`?`),` ${a.title}`]}),d(`div`,{className:`wui-shortcut-sheet`,id:v,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})})]}),u(`dl`,{className:`wui-shortcut-keys`,children:[...b,{key:`?`,label:a.help}].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)))})]})]})}export{f as default};
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 +1 @@
1
- import{wuiMarkerAttributes 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{children:c,lines:l=3,moreLabel:u=`Show more`,lessLabel:d=`Show less`,defaultExpanded:f=!1,id:p,className:m=``,...h}=s;t(`AppShowMore`,h);let g=n(),_=p||`show-more-${g.replace(/:/g,``)}`,v=`${_}-body`,y=i(null),b=i(f);return r(()=>{b.current&&y.current.toggle(!0)},[]),o(`wui-show-more`,{ref:y,class:[`wui-show-more`,m].filter(Boolean).join(` `),id:_,lines:l===3?void 0:String(l),"more-label":u===`Show more`?void 0:u,"less-label":d===`Show less`?void 0:d,...e(`AppShowMore`,s),...h,children:[a(`div`,{className:`wui-show-more-body`,id:v,children:c}),a(`button`,{type:`button`,className:`btn btn-link btn-sm wui-show-more-toggle`,"aria-expanded":b.current?`true`:`false`,"aria-controls":v,hidden:!0,children:b.current?d:u})]})}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)},[]),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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";function r(r){let{width:i=`100%`,height:a=14,radius:o=6,className:s=``,style:c,...l}=r;return t(`AppSkeleton`,l),n(`span`,{className:`skeleton${s?` ${s}`:``}`,"aria-hidden":`true`,style:{width:i,height:a,borderRadius:o,...c},...e(`AppSkeleton`,r),...l})}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),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 +1 @@
1
- import{wuiMarkerAttributes 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{lines:s=a,lastLineWidth:c=`60%`,className:l=``,style:u,...d}=o;n(`AppSkeletonLines`,d),t(`AppSkeletonLines`,`lines`,s,i);let f=i.includes(s)?s:a;return r(`div`,{className:[`wui-skeleton-lines`,l].filter(Boolean).join(` `),"aria-hidden":`true`,style:u,...e(`AppSkeletonLines`,o),...d,children:Array.from({length:f},(e,t)=>r(`span`,{className:`skeleton`,style:t===f-1?{width:c}: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 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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppRequiredMark.js";import a,{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{value:h,start:g,end:_,range:v=!1,onChange:y,label:b,required:x=!1,hint:S,error:C,name:w,startName:T,endName:E,min:D=0,max:O=100,step:k=1,disabled:A,size:j,showValue:M,unit:N,id:P,ariaLabel:F,className:I=``,fieldClassName:L=``,"data-canvas":R,...z}=c;n(`AppSlider`,z),t(`AppSlider`,`size`,j,p);let B=u(),V=P||B,H=v,{setRef:U,innerRef:W}=a({ref:m,value:H?void 0:h,onChange:y,readValue:H?o:void 0,writeValue:H?void 0:s});l(()=>{if(!H)return;let e=W.current;e&&(g!==void 0&&g>e.end?(_!==void 0&&e.end!==_&&(e.end=_),g!==void 0&&e.start!==g&&(e.start=g)):(g!==void 0&&e.start!==g&&(e.start=g),_!==void 0&&e.end!==_&&(e.end=_)))},[g,_,H,W]);let G=!b&&!C&&!S,K=C?`${V}-error`:void 0,q=S?`${V}-hint`:void 0,J=d(`wui-slider`,{ref:U,id:V,name:w||void 0,"start-name":T||void 0,"end-name":E||void 0,min:D,max:O,step:k,size:j||void 0,"aria-label":F||(typeof b==`string`?b:void 0),"aria-describedby":K||q,"aria-invalid":C?`true`:void 0,disabled:A?``:void 0,required:x?``:void 0,range:H?``:void 0,"show-value":M?``:void 0,unit:N||void 0,className:I||void 0,...G?e(`AppSlider`,c):null,...z});return G?J:f(`div`,{...e(`AppSlider`,c),className:`field${L?` ${L}`:``}`,children:[b&&f(`label`,{className:`label`,htmlFor:V,children:[b,x&&d(i,{})]}),J,d(r,{error:C,hint:S,errorId:K,hintId:q})]})});export{m as default};
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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"./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{items:m=[],onReorder:h,ariaLabel:g,handle:_=!1,group:v,name:y,disabled:b=!1,orientation:x=`vertical`,handleDisplay:S=`always`,bordered:C=!0,className:w=``,...T}=a;n(`AppSortableList`,T),t(`AppSortableList`,`orientation`,x,u),t(`AppSortableList`,`handleDisplay`,S,d);let E=S===`hover`,D=m.map(e=>e.id),O=s(D);o(()=>{O.current=D});let{setRef:k,innerRef:A}=i({ref:p,value:D,writeValue:f,on:{"wui-sortable:change":e=>{e.target===e.currentTarget&&(h?.(e.detail.ids,e.detail),requestAnimationFrame(()=>{A.current&&f(A.current,O.current)}))}}});return c(`wui-sortable`,{ref:k,role:`list`,"aria-label":g,name:y||void 0,group:v||void 0,orientation:x===`horizontal`?`horizontal`:void 0,"handle-display":E?`hover`:void 0,handle:_||E?``:void 0,disabled:b?``:void 0,borderless:C?void 0:``,className:`wui-sortable${w?` ${w}`:``}`,...e(`AppSortableList`,a),...T,children:m.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:b||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"./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 +1 @@
1
- import{wuiMarkerAttributes 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{data:i,label:a,width:l=48,height:d=16,className:f=``,...p}=t;n(`AppSparkline`,p);let m=Array.isArray(i)?i.filter(s):[];return Array.isArray(i)&&m.length<i.length&&o(i.length-m.length),m.length===0?null:r(`svg`,{className:`wui-sparkline${f?` ${f}`:``}`,width:l,height:d,viewBox:`0 0 ${l} ${d}`,role:`img`,"aria-label":u(m,a),...e(`AppSparkline`,t),...p,children:r(`polyline`,{points:c(m,l,d),stroke:`currentColor`,fill:`none`})})}export{d as default};
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 +1 @@
1
- import{wuiMarkerAttributes 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{size:o=`md`,label:s=`Loading`,className:c=``,...l}=a;n(`AppSpinner`,l),t(`AppSpinner`,`size`,typeof o==`string`&&!Number.isFinite(Number(o))?o:null,i);let{style:u,...d}=l,f=Number(o),p=Number.isFinite(f)&&f>0;return r(`span`,{className:`spinner-border${!p&&o===`sm`?` spinner-border-sm`:``}${c?` ${c}`:``}`,role:`status`,"aria-label":s,style:p?{width:`${f}px`,height:`${f}px`,borderWidth:`${Math.max(2,Math.round(f/8))}px`,...u}:u,...e(`AppSpinner`,a),...d})}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;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 +1 @@
1
- import{wuiMarkerAttributes 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{logo:c,initials:l,text:u,subtext:d,variant:f=`bar`,size:p=`md`,label:m=`Loading`,className:h=``,...g}=s;n(`AppSplash`,g),t(`AppSplash`,`variant`,f,a),t(`AppSplash`,`size`,typeof p==`string`?p:null,Object.keys(o));let{style:_,...v}=g,y=typeof p==`number`?p:o[p]??o.md,b=f===`ring`?r(`span`,{className:`splash-ring`,"aria-hidden":`true`}):f===`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${h?` ${h}`:``}`,role:`status`,"aria-live":`polite`,"aria-label":m,style:{"--wui-splash-size":`${y}px`,..._},...e(`AppSplash`,s),...v,children:i(`div`,{className:`splash-inner`,children:[c||l&&r(`span`,{className:`splash-mark`,children:l}),b,u&&r(`span`,{className:`splash-text`,children:u}),d&&r(`span`,{className:`splash-subtext`,children:d})]})})}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`?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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i,{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{label:m,items:h=[],onClick:g,href:_,type:v=`button`,variant:y=`primary`,size:b=`md`,disabled:x=!1,loading:S=!1,leftIcon:C,shortcut:w,menuLabel:T=`More actions`,align:E=`end`,linkComponent:D,className:O=``,...k}=p;n(`AppSplitButton`,k),t(`AppSplitButton`,`size`,b,l),t(`AppSplitButton`,`type`,v,u);let A=[`btn`,a(y),f[b]??``,`wui-split-toggle`].filter(Boolean).join(` `),j=s(r,{name:`chevron-down`,size:d[b]??d.md}),M=x||S;return c(`div`,{role:`group`,"aria-label":m,className:[`wui-split-button`,O].filter(Boolean).join(` `),...e(`AppSplitButton`,p),...k,children:[s(i,{variant:y,size:b,type:v,href:_,onClick:g,disabled:x,loading:S,leftIcon:C,shortcut:w,children:m}),M?s(`div`,{className:`wui-split-menu`,children:s(`button`,{type:`button`,className:A,disabled:!0,"aria-label":T,children:j})}):s(o,{className:`wui-split-menu`,trigger:j,toggleClassName:A,label:T,ariaLabel:T,align:E,items:h,linkComponent:D})]})}export{p as default};
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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppRecordPager.js";import i from"./AppShortcutLegend.js";import{LIST_KEYS as a,SELECT_KEY as o,shortcutKey as s}from"@webority/ui-elements/helpers";import{useEffect as ee,useMemo as c,useRef as l}from"react";import{Fragment as te,jsx as u,jsxs as d}from"react/jsx-runtime";var f={sm:576,md:768,lg:992,xl:1200,xxl:1400},p=Object.keys(f),m=[3,4,5,6,7,8],h=6,g=`.wui-split-items > .wui-split-item > .wui-split-link`,_=(e,t)=>e!=null&&String(e)===String(t),v=e=>{let t=window.matchMedia?.(`(min-width: ${f[e]}px)`);return!t||t.matches},ne=e=>typeof e==`string`||typeof e==`number`?String(e):`item`;function y(y){let{items:b=[],currentKey:x,onSelect:S,selectable:C=!1,selectedKeys:w,onToggle:T,onToggleAll:E,bulkActions:D,header:O,chips:k,pane:A,paneHeader:j,pager:re=!0,shortcuts:ie,shortcutsEnabled:M=!0,empty:ae=`Nothing here yet.`,loading:N=!1,listWidth:P=5,stackBelow:F=`xl`,className:I=``,...L}=y,R=c(()=>new Set(w),[w]);n(`AppSplitView`,L),t(`AppSplitView`,`stackBelow`,F,p),t(`AppSplitView`,`listWidth`,P,m);let z=f[F]?F:`xl`,B=m.includes(P)?P:5,V=l(null),H=x!=null,U=C?R?.size??0:0,W=U>0,G=C&&b.length>0&&b.every(e=>R?.has(e.key)),K=C&&!G&&b.some(e=>R?.has(e.key)),q=e=>{e&&(e.indeterminate=K)},J=l(!1);ee(()=>{if(!J.current){J.current=!0;return}x!=null&&V.current?.querySelector(`.wui-split-link[aria-current="true"]`)?.scrollIntoView?.({block:`nearest`})},[x]);let Y=(e,t)=>{t.button>0||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||S&&(e.href&&!v(z)||(t.preventDefault(),S(e.key)))},X=e=>{let t=[...V.current?.querySelectorAll(g)??[]];t[t.findIndex(e=>e.getAttribute(`aria-current`)===`true`)+e]?.click()},oe=[`wui-split-view`,H?`wui-split-reading`:``,I].filter(Boolean).join(` `),se=C?[...a,o]:a,ce=new Set([`J`,`K`,`Enter`,`?`,...C?[`X`]:[]]),le=[...se,...(ie??[]).filter(e=>!ce.has(s(e.key))).map(e=>({key:e.key,label:e.label,onPress:()=>e.onPress?.(x)}))],Z=b.findIndex(e=>_(x,e.key)),Q=re&&!N&&b.length>0?u(r,{"data-split-pager":``,index:Z>=0?Z+1:void 0,total:b.length,onPrev:()=>X(-1),onNext:()=>X(1),prevLabel:`Previous item`,nextLabel:`Next item`}):null,ue=e=>{let t=_(x,e.key),n=C&&!!R?.has(e.key),r=e.badge!==void 0&&e.badge!==null&&e.badge!==``,i=d(te,{children:[d(`span`,{className:`wui-split-item-main`,children:[u(`span`,{className:`wui-split-item-title`,children:e.title}),e.meta!==void 0&&e.meta!==null&&u(`span`,{className:`wui-split-item-meta`,children:e.meta})]}),(e.trailing||r)&&d(`span`,{className:`wui-split-item-end`,children:[e.trailing,r&&u(`span`,{className:`wui-split-badge`,children:e.badge})]})]});return d(`li`,{className:[`wui-split-item`,t?`is-active`:``,n?`is-selected`:``].filter(Boolean).join(` `),"data-key":e.key,children:[C&&u(`input`,{type:`checkbox`,className:`wui-check wui-split-check`,checked:n,onChange:()=>T?.(e.key),"aria-label":`Select ${ne(e.title)}`}),e.href?u(`a`,{className:`wui-split-link`,href:e.href,"aria-current":t?`true`:void 0,onClick:t=>Y(e,t),children:i}):u(`button`,{type:`button`,className:`wui-split-link`,"aria-current":t?`true`:void 0,onClick:t=>Y(e,t),children:i})]},e.key)},$;return $=N?d(`div`,{className:`wui-split-items`,"aria-busy":`true`,tabIndex:0,children:[u(`span`,{className:`visually-hidden`,children:`Loading`}),Array.from({length:h},(e,t)=>d(`div`,{className:`wui-split-skeleton`,"aria-hidden":`true`,children:[u(`span`,{className:`skeleton wui-split-skeleton-title`}),u(`span`,{className:`skeleton wui-split-skeleton-meta`})]},t))]}):b.length?u(`ul`,{className:`wui-split-items`,"aria-label":`Items`,children:b.map(ue)}):u(`div`,{className:`wui-split-empty`,children:ae}),d(`div`,{ref:V,className:oe,"data-stack-below":z,"data-list-width":B,"data-shortcut-scope":M?``:void 0,...e(`AppSplitView`,y),...L,children:[d(`div`,{className:`wui-split-list`,children:[(O||C)&&d(`div`,{className:`wui-split-head`,children:[C&&u(`input`,{ref:q,type:`checkbox`,className:`wui-check wui-split-all`,checked:G,onChange:e=>E?.(e.target.checked),"aria-label":`Select all items`}),u(`div`,{className:`wui-split-head-main`,hidden:W,children:O}),C&&d(`div`,{className:`wui-split-head-bulk`,hidden:!W,children:[d(`span`,{className:`wui-split-count`,"aria-live":`polite`,children:[U,` selected`]}),D]})]}),k&&u(`div`,{className:`wui-split-chips`,children:k}),$,M&&d(`div`,{className:`wui-split-legend`,children:[d(`span`,{children:[u(`kbd`,{className:`wui-kbd`,children:`J`}),` `,u(`kbd`,{className:`wui-kbd`,children:`K`}),` Move`]}),d(`span`,{children:[u(`kbd`,{className:`wui-kbd`,children:`Enter`}),` Open`]}),u(i,{items:g,shortcuts:le})]})]}),d(`div`,{className:`wui-split-pane`,children:[(j||Q)&&d(`div`,{className:`wui-split-pane-head`,children:[j,Q]}),u(`section`,{className:`wui-split-pane-body`,"aria-label":`Reading pane`,tabIndex:0,children:A})]})]})}export{y as default};
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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./withTooltip.js";import{jsx as i}from"react/jsx-runtime";var a=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function o(o){let{label:s,tone:c=`neutral`,className:l=``,tooltip:u,tooltipPlacement:d,...f}=o;return n(`AppStatusBadge`,f),t(`AppStatusBadge`,`tone`,c,a),s==null||s===``?`-`:r(i(`span`,{className:`status-label ${c}${l?` ${l}`:``}`,...e(`AppStatusBadge`,o),...f,children:s}),u,d)}export{o as default};
1
+ 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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`steps`,`journey`],c=[`horizontal`,`vertical`],l=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],u=[`sm`,`md`,`lg`],d=[`primary`,`info`],f={sm:12,md:14,lg:18},p=[`done`,`active`,`pending`,`error`];function m(m){let{steps:g=[],variant:_=`steps`,orientation:v=`horizontal`,iconVariant:y,size:b=`md`,iconSize:x,activeStep:S,onStepClick:C,label:w=`Progress`,tone:T=`primary`,linkComponent:E,className:D=``,...O}=m;n(`AppStepper`,O),t(`AppStepper`,`variant`,_,s),t(`AppStepper`,`orientation`,v,c),t(`AppStepper`,`iconVariant`,y,l),t(`AppStepper`,`size`,b,u),t(`AppStepper`,`tone`,T,d);let k=x>0?x:f[b]??f.md;for(let e of g)t(`AppStepper`,`steps[].status`,e.status,p);let A=_===`journey`;return a(`nav`,{className:[`stepper`,A&&`stepper-journey`,v===`vertical`&&`stepper-vertical`,b!==`md`&&u.includes(b)&&`wui-step-size-${b}`,T!==`primary`&&d.includes(T)&&`wui-step-tone-${T}`,D].filter(Boolean).join(` `),"aria-label":w,...e(`AppStepper`,m),...O,children:g.map((e,t)=>{let n=e.status||h(t,S),s=`step${n===`pending`?``:` ${n}`}`,c;c=n===`done`?a(r,{name:`check`,size:k,variant:y}):n===`error`?a(r,{name:`alert-triangle`,size:k,variant:y}):e.icon?a(r,{name:e.icon,size:k,variant:y}):t+1;let l=o(i,{children:[a(`span`,{className:`step-circle`,children:c}),A?o(`span`,{className:`step-text`,children:[a(`span`,{className:`step-index`,children:`Step ${t+1}`}),a(`span`,{className:`step-label`,children:e.label}),e.description?a(`span`,{className:`step-desc`,children:e.description}):null]}):o(i,{children:[a(`span`,{className:`step-label`,children:e.label}),e.description?a(`span`,{className:`step-desc`,children:e.description}):null]})]}),u=n===`active`?`step`:void 0,d=e.key??`${e.label}-${t}`,f;return f=C?a(`button`,{type:`button`,className:s,"aria-current":u,onClick:()=>C(e,t),children:l},d):e.href?E?a(E,{className:s,to:e.href,"aria-current":u,children:l},d):a(`a`,{className:s,href:e.href,"aria-current":u,children:l},d):a(`div`,{className:s,"aria-current":u,children:l},d),A&&t<g.length-1?[f,a(`span`,{className:`step-line${n===`done`?` done`:``}`,"aria-hidden":`true`},`${d}-line`)]:f})})}function h(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}export{m as default};
1
+ 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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/CheckField.js";import{forwardRef as i}from"react";import{jsx as a}from"react/jsx-runtime";var o=[`round`,`pill`,`circle`],s=i(function(i,s){let{label:c,id:l,name:u,error:d,hint:f,shape:p=`round`,className:m=``,checked:h,defaultChecked:g,onChange:_,...v}=i;n(`AppSwitch`,v),t(`AppSwitch`,`shape`,p,o);let y=`form-check form-switch${p===`circle`?` form-switch-circle`:p===`pill`?` form-switch-pill`:``}`,b={...v};return h!==void 0&&(b.checked=h),g!==void 0&&(b.defaultChecked=g),_!==void 0&&(b.onChange=_),h!==void 0&&_===void 0&&(b.readOnly=!0),a(r,{rootProps:e(`AppSwitch`,i),ref:s,label:c,id:l,name:u,error:d,hint:f,className:m,rest:b,inputType:`checkbox`,wrapperClass:y})});export{s as default};
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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{pageWindow as i}from"../lib/pageWindow.js";import a from"./AppSelectMini.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`numbered`,`prev-next`],l=[5,10,25,50];function u(u){let{page:d,totalPages:f,total:p,pageSize:m,onPageChange:h,onPageSizeChange:g,pageSizes:_=l,mode:v=`numbered`,showPageSize:y=!0,className:b=``,...x}=u;n(`AppTablePagination`,x),t(`AppTablePagination`,`mode`,v,c);let S=Number(d),C=Number(m)||0,w=C>0&&!_.includes(C)?[..._,C].sort((e,t)=>e-t):_,T=Number(p)||0,E=f??Math.max(1,Math.ceil(T/(C>0?C:10))),D=v===`numbered`,O=D?i(S,E):null;return s(`div`,{className:`table-pagination${b?` ${b}`:``}`,...e(`AppTablePagination`,u),...x,children:[y&&o(`span`,{className:`tpg-rows`,children:o(a,{value:C,onChange:e=>g?.(Number(e)),ariaLabel:`Rows per page`,options:w.map(e=>({value:e,label:`${e} per page`}))})}),!D&&s(`span`,{className:`tpg-range`,children:[`Page `,S,` of `,E]}),s(`div`,{className:`tpg-nav`,children:[o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>h?.(Math.max(1,S-1)),disabled:S<=1,"aria-label":`Previous page`,children:o(r,{name:`arrow-left`,size:18})}),D&&O.map(e=>typeof e==`number`?o(`button`,{type:`button`,className:`tpg-page${e===S?` is-active`:``}`,onClick:()=>h?.(e),"aria-current":e===S?`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:()=>h?.(Math.min(E,S+1)),disabled:S>=E,"aria-label":`Next page`,children:o(r,{name:`arrow-right`,size:18})})]})]})}export{u as default};
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 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{formatNumber as n}from"@webority/ui-elements/helpers";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{filters:o,actions:s,selectedCount:c=0,bulkActions:l,onClearSelection:u,totalCount:d,pageCount:f,onSelectAllMatching:p,allMatchingSelected:m=!1,className:h=``,...g}=a;t(`AppTableToolbar`,g);let _=c>0,v=typeof p==`function`&&typeof d==`number`,y=v&&m,b=e=>n(e,{decimals:0}),x=v&&!y&&_&&c>=(f??1)&&d>(f??c);return i(`div`,{className:`wui-table-toolbar${h?` ${h}`:``}`,...e(`AppTableToolbar`,a),...g,children:[i(`div`,{className:`wui-table-toolbar-main`,hidden:_,children:[r(`div`,{className:`wui-table-toolbar-filters`,children:o}),r(`div`,{className:`wui-table-toolbar-actions`,children:s})]}),i(`div`,{className:`wui-table-toolbar-bulk`,hidden:!_,children:[i(`span`,{className:`wui-table-toolbar-count`,"aria-live":`polite`,children:[y?`All ${b(d)}`:b(c),` selected`]}),v&&i(`button`,{type:`button`,className:`btn btn-link btn-sm wui-table-toolbar-all`,hidden:!x,onClick:p,children:[`Select all `,b(d),` matching`]}),l,u&&r(`button`,{type:`button`,className:`btn btn-ghost btn-sm wui-table-toolbar-clear`,onClick:u,children:y?`Clear selection`:`Clear`})]})]})}export{a as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{formatNumber as n}from"@webority/ui-elements/helpers";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{marker:o,props:s}=e(`AppTableToolbar`,a),{filters:c,actions:l,selectedCount:u=0,bulkActions:d,onClearSelection:f,totalCount:p,pageCount:m,onSelectAllMatching:h,allMatchingSelected:g=!1,className:_=``,...v}=s;t(`AppTableToolbar`,v);let y=u>0,b=typeof h==`function`&&typeof p==`number`,x=b&&g,S=e=>n(e,{decimals:0}),C=b&&!x&&y&&u>=(m??1)&&p>(m??u);return i(`div`,{className:`wui-table-toolbar${_?` ${_}`:``}`,...o,...v,children:[i(`div`,{className:`wui-table-toolbar-main`,hidden:y,children:[r(`div`,{className:`wui-table-toolbar-filters`,children:c}),r(`div`,{className:`wui-table-toolbar-actions`,children:l})]}),i(`div`,{className:`wui-table-toolbar-bulk`,hidden:!y,children:[i(`span`,{className:`wui-table-toolbar-count`,"aria-live":`polite`,children:[x?`All ${S(p)}`:S(u),` selected`]}),b&&i(`button`,{type:`button`,className:`btn btn-link btn-sm wui-table-toolbar-all`,hidden:!C,onClick:h,children:[`Select all `,S(p),` matching`]}),d,f&&r(`button`,{type:`button`,className:`btn btn-ghost btn-sm wui-table-toolbar-clear`,onClick:f,children:x?`Clear selection`:`Clear`})]})]})}export{a as default};