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