@webority/ui-react 0.149.0 → 0.152.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas-kit/kit.js +699 -161657
- package/dist/canvas-kit/manifest.json +800 -119
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppAccordion.js +1 -1
- package/dist/components/AppAccountSwitcher.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/AppAuthLayout.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/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/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/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/AppDashboardCell.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/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/AppForm.js +1 -0
- package/dist/components/AppHoverCard.js +1 -1
- package/dist/components/AppIcon.js +1 -1
- package/dist/components/AppImagePicker.js +1 -1
- package/dist/components/AppInlineEdit.js +1 -1
- package/dist/components/AppInput.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/AppLeadPopup.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/AppMetricStrip.js +1 -1
- package/dist/components/AppModal.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/AppOrgTree.js +1 -1
- package/dist/components/AppOtpInput.js +1 -1
- package/dist/components/AppPageHeader.js +1 -1
- package/dist/components/AppPhoneNumberInput.js +1 -1
- package/dist/components/AppPopover.js +1 -1
- package/dist/components/AppQrCode.js +1 -1
- package/dist/components/AppRadio.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/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/AppSearch.js +1 -1
- package/dist/components/AppSectionLeadCapture.js +1 -1
- package/dist/components/AppSectionLogos.js +1 -1
- package/dist/components/AppSegmented.js +1 -1
- package/dist/components/AppSelect.js +1 -1
- package/dist/components/AppSeoHead.js +1 -1
- package/dist/components/AppShell.js +1 -1
- package/dist/components/AppShortcutLegend.js +1 -1
- package/dist/components/AppShowMore.js +1 -1
- package/dist/components/AppSkeleton.js +1 -1
- package/dist/components/AppSkeletonLines.js +1 -1
- package/dist/components/AppSlider.js +1 -1
- package/dist/components/AppSortableList.js +1 -1
- package/dist/components/AppSparkline.js +1 -1
- package/dist/components/AppSplash.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/AppTabs.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/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/AppWhatsNew.js +1 -1
- package/dist/components/AppWizard.js +1 -1
- package/dist/components/AppWorkspaceSwitcher.js +1 -1
- package/dist/components/ModalIcons.js +1 -1
- package/dist/components/assertValidValue.js +1 -1
- package/dist/components/iconCatalogFull/bold/a.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/b.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/c.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/d.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/e.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/f.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/g.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/h.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/i.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/j.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/k.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/l.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/m.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/n.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/o.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/p.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/q.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/r.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/s.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/t.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/u.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/v.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/w.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/x.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/y.g.js +1 -1
- package/dist/components/iconCatalogFull/bold/z.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/a.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/b.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/c.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/d.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/e.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/f.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/g.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/h.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/i.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/j.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/k.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/l.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/m.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/n.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/o.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/p.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/q.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/r.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/s.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/t.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/u.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/v.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/w.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/x.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/y.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/z.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/a.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/b.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/c.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/d.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/e.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/f.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/g.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/h.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/i.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/j.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/k.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/l.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/m.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/n.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/o.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/p.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/q.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/r.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/s.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/t.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/u.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/v.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/w.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/x.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/y.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/z.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/a.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/b.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/c.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/d.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/e.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/f.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/g.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/h.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/i.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/j.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/k.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/l.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/m.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/n.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/o.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/p.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/q.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/r.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/s.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/t.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/u.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/v.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/w.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/x.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/y.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/z.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/a.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/b.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/c.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/d.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/e.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/f.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/g.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/h.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/i.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/j.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/k.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/l.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/m.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/n.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/o.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/p.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/q.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/r.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/s.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/t.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/u.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/v.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/w.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/x.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/y.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/z.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/a.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/b.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/c.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/d.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/e.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/f.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/g.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/h.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/i.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/j.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/k.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/l.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/m.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/n.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/o.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/p.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/q.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/r.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/s.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/t.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/u.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/v.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/w.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/x.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/y.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/z.g.js +1 -1
- package/dist/components/iconGlyphs.g.js +1 -1
- package/dist/components/iconVariants.g.js +1 -1
- package/dist/components/textOf.js +1 -0
- package/dist/components/toastStore.js +1 -1
- package/dist/components/useNodeLabels.js +1 -1
- package/dist/components/useWuiControl.js +1 -1
- package/dist/guidance.json +174 -27
- package/dist/lib/CheckField.js +1 -1
- package/dist/lib/FileItemRow.js +1 -1
- package/dist/lib/FocusPanel.js +1 -1
- package/dist/lib/TargetLink.js +1 -0
- package/dist/lib/buttonClass.js +1 -1
- package/dist/lib/emptyIllustration.js +1 -1
- package/dist/lib/fileItem.js +1 -1
- package/dist/lib/flagStyles.js +1 -1
- package/dist/lib/initials.js +1 -1
- package/dist/lib/linkTarget.js +1 -1
- package/dist/lib/pageScrollLock.js +1 -1
- package/dist/lib/qrCode.js +1 -1
- package/dist/lib/sectionShell.js +1 -1
- package/dist/lib/svgNodes.js +1 -0
- package/dist/lib/useElementEntry.js +1 -0
- package/dist/lib/useFileDrop.js +1 -1
- package/dist/lib/useTableView.js +1 -1
- package/dist/lib/wuiMarker.js +1 -1
- package/dist/markdown-core/dist/parse.js +3 -3
- package/dist/types/components/AppAccordion.d.ts +31 -34
- package/dist/types/components/AppAccountSwitcher.d.ts +29 -30
- package/dist/types/components/AppActionIcon.d.ts +39 -57
- package/dist/types/components/AppAlert.d.ts +35 -50
- package/dist/types/components/AppAsyncBlock.d.ts +23 -46
- package/dist/types/components/AppAuthLayout.d.ts +9 -22
- package/dist/types/components/AppAvatar.d.ts +26 -43
- package/dist/types/components/AppAvatarGroup.d.ts +11 -16
- package/dist/types/components/AppBadge.d.ts +13 -19
- package/dist/types/components/AppBanner.d.ts +18 -21
- package/dist/types/components/AppBreadcrumbs.d.ts +35 -20
- package/dist/types/components/AppButton.d.ts +66 -56
- package/dist/types/components/AppButtonGroup.d.ts +24 -22
- package/dist/types/components/AppCalendar.d.ts +35 -31
- package/dist/types/components/AppCard.d.ts +47 -67
- package/dist/types/components/AppCarousel.d.ts +35 -51
- package/dist/types/components/AppCell.d.ts +22 -21
- package/dist/types/components/AppChart.d.ts +93 -54
- package/dist/types/components/AppChartCard.d.ts +46 -58
- package/dist/types/components/AppCheckbox.d.ts +33 -18
- package/dist/types/components/AppChip.d.ts +32 -43
- package/dist/types/components/AppChipGroup.d.ts +17 -22
- package/dist/types/components/AppChoiceCard.d.ts +30 -54
- package/dist/types/components/AppChoiceChip.d.ts +42 -38
- package/dist/types/components/AppCodeBlock.d.ts +29 -28
- package/dist/types/components/AppColorField.d.ts +59 -57
- package/dist/types/components/AppColumnMenu.d.ts +21 -19
- package/dist/types/components/AppCommandPalette.d.ts +97 -102
- package/dist/types/components/AppCommentThread.d.ts +106 -181
- package/dist/types/components/AppCompareTable.d.ts +59 -57
- package/dist/types/components/AppConfirmDialog.d.ts +31 -46
- package/dist/types/components/AppConfirmProvider.d.ts +18 -21
- package/dist/types/components/AppConsentBanner.d.ts +43 -54
- package/dist/types/components/AppContextMenu.d.ts +63 -51
- package/dist/types/components/AppCopyButton.d.ts +26 -24
- package/dist/types/components/AppCountryFlag.d.ts +10 -8
- package/dist/types/components/AppDashboardCell.d.ts +19 -13
- package/dist/types/components/AppDashboardGrid.d.ts +15 -12
- package/dist/types/components/AppDataTable.d.ts +147 -144
- package/dist/types/components/AppDatePicker.d.ts +39 -28
- package/dist/types/components/AppDateRangePicker.d.ts +53 -40
- package/dist/types/components/AppDescriptions.d.ts +43 -38
- package/dist/types/components/AppDetailPane.d.ts +14 -19
- package/dist/types/components/AppDrawer.d.ts +46 -74
- package/dist/types/components/AppDropZone.d.ts +43 -47
- package/dist/types/components/AppDropdown.d.ts +78 -72
- package/dist/types/components/AppDueDate.d.ts +25 -39
- package/dist/types/components/AppEmptyState.d.ts +26 -36
- package/dist/types/components/AppErrorBoundary.d.ts +29 -29
- package/dist/types/components/AppErrorSummary.d.ts +27 -24
- package/dist/types/components/AppFileAttachment.d.ts +87 -70
- package/dist/types/components/AppFilePicker.d.ts +109 -95
- package/dist/types/components/AppFileTiles.d.ts +26 -23
- package/dist/types/components/AppFileViewer.d.ts +27 -21
- package/dist/types/components/AppFilterBar.d.ts +87 -84
- package/dist/types/components/AppFloatingButton.d.ts +37 -35
- package/dist/types/components/AppFloatingDock.d.ts +47 -41
- package/dist/types/components/AppForm.d.ts +23 -0
- package/dist/types/components/AppFormActions.d.ts +21 -19
- package/dist/types/components/AppFormRow.d.ts +16 -19
- package/dist/types/components/AppFormSection.d.ts +24 -34
- package/dist/types/components/AppHoverCard.d.ts +28 -35
- package/dist/types/components/AppIcon.d.ts +29 -38
- package/dist/types/components/AppImagePicker.d.ts +54 -99
- package/dist/types/components/AppInfoTip.d.ts +17 -21
- package/dist/types/components/AppInlineEdit.d.ts +46 -51
- package/dist/types/components/AppInput.d.ts +82 -61
- package/dist/types/components/AppInputGroup.d.ts +22 -29
- package/dist/types/components/AppKanban.d.ts +115 -118
- package/dist/types/components/AppKbd.d.ts +12 -11
- package/dist/types/components/AppKpiTile.d.ts +45 -59
- package/dist/types/components/AppLeadPopup.d.ts +81 -38
- package/dist/types/components/AppLightbox.d.ts +44 -41
- package/dist/types/components/AppLink.d.ts +46 -43
- package/dist/types/components/AppMarkdown.d.ts +30 -37
- package/dist/types/components/AppMentionInput.d.ts +52 -40
- package/dist/types/components/AppMeter.d.ts +30 -33
- package/dist/types/components/AppMetricStrip.d.ts +29 -25
- package/dist/types/components/AppModal.d.ts +42 -51
- package/dist/types/components/AppNavList.d.ts +28 -27
- package/dist/types/components/AppNavigationMenu.d.ts +36 -33
- package/dist/types/components/AppNotificationCenter.d.ts +59 -92
- package/dist/types/components/AppNumberInput.d.ts +52 -30
- package/dist/types/components/AppOnboardingChecklist.d.ts +58 -48
- package/dist/types/components/AppOrgTree.d.ts +59 -29
- package/dist/types/components/AppOtpInput.d.ts +42 -25
- package/dist/types/components/AppPageHeader.d.ts +44 -66
- package/dist/types/components/AppPhoneNumberInput.d.ts +29 -27
- package/dist/types/components/AppPopover.d.ts +48 -37
- package/dist/types/components/AppPricingCard.d.ts +28 -37
- package/dist/types/components/AppProgress.d.ts +21 -29
- package/dist/types/components/AppQrCode.d.ts +19 -24
- package/dist/types/components/AppRadio.d.ts +24 -18
- package/dist/types/components/AppRadioGroup.d.ts +38 -61
- package/dist/types/components/AppRating.d.ts +38 -62
- package/dist/types/components/AppRecordPager.d.ts +28 -37
- package/dist/types/components/AppRelativeTime.d.ts +13 -16
- package/dist/types/components/AppRepeater.d.ts +41 -49
- package/dist/types/components/AppRequiredMark.d.ts +4 -4
- package/dist/types/components/AppResizable.d.ts +16 -17
- package/dist/types/components/AppResizableHandle.d.ts +5 -12
- package/dist/types/components/AppResizablePanel.d.ts +7 -20
- package/dist/types/components/AppResourceCard.d.ts +9 -21
- package/dist/types/components/AppResult.d.ts +23 -31
- package/dist/types/components/AppRichText.d.ts +46 -21
- package/dist/types/components/AppRollingNumber.d.ts +18 -25
- package/dist/types/components/AppRouteError.d.ts +32 -50
- package/dist/types/components/AppRowSwitch.d.ts +4 -9
- package/dist/types/components/AppScoreScale.d.ts +44 -42
- package/dist/types/components/AppScrollbar.d.ts +11 -16
- package/dist/types/components/AppSearch.d.ts +39 -37
- package/dist/types/components/AppSectionCallToAction.d.ts +28 -24
- package/dist/types/components/AppSectionFaq.d.ts +34 -32
- package/dist/types/components/AppSectionFeatures.d.ts +21 -30
- package/dist/types/components/AppSectionHero.d.ts +16 -24
- package/dist/types/components/AppSectionLeadCapture.d.ts +33 -51
- package/dist/types/components/AppSectionLogos.d.ts +25 -30
- package/dist/types/components/AppSectionPricing.d.ts +15 -20
- package/dist/types/components/AppSectionTestimonials.d.ts +26 -32
- package/dist/types/components/AppSegmented.d.ts +40 -55
- package/dist/types/components/AppSelect.d.ts +186 -118
- package/dist/types/components/AppSeoHead.d.ts +15 -21
- package/dist/types/components/AppShell.d.ts +212 -334
- package/dist/types/components/AppShortcutLegend.d.ts +32 -39
- package/dist/types/components/AppShowMore.d.ts +22 -29
- package/dist/types/components/AppSkeleton.d.ts +17 -26
- package/dist/types/components/AppSkeletonLines.d.ts +12 -16
- package/dist/types/components/AppSlider.d.ts +74 -48
- package/dist/types/components/AppSortableList.d.ts +47 -21
- package/dist/types/components/AppSparkline.d.ts +34 -33
- package/dist/types/components/AppSpinner.d.ts +18 -17
- package/dist/types/components/AppSplash.d.ts +24 -32
- package/dist/types/components/AppSplitButton.d.ts +41 -53
- package/dist/types/components/AppSplitView.d.ts +75 -97
- package/dist/types/components/AppStatusBadge.d.ts +19 -19
- package/dist/types/components/AppStepper.d.ts +57 -61
- package/dist/types/components/AppSwitch.d.ts +24 -27
- package/dist/types/components/AppTablePagination.d.ts +34 -55
- package/dist/types/components/AppTableToolbar.d.ts +31 -44
- package/dist/types/components/AppTabs.d.ts +62 -75
- package/dist/types/components/AppTextarea.d.ts +35 -51
- package/dist/types/components/AppThemeToggle.d.ts +60 -53
- package/dist/types/components/AppTimePicker.d.ts +29 -28
- package/dist/types/components/AppTimeline.d.ts +59 -60
- package/dist/types/components/AppToast.d.ts +26 -27
- package/dist/types/components/AppToolbar.d.ts +46 -52
- package/dist/types/components/AppTooltip.d.ts +26 -30
- package/dist/types/components/AppTour.d.ts +57 -41
- package/dist/types/components/AppTreeView.d.ts +53 -30
- package/dist/types/components/AppTruncate.d.ts +16 -21
- package/dist/types/components/AppUpdateBar.d.ts +21 -26
- package/dist/types/components/AppWhatsNew.d.ts +40 -48
- package/dist/types/components/AppWizard.d.ts +64 -48
- package/dist/types/components/AppWorkspaceSwitcher.d.ts +56 -60
- package/dist/types/components/ModalIcons.d.ts +17 -38
- package/dist/types/components/assertValidValue.d.ts +1 -5
- package/dist/types/components/iconCatalogFull/bold/a.g.d.ts +2 -77
- package/dist/types/components/iconCatalogFull/bold/b.g.d.ts +2 -83
- package/dist/types/components/iconCatalogFull/bold/c.g.d.ts +2 -113
- package/dist/types/components/iconCatalogFull/bold/d.g.d.ts +2 -55
- package/dist/types/components/iconCatalogFull/bold/e.g.d.ts +2 -35
- package/dist/types/components/iconCatalogFull/bold/f.g.d.ts +2 -43
- package/dist/types/components/iconCatalogFull/bold/g.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/bold/h.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/bold/i.g.d.ts +2 -19
- package/dist/types/components/iconCatalogFull/bold/j.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/bold/k.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/bold/l.g.d.ts +2 -40
- package/dist/types/components/iconCatalogFull/bold/m.g.d.ts +2 -99
- package/dist/types/components/iconCatalogFull/bold/n.g.d.ts +2 -21
- package/dist/types/components/iconCatalogFull/bold/o.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/bold/p.g.d.ts +2 -49
- package/dist/types/components/iconCatalogFull/bold/q.g.d.ts +2 -9
- package/dist/types/components/iconCatalogFull/bold/r.g.d.ts +2 -48
- package/dist/types/components/iconCatalogFull/bold/s.g.d.ts +2 -107
- package/dist/types/components/iconCatalogFull/bold/t.g.d.ts +2 -64
- package/dist/types/components/iconCatalogFull/bold/u.g.d.ts +2 -17
- package/dist/types/components/iconCatalogFull/bold/v.g.d.ts +2 -28
- package/dist/types/components/iconCatalogFull/bold/w.g.d.ts +2 -29
- package/dist/types/components/iconCatalogFull/bold/x.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/bold/y.g.d.ts +2 -3
- package/dist/types/components/iconCatalogFull/bold/z.g.d.ts +2 -4
- package/dist/types/components/iconCatalogFull/broken/a.g.d.ts +2 -77
- package/dist/types/components/iconCatalogFull/broken/b.g.d.ts +2 -83
- package/dist/types/components/iconCatalogFull/broken/c.g.d.ts +2 -113
- package/dist/types/components/iconCatalogFull/broken/d.g.d.ts +2 -55
- package/dist/types/components/iconCatalogFull/broken/e.g.d.ts +2 -35
- package/dist/types/components/iconCatalogFull/broken/f.g.d.ts +2 -43
- package/dist/types/components/iconCatalogFull/broken/g.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/broken/h.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/broken/i.g.d.ts +2 -19
- package/dist/types/components/iconCatalogFull/broken/j.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/broken/k.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/broken/l.g.d.ts +2 -40
- package/dist/types/components/iconCatalogFull/broken/m.g.d.ts +2 -99
- package/dist/types/components/iconCatalogFull/broken/n.g.d.ts +2 -21
- package/dist/types/components/iconCatalogFull/broken/o.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/broken/p.g.d.ts +2 -49
- package/dist/types/components/iconCatalogFull/broken/q.g.d.ts +2 -9
- package/dist/types/components/iconCatalogFull/broken/r.g.d.ts +2 -48
- package/dist/types/components/iconCatalogFull/broken/s.g.d.ts +2 -107
- package/dist/types/components/iconCatalogFull/broken/t.g.d.ts +2 -64
- package/dist/types/components/iconCatalogFull/broken/u.g.d.ts +2 -17
- package/dist/types/components/iconCatalogFull/broken/v.g.d.ts +2 -28
- package/dist/types/components/iconCatalogFull/broken/w.g.d.ts +2 -29
- package/dist/types/components/iconCatalogFull/broken/x.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/broken/y.g.d.ts +2 -3
- package/dist/types/components/iconCatalogFull/broken/z.g.d.ts +2 -4
- package/dist/types/components/iconCatalogFull/bulk/a.g.d.ts +2 -77
- package/dist/types/components/iconCatalogFull/bulk/b.g.d.ts +2 -83
- package/dist/types/components/iconCatalogFull/bulk/c.g.d.ts +2 -113
- package/dist/types/components/iconCatalogFull/bulk/d.g.d.ts +2 -55
- package/dist/types/components/iconCatalogFull/bulk/e.g.d.ts +2 -35
- package/dist/types/components/iconCatalogFull/bulk/f.g.d.ts +2 -43
- package/dist/types/components/iconCatalogFull/bulk/g.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/bulk/h.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/bulk/i.g.d.ts +2 -19
- package/dist/types/components/iconCatalogFull/bulk/j.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/bulk/k.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/bulk/l.g.d.ts +2 -40
- package/dist/types/components/iconCatalogFull/bulk/m.g.d.ts +2 -99
- package/dist/types/components/iconCatalogFull/bulk/n.g.d.ts +2 -21
- package/dist/types/components/iconCatalogFull/bulk/o.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/bulk/p.g.d.ts +2 -49
- package/dist/types/components/iconCatalogFull/bulk/q.g.d.ts +2 -9
- package/dist/types/components/iconCatalogFull/bulk/r.g.d.ts +2 -48
- package/dist/types/components/iconCatalogFull/bulk/s.g.d.ts +2 -107
- package/dist/types/components/iconCatalogFull/bulk/t.g.d.ts +2 -64
- package/dist/types/components/iconCatalogFull/bulk/u.g.d.ts +2 -17
- package/dist/types/components/iconCatalogFull/bulk/v.g.d.ts +2 -28
- package/dist/types/components/iconCatalogFull/bulk/w.g.d.ts +2 -29
- package/dist/types/components/iconCatalogFull/bulk/x.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/bulk/y.g.d.ts +2 -3
- package/dist/types/components/iconCatalogFull/bulk/z.g.d.ts +2 -4
- package/dist/types/components/iconCatalogFull/linear/a.g.d.ts +2 -77
- package/dist/types/components/iconCatalogFull/linear/b.g.d.ts +2 -83
- package/dist/types/components/iconCatalogFull/linear/c.g.d.ts +2 -113
- package/dist/types/components/iconCatalogFull/linear/d.g.d.ts +2 -55
- package/dist/types/components/iconCatalogFull/linear/e.g.d.ts +2 -35
- package/dist/types/components/iconCatalogFull/linear/f.g.d.ts +2 -43
- package/dist/types/components/iconCatalogFull/linear/g.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/linear/h.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/linear/i.g.d.ts +2 -19
- package/dist/types/components/iconCatalogFull/linear/j.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/linear/k.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/linear/l.g.d.ts +2 -40
- package/dist/types/components/iconCatalogFull/linear/m.g.d.ts +2 -99
- package/dist/types/components/iconCatalogFull/linear/n.g.d.ts +2 -21
- package/dist/types/components/iconCatalogFull/linear/o.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/linear/p.g.d.ts +2 -49
- package/dist/types/components/iconCatalogFull/linear/q.g.d.ts +2 -9
- package/dist/types/components/iconCatalogFull/linear/r.g.d.ts +2 -48
- package/dist/types/components/iconCatalogFull/linear/s.g.d.ts +2 -107
- package/dist/types/components/iconCatalogFull/linear/t.g.d.ts +2 -64
- package/dist/types/components/iconCatalogFull/linear/u.g.d.ts +2 -17
- package/dist/types/components/iconCatalogFull/linear/v.g.d.ts +2 -28
- package/dist/types/components/iconCatalogFull/linear/w.g.d.ts +2 -29
- package/dist/types/components/iconCatalogFull/linear/x.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/linear/y.g.d.ts +2 -3
- package/dist/types/components/iconCatalogFull/linear/z.g.d.ts +2 -4
- package/dist/types/components/iconCatalogFull/outline/a.g.d.ts +2 -77
- package/dist/types/components/iconCatalogFull/outline/b.g.d.ts +2 -83
- package/dist/types/components/iconCatalogFull/outline/c.g.d.ts +2 -113
- package/dist/types/components/iconCatalogFull/outline/d.g.d.ts +2 -55
- package/dist/types/components/iconCatalogFull/outline/e.g.d.ts +2 -35
- package/dist/types/components/iconCatalogFull/outline/f.g.d.ts +2 -43
- package/dist/types/components/iconCatalogFull/outline/g.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/outline/h.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/outline/i.g.d.ts +2 -19
- package/dist/types/components/iconCatalogFull/outline/j.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/outline/k.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/outline/l.g.d.ts +2 -40
- package/dist/types/components/iconCatalogFull/outline/m.g.d.ts +2 -99
- package/dist/types/components/iconCatalogFull/outline/n.g.d.ts +2 -21
- package/dist/types/components/iconCatalogFull/outline/o.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/outline/p.g.d.ts +2 -49
- package/dist/types/components/iconCatalogFull/outline/q.g.d.ts +2 -9
- package/dist/types/components/iconCatalogFull/outline/r.g.d.ts +2 -48
- package/dist/types/components/iconCatalogFull/outline/s.g.d.ts +2 -107
- package/dist/types/components/iconCatalogFull/outline/t.g.d.ts +2 -64
- package/dist/types/components/iconCatalogFull/outline/u.g.d.ts +2 -17
- package/dist/types/components/iconCatalogFull/outline/v.g.d.ts +2 -28
- package/dist/types/components/iconCatalogFull/outline/w.g.d.ts +2 -29
- package/dist/types/components/iconCatalogFull/outline/x.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/outline/y.g.d.ts +2 -3
- package/dist/types/components/iconCatalogFull/outline/z.g.d.ts +2 -4
- package/dist/types/components/iconCatalogFull/twotone/a.g.d.ts +2 -77
- package/dist/types/components/iconCatalogFull/twotone/b.g.d.ts +2 -83
- package/dist/types/components/iconCatalogFull/twotone/c.g.d.ts +2 -113
- package/dist/types/components/iconCatalogFull/twotone/d.g.d.ts +2 -55
- package/dist/types/components/iconCatalogFull/twotone/e.g.d.ts +2 -35
- package/dist/types/components/iconCatalogFull/twotone/f.g.d.ts +2 -43
- package/dist/types/components/iconCatalogFull/twotone/g.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/twotone/h.g.d.ts +2 -42
- package/dist/types/components/iconCatalogFull/twotone/i.g.d.ts +2 -19
- package/dist/types/components/iconCatalogFull/twotone/j.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/twotone/k.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/twotone/l.g.d.ts +2 -40
- package/dist/types/components/iconCatalogFull/twotone/m.g.d.ts +2 -99
- package/dist/types/components/iconCatalogFull/twotone/n.g.d.ts +2 -21
- package/dist/types/components/iconCatalogFull/twotone/o.g.d.ts +2 -8
- package/dist/types/components/iconCatalogFull/twotone/p.g.d.ts +2 -49
- package/dist/types/components/iconCatalogFull/twotone/q.g.d.ts +2 -9
- package/dist/types/components/iconCatalogFull/twotone/r.g.d.ts +2 -48
- package/dist/types/components/iconCatalogFull/twotone/s.g.d.ts +2 -107
- package/dist/types/components/iconCatalogFull/twotone/t.g.d.ts +2 -64
- package/dist/types/components/iconCatalogFull/twotone/u.g.d.ts +2 -17
- package/dist/types/components/iconCatalogFull/twotone/v.g.d.ts +2 -28
- package/dist/types/components/iconCatalogFull/twotone/w.g.d.ts +2 -29
- package/dist/types/components/iconCatalogFull/twotone/x.g.d.ts +2 -5
- package/dist/types/components/iconCatalogFull/twotone/y.g.d.ts +2 -3
- package/dist/types/components/iconCatalogFull/twotone/z.g.d.ts +2 -4
- package/dist/types/components/iconCatalogLoaders.g.d.ts +10 -171
- package/dist/types/components/iconGlyphs.g.d.ts +2 -238
- package/dist/types/components/iconVariants.g.d.ts +2 -1167
- package/dist/types/components/renderIconProp.d.ts +10 -9
- package/dist/types/components/textOf.d.ts +3 -0
- package/dist/types/components/toast.d.ts +13 -5
- package/dist/types/components/toastStore.d.ts +33 -4
- package/dist/types/components/useNodeLabels.d.ts +12 -12
- package/dist/types/components/useWuiControl.d.ts +73 -49
- package/dist/types/components/warnUnknownProps.d.ts +3 -3
- package/dist/types/components/withTooltip.d.ts +3 -1
- package/dist/types/index.d.ts +180 -164
- package/dist/types/lib/CheckField.d.ts +19 -1
- package/dist/types/lib/DiscardPrompt.d.ts +10 -12
- package/dist/types/lib/FieldMessage.d.ts +8 -12
- package/dist/types/lib/FileItemRow.d.ts +19 -23
- package/dist/types/lib/FocusPanel.d.ts +5 -3
- package/dist/types/lib/TargetLink.d.ts +9 -0
- package/dist/types/lib/buttonClass.d.ts +0 -4
- package/dist/types/lib/devWarn.d.ts +2 -2
- package/dist/types/lib/emptyIllustration.d.ts +9 -18
- package/dist/types/lib/emptyValue.d.ts +2 -6
- package/dist/types/lib/fieldState.d.ts +3 -1
- package/dist/types/lib/fileItem.d.ts +16 -7
- package/dist/types/lib/fillLabel.d.ts +1 -1
- package/dist/types/lib/flagStyles.d.ts +1 -1
- package/dist/types/lib/focusField.d.ts +2 -2
- package/dist/types/lib/initials.d.ts +3 -4
- package/dist/types/lib/labelWithHelp.d.ts +2 -6
- package/dist/types/lib/linkTarget.d.ts +33 -19
- package/dist/types/lib/navMatch.d.ts +7 -10
- package/dist/types/lib/pageWindow.d.ts +7 -8
- package/dist/types/lib/qrCode.d.ts +17 -37
- package/dist/types/lib/sectionShell.d.ts +39 -31
- package/dist/types/lib/shellCookie.d.ts +3 -3
- package/dist/types/lib/shortcutChip.d.ts +4 -3
- package/dist/types/lib/svgNodes.d.ts +4 -0
- package/dist/types/lib/useCommandPaletteShortcut.d.ts +3 -3
- package/dist/types/lib/useElementEntry.d.ts +16 -0
- package/dist/types/lib/useFileDrop.d.ts +23 -16
- package/dist/types/lib/useFloatingStack.d.ts +5 -4
- package/dist/types/lib/useListShortcuts.d.ts +9 -7
- package/dist/types/lib/usePagination.d.ts +8 -6
- package/dist/types/lib/useTableView.d.ts +17 -19
- package/dist/types/lib/wuiMarker.d.ts +12 -10
- package/dist/types/reactAugmentations.d.ts +22 -0
- package/dist/ui-react.js +1 -1
- package/dist/web-core/dist/api/idempotencyKey.js +1 -0
- package/dist/web-core/dist/query/listQuery.js +1 -1
- package/package.json +16 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../lib/fillLabel.js";import{splitMarkerProps as
|
|
1
|
+
import e from"../lib/fillLabel.js";import t from"../lib/useElementEntry.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppAvatar.js";import i from"./AppIcon.js";import a from"./useWuiControl.js";import o from"./warnUnknownProps.js";import{useEffect as s,useId as c,useMemo as l,useRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function p(e){return`selected`in e}var m=()=>import(`@webority/ui-elements/elements/org-tree`),h=`Arrow Down goes to a person's first report, Arrow Up to their manager, Arrow Left and Right to colleagues. Plus opens a team and minus closes it. Enter chooses a person.`;function g(e){let t=/* @__PURE__ */ new Map;for(let n of e){if(t.has(n.id))throw Error(`OrgTree node id "${n.id}" is used twice: every id must be unique.`);t.set(n.id,n)}let n=/* @__PURE__ */ new Map,r=[];for(let i of e){if(!i.parentId){r.push(i);continue}if(!t.has(i.parentId))throw Error(`OrgTree node "${i.id}" names parent "${i.parentId}", which is not in the list.`);let e=n.get(i.parentId);e||(e=[],n.set(i.parentId,e)),e.push(i)}for(let n of e){let r=n.parentId;for(let i=0;r&&i<=e.length;i+=1){if(r===n.id)throw Error(`OrgTree node "${n.id}" is its own ancestor: the reporting lines form a loop.`);r=t.get(r)?.parentId}}return{byId:t,childrenOf:n,roots:r}}function _(e,t){let n=/* @__PURE__ */ new Set;for(let r of e){let e=t.has(r)?r:null;for(;e&&!n.has(e);)n.add(e),e=t.get(e)?.parentId||null}return n}function v(t,n,a,o,s){let c=s.childrenOf.get(t.id)??[],l=c.length>0,u=l&&s.expandDepth!=null&&n>=s.expandDepth,p=s.renderOverlay?.(t),m;return s.highlightChain&&(m=s.highlightChain.has(t.id)?`highlight`:`dim`),/* @__PURE__ */ f(`li`,{className:`wui-org-tree-item`,role:`treeitem`,"data-wui-org-node":t.id,"aria-level":n,"aria-setsize":a,"aria-posinset":o+1,tabIndex:n===1&&o===0?0:-1,"aria-expanded":l?u?`false`:`true`:void 0,"aria-selected":s.selectable?s.selected===t.id?`true`:`false`:void 0,"data-wui-org-state":m,children:[/* @__PURE__ */ f(`div`,{className:`wui-org-tree-node`,children:[/* @__PURE__ */ d(r,{name:t.name,src:t.avatarUrl,size:`md`}),/* @__PURE__ */ f(`div`,{className:`wui-org-tree-text`,children:[/* @__PURE__ */ d(`span`,{className:`wui-org-tree-name`,children:t.name}),t.role?/* @__PURE__ */ d(`span`,{className:`wui-org-tree-role`,children:t.role}):null,t.team?/* @__PURE__ */ d(`span`,{className:`wui-org-tree-team`,children:t.team}):null]}),p==null?null:/* @__PURE__ */ d(`div`,{className:`wui-org-tree-overlay`,children:p}),l?/* @__PURE__ */ f(`button`,{type:`button`,className:`wui-org-tree-toggle`,"data-wui-org-toggle":``,tabIndex:-1,"aria-label":e(u?s.expandLabel:s.collapseLabel,{name:t.name}),children:[/* @__PURE__ */ d(i,{name:`chevron-down`,size:16}),/* @__PURE__ */ d(`span`,{className:`wui-org-tree-count`,children:c.length})]}):null]}),l?/* @__PURE__ */ d(`ul`,{className:`wui-org-tree-children`,role:`group`,hidden:u,children:y(c,n+1,s)}):null]},t.id)}function y(e,t,n){return e.map((r,i)=>v(r,t,e.length,i,n))}function b(e){let r=t(`wui-org-tree`,m),{marker:i,props:v}=n(`AppOrgTree`,e),{nodes:b,renderOverlay:x,highlightIds:S,selectable:C=!1,selected:w,onSelect:T,expandDepth:E,searchable:D=!0,searchLabel:O=`Search by name`,resultsText:k=`{count} found`,noResultsText:A=`No one found`,expandLabel:j=`Show {name}'s team`,collapseLabel:M=`Hide {name}'s team`,helpText:N=h,ariaLabel:P=`Organisation`,id:F,className:I=``,ref:L,...R}=v;if(!Array.isArray(b))throw Error(`<AppOrgTree> nodes is required: pass the flat list of people.`);o(`AppOrgTree`,R);let z=c(),B=F||`org-tree-${z.replace(/[^a-zA-Z0-9_-]/g,``)}`,V=`${B}-help`,H=l(()=>g(b),[b]),U=l(()=>Array.isArray(S)&&S.length>0?_(S,H.byId):null,[S,H]),{setRef:W,innerRef:G}=a({ready:r,ref:L,on:{"wui-org-tree:select":e=>{if(!(e instanceof CustomEvent))throw Error(`wui-org-tree:select must be a CustomEvent.`);let{id:t}=e.detail,n=e.currentTarget;T?.(t,H.byId.get(t)),n instanceof HTMLElement&&p(n)&&w!==void 0&&n.selected!==w&&(n.selected=w)}}}),K=u(!1);s(()=>{let e=G.current;e&&r&&p(e)&&(w===void 0?(K.current&&(e.selected=null),K.current=!1):(K.current=!0,e.selected!==w&&(e.selected=w)))},[w,G,r]);let q={childrenOf:H.childrenOf,renderOverlay:x,highlightChain:U,selectable:C,selected:w,expandDepth:E,expandLabel:j,collapseLabel:M};return/* @__PURE__ */ f(`wui-org-tree`,{ref:W,id:B,class:I||void 0,selectable:C||void 0,selected:w??void 0,"search-results-text":k,"search-empty-text":A,"expand-label":j,"collapse-label":M,...i,...R,children:[D?/* @__PURE__ */ d(`div`,{className:`wui-org-tree-toolbar`,children:/* @__PURE__ */ d(`input`,{type:`search`,className:`form-control form-control-sm wui-org-tree-search`,"data-wui-org-search":``,"aria-label":O,placeholder:O,autoComplete:`off`})}):null,/* @__PURE__ */ d(`div`,{className:`wui-org-tree-canvas`,"data-wui-org-canvas":``,children:/* @__PURE__ */ d(`ul`,{className:`wui-org-tree`,role:`tree`,"aria-label":P,"aria-describedby":V,children:y(H.roots,1,q)})}),/* @__PURE__ */ d(`p`,{className:`visually-hidden`,id:V,"data-wui-org-help":``,children:N}),/* @__PURE__ */ d(`div`,{className:`visually-hidden`,"data-wui-org-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../lib/FieldMessage.js";import{FIELD_SIZES as t}from"../lib/fieldState.js";import{splitMarkerProps as
|
|
1
|
+
import e from"../lib/FieldMessage.js";import{FIELD_SIZES as t}from"../lib/fieldState.js";import n from"../lib/useElementEntry.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o from"./assertValidValue.js";import s from"./useWuiControl.js";import c from"./warnUnknownProps.js";import{cloneElement as l,forwardRef as u,useId as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`numeric`,`alphanumeric`],h=()=>import(`@webority/ui-elements/elements/otp`),g=u(function(u,g){let _=n(`wui-otp`,h),{marker:v,props:y}=r(`AppOtpInput`,u),{value:b,defaultValue:x,onChange:S,onComplete:C,length:w=6,mode:T=`numeric`,size:E=`md`,label:D,required:O=!1,optional:k=!1,optionalLabel:A=`(optional)`,helperText:j,help:M,helpLabel:N=`More information`,error:P,disabled:F=!1,readOnly:I=!1,loading:L=!1,name:R,id:z,className:B=``,fieldClassName:V=``,...H}=y;c(`AppOtpInput`,H),o(`AppOtpInput`,`mode`,T,m),o(`AppOtpInput`,`size`,E,t);let U=d(),W=z||U,G=P?`${W}-error`:void 0,K=j?`${W}-hint`:void 0,q=G||K,{setRef:J}=s({ready:_,ref:g,value:b??(x===void 0?``:void 0),onChange:S,on:{complete:e=>C?.(e.detail)}}),Y=/* @__PURE__ */ f(`wui-otp`,{"aria-label":typeof D==`string`?D:void 0,ref:J,id:W,name:R,length:String(w),mode:T,size:E===`md`?void 0:E,value:(b??x)||void 0,"aria-describedby":q,"aria-invalid":P?`true`:void 0,disabled:F?``:void 0,readonly:I?``:void 0,loading:L?``:void 0,required:O?``:void 0,className:B||void 0,...H});return!D&&!P&&!j?l(Y,v):/* @__PURE__ */ p(`div`,{...v,className:`field${V?` ${V}`:``}`,children:[D&&/* @__PURE__ */ p(`label`,{className:`label`,htmlFor:W,children:[D,k&&!O&&/* @__PURE__ */ f(`span`,{className:`label-optional`,children:` ${A}`}),O&&/* @__PURE__ */ f(a,{}),M&&/* @__PURE__ */ f(i,{label:N,children:M})]}),Y,/* @__PURE__ */ f(e,{error:P,hint:j,errorId:G,hintId:K})]})});export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devError as e}from"../lib/devWarn.js";import{TONES as t}from"../lib/vocabulary.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import{BreadcrumbTrailContext as
|
|
1
|
+
import{devError as e}from"../lib/devWarn.js";import{TONES as t}from"../lib/vocabulary.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import{BreadcrumbTrailContext as r}from"./AppBreadcrumbs.js";import i from"./AppIcon.js";import a from"./assertValidValue.js";import o from"./warnUnknownProps.js";import{formatNumber as ee}from"@webority/ui-elements/helpers";import{useEffect as te,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u=[`sm`,`md`,`lg`,`bar`],d=[`start`,`center`],f=[`inline`,`below`],p=[`below`,`inline`],m=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],h=[`views`,`tools`,`meta`,`bulk`],g={views:`tabs (app-tabs) under the header`,tools:`filters in the table toolbar (app-table-toolbar)`,meta:`facts in the header's description or a fact list below it`,bulk:`bulk actions in the table toolbar's bulk slot`},ne=()=>{try{return process.env.NODE_ENV!==`production`}catch{return!0}},re=e=>e!=null&&e!==!1&&e!==``;function _(_){let{marker:v,props:y}=n(`AppPageHeader`,_),{title:b,titleSlot:x,as:S=`h1`,subtitle:C,eyebrow:w,icon:T,tone:E=`primary`,status:D,breadcrumbs:O,actions:k,views:A,tools:j,meta:M,metaPlacement:N=`inline`,subtitlePlacement:P=`below`,bulkFor:F,bulk:I,size:L=`md`,align:R=`start`,divider:z=!1,sticky:B=!1,className:V=``,...H}=y;if(o(`AppPageHeader`,H),a(`AppPageHeader`,`tone`,E,t.filter(e=>e!==`neutral`)),a(`AppPageHeader`,`size`,L,u),a(`AppPageHeader`,`align`,R,d),a(`AppPageHeader`,`as`,S,m),a(`AppPageHeader`,`metaPlacement`,N,f),a(`AppPageHeader`,`subtitlePlacement`,P,p),L!==`bar`&&ne()){let t={views:A,tools:j,meta:M,bulk:I};for(let n of h)re(t[n])&&e(`app-page-header-${n} is drawn only when size="bar". On a ${L} header, put ${g[n]} instead.`)}let U=m.includes(S)?S:`h1`,W=L===`bar`,G=W&&N===`below`,K=!W&&P===`inline`,q=[`page-header`,L&&L!==`md`?`page-header-${L}`:``,R===`center`?`page-header-center`:``,z?`page-header-divider`:``,B?`page-header-sticky`:``,E&&E!==`primary`?`tone-${E}`:``,G?`wui-page-header-meta-below`:``,K?`wui-page-header-subtitle-inline`:``,V].filter(Boolean).join(` `),[J,Y]=s(0),X=W?F:void 0;te(()=>{if(!X)return;document.getElementById(X)?.setAttribute(`data-wui-bulk-in-bar`,``);let e=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail;typeof t?.selected==`number`&&e.target instanceof Node&&document.getElementById(X)?.contains(e.target)&&Y(t.selected)};return document.addEventListener(`selectionchange`,e),()=>{document.removeEventListener(`selectionchange`,e),document.getElementById(X)?.removeAttribute(`data-wui-bulk-in-bar`)}},[X]);let Z=b!=null||x!=null?/* @__PURE__ */ c(U,{className:x==null?`page-title`:`page-title wui-page-title-slot`,"aria-label":x!=null&&typeof b==`string`&&b!==``?b:void 0,children:x??b}):null;if(W)return/* @__PURE__ */ l(`header`,{className:q,"data-wui-page-header-bar":``,"data-wui-bulk-for":F||void 0,...v,...H,children:[O!=null&&/* @__PURE__ */ c(r.Provider,{value:!0,children:/* @__PURE__ */ c(`div`,{className:`page-header-bar-crumbs`,children:O})}),Z,D!=null&&/* @__PURE__ */ c(`span`,{className:`page-status`,children:D}),A!=null&&/* @__PURE__ */ c(`div`,{className:`page-header-bar-views`,"data-wui-bar-swap":``,hidden:F&&J>0?!0:void 0,children:A}),/* @__PURE__ */ c(`span`,{className:`page-header-bar-spacer`,"aria-hidden":`true`}),M!=null&&!G&&/* @__PURE__ */ c(`div`,{className:`page-header-bar-meta`,children:M}),j!=null&&/* @__PURE__ */ c(`div`,{className:`page-header-bar-tools`,"data-wui-bar-swap":``,hidden:F&&J>0?!0:void 0,children:j}),F?/* @__PURE__ */ l(`div`,{className:`page-header-bar-bulk`,"data-wui-bar-bulk":``,hidden:J===0||void 0,children:[/* @__PURE__ */ c(`span`,{className:`page-header-bar-bulk-count`,"aria-live":`polite`,children:J>0?`${ee(J,{decimals:0})} selected`:``}),I]}):null,k!=null&&/* @__PURE__ */ c(`div`,{className:`page-actions`,children:k}),M!=null&&G&&/* @__PURE__ */ c(`div`,{className:`page-header-bar-meta`,children:M})]});let Q=T==null?null:typeof T==`string`?/* @__PURE__ */ c(i,{name:T,size:20}):T,$=C==null?null:/* @__PURE__ */ c(`div`,{className:`page-subtitle`,children:C});return/* @__PURE__ */ l(`div`,{className:q,...v,...H,children:[O!=null&&/* @__PURE__ */ c(`div`,{className:`page-breadcrumbs`,children:O}),/* @__PURE__ */ l(`div`,{className:`page-header-bar`,children:[/* @__PURE__ */ l(`div`,{className:`page-header-lead`,children:[Q!=null&&/* @__PURE__ */ c(`span`,{className:`page-header-icon`,children:Q}),/* @__PURE__ */ l(`div`,{className:`page-header-titles`,children:[w!=null&&/* @__PURE__ */ c(`div`,{className:`page-eyebrow`,children:w}),/* @__PURE__ */ l(`div`,{className:`page-titlebar`,children:[Z,D!=null&&/* @__PURE__ */ c(`span`,{className:`page-status`,children:D}),K&&$]}),!K&&$]})]}),k!=null&&/* @__PURE__ */ c(`div`,{className:`page-actions`,children:k})]})]})}export{_ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../lib/FieldMessage.js";import{loadFlagStyles as t}from"../lib/flagStyles.js";import{splitMarkerProps as
|
|
1
|
+
import e from"../lib/FieldMessage.js";import{loadFlagStyles as t}from"../lib/flagStyles.js";import n from"../lib/useElementEntry.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppInfoTip.js";import a from"./AppRequiredMark.js";import o from"./assertValidValue.js";import s from"./useWuiControl.js";import c from"./warnUnknownProps.js";import{forwardRef as l,useEffect as u,useId as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`sm`,`md`,`lg`],h=()=>import(`@webority/ui-elements/elements/phone`),g=l(function(l,g){let _=n(`wui-phone`,h),{marker:v,props:y}=r(`AppPhoneNumberInput`,l),{value:b,onChange:x,country:S,lockedCountry:C,disabled:w=!1,readOnly:T=!1,loading:E=!1,defaultValue:D,help:O,helpLabel:k=`More information`,name:A,id:j,label:M=`Phone number`,placeholder:N,required:P=!1,optional:F=!1,optionalLabel:I=`(optional)`,helperText:L,error:R,showFlag:z=!0,showDialCode:B=!0,size:V=`md`,fieldClassName:H=``,...U}=y;c(`AppPhoneNumberInput`,U),o(`AppPhoneNumberInput`,`size`,V,m),u(()=>{z&&t()},[z]);let W=d(),G=j||W,K=R&&G?`${G}-error`:void 0,q=!R&&L&&G?`${G}-hint`:void 0,{setRef:J}=s({ready:_,ref:g,value:b??(D===void 0?``:void 0),defaultValue:D,onChange:x,events:[`input`,`change`]});return/* @__PURE__ */ p(`div`,{...v,className:`field app-phone-number-input${V===`sm`?` phone-sm`:``}${V===`lg`?` phone-lg`:``}${H?` ${H}`:``}`,children:[M&&/* @__PURE__ */ p(`label`,{className:`label`,htmlFor:G,children:[M,F&&!P&&/* @__PURE__ */ f(`span`,{className:`label-optional`,children:` ${I}`}),P&&/* @__PURE__ */ f(a,{}),O&&/* @__PURE__ */ f(i,{label:k,children:O})]}),/* @__PURE__ */ f(`wui-phone`,{ref:J,id:G,name:A,"aria-label":typeof M==`string`?M:void 0,"aria-describedby":K||q,"aria-invalid":R?`true`:void 0,country:C||S,"locked-country":C||void 0,placeholder:N,required:P?``:void 0,disabled:w?``:void 0,readonly:T?``:void 0,loading:E?``:void 0,"hide-flag":z?void 0:``,"hide-dial":B?void 0:``,"external-error":``,...U}),/* @__PURE__ */ f(e,{error:R,hint:L,errorId:K,hintId:q})]})});export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../lib/FocusPanel.js";import t from"./assertValidValue.js";import ee from"./warnUnknownProps.js";import{cloneElement as n,useCallback as r,useEffect as i,useId as a,useRef as o,useState as s}from"react";import{OverlayTrigger as te,Popover as c}from"react-bootstrap";import{jsx as l,jsxs as u}from"react/jsx-runtime";var d={start:`left`,end:`right`,top:`top`,bottom:`bottom`,auto:`auto`},f={modifiers:[{name:`computeStyles`,options:{gpuAcceleration:!1}}]},p=[`dialog`];function m({trigger:m,children:h,title:g,placement:_=`bottom`,triggerType:v=`click`,onOpenChange:y,className:b=``,open:x,role:S,labelledBy:C,autoFocus:w=!1,openDelay:T=80,closeDelay:E=220,...D}){ee(`AppPopover`,D),t(`AppPopover`,`role`,S,p);let O=a(),k=`${O}-title`,A=o(null),[j,M]=s(null),N=m.props.ref,ne=r(e=>{M(e),typeof N==`function`?N(e):N&&(N.current=e)},[N]),[P,F]=s(!1),I=x!==void 0,L=I?x:P,R=S===`dialog`,z=v===`hover`||Array.isArray(v)&&v.includes(`hover`),B=z&&!I,V=L&&j!==null,H=o(null),U=o(P);U.current=P;let W=()=>{clearTimeout(H.current),H.current=null},G=(e,t)=>{W(),H.current=setTimeout(()=>{H.current=null,e!==U.current&&(F(e),y?.(e))},t)};i(()=>()=>clearTimeout(H.current),[]),i(()=>{if(!B||!P)return;let e=e=>{e.key===`Escape`&&(clearTimeout(H.current),H.current=null,F(!1),y?.(!1))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[B,P,y]);let K=e=>{B?G(e,e?T:E):(I||F(e),y?.(e))},q=R?{role:`dialog`,"aria-modal"
|
|
1
|
+
import e from"../lib/FocusPanel.js";import t from"./assertValidValue.js";import ee from"./warnUnknownProps.js";import{cloneElement as n,useCallback as r,useEffect as i,useId as a,useRef as o,useState as s}from"react";import{OverlayTrigger as te,Popover as c}from"react-bootstrap";import{jsx as l,jsxs as u}from"react/jsx-runtime";var d={start:`left`,end:`right`,top:`top`,bottom:`bottom`,auto:`auto`},f={modifiers:[{name:`computeStyles`,options:{gpuAcceleration:!1}}]},p=[`dialog`];function m({trigger:m,children:h,title:g,placement:_=`bottom`,triggerType:v=`click`,onOpenChange:y,className:b=``,open:x,role:S,labelledBy:C,autoFocus:w=!1,openDelay:T=80,closeDelay:E=220,...D}){ee(`AppPopover`,D),t(`AppPopover`,`role`,S,p);let O=a(),k=`${O}-title`,A=o(null),[j,M]=s(null),N=m.props.ref,ne=r(e=>{M(e),typeof N==`function`?N(e):N&&(N.current=e)},[N]),[P,F]=s(!1),I=x!==void 0,L=I?x:P,R=S===`dialog`,z=v===`hover`||Array.isArray(v)&&v.includes(`hover`),B=z&&!I,V=L&&j!==null,H=o(null),U=o(P);U.current=P;let W=()=>{clearTimeout(H.current??void 0),H.current=null},G=(e,t)=>{W(),H.current=setTimeout(()=>{H.current=null,e!==U.current&&(F(e),y?.(e))},t)};i(()=>()=>clearTimeout(H.current??void 0),[]),i(()=>{if(!B||!P)return;let e=e=>{e.key===`Escape`&&(clearTimeout(H.current??void 0),H.current=null,F(!1),y?.(!1))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[B,P,y]);let K=e=>{B?G(e,e?T:E):(I||F(e),y?.(e))},q=R?{role:`dialog`,"aria-modal":!1,"aria-labelledby":C??(g?k:void 0)}:{},J=B?{onMouseEnter:W,onMouseLeave:()=>G(!1,E),onFocus:W,onBlur:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||G(!1,E)}}:{},Y=/* @__PURE__ */ u(c,{id:O,className:b||void 0,...q,...J,children:[w&&/* @__PURE__ */ l(e,{triggerRef:A}),g&&/* @__PURE__ */ l(c.Header,{as:`div`,id:k,children:g}),h==null?null:/* @__PURE__ */ l(c.Body,{children:h})]}),{onClick:X,"aria-expanded":Z,...re}=D,Q=m.props[`aria-expanded`],$,ie=v===`click`||Array.isArray(v)&&v.includes(`click`);Z===void 0?Q===void 0?ie&&($=L):$=Q:$=Z;let ae=n(m,{...re,...$===void 0?{}:{"aria-expanded":$},ref:ne,onClick:e=>{A.current=e.currentTarget,X?.(e),typeof m.props.onClick==`function`&&m.props.onClick(e)}}),oe=v===`click`;return/* @__PURE__ */ l(te,{trigger:v,placement:d[_]||_,popperConfig:f,overlay:Y,rootClose:oe||R,...I&&z?{delay:{show:T,hide:E}}:{},onToggle:K,...I||z?{show:V}:{},children:ae})}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{encodeQr as e,qrSvgPath as t}from"../lib/qrCode.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./warnUnknownProps.js";import{useMemo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=4;function c(c){let{marker:l,props:u}=n(`AppQrCode`,c),{value:d,size:f=240,title:p=`QR code`,className:m,style:h,...g}=u;r(`AppQrCode`,g);let _=i(()=>{if(!d)return null;let n=e(String(d));return{modules:n.size+8,path:t(n,s)}},[d]);if(!_)return null;let{modules:v,path:y}=_,b=Math.max(1,Math.floor(
|
|
1
|
+
import{encodeQr as e,qrSvgPath as t}from"../lib/qrCode.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./warnUnknownProps.js";import{useMemo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=4;function c(c){let{marker:l,props:u}=n(`AppQrCode`,c),{value:d,size:f=240,title:p=`QR code`,className:m,style:h,...g}=u;if(r(`AppQrCode`,g),!Number.isFinite(f)||f<=0)throw RangeError(`<AppQrCode> received size=${String(f)}; size is a positive number of pixels.`);let _=i(()=>{if(!d)return null;let n=e(String(d));return{modules:n.size+8,path:t(n,s)}},[d]);if(!_)return null;let{modules:v,path:y}=_,b=Math.max(1,Math.floor(f/v))*v;return/* @__PURE__ */ o(`svg`,{viewBox:`0 0 ${v} ${v}`,width:b,height:b,role:`img`,"aria-label":p,shapeRendering:`crispEdges`,className:m||void 0,style:h,...l,...g,children:[/* @__PURE__ */ a(`rect`,{width:v,height:v,fill:`#ffffff`}),/* @__PURE__ */ a(`path`,{d:y,fill:`#000000`})]})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../lib/CheckField.js";import{FIELD_SIZES as t}from"../lib/fieldState.js";import n from"../lib/labelWithHelp.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./assertValidValue.js";import a from"./warnUnknownProps.js";import{forwardRef as o}from"react";import{jsx as s}from"react/jsx-runtime";var c=o(function(o,
|
|
1
|
+
import e from"../lib/CheckField.js";import{FIELD_SIZES as t}from"../lib/fieldState.js";import n from"../lib/labelWithHelp.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./assertValidValue.js";import a from"./warnUnknownProps.js";import{forwardRef as o}from"react";import{jsx as s}from"react/jsx-runtime";var c=e=>/* @__PURE__ */ Error(`<AppRadio> controlOnly draws no field, so it takes no ${e}; draw the label or message on the page.`),l=o(function(o,l){let{marker:u,props:d}=r(`AppRadio`,o),{label:f,id:p,name:m,error:h,helperText:g,help:_,helpLabel:v=`More information`,className:y=``,readOnly:b=!1,loading:x=!1,size:S=`md`,controlOnly:C=!1,...w}=d;if(a(`AppRadio`,w),i(`AppRadio`,`size`,S,t),C){if(f!=null&&f!==``)throw c(`label`);if(h!=null&&h!==``)throw c(`error`);if(g!=null&&g!==``)throw c(`helperText`);if(S!==`md`)throw c(`size`)}return/* @__PURE__ */ s(e,{rootProps:u,ref:l,label:n(f,_,v),id:p,name:m,error:h,hint:g,className:y,rest:w,inputType:`radio`,wrapperClass:`form-check`,readOnly:b,loading:x,size:S,controlOnly:C})});export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../lib/FieldMessage.js";import{blockWhenReadOnly as t}from"../lib/fieldState.js";import n from"../lib/fillLabel.js";import{splitMarkerProps as
|
|
1
|
+
import e from"../lib/FieldMessage.js";import{blockWhenReadOnly as t}from"../lib/fieldState.js";import n from"../lib/fillLabel.js";import r from"../lib/useElementEntry.js";import{splitMarkerProps as i}from"../lib/wuiMarker.js";import a from"./AppIcon.js";import o from"./AppInfoTip.js";import s from"./AppRequiredMark.js";import c from"./assertValidValue.js";import l from"./warnUnknownProps.js";import{useId as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";var m=()=>import(`@webority/ui-elements/elements/rating`),h={sm:16,md:20,lg:28},g=e=>String(Math.round(e*100)/100),_=(e,t,n)=>e>=t?`full`:n&&e>=t-.5?`half`:`empty`;function v(a){r(`wui-rating`,m);let{marker:v,props:b}=i(`AppRating`,a),{value:x,defaultValue:S,onChange:C,max:w=5,readOnly:T=!1,half:E=!1,showValue:D=!1,size:O=`md`,label:k,help:A,helpLabel:j=`More information`,ratingLabel:M=`Rating`,starLabel:N=`{count} star`,starsLabel:ee=`{count} stars`,valueText:te=`{value} out of {max}`,name:ne,required:P=!1,disabled:F=!1,loading:I=!1,error:L,helperText:R,id:z,className:B=``,fieldClassName:V=``,...H}=b;l(`AppRating`,H),c(`AppRating`,`size`,O,Object.keys(h));let U=u(),[W,G]=d(S),K=h[O]??h.md,q=Array.from({length:w},(e,t)=>t+1),J=(...e)=>[`wui-rating`,`wui-rating-${O}`,...e,B].filter(Boolean).join(` `);if(T){let e=x===void 0?W:x,t=Number.isFinite(Number(e))?Math.min(Math.max(Number(e),0),w):0,r=E?Math.round(t*2)/2:Math.round(t),i=`${typeof k==`string`&&k?`${k}: `:``}${n(te,{value:g(t),max:w})}`;return/* @__PURE__ */ p(`span`,{className:J(`wui-rating-display`,I&&`wui-field-busy`),id:z,role:`img`,"aria-label":i,"aria-busy":I||void 0,...v,...H,children:[/* @__PURE__ */ f(`span`,{className:`wui-rating-stars`,"aria-hidden":`true`,children:q.map(e=>/* @__PURE__ */ f(`span`,{className:`wui-rating-star wui-rating-star-${_(r,e,E)}`,children:/* @__PURE__ */ f(y,{px:K})},e))}),D&&/* @__PURE__ */ f(`span`,{className:`wui-rating-value`,"aria-hidden":`true`,children:g(t)})]})}let Y=z||U,X=ne||Y,Z=`${Y}-error`,Q=`${Y}-hint`,$=Math.round(Number(x===void 0?W:x))||0,re=e=>{I||(G(e),C?.(e))};return/* @__PURE__ */ p(`div`,{...v,className:`field${V?` ${V}`:``}`,children:[k!=null&&/* @__PURE__ */ p(`span`,{className:`label`,id:`${Y}-label`,children:[k,P&&/* @__PURE__ */ f(s,{}),A&&/* @__PURE__ */ f(o,{label:j,children:A})]}),/* @__PURE__ */ f(`wui-rating`,{class:J(`wui-rating-input`,I&&`wui-field-busy`),id:Y,role:`radiogroup`,"aria-busy":I?`true`:void 0,"aria-labelledby":k==null?void 0:`${Y}-label`,"aria-label":k==null?M:void 0,"aria-required":P?`true`:void 0,"aria-invalid":L?`true`:void 0,"aria-describedby":L?Z:R?Q:void 0,disabled:F?``:void 0,...H,children:q.map(e=>/* @__PURE__ */ p(`label`,{className:`wui-rating-star wui-rating-star-${$>=e?`full`:`empty`}`,"data-value":e,children:[/* @__PURE__ */ f(`input`,{type:`radio`,className:`visually-hidden`,name:X,value:e,"aria-label":n(e===1?N:ee,{count:e}),checked:$===e,onChange:()=>re(e),onClick:t(T||I),disabled:F||void 0,required:P||void 0}),/* @__PURE__ */ f(y,{px:K})]},e))}),/* @__PURE__ */ f(e,{error:L,hint:R,errorId:Z,hintId:Q})]})}function y({px:e}){return/* @__PURE__ */ p(`span`,{className:`wui-rating-glyphs`,"aria-hidden":`true`,children:[/* @__PURE__ */ f(a,{name:`star`,size:e}),/* @__PURE__ */ f(`span`,{className:`wui-rating-fill`,children:/* @__PURE__ */ f(a,{name:`star`,variant:`bold`,size:e})})]})}export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as
|
|
1
|
+
import e from"../lib/useElementEntry.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppActionIcon.js";import r from"./warnUnknownProps.js";import{formatNumber as i}from"@webority/ui-elements/helpers";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=e=>i(e,{decimals:0}),c=()=>import(`@webority/ui-elements/elements/record-pager`);function l(i){e(`wui-record-pager`,c);let{marker:l,props:u}=t(`AppRecordPager`,i),{index:d,total:f,prevHref:p,onPrev:m,nextHref:h,onNext:g,prevLabel:_=`Previous`,nextLabel:v=`Next`,keys:y=!1,className:b=``,...x}=u;r(`AppRecordPager`,x);let S=Number(d),C=Number(f),w=Number.isInteger(S)&&Number.isInteger(C)&&S>=1&&S<=C,T=w&&S>1&&!!(p||m),E=w&&S<C&&!!(h||g);return/* @__PURE__ */ o(`wui-record-pager`,{class:[`wui-record-pager`,b].filter(Boolean).join(` `),keys:y?``:void 0,...l,...x,children:[/* @__PURE__ */ a(`span`,{className:`wui-record-pager-position`,"aria-live":`polite`,children:w?`${s(S)} of ${s(C)}`:``}),/* @__PURE__ */ a(n,{icon:`chevron-left`,label:_,size:18,className:`wui-record-pager-prev`,href:p||void 0,onClick:m,disabled:!T,shortcut:y?`K`:void 0}),/* @__PURE__ */ a(n,{icon:`chevron-right`,label:v,size:18,className:`wui-record-pager-next`,href:h||void 0,onClick:g,disabled:!E,shortcut:y?`J`:void 0})]})}export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as
|
|
1
|
+
import e from"../lib/useElementEntry.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./warnUnknownProps.js";import r from"./withTooltip.js";import{EMPTY_VALUE as i,formatDate as a,relativeTimeTitle as o,toInstant as s}from"@webority/ui-elements/helpers";import{jsx as c}from"react/jsx-runtime";var l=()=>import(`@webority/ui-elements/elements/relative-time`);function u(u){e(`wui-relative-time`,l);let{marker:d,props:f}=t(`AppRelativeTime`,u),{value:p,tooltipPlacement:m=`auto`,className:h=``,...g}=f;n(`AppRelativeTime`,g);let _=s(p),v=Number.isFinite(_),y=v?typeof p==`string`?p.trim():new Date(_).toISOString():void 0;return r(/* @__PURE__ */ c(`wui-relative-time`,{class:[`wui-relative-time`,h].filter(Boolean).join(` `),...d,...g,children:/* @__PURE__ */ c(`time`,{dateTime:y,children:v?a(_):i})}),v?o(_):void 0,m)}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{FILL_VARIANTS as e}from"../lib/vocabulary.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppActionIcon.js";import r from"./AppButton.js";import i from"./AppLink.js";import a from"./assertValidValue.js";import o from"./warnUnknownProps.js";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l(e,t){return`id`in e&&(typeof e.id==`string`||typeof e.id==`number`)?e.id:t}function u(u){let{marker:d,props:f}=t(`AppRepeater`,u),{rows:p=[],renderRow:m,rowLabel:h,onAdd:g,onRemove:_,addLabel:v=`Add another`,addVariant:y=`soft`,removeLabel:b=`Remove row`,emptyText:x,min:S=0,max:C,numbered:w=!0,className:T=``,...E}=f;o(`AppRepeater`,E),a(`AppRepeater`,`addVariant`,y,e);let D=typeof C==`number`&&p.length>=C,O=!!_&&p.length>S;return/* @__PURE__ */ c(`div`,{className:`repeater${T?` ${T}`:``}`,...d,...E,children:[p.length===0&&x&&/* @__PURE__ */ s(`div`,{className:`repeater-empty`,children:x}),p.map((e,t)=>{let r=h?h(e,t):null;return/* @__PURE__ */ c(`div`,{className:`repeater-row`,children:[(!!r||O)&&/* @__PURE__ */ s(`span`,{className:`repeater-row-label`,children:r}),w&&/* @__PURE__ */ s(`span`,{className:`repeater-index`,children:t+1}),/* @__PURE__ */ s(`div`,{className:`repeater-body`,children:m(e,t)}),O&&/* @__PURE__ */ s(n,{icon:`trash-2`,label:`${b} ${t+1}`,tone:`danger`,className:`repeater-remove`,onClick:()=>_?.(t)})]},l(e,t))}),y===`link`?/* @__PURE__ */ s(i,{animation:`static`,size:`sm`,linkComponent:`button`,type:`button`,leftIcon:`plus`,className:`repeater-add`,disabled:D,onClick:g,children:v}):/* @__PURE__ */ s(r,{variant:y,size:`sm`,leftIcon:`plus`,className:`repeater-add`,disabled:D,onClick:g,children:v})]})}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as
|
|
1
|
+
import e from"../lib/useElementEntry.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./assertValidValue.js";import r from"./warnUnknownProps.js";import{createContext as i,useEffect as a,useRef as o}from"react";import{jsx as s}from"react/jsx-runtime";var c=[`horizontal`,`vertical`],l=()=>import(`@webority/ui-elements/elements/resizable`),u=e=>typeof e==`object`&&!!e&&`sizes`in e&&Array.isArray(e.sizes),d=i(`horizontal`);function f(i){e(`wui-resizable`,l);let{marker:f,props:p}=t(`AppResizable`,i),{direction:m=`horizontal`,storageKey:h,onChange:g,children:_,className:v=``,...y}=p;r(`AppResizable`,y),n(`AppResizable`,`direction`,m,c);let b=o(null),x=m===`vertical`;return a(()=>{let e=b.current;if(!e||!g)return;let t=t=>{if(t.target!==e)return;let n=t instanceof CustomEvent?t.detail:void 0;if(!u(n))throw Error(`wui-resizable:change carried no sizes`);g(n.sizes)};return e.addEventListener(`wui-resizable:change`,t),()=>e.removeEventListener(`wui-resizable:change`,t)},[g]),/* @__PURE__ */ s(d.Provider,{value:x?`vertical`:`horizontal`,children:/* @__PURE__ */ s(`wui-resizable`,{ref:b,class:[`wui-resizable`,v].filter(Boolean).join(` `),direction:x?`vertical`:`horizontal`,"storage-key":h||void 0,...f,...y,children:_})})}export{d as ResizableDirection,f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{linkTarget as e}from"../lib/linkTarget.js";import{TargetLink as t}from"../lib/TargetLink.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppIcon.js";import i from"./warnUnknownProps.js";import{Fragment as a,jsx as o,jsxs as s}from"react/jsx-runtime";function c(c){let{marker:l,props:u}=n(`AppResourceCard`,c),{icon:d,title:f,description:p,href:m,external:h=!1,linkComponent:g,className:_=``,...v}=u;i(`AppResourceCard`,v);let y=/* @__PURE__ */ s(a,{children:[/* @__PURE__ */ o(`span`,{className:`res-card-icon`,children:/* @__PURE__ */ o(r,{name:d,size:18})}),/* @__PURE__ */ s(`span`,{className:`res-card-body`,children:[/* @__PURE__ */ o(`span`,{className:`res-card-title`,children:f}),p&&/* @__PURE__ */ o(`span`,{className:`res-card-text`,children:p})]})]}),b=`res-card${_?` ${_}`:``}`,x=e(g,{href:m,external:h});return/* @__PURE__ */ o(t,{link:x,className:b,target:h?`_blank`:void 0,rel:h?`noopener noreferrer`:void 0,...l,...v,children:y})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./assertValidValue.js";import n from"./renderIconProp.js";import r from"./warnUnknownProps.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o={success:{icon:`check-circle`,tone:`success`},error:{icon:`x-circle`,tone:`danger`},warning:{icon:`alert-triangle`,tone:`warning`},info:{icon:`info`,tone:`info`},403:{tone:`muted`},404:{tone:`muted`},500:{tone:`muted`}};function s(s){let{marker:c,props:l}=e(`AppResult`,s),{status:u=`info`,title:d,subtitle:f,icon:p,actions:m,children:h,headingLevel:g=2,className:_=``,...v}=l;r(`AppResult`,v),t(`AppResult`,`status`,u,Object.keys(o)),t(`AppResult`,`headingLevel`,g,[1,2,3]);let y=[1,2,3].includes(g)?`h${g}`:`h2`,b=o[u]||o.info,x=b
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./assertValidValue.js";import n from"./renderIconProp.js";import r from"./warnUnknownProps.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";var o={success:{icon:`check-circle`,tone:`success`},error:{icon:`x-circle`,tone:`danger`},warning:{icon:`alert-triangle`,tone:`warning`},info:{icon:`info`,tone:`info`},403:{tone:`muted`},404:{tone:`muted`},500:{tone:`muted`}};function s(s){let{marker:c,props:l}=e(`AppResult`,s),{status:u=`info`,title:d,subtitle:f,icon:p,actions:m,children:h,headingLevel:g=2,className:_=``,...v}=l;r(`AppResult`,v),t(`AppResult`,`status`,u,Object.keys(o)),t(`AppResult`,`headingLevel`,g,[1,2,3]);let y=[1,2,3].includes(g)?`h${g}`:`h2`,b=o[u]||o.info,x=b?.tone,S=/^\d+$/.test(u),C=p??(S?null:b?.icon),w=[`result`,`result-${x}`,_].filter(Boolean).join(` `);return/* @__PURE__ */ a(`div`,{className:w,...c,...v,children:[S?/* @__PURE__ */ i(`div`,{className:`result-code`,"aria-hidden":`true`,children:u}):C?/* @__PURE__ */ i(`div`,{className:`result-icon`,children:n(C,{size:48})}):null,d!=null&&/* @__PURE__ */ i(y,{className:`result-title`,children:d}),f!=null&&/* @__PURE__ */ i(`div`,{className:`result-subtitle`,children:f}),m&&/* @__PURE__ */ i(`div`,{className:`result-actions`,children:m}),h&&/* @__PURE__ */ i(`div`,{className:`result-extra`,children:h})]})}export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devWarn as e}from"../lib/devWarn.js";import t from"../lib/FieldMessage.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import a from"./assertValidValue.js";import o from"./useWuiControl.js";import s from"./warnUnknownProps.js";import{
|
|
1
|
+
import{devWarn as e}from"../lib/devWarn.js";import t from"../lib/FieldMessage.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppInfoTip.js";import i from"./AppRequiredMark.js";import a from"./assertValidValue.js";import o from"./useWuiControl.js";import s from"./warnUnknownProps.js";import{isElementDefined as c,whenElementDefined as l}from"@webority/ui-elements/helpers";import{forwardRef as u,useEffect as d,useId as f,useState as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";var g=[`html`,`markdown`],_=[`input`,`change`],v=`The editor couldn't load. Reload the page and try again.`,y=u(function(u,y){let{marker:b,props:x}=n(`AppRichText`,u),{value:S,onChange:C,format:w,placeholder:T,name:E,label:D,error:O,helperText:k,required:A=!1,disabled:j=!1,readOnly:M=!1,loading:N=!1,defaultValue:P,id:F,ariaLabel:I,className:L=``,fieldClassName:R=``,help:z,helpLabel:B=`More information`,...V}=x;s(`AppRichText`,V),a(`AppRichText`,`format`,w,g);let H=f(),U=F||H,[W,G]=p(!1),[K,q]=p(()=>c(`wui-rich-text`)),{setRef:J}=o({ready:K,ref:y,value:S,defaultValue:P,onChange:C,events:_});return d(()=>{if(K)return;let t=!0;return import(`@webority/ui-elements/rich-text`).then(()=>l(`wui-rich-text`)).then(()=>{t&&q(!0)},n=>{let r=typeof n==`object`&&n&&`message`in n?n.message:void 0;e(`[AppRichText] the editor failed to load:`,r),t&&G(!0)}),()=>{t=!1}},[K]),/* @__PURE__ */ h(`div`,{...b,className:`field${R?` ${R}`:``}`,children:[D&&/* @__PURE__ */ h(`label`,{className:`label`,htmlFor:U,children:[D,A&&/* @__PURE__ */ m(i,{}),z&&/* @__PURE__ */ m(r,{label:B,children:z})]}),W?/* @__PURE__ */ m(`div`,{className:`field-error`,role:`status`,children:v}):/* @__PURE__ */ m(`wui-rich-text`,{ref:J,id:U,role:`group`,name:E,format:w||void 0,placeholder:T,"aria-label":I||(typeof D==`string`?D:void 0),"aria-describedby":O?`${U}-error`:k?`${U}-hint`:void 0,"aria-invalid":O?`true`:void 0,required:A?``:void 0,disabled:j?``:void 0,readonly:M?``:void 0,loading:N?``:void 0,className:L||void 0,...V},w||`html`),/* @__PURE__ */ m(t,{error:O,hint:k,errorId:`${U}-error`,hintId:`${U}-hint`})]})});export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as
|
|
1
|
+
import e from"../lib/useElementEntry.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./assertValidValue.js";import r from"./warnUnknownProps.js";import{MONEY_UNITS as i,formatValue as a}from"@webority/ui-elements/helpers";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`number`,`currency`,`percent`],l=()=>import(`@webority/ui-elements/elements/rolling-number`);function u(u){e(`wui-rolling-number`,l);let{marker:d,props:f}=t(`AppRollingNumber`,u),{value:p,format:m=`number`,unit:h,decimals:g,duration:_,className:v=``,...y}=f;r(`AppRollingNumber`,y),n(`AppRollingNumber`,`format`,m,c),n(`AppRollingNumber`,`unit`,h,i);let b=typeof p==`string`&&p.trim()!==``?Number(p):p,x=typeof b==`number`&&Number.isFinite(b),S=a(x?b:null,{style:m,unit:h,decimals:g});return/* @__PURE__ */ s(`wui-rolling-number`,{class:[`wui-rolling-number`,v].filter(Boolean).join(` `),value:x?String(b):void 0,format:m,unit:h,decimals:g===void 0?void 0:String(g),duration:_===void 0?void 0:String(_),...d,...y,children:[/* @__PURE__ */ o(`span`,{className:`wui-rolling-number-text`,children:S}),/* @__PURE__ */ o(`span`,{className:`wui-rolling-number-roll`,"aria-hidden":`true`})]})}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./assertValidValue.js";import r from"./warnUnknownProps.js";import{isTypingTarget as i}from"@webority/ui-elements/helpers";import{useCallback as a,useEffect as o,useRef as s,useState as c}from"react";import{Form as l}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{flushSync as f}from"react-dom";var p=[`sm`,`md`,`lg`];function m(m){let{marker:h,props:g}=e(`AppSearch`,m),{value:_,defaultValue:v,onChange:y,placeholder:b=`Search…`,ariaLabel:x,clearLabel:S=`Clear search`,searchLabel:C=`Search`,iconSize:w,size:T,loading:E=!1,collapsible:D=!1,disabled:O=!1,className:k=``,form:A,onKeyDown:j,...M}=g;r(`AppSearch`,M)
|
|
1
|
+
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import t from"./AppIcon.js";import n from"./assertValidValue.js";import r from"./warnUnknownProps.js";import{isTypingTarget as i}from"@webority/ui-elements/helpers";import{useCallback as a,useEffect as o,useRef as s,useState as c}from"react";import{Form as l}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{flushSync as f}from"react-dom";var p=[`sm`,`md`,`lg`];function m(m){let{marker:h,props:g}=e(`AppSearch`,m),{value:_,defaultValue:v,onChange:y,placeholder:b=`Search…`,ariaLabel:x,clearLabel:S=`Clear search`,searchLabel:C=`Search`,iconSize:w,size:T,loading:E=!1,collapsible:D=!1,disabled:O=!1,className:k=``,form:A,onKeyDown:j,...M}=g;r(`AppSearch`,M);let{readOnly:N,...P}=M;n(`AppSearch`,`size`,T,p);let F=w??18,[I,L]=c(v??``),R=_===void 0?I:_,[z,B]=c(!!R),V=s(null),H=s(null),U=!D||z||!!R,W=a(()=>{B(!0),requestAnimationFrame(()=>V.current?.focus())},[]),G=()=>{L(``),f(()=>y?.(``)),V.current?.form?.requestSubmit()};o(()=>{if(!D)return;let e=e=>{e.key!==`/`||e.ctrlKey||e.altKey||e.metaKey||i(e.target instanceof Node?e.target:null)||[...document.querySelectorAll(`.search-wrap.wui-search-collapsible`)].find(e=>e.offsetParent!==null)===H.current&&(e.preventDefault(),W())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[D,W]);let K=[`search-wrap`,R?`has-value`:``,T===`sm`?`search-sm`:T===`lg`?`search-lg`:``,E?`is-loading`:``,D?`wui-search-collapsible`:``,D&&!U?`is-collapsed`:``,k].filter(Boolean).join(` `),q=w==null?void 0:{"--wui-search-icon-size":`${w}px`};return/* @__PURE__ */ d(`div`,{...h,className:K,style:q,ref:H,onBlur:e=>{D&&!e.currentTarget.contains(e.relatedTarget)&&!R&&B(!1)},children:[D&&/* @__PURE__ */ u(`button`,{type:`button`,className:`wui-search-toggle`,"aria-label":x||b||C,"aria-expanded":U?`true`:`false`,onClick:W,children:/* @__PURE__ */ u(t,{name:`search`,size:F})}),E&&/* @__PURE__ */ u(`span`,{className:`search-spinner`,"aria-hidden":`true`}),/* @__PURE__ */ u(t,{name:`search`,size:F,className:`search-icon`}),/* @__PURE__ */ u(l.Control,{ref:V,type:`search`,className:`input search-input`,placeholder:b,value:R,onChange:e=>{L(e.target.value),y?.(e.target.value)},onKeyDown:e=>{j?.(e),D&&e.key===`Escape`&&!R&&B(!1)},"aria-label":x,form:A,disabled:O,...N===void 0?null:{readOnly:N},...P}),!O&&/* @__PURE__ */ u(`button`,{type:`button`,className:`search-clear`,"aria-label":S,onClick:G,hidden:!R,children:/* @__PURE__ */ u(t,{name:`x`,size:16})})]})}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{SECTION_ALIGNS as t,SECTION_HEADINGS as n,SECTION_VARIANTS as r,sectionHeading as i}from"../lib/sectionShell.js";import{splitMarkerProps as a}from"../lib/wuiMarker.js";import o from"./AppAlert.js";import s from"./AppButton.js";import c from"./
|
|
1
|
+
import e,{SECTION_ALIGNS as t,SECTION_HEADINGS as n,SECTION_VARIANTS as r,sectionHeading as i}from"../lib/sectionShell.js";import{splitMarkerProps as a}from"../lib/wuiMarker.js";import o from"./AppAlert.js";import s from"./AppButton.js";import c from"./AppForm.js";import l from"./AppInput.js";import ee from"./AppPhoneNumberInput.js";import u from"./AppTextarea.js";import d from"./assertValidValue.js";import te from"./warnUnknownProps.js";import{useId as ne,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";var h=[`name`,`email`,`phone`,`company`,`message`],g={name:`name`,email:`email`,company:`organization`},_=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function v(e,t,n){let r={};for(let{name:i,required:a=!1}of e){let e=(t[i]??``).trim();a&&e===``?r[i]=n.required:i===`email`&&e!==``&&!_.test(e)&&(r[i]=n.invalidEmail)}return r}function y(_){let{marker:y,props:b}=a(`AppSectionLeadCapture`,_),{title:x,description:S,fields:C,onSubmit:w,submitLabel:T=`Send`,nameLabel:E=`Name`,emailLabel:D=`Email`,phoneLabel:O=`Phone number`,companyLabel:k=`Company`,messageLabel:A=`Message`,requiredText:j=`This field is required.`,invalidEmailText:M=`Enter an email address such as name@example.com.`,submitErrorText:N=`We could not send your message. Please try again.`,successTitle:P,successText:F,consent:I,as:L=`h2`,eyebrow:R,subtitle:z,align:B=`center`,variant:V=`default`,className:H=``,...U}=b;te(`AppSectionLeadCapture`,U),d(`AppSectionLeadCapture`,`as`,L,n),d(`AppSectionLeadCapture`,`align`,B,t),d(`AppSectionLeadCapture`,`variant`,V,r);for(let e of C)d(`AppSectionLeadCapture`,`fields.name`,e.name,h);let W=ne(),[G,K]=f(()=>Object.fromEntries(C.map(e=>[e.name,``]))),[q,J]=f({}),[Y,X]=f(null),[Z,Q]=f(!1),[re,ie]=f(!1),$=(e,t)=>K(n=>({...n,[e]:t})),ae={name:E,email:D,phone:O,company:k,message:A},oe={required:j,invalidEmail:M};async function se(){if(Z)return!1;let e=v(C,G,oe);if(J(e),X(null),Object.keys(e).length>0)return!1;let t=Object.fromEntries(Object.entries(G).map(([e,t])=>[e,(t??``).trim()]));Q(!0);try{return await w(t),ie(!0),!0}catch(e){let t=typeof e==`object`&&e&&`message`in e?e.message:void 0;return X(typeof t==`string`&&t!==``?t:N),!1}finally{Q(!1)}}function ce({name:e,label:t=ae[e],required:n=!1}){let r=`${W}-${e}`,i=q[e];return e===`phone`?/* @__PURE__ */ p(ee,{id:r,name:e,label:t,required:n,value:G[e],onChange:t=>$(e,t),error:i},e):e===`message`?/* @__PURE__ */ p(u,{id:r,name:e,label:t,required:n,value:G[e],onChange:t=>$(e,t.target.value),error:i},e):/* @__PURE__ */ p(l,{id:r,name:e,type:e===`email`?`email`:`text`,autoComplete:g[e],label:t,required:n,value:G[e],onChange:t=>$(e,t.target.value),error:i},e)}return/* @__PURE__ */ m(e,{component:`AppSectionLeadCapture`,kind:`lead-capture`,title:x,as:i(L,`h2`),eyebrow:R,subtitle:z,align:B,variant:V,className:H,rest:{...y,...U},children:[S!=null&&S!==``&&/* @__PURE__ */ p(`p`,{className:`wui-section-lead-text`,children:S}),re?/* @__PURE__ */ p(`div`,{className:`wui-section-lead-success`,children:/* @__PURE__ */ p(o,{tone:`success`,title:P,children:F})}):/* @__PURE__ */ m(c,{className:`wui-section-lead-form`,noValidate:!0,onSubmit:se,children:[/* @__PURE__ */ p(`div`,{className:`wui-section-lead-fields`,children:C.map(ce)}),Y!=null&&/* @__PURE__ */ p(o,{tone:`danger`,children:Y}),/* @__PURE__ */ p(s,{type:`submit`,loading:Z,children:T}),I!=null&&I!==``&&/* @__PURE__ */ p(`p`,{className:`wui-section-lead-consent`,children:I})]})]})}export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{linkTarget as e}from"../lib/linkTarget.js";import t,{SECTION_ALIGNS as n,SECTION_HEADINGS as r,SECTION_VARIANTS as i,SectionImage as a,sectionHeading as o}from"../lib/sectionShell.js";import{
|
|
1
|
+
import{linkTarget as e}from"../lib/linkTarget.js";import t,{SECTION_ALIGNS as n,SECTION_HEADINGS as r,SECTION_VARIANTS as i,SectionImage as a,sectionHeading as o}from"../lib/sectionShell.js";import{TargetLink as s}from"../lib/TargetLink.js";import{splitMarkerProps as c}from"../lib/wuiMarker.js";import l from"./assertValidValue.js";import u from"./warnUnknownProps.js";import{jsx as d}from"react/jsx-runtime";var f=e=>typeof e==`string`&&e.trim()!==``?e:void 0;function p(e,t){let n=f(e.alt)??f(e.name)??f(e.label);if(n===void 0||e.width===void 0||e.height===void 0)throw Error(`AppSectionLogos item "${t}" needs alt, width and height.`);return/* @__PURE__ */ d(a,{className:`wui-section-logo-img`,src:t,alt:n,width:e.width,height:e.height})}function m(a){let{marker:m,props:h}=c(`AppSectionLogos`,a),{title:g,items:_=[],as:v=`h2`,eyebrow:y,subtitle:b,align:x=`center`,variant:S=`default`,className:C=``,linkComponent:w,...T}=h;u(`AppSectionLogos`,T),l(`AppSectionLogos`,`as`,v,r),l(`AppSectionLogos`,`align`,x,n),l(`AppSectionLogos`,`variant`,S,i);for(let e of _){let t=f(e.src),n=f(e.name)??f(e.label),r=(e.width??0)>0&&(e.height??0)>0;if(!(t?(f(e.alt)??n)!==void 0&&r:n!==void 0))throw Error(`AppSectionLogos item "${e.src??``}" needs src, alt (the company's name), width and height: a logo without a size moves the page when it loads.`)}return/* @__PURE__ */ d(t,{component:`AppSectionLogos`,kind:`logos`,title:g,as:o(v,`h2`),eyebrow:y,subtitle:b,align:x,variant:S,className:C,rest:{...m,...T},children:_.length>0&&/* @__PURE__ */ d(`ul`,{className:`wui-section-logos-list`,children:_.map(t=>{let n=f(t.src),r=f(t.name)??f(t.label),i=n?p(t,n):/* @__PURE__ */ d(`span`,{className:`wui-section-logo-text`,children:r}),a=e(w,{href:t.href});return/* @__PURE__ */ d(`li`,{className:`wui-section-logo`,children:t.href?/* @__PURE__ */ d(s,{link:a,children:i}):i},t.key??n??r)})})})}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FIELD_BUSY_CLASS as e,blockWhenReadOnly as t}from"../lib/fieldState.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppIcon.js";import i from"./AppInfoTip.js";import a from"./assertValidValue.js";import o from"./warnUnknownProps.js";import{
|
|
1
|
+
import{FIELD_BUSY_CLASS as e,blockWhenReadOnly as t}from"../lib/fieldState.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppIcon.js";import i from"./AppInfoTip.js";import a from"./assertValidValue.js";import o from"./warnUnknownProps.js";import{useCallback as s,useEffect as c,useId as l,useLayoutEffect as u,useRef as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";var h={sm:`segmented-sm`,md:``,lg:`segmented-lg`};function g(g){let{marker:_,props:v}=n(`AppSegmented`,g),{options:y=[],value:b,defaultValue:x,onChange:S,label:C,name:w,size:T=`md`,fullWidth:E=!1,bordered:D=!0,disabled:O=!1,readOnly:k=!1,loading:A=!1,labelVisible:j=!1,help:M,helpLabel:N=`More information`,className:P=``,...F}=v;o(`AppSegmented`,F),a(`AppSegmented`,`size`,T,Object.keys(h));let I=l(),L=w||I,R=d(null),z=d(null),[B,V]=f(x),H=b===void 0?B:b,U=[`segmented`,h[T]??``,E?`segmented-full`:``,D?``:`wui-segmented-borderless`,O?`is-disabled`:``,A?e:``,P].filter(Boolean).join(` `),W=d(null),G=s(e=>{let t=R.current,n=z.current;if(!t||!n)return;let r=t.querySelector(`.segmented-option:has(.segmented-input:checked)`);if(!r||!t.offsetWidth){n.style.opacity=`0`,W.current=null;return}let i=r.offsetLeft,a=r.offsetWidth,o=W.current;if(o&&o.thumb===n&&o.left===i&&o.width===a)return;let s=e||!o||o.thumb!==n;s&&t.classList.remove(`is-animated`),n.style.width=`${a}px`,n.style.transform=`translateX(${i}px)`,n.style.opacity=`1`,W.current={thumb:n,left:i,width:a},s&&requestAnimationFrame(()=>R.current?.classList.add(`is-animated`))},[]);u(()=>{G(!1)});let K=s(e=>{if(R.current=e,!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>G(!0));return t.observe(e),()=>{t.disconnect(),R.current=null}},[G]);c(()=>{let e=requestAnimationFrame(()=>R.current?.classList.add(`is-animated`));return()=>cancelAnimationFrame(e)},[]);let q=j&&C,J=/* @__PURE__ */ m(`div`,{ref:K,className:U,role:`radiogroup`,"aria-label":C,"aria-disabled":O||void 0,"aria-busy":A||void 0,...q?void 0:_,...F,children:[/* @__PURE__ */ p(`span`,{className:`segmented-thumb`,ref:z,"aria-hidden":`true`}),y.map(e=>/* @__PURE__ */ m(`label`,{className:`segmented-option`,children:[/* @__PURE__ */ p(`input`,{type:`radio`,className:`segmented-input`,name:L,value:e.value,checked:e.value===H,disabled:O||A||e.disabled,"aria-readonly":k||void 0,onClick:t(k||A),onChange:()=>{V(e.value),S?.(e.value)}}),e.icon&&/* @__PURE__ */ p(r,{name:e.icon,size:13}),e.note?/* @__PURE__ */ m(`span`,{className:`segmented-option-text`,children:[/* @__PURE__ */ p(`span`,{className:`segmented-option-label`,children:e.label}),/* @__PURE__ */ p(`span`,{className:`segmented-option-note`,children:e.note})]}):e.label,e.count!=null&&/* @__PURE__ */ p(`span`,{className:`wui-segmented-option-count`,children:e.count})]},e.value))]},`group`);return q?/* @__PURE__ */ m(`div`,{className:`field`,..._,children:[/* @__PURE__ */ p(`span`,{className:`label`,"aria-hidden":`true`,children:C}),M&&/* @__PURE__ */ p(i,{label:N,children:M}),J]},`field`):J}export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devWarn as e}from"../lib/devWarn.js";import t from"../lib/FieldMessage.js";import{loadFlagStyles as n}from"../lib/flagStyles.js";import{splitMarkerProps as
|
|
1
|
+
import{devWarn as e}from"../lib/devWarn.js";import t from"../lib/FieldMessage.js";import{loadFlagStyles as n}from"../lib/flagStyles.js";import r from"../lib/useElementEntry.js";import{splitMarkerProps as ee}from"../lib/wuiMarker.js";import te from"./AppInfoTip.js";import ne from"./AppRequiredMark.js";import i from"./assertValidValue.js";import a from"./textOf.js";import re from"./useNodeLabels.js";import ie,{optionsEqual as ae}from"./useWuiControl.js";import oe from"./warnUnknownProps.js";import{forwardRef as o,useEffect as s,useId as se,useLayoutEffect as c,useMemo as ce,useRef as l}from"react";import{Fragment as le,jsx as u,jsxs as d}from"react/jsx-runtime";var ue=[`single`,`multiple`,`search`,`tag`,`country`],de=[`comfortable`,`compact`],f=[`sm`,`md`,`lg`],fe=[`off`,`border`,`above`],pe=[],p=[],me=()=>import(`@webority/ui-elements/elements/select`),he=e=>e===`multiple`||e===`tag`,m=e=>e!=null&&e!==``,h=e=>{throw Error(`<AppSelect> controlOnly draws no field, so it takes no ${e}; draw the label or message on the page.`)},ge=(e,t)=>{let n=t??``;String(e.value??``)!==String(n)&&(e.value=n)},_e=(e,t)=>{let n=Array.isArray(t)?t:p,r=Array.isArray(e.value)?e.value:p;n.length===r.length&&n.every((e,t)=>e===r[t])||(e.value=n)},ve=(e,t)=>({...e,label:t}),ye=e=>Array.isArray(e)?e.join(`,`):e,be=o(function(o,be){let g=r(`wui-select`,me),{marker:_,props:xe}=ee(`AppSelect`,o),{mode:v=`single`,density:y=`comfortable`,size:b,value:Se,defaultValue:x,onChange:Ce,options:S=pe,loadOptions:C,remote:w=!1,onSearch:we,validate:T,placeholder:Te,searchPlaceholder:Ee,emptyText:De,searchable:E,clearable:Oe=!1,openOnHover:ke=!1,icon:Ae,valuePrefix:D,prefix:O,suffix:k,floatingLabel:A=`off`,disabled:je,readOnly:Me=!1,loading:Ne=!1,open:Pe,label:j,required:M=!1,optional:N=!1,optionalLabel:P=`(optional)`,error:F,helperText:I,help:L,helpLabel:Fe=`More information`,id:Ie,name:Le,minChars:R,debounce:z,allowCustom:Re=!1,addLabel:ze,searchingText:Be,hintText:Ve,valueLabel:He,valueAvatar:Ue,valueInitials:We,maxTags:B,allowDuplicates:Ge=!1,separators:Ke,pattern:qe,invalidMessage:Je,createLabel:Ye,collapseChips:Xe=!1,selectedText:Ze,clearAllLabel:Qe,countries:$e,suggested:et,suggestedLabel:tt,allCountriesLabel:nt,recentsKey:rt,recentsLimit:V,recentsLabel:it,className:at=``,fieldClassName:H=``,controlOnly:U=!1,"aria-label":ot,"aria-labelledby":st,"aria-describedby":ct,...lt}=xe;oe(`AppSelect`,lt),i(`AppSelect`,`mode`,v,ue),i(`AppSelect`,`density`,y,de),i(`AppSelect`,`size`,b,f);let W=he(v);i(`AppSelect`,`floatingLabel`,A,W?[`off`]:fe);let ut=l(!1);W&&(O!=null||k!=null)&&!ut.current&&(ut.current=!0,e(`AppSelect: prefix and suffix are not drawn in mode="${v}"; they are ignored.`));let dt=se(),G=l(!1);s(()=>{v===`country`&&n()},[v]);let{setRef:ft,innerRef:K}=ie({ready:g,ref:be,value:Se??(x===void 0?W?p:``:void 0),defaultValue:x,writeValue:W?_e:ge,on:{change:e=>{let t=e.currentTarget.value,n={isCustom:!!e.detail?.isCustom};switch(o.mode){case`multiple`:Array.isArray(t)&&o.onChange?.(t);break;case`tag`:Array.isArray(t)&&o.onChange?.(t,n);break;case`search`:typeof t==`string`&&o.onChange?.(t,n);break;default:typeof t==`string`&&o.onChange?.(t)}},search:e=>{w&&typeof C!=`function`&&we?.(e.detail.query,{seq:e.detail.seq})}}}),pt=ce(()=>typeof C==`function`?(e,t)=>new Promise(n=>n(C(e,t))).then(e=>(G.current=!0,e),e=>{throw G.current=!0,e}):null,[C]),{portal:mt,toElementOptions:q}=re(S),J=l({el:null,options:null,map:null});c(()=>{let e=K.current;if(!e||!g||J.current.el===e&&J.current.options===S&&J.current.map===q||(J.current={el:e,options:S,map:q},C&&G.current))return;let t=q(S,ve);ae(t,e.options)||(e.options=t)}),c(()=>{let e=K.current;if(!e||!g)return;e.loadOptions!==pt&&(e.loadOptions=pt);let t=typeof T==`function`?T:null;e.validate!==t&&(e.validate=t)}),c(()=>{K.current?.toggleAttribute(`loading`,!!Ne)});let Y=Ie||dt,X=!W&&A!==`off`&&j,ht=F&&Y?`${Y}-error`:void 0,gt=I&&Y?`${Y}-hint`:void 0,_t=ht||gt||ct;s(()=>{let e=K.current;e&&(D==null||D===``?e.removeAttribute(`prefix`):e.setAttribute(`prefix`,D))},[D,K]);let vt=!W&&!X&&(O!=null||k!=null),yt=v===`multiple`||v===`tag`||v===`country`;if(U&&(m(j)&&h(`label`),m(F)&&h(`error`),m(I)&&h(`helperText`),m(H)&&h(`fieldClassName`),yt))throw Error(`<AppSelect> controlOnly draws no field, so it takes no mode="${v}"; that mode always draws its field.`);let Z=U||!yt&&!j&&!F&&!I&&!H,bt=a(j).trim(),xt=bt&&(v===`single`||v===`multiple`||v===`search`)?`Search ${bt}…`:void 0,St=/* @__PURE__ */ u(`wui-select`,{"aria-label":ot||a(j)||void 0,"aria-labelledby":st||void 0,"aria-describedby":_t||void 0,"aria-invalid":F?`true`:void 0,ref:ft,id:Y,name:Le,mode:v,density:y===`compact`?`compact`:void 0,placeholder:X?` `:Te||void 0,"search-placeholder":Ee||xt,"empty-text":De||void 0,searchable:E===void 0?void 0:E?`true`:`false`,clearable:Oe?``:void 0,"open-on-hover":ke?``:void 0,size:b!==`md`&&f.includes(b??``)?b:void 0,icon:Ae||void 0,disabled:je?``:void 0,readonly:Me?``:void 0,open:Pe?``:void 0,required:M?``:void 0,"min-chars":R==null?void 0:String(R),debounce:z==null?void 0:String(z),remote:w?``:void 0,"allow-custom":Re?``:void 0,"add-label":ze||void 0,"searching-text":Be||void 0,"hint-text":Ve||void 0,"value-label":He||void 0,"value-avatar":Ue||void 0,"value-initials":We||void 0,"max-tags":B==null?void 0:String(B),"allow-duplicates":Ge?``:void 0,separators:Ke||void 0,pattern:qe||void 0,"invalid-message":Je||void 0,"create-label":Ye||void 0,"collapse-chips":Xe?``:void 0,"selected-text":Ze||void 0,"clear-all-label":Qe||void 0,countries:ye($e)||void 0,suggested:ye(et)||void 0,"suggested-label":tt||void 0,"all-countries-label":nt||void 0,"recents-key":rt||void 0,"recents-limit":V==null?void 0:String(V),"recents-label":it||void 0,className:at||void 0,...Z&&!vt?_:null,...lt}),Q=/* @__PURE__ */ d(le,{children:[St,mt]}),$=vt?/* @__PURE__ */ d(`div`,{...Z?_:null,className:`input-affixed`,children:[O!=null&&/* @__PURE__ */ u(`span`,{className:`affix affix-pre`,children:O}),Q,k!=null&&/* @__PURE__ */ u(`span`,{className:`affix affix-suf`,children:k})]}):Q;if(Z)return $;let Ct=[`field`,H].filter(Boolean).join(` `);return/* @__PURE__ */ d(`div`,{..._,className:Ct,children:[j&&!X&&/* @__PURE__ */ d(`label`,{className:`label`,htmlFor:Y,children:[j,N&&!M&&/* @__PURE__ */ u(`span`,{className:`label-optional`,children:` ${P}`}),M&&/* @__PURE__ */ u(ne,{}),L&&/* @__PURE__ */ u(te,{label:Fe,children:L})]}),X?/* @__PURE__ */ d(`div`,{className:A===`above`?`field-float wui-float-above`:`field-float`,children:[Q,/* @__PURE__ */ d(`label`,{className:`float-label`,htmlFor:Y,children:[j,N&&!M&&/* @__PURE__ */ u(`span`,{className:`label-optional`,children:` ${P}`}),M&&/* @__PURE__ */ u(ne,{})]})]}):$,/* @__PURE__ */ u(t,{error:F,hint:I,errorId:ht,hintId:gt})]})});export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./assertValidValue.js";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";var i=[`website`,`article`],a=[`summary`,`summary_large_image`];function o(o){let{title:s,description:c,canonicalUrl:l,siteName:u,robots:d,image:f,imageAlt:p,jsonLd:m}=o;e(`AppSeoHead`,`type`,o.type,i),e(`AppSeoHead`,`twitterCard`,o.twitterCard,a);let h=i.includes(o.type)?o.type:`website`,g=a.includes(o.twitterCard)?o.twitterCard:`summary`,_=m?JSON.stringify(m).replace(/</g,`\\u003c`):null;return/* @__PURE__ */ r(t,{children:[/* @__PURE__ */ n(`title`,{children:s}),/* @__PURE__ */ n(`meta`,{name:`description`,content:c}),/* @__PURE__ */ n(`link`,{rel:`canonical`,href:l}),/* @__PURE__ */ n(`meta`,{name:`robots`,content:d}),/* @__PURE__ */ n(`meta`,{property:`og:type`,content:h}),/* @__PURE__ */ n(`meta`,{property:`og:site_name`,content:u}),/* @__PURE__ */ n(`meta`,{property:`og:title`,content:s}),/* @__PURE__ */ n(`meta`,{property:`og:description`,content:c}),/* @__PURE__ */ n(`meta`,{property:`og:url`,content:l}),f?/* @__PURE__ */ n(`meta`,{property:`og:image`,content:f}):null,f&&p?/* @__PURE__ */ n(`meta`,{property:`og:image:alt`,content:p}):null,/* @__PURE__ */ n(`meta`,{name:`twitter:card`,content:g}),/* @__PURE__ */ n(`meta`,{name:`twitter:title`,content:s}),/* @__PURE__ */ n(`meta`,{name:`twitter:description`,content:c}),f?/* @__PURE__ */ n(`meta`,{name:`twitter:image`,content:f}):null,f&&p?/* @__PURE__ */ n(`meta`,{name:`twitter:image:alt`,content:p}):null,_?/* @__PURE__ */ n(`script`,{type:`application/ld+json`,children:_}):null]})}export{o as default};
|
|
1
|
+
import e from"./assertValidValue.js";import{Fragment as t,jsx as n,jsxs as r}from"react/jsx-runtime";var i=[`website`,`article`],a=[`summary`,`summary_large_image`];function o(o){let{title:s,description:c,canonicalUrl:l,siteName:u,robots:d,image:f,imageAlt:p,jsonLd:m}=o;e(`AppSeoHead`,`type`,o.type,i),e(`AppSeoHead`,`twitterCard`,o.twitterCard,a);let h=i.includes(o.type??``)?o.type:`website`,g=a.includes(o.twitterCard??``)?o.twitterCard:`summary`,_=m?JSON.stringify(m).replace(/</g,`\\u003c`):null;return/* @__PURE__ */ r(t,{children:[/* @__PURE__ */ n(`title`,{children:s}),/* @__PURE__ */ n(`meta`,{name:`description`,content:c}),/* @__PURE__ */ n(`link`,{rel:`canonical`,href:l}),/* @__PURE__ */ n(`meta`,{name:`robots`,content:d}),/* @__PURE__ */ n(`meta`,{property:`og:type`,content:h}),/* @__PURE__ */ n(`meta`,{property:`og:site_name`,content:u}),/* @__PURE__ */ n(`meta`,{property:`og:title`,content:s}),/* @__PURE__ */ n(`meta`,{property:`og:description`,content:c}),/* @__PURE__ */ n(`meta`,{property:`og:url`,content:l}),f?/* @__PURE__ */ n(`meta`,{property:`og:image`,content:f}):null,f&&p?/* @__PURE__ */ n(`meta`,{property:`og:image:alt`,content:p}):null,/* @__PURE__ */ n(`meta`,{name:`twitter:card`,content:g}),/* @__PURE__ */ n(`meta`,{name:`twitter:title`,content:s}),/* @__PURE__ */ n(`meta`,{name:`twitter:description`,content:c}),f?/* @__PURE__ */ n(`meta`,{name:`twitter:image`,content:f}):null,f&&p?/* @__PURE__ */ n(`meta`,{name:`twitter:image:alt`,content:p}):null,_?/* @__PURE__ */ n(`script`,{type:`application/ld+json`,children:_}):null]})}export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{devWarn as e}from"../lib/devWarn.js";import t from"../lib/fillLabel.js";import{navMatchScore as n}from"../lib/navMatch.js";import{SHELL_FOLDED_COOKIE as r,readNavFolded as i,readShellCollapsed as a,writeNavFolded as o,writeShellCollapsed as s}from"../lib/shellCookie.js";import{splitMarkerProps as c}from"../lib/wuiMarker.js";import l from"./AppAvatar.js";import u from"./AppButton.js";import d from"./AppIcon.js";import f from"./AppNavigationMenu.js";import p from"./assertValidValue.js";import m from"./warnUnknownProps.js";import{initScrollEdges as h,revealActiveNavItem as g}from"@webority/ui-elements/helpers";import{useEffect as _,useId as v,useMemo as y,useRef as b,useState as x}from"react";import{Fragment as S,jsx as C,jsxs as w}from"react/jsx-runtime";var T=99,E=4,D=5,O=/^[a-z0-9-]+$/,k=[`prefix`,`exact`],A=[`comfortable`,`compact`],j=[`neutral`,`primary`],M=[`side`,`top`],N=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],P=/* @__PURE__ */ new Set([`key`,`label`,`icon`,`iconVariant`,`iconSize`,`href`,`badge`,`badgeTone`,`badgeTitle`,`newUntil`,`trailingIcon`,`active`,`match`,`matchAlso`,`tab`,`tabLabel`,`children`]),F=e=>e>T?`${T}+`:String(e),I=new Intl.DateTimeFormat(`en-CA`,{timeZone:`Asia/Kolkata`}),L=e=>{if(typeof e!=`string`||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=/* @__PURE__ */ new Date(`${e}T00:00:00Z`);return Number.isNaN(t.getTime())||t.toISOString().slice(0,10)!==e?!1:I.format(/* @__PURE__ */ new Date)<=e},ee=({logoLight:e,logoDark:t,markLight:n,markDark:r})=>{let i=!!(n||r);return[`app-sidebar-brand`,i&&`wui-brand-has-mark`,i&&!e&&!t&&`wui-brand-mark-only`,(t||r)&&`wui-brand-themed`].filter(Boolean).join(` `)},R=({logoLight:e,logoDark:t,markLight:n,markDark:r,brandName:i})=>{let a=i??``,o=[e&&/* @__PURE__ */ C(`img`,{className:`wui-brand-logo wui-brand-light`,src:e,alt:a},`logo-light`),t&&/* @__PURE__ */ C(`img`,{className:`wui-brand-logo wui-brand-dark`,src:t,alt:``,"aria-hidden":`true`},`logo-dark`)],s=[n&&[`mark-light`,`wui-brand-mark wui-brand-light`,n],r&&[`mark-dark`,`wui-brand-mark wui-brand-dark`,r]].filter(Boolean).map(([t,n,r],i)=>i===0&&!e?/* @__PURE__ */ C(`img`,{className:n,src:r,alt:a},t):/* @__PURE__ */ C(`img`,{className:n,src:r,alt:``,"aria-hidden":`true`},t));return[...o,...s].filter(Boolean)};function te(e){let{marker:t,props:n}=c(`AppShell`,e),{groups:l=[],brand:u,logoLight:v,logoDark:T,markLight:E,markDark:D,brandName:O,brandHref:k,brandLabel:P,sidebarStart:F,sidebarStartCompact:I,sidebarFooter:L,topbarStart:te,topbarEnd:re,footer:z,launcher:B,children:V,collapsed:H,onCollapsedChange:W,noSidebar:G=!1,nav:K=`side`,density:fe=`comfortable`,itemHeight:pe,iconVariant:q=`twotone`,topbarTone:me=`neutral`,navLabel:he=`Main navigation`,linkComponent:J,currentPath:ge,rememberCollapsed:_e=!1,collapsedCookie:ve=`wui-shell-collapsed`,foldedCookie:ye=r,tabBarLabel:be=`Quick navigation`,moreLabel:xe=`More`,skipLabel:Se=`Skip to content`,openNavLabel:Ce=`Open navigation`,closeNavLabel:we=`Close navigation`,expandNavLabel:Te=`Expand navigation`,collapseNavLabel:Ee=`Collapse navigation`,newLabel:De=`New`,togglePagesLabel:Oe=`Show or hide {name} pages`,accountMenuLabel:ke=`Account menu for {name}`,roleLabel:Ae=`Role:`,rolesLabel:je=`Roles:`,unreadLabel:Me=`Unread`,markAllReadLabel:Ne=`Mark all read`,viewAllLabel:Pe=`View all`,loadingNotificationsText:Fe=`Loading…`,noUnreadText:Ie=`No unread notifications`,unreadNotificationsText:Le=`{count} unread notifications`,unreadBellLabel:Re=`{label}, {count} unread`,searchResultsLabel:ze=`Search results`,noResultsText:Be=`No results`,noResultsForText:Ve=`No results for “{value}”`,resultsCountText:He=`{count} results`,resultCountText:Ue=`{count} result`,userMenu:We,notifications:Ge,search:Ke,className:qe=``,style:Je,...Ye}=n;if(m(`AppShell`,Ye),p(`AppShell`,`density`,fe,A),p(`AppShell`,`topbarTone`,me,j),p(`AppShell`,`nav`,K,M),p(`AppShell`,`iconVariant`,q,N),P!==void 0&&!k)throw Error(`<AppShell> brandLabel names the brand link, so it needs brandHref.`);if(k){if(!P&&!O)throw Error(`<AppShell> brandHref needs brandLabel or brandName: the collapsed rail hides the logo, so the link would have no accessible name.`);if(!(u||v||T||E||D))throw Error(`<AppShell> brandHref has no brand, logo or mark to link.`)}let Xe=pe>0?{...Je,"--wui-nav-item-height":`${pe}px`}:Je,[Ze,Qe]=x(()=>_e&&H===void 0&&typeof document<`u`?a(ve)??!1:!1),[Y,X]=x(!1),[$e,et]=x(!1),[tt,nt]=x(!1),rt=b(null),it=b(null),at=b(null),Z=H??Ze,ot=e=>k?/* @__PURE__ */ C(oe,{href:k,label:P||O,linkComponent:J,onNavigate:()=>X(!1),children:e}):e,st=()=>{let e=!Z;H===void 0&&Qe(e),_e&&s(e,ve),W?.(e)},ct=l.some(e=>e.collapsible),[lt,ut]=x(()=>ct&&typeof document<`u`?i(ye):/* @__PURE__ */ new Set),dt=e=>{let t=new Set(lt);t.has(e)?t.delete(e):t.add(e),ut(t),o(t,ye)},Q=y(()=>ne(l,ge),[l,ge]),$=G?null:ie(Q);_(()=>{let e=()=>et(window.scrollY>4);return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),_(()=>{h()},[]),_(()=>{g(rt.current)},[]),_(()=>{let e=rt.current;if(!e)return;let t=()=>nt(e.scrollHeight>e.clientHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[Q]);let ft=!!z;_(()=>{let e=at.current,t=it.current;if(!ft||!e||!t)return;let n=()=>t.style.setProperty(`--app-footer-h`,`${e.offsetHeight}px`);n();let r=typeof ResizeObserver>`u`?null:new ResizeObserver(n);return r?.observe(e),()=>{r?.disconnect(),t.style.removeProperty(`--app-footer-h`)}},[ft]),_(()=>{if(!Y)return;let e=e=>{e.key===`Escape`&&X(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[Y]);let pt=[`app-shell`,Z?`collapsed`:``,G?`no-sidebar`:``,K===`top`?`wui-shell-top`:``,Y?`mobile-open`:``,qe].filter(Boolean).join(` `);return/* @__PURE__ */ w(`div`,{ref:it,className:pt,"data-density":fe===`compact`?`compact`:void 0,"data-wui-folded-cookie":ct?ye:void 0,style:Xe,...t,...Ye,children:[/* @__PURE__ */ C(`a`,{className:`wui-skip-link`,href:`#main-content`,children:Se}),/* @__PURE__ */ w(`aside`,{className:`app-sidebar`,children:[(u||v||T||E||D)&&/* @__PURE__ */ C(`div`,{className:ee({logoLight:v,logoDark:T,markLight:E,markDark:D}),children:ot(/* @__PURE__ */ w(S,{children:[R({logoLight:v,logoDark:T,markLight:E,markDark:D,brandName:O}),u]}))}),F&&/* @__PURE__ */ C(`div`,{className:`app-sidebar-start`,children:F}),I&&/* @__PURE__ */ C(`div`,{className:`app-sidebar-start-compact`,children:I}),/* @__PURE__ */ C(`nav`,{className:`app-sidebar-scroll`,"aria-label":he,ref:rt,tabIndex:tt?0:void 0,children:Q.map((e,t)=>{let n=e.items.map(e=>e.header==null?/* @__PURE__ */ C(ce,{item:e,linkComponent:J,onNavigate:()=>X(!1),iconVariant:q,newLabel:De,togglePagesLabel:Oe},e.key??e.href??e.label):/* @__PURE__ */ C(`div`,{className:`wui-nav-header`,children:e.header},e.key??e.header));if(!e.collapsible)return/* @__PURE__ */ w(`div`,{className:`app-nav-group`,children:[e.label&&/* @__PURE__ */ C(`div`,{className:`app-nav-group-label`,children:e.label}),n,e.after&&/* @__PURE__ */ C(`div`,{className:`wui-nav-group-after`,children:e.after})]},e.key??e.label??`group-${t}`);let r=!lt.has(e.key)||!!U(e.items),i=`wui-nav-group-${e.key}`;return/* @__PURE__ */ w(`div`,{className:`app-nav-group wui-nav-group-collapsible${r?``:` wui-nav-group-folded`}`,"data-wui-nav-group":e.key,children:[/* @__PURE__ */ w(`button`,{type:`button`,className:`app-nav-group-label wui-nav-group-toggle`,"aria-expanded":r,"aria-controls":i,onClick:()=>dt(e.key),children:[/* @__PURE__ */ C(`span`,{className:`wui-nav-group-text`,children:e.label}),/* @__PURE__ */ C(`span`,{className:`wui-nav-group-caret`,children:/* @__PURE__ */ C(d,{name:`chevron-down`,size:16})})]}),/* @__PURE__ */ w(`div`,{className:`wui-nav-group-body`,id:i,children:[n,e.after&&/* @__PURE__ */ C(`div`,{className:`wui-nav-group-after`,children:e.after})]})]},e.key??`group-${t}`)})}),L&&/* @__PURE__ */ C(`div`,{className:`app-sidebar-foot`,children:L}),!G&&/* @__PURE__ */ C(`button`,{type:`button`,className:`app-sidebar-toggle`,onClick:st,"aria-label":Z?Te:Ee,"aria-expanded":!Z,children:/* @__PURE__ */ C(d,{name:`chevrons-left`,size:20})})]}),/* @__PURE__ */ w(`div`,{className:`app-main`,children:[/* @__PURE__ */ w(`header`,{className:`app-topbar${$e?` scrolled`:``}`,"data-tone":me===`primary`?`primary`:void 0,children:[/* @__PURE__ */ w(`div`,{className:`app-topbar-start`,children:[/* @__PURE__ */ C(`button`,{type:`button`,className:`app-topbar-menu`,onClick:()=>X(!0),"aria-label":Ce,"aria-expanded":Y,children:/* @__PURE__ */ C(d,{name:`menu`,size:18})}),K===`top`&&u&&/* @__PURE__ */ C(`div`,{className:`wui-shell-top-brand`,children:ot(u)}),K===`top`&&/* @__PURE__ */ C(`div`,{className:`wui-shell-top-nav`,children:/* @__PURE__ */ C(f,{items:ae(Q),ariaLabel:he,linkComponent:J})}),te,Ke&&/* @__PURE__ */ C(de,{config:Ke,searchResultsLabel:ze,noResultsText:Be,noResultsForText:Ve,resultsCountText:He,resultCountText:Ue})]}),/* @__PURE__ */ w(`div`,{className:`app-topbar-end`,children:[re,Ge&&/* @__PURE__ */ C(ue,{config:Ge,unreadLabel:Me,markAllReadLabel:Ne,viewAllLabel:Pe,loadingNotificationsText:Fe,noUnreadText:Ie,unreadNotificationsText:Le,unreadBellLabel:Re}),We&&/* @__PURE__ */ C(le,{config:We,linkComponent:J,accountMenuLabel:ke,roleLabel:Ae,rolesLabel:je})]})]}),/* @__PURE__ */ C(`main`,{className:`app-content`,id:`main-content`,children:V}),z&&/* @__PURE__ */ C(`footer`,{className:`app-footer`,ref:at,children:z})]}),B&&/* @__PURE__ */ C(`div`,{className:`wui-shell-launcher`,children:B}),$&&/* @__PURE__ */ w(`nav`,{className:`wui-tabbar`,"aria-label":be,children:[$.tabs.map(e=>/* @__PURE__ */ C(se,{tab:e,linkComponent:J,iconVariant:q},e.key??e.href)),$.hasMore&&/* @__PURE__ */ w(`button`,{type:`button`,className:`wui-tabbar-item${$.moreActive?` active`:``}`,onClick:()=>X(!0),children:[/* @__PURE__ */ C(`span`,{className:`wui-tabbar-icon`,children:/* @__PURE__ */ C(d,{name:`more`,size:24})}),/* @__PURE__ */ C(`span`,{className:`wui-tabbar-label`,children:xe})]})]}),/* @__PURE__ */ C(`button`,{type:`button`,className:`app-scrim`,onClick:()=>X(!1),"aria-label":we,tabIndex:Y?0:-1})]})}function ne(e,t){for(let t of e)t.collapsible&&H(t);let r=(e,t=!1)=>(e??[]).map(e=>Array.isArray(e.children)?{...e,children:r(e.children)}:{...e}).filter(e=>z(e)?t:(e.children?.length??0)>0||!!e.href),i=e.map(e=>({...e,items:B(r(e.items,!0))})).filter(e=>e.items.some(e=>!z(e))),a=[],o=e=>{for(let t of e)z(t)||(a.push(t),t.children&&o(t.children))};for(let e of i)o(e.items);for(let e of a)m(`AppShell items`,re(e)),p(`AppShell`,`match`,e.match,k),p(`AppShell`,`iconVariant`,e.iconVariant,N);let s=null;if(t!=null&&!a.some(e=>e.active===!0)){let e=-1;for(let r of a){if(r.active!=null||r.children?.length&&!r.href)continue;let i=n(t,r.href,{exact:r.match===`exact`,also:r.matchAlso});if(i<0)continue;let a=r.match===`exact`&&n(t,r.href,{exact:!0})>=0?1/0:i;a>e&&(e=a,s=r)}}for(let e of a)e.active=e.active??e===s;return i}function re(e){return Object.fromEntries(Object.entries(e).filter(([e])=>!P.has(e)))}var z=e=>e.header!=null;function B(e){return e.filter((t,n)=>{if(!z(t))return!0;let r=e.findIndex((e,t)=>t>n&&z(e));return e.slice(n+1,r<0?void 0:r).length>0})}var V=/* @__PURE__ */ new Set;function H(t){if(t.key!=null&&O.test(t.key))return;let n=t.key==null?`<AppShell> a collapsible group needs a key so its folded state can be remembered.`:`<AppShell> collapsible group key "${t.key}" must use lower-case letters, digits and hyphens.`,r=!0;try{r=process.env.NODE_ENV!==`production`}catch{r=!0}r&&!V.has(n)&&(V.add(n),e(n))}function ie(e){let t=[],n=e=>{for(let r of e)z(r)||(r.children?.length?n(r.children):t.push(r))};for(let t of e)n(t.items);let r=t.filter(e=>e.tab);if(r.length===0)return null;let i=r.length<t.length,a=i?E:D;if(r.length>a)throw Error(`<AppShell>: ${r.length} items carry tab: true, but the phone tab bar holds ${a} (${i?`4 plus More, because other items exist`:`5 when every item is a tab`}). Flag fewer items.`);return{tabs:r,hasMore:i,moreActive:t.some(e=>!e.tab&&e.active)}}function ae(e){let t=e=>({key:e.key??e.href??e.label,label:e.label,to:e.href,current:!!e.active}),n=e=>e.flatMap(e=>z(e)?[]:[...e.href?[{...t(e),icon:e.icon}]:[],...n(e.children??[])]),r=[];for(let i of e.flatMap(e=>e.items)){if(z(i))continue;let e=n(i.children??[]);if(e.length>0){let n=i.href?[{...t(i),icon:i.icon}]:[];r.push({key:t(i).key,label:i.label,links:[...n,...e]})}else i.href&&r.push(t(i))}return r}function oe({href:e,label:t,linkComponent:n,onNavigate:r,children:i}){return n?/* @__PURE__ */ C(n,{className:`wui-brand-link`,to:e,"aria-label":t,onClick:r,children:i}):/* @__PURE__ */ C(`a`,{className:`wui-brand-link`,href:e,"aria-label":t,onClick:r,children:i})}function se({tab:e,linkComponent:t,iconVariant:n}){let r=`wui-tabbar-item${e.active?` active`:``}`,i=/* @__PURE__ */ w(S,{children:[e.icon&&/* @__PURE__ */ C(`span`,{className:`wui-tabbar-icon`,children:typeof e.icon==`string`?/* @__PURE__ */ C(d,{name:e.icon,size:24,variant:e.iconVariant??n}):e.icon}),/* @__PURE__ */ C(`span`,{className:`wui-tabbar-label`,children:e.tabLabel??e.label}),e.badge!=null&&/* @__PURE__ */ C(`span`,{className:`wui-tabbar-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge})]}),a=e.active?`page`:void 0;return t?/* @__PURE__ */ C(t,{className:r,to:e.href,"aria-current":a,children:i}):/* @__PURE__ */ C(`a`,{className:r,href:e.href,"aria-current":a,children:i})}function U(e){for(let t of e){if(t.active)return t;let e=t.children?.length?U(t.children):void 0;if(e)return e}}function ce({item:e,linkComponent:n,onNavigate:r,depth:i=0,iconVariant:a,newLabel:o,togglePagesLabel:s}){let c=i>0,l=i>1?` wui-nav-depth-${Math.min(i,6)}`:``,u=Array.isArray(e.children)&&e.children.length>0,f=u?U(e.children):void 0,p=!!f,m=f?f.key??f.href??f.label:null,[h,g]=x(p);_(()=>{m!=null&&g(!0)},[m]);let v=typeof e.label==`string`?e.label:void 0,y=!c&&e.icon&&/* @__PURE__ */ C(`span`,{className:`app-nav-icon`,children:typeof e.icon==`string`?/* @__PURE__ */ C(d,{name:e.icon,size:e.iconSize??22,variant:e.iconVariant??a}):e.icon}),b=e.badge!=null&&/* @__PURE__ */ C(`span`,{className:`app-nav-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge}),T=L(e.newUntil)&&/* @__PURE__ */ C(`span`,{className:`wui-nav-new`,children:o}),E=/* @__PURE__ */ w(S,{children:[y,/* @__PURE__ */ C(`span`,{className:`app-nav-text`,children:e.label}),T,b,e.trailingIcon&&/* @__PURE__ */ C(`span`,{className:`app-nav-trailing`,children:typeof e.trailingIcon==`string`?/* @__PURE__ */ C(d,{name:e.trailingIcon,size:16}):e.trailingIcon})]}),D=e.active?`page`:void 0;if(u){let u=/* @__PURE__ */ C(`div`,{className:`app-nav-sub${h?` expanded`:``}`,inert:!h,"aria-hidden":!h||void 0,children:/* @__PURE__ */ C(`div`,{className:`app-nav-sub-inner`,children:e.children.map(e=>/* @__PURE__ */ C(ce,{item:e,linkComponent:n,onNavigate:r,depth:i+1,iconVariant:a,newLabel:o,togglePagesLabel:s},e.key??e.href))})});if(e.href){let i=n?/* @__PURE__ */ C(n,{className:`wui-nav-split-link`,to:e.href,"aria-current":D,onClick:r,children:E}):/* @__PURE__ */ C(`a`,{className:`wui-nav-split-link`,href:e.href,"aria-current":D,onClick:r,children:E});return/* @__PURE__ */ w(S,{children:[/* @__PURE__ */ w(`div`,{className:`app-nav-item has-children wui-nav-split${c?` app-nav-subitem`:``}${p||e.active?` active`:``}${l}`,"data-label":v,children:[i,/* @__PURE__ */ C(`button`,{type:`button`,className:`app-nav-caret wui-nav-split-toggle`,"aria-expanded":h,"aria-label":t(s,{name:v??``}),onClick:()=>g(e=>!e),children:/* @__PURE__ */ C(d,{name:`chevron-right`,size:16})})]}),u]})}return/* @__PURE__ */ w(S,{children:[/* @__PURE__ */ w(`button`,{type:`button`,className:`app-nav-item${c?` app-nav-subitem`:``} has-children${p?` active`:``}${l}`,"aria-expanded":h,"data-label":v,onClick:()=>g(e=>!e),children:[y,/* @__PURE__ */ C(`span`,{className:`app-nav-text`,children:e.label}),T,b,/* @__PURE__ */ C(`span`,{className:`app-nav-caret`,children:/* @__PURE__ */ C(d,{name:`chevron-right`,size:16})})]}),u]})}let O=`app-nav-item${c?` app-nav-subitem`:``}${e.active?` active`:``}${l}`;return n?/* @__PURE__ */ C(n,{className:O,to:e.href,"aria-current":D,"data-label":v,onClick:r,children:E}):/* @__PURE__ */ C(`a`,{className:O,href:e.href,"aria-current":D,"data-label":v,onClick:r,children:E})}function W(){let[e,t]=x(!1),n=b(null);return _(()=>{if(!e)return;let r=e=>{n.current?.contains(e.target)||t(!1)},i=e=>{e.key===`Escape`&&(t(!1),n.current?.querySelector(`button`)?.focus())};return document.addEventListener(`mousedown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,r),document.removeEventListener(`keydown`,i)}},[e]),{open:e,setOpen:t,ref:n}}function le({config:e,linkComponent:n,accountMenuLabel:r,roleLabel:i,rolesLabel:a}){let o=v(),{open:s,setOpen:c,ref:f}=W(),{name:m,role:h,roles:g=[],photo:_,profileHref:y,profileLabel:b=`My profile`,onLogout:x,logoutAction:T,logoutLabel:E=`Sign out`,head:D,section:O,logoutVariant:k=`item`,items:A=[]}=e;if(p(`AppShell`,`userMenu.logoutVariant`,k,[`item`,`button`]),!m)throw Error(`<AppShell> userMenu.name is required; the trigger and the avatar are named from it.`);let j=g.map(e=>(e??``).trim()).filter(Boolean),M=()=>c(!1),N=(e,t,r,i)=>n?/* @__PURE__ */ C(n,{className:`dropdown-item`,to:e,onClick:i,children:t},r):/* @__PURE__ */ C(`a`,{className:`dropdown-item`,href:e,onClick:i,children:t},r),P=/* @__PURE__ */ C(d,{name:`log-out`,size:18}),F=/* @__PURE__ */ w(S,{children:[P,E]});return/* @__PURE__ */ w(`div`,{className:`dropdown wui-usermenu`,ref:f,children:[/* @__PURE__ */ w(`button`,{type:`button`,id:o,className:`wui-usermenu-trigger`,"aria-expanded":s,"aria-label":t(r,{name:m}),onClick:()=>c(e=>!e),children:[/* @__PURE__ */ C(l,{name:m,src:_,tone:`auto`}),/* @__PURE__ */ w(`span`,{className:`wui-usermenu-text`,children:[/* @__PURE__ */ C(`span`,{className:`wui-usermenu-name`,children:m}),h&&/* @__PURE__ */ C(`span`,{className:`wui-usermenu-role`,children:h})]}),/* @__PURE__ */ C(d,{name:`chevron-down`,size:14,className:`wui-usermenu-caret`})]}),/* @__PURE__ */ w(`div`,{className:`dropdown-menu dropdown-menu-end wui-usermenu-menu${s?` show`:``}`,"aria-labelledby":o,"data-bs-popper":s?`static`:void 0,children:[/* @__PURE__ */ w(`div`,{className:`wui-usermenu-head`,children:[/* @__PURE__ */ C(l,{name:m,src:_,size:`lg`,tone:`auto`}),/* @__PURE__ */ w(`div`,{className:`wui-usermenu-who`,children:[/* @__PURE__ */ C(`div`,{className:`wui-usermenu-name`,children:m}),h&&/* @__PURE__ */ C(`div`,{className:`wui-usermenu-role`,children:h}),j.length>0&&/* @__PURE__ */ w(`div`,{className:`wui-usermenu-roles`,children:[/* @__PURE__ */ C(`span`,{className:`wui-usermenu-roles-label`,children:j.length===1?i:a}),` ${j.join(`, `)}`]}),D?/* @__PURE__ */ C(`div`,{className:`wui-usermenu-extra`,children:D}):null]})]}),O?/* @__PURE__ */ C(`div`,{className:`wui-usermenu-section`,children:O}):null,y&&N(y,/* @__PURE__ */ w(S,{children:[/* @__PURE__ */ C(d,{name:`user`,size:18}),b]}),void 0,M),A.map(e=>{if(e.divider)return/* @__PURE__ */ C(`hr`,{className:`dropdown-divider`},e.key);let t=/* @__PURE__ */ w(S,{children:[e.icon&&/* @__PURE__ */ C(d,{name:e.icon,size:18}),e.label]}),n=()=>{e.onClick?.(),M()};return e.href?N(e.href,t,e.key,n):/* @__PURE__ */ C(`button`,{type:`button`,className:`dropdown-item`,onClick:n,children:t},e.key)}),k===`button`?(T||x)&&/* @__PURE__ */ C(`div`,{className:`wui-usermenu-foot`,children:T?/* @__PURE__ */ C(`form`,{method:`post`,action:T,className:`wui-usermenu-logout`,children:/* @__PURE__ */ C(u,{type:`submit`,tone:`danger`,variant:`soft`,block:!0,leftIcon:P,children:E})}):/* @__PURE__ */ C(u,{type:`button`,tone:`danger`,variant:`soft`,block:!0,leftIcon:P,onClick:()=>{M(),x()},children:E})}):T?/* @__PURE__ */ C(`form`,{method:`post`,action:T,className:`wui-usermenu-logout`,children:/* @__PURE__ */ C(`button`,{type:`submit`,className:`dropdown-item danger`,children:F})}):x&&/* @__PURE__ */ C(`button`,{type:`button`,className:`dropdown-item danger`,onClick:()=>{M(),x()},children:F})]})]})}function ue({config:e,unreadLabel:n,markAllReadLabel:r,viewAllLabel:i,loadingNotificationsText:a,noUnreadText:o,unreadNotificationsText:s,unreadBellLabel:c}){let l=v(),{open:u,setOpen:f,ref:p}=W(),{unread:m=0,items:h,loading:g=!1,onOpen:y,onMarkAllRead:T,viewAllHref:E,label:D=`Notifications`,emptyText:O=`You are all caught up.`}=e,[k,A]=x(``),j=b(m);_(()=>{j.current!==m&&(j.current=m,A(m===0?o:t(s,{count:F(m)})))},[m,o,s]);let M=null;return h?.length?M=/* @__PURE__ */ C(`div`,{className:`wui-bell-items`,children:h.map((e,t)=>{let r=`wui-bell-item${e.read?` wui-bell-item-read`:``}`,i=/* @__PURE__ */ w(S,{children:[/* @__PURE__ */ C(`span`,{className:`wui-bell-dot`,"aria-hidden":`true`}),e.icon&&/* @__PURE__ */ C(`span`,{className:`wui-bell-icon`,children:/* @__PURE__ */ C(d,{name:e.icon,size:18})}),/* @__PURE__ */ w(`span`,{className:`wui-bell-body`,children:[!e.read&&/* @__PURE__ */ w(`span`,{className:`visually-hidden`,children:[n,`: `]}),/* @__PURE__ */ C(`span`,{className:`wui-bell-item-title`,children:e.title}),e.time&&/* @__PURE__ */ C(`span`,{className:`wui-bell-when`,children:e.time})]})]});return e.href?/* @__PURE__ */ C(`a`,{className:r,href:e.href,"data-id":e.id,children:i},e.id??t):/* @__PURE__ */ C(`div`,{className:r,"data-id":e.id,children:i},e.id??t)})}):g?M=/* @__PURE__ */ C(`div`,{className:`wui-bell-state`,children:a}):h&&(M=/* @__PURE__ */ C(`div`,{className:`wui-bell-state`,children:O})),/* @__PURE__ */ w(`div`,{className:`dropdown wui-bell`,ref:p,children:[/* @__PURE__ */ w(`button`,{type:`button`,id:l,className:`topbar-icon-btn wui-bell-trigger`,"aria-expanded":u,"aria-label":m===0?D:t(c,{label:D,count:F(m)}),onClick:()=>{let e=!u;f(e),e&&y?.()},children:[/* @__PURE__ */ C(d,{name:`notification`,size:20}),/* @__PURE__ */ C(`span`,{className:`wui-bell-count`,"aria-hidden":`true`,hidden:m===0,children:F(m)})]}),/* @__PURE__ */ C(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:k}),/* @__PURE__ */ w(`div`,{className:`dropdown-menu dropdown-menu-end wui-bell-menu${u?` show`:``}`,"aria-labelledby":l,"data-bs-popper":u?`static`:void 0,children:[/* @__PURE__ */ w(`div`,{className:`wui-bell-head`,children:[/* @__PURE__ */ C(`span`,{className:`wui-bell-title`,children:D}),T&&/* @__PURE__ */ C(`button`,{type:`button`,className:`wui-bell-markall`,onClick:T,children:r})]}),/* @__PURE__ */ C(`div`,{className:`wui-bell-list`,"aria-busy":g||void 0,children:M}),E&&/* @__PURE__ */ C(`a`,{className:`wui-bell-foot`,href:E,children:i})]})]})}var G=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function de({config:e,searchResultsLabel:n,noResultsText:r,noResultsForText:i,resultsCountText:a,resultCountText:o}){let s=v(),{value:c=``,onChange:l,results:u=null,loading:f=!1,onSelect:p,onSubmit:m,onFocus:h,placeholder:g=`Search`}=e,[S,T]=x(!1),[E,D]=x(!1),[O,k]=x({results:null,index:-1}),A=O.results===u?O.index:-1,j=e=>k({results:u,index:e}),M=b(null),N=b(null),P=b([]),F=y(()=>(u??[]).flatMap(e=>e.hits??[]),[u]),I=u!=null&&!E,L=F.length;_(()=>{let e=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||G(e.target)||(e.preventDefault(),T(!0),N.current?.focus())},t=e=>{M.current?.contains(e.target)||(D(!0),T(!1))};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t)}},[]);let ee=e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(!I||L===0)return;e.preventDefault(),j((A+(e.key===`ArrowDown`?1:-1)+L)%L)}else e.key===`Enter`?I&&A>=0&&P.current[A]?(e.preventDefault(),P.current[A].click()):m&&c.trim()!==``&&(e.preventDefault(),m(c.trim())):e.key===`Escape`&&(I?(e.preventDefault(),D(!0)):S&&(e.preventDefault(),T(!1)))},R=-1;return P.current=[],/* @__PURE__ */ w(`div`,{className:`wui-topsearch${S?` is-open`:``}${f?` is-loading`:``}`,ref:M,children:[/* @__PURE__ */ C(`button`,{type:`button`,className:`topbar-icon-btn wui-topsearch-open`,"aria-label":g,"aria-expanded":S,"aria-controls":`${s}-panel`,onClick:()=>{let e=!S;T(e),e&&N.current?.focus()},children:/* @__PURE__ */ C(d,{name:`search`,size:20})}),/* @__PURE__ */ w(`div`,{className:`wui-topsearch-panel`,id:`${s}-panel`,children:[/* @__PURE__ */ w(`div`,{className:`search-wrap`,children:[/* @__PURE__ */ C(d,{name:`search`,size:18,className:`search-icon`}),/* @__PURE__ */ C(`input`,{ref:N,type:`search`,className:`form-control input search-input`,id:`${s}-input`,placeholder:g,"aria-label":g,role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":I,"aria-controls":`${s}-list`,"aria-activedescendant":I&&A>=0?`${s}-opt-${A}`:void 0,autoComplete:`off`,value:c,onChange:e=>{D(!1),l?.(e.target.value)},onKeyDown:ee,onFocus:h})]}),/* @__PURE__ */ C(`div`,{className:`wui-topsearch-results`,id:`${s}-list`,role:`listbox`,"aria-label":n,hidden:!I,children:I&&/* @__PURE__ */ w(`div`,{className:`wui-topsearch-groups`,role:`presentation`,children:[L===0&&/* @__PURE__ */ C(`div`,{className:`wui-topsearch-empty`,role:`option`,"aria-disabled":`true`,"aria-selected":`false`,children:t(i,{value:c})}),u.filter(e=>e.hits?.length).map((e,t)=>/* @__PURE__ */ w(`div`,{className:`wui-topsearch-group`,role:`group`,"aria-label":e.label??``,children:[e.label&&/* @__PURE__ */ C(`div`,{className:`wui-topsearch-group-label`,role:`presentation`,children:e.label}),e.hits.map(e=>{R+=1;let t=R;return/* @__PURE__ */ w(`a`,{className:`wui-topsearch-hit${t===A?` is-active`:``}`,role:`option`,"aria-selected":t===A,id:`${s}-opt-${t}`,href:e.href,ref:e=>{P.current[t]=e},onClick:t=>p?.(e,t),children:[e.icon&&/* @__PURE__ */ C(`span`,{className:`wui-topsearch-hit-icon`,children:/* @__PURE__ */ C(d,{name:e.icon,size:18})}),/* @__PURE__ */ w(`span`,{className:`wui-topsearch-hit-text`,children:[/* @__PURE__ */ C(`span`,{className:`wui-topsearch-hit-title`,children:e.title}),e.subtitle&&/* @__PURE__ */ C(`span`,{className:`wui-topsearch-hit-sub`,children:e.subtitle})]})]},`${e.href}-${t}`)})]},e.label??t))]})})]}),/* @__PURE__ */ C(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:I?L===0?r:t(L===1?o:a,{count:L}):``})]})}export{te as default};
|
|
1
|
+
import{devWarn as e}from"../lib/devWarn.js";import t from"../lib/fillLabel.js";import{linkTarget as n}from"../lib/linkTarget.js";import{navMatchScore as r}from"../lib/navMatch.js";import{SHELL_FOLDED_COOKIE as i,readNavFolded as a,readShellCollapsed as o,writeNavFolded as s,writeShellCollapsed as c}from"../lib/shellCookie.js";import{TargetLink as l}from"../lib/TargetLink.js";import u from"../lib/useElementEntry.js";import{splitMarkerProps as d}from"../lib/wuiMarker.js";import f from"./AppAvatar.js";import p from"./AppButton.js";import m from"./AppIcon.js";import h from"./AppNavigationMenu.js";import g from"./assertValidValue.js";import _ from"./warnUnknownProps.js";import{initScrollEdges as v,revealActiveNavItem as y}from"@webority/ui-elements/helpers";import{useEffect as b,useId as x,useMemo as S,useRef as C,useState as w}from"react";import{Fragment as T,jsx as E,jsxs as D}from"react/jsx-runtime";var O=()=>import(`@webority/ui-elements/elements/overflow`),k=99,A=4,j=5,M=/^[a-z0-9-]+$/,N=`wui-sidebar-footer`,P=[],F=[`prefix`,`exact`],I=[`comfortable`,`compact`],L=[`neutral`,`primary`],R=[`side`,`top`],z=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],ee=/* @__PURE__ */ new Set([`key`,`label`,`icon`,`iconVariant`,`iconSize`,`href`,`badge`,`badgeTone`,`badgeTitle`,`newUntil`,`trailingIcon`,`active`,`match`,`matchAlso`,`tab`,`tabLabel`,`children`]),B=e=>e>k?`${k}+`:String(e),te=new Intl.DateTimeFormat(`en-CA`,{timeZone:`Asia/Kolkata`}),ne=e=>{if(typeof e!=`string`||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;let t=/* @__PURE__ */ new Date(`${e}T00:00:00Z`);return Number.isNaN(t.getTime())||t.toISOString().slice(0,10)!==e?!1:te.format(/* @__PURE__ */ new Date)<=e},re=({logoLight:e,logoDark:t,markLight:n,markDark:r})=>{let i=!!(n||r);return[`app-sidebar-brand`,i&&`wui-brand-has-mark`,i&&!e&&!t&&`wui-brand-mark-only`,(t||r)&&`wui-brand-themed`].filter(Boolean).join(` `)},ie=({logoLight:e,logoDark:t,markLight:n,markDark:r,brandName:i})=>{let a=i??``,o=[e&&/* @__PURE__ */ E(`img`,{className:`wui-brand-logo wui-brand-light`,src:e,alt:a},`logo-light`),t&&/* @__PURE__ */ E(`img`,{className:`wui-brand-logo wui-brand-dark`,src:t,alt:``,"aria-hidden":`true`},`logo-dark`)],s=[n&&[`mark-light`,`wui-brand-mark wui-brand-light`,n],r&&[`mark-dark`,`wui-brand-mark wui-brand-dark`,r]].filter(e=>!!e).map(([t,n,r],i)=>i===0&&!e?/* @__PURE__ */ E(`img`,{className:n,src:r,alt:a},t):/* @__PURE__ */ E(`img`,{className:n,src:r,alt:``,"aria-hidden":`true`},t));return[...o,...s].filter(Boolean)};function ae(e){let{marker:t,props:n}=d(`AppShell`,e),{groups:r=[],brand:l,logoLight:u,logoDark:f,markLight:p,markDark:x,brandName:O,brandHref:k,brandLabel:A,sidebarStart:j,sidebarStartCompact:M,sidebarFooter:N,sidebarFooterItems:F=P,topbarStart:ee,topbarEnd:B,footer:te,launcher:ne,children:ae,collapsed:V,onCollapsedChange:H,noSidebar:U=!1,nav:W=`side`,density:se=`comfortable`,itemHeight:G,iconVariant:K=`twotone`,topbarTone:_e=`neutral`,navLabel:ve=`Main navigation`,linkComponent:q,currentPath:ye,rememberCollapsed:be=!1,collapsedCookie:xe=`wui-shell-collapsed`,foldedCookie:Se=i,tabBarLabel:Ce=`Quick navigation`,moreLabel:we=`More`,skipLabel:Te=`Skip to content`,openNavLabel:Ee=`Open navigation`,closeNavLabel:De=`Close navigation`,expandNavLabel:Oe=`Expand navigation`,collapseNavLabel:ke=`Collapse navigation`,newLabel:Ae=`New`,togglePagesLabel:je=`Show or hide {name} pages`,accountMenuLabel:Me=`Account menu for {name}`,roleLabel:Ne=`Role:`,rolesLabel:Pe=`Roles:`,unreadLabel:Fe=`Unread`,markAllReadLabel:Ie=`Mark all read`,viewAllLabel:Le=`View all`,loadingNotificationsText:Re=`Loading…`,noUnreadText:ze=`No unread notifications`,unreadNotificationsText:Be=`{count} unread notifications`,unreadBellLabel:Ve=`{label}, {count} unread`,searchResultsLabel:He=`Search results`,noResultsText:Ue=`No results`,noResultsForText:We=`No results for “{value}”`,resultsCountText:Ge=`{count} results`,resultCountText:Ke=`{count} result`,userMenu:qe,notifications:Je,search:Ye,className:Xe=``,style:Ze,...Qe}=n;if(_(`AppShell`,Qe),g(`AppShell`,`density`,se,I),g(`AppShell`,`topbarTone`,_e,L),g(`AppShell`,`nav`,W,R),g(`AppShell`,`iconVariant`,K,z),A!==void 0&&!k)throw Error(`<AppShell> brandLabel names the brand link, so it needs brandHref.`);if(k){if(!A&&!O)throw Error(`<AppShell> brandHref needs brandLabel or brandName: the collapsed rail hides the logo, so the link would have no accessible name.`);if(!(l||u||f||p||x))throw Error(`<AppShell> brandHref has no brand, logo or mark to link.`)}let $e=(G??0)>0?{...Ze,"--wui-nav-item-height":`${G}px`}:Ze,[et,tt]=w(()=>be&&V===void 0&&typeof document<`u`?o(xe)??!1:!1),[J,Y]=w(!1),[nt,rt]=w(!1),[it,at]=w(!1),ot=C(null),X=V??et,st=e=>k?/* @__PURE__ */ E(ue,{href:k,label:A||O,linkComponent:q,onNavigate:()=>Y(!1),children:e}):e,ct=()=>{let e=!X;V===void 0&&tt(e),be&&c(e,xe),H?.(e)},lt=r.some(e=>e.collapsible),[ut,dt]=w(()=>lt&&typeof document<`u`?a(Se):/* @__PURE__ */ new Set),ft=e=>{let t=new Set(ut);t.has(e)?t.delete(e):t.add(e),dt(t),s(t,Se)},pt=S(()=>oe(r,F,ye),[r,F,ye]),Z=pt.groups,Q=pt.footer,$=U?null:ce(Z,Q.some(e=>e.active));b(()=>{let e=()=>rt(window.scrollY>4);return e(),window.addEventListener(`scroll`,e,{passive:!0}),()=>window.removeEventListener(`scroll`,e)},[]),b(()=>{v()},[]),b(()=>{y(ot.current)},[]),b(()=>{let e=ot.current;if(!e)return;let t=()=>at(Z.length>0&&e.scrollHeight>e.clientHeight);if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[Z]),b(()=>{if(!J)return;let e=e=>{e.key===`Escape`&&Y(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[J]);let mt=[`app-shell`,X?`collapsed`:``,U?`no-sidebar`:``,W===`top`?`wui-shell-top`:``,J?`mobile-open`:``,Xe].filter(Boolean).join(` `);return/* @__PURE__ */ D(`div`,{className:mt,"data-density":se===`compact`?`compact`:void 0,"data-wui-folded-cookie":lt?Se:void 0,style:$e,...t,...Qe,children:[/* @__PURE__ */ E(`a`,{className:`wui-skip-link`,href:`#main-content`,children:Te}),/* @__PURE__ */ D(`aside`,{className:`app-sidebar`,children:[(l||u||f||p||x)&&/* @__PURE__ */ E(`div`,{className:re({logoLight:u,logoDark:f,markLight:p,markDark:x}),children:st(/* @__PURE__ */ D(T,{children:[ie({logoLight:u,logoDark:f,markLight:p,markDark:x,brandName:O}),l]}))}),j&&/* @__PURE__ */ E(`div`,{className:`app-sidebar-start`,children:j}),M&&/* @__PURE__ */ E(`div`,{className:`app-sidebar-start-compact`,children:M}),/* @__PURE__ */ E(`nav`,{className:`app-sidebar-scroll`,"aria-label":ve,ref:ot,tabIndex:it?0:void 0,children:Z.map((e,t)=>{let n=e.items.map(e=>e.header==null?/* @__PURE__ */ E(pe,{item:e,linkComponent:q,onNavigate:()=>Y(!1),iconVariant:K,newLabel:Ae,togglePagesLabel:je},e.key??e.href??e.label):/* @__PURE__ */ E(`div`,{className:`wui-nav-header`,children:e.header},e.key??e.header));if(!e.collapsible)return/* @__PURE__ */ D(`div`,{className:`app-nav-group`,children:[e.label&&/* @__PURE__ */ E(`div`,{className:`app-nav-group-label`,children:e.label}),n,e.after&&/* @__PURE__ */ E(`div`,{className:`wui-nav-group-after`,children:e.after})]},e.key??e.label??`group-${t}`);let r=!ut.has(e.key??``)||!!fe(e.items),i=`wui-nav-group-${e.key}`;return/* @__PURE__ */ D(`div`,{className:`app-nav-group wui-nav-group-collapsible${r?``:` wui-nav-group-folded`}`,"data-wui-nav-group":e.key,children:[/* @__PURE__ */ D(`button`,{type:`button`,className:`app-nav-group-label wui-nav-group-toggle`,"aria-expanded":r,"aria-controls":i,onClick:()=>ft(e.key??``),children:[/* @__PURE__ */ E(`span`,{className:`wui-nav-group-text`,children:e.label}),/* @__PURE__ */ E(`span`,{className:`wui-nav-group-caret`,children:/* @__PURE__ */ E(m,{name:`chevron-down`,size:16})})]}),/* @__PURE__ */ D(`div`,{className:`wui-nav-group-body`,id:i,children:[n,e.after&&/* @__PURE__ */ E(`div`,{className:`wui-nav-group-after`,children:e.after})]})]},e.key??`group-${t}`)})}),(N||Q.length>0)&&/* @__PURE__ */ D(`div`,{className:`app-sidebar-foot`,children:[Q.length>0&&/* @__PURE__ */ E(`div`,{className:`wui-sidebar-foot-links`,children:Q.map(e=>/* @__PURE__ */ E(pe,{item:e,linkComponent:q,onNavigate:()=>Y(!1),iconVariant:K,newLabel:Ae,togglePagesLabel:je},e.key??e.href??e.label))}),N]}),!U&&/* @__PURE__ */ E(`button`,{type:`button`,className:`app-sidebar-toggle`,onClick:ct,"aria-label":X?Oe:ke,"aria-expanded":!X,children:/* @__PURE__ */ E(m,{name:`chevrons-left`,size:20})})]}),/* @__PURE__ */ D(`div`,{className:`app-main`,children:[/* @__PURE__ */ D(`header`,{className:`app-topbar${nt?` scrolled`:``}`,"data-tone":_e===`primary`?`primary`:void 0,children:[/* @__PURE__ */ D(`div`,{className:`app-topbar-start`,children:[/* @__PURE__ */ E(`button`,{type:`button`,className:`app-topbar-menu`,onClick:()=>Y(!0),"aria-label":Ee,"aria-expanded":J,children:/* @__PURE__ */ E(m,{name:`menu`,size:18})}),W===`top`&&l&&/* @__PURE__ */ E(`div`,{className:`wui-shell-top-brand`,children:st(l)}),W===`top`&&/* @__PURE__ */ E(`div`,{className:`wui-shell-top-nav`,children:/* @__PURE__ */ E(h,{items:le(Z),ariaLabel:ve,linkComponent:q})}),ee,Ye&&/* @__PURE__ */ E(ge,{config:Ye,searchResultsLabel:He,noResultsText:Ue,noResultsForText:We,resultsCountText:Ge,resultCountText:Ke})]}),/* @__PURE__ */ D(`div`,{className:`app-topbar-end`,children:[B,Je&&/* @__PURE__ */ E(he,{config:Je,unreadLabel:Fe,markAllReadLabel:Ie,viewAllLabel:Le,loadingNotificationsText:Re,noUnreadText:ze,unreadNotificationsText:Be,unreadBellLabel:Ve}),qe&&/* @__PURE__ */ E(me,{config:qe,linkComponent:q,accountMenuLabel:Me,roleLabel:Ne,rolesLabel:Pe})]})]}),/* @__PURE__ */ E(`main`,{className:`app-content`,id:`main-content`,children:ae}),te&&/* @__PURE__ */ E(`footer`,{className:`app-footer`,children:te})]}),ne&&/* @__PURE__ */ E(`div`,{className:`wui-shell-launcher`,children:ne}),$&&/* @__PURE__ */ D(`nav`,{className:`wui-tabbar`,"aria-label":Ce,children:[$.tabs.map(e=>/* @__PURE__ */ E(de,{tab:e,linkComponent:q,iconVariant:K},e.key??e.href)),$.hasMore&&/* @__PURE__ */ D(`button`,{type:`button`,className:`wui-tabbar-item${$.moreActive?` active`:``}`,onClick:()=>Y(!0),children:[/* @__PURE__ */ E(`span`,{className:`wui-tabbar-icon`,children:/* @__PURE__ */ E(m,{name:`more`,size:24})}),/* @__PURE__ */ E(`span`,{className:`wui-tabbar-label`,children:we})]})]}),/* @__PURE__ */ E(`button`,{type:`button`,className:`app-scrim`,onClick:()=>Y(!1),"aria-label":De,tabIndex:J?0:-1})]})}function oe(e,t,n){let i=t;for(let e of i){if(e.children?.length)throw Error(`<AppShell> sidebarFooterItems cannot hold children; keep footer links flat.`);if(e.tab)throw Error(`<AppShell> sidebarFooterItems cannot carry tab: true; the phone tab bar is built from groups.`);if(e.header!=null)throw Error(`<AppShell> sidebarFooterItems cannot hold a header row.`)}for(let t of e)t.collapsible&&se(t);let a=(e,t=!1)=>(e??[]).map(e=>Array.isArray(e.children)?{...e,children:a(e.children)}:{...e}).filter(e=>H(e)?t:(e.children?.length??0)>0||!!e.href),o=[...e,{key:N,items:t}].map(e=>({...e,items:U(a(e.items,!0))})).filter(e=>e.items.some(e=>!H(e))),s=[],c=e=>{for(let t of e)H(t)||(s.push(t),t.children&&c(t.children))};for(let e of o)c(e.items);for(let e of s)_(`AppShell items`,V(e)),g(`AppShell`,`match`,e.match,F),g(`AppShell`,`iconVariant`,e.iconVariant,z);let l=null;if(n!=null&&!s.some(e=>e.active===!0)){let e=-1;for(let t of s){if(t.active!=null||t.children?.length&&!t.href)continue;let i=r(n,t.href,{exact:t.match===`exact`,also:t.matchAlso});if(i<0)continue;let a=t.match===`exact`&&r(n,t.href,{exact:!0})>=0?1/0:i;a>e&&(e=a,l=t)}}for(let e of s)e.active=e.active??e===l;return{groups:o.filter(e=>e.key!==N),footer:o.find(e=>e.key===N)?.items??[]}}function V(e){return Object.fromEntries(Object.entries(e).filter(([e])=>!ee.has(e)))}var H=e=>e.header!=null;function U(e){return e.filter((t,n)=>{if(!H(t))return!0;let r=e.findIndex((e,t)=>t>n&&H(e));return e.slice(n+1,r<0?void 0:r).length>0})}var W=/* @__PURE__ */ new Set;function se(t){if(t.key!=null&&M.test(t.key))return;let n=t.key==null?`<AppShell> a collapsible group needs a key so its folded state can be remembered.`:`<AppShell> collapsible group key "${t.key}" must use lower-case letters, digits and hyphens.`;typeof process<`u`&&process.env.NODE_ENV===`production`||W.has(n)||(W.add(n),e(n))}function ce(e,t){let n=[],r=e=>{for(let t of e)H(t)||(t.children?.length?r(t.children):n.push(t))};for(let t of e)r(t.items);let i=n.filter(e=>e.tab);if(i.length===0)return null;let a=i.length<n.length,o=a?A:j;if(i.length>o)throw Error(`<AppShell>: ${i.length} items carry tab: true, but the phone tab bar holds ${o} (${a?`4 plus More, because other items exist`:`5 when every item is a tab`}). Flag fewer items.`);return{tabs:i,hasMore:a,moreActive:t||n.some(e=>!e.tab&&e.active)}}function le(e){let t=e=>{if(e.label===void 0)throw Error(`<AppShell> a navigation row has no label; every row but a header needs one.`);return e.label},n=e=>e.key??e.href??t(e),r=(e,r)=>({key:n(e),label:t(e),to:r,current:!!e.active}),i=e=>e.flatMap(e=>H(e)?[]:[...e.href?[{...r(e,e.href),icon:e.icon}]:[],...i(e.children??[])]),a=[];for(let o of e.flatMap(e=>e.items)){if(H(o))continue;let e=i(o.children??[]);if(e.length>0){let i=o.href?[{...r(o,o.href),icon:o.icon}]:[];a.push({key:n(o),label:t(o),links:[...i,...e]})}else o.href&&a.push(r(o,o.href))}return a}function ue({href:e,label:t,linkComponent:r,onNavigate:i,children:a}){return/* @__PURE__ */ E(l,{link:n(r,{to:e}),className:`wui-brand-link`,"aria-label":t,onClick:i,children:a})}function de({tab:e,linkComponent:t,iconVariant:r}){let i=`wui-tabbar-item${e.active?` active`:``}`,a=/* @__PURE__ */ D(T,{children:[e.icon&&/* @__PURE__ */ E(`span`,{className:`wui-tabbar-icon`,children:typeof e.icon==`string`?/* @__PURE__ */ E(m,{name:e.icon,size:24,variant:e.iconVariant??r}):e.icon}),/* @__PURE__ */ E(`span`,{className:`wui-tabbar-label`,children:e.tabLabel??e.label}),e.badge!=null&&/* @__PURE__ */ E(`span`,{className:`wui-tabbar-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge})]}),o=e.active?`page`:void 0;return/* @__PURE__ */ E(l,{link:n(t,{to:e.href}),className:i,"aria-current":o,children:a})}function fe(e){for(let t of e){if(t.active)return t;let e=t.children?.length?fe(t.children):void 0;if(e)return e}}function pe({item:e,linkComponent:r,onNavigate:i,depth:a=0,iconVariant:o,newLabel:s,togglePagesLabel:c}){let u=a>0,d=a>1?` wui-nav-depth-${Math.min(a,6)}`:``,f=Array.isArray(e.children)&&e.children.length>0,p=f?fe(e.children??[]):void 0,h=!!p,g=p?p.key??p.href??p.label:null,[_,v]=w(h);b(()=>{g!=null&&v(!0)},[g]);let y=typeof e.label==`string`?e.label:void 0,x=!u&&e.icon&&/* @__PURE__ */ E(`span`,{className:`app-nav-icon`,children:typeof e.icon==`string`?/* @__PURE__ */ E(m,{name:e.icon,size:e.iconSize??22,variant:e.iconVariant??o}):e.icon}),S=e.badge!=null&&/* @__PURE__ */ E(`span`,{className:`app-nav-badge${e.badgeTone?` tone-${e.badgeTone}`:``}`,title:e.badgeTitle||void 0,children:e.badge}),C=ne(e.newUntil)&&/* @__PURE__ */ E(`span`,{className:`wui-nav-new`,children:s}),O=/* @__PURE__ */ D(T,{children:[x,/* @__PURE__ */ E(`span`,{className:`app-nav-text`,children:e.label}),C,S,e.trailingIcon&&/* @__PURE__ */ E(`span`,{className:`app-nav-trailing`,children:typeof e.trailingIcon==`string`?/* @__PURE__ */ E(m,{name:e.trailingIcon,size:16}):e.trailingIcon})]}),k=e.active?`page`:void 0;if(f){let f=/* @__PURE__ */ E(`div`,{className:`app-nav-sub${_?` expanded`:``}`,inert:!_,"aria-hidden":!_||void 0,children:/* @__PURE__ */ E(`div`,{className:`app-nav-sub-inner`,children:(e.children??[]).map(e=>/* @__PURE__ */ E(pe,{item:e,linkComponent:r,onNavigate:i,depth:a+1,iconVariant:o,newLabel:s,togglePagesLabel:c},e.key??e.href))})});if(e.href){let a=/* @__PURE__ */ E(l,{link:n(r,{to:e.href}),className:`wui-nav-split-link`,"aria-current":k,onClick:i,children:O});return/* @__PURE__ */ D(T,{children:[/* @__PURE__ */ D(`div`,{className:`app-nav-item has-children wui-nav-split${u?` app-nav-subitem`:``}${h||e.active?` active`:``}${d}`,"data-label":y,children:[a,/* @__PURE__ */ E(`button`,{type:`button`,className:`app-nav-caret wui-nav-split-toggle`,"aria-expanded":_,"aria-label":t(c,{name:y??``}),onClick:()=>v(e=>!e),children:/* @__PURE__ */ E(m,{name:`chevron-right`,size:16})})]}),f]})}return/* @__PURE__ */ D(T,{children:[/* @__PURE__ */ D(`button`,{type:`button`,className:`app-nav-item${u?` app-nav-subitem`:``} has-children${h?` active`:``}${d}`,"aria-expanded":_,"data-label":y,onClick:()=>v(e=>!e),children:[x,/* @__PURE__ */ E(`span`,{className:`app-nav-text`,children:e.label}),C,S,/* @__PURE__ */ E(`span`,{className:`app-nav-caret`,children:/* @__PURE__ */ E(m,{name:`chevron-right`,size:16})})]}),f]})}let A=`app-nav-item${u?` app-nav-subitem`:``}${e.active?` active`:``}${d}`;return/* @__PURE__ */ E(l,{link:n(r,{to:e.href}),className:A,"aria-current":k,"data-label":y,onClick:i,children:O})}function G(){let[e,t]=w(!1),n=C(null);return b(()=>{if(!e)return;let r=e=>{n.current?.contains(e.target instanceof Node?e.target:null)||t(!1)},i=e=>{e.key===`Escape`&&(t(!1),n.current?.querySelector(`button`)?.focus())};return document.addEventListener(`mousedown`,r),document.addEventListener(`keydown`,i),()=>{document.removeEventListener(`mousedown`,r),document.removeEventListener(`keydown`,i)}},[e]),{open:e,setOpen:t,ref:n}}function me({config:e,linkComponent:r,accountMenuLabel:i,roleLabel:a,rolesLabel:o}){let s=x(),{open:c,setOpen:u,ref:d}=G(),{name:h,role:_,roles:v=[],noTriggerRole:y=!1,photo:b,profileHref:S,profileLabel:C=`My profile`,onLogout:w,logoutAction:O,logoutLabel:k=`Sign out`,head:A,section:j,logoutVariant:M=`item`,items:N=[]}=e;if(g(`AppShell`,`userMenu.logoutVariant`,M,[`item`,`button`]),!h)throw Error(`<AppShell> userMenu.name is required; the trigger and the avatar are named from it.`);let P=v.map(e=>(e??``).trim()).filter(Boolean),F=()=>u(!1),I=(e,t,i,a)=>/* @__PURE__ */ E(l,{link:n(r,{to:e}),className:`dropdown-item`,onClick:a,children:t},i),L=/* @__PURE__ */ E(m,{name:`log-out`,size:18}),R=/* @__PURE__ */ D(T,{children:[L,k]});return/* @__PURE__ */ D(`div`,{className:`dropdown wui-usermenu`,ref:d,children:[/* @__PURE__ */ D(`button`,{type:`button`,id:s,className:`wui-usermenu-trigger`,"aria-expanded":c,"aria-label":t(i,{name:h}),onClick:()=>u(e=>!e),children:[/* @__PURE__ */ E(f,{name:h,src:b,tone:`auto`}),/* @__PURE__ */ D(`span`,{className:`wui-usermenu-text`,children:[/* @__PURE__ */ E(`span`,{className:`wui-usermenu-name`,children:h}),_&&!y&&/* @__PURE__ */ E(`span`,{className:`wui-usermenu-role`,children:_})]}),/* @__PURE__ */ E(m,{name:`chevron-down`,size:14,className:`wui-usermenu-caret`})]}),/* @__PURE__ */ D(`div`,{className:`dropdown-menu dropdown-menu-end wui-usermenu-menu${c?` show`:``}`,"aria-labelledby":s,"data-bs-popper":c?`static`:void 0,children:[/* @__PURE__ */ D(`div`,{className:`wui-usermenu-head`,children:[/* @__PURE__ */ E(f,{name:h,src:b,size:`lg`,tone:`auto`}),/* @__PURE__ */ D(`div`,{className:`wui-usermenu-who`,children:[/* @__PURE__ */ E(`div`,{className:`wui-usermenu-name`,children:h}),_&&/* @__PURE__ */ E(`div`,{className:`wui-usermenu-role`,children:_}),P.length>0&&/* @__PURE__ */ D(`div`,{className:`wui-usermenu-roles`,children:[/* @__PURE__ */ E(`span`,{className:`wui-usermenu-roles-label`,children:P.length===1?a:o}),` ${P.join(`, `)}`]}),A?/* @__PURE__ */ E(`div`,{className:`wui-usermenu-extra`,children:A}):null]})]}),j?/* @__PURE__ */ E(`div`,{className:`wui-usermenu-section`,children:j}):null,S&&I(S,/* @__PURE__ */ D(T,{children:[/* @__PURE__ */ E(m,{name:`user`,size:18}),C]}),void 0,F),N.map(e=>{if(e.divider)return/* @__PURE__ */ E(`hr`,{className:`dropdown-divider`},e.key);let t=/* @__PURE__ */ D(T,{children:[e.icon&&/* @__PURE__ */ E(m,{name:e.icon,size:18}),e.label]}),n=()=>{e.onClick?.(),F()};return e.href?I(e.href,t,e.key,n):/* @__PURE__ */ E(`button`,{type:`button`,className:`dropdown-item`,onClick:n,children:t},e.key)}),M===`button`?(O||w)&&/* @__PURE__ */ E(`div`,{className:`wui-usermenu-foot`,children:O?/* @__PURE__ */ E(`form`,{method:`post`,action:O,className:`wui-usermenu-logout`,children:/* @__PURE__ */ E(p,{type:`submit`,tone:`danger`,variant:`soft`,block:!0,leftIcon:L,children:k})}):/* @__PURE__ */ E(p,{type:`button`,tone:`danger`,variant:`soft`,block:!0,leftIcon:L,onClick:()=>{F(),w?.()},children:k})}):O?/* @__PURE__ */ E(`form`,{method:`post`,action:O,className:`wui-usermenu-logout`,children:/* @__PURE__ */ E(`button`,{type:`submit`,className:`dropdown-item danger`,children:R})}):w&&/* @__PURE__ */ E(`button`,{type:`button`,className:`dropdown-item danger`,onClick:()=>{F(),w()},children:R})]})]})}function he({config:e,unreadLabel:n,markAllReadLabel:r,viewAllLabel:i,loadingNotificationsText:a,noUnreadText:o,unreadNotificationsText:s,unreadBellLabel:c}){let l=x(),{open:u,setOpen:d,ref:f}=G(),{unread:p=0,items:h,loading:g=!1,onOpen:_,onMarkAllRead:v,viewAllHref:y,label:S=`Notifications`,emptyText:O=`You are all caught up.`}=e,[k,A]=w(``),j=C(p);b(()=>{j.current!==p&&(j.current=p,A(p===0?o:t(s,{count:B(p)})))},[p,o,s]);let M=null;return h?.length?M=/* @__PURE__ */ E(`div`,{className:`wui-bell-items`,children:h.map((e,t)=>{let r=`wui-bell-item${e.read?` wui-bell-item-read`:``}`,i=/* @__PURE__ */ D(T,{children:[/* @__PURE__ */ E(`span`,{className:`wui-bell-dot`,"aria-hidden":`true`}),e.icon&&/* @__PURE__ */ E(`span`,{className:`wui-bell-icon`,children:/* @__PURE__ */ E(m,{name:e.icon,size:18})}),/* @__PURE__ */ D(`span`,{className:`wui-bell-body`,children:[!e.read&&/* @__PURE__ */ D(`span`,{className:`visually-hidden`,children:[n,`: `]}),/* @__PURE__ */ E(`span`,{className:`wui-bell-item-title`,children:e.title}),e.time&&/* @__PURE__ */ E(`span`,{className:`wui-bell-when`,children:e.time})]})]});return e.href?/* @__PURE__ */ E(`a`,{className:r,href:e.href,"data-id":e.id,children:i},e.id??t):/* @__PURE__ */ E(`div`,{className:r,"data-id":e.id,children:i},e.id??t)})}):g?M=/* @__PURE__ */ E(`div`,{className:`wui-bell-state`,children:a}):h&&(M=/* @__PURE__ */ E(`div`,{className:`wui-bell-state`,children:O})),/* @__PURE__ */ D(`div`,{className:`dropdown wui-bell`,ref:f,children:[/* @__PURE__ */ D(`button`,{type:`button`,id:l,className:`topbar-icon-btn wui-bell-trigger`,"aria-expanded":u,"aria-label":p===0?S:t(c,{label:S,count:B(p)}),onClick:()=>{let e=!u;d(e),e&&_?.()},children:[/* @__PURE__ */ E(m,{name:`notification`,size:20}),/* @__PURE__ */ E(`span`,{className:`wui-bell-count`,"aria-hidden":`true`,hidden:p===0,children:B(p)})]}),/* @__PURE__ */ E(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:k}),/* @__PURE__ */ D(`div`,{className:`dropdown-menu dropdown-menu-end wui-bell-menu${u?` show`:``}`,"aria-labelledby":l,"data-bs-popper":u?`static`:void 0,children:[/* @__PURE__ */ D(`div`,{className:`wui-bell-head`,children:[/* @__PURE__ */ E(`span`,{className:`wui-bell-title`,children:S}),v&&/* @__PURE__ */ E(`button`,{type:`button`,className:`wui-bell-markall`,onClick:v,children:r})]}),/* @__PURE__ */ E(`div`,{className:`wui-bell-list`,"aria-busy":g||void 0,children:M}),y&&/* @__PURE__ */ E(`a`,{className:`wui-bell-foot`,href:y,children:i})]})]})}var K=e=>!!e&&(e.isContentEditable||/^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));function ge({config:e,searchResultsLabel:n,noResultsText:r,noResultsForText:i,resultsCountText:a,resultCountText:o}){u(`wui-overflow`,O);let s=x(),{value:c=``,onChange:l,results:d=null,loading:f=!1,onSelect:p,onSubmit:h,onFocus:g,placeholder:_=`Search`}=e,[v,y]=w(!1),[T,k]=w(!1),[A,j]=w({results:null,index:-1}),M=A.results===d?A.index:-1,N=e=>j({results:d,index:e}),P=C(null),F=C(null),I=C([]),L=S(()=>(d??[]).flatMap(e=>e.hits??[]),[d]),R=d!=null&&!T,z=L.length;b(()=>{let e=e=>{e.key!==`/`||e.ctrlKey||e.metaKey||e.altKey||K(e.target instanceof HTMLElement?e.target:null)||(e.preventDefault(),y(!0),F.current?.focus())},t=e=>{P.current?.contains(e.target instanceof Node?e.target:null)||(k(!0),y(!1))};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t)}},[]);let ee=e=>{if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(!R||z===0)return;e.preventDefault(),N((M+(e.key===`ArrowDown`?1:-1)+z)%z)}else e.key===`Enter`?R&&M>=0&&I.current[M]?(e.preventDefault(),I.current[M].click()):h&&c.trim()!==``&&(e.preventDefault(),h(c.trim())):e.key===`Escape`&&(R?(e.preventDefault(),k(!0)):v&&(e.preventDefault(),y(!1)))},B=-1;return I.current=[],/* @__PURE__ */ E(`wui-overflow`,{class:`wui-topsearch-host`,label:`More`,children:/* @__PURE__ */ E(`div`,{"data-wui-overflow-list":!0,className:`wui-topsearch-row`,children:/* @__PURE__ */ D(`div`,{className:`wui-topsearch${v?` is-open`:``}${f?` is-loading`:``}`,ref:P,"data-overflow-label":_,children:[/* @__PURE__ */ E(`button`,{type:`button`,className:`topbar-icon-btn wui-topsearch-open`,"aria-label":_,"aria-expanded":v,"aria-controls":`${s}-panel`,onClick:()=>{let e=!v;y(e),e&&F.current?.focus()},children:/* @__PURE__ */ E(m,{name:`search`,size:20})}),/* @__PURE__ */ D(`div`,{className:`wui-topsearch-panel`,id:`${s}-panel`,children:[/* @__PURE__ */ D(`div`,{className:`search-wrap`,children:[/* @__PURE__ */ E(m,{name:`search`,size:18,className:`search-icon`}),/* @__PURE__ */ E(`input`,{ref:F,type:`search`,className:`form-control input search-input`,id:`${s}-input`,placeholder:_,"aria-label":_,role:`combobox`,"aria-autocomplete":`list`,"aria-expanded":R,"aria-controls":`${s}-list`,"aria-activedescendant":R&&M>=0?`${s}-opt-${M}`:void 0,autoComplete:`off`,value:c,onChange:e=>{k(!1),l?.(e.target.value)},onKeyDown:ee,onFocus:g})]}),/* @__PURE__ */ E(`div`,{className:`wui-topsearch-results`,id:`${s}-list`,role:`listbox`,"aria-label":n,hidden:!R,children:R&&/* @__PURE__ */ D(`div`,{className:`wui-topsearch-groups`,role:`presentation`,children:[z===0&&/* @__PURE__ */ E(`div`,{className:`wui-topsearch-empty`,role:`option`,"aria-disabled":`true`,"aria-selected":`false`,children:t(i,{value:c})}),d.filter(e=>e.hits?.length).map((e,t)=>/* @__PURE__ */ D(`div`,{className:`wui-topsearch-group`,role:`group`,"aria-label":e.label??``,children:[e.label&&/* @__PURE__ */ E(`div`,{className:`wui-topsearch-group-label`,role:`presentation`,children:e.label}),e.hits.map(e=>{B+=1;let t=B;return/* @__PURE__ */ D(`a`,{className:`wui-topsearch-hit${t===M?` is-active`:``}`,role:`option`,"aria-selected":t===M,id:`${s}-opt-${t}`,href:e.href,ref:e=>{I.current[t]=e},onClick:t=>p?.(e,t),children:[e.icon&&/* @__PURE__ */ E(`span`,{className:`wui-topsearch-hit-icon`,children:/* @__PURE__ */ E(m,{name:e.icon,size:18})}),/* @__PURE__ */ D(`span`,{className:`wui-topsearch-hit-text`,children:[/* @__PURE__ */ E(`span`,{className:`wui-topsearch-hit-title`,children:e.title}),e.subtitle&&/* @__PURE__ */ E(`span`,{className:`wui-topsearch-hit-sub`,children:e.subtitle})]})]},`${e.href}-${t}`)})]},e.label??t))]})})]}),/* @__PURE__ */ E(`span`,{className:`visually-hidden`,"aria-live":`polite`,children:R?z===0?r:t(z===1?o:a,{count:z}):``})]})})})}export{ae as default};
|