@webority/ui-react 0.107.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,21 +1,21 @@
1
1
  {
2
2
  "name": "webority-web",
3
- "version": "0.107.0",
3
+ "version": "0.108.0",
4
4
  "platform": "Web",
5
5
  "kitModuleVersion": 2,
6
6
  "rendererProtocolVersion": 12,
7
7
  "library": {
8
8
  "name": "@webority/ui-react",
9
- "version": "0.107.0"
9
+ "version": "0.108.0"
10
10
  },
11
11
  "files": {
12
12
  "manifest.json": {
13
- "sha256": "47f907a4ae527c3ed56a8f43f636371127a61575d4da14c3cecbab1d5c10212a",
14
- "bytes": 870484
13
+ "sha256": "b8a77258d5132ab617b39c06a17332b47d7581d81f75433312661e17ec36706c",
14
+ "bytes": 853123
15
15
  },
16
16
  "kit.js": {
17
- "sha256": "93f9e322b6e658ef92c904c8e40d50f01ee1e8dd6ebbc045735477cab4514fe3",
18
- "bytes": 10909277
17
+ "sha256": "e54806dbd40ddc65b1428ff94da6dea02a7249b62773ffd9dc036d3c9f614a83",
18
+ "bytes": 10893959
19
19
  },
20
20
  "kit.css": {
21
21
  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
@@ -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,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`bordered`,`flat`];function u(e,t,n){if(Array.isArray(n)){let e=n.map(String);return new Set(t?e:e.slice(0,1))}let r=e.map((e,t)=>({item:e,key:e.key??String(t)})).filter(({item:e})=>e.open).map(({key:e})=>e);return new Set(t?r:r.slice(0,1))}function d(d){let{items:f=[],multiple:p=!1,openItems:m,variant:h=`bordered`,id:g,className:_=``,...v}=d;n(`AppAccordion`,v),t(`AppAccordion`,`variant`,h,l);let y=h===`flat`,b=s(`span`,{className:`faq-q-icon`,children:s(r,{name:`chevron-down`,size:18})}),x=a(),S=g||x,[C,w]=o(()=>u(f,p,m)),T=Array.isArray(m)?m.map(String).join(`\0`):null;i(()=>{T!==null&&w(u(f,p,m))},[T,p]);let E=(e,t)=>e.key??String(t),D=e=>{w(t=>{let n=new Set(p?t:[]);return t.has(e)?n.delete(e):n.add(e),n})};return s(`div`,{className:`faq-list${y?` wui-accordion-flat`:``}${_?` ${_}`:``}`,...e(`AppAccordion`,d),...v,children:f.map((e,t)=>{let n=E(e,t),r=C.has(n),i=`${S}-${t}`,a=`${i}-q`;return c(`div`,{className:`faq-item${r?` open`:``}`,children:[c(`button`,{type:`button`,className:`faq-q`,id:a,"aria-expanded":r,"aria-controls":i,onClick:()=>D(n),children:[y?b:null,e.title,e.count==null?null:s(`span`,{className:`wui-accordion-count`,children:e.count}),y?null:b]}),s(`section`,{className:`faq-a-wrap`,id:i,"aria-labelledby":a,inert:!r,"aria-hidden":!r||void 0,children:s(`div`,{className:`faq-a-inner`,children:e.content})})]},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 from"./AppIcon.js";import{useEffect as i,useId as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`bordered`,`flat`];function u(e,t,n){if(Array.isArray(n)){let e=n.map(String);return new Set(t?e:e.slice(0,1))}let r=e.map((e,t)=>({item:e,key:e.key??String(t)})).filter(({item:e})=>e.open).map(({key:e})=>e);return new Set(t?r:r.slice(0,1))}function d(d){let{marker:f,props:p}=e(`AppAccordion`,d),{items:m=[],multiple:h=!1,openItems:g,variant:_=`bordered`,id:v,className:y=``,...b}=p;n(`AppAccordion`,b),t(`AppAccordion`,`variant`,_,l);let x=_===`flat`,S=s(`span`,{className:`wui-accordion-icon`,children:s(r,{name:`chevron-down`,size:18})}),C=a(),w=v||C,[T,E]=o(()=>u(m,h,g)),D=Array.isArray(g)?g.map(String).join(`\0`):null;i(()=>{D!==null&&E(u(m,h,g))},[D,h]);let O=(e,t)=>e.key??String(t),k=e=>{E(t=>{let n=new Set(h?t:[]);return t.has(e)?n.delete(e):n.add(e),n})};return s(`div`,{className:`wui-accordion${x?` wui-accordion-flat`:``}${y?` ${y}`:``}`,...f,...b,children:m.map((e,t)=>{let n=O(e,t),r=T.has(n),i=`${w}-${t}`,a=`${i}-q`;return c(`div`,{className:`wui-accordion-item${r?` open`:``}`,children:[c(`button`,{type:`button`,className:`wui-accordion-trigger`,id:a,"aria-expanded":r,"aria-controls":i,onClick:()=>k(n),children:[x?S:null,e.title,e.count==null?null:s(`span`,{className:`wui-accordion-count`,children:e.count}),x?null:S]}),s(`section`,{className:`wui-accordion-panel`,id:i,"aria-labelledby":a,inert:!r,"aria-hidden":!r||void 0,children:s(`div`,{className:`wui-accordion-body`,children:e.content})})]},n)})})}export{d 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{shortcutAria as i}from"../lib/shortcutChip.js";import a from"./withTooltip.js";import o from"./renderIconProp.js";import{useRef as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],f=[`comfortable`,`compact`];function p(p){let{icon:m,iconVariant:h,label:g,tooltipPlacement:_=`auto`,shortcut:v,danger:y=!1,density:b=`comfortable`,neutral:x=!1,disabled:S=!1,size:C=20,onClick:w,className:T=``,as:E,href:D,accept:O,multiple:k=!1,onFiles:A,...j}=p,M=Number(C),N=Number.isFinite(M)&&M>0?M:20;C!==void 0&&!(Number.isFinite(M)&&M>0)&&t(`AppActionIcon: size must be a positive number of px.`),r(`AppActionIcon`,E===void 0?j:{...j,as:E}),n(`AppActionIcon`,`iconVariant`,h,d),n(`AppActionIcon`,`density`,b,f),y&&x&&t(`AppActionIcon: danger and neutral are exclusive; danger wins.`);let P=typeof A==`function`;P&&(E!==void 0||D!==void 0)&&t(`AppActionIcon: file mode renders a button; href and as are ignored.`),!P&&(O!==void 0||k)&&t(`AppActionIcon: accept and multiple apply only in file mode (pass onFiles).`);let F=s(null),I=e=>{let t=[...e.target.files];e.target.value=``,t.length>0&&A(t)},L=[`u-action`,y?`danger`:``,x&&!y?`neutral`:``,T].filter(Boolean).join(` `),{style:R,...z}=j,B={"--wui-action-size":`${N+(b===`compact`?8:16)}px`,...R},V=P?`button`:E??(D?`a`:`button`),H=V===`button`,U=a(l(V,{type:H?`button`:void 0,href:H||S?void 0:D,className:L,style:B,"aria-label":g,"aria-keyshortcuts":i(v),disabled:H?S:void 0,"aria-disabled":!H&&S?`true`:void 0,role:!H&&S?`link`:void 0,tabIndex:!H&&S?-1:void 0,onClick:e=>{if(S){e.preventDefault(),e.stopPropagation();return}w?.(e),P&&!e.defaultPrevented&&F.current?.click()},...e(`AppActionIcon`,p),...z,children:o(m,{size:N,variant:h})}),g,_,v);return P?u(c,{children:[U,l(`input`,{type:`file`,ref:F,className:`wui-action-icon-file`,hidden:!0,tabIndex:-1,"aria-hidden":`true`,accept:O,multiple:k,onChange:I,onClick:e=>e.stopPropagation()})]}):U}export{p 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{shortcutAria as i}from"../lib/shortcutChip.js";import a from"./withTooltip.js";import o from"./renderIconProp.js";import{useRef as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],f=[`comfortable`,`compact`];function p(p){let{marker:m,props:h}=e(`AppActionIcon`,p),{icon:g,iconVariant:_,label:v,tooltipPlacement:y=`auto`,shortcut:b,danger:x=!1,density:S=`comfortable`,neutral:C=!1,disabled:w=!1,size:T=20,onClick:E,className:D=``,as:O,href:k,accept:A,multiple:j=!1,onFiles:M,...N}=h,P=Number(T),F=Number.isFinite(P)&&P>0?P:20;T!==void 0&&!(Number.isFinite(P)&&P>0)&&t(`AppActionIcon: size must be a positive number of px.`),r(`AppActionIcon`,O===void 0?N:{...N,as:O}),n(`AppActionIcon`,`iconVariant`,_,d),n(`AppActionIcon`,`density`,S,f),x&&C&&t(`AppActionIcon: danger and neutral are exclusive; danger wins.`);let I=typeof M==`function`;I&&(O!==void 0||k!==void 0)&&t(`AppActionIcon: file mode renders a button; href and as are ignored.`),!I&&(A!==void 0||j)&&t(`AppActionIcon: accept and multiple apply only in file mode (pass onFiles).`);let L=s(null),R=e=>{let t=[...e.target.files];e.target.value=``,t.length>0&&M(t)},z=[`u-action`,x?`danger`:``,C&&!x?`neutral`:``,D].filter(Boolean).join(` `),{style:B,...V}=N,H={"--wui-action-size":`${F+(S===`compact`?8:16)}px`,...B},U=I?`button`:O??(k?`a`:`button`),W=U===`button`,G=a(l(U,{type:W?`button`:void 0,href:W||w?void 0:k,className:z,style:H,"aria-label":v,"aria-keyshortcuts":i(b),disabled:W?w:void 0,"aria-disabled":!W&&w?`true`:void 0,role:!W&&w?`link`:void 0,tabIndex:!W&&w?-1:void 0,onClick:e=>{if(w){e.preventDefault(),e.stopPropagation();return}E?.(e),I&&!e.defaultPrevented&&L.current?.click()},...m,...V,children:o(g,{size:F,variant:_})}),v,y,b);return I?u(c,{children:[G,l(`input`,{type:`file`,ref:L,className:`wui-action-icon-file`,hidden:!0,tabIndex:-1,"aria-hidden":`true`,accept:A,multiple:j,onChange:R,onClick:e=>e.stopPropagation()})]}):G}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"./AppIcon.js";import{Alert as i}from"react-bootstrap";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c={info:`info`,success:`check`,warning:`alert-triangle`,danger:`x`},l=[`info`,`success`,`warning`,`danger`,`neutral`],u=[`sm`,`md`,`lg`],d=[`alert`,`status`,`none`],f=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`];function p(e,t,n,i,a,s){return i?o(`span`,{className:`alert-icon alert-icon-image`,style:s>0?{width:s,height:s}:void 0,children:o(`img`,{src:i,alt:a})}):e?typeof e==`string`?o(`span`,{className:`alert-icon`,children:o(r,{name:e,size:t,variant:n})}):o(`span`,{className:`alert-icon`,children:e}):null}function m(r){let{variant:m=`info`,children:h,title:g,icon:_,iconVariant:v,iconSize:y,image:b,imageAlt:x=``,imageSize:S,className:C=``,onClose:w,dismissible:T,bordered:E=!0,accent:D=!1,size:O=`md`,action:k,role:A=`alert`,...j}=r;n(`AppAlert`,j),t(`AppAlert`,`variant`,m,l),t(`AppAlert`,`size`,O,u),t(`AppAlert`,`role`,A,d),t(`AppAlert`,`iconVariant`,v,f);let M=_===void 0?c[m]:_===`none`?null:_,N=!!b||!!M,P=k!=null&&k!==!1,F=g?o(`div`,{className:`alert-heading`,children:g}):null,I=N&&!!F&&!!h,L=y>0?y:O===`lg`?I?17:15:I?13:11;return o(i,{variant:m,className:[N?`alert-has-icon`:``,P?`alert-has-action`:``,I?`alert-stack`:``,E?``:`alert-borderless`,D?`alert-accent`:``,O===`sm`?`alert-sm`:``,O===`lg`?`alert-lg`:``,C].filter(Boolean).join(` `)||void 0,onClose:w,dismissible:T??typeof w==`function`,transition:!1,role:A===`none`?void 0:A,...e(`AppAlert`,r),...j,children:N||P?s(a,{children:[N&&p(M,L,v,b,x,S),s(`div`,{className:`alert-content`,children:[F,h]}),P&&o(`div`,{className:`alert-action`,children:k})]}):s(a,{children:[F,h]})})}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{Alert as i}from"react-bootstrap";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c={info:`info`,success:`check`,warning:`alert-triangle`,danger:`x`},l=[`info`,`success`,`warning`,`danger`,`neutral`],u=[`sm`,`md`,`lg`],d=[`alert`,`status`,`none`],f=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`];function p(e,t,n,i,a,s){return i?o(`span`,{className:`alert-icon alert-icon-image`,style:s>0?{width:s,height:s}:void 0,children:o(`img`,{src:i,alt:a})}):e?typeof e==`string`?o(`span`,{className:`alert-icon`,children:o(r,{name:e,size:t,variant:n})}):o(`span`,{className:`alert-icon`,children:e}):null}function m(r){let{marker:m,props:h}=e(`AppAlert`,r),{variant:g=`info`,children:_,title:v,icon:y,iconVariant:b,iconSize:x,image:S,imageAlt:C=``,imageSize:w,className:T=``,onClose:E,dismissible:D,bordered:O=!0,accent:k=!1,size:A=`md`,action:j,role:M=`alert`,...N}=h;n(`AppAlert`,N),t(`AppAlert`,`variant`,g,l),t(`AppAlert`,`size`,A,u),t(`AppAlert`,`role`,M,d),t(`AppAlert`,`iconVariant`,b,f);let P=y===void 0?c[g]:y===`none`?null:y,F=!!S||!!P,I=j!=null&&j!==!1,L=v?o(`div`,{className:`alert-heading`,children:v}):null,R=F&&!!L&&!!_,z=x>0?x:A===`lg`?R?17:15:R?13:11;return o(i,{variant:g,className:[F?`alert-has-icon`:``,I?`alert-has-action`:``,R?`alert-stack`:``,O?``:`alert-borderless`,k?`alert-accent`:``,A===`sm`?`alert-sm`:``,A===`lg`?`alert-lg`:``,T].filter(Boolean).join(` `)||void 0,onClose:E,dismissible:D??typeof E==`function`,transition:!1,role:M===`none`?void 0:M,...m,...N,children:F||I?s(a,{children:[F&&p(P,z,b,S,C,w),s(`div`,{className:`alert-content`,children:[L,_]}),I&&o(`div`,{className:`alert-action`,children:j})]}):s(a,{children:[L,_]})})}export{m as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppButton.js";import r from"./AppEmptyState.js";import i from"./AppProgress.js";import{jsx as a}from"react/jsx-runtime";function o(o){let{loading:s=!1,error:c=null,empty:l=!1,children:u,onRetry:d,skeleton:f,className:p=``,...m}=o;t(`AppAsyncBlock`,m);let h=`async-block${p?` ${p}`:``}`;return s?a(`div`,{className:h,"data-state":`loading`,...e(`AppAsyncBlock`,o),...m,children:f??a(i,{value:0,indeterminate:!0,size:`sm`,label:`Loading`})}):c?a(`div`,{className:h,"data-state":`error`,...e(`AppAsyncBlock`,o),...m,children:a(r,{icon:`alert-circle`,title:`Something went wrong`,text:c,action:d?a(n,{variant:`secondary`,onClick:d,children:`Retry`}):null})}):l?a(`div`,{className:h,"data-state":`empty`,...e(`AppAsyncBlock`,o),...m,children:a(r,{icon:`inbox`,title:`Nothing to show yet`})}):a(`div`,{className:h,"data-state":`content`,...e(`AppAsyncBlock`,o),...m,children:u})}export{o as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppButton.js";import r from"./AppEmptyState.js";import i from"./AppProgress.js";import{jsx as a}from"react/jsx-runtime";function o(o){let{marker:s,props:c}=e(`AppAsyncBlock`,o),{loading:l=!1,error:u=null,empty:d=!1,children:f,onRetry:p,skeleton:m,className:h=``,...g}=c;t(`AppAsyncBlock`,g);let _=`async-block${h?` ${h}`:``}`;return l?a(`div`,{className:_,"data-state":`loading`,...s,...g,children:m??a(i,{value:0,indeterminate:!0,size:`sm`,label:`Loading`})}):u?a(`div`,{className:_,"data-state":`error`,...s,...g,children:a(r,{icon:`alert-circle`,title:`Something went wrong`,text:u,action:p?a(n,{variant:`secondary`,onClick:p,children:`Retry`}):null})}):d?a(`div`,{className:_,"data-state":`empty`,...s,...g,children:a(r,{icon:`inbox`,title:`Nothing to show yet`})}):a(`div`,{className:_,"data-state":`content`,...s,...g,children:f})}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"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o from"./useNodeLabels.js";import s,{optionsEqual as c}from"./useWuiControl.js";import{forwardRef as l,useEffect as u,useId as d,useRef as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import"@webority/ui-elements/elements/autocomplete";var h=[`sm`,`lg`],g=[],_=(e,t)=>({...e,label:t}),v=(e,t,n)=>{if(n==null||t==null||t===``)return e;let r=String(t);return e.some(e=>String(e.value)===r)?e:[...e,{value:r,label:n}]},y=l(function(l,y){let{value:b,onChange:x,options:S,valueLabel:C,loadOptions:w,placeholder:T=`Search…`,minChars:E,debounce:D,disabled:O=!1,open:k,size:A,allowCustom:j=!1,name:M,id:N,label:P,error:F,hint:I,required:L=!1,help:R,helpLabel:z=`More information`,fieldClassName:B=``,"data-canvas":V,...H}=l;n(`AppAutocomplete`,H),t(`AppAutocomplete`,`size`,A,h);let U=typeof w==`function`,W=d(),G=N||W,{setRef:K,innerRef:q}=s({ref:y,value:b??``,on:{change:e=>x?.(e.currentTarget.value,{isCustom:!!e.detail?.isCustom})}}),J=S||g,{portal:Y,toElementOptions:X}=o(J),Z=f(!1);return u(()=>{let e=q.current;if(!e||U&&Z.current)return;let t=X(v(J,b,C),_);c(t,e.options)||(e.options=t)},[J,U,q,X,b,C]),u(()=>{let e=q.current;if(!e||!U||!Z.current)return;let t=e.options,n=v(t,b,C);n!==t&&(e.options=n)},[b,C,U,q]),u(()=>{let e=q.current;if(!e||!U)return;let t=0,n=null,r=async r=>{let i=++t;n?.abort(),n=typeof AbortController==`function`?new AbortController:null,e.loading=!0;try{let a=await w(r.detail.query,{signal:n?.signal});i===t&&(Z.current=!0,e.options=a||[])}catch{i===t&&(Z.current=!0,e.options=[])}finally{i===t&&(e.loading=!1)}};return e.addEventListener(`search`,r),()=>{t=-1,n?.abort(),e.removeEventListener(`search`,r),e.loading=!1}},[U,w,q]),m(`div`,{...e(`AppAutocomplete`,l),className:`field${B?` ${B}`:``}`,children:[P&&m(`label`,{className:`label`,htmlFor:G,children:[P,L&&p(a,{}),R&&p(i,{label:z,children:R})]}),p(`wui-autocomplete`,{"aria-label":typeof P==`string`?P:void 0,"aria-describedby":F?`${G}-error`:I?`${G}-hint`:void 0,"aria-invalid":F?`true`:void 0,id:G,ref:K,name:M,placeholder:T,remote:U?``:void 0,"min-chars":E==null?void 0:String(E),debounce:D==null?void 0:String(D),size:A||void 0,"allow-custom":j?``:void 0,disabled:O?``:void 0,open:k?``:void 0,required:L?``:void 0,...H}),Y,p(r,{error:F,hint:I,errorId:`${G}-error`,hintId:`${G}-hint`})]})});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"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o from"./useNodeLabels.js";import s,{optionsEqual as c}from"./useWuiControl.js";import{forwardRef as l,useEffect as u,useId as d,useRef as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import"@webority/ui-elements/elements/autocomplete";var h=[`sm`,`lg`],g=[],_=(e,t)=>({...e,label:t}),v=(e,t,n)=>{if(n==null||t==null||t===``)return e;let r=String(t);return e.some(e=>String(e.value)===r)?e:[...e,{value:r,label:n}]},y=l(function(l,y){let{marker:b,props:x}=e(`AppAutocomplete`,l),{value:S,onChange:C,options:w,valueLabel:T,loadOptions:E,placeholder:D=`Search…`,minChars:O,debounce:k,disabled:A=!1,open:j,size:M,allowCustom:N=!1,name:P,id:F,label:I,error:L,hint:R,required:z=!1,help:B,helpLabel:V=`More information`,fieldClassName:H=``,...U}=x;n(`AppAutocomplete`,U),t(`AppAutocomplete`,`size`,M,h);let W=typeof E==`function`,G=d(),K=F||G,{setRef:q,innerRef:J}=s({ref:y,value:S??``,on:{change:e=>C?.(e.currentTarget.value,{isCustom:!!e.detail?.isCustom})}}),Y=w||g,{portal:X,toElementOptions:Z}=o(Y),Q=f(!1);return u(()=>{let e=J.current;if(!e||W&&Q.current)return;let t=Z(v(Y,S,T),_);c(t,e.options)||(e.options=t)},[Y,W,J,Z,S,T]),u(()=>{let e=J.current;if(!e||!W||!Q.current)return;let t=e.options,n=v(t,S,T);n!==t&&(e.options=n)},[S,T,W,J]),u(()=>{let e=J.current;if(!e||!W)return;let t=0,n=null,r=async r=>{let i=++t;n?.abort(),n=typeof AbortController==`function`?new AbortController:null,e.loading=!0;try{let a=await E(r.detail.query,{signal:n?.signal});i===t&&(Q.current=!0,e.options=a||[])}catch{i===t&&(Q.current=!0,e.options=[])}finally{i===t&&(e.loading=!1)}};return e.addEventListener(`search`,r),()=>{t=-1,n?.abort(),e.removeEventListener(`search`,r),e.loading=!1}},[W,E,J]),m(`div`,{...b,className:`field${H?` ${H}`:``}`,children:[I&&m(`label`,{className:`label`,htmlFor:K,children:[I,z&&p(a,{}),B&&p(i,{label:V,children:B})]}),p(`wui-autocomplete`,{"aria-label":typeof I==`string`?I:void 0,"aria-describedby":L?`${K}-error`:R?`${K}-hint`:void 0,"aria-invalid":L?`true`:void 0,id:K,ref:q,name:P,placeholder:D,remote:W?``:void 0,"min-chars":O==null?void 0:String(O),debounce:k==null?void 0:String(k),size:M||void 0,"allow-custom":N?``:void 0,disabled:A?``:void 0,open:j?``:void 0,required:z?``:void 0,...U}),X,p(r,{error:L,hint:R,errorId:`${K}-error`,hintId:`${K}-hint`})]})});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 i from"./renderIconProp.js";import{initialsOf as a}from"../lib/initials.js";import{useEffect as o,useState as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`circle`,`rounded`,`square`],f=[`primary`,`neutral`,`success`,`warning`,`danger`,`info`,`auto`],p=[`none`,`online`,`offline`,`away`,`busy`],m=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],h=new Set([`xs`,`sm`,`md`,`lg`,`xl`,`2xl`]),g={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function _(e){return a(e)||`?`}function v(e){let t=e||``,n=0;for(let e=0;e<t.length;e+=1)n=Math.imul(n,31)+t.charCodeAt(e)>>>0;return n%360}function y(e){if(typeof e==`number`)return e;if(g[e]!=null)return g[e];let t=Number.parseInt(e,10);return Number.isNaN(t)?32:t}function b(a){let{name:g,src:b,size:x=`md`,shape:S=`circle`,tone:C=`primary`,status:w=`none`,ring:T=!1,label:E,icon:D,iconVariant:O,badge:k,href:A,onClick:j,linkComponent:M,tooltip:N,tooltipPlacement:P,className:F=``,...I}=a;n(`AppAvatar`,I),t(`AppAvatar`,`shape`,S,d),t(`AppAvatar`,`tone`,C,f),t(`AppAvatar`,`status`,w,p),t(`AppAvatar`,`iconVariant`,O,m);let{style:L,...R}=I,[z,B]=s(!1);o(()=>{B(!1)},[b]);let V=typeof x==`string`&&h.has(x),H=V?null:typeof x==`number`||/^\d+$/.test(x)?`${x}px`:x,U=A!=null||j!=null,W=b!=null&&b!==``&&!z,G=[`avatar`,V&&x!==`md`?`avatar-${x}`:``,S===`circle`?``:`avatar-${S}`,C===`primary`?``:`avatar-${C}`,T?`avatar-ring`:``,U?`avatar-clickable`:``,F].filter(Boolean).join(` `),K={};H&&(K[`--avatar-size`]=H),C===`auto`&&(K[`--avatar-hue`]=v(g));let q=Object.keys(K).length||L?{...K,...L}:void 0,J=l(`span`,{className:`avatar-face`,"aria-hidden":`true`,children:D!=null&&D!==!1&&D!==``?i(D,{size:Math.round(y(x)*.55),variant:O}):_(g)}),Y=u(c,{children:[w!==`none`&&l(`span`,{className:`avatar-status avatar-status-${w}`,"aria-hidden":`true`}),k!=null&&l(`span`,{className:`avatar-badge`,children:k}),E!=null&&l(`span`,{className:`avatar-label`,"aria-hidden":`true`,children:E})]}),X=u(c,{children:[J,W&&l(`img`,{className:`avatar-img`,src:b,alt:U?``:g||`Profile photo`,onError:()=>B(!0)}),Y]});if(A!=null){let t=M||`a`,n=M?{to:A}:{href:A};return r(l(t,{className:G,style:q,...e(`AppAvatar`,a),...R,"aria-label":E||g,...n,onClick:j,children:X}),N,P)}if(j!=null)return r(l(`button`,{type:`button`,className:G,style:q,...e(`AppAvatar`,a),...R,"aria-label":E||g,onClick:j,children:X}),N,P);if(W)return r(l(`span`,{className:G,style:q,...e(`AppAvatar`,a),...R,children:X}),N,P);let Z=E?.trim()||g?.trim();return r(Z?l(`span`,{className:G,style:q,...e(`AppAvatar`,a),...R,role:`img`,"aria-label":Z,children:X}):l(`span`,{className:G,style:q,...e(`AppAvatar`,a),...R,"aria-hidden":`true`,children:X}),N,P)}export{b 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 i from"./renderIconProp.js";import{initialsOf as a}from"../lib/initials.js";import{useEffect as o,useState as s}from"react";import{Fragment as c,jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`circle`,`rounded`,`square`],f=[`primary`,`neutral`,`success`,`warning`,`danger`,`info`,`auto`],p=[`none`,`online`,`offline`,`away`,`busy`],m=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],h=new Set([`xs`,`sm`,`md`,`lg`,`xl`,`2xl`]),g={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function _(e){return a(e)||`?`}function v(e){let t=e||``,n=0;for(let e=0;e<t.length;e+=1)n=Math.imul(n,31)+t.charCodeAt(e)>>>0;return n%360}function y(e){if(typeof e==`number`)return e;if(g[e]!=null)return g[e];let t=Number.parseInt(e,10);return Number.isNaN(t)?32:t}function b(a){let{marker:g,props:b}=e(`AppAvatar`,a),{name:x,src:S,size:C=`md`,shape:w=`circle`,tone:T=`primary`,status:E=`none`,ring:D=!1,label:O,icon:k,iconVariant:A,badge:j,href:M,onClick:N,linkComponent:P,tooltip:F,tooltipPlacement:I,className:L=``,...R}=b;n(`AppAvatar`,R),t(`AppAvatar`,`shape`,w,d),t(`AppAvatar`,`tone`,T,f),t(`AppAvatar`,`status`,E,p),t(`AppAvatar`,`iconVariant`,A,m);let{style:z,...B}=R,[V,H]=s(!1);o(()=>{H(!1)},[S]);let U=typeof C==`string`&&h.has(C),W=U?null:typeof C==`number`||/^\d+$/.test(C)?`${C}px`:C,G=M!=null||N!=null,K=S!=null&&S!==``&&!V,q=[`avatar`,U&&C!==`md`?`avatar-${C}`:``,w===`circle`?``:`avatar-${w}`,T===`primary`?``:`avatar-${T}`,D?`avatar-ring`:``,G?`avatar-clickable`:``,L].filter(Boolean).join(` `),J={};W&&(J[`--avatar-size`]=W),T===`auto`&&(J[`--avatar-hue`]=v(x));let Y=Object.keys(J).length||z?{...J,...z}:void 0,X=l(`span`,{className:`avatar-face`,"aria-hidden":`true`,children:k!=null&&k!==!1&&k!==``?i(k,{size:Math.round(y(C)*.55),variant:A}):_(x)}),Z=u(c,{children:[E!==`none`&&l(`span`,{className:`avatar-status avatar-status-${E}`,"aria-hidden":`true`}),j!=null&&l(`span`,{className:`avatar-badge`,children:j}),O!=null&&l(`span`,{className:`avatar-label`,"aria-hidden":`true`,children:O})]}),Q=u(c,{children:[X,K&&l(`img`,{className:`avatar-img`,src:S,alt:G?``:x||`Profile photo`,onError:()=>H(!0)}),Z]});if(M!=null){let e=P||`a`,t=P?{to:M}:{href:M};return r(l(e,{className:q,style:Y,...g,...B,"aria-label":O||x,...t,onClick:N,children:Q}),F,I)}if(N!=null)return r(l(`button`,{type:`button`,className:q,style:Y,...g,...B,"aria-label":O||x,onClick:N,children:Q}),F,I);if(K)return r(l(`span`,{className:q,style:Y,...g,...B,children:Q}),F,I);let $=O?.trim()||x?.trim();return r($?l(`span`,{className:q,style:Y,...g,...B,role:`img`,"aria-label":$,children:Q}):l(`span`,{className:q,style:Y,...g,...B,"aria-hidden":`true`,children:Q}),F,I)}export{b 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=[`tight`,`normal`,`loose`],o={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function s(e){return e==null?null:typeof e==`number`?`${e}px`:o[e]==null?/^\d+$/.test(e)?`${e}px`:e:`${o[e]}px`}function c(o){let{children:c,size:l,spacing:u=`normal`,overflow:d,className:f=``,...p}=o;n(`AppAvatarGroup`,p),t(`AppAvatarGroup`,`spacing`,u,a);let{style:m,...h}=p,g=[`avatar-group`,u===`normal`?``:`avatar-group-${u}`,f].filter(Boolean).join(` `),_=s(l),v=_?{"--avatar-size":_,...m}:m,y=typeof d==`string`?Number.parseInt(d,10):d,b=typeof d==`string`&&!/^\d+$/.test(d)?d:`+${y}`;return i(`div`,{className:g,style:v,...e(`AppAvatarGroup`,o),...h,children:[c,y>0&&r(`span`,{className:`avatar avatar-more`,role:`img`,"aria-label":`${y} more`,children:b})]})}export{c 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=[`tight`,`normal`,`loose`],o={xs:20,sm:24,md:32,lg:48,xl:64,"2xl":96};function s(e){return e==null?null:typeof e==`number`?`${e}px`:o[e]==null?/^\d+$/.test(e)?`${e}px`:e:`${o[e]}px`}function c(o){let{marker:c,props:l}=e(`AppAvatarGroup`,o),{children:u,size:d,spacing:f=`normal`,overflow:p,className:m=``,...h}=l;n(`AppAvatarGroup`,h),t(`AppAvatarGroup`,`spacing`,f,a);let{style:g,..._}=h,v=[`avatar-group`,f===`normal`?``:`avatar-group-${f}`,m].filter(Boolean).join(` `),y=s(d),b=y?{"--avatar-size":y,...g}:g,x=typeof p==`string`?Number.parseInt(p,10):p,S=typeof p==`string`&&!/^\d+$/.test(p)?p:`+${x}`;return i(`div`,{className:v,style:b,...c,..._,children:[u,x>0&&r(`span`,{className:`avatar avatar-more`,role:`img`,"aria-label":`${x} more`,children:S})]})}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"./withTooltip.js";import{Badge as i}from"react-bootstrap";import{jsx as a}from"react/jsx-runtime";var o=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function s(s){let{children:c,tone:l,dot:u=!1,tooltip:d,tooltipPlacement:f,className:p=``,...m}=s;return n(`AppBadge`,m),t(`AppBadge`,`tone`,l,o),r(a(i,{bg:!1,className:[l&&l!==`neutral`?`badge-${l}`:``,u?`badge-dot`:``,p].filter(Boolean).join(` `)||void 0,...e(`AppBadge`,s),...m,children:c}),d,f)}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"./withTooltip.js";import{Badge as i}from"react-bootstrap";import{jsx as a}from"react/jsx-runtime";var o=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function s(s){let{marker:c,props:l}=e(`AppBadge`,s),{children:u,tone:d,dot:f=!1,tooltip:p,tooltipPlacement:m,className:h=``,...g}=l;return n(`AppBadge`,g),t(`AppBadge`,`tone`,d,o),r(a(i,{bg:!1,className:[d&&d!==`neutral`?`badge-${d}`:``,f?`badge-dot`:``,h].filter(Boolean).join(` `)||void 0,...c,...g,children:u}),p,m)}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 from"./renderIconProp.js";import{useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`info`,`success`,`warning`,`danger`,`neutral`];function l(l){let{tone:u=`info`,icon:d,children:f,dismissible:p=!1,onDismiss:m,className:h=``,...g}=l;n(`AppBanner`,g),t(`AppBanner`,`tone`,u,c);let[_,v]=a(!0);if(!_)return null;let y=c.includes(u)?u:`info`,b=()=>{v(!1),m?.()};return s(`div`,{className:`wui-banner wui-banner-${y}${h?` ${h}`:``}`,role:`status`,...e(`AppBanner`,l),...g,children:[d&&o(`span`,{className:`wui-banner-icon`,children:i(d,{size:18})}),o(`div`,{className:`wui-banner-body`,children:f}),p&&o(`button`,{type:`button`,className:`wui-banner-dismiss`,"aria-label":`Dismiss`,onClick:b,children:o(r,{name:`x`,size:18})})]})}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 from"./AppIcon.js";import i from"./renderIconProp.js";import{useState as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`info`,`success`,`warning`,`danger`,`neutral`];function l(l){let{marker:u,props:d}=e(`AppBanner`,l),{tone:f=`info`,icon:p,children:m,dismissible:h=!1,onDismiss:g,className:_=``,...v}=d;n(`AppBanner`,v),t(`AppBanner`,`tone`,f,c);let[y,b]=a(!0);if(!y)return null;let x=c.includes(f)?f:`info`,S=()=>{b(!1),g?.()};return s(`div`,{className:`wui-banner wui-banner-${x}${_?` ${_}`:``}`,role:`status`,...u,...v,children:[p&&o(`span`,{className:`wui-banner-icon`,children:i(p,{size:18})}),o(`div`,{className:`wui-banner-body`,children:m}),h&&o(`button`,{type:`button`,className:`wui-banner-dismiss`,"aria-label":`Dismiss`,onClick:S,children:o(r,{name:`x`,size:18})})]})}export{l as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.js";import{createContext as r,useContext as i}from"react";import{Breadcrumb as a}from"react-bootstrap";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=r(!1);function l(r){let{items:l=[],linkComponent:u,className:d=``,...f}=r;t(`AppBreadcrumbs`,f);let p=i(c);return o(a,{className:d||void 0,...e(`AppBreadcrumbs`,r),...f,children:l.map((e,t)=>{let r=!p&&t===l.length-1,i=e.icon?n(e.icon,{size:14}):null,o={};return r||(o=e.to&&u?{linkAs:u,linkProps:{to:e.to}}:e.to||e.href?{href:e.to||e.href}:{linkAs:`span`}),s(a.Item,{active:r,...o,children:[i,e.label]},e.key??`${e.label}-${t}`)})})}export{c as BreadcrumbTrailContext,l as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.js";import{createContext as r,useContext as i}from"react";import{Breadcrumb as a}from"react-bootstrap";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=r(!1);function l(r){let{marker:l,props:u}=e(`AppBreadcrumbs`,r),{items:d=[],linkComponent:f,className:p=``,...m}=u;t(`AppBreadcrumbs`,m);let h=i(c);return o(a,{className:p||void 0,...l,...m,children:d.map((e,t)=>{let r=!h&&t===d.length-1,i=e.icon?n(e.icon,{size:14}):null,o={};return r||(o=e.to&&f?{linkAs:f,linkProps:{to:e.to}}:e.to||e.href?{href:e.to||e.href}:{linkAs:`span`}),s(a.Item,{active:r,...o,children:[i,e.label]},e.key??`${e.label}-${t}`)})})}export{c as BreadcrumbTrailContext,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{shortcutAria as r,shortcutChip as i}from"../lib/shortcutChip.js";import a from"./withTooltip.js";import o from"./AppIcon.js";import{Button as s}from"react-bootstrap";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u={primary:`primary`,secondary:`secondary`,outline:`outline-primary`,ghost:`ghost`,text:`text`,danger:`danger`,success:`success`,"secondary-danger":`secondary-danger`,"outline-danger":`outline-danger`,light:`light`,warning:`warning`,neutral:`neutral`,"outline-light":`outline-light`,"outline-secondary":`outline-secondary`};function d(e){return`btn-${u[e]??`primary`}`}var f={sm:14,md:16,lg:20},p=[`sheen`,`fill`,`expand`,`glow`,`roll`,`none`],m=[`rounded`,`pill`,`sharp`],h=[`button`,`submit`,`reset`],g=new Set([!0,!1,...Array.from({length:100},(e,t)=>t+1)]),_=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],v=e=>e===`pill`||e===`sharp`?`wui-btn-shape-${e}`:``;function y(e){return l(`span`,{className:`wui-btn-roll`,children:[c(`span`,{className:`wui-btn-roll__a`,children:e}),c(`span`,{className:`wui-btn-roll__b`,"aria-hidden":`true`,children:e})]})}function b(e,t,n,r){if(!e)return null;let i=n=>typeof e==`string`?c(o,{name:e,size:f[t]??f.md,variant:r,className:n}):c(`span`,{className:[`d-inline-flex`,n].filter(Boolean).join(` `),children:e});return l(`span`,{className:n?`wui-btn-roll-ico wui-btn-pin-icon`:`wui-btn-roll-ico ms-2`,"aria-hidden":`true`,children:[i(),i(`wui-btn-roll-ico__next`)]})}function x(e,t,n,r){if(!e)return null;let i=t===`left`?`me-2`:`ms-2`;return typeof e==`string`?c(o,{name:e,size:f[n]??f.md,variant:r,className:i}):c(`span`,{className:`d-inline-flex ${i}`,children:e})}function S(e,t,n){return e?c(`span`,{className:`wui-btn-pin-icon`,"aria-hidden":`true`,children:typeof e==`string`?c(o,{name:e,size:f[t]??f.md,variant:n}):e}):null}function C(o){let{children:d,variant:C=`primary`,size:w=`md`,type:T=`button`,loading:E=!1,disabled:D=!1,block:O=!1,leftIcon:k=null,rightIcon:A=null,href:j,static:M=!1,tooltip:N,tooltipPlacement:P,shortcut:F,animation:I,pinRightIcon:L=!1,shape:R=`rounded`,iconVariant:z,className:B=``,onClick:V,vibrate:H,...U}=o;n(`AppButton`,U),t(`AppButton`,`vibrate`,H,g);let W=H===!0?10:Number.isInteger(H)&&H>=1&&H<=100?H:0;I!==void 0&&t(`AppButton`,`animation`,I,p);let G=I===`roll`&&!M,K=L&&A!=null&&A!==``&&!M&&!E;if(t(`AppButton`,`variant`,C,Object.keys(u)),t(`AppButton`,`size`,w,Object.keys(f)),t(`AppButton`,`shape`,R,m),t(`AppButton`,`type`,T,h),z!==void 0&&t(`AppButton`,`iconVariant`,z,_),M)return a(l(`span`,{className:[`btn`,`btn-${u[C]??`primary`}`,w===`sm`?`btn-sm`:w===`lg`?`btn-lg`:``,O?`w-100`:``,v(R),`btn-static`,B].filter(Boolean).join(` `),...e(`AppButton`,o),...U,children:[x(k,`left`,w,z),d,x(A,`right`,w,z)]}),N,P);let q=[O?`w-100`:``,E?`is-loading`:``,I&&p.includes(I)?`btn-anim-${I}`:``,K?`wui-btn-pin-end`:``,v(R),B].filter(Boolean).join(` `),J=(U.as===void 0||U.as===`button`)&&j===void 0&&U.to===void 0,Y=J?{}:{role:void 0,tabIndex:D||E?-1:void 0},X=N!=null&&N!==``,Z=W?e=>{!D&&!E&&navigator.vibrate?.(W),V?.(e)}:V;return a(l(s,{type:J?T:void 0,href:j,variant:u[C]??`primary`,size:w===`md`?void 0:w,disabled:D||E,"aria-busy":E||void 0,"aria-keyshortcuts":r(F),"data-wui-vibrate":W||void 0,className:q||void 0,onClick:Z,...Y,...e(`AppButton`,o),...U,children:[E&&c(`span`,{className:`spinner-border spinner-border-sm me-2`,"aria-hidden":`true`}),!E&&x(k,`left`,w,z),G?y(d):d,!E&&(G?b(A,w,K,z):K?S(A,w,z):x(A,`right`,w,z)),!X&&i(F)]}),N,P,F)}export{d as buttonVariantClass,C as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{shortcutAria as r,shortcutChip as i}from"../lib/shortcutChip.js";import a from"./withTooltip.js";import o from"./AppIcon.js";import{Button as s}from"react-bootstrap";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u={primary:`primary`,secondary:`secondary`,outline:`outline-primary`,ghost:`ghost`,text:`text`,danger:`danger`,success:`success`,"secondary-danger":`secondary-danger`,"outline-danger":`outline-danger`,light:`light`,warning:`warning`,neutral:`neutral`,"outline-light":`outline-light`,"outline-secondary":`outline-secondary`};function d(e){return`btn-${u[e]??`primary`}`}var f={sm:14,md:16,lg:20},p=[`sheen`,`fill`,`expand`,`glow`,`roll`,`none`],m=[`rounded`,`pill`,`sharp`],h=[`button`,`submit`,`reset`],g=new Set([!0,!1,...Array.from({length:100},(e,t)=>t+1)]),_=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],v=e=>e===`pill`||e===`sharp`?`wui-btn-shape-${e}`:``;function y(e){return l(`span`,{className:`wui-btn-roll`,children:[c(`span`,{className:`wui-btn-roll__a`,children:e}),c(`span`,{className:`wui-btn-roll__b`,"aria-hidden":`true`,children:e})]})}function b(e,t,n,r){if(!e)return null;let i=n=>typeof e==`string`?c(o,{name:e,size:f[t]??f.md,variant:r,className:n}):c(`span`,{className:[`d-inline-flex`,n].filter(Boolean).join(` `),children:e});return l(`span`,{className:n?`wui-btn-roll-ico wui-btn-pin-icon`:`wui-btn-roll-ico ms-2`,"aria-hidden":`true`,children:[i(),i(`wui-btn-roll-ico__next`)]})}function x(e,t,n,r){if(!e)return null;let i=t===`left`?`me-2`:`ms-2`;return typeof e==`string`?c(o,{name:e,size:f[n]??f.md,variant:r,className:i}):c(`span`,{className:`d-inline-flex ${i}`,children:e})}function S(e,t,n){return e?c(`span`,{className:`wui-btn-pin-icon`,"aria-hidden":`true`,children:typeof e==`string`?c(o,{name:e,size:f[t]??f.md,variant:n}):e}):null}function C(o){let{marker:d,props:C}=e(`AppButton`,o),{children:w,variant:T=`primary`,size:E=`md`,type:D=`button`,loading:O=!1,disabled:k=!1,block:A=!1,leftIcon:j=null,rightIcon:M=null,href:N,static:P=!1,tooltip:F,tooltipPlacement:I,shortcut:L,animation:R,pinRightIcon:z=!1,shape:B=`rounded`,iconVariant:V,className:H=``,onClick:U,vibrate:W,...G}=C;n(`AppButton`,G),t(`AppButton`,`vibrate`,W,g);let K=W===!0?10:Number.isInteger(W)&&W>=1&&W<=100?W:0;R!==void 0&&t(`AppButton`,`animation`,R,p);let q=R===`roll`&&!P,J=z&&M!=null&&M!==``&&!P&&!O;if(t(`AppButton`,`variant`,T,Object.keys(u)),t(`AppButton`,`size`,E,Object.keys(f)),t(`AppButton`,`shape`,B,m),t(`AppButton`,`type`,D,h),V!==void 0&&t(`AppButton`,`iconVariant`,V,_),P)return a(l(`span`,{className:[`btn`,`btn-${u[T]??`primary`}`,E===`sm`?`btn-sm`:E===`lg`?`btn-lg`:``,A?`w-100`:``,v(B),`btn-static`,H].filter(Boolean).join(` `),...d,...G,children:[x(j,`left`,E,V),w,x(M,`right`,E,V)]}),F,I);let Y=[A?`w-100`:``,O?`is-loading`:``,R&&p.includes(R)?`btn-anim-${R}`:``,J?`wui-btn-pin-end`:``,v(B),H].filter(Boolean).join(` `),X=(G.as===void 0||G.as===`button`)&&N===void 0&&G.to===void 0,Z=X?{}:{role:void 0,tabIndex:k||O?-1:void 0},Q=F!=null&&F!==``,$=K?e=>{!k&&!O&&navigator.vibrate?.(K),U?.(e)}:U;return a(l(s,{type:X?D:void 0,href:N,variant:u[T]??`primary`,size:E===`md`?void 0:E,disabled:k||O,"aria-busy":O||void 0,"aria-keyshortcuts":r(L),"data-wui-vibrate":K||void 0,className:Y||void 0,onClick:$,...Z,...d,...G,children:[O&&c(`span`,{className:`spinner-border spinner-border-sm me-2`,"aria-hidden":`true`}),!O&&x(j,`left`,E,V),q?y(w):w,!O&&(q?b(M,E,J,V):J?S(M,E,V):x(M,`right`,E,V)),!Q&&i(L)]}),F,I,L)}export{d as buttonVariantClass,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{jsx as r}from"react/jsx-runtime";var i={sm:`btn-group-sm`,md:``,lg:`btn-group-lg`};function a(a){let{label:o,children:s,size:c=`md`,vertical:l=!1,fullWidth:u=!1,className:d=``,...f}=a;return n(`AppButtonGroup`,f),t(`AppButtonGroup`,`size`,c,Object.keys(i)),r(`div`,{role:`group`,"aria-label":o,className:[l?`btn-group-vertical`:`btn-group`,`wui-btn-group`,i[c]??``,u?`wui-btn-group-full`:``,d].filter(Boolean).join(` `),...e(`AppButtonGroup`,a),...f,children:s})}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:`btn-group-sm`,md:``,lg:`btn-group-lg`};function a(a){let{marker:o,props:s}=e(`AppButtonGroup`,a),{label:c,children:l,size:u=`md`,vertical:d=!1,fullWidth:f=!1,className:p=``,...m}=s;return n(`AppButtonGroup`,m),t(`AppButtonGroup`,`size`,u,Object.keys(i)),r(`div`,{role:`group`,"aria-label":c,className:[d?`btn-group-vertical`:`btn-group`,`wui-btn-group`,i[u]??``,f?`wui-btn-group-full`:``,p].filter(Boolean).join(` `),...o,...m,children:l})}export{a 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{forwardRef as i,useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import{jsx as u}from"react/jsx-runtime";var d=`wui-calendar:event-click`,f=`wui-calendar:date-click`,p=`wui-calendar:range-change`,m=[`month`,`week`,`day`,`list`],h=`This calendar couldn't load. Try again in a moment.`,g=i(function(i,g){let{label:_,events:v,eventsUrl:y,view:b,date:x,emptyText:S,errorText:C,firstDay:w,onEventClick:T,onDateClick:E,onRangeChange:D,className:O=``,style:k,...A}=i;r(`AppCalendar`,A),n(`AppCalendar`,`view`,b,m);let j=c(null),M=c(``),N=c({onEventClick:T,onDateClick:E,onRangeChange:D}),[P,F]=l(!1),I=a(e=>{j.current=e,typeof g==`function`?g(e):g&&(g.current=e)},[g]);return o(()=>{N.current={onEventClick:T,onDateClick:E,onRangeChange:D}}),s(()=>{let e=j.current;if(!e)return;let t=v==null?``:JSON.stringify(v);t!==M.current&&(M.current=t,e.events=v??null)}),o(()=>{let e=j.current,t=[[d,e=>{N.current.onEventClick?.(e.detail)===!1&&e.preventDefault()}],[f,e=>N.current.onDateClick?.(e.detail)],[p,e=>N.current.onRangeChange?.(e.detail)]];for(let[n,r]of t)e.addEventListener(n,r);return()=>{for(let[n,r]of t)e.removeEventListener(n,r)}},[]),o(()=>{let e=!0;return import(`@webority/ui-elements/calendar`).catch(n=>{t(`[AppCalendar] the calendar failed to load:`,n?.message),e&&F(!0)}),()=>{e=!1}},[]),P?u(`div`,{...e(`AppCalendar`,i),className:O||void 0,style:k,role:`status`,children:u(`p`,{className:`wui-calendar-status-text`,children:C||h})}):u(`wui-calendar`,{ref:I,label:_||void 0,"events-url":y||void 0,view:b||void 0,date:x||void 0,"empty-text":S||void 0,"error-text":C||void 0,"first-day":w==null?void 0:String(w),className:O||void 0,style:k,...e(`AppCalendar`,i),...A})});export{g 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{forwardRef as i,useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import{jsx as u}from"react/jsx-runtime";var d=`wui-calendar:event-click`,f=`wui-calendar:date-click`,p=`wui-calendar:range-change`,m=[`month`,`week`,`day`,`list`],h=`This calendar couldn't load. Try again in a moment.`,g=i(function(i,g){let{marker:_,props:v}=e(`AppCalendar`,i),{label:y,events:b,eventsUrl:x,view:S,date:C,emptyText:w,errorText:T,firstDay:E,onEventClick:D,onDateClick:O,onRangeChange:k,className:A=``,style:j,...M}=v;r(`AppCalendar`,M),n(`AppCalendar`,`view`,S,m);let N=c(null),P=c(``),F=c({onEventClick:D,onDateClick:O,onRangeChange:k}),[I,L]=l(!1),R=a(e=>{N.current=e,typeof g==`function`?g(e):g&&(g.current=e)},[g]);return o(()=>{F.current={onEventClick:D,onDateClick:O,onRangeChange:k}}),s(()=>{let e=N.current;if(!e)return;let t=b==null?``:JSON.stringify(b);t!==P.current&&(P.current=t,e.events=b??null)}),o(()=>{let e=N.current,t=[[d,e=>{F.current.onEventClick?.(e.detail)===!1&&e.preventDefault()}],[f,e=>F.current.onDateClick?.(e.detail)],[p,e=>F.current.onRangeChange?.(e.detail)]];for(let[n,r]of t)e.addEventListener(n,r);return()=>{for(let[n,r]of t)e.removeEventListener(n,r)}},[]),o(()=>{let e=!0;return import(`@webority/ui-elements/calendar`).catch(n=>{t(`[AppCalendar] the calendar failed to load:`,n?.message),e&&L(!0)}),()=>{e=!1}},[]),I?u(`div`,{..._,className:A||void 0,style:j,role:`status`,children:u(`p`,{className:`wui-calendar-status-text`,children:T||h})}):u(`wui-calendar`,{ref:R,label:y||void 0,"events-url":x||void 0,view:S||void 0,date:C||void 0,"empty-text":w||void 0,"error-text":T||void 0,"first-day":E==null?void 0:String(E),className:A||void 0,style:j,..._,...M})});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"./AppIcon.js";import{useState as i}from"react";import{Card as a}from"react-bootstrap";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`default`,`elevated`,`outlined`,`muted`,`accent`],u=[`primary`,`success`,`warning`,`danger`,`info`],d=[`none`,`sm`,`md`,`lg`],f=[`sans`,`serif`],p={xs:320,sm:420,md:560,lg:720};function m(m){let{title:h,subtitle:g,headerIcon:_,titleClassName:v=``,titleFont:y=`sans`,header:b,headerExtra:x,headerActions:S,footer:C,media:w,children:T,variant:E=`default`,tone:D=`primary`,padding:O=`md`,maxWidth:k,className:A=``,bodyClassName:j=``,headerClassName:M=``,body:ee=!0,lifted:N=!1,href:P,onClick:F,linkComponent:I,onClose:L,dismissible:R,closeLabel:z=`Close`,...B}=m,[V,H]=i(!1);n(`AppCard`,B),t(`AppCard`,`variant`,E,l),t(`AppCard`,`tone`,D,u),t(`AppCard`,`padding`,O,d),t(`AppCard`,`titleFont`,y,f);let{style:U,...W}=B,G=P!=null||F!=null,K=[E&&E!=="default"?`card-${E}`:``,E===`accent`&&D&&D!==`primary`?`tone-${D}`:``,O&&O!==`md`?`card-pad-${O}`:``,N?`card-lifted`:``,k==null?``:`card-constrained`,G?`card-clickable`:``,A].filter(Boolean).join(` `)||void 0,q=k==null?void 0:p[k]==null?typeof k==`number`?`${k}px`:k:`${p[k]}px`,J=q?{"--card-max-width":q,...U}:U,Y={};P==null?F!=null&&(Y={role:`button`,tabIndex:0,onClick:F,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),F(e))}}):(Y=I?{as:I,to:P}:{as:`a`,href:P},F&&(Y.onClick=F));let X=R??typeof L==`function`,Z=X?s(`button`,{type:`button`,className:`card-close`,"aria-label":z,onClick:e=>{e.preventDefault(),e.stopPropagation(),H(!0),L?.()},onKeyDown:e=>e.stopPropagation(),children:s(r,{name:`x`,size:16})}):null,Q=h!=null||g!=null||_!=null,te=b!=null||Q||x!=null||S!=null||X,$=_==null?null:typeof _==`string`?s(r,{name:_,size:18}):_;return V?null:c(a,{className:K,style:J,...e(`AppCard`,m),...W,...Y,children:[w!=null&&s(`div`,{className:`card-media`,children:w}),te&&c(a.Header,{className:M||void 0,children:[b??c(o,{children:[Q&&c(`div`,{className:`card-header-main`,children:[$!=null&&s(`span`,{className:`card-header-icon`,children:$}),c(`div`,{className:`card-header-titles`,children:[h!=null&&s(`div`,{className:[`card-title`,v].filter(Boolean).join(` `),style:y===`serif`?{fontFamily:`var(--wui-font-display)`}:void 0,children:h}),g!=null&&s(`div`,{className:`card-subtitle`,children:g})]})]}),x,S!=null&&s(`div`,{className:`card-header-actions`,children:S})]}),Z]}),ee?s(a.Body,{className:j||void 0,children:T}):T,C!=null&&s(`div`,{className:`card-footer`,children:C})]})}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{useState as i}from"react";import{Card as a}from"react-bootstrap";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`default`,`elevated`,`outlined`,`muted`,`accent`],u=[`primary`,`success`,`warning`,`danger`,`info`],d=[`none`,`sm`,`md`,`lg`],f=[`sans`,`serif`],p={xs:320,sm:420,md:560,lg:720};function m(m){let{marker:h,props:g}=e(`AppCard`,m),{title:_,subtitle:v,headerIcon:y,titleClassName:b=``,titleFont:x=`sans`,header:S,headerExtra:C,headerActions:w,footer:T,media:E,children:D,variant:O=`default`,tone:k=`primary`,padding:A=`md`,maxWidth:j,className:M=``,bodyClassName:ee=``,headerClassName:te=``,body:N=!0,lifted:P=!1,href:F,onClick:I,linkComponent:L,onClose:R,dismissible:z,closeLabel:B=`Close`,...V}=g,[H,U]=i(!1);n(`AppCard`,V),t(`AppCard`,`variant`,O,l),t(`AppCard`,`tone`,k,u),t(`AppCard`,`padding`,A,d),t(`AppCard`,`titleFont`,x,f);let{style:W,...G}=V,K=F!=null||I!=null,q=[O&&O!=="default"?`card-${O}`:``,O===`accent`&&k&&k!==`primary`?`tone-${k}`:``,A&&A!==`md`?`card-pad-${A}`:``,P?`card-lifted`:``,j==null?``:`card-constrained`,K?`card-clickable`:``,M].filter(Boolean).join(` `)||void 0,J=j==null?void 0:p[j]==null?typeof j==`number`?`${j}px`:j:`${p[j]}px`,Y=J?{"--card-max-width":J,...W}:W,X={};F==null?I!=null&&(X={role:`button`,tabIndex:0,onClick:I,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),I(e))}}):(X=L?{as:L,to:F}:{as:`a`,href:F},I&&(X.onClick=I));let Z=z??typeof R==`function`,ne=Z?s(`button`,{type:`button`,className:`card-close`,"aria-label":B,onClick:e=>{e.preventDefault(),e.stopPropagation(),U(!0),R?.()},onKeyDown:e=>e.stopPropagation(),children:s(r,{name:`x`,size:16})}):null,Q=_!=null||v!=null||y!=null,re=S!=null||Q||C!=null||w!=null||Z,$=y==null?null:typeof y==`string`?s(r,{name:y,size:18}):y;return H?null:c(a,{className:q,style:Y,...h,...G,...X,children:[E!=null&&s(`div`,{className:`card-media`,children:E}),re&&c(a.Header,{className:te||void 0,children:[S??c(o,{children:[Q&&c(`div`,{className:`card-header-main`,children:[$!=null&&s(`span`,{className:`card-header-icon`,children:$}),c(`div`,{className:`card-header-titles`,children:[_!=null&&s(`div`,{className:[`card-title`,b].filter(Boolean).join(` `),style:x===`serif`?{fontFamily:`var(--wui-font-display)`}:void 0,children:_}),v!=null&&s(`div`,{className:`card-subtitle`,children:v})]})]}),C,w!=null&&s(`div`,{className:`card-header-actions`,children:w})]}),ne]}),N?s(a.Body,{className:ee||void 0,children:D}):D,T!=null&&s(`div`,{className:`card-footer`,children:T})]})}export{m as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Children as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/carousel";function o(o){let{label:s,autoplay:c,loop:l=!1,perView:u,perViewMd:d,perViewLg:f,arrows:p=!0,dots:m=!0,previousLabel:h=`Previous slide`,nextLabel:g=`Next slide`,dotLabel:_=`Go to slide`,pauseLabel:v=`Pause`,playLabel:y=`Play`,className:b=``,children:x,style:S,...C}=o;t(`AppCarousel`,C);let w=Number(c)>0?Math.round(Number(c)):0,T={...u>1?{"--wui-carousel-per-view":u}:null,...d>=1?{"--wui-carousel-per-view-md":d}:null,...f>=1?{"--wui-carousel-per-view-lg":f}:null};return a(`wui-carousel`,{class:[`wui-carousel`,b].filter(Boolean).join(` `),role:`region`,"aria-roledescription":`carousel`,"aria-label":s,autoplay:w||void 0,loop:l?``:void 0,"dot-label":_===`Go to slide`?void 0:_,"pause-label":v===`Pause`?void 0:v,"play-label":y===`Play`?void 0:y,style:Object.keys(T).length||S?{...T,...S}:void 0,...e(`AppCarousel`,o),...C,children:[w?a(`button`,{type:`button`,className:`wui-carousel-pause`,children:[i(`span`,{className:`wui-carousel-pause-icon`,"aria-hidden":`true`}),i(`span`,{className:`wui-carousel-pause-text`,children:v})]}):null,a(`div`,{className:`wui-carousel-stage`,children:[p?i(`button`,{type:`button`,className:`wui-carousel-arrow wui-carousel-prev`,"aria-label":h,children:i(n,{name:`chevron-left`,size:20})}):null,i(`div`,{className:`wui-carousel-track`,tabIndex:0,role:`group`,"aria-label":s,children:r.map(r.toArray(x),e=>i(`div`,{className:`wui-carousel-slide`,role:`group`,"aria-roledescription":`slide`,children:e}))}),p?i(`button`,{type:`button`,className:`wui-carousel-arrow wui-carousel-next`,"aria-label":g,children:i(n,{name:`chevron-right`,size:20})}):null]}),m?i(`div`,{className:`wui-carousel-dots`}):null,i(`span`,{className:`visually-hidden`,"data-wui-status":``,"aria-live":`polite`,"aria-atomic":`true`})]})}export{o as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{Children as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/carousel";function o(o){let{marker:s,props:c}=e(`AppCarousel`,o),{label:l,autoplay:u,loop:d=!1,perView:f,perViewMd:p,perViewLg:m,arrows:h=!0,dots:g=!0,previousLabel:_=`Previous slide`,nextLabel:v=`Next slide`,dotLabel:y=`Go to slide`,pauseLabel:b=`Pause`,playLabel:x=`Play`,className:S=``,children:C,style:w,...T}=c;t(`AppCarousel`,T);let E=Number(u)>0?Math.round(Number(u)):0,D={...f>1?{"--wui-carousel-per-view":f}:null,...p>=1?{"--wui-carousel-per-view-md":p}:null,...m>=1?{"--wui-carousel-per-view-lg":m}:null};return a(`wui-carousel`,{class:[`wui-carousel`,S].filter(Boolean).join(` `),role:`region`,"aria-roledescription":`carousel`,"aria-label":l,autoplay:E||void 0,loop:d?``:void 0,"dot-label":y===`Go to slide`?void 0:y,"pause-label":b===`Pause`?void 0:b,"play-label":x===`Play`?void 0:x,style:Object.keys(D).length||w?{...D,...w}:void 0,...s,...T,children:[E?a(`button`,{type:`button`,className:`wui-carousel-pause`,children:[i(`span`,{className:`wui-carousel-pause-icon`,"aria-hidden":`true`}),i(`span`,{className:`wui-carousel-pause-text`,children:b})]}):null,a(`div`,{className:`wui-carousel-stage`,children:[h?i(`button`,{type:`button`,className:`wui-carousel-arrow wui-carousel-prev`,"aria-label":_,children:i(n,{name:`chevron-left`,size:20})}):null,i(`div`,{className:`wui-carousel-track`,tabIndex:0,role:`group`,"aria-label":l,children:r.map(r.toArray(C),e=>i(`div`,{className:`wui-carousel-slide`,role:`group`,"aria-roledescription":`slide`,children:e}))}),h?i(`button`,{type:`button`,className:`wui-carousel-arrow wui-carousel-next`,"aria-label":v,children:i(n,{name:`chevron-right`,size:20})}):null]}),g?i(`div`,{className:`wui-carousel-dots`}):null,i(`span`,{className:`visually-hidden`,"data-wui-status":``,"aria-live":`polite`,"aria-atomic":`true`})]})}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{forwardRef as i,useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import{jsx as u}from"react/jsx-runtime";var d=`wui-chart:select`,f=`wui-chart:legend-change`,p=`wui-chart:ready`,m=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],h=[`none`,`stacked`,`percent`],g=[`ready`,`loading`,`empty`,`error`],ee=[`auto`,`svg`,`canvas`],_=[`chart`,`table`],v=`This chart couldn't load. Try again in a moment.`,y=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},b=!1;function x(){b||!y()||(b=!0,t("[@webority/ui-react] <AppChart> has no `title`, which names the chart for assistive tech and its exported files."))}var S=e=>e===``?void 0:e,C=e=>Array.isArray(e)?e.map(C):e==null||Object.getPrototypeOf(e)!==Object.prototype?e:Object.fromEntries(Object.entries(e).filter(([,e])=>e!==``).map(([e,t])=>[e,C(t)])),w=e=>({type:S(e.type),title:S(e.title),description:S(e.description),data:e.data,x:C(e.x),series:C(e.series),group:C(e.group),to:C(e.to),size:C(e.size),trend:e.trend,zoom:e.zoom,bands:C(e.bands),stack:S(e.stack),y:C(e.y),target:C(e.target),height:e.height>0?e.height:void 0,state:S(e.state),emptyText:S(e.emptyText),errorText:S(e.errorText),renderer:S(e.renderer)}),T=(e,t)=>t!=null&&Object.keys(e).every(n=>Object.is(e[n],t[n])),E=e=>{try{return JSON.stringify(e)}catch{return null}},D=i(function(i,y){let{type:b,title:S,description:C,data:D,x:O,series:k,group:A,to:j,size:M,trend:N,zoom:P,bands:F,stack:I,y:L,target:R,height:z,state:B,emptyText:V,errorText:H,renderer:U,view:W,onSelect:G,onLegendChange:K,onReady:q,className:J=``,style:Y,...X}=i;r(`AppChart`,X),n(`AppChart`,`type`,b,m),n(`AppChart`,`stack`,I,h),n(`AppChart`,`state`,B,g),n(`AppChart`,`renderer`,U,ee),n(`AppChart`,`view`,W,_),S||x();let Z=c(null),Q=c({props:null,signature:null}),$=c({onSelect:G,onLegendChange:K,onReady:q}),[te,ne]=l(!1),re=a(e=>{Z.current=e,typeof y==`function`?y(e):y&&(y.current=e)},[y]);return o(()=>{$.current={onSelect:G,onLegendChange:K,onReady:q}}),s(()=>{let e=Z.current;if(!e)return;let t={type:b,title:S,description:C,data:D,x:O,series:k,group:A,to:j,size:M,trend:N,zoom:P,bands:F,stack:I,y:L,target:R,height:z,state:B,emptyText:V,errorText:H,renderer:U};if(T(t,Q.current.props))return;Q.current.props=t;let n=w(t),r=E(n);r!==null&&r===Q.current.signature||(Q.current.signature=r,e.spec=n)}),o(()=>{let e=Z.current,t=e=>t=>$.current[e]?.(t.detail),n=[[d,t(`onSelect`)],[f,t(`onLegendChange`)],[p,t(`onReady`)]];for(let[t,r]of n)e.addEventListener(t,r);return()=>{for(let[t,r]of n)e.removeEventListener(t,r)}},[]),o(()=>{let e=!0;return import(`@webority/ui-elements/chart`).catch(n=>{t(`[AppChart] the chart failed to load:`,n?.message),e&&ne(!0)}),()=>{e=!1}},[]),te?u(`div`,{...e(`AppChart`,i),className:J||void 0,style:Y,role:`status`,children:u(`p`,{className:`wui-chart-state-text`,children:H||v})}):u(`wui-chart`,{ref:re,view:W||void 0,className:J||void 0,style:Y,...e(`AppChart`,i),...X})});export{D 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{forwardRef as i,useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as ee}from"react";import{jsx as l}from"react/jsx-runtime";var u=`wui-chart:select`,d=`wui-chart:legend-change`,te=`wui-chart:ready`,f=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],ne=[`none`,`stacked`,`percent`],p=[`ready`,`loading`,`empty`,`error`],m=[`auto`,`svg`,`canvas`],h=[`chart`,`table`],g=`This chart couldn't load. Try again in a moment.`,_=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},v=!1;function y(){v||!_()||(v=!0,t("[@webority/ui-react] <AppChart> has no `title`, which names the chart for assistive tech and its exported files."))}var b=e=>e===``?void 0:e,x=e=>Array.isArray(e)?e.map(x):e==null||Object.getPrototypeOf(e)!==Object.prototype?e:Object.fromEntries(Object.entries(e).filter(([,e])=>e!==``).map(([e,t])=>[e,x(t)])),S=e=>({type:b(e.type),title:b(e.title),description:b(e.description),data:e.data,x:x(e.x),series:x(e.series),group:x(e.group),to:x(e.to),size:x(e.size),trend:e.trend,zoom:e.zoom,bands:x(e.bands),stack:b(e.stack),y:x(e.y),target:x(e.target),height:e.height>0?e.height:void 0,state:b(e.state),emptyText:b(e.emptyText),errorText:b(e.errorText),renderer:b(e.renderer)}),C=(e,t)=>t!=null&&Object.keys(e).every(n=>Object.is(e[n],t[n])),w=e=>{try{return JSON.stringify(e)}catch{return null}},T=i(function(i,_){let{marker:v,props:b}=e(`AppChart`,i),{type:x,title:T,description:E,data:D,x:O,series:k,group:A,to:j,size:M,trend:N,zoom:P,bands:F,stack:I,y:L,target:R,height:z,state:B,emptyText:V,errorText:H,renderer:U,view:W,onSelect:G,onLegendChange:K,onReady:q,className:J=``,style:Y,...X}=b;r(`AppChart`,X),n(`AppChart`,`type`,x,f),n(`AppChart`,`stack`,I,ne),n(`AppChart`,`state`,B,p),n(`AppChart`,`renderer`,U,m),n(`AppChart`,`view`,W,h),T||y();let Z=c(null),Q=c({props:null,signature:null}),$=c({onSelect:G,onLegendChange:K,onReady:q}),[re,ie]=ee(!1),ae=a(e=>{Z.current=e,typeof _==`function`?_(e):_&&(_.current=e)},[_]);return o(()=>{$.current={onSelect:G,onLegendChange:K,onReady:q}}),s(()=>{let e=Z.current;if(!e)return;let t={type:x,title:T,description:E,data:D,x:O,series:k,group:A,to:j,size:M,trend:N,zoom:P,bands:F,stack:I,y:L,target:R,height:z,state:B,emptyText:V,errorText:H,renderer:U};if(C(t,Q.current.props))return;Q.current.props=t;let n=S(t),r=w(n);r!==null&&r===Q.current.signature||(Q.current.signature=r,e.spec=n)}),o(()=>{let e=Z.current,t=e=>t=>$.current[e]?.(t.detail),n=[[u,t(`onSelect`)],[d,t(`onLegendChange`)],[te,t(`onReady`)]];for(let[t,r]of n)e.addEventListener(t,r);return()=>{for(let[t,r]of n)e.removeEventListener(t,r)}},[]),o(()=>{let e=!0;return import(`@webority/ui-elements/chart`).catch(n=>{t(`[AppChart] the chart failed to load:`,n?.message),e&&ie(!0)}),()=>{e=!1}},[]),re?l(`div`,{...v,className:J||void 0,style:Y,role:`status`,children:l(`p`,{className:`wui-chart-state-text`,children:H||g})}):l(`wui-chart`,{ref:ae,view:W||void 0,className:J||void 0,style:Y,...v,...X})});export{T 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 r from"./AppIcon.js";import i from"./AppButton.js";import a from"./AppCard.js";import o from"./AppDropdown.js";import s from"./AppSegmented.js";import{useLayoutEffect as c,useRef as l,useState as u}from"react";import{Dropdown as d}from"react-bootstrap";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";var h=[{value:`chart`,label:`Chart`,icon:`chart`},{value:`table`,label:`Table`,icon:`grid`}],g=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},_=!1;function v(){_||!g()||(_=!0,t("[@webority/ui-react] <AppChartCard> has no `title`, which is the card's heading and names its menu button."))}var y=e=>e.getAttribute(`view`)===`table`?`table`:`chart`;function b(t){let{title:g,subtitle:_,toolbar:b=!0,onRetry:x,footer:S,children:C,className:w=``,...T}=t;n(`AppChartCard`,T),g||v();let E=l(null),D=l(null),[O,k]=u(`chart`),A=l(O);A.current=O;let[j,M]=u(!0),N=()=>E.current?.querySelector(`wui-chart`);c(()=>{let e=E.current,t=()=>{let t=e.querySelector(`wui-chart`);if(t){if(t===D.current){k(y(t));return}D.current=t,t.hasAttribute(`view`)?k(y(t)):A.current!==`chart`&&t.setAttribute(`view`,A.current)}};t();let n=new MutationObserver(t);return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`view`]}),()=>n.disconnect()},[]);let P=m(f,{children:[p(`button`,{type:`button`,className:`topbar-icon-btn wui-chart-card-tool wui-chart-card-legend-tool`,"aria-pressed":j,"aria-label":`Show legend`,title:`Show or hide the legend`,onClick:()=>M(!j),children:p(r,{name:`list`,size:16})}),p(s,{size:`sm`,label:`View`,options:h,value:O,onChange:e=>{k(e),N()?.setAttribute(`view`,e)}}),m(o,{icon:`more-horizontal`,label:g?`More actions for ${g}`:`More actions`,children:[m(d.Item,{as:`button`,type:`button`,onClick:()=>N()?.exportPng?.(),children:[p(r,{name:`image`,size:16}),`Download PNG`]}),m(d.Item,{as:`button`,type:`button`,onClick:()=>N()?.exportCsv?.(),children:[p(r,{name:`download`,size:16}),`Download CSV`]})]})]}),F=[`wui-chart-card`,j?``:`wui-chart-card-legend-off`,w].filter(Boolean).join(` `);return m(a,{title:g,subtitle:_,headerActions:b?P:void 0,footer:S,className:F,...e(`AppChartCard`,t),...T,children:[p(`div`,{ref:E,children:C}),x&&p(`div`,{className:`wui-chart-card-retry`,children:p(i,{variant:`outline`,size:`sm`,onClick:x,children:`Try again`})})]})}export{b 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 r from"./AppIcon.js";import i from"./AppButton.js";import a from"./AppCard.js";import o from"./AppDropdown.js";import s from"./AppSegmented.js";import{useLayoutEffect as c,useRef as l,useState as u}from"react";import{Dropdown as d}from"react-bootstrap";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";var h=[{value:`chart`,label:`Chart`,icon:`chart`},{value:`table`,label:`Table`,icon:`grid`}],g=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},_=!1;function v(){_||!g()||(_=!0,t("[@webority/ui-react] <AppChartCard> has no `title`, which is the card's heading and names its menu button."))}var y=e=>e.getAttribute(`view`)===`table`?`table`:`chart`;function b(t){let{marker:g,props:_}=e(`AppChartCard`,t),{title:b,subtitle:x,toolbar:S=!0,onRetry:C,footer:w,children:T,className:E=``,...D}=_;n(`AppChartCard`,D),b||v();let O=l(null),k=l(null),[A,j]=u(`chart`),M=l(A);M.current=A;let[N,P]=u(!0),F=()=>O.current?.querySelector(`wui-chart`);c(()=>{let e=O.current,t=()=>{let t=e.querySelector(`wui-chart`);if(t){if(t===k.current){j(y(t));return}k.current=t,t.hasAttribute(`view`)?j(y(t)):M.current!==`chart`&&t.setAttribute(`view`,M.current)}};t();let n=new MutationObserver(t);return n.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`view`]}),()=>n.disconnect()},[]);let I=m(f,{children:[p(`button`,{type:`button`,className:`topbar-icon-btn wui-chart-card-tool wui-chart-card-legend-tool`,"aria-pressed":N,"aria-label":`Show legend`,title:`Show or hide the legend`,onClick:()=>P(!N),children:p(r,{name:`list`,size:16})}),p(s,{size:`sm`,label:`View`,options:h,value:A,onChange:e=>{j(e),F()?.setAttribute(`view`,e)}}),m(o,{icon:`more-horizontal`,label:b?`More actions for ${b}`:`More actions`,children:[m(d.Item,{as:`button`,type:`button`,onClick:()=>F()?.exportPng?.(),children:[p(r,{name:`image`,size:16}),`Download PNG`]}),m(d.Item,{as:`button`,type:`button`,onClick:()=>F()?.exportCsv?.(),children:[p(r,{name:`download`,size:16}),`Download CSV`]})]})]}),L=[`wui-chart-card`,N?``:`wui-chart-card-legend-off`,E].filter(Boolean).join(` `);return m(a,{title:b,subtitle:x,headerActions:S?I:void 0,footer:w,className:L,...g,...D,children:[p(`div`,{ref:O,children:T}),C&&p(`div`,{className:`wui-chart-card-retry`,children:p(i,{variant:`outline`,size:`sm`,onClick:C,children:`Try again`})})]})}export{b 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=[`circle`],s=i(function(i,s){let{label:c,id:l,name:u,error:d,hint:f,shape:p,className:m=``,...h}=i;n(`AppCheckbox`,h),t(`AppCheckbox`,`shape`,p,o);let g=p===`circle`?`form-check form-check-circle`:`form-check`;return a(r,{rootProps:e(`AppCheckbox`,i),ref:s,label:c,id:l,name:u,error:d,hint:f,className:m,rest:h,inputType:`checkbox`,wrapperClass:g})});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=[`circle`],s=i(function(i,s){let{marker:c,props:l}=e(`AppCheckbox`,i),{label:u,id:d,name:f,error:p,hint:m,shape:h,className:g=``,..._}=l;return n(`AppCheckbox`,_),t(`AppCheckbox`,`shape`,h,o),a(r,{rootProps:c,ref:s,label:u,id:d,name:f,error:p,hint:m,className:g,rest:_,inputType:`checkbox`,wrapperClass:h===`circle`?`form-check form-check-circle`:`form-check`})});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{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`],c=[`soft`,`outline`,`solid`],l=[`sm`,`md`];function u(u){let{label:d,children:f,tone:p=`neutral`,variant:m=`soft`,size:h=`md`,leadingIcon:g,avatar:_,onRemove:v,onClick:y,disabled:b=!1,removeLabel:x,className:S=``,...C}=u;n(`AppChip`,C),t(`AppChip`,`tone`,p,s),t(`AppChip`,`variant`,m,c),t(`AppChip`,`size`,h,l);let w=d??f,T={},E={};for(let[e,t]of Object.entries(C))y&&(e.startsWith(`aria-`)||e.startsWith(`data-`))?T[e]=t:E[e]=t;let D=[`chip`,p&&p!==`neutral`?p:``,m===`outline`?`chip-outline`:m===`solid`?`chip-solid`:``,h===`sm`?`chip-sm`:``,y?`chip-clickable`:``,v?`chip-removable`:``,b?`is-disabled`:``,S].filter(Boolean).join(` `),O=_?a(`span`,{className:`chip-avatar`,children:typeof _==`string`?a(`img`,{src:_,alt:``}):_}):g?a(`span`,{className:`chip-ic`,children:a(r,{name:g,size:h===`sm`?12:14})}):null,k=y?o(`button`,{type:`button`,className:`chip-body`,...T,onClick:y,disabled:b,children:[O,a(`span`,{className:`chip-label`,children:w})]}):o(i,{children:[O,a(`span`,{className:`chip-label`,children:w})]});return o(`span`,{className:D,...e(`AppChip`,u),...E,children:[k,v&&a(`button`,{type:`button`,className:`chip-remove`,onClick:v,disabled:b,"aria-label":x||(typeof w==`string`?`Remove ${w}`:`Remove`),children:a(r,{name:`x`,size:h===`sm`?12:14})})]})}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{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`],c=[`soft`,`outline`,`solid`],l=[`sm`,`md`];function u(u){let{marker:d,props:f}=e(`AppChip`,u),{label:p,children:m,tone:h=`neutral`,variant:g=`soft`,size:_=`md`,leadingIcon:v,avatar:y,onRemove:b,onClick:x,disabled:S=!1,removeLabel:C,className:w=``,...T}=f;n(`AppChip`,T),t(`AppChip`,`tone`,h,s),t(`AppChip`,`variant`,g,c),t(`AppChip`,`size`,_,l);let E=p??m,D={},O={};for(let[e,t]of Object.entries(T))x&&(e.startsWith(`aria-`)||e.startsWith(`data-`))?D[e]=t:O[e]=t;let k=[`chip`,h&&h!==`neutral`?h:``,g===`outline`?`chip-outline`:g===`solid`?`chip-solid`:``,_===`sm`?`chip-sm`:``,x?`chip-clickable`:``,b?`chip-removable`:``,S?`is-disabled`:``,w].filter(Boolean).join(` `),A=y?a(`span`,{className:`chip-avatar`,children:typeof y==`string`?a(`img`,{src:y,alt:``}):y}):v?a(`span`,{className:`chip-ic`,children:a(r,{name:v,size:_===`sm`?12:14})}):null,j=x?o(`button`,{type:`button`,className:`chip-body`,...D,onClick:x,disabled:S,children:[A,a(`span`,{className:`chip-label`,children:E})]}):o(i,{children:[A,a(`span`,{className:`chip-label`,children:E})]});return o(`span`,{className:k,...d,...O,children:[j,b&&a(`button`,{type:`button`,className:`chip-remove`,onClick:b,disabled:S,"aria-label":C||(typeof E==`string`?`Remove ${E}`:`Remove`),children:a(r,{name:`x`,size:_===`sm`?12:14})})]})}export{u 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";import"@webority/ui-elements/elements/overflow";var i=[`wrap`,`menu`];function a(a){let{children:o,overflow:s=`wrap`,moreLabel:c=`More`,label:l,className:u=``,"data-canvas":d,...f}=a;n(`AppChipGroup`,f),t(`AppChipGroup`,`overflow`,s,i);let p=e=>[e,u].filter(Boolean).join(` `);return s===`menu`?r(`wui-overflow`,{...e(`AppChipGroup`,a),class:`wui-chip-group-host`,label:c,children:r(`div`,{role:`group`,"aria-label":l,className:p(`wui-chip-group wui-chip-group-nowrap`),"data-wui-overflow-list":``,...f,children:o})}):r(`div`,{role:`group`,"aria-label":l,className:p(`wui-chip-group`),...e(`AppChipGroup`,a),...f,children:o})}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";import"@webority/ui-elements/elements/overflow";var i=[`wrap`,`menu`];function a(a){let{marker:o,props:s}=e(`AppChipGroup`,a),{children:c,overflow:l=`wrap`,moreLabel:u=`More`,label:d,className:f=``,...p}=s;n(`AppChipGroup`,p),t(`AppChipGroup`,`overflow`,l,i);let m=e=>[e,f].filter(Boolean).join(` `);return l===`menu`?r(`wui-overflow`,{...o,class:`wui-chip-group-host`,label:u,children:r(`div`,{role:`group`,"aria-label":d,className:m(`wui-chip-group wui-chip-group-nowrap`),"data-wui-overflow-list":``,...p,children:c})}):r(`div`,{role:`group`,"aria-label":d,className:m(`wui-chip-group`),...o,...p,children:c})}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 r from"./AppIcon.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s={sm:` wui-struct-card-sm`,md:``,lg:` wui-struct-card-lg`},c={inline:``,stacked:` wui-struct-card-stacked`},l={filled:` wui-struct-card-filled`},u={sm:16,md:18,lg:22};function d(d){let{name:f,multiple:p=!1,value:m,checked:h,onChange:g,icon:_,iconNode:v,iconSize:y,image:b,imageAlt:x=``,children:S,title:C,description:w,checkIcon:T=`check`,checkSize:E=18,hideCheck:D=!1,disabled:O=!1,size:k=`md`,layout:A=`inline`,selectedStyle:j,className:M=``,...N}=d;n(`AppChoiceCard`,N),t(`AppChoiceCard`,`size`,k,Object.keys(s)),t(`AppChoiceCard`,`layout`,A,Object.keys(c)),t(`AppChoiceCard`,`selectedStyle`,j,Object.keys(l));let P=s[k]??``,F=c[A]??``,I=l[j]??``,L=y??u[k]??u.md;return o(`label`,{className:`struct-card${b?` struct-card-img-card`:``}${P}${F}${I}${D?` wui-struct-card-no-check`:``}${M?` ${M}`:``}`,"aria-disabled":O||void 0,...e(`AppChoiceCard`,d),...N,children:[a(`input`,{type:p?`checkbox`:`radio`,name:f,value:m,className:`struct-card-input`,checked:h,onChange:g,disabled:O}),b?a(`span`,{className:`struct-card-media`,children:a(`img`,{className:`struct-card-img`,src:b,alt:x})}):v||_?a(`span`,{className:`struct-card-ic`,children:v||o(i,{children:[a(`span`,{className:`wui-struct-card-glyph`,children:a(r,{name:_,size:L})}),a(`span`,{className:`wui-struct-card-glyph-on`,children:a(r,{name:_,size:L,variant:`bold`})})]})}):null,a(`span`,{className:`struct-card-body`,children:S||o(i,{children:[C&&a(`span`,{className:`struct-card-title`,children:C}),w&&a(`span`,{className:`struct-card-desc`,children:w})]})}),!D&&a(`span`,{className:`struct-card-check`,children:a(r,{name:T,size:E})})]})}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{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s={sm:` wui-struct-card-sm`,md:``,lg:` wui-struct-card-lg`},c={inline:``,stacked:` wui-struct-card-stacked`},l={filled:` wui-struct-card-filled`},u={sm:16,md:18,lg:22};function d(d){let{marker:f,props:p}=e(`AppChoiceCard`,d),{name:m,multiple:h=!1,value:g,checked:_,onChange:v,icon:y,iconNode:b,iconSize:x,image:S,imageAlt:C=``,children:w,title:T,description:E,checkIcon:D=`check`,checkSize:O=18,hideCheck:k=!1,disabled:A=!1,size:j=`md`,layout:M=`inline`,selectedStyle:N,className:P=``,...F}=p;n(`AppChoiceCard`,F),t(`AppChoiceCard`,`size`,j,Object.keys(s)),t(`AppChoiceCard`,`layout`,M,Object.keys(c)),t(`AppChoiceCard`,`selectedStyle`,N,Object.keys(l));let I=s[j]??``,L=c[M]??``,R=l[N]??``,z=x??u[j]??u.md;return o(`label`,{className:`struct-card${S?` struct-card-img-card`:``}${I}${L}${R}${k?` wui-struct-card-no-check`:``}${P?` ${P}`:``}`,"aria-disabled":A||void 0,...f,...F,children:[a(`input`,{type:h?`checkbox`:`radio`,name:m,value:g,className:`struct-card-input`,checked:_,onChange:v,disabled:A}),S?a(`span`,{className:`struct-card-media`,children:a(`img`,{className:`struct-card-img`,src:S,alt:C})}):b||y?a(`span`,{className:`struct-card-ic`,children:b||o(i,{children:[a(`span`,{className:`wui-struct-card-glyph`,children:a(r,{name:y,size:z})}),a(`span`,{className:`wui-struct-card-glyph-on`,children:a(r,{name:y,size:z,variant:`bold`})})]})}):null,a(`span`,{className:`struct-card-body`,children:w||o(i,{children:[T&&a(`span`,{className:`struct-card-title`,children:T}),E&&a(`span`,{className:`struct-card-desc`,children:E})]})}),!k&&a(`span`,{className:`struct-card-check`,children:a(r,{name:D,size:O})})]})}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,jsxs as i}from"react/jsx-runtime";var a=[`sm`,`md`,`lg`],o=[`soft`,`solid`];function s(s){let{multiple:c=!0,label:l,name:u,value:d,checked:f,onChange:p,children:m,count:h,size:g=`md`,variant:_=`soft`,disabled:v=!1,className:y=``,...b}=s;return n(`AppChoiceChip`,b),t(`AppChoiceChip`,`size`,g,a),t(`AppChoiceChip`,`variant`,_,o),i(`label`,{className:`choice-chip${f?` checked`:``}${g===`sm`?` choice-chip-sm`:g===`lg`?` choice-chip-lg`:``}${_===`solid`?` wui-choice-chip-solid`:``}${y?` ${y}`:``}`,...e(`AppChoiceChip`,s),...b,children:[r(`input`,{type:c?`checkbox`:`radio`,name:u,value:d,checked:f,disabled:v,onChange:p}),r(`span`,{children:l??m}),h!=null&&r(`span`,{className:`count`,children:h})]})}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=[`sm`,`md`,`lg`],o=[`soft`,`solid`];function s(s){let{marker:c,props:l}=e(`AppChoiceChip`,s),{multiple:u=!0,label:d,name:f,value:p,checked:m,onChange:h,children:g,count:_,size:v=`md`,variant:y=`soft`,disabled:b=!1,className:x=``,...S}=l;return n(`AppChoiceChip`,S),t(`AppChoiceChip`,`size`,v,a),t(`AppChoiceChip`,`variant`,y,o),i(`label`,{className:`choice-chip${m?` checked`:``}${v===`sm`?` choice-chip-sm`:v===`lg`?` choice-chip-lg`:``}${y===`solid`?` wui-choice-chip-solid`:``}${x?` ${x}`:``}`,...c,...S,children:[r(`input`,{type:u?`checkbox`:`radio`,name:f,value:p,checked:m,disabled:b,onChange:h}),r(`span`,{children:d??g}),_!=null&&r(`span`,{className:`count`,children:_})]})}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{jsx as r}from"react/jsx-runtime";import"@webority/ui-elements/elements/code-block";var i=[`text`,`json`,`js`,`cs`,`sql`,`bash`,`http`,`html`,`css`];function a(a){let{code:o,language:s=`text`,lineNumbers:c=!1,wrap:l=!1,label:u,copyLabel:d,copiedLabel:f,className:p=``,...m}=a;return n(`AppCodeBlock`,m),t(`AppCodeBlock`,`language`,s,i),r(`wui-code-block`,{class:[`wui-code-block`,p].filter(Boolean).join(` `),language:s===`text`?void 0:s,"line-numbers":c?``:void 0,wrap:l?``:void 0,label:u||void 0,"copy-label":d||void 0,"copied-label":f||void 0,...e(`AppCodeBlock`,a),...m,children:r(`pre`,{className:`wui-code-source`,children:r(`code`,{children:o??``})})})}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";import"@webority/ui-elements/elements/code-block";var i=[`text`,`json`,`js`,`cs`,`sql`,`bash`,`http`,`html`,`css`];function a(a){let{marker:o,props:s}=e(`AppCodeBlock`,a),{code:c,language:l=`text`,lineNumbers:u=!1,wrap:d=!1,label:f,copyLabel:p,copiedLabel:m,className:h=``,...g}=s;return n(`AppCodeBlock`,g),t(`AppCodeBlock`,`language`,l,i),r(`wui-code-block`,{class:[`wui-code-block`,h].filter(Boolean).join(` `),language:l===`text`?void 0:l,"line-numbers":u?``:void 0,wrap:d?``:void 0,label:f||void 0,"copy-label":p||void 0,"copied-label":m||void 0,...o,...g,children:r(`pre`,{className:`wui-code-source`,children:r(`code`,{children:c??``})})})}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 r from"../lib/FieldMessage.js";import i from"./AppRequiredMark.js";import{useId as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`sm`,`md`,`lg`];function l(l){let{value:u=`#000000`,onChange:d,label:f,required:p=!1,error:m,hint:h,name:g,id:_,disabled:v=!1,size:y=`md`,className:b=``,fieldClassName:x=``,"data-canvas":S,...C}=l;n(`AppColorField`,C),t(`AppColorField`,`size`,y,c);let w=a(),T=_||w,E=m?`${T}-error`:h?`${T}-hint`:void 0,D=e=>/^#[0-9a-f]{6}$/i.test(e),O=y===`sm`?` color-field-sm`:y===`lg`?` color-field-lg`:``,k=y===`sm`?` input-sm`:y===`lg`?` input-lg`:``;return s(`div`,{...e(`AppColorField`,l),className:`field${x?` ${x}`:``}`,children:[f&&s(`label`,{className:`label`,htmlFor:T,children:[f,p&&o(i,{})]}),s(`div`,{className:`color-field${O}`,children:[o(`input`,{type:`color`,className:`color-field-swatch`,value:D(u)?u:`#000000`,onChange:e=>d?.(e.target.value),disabled:v,"aria-label":`${f||`Colour`}, colour picker`,tabIndex:-1}),o(`input`,{type:`text`,className:`input color-field-hex${k}${m?` error`:``}${b?` ${b}`:``}`,id:T,name:g,value:u,onChange:e=>d?.(e.target.value),placeholder:`#4F46E5`,spellCheck:!1,maxLength:7,required:p,disabled:v,"aria-invalid":m?`true`:`false`,"aria-describedby":E,...C})]}),o(r,{error:m,hint:h,errorId:`${T}-error`,hintId:`${T}-hint`})]})}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 from"../lib/FieldMessage.js";import i from"./AppRequiredMark.js";import{useId as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`sm`,`md`,`lg`];function l(l){let{marker:u,props:d}=e(`AppColorField`,l),{value:f=`#000000`,onChange:p,label:m,required:h=!1,error:g,hint:_,name:v,id:y,disabled:b=!1,size:x=`md`,className:S=``,fieldClassName:C=``,...w}=d;n(`AppColorField`,w),t(`AppColorField`,`size`,x,c);let T=a(),E=y||T,D=g?`${E}-error`:_?`${E}-hint`:void 0,O=e=>/^#[0-9a-f]{6}$/i.test(e),k=x===`sm`?` color-field-sm`:x===`lg`?` color-field-lg`:``,A=x===`sm`?` input-sm`:x===`lg`?` input-lg`:``;return s(`div`,{...u,className:`field${C?` ${C}`:``}`,children:[m&&s(`label`,{className:`label`,htmlFor:E,children:[m,h&&o(i,{})]}),s(`div`,{className:`color-field${k}`,children:[o(`input`,{type:`color`,className:`color-field-swatch`,value:O(f)?f:`#000000`,onChange:e=>p?.(e.target.value),disabled:b,"aria-label":`${m||`Colour`}, colour picker`,tabIndex:-1}),o(`input`,{type:`text`,className:`input color-field-hex${A}${g?` error`:``}${S?` ${S}`:``}`,id:E,name:v,value:f,onChange:e=>p?.(e.target.value),placeholder:`#4F46E5`,spellCheck:!1,maxLength:7,required:h,disabled:b,"aria-invalid":g?`true`:`false`,"aria-describedby":D,...w})]}),o(r,{error:g,hint:_,errorId:`${E}-error`,hintId:`${E}-hint`})]})}export{l as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppDropdown.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{columns:o,hiddenColumns:s=[],onToggle:c,label:l=`Columns`,className:u=``,...d}=a;t(`AppColumnMenu`,d);let f=o.filter(e=>e.hideable);return i(n,{icon:`layout-grid`,label:l,menuClassName:`wui-column-menu${u?` ${u}`:``}`,...e(`AppColumnMenu`,a),children:[r(`div`,{className:`wui-column-menu-title`,children:l}),f.map(e=>i(`label`,{className:`wui-column-menu-item`,children:[r(`input`,{type:`checkbox`,className:`wui-check`,checked:!s.includes(e.key),onChange:()=>c(e.key)}),e.label]},e.key))]})}export{a as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppDropdown.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{marker:o,props:s}=e(`AppColumnMenu`,a),{columns:c,hiddenColumns:l=[],onToggle:u,label:d=`Columns`,className:f=``,...p}=s;t(`AppColumnMenu`,p);let m=c.filter(e=>e.hideable);return i(n,{icon:`layout-grid`,label:d,menuClassName:`wui-column-menu${f?` ${f}`:``}`,...o,children:[r(`div`,{className:`wui-column-menu-title`,children:d}),m.map(e=>i(`label`,{className:`wui-column-menu-item`,children:[r(`input`,{type:`checkbox`,className:`wui-check`,checked:!l.includes(e.key),onChange:()=>u(e.key)}),e.label]},e.key))]})}export{a as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{shortcutAria as n,shortcutChip as r}from"../lib/shortcutChip.js";import i from"./AppIcon.js";import a from"./renderIconProp.js";import o from"./AppModal.js";import s from"./AppSpinner.js";import{matchSegments as c}from"@webority/ui-elements/helpers";import{Fragment as l,useEffect as u,useId as d,useLayoutEffect as f,useRef as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import"@webority/ui-elements/elements/command-palette";var g=`lg`;function _(n){let{open:r,onClose:i,query:a=``,onQueryChange:s,placeholder:c=`Search…`,groups:l=[],path:u=[],onPathChange:f,rootLabel:p,backLabel:h=`Back`,recentsKey:_,recentsLimit:y,recentsLabel:b,loading:x=!1,emptyText:S=`No results`,footer:C,ariaLabel:w=`Search`,highlight:T=!0,id:E,className:D=``,"data-canvas":O,...k}=n;t(`AppCommandPalette`,k);let A=d(),j=E||A;return m(o,{...e(`AppCommandPalette`,n),open:r,onClose:i,hideHeader:!0,placement:`top`,size:g,ariaLabel:w,className:`wui-cmd-card${D?` ${D}`:``}`,children:m(v,{baseId:j,query:a,onQueryChange:s,placeholder:c,groups:l,path:u,onPathChange:f,rootLabel:p,backLabel:h,recentsKey:_,recentsLimit:y,recentsLabel:b,loading:x,emptyText:S,footer:C,ariaLabel:w,highlight:T,onClose:i,rest:k})})}function v({baseId:e,query:t,onQueryChange:o,placeholder:c,groups:l,path:d,onPathChange:g,rootLabel:_,backLabel:v,recentsKey:x,recentsLimit:S,recentsLabel:C,loading:w,emptyText:T,footer:E,ariaLabel:D,highlight:O,onClose:k,rest:A}){let j=p(null),M=`${e}-list`,N=l.filter(e=>e.items?.length),P=!w&&t.trim()!==``&&N.length===0;return f(()=>{j.current?.refresh?.()}),u(()=>{let e=j.current,t=e=>{let t=l.find(t=>String(t.key)===e.detail.groupKey)?.items?.find(t=>String(t.key)===e.detail.key);if(t){if(e.preventDefault(),t.page){o?.(``),g?.([...d,{key:t.page.key,label:t.page.label}]);return}t.onSelect?.(),k?.()}},n=e=>{e.preventDefault(),o?.(``),g?.(e.detail.path)};return e.addEventListener(`wui-command-palette:select`,t),e.addEventListener(`wui-command-palette:navigate`,n),()=>{e.removeEventListener(`wui-command-palette:select`,t),e.removeEventListener(`wui-command-palette:navigate`,n)}},[l,d,k,o,g]),h(`wui-command-palette`,{ref:j,path:JSON.stringify(d),"root-label":_,"recents-key":x,"recents-limit":S,"recents-label":C,...A,children:[h(`div`,{className:`wui-cmd-search`,children:[m(`span`,{className:`wui-cmd-search-icon`,"aria-hidden":`true`,children:m(i,{name:`search`,size:18})}),m(`input`,{className:`wui-cmd-input`,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":M,"aria-autocomplete":`list`,"aria-label":D,placeholder:c,autoComplete:`off`,spellCheck:!1,"data-autofocus":``,value:t,onChange:e=>o?.(e.target.value)}),w&&m(s,{size:`sm`,className:`wui-cmd-spinner`})]}),h(`div`,{className:`wui-cmd-crumbs`,hidden:!0,children:[m(`button`,{type:`button`,className:`wui-cmd-back`,"aria-label":v,children:m(i,{name:`chevron-left`,size:16})}),m(`ol`,{className:`wui-cmd-trail`})]}),h(`div`,{className:`wui-cmd-list`,role:`listbox`,id:M,"aria-label":`Results`,"aria-busy":w?`true`:void 0,hidden:N.length===0,children:[m(`div`,{className:`wui-cmd-recents`}),N.map(o=>{let s=`${e}-${b(o.key)}`;return h(`div`,{className:`wui-cmd-group`,role:`group`,"aria-labelledby":s,children:[m(`div`,{className:`wui-cmd-group-label`,role:`presentation`,id:s,children:o.label}),o.items.map(e=>{let c=`${s}-${b(e.key)}`,l=e.description==null?null:`${c}-desc`,u=e.meta==null?null:`${c}-meta`;return h(`div`,{className:`wui-cmd-item`,role:`option`,id:c,"data-group-key":String(o.key),"data-key":String(e.key),"data-opens":e.page?String(e.page.key):void 0,"aria-label":e.ariaLabel||(typeof e.label==`string`?e.label:``)||void 0,"aria-describedby":[l,u].filter(Boolean).join(` `)||void 0,"aria-disabled":e.disabled?`true`:void 0,"aria-keyshortcuts":n(e.shortcut),children:[e.icon!=null&&m(`span`,{className:`wui-cmd-item-icon`,"aria-hidden":`true`,children:a(e.icon,{size:18})}),h(`span`,{className:`wui-cmd-item-text`,children:[m(`span`,{className:`wui-cmd-item-label`,children:O?y(e.label,t):e.label}),l&&m(`span`,{className:`wui-cmd-item-desc`,id:l,children:e.description})]}),u&&m(`span`,{className:`wui-cmd-item-meta`,id:u,children:e.meta}),r(e.shortcut),e.page&&m(`span`,{className:`wui-cmd-item-chevron`,"aria-hidden":`true`,children:m(i,{name:`chevron-right`,size:16})})]},e.key)})]},o.key)})]}),m(`div`,{className:`wui-cmd-empty`,role:`status`,children:P?T:null}),E!=null&&m(`div`,{className:`wui-cmd-footer`,children:E})]})}function y(e,t){if(typeof e!=`string`)return e;let n=c(e,t);if(n.length===1&&!n[0].match)return e;let r=0;return n.map(e=>{let t=r;return r+=e.text.length,e.match?m(`mark`,{className:`wui-cmd-mark`,children:e.text},t):m(l,{children:e.text},t)})}function b(e){return String(e).replace(/\s+/g,`_`)}export{_ as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{shortcutAria as n,shortcutChip as r}from"../lib/shortcutChip.js";import i from"./AppIcon.js";import a from"./renderIconProp.js";import o from"./AppModal.js";import s from"./AppSpinner.js";import{matchSegments as c}from"@webority/ui-elements/helpers";import{Fragment as l,useEffect as u,useId as d,useLayoutEffect as f,useRef as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import"@webority/ui-elements/elements/command-palette";var g=`lg`;function _(n){let{marker:r,props:i}=e(`AppCommandPalette`,n),{open:a,onClose:s,query:c=``,onQueryChange:l,placeholder:u=`Search…`,groups:f=[],path:p=[],onPathChange:h,rootLabel:_,backLabel:y=`Back`,recentsKey:b,recentsLimit:x,recentsLabel:S,loading:C=!1,emptyText:w=`No results`,footer:T,ariaLabel:E=`Search`,highlight:D=!0,id:O,className:k=``,...A}=i;t(`AppCommandPalette`,A);let j=d(),M=O||j;return m(o,{...r,open:a,onClose:s,hideHeader:!0,placement:`top`,size:g,ariaLabel:E,className:`wui-cmd-card${k?` ${k}`:``}`,children:m(v,{baseId:M,query:c,onQueryChange:l,placeholder:u,groups:f,path:p,onPathChange:h,rootLabel:_,backLabel:y,recentsKey:b,recentsLimit:x,recentsLabel:S,loading:C,emptyText:w,footer:T,ariaLabel:E,highlight:D,onClose:s,rest:A})})}function v({baseId:e,query:t,onQueryChange:o,placeholder:c,groups:l,path:d,onPathChange:g,rootLabel:_,backLabel:v,recentsKey:x,recentsLimit:S,recentsLabel:C,loading:w,emptyText:T,footer:E,ariaLabel:D,highlight:O,onClose:k,rest:A}){let j=p(null),M=`${e}-list`,N=l.filter(e=>e.items?.length),P=!w&&t.trim()!==``&&N.length===0;return f(()=>{j.current?.refresh?.()}),u(()=>{let e=j.current,t=e=>{let t=l.find(t=>String(t.key)===e.detail.groupKey)?.items?.find(t=>String(t.key)===e.detail.key);if(t){if(e.preventDefault(),t.page){o?.(``),g?.([...d,{key:t.page.key,label:t.page.label}]);return}t.onSelect?.(),k?.()}},n=e=>{e.preventDefault(),o?.(``),g?.(e.detail.path)};return e.addEventListener(`wui-command-palette:select`,t),e.addEventListener(`wui-command-palette:navigate`,n),()=>{e.removeEventListener(`wui-command-palette:select`,t),e.removeEventListener(`wui-command-palette:navigate`,n)}},[l,d,k,o,g]),h(`wui-command-palette`,{ref:j,path:JSON.stringify(d),"root-label":_,"recents-key":x,"recents-limit":S,"recents-label":C,...A,children:[h(`div`,{className:`wui-cmd-search`,children:[m(`span`,{className:`wui-cmd-search-icon`,"aria-hidden":`true`,children:m(i,{name:`search`,size:18})}),m(`input`,{className:`wui-cmd-input`,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":M,"aria-autocomplete":`list`,"aria-label":D,placeholder:c,autoComplete:`off`,spellCheck:!1,"data-autofocus":``,value:t,onChange:e=>o?.(e.target.value)}),w&&m(s,{size:`sm`,className:`wui-cmd-spinner`})]}),h(`div`,{className:`wui-cmd-crumbs`,hidden:!0,children:[m(`button`,{type:`button`,className:`wui-cmd-back`,"aria-label":v,children:m(i,{name:`chevron-left`,size:16})}),m(`ol`,{className:`wui-cmd-trail`})]}),h(`div`,{className:`wui-cmd-list`,role:`listbox`,id:M,"aria-label":`Results`,"aria-busy":w?`true`:void 0,hidden:N.length===0,children:[m(`div`,{className:`wui-cmd-recents`}),N.map(o=>{let s=`${e}-${b(o.key)}`;return h(`div`,{className:`wui-cmd-group`,role:`group`,"aria-labelledby":s,children:[m(`div`,{className:`wui-cmd-group-label`,role:`presentation`,id:s,children:o.label}),o.items.map(e=>{let c=`${s}-${b(e.key)}`,l=e.description==null?null:`${c}-desc`,u=e.meta==null?null:`${c}-meta`;return h(`div`,{className:`wui-cmd-item`,role:`option`,id:c,"data-group-key":String(o.key),"data-key":String(e.key),"data-opens":e.page?String(e.page.key):void 0,"aria-label":e.ariaLabel||(typeof e.label==`string`?e.label:``)||void 0,"aria-describedby":[l,u].filter(Boolean).join(` `)||void 0,"aria-disabled":e.disabled?`true`:void 0,"aria-keyshortcuts":n(e.shortcut),children:[e.icon!=null&&m(`span`,{className:`wui-cmd-item-icon`,"aria-hidden":`true`,children:a(e.icon,{size:18})}),h(`span`,{className:`wui-cmd-item-text`,children:[m(`span`,{className:`wui-cmd-item-label`,children:O?y(e.label,t):e.label}),l&&m(`span`,{className:`wui-cmd-item-desc`,id:l,children:e.description})]}),u&&m(`span`,{className:`wui-cmd-item-meta`,id:u,children:e.meta}),r(e.shortcut),e.page&&m(`span`,{className:`wui-cmd-item-chevron`,"aria-hidden":`true`,children:m(i,{name:`chevron-right`,size:16})})]},e.key)})]},o.key)})]}),m(`div`,{className:`wui-cmd-empty`,role:`status`,children:P?T:null}),E!=null&&m(`div`,{className:`wui-cmd-footer`,children:E})]})}function y(e,t){if(typeof e!=`string`)return e;let n=c(e,t);if(n.length===1&&!n[0].match)return e;let r=0;return n.map(e=>{let t=r;return r+=e.text.length,e.match?m(`mark`,{className:`wui-cmd-mark`,children:e.text},t):m(l,{children:e.text},t)})}function b(e){return String(e).replace(/\s+/g,`_`)}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 r from"./AppIcon.js";import{initialsOf as i}from"../lib/initials.js";import a from"./AppAvatar.js";import{parseMentionValue as o}from"@webority/ui-elements/elements/mention-input";import{formatDate as s,formatNumber as c,toInstant as l}from"@webority/ui-elements/helpers";import{Fragment as u,useEffect as d,useId as f,useRef as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{COMMENT_REACTIONS as g,COMMENT_TEXT as _}from"@webority/ui-elements/elements/comment-thread";var v=[`stacked`,`inline`];function y(r){let{comments:i=[],onPost:o,onReply:s,onEdit:c,onDelete:l,onReact:u,people:y,loadPeople:x,reactionChoices:S,allowReplies:C=!0,allowReactions:w=!0,composerPlaceholder:T,composer:E=`stacked`,author:D,postLabel:O=_.post,composerRows:k,readOnly:A=!1,label:j=_.listName,id:M,className:N=``,...P}=r;n(`AppCommentThread`,P),t(`AppCommentThread`,`composer`,E,v);let F=f(),I=M||`comment-thread-${F.replace(/[^a-zA-Z0-9_-]/g,``)}`,L=p(null),R=typeof x==`function`,z=S?.length?S:g,B=E===`inline`,V=k??(B?1:3),H=p(null);return H.current={onPost:o,onReply:s,onEdit:c,onDelete:l,onReact:u,loadPeople:x},d(()=>{let e=L.current;if(e)return e.submit=async({intent:e,commentId:t,parentId:n,body:r,emoji:i})=>{let a=H.current;e===`post`?await a.onPost?.(r):e===`reply`?await a.onReply?.(n,r):e===`edit`?await a.onEdit?.(t,r):e===`delete`?await a.onDelete?.(t):e===`react`&&await a.onReact?.(t,i)},()=>{e.submit=void 0}},[]),d(()=>{let e=L.current;!e||R||(e.people=y||[])},[y,R]),d(()=>{let e=L.current;if(!e||!R)return;let t=new WeakMap,n=async e=>{let n=e.target,r=(t.get(n)??0)+1;t.set(n,r),n.loading=!0;try{let i=await H.current.loadPeople(e.detail.query);t.get(n)===r&&(n.people=i||[])}catch{t.get(n)===r&&(n.people=[])}finally{t.get(n)===r&&(n.loading=!1)}};return e.addEventListener(`search`,n),()=>e.removeEventListener(`search`,n)},[R]),h(`wui-comment-thread`,{ref:L,id:I,class:N?`wui-comment-thread ${N}`:`wui-comment-thread`,controlled:``,"read-only":A?``:void 0,remote:R?``:void 0,"reaction-choices":S?.length?S.join(` `):void 0,"no-replies":C?void 0:``,"no-reactions":w?void 0:``,"composer-placeholder":T,...e(`AppCommentThread`,r),...P,children:[m(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:i.length?m(`ol`,{className:`wui-comment-list`,"aria-label":j,children:i.map(e=>m(b,{comment:e,topLevel:!0,readOnly:A,allowReplies:C,allowReactions:w},e.id))}):m(`p`,{className:`wui-comment-empty`,children:_.empty})}),!A&&w&&m(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":_.pickerName,"data-wui-picker":``,hidden:!0,children:z.map(e=>m(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!A&&h(`div`,{className:B?`wui-comment-composer wui-comment-composer-inline`:`wui-comment-composer`,"data-wui-composer":``,children:[B&&D?m(a,{name:D,size:`sm`,tone:`auto`,className:`wui-comment-composer-avatar`}):null,m(`wui-mention-input`,{id:`${I}-new`,class:`wui-mention-input`,label:_.composerLabel,placeholder:T??_.composerPlaceholder,rows:String(V),remote:R?``:void 0}),m(`div`,{className:`wui-comment-form-actions`,children:m(`button`,{type:`button`,className:B?`btn btn-outline-primary btn-sm`:`btn btn-primary btn-sm`,"data-wui-action":`post`,children:O})}),m(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]}),m(`span`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}function b({comment:e,topLevel:t=!1,readOnly:n,allowReplies:a,allowReactions:d}){let{id:f,author:p,at:g,value:v,edited:y,deleted:x,canEdit:S,canDelete:C,reactions:w=[],replies:T=[]}=e,E=p?.name||``,D=l(g),O=!n&&!x&&S,k=!n&&!x&&C,A=t&&a;return h(`li`,{className:`wui-comment`,"data-wui-comment":f,"data-value":v??``,"data-wui-deleted":x?``:void 0,children:[h(`div`,{className:`wui-comment-row`,children:[h(`span`,{className:`avatar avatar-sm wui-comment-avatar`,"aria-hidden":`true`,children:[m(`span`,{className:`avatar-face`,children:i(E)||`?`}),p?.src&&m(`img`,{className:`avatar-img`,src:p.src,alt:``,onError:e=>{e.currentTarget.hidden=!0}})]}),h(`div`,{className:`wui-comment-main`,children:[h(`div`,{className:`wui-comment-head`,children:[m(`span`,{className:`wui-comment-author`,children:E}),m(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(D)?new Date(D).toISOString():void 0,children:s(g,{pattern:`datetime`})}),y&&!x&&m(`span`,{className:`wui-comment-edited`,children:_.edited})]}),x?m(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:_.deleted}):m(`div`,{className:`wui-comment-text`,"data-wui-text":``,children:o(v).map((e,t)=>`text`in e?m(u,{children:e.text},t):h(`span`,{className:`wui-mention`,"data-mention-id":e.id,children:[`@`,e.label]},t))}),O&&m(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),d&&!x&&(w.length>0||!n)&&h(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":_.reactions,children:[w.map(e=>n?h(`span`,{className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,children:[m(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),m(`span`,{className:`wui-reaction-count`,children:c(e.count,{decimals:0})})]},e.emoji):h(`button`,{type:`button`,className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,"data-wui-emoji":e.emoji,"aria-pressed":e.mine?`true`:`false`,children:[m(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),m(`span`,{className:`wui-reaction-count`,children:c(e.count,{decimals:0})})]},e.emoji)),!n&&m(`button`,{type:`button`,className:`wui-reaction-add`,"data-wui-action":`react-menu`,"aria-label":_.addReaction,"aria-haspopup":`true`,"aria-expanded":`false`,children:m(r,{name:`emoji-smile`,size:16})})]}),!n&&!x&&(A||O||k)&&h(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[A&&m(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:_.reply}),O&&m(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:_.edit}),k&&m(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:_.delete})]}),k&&h(`div`,{className:`wui-comment-confirm`,"data-wui-confirm":``,hidden:!0,children:[m(`span`,{className:`wui-comment-confirm-text`,children:_.confirmDelete}),m(`button`,{type:`button`,className:`btn btn-danger btn-sm`,"data-wui-action":`confirm-delete`,children:_.delete}),m(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,"data-wui-action":`cancel-delete`,children:_.cancel})]}),!n&&m(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]})]}),t&&T.length>0&&m(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":_.repliesName(E),children:T.map(e=>m(b,{comment:e,readOnly:n,allowReactions:d},e.id))}),A&&!n&&!x&&m(`div`,{className:`wui-comment-reply`,"data-wui-reply":``,hidden:!0})]})}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"./AppIcon.js";import{initialsOf as i}from"../lib/initials.js";import a from"./AppAvatar.js";import{parseMentionValue as o}from"@webority/ui-elements/elements/mention-input";import{formatDate as s,formatNumber as c,toInstant as l}from"@webority/ui-elements/helpers";import{Fragment as u,useEffect as d,useId as f,useRef as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{COMMENT_REACTIONS as g,COMMENT_TEXT as _}from"@webority/ui-elements/elements/comment-thread";var v=[`stacked`,`inline`];function y(r){let{marker:i,props:o}=e(`AppCommentThread`,r),{comments:s=[],onPost:c,onReply:l,onEdit:u,onDelete:y,onReact:x,people:S,loadPeople:C,reactionChoices:w,allowReplies:T=!0,allowReactions:E=!0,composerPlaceholder:D,composer:O=`stacked`,author:k,postLabel:A=_.post,composerRows:j,readOnly:M=!1,label:N=_.listName,id:P,className:F=``,...I}=o;n(`AppCommentThread`,I),t(`AppCommentThread`,`composer`,O,v);let L=f(),R=P||`comment-thread-${L.replace(/[^a-zA-Z0-9_-]/g,``)}`,z=p(null),B=typeof C==`function`,V=w?.length?w:g,H=O===`inline`,U=j??(H?1:3),W=p(null);return W.current={onPost:c,onReply:l,onEdit:u,onDelete:y,onReact:x,loadPeople:C},d(()=>{let e=z.current;if(e)return e.submit=async({intent:e,commentId:t,parentId:n,body:r,emoji:i})=>{let a=W.current;e===`post`?await a.onPost?.(r):e===`reply`?await a.onReply?.(n,r):e===`edit`?await a.onEdit?.(t,r):e===`delete`?await a.onDelete?.(t):e===`react`&&await a.onReact?.(t,i)},()=>{e.submit=void 0}},[]),d(()=>{let e=z.current;!e||B||(e.people=S||[])},[S,B]),d(()=>{let e=z.current;if(!e||!B)return;let t=new WeakMap,n=async e=>{let n=e.target,r=(t.get(n)??0)+1;t.set(n,r),n.loading=!0;try{let i=await W.current.loadPeople(e.detail.query);t.get(n)===r&&(n.people=i||[])}catch{t.get(n)===r&&(n.people=[])}finally{t.get(n)===r&&(n.loading=!1)}};return e.addEventListener(`search`,n),()=>e.removeEventListener(`search`,n)},[B]),h(`wui-comment-thread`,{ref:z,id:R,class:F?`wui-comment-thread ${F}`:`wui-comment-thread`,controlled:``,"read-only":M?``:void 0,remote:B?``:void 0,"reaction-choices":w?.length?w.join(` `):void 0,"no-replies":T?void 0:``,"no-reactions":E?void 0:``,"composer-placeholder":D,...i,...I,children:[m(`div`,{className:`wui-comment-items`,"data-wui-items":``,children:s.length?m(`ol`,{className:`wui-comment-list`,"aria-label":N,children:s.map(e=>m(b,{comment:e,topLevel:!0,readOnly:M,allowReplies:T,allowReactions:E},e.id))}):m(`p`,{className:`wui-comment-empty`,children:_.empty})}),!M&&E&&m(`div`,{className:`wui-reaction-picker`,role:`group`,"aria-label":_.pickerName,"data-wui-picker":``,hidden:!0,children:V.map(e=>m(`button`,{type:`button`,className:`wui-reaction-choice`,"data-wui-emoji":e,children:e},e))}),!M&&h(`div`,{className:H?`wui-comment-composer wui-comment-composer-inline`:`wui-comment-composer`,"data-wui-composer":``,children:[H&&k?m(a,{name:k,size:`sm`,tone:`auto`,className:`wui-comment-composer-avatar`}):null,m(`wui-mention-input`,{id:`${R}-new`,class:`wui-mention-input`,label:_.composerLabel,placeholder:D??_.composerPlaceholder,rows:String(U),remote:B?``:void 0}),m(`div`,{className:`wui-comment-form-actions`,children:m(`button`,{type:`button`,className:H?`btn btn-outline-primary btn-sm`:`btn btn-primary btn-sm`,"data-wui-action":`post`,children:A})}),m(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]}),m(`span`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}function b({comment:e,topLevel:t=!1,readOnly:n,allowReplies:a,allowReactions:d}){let{id:f,author:p,at:g,value:v,edited:y,deleted:x,canEdit:S,canDelete:C,reactions:w=[],replies:T=[]}=e,E=p?.name||``,D=l(g),O=!n&&!x&&S,k=!n&&!x&&C,A=t&&a;return h(`li`,{className:`wui-comment`,"data-wui-comment":f,"data-value":v??``,"data-wui-deleted":x?``:void 0,children:[h(`div`,{className:`wui-comment-row`,children:[h(`span`,{className:`avatar avatar-sm wui-comment-avatar`,"aria-hidden":`true`,children:[m(`span`,{className:`avatar-face`,children:i(E)||`?`}),p?.src&&m(`img`,{className:`avatar-img`,src:p.src,alt:``,onError:e=>{e.currentTarget.hidden=!0}})]}),h(`div`,{className:`wui-comment-main`,children:[h(`div`,{className:`wui-comment-head`,children:[m(`span`,{className:`wui-comment-author`,children:E}),m(`time`,{className:`wui-comment-time`,dateTime:Number.isFinite(D)?new Date(D).toISOString():void 0,children:s(g,{pattern:`datetime`})}),y&&!x&&m(`span`,{className:`wui-comment-edited`,children:_.edited})]}),x?m(`div`,{className:`wui-comment-text wui-comment-text-deleted`,children:_.deleted}):m(`div`,{className:`wui-comment-text`,"data-wui-text":``,children:o(v).map((e,t)=>`text`in e?m(u,{children:e.text},t):h(`span`,{className:`wui-mention`,"data-mention-id":e.id,children:[`@`,e.label]},t))}),O&&m(`div`,{className:`wui-comment-editor`,"data-wui-editor":``,hidden:!0}),d&&!x&&(w.length>0||!n)&&h(`div`,{className:`wui-comment-reactions`,role:`group`,"aria-label":_.reactions,children:[w.map(e=>n?h(`span`,{className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,children:[m(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),m(`span`,{className:`wui-reaction-count`,children:c(e.count,{decimals:0})})]},e.emoji):h(`button`,{type:`button`,className:e.mine?`wui-reaction wui-reaction-mine`:`wui-reaction`,"data-wui-emoji":e.emoji,"aria-pressed":e.mine?`true`:`false`,children:[m(`span`,{className:`wui-reaction-emoji`,children:e.emoji}),m(`span`,{className:`wui-reaction-count`,children:c(e.count,{decimals:0})})]},e.emoji)),!n&&m(`button`,{type:`button`,className:`wui-reaction-add`,"data-wui-action":`react-menu`,"aria-label":_.addReaction,"aria-haspopup":`true`,"aria-expanded":`false`,children:m(r,{name:`emoji-smile`,size:16})})]}),!n&&!x&&(A||O||k)&&h(`div`,{className:`wui-comment-actions`,"data-wui-actions":``,children:[A&&m(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`reply`,children:_.reply}),O&&m(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`edit`,children:_.edit}),k&&m(`button`,{type:`button`,className:`wui-comment-action`,"data-wui-action":`delete`,children:_.delete})]}),k&&h(`div`,{className:`wui-comment-confirm`,"data-wui-confirm":``,hidden:!0,children:[m(`span`,{className:`wui-comment-confirm-text`,children:_.confirmDelete}),m(`button`,{type:`button`,className:`btn btn-danger btn-sm`,"data-wui-action":`confirm-delete`,children:_.delete}),m(`button`,{type:`button`,className:`btn btn-ghost btn-sm`,"data-wui-action":`cancel-delete`,children:_.cancel})]}),!n&&m(`div`,{className:`wui-comment-error`,"data-wui-error":``,hidden:!0})]})]}),t&&T.length>0&&m(`ol`,{className:`wui-comment-list wui-comment-replies`,"aria-label":_.repliesName(E),children:T.map(e=>m(b,{comment:e,readOnly:n,allowReactions:d},e.id))}),A&&!n&&!x&&m(`div`,{className:`wui-comment-reply`,"data-wui-reply":``,hidden:!0})]})}export{y as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{columns:o,rows:s,caption:c,className:l=``,...u}=a;if(!Array.isArray(o))throw Error(`<AppCompareTable> columns is required: pass the feature-name column, then one per option.`);if(!Array.isArray(s))throw Error(`<AppCompareTable> rows is required: pass one row per capability.`);t(`AppCompareTable`,u);let d=e=>e===!0?r(`span`,{className:`compare-yes`,children:r(n,{name:`check`,size:16})}):e===!1?r(`span`,{className:`compare-no`,children:`-`}):e;return r(`div`,{className:`compare-table${l?` ${l}`:``}`,...e(`AppCompareTable`,a),...u,children:i(`table`,{children:[c&&r(`caption`,{className:`visually-hidden`,children:c}),r(`thead`,{children:r(`tr`,{children:o.map((e,t)=>r(`th`,{scope:`col`,className:e.highlight?`is-highlight`:void 0,children:e.label},e.label?`col-${t}-${e.label}`:`col-${t}`))})}),r(`tbody`,{children:s.map((e,t)=>i(`tr`,{children:[r(`th`,{scope:`row`,children:e.label}),e.values.map((e,t)=>r(`td`,{className:o[t+1]?.highlight?`is-highlight`:void 0,children:d(e)},o[t+1]?.label??t))]},e.key??`${e.label}-${t}`))})]})})}export{a 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{isValidElement as i,useEffect as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u=[`stack`,`scroll`],d=[`comfortable`,`relaxed`],f=[`start`,`center`],p={yes:{icon:`tick-circle`,label:`Yes`},no:{icon:`close-circle`,label:`No`},warn:{icon:`danger`,label:`Warning`},partial:{icon:`minus-circle`,label:`Partial`}};function m(e){return typeof e==`object`&&!!e&&!i(e)}function h(e){return e.scrollLeft+e.clientWidth<e.scrollWidth-1}function g(...e){return e.filter(Boolean).join(` `)||void 0}function _(e){return g(e.highlight&&`is-highlight`,e.align===`center`&&`wui-compare-center`,e.nowrap&&`wui-compare-nowrap`)}function v(e){if(e===!0)return l(`span`,{className:`compare-yes`,children:[c(r,{name:`check`,size:16}),c(`span`,{className:`visually-hidden`,children:`Yes`})]});if(e===!1)return l(`span`,{className:`compare-no`,children:[c(`span`,{"aria-hidden":`true`,children:`-`}),c(`span`,{className:`visually-hidden`,children:`No`})]});if(m(e)&&`state`in e){let n=p[e.state];return t(`AppCompareTable`,`state`,e.state,Object.keys(p)),l(`span`,{className:`wui-compare-state wui-compare-state-${e.state}`,children:[n&&c(r,{name:n.icon,size:16,variant:`bulk`}),n&&c(`span`,{className:`visually-hidden`,children:`${n.label}: `}),e.text]})}return m(e)&&`code`in e?c(`span`,{className:`wui-compare-code`,children:e.code}):e}function y(e,t){let n=[],r=null;return t.forEach((t,i)=>{t.group!=null&&t.group!==r&&n.push(c(`tr`,{className:`wui-compare-group-row`,children:c(`th`,{colSpan:e.length,scope:`rowgroup`,className:`wui-compare-group`,children:t.group})},`group:${t.group}:${t.key??t.label}`)),r=t.group??null,n.push(l(`tr`,{children:[c(`th`,{scope:`row`,children:t.label}),t.values.map((t,n)=>{let r=e[n+1];return c(`td`,{className:_(r??{}),"data-label":r?.label,children:v(t)},r?.label??n)})]},t.key??`${t.label}-${i}`))}),n}function b(r){let{marker:i,props:p}=e(`AppCompareTable`,r),{columns:m,rows:v,caption:b,mobile:x=`stack`,stickyFirstColumn:S=!1,stickyHeader:C=!1,density:w=`comfortable`,className:T=``,...E}=p,D=o(null),[O,k]=s(!1);if(a(()=>{let e=()=>{let e=D.current;e&&k(h(e))};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),!Array.isArray(m))throw Error(`<AppCompareTable> columns is required: pass the feature-name column, then one per option.`);if(!Array.isArray(v))throw Error(`<AppCompareTable> rows is required: pass one row per capability.`);n(`AppCompareTable`,E),t(`AppCompareTable`,`mobile`,x,u),t(`AppCompareTable`,`density`,w,d);for(let e of m)t(`AppCompareTable`,`align`,e.align,f);let A=x===`scroll`,j=l(`table`,{className:g(A&&`wui-compare-scroll-table`,A&&S&&`wui-compare-sticky-first`),children:[b&&c(`caption`,{className:`visually-hidden`,children:b}),c(`thead`,{children:c(`tr`,{children:m.map((e,t)=>c(`th`,{scope:`col`,className:_(e),children:e.label},e.label?`col-${t}-${e.label}`:`col-${t}`))})}),c(`tbody`,{children:y(m,v)})]});return c(`div`,{className:g(`compare-table`,w===`relaxed`&&`wui-compare-relaxed`,C&&`wui-compare-sticky-head`,T),"data-mobile":x,...i,...E,children:A?c(`div`,{className:`wui-compare-scroll`,ref:D,tabIndex:0,role:b?`region`:void 0,"aria-label":b||void 0,"data-more":O?`end`:void 0,onScroll:e=>k(h(e.currentTarget)),children:j}):j})}export{b 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"./AppModal.js";import a from"./AppInput.js";import{MODAL_ICONS as o}from"./ModalIcons.js";import{useEffect as s,useState as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`sm`,`md`,`lg`,`xl`],p=[`default`,`plain`];function m(m){let{open:h,title:g,variant:_=`default`,message:v,confirmLabel:y=`Confirm`,cancelLabel:b=`Cancel`,danger:x=!1,tone:S,image:C,iconSize:w,confirmPhrase:T,onConfirm:E,onClose:D,loading:O=!1,staticBackdrop:k=!1,placement:A=`center`,size:j=`md`,className:M=``,children:N,...P}=m;n(`AppConfirmDialog`,P),t(`AppConfirmDialog`,`tone`,S,Object.keys(o)),t(`AppConfirmDialog`,`size`,typeof j==`string`?j:null,f),t(`AppConfirmDialog`,`variant`,_,p);let[F,I]=c(``);if(s(()=>{h||I(``)},[h]),!h)return null;let L=!!T&&F.trim()!==T,R=_===`plain`,z=R?`sm`:`md`,B=R||C?null:o[S||(x?`delete`:`info`)],V=w>0?{"--wui-confirm-icon-size":`${w}px`}:void 0,H=()=>{O||D?.()};return u(i,{...e(`AppConfirmDialog`,m),...P,open:h,hideHeader:!0,title:g,onClose:H,staticBackdrop:k,placement:A,size:j,className:[`wui-confirm`,R&&`wui-confirm-plain`,M].filter(Boolean).join(` `),footer:d(`div`,{className:`wui-confirm-actions`,children:[u(r,{variant:R?`light`:`secondary`,size:z,disabled:O,onClick:H,children:b}),u(r,{variant:x?`danger`:`primary`,size:z,disabled:L,loading:O,onClick:E,children:y})]}),children:d(`div`,{className:`wui-confirm-content`,children:[!R&&C?u(`span`,{className:`wui-confirm-icon`,style:V,children:u(`img`,{src:C,alt:``,"aria-hidden":`true`})}):B&&u(`span`,{className:`wui-confirm-icon`,style:V,children:u(B,{size:120})}),u(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:g}),v&&u(`p`,{className:`wui-confirm-msg`,children:v}),N!=null&&N!==!1&&u(`div`,{className:`wui-confirm-body`,children:N}),T&&u(a,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:d(l,{children:[`Type `,u(`strong`,{children:T}),` to confirm`]}),value:F,onChange:e=>I(e.target.value),"aria-label":`Type ${T} to confirm`,disabled:O})]})})}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"./AppButton.js";import i from"./AppModal.js";import a from"./AppInput.js";import{MODAL_ICONS as o}from"./ModalIcons.js";import{useEffect as s,useState as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`sm`,`md`,`lg`,`xl`],p=[`default`,`plain`];function m(m){let{marker:h,props:g}=e(`AppConfirmDialog`,m),{open:_,title:v,variant:y=`default`,message:b,confirmLabel:x=`Confirm`,cancelLabel:S=`Cancel`,danger:C=!1,tone:w,image:T,iconSize:E,confirmPhrase:D,onConfirm:O,onClose:k,loading:A=!1,staticBackdrop:j=!1,placement:M=`center`,size:N=`md`,className:P=``,children:F,...I}=g;n(`AppConfirmDialog`,I),t(`AppConfirmDialog`,`tone`,w,Object.keys(o)),t(`AppConfirmDialog`,`size`,typeof N==`string`?N:null,f),t(`AppConfirmDialog`,`variant`,y,p);let[L,R]=c(``);if(s(()=>{_||R(``)},[_]),!_)return null;let z=!!D&&L.trim()!==D,B=y===`plain`,V=B?`sm`:`md`,H=B||T?null:o[w||(C?`delete`:`info`)],U=E>0?{"--wui-confirm-icon-size":`${E}px`}:void 0,W=()=>{A||k?.()};return u(i,{...h,...I,open:_,hideHeader:!0,title:v,onClose:W,staticBackdrop:j,placement:M,size:N,className:[`wui-confirm`,B&&`wui-confirm-plain`,P].filter(Boolean).join(` `),footer:d(`div`,{className:`wui-confirm-actions`,children:[u(r,{variant:B?`light`:`secondary`,size:V,disabled:A,onClick:W,children:S}),u(r,{variant:C?`danger`:`primary`,size:V,disabled:z,loading:A,onClick:O,children:x})]}),children:d(`div`,{className:`wui-confirm-content`,children:[!B&&T?u(`span`,{className:`wui-confirm-icon`,style:U,children:u(`img`,{src:T,alt:``,"aria-hidden":`true`})}):H&&u(`span`,{className:`wui-confirm-icon`,style:U,children:u(H,{size:120})}),u(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:v}),b&&u(`p`,{className:`wui-confirm-msg`,children:b}),F!=null&&F!==!1&&u(`div`,{className:`wui-confirm-body`,children:F}),D&&u(a,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:d(l,{children:[`Type `,u(`strong`,{children:D}),` to confirm`]}),value:L,onChange:e=>R(e.target.value),"aria-label":`Type ${D} to confirm`,disabled:A})]})})}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"./useWuiControl.js";import{useEffect as i}from"react";import{jsx as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/consent-banner";import{getConsent as o,saveConsent as s}from"@webority/analytics/site";var c=[`bottom-left`,`bottom-right`,`bar`],l=[`analytics`,`functional`,`marketing`];function u(u){let{heading:d,description:f,policyHref:p,policyLabel:m,analyticsDescription:h,functionalDescription:g,marketingDescription:_,categories:v,position:y=`bottom-left`,standalone:b=!1,preview:x=!1,className:S=``,style:C,...w}=u;n(`AppConsentBanner`,w),t(`AppConsentBanner`,`position`,y,c);for(let e of v??[])t(`AppConsentBanner`,`categories`,e,l);let{setRef:T,innerRef:E}=r({on:{"wui-consent-save":e=>{x||(s(e.detail),E.current&&(E.current.preferences=o()))}}});return i(()=>{let e=E.current;if(!e)return;if(x){e.open();return}let t=o();e.preferences=t,t.decided||e.open()},[E,x]),a(`wui-consent-banner`,{ref:T,position:y,heading:d||void 0,description:f||void 0,"policy-href":p||void 0,"policy-label":m||void 0,"analytics-description":h||void 0,"functional-description":g||void 0,"marketing-description":_||void 0,categories:v?.length?v.join(` `):void 0,standalone:b||void 0,preview:x||void 0,class:S||void 0,style:C,...e(`AppConsentBanner`,u),...w})}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"./useWuiControl.js";import{useEffect as i}from"react";import{jsx as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/consent-banner";import{getConsent as o,saveConsent as s}from"@webority/analytics/site";var c=[`bottom-left`,`bottom-right`,`bar`],l=[`analytics`,`functional`,`marketing`];function u(u){let{marker:d,props:f}=e(`AppConsentBanner`,u),{heading:p,description:m,policyHref:h,policyLabel:g,analyticsDescription:_,functionalDescription:v,marketingDescription:y,categories:b,position:x=`bottom-left`,standalone:S=!1,preview:C=!1,className:w=``,style:T,...E}=f;n(`AppConsentBanner`,E),t(`AppConsentBanner`,`position`,x,c);for(let e of b??[])t(`AppConsentBanner`,`categories`,e,l);let{setRef:D,innerRef:O}=r({on:{"wui-consent-save":e=>{C||(s(e.detail),O.current&&(O.current.preferences=o()))}}});return i(()=>{let e=O.current;if(!e)return;if(C){e.open();return}let t=o();e.preferences=t,t.decided||e.open()},[O,C]),a(`wui-consent-banner`,{ref:D,position:x,heading:p||void 0,description:m||void 0,"policy-href":h||void 0,"policy-label":g||void 0,"analytics-description":_||void 0,"functional-description":v||void 0,"marketing-description":y||void 0,categories:b?.length?b.join(` `):void 0,standalone:S||void 0,preview:C||void 0,class:w||void 0,style:T,...d,...E})}export{u as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{shortcutAria as n,shortcutChip as r}from"../lib/shortcutChip.js";import i from"./renderIconProp.js";import{useEffect as a,useLayoutEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/context-menu";function u(n){let{items:r=[],target:i,trigger:u,children:d,ariaLabel:p=`Context menu`,disabled:m=!1,open:h,onOpen:g,onBeforeOpen:_,menuClassName:v=``,linkComponent:y,...b}=n;t(`AppContextMenu`,b);let x=s(null);return a(()=>{let e=x.current;if(!g)return;let t=e=>g(e.detail);return e.addEventListener(`wui-context-menu:open`,t),()=>e.removeEventListener(`wui-context-menu:open`,t)},[g]),a(()=>{let e=x.current;if(_)return e.addEventListener(`wui-context-menu:beforeopen`,_),()=>e.removeEventListener(`wui-context-menu:beforeopen`,_)},[_]),o(()=>{x.current.toggleAttribute(`open`,!!h)},[h]),l(`wui-context-menu`,{ref:x,target:i,trigger:u,disabled:m,...e(`AppContextMenu`,n),...b,children:[d,c(`div`,{className:`dropdown-menu wui-context-menu-panel${v?` ${v}`:``}`,role:`menu`,"aria-label":p,tabIndex:-1,children:f(r,y)})]})}var d=e=>`dropdown-item${e.danger?` danger`:``}${e.disabled?` disabled`:``}`;function f(e,t){return e.map(e=>{if(e.divider)return c(`hr`,{className:`dropdown-divider`},e.key);if(e.items!=null){let n=e.searchPlaceholder||`Search`;return l(`div`,{className:`wui-context-menu-sub`,role:`none`,"data-searchable":e.searchable?``:void 0,children:[l(`button`,{type:`button`,className:d(e),role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":`false`,tabIndex:-1,"data-key":e.key,"aria-disabled":e.disabled?`true`:void 0,children:[i(e.icon,{size:16}),e.label,i(`chevron-right`,{size:14,className:`wui-context-menu-chevron`})]}),l(`div`,{className:`dropdown-menu wui-context-menu-subpanel`,role:`menu`,"aria-label":e.label,tabIndex:-1,children:[e.searchable?c(`input`,{type:`search`,className:`wui-context-menu-search`,autoComplete:`off`,placeholder:n,"aria-label":n}):null,f(e.items,t)]})]},e.key)}let a=!!e.to&&!e.disabled;return l(a?t??`a`:`button`,{...a?t?{to:e.to}:{href:e.to}:{type:`button`},className:d(e),role:`menuitem`,tabIndex:-1,"data-key":e.key,"aria-checked":e.checked?`true`:void 0,"data-hint":e.hint||void 0,"aria-keyshortcuts":n(e.shortcut),"aria-disabled":e.disabled?`true`:void 0,onClick:e.disabled?void 0:e.onClick,children:[e.image?c(`img`,{src:e.image,alt:``}):i(e.icon,{size:16}),e.label,r(e.shortcut)]},e.key)})}export{u as default};
1
+ import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{shortcutAria as n,shortcutChip as r}from"../lib/shortcutChip.js";import i from"./renderIconProp.js";import{useEffect as a,useLayoutEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/context-menu";function u(n){let{marker:r,props:i}=e(`AppContextMenu`,n),{items:u=[],target:d,trigger:p,children:m,ariaLabel:h=`Context menu`,disabled:g=!1,open:_,onOpen:v,onBeforeOpen:y,menuClassName:b=``,linkComponent:x,...S}=i;t(`AppContextMenu`,S);let C=s(null);return a(()=>{let e=C.current;if(!v)return;let t=e=>v(e.detail);return e.addEventListener(`wui-context-menu:open`,t),()=>e.removeEventListener(`wui-context-menu:open`,t)},[v]),a(()=>{let e=C.current;if(y)return e.addEventListener(`wui-context-menu:beforeopen`,y),()=>e.removeEventListener(`wui-context-menu:beforeopen`,y)},[y]),o(()=>{C.current.toggleAttribute(`open`,!!_)},[_]),l(`wui-context-menu`,{ref:C,target:d,trigger:p,disabled:g,...r,...S,children:[m,c(`div`,{className:`dropdown-menu wui-context-menu-panel${b?` ${b}`:``}`,role:`menu`,"aria-label":h,tabIndex:-1,children:f(u,x)})]})}var d=e=>`dropdown-item${e.danger?` danger`:``}${e.disabled?` disabled`:``}`;function f(e,t){return e.map(e=>{if(e.divider)return c(`hr`,{className:`dropdown-divider`},e.key);if(e.items!=null){let n=e.searchPlaceholder||`Search`;return l(`div`,{className:`wui-context-menu-sub`,role:`none`,"data-searchable":e.searchable?``:void 0,children:[l(`button`,{type:`button`,className:d(e),role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":`false`,tabIndex:-1,"data-key":e.key,"aria-disabled":e.disabled?`true`:void 0,children:[i(e.icon,{size:16}),e.label,i(`chevron-right`,{size:14,className:`wui-context-menu-chevron`})]}),l(`div`,{className:`dropdown-menu wui-context-menu-subpanel`,role:`menu`,"aria-label":e.label,tabIndex:-1,children:[e.searchable?c(`input`,{type:`search`,className:`wui-context-menu-search`,autoComplete:`off`,placeholder:n,"aria-label":n}):null,f(e.items,t)]})]},e.key)}let a=!!e.to&&!e.disabled;return l(a?t??`a`:`button`,{...a?t?{to:e.to}:{href:e.to}:{type:`button`},className:d(e),role:`menuitem`,tabIndex:-1,"data-key":e.key,"aria-checked":e.checked?`true`:void 0,"data-hint":e.hint||void 0,"aria-keyshortcuts":n(e.shortcut),"aria-disabled":e.disabled?`true`:void 0,onClick:e.disabled?void 0:e.onClick,children:[e.image?c(`img`,{src:e.image,alt:``}):i(e.icon,{size:16}),e.label,r(e.shortcut)]},e.key)})}export{u 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 i from"./AppActionIcon.js";import a from"./AppButton.js";import{COPY_FEEDBACK_MS as o,copyTextToClipboard as s}from"@webority/ui-elements/helpers";import{useCallback as c,useEffect as l,useRef as u,useState as d}from"react";import{jsx as f}from"react/jsx-runtime";var p={sm:14,md:16,lg:20};function m(m){let{text:h,label:g=`Copy`,copiedLabel:_=`Copied`,iconOnly:v=!1,size:y=`md`,variant:b=`ghost`,onCopied:x,className:S=``,tooltip:C,tooltipPlacement:w,...T}=m;n(`AppCopyButton`,T),t(`AppCopyButton`,`size`,y,Object.keys(p));let[E,D]=d(!1),O=u(null);l(()=>()=>clearTimeout(O.current),[]);let k=c(async()=>{await s(h)&&(D(!0),clearTimeout(O.current),O.current=setTimeout(()=>D(!1),o),x?.())},[h,x]),A=E?_:g,j=E?`check`:`files`;return r(v?f(i,{icon:j,label:A,size:p[y]??p.md,onClick:k,className:S,...T,...e(`AppCopyButton`,m)}):f(a,{leftIcon:j,variant:b,size:y,onClick:k,className:S,"aria-live":`polite`,...T,...e(`AppCopyButton`,m),children:A}),C,w)}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"./withTooltip.js";import i from"./AppActionIcon.js";import a from"./AppButton.js";import{COPY_FEEDBACK_MS as o,copyTextToClipboard as s}from"@webority/ui-elements/helpers";import{useCallback as c,useEffect as l,useRef as u,useState as d}from"react";import{jsx as f}from"react/jsx-runtime";var p={sm:14,md:16,lg:20};function m(m){let{marker:h,props:g}=e(`AppCopyButton`,m),{text:_,label:v=`Copy`,copiedLabel:y=`Copied`,iconOnly:b=!1,size:x=`md`,variant:S=`ghost`,onCopied:C,className:w=``,tooltip:T,tooltipPlacement:E,...D}=g;n(`AppCopyButton`,D),t(`AppCopyButton`,`size`,x,Object.keys(p));let[O,k]=d(!1),A=u(null);l(()=>()=>clearTimeout(A.current),[]);let j=c(async()=>{await s(_)&&(k(!0),clearTimeout(A.current),A.current=setTimeout(()=>k(!1),o),C?.())},[_,C]),M=O?y:v,N=O?`check`:`files`;return r(b?f(i,{icon:N,label:M,size:p[x]??p.md,onClick:j,className:w,...D,...h}):f(a,{leftIcon:N,variant:S,size:x,onClick:j,className:w,"aria-live":`polite`,...D,...h,children:M}),T,E)}export{m 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";function i(i){let{country:a,label:o,className:s=``,...c}=i;n(`AppCountryFlag`,c);let l=String(a??``).trim().toLowerCase();if(!/^[a-z]{2}$/.test(l))return t(`[@webority/ui-react] AppCountryFlag: country must be a two-letter ISO 3166-1 code, got`,a),null;let u=typeof o==`string`&&o.trim().length>0;return r(`span`,{className:[`wui-flag`,`wui-flag-${l}`,s].filter(Boolean).join(` `),...u?{role:`img`,"aria-label":o}:{"aria-hidden":`true`},...e(`AppCountryFlag`,i),...c})}export{i 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";function i(i){let{marker:a,props:o}=e(`AppCountryFlag`,i),{country:s,label:c,className:l=``,...u}=o;n(`AppCountryFlag`,u);let d=String(s??``).trim().toLowerCase();if(!/^[a-z]{2}$/.test(d))return t(`[@webority/ui-react] AppCountryFlag: country must be a two-letter ISO 3166-1 code, got`,s),null;let f=typeof c==`string`&&c.trim().length>0;return r(`span`,{className:[`wui-flag`,`wui-flag-${d}`,l].filter(Boolean).join(` `),...f?{role:`img`,"aria-label":c}:{"aria-hidden":`true`},...a,...u})}export{i as default};