@webority/ui-react 0.83.6 → 0.84.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/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/AppAvatarPicker.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/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/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/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/AppInfoList.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/AppLogoPicker.js +1 -1
- package/dist/components/AppMarkdown.js +1 -1
- package/dist/components/AppMentionInput.js +1 -1
- package/dist/components/AppMenubar.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/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/AppPagination.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/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/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/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/AppSelectMini.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/AppSidebarMenu.js +1 -1
- package/dist/components/AppSkeleton.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/AppTableEmptyState.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/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/lib/CheckField.js +1 -1
- package/dist/lib/wuiMarker.js +1 -0
- package/dist/types/components/AppAccordion.d.ts +1 -1
- package/dist/types/components/AppActionIcon.d.ts +1 -1
- package/dist/types/components/AppAlert.d.ts +1 -1
- package/dist/types/components/AppAsyncBlock.d.ts +1 -1
- package/dist/types/components/AppAvatar.d.ts +1 -1
- package/dist/types/components/AppAvatarGroup.d.ts +1 -8
- package/dist/types/components/AppAvatarPicker.d.ts +1 -1
- package/dist/types/components/AppBadge.d.ts +1 -1
- package/dist/types/components/AppBanner.d.ts +1 -1
- package/dist/types/components/AppBreadcrumbs.d.ts +1 -1
- package/dist/types/components/AppButton.d.ts +1 -1
- package/dist/types/components/AppButtonGroup.d.ts +1 -1
- package/dist/types/components/AppCard.d.ts +1 -1
- package/dist/types/components/AppCarousel.d.ts +1 -1
- package/dist/types/components/AppChartCard.d.ts +1 -1
- package/dist/types/components/AppChip.d.ts +1 -1
- package/dist/types/components/AppChipGroup.d.ts +1 -1
- package/dist/types/components/AppChoiceCard.d.ts +1 -4
- package/dist/types/components/AppChoiceChip.d.ts +1 -1
- package/dist/types/components/AppCodeBlock.d.ts +1 -1
- package/dist/types/components/AppColorField.d.ts +1 -1
- package/dist/types/components/AppColumnMenu.d.ts +1 -1
- package/dist/types/components/AppCommandPalette.d.ts +1 -1
- package/dist/types/components/AppCommentThread.d.ts +1 -1
- package/dist/types/components/AppCompareTable.d.ts +1 -1
- package/dist/types/components/AppConfirmDialog.d.ts +1 -20
- package/dist/types/components/AppConsentBanner.d.ts +1 -1
- package/dist/types/components/AppContextMenu.d.ts +1 -1
- package/dist/types/components/AppCopyButton.d.ts +1 -1
- package/dist/types/components/AppDashboardCell.d.ts +1 -1
- package/dist/types/components/AppDashboardGrid.d.ts +1 -1
- package/dist/types/components/AppDataTable.d.ts +1 -1
- package/dist/types/components/AppDescriptions.d.ts +1 -1
- package/dist/types/components/AppDrawer.d.ts +1 -1
- package/dist/types/components/AppDropZone.d.ts +1 -1
- package/dist/types/components/AppDropdown.d.ts +1 -1
- package/dist/types/components/AppDueDate.d.ts +1 -1
- package/dist/types/components/AppEmptyState.d.ts +1 -1
- package/dist/types/components/AppErrorSummary.d.ts +1 -1
- package/dist/types/components/AppFileAttachment.d.ts +1 -3
- package/dist/types/components/AppFilePicker.d.ts +1 -1
- package/dist/types/components/AppFilterBar.d.ts +1 -1
- package/dist/types/components/AppFloatingDock.d.ts +1 -1
- package/dist/types/components/AppFormActions.d.ts +1 -1
- package/dist/types/components/AppFormRow.d.ts +1 -1
- package/dist/types/components/AppFormSection.d.ts +1 -1
- package/dist/types/components/AppHoverCard.d.ts +1 -1
- package/dist/types/components/AppIcon.d.ts +1 -1
- package/dist/types/components/AppInfoList.d.ts +1 -1
- package/dist/types/components/AppInfoTip.d.ts +1 -8
- package/dist/types/components/AppInlineEdit.d.ts +1 -1
- package/dist/types/components/AppInputGroup.d.ts +1 -1
- package/dist/types/components/AppKanban.d.ts +1 -1
- package/dist/types/components/AppKbd.d.ts +1 -1
- package/dist/types/components/AppKpiTile.d.ts +1 -1
- package/dist/types/components/AppLightbox.d.ts +1 -1
- package/dist/types/components/AppLink.d.ts +1 -15
- package/dist/types/components/AppLogoPicker.d.ts +1 -33
- package/dist/types/components/AppMarkdown.d.ts +1 -1
- package/dist/types/components/AppMenubar.d.ts +1 -1
- package/dist/types/components/AppMeter.d.ts +1 -1
- package/dist/types/components/AppMetricStrip.d.ts +1 -1
- package/dist/types/components/AppModal.d.ts +1 -1
- package/dist/types/components/AppNavigationMenu.d.ts +1 -1
- package/dist/types/components/AppNotificationCenter.d.ts +1 -1
- package/dist/types/components/AppOnboardingChecklist.d.ts +1 -1
- package/dist/types/components/AppPageHeader.d.ts +1 -1
- package/dist/types/components/AppPagination.d.ts +1 -1
- package/dist/types/components/AppPricingCard.d.ts +1 -1
- package/dist/types/components/AppProgress.d.ts +1 -1
- package/dist/types/components/AppQrCode.d.ts +1 -1
- package/dist/types/components/AppRadioGroup.d.ts +1 -1
- package/dist/types/components/AppRating.d.ts +1 -1
- package/dist/types/components/AppRecordPager.d.ts +1 -1
- package/dist/types/components/AppRelativeTime.d.ts +1 -1
- package/dist/types/components/AppRepeater.d.ts +1 -1
- package/dist/types/components/AppRequiredMark.d.ts +1 -1
- package/dist/types/components/AppResizable.d.ts +1 -1
- package/dist/types/components/AppResizableHandle.d.ts +1 -1
- package/dist/types/components/AppResizablePanel.d.ts +1 -1
- package/dist/types/components/AppResourceCard.d.ts +1 -1
- package/dist/types/components/AppResult.d.ts +1 -1
- package/dist/types/components/AppRollingNumber.d.ts +1 -1
- package/dist/types/components/AppRouteError.d.ts +1 -1
- package/dist/types/components/AppScoreScale.d.ts +1 -1
- package/dist/types/components/AppScrollbar.d.ts +1 -1
- package/dist/types/components/AppSearch.d.ts +1 -2
- package/dist/types/components/AppSectionCallToAction.d.ts +1 -1
- package/dist/types/components/AppSectionFaq.d.ts +1 -1
- package/dist/types/components/AppSectionFeatures.d.ts +1 -1
- package/dist/types/components/AppSectionHero.d.ts +1 -1
- package/dist/types/components/AppSectionLogos.d.ts +1 -1
- package/dist/types/components/AppSectionPricing.d.ts +1 -1
- package/dist/types/components/AppSectionTestimonials.d.ts +1 -1
- package/dist/types/components/AppSegmented.d.ts +1 -1
- package/dist/types/components/AppSelectMini.d.ts +1 -15
- package/dist/types/components/AppShell.d.ts +1 -1
- package/dist/types/components/AppShortcutLegend.d.ts +1 -1
- package/dist/types/components/AppShowMore.d.ts +1 -1
- package/dist/types/components/AppSidebarMenu.d.ts +1 -22
- package/dist/types/components/AppSkeleton.d.ts +1 -1
- package/dist/types/components/AppSparkline.d.ts +1 -1
- package/dist/types/components/AppSpinner.d.ts +1 -1
- package/dist/types/components/AppSplash.d.ts +1 -1
- package/dist/types/components/AppSplitButton.d.ts +1 -1
- package/dist/types/components/AppSplitView.d.ts +1 -1
- package/dist/types/components/AppStatusBadge.d.ts +1 -1
- package/dist/types/components/AppStepper.d.ts +1 -1
- package/dist/types/components/AppTableEmptyState.d.ts +1 -1
- package/dist/types/components/AppTablePagination.d.ts +1 -1
- package/dist/types/components/AppTableToolbar.d.ts +1 -1
- package/dist/types/components/AppTabs.d.ts +1 -1
- package/dist/types/components/AppThemeToggle.d.ts +1 -1
- package/dist/types/components/AppTimeline.d.ts +1 -1
- package/dist/types/components/AppToast.d.ts +1 -1
- package/dist/types/components/AppToolbar.d.ts +1 -1
- package/dist/types/components/AppTruncate.d.ts +1 -1
- package/dist/types/components/AppUpdateBar.d.ts +1 -1
- package/dist/types/components/AppWhatsNew.d.ts +1 -1
- package/dist/types/components/AppWorkspaceSwitcher.d.ts +1 -1
- package/dist/types/lib/wuiMarker.d.ts +26 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppRecordPager.js";import i from"./AppShortcutLegend.js";import{LIST_KEYS as a,SELECT_KEY as o,shortcutKey as s}from"@webority/ui-elements/helpers";import{useEffect as ee,useRef as c}from"react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";var f={sm:576,md:768,lg:992,xl:1200,xxl:1400},p=Object.keys(f),m=[3,4,5,6,7,8],h=6,g=`.wui-split-items > .wui-split-item > .wui-split-link`,_=(e,t)=>e!=null&&String(e)===String(t),v=e=>{let t=window.matchMedia?.(`(min-width: ${f[e]}px)`);return!t||t.matches},y=e=>typeof e==`string`||typeof e==`number`?String(e):`item`;function b(b){let{items:x=[],currentKey:S,onSelect:C,selectable:w=!1,selectedKeys:T,onToggle:E,onToggleAll:D,bulkActions:O,header:k,chips:A,pane:j,paneHeader:M,pager:te=!0,shortcuts:ne,shortcutsEnabled:N=!0,empty:re=`Nothing here yet.`,loading:P=!1,listWidth:F=5,stackBelow:I=`xl`,className:L=``,...R}=b;n(`AppSplitView`,R),t(`AppSplitView`,`stackBelow`,I,p),t(`AppSplitView`,`listWidth`,F,m);let z=f[I]?I:`xl`,B=m.includes(F)?F:5,V=c(null),H=S!=null,U=w?T?.size??0:0,W=U>0,G=w&&x.length>0&&x.every(e=>T?.has(e.key)),K=w&&!G&&x.some(e=>T?.has(e.key)),q=e=>{e&&(e.indeterminate=K)},J=c(!1);ee(()=>{if(!J.current){J.current=!0;return}S!=null&&V.current?.querySelector(`.wui-split-link[aria-current="true"]`)?.scrollIntoView?.({block:`nearest`})},[S]);let Y=(e,t)=>{t.button>0||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||C&&(e.href&&!v(z)||(t.preventDefault(),C(e.key)))},X=e=>{let t=[...V.current?.querySelectorAll(g)??[]];t[t.findIndex(e=>e.getAttribute(`aria-current`)===`true`)+e]?.click()},ie=[`wui-split-view`,H?`wui-split-reading`:``,L].filter(Boolean).join(` `),ae=w?[...a,o]:a,oe=new Set([`J`,`K`,`Enter`,`?`,...w?[`X`]:[]]),se=[...ae,...(ne??[]).filter(e=>!oe.has(s(e.key))).map(e=>({key:e.key,label:e.label,onPress:()=>e.onPress?.(S)}))],Z=x.findIndex(e=>_(S,e.key)),Q=te&&!P&&x.length>0?u(r,{"data-split-pager":``,index:Z>=0?Z+1:void 0,total:x.length,onPrev:()=>X(-1),onNext:()=>X(1),prevLabel:`Previous item`,nextLabel:`Next item`}):null,ce=e=>{let t=_(S,e.key),n=w&&!!T?.has(e.key),r=e.badge!==void 0&&e.badge!==null&&e.badge!==``,i=d(l,{children:[d(`span`,{className:`wui-split-item-main`,children:[u(`span`,{className:`wui-split-item-title`,children:e.title}),e.meta!==void 0&&e.meta!==null&&u(`span`,{className:`wui-split-item-meta`,children:e.meta})]}),(e.trailing||r)&&d(`span`,{className:`wui-split-item-end`,children:[e.trailing,r&&u(`span`,{className:`wui-split-badge`,children:e.badge})]})]});return d(`li`,{className:[`wui-split-item`,t?`is-active`:``,n?`is-selected`:``].filter(Boolean).join(` `),"data-key":e.key,children:[w&&u(`input`,{type:`checkbox`,className:`wui-check wui-split-check`,checked:n,onChange:()=>E?.(e.key),"aria-label":`Select ${y(e.title)}`}),e.href?u(`a`,{className:`wui-split-link`,href:e.href,"aria-current":t?`true`:void 0,onClick:t=>Y(e,t),children:i}):u(`button`,{type:`button`,className:`wui-split-link`,"aria-current":t?`true`:void 0,onClick:t=>Y(e,t),children:i})]},e.key)},$;return $=P?d(`div`,{className:`wui-split-items`,"aria-busy":`true`,tabIndex:0,children:[u(`span`,{className:`visually-hidden`,children:`Loading`}),Array.from({length:h},(e,t)=>d(`div`,{className:`wui-split-skeleton`,"aria-hidden":`true`,children:[u(`span`,{className:`skeleton wui-split-skeleton-title`}),u(`span`,{className:`skeleton wui-split-skeleton-meta`})]},t))]}):x.length?u(`ul`,{className:`wui-split-items`,"aria-label":`Items`,children:x.map(ce)}):u(`div`,{className:`wui-split-empty`,children:re}),d(`div`,{ref:V,className:ie,"data-stack-below":z,"data-list-width":B,"data-shortcut-scope":N?``:void 0,...e(`AppSplitView`,b),...R,children:[d(`div`,{className:`wui-split-list`,children:[(k||w)&&d(`div`,{className:`wui-split-head`,children:[w&&u(`input`,{ref:q,type:`checkbox`,className:`wui-check wui-split-all`,checked:G,onChange:e=>D?.(e.target.checked),"aria-label":`Select all items`}),u(`div`,{className:`wui-split-head-main`,hidden:W,children:k}),w&&d(`div`,{className:`wui-split-head-bulk`,hidden:!W,children:[d(`span`,{className:`wui-split-count`,"aria-live":`polite`,children:[U,` selected`]}),O]})]}),A&&u(`div`,{className:`wui-split-chips`,children:A}),$,N&&d(`div`,{className:`wui-split-legend`,children:[d(`span`,{children:[u(`kbd`,{className:`wui-kbd`,children:`J`}),` `,u(`kbd`,{className:`wui-kbd`,children:`K`}),` Move`]}),d(`span`,{children:[u(`kbd`,{className:`wui-kbd`,children:`Enter`}),` Open`]}),u(i,{items:g,shortcuts:se})]})]}),d(`div`,{className:`wui-split-pane`,children:[(M||Q)&&d(`div`,{className:`wui-split-pane-head`,children:[M,Q]}),u(`section`,{className:`wui-split-pane-body`,"aria-label":`Reading pane`,tabIndex:0,children:j})]})]})}export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./withTooltip.js";import{jsx as i}from"react/jsx-runtime";var a=[`neutral`,`primary`,`success`,`warning`,`danger`,`info`];function o(o){let{label:s,tone:c=`neutral`,className:l=``,tooltip:u,tooltipPlacement:d,...f}=o;return n(`AppStatusBadge`,f),t(`AppStatusBadge`,`tone`,c,a),s==null||s===``?`-`:r(i(`span`,{className:`status-label ${c}${l?` ${l}`:``}`,...e(`AppStatusBadge`,o),...f,children:s}),u,d)}export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{Fragment as i,jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`steps`,`journey`],c=[`horizontal`,`vertical`],l=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],u=[`sm`,`md`,`lg`],d=[`primary`,`info`],f={sm:12,md:14,lg:18},p=[`done`,`active`,`pending`,`error`];function m(m){let{steps:g=[],variant:_=`steps`,orientation:v=`horizontal`,iconVariant:y,size:b=`md`,iconSize:x,activeStep:S,onStepClick:C,label:w=`Progress`,tone:T=`primary`,linkComponent:E,className:D=``,...O}=m;n(`AppStepper`,O),t(`AppStepper`,`variant`,_,s),t(`AppStepper`,`orientation`,v,c),t(`AppStepper`,`iconVariant`,y,l),t(`AppStepper`,`size`,b,u),t(`AppStepper`,`tone`,T,d);let k=x>0?x:f[b]??f.md;for(let e of g)t(`AppStepper`,`steps[].status`,e.status,p);let A=_===`journey`;return a(`nav`,{className:[`stepper`,A&&`stepper-journey`,v===`vertical`&&`stepper-vertical`,b!==`md`&&u.includes(b)&&`wui-step-size-${b}`,T!==`primary`&&d.includes(T)&&`wui-step-tone-${T}`,D].filter(Boolean).join(` `),"aria-label":w,...e(`AppStepper`,m),...O,children:g.map((e,t)=>{let n=e.status||h(t,S),s=`step${n===`pending`?``:` ${n}`}`,c;c=n===`done`?a(r,{name:`check`,size:k,variant:y}):n===`error`?a(r,{name:`alert-triangle`,size:k,variant:y}):e.icon?a(r,{name:e.icon,size:k,variant:y}):t+1;let l=o(i,{children:[a(`span`,{className:`step-circle`,children:c}),A?o(`span`,{className:`step-text`,children:[a(`span`,{className:`step-index`,children:`Step ${t+1}`}),a(`span`,{className:`step-label`,children:e.label}),e.description?a(`span`,{className:`step-desc`,children:e.description}):null]}):o(i,{children:[a(`span`,{className:`step-label`,children:e.label}),e.description?a(`span`,{className:`step-desc`,children:e.description}):null]})]}),u=n===`active`?`step`:void 0,d=e.key??`${e.label}-${t}`,f;return f=C?a(`button`,{type:`button`,className:s,"aria-current":u,onClick:()=>C(e,t),children:l},d):e.href?E?a(E,{className:s,to:e.href,"aria-current":u,children:l},d):a(`a`,{className:s,href:e.href,"aria-current":u,children:l},d):a(`div`,{className:s,"aria-current":u,children:l},d),A&&t<g.length-1?[f,a(`span`,{className:`step-line${n===`done`?` done`:``}`,"aria-hidden":`true`},`${d}-line`)]:f})})}function h(e,t){return typeof t==`number`?e<t?`done`:e===t?`active`:`pending`:`pending`}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/CheckField.js";import{forwardRef as i}from"react";import{jsx as a}from"react/jsx-runtime";var o=[`round`,`pill`,`circle`],s=i(function(i,s){let{label:c,id:l,name:u,error:d,hint:f,shape:p=`round`,className:m=``,...h}=i;n(`AppSwitch`,h),t(`AppSwitch`,`shape`,p,o);let g=`form-check form-switch${p===`circle`?` form-switch-circle`:p===`pill`?` form-switch-pill`:``}`;return a(r,{rootProps:e(`AppSwitch`,i),ref:s,label:c,id:l,name:u,error:d,hint:f,className:m,rest:h,inputType:`checkbox`,wrapperClass:g})});export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./renderIconProp.js";import i,{ILLUSTRATION_NAMES as a}from"../lib/emptyIllustration.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c(c){let{icon:l,illustration:u,title:d,text:f,action:p,...m}=c;n(`AppTableEmptyState`,m),typeof u==`string`&&t(`AppTableEmptyState`,`illustration`,u,a);let h=typeof u==`string`&&a.includes(u),g=u!=null&&typeof u!=`string`?u:null;return s(`div`,{className:`tbl-empty`,...e(`AppTableEmptyState`,c),...m,children:[h?o(i,{name:u,className:`wui-empty-illustration`}):g?o(`span`,{className:`wui-empty-illustration wui-empty-illustration-custom`,"aria-hidden":`true`,children:g}):o(`span`,{className:`tbl-empty-icon`,children:r(l,{size:24})}),o(`div`,{className:`tbl-empty-title`,children:d}),f&&o(`div`,{className:`tbl-empty-text`,children:f}),p&&o(`div`,{className:`tbl-empty-action`,children:p})]})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{pageWindow as i}from"../lib/pageWindow.js";import a from"./AppSelectMini.js";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`numbered`,`prev-next`],l=[5,10,25,50];function u(u){let{page:d,totalPages:f,pageSize:p,onPageChange:m,onPageSizeChange:h,pageSizes:g=l,mode:_=`numbered`,showPageSize:v=!0,className:y=``,...b}=u;n(`AppTablePagination`,b),t(`AppTablePagination`,`mode`,_,c);let x=_===`numbered`,S=x?i(d,f):null;return s(`div`,{className:`table-pagination${y?` ${y}`:``}`,...e(`AppTablePagination`,u),...b,children:[v&&o(`span`,{className:`tpg-rows`,children:o(a,{value:p,onChange:e=>h(Number(e)),ariaLabel:`Rows per page`,options:g.map(e=>({value:e,label:`${e} per page`}))})}),!x&&s(`span`,{className:`tpg-range`,children:[`Page `,d,` of `,f]}),s(`div`,{className:`tpg-nav`,children:[o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>m(Math.max(1,d-1)),disabled:d<=1,"aria-label":`Previous page`,children:o(r,{name:`arrow-left`,size:18})}),x&&S.map(e=>typeof e==`number`?o(`button`,{type:`button`,className:`tpg-page${e===d?` is-active`:``}`,onClick:()=>m(e),"aria-current":e===d?`page`:void 0,"aria-label":`Page ${e}`,children:e},e):o(`span`,{className:`tpg-ellipsis`,"aria-hidden":`true`,children:`…`},e)),o(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>m(Math.min(f,d+1)),disabled:d>=f,"aria-label":`Next page`,children:o(r,{name:`arrow-right`,size:18})})]})]})}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnUnknownProps.js";import{formatNumber as
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{formatNumber as n}from"@webority/ui-elements/helpers";import{jsx as r,jsxs as i}from"react/jsx-runtime";function a(a){let{filters:o,actions:s,selectedCount:c=0,bulkActions:l,onClearSelection:u,totalCount:d,pageCount:f,onSelectAllMatching:p,allMatchingSelected:m=!1,className:h=``,...g}=a;t(`AppTableToolbar`,g);let _=c>0,v=typeof p==`function`&&typeof d==`number`,y=v&&m,b=e=>n(e,{decimals:0}),x=v&&!y&&_&&c>=(f??1)&&d>(f??c);return i(`div`,{className:`wui-table-toolbar${h?` ${h}`:``}`,...e(`AppTableToolbar`,a),...g,children:[i(`div`,{className:`wui-table-toolbar-main`,hidden:_,children:[r(`div`,{className:`wui-table-toolbar-filters`,children:o}),r(`div`,{className:`wui-table-toolbar-actions`,children:s})]}),i(`div`,{className:`wui-table-toolbar-bulk`,hidden:!_,children:[i(`span`,{className:`wui-table-toolbar-count`,"aria-live":`polite`,children:[y?`All ${b(d)}`:b(c),` selected`]}),v&&i(`button`,{type:`button`,className:`btn btn-link btn-sm wui-table-toolbar-all`,hidden:!x,onClick:p,children:[`Select all `,b(d),` matching`]}),l,u&&r(`button`,{type:`button`,className:`btn btn-ghost btn-sm wui-table-toolbar-clear`,onClick:u,children:y?`Clear selection`:`Clear`})]})]})}export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppTooltip.js";import i from"./AppIcon.js";import a from"./renderIconProp.js";import{formatNumber as o}from"@webority/ui-elements/helpers";import{cloneElement as s,useCallback as c,useEffect as l,useLayoutEffect as u,useRef as d,useState as ee}from"react";import{Fragment as f,jsx as p,jsxs as m}from"react/jsx-runtime";import"@webority/ui-elements/elements/overflow";var h=[`underline`,`pills`],g=[`horizontal`,`vertical`],te=[`sm`,`md`,`lg`],ne=[`automatic`,`manual`],re=[`scroll`,`menu`],_=[`success`,`warning`,`danger`,`info`],v=1,y=28,b=.7;function x(x){let{tabs:S,value:C,onChange:w,linkComponent:T,variant:E=`underline`,orientation:D=`horizontal`,size:O=`md`,fitted:k=!1,overflow:A=`scroll`,moreLabel:j=`More`,maxVisible:M,activation:N=`automatic`,ariaLabel:ie,className:ae=``,style:P,...F}=x;n(`AppTabs`,F),t(`AppTabs`,`variant`,E,h),t(`AppTabs`,`orientation`,D,g),t(`AppTabs`,`size`,O,te),t(`AppTabs`,`activation`,N,ne),t(`AppTabs`,`overflow`,A,re);for(let e of S)t(`AppTabs`,`tabs[].tone`,e.tone,_);let I=d(null),L=d(null),R=D===`vertical`,z=(A===`menu`||M!=null)&&!R,[B,V]=ee(C);l(()=>{V(C)},[C]);let H=S.find(e=>!e.disabled)?.key,U=S.some(e=>e.key===B&&!e.disabled)?B:void 0,W=S.some(e=>e.key===C&&!e.disabled)?C:void 0,G=U??W??H,K=e=>{I.current?.querySelector(`[data-key="${CSS.escape(String(e))}"]`)?.focus()},q=c(()=>{let e=I.current,t=L.current;if(!e||!t||R||z)return;let n=e.scrollWidth-e.clientWidth;t.classList.toggle(`is-overflow-start`,e.scrollLeft>v),t.classList.toggle(`is-overflow-end`,n>v&&e.scrollLeft<n-v)},[R,z]),J=c(()=>{let e=I.current;if(!e)return;let t=e.querySelector(`.app-tab.active`);t?(R?(e.style.setProperty(`--wui-tab-y`,`${t.offsetTop}px`),e.style.setProperty(`--wui-tab-h`,`${t.offsetHeight}px`)):(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.toggleAttribute(`data-active-danger`,!!S.find(e=>e.key===C)?.danger)):e.style.setProperty(R?`--wui-tab-h`:`--wui-tab-w`,`0px`),e.setAttribute(`data-wui-tabs`,``),q()},[R,S,C,q]),Y=e=>!z||!I.current?.querySelector(`[data-key="${CSS.escape(String(e))}"][data-wui-overflow-hidden]`),X=c(()=>{let e=I.current;if(!e||R)return;let t=e.querySelector(`.app-tab.active`);if(!t)return;let n=y,r=t.offsetLeft,i=r+t.offsetWidth;r-n<e.scrollLeft?e.scrollLeft=Math.max(0,r-n):i+n>e.scrollLeft+e.clientWidth&&(e.scrollLeft=i+n-e.clientWidth)},[R]);u(()=>{J()},[J]),u(()=>{X()},[C,X]);let Z=d(J);l(()=>{Z.current=J},[J]),l(()=>{if(!document.fonts)return;let e=!0;return document.fonts.ready.then(()=>{e&&Z.current()}),()=>{e=!1}},[]),l(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>Z.current());return I.current&&e.observe(I.current),L.current&&e.observe(L.current),()=>e.disconnect()},[R,z]),l(()=>{let e=L.current;if(!z||!e)return;let t=()=>Z.current();return e.addEventListener(`wui-overflow-change`,t),()=>e.removeEventListener(`wui-overflow-change`,t)},[z]);function oe(e){let t=e.target?.dataset?.key;if(t==null)return;let n=S.findIndex(e=>e.key===t);if(n<0)return;let r=S.length,i=(e,t)=>{for(let n=1;n<=r;n++){let i=S[((e+t*n)%r+r)%r];if(!i.disabled&&Y(i.key))return i}return null},a=R?`ArrowDown`:`ArrowRight`,o=R?`ArrowUp`:`ArrowLeft`,s=null;if(e.key===a?s=i(n,1):e.key===o?s=i(n,-1):e.key===`Home`?s=S.find(e=>!e.disabled&&Y(e.key))??null:e.key===`End`&&(s=[...S].reverse().find(e=>!e.disabled&&Y(e.key))??null),!s)return;e.preventDefault(),V(s.key),K(s.key);let c=s.href!=null||s.to!=null;N===`automatic`&&!c&&w?.(s.key)}let Q=e=>{let t=I.current;t&&t.scrollBy({left:e*t.clientWidth*b})},se=[`app-tabs`,E===`pills`?`app-tabs-pills`:``,R?`app-tabs-vertical`:``,O===`sm`?`app-tabs-sm`:``,O===`lg`?`app-tabs-lg`:``,k?`app-tabs-fitted`:``,ae].filter(Boolean).join(` `),$=m(`div`,{ref:I,role:`tablist`,"aria-orientation":R?`vertical`:void 0,"aria-label":ie,className:se,style:P,"data-wui-overflow-list":z?``:void 0,...F,onKeyDown:oe,onScroll:q,children:[S.map(e=>{let t=e.key===C,n=e.href!=null||e.to!=null,i={role:`tab`,"data-key":e.key,"aria-selected":t,tabIndex:e.key===G?0:-1,className:`app-tab${t?` active`:``}${e.danger?` danger`:``}${n&&e.disabled?` disabled`:``}`},s=m(f,{children:[e.image?p(`img`,{className:`app-tab-img`,src:e.image,alt:e.imageAlt??``}):a(e.icon,{size:16,className:`app-tab-icon`}),e.label,(e.countLabel||e.count!=null)&&p(`span`,{className:`app-tab-count${e.tone?` ${e.tone}`:``}`,children:e.countLabel||o(e.count,{decimals:0})})]}),c;if(n){let t=e.to!=null&&T?T:`a`,n=e.rel??(e.target===`_blank`?`noopener noreferrer`:void 0),r=e.disabled?{"aria-disabled":!0}:t===`a`?{href:e.href??e.to,target:e.target,rel:n}:{to:e.to,target:e.target,rel:n},a=t=>{if(e.disabled){t.preventDefault();return}t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(V(e.key),w?.(e.key))};c=p(t,{...i,...r,onClick:a,children:s},e.key)}else c=p(`button`,{type:`button`,...i,disabled:e.disabled,onClick:()=>{e.disabled||(V(e.key),w?.(e.key))},children:s},e.key);return e.tooltip?p(r,{content:e.tooltip,children:c},e.key):c}),p(`span`,{className:`app-tab-indicator`,"aria-hidden":`true`,"data-wui-overflow-skip":``})]});return R?s($,e(`AppTabs`,x)):z?p(`wui-overflow`,{...e(`AppTabs`,x),ref:L,class:`app-tabs-wrap`,label:j,children:$}):m(`div`,{...e(`AppTabs`,x),ref:L,className:`app-tabs-wrap`,children:[p(`button`,{type:`button`,className:`app-tabs-scroll-btn prev`,"aria-label":`Scroll tabs backward`,tabIndex:-1,onClick:()=>Q(-1),children:p(i,{name:`chevron-left`,size:16})}),$,p(`button`,{type:`button`,className:`app-tabs-scroll-btn next`,"aria-label":`Scroll tabs forward`,tabIndex:-1,onClick:()=>Q(1),children:p(i,{name:`chevron-right`,size:16})})]})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o,{readValues as s,writeValues as c}from"./useWuiControl.js";import{forwardRef as l,useId as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import"@webority/ui-elements/elements/taginput";var p=[`sm`,`lg`],m=l(function(l,m){let{values:h,onChange:g,placeholder:_=`Add…`,name:v,label:y,error:b,hint:x,required:S=!1,size:C,maxTags:w,allowDuplicates:T=!1,disabled:E=!1,id:D,ariaLabel:O,className:k=``,fieldClassName:A=``,help:j,helpLabel:M=`More information`,...N}=l;n(`AppTagInput`,N),t(`AppTagInput`,`size`,C,p);let P=u(),F=D||P,{setRef:I}=o({ref:m,value:h,onChange:g,readValue:s,writeValue:c});return f(`div`,{...e(`AppTagInput`,l),className:`field${A?` ${A}`:``}`,children:[y&&f(`label`,{className:`label`,htmlFor:F,children:[y,S&&d(a,{}),j&&d(i,{label:M,children:j})]}),d(`wui-taginput`,{"aria-label":O||(typeof y==`string`?y:void 0),"aria-describedby":b?`${F}-error`:x?`${F}-hint`:void 0,"aria-invalid":b?`true`:void 0,id:F,ref:I,name:v,placeholder:_,size:C||void 0,"max-tags":w===void 0?void 0:String(w),"allow-duplicates":T?``:void 0,disabled:E?``:void 0,required:S?``:void 0,className:k||void 0,...N}),d(r,{error:b,hint:x,errorId:`${F}-error`,hintId:`${F}-hint`})]})});export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnUnknownProps.js";import
|
|
1
|
+
import{wuiMarkerAttributes 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{forwardRef as a,useCallback as o,useEffect as s,useId as c,useLayoutEffect as l,useRef as u,useState as d}from"react";import{Form as f}from"react-bootstrap";import{jsx as p,jsxs as m}from"react/jsx-runtime";var h=a(function(a,h){let{label:g,required:_=!1,error:v,hint:y,help:b,helpLabel:x=`More information`,id:S,name:C,rows:w=4,autoGrow:T=!1,showCount:E=!1,maxLength:D,disabled:O=!1,readOnly:k=!1,className:A=``,fieldClassName:j=``,...M}=a;t(`AppTextarea`,M);let N=c(),P=S||N,F=[`textarea`,T?`autosize`:``,v?`error`:``,A].filter(Boolean).join(` `),I=v&&P?`${P}-error`:void 0,L=y&&P?`${P}-hint`:void 0,R=I||L,z=u(null),B=e=>{z.current=e,typeof h==`function`?h(e):h&&(h.current=e)},V=o(()=>{let e=z.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[]);l(()=>{T&&V()},[T,V,M.value]);let[H,U]=d(()=>String(M.value??M.defaultValue??``).length);s(()=>{!E||M.value===void 0||U(String(M.value??``).length)},[M.value,E]);let W=e=>{T&&V(),E&&U(e.target.value.length),M.onInput?.(e)};return m(f.Group,{...e(`AppTextarea`,a),className:`field${j?` ${j}`:``}`,children:[g&&m(f.Label,{className:`label`,htmlFor:P,children:[g,_&&p(i,{}),b&&p(r,{label:x,children:b})]}),p(f.Control,{as:`textarea`,id:P,name:C,rows:w,className:F,"aria-invalid":v?`true`:`false`,"aria-describedby":R,required:_,maxLength:D,disabled:O,readOnly:k,...M,ref:B,onInput:W}),p(n,{error:v,hint:y,errorId:I,hintId:L}),E&&m(`div`,{className:`field-count${D&&H>=D?` at-limit`:``}`,children:[H,D?` / ${D}`:``]})]})});export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppActionIcon.js";import i from"./AppSegmented.js";import{DEFAULT_THEME_EFFECT as a,DEFAULT_THEME_STORAGE_KEY as o,THEME_CHANGE_EVENT as s,THEME_EFFECTS as c,THEME_MODES as l,applyTheme as u,nextTheme as d,readStoredTheme as f,resolveTheme as p,storeTheme as m,transitionTheme as h,watchSystemTheme as g}from"@webority/ui-elements/helpers";import{useCallback as _,useEffect as v,useId as y,useState as b}from"react";import{jsx as x}from"react/jsx-runtime";import{flushSync as S}from"react-dom";var C={light:`sun`,dark:`moon`,auto:`monitor`},w={light:`light`,dark:`dark`,auto:`follows your device`},T=[`icon`,`segmented`],E={sm:16,md:20,lg:24,xl:28};function D(D){let{variant:O=`icon`,effect:k=a,includeAuto:A=!0,storageKey:j=o,duration:M,label:N=`Theme`,lightLabel:P=`Light`,darkLabel:F=`Dark`,autoLabel:I=`System`,name:L,size:R=`md`,tooltipPlacement:z=`auto`,onChange:B,className:V=``,...H}=D;n(`AppThemeToggle`,H),t(`AppThemeToggle`,`variant`,O,T),t(`AppThemeToggle`,`effect`,k,c),t(`AppThemeToggle`,`size`,R,Object.keys(E));let U=_(e=>e===`auto`&&!A?p(e):e,[A]),[W,G]=b(()=>U(typeof window>`u`?`auto`:f(j))),K=y(),q=L||K;v(()=>{let e=document.documentElement.getAttribute(`data-theme`);l.includes(e)?G(U(e)):u(f(j))},[]),v(()=>{let e=e=>{let t=e.detail?.preference;l.includes(t)&&G(U(t))};return document.addEventListener(s,e),()=>document.removeEventListener(s,e)},[U]),v(()=>g(()=>{document.documentElement.getAttribute(`data-theme`)===`auto`&&u(`auto`)}),[]);let J=_((e,t)=>{let n=t?.getBoundingClientRect?.()??{left:0,top:0,width:0,height:0},r={x:n.left+n.width/2,y:n.top+n.height/2};h(()=>{u(e),m(e,j),S(()=>G(e)),B?.(e)},{effect:k,to:p(e),origin:r,duration:M})},[j,k,M,B]);if(O===`segmented`){let t=[{value:`light`,label:P,icon:C.light},{value:`dark`,label:F,icon:C.dark}];return A&&t.push({value:`auto`,label:I,icon:C.auto}),x(i,{...e(`AppThemeToggle`,D),options:t,value:W,name:q,label:N,size:R===`xl`?`lg`:R,className:[`wui-theme-toggle`,`wui-theme-toggle-segmented`,V].filter(Boolean).join(` `),onChange:e=>{if(e===W)return;let t=document.querySelector(`.segmented-input[name="${CSS.escape(q)}"][value="${e}"]`);J(e,t?.closest(`.segmented-option`)??t)}})}return x(r,{...e(`AppThemeToggle`,D),icon:C[W],label:`${N}: ${w[W]}`,size:E[R]??E.md,tooltipPlacement:z,onClick:e=>J(d(W,{includeAuto:A}),e.currentTarget),className:[`wui-theme-toggle`,V].filter(Boolean).join(` `)})}export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"../lib/FieldMessage.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o from"./useWuiControl.js";import{cloneElement as s,forwardRef as c,useId as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import"@webority/ui-elements/elements/timepicker";var f=[`sm`,`md`,`lg`],p=[`12`,`24`],m=c(function(c,m){let{value:h,onChange:g,label:_,required:v=!1,hint:y,error:b,help:x,helpLabel:S=`More information`,name:C,min:w,max:T,step:E,format:D=`24`,placeholder:O=`Select time`,disabled:k,size:A,id:j,ariaLabel:M,className:N=``,fieldClassName:P=``,...F}=c;n(`AppTimePicker`,F),t(`AppTimePicker`,`size`,A,f),t(`AppTimePicker`,`format`,D,p);let I=l(),L=j||C||I,{setRef:R}=o({ref:m,value:h??``,onChange:g}),z=!_&&!b&&!y,B=b?`${L}-error`:void 0,V=y?`${L}-hint`:void 0,H=u(`wui-timepicker`,{ref:R,id:L,name:C,min:w,max:T,step:E==null?void 0:String(E),format:D,placeholder:O,size:A||void 0,"aria-label":M||(typeof _==`string`?_:void 0),"aria-describedby":B||V,"aria-invalid":b?`true`:void 0,disabled:k?``:void 0,required:v?``:void 0,className:N||void 0,...F});return z?s(H,e(`AppTimePicker`,c)):d(`div`,{...e(`AppTimePicker`,c),className:`field${P?` ${P}`:``}`,children:[_&&d(`label`,{className:`label`,htmlFor:L,children:[_,v&&u(a,{}),x&&u(i,{label:S,children:x})]}),H,u(r,{error:b,hint:y,errorId:B,hintId:V})]})});export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=[`feed`,`progress`,`steps`],s=[`vertical`,`horizontal`],c=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],l=[`neutral`,`success`,`warning`,`danger`,`info`],u=[`sm`,`md`,`lg`],d={done:`check`,current:`clock`,"on-hold":`lock`,rejected:`x`,cancelled:`minus`,skipped:`arrow-right`,upcoming:null},f=e=>typeof e==`string`&&(/^https?:[/][/]/i.test(e)||e.startsWith(`/`)&&e[1]!==`/`&&e[1]!==`\\`)&&![...e].some(e=>e.charCodeAt(0)<=32||e.charCodeAt(0)===127);function p(e){if(!(e.byHref==null||e.byHref===``)){if(!f(e.byHref))throw Error(`<AppTimeline> items[].byHref must be a path starting with one '/', or an http:// or https:// address, with no spaces.`);if(!e.by)throw Error(`<AppTimeline> items[].byHref links the by name, so the item needs by.`)}}var m=e=>e.byHref?i(`a`,{className:`timeline-by-link`,href:e.byHref,children:e.by}):e.by;function h(f){let{items:h=[],variant:g=`feed`,orientation:_,iconVariant:v,size:y,className:b=``,style:x,...S}=f;n(`AppTimeline`,S),t(`AppTimeline`,`variant`,g,o),t(`AppTimeline`,`orientation`,_,s),t(`AppTimeline`,`iconVariant`,v,c),t(`AppTimeline`,`size`,typeof y==`string`?y:null,u);for(let e of h)t(`AppTimeline`,`items[].tone`,e.tone,l),p(e),g===`progress`&&t(`AppTimeline`,`items[].status`,e.status,Object.keys(d));let C=g===`progress`,w=g===`steps`,T=_===`horizontal`,E=v??(w?`bulk`:void 0),D=typeof y==`string`&&u.includes(y)?y:`md`,O=typeof y==`number`&&y>0?y:void 0,k=!O&&D!==`md`?` wui-timeline--${D}`:``,A=`${w?`timeline wui-timeline--steps${_===`vertical`?` wui-timeline--steps-vertical`:``}`:`timeline${C?` timeline--progress`:``}${T?` timeline--horizontal`:``}`}${k}${b?` ${b}`:``}`,j=w?O?Math.round(O*.43):{sm:19,md:24,lg:31}[D]:O?Math.round(O*.54):C?{sm:10,md:13,lg:17}[D]:{sm:10,md:12,lg:17}[D];return i(`ol`,{className:A,style:O?{...x,"--wui-timeline-dot":`${O}px`}:x,...e(`AppTimeline`,f),...S,children:h.map((e,t)=>{let n=e.tone&&e.tone!==`neutral`?` ${e.tone}`:``;if(w){let o=e.eyebrow??`Step ${t+1}`;return a(`li`,{className:`timeline-item${n}`,children:[i(`span`,{className:`timeline-dot`,children:e.icon?i(r,{name:e.icon,size:j,variant:E}):null}),a(`div`,{className:`timeline-body`,children:[o!==``&&i(`div`,{className:`wui-timeline-eyebrow`,children:o}),i(`div`,{className:`timeline-title`,children:e.title}),e.description&&i(`div`,{className:`timeline-desc`,children:e.description})]})]},e.key??`${e.at}-${t}`)}let o=C?e.status:void 0,s=o?` is-${o}`:``,c=C?e.icon??(o?d[o]:void 0):e.icon||`circle`;return a(`li`,{className:`timeline-item${s}${n}`,children:[i(`span`,{className:`timeline-dot`,children:c?i(r,{name:c,size:j,variant:E}):null}),a(`div`,{className:`timeline-body`,children:[C?a(`div`,{className:`timeline-head`,children:[i(`div`,{className:`timeline-title`,children:e.title}),(e.at||e.time)&&a(`span`,{className:`timeline-when`,children:[e.at&&i(`span`,{className:`timeline-at`,title:e.atTitle||void 0,children:e.at}),e.time&&i(`span`,{className:`timeline-time`,children:e.time})]})]}):i(`div`,{className:`timeline-title`,children:e.title}),e.description&&i(`div`,{className:`timeline-desc`,children:e.description}),!C&&(e.at||e.time||e.by)&&a(`div`,{className:`timeline-meta`,children:[(e.at||e.time)&&a(`span`,{className:`timeline-when`,children:[e.at&&i(`span`,{className:`timeline-at`,title:e.atTitle||void 0,children:e.at}),e.time&&i(`span`,{className:`timeline-time`,children:e.time})]}),e.by&&i(`span`,{className:`timeline-by`,children:m(e)})]}),C&&e.by&&i(`div`,{className:`timeline-meta`,children:i(`span`,{className:`timeline-by`,children:m(e)})}),e.note&&i(`p`,{className:`timeline-note`,children:e.note})]})]},e.key??`${e.at}-${t}`)})})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{adoptToast as i,dismissToast as a,subscribeToasts as o}from"./toastStore.js";import{useEffect as s,useRef as c,useState as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f={success:{icon:`check-circle`,assertive:!1},info:{icon:`info`,assertive:!1},warning:{icon:`alert-triangle`,assertive:!0},danger:{icon:`alert-circle`,assertive:!0}},p={"top-start":`top-0 start-0`,"top-center":`top-0 start-50 translate-middle-x`,"top-end":`top-0 end-0`,"middle-center":`top-50 start-50 translate-middle`,"bottom-start":`bottom-0 start-0`,"bottom-center":`bottom-0 start-50 translate-middle-x`,"bottom-end":`bottom-0 end-0`},m=64,h=new Set([`rise`,`organic`,`jelly`,`spring`]),g=new Set([`rounded`,`pill`,`sharp`]),_=new Set([`auto`,`inverse`]);function v(r){let{position:i=`bottom-end`,maxVisible:a=4,animation:c=`rise`,shape:f=`rounded`,surface:m=`auto`,className:v=``,...b}=r;n(`AppToast`,b),t(`AppToast`,`position`,i,Object.keys(p)),t(`AppToast`,`animation`,c,h),t(`AppToast`,`shape`,f,g),t(`AppToast`,`surface`,m,_);let[x,S]=l([]);s(()=>o(S),[]);let C=Math.max(0,x.length-a),w=C?x.slice(C):x,T=p[i]??p[`bottom-end`];return d(`div`,{...e(`AppToast`,r),...b,className:`wui-toast-container toast-container position-fixed ${T} p-3 ${v}`.trim(),children:[C>0&&d(`div`,{className:`wui-toast-more`,"aria-hidden":`true`,children:[`+`,C,` more`]}),w.map(e=>u(y,{toast:e,defaultAnimation:c,defaultShape:f,defaultSurface:m},e.id))]})}function y({toast:e,defaultAnimation:t=`rise`,defaultShape:n=`rounded`,defaultSurface:o=`auto`}){let p=f[e.variant]??f.success,v=h.has(e.animation)?e.animation:t,y=g.has(e.shape)?e.shape:n,b=_.has(e.surface)?e.surface:o,x=(v!==`rise`&&h.has(v)?` wui-toast--anim-${v}`:``)+(y!==`rounded`&&g.has(y)?` wui-toast--shape-${y}`:``)+(b===`inverse`?` wui-toast--surface-inverse`:``),S=e.duration===0,[C,w]=l(0),[T,E]=l(!1),D=c(null),O=()=>a(e.id),k=c(null);s(()=>{if(e.duration===0)return;i(e.id);let t=k.current,n=t==null?``:getComputedStyle(t).animationName;if(t!=null&&(typeof t.getAnimations==`function`?t.getAnimations().length>0:n!==``&&n!==`none`))return;let r=setTimeout(()=>a(e.id),e.duration);return()=>clearTimeout(r)},[e.id,e.duration]);let A=e=>{e.button!==0||e.target.closest(`button`)||(D.current=e.clientX,E(!0),e.currentTarget.setPointerCapture?.(e.pointerId))},j=e=>{D.current!==null&&w(e.clientX-D.current)},M=()=>{D.current=null,E(!1),w(0)},N=e=>{if(D.current===null)return;let t=e.clientX-D.current;if(Math.abs(t)>m){O();return}M()},P=C?{transform:`translateX(${C}px)`,opacity:Math.max(0,1-Math.abs(C)/200)}:void 0;return d(`div`,{className:`toast show wui-toast wui-toast--${e.variant}${x}${T?` wui-toast--dragging`:``}`,role:p.assertive?`alert`:`status`,"aria-live":p.assertive?`assertive`:`polite`,"aria-atomic":`true`,style:P,onPointerDown:A,onPointerMove:j,onPointerUp:N,onPointerCancel:M,children:[u(`span`,{className:`wui-toast-icon`,"aria-hidden":`true`,children:u(r,{name:p.icon,size:20})}),d(`div`,{className:`wui-toast-content`,children:[e.title&&u(`div`,{className:`wui-toast-title`,children:e.title}),u(`div`,{className:`wui-toast-message`,children:e.message}),typeof e.progress==`number`&&d(`div`,{className:`wui-toast-task`,children:[u(`div`,{className:`wui-toast-track`,role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.min(100,Math.max(0,Math.round(e.progress))),children:u(`div`,{className:`wui-toast-track-fill`,style:{width:`${Math.min(100,Math.max(0,e.progress))}%`}})}),d(`span`,{className:`wui-toast-track-pct`,"aria-hidden":`true`,children:[Math.min(100,Math.max(0,Math.round(e.progress))),`%`]})]}),e.action&&u(`button`,{type:`button`,className:`wui-toast-action`,onClick:()=>{e.action.onClick?.(),O()},children:e.action.label})]}),u(`button`,{type:`button`,className:`btn-close wui-toast-close`,"aria-label":`Close`,onClick:O}),!S&&u(`div`,{ref:k,className:`wui-toast-progress`,style:{animationDuration:`${e.duration}ms`},onAnimationEnd:O})]})}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnUnknownProps.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.js";import{useId as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s(s){let{items:c=[],actions:l=[],value:u,defaultValue:d,onSelect:f,label:p,name:m,disabled:h=!1,className:g=``,..._}=s;t(`AppToolbar`,_);let v=r(),y=m||v,[b,x]=i(d),S=u===void 0?b:u;return o(`div`,{className:[`toolbar`,h?`is-disabled`:``,g].filter(Boolean).join(` `),role:`toolbar`,"aria-label":p,"aria-disabled":h||void 0,...e(`AppToolbar`,s),..._,children:[c.map(e=>o(`label`,{className:`toolbar-item`,children:[a(`input`,{type:`radio`,className:`toolbar-input`,name:y,value:e.value,checked:e.value===S,disabled:h||e.disabled,onChange:()=>{u===void 0&&x(e.value),f?.(e.value)}}),a(`span`,{className:`toolbar-item-icon`,children:n(e.icon,{size:16})}),a(`span`,{className:`toolbar-item-label`,children:e.title})]},e.value)),l.length>0&&a(`span`,{className:`toolbar-sep`,"aria-hidden":`true`}),l.map((e,t)=>a(`button`,{type:`button`,className:`toolbar-action`,"aria-label":e.title,disabled:h||e.disabled,onClick:e.onClick,children:a(`span`,{className:`toolbar-item-icon`,children:n(e.icon,{size:16})})},e.key??`${e.title}-${t}`))]})}export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import"@webority/ui-elements/elements/tour";import{forwardRef as r,useEffect as i,useLayoutEffect as a,useRef as o}from"react";import{jsx as s}from"react/jsx-runtime";var c=[`image`,`video`],l=[`click`],u=r(function(r,u){let{open:d,onClose:f,tourId:p,steps:m,seenStore:h,onBeforeStep:g,labels:_,endDialog:v=!0,className:y,...b}=r;n(`AppTour`,b);for(let e of m)t(`AppTour`,`steps[].mediaType`,e.mediaType,c),t(`AppTour`,`steps[].advanceOn`,e.advanceOn,l);let x=o(null),S=e=>{x.current=e,typeof u==`function`?u(e):u&&(u.current=e)};a(()=>{let e=x.current;e.seenStore=h??null,e.onBeforeStep=g??null}),a(()=>{let e=x.current;d?e.setAttribute(`open`,``):e.removeAttribute(`open`)},[d]);let C=o(f);return C.current=f,i(()=>{let e=x.current,t=e=>{let{reason:t,index:n,position:r,total:i}=e.detail;C.current?.(t,{index:n,position:r,total:i})};return e.addEventListener(`wui-tour:close`,t),()=>e.removeEventListener(`wui-tour:close`,t)},[]),s(`wui-tour`,{ref:S,"tour-id":p,"back-label":_?.back,"next-label":_?.next,"skip-label":_?.skip,"done-label":_?.done,"progress-label":_?.progress,"advance-label":_?.advance,"media-pause-label":_?.mediaPause,"media-play-label":_?.mediaPlay,"end-title":_?.endTitle,"end-message":_?.endMessage,"end-button":_?.endButton,"end-dialog":v===!1?`false`:void 0,class:y||void 0,...e(`AppTour`,r),...b,children:m.map(e=>s(`wui-tour-step`,{target:e.target,title:e.title,media:e.media,"media-alt":e.mediaAlt,"media-poster":e.mediaPoster,"media-type":e.mediaType,"advance-on":e.advanceOn,"action-label":e.actionLabel,children:e.description},`${e.target}|${e.description}`))})});export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r,{readValues as i,writeValues as a}from"./useWuiControl.js";import{forwardRef as o,useEffect as s,useRef as c}from"react";import{jsx as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/tree";var u=[`none`,`single`,`multiple`],d=o(function(o,d){let{nodes:f,selection:p,selected:m,onSelect:h,checked:g,onCheck:_,loadChildren:v,loadUrl:y,onLoadError:b,name:x,loadingText:S,errorText:C,ariaLabel:w,id:T,className:E=``,...D}=o;n(`AppTreeView`,D),t(`AppTreeView`,`selection`,p,u);let{setRef:O,innerRef:k}=r({ref:d,value:g,readValue:i,writeValue:a,on:{"wui-tree:check":e=>_?.(e.detail.values,{id:e.detail.id,checked:e.detail.checked}),"wui-tree:select":e=>{h?.(e.detail.id,e.detail.node),m!==void 0&&e.currentTarget.selected!==m&&(e.currentTarget.selected=m)},"wui-tree:error":e=>b?.(e.detail.id,e.detail.message)}});s(()=>{let e=k.current;e&&f!==void 0&&(e.nodes=f)},[f,k]),s(()=>{let e=k.current;e&&(e.loadChildren=v)},[v,k]);let A=c(!1);return s(()=>{let e=k.current;if(e){if(m===void 0){A.current&&(e.selected=null),A.current=!1;return}A.current=!0,e.selected!==m&&(e.selected=m)}},[m,k]),l(`wui-tree`,{ref:O,id:T||void 0,selection:p||void 0,name:x||void 0,"load-url":y||void 0,"loading-text":S||void 0,"error-text":C||void 0,"aria-label":w||void 0,className:E||void 0,...e(`AppTreeView`,o),...D})});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnUnknownProps.js";import{jsx as
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import{jsx as n}from"react/jsx-runtime";import"@webority/ui-elements/elements/truncate";function r(r){let{children:i,lines:a=1,width:o,style:s,className:c=``,...l}=r;t(`AppTruncate`,l);let u=Number.isInteger(a)&&a>1,d={...u?{"--wui-truncate-lines":a}:null,...o?{"--wui-truncate-width":o}:null,...s};return n(`wui-truncate`,{class:[`wui-truncate`,u&&`wui-truncate-multi`,c].filter(Boolean).join(` `),style:Object.keys(d).length?d:void 0,...e(`AppTruncate`,r),...l,children:n(`span`,{className:`wui-truncate-text`,children:i})})}export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnUnknownProps.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppButton.js";import r from"./AppBanner.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o=()=>window.location.reload();function s(s){let{onReload:c=o,dismissible:l=!1,onDismiss:u,className:d=``,...f}=s;return t(`AppUpdateBar`,f),a(r,{tone:`info`,icon:`refresh-cw`,dismissible:l,onDismiss:u,className:d,...e(`AppUpdateBar`,s),...f,children:[i(`span`,{className:`me-3`,children:`A new version of this app is ready.`}),i(n,{size:`sm`,variant:`primary`,onClick:c,children:`Reload`})]})}export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnUnknownProps.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{formatDate as r}from"@webority/ui-elements/helpers";import{useEffect as i,useRef as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import"@webority/ui-elements/elements/whats-new";function c(c){let{entries:l=[],storageKey:u,label:d=`What's new`,unreadLabel:f=`unread`,emptyText:p=`Nothing new yet`,onRead:m,className:h=``,...g}=c;t(`AppWhatsNew`,g);let _=a(null),v=a(m);return v.current=m,i(()=>{let e=_.current,t=e=>v.current?.(e.detail.through);return e.addEventListener(`wui-whats-new-read`,t),()=>e.removeEventListener(`wui-whats-new-read`,t)},[]),s(`wui-whats-new`,{ref:_,class:[`wui-whats-new`,h].filter(Boolean).join(` `),"storage-key":u||void 0,...e(`AppWhatsNew`,c),...g,children:[s(`button`,{type:`button`,className:`u-action wui-whats-new-trigger`,"aria-haspopup":`dialog`,children:[o(n,{name:`gift`,size:20}),o(`span`,{className:`wui-whats-new-name`,children:d}),o(`span`,{className:`wui-whats-new-unread`,children:` ${f}`}),o(`span`,{className:`wui-whats-new-dot`,"aria-hidden":`true`})]}),s(`div`,{className:`wui-whats-new-panel`,role:`dialog`,"aria-label":d,tabIndex:-1,children:[o(`h2`,{className:`wui-whats-new-title`,children:d}),l.length>0?o(`ol`,{className:`wui-whats-new-list`,children:l.map((e,t)=>s(`li`,{className:`wui-whats-new-entry`,children:[o(`time`,{className:`wui-whats-new-date`,dateTime:e.date,children:r(e.date)}),o(`h3`,{className:`wui-whats-new-entry-title`,children:e.title}),e.body&&o(`p`,{className:`wui-whats-new-body`,children:e.body}),e.imageSrc&&o(`img`,{className:`wui-whats-new-image`,src:e.imageSrc,alt:e.imageAlt??``,loading:`lazy`}),e.href&&o(`a`,{className:`wui-whats-new-link`,href:e.href,children:e.linkLabel||`Learn more`})]},e.id??`${e.date}-${t}`))}):o(`p`,{className:`wui-whats-new-empty`,children:p})]})]})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{Children as i,forwardRef as a,useEffect as o,useRef as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import"@webority/ui-elements/elements/wizard";var u=[`steps`,`journey`,`icons`,`tiles`],d=[`primary`,`success`,`warning`,`danger`,`info`],f=[`horizontal`,`vertical`],ee=[`center`,`start`],p=[`done`,`active`,`pending`,`error`],m=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],h=[`check`,`alert-triangle`,`minus`],g=[`sm`,`md`,`lg`],_={sm:14,md:16,lg:20},v=a(function(a,v){let{steps:y=[],children:b,active:x,defaultActive:te=0,onStepChange:S,onFinish:C,onSkip:w,beforeNext:T,onInvalid:E,onClose:D,variant:O=`steps`,tone:k,doneTone:A,orientation:j=`horizontal`,align:M=`center`,iconVariant:N,size:P=`md`,iconSize:F,skippable:I=!1,nonLinear:L=!1,hideStepper:R=!1,hideConnectors:z=!1,disabled:B=!1,label:V=`Progress`,backLabel:H=`Back`,nextLabel:U=`Next`,skipLabel:W=`Skip`,finishLabel:G=`Finish`,topBar:K=!1,barTitle:q,closeLabel:J=`Close`,className:Y=``,...X}=a;n(`AppWizard`,X),t(`AppWizard`,`variant`,O,u),t(`AppWizard`,`tone`,k,d),t(`AppWizard`,`doneTone`,A,d),t(`AppWizard`,`orientation`,j,f),t(`AppWizard`,`align`,M,ee),t(`AppWizard`,`iconVariant`,N,m),t(`AppWizard`,`size`,P,g);let Z=F>0?F:_[P]??_.md;for(let e of y)t(`AppWizard`,`steps[].status`,e.status,p);let Q=s(null),ne=e=>{Q.current=e,typeof v==`function`?v(e):v&&(v.current=e)},re=i.toArray(b),$=N&&N!==`linear`?[...new Set([...h,...y.map(e=>e.icon).filter(Boolean)])]:[],ie=[k&&`wui-step-tone-${k}`,A&&`wui-step-done-tone-${A}`,P!==`md`&&g.includes(P)&&`wui-step-size-${P}`,Y].filter(Boolean).join(` `);return o(()=>{let e=Q.current;if(!e)return;let t=x===void 0?te:x;t&&(e.active=t)},[]),o(()=>{let e=Q.current;e&&x!==void 0&&Number(e.active)!==x&&(e.active=x)},[x]),o(()=>{let e=Q.current;e&&(e.beforeNext=T??null)},[T]),o(()=>{let e=Q.current;if(!e)return;let t=e=>S?.(e.detail.index,e.detail),n=e=>C?.(e.detail),r=e=>w?.(e.detail.index),i=e=>E?.(e.detail.index),a=e=>D?.(e.detail);return e.addEventListener(`wui-wizard:change`,t),e.addEventListener(`wui-wizard:finish`,n),e.addEventListener(`wui-wizard:skip`,r),e.addEventListener(`wui-wizard:invalid`,i),e.addEventListener(`wui-wizard:close`,a),()=>{e.removeEventListener(`wui-wizard:change`,t),e.removeEventListener(`wui-wizard:finish`,n),e.removeEventListener(`wui-wizard:skip`,r),e.removeEventListener(`wui-wizard:invalid`,i),e.removeEventListener(`wui-wizard:close`,a)}},[S,C,w,E,D]),l(`wui-wizard`,{ref:ne,variant:O,orientation:j,align:M===`start`?`start`:void 0,"icon-size":Z===16?void 0:Z,skippable:I?``:void 0,"non-linear":L?``:void 0,"hide-stepper":R?``:void 0,"hide-connectors":z?``:void 0,disabled:B?``:void 0,label:V,"back-label":H,"next-label":U,"skip-label":W,"finish-label":G,"top-bar":K?``:void 0,"bar-title":q||void 0,"close-label":J,className:ie||void 0,...e(`AppWizard`,a),...X,children:[y.map((e,t)=>c(`wui-wizard-step`,{label:e.label,description:e.description||void 0,optional:e.optional?``:void 0,icon:e.icon||void 0,status:e.status||void 0,children:re[t]},e.key??`${e.label}-${t}`)),$.length>0&&c(`span`,{hidden:!0,"data-wui-glyphs":``,children:$.map(e=>c(r,{name:e,size:Z,variant:N},e))})]})});export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import
|
|
1
|
+
import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{initialsOf as i}from"../lib/initials.js";import{forwardRef as a,useEffect as o,useMemo as s,useRef as c,useState as l}from"react";import{Dropdown as u}from"react-bootstrap";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`sm`,`md`,`lg`],h=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`]);function g(i){let{tenants:a=[],currentId:d,onSelect:g,menuLabel:b,footerAction:x,linkComponent:S,searchable:C=!1,onCreate:w,canCreate:T=!1,createLabel:E=`Create workspace`,compact:D=!1,size:O=`md`,ariaLabel:k,...A}=i,{onToggle:j,...M}=A;n(`AppWorkspaceSwitcher`,M),t(`AppWorkspaceSwitcher`,`size`,O,m);let[N,P]=l(``),[F,I]=l(!1),L=c(null),R=(e,t)=>{I(e),j?.(e,t)},z=a.find(e=>e.id===d)??a[0],B=s(()=>{let e=N.trim().toLowerCase();return!C||!e?a:a.filter(t=>String(t.name??``).toLowerCase().includes(e))},[a,N,C]);o(()=>{F&&C&&L.current?.focus()},[F,C]),o(()=>{if(!C)return;let e=L.current;if(!e)return;let t=e=>{if(h.has(e.key)){e.stopPropagation();return}e.key===`Escape`&&F&&(e.preventDefault(),e.stopPropagation(),R(!1,{source:`keydown`,originalEvent:e}))};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)},[C,F]);let V=z?.name??``,H=k??`Workspace ${V}`;return p(u,{className:`workspace-switcher${O===`sm`?` workspace-switcher-sm`:``}${O===`lg`?` workspace-switcher-lg`:``}`,show:F,onToggle:R,...e(`AppWorkspaceSwitcher`,i),...M,children:[f(u.Toggle,{as:y,compact:D,tenant:z,"aria-label":H}),p(u.Menu,{className:`workspace-switcher-menu`,renderOnMount:!0,popperConfig:{strategy:`fixed`},children:[b?f(`div`,{className:`workspace-switcher-menu-label`,children:b}):null,C?p(`div`,{className:`workspace-switcher-search`,children:[f(r,{name:`search`,size:14}),f(`input`,{ref:L,type:`search`,className:`workspace-switcher-search-input`,placeholder:`Search workspaces`,"aria-label":`Search workspaces`,value:N,onChange:e=>P(e.target.value)})]}):null,p(`div`,{className:`workspace-switcher-list`,children:[B.map(e=>p(u.Item,{as:`button`,type:`button`,className:`workspace-switcher-option${e.id===z?.id?` is-active`:``}`,onClick:()=>g?.(e),children:[f(_,{tenant:e}),f(`span`,{className:`workspace-switcher-option-name`,children:e.name}),e.badge?f(`span`,{className:`workspace-switcher-badge`,children:e.badge}):null,e.id===z?.id?f(r,{name:`check`,size:16,className:`workspace-switcher-tick`}):null]},e.id)),B.length===0?f(`div`,{className:`workspace-switcher-empty`,children:`No workspaces match.`}):null]}),T?p(u.Item,{as:`button`,type:`button`,className:`workspace-switcher-create`,onClick:()=>w?.(),children:[f(r,{name:`plus`,size:16}),E]}):null,x?f(`div`,{className:`workspace-switcher-footer`,children:v(x,S)}):null]})]})}function _({tenant:e}){return e?.logoUrl?f(`img`,{className:`workspace-switcher-mark`,src:e.logoUrl,alt:``,loading:`lazy`}):f(`span`,{className:`workspace-switcher-mark`,children:i(e?.name,1)})}function v(e,t){if(typeof e!=`object`||!e||!(`label`in e))return e;let{label:n,icon:i,href:a}=e;return p(a?t??`a`:`button`,{className:`workspace-switcher-footer-action`,...a?t?{to:a}:{href:a}:{type:`button`},children:[i?f(r,{name:i,size:16}):null,n]})}var y=a(function({compact:e,tenant:t,"aria-label":n,className:i,...a},o){return p(`button`,{ref:o,type:`button`,className:`workspace-switcher-trigger${e?` is-compact`:``}`,"aria-haspopup":`true`,"aria-label":n,...a,children:[f(_,{tenant:t}),e?null:p(d,{children:[f(`span`,{className:`workspace-switcher-trigger-name`,children:t?.name}),f(r,{name:`chevrons-up-down`,size:16,className:`workspace-switcher-chevron`})]})]})});export{g as default};
|
package/dist/lib/CheckField.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./FieldMessage.js";import{forwardRef as t,useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=t(function({label:t,id:a,name:o,error:s,hint:c,className:l=``,rest:u={},inputType:d,wrapperClass:f},
|
|
1
|
+
import e from"./FieldMessage.js";import{forwardRef as t,useId as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";var a=t(function({label:t,id:a,name:o,error:s,hint:c,className:l=``,rest:u={},inputType:d,wrapperClass:f,rootProps:p},m){let h=n(),g=a||h,_=s?`${g}-error`:void 0,v=c?`${g}-hint`:void 0;return i(`div`,{className:`${f}${l?` ${l}`:``}`,...p,children:[r(`input`,{type:d,className:`form-check-input`,id:g,name:o,ref:m,"aria-invalid":s?`true`:`false`,"aria-describedby":_||v,...u}),t!=null&&r(`label`,{className:`form-check-label`,htmlFor:g,children:t}),r(e,{error:s,hint:c,errorId:_,hintId:v})]})});export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`data-wui`,t=`data-wui-props`,n=`__WUI_MARKERS__`,r=`props`,i=new Set([`children`,`className`,`style`,`id`,`key`,`ref`,`as`,`linkComponent`,`src`]),a=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`;function o(){return globalThis[n]===r}function s(n,r){let s={[e]:n};if(!o())return s;let c={};for(let[e,t]of Object.entries(r||{}))i.has(e)||e.startsWith(`aria-`)||e.startsWith(`data-`)||/^on[A-Z]/.test(e)||a(t)&&(c[e]=t);return s[t]=JSON.stringify(c),s}export{n as WUI_MARKERS_GLOBAL,r as WUI_MARKERS_PROPS_MODE,e as WUI_MARKER_ATTRIBUTE,t as WUI_MARKER_PROPS_ATTRIBUTE,s as wuiMarkerAttributes,o as wuiMarkerPropsOn};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* needs a stable anchor to deep-link to; otherwise a unique one is generated.
|
|
15
15
|
* @param {string} [props.className]
|
|
16
16
|
*/
|
|
17
|
-
export default function AppAccordion(
|
|
17
|
+
export default function AppAccordion(props: {
|
|
18
18
|
items: {
|
|
19
19
|
key?: string;
|
|
20
20
|
title: import('react').ReactNode;
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* @param {string} [props.accept] file types the chooser offers (the input's accept), file mode only
|
|
35
35
|
* @param {boolean} [props.multiple=false] allow several files, file mode only
|
|
36
36
|
*/
|
|
37
|
-
export default function AppActionIcon(
|
|
37
|
+
export default function AppActionIcon(props: {
|
|
38
38
|
icon: string | import('react').ReactNode;
|
|
39
39
|
iconVariant?: 'linear' | 'outline' | 'bold' | 'bulk' | 'broken' | 'twotone';
|
|
40
40
|
label: string;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* @param {"alert"|"status"|"none"} [props.role="alert"] "status" for non-assertive notices; "none" for
|
|
33
33
|
* explanatory page content, which must not interrupt a screen reader.
|
|
34
34
|
*/
|
|
35
|
-
export default function AppAlert(
|
|
35
|
+
export default function AppAlert(props: {
|
|
36
36
|
variant?: "info" | "success" | "warning" | "danger";
|
|
37
37
|
children: import('react').ReactNode;
|
|
38
38
|
title?: import('react').ReactNode;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* omitted.
|
|
23
23
|
* @param {string} [props.className] Extra classes on the wrapper.
|
|
24
24
|
*/
|
|
25
|
-
export default function AppAsyncBlock(
|
|
25
|
+
export default function AppAsyncBlock(props: {
|
|
26
26
|
loading?: boolean;
|
|
27
27
|
error?: string | import('react').ReactNode;
|
|
28
28
|
empty?: boolean;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement="auto"] Preferred tooltip side; `auto` picks the side with the most room.
|
|
21
21
|
* @param {string} [props.className]
|
|
22
22
|
*/
|
|
23
|
-
export default function AppAvatar(
|
|
23
|
+
export default function AppAvatar(props: {
|
|
24
24
|
name?: string;
|
|
25
25
|
src?: string;
|
|
26
26
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | number | string;
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
export default function AppAvatarGroup(
|
|
2
|
-
[x: string]: any;
|
|
3
|
-
children: any;
|
|
4
|
-
className?: string;
|
|
5
|
-
overflow: any;
|
|
6
|
-
size: any;
|
|
7
|
-
spacing?: string;
|
|
8
|
-
}): import("react").JSX.Element;
|
|
1
|
+
export default function AppAvatarGroup(props: any): import("react").JSX.Element;
|
|
@@ -31,7 +31,7 @@ import "@webority/ui-elements/elements/image-crop";
|
|
|
31
31
|
* @param {string} [props.fieldClassName] Extra class on the `.field` wrapper.
|
|
32
32
|
* @param {object} [props.style] Inline style; lands on the picker with `className`.
|
|
33
33
|
*/
|
|
34
|
-
export default function AppAvatarPicker(
|
|
34
|
+
export default function AppAvatarPicker(props: {
|
|
35
35
|
value?: string | null;
|
|
36
36
|
initials?: string;
|
|
37
37
|
onPick: (file: File) => void;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.tooltipPlacement="auto"] Preferred tooltip side; `auto` picks the side with the most room.
|
|
14
14
|
* @param {string} [props.className]
|
|
15
15
|
*/
|
|
16
|
-
export default function AppBadge(
|
|
16
|
+
export default function AppBadge(props: {
|
|
17
17
|
children: import('react').ReactNode;
|
|
18
18
|
tone?: "neutral" | "primary" | "success" | "warning" | "danger" | "info";
|
|
19
19
|
dot?: boolean;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @param {() => void} [props.onDismiss] Called after the banner is dismissed.
|
|
13
13
|
* @param {string} [props.className]
|
|
14
14
|
*/
|
|
15
|
-
export default function AppBanner(
|
|
15
|
+
export default function AppBanner(props: {
|
|
16
16
|
tone?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
17
17
|
icon?: string | import('react').ReactNode;
|
|
18
18
|
children: import('react').ReactNode;
|
|
@@ -18,7 +18,7 @@ export declare const BreadcrumbTrailContext: import("react").Context<boolean>;
|
|
|
18
18
|
* @param {import('react').ElementType} [props.linkComponent] Component for `to` items (e.g. Link).
|
|
19
19
|
* @param {string} [props.className]
|
|
20
20
|
*/
|
|
21
|
-
export default function AppBreadcrumbs(
|
|
21
|
+
export default function AppBreadcrumbs(props: {
|
|
22
22
|
items: {
|
|
23
23
|
key?: string;
|
|
24
24
|
label: string;
|
|
@@ -26,7 +26,7 @@ export declare function buttonVariantClass(variant: any): string;
|
|
|
26
26
|
* @param {string} [props.className=""] Extra classes on the button.
|
|
27
27
|
* @param {(event: import('react').MouseEvent<HTMLElement>) => void} [props.onClick] Runs on a click; ignored on a static button.
|
|
28
28
|
*/
|
|
29
|
-
export default function AppButton(
|
|
29
|
+
export default function AppButton(props: {
|
|
30
30
|
children: import('react').ReactNode;
|
|
31
31
|
variant?: "primary" | "secondary" | "outline" | "ghost" | "text" | "danger" | "success" | "secondary-danger" | "outline-danger" | "light" | "warning" | "neutral" | "outline-light" | "outline-secondary" | "subtle";
|
|
32
32
|
size?: "sm" | "md" | "lg";
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @param {boolean} [props.fullWidth=false] Fill the container, the buttons sharing the row equally.
|
|
14
14
|
* @param {string} [props.className]
|
|
15
15
|
*/
|
|
16
|
-
export default function AppButtonGroup(
|
|
16
|
+
export default function AppButtonGroup(props: {
|
|
17
17
|
label: string;
|
|
18
18
|
children: import('react').ReactNode;
|
|
19
19
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
* @param {boolean} [props.dismissible] Show a close button at the end of the header (defaults to true when onClose is set).
|
|
36
36
|
* @param {string} [props.closeLabel="Close"] Accessible name of the close button.
|
|
37
37
|
*/
|
|
38
|
-
export default function AppCard(
|
|
38
|
+
export default function AppCard(props: {
|
|
39
39
|
title?: import('react').ReactNode;
|
|
40
40
|
subtitle?: import('react').ReactNode;
|
|
41
41
|
headerIcon?: string;
|
|
@@ -32,7 +32,7 @@ import "@webority/ui-elements/elements/carousel";
|
|
|
32
32
|
* @param {import('react').CSSProperties} [props.style] Merged after the per-view custom properties.
|
|
33
33
|
* @param {import('react').ReactNode} props.children The slides.
|
|
34
34
|
*/
|
|
35
|
-
export default function AppCarousel(
|
|
35
|
+
export default function AppCarousel(props: {
|
|
36
36
|
label: string;
|
|
37
37
|
autoplay?: number;
|
|
38
38
|
loop?: boolean;
|