@webority/ui-react 0.37.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AppAccordion.js +1 -57
- package/dist/components/AppActionIcon.js +1 -53
- package/dist/components/AppAlert.js +1 -85
- package/dist/components/AppAsyncBlock.js +1 -48
- package/dist/components/AppAutocomplete.js +1 -93
- package/dist/components/AppAvatar.js +1 -143
- package/dist/components/AppAvatarGroup.js +1 -43
- package/dist/components/AppAvatarPicker.js +1 -247
- package/dist/components/AppBadge.js +1 -28
- package/dist/components/AppBanner.js +1 -49
- package/dist/components/AppBreadcrumbs.js +1 -24
- package/dist/components/AppButton.js +1 -85
- package/dist/components/AppCalendar.js +1 -72
- package/dist/components/AppCard.js +1 -110
- package/dist/components/AppChart.js +1 -153
- package/dist/components/AppChartCard.js +1 -125
- package/dist/components/AppCheckbox.js +1 -21
- package/dist/components/AppChip.js +1 -71
- package/dist/components/AppChoiceCard.js +1 -69
- package/dist/components/AppChoiceChip.js +1 -31
- package/dist/components/AppColorField.js +1 -63
- package/dist/components/AppColumnMenu.js +1 -27
- package/dist/components/AppCommandPalette.js +1 -164
- package/dist/components/AppCompareTable.js +1 -41
- package/dist/components/AppConfirmDialog.js +1 -93
- package/dist/components/AppConsentBanner.js +1 -37
- package/dist/components/AppContextMenu.js +1 -46
- package/dist/components/AppCopyButton.js +1 -41
- package/dist/components/AppCountrySelect.js +1 -75
- package/dist/components/AppDashboardCell.js +1 -19
- package/dist/components/AppDashboardGrid.js +1 -12
- package/dist/components/AppDataTable.js +1 -213
- package/dist/components/AppDatePicker.js +1 -59
- package/dist/components/AppDateRangePicker.js +1 -73
- package/dist/components/AppDescriptions.js +1 -40
- package/dist/components/AppDropZone.js +1 -106
- package/dist/components/AppDropdown.js +1 -90
- package/dist/components/AppEmptyState.js +1 -37
- package/dist/components/AppErrorSummary.js +1 -37
- package/dist/components/AppFileAttachment.js +1 -140
- package/dist/components/AppFilePicker.js +1 -220
- package/dist/components/AppFileViewer.js +1 -50
- package/dist/components/AppFilterBar.js +1 -129
- package/dist/components/AppFloatingDock.js +1 -47
- package/dist/components/AppFormActions.js +1 -23
- package/dist/components/AppFormRow.js +1 -24
- package/dist/components/AppFormSection.js +1 -32
- package/dist/components/AppIcon.js +1 -147
- package/dist/components/AppInfoList.js +1 -36
- package/dist/components/AppInfoTip.js +1 -41
- package/dist/components/AppInput.js +1 -269
- package/dist/components/AppKanban.js +1 -270
- package/dist/components/AppKpiTile.js +1 -91
- package/dist/components/AppLink.js +1 -74
- package/dist/components/AppLogoPicker.js +1 -264
- package/dist/components/AppMeter.js +1 -42
- package/dist/components/AppModal.js +1 -124
- package/dist/components/AppMultiSelect.js +1 -75
- package/dist/components/AppNumberInput.js +1 -139
- package/dist/components/AppOtpInput.js +1 -53
- package/dist/components/AppPageHeader.js +1 -82
- package/dist/components/AppPagination.js +1 -66
- package/dist/components/AppPhoneNumberInput.js +1 -53
- package/dist/components/AppPopover.js +1 -47
- package/dist/components/AppPricingCard.js +1 -58
- package/dist/components/AppProgress.js +1 -42
- package/dist/components/AppQrCode.js +1 -40
- package/dist/components/AppRadio.js +1 -21
- package/dist/components/AppRadioGroup.js +1 -79
- package/dist/components/AppRepeater.js +1 -57
- package/dist/components/AppRequiredMark.js +1 -11
- package/dist/components/AppResourceCard.js +1 -38
- package/dist/components/AppResult.js +1 -66
- package/dist/components/AppRichText.js +1 -72
- package/dist/components/AppRouteError.js +1 -0
- package/dist/components/AppScrollbar.js +1 -16
- package/dist/components/AppSearch.js +1 -52
- package/dist/components/AppSegmented.js +1 -87
- package/dist/components/AppSelect.js +1 -95
- package/dist/components/AppSelectMini.js +1 -45
- package/dist/components/AppShell.js +1 -712
- package/dist/components/AppSidebarMenu.js +1 -77
- package/dist/components/AppSkeleton.js +1 -24
- package/dist/components/AppSlider.js +1 -76
- package/dist/components/AppSortableList.js +1 -63
- package/dist/components/AppSparkline.js +1 -47
- package/dist/components/AppSpinner.js +1 -23
- package/dist/components/AppSplash.js +1 -62
- package/dist/components/AppStatusBadge.js +1 -22
- package/dist/components/AppStepper.js +1 -94
- package/dist/components/AppSwitch.js +1 -26
- package/dist/components/AppTableEmptyState.js +1 -30
- package/dist/components/AppTablePagination.js +1 -85
- package/dist/components/AppTableToolbar.js +1 -41
- package/dist/components/AppTabs.js +1 -195
- package/dist/components/AppTagInput.js +1 -63
- package/dist/components/AppTextarea.js +1 -81
- package/dist/components/AppThemeToggle.js +1 -102
- package/dist/components/AppTimePicker.js +1 -68
- package/dist/components/AppTimeline.js +1 -102
- package/dist/components/AppToast.js +1 -169
- package/dist/components/AppToolbar.js +1 -63
- package/dist/components/AppTooltip.js +1 -50
- package/dist/components/AppTour.js +1 -39
- package/dist/components/AppTreeView.js +1 -61
- package/dist/components/AppUpdateBar.js +1 -0
- package/dist/components/AppWizard.js +1 -82
- package/dist/components/AppWorkspaceSwitcher.js +1 -176
- package/dist/components/ModalIcons.js +1 -18
- package/dist/components/iconCatalogFull/bold/a.g.js +1 -69
- package/dist/components/iconCatalogFull/bold/b.g.js +1 -79
- package/dist/components/iconCatalogFull/bold/c.g.js +1 -98
- package/dist/components/iconCatalogFull/bold/d.g.js +1 -54
- package/dist/components/iconCatalogFull/bold/e.g.js +1 -34
- package/dist/components/iconCatalogFull/bold/f.g.js +1 -39
- package/dist/components/iconCatalogFull/bold/g.g.js +1 -43
- package/dist/components/iconCatalogFull/bold/h.g.js +1 -38
- package/dist/components/iconCatalogFull/bold/i.g.js +1 -20
- package/dist/components/iconCatalogFull/bold/j.g.js +1 -8
- package/dist/components/iconCatalogFull/bold/k.g.js +1 -9
- package/dist/components/iconCatalogFull/bold/l.g.js +1 -38
- package/dist/components/iconCatalogFull/bold/m.g.js +1 -91
- package/dist/components/iconCatalogFull/bold/n.g.js +1 -23
- package/dist/components/iconCatalogFull/bold/o.g.js +1 -11
- package/dist/components/iconCatalogFull/bold/p.g.js +1 -45
- package/dist/components/iconCatalogFull/bold/q.g.js +1 -12
- package/dist/components/iconCatalogFull/bold/r.g.js +1 -47
- package/dist/components/iconCatalogFull/bold/s.g.js +1 -99
- package/dist/components/iconCatalogFull/bold/t.g.js +1 -60
- package/dist/components/iconCatalogFull/bold/u.g.js +1 -17
- package/dist/components/iconCatalogFull/bold/v.g.js +1 -27
- package/dist/components/iconCatalogFull/bold/w.g.js +1 -30
- package/dist/components/iconCatalogFull/bold/x.g.js +1 -8
- package/dist/components/iconCatalogFull/bold/y.g.js +1 -0
- package/dist/components/iconCatalogFull/bold/z.g.js +1 -7
- package/dist/components/iconCatalogFull/broken/a.g.js +1 -69
- package/dist/components/iconCatalogFull/broken/b.g.js +1 -79
- package/dist/components/iconCatalogFull/broken/c.g.js +1 -98
- package/dist/components/iconCatalogFull/broken/d.g.js +1 -54
- package/dist/components/iconCatalogFull/broken/e.g.js +1 -34
- package/dist/components/iconCatalogFull/broken/f.g.js +1 -39
- package/dist/components/iconCatalogFull/broken/g.g.js +1 -43
- package/dist/components/iconCatalogFull/broken/h.g.js +1 -38
- package/dist/components/iconCatalogFull/broken/i.g.js +1 -20
- package/dist/components/iconCatalogFull/broken/j.g.js +1 -8
- package/dist/components/iconCatalogFull/broken/k.g.js +1 -9
- package/dist/components/iconCatalogFull/broken/l.g.js +1 -38
- package/dist/components/iconCatalogFull/broken/m.g.js +1 -91
- package/dist/components/iconCatalogFull/broken/n.g.js +1 -23
- package/dist/components/iconCatalogFull/broken/o.g.js +1 -11
- package/dist/components/iconCatalogFull/broken/p.g.js +1 -45
- package/dist/components/iconCatalogFull/broken/q.g.js +1 -12
- package/dist/components/iconCatalogFull/broken/r.g.js +1 -47
- package/dist/components/iconCatalogFull/broken/s.g.js +1 -99
- package/dist/components/iconCatalogFull/broken/t.g.js +1 -60
- package/dist/components/iconCatalogFull/broken/u.g.js +1 -17
- package/dist/components/iconCatalogFull/broken/v.g.js +1 -27
- package/dist/components/iconCatalogFull/broken/w.g.js +1 -30
- package/dist/components/iconCatalogFull/broken/x.g.js +1 -8
- package/dist/components/iconCatalogFull/broken/y.g.js +1 -0
- package/dist/components/iconCatalogFull/broken/z.g.js +1 -7
- package/dist/components/iconCatalogFull/bulk/a.g.js +1 -69
- package/dist/components/iconCatalogFull/bulk/b.g.js +1 -79
- package/dist/components/iconCatalogFull/bulk/c.g.js +1 -98
- package/dist/components/iconCatalogFull/bulk/d.g.js +1 -54
- package/dist/components/iconCatalogFull/bulk/e.g.js +1 -34
- package/dist/components/iconCatalogFull/bulk/f.g.js +1 -39
- package/dist/components/iconCatalogFull/bulk/g.g.js +1 -43
- package/dist/components/iconCatalogFull/bulk/h.g.js +1 -38
- package/dist/components/iconCatalogFull/bulk/i.g.js +1 -20
- package/dist/components/iconCatalogFull/bulk/j.g.js +1 -8
- package/dist/components/iconCatalogFull/bulk/k.g.js +1 -9
- package/dist/components/iconCatalogFull/bulk/l.g.js +1 -38
- package/dist/components/iconCatalogFull/bulk/m.g.js +1 -91
- package/dist/components/iconCatalogFull/bulk/n.g.js +1 -23
- package/dist/components/iconCatalogFull/bulk/o.g.js +1 -11
- package/dist/components/iconCatalogFull/bulk/p.g.js +1 -45
- package/dist/components/iconCatalogFull/bulk/q.g.js +1 -12
- package/dist/components/iconCatalogFull/bulk/r.g.js +1 -47
- package/dist/components/iconCatalogFull/bulk/s.g.js +1 -99
- package/dist/components/iconCatalogFull/bulk/t.g.js +1 -60
- package/dist/components/iconCatalogFull/bulk/u.g.js +1 -17
- package/dist/components/iconCatalogFull/bulk/v.g.js +1 -27
- package/dist/components/iconCatalogFull/bulk/w.g.js +1 -30
- package/dist/components/iconCatalogFull/bulk/x.g.js +1 -8
- package/dist/components/iconCatalogFull/bulk/y.g.js +1 -0
- package/dist/components/iconCatalogFull/bulk/z.g.js +1 -7
- package/dist/components/iconCatalogFull/linear/a.g.js +1 -69
- package/dist/components/iconCatalogFull/linear/b.g.js +1 -79
- package/dist/components/iconCatalogFull/linear/c.g.js +1 -98
- package/dist/components/iconCatalogFull/linear/d.g.js +1 -54
- package/dist/components/iconCatalogFull/linear/e.g.js +1 -34
- package/dist/components/iconCatalogFull/linear/f.g.js +1 -39
- package/dist/components/iconCatalogFull/linear/g.g.js +1 -43
- package/dist/components/iconCatalogFull/linear/h.g.js +1 -38
- package/dist/components/iconCatalogFull/linear/i.g.js +1 -20
- package/dist/components/iconCatalogFull/linear/j.g.js +1 -8
- package/dist/components/iconCatalogFull/linear/k.g.js +1 -9
- package/dist/components/iconCatalogFull/linear/l.g.js +1 -38
- package/dist/components/iconCatalogFull/linear/m.g.js +1 -91
- package/dist/components/iconCatalogFull/linear/n.g.js +1 -23
- package/dist/components/iconCatalogFull/linear/o.g.js +1 -11
- package/dist/components/iconCatalogFull/linear/p.g.js +1 -45
- package/dist/components/iconCatalogFull/linear/q.g.js +1 -12
- package/dist/components/iconCatalogFull/linear/r.g.js +1 -47
- package/dist/components/iconCatalogFull/linear/s.g.js +1 -99
- package/dist/components/iconCatalogFull/linear/t.g.js +1 -60
- package/dist/components/iconCatalogFull/linear/u.g.js +1 -17
- package/dist/components/iconCatalogFull/linear/v.g.js +1 -27
- package/dist/components/iconCatalogFull/linear/w.g.js +1 -30
- package/dist/components/iconCatalogFull/linear/x.g.js +1 -8
- package/dist/components/iconCatalogFull/linear/y.g.js +1 -0
- package/dist/components/iconCatalogFull/linear/z.g.js +1 -7
- package/dist/components/iconCatalogFull/outline/a.g.js +1 -69
- package/dist/components/iconCatalogFull/outline/b.g.js +1 -79
- package/dist/components/iconCatalogFull/outline/c.g.js +1 -98
- package/dist/components/iconCatalogFull/outline/d.g.js +1 -54
- package/dist/components/iconCatalogFull/outline/e.g.js +1 -34
- package/dist/components/iconCatalogFull/outline/f.g.js +1 -39
- package/dist/components/iconCatalogFull/outline/g.g.js +1 -43
- package/dist/components/iconCatalogFull/outline/h.g.js +1 -38
- package/dist/components/iconCatalogFull/outline/i.g.js +1 -20
- package/dist/components/iconCatalogFull/outline/j.g.js +1 -8
- package/dist/components/iconCatalogFull/outline/k.g.js +1 -9
- package/dist/components/iconCatalogFull/outline/l.g.js +1 -38
- package/dist/components/iconCatalogFull/outline/m.g.js +1 -91
- package/dist/components/iconCatalogFull/outline/n.g.js +1 -23
- package/dist/components/iconCatalogFull/outline/o.g.js +1 -11
- package/dist/components/iconCatalogFull/outline/p.g.js +1 -45
- package/dist/components/iconCatalogFull/outline/q.g.js +1 -12
- package/dist/components/iconCatalogFull/outline/r.g.js +1 -47
- package/dist/components/iconCatalogFull/outline/s.g.js +1 -99
- package/dist/components/iconCatalogFull/outline/t.g.js +1 -60
- package/dist/components/iconCatalogFull/outline/u.g.js +1 -17
- package/dist/components/iconCatalogFull/outline/v.g.js +1 -27
- package/dist/components/iconCatalogFull/outline/w.g.js +1 -30
- package/dist/components/iconCatalogFull/outline/x.g.js +1 -8
- package/dist/components/iconCatalogFull/outline/y.g.js +1 -0
- package/dist/components/iconCatalogFull/outline/z.g.js +1 -7
- package/dist/components/iconCatalogFull/twotone/a.g.js +1 -69
- package/dist/components/iconCatalogFull/twotone/b.g.js +1 -79
- package/dist/components/iconCatalogFull/twotone/c.g.js +1 -98
- package/dist/components/iconCatalogFull/twotone/d.g.js +1 -54
- package/dist/components/iconCatalogFull/twotone/e.g.js +1 -34
- package/dist/components/iconCatalogFull/twotone/f.g.js +1 -39
- package/dist/components/iconCatalogFull/twotone/g.g.js +1 -43
- package/dist/components/iconCatalogFull/twotone/h.g.js +1 -38
- package/dist/components/iconCatalogFull/twotone/i.g.js +1 -20
- package/dist/components/iconCatalogFull/twotone/j.g.js +1 -8
- package/dist/components/iconCatalogFull/twotone/k.g.js +1 -9
- package/dist/components/iconCatalogFull/twotone/l.g.js +1 -38
- package/dist/components/iconCatalogFull/twotone/m.g.js +1 -91
- package/dist/components/iconCatalogFull/twotone/n.g.js +1 -23
- package/dist/components/iconCatalogFull/twotone/o.g.js +1 -11
- package/dist/components/iconCatalogFull/twotone/p.g.js +1 -45
- package/dist/components/iconCatalogFull/twotone/q.g.js +1 -12
- package/dist/components/iconCatalogFull/twotone/r.g.js +1 -47
- package/dist/components/iconCatalogFull/twotone/s.g.js +1 -99
- package/dist/components/iconCatalogFull/twotone/t.g.js +1 -60
- package/dist/components/iconCatalogFull/twotone/u.g.js +1 -17
- package/dist/components/iconCatalogFull/twotone/v.g.js +1 -27
- package/dist/components/iconCatalogFull/twotone/w.g.js +1 -30
- package/dist/components/iconCatalogFull/twotone/x.g.js +1 -8
- package/dist/components/iconCatalogFull/twotone/y.g.js +1 -0
- package/dist/components/iconCatalogFull/twotone/z.g.js +1 -7
- package/dist/components/iconCatalogLoaders.g.js +1 -170
- package/dist/components/iconCatalogNames.g.js +1 -4
- package/dist/components/iconGlyphs.g.js +1 -211
- package/dist/components/iconVariants.g.js +1 -1040
- package/dist/components/renderIconProp.js +1 -13
- package/dist/components/toast.js +1 -41
- package/dist/components/toastStore.js +1 -78
- package/dist/components/useWuiControl.js +1 -106
- package/dist/components/warnInvalidValue.js +1 -17
- package/dist/components/warnUnknownProps.js +1 -17
- package/dist/components/withTooltip.js +1 -12
- package/dist/lib/CheckField.js +1 -37
- package/dist/lib/FileItemRow.js +1 -44
- package/dist/lib/emptyValue.js +1 -6
- package/dist/lib/fileItem.js +1 -27
- package/dist/lib/focusField.js +1 -14
- package/dist/lib/listQuery.js +1 -57
- package/dist/lib/navMatch.js +1 -29
- package/dist/lib/pageWindow.js +1 -14
- package/dist/lib/qrCode.js +1 -577
- package/dist/lib/shellCookie.js +1 -16
- package/dist/lib/useCommandPaletteShortcut.js +1 -15
- package/dist/lib/useFloatingStack.js +1 -25
- package/dist/lib/useListQuery.js +1 -120
- package/dist/lib/usePagination.js +1 -29
- package/dist/lib/useTableView.js +1 -42
- package/dist/types/components/AppAlert.d.ts +6 -1
- package/dist/types/components/AppCalendar.d.ts +8 -6
- package/dist/types/components/AppDatePicker.d.ts +4 -1
- package/dist/types/components/AppDateRangePicker.d.ts +2 -1
- package/dist/types/components/AppDropdown.d.ts +12 -1
- package/dist/types/components/AppRouteError.d.ts +32 -0
- package/dist/types/components/AppStepper.d.ts +8 -1
- package/dist/types/components/AppUpdateBar.d.ts +20 -0
- package/dist/types/components/AppWizard.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bold/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/bold/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bold/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/bold/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bold/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bold/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/bold/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bold/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/bold/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bold/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bold/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/bold/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/bold/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/bold/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/bold/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bold/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/bold/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/bold/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bold/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bold/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bold/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/broken/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/broken/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/broken/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/broken/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/broken/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/broken/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/broken/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/broken/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/broken/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/broken/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/broken/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/broken/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/broken/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/broken/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/broken/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/broken/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/broken/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/broken/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/broken/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/broken/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/broken/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bulk/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/bulk/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bulk/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/bulk/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bulk/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bulk/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/bulk/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bulk/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/bulk/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bulk/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bulk/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/bulk/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/bulk/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/bulk/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/bulk/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/bulk/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/bulk/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/bulk/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bulk/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/bulk/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/bulk/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/linear/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/linear/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/linear/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/linear/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/linear/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/linear/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/linear/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/linear/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/linear/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/linear/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/linear/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/linear/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/linear/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/linear/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/linear/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/linear/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/linear/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/linear/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/linear/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/linear/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/linear/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/outline/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/outline/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/outline/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/outline/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/outline/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/outline/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/outline/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/outline/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/outline/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/outline/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/outline/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/outline/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/outline/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/outline/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/outline/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/outline/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/outline/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/outline/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/outline/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/outline/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/outline/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/twotone/a.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/twotone/b.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/twotone/c.g.d.ts +18 -0
- package/dist/types/components/iconCatalogFull/twotone/d.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/twotone/e.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/twotone/f.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/twotone/g.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/twotone/h.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/twotone/i.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/twotone/k.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/twotone/l.g.d.ts +5 -0
- package/dist/types/components/iconCatalogFull/twotone/m.g.d.ts +10 -0
- package/dist/types/components/iconCatalogFull/twotone/n.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/twotone/p.g.d.ts +6 -0
- package/dist/types/components/iconCatalogFull/twotone/r.g.d.ts +4 -0
- package/dist/types/components/iconCatalogFull/twotone/s.g.d.ts +11 -0
- package/dist/types/components/iconCatalogFull/twotone/t.g.d.ts +7 -0
- package/dist/types/components/iconCatalogFull/twotone/u.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/twotone/v.g.d.ts +3 -0
- package/dist/types/components/iconCatalogFull/twotone/w.g.d.ts +2 -0
- package/dist/types/components/iconCatalogFull/twotone/y.g.d.ts +3 -0
- package/dist/types/components/iconCatalogLoaders.g.d.ts +6 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/ui-react.js +1 -117
- package/package.json +7 -9
- package/dist/types/components/__tests__/restPassthrough.d.ts +0 -9
|
@@ -1,85 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./warnUnknownProps.js";
|
|
3
|
-
import n from "./AppIcon.js";
|
|
4
|
-
import { pageWindow as r } from "../lib/pageWindow.js";
|
|
5
|
-
import i from "./AppSelectMini.js";
|
|
6
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
//#region src/components/AppTablePagination.jsx
|
|
8
|
-
var s = ["numbered", "prev-next"], c = [
|
|
9
|
-
5,
|
|
10
|
-
10,
|
|
11
|
-
25,
|
|
12
|
-
50
|
|
13
|
-
];
|
|
14
|
-
function l({ page: l, totalPages: u, pageSize: d, onPageChange: f, onPageSizeChange: p, pageSizes: m = c, mode: h = "numbered", showPageSize: g = !0, className: _ = "", ...v }) {
|
|
15
|
-
t("AppTablePagination", v), e("AppTablePagination", "mode", h, s);
|
|
16
|
-
let y = h === "numbered", b = y ? r(l, u) : null;
|
|
17
|
-
return /* @__PURE__ */ o("div", {
|
|
18
|
-
className: `table-pagination${_ ? ` ${_}` : ""}`,
|
|
19
|
-
...v,
|
|
20
|
-
children: [
|
|
21
|
-
g && /* @__PURE__ */ a("span", {
|
|
22
|
-
className: "tpg-rows",
|
|
23
|
-
children: /* @__PURE__ */ a(i, {
|
|
24
|
-
value: d,
|
|
25
|
-
onChange: (e) => p(Number(e)),
|
|
26
|
-
ariaLabel: "Rows per page",
|
|
27
|
-
options: m.map((e) => ({
|
|
28
|
-
value: e,
|
|
29
|
-
label: `${e} per page`
|
|
30
|
-
}))
|
|
31
|
-
})
|
|
32
|
-
}),
|
|
33
|
-
!y && /* @__PURE__ */ o("span", {
|
|
34
|
-
className: "tpg-range",
|
|
35
|
-
children: [
|
|
36
|
-
"Page ",
|
|
37
|
-
l,
|
|
38
|
-
" of ",
|
|
39
|
-
u
|
|
40
|
-
]
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ o("div", {
|
|
43
|
-
className: "tpg-nav",
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ a("button", {
|
|
46
|
-
type: "button",
|
|
47
|
-
className: "tpg-arrow",
|
|
48
|
-
onClick: () => f(Math.max(1, l - 1)),
|
|
49
|
-
disabled: l <= 1,
|
|
50
|
-
"aria-label": "Previous page",
|
|
51
|
-
children: /* @__PURE__ */ a(n, {
|
|
52
|
-
name: "arrow-left",
|
|
53
|
-
size: 18
|
|
54
|
-
})
|
|
55
|
-
}),
|
|
56
|
-
y && b.map((e) => typeof e == "number" ? /* @__PURE__ */ a("button", {
|
|
57
|
-
type: "button",
|
|
58
|
-
className: `tpg-page${e === l ? " is-active" : ""}`,
|
|
59
|
-
onClick: () => f(e),
|
|
60
|
-
"aria-current": e === l ? "page" : void 0,
|
|
61
|
-
"aria-label": `Page ${e}`,
|
|
62
|
-
children: e
|
|
63
|
-
}, e) : /* @__PURE__ */ a("span", {
|
|
64
|
-
className: "tpg-ellipsis",
|
|
65
|
-
"aria-hidden": "true",
|
|
66
|
-
children: "…"
|
|
67
|
-
}, e)),
|
|
68
|
-
/* @__PURE__ */ a("button", {
|
|
69
|
-
type: "button",
|
|
70
|
-
className: "tpg-arrow",
|
|
71
|
-
onClick: () => f(Math.min(u, l + 1)),
|
|
72
|
-
disabled: l >= u,
|
|
73
|
-
"aria-label": "Next page",
|
|
74
|
-
children: /* @__PURE__ */ a(n, {
|
|
75
|
-
name: "arrow-right",
|
|
76
|
-
size: 18
|
|
77
|
-
})
|
|
78
|
-
})
|
|
79
|
-
]
|
|
80
|
-
})
|
|
81
|
-
]
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
//#endregion
|
|
85
|
-
export { l as default };
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppIcon.js";import{pageWindow as r}from"../lib/pageWindow.js";import i from"./AppSelectMini.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`numbered`,`prev-next`],c=[5,10,25,50];function l({page:l,totalPages:u,pageSize:d,onPageChange:f,onPageSizeChange:p,pageSizes:m=c,mode:h=`numbered`,showPageSize:g=!0,className:_=``,...v}){t(`AppTablePagination`,v),e(`AppTablePagination`,`mode`,h,s);let y=h===`numbered`,b=y?r(l,u):null;return o(`div`,{className:`table-pagination${_?` ${_}`:``}`,...v,children:[g&&a(`span`,{className:`tpg-rows`,children:a(i,{value:d,onChange:e=>p(Number(e)),ariaLabel:`Rows per page`,options:m.map(e=>({value:e,label:`${e} per page`}))})}),!y&&o(`span`,{className:`tpg-range`,children:[`Page `,l,` of `,u]}),o(`div`,{className:`tpg-nav`,children:[a(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>f(Math.max(1,l-1)),disabled:l<=1,"aria-label":`Previous page`,children:a(n,{name:`arrow-left`,size:18})}),y&&b.map(e=>typeof e==`number`?a(`button`,{type:`button`,className:`tpg-page${e===l?` is-active`:``}`,onClick:()=>f(e),"aria-current":e===l?`page`:void 0,"aria-label":`Page ${e}`,children:e},e):a(`span`,{className:`tpg-ellipsis`,"aria-hidden":`true`,children:`…`},e)),a(`button`,{type:`button`,className:`tpg-arrow`,onClick:()=>f(Math.min(u,l+1)),disabled:l>=u,"aria-label":`Next page`,children:a(n,{name:`arrow-right`,size:18})})]})]})}export{l as default};
|
|
@@ -1,41 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
//#region src/components/AppTableToolbar.jsx
|
|
4
|
-
function r({ filters: r, actions: i, selectedCount: a = 0, bulkActions: o, onClearSelection: s, className: c = "", ...l }) {
|
|
5
|
-
e("AppTableToolbar", l);
|
|
6
|
-
let u = a > 0;
|
|
7
|
-
return /* @__PURE__ */ n("div", {
|
|
8
|
-
className: `wui-table-toolbar${c ? ` ${c}` : ""}`,
|
|
9
|
-
...l,
|
|
10
|
-
children: [/* @__PURE__ */ n("div", {
|
|
11
|
-
className: "wui-table-toolbar-main",
|
|
12
|
-
hidden: u,
|
|
13
|
-
children: [/* @__PURE__ */ t("div", {
|
|
14
|
-
className: "wui-table-toolbar-filters",
|
|
15
|
-
children: r
|
|
16
|
-
}), /* @__PURE__ */ t("div", {
|
|
17
|
-
className: "wui-table-toolbar-actions",
|
|
18
|
-
children: i
|
|
19
|
-
})]
|
|
20
|
-
}), /* @__PURE__ */ n("div", {
|
|
21
|
-
className: "wui-table-toolbar-bulk",
|
|
22
|
-
hidden: !u,
|
|
23
|
-
children: [
|
|
24
|
-
/* @__PURE__ */ n("span", {
|
|
25
|
-
className: "wui-table-toolbar-count",
|
|
26
|
-
"aria-live": "polite",
|
|
27
|
-
children: [a, " selected"]
|
|
28
|
-
}),
|
|
29
|
-
o,
|
|
30
|
-
s && /* @__PURE__ */ t("button", {
|
|
31
|
-
type: "button",
|
|
32
|
-
className: "btn btn-ghost btn-sm wui-table-toolbar-clear",
|
|
33
|
-
onClick: s,
|
|
34
|
-
children: "Clear"
|
|
35
|
-
})
|
|
36
|
-
]
|
|
37
|
-
})]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
export { r as default };
|
|
1
|
+
import e from"./warnUnknownProps.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({filters:r,actions:i,selectedCount:a=0,bulkActions:o,onClearSelection:s,className:c=``,...l}){e(`AppTableToolbar`,l);let u=a>0;return n(`div`,{className:`wui-table-toolbar${c?` ${c}`:``}`,...l,children:[n(`div`,{className:`wui-table-toolbar-main`,hidden:u,children:[t(`div`,{className:`wui-table-toolbar-filters`,children:r}),t(`div`,{className:`wui-table-toolbar-actions`,children:i})]}),n(`div`,{className:`wui-table-toolbar-bulk`,hidden:!u,children:[n(`span`,{className:`wui-table-toolbar-count`,"aria-live":`polite`,children:[a,` selected`]}),o,s&&t(`button`,{type:`button`,className:`btn btn-ghost btn-sm wui-table-toolbar-clear`,onClick:s,children:`Clear`})]})]})}export{r as default};
|
|
@@ -1,195 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./warnUnknownProps.js";
|
|
3
|
-
import n from "./AppTooltip.js";
|
|
4
|
-
import r from "./AppIcon.js";
|
|
5
|
-
import i from "./renderIconProp.js";
|
|
6
|
-
import { useCallback as a, useEffect as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
|
|
7
|
-
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
-
//#region src/components/AppTabs.jsx
|
|
9
|
-
var p = ["underline", "pills"], m = ["horizontal", "vertical"], h = [
|
|
10
|
-
"sm",
|
|
11
|
-
"md",
|
|
12
|
-
"lg"
|
|
13
|
-
], g = ["automatic", "manual"], _ = [
|
|
14
|
-
"success",
|
|
15
|
-
"warning",
|
|
16
|
-
"danger",
|
|
17
|
-
"info"
|
|
18
|
-
], v = 1, y = 28, b = .7;
|
|
19
|
-
function x({ tabs: x, value: S, onChange: C, linkComponent: w, variant: T = "underline", orientation: E = "horizontal", size: D = "md", fitted: O = !1, activation: k = "automatic", ariaLabel: A, className: j = "", style: M, ...N }) {
|
|
20
|
-
t("AppTabs", N), e("AppTabs", "variant", T, p), e("AppTabs", "orientation", E, m), e("AppTabs", "size", D, h), e("AppTabs", "activation", k, g);
|
|
21
|
-
for (let t of x) e("AppTabs", "tabs[].tone", t.tone, _);
|
|
22
|
-
let P = c(null), F = c(null), I = E === "vertical", [L, R] = l(S);
|
|
23
|
-
o(() => {
|
|
24
|
-
R(S);
|
|
25
|
-
}, [S]);
|
|
26
|
-
let z = x.find((e) => !e.disabled)?.key, B = x.some((e) => e.key === L && !e.disabled) ? L : void 0, V = x.some((e) => e.key === S && !e.disabled) ? S : void 0, H = B ?? V ?? z, U = (e) => {
|
|
27
|
-
P.current?.querySelector(`[data-key="${CSS.escape(String(e))}"]`)?.focus();
|
|
28
|
-
}, W = a(() => {
|
|
29
|
-
let e = P.current, t = F.current;
|
|
30
|
-
if (!e || !t || I) return;
|
|
31
|
-
let n = e.scrollWidth - e.clientWidth;
|
|
32
|
-
t.classList.toggle("is-overflow-start", e.scrollLeft > v), t.classList.toggle("is-overflow-end", n > v && e.scrollLeft < n - v);
|
|
33
|
-
}, [I]), G = a(() => {
|
|
34
|
-
let e = P.current;
|
|
35
|
-
if (!e) return;
|
|
36
|
-
let t = e.querySelector(".app-tab.active");
|
|
37
|
-
t ? (I ? (e.style.setProperty("--wui-tab-y", `${t.offsetTop}px`), e.style.setProperty("--wui-tab-h", `${t.offsetHeight}px`)) : (e.style.setProperty("--wui-tab-x", `${t.offsetLeft}px`), e.style.setProperty("--wui-tab-w", `${t.offsetWidth}px`)), e.toggleAttribute("data-active-danger", !!x.find((e) => e.key === S)?.danger)) : e.style.setProperty(I ? "--wui-tab-h" : "--wui-tab-w", "0px"), e.setAttribute("data-wui-tabs", ""), W();
|
|
38
|
-
}, [
|
|
39
|
-
I,
|
|
40
|
-
x,
|
|
41
|
-
S,
|
|
42
|
-
W
|
|
43
|
-
]), K = a(() => {
|
|
44
|
-
let e = P.current;
|
|
45
|
-
if (!e || I) return;
|
|
46
|
-
let t = e.querySelector(".app-tab.active");
|
|
47
|
-
if (!t) return;
|
|
48
|
-
let n = y, r = t.offsetLeft, i = r + t.offsetWidth;
|
|
49
|
-
r - n < e.scrollLeft ? e.scrollLeft = Math.max(0, r - n) : i + n > e.scrollLeft + e.clientWidth && (e.scrollLeft = i + n - e.clientWidth);
|
|
50
|
-
}, [I]);
|
|
51
|
-
s(() => {
|
|
52
|
-
G();
|
|
53
|
-
}, [G]), s(() => {
|
|
54
|
-
K();
|
|
55
|
-
}, [S, K]);
|
|
56
|
-
let q = c(G);
|
|
57
|
-
o(() => {
|
|
58
|
-
q.current = G;
|
|
59
|
-
}, [G]), o(() => {
|
|
60
|
-
if (typeof ResizeObserver > "u") return;
|
|
61
|
-
let e = new ResizeObserver(() => q.current());
|
|
62
|
-
return P.current && e.observe(P.current), F.current && e.observe(F.current), () => e.disconnect();
|
|
63
|
-
}, [I]);
|
|
64
|
-
function J(e) {
|
|
65
|
-
let t = e.target?.dataset?.key;
|
|
66
|
-
if (t == null) return;
|
|
67
|
-
let n = x.findIndex((e) => e.key === t);
|
|
68
|
-
if (n < 0) return;
|
|
69
|
-
let r = x.length, i = (e, t) => {
|
|
70
|
-
for (let n = 1; n <= r; n++) {
|
|
71
|
-
let i = x[((e + t * n) % r + r) % r];
|
|
72
|
-
if (!i.disabled) return i;
|
|
73
|
-
}
|
|
74
|
-
return null;
|
|
75
|
-
}, a = I ? "ArrowDown" : "ArrowRight", o = I ? "ArrowUp" : "ArrowLeft", s = null;
|
|
76
|
-
if (e.key === a ? s = i(n, 1) : e.key === o ? s = i(n, -1) : e.key === "Home" ? s = x.find((e) => !e.disabled) ?? null : e.key === "End" && (s = [...x].reverse().find((e) => !e.disabled) ?? null), !s) return;
|
|
77
|
-
e.preventDefault(), R(s.key), U(s.key);
|
|
78
|
-
let c = s.href != null || s.to != null;
|
|
79
|
-
k === "automatic" && !c && C?.(s.key);
|
|
80
|
-
}
|
|
81
|
-
let Y = (e) => {
|
|
82
|
-
let t = P.current;
|
|
83
|
-
t && t.scrollBy({ left: e * t.clientWidth * b });
|
|
84
|
-
}, X = [
|
|
85
|
-
"app-tabs",
|
|
86
|
-
T === "pills" ? "app-tabs-pills" : "",
|
|
87
|
-
I ? "app-tabs-vertical" : "",
|
|
88
|
-
D === "sm" ? "app-tabs-sm" : "",
|
|
89
|
-
D === "lg" ? "app-tabs-lg" : "",
|
|
90
|
-
O ? "app-tabs-fitted" : "",
|
|
91
|
-
j
|
|
92
|
-
].filter(Boolean).join(" "), Z = /* @__PURE__ */ f("div", {
|
|
93
|
-
ref: P,
|
|
94
|
-
role: "tablist",
|
|
95
|
-
"aria-orientation": I ? "vertical" : void 0,
|
|
96
|
-
"aria-label": A,
|
|
97
|
-
className: X,
|
|
98
|
-
style: M,
|
|
99
|
-
...N,
|
|
100
|
-
onKeyDown: J,
|
|
101
|
-
onScroll: W,
|
|
102
|
-
children: [x.map((e) => {
|
|
103
|
-
let t = e.key === S, r = e.href != null || e.to != null, a = {
|
|
104
|
-
role: "tab",
|
|
105
|
-
"data-key": e.key,
|
|
106
|
-
"aria-selected": t,
|
|
107
|
-
tabIndex: e.key === H ? 0 : -1,
|
|
108
|
-
className: `app-tab${t ? " active" : ""}${e.danger ? " danger" : ""}${r && e.disabled ? " disabled" : ""}`
|
|
109
|
-
}, o = /* @__PURE__ */ f(u, { children: [
|
|
110
|
-
e.image ? /* @__PURE__ */ d("img", {
|
|
111
|
-
className: "app-tab-img",
|
|
112
|
-
src: e.image,
|
|
113
|
-
alt: e.imageAlt ?? ""
|
|
114
|
-
}) : i(e.icon, {
|
|
115
|
-
size: 16,
|
|
116
|
-
className: "app-tab-icon"
|
|
117
|
-
}),
|
|
118
|
-
e.label,
|
|
119
|
-
e.count != null && /* @__PURE__ */ d("span", {
|
|
120
|
-
className: `app-tab-count${e.tone ? ` ${e.tone}` : ""}`,
|
|
121
|
-
children: e.count
|
|
122
|
-
})
|
|
123
|
-
] }), s;
|
|
124
|
-
if (r) {
|
|
125
|
-
let t = e.to != null && w ? w : "a", n = e.rel ?? (e.target === "_blank" ? "noopener noreferrer" : void 0), r = e.disabled ? { "aria-disabled": !0 } : t === "a" ? {
|
|
126
|
-
href: e.href ?? e.to,
|
|
127
|
-
target: e.target,
|
|
128
|
-
rel: n
|
|
129
|
-
} : {
|
|
130
|
-
to: e.to,
|
|
131
|
-
target: e.target,
|
|
132
|
-
rel: n
|
|
133
|
-
}, i = (t) => {
|
|
134
|
-
if (e.disabled) {
|
|
135
|
-
t.preventDefault();
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || (R(e.key), C?.(e.key));
|
|
139
|
-
};
|
|
140
|
-
s = /* @__PURE__ */ d(t, {
|
|
141
|
-
...a,
|
|
142
|
-
...r,
|
|
143
|
-
onClick: i,
|
|
144
|
-
children: o
|
|
145
|
-
}, e.key);
|
|
146
|
-
} else s = /* @__PURE__ */ d("button", {
|
|
147
|
-
type: "button",
|
|
148
|
-
...a,
|
|
149
|
-
disabled: e.disabled,
|
|
150
|
-
onClick: () => {
|
|
151
|
-
e.disabled || (R(e.key), C?.(e.key));
|
|
152
|
-
},
|
|
153
|
-
children: o
|
|
154
|
-
}, e.key);
|
|
155
|
-
return e.tooltip ? /* @__PURE__ */ d(n, {
|
|
156
|
-
content: e.tooltip,
|
|
157
|
-
children: s
|
|
158
|
-
}, e.key) : s;
|
|
159
|
-
}), /* @__PURE__ */ d("span", {
|
|
160
|
-
className: "app-tab-indicator",
|
|
161
|
-
"aria-hidden": "true"
|
|
162
|
-
})]
|
|
163
|
-
});
|
|
164
|
-
return I ? Z : /* @__PURE__ */ f("div", {
|
|
165
|
-
ref: F,
|
|
166
|
-
className: "app-tabs-wrap",
|
|
167
|
-
children: [
|
|
168
|
-
/* @__PURE__ */ d("button", {
|
|
169
|
-
type: "button",
|
|
170
|
-
className: "app-tabs-scroll-btn prev",
|
|
171
|
-
"aria-label": "Scroll tabs backward",
|
|
172
|
-
tabIndex: -1,
|
|
173
|
-
onClick: () => Y(-1),
|
|
174
|
-
children: /* @__PURE__ */ d(r, {
|
|
175
|
-
name: "chevron-left",
|
|
176
|
-
size: 16
|
|
177
|
-
})
|
|
178
|
-
}),
|
|
179
|
-
Z,
|
|
180
|
-
/* @__PURE__ */ d("button", {
|
|
181
|
-
type: "button",
|
|
182
|
-
className: "app-tabs-scroll-btn next",
|
|
183
|
-
"aria-label": "Scroll tabs forward",
|
|
184
|
-
tabIndex: -1,
|
|
185
|
-
onClick: () => Y(1),
|
|
186
|
-
children: /* @__PURE__ */ d(r, {
|
|
187
|
-
name: "chevron-right",
|
|
188
|
-
size: 16
|
|
189
|
-
})
|
|
190
|
-
})
|
|
191
|
-
]
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
//#endregion
|
|
195
|
-
export { x as default };
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppTooltip.js";import r from"./AppIcon.js";import i from"./renderIconProp.js";import{useCallback as a,useEffect as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";var p=[`underline`,`pills`],m=[`horizontal`,`vertical`],h=[`sm`,`md`,`lg`],g=[`automatic`,`manual`],_=[`success`,`warning`,`danger`,`info`],v=1,y=28,b=.7;function x({tabs:x,value:S,onChange:C,linkComponent:w,variant:T=`underline`,orientation:E=`horizontal`,size:D=`md`,fitted:O=!1,activation:k=`automatic`,ariaLabel:A,className:j=``,style:M,...N}){t(`AppTabs`,N),e(`AppTabs`,`variant`,T,p),e(`AppTabs`,`orientation`,E,m),e(`AppTabs`,`size`,D,h),e(`AppTabs`,`activation`,k,g);for(let t of x)e(`AppTabs`,`tabs[].tone`,t.tone,_);let P=c(null),F=c(null),I=E===`vertical`,[L,R]=l(S);o(()=>{R(S)},[S]);let z=x.find(e=>!e.disabled)?.key,B=x.some(e=>e.key===L&&!e.disabled)?L:void 0,V=x.some(e=>e.key===S&&!e.disabled)?S:void 0,H=B??V??z,U=e=>{P.current?.querySelector(`[data-key="${CSS.escape(String(e))}"]`)?.focus()},W=a(()=>{let e=P.current,t=F.current;if(!e||!t||I)return;let n=e.scrollWidth-e.clientWidth;t.classList.toggle(`is-overflow-start`,e.scrollLeft>v),t.classList.toggle(`is-overflow-end`,n>v&&e.scrollLeft<n-v)},[I]),G=a(()=>{let e=P.current;if(!e)return;let t=e.querySelector(`.app-tab.active`);t?(I?(e.style.setProperty(`--wui-tab-y`,`${t.offsetTop}px`),e.style.setProperty(`--wui-tab-h`,`${t.offsetHeight}px`)):(e.style.setProperty(`--wui-tab-x`,`${t.offsetLeft}px`),e.style.setProperty(`--wui-tab-w`,`${t.offsetWidth}px`)),e.toggleAttribute(`data-active-danger`,!!x.find(e=>e.key===S)?.danger)):e.style.setProperty(I?`--wui-tab-h`:`--wui-tab-w`,`0px`),e.setAttribute(`data-wui-tabs`,``),W()},[I,x,S,W]),K=a(()=>{let e=P.current;if(!e||I)return;let t=e.querySelector(`.app-tab.active`);if(!t)return;let n=y,r=t.offsetLeft,i=r+t.offsetWidth;r-n<e.scrollLeft?e.scrollLeft=Math.max(0,r-n):i+n>e.scrollLeft+e.clientWidth&&(e.scrollLeft=i+n-e.clientWidth)},[I]);s(()=>{G()},[G]),s(()=>{K()},[S,K]);let q=c(G);o(()=>{q.current=G},[G]),o(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>q.current());return P.current&&e.observe(P.current),F.current&&e.observe(F.current),()=>e.disconnect()},[I]);function J(e){let t=e.target?.dataset?.key;if(t==null)return;let n=x.findIndex(e=>e.key===t);if(n<0)return;let r=x.length,i=(e,t)=>{for(let n=1;n<=r;n++){let i=x[((e+t*n)%r+r)%r];if(!i.disabled)return i}return null},a=I?`ArrowDown`:`ArrowRight`,o=I?`ArrowUp`:`ArrowLeft`,s=null;if(e.key===a?s=i(n,1):e.key===o?s=i(n,-1):e.key===`Home`?s=x.find(e=>!e.disabled)??null:e.key===`End`&&(s=[...x].reverse().find(e=>!e.disabled)??null),!s)return;e.preventDefault(),R(s.key),U(s.key);let c=s.href!=null||s.to!=null;k===`automatic`&&!c&&C?.(s.key)}let Y=e=>{let t=P.current;t&&t.scrollBy({left:e*t.clientWidth*b})},X=[`app-tabs`,T===`pills`?`app-tabs-pills`:``,I?`app-tabs-vertical`:``,D===`sm`?`app-tabs-sm`:``,D===`lg`?`app-tabs-lg`:``,O?`app-tabs-fitted`:``,j].filter(Boolean).join(` `),Z=f(`div`,{ref:P,role:`tablist`,"aria-orientation":I?`vertical`:void 0,"aria-label":A,className:X,style:M,...N,onKeyDown:J,onScroll:W,children:[x.map(e=>{let t=e.key===S,r=e.href!=null||e.to!=null,a={role:`tab`,"data-key":e.key,"aria-selected":t,tabIndex:e.key===H?0:-1,className:`app-tab${t?` active`:``}${e.danger?` danger`:``}${r&&e.disabled?` disabled`:``}`},o=f(u,{children:[e.image?d(`img`,{className:`app-tab-img`,src:e.image,alt:e.imageAlt??``}):i(e.icon,{size:16,className:`app-tab-icon`}),e.label,e.count!=null&&d(`span`,{className:`app-tab-count${e.tone?` ${e.tone}`:``}`,children:e.count})]}),s;if(r){let t=e.to!=null&&w?w:`a`,n=e.rel??(e.target===`_blank`?`noopener noreferrer`:void 0),r=e.disabled?{"aria-disabled":!0}:t===`a`?{href:e.href??e.to,target:e.target,rel:n}:{to:e.to,target:e.target,rel:n},i=t=>{if(e.disabled){t.preventDefault();return}t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(R(e.key),C?.(e.key))};s=d(t,{...a,...r,onClick:i,children:o},e.key)}else s=d(`button`,{type:`button`,...a,disabled:e.disabled,onClick:()=>{e.disabled||(R(e.key),C?.(e.key))},children:o},e.key);return e.tooltip?d(n,{content:e.tooltip,children:s},e.key):s}),d(`span`,{className:`app-tab-indicator`,"aria-hidden":`true`})]});return I?Z:f(`div`,{ref:F,className:`app-tabs-wrap`,children:[d(`button`,{type:`button`,className:`app-tabs-scroll-btn prev`,"aria-label":`Scroll tabs backward`,tabIndex:-1,onClick:()=>Y(-1),children:d(r,{name:`chevron-left`,size:16})}),Z,d(`button`,{type:`button`,className:`app-tabs-scroll-btn next`,"aria-label":`Scroll tabs forward`,tabIndex:-1,onClick:()=>Y(1),children:d(r,{name:`chevron-right`,size:16})})]})}export{x as default};
|
|
@@ -1,63 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./warnUnknownProps.js";
|
|
3
|
-
import n from "./AppInfoTip.js";
|
|
4
|
-
import r from "./AppRequiredMark.js";
|
|
5
|
-
import i, { readValues as a, writeValues as o } from "./useWuiControl.js";
|
|
6
|
-
import { forwardRef as s, useId as c } from "react";
|
|
7
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
-
import "@webority/ui-elements/elements/taginput";
|
|
9
|
-
//#region src/components/AppTagInput.jsx
|
|
10
|
-
var d = ["sm", "lg"], f = s(function({ values: s, onChange: f, placeholder: p = "Add…", name: m, label: h, error: g, hint: _, required: v = !1, size: y, maxTags: b, allowDuplicates: x = !1, disabled: S = !1, id: C, ariaLabel: w, className: T = "", fieldClassName: E = "", help: D, helpLabel: O = "More information", ...k }, A) {
|
|
11
|
-
t("AppTagInput", k), e("AppTagInput", "size", y, d);
|
|
12
|
-
let j = c(), M = C || j, { setRef: N } = i({
|
|
13
|
-
ref: A,
|
|
14
|
-
value: s,
|
|
15
|
-
onChange: f,
|
|
16
|
-
readValue: a,
|
|
17
|
-
writeValue: o
|
|
18
|
-
});
|
|
19
|
-
return /* @__PURE__ */ u("div", {
|
|
20
|
-
className: `field${E ? ` ${E}` : ""}`,
|
|
21
|
-
children: [
|
|
22
|
-
h && /* @__PURE__ */ u("label", {
|
|
23
|
-
className: "label",
|
|
24
|
-
htmlFor: M,
|
|
25
|
-
children: [
|
|
26
|
-
h,
|
|
27
|
-
v && /* @__PURE__ */ l(r, {}),
|
|
28
|
-
D && /* @__PURE__ */ l(n, {
|
|
29
|
-
label: O,
|
|
30
|
-
children: D
|
|
31
|
-
})
|
|
32
|
-
]
|
|
33
|
-
}),
|
|
34
|
-
/* @__PURE__ */ l("wui-taginput", {
|
|
35
|
-
"aria-label": w || (typeof h == "string" ? h : void 0),
|
|
36
|
-
"aria-describedby": g ? `${M}-error` : _ ? `${M}-hint` : void 0,
|
|
37
|
-
"aria-invalid": g ? "true" : void 0,
|
|
38
|
-
id: M,
|
|
39
|
-
ref: N,
|
|
40
|
-
name: m,
|
|
41
|
-
placeholder: p,
|
|
42
|
-
size: y || void 0,
|
|
43
|
-
"max-tags": b === void 0 ? void 0 : String(b),
|
|
44
|
-
"allow-duplicates": x ? "" : void 0,
|
|
45
|
-
disabled: S ? "" : void 0,
|
|
46
|
-
required: v ? "" : void 0,
|
|
47
|
-
className: T || void 0,
|
|
48
|
-
...k
|
|
49
|
-
}),
|
|
50
|
-
g ? /* @__PURE__ */ l("div", {
|
|
51
|
-
className: "field-error",
|
|
52
|
-
id: `${M}-error`,
|
|
53
|
-
children: g
|
|
54
|
-
}) : _ ? /* @__PURE__ */ l("div", {
|
|
55
|
-
className: "field-hint",
|
|
56
|
-
id: `${M}-hint`,
|
|
57
|
-
children: _
|
|
58
|
-
}) : null
|
|
59
|
-
]
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
//#endregion
|
|
63
|
-
export { f as default };
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i,{readValues as a,writeValues as o}from"./useWuiControl.js";import{forwardRef as s,useId as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import"@webority/ui-elements/elements/taginput";var d=[`sm`,`lg`],f=s(function({values:s,onChange:f,placeholder:p=`Add…`,name:m,label:h,error:g,hint:_,required:v=!1,size:y,maxTags:b,allowDuplicates:x=!1,disabled:S=!1,id:C,ariaLabel:w,className:T=``,fieldClassName:E=``,help:D,helpLabel:O=`More information`,...k},A){t(`AppTagInput`,k),e(`AppTagInput`,`size`,y,d);let j=c(),M=C||j,{setRef:N}=i({ref:A,value:s,onChange:f,readValue:a,writeValue:o});return u(`div`,{className:`field${E?` ${E}`:``}`,children:[h&&u(`label`,{className:`label`,htmlFor:M,children:[h,v&&l(r,{}),D&&l(n,{label:O,children:D})]}),l(`wui-taginput`,{"aria-label":w||(typeof h==`string`?h:void 0),"aria-describedby":g?`${M}-error`:_?`${M}-hint`:void 0,"aria-invalid":g?`true`:void 0,id:M,ref:N,name:m,placeholder:p,size:y||void 0,"max-tags":b===void 0?void 0:String(b),"allow-duplicates":x?``:void 0,disabled:S?``:void 0,required:v?``:void 0,className:T||void 0,...k}),g?l(`div`,{className:`field-error`,id:`${M}-error`,children:g}):_?l(`div`,{className:`field-hint`,id:`${M}-hint`,children:_}):null]})});export{f as default};
|
|
@@ -1,81 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./AppInfoTip.js";
|
|
3
|
-
import n from "./AppRequiredMark.js";
|
|
4
|
-
import { forwardRef as r, useCallback as i, useEffect as a, useId as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
|
|
5
|
-
import { Form as u } from "react-bootstrap";
|
|
6
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
|
-
//#region src/components/AppTextarea.jsx
|
|
8
|
-
var p = r(function({ label: r, required: p = !1, error: m, hint: h, help: g, helpLabel: _ = "More information", id: v, name: y, rows: b = 4, autoGrow: x = !1, showCount: S = !1, maxLength: C, className: w = "", fieldClassName: T = "", ...E }, D) {
|
|
9
|
-
e("AppTextarea", E);
|
|
10
|
-
let O = o(), k = v || O, A = [
|
|
11
|
-
"textarea",
|
|
12
|
-
x ? "autosize" : "",
|
|
13
|
-
m ? "error" : "",
|
|
14
|
-
w
|
|
15
|
-
].filter(Boolean).join(" "), j = m && k ? `${k}-error` : void 0, M = h && k ? `${k}-hint` : void 0, N = j || M, P = c(null), F = (e) => {
|
|
16
|
-
P.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
17
|
-
}, I = i(() => {
|
|
18
|
-
let e = P.current;
|
|
19
|
-
e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
20
|
-
}, []);
|
|
21
|
-
s(() => {
|
|
22
|
-
x && I();
|
|
23
|
-
}, [
|
|
24
|
-
x,
|
|
25
|
-
I,
|
|
26
|
-
E.value
|
|
27
|
-
]);
|
|
28
|
-
let [L, R] = l(() => String(E.value ?? E.defaultValue ?? "").length);
|
|
29
|
-
a(() => {
|
|
30
|
-
!S || E.value === void 0 || R(String(E.value ?? "").length);
|
|
31
|
-
}, [E.value, S]);
|
|
32
|
-
let z = (e) => {
|
|
33
|
-
x && I(), S && R(e.target.value.length), E.onInput?.(e);
|
|
34
|
-
};
|
|
35
|
-
return /* @__PURE__ */ f(u.Group, {
|
|
36
|
-
className: `field${T ? ` ${T}` : ""}`,
|
|
37
|
-
children: [
|
|
38
|
-
r && /* @__PURE__ */ f(u.Label, {
|
|
39
|
-
className: "label",
|
|
40
|
-
htmlFor: k,
|
|
41
|
-
children: [
|
|
42
|
-
r,
|
|
43
|
-
p && /* @__PURE__ */ d(n, {}),
|
|
44
|
-
g && /* @__PURE__ */ d(t, {
|
|
45
|
-
label: _,
|
|
46
|
-
children: g
|
|
47
|
-
})
|
|
48
|
-
]
|
|
49
|
-
}),
|
|
50
|
-
/* @__PURE__ */ d(u.Control, {
|
|
51
|
-
as: "textarea",
|
|
52
|
-
id: k,
|
|
53
|
-
name: y,
|
|
54
|
-
rows: b,
|
|
55
|
-
className: A,
|
|
56
|
-
"aria-invalid": m ? "true" : "false",
|
|
57
|
-
"aria-describedby": N,
|
|
58
|
-
required: p,
|
|
59
|
-
maxLength: C,
|
|
60
|
-
...E,
|
|
61
|
-
ref: F,
|
|
62
|
-
onInput: z
|
|
63
|
-
}),
|
|
64
|
-
m ? /* @__PURE__ */ d("div", {
|
|
65
|
-
className: "field-error",
|
|
66
|
-
id: j,
|
|
67
|
-
children: m
|
|
68
|
-
}) : h ? /* @__PURE__ */ d("div", {
|
|
69
|
-
className: "field-hint",
|
|
70
|
-
id: M,
|
|
71
|
-
children: h
|
|
72
|
-
}) : null,
|
|
73
|
-
S && /* @__PURE__ */ f("div", {
|
|
74
|
-
className: `field-count${C && L >= C ? " at-limit" : ""}`,
|
|
75
|
-
children: [L, C ? ` / ${C}` : ""]
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
//#endregion
|
|
81
|
-
export { p as default };
|
|
1
|
+
import e from"./warnUnknownProps.js";import t from"./AppInfoTip.js";import n from"./AppRequiredMark.js";import{forwardRef as r,useCallback as i,useEffect as a,useId as o,useLayoutEffect as s,useRef as c,useState as l}from"react";import{Form as u}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var p=r(function({label:r,required:p=!1,error:m,hint:h,help:g,helpLabel:_=`More information`,id:v,name:y,rows:b=4,autoGrow:x=!1,showCount:S=!1,maxLength:C,className:w=``,fieldClassName:T=``,...E},D){e(`AppTextarea`,E);let O=o(),k=v||O,A=[`textarea`,x?`autosize`:``,m?`error`:``,w].filter(Boolean).join(` `),j=m&&k?`${k}-error`:void 0,M=h&&k?`${k}-hint`:void 0,N=j||M,P=c(null),F=e=>{P.current=e,typeof D==`function`?D(e):D&&(D.current=e)},I=i(()=>{let e=P.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[]);s(()=>{x&&I()},[x,I,E.value]);let[L,R]=l(()=>String(E.value??E.defaultValue??``).length);a(()=>{!S||E.value===void 0||R(String(E.value??``).length)},[E.value,S]);let z=e=>{x&&I(),S&&R(e.target.value.length),E.onInput?.(e)};return f(u.Group,{className:`field${T?` ${T}`:``}`,children:[r&&f(u.Label,{className:`label`,htmlFor:k,children:[r,p&&d(n,{}),g&&d(t,{label:_,children:g})]}),d(u.Control,{as:`textarea`,id:k,name:y,rows:b,className:A,"aria-invalid":m?`true`:`false`,"aria-describedby":N,required:p,maxLength:C,...E,ref:F,onInput:z}),m?d(`div`,{className:`field-error`,id:j,children:m}):h?d(`div`,{className:`field-hint`,id:M,children:h}):null,S&&f(`div`,{className:`field-count${C&&L>=C?` at-limit`:``}`,children:[L,C?` / ${C}`:``]})]})});export{p as default};
|
|
@@ -1,102 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./warnUnknownProps.js";
|
|
3
|
-
import n from "./AppActionIcon.js";
|
|
4
|
-
import r from "./AppSegmented.js";
|
|
5
|
-
import { DEFAULT_THEME_EFFECT as i, DEFAULT_THEME_STORAGE_KEY as a, THEME_CHANGE_EVENT as o, THEME_EFFECTS as s, THEME_MODES as c, applyTheme as l, nextTheme as u, readStoredTheme as d, resolveTheme as f, storeTheme as p, transitionTheme as m, watchSystemTheme as h } from "@webority/ui-elements/helpers";
|
|
6
|
-
import { useCallback as g, useEffect as _, useId as v, useState as y } from "react";
|
|
7
|
-
import { jsx as b } from "react/jsx-runtime";
|
|
8
|
-
import { flushSync as x } from "react-dom";
|
|
9
|
-
//#region src/components/AppThemeToggle.jsx
|
|
10
|
-
var S = {
|
|
11
|
-
light: "sun",
|
|
12
|
-
dark: "moon",
|
|
13
|
-
auto: "refresh-cw"
|
|
14
|
-
}, C = ["icon", "segmented"], w = {
|
|
15
|
-
sm: 16,
|
|
16
|
-
md: 20,
|
|
17
|
-
lg: 24,
|
|
18
|
-
xl: 28
|
|
19
|
-
};
|
|
20
|
-
function T({ variant: T = "icon", effect: E = i, includeAuto: D = !0, storageKey: O = a, duration: k, label: A = "Theme", lightLabel: j = "Light", darkLabel: M = "Dark", autoLabel: N = "System", name: P, size: F = "md", tooltipPlacement: I = "auto", onChange: L, className: R = "", ...z }) {
|
|
21
|
-
t("AppThemeToggle", z), e("AppThemeToggle", "variant", T, C), e("AppThemeToggle", "effect", E, s), e("AppThemeToggle", "size", F, Object.keys(w));
|
|
22
|
-
let B = g((e) => e === "auto" && !D ? f(e) : e, [D]), [V, H] = y(() => B(typeof window > "u" ? "auto" : d(O))), U = v(), W = P || U;
|
|
23
|
-
_(() => {
|
|
24
|
-
let e = document.documentElement.getAttribute("data-theme");
|
|
25
|
-
c.includes(e) ? H(B(e)) : l(d(O));
|
|
26
|
-
}, []), _(() => {
|
|
27
|
-
let e = (e) => {
|
|
28
|
-
let t = e.detail?.preference;
|
|
29
|
-
c.includes(t) && H(B(t));
|
|
30
|
-
};
|
|
31
|
-
return document.addEventListener(o, e), () => document.removeEventListener(o, e);
|
|
32
|
-
}, [B]), _(() => h(() => {
|
|
33
|
-
document.documentElement.getAttribute("data-theme") === "auto" && l("auto");
|
|
34
|
-
}), []);
|
|
35
|
-
let G = g((e, t, n) => {
|
|
36
|
-
let r = t?.getBoundingClientRect?.() ?? {
|
|
37
|
-
left: 0,
|
|
38
|
-
top: 0,
|
|
39
|
-
width: 0,
|
|
40
|
-
height: 0
|
|
41
|
-
}, i = {
|
|
42
|
-
x: r.left + r.width / 2,
|
|
43
|
-
y: r.top + r.height / 2
|
|
44
|
-
};
|
|
45
|
-
m(() => {
|
|
46
|
-
l(e), p(e, O), x(() => H(e)), L?.(e);
|
|
47
|
-
}, {
|
|
48
|
-
effect: E,
|
|
49
|
-
to: f(e),
|
|
50
|
-
origin: i,
|
|
51
|
-
duration: k,
|
|
52
|
-
live: n
|
|
53
|
-
});
|
|
54
|
-
}, [
|
|
55
|
-
O,
|
|
56
|
-
E,
|
|
57
|
-
k,
|
|
58
|
-
L
|
|
59
|
-
]);
|
|
60
|
-
if (T === "segmented") {
|
|
61
|
-
let e = [{
|
|
62
|
-
value: "light",
|
|
63
|
-
label: j,
|
|
64
|
-
icon: S.light
|
|
65
|
-
}, {
|
|
66
|
-
value: "dark",
|
|
67
|
-
label: M,
|
|
68
|
-
icon: S.dark
|
|
69
|
-
}];
|
|
70
|
-
return D && e.push({
|
|
71
|
-
value: "auto",
|
|
72
|
-
label: N,
|
|
73
|
-
icon: S.auto
|
|
74
|
-
}), /* @__PURE__ */ b(r, {
|
|
75
|
-
options: e,
|
|
76
|
-
value: V,
|
|
77
|
-
name: W,
|
|
78
|
-
label: A,
|
|
79
|
-
size: F,
|
|
80
|
-
className: [
|
|
81
|
-
"wui-theme-toggle",
|
|
82
|
-
"wui-theme-toggle-segmented",
|
|
83
|
-
R
|
|
84
|
-
].filter(Boolean).join(" "),
|
|
85
|
-
onChange: (e) => {
|
|
86
|
-
if (e === V) return;
|
|
87
|
-
let t = document.querySelector(`.segmented-input[name="${CSS.escape(W)}"][value="${e}"]`);
|
|
88
|
-
G(e, t?.closest(".segmented-option") ?? t, t?.closest(".segmented"));
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
return /* @__PURE__ */ b(n, {
|
|
93
|
-
icon: S[V],
|
|
94
|
-
label: `${A}: ${V}`,
|
|
95
|
-
size: w[F] ?? w.md,
|
|
96
|
-
tooltipPlacement: I,
|
|
97
|
-
onClick: (e) => G(u(V, { includeAuto: D }), e.currentTarget, e.currentTarget),
|
|
98
|
-
className: ["wui-theme-toggle", R].filter(Boolean).join(" ")
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
export { T as default };
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppActionIcon.js";import r from"./AppSegmented.js";import{DEFAULT_THEME_EFFECT as i,DEFAULT_THEME_STORAGE_KEY as a,THEME_CHANGE_EVENT as o,THEME_EFFECTS as s,THEME_MODES as c,applyTheme as l,nextTheme as u,readStoredTheme as d,resolveTheme as f,storeTheme as p,transitionTheme as m,watchSystemTheme as h}from"@webority/ui-elements/helpers";import{useCallback as g,useEffect as _,useId as v,useState as y}from"react";import{jsx as b}from"react/jsx-runtime";import{flushSync as x}from"react-dom";var S={light:`sun`,dark:`moon`,auto:`refresh-cw`},C=[`icon`,`segmented`],w={sm:16,md:20,lg:24,xl:28};function T({variant:T=`icon`,effect:E=i,includeAuto:D=!0,storageKey:O=a,duration:k,label:A=`Theme`,lightLabel:j=`Light`,darkLabel:M=`Dark`,autoLabel:N=`System`,name:P,size:F=`md`,tooltipPlacement:I=`auto`,onChange:L,className:R=``,...z}){t(`AppThemeToggle`,z),e(`AppThemeToggle`,`variant`,T,C),e(`AppThemeToggle`,`effect`,E,s),e(`AppThemeToggle`,`size`,F,Object.keys(w));let B=g(e=>e===`auto`&&!D?f(e):e,[D]),[V,H]=y(()=>B(typeof window>`u`?`auto`:d(O))),U=v(),W=P||U;_(()=>{let e=document.documentElement.getAttribute(`data-theme`);c.includes(e)?H(B(e)):l(d(O))},[]),_(()=>{let e=e=>{let t=e.detail?.preference;c.includes(t)&&H(B(t))};return document.addEventListener(o,e),()=>document.removeEventListener(o,e)},[B]),_(()=>h(()=>{document.documentElement.getAttribute(`data-theme`)===`auto`&&l(`auto`)}),[]);let G=g((e,t,n)=>{let r=t?.getBoundingClientRect?.()??{left:0,top:0,width:0,height:0},i={x:r.left+r.width/2,y:r.top+r.height/2};m(()=>{l(e),p(e,O),x(()=>H(e)),L?.(e)},{effect:E,to:f(e),origin:i,duration:k,live:n})},[O,E,k,L]);if(T===`segmented`){let e=[{value:`light`,label:j,icon:S.light},{value:`dark`,label:M,icon:S.dark}];return D&&e.push({value:`auto`,label:N,icon:S.auto}),b(r,{options:e,value:V,name:W,label:A,size:F,className:[`wui-theme-toggle`,`wui-theme-toggle-segmented`,R].filter(Boolean).join(` `),onChange:e=>{if(e===V)return;let t=document.querySelector(`.segmented-input[name="${CSS.escape(W)}"][value="${e}"]`);G(e,t?.closest(`.segmented-option`)??t,t?.closest(`.segmented`))}})}return b(n,{icon:S[V],label:`${A}: ${V}`,size:w[F]??w.md,tooltipPlacement:I,onClick:e=>G(u(V,{includeAuto:D}),e.currentTarget,e.currentTarget),className:[`wui-theme-toggle`,R].filter(Boolean).join(` `)})}export{T as default};
|
|
@@ -1,68 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
import t from "./warnUnknownProps.js";
|
|
3
|
-
import n from "./AppInfoTip.js";
|
|
4
|
-
import r from "./AppRequiredMark.js";
|
|
5
|
-
import i from "./useWuiControl.js";
|
|
6
|
-
import { forwardRef as a, useId as o } from "react";
|
|
7
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
import "@webority/ui-elements/elements/timepicker";
|
|
9
|
-
//#region src/components/AppTimePicker.jsx
|
|
10
|
-
var l = [
|
|
11
|
-
"sm",
|
|
12
|
-
"md",
|
|
13
|
-
"lg"
|
|
14
|
-
], u = ["12", "24"], d = a(function({ value: a, onChange: d, label: f, required: p = !1, hint: m, error: h, help: g, helpLabel: _ = "More information", name: v, min: y, max: b, step: x, format: S = "24", placeholder: C = "Select time", disabled: w, size: T, id: E, ariaLabel: D, className: O = "", fieldClassName: k = "", ...A }, j) {
|
|
15
|
-
t("AppTimePicker", A), e("AppTimePicker", "size", T, l), e("AppTimePicker", "format", S, u);
|
|
16
|
-
let M = o(), N = E || v || M, { setRef: P } = i({
|
|
17
|
-
ref: j,
|
|
18
|
-
value: a ?? "",
|
|
19
|
-
onChange: d
|
|
20
|
-
}), F = !f && !h && !m, I = h ? `${N}-error` : void 0, L = m ? `${N}-hint` : void 0, R = /* @__PURE__ */ s("wui-timepicker", {
|
|
21
|
-
ref: P,
|
|
22
|
-
id: N,
|
|
23
|
-
name: v,
|
|
24
|
-
min: y,
|
|
25
|
-
max: b,
|
|
26
|
-
step: x == null ? void 0 : String(x),
|
|
27
|
-
format: S,
|
|
28
|
-
placeholder: C,
|
|
29
|
-
size: T || void 0,
|
|
30
|
-
"aria-label": D || (typeof f == "string" ? f : void 0),
|
|
31
|
-
"aria-describedby": I || L,
|
|
32
|
-
"aria-invalid": h ? "true" : void 0,
|
|
33
|
-
disabled: w ? "" : void 0,
|
|
34
|
-
required: p ? "" : void 0,
|
|
35
|
-
className: O || void 0,
|
|
36
|
-
...A
|
|
37
|
-
});
|
|
38
|
-
return F ? R : /* @__PURE__ */ c("div", {
|
|
39
|
-
className: `field${k ? ` ${k}` : ""}`,
|
|
40
|
-
children: [
|
|
41
|
-
f && /* @__PURE__ */ c("label", {
|
|
42
|
-
className: "label",
|
|
43
|
-
htmlFor: N,
|
|
44
|
-
children: [
|
|
45
|
-
f,
|
|
46
|
-
p && /* @__PURE__ */ s(r, {}),
|
|
47
|
-
g && /* @__PURE__ */ s(n, {
|
|
48
|
-
label: _,
|
|
49
|
-
children: g
|
|
50
|
-
})
|
|
51
|
-
]
|
|
52
|
-
}),
|
|
53
|
-
R,
|
|
54
|
-
h && /* @__PURE__ */ s("div", {
|
|
55
|
-
className: "field-error",
|
|
56
|
-
id: I,
|
|
57
|
-
children: h
|
|
58
|
-
}),
|
|
59
|
-
!h && m && /* @__PURE__ */ s("div", {
|
|
60
|
-
className: "field-hint",
|
|
61
|
-
id: L,
|
|
62
|
-
children: m
|
|
63
|
-
})
|
|
64
|
-
]
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
//#endregion
|
|
68
|
-
export { d as default };
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./AppInfoTip.js";import r from"./AppRequiredMark.js";import i from"./useWuiControl.js";import{forwardRef as a,useId as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import"@webority/ui-elements/elements/timepicker";var l=[`sm`,`md`,`lg`],u=[`12`,`24`],d=a(function({value:a,onChange:d,label:f,required:p=!1,hint:m,error:h,help:g,helpLabel:_=`More information`,name:v,min:y,max:b,step:x,format:S=`24`,placeholder:C=`Select time`,disabled:w,size:T,id:E,ariaLabel:D,className:O=``,fieldClassName:k=``,...A},j){t(`AppTimePicker`,A),e(`AppTimePicker`,`size`,T,l),e(`AppTimePicker`,`format`,S,u);let M=o(),N=E||v||M,{setRef:P}=i({ref:j,value:a??``,onChange:d}),F=!f&&!h&&!m,I=h?`${N}-error`:void 0,L=m?`${N}-hint`:void 0,R=s(`wui-timepicker`,{ref:P,id:N,name:v,min:y,max:b,step:x==null?void 0:String(x),format:S,placeholder:C,size:T||void 0,"aria-label":D||(typeof f==`string`?f:void 0),"aria-describedby":I||L,"aria-invalid":h?`true`:void 0,disabled:w?``:void 0,required:p?``:void 0,className:O||void 0,...A});return F?R:c(`div`,{className:`field${k?` ${k}`:``}`,children:[f&&c(`label`,{className:`label`,htmlFor:N,children:[f,p&&s(r,{}),g&&s(n,{label:_,children:g})]}),R,h&&s(`div`,{className:`field-error`,id:I,children:h}),!h&&m&&s(`div`,{className:`field-hint`,id:L,children:m})]})});export{d as default};
|