@webority/ui-react 0.107.0 → 0.108.1
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.js +26159 -26822
- package/dist/canvas-kit/manifest.json +1130 -1695
- package/dist/canvas-kit/release.json +6 -6
- 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/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 -0
- 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/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/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/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 -0
- 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 -0
- 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/iconCatalogNames.g.js +1 -1
- package/dist/components/iconGlyphs.g.js +1 -1
- package/dist/components/iconVariants.g.js +1 -1
- package/dist/guidance.json +119 -600
- package/dist/lib/useCommandPaletteShortcut.js +1 -1
- package/dist/lib/useFileDrop.js +1 -0
- package/dist/lib/wuiMarker.js +1 -1
- package/dist/types/components/AppAccordion.d.ts +1 -1
- package/dist/types/components/AppCompareTable.d.ts +45 -10
- package/dist/types/components/AppDescriptions.d.ts +10 -8
- package/dist/types/components/AppDrawer.d.ts +37 -0
- package/dist/types/components/AppEmptyState.d.ts +12 -5
- package/dist/types/components/AppImagePicker.d.ts +149 -0
- package/dist/types/components/AppInlineEdit.d.ts +0 -1
- package/dist/types/components/AppNavigationMenu.d.ts +1 -1
- package/dist/types/components/AppNotificationCenter.d.ts +16 -1
- package/dist/types/components/AppRecordPager.d.ts +2 -2
- package/dist/types/components/AppSectionLeadCapture.d.ts +67 -0
- package/dist/types/components/AppSelect.d.ts +7 -0
- package/dist/types/components/AppSeoHead.d.ts +42 -0
- package/dist/types/components/AppShortcutLegend.d.ts +13 -1
- package/dist/types/components/AppStepper.d.ts +2 -2
- package/dist/types/components/AppTablePagination.d.ts +36 -11
- package/dist/types/components/AppWhatsNew.d.ts +11 -2
- package/dist/types/components/iconGlyphs.g.d.ts +1 -0
- package/dist/types/components/iconVariants.g.d.ts +5 -0
- package/dist/types/index.d.ts +3 -8
- package/dist/types/lib/useFileDrop.d.ts +24 -0
- package/dist/types/lib/wuiMarker.d.ts +10 -0
- package/dist/ui-react.js +1 -1
- package/package.json +5 -5
- package/dist/components/AppAvatarPicker.js +0 -1
- package/dist/components/AppInfoList.js +0 -1
- package/dist/components/AppLogoPicker.js +0 -1
- package/dist/components/AppMenubar.js +0 -1
- package/dist/components/AppPagination.js +0 -1
- package/dist/components/AppSelectMini.js +0 -1
- package/dist/components/AppSidebarMenu.js +0 -1
- package/dist/components/AppTableEmptyState.js +0 -1
- package/dist/types/components/AppAvatarPicker.d.ts +0 -92
- package/dist/types/components/AppInfoList.d.ts +0 -29
- package/dist/types/components/AppLogoPicker.d.ts +0 -125
- package/dist/types/components/AppMenubar.d.ts +0 -50
- package/dist/types/components/AppPagination.d.ts +0 -39
- package/dist/types/components/AppSelectMini.d.ts +0 -53
- package/dist/types/components/AppSidebarMenu.d.ts +0 -90
- package/dist/types/components/AppTableEmptyState.d.ts +0 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./AppIcon.js";import ee from"../lib/FieldMessage.js";import te from"./AppPopover.js";import ne from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import{MASK_INPUT_TYPES as re,MASK_NAMES as ie,attachInputMask as ae,evaluatePassword as oe,formatMasked as o,isMaskPattern as se,postedMasked as ce}from"@webority/ui-elements/helpers";import{forwardRef as le,useEffect as s,useId as ue,useRef as c,useState as l}from"react";import{Form as u}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var de=[`sm`,`md`,`lg`,`xl`],fe=[`bare`],pe=[`off`,`border`,`above`],me=[`off`,`shown`],p=le(function(le,p){let{marker:he,props:ge}=e(`AppInput`,le),{label:m,required:h=!1,optional:g=!1,error:_e,hint:ve,help:ye,helpLabel:be=`More information`,type:_=`text`,size:v=`md`,leftIcon:y,rightIcon:b,onRightIconClick:x,rightIconLabel:xe,unit:S,id:Se,name:Ce,className:we=``,fieldClassName:C=``,disabled:w=!1,readOnly:T=!1,clearable:E=!1,showCount:D=!1,maxLength:O,prefix:k,suffix:A,action:j,floatingLabel:M=`off`,variant:N,passwordRequirements:P=`off`,passwordPolicy:Te,requirementsPlacement:F=`auto`,mask:I,postFormatted:L=!1,onMaskChange:R,...z}=ge;r(`AppInput`,z),n(`AppInput`,`size`,v,de),n(`AppInput`,`variant`,N,fe),n(`AppInput`,`floatingLabel`,M,pe),n(`AppInput`,`passwordRequirements`,P,me),s(()=>{g&&h&&typeof process<`u`&&process.env.NODE_ENV!==`production`&&t(`AppInput: optional and required together; optional ignored`)},[g,h]),I!=null&&!se(I)&&n(`AppInput`,`mask`,I,ie),I!=null&&n(`AppInput`,`type`,_,re);let[B,Ee]=l(!1),[De,Oe]=l(``),V=_e||De,ke=ue(),H=Se||ke,U=_===`password`,Ae=U&&B?`text`:_,W=c(null),je=e=>{W.current=e,typeof p==`function`?p(e):p&&(p.current=e)},G=String(z.value??z.defaultValue??``),[Me,K]=l(()=>!!G),[Ne,Pe]=l(()=>G.length),Fe=E&&!w&&!T,q=E||D,J=U&&P===`shown`,[Ie,Le]=l(G);s(()=>{!J||z.value===void 0||Le(String(z.value??``))},[z.value,J]),s(()=>{if(!q||z.value===void 0)return;let e=String(z.value??``);K(!!e),Pe(e.length)},[z.value,q]);let Re=e=>{K(!!e.target.value),Pe(e.target.value.length),z.onInput?.(e)},ze=e=>{J&&Le(e.target.value),q?Re(e):z.onInput?.(e)},Be=I?{...z.value!==void 0&&{value:o(I,z.value)},...z.defaultValue!==void 0&&{defaultValue:o(I,z.defaultValue)}}:null,Ve=c(R);Ve.current=R,s(()=>{let e=W.current;if(!(!I||!e))return ae(e,{mask:I,postFormatted:L,onChange:(e,t)=>Ve.current?.(e,t),onInvalidChange:Oe})},[I,L]);let Y=e=>I&&!L&&e?t=>{let n=t.target,r=new Proxy(n,{get:(e,t)=>{if(t===`value`)return ce(I,e.value);let n=Reflect.get(e,t,e);return typeof n==`function`?n.bind(e):n}});e(Object.create(t,{target:{value:r}}))}:e,He=Fe?d(`button`,{type:`button`,className:`input-clear`,onClick:()=>{let e=W.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set;t?t.call(e,``):e.value=``,e.dispatchEvent(new Event(`input`,{bubbles:!0})),K(!1),e.focus()},"aria-label":`Clear`,tabIndex:-1,hidden:!Me,children:d(i,{name:`x`,size:16})}):null,Ue=V&&H?`${H}-error`:void 0,We=ve&&H?`${H}-hint`:void 0,X=J&&F===`inline`,Ge=X&&H?`${H}-requirements`:void 0,Ke=Ue||(X?Ge:We),qe=[`input`,v===`sm`?`input-sm`:``,v===`lg`?`input-lg`:``,v===`xl`?`wui-input-xl`:``,V?`error`:``,U?`pw`:``,S?`num-input`:``,!(M!==`off`&&m||k||A||S||U||b)&&E&&Fe?`has-clear`:``,N===`bare`?`input-bare`:``,we].filter(Boolean).join(` `),Z=d(u.Control,{id:H,name:Ce,type:Ae,className:qe,disabled:w,readOnly:T,required:h,"aria-invalid":V?`true`:`false`,"aria-describedby":Ke,maxLength:O,...z,onChange:Y(z.onChange),onBlur:Y(z.onBlur),...Be,placeholder:M===`off`?z.placeholder:` `,ref:je,onInput:q||J?ze:z.onInput}),Q=Te??!0,Je=Q&&typeof Q==`object`&&Q.title||`Password requirements`,Ye=J?oe(Ie,Q):null,Xe=J?d(`ul`,{className:`pw-criteria`,"aria-live":`polite`,id:Ge,"aria-label":X?Je:void 0,children:Ye.map(e=>f(`li`,{className:`pw-rule ${e.met?`met`:`unmet`}`,children:[d(`span`,{className:`pw-mark`,"aria-hidden":`true`}),d(`span`,{className:`pw-rule-text`,children:e.label}),d(`span`,{className:`visually-hidden`,children:e.met?`: met`:`: not met`})]},e.key))}):null,$;if(M!==`off`&&m&&!U)$=f(`div`,{className:M===`above`?`field-float wui-float-above`:`field-float`,children:[Z,f(`label`,{className:`float-label`,htmlFor:H,children:[m,h&&d(a,{})]})]});else if(j)$=f(`div`,{className:`input-action-row`,children:[f(`div`,{className:y?`input-icon`:`input-wrap`,children:[y&&d(`span`,{className:`ic`,children:d(i,{name:y,size:16})}),Z]}),d(`div`,{className:`input-action`,children:j})]});else if(k||A)$=f(`div`,{className:`input-affixed`,children:[k!=null&&d(`span`,{className:`affix affix-pre`,children:k}),Z,A!=null&&d(`span`,{className:`affix affix-suf`,children:A})]});else if(S)$=f(`div`,{className:`input-with-unit`,children:[Z,d(`span`,{className:`unit`,children:S})]});else if(U){let e=f(`button`,{type:`button`,className:`pw-toggle${B?` pw-revealed`:``}`,onClick:()=>Ee(e=>!e),"aria-label":B?`Hide password`:`Show password`,tabIndex:-1,children:[d(i,{name:`eye`,size:18,className:`pw-eye`}),d(i,{name:`eye-off`,size:18,className:`pw-eye-off`})]}),t=M!==`off`&&m?d(`div`,{className:M===`above`?`field-float wui-float-above`:`field-float`,children:f(`div`,{className:`input-wrap`,children:[Z,e,f(`label`,{className:`float-label`,htmlFor:H,children:[m,h&&d(a,{})]})]})}):f(`div`,{className:y?`input-icon`:`input-wrap`,children:[y&&d(`span`,{className:`ic`,children:d(i,{name:y,size:16})}),Z,e]});$=J&&!X?d(te,{trigger:t,triggerType:`focus`,placement:F,title:Je,className:`pw-popover`,children:Xe}):t}else $=b?f(`div`,{className:`input-wrap`,children:[Z,d(`button`,{type:`button`,className:`pw-toggle`,onClick:x,disabled:!x,tabIndex:-1,"aria-label":xe||b,children:d(i,{name:b,size:18})})]}):E?f(`div`,{className:y?`input-icon`:`input-wrap`,children:[y&&d(`span`,{className:`ic`,children:d(i,{name:y,size:16})}),Z,He]}):y?f(`div`,{className:`input-icon`,children:[d(`span`,{className:`ic`,children:d(i,{name:y,size:16})}),Z]}):Z;return f(u.Group,{...he,className:`field${C?` ${C}`:``}`,children:[m&&M===`off`&&f(u.Label,{className:`label`,htmlFor:H,children:[m,g&&!h&&d(`span`,{className:`label-optional`,children:` (optional)`}),h&&d(a,{}),ye&&d(ne,{label:be,children:ye})]}),$,X&&d(`div`,{className:`wui-pw-inline`,children:Xe}),d(ee,{error:V,hint:X?null:ve,errorId:Ue,hintId:We}),D&&f(`div`,{className:`field-count${O&&Ne>=O?` at-limit`:``}`,children:[Ne,O?` / ${O}`:``]})]})});export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppRequiredMark.js";import{cloneElement as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s={sm:`wui-addon-group-sm`,md:``,lg:`wui-addon-group-lg`},c=e=>typeof e==`string`||typeof e==`number`?a(`span`,{className:`wui-addon`,children:e}):e;function l(l){let{marker:u,props:d}=e(`AppInputGroup`,l),{children:f,leading:p,trailing:m,label:h,htmlFor:g,required:_=!1,size:v=`md`,className:y=``,...b}=d;n(`AppInputGroup`,b),t(`AppInputGroup`,`size`,v,Object.keys(s));let x=o(`div`,{className:[`wui-addon-group`,s[v]??``,h?``:y].filter(Boolean).join(` `),...h?{}:b,children:[c(p),f,c(m)]});return h?o(`div`,{className:[`field`,y].filter(Boolean).join(` `),...u,...b,children:[o(`label`,{className:`label`,htmlFor:g,children:[h,_&&a(r,{})]}),x]}):i(x,u)}export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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{errorToast as i}from"./toast.js";import{formatValue as a}from"@webority/ui-elements/helpers";import{useEffect as o,useId as s,useMemo as c,useRef as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{KANBAN_SUMMARY_FORMATS as p,KANBAN_TEXT as m,KANBAN_TONES as h,kanbanOverflow as g,kanbanSummaryFormat as _,kanbanVisibleLimit as v,sumKanbanValues as ee}from"@webority/ui-elements/elements/kanban";var te=e=>e.key??e.id,y=e=>e.column,b=[`rupees`,`paise`],ne=[`inline`,`stacked`];function x(x){let{marker:S,props:C}=e(`AppKanban`,x),{columns:w,cards:T,renderCard:E,renderColumnActions:D,getCardKey:O=te,getCardColumn:k=y,getCardValue:A,cardLabel:j,isCardLocked:re,onLocked:ie,onMove:ae,accept:oe,filter:se,boardId:ce,ariaLabel:le=`Board`,emptyText:ue=m.empty,readOnly:de=!1,swipeHint:M=!1,fill:N=!1,columnWidth:P,fillOffset:F,activeCardKey:I,headLayout:L=`inline`,summaryFormat:R,summaryUnit:z,className:B=``,id:V,...H}=C;if(!Array.isArray(w))throw Error(`<AppKanban> columns is required: pass the board's stage columns.`);if(!Array.isArray(T))throw Error(`<AppKanban> cards is required: pass the cards, an empty array for an empty board.`);n(`AppKanban`,H),t(`AppKanban`,`summaryFormat`,R,p),t(`AppKanban`,`summaryUnit`,z,b),t(`AppKanban`,`headLayout`,L,ne);for(let e of w)t(`AppKanban`,`columns[].tone`,e.tone,h);let fe=s(),U=V||`kanban-${fe.replace(/[^a-zA-Z0-9_-]/g,``)}`,W=l(null),[G,K]=u(()=>new Map),[q,pe]=u(()=>new Set),[me,J]=u(()=>new Set),he=c(()=>new Map(T.map(e=>[String(O(e)),e])),[T,O]),Y=l(null);Y.current={accept:oe,onMove:ae,onLocked:ie,byKey:he,columns:w};let X=R&&p.includes(R)&&(z==null||b.includes(z))?_(R,z):null,Z=c(()=>{let e=new Map(w.map(e=>[e.key,[]])),t=[];for(let n of T){let r=String(O(n)),i=G.get(r);i?t.push([n,i]):e.get(k(n))?.push(n)}for(let[n,r]of t){let t=e.get(r.to);t&&t.splice(Math.min(r.index,t.length),0,n)}return e},[w,T,G,O,k]);o(()=>{let e=W.current;if(!e)return;e.accept=(e,t,n)=>{let r=Y.current.accept;return!r||r(Y.current.byKey.get(e.getAttribute(`data-wui-card`)),t,n)};let t=e=>{let{key:t,from:n,to:r,index:a}=e.detail,o=Y.current.onMove,s=Y.current.byKey.get(t);if(!o||!s)return;let c=Y.current.columns.find(e=>e.key===r)?.visibleLimit!=null;c&&J(e=>new Set(e).add(t)),K(e=>new Map(e).set(t,{to:r,index:a}));let l=()=>K(e=>{let n=new Map(e);return n.delete(t),n}),u;try{u=o({card:s,key:t,from:n,to:r,index:a})}catch(e){u=Promise.reject(e)}Promise.resolve(u).then(l,e=>{l(),c&&J(e=>{let n=new Set(e);return n.delete(t),n}),i(e?.message||m.failed.server)})},n=e=>{let{key:t,reason:n}=e.detail,r=Y.current.byKey.get(t);r&&Y.current.onLocked?.({card:r,key:t,reason:n})};return e.addEventListener(`wui:kanban:move`,t),e.addEventListener(`wui:kanban:locked`,n),()=>{e.removeEventListener(`wui:kanban:move`,t),e.removeEventListener(`wui:kanban:locked`,n),e.accept=void 0}},[]);let Q=e=>se?.(e)!==!1,ge=(e,t)=>{q.has(e)&&J(e=>{let n=new Set(e);for(let e of t)n.delete(String(O(e)));return n}),pe(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})},$={};return P!=null&&($[`--wui-kanban-column-width`]=`${P}px`),F!=null&&($[`--wui-kanban-fill-offset`]=`${F}px`),f(`wui-kanban`,{ref:W,id:U,class:B?`wui-kanban ${B}`:`wui-kanban`,role:`region`,"aria-label":le,"board-id":ce||void 0,"summary-format":X?R:void 0,"summary-unit":X&&z?z:void 0,readonly:de?``:void 0,fill:N?``:void 0,"data-head-layout":L===`stacked`?`stacked`:void 0,style:$,controlled:``,...S,...H,children:[d(`nav`,{className:`wui-kanban-switcher`,"aria-label":`Board columns`,children:w.map((e,t)=>f(`button`,{type:`button`,className:`wui-kanban-switch`,"data-wui-switch":e.key,"aria-controls":`${U}-${e.key}`,"aria-current":t===0?`true`:void 0,children:[d(`span`,{className:`wui-kanban-switch-title`,children:e.title}),d(`span`,{className:`wui-kanban-count`,"data-wui-count":``,children:(Z.get(e.key)||[]).filter(Q).length})]},e.key))}),M&&f(`p`,{className:`wui-kanban-hint`,"aria-hidden":`true`,children:[d(r,{name:`arrow-swap-horizontal`,size:14}),m.swipeHint]}),d(`div`,{className:`wui-kanban-board`,"data-wui-scroller":``,children:w.map(e=>{let t=`${U}-${e.key}`,n=Z.get(e.key)||[],i=n.filter(Q),o=!!(e.collapsible&&e.collapsed),s=v(e.visibleLimit),c=q.has(e.key),l=g(i.map(e=>String(O(e))),s,c,me),u=typeof e.summary==`function`?e.summary(i):e.summary;X&&(u=a(ee(i.map(e=>A?.(e))),X));let p=D?.(e,i);return f(`section`,{className:`wui-kanban-column`,id:t,"data-wui-column":e.key,"data-tone":e.tone&&h.includes(e.tone)?e.tone:`neutral`,"aria-labelledby":`${t}-title`,"data-accept-from":e.acceptFrom?e.acceptFrom.join(` `):void 0,"data-collapsible":e.collapsible?``:void 0,"data-collapsed":o?``:void 0,children:[f(`header`,{className:`wui-kanban-head`,children:[d(`span`,{className:`wui-kanban-dot`,"aria-hidden":`true`}),d(`h2`,{className:`wui-kanban-title`,id:`${t}-title`,children:e.href?d(`a`,{href:e.href,children:e.title}):e.title}),d(`span`,{className:`wui-kanban-count`,"data-wui-count":``,children:i.length}),e.collapsible&&d(`span`,{className:`wui-kanban-lock`,"aria-hidden":`true`,children:d(r,{name:`lock`,size:14})}),p!=null&&p!==!1&&d(`div`,{className:`wui-kanban-actions`,"data-wui-no-drag":``,children:p}),e.collapsible&&d(`button`,{type:`button`,className:`wui-kanban-collapse`,"data-wui-collapse":``,"aria-expanded":o?`false`:`true`,"aria-controls":`${t}-body`,"aria-label":o?m.expand(e.title):m.collapse(e.title),children:d(r,{name:`chevron-left`,size:16})}),u!=null&&d(`div`,{className:`wui-kanban-summary`,"data-wui-summary":``,children:u})]}),d(`p`,{className:`wui-kanban-drop-note`,"data-wui-drop-note":``,hidden:!0}),d(`div`,{className:`wui-kanban-body`,id:`${t}-body`,"data-wui-body":``,children:n.map(e=>{let t=String(O(e)),n=G.has(t);return d(`article`,{className:`wui-kanban-card`,"data-wui-card":t,tabIndex:0,"aria-label":j?j(e):void 0,"data-wui-locked":re?.(e)?``:void 0,"data-wui-value":A?A(e)??void 0:void 0,"aria-current":I!=null&&t===String(I)?`true`:void 0,"aria-busy":n?`true`:void 0,"data-wui-saving":n?``:void 0,"data-wui-overflow":l.has(t)?``:void 0,hidden:!Q(e),children:E?.(e)},t)})}),s!=null&&d(`button`,{type:`button`,className:`wui-kanban-more`,"data-wui-more":``,"aria-controls":`${t}-body`,"aria-expanded":c?`true`:`false`,hidden:c?i.length<=s:l.size===0,onClick:()=>ge(e.key,n),children:c?m.fewer:m.more(l.size)}),d(`p`,{className:`wui-kanban-empty`,"data-wui-empty":``,hidden:i.length>0,children:e.emptyText??ue})]},e.key)})}),d(`p`,{className:`visually-hidden`,id:`${U}-help`,"data-wui-help":``,children:m.help}),d(`div`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{shortcutKey as n}from"@webority/ui-elements/helpers";import{jsx as r}from"react/jsx-runtime";function i(i){let{marker:a,props:o}=e(`AppKbd`,i),{children:s,className:c=``,...l}=o;t(`AppKbd`,l);let u=typeof s==`string`||typeof s==`number`?n(s):s;return r(`kbd`,{className:[`wui-kbd`,c].filter(Boolean).join(` `),...a,...l,children:u})}export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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 a from"./AppSparkline.js";import{isValidElement as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`plain`,`filled`,`accent`,`spotlight`],u=[`sm`,`md`,`lg`],d=[`primary`,`success`,`warning`,`danger`,`info`,`neutral`],f=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],p=[`up`,`down`,`flat`],m=[`success`,`danger`,`neutral`],h={success:` wui-kpi-delta--success`,danger:` wui-kpi-delta--danger`,neutral:` wui-kpi-delta--neutral`};function g(e){return e==null||typeof e==`boolean`?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(g).join(``):o(e)?g(e.props?.children):``}function _(e){let t=g(e).trim();return t.startsWith(`+`)?`up`:t.startsWith(`-`)||t.startsWith(`−`)?`down`:`flat`}function v(o){let{marker:g,props:v}=e(`AppKpiTile`,o),{label:y,value:b,caption:x,icon:S,iconTone:C,iconVariant:w,delta:T,deltaDirection:E,deltaTone:D,sparkline:O,variant:k=`plain`,size:A=`md`,valueSize:j,inline:M=!1,attention:N=!1,href:P,linkComponent:F,className:I=``,style:L,iconClassName:R=``,labelClassName:z=``,valueClassName:B=``,captionClassName:V=``,deltaClassName:H=``,sparklineClassName:U=``,...W}=v;n(`AppKpiTile`,W),t(`AppKpiTile`,`variant`,k,l),t(`AppKpiTile`,`size`,A,u),t(`AppKpiTile`,`iconTone`,C,d),t(`AppKpiTile`,`iconVariant`,w,f),t(`AppKpiTile`,`deltaDirection`,E,p),t(`AppKpiTile`,`deltaTone`,D,m);let G=`kpi${M?` kpi-inline`:``}${k===`filled`?` kpi-filled`:k===`accent`?` kpi-accent`:k===`spotlight`?` kpi-spotlight`:``}${A===`lg`?` kpi-lg`:A===`sm`?` kpi-sm`:``}${N?` kpi-attention`:``}${I?` ${I}`:``}`,K=typeof j==`number`&&j>0?{...L,"--wui-kpi-value-size":`${j}px`}:L,q=E??_(T),J=q===`up`?`arrow-up`:q===`down`?`arrow-down`:null,Y=Object.hasOwn(h,D??``)?h[D]:``,X=P==null?`div`:F||`a`,Z=P==null?{}:F?{to:P}:{href:P};return c(X,{className:G,style:K,...g,...W,...Z,children:[S&&s(`span`,{className:`kpi-icon${C?` kpi-icon-${C}`:``}${R?` ${R}`:``}`,children:i(S,{size:20,variant:w})}),s(`div`,{className:`kpi-label${z?` ${z}`:``}`,children:y}),s(`div`,{className:`kpi-value${B?` ${B}`:``}`,children:b}),x&&s(`div`,{className:`kpi-caption${V?` ${V}`:``}`,children:x}),T&&c(`div`,{className:`kpi-delta${q===`flat`?``:` ${q}`}${Y}${H?` ${H}`:``}`,children:[J&&s(r,{name:J,size:13}),T]}),O&&O.length>0&&s(a,{data:O,className:`kpi-sparkline${U?` ${U}`:``}`})]})}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{useEffect as n,useRef as r}from"react";import{jsx as i}from"react/jsx-runtime";import"@webority/ui-elements/elements/lightbox";function a(a){let{marker:o,props:s}=e(`AppLightbox`,a),{items:c=[],download:l=!1,label:u,openIndex:d,onChange:f,onClose:p,className:m=``,...h}=s;t(`AppLightbox`,h);let g=r(null),_=r({onChange:f,onClose:p});return n(()=>{_.current={onChange:f,onClose:p}}),n(()=>{let e=g.current,t=e=>_.current.onChange?.(e.detail.index),n=()=>_.current.onClose?.();return e.addEventListener(`wui-lightbox:change`,t),e.addEventListener(`wui-lightbox:close`,n),()=>{e.removeEventListener(`wui-lightbox:change`,t),e.removeEventListener(`wui-lightbox:close`,n)}},[]),i(`wui-lightbox`,{ref:g,class:[`wui-lightbox`,m].filter(Boolean).join(` `),download:l?``:void 0,label:u||void 0,"open-index":Number.isInteger(d)?d:void 0,...o,...h,children:c.map(e=>i(`a`,{className:`wui-lightbox-item`,href:e.src,"data-caption":e.caption||void 0,"data-name":e.name||void 0,children:i(`img`,{src:e.thumb||e.src,alt:e.alt??e.caption??``,loading:`lazy`})},e.key??e.src))})}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./AppIcon.js";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";var c={sm:13,md:15,lg:18},l=[`underline`,`underline-center`,`static`,`slide`,`icon`,`highlight`,`bracket`,`fade`,`grow`,`glow`,`shine`,`none`];function u(e,t,n){if(!e)return null;let r=`wui-link__ic wui-link__ic--${t}`;return typeof e==`string`?o(`span`,{className:r,children:o(i,{name:e,size:c[n]??c.md})}):o(`span`,{className:r,children:e})}function d(i){let{marker:d,props:f}=e(`AppLink`,i),{children:p,label:m,href:h,animation:g=`underline`,leftIcon:_=null,rightIcon:v=null,size:y=`md`,surface:b=`default`,external:x=!1,disabled:S=!1,linkComponent:C,className:w=``,...T}=f;r(`AppLink`,T),n(`AppLink`,`animation`,g,l),n(`AppLink`,`size`,y,Object.keys(c)),n(`AppLink`,`surface`,b,[`default`,`dark`]),!h&&T.onClick&&!C&&t(`[@webority/ui-react] AppLink has onClick but no href, so it renders an anchor that keyboards cannot reach. Use AppButton for an action, or pass href.`);let E=l.includes(g)?g:`underline`,D=E===`icon`&&!v&&!_?`arrow-right`:v,O=[`wui-link`,`wui-link--${E}`,y===`md`?``:`wui-link--${y}`,S?`is-disabled`:``,b===`dark`?`wui-link--surface-dark`:``,w].filter(Boolean).join(` `),k=s(a,{children:[u(_,`left`,y),o(`span`,{className:`wui-link__label`,children:p??m}),u(D,`right`,y)]});return S?o(`span`,{className:O,"aria-disabled":`true`,...d,...T,children:k}):C&&!x?o(C,{className:O,to:h,...d,...T,children:k}):o(`a`,{className:O,href:h,target:x?`_blank`:void 0,rel:x?`noopener noreferrer`:void 0,...d,...T,children:k})}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppCodeBlock.js";import r from"./AppLink.js";import{Fragment as i,useMemo as a}from"react";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import"@webority/ui-elements/elements/markdown";import{linkRoute as l,parseBlocks as u,parseInline as d}from"@webority/ui-elements/chat-core";var f=/^https?:/i,p=/^(mailto|tel):/i;function m(n){let{marker:r,props:i}=e(`AppMarkdown`,n),{value:o,className:c=``,linkComponent:l,resolveLink:d,...f}=i;t(`AppMarkdown`,f);let p=a(()=>u(o),[o]);return s(`wui-markdown`,{class:[`wui-markdown`,c].filter(Boolean).join(` `),...r,...f,children:p.map(e=>s(b,{block:e,resolveLink:d,linkComponent:l},e.key))})}function h(e){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n],i=e[n+1];if(r.type===`text`&&r.text.endsWith(`!`)&&i?.type===`link`){let e=r.text.slice(0,-1);e&&t.push({type:`text`,text:e,key:r.key}),t.push({type:`image`,children:i.children,key:i.key}),n+=1}else t.push(r)}return t}function g({token:e,resolveLink:t,linkComponent:n}){let i=s(_,{tokens:e.children,resolveLink:t,linkComponent:n}),a=l(e.href,t);return a?s(r,{href:a,linkComponent:n,animation:`static`,children:i}):f.test(e.href)?s(r,{href:e.href,external:!0,animation:`static`,children:i}):p.test(e.href)?s(r,{href:e.href,animation:`static`,children:i}):s(o,{children:i})}function _({tokens:e,resolveLink:t,linkComponent:n}){return h(e).map(e=>{switch(e.type){case`code`:return s(`code`,{children:e.text},e.key);case`strong`:return s(`strong`,{children:s(_,{tokens:e.children,resolveLink:t,linkComponent:n})},e.key);case`em`:return s(`em`,{children:s(_,{tokens:e.children,resolveLink:t,linkComponent:n})},e.key);case`image`:return c(i,{children:[`[`,s(_,{tokens:e.children,resolveLink:t,linkComponent:n}),`]`]},e.key);case`link`:return s(g,{token:e,resolveLink:t,linkComponent:n},e.key);default:return s(i,{children:e.text},e.key)}})}function v({text:e,resolveLink:t,linkComponent:n}){return s(_,{tokens:d(e),resolveLink:t,linkComponent:n})}function y({block:e,resolveLink:t,linkComponent:n}){let r=e=>s(v,{text:e,resolveLink:t,linkComponent:n});return s(`div`,{className:`table-responsive`,children:c(`table`,{className:`table`,children:[s(`thead`,{children:s(`tr`,{children:e.header.map((e,t)=>s(`th`,{scope:`col`,children:r(e)},t))})}),s(`tbody`,{children:e.rows.map((t,n)=>s(`tr`,{children:e.header.map((e,n)=>s(`td`,{children:r(t[n]??``)},n))},n))})]})})}function b({block:e,resolveLink:t,linkComponent:r}){let a=e=>s(v,{text:e,resolveLink:t,linkComponent:r});switch(e.type){case`paragraph`:return s(`p`,{children:e.lines.map((e,t)=>c(i,{children:[t>0&&s(`br`,{}),a(e)]},t))});case`heading`:return s(`h2`,{children:a(e.text)});case`list`:{let t=e.items.map((e,t)=>s(`li`,{children:a(e)},t));return e.ordered?s(`ol`,{start:e.start===1?void 0:e.start,children:t}):s(`ul`,{children:t})}case`table`:return s(y,{block:e,resolveLink:t,linkComponent:r});case`code`:return s(n,{code:e.text,language:`text`});case`rule`:return s(`hr`,{});default:return null}}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"../lib/FieldMessage.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import a from"./useWuiControl.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}=e(`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;t(`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}=a({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]),u(`div`,{...f,className:`field${N?` ${N}`:``}`,children:[E&&u(`label`,{className:`label`,htmlFor:`${L}-text`,children:[E,k&&l(i,{}),A&&l(r,{label:j,children:A})]}),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}),l(n,{error:D,hint:O,errorId:`${L}-error`,hintId:`${L}-hint`})]})});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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=i(`div`,{className:`progress${x===`sm`?` progress-sm`:``}${!O&&w?` ${w}`:``}`,role:`meter`,"aria-valuenow":m,"aria-valuemin":h,"aria-valuemax":g,"aria-label":S||void 0,...T,children:i(`div`,{className:`progress-bar wui-progress-${E}`,style:{width:`${D}%`}})});return O?a(`div`,{...f,className:`wui-progress-labelled${w?` ${w}`:``}`,children:[i(`div`,{className:`wui-progress-label`,"aria-hidden":`true`,children:S}),k]}):r(k,f)}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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;return n(`AppMetricStrip`,g),t(`AppMetricStrip`,`columns`,p,o),t(`AppMetricStrip`,`size`,m,s),i(`div`,{className:[`wui-metric-strip`,`wui-metric-strip-cols-${p}`,m===`sm`?`wui-metric-strip-sm`:``,h].filter(Boolean).join(` `),...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=a(r,{children:[i(`div`,{className:`wui-metric-label`,children:e.label}),i(`div`,{className:`wui-metric-value`,children:e.value}),e.note&&i(`div`,{className:`wui-metric-note`,children:e.note})]}),l=`${e.label}-${n}`;return e.href?i(`a`,{href:e.href,className:o,children:s},l):i(`div`,{className:o,children:s},l)})})}export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import n from"./warnInvalidValue.js";import r from"./warnUnknownProps.js";import i from"./AppIcon.js";import a from"../lib/DiscardPrompt.js";import{useCallback as o,useEffect as s,useRef as c,useState as l}from"react";import{Modal as u}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`default`,`danger`,`success`,`warning`],ee=[`center`,`top`],m=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,h={sm:380,md:440,lg:640,xl:880},g=`wui-modal-fullscreen`,_=!1;function te(){let e=!0;try{e=process.env.NODE_ENV!==`production`}catch{e=!0}!e||_||(_=!0,t("[@webority/ui-react] <AppModal hideHeader> has no accessible name: pass `ariaLabel` (or a string `title`)."))}function ne(e,t){if(e.key!==`Tab`)return;let n=Array.from(t.querySelectorAll(m));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 re(){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 ie(){return typeof document<`u`&&document.querySelector(`wui-drawer[open], .offcanvas.show`)!==null}function v(t){let{marker:_,props:v}=e(`AppModal`,t),{open:y,eyebrow:b,title:x,subtitle:S,headerIcon:C,tone:w=`default`,dismissible:T=!0,onClose:E,onBack:D,backLabel:ae=`Back`,headerActions:O,footer:k,size:A=`md`,placement:j=`center`,hideHeader:M=!1,staticBackdrop:N=!1,confirmDiscard:P,dirty:F=!1,ariaLabel:I,className:oe=``,children:se,...L}=v;r(`AppModal`,L),n(`AppModal`,`tone`,w,p),n(`AppModal`,`placement`,j,ee),n(`AppModal`,`size`,typeof A==`string`?A:null,[...Object.keys(h),`fullscreen`]);let{style:R,ref:z,"data-wui":B,"data-wui-props":V,...H}=L,U=B?{"data-wui":B,"data-wui-props":V}:_,W=U[`data-wui`],G=U[`data-wui-props`];M&&!I&&typeof x!=`string`&&te();let K=c(null),q=c(null),[J,Y]=l(!1);s(()=>{y||Y(!1)},[y]),s(()=>{J&&q.current?.focus()},[J]),s(()=>{let e=K.current?.closest(`.modal`);e&&(P?e.setAttribute(`confirm-discard`,P):e.removeAttribute(`confirm-discard`))},[y,P]);let X=c(null),ce=o(e=>{X.current=e,typeof z==`function`?z(e):z&&(z.current=e)},[z]);s(()=>{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]),s(()=>{if(!y)return;let e=K.current?.closest(`.modal-content`);if(!e)return;let t=()=>Array.from(e.querySelectorAll(m));(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=re(),i=e=>ne(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=()=>{if(P&&F){Y(!0);return}E?.()},le=()=>{Y(!1),E?.()},ue=()=>{Y(!1),(K.current?.querySelector(`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled])`))?.focus()},Q=A===`fullscreen`,de=typeof A==`number`?A:h[A]??h.md,fe=[`wui-modal`,w==="default"?``:`tone-${w}`,oe].filter(Boolean).join(` `),$=y&&ie(),pe=[`wui-modal-shell`,Q&&g,$&&`wui-modal-stacked`].filter(Boolean).join(` `);return f(u,{...H,ref:ce,show:y,onHide:Z,backdrop:!N||`static`,keyboard:!N,autoFocus:!1,enforceFocus:!0,restoreFocus:!0,centered:j!==`top`,className:pe,style:Q?R:{"--wui-modal-max-width":`${de}px`,...R},dialogClassName:`wui-rb-dialog`,contentClassName:fe,backdropClassName:$?`wui-modal-dim wui-modal-backdrop-stacked`:`wui-modal-dim`,"aria-label":I||(typeof x==`string`?x:void 0),children:[!M&&f(`div`,{className:`wui-modal-header`,children:[D&&d(`button`,{type:`button`,className:`wui-modal-back`,onClick:D,"aria-label":ae,children:d(i,{name:`arrow-left`,size:18})}),f(`div`,{className:`wui-modal-heading`,children:[C&&d(`span`,{className:`wui-modal-headicon`,children:d(i,{name:C,size:18})}),f(`div`,{className:`wui-modal-headtext`,children:[b&&d(`div`,{className:`wui-modal-eyebrow`,children:b}),d(`div`,{className:`wui-modal-title`,children:x}),S&&d(`div`,{className:`wui-modal-subtitle`,children:S})]})]}),O&&d(`div`,{className:`wui-modal-header-actions`,children:O}),T&&d(`button`,{type:`button`,className:`wui-modal-close`,onClick:Z,"aria-label":`Close`,children:d(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:d(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),d(`div`,{className:`wui-modal-body`,ref:K,children:se}),(k||J)&&f(`div`,{className:J?`wui-modal-footer wui-drawer-discarding`:`wui-modal-footer`,children:[J&&d(a,{text:P,confirmRef:q,onDiscard:le,onKeep:ue}),k]})]})}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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,readValues as l,writeValues as u}from"./useWuiControl.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}=e(`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,help:H,helpLabel:U=`More information`,fieldClassName:W=``,...G}=x;n(`AppMultiSelect`,G),t(`AppMultiSelect`,`size`,A,g);let K=p(),q=L||K,{setRef:J,innerRef:Y}=s({ref:y,value:S,onChange:C,readValue:l,writeValue:u}),X=w||_,{portal:Z,toElementOptions:Q}=o(X);return f(()=>{let e=Y.current;if(!e)return;let t=Q(X,v);c(t,e.options)||(e.options=t)},[X,Y,Q]),f(()=>{let e=Y.current;e&&(e.validateCustom=N??null)},[N,Y]),h(`div`,{...b,className:`field${W?` ${W}`:``}`,children:[R&&h(`label`,{className:`label`,htmlFor:q,children:[R,V&&m(a,{}),H&&m(i,{label:U,children:H})]}),m(`wui-multiselect`,{"aria-label":typeof R==`string`?R:void 0,"aria-describedby":z?`${q}-error`:B?`${q}-hint`:void 0,"aria-invalid":z?`true`:void 0,id:q,ref:J,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,...G}),Z,m(r,{error:z,hint:B,errorId:`${q}-error`,hintId:`${q}-hint`})]})});export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./renderIconProp.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`primary`,`info`,`success`,`warning`,`danger`,`neutral`];function c(r){let{marker:i,props:o}=e(`AppNavList`,r),{label:c,items:u=[],linkComponent:d,className:f=``,...p}=o;n(`AppNavList`,p);let m=d??`a`,h=e=>d?{to:e}:{href:e};return a(`nav`,{className:[`wui-nav-list`,f].filter(Boolean).join(` `),"aria-label":c,...i,...p,children:u.map(e=>{if(e.divider)return a(`hr`,{className:`wui-nav-list-divider`},e.key);if(t(`AppNavList`,`dotTone`,e.dotTone,s),e.icon&&e.dotTone)throw Error(`<AppNavList> item takes icon or dotTone, not both.`);let n=!!e.active,r=n?`wui-nav-list-item is-active`:`wui-nav-list-item`,i=n?`page`:void 0,o=l(e);return e.to?a(m,{...h(e.to),className:r,"aria-current":i,children:o},e.key):a(`button`,{type:`button`,className:r,"aria-current":i,children:o},e.key)})})}function l(e){return o(i,{children:[u(e),a(`span`,{className:`wui-nav-list-label`,children:e.label}),e.count>0?a(`span`,{className:`wui-nav-list-count`,children:e.count}):null]})}function u(e){return e.dotTone?a(`span`,{className:`wui-nav-list-dot tone-${s.includes(e.dotTone)?e.dotTone:`neutral`}`,"aria-hidden":`true`}):r(e.icon,{size:18,className:`wui-nav-list-icon`})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.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;t(`AppNavigationMenu`,p);let m=r(),h=d??`a`,g=e=>d?{to:e}:{href:e};return i(`wui-navigation-menu`,{class:[`wui-nav-menu`,f].filter(Boolean).join(` `),...s,...p,children:i(`nav`,{"aria-label":u,children:i(`ul`,{className:`wui-nav-menu-list`,children:l.map(e=>{if(!e.links?.length)return i(`li`,{className:`wui-nav-menu-item`,children:i(h,{...g(e.to),className:`wui-nav-menu-toplink`,"aria-current":e.current?`page`:void 0,children:e.label})},e.key);let t=`${m}-${e.key}`;return a(`li`,{className:`wui-nav-menu-item`,children:[a(`button`,{type:`button`,className:`wui-nav-menu-trigger`,"aria-expanded":`false`,"aria-controls":t,"data-key":e.key,children:[e.label,n(`chevron-down`,{size:14,className:`wui-nav-menu-chevron`})]}),i(`div`,{className:`wui-nav-menu-panel`,id:t,children:i(`ul`,{className:`wui-nav-menu-links`,children:e.links.map(e=>i(`li`,{children:a(h,{...g(e.to),className:`wui-nav-menu-link`,"aria-current":e.current?`page`:void 0,children:[n(e.icon,{size:18}),a(`span`,{className:`wui-nav-menu-link-text`,children:[i(`span`,{className:`wui-nav-menu-link-label`,children:e.label}),e.description?i(`span`,{className:`wui-nav-menu-link-desc`,children:e.description}):null]})]})},e.key))})})]},e.key)})})})})}export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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"./AppTabs.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(t){let{marker:c,props:g}=e(`AppNotificationCenter`,t),{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(n(`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);return v(`wui-notification-center`,{ref:W,class:[`wui-notification-center`,F].filter(Boolean).join(` `),label:x,controlled:``,...c,...I,children:[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:[_(r,{name:`notification`,size:20}),_(`span`,{className:`wui-notification-center-count`,"aria-hidden":`true`,hidden:q===0,children:s(q)})]}),_(`span`,{className:`visually-hidden wui-notification-center-live`,"aria-live":`polite`,children:J}),v(`div`,{className:`wui-notification-center-panel`,id:H,role:`dialog`,"aria-labelledby":U,tabIndex:-1,children:[v(`div`,{className:`wui-notification-center-head`,children:[_(`h2`,{className:`wui-notification-center-title`,id:U,children:x}),k&&_(`button`,{type:`button`,className:`wui-notification-center-markall`,disabled:q===0,onClick:k,children:a.markAll})]}),L.length>0&&_(`div`,{className:`wui-notification-center-tabs`,children:_(i,{tabs:L,value:B,onChange:V,size:`sm`,fitted:!0,ariaLabel:x})}),Z.length===0?_(`p`,{className:`wui-notification-center-empty`,children:S}):_(`div`,{className:`wui-notification-center-list`,children:Z.map(e=>v(`section`,{"aria-labelledby":`${H}-${e.key}`,children:[_(`h3`,{className:`wui-notification-center-day`,id:`${H}-${e.key}`,children:e.heading}),_(`ul`,{className:`wui-notification-center-items`,children:e.items.map(e=>_(`li`,{children:_(T,{item:e,onItemClick:A,renderItem:j})},e.id))})]},e.key))}),E&&_(`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=>(t(`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:t,renderItem:n}){let i=`wui-notification-center-item${e.read?` wui-notification-center-item-read`:``}`,o=!e.read&&_(`span`,{className:`visually-hidden wui-notification-center-unread-label`,children:a.unreadPrefix}),s=_(`span`,{className:`wui-notification-center-dot`,"aria-hidden":`true`});if(n){let r=t?n=>{n.target.closest(x)||t(e,n)}:void 0;return v(`div`,{className:i,"data-id":e.id,tabIndex:-1,onClick:r,children:[s,v(`span`,{className:`wui-notification-center-body`,children:[o,n(e)]})]})}let l=c(e.at),u=v(g,{children:[s,e.icon&&_(`span`,{className:`wui-notification-center-icon`,children:_(r,{name:e.icon,size:18})}),v(`span`,{className:`wui-notification-center-body`,children:[o,_(`span`,{className:`wui-notification-center-item-title`,children:e.title}),e.text&&_(`span`,{className:`wui-notification-center-item-text`,children:e.text}),l&&_(`time`,{className:`wui-notification-center-when`,dateTime:String(e.at),children:l})]})]}),d=t?n=>t(e,n):void 0;return e.href?_(`a`,{className:i,href:e.href,"data-id":e.id,onClick:d,children:u}):_(`button`,{type:`button`,className:i,"data-id":e.id,onClick:d,children:u})}export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"../lib/FieldMessage.js";import ee from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import{forwardRef as o,useEffect as s,useId as c,useState as l}from"react";import{Form as u}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`sm`,`md`,`lg`],m=e=>{if(e===``||e===null)return null;let t=parseFloat(e);return Number.isNaN(t)?null:t},h=(e,t)=>t>0&&Number.isFinite(e)?e.toFixed(t):String(e??``),g=o(function(o,g){let{marker:_,props:v}=e(`AppNumberInput`,o),{label:y,required:b=!1,error:x,hint:S,help:C,helpLabel:w=`More information`,value:T,onChange:E,min:D,max:O,step:k=1,precision:A=0,unit:j,size:M=`md`,id:N,name:P,className:F=``,fieldClassName:I=``,disabled:L=!1,readOnly:R=!1,...z}=v;n(`AppNumberInput`,z),t(`AppNumberInput`,`size`,M,p);let B=c(),V=N||B,H=e=>{if(A===0)return Math.round(e);let t=10**A;return Math.round(e*t)/t},U=e=>{let t=e;return typeof D==`number`&&(t=Math.max(t,D)),typeof O==`number`&&(t=Math.min(t,O)),t},W=e=>h(e,A),[G,K]=l(()=>W(T));s(()=>{K(e=>m(e)===(T??null)?e:h(T,A))},[T,A]);let q=e=>{let t=(m(G)??U(0))+e*k,n=U(H(t));K(W(n)),E?.(n)},J=m(G),Y=L||R||J!==null&&typeof D==`number`&&J<=D,X=L||R||J!==null&&typeof O==`number`&&J>=O,Z=x&&V?`${V}-error`:void 0,Q=S&&V?`${V}-hint`:void 0,$=Z||Q,te=[`input`,M===`sm`?`input-sm`:``,M===`lg`?`input-lg`:``,x?`error`:``,`num-input`,F].filter(Boolean).join(` `),ne=RegExp(`^${typeof D==`number`&&D>=0?``:`-?`}\\d*${A>0?`(\\.\\d*)?`:``}$`),re=e=>{let t=e.target.value;if(!ne.test(t))return;K(t);let n=m(t);n!==null&&E?.(n)},ie=e=>{if(R){z.onBlur?.(e);return}let t=m(e.target.value);if(t===null)K(``),E?.(null);else{let e=U(H(t));K(W(e)),E?.(e)}z.onBlur?.(e)},ae=e=>{if(R){z.onKeyDown?.(e);return}e.key===`ArrowUp`?(e.preventDefault(),q(1)):e.key===`ArrowDown`&&(e.preventDefault(),q(-1)),z.onKeyDown?.(e)},oe=d(u.Control,{...z,id:V,name:P,type:`text`,inputMode:A>0?`decimal`:`numeric`,className:te,disabled:L,readOnly:R,required:b,"aria-invalid":x?`true`:`false`,"aria-describedby":$,value:G,ref:g,onChange:re,onBlur:ie,onKeyDown:ae}),se=f(`div`,{className:[`num-wrap`,M===`sm`?`num-wrap-sm`:``,M===`lg`?`num-wrap-lg`:``].filter(Boolean).join(` `),children:[d(`button`,{type:`button`,className:`num-btn`,"aria-label":`Decrease`,tabIndex:-1,disabled:Y,onClick:()=>q(-1),children:d(r,{name:`minus`,size:16})}),oe,j&&d(`span`,{className:`affix`,children:j}),d(`button`,{type:`button`,className:`num-btn`,"aria-label":`Increase`,tabIndex:-1,disabled:X,onClick:()=>q(1),children:d(r,{name:`plus`,size:16})})]});return f(u.Group,{..._,className:`field${I?` ${I}`:``}`,children:[y&&f(u.Label,{className:`label`,htmlFor:V,children:[y,b&&d(a,{}),C&&d(ee,{label:w,children:C})]}),se,d(i,{error:x,hint:S,errorId:Z,hintId:Q})]})});export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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"./AppActionIcon.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`?c(r,{name:`check`,size:14}):e===`skipped`?c(r,{name:`minus`,size:14}):t+1}function m(e,t){return e.href?t?c(t,{className:`wui-onboarding-label`,to:e.href,children:e.label}):c(`a`,{className:`wui-onboarding-label`,href:e.href,children:e.label}):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}=_;n(`AppOnboardingChecklist`,A);for(let e of v)t(`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 l(`wui-onboarding-checklist`,{ref:I,class:[`wui-onboarding`,B?`is-complete`:``,k].filter(Boolean).join(` `),"storage-key":S||void 0,...g,...A,children:[l(`section`,{className:`wui-onboarding-card`,"aria-labelledby":M,hidden:x||void 0,children:[l(`header`,{className:`wui-onboarding-head`,children:[l(`button`,{type:`button`,className:`wui-onboarding-toggle`,"aria-expanded":!V,"aria-controls":N,children:[c(`span`,{className:`wui-onboarding-title`,id:M,children:y}),c(`span`,{className:`wui-onboarding-count`,children:H}),c(`span`,{className:`wui-onboarding-chevron`,"aria-hidden":`true`,children:c(r,{name:`chevron-down`,size:16})})]}),c(i,{icon:`x`,label:C,size:16,className:`wui-onboarding-dismiss`})]}),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)=>c(`span`,{className:`wui-onboarding-seg is-${e}`},v[t].key??`${v[t].label}-${t}`))}),c(`ol`,{className:`wui-onboarding-steps`,id:N,hidden:V||void 0,children:v.map((e,t)=>{let n=L[t];return l(`li`,{className:`wui-onboarding-step is-${n}`,"aria-current":n===`current`?`step`:void 0,children:[c(`span`,{className:`wui-onboarding-mark`,"aria-hidden":`true`,children:p(n,t)}),l(`span`,{className:`wui-onboarding-body`,children:[d[n]?c(`span`,{className:`visually-hidden`,children:d[n]}):null,m(e,O),e.description?c(`span`,{className:`wui-onboarding-desc`,children:e.description}):null]})]},e.key??`${e.label}-${t}`)})})]}),l(`button`,{type:`button`,className:`wui-onboarding-restore`,hidden:!x||void 0,children:[c(r,{name:`task-square`,size:16}),c(`span`,{children:w}),c(`span`,{className:`wui-onboarding-count`,children:H})]})]})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppRequiredMark.js";import a from"./useWuiControl.js";import{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}=e(`AppOtpInput`,s),{value:h,onChange:g,onComplete:_,length:v=6,mode:y=`numeric`,label:b,required:x=!1,hint:S,error:C,disabled:w=!1,name:T,id:E,className:D=``,fieldClassName:O=``,...k}=m;n(`AppOtpInput`,k),t(`AppOtpInput`,`mode`,y,d);let A=c(),j=E||A,M=C?`${j}-error`:void 0,N=S?`${j}-hint`:void 0,P=M||N,{setRef:F}=a({ref:f,value:h??``,onChange:g,on:{complete:e=>_?.(e.detail)}}),I=l(`wui-otp`,{"aria-label":typeof b==`string`?b:void 0,ref:F,id:j,name:T,length:String(v),mode:y,"aria-describedby":P,"aria-invalid":C?`true`:void 0,disabled:w?``:void 0,required:x?``:void 0,className:D||void 0,...k});return!b&&!C&&!S?o(I,p):u(`div`,{...p,className:`field${O?` ${O}`:``}`,children:[b&&u(`label`,{className:`label`,htmlFor:j,children:[b,x&&l(i,{})]}),I,l(r,{error:C,hint:S,errorId:M,hintId:N})]})});export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{BreadcrumbTrailContext as i}from"./AppBreadcrumbs.js";import{formatNumber as a}from"@webority/ui-elements/helpers";import{useEffect as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u=[`primary`,`success`,`warning`,`danger`,`info`],d=[`sm`,`md`,`lg`,`bar`],f=[`start`,`center`],p=[`inline`,`below`],m=[`below`,`inline`],h=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function g(g){let{marker:_,props:v}=e(`AppPageHeader`,g),{title:y,titleSlot:b,as:x=`h1`,subtitle:S,eyebrow:C,icon:w,tone:T=`primary`,status:E,breadcrumbs:D,actions:O,views:k,tools:A,meta:j,metaPlacement:M=`inline`,subtitlePlacement:N=`below`,bulkFor:P,bulk:F,size:I=`md`,align:L=`start`,divider:R=!1,sticky:z=!1,className:B=``,...V}=v;n(`AppPageHeader`,V),t(`AppPageHeader`,`tone`,T,u),t(`AppPageHeader`,`size`,I,d),t(`AppPageHeader`,`align`,L,f),t(`AppPageHeader`,`as`,x,h),t(`AppPageHeader`,`metaPlacement`,M,p),t(`AppPageHeader`,`subtitlePlacement`,N,m);let H=h.includes(x)?x:`h1`,U=I===`bar`,W=U&&M===`below`,G=!U&&N===`inline`,K=[`page-header`,I&&I!==`md`?`page-header-${I}`:``,L===`center`?`page-header-center`:``,R?`page-header-divider`:``,z?`page-header-sticky`:``,T&&T!==`primary`?`tone-${T}`:``,W?`wui-page-header-meta-below`:``,G?`wui-page-header-subtitle-inline`:``,B].filter(Boolean).join(` `),[q,J]=s(0),Y=U?P:void 0;o(()=>{if(!Y)return;document.getElementById(Y)?.setAttribute(`data-wui-bulk-in-bar`,``);let e=e=>{typeof e.detail?.selected==`number`&&document.getElementById(Y)?.contains(e.target)&&J(e.detail.selected)};return document.addEventListener(`selectionchange`,e),()=>{document.removeEventListener(`selectionchange`,e),document.getElementById(Y)?.removeAttribute(`data-wui-bulk-in-bar`)}},[Y]);let X=y!=null||b!=null?c(H,{className:b==null?`page-title`:`page-title wui-page-title-slot`,"aria-label":b!=null&&typeof y==`string`&&y!==``?y:void 0,children:b??y}):null;if(U)return l(`header`,{className:K,"data-wui-page-header-bar":``,"data-wui-bulk-for":P||void 0,..._,...V,children:[D!=null&&c(i.Provider,{value:!0,children:c(`div`,{className:`page-header-bar-crumbs`,children:D})}),X,E!=null&&c(`span`,{className:`page-status`,children:E}),k!=null&&c(`div`,{className:`page-header-bar-views`,"data-wui-bar-swap":``,hidden:P&&q>0?!0:void 0,children:k}),c(`span`,{className:`page-header-bar-spacer`,"aria-hidden":`true`}),j!=null&&!W&&c(`div`,{className:`page-header-bar-meta`,children:j}),A!=null&&c(`div`,{className:`page-header-bar-tools`,"data-wui-bar-swap":``,hidden:P&&q>0?!0:void 0,children:A}),P?l(`div`,{className:`page-header-bar-bulk`,"data-wui-bar-bulk":``,hidden:q===0||void 0,children:[c(`span`,{className:`page-header-bar-bulk-count`,"aria-live":`polite`,children:q>0?`${a(q,{decimals:0})} selected`:``}),F]}):null,O!=null&&c(`div`,{className:`page-actions`,children:O}),j!=null&&W&&c(`div`,{className:`page-header-bar-meta`,children:j})]});let Z=w==null?null:typeof w==`string`?c(r,{name:w,size:20}):w,Q=S==null?null:c(`div`,{className:`page-subtitle`,children:S});return l(`div`,{className:K,..._,...V,children:[D!=null&&c(`div`,{className:`page-breadcrumbs`,children:D}),l(`div`,{className:`page-header-bar`,children:[l(`div`,{className:`page-header-lead`,children:[Z!=null&&c(`span`,{className:`page-header-icon`,children:Z}),l(`div`,{className:`page-header-titles`,children:[C!=null&&c(`div`,{className:`page-eyebrow`,children:C}),l(`div`,{className:`page-titlebar`,children:[X,E!=null&&c(`span`,{className:`page-status`,children:E}),G&&Q]}),!G&&Q]})]}),O!=null&&c(`div`,{className:`page-actions`,children:O})]})]})}export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppRequiredMark.js";import a from"./useWuiControl.js";import{forwardRef as o,useId as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/phone";var u=[`sm`,`md`,`lg`],d=o(function(o,d){let{marker:f,props:p}=e(`AppPhoneNumberInput`,o),{value:m,onChange:h,country:g,disabled:_=!1,name:v,id:y,label:b=`Phone number`,placeholder:x,required:S=!1,hint:C,error:w,showFlag:T=!0,showDialCode:E=!0,size:D=`md`,fieldClassName:O=``,...k}=p;n(`AppPhoneNumberInput`,k),t(`AppPhoneNumberInput`,`size`,D,u);let A=s(),j=y||A,M=w&&j?`${j}-error`:void 0,N=!w&&C&&j?`${j}-hint`:void 0,{setRef:P}=a({ref:d,value:m??``,onChange:h,events:[`input`,`change`]});return l(`div`,{...f,className:`field app-phone-number-input${D===`sm`?` phone-sm`:``}${D===`lg`?` phone-lg`:``}${O?` ${O}`:``}`,children:[b&&l(`label`,{className:`label`,htmlFor:j,children:[b,S&&c(i,{})]}),c(`wui-phone`,{ref:P,id:j,name:v,"aria-label":typeof b==`string`?b:void 0,"aria-describedby":M||N,"aria-invalid":w?`true`:void 0,country:g,placeholder:x,required:S?``:void 0,disabled:_?``:void 0,"hide-flag":T?void 0:``,"hide-dial":E?void 0:``,"external-error":``,...k}),c(r,{error:w,hint:C,errorId:M,hintId:N})]})});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{marker:o,props:s}=e(`AppPricingCard`,a),{name:c,price:l,unit:u,tagline:d,features:f=[],cta:p,featured:m=!1,current:h=!1,badge:g=`Most popular`,className:_=``,...v}=s;return t(`AppPricingCard`,v),i(`div`,{className:[`plan-card`,m?`featured`:``,h?`current`:``,_].filter(Boolean).join(` `),...o,...v,children:[m&&g&&r(`span`,{className:`plan-badge`,children:g}),r(`div`,{className:`plan-name`,children:c}),i(`div`,{className:`plan-price`,children:[l,u&&r(`span`,{className:`plan-price-unit`,children:u})]}),d&&r(`div`,{className:`plan-tagline`,children:d}),f.length>0&&r(`ul`,{className:`plan-features`,children:f.map((e,t)=>{let a=e.included!==!1;return i(`li`,{className:a?void 0:`excluded`,children:[r(`span`,{className:`plan-feature-icon`,children:r(n,{name:a?`check`:`x`,size:16})}),e.text]},e.text?`feat-${t}-${e.text}`:`feat-${t}`)})}),p&&r(`div`,{className:`plan-cta`,children:p})]})}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{cloneElement as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=[`sm`,`md`],s=[`info`,`success`,`warning`,`danger`,`neutral`];function c(e,t){if(!(t>0))return 0;let n=Math.min(100,Math.max(0,e/t*100));return Number(n.toFixed(2))}function l(l){let{marker:u,props:d}=e(`AppProgress`,l),{value:f=0,max:p=100,tone:m=`info`,size:h=`md`,label:g,showLabel:_=!1,striped:v=!1,animated:y=!1,indeterminate:b=!1,className:x=``,...S}=d;n(`AppProgress`,S),t(`AppProgress`,`tone`,m,s),t(`AppProgress`,`size`,h,o);let C=s.includes(m)?m:`info`,w=c(f,p),T=!b&&_&&!!g,E=`progress${h===`sm`?` progress-sm`:``}${!T&&x?` ${x}`:``}`,D=[`progress-bar`,`wui-progress-${C}`,v||y?`progress-bar-striped`:``,y?`progress-bar-animated`:``,b?`wui-progress-indeterminate`:``].filter(Boolean).join(` `),O=i(`div`,{className:E,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":p,...b?{}:{"aria-valuenow":f},"aria-label":g||void 0,...S,children:i(`div`,{className:D,style:b?void 0:{width:`${w}%`}})});return T?a(`div`,{...u,className:`wui-progress-labelled${x?` ${x}`:``}`,children:[i(`div`,{className:`wui-progress-label`,"aria-hidden":`true`,children:g}),O]}):r(O,u)}export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{encodeQr as n,qrSvgPath as r}from"../lib/qrCode.js";import{useMemo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=4;function c(c){let{marker:l,props:u}=e(`AppQrCode`,c),{value:d,size:f=240,title:p=`QR code`,className:m,style:h,...g}=u;t(`AppQrCode`,g);let _=i(()=>{if(!d)return null;let e=n(String(d));return{modules:e.size+s*2,path:r(e,s)}},[d]);if(!_)return null;let{modules:v,path:y}=_,b=Math.max(1,Math.floor(Number(f)/v)||1)*v;return o(`svg`,{viewBox:`0 0 ${v} ${v}`,width:b,height:b,role:`img`,"aria-label":p,shapeRendering:`crispEdges`,className:m||void 0,style:h,...l,...g,children:[a(`rect`,{width:v,height:v,fill:`#ffffff`}),a(`path`,{d:y,fill:`#000000`})]})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"../lib/CheckField.js";import{forwardRef as r}from"react";import{jsx as i}from"react/jsx-runtime";var a=r(function(r,a){let{marker:o,props:s}=e(`AppRadio`,r),{label:c,id:l,name:u,error:d,hint:f,className:p=``,...m}=s;return t(`AppRadio`,m),i(n,{rootProps:o,ref:a,label:c,id:l,name:u,error:d,hint:f,className:p,rest:m,inputType:`radio`,wrapperClass:`form-check`})});export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import{useId as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l=[`default`,`card`];function u(u){let{marker:d,props:f}=e(`AppRadioGroup`,u),{label:p,options:m=[],name:h,value:g,defaultValue:_,onChange:v,variant:y=`default`,inline:b=!1,required:x=!1,disabled:S=!1,error:C,hint:w,help:T,helpLabel:E=`More information`,id:D,className:O=``,fieldClassName:k=``,style:A,...j}=f;n(`AppRadioGroup`,j),t(`AppRadioGroup`,`variant`,y,l);let M=o(),N=D||M,P=h||N,F=`${N}-error`,I=`${N}-hint`,L=g!==void 0;return c(`div`,{...d,className:`field${k?` ${k}`:``}`,children:[p!=null&&c(`span`,{className:`label`,id:`${N}-label`,children:[p,x&&s(a,{}),T&&s(i,{label:E,children:T})]}),s(`div`,{className:[`wui-radio-group`,y===`card`?`wui-radio-group-card`:``,b?`wui-radio-group-inline`:``,O].filter(Boolean).join(` `),style:A,id:N,role:`radiogroup`,"aria-labelledby":p==null?void 0:`${N}-label`,"aria-required":x?`true`:void 0,"aria-invalid":C?`true`:void 0,"aria-describedby":C?F:w?I:void 0,...j,children:m.map((e,t)=>{let n=`${N}-${t}`,r=e.description==null?void 0:`${n}-desc`;return c(`div`,{className:`form-check`,children:[s(`input`,{type:`radio`,className:`form-check-input`,id:n,name:P,value:e.value,disabled:S||e.disabled||void 0,required:x||void 0,"aria-describedby":r,...L?{checked:g===e.value,onChange:()=>v?.(e.value)}:{defaultChecked:_===e.value,onChange:()=>v?.(e.value)}}),s(`label`,{className:`form-check-label`,htmlFor:n,children:e.label}),r&&s(`div`,{className:`wui-radio-option-desc`,id:r,children:e.description})]},e.value)})}),s(r,{error:C,hint:w,errorId:F,hintId:I})]})}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import i from"../lib/FieldMessage.js";import a from"./AppRequiredMark.js";import{useId as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/rating";var u={sm:16,md:20,lg:28},d=e=>String(Math.round(e*100)/100),f=(e,t,n)=>e>=t?`full`:n&&e>=t-.5?`half`:`empty`;function p(r){let{marker:p,props:h}=e(`AppRating`,r),{value:g,defaultValue:_,onChange:v,max:y=5,readOnly:b=!1,half:x=!1,showValue:S=!1,size:C=`md`,label:w,name:T,required:E=!1,disabled:D=!1,error:O,hint:k,id:A,className:j=``,fieldClassName:M=``,...N}=h;n(`AppRating`,N),t(`AppRating`,`size`,C,Object.keys(u));let P=o(),[F,I]=s(_),L=u[C]??u.md,R=Array.from({length:y},(e,t)=>t+1),z=(...e)=>[`wui-rating`,`wui-rating-${C}`,...e,j].filter(Boolean).join(` `);if(b){let e=Number.isFinite(Number(g))?Math.min(Math.max(Number(g),0),y):0,t=x?Math.round(e*2)/2:Math.round(e),n=`${typeof w==`string`&&w?`${w}: `:``}${d(e)} out of ${y}`;return l(`span`,{className:z(`wui-rating-display`),id:A,role:`img`,"aria-label":n,...p,...N,children:[c(`span`,{className:`wui-rating-stars`,"aria-hidden":`true`,children:R.map(e=>c(`span`,{className:`wui-rating-star wui-rating-star-${f(t,e,x)}`,children:c(m,{px:L})},e))}),S&&c(`span`,{className:`wui-rating-value`,"aria-hidden":`true`,children:d(e)})]})}let B=A||P,V=T||B,H=`${B}-error`,U=`${B}-hint`,W=Math.round(Number(g===void 0?F:g))||0,G=e=>{I(e),v?.(e)};return l(`div`,{...p,className:`field${M?` ${M}`:``}`,children:[w!=null&&l(`span`,{className:`label`,id:`${B}-label`,children:[w,E&&c(a,{})]}),c(`wui-rating`,{class:z(`wui-rating-input`),id:B,role:`radiogroup`,"aria-labelledby":w==null?void 0:`${B}-label`,"aria-label":w==null?`Rating`:void 0,"aria-required":E?`true`:void 0,"aria-invalid":O?`true`:void 0,"aria-describedby":O?H:k?U:void 0,disabled:D?``:void 0,...N,children:R.map(e=>l(`label`,{className:`wui-rating-star wui-rating-star-${W>=e?`full`:`empty`}`,"data-value":e,children:[c(`input`,{type:`radio`,className:`visually-hidden`,name:V,value:e,"aria-label":`${e} ${e===1?`star`:`stars`}`,checked:W===e,onChange:()=>G(e),disabled:D||void 0,required:E||void 0}),c(m,{px:L})]},e))}),c(i,{error:O,hint:k,errorId:H,hintId:U})]})}function m({px:e}){return l(`span`,{className:`wui-rating-glyphs`,"aria-hidden":`true`,children:[c(r,{name:`star`,size:e}),c(`span`,{className:`wui-rating-fill`,children:c(r,{name:`star`,variant:`bold`,size:e})})]})}export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppActionIcon.js";import{formatNumber as r}from"@webority/ui-elements/helpers";import{jsx as i,jsxs as a}from"react/jsx-runtime";import"@webority/ui-elements/elements/record-pager";var o=e=>r(e,{decimals:0});function s(r){let{marker:s,props:c}=e(`AppRecordPager`,r),{index:l,total:u,prevHref:d,onPrev:f,nextHref:p,onNext:m,prevLabel:h=`Previous`,nextLabel:g=`Next`,keys:_=!1,className:v=``,...y}=c;t(`AppRecordPager`,y);let b=Number(l),x=Number(u),S=Number.isInteger(b)&&Number.isInteger(x)&&b>=1&&b<=x,C=S&&b>1&&!!(d||f),w=S&&b<x&&!!(p||m);return a(`wui-record-pager`,{class:[`wui-record-pager`,v].filter(Boolean).join(` `),keys:_?``:void 0,...s,...y,children:[i(`span`,{className:`wui-record-pager-position`,"aria-live":`polite`,children:S?`${o(b)} of ${o(x)}`:``}),i(n,{icon:`chevron-left`,label:h,size:18,className:`wui-record-pager-prev`,href:d||void 0,onClick:f,disabled:!C,shortcut:_?`K`:void 0}),i(n,{icon:`chevron-right`,label:g,size:18,className:`wui-record-pager-next`,href:p||void 0,onClick:m,disabled:!w,shortcut:_?`J`:void 0})]})}export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./withTooltip.js";import{EMPTY_VALUE as r,formatDate as i,toInstant as a}from"@webority/ui-elements/helpers";import{jsx as o}from"react/jsx-runtime";import{relativeTimeTitle as s}from"@webority/ui-elements/elements/relative-time";function c(c){let{marker:l,props:u}=e(`AppRelativeTime`,c),{value:d,tooltipPlacement:f=`auto`,className:p=``,...m}=u;t(`AppRelativeTime`,m);let h=a(d),g=Number.isFinite(h),_=g?typeof d==`string`?d.trim():new Date(h).toISOString():void 0;return n(o(`wui-relative-time`,{class:[`wui-relative-time`,p].filter(Boolean).join(` `),...l,...m,children:o(`time`,{dateTime:_,children:g?i(h):r})}),g?s(h):void 0,f)}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppActionIcon.js";import r from"./AppButton.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o(o){let{marker:s,props:c}=e(`AppRepeater`,o),{rows:l=[],renderRow:u,rowLabel:d,onAdd:f,onRemove:p,addLabel:m=`Add another`,addVariant:h=`secondary`,removeLabel:g=`Remove row`,emptyText:_,min:v=0,max:y,numbered:b=!0,className:x=``,...S}=c;t(`AppRepeater`,S);let C=typeof y==`number`&&l.length>=y,w=!!p&&l.length>v;return a(`div`,{className:`repeater${x?` ${x}`:``}`,...s,...S,children:[l.length===0&&_&&i(`div`,{className:`repeater-empty`,children:_}),l.map((e,t)=>{let r=d?d(e,t):null;return a(`div`,{className:`repeater-row`,children:[(!!r||w)&&i(`span`,{className:`repeater-row-label`,children:r}),b&&i(`span`,{className:`repeater-index`,children:t+1}),i(`div`,{className:`repeater-body`,children:u(e,t)}),w&&i(n,{icon:`trash-2`,label:`${g} ${t+1}`,danger:!0,className:`repeater-remove`,onClick:()=>p(t)})]},e.id??t)}),i(r,{variant:h,size:`sm`,leftIcon:`plus`,className:`repeater-add`,disabled:C,onClick:f,children:m})]})}export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{createContext as r,useEffect as i,useRef as a}from"react";import{jsx as o}from"react/jsx-runtime";import"@webority/ui-elements/elements/resizable";var s=[`horizontal`,`vertical`],c=r(`horizontal`);function l(r){let{marker:l,props:u}=e(`AppResizable`,r),{direction:d=`horizontal`,storageKey:f,onChange:p,children:m,className:h=``,...g}=u;n(`AppResizable`,g),t(`AppResizable`,`direction`,d,s);let _=a(null),v=d===`vertical`;return i(()=>{let e=_.current;if(!e||!p)return;let t=t=>{t.target===e&&p(t.detail.sizes)};return e.addEventListener(`wui-resizable:change`,t),()=>e.removeEventListener(`wui-resizable:change`,t)},[p]),o(c.Provider,{value:v?`vertical`:`horizontal`,children:o(`wui-resizable`,{ref:_,class:[`wui-resizable`,h].filter(Boolean).join(` `),direction:v?`vertical`:`horizontal`,"storage-key":f||void 0,...l,...g,children:m})})}export{c as ResizableDirection,l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{ResizableDirection as n}from"./AppResizable.js";import{useContext as r}from"react";import{jsx as i}from"react/jsx-runtime";function a(a){let{marker:o,props:s}=e(`AppResizableHandle`,a),{label:c=`Resize panels`,className:l=``,...u}=s;t(`AppResizableHandle`,u);let d=r(n);return i(`div`,{className:[`wui-resizable-handle`,l].filter(Boolean).join(` `),role:`separator`,tabIndex:0,"aria-orientation":d===`vertical`?`horizontal`:`vertical`,"aria-label":c,...o,...u})}export{a as default};
|