plass-ui 1.3.0 → 1.5.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/CHANGELOG.md +962 -0
- package/README.md +19 -17
- package/dist/components/accordion/PlAccordion.d.ts +1 -1
- package/dist/components/alert/PlAlert.js +1 -1
- package/dist/components/anchor/PlAnchor.d.ts +85 -0
- package/dist/components/anchor/PlAnchor.js +1 -0
- package/dist/components/anchor/index.d.ts +2 -0
- package/dist/components/anchor/index.js +1 -0
- package/dist/components/animate-appear/PlAnimateAppear.d.ts +10 -0
- package/dist/components/animate-appear/PlAnimateAppear.js +1 -1
- package/dist/components/animate-blink/PlAnimateBlink.d.ts +2 -2
- package/dist/components/animate-blink/PlAnimateBlink.js +1 -1
- package/dist/components/animate-counter/PlAnimateCounter.d.ts +83 -0
- package/dist/components/animate-counter/PlAnimateCounter.js +1 -0
- package/dist/components/animate-counter/index.d.ts +2 -0
- package/dist/components/animate-counter/index.js +1 -0
- package/dist/components/animate-fade/PlAnimateFade.d.ts +2 -2
- package/dist/components/animate-fade/PlAnimateFade.js +1 -1
- package/dist/components/animate-float/PlAnimateFloat.d.ts +51 -0
- package/dist/components/animate-float/PlAnimateFloat.js +1 -0
- package/dist/components/animate-float/index.d.ts +2 -0
- package/dist/components/animate-float/index.js +1 -0
- package/dist/components/animate-grow/PlAnimateGrow.d.ts +2 -2
- package/dist/components/animate-grow/PlAnimateGrow.js +1 -1
- package/dist/components/animate-headline/PlAnimateHeadline.js +1 -1
- package/dist/components/animate-lighting/PlAnimateLighting.js +1 -1
- package/dist/components/animate-marquee/PlAnimateMarquee.d.ts +13 -4
- package/dist/components/animate-marquee/PlAnimateMarquee.js +1 -1
- package/dist/components/animate-reveal/PlAnimateReveal.d.ts +51 -0
- package/dist/components/animate-reveal/PlAnimateReveal.js +1 -0
- package/dist/components/animate-reveal/index.d.ts +2 -0
- package/dist/components/animate-reveal/index.js +1 -0
- package/dist/components/animate-rotate/PlAnimateRotate.d.ts +2 -2
- package/dist/components/animate-rotate/PlAnimateRotate.js +1 -1
- package/dist/components/animate-scramble/PlAnimateScramble.d.ts +75 -0
- package/dist/components/animate-scramble/PlAnimateScramble.js +1 -0
- package/dist/components/animate-scramble/index.d.ts +2 -0
- package/dist/components/animate-scramble/index.js +1 -0
- package/dist/components/animate-shake/PlAnimateShake.d.ts +57 -0
- package/dist/components/animate-shake/PlAnimateShake.js +1 -0
- package/dist/components/animate-shake/index.d.ts +2 -0
- package/dist/components/animate-shake/index.js +1 -0
- package/dist/components/animate-slide/PlAnimateSlide.d.ts +2 -2
- package/dist/components/animate-slide/PlAnimateSlide.js +1 -1
- package/dist/components/animate-split/PlAnimateSplit.d.ts +57 -0
- package/dist/components/animate-split/PlAnimateSplit.js +1 -0
- package/dist/components/animate-split/index.d.ts +2 -0
- package/dist/components/animate-split/index.js +1 -0
- package/dist/components/animate-typing/PlAnimateTyping.d.ts +3 -2
- package/dist/components/animate-typing/PlAnimateTyping.js +1 -1
- package/dist/components/animate-zoom/PlAnimateZoom.d.ts +2 -2
- package/dist/components/animate-zoom/PlAnimateZoom.js +1 -1
- package/dist/components/app-logo/PlAppLogo.d.ts +78 -0
- package/dist/components/app-logo/PlAppLogo.js +1 -0
- package/dist/components/app-logo/index.d.ts +2 -0
- package/dist/components/app-logo/index.js +1 -0
- package/dist/components/area-chart/PlAreaChart.d.ts +54 -0
- package/dist/components/area-chart/PlAreaChart.js +1 -0
- package/dist/components/area-chart/index.d.ts +2 -0
- package/dist/components/area-chart/index.js +1 -0
- package/dist/components/aspect-ratio/PlAspectRatio.d.ts +2 -1
- package/dist/components/aspect-ratio/PlAspectRatio.js +1 -1
- package/dist/components/avatar/PlAvatar.js +1 -1
- package/dist/components/back-top/PlBackTop.d.ts +2 -1
- package/dist/components/back-top/PlBackTop.js +1 -1
- package/dist/components/badge/PlBadge.js +1 -1
- package/dist/components/bar-chart/PlBarChart.d.ts +63 -0
- package/dist/components/bar-chart/PlBarChart.js +1 -0
- package/dist/components/bar-chart/index.d.ts +2 -0
- package/dist/components/bar-chart/index.js +1 -0
- package/dist/components/bottom-navigation/PlBottomNavigation.d.ts +3 -0
- package/dist/components/breadcrumb/PlBreadcrumb.js +1 -1
- package/dist/components/button/PlButton.d.ts +8 -0
- package/dist/components/button/PlButton.js +1 -1
- package/dist/components/button-group/PlButtonGroup.js +1 -1
- package/dist/components/calendar/PlCalendar.js +1 -1
- package/dist/components/card/PlCard.js +1 -1
- package/dist/components/carousel/PlCarousel.d.ts +1 -1
- package/dist/components/carousel/PlCarousel.js +1 -1
- package/dist/components/chat-bubble/PlChatBubble.d.ts +4 -1
- package/dist/components/chat-bubble/PlChatBubble.js +1 -1
- package/dist/components/checkbox/PlCheckbox.js +1 -1
- package/dist/components/chip/PlChip.d.ts +6 -2
- package/dist/components/chip/PlChip.js +1 -1
- package/dist/components/code-block/PlCodeBlock.d.ts +192 -0
- package/dist/components/code-block/PlCodeBlock.js +1 -0
- package/dist/components/code-block/index.d.ts +2 -0
- package/dist/components/code-block/index.js +1 -0
- package/dist/components/color-picker/PlColorPicker.js +1 -1
- package/dist/components/combobox/PlCombobox.d.ts +6 -5
- package/dist/components/combobox/PlCombobox.js +1 -1
- package/dist/components/command-palette/PlCommandPalette.d.ts +6 -2
- package/dist/components/command-palette/PlCommandPalette.js +1 -1
- package/dist/components/confirm/PlConfirmProvider.js +1 -1
- package/dist/components/container/PlContainer.d.ts +22 -6
- package/dist/components/container/PlContainer.js +1 -1
- package/dist/components/data-list/PlDataList.d.ts +74 -0
- package/dist/components/data-list/PlDataList.js +1 -0
- package/dist/components/data-list/index.d.ts +2 -0
- package/dist/components/data-list/index.js +1 -0
- package/dist/components/data-table/PlDataTable.d.ts +216 -0
- package/dist/components/data-table/PlDataTable.js +1 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/index.js +1 -0
- package/dist/components/date-picker/PlDatePicker.js +1 -1
- package/dist/components/date-range-picker/PlDateRangePicker.js +1 -1
- package/dist/components/date-time-picker/PlDateTimePicker.js +1 -1
- package/dist/components/drawer/PlDrawer.d.ts +1 -1
- package/dist/components/drawer/PlDrawer.js +1 -1
- package/dist/components/file-picker/PlFilePicker.d.ts +4 -1
- package/dist/components/file-picker/PlFilePicker.js +1 -1
- package/dist/components/flex/PlFlex.d.ts +83 -0
- package/dist/components/flex/PlFlex.js +1 -0
- package/dist/components/flex/index.d.ts +2 -0
- package/dist/components/flex/index.js +1 -0
- package/dist/components/floating-action-button/PlFloatingActionButton.d.ts +81 -0
- package/dist/components/floating-action-button/PlFloatingActionButton.js +1 -0
- package/dist/components/floating-action-button/index.d.ts +2 -0
- package/dist/components/floating-action-button/index.js +1 -0
- package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.d.ts +3 -0
- package/dist/components/floating-bottom-navigation/PlFloatingBottomNavigation.js +1 -1
- package/dist/components/footer/PlFooter.d.ts +4 -3
- package/dist/components/footer/PlFooter.js +1 -1
- package/dist/components/form/PlForm.js +1 -1
- package/dist/components/gallery/PlGallery.d.ts +192 -0
- package/dist/components/gallery/PlGallery.js +1 -0
- package/dist/components/gallery/PlGalleryViewer.d.ts +31 -0
- package/dist/components/gallery/PlGalleryViewer.js +1 -0
- package/dist/components/gallery/index.d.ts +2 -0
- package/dist/components/gallery/index.js +1 -0
- package/dist/components/gauge-chart/PlGaugeChart.d.ts +64 -0
- package/dist/components/gauge-chart/PlGaugeChart.js +1 -0
- package/dist/components/gauge-chart/index.d.ts +2 -0
- package/dist/components/gauge-chart/index.js +1 -0
- package/dist/components/grid/PlGrid.js +1 -1
- package/dist/components/grid/PlGridItem.js +1 -1
- package/dist/components/header/PlHeader.d.ts +4 -3
- package/dist/components/header/PlHeader.js +1 -1
- package/dist/components/heatmap-chart/PlHeatmapChart.d.ts +69 -0
- package/dist/components/heatmap-chart/PlHeatmapChart.js +1 -0
- package/dist/components/heatmap-chart/index.d.ts +2 -0
- package/dist/components/heatmap-chart/index.js +1 -0
- package/dist/components/highlight/PlHighlight.js +1 -1
- package/dist/components/hot-keys/PlHotKeys.js +1 -1
- package/dist/components/hover-card/PlHoverCard.d.ts +96 -0
- package/dist/components/hover-card/PlHoverCard.js +1 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/how-to-steps/PlHowToSteps.d.ts +87 -0
- package/dist/components/how-to-steps/PlHowToSteps.js +1 -0
- package/dist/components/how-to-steps/index.d.ts +2 -0
- package/dist/components/how-to-steps/index.js +1 -0
- package/dist/components/image/PlImage.d.ts +195 -8
- package/dist/components/image/PlImage.js +1 -1
- package/dist/components/image/PlImagePreview.d.ts +58 -0
- package/dist/components/image/PlImagePreview.js +1 -0
- package/dist/components/image/index.d.ts +1 -1
- package/dist/components/line-chart/PlLineChart.d.ts +74 -0
- package/dist/components/line-chart/PlLineChart.js +1 -0
- package/dist/components/line-chart/index.d.ts +2 -0
- package/dist/components/line-chart/index.js +1 -0
- package/dist/components/menu/PlMenu.d.ts +14 -5
- package/dist/components/menu/PlMenu.js +1 -1
- package/dist/components/meter/PlMeter.d.ts +83 -0
- package/dist/components/meter/PlMeter.js +1 -0
- package/dist/components/meter/index.d.ts +2 -0
- package/dist/components/meter/index.js +1 -0
- package/dist/components/mockup/PlMockup.d.ts +146 -0
- package/dist/components/mockup/PlMockup.js +1 -0
- package/dist/components/mockup/index.d.ts +2 -0
- package/dist/components/mockup/index.js +1 -0
- package/dist/components/modal/PlModal.d.ts +1 -1
- package/dist/components/modal/PlModal.js +1 -1
- package/dist/components/navigation-menu/PlNavigationMenu.d.ts +7 -1
- package/dist/components/navigation-menu/PlNavigationMenu.js +1 -1
- package/dist/components/number-field/PlNumberField.d.ts +1 -1
- package/dist/components/number-field/PlNumberField.js +1 -1
- package/dist/components/otp-field/PlOtpField.d.ts +6 -0
- package/dist/components/otp-field/PlOtpField.js +1 -1
- package/dist/components/overlay/PlOverlay.d.ts +1 -1
- package/dist/components/overlay/PlOverlay.js +1 -1
- package/dist/components/page-layout/PlPageLayout.js +1 -1
- package/dist/components/pagination/PlPagination.d.ts +12 -9
- package/dist/components/pagination/PlPagination.js +1 -1
- package/dist/components/panes/PlPanes.d.ts +7 -2
- package/dist/components/panes/PlPanes.js +1 -1
- package/dist/components/pie-chart/PlPieChart.d.ts +58 -0
- package/dist/components/pie-chart/PlPieChart.js +1 -0
- package/dist/components/pie-chart/index.d.ts +2 -0
- package/dist/components/pie-chart/index.js +1 -0
- package/dist/components/pill/PlPill.js +1 -1
- package/dist/components/popconfirm/PlPopconfirm.d.ts +1 -1
- package/dist/components/popconfirm/PlPopconfirm.js +1 -1
- package/dist/components/popover/PlPopover.d.ts +6 -6
- package/dist/components/popover/PlPopover.js +1 -1
- package/dist/components/portal/PlPortal.d.ts +78 -0
- package/dist/components/portal/PlPortal.js +1 -0
- package/dist/components/portal/index.d.ts +2 -0
- package/dist/components/portal/index.js +1 -0
- package/dist/components/progress-box/PlProgressBox.js +1 -1
- package/dist/components/progress-circular/PlProgressCircular.js +1 -1
- package/dist/components/progress-linear/PlProgressLinear.js +1 -1
- package/dist/components/radio-group/PlRadioGroup.js +1 -1
- package/dist/components/rating/PlRating.d.ts +1 -1
- package/dist/components/rating/PlRating.js +1 -1
- package/dist/components/scatter-chart/PlScatterChart.d.ts +46 -0
- package/dist/components/scatter-chart/PlScatterChart.js +1 -0
- package/dist/components/scatter-chart/index.d.ts +2 -0
- package/dist/components/scatter-chart/index.js +1 -0
- package/dist/components/scroll-area/PlScrollArea.d.ts +98 -0
- package/dist/components/scroll-area/PlScrollArea.js +1 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-zone/PlScrollZone.d.ts +27 -10
- package/dist/components/scroll-zone/PlScrollZone.js +1 -1
- package/dist/components/segmented-button/PlSegmentedButton.js +1 -1
- package/dist/components/select/PlSelect.js +1 -1
- package/dist/components/show/PlShow.d.ts +76 -0
- package/dist/components/show/PlShow.js +1 -0
- package/dist/components/show/index.d.ts +2 -0
- package/dist/components/show/index.js +1 -0
- package/dist/components/sidebar/PlSidebar.js +1 -1
- package/dist/components/sidebar/PlSidebarTrigger.js +1 -1
- package/dist/components/skeleton/PlSkeleton.js +1 -1
- package/dist/components/slider/PlSlider.d.ts +13 -1
- package/dist/components/slider/PlSlider.js +1 -1
- package/dist/components/sparkline/PlSparkline.d.ts +68 -0
- package/dist/components/sparkline/PlSparkline.js +1 -0
- package/dist/components/sparkline/index.d.ts +2 -0
- package/dist/components/sparkline/index.js +1 -0
- package/dist/components/spoiler/PlSpoiler.d.ts +16 -1
- package/dist/components/spoiler/PlSpoiler.js +1 -1
- package/dist/components/stack/PlStack.d.ts +114 -0
- package/dist/components/stack/PlStack.js +1 -0
- package/dist/components/stack/index.d.ts +2 -0
- package/dist/components/stack/index.js +1 -0
- package/dist/components/stat/PlStat.d.ts +4 -0
- package/dist/components/stat/PlStat.js +1 -1
- package/dist/components/stepper/PlStepper.d.ts +3 -3
- package/dist/components/stepper/PlStepper.js +1 -1
- package/dist/components/switch/PlSwitch.js +1 -1
- package/dist/components/table/PlTable.d.ts +5 -5
- package/dist/components/table/PlTable.js +1 -1
- package/dist/components/tabs/PlTabs.d.ts +27 -2
- package/dist/components/tabs/PlTabs.js +1 -1
- package/dist/components/text-link/PlTextLink.js +1 -1
- package/dist/components/time-picker/PlTimePicker.js +1 -1
- package/dist/components/timeline/PlTimeline.d.ts +2 -2
- package/dist/components/timeline/PlTimeline.js +1 -1
- package/dist/components/timeline-chart/PlTimelineChart.d.ts +44 -0
- package/dist/components/timeline-chart/PlTimelineChart.js +1 -0
- package/dist/components/timeline-chart/index.d.ts +2 -0
- package/dist/components/timeline-chart/index.js +1 -0
- package/dist/components/toast/PlToast.d.ts +1 -1
- package/dist/components/toast/PlToast.js +1 -1
- package/dist/components/toggle/PlToggle.js +1 -1
- package/dist/components/toggle/PlToggleGroup.js +1 -1
- package/dist/components/tooltip/PlTooltip.js +1 -1
- package/dist/components/tour/PlTour.d.ts +134 -0
- package/dist/components/tour/PlTour.js +1 -0
- package/dist/components/tour/index.d.ts +2 -0
- package/dist/components/tour/index.js +1 -0
- package/dist/components/transfer/PlTransfer.d.ts +10 -1
- package/dist/components/transfer/PlTransfer.js +1 -1
- package/dist/components/tree/PlTree.js +1 -1
- package/dist/components/tree-select/PlTreeSelect.d.ts +99 -0
- package/dist/components/tree-select/PlTreeSelect.js +1 -0
- package/dist/components/tree-select/index.d.ts +2 -0
- package/dist/components/tree-select/index.js +1 -0
- package/dist/components/typography/PlTypography.js +1 -1
- package/dist/components/window-pane/PlWindowPane.d.ts +179 -0
- package/dist/components/window-pane/PlWindowPane.js +1 -0
- package/dist/components/window-pane/index.d.ts +2 -0
- package/dist/components/window-pane/index.js +1 -0
- package/dist/css/anchor.css +2 -0
- package/dist/css/animate-counter.css +2 -0
- package/dist/css/animate-float.css +2 -0
- package/dist/css/animate-reveal.css +2 -0
- package/dist/css/animate-scramble.css +2 -0
- package/dist/css/animate-shake.css +2 -0
- package/dist/css/animate-split.css +2 -0
- package/dist/css/app-logo.css +2 -0
- package/dist/css/area-chart.css +3 -0
- package/dist/css/back-top.css +2 -0
- package/dist/css/bar-chart.css +3 -0
- package/dist/css/calendar.css +1 -0
- package/dist/css/carousel.css +2 -0
- package/dist/css/code-block.css +2 -0
- package/dist/css/color-picker.css +1 -0
- package/dist/css/combobox.css +1 -0
- package/dist/css/command-palette.css +1 -0
- package/dist/css/confirm.css +2 -0
- package/dist/css/data-list.css +2 -0
- package/dist/css/data-table.css +7 -0
- package/dist/css/date-picker.css +1 -0
- package/dist/css/date-range-picker.css +1 -0
- package/dist/css/date-time-picker.css +1 -0
- package/dist/css/flex.css +2 -0
- package/dist/css/floating-action-button.css +4 -0
- package/dist/css/gallery.css +7 -0
- package/dist/css/gauge-chart.css +3 -0
- package/dist/css/heatmap-chart.css +3 -0
- package/dist/css/hover-card.css +2 -0
- package/dist/css/how-to-steps.css +2 -0
- package/dist/css/icon-button.css +1 -0
- package/dist/css/image.css +2 -0
- package/dist/css/line-chart.css +3 -0
- package/dist/css/menubar.css +1 -0
- package/dist/css/meter.css +2 -0
- package/dist/css/mockup.css +2 -0
- package/dist/css/pagination.css +1 -0
- package/dist/css/pie-chart.css +3 -0
- package/dist/css/popconfirm.css +2 -0
- package/dist/css/portal.css +2 -0
- package/dist/css/scatter-chart.css +3 -0
- package/dist/css/scroll-area.css +2 -0
- package/dist/css/scroll-zone.css +2 -0
- package/dist/css/show.css +2 -0
- package/dist/css/sidebar.css +3 -0
- package/dist/css/sparkline.css +3 -0
- package/dist/css/spoiler.css +1 -0
- package/dist/css/stack.css +2 -0
- package/dist/css/stat.css +1 -0
- package/dist/css/time-picker.css +1 -0
- package/dist/css/timeline-chart.css +3 -0
- package/dist/css/tour.css +3 -0
- package/dist/css/transfer.css +4 -0
- package/dist/css/tree-select.css +4 -0
- package/dist/css/window-pane.css +2 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/usePlBreakpoint.d.ts +3 -0
- package/dist/hooks/usePlBreakpoint.js +1 -1
- package/dist/hooks/usePlDisclosure.d.ts +44 -0
- package/dist/hooks/usePlDisclosure.js +1 -0
- package/dist/hooks/usePlElementSize.d.ts +34 -0
- package/dist/hooks/usePlElementSize.js +1 -0
- package/dist/hooks/usePlHotKeys.d.ts +5 -1
- package/dist/hooks/usePlHotKeys.js +1 -1
- package/dist/hooks/usePlOnScreen.d.ts +54 -0
- package/dist/hooks/usePlOnScreen.js +1 -0
- package/dist/index.d.ts +34 -1
- package/dist/index.js +1 -1
- package/dist/internal/animate.d.ts +121 -7
- package/dist/internal/animate.js +1 -1
- package/dist/internal/breakpoints.d.ts +31 -0
- package/dist/internal/breakpoints.js +1 -0
- package/dist/internal/button-group.d.ts +29 -2
- package/dist/internal/button-group.js +2 -2
- package/dist/internal/calendar.d.ts +11 -36
- package/dist/internal/calendar.js +1 -1
- package/dist/internal/chart-frame.d.ts +462 -0
- package/dist/internal/chart-frame.js +1 -0
- package/dist/internal/chart-line.d.ts +44 -0
- package/dist/internal/chart-line.js +1 -0
- package/dist/internal/chart.d.ts +551 -0
- package/dist/internal/chart.js +1 -0
- package/dist/internal/color-scheme.js +1 -1
- package/dist/internal/data-table.d.ts +70 -0
- package/dist/internal/data-table.js +1 -0
- package/dist/internal/date.d.ts +10 -0
- package/dist/internal/date.js +1 -1
- package/dist/internal/defaults.d.ts +8 -3
- package/dist/internal/drag.d.ts +65 -0
- package/dist/internal/drag.js +1 -0
- package/dist/internal/focusable.d.ts +8 -0
- package/dist/internal/focusable.js +1 -0
- package/dist/internal/form.d.ts +61 -0
- package/dist/internal/form.js +1 -0
- package/dist/internal/format.d.ts +2 -0
- package/dist/internal/format.js +1 -1
- package/dist/internal/gallery.d.ts +80 -0
- package/dist/internal/gallery.js +1 -0
- package/dist/internal/glow.d.ts +17 -0
- package/dist/internal/glow.js +1 -0
- package/dist/internal/grid.d.ts +6 -27
- package/dist/internal/grid.js +1 -1
- package/dist/internal/highlight.d.ts +98 -0
- package/dist/internal/highlight.js +1 -0
- package/dist/internal/icons.d.ts +10 -0
- package/dist/internal/icons.js +1 -1
- package/dist/internal/image.d.ts +94 -0
- package/dist/internal/image.js +1 -0
- package/dist/internal/inert.d.ts +19 -0
- package/dist/internal/inert.js +1 -0
- package/dist/internal/keys.d.ts +19 -0
- package/dist/internal/keys.js +1 -1
- package/dist/internal/labels.d.ts +182 -0
- package/dist/internal/labels.js +1 -0
- package/dist/internal/link.d.ts +17 -0
- package/dist/internal/link.js +1 -1
- package/dist/internal/mockup.d.ts +193 -0
- package/dist/internal/mockup.js +1 -0
- package/dist/internal/page-layout.d.ts +14 -7
- package/dist/internal/page-layout.js +1 -1
- package/dist/internal/picker.d.ts +43 -6
- package/dist/internal/picker.js +1 -1
- package/dist/internal/progress.d.ts +22 -8
- package/dist/internal/progress.js +1 -1
- package/dist/internal/responsive.d.ts +108 -0
- package/dist/internal/responsive.js +1 -0
- package/dist/internal/scramble.d.ts +35 -0
- package/dist/internal/scramble.js +1 -0
- package/dist/internal/scroll-target.d.ts +5 -0
- package/dist/internal/scroll-target.js +1 -0
- package/dist/internal/steps.js +1 -1
- package/dist/internal/styles.d.ts +81 -0
- package/dist/internal/styles.js +1 -1
- package/dist/internal/table.d.ts +86 -0
- package/dist/internal/table.js +1 -0
- package/dist/internal/text.d.ts +39 -0
- package/dist/internal/text.js +1 -0
- package/dist/internal/threshold.d.ts +19 -0
- package/dist/internal/threshold.js +1 -0
- package/dist/internal/tour.d.ts +42 -0
- package/dist/internal/tour.js +1 -0
- package/dist/internal/watermark.d.ts +44 -0
- package/dist/internal/watermark.js +1 -0
- package/dist/internal/wheel.d.ts +52 -0
- package/dist/internal/wheel.js +1 -0
- package/dist/internal/window.d.ts +201 -0
- package/dist/internal/window.js +1 -0
- package/dist/locales/de.d.ts +3 -0
- package/dist/locales/de.js +1 -0
- package/dist/locales/en.d.ts +2 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/es.d.ts +3 -0
- package/dist/locales/es.js +1 -0
- package/dist/locales/fr.d.ts +3 -0
- package/dist/locales/fr.js +1 -0
- package/dist/locales/index.d.ts +33 -0
- package/dist/locales/index.js +1 -0
- package/dist/locales/ja.d.ts +3 -0
- package/dist/locales/ja.js +1 -0
- package/dist/locales/ko.d.ts +3 -0
- package/dist/locales/ko.js +1 -0
- package/dist/locales/zh-Hans.d.ts +3 -0
- package/dist/locales/zh-Hans.js +1 -0
- package/dist/provider/PlColorSchemeScript.js +1 -1
- package/dist/provider/PlassProvider.js +1 -1
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1357 -25
- package/dist/tokens.css +1357 -25
- package/dist/types.d.ts +368 -2
- package/package.json +26 -16
- package/dist/components/avatar-group/PlAvatarGroup.d.ts +0 -47
- package/dist/components/avatar-group/PlAvatarGroup.js +0 -1
- package/dist/components/avatar-group/index.d.ts +0 -2
- package/dist/components/avatar-group/index.js +0 -1
- package/dist/css/avatar-group.css +0 -2
- package/dist/internal/avatar-group.d.ts +0 -25
- package/dist/internal/avatar-group.js +0 -2
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import type { PlassAnimateMode, PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, PlassSide } from '../../types.js';
|
|
4
|
+
export interface PlAnimateRevealProps extends PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the content is uncovered or covered again. `out` is the same wipe
|
|
7
|
+
* run backwards, so it closes from the edge it opened towards.
|
|
8
|
+
* @default 'in'
|
|
9
|
+
*/
|
|
10
|
+
mode?: PlassAnimateMode;
|
|
11
|
+
/**
|
|
12
|
+
* Which edge the wipe starts at. Physical, as `PlassSide` is everywhere — a
|
|
13
|
+
* heading uncovered from the top is uncovered from the top in every writing
|
|
14
|
+
* direction.
|
|
15
|
+
* @default 'left'
|
|
16
|
+
*/
|
|
17
|
+
from?: PlassSide;
|
|
18
|
+
/**
|
|
19
|
+
* Fades in behind the wipe.
|
|
20
|
+
*
|
|
21
|
+
* **Off by default**, which is the opposite of every other effect here and is
|
|
22
|
+
* the whole point of this one: a reveal is not a fade. Turn it on only if you
|
|
23
|
+
* want both.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
fade?: boolean;
|
|
27
|
+
/** Renders something other than a `<div>`. Base UI's own escape hatch. */
|
|
28
|
+
render?: useRender.RenderProp;
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Content uncovered behind a moving edge.
|
|
33
|
+
*
|
|
34
|
+
* The only entrance in the set where **nothing moves and no colour changes**.
|
|
35
|
+
* A fade changes the ink, a slide changes the position, a grow changes the
|
|
36
|
+
* size; this changes how much of the element is drawn and leaves every pixel it
|
|
37
|
+
* has drawn exactly where it will finally be. That makes it the effect for
|
|
38
|
+
* anything whose position is itself the information — a heading over the
|
|
39
|
+
* paragraph it belongs to, a rule between two sections, the plot area of a
|
|
40
|
+
* chart, a row of figures that must not be read from the wrong place.
|
|
41
|
+
*
|
|
42
|
+
* It is also the cheapest entrance in the set to lay out, because there is
|
|
43
|
+
* nothing to lay out: no wrapper, no `overflow` box, no second element in the
|
|
44
|
+
* flow. `clip-path` paints less of the element and the page around it never
|
|
45
|
+
* learns that anything happened.
|
|
46
|
+
*
|
|
47
|
+
* `fade` is off by default, alone among the effects that offer it. Fading a
|
|
48
|
+
* reveal is asking for two entrances at once, and the reason to have reached
|
|
49
|
+
* for this one is usually that the first was the problem.
|
|
50
|
+
*/
|
|
51
|
+
export declare const PlAnimateReveal: React.ForwardRefExoticComponent<PlAnimateRevealProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import*as e from"react";import{mergeProps as r}from"@base-ui/react/merge-props";import{useRender as t}from"@base-ui/react/use-render";import{isInfinite as a,revealClip as n,useAnimateElement as i}from"../../internal/animate.js";import{cx as s}from"../../internal/styles.js";export const PlAnimateReveal=/* @__PURE__ */e.forwardRef(function PlAnimateReveal({duration:e=520,delay:l=0,easing:o,repeat:m=1,alternate:p,paused:d,trigger:c="mount",play:f,once:g=!0,threshold:u=.2,timeline:y,range:h,stagger:v=0,durationStep:N=0,reverse:R=!1,mode:b="in",from:j="left",fade:A=!1,render:P,className:S,style:w,children:x,...k},q){const z=i({effect:"reveal",duration:e,delay:l,easing:o,repeat:m,alternate:p,mode:b,clip:n(j),opacity:A?0:1,trigger:c,play:f,once:g,threshold:u,paused:d,infinite:a(m),timeline:y,range:h,stagger:v,durationStep:N,reverse:R,children:x});return t({render:P,ref:[q,z.ref],props:{...r(k,z.props),className:s(z.className,S),style:{...z.style,...w},children:z.children}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PlAnimateReveal}from"./PlAnimateReveal.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
-
import type { PlassAnimateMode, PlassAnimateProps } from '../../types.js';
|
|
4
|
-
export interface PlAnimateRotateProps extends PlassAnimateProps, React.ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
import type { PlassAnimateMode, PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps } from '../../types.js';
|
|
4
|
+
export interface PlAnimateRotateProps extends PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
|
|
5
5
|
/**
|
|
6
6
|
* Whether the content turns into place or out of it.
|
|
7
7
|
* @default 'in'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import*as e from"react";import{
|
|
1
|
+
"use client";import*as e from"react";import{mergeProps as r}from"@base-ui/react/merge-props";import{useRender as t}from"@base-ui/react/use-render";import{isInfinite as a,useAnimateElement as n}from"../../internal/animate.js";import{cx as i}from"../../internal/styles.js";export const PlAnimateRotate=/* @__PURE__ */e.forwardRef(function PlAnimateRotate({duration:e=440,delay:o=0,easing:s,repeat:l=1,alternate:d,paused:m,trigger:p="mount",play:c,once:g=!0,threshold:f=.2,timeline:u,range:y,stagger:h=0,durationStep:N=0,reverse:R=!1,mode:b="in",from:j=-180,to:v=0,origin:A="center",fade:P=!0,render:S,className:$,style:w,children:x,...T},k){const q=n({effect:"rotate",duration:e,delay:o,easing:s,repeat:l,alternate:d,mode:b,angle:`${j}deg`,angleTo:`${v}deg`,opacity:P?0:1,trigger:p,play:c,once:g,threshold:f,paused:m,infinite:a(l),timeline:u,range:y,origin:A,stagger:h,durationStep:N,reverse:R,children:x});return t({render:S,ref:[k,q.ref],props:{...r(T,q.props),className:i(q.className,$),style:{...q.style,...w},children:q.children}})});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import type { PlassAnimateTrigger } from '../../types.js';
|
|
4
|
+
export interface PlAnimateScrambleProps extends Omit<React.ComponentPropsWithoutRef<'span'>, 'children'> {
|
|
5
|
+
/**
|
|
6
|
+
* The line that resolves. A string, and it has to be: the effect works on
|
|
7
|
+
* characters, and there is no character in a `<strong>`.
|
|
8
|
+
*/
|
|
9
|
+
children: string;
|
|
10
|
+
/**
|
|
11
|
+
* The glyphs the unsettled characters are drawn from.
|
|
12
|
+
*
|
|
13
|
+
* Left out, it is **the line's own characters**. Every scrambler that ships a
|
|
14
|
+
* default alphabet ships an English one, and English noise over a Korean or a
|
|
15
|
+
* Greek headline is a different script flickering rather than a word
|
|
16
|
+
* arriving. Set it for the caller who genuinely wants a terminal look.
|
|
17
|
+
*/
|
|
18
|
+
characters?: string;
|
|
19
|
+
/**
|
|
20
|
+
* How long the line takes to settle, in milliseconds.
|
|
21
|
+
* @default 1200
|
|
22
|
+
*/
|
|
23
|
+
duration?: number;
|
|
24
|
+
/** How long it waits before starting, in milliseconds. @default 0 */
|
|
25
|
+
delay?: number;
|
|
26
|
+
/**
|
|
27
|
+
* How often the unsettled characters are redrawn, in milliseconds.
|
|
28
|
+
*
|
|
29
|
+
* Not every frame, on purpose. At sixty a second a line of changing glyphs
|
|
30
|
+
* strobes, which is unpleasant to look at and is the kind of flicker a
|
|
31
|
+
* reader with a sensitivity to it should never be handed.
|
|
32
|
+
* @default 45
|
|
33
|
+
*/
|
|
34
|
+
tick?: number;
|
|
35
|
+
/**
|
|
36
|
+
* What starts it. `visible` for `PlAnimateCounter`'s reason: a line that
|
|
37
|
+
* resolved off screen delivered text that was simply already there.
|
|
38
|
+
* @default 'visible'
|
|
39
|
+
*/
|
|
40
|
+
trigger?: PlassAnimateTrigger;
|
|
41
|
+
/** Runs it, when `trigger` is `manual`. */
|
|
42
|
+
play?: boolean;
|
|
43
|
+
/** With `visible`, whether it runs only the first time. @default true */
|
|
44
|
+
once?: boolean;
|
|
45
|
+
/** With `visible`, how much has to be on screen to count. @default 0.2 */
|
|
46
|
+
threshold?: number;
|
|
47
|
+
/** Holds it where it is. */
|
|
48
|
+
paused?: boolean;
|
|
49
|
+
/** Renders something other than a `<span>`. Base UI's own escape hatch. */
|
|
50
|
+
render?: useRender.RenderProp;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A line of text resolving out of noise.
|
|
54
|
+
*
|
|
55
|
+
* The second of the two effects that animate **content** rather than a box, and
|
|
56
|
+
* it takes a `string` rather than a node for the same reason a
|
|
57
|
+
* [PlAnimateCounter](./animate-counter) takes a number: there is no character
|
|
58
|
+
* to scramble inside a `<strong>`.
|
|
59
|
+
*
|
|
60
|
+
* **The noise is made of the line's own characters.** Every scrambler that
|
|
61
|
+
* ships a default alphabet ships an English one, and English noise over a
|
|
62
|
+
* Korean, Greek or Arabic headline is not a word arriving — it is a different
|
|
63
|
+
* script flickering where a word is about to be. Shuffling the string's own
|
|
64
|
+
* glyphs costs nothing and is right in every script; it also keeps the line's
|
|
65
|
+
* colour and width steady, because every frame is drawn out of exactly the
|
|
66
|
+
* characters the finished line is made of.
|
|
67
|
+
*
|
|
68
|
+
* It settles **left to right**, which is what makes it read as a word arriving
|
|
69
|
+
* rather than as a slot machine, and whitespace is never scrambled — the gaps
|
|
70
|
+
* between words are what keeps a line of noise looking like a sentence.
|
|
71
|
+
*
|
|
72
|
+
* **A screen reader is told the line, once**, and never the noise. Everything a
|
|
73
|
+
* `PlAnimateCounter` says about that applies here word for word.
|
|
74
|
+
*/
|
|
75
|
+
export declare const PlAnimateScramble: React.ForwardRefExoticComponent<PlAnimateScrambleProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import*as a from"react";import{mergeProps as n}from"@base-ui/react/merge-props";import{useRender as s}from"@base-ui/react/use-render";import{useAnimationRun as i}from"../../internal/animate.js";import{usePrefersReducedMotion as m}from"../../internal/media.js";import{poolOf as o,scrambleAt as c}from"../../internal/scramble.js";import{cx as l,srOnlyClasses as u}from"../../internal/styles.js";export const PlAnimateScramble=/* @__PURE__ */a.forwardRef(function PlAnimateScramble({children:d,characters:f,duration:p=1200,delay:h=0,tick:x=45,trigger:b="visible",play:j,once:M=!0,threshold:g=.2,paused:A,render:y,className:F,...v},N){const S=m(),q=i({trigger:b,play:j,once:M,threshold:g,paused:A,infinite:!1,nonce:d}),E=a.useMemo(()=>f??o(d),[f,d]),[P,R]=a.useState(()=>d),k=a.useRef(0);return a.useEffect(()=>{k.current=0},[q.runs,d]),a.useEffect(()=>{if(S)return void R(d);if(!q.started)return k.current=0,void R(c(d,E,0,0));if(A)return;const e=Math.max(1,p);let r,t=0,a=0,n=-1;const step=s=>{r??=s-k.current,k.current=s-r;const i=k.current-h,m=Math.min(1,i/e),o=Math.floor(Math.max(0,i)/Math.max(1,x));o!==n&&(n=o,a+=1,R(c(d,E,Math.max(0,m),a))),m<1?t=requestAnimationFrame(step):R(d)};return t=requestAnimationFrame(step),()=>cancelAnimationFrame(t)},[q.started,q.runs,S,A,d,E,p,h,x]),s({render:y??e("span",{}),ref:[N,q.ref],props:{className:l(F),"data-plass-animation":"scramble","data-state":q.state,children:t(r,{children:[e("span",{className:u,children:d}),e("span",{"aria-hidden":"true",children:P})]}),...n(v,q.handlers)}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PlAnimateScramble}from"./PlAnimateScramble.js";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import type { PlassAnimateProps } from '../../types.js';
|
|
4
|
+
export interface PlAnimateShakeProps extends PlassAnimateProps, React.ComponentPropsWithoutRef<'div'> {
|
|
5
|
+
/**
|
|
6
|
+
* Plays the shake again whenever this value changes, and never on the first
|
|
7
|
+
* render.
|
|
8
|
+
*
|
|
9
|
+
* The prop the component exists around. `play` is a boolean, so replaying
|
|
10
|
+
* with it means toggling off and on — two renders for one event, and a piece
|
|
11
|
+
* of state whose only job is to be flipped back. A refusal is an **event**,
|
|
12
|
+
* and a value that has changed is the closest React has to one: a count of
|
|
13
|
+
* failed attempts already is this.
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <PlAnimateShake replay={attempts}>…</PlAnimateShake>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
replay?: unknown;
|
|
20
|
+
/**
|
|
21
|
+
* How far it travels either side of where it started. A number is pixels.
|
|
22
|
+
* @default 6
|
|
23
|
+
*/
|
|
24
|
+
distance?: number | string;
|
|
25
|
+
/** Renders something other than a `<div>`. Base UI's own escape hatch. */
|
|
26
|
+
render?: useRender.RenderProp;
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A refusal.
|
|
31
|
+
*
|
|
32
|
+
* The one effect in the set that is a **response** rather than an entrance: it
|
|
33
|
+
* is what a form does when the password was wrong again, what a locked control
|
|
34
|
+
* does when it is pressed. So it starts held still and plays only when it is
|
|
35
|
+
* told to, where every other effect here starts on mount.
|
|
36
|
+
*
|
|
37
|
+
* `replay` is the prop it exists around. A refusal can happen twice, and
|
|
38
|
+
* `play`, being a boolean, cannot say "again" — replaying with it means
|
|
39
|
+
* toggling off and on, which is two renders for one event and a piece of state
|
|
40
|
+
* whose only job is to be flipped back. A value that has changed is the closest
|
|
41
|
+
* React has to an event, and the count of failed attempts a form already keeps
|
|
42
|
+
* is exactly that value.
|
|
43
|
+
*
|
|
44
|
+
* It is not in `PlassAnimation`, for `PlAnimateFloat`'s reason: that union is
|
|
45
|
+
* the set of ways content can arrive, and this is not an arrival.
|
|
46
|
+
*
|
|
47
|
+
* Three shudders either side of home and back to nothing, so a shaken element
|
|
48
|
+
* is exactly where it was. This is the one effect a caller will run over
|
|
49
|
+
* content that is still being typed into, and a field left a few pixels off its
|
|
50
|
+
* label would be worse than the error it was reporting.
|
|
51
|
+
*
|
|
52
|
+
* **A reader who asked for less motion sees none of it**, which is the whole
|
|
53
|
+
* reason the words matter more than the shake: whatever a refusal is saying has
|
|
54
|
+
* to be said in text as well, in something a screen reader is told about. The
|
|
55
|
+
* shake is emphasis, never the message.
|
|
56
|
+
*/
|
|
57
|
+
export declare const PlAnimateShake: React.ForwardRefExoticComponent<PlAnimateShakeProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import*as e from"react";import{mergeProps as a}from"@base-ui/react/merge-props";import{useRender as r}from"@base-ui/react/use-render";import{animBaseClass as t,lengthValue as n,useAnimateElement as s}from"../../internal/animate.js";import{cx as i}from"../../internal/styles.js";export const PlAnimateShake=/* @__PURE__ */e.forwardRef(function PlAnimateShake({duration:e=400,delay:l=0,easing:o,repeat:p=1,alternate:m,paused:c,trigger:d="manual",play:f=!1,once:h=!0,threshold:u=.2,replay:y,distance:g=6,render:k,className:N,style:b,children:j,...x},A){const P=s({effect:null,duration:e,delay:l,easing:o,repeat:p,alternate:m,x:n(g),trigger:d,play:f,once:h,threshold:u,paused:c,infinite:!1,nonce:y,children:j});return r({render:k,ref:[A,P.ref],props:{...a(x,P.props),className:i(t,"plass-anim-shake",P.className,N),style:{...P.style,...b},"data-plass-animation":"shake",children:P.children}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PlAnimateShake}from"./PlAnimateShake.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
-
import type { PlassAnimateMode, PlassAnimateProps, PlassSide } from '../../types.js';
|
|
4
|
-
export interface PlAnimateSlideProps extends PlassAnimateProps, React.ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
import type { PlassAnimateMode, PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, PlassSide } from '../../types.js';
|
|
4
|
+
export interface PlAnimateSlideProps extends PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
|
|
5
5
|
/**
|
|
6
6
|
* Whether the content slides in or slides away. `out` leaves by the same edge
|
|
7
7
|
* it would have come from.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import*as e from"react";import{
|
|
1
|
+
"use client";import*as e from"react";import{mergeProps as r}from"@base-ui/react/merge-props";import{useRender as t}from"@base-ui/react/use-render";import{isInfinite as a,slideOffsets as i,useAnimateElement as n}from"../../internal/animate.js";import{cx as s}from"../../internal/styles.js";export const PlAnimateSlide=/* @__PURE__ */e.forwardRef(function PlAnimateSlide({duration:e=360,delay:o=0,easing:l,repeat:d=1,alternate:m,paused:p,trigger:c="mount",play:f,once:g=!0,threshold:u=.2,timeline:y,range:h,stagger:S=0,durationStep:b=0,reverse:x=!1,mode:N="in",from:j="bottom",distance:v="100%",fade:A=!0,render:P,className:w,style:R,children:k,...q},z){const{x:B,y:C}=i(j,v),D=n({effect:"slide",duration:e,delay:o,easing:l,repeat:d,alternate:m,mode:N,x:B,y:C,opacity:A?0:1,trigger:c,play:f,once:g,threshold:u,paused:p,infinite:a(d),timeline:y,range:h,stagger:S,durationStep:b,reverse:x,children:k});return t({render:P,ref:[z,D.ref],props:{...r(q,D.props),className:s(D.className,w),style:{...D.style,...R},children:D.children}})});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import type { PlassAnimateMode, PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, PlassAnimation } from '../../types.js';
|
|
4
|
+
/** What the line is cut into before the effect is told off across it. */
|
|
5
|
+
export type PlAnimateSplitBy = 'word' | 'character';
|
|
6
|
+
export interface PlAnimateSplitProps extends PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, Omit<React.ComponentPropsWithoutRef<'span'>, 'children'> {
|
|
7
|
+
/**
|
|
8
|
+
* The line. A string, and it has to be: the component cuts it up, and there
|
|
9
|
+
* is nothing to cut inside a `<strong>`.
|
|
10
|
+
*/
|
|
11
|
+
children: string;
|
|
12
|
+
/**
|
|
13
|
+
* What it is cut into.
|
|
14
|
+
*
|
|
15
|
+
* `word` by default, and it is the safe one. See the note on the page about
|
|
16
|
+
* `character` and the scripts it must not be used on.
|
|
17
|
+
* @default 'word'
|
|
18
|
+
*/
|
|
19
|
+
by?: PlAnimateSplitBy;
|
|
20
|
+
/**
|
|
21
|
+
* Which of the entrances each part plays. A part starts where the component
|
|
22
|
+
* of that name starts when it is given nothing, so a `slide` part rises from
|
|
23
|
+
* its own height below and a `zoom` part grows from 0.4.
|
|
24
|
+
* @default 'fade'
|
|
25
|
+
*/
|
|
26
|
+
effect?: PlassAnimation;
|
|
27
|
+
/**
|
|
28
|
+
* `in` plays the entrance; `out` is the same run backwards, held at the end.
|
|
29
|
+
* @default 'in'
|
|
30
|
+
*/
|
|
31
|
+
mode?: PlassAnimateMode;
|
|
32
|
+
/** Renders something other than a `<span>`. Base UI's own escape hatch. */
|
|
33
|
+
render?: useRender.RenderProp;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A line of text arriving one part at a time.
|
|
37
|
+
*
|
|
38
|
+
* The other five effects tell themselves off across their **children**, which a
|
|
39
|
+
* line of text does not have. This one makes them: it cuts the string into
|
|
40
|
+
* words or characters, wraps each in a span, and hands the set to exactly the
|
|
41
|
+
* same `stagger` machinery a `PlAnimateFade` around a list of `<li>`s uses. So
|
|
42
|
+
* `effect`, `stagger`, `durationStep` and `reverse` all mean what they mean
|
|
43
|
+
* everywhere else — this component is the splitting and nothing more.
|
|
44
|
+
*
|
|
45
|
+
* **`by="character"` is not safe in every script**, and that is the one thing
|
|
46
|
+
* to know before reaching for it. A character span breaks the shaping between
|
|
47
|
+
* letters, so Arabic stops joining. A character is a grapheme, what a reader
|
|
48
|
+
* counts as one, so an emoji, a flag or a Devanagari conjunct stays in one
|
|
49
|
+
* part. `word` keeps the shaping, is the default, and is what a headline wants
|
|
50
|
+
* anyway.
|
|
51
|
+
*
|
|
52
|
+
* **A screen reader is told the line, once.** The parts are hidden from the
|
|
53
|
+
* accessibility tree and the whole line sits beside them in a clipped span,
|
|
54
|
+
* which is what stops a split headline being read out one letter at a time —
|
|
55
|
+
* the defect this pattern is known for.
|
|
56
|
+
*/
|
|
57
|
+
export declare const PlAnimateSplit: React.ForwardRefExoticComponent<PlAnimateSplitProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import*as a from"react";import{mergeProps as n}from"@base-ui/react/merge-props";import{useRender as i}from"@base-ui/react/use-render";import{animBaseClass as s,animationClasses as o,animationSlots as c,isInfinite as p,revealClip as l,slideOffsets as m,staggerSlots as d,useAnimationRun as u}from"../../internal/animate.js";import{cx as f,srOnlyClasses as g}from"../../internal/styles.js";import{graphemesOf as h}from"../../internal/text.js";const y=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Bopomofo}\p{Script=Thai}\p{Script=Lao}\p{Script=Khmer}\p{Script=Myanmar}]/u;function effectStart(e){switch(e){case"slide":return{opacity:0,...m("bottom","100%")};case"grow":return{opacity:0,scale:.8};case"zoom":return{opacity:0,scale:.4};case"rotate":return{opacity:0,angle:"-180deg",angleTo:"0deg"};case"reveal":return{opacity:1,clip:l("left")};default:return{opacity:0}}}export const PlAnimateSplit=/* @__PURE__ */a.forwardRef(function PlAnimateSplit({children:l,by:m="word",effect:S="fade",mode:w="in",duration:b=400,delay:j=0,easing:x,repeat:N=1,alternate:v,paused:k,trigger:$="mount",play:A,once:F=!0,threshold:H=.2,timeline:K,range:M,stagger:P=40,durationStep:T=0,reverse:z=!1,render:B,className:L,style:O,...R},q){const C=a.useMemo(()=>function piecesOf(e,t){const r=[];for(const a of e.split(/(\s+)/)){if(""===a)continue;if("word"===t||""===a.trim()){r.push([a]);continue}let e=[];for(const t of h(a))0===e.length||y.test(t)?(e=[t],r.push(e)):e.push(t)}return r}(l,m),[l,m]),D=u({trigger:"view"===K?"mount":$,play:A,once:F,threshold:H,paused:k,infinite:p(N)}),E={...effectStart(S),duration:b,delay:j,easing:x,repeat:N,alternate:v,mode:w,timeline:K,range:M},G=C.reduce((e,t)=>""===t[0].trim()?e:e+t.length,0),I=`${s} ${o[S]}`;let J=-1;const renderPart=(t,r)=>(J+=1,e("span",{className:`${I} inline-block whitespace-normal`,style:{...c(d(E,{index:J,count:G,stagger:P,durationStep:T,reverse:z})),"--p-anim-state":D.state},children:t},r));return i({render:B??e("span",{}),ref:[q,D.ref],props:{...n(R,D.handlers),className:f(L),style:O,"data-plass-animation":S,"data-state":D.state,children:r(t,{children:[e("span",{className:g,children:l}),e("span",{"aria-hidden":"true",children:C.map((t,r)=>""===t[0].trim()?e(a.Fragment,{children:t[0]},r):1===t.length?renderPart(t[0],r):e("span",{className:"inline-block",children:t.map((e,t)=>renderPart(e,t))},r))})]})}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PlAnimateSplit}from"./PlAnimateSplit.js";
|
|
@@ -42,8 +42,9 @@ export interface PlAnimateTypingProps extends Omit<PlassAnimateProps, 'alternate
|
|
|
42
42
|
* for a screen reader, which reads it once and is not made to sit through the
|
|
43
43
|
* performance — and what animates is a visible copy that is `aria-hidden`. So
|
|
44
44
|
* the effect costs a reader who cannot see it nothing, and costs a reader who
|
|
45
|
-
* can nothing either: the
|
|
46
|
-
*
|
|
45
|
+
* can nothing either: the characters still to come are laid out after the
|
|
46
|
+
* caret without being drawn, so the box holds the whole string from the first
|
|
47
|
+
* frame and nothing around it moves as the text arrives.
|
|
47
48
|
*
|
|
48
49
|
* `repeat`, `hold` and `erase` are what make it a loop: type, hold, delete,
|
|
49
50
|
* type again. Without `erase` a repeat clears in one frame, which is right for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{isInfinite as
|
|
1
|
+
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as r from"react";import{mergeProps as a}from"@base-ui/react/merge-props";import{isInfinite as s,useAnimationRun as i}from"../../internal/animate.js";import{usePrefersReducedMotion as n}from"../../internal/media.js";import{srOnlyClasses as l}from"../../internal/styles.js";import{graphemesOf as o,textOf as c}from"../../internal/text.js";export const PlAnimateTyping=/* @__PURE__ */r.forwardRef(function PlAnimateTyping({text:m,speed:u=24,hold:p=1400,erase:d=!1,eraseSpeed:f,caret:h=!0,caretChar:y="|",duration:g,delay:j=0,repeat:x=1,paused:T,trigger:v="mount",play:N,once:b=!0,threshold:M=.2,className:w,style:A,children:E,...P},R){const S=i({trigger:v,play:N,once:b,threshold:M,paused:T,infinite:s(x)}),k=n(),C=m??c(E),q=r.useMemo(()=>o(C),[C]),z=q.length,[B,D]=r.useState(0),F=r.useRef(0),G=g&&z>0?g/z:1e3/Math.max(u,1),H=1e3/Math.max(f??2*u,1);return r.useEffect(()=>{F.current=0},[z,S.runs]),r.useEffect(()=>{if(k||0===z)return void D(z);if(!S.started)return F.current=0,void D(0);if(T)return;let e,t=!1,r=F.current,a=1,s=!1;const i="infinite"===x?1/0:Math.max(1,x);if(r>=z&&1===i)return;const step=()=>{if(!t){if(s)return r-=1,F.current=r,D(r),r<=0&&(s=!1,a+=1),void(e=setTimeout(step,s?H:G));if(r+=1,F.current=r,D(r),r<z)e=setTimeout(step,G);else if(!(a>=i)){if(d)return s=!0,void(e=setTimeout(step,p));a+=1,e=setTimeout(()=>{t||(r=0,F.current=0,D(0),e=setTimeout(step,G))},p)}}};return D(r),e=setTimeout(step,0===r?j:G),()=>{t=!0,clearTimeout(e)}},[S.started,S.runs,T,k,z,G,H,j,p,d,x]),t("div",{ref:e=>{S.ref(e),"function"==typeof R?R(e):R&&(R.current=e)},className:w,style:A,"data-plass-animation":"typing","data-state":S.state,...a(P,S.handlers),children:[e("span",{className:l,children:C}),t("span",{"aria-hidden":"true",className:"relative whitespace-pre-wrap",children:[q.slice(0,B).join(""),h?e("span",{className:"plass-caret absolute",children:y}):null,e("span",{"data-sample":q.slice(B).join(""),className:"invisible before:content-[attr(data-sample)]",children:h?e("span",{className:"inline-block",children:y}):null})]})]})});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
-
import type { PlassAnimateMode, PlassAnimateProps } from '../../types.js';
|
|
4
|
-
export interface PlAnimateZoomProps extends PlassAnimateProps, React.ComponentPropsWithoutRef<'div'> {
|
|
3
|
+
import type { PlassAnimateMode, PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps } from '../../types.js';
|
|
4
|
+
export interface PlAnimateZoomProps extends PlassAnimateProps, PlassAnimateStaggerProps, PlassAnimateTimelineProps, React.ComponentPropsWithoutRef<'div'> {
|
|
5
5
|
/**
|
|
6
6
|
* Whether the content comes forward or falls away.
|
|
7
7
|
* @default 'in'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import*as e from"react";import{
|
|
1
|
+
"use client";import*as e from"react";import{mergeProps as r}from"@base-ui/react/merge-props";import{useRender as t}from"@base-ui/react/use-render";import{isInfinite as a,useAnimateElement as n}from"../../internal/animate.js";import{cx as o}from"../../internal/styles.js";export const PlAnimateZoom=/* @__PURE__ */e.forwardRef(function PlAnimateZoom({duration:e=320,delay:i=0,easing:s,repeat:l=1,alternate:m,paused:d,trigger:p="mount",play:c,once:f=!0,threshold:g=.2,timeline:u,range:y,stagger:h=0,durationStep:N=0,reverse:b=!1,mode:j="in",from:v=.4,fade:A=!0,render:P,className:S,style:Z,children:w,...x},z){const R=n({effect:"zoom",duration:e,delay:i,easing:s,repeat:l,alternate:m,mode:j,scale:v,opacity:A?0:1,trigger:p,play:c,once:f,threshold:g,paused:d,infinite:a(l),timeline:u,range:y,origin:"center",stagger:h,durationStep:N,reverse:b,children:w});return t({render:P,ref:[z,R.ref],props:{...r(x,R.props),className:o(R.className,S),style:{...R.style,...Z},children:R.children}})});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import type { PlassColor, PlassSize, PlassVariant } from '../../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* How the artwork is framed, which is the one question this component exists to
|
|
6
|
+
* answer.
|
|
7
|
+
*
|
|
8
|
+
* - `bare` — drawn as it was given, at the height `size` asks for and whatever
|
|
9
|
+
* width that comes to. No plate, no crop, no padding. The default, and the
|
|
10
|
+
* only one that is correct for a mark drawn with its own background, its own
|
|
11
|
+
* margin, or the product's name set into it.
|
|
12
|
+
* - `plate` — an app icon: a tile with the artwork inset in it and the corners
|
|
13
|
+
* cut to the house radius. What a mark drawn as a bare glyph needs before it
|
|
14
|
+
* can sit next to anything else.
|
|
15
|
+
* - `circle` — the same tile, round. For the products whose icon is a disc.
|
|
16
|
+
*/
|
|
17
|
+
export type PlAppLogoShape = 'bare' | 'plate' | 'circle';
|
|
18
|
+
export interface PlAppLogoProps extends Omit<React.ComponentPropsWithoutRef<'span'>, 'color'> {
|
|
19
|
+
/**
|
|
20
|
+
* The mark. An `<img>`, an inline `<svg>`, a `PlIcon` — whatever the product's
|
|
21
|
+
* artwork actually is.
|
|
22
|
+
*/
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
/** A picture to draw as the mark, instead of `children`. */
|
|
25
|
+
src?: string;
|
|
26
|
+
/**
|
|
27
|
+
* What the picture says, for a reader who cannot see it.
|
|
28
|
+
*
|
|
29
|
+
* Leave it empty when `name` is set: the wordmark beside the mark already
|
|
30
|
+
* says the product's name, and a picture that repeats it is a screen reader
|
|
31
|
+
* saying it twice.
|
|
32
|
+
*/
|
|
33
|
+
alt?: string;
|
|
34
|
+
/** The product's name, set beside the mark. */
|
|
35
|
+
name?: React.ReactNode;
|
|
36
|
+
/** A line under the name — an environment, a tenant, a plan. */
|
|
37
|
+
description?: React.ReactNode;
|
|
38
|
+
/** How the artwork is framed. @default 'bare' */
|
|
39
|
+
shape?: PlAppLogoShape;
|
|
40
|
+
/**
|
|
41
|
+
* What the plate is made of. Only read when `shape` is not `bare`.
|
|
42
|
+
* @default 'solid'
|
|
43
|
+
*/
|
|
44
|
+
variant?: PlassVariant;
|
|
45
|
+
/** The height of the mark, and the type scale of the name beside it. @default 'md' */
|
|
46
|
+
size?: PlassSize;
|
|
47
|
+
/** The family the plate takes. @default 'primary' */
|
|
48
|
+
color?: PlassColor;
|
|
49
|
+
/**
|
|
50
|
+
* Renders something other than a `<span>`. A logo is nearly always the way
|
|
51
|
+
* back to the front page, so `render={<a href="/" />}` is the ordinary case.
|
|
52
|
+
*/
|
|
53
|
+
render?: useRender.RenderProp;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A product's mark, and its name beside it.
|
|
57
|
+
*
|
|
58
|
+
* The whole component is the **framing**, which is the one thing a logo needs
|
|
59
|
+
* and the one thing every project gets wrong twice: `bare` is the default
|
|
60
|
+
* because a mark drawn with its own background, its own margin, or the
|
|
61
|
+
* product's name set into it must not be put on a plate or cropped to a circle.
|
|
62
|
+
* `plate` and `circle` are for a mark drawn as a bare glyph, which cannot sit
|
|
63
|
+
* next to anything else until it has been given an edge.
|
|
64
|
+
*
|
|
65
|
+
* It is not a [PlAvatar](./avatar). An avatar is a picture of a person or a
|
|
66
|
+
* thing and is always a circle or a fillet, with initials behind it when the
|
|
67
|
+
* picture fails; a logo is artwork the product owns, it has no fallback worth
|
|
68
|
+
* inventing, and its shape is a decision somebody already made.
|
|
69
|
+
*
|
|
70
|
+
* **With a `name`, the mark is decorative.** The wordmark beside it already
|
|
71
|
+
* says what the product is called, and a picture that says it again is a screen
|
|
72
|
+
* reader reading the name twice. That is why `alt` is a prop rather than
|
|
73
|
+
* something derived from `name`.
|
|
74
|
+
*
|
|
75
|
+
* A logo is nearly always the way back to the front page. `render={<a href="/"
|
|
76
|
+
* />}` makes it one without changing anything about how it is drawn.
|
|
77
|
+
*/
|
|
78
|
+
export declare const PlAppLogo: React.ForwardRefExoticComponent<PlAppLogoProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e,jsxs as s,Fragment as l}from"react/jsx-runtime";import*as a from"react";import{useRender as t}from"@base-ui/react/use-render";import{useDefaults as r}from"../../internal/defaults.js";import{controlSlots as n,cx as i,forcedFieldEdgeClasses as o,glassClasses as c,hasContent as m,metaTextClasses as d,radiusClasses as p}from"../../internal/styles.js";const x={xs:"h-5",sm:"h-6",md:"h-8",lg:"h-10",xl:"h-12"},g={xs:"size-5",sm:"size-6",md:"size-8",lg:"size-10",xl:"size-12"},f={xs:"text-sm",sm:"text-base",md:"text-lg",lg:"text-xl",xl:"text-2xl"},u={xs:"gap-1.5",sm:"gap-2",md:"gap-2.5",lg:"gap-3",xl:"gap-3.5"},h={solid:`[background-image:var(--p-fill)] text-(--p-on-solid) [box-shadow:var(--p-lift)] ${o}`,glass:`${c} bg-(--plass-glass) text-(--p-accent) border [border-color:var(--plass-glass-line)]`,ghost:"bg-(--p-soft) text-(--p-accent)"};export const PlAppLogo=/* @__PURE__ */a.forwardRef(function PlAppLogo({children:a,src:o,alt:c="",name:b,description:v,shape:z="bare",variant:j="solid",size:N,color:w,render:y,className:k,style:A,...L},P){const $=r(),_=N??$.size??"md",F=w??$.color??"primary",R="bare"!==z,q=m(b)||m(v),B=o?e("img",{src:o,alt:c,className:R?"size-[70%] object-contain":"h-full w-auto"}):a;return t({render:y,ref:P,props:{className:i("inline-flex items-center text-(--plass-fg) [&_svg]:h-full [&_svg]:w-auto",u[_],k),style:{...n(F,1,j),...A},children:s(l,{children:[e("span",{"aria-hidden":!!m(b)||void 0,className:i("flex shrink-0 items-center justify-center overflow-hidden",R?g[_]:x[_],R?h[j]:"","circle"===z?"rounded-full":R?p[_]:""),children:B}),q?s("span",{className:"flex min-w-0 flex-col",children:[m(b)?e("span",{className:i("truncate font-semibold",f[_]),children:b}):null,m(v)?e("span",{className:i("truncate text-(--plass-muted-fg)",d[_]),children:v}):null]}):null]}),...L}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PlAppLogo}from"./PlAppLogo.js";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type CartesianChartProps } from '../../internal/chart-frame.js';
|
|
3
|
+
import { type ChartMarkers } from '../../internal/chart-line.js';
|
|
4
|
+
import type { PlassChartCurve, PlassChartValueLabels } from '../../types.js';
|
|
5
|
+
export interface PlAreaChartProps extends CartesianChartProps {
|
|
6
|
+
/**
|
|
7
|
+
* How the edge of the band gets from one point to the next. The same three
|
|
8
|
+
* shapes a [PlLineChart](./line-chart) offers, and they mean the same things.
|
|
9
|
+
* @default 'linear'
|
|
10
|
+
*/
|
|
11
|
+
curve?: PlassChartCurve;
|
|
12
|
+
/**
|
|
13
|
+
* Stacks the bands, each one riding on the total of those below it.
|
|
14
|
+
*
|
|
15
|
+
* - `true` — absolute totals. The top edge is the sum, which is the thing a
|
|
16
|
+
* stacked area is usually drawn to show.
|
|
17
|
+
* - `'full'` — every category normalised to 100%, so the chart is about
|
|
18
|
+
* *share* and stops being about size. The value axis becomes a percentage
|
|
19
|
+
* and says so.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
stacked?: boolean | 'full';
|
|
23
|
+
/**
|
|
24
|
+
* Dots on the points. `none` by default rather than `auto`: a filled band
|
|
25
|
+
* already has a visible edge, and a row of dots on it is ink that says
|
|
26
|
+
* nothing the fill did not.
|
|
27
|
+
* @default 'none'
|
|
28
|
+
*/
|
|
29
|
+
markers?: ChartMarkers;
|
|
30
|
+
/** @default 'none' */
|
|
31
|
+
valueLabels?: PlassChartValueLabels;
|
|
32
|
+
/**
|
|
33
|
+
* Draws the band straight through a `null` instead of breaking at it. Off,
|
|
34
|
+
* and on an area it matters more than on a line: a fill that closes across a
|
|
35
|
+
* missing month paints a made-up number over a larger part of the chart.
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
connectNulls?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A line with the space under it filled — which changes what the chart is
|
|
42
|
+
* about.
|
|
43
|
+
*
|
|
44
|
+
* A line says where a value went. An area says how much of something there was,
|
|
45
|
+
* and stacked it says how that amount was made up. That is the whole test for
|
|
46
|
+
* reaching for this instead of a [PlLineChart](./line-chart): if the quantity
|
|
47
|
+
* does not add up to anything — a temperature, a rate, a score — the fill under
|
|
48
|
+
* it is decoration, and a chart with two of them is two washes fighting.
|
|
49
|
+
*
|
|
50
|
+
* Unstacked bands are a wash at about a quarter opacity, fading out downward,
|
|
51
|
+
* so two of them overlapping stay readable. Stacked bands are opaquer, because
|
|
52
|
+
* there the fill *is* the mark rather than a hint at the line above it.
|
|
53
|
+
*/
|
|
54
|
+
export declare function PlAreaChart({ curve, stacked, markers, valueLabels, connectNulls, series, yAxis, format, locale, ...props }: PlAreaChartProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import*as r from"react";import{CartesianChart as t}from"../../internal/chart-frame.js";import{LineSeries as a}from"../../internal/chart-line.js";import{stackToFull as n,writeChartValue as o}from"../../internal/chart.js";import{useDefaults as l}from"../../internal/defaults.js";export function PlAreaChart({curve:s="linear",stacked:i=!1,markers:c="none",valueLabels:m="none",connectNulls:u=!1,series:f,yAxis:d,format:p,locale:x,...h}){const j=l(),k=x??j.locale,v=r.useId().replace(/:/g,""),A="full"===i,b=r.useMemo(()=>A?n(f,e=>o(e,p,k)):f,[f,A,p,k]);return e(t,{...h,series:b,format:p,locale:x,yAxis:A?{min:0,max:100,tickFormat:e=>`${e}%`,...d}:d,stacked:!1!==i,inset:!0,includeZero:!0,headroom:"none"===m?0:10,children:r=>e(a,{context:r,curve:s,filled:!0,stacked:!1!==i,markers:c,valueLabels:m,connectNulls:u,gradient:!1,idPrefix:v})})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{PlAreaChart}from"./PlAreaChart.js";
|
|
@@ -7,8 +7,9 @@ import type { PlassSize } from '../../types.js';
|
|
|
7
7
|
* These are `object-fit`'s own values rather than a nicer set of words, for the
|
|
8
8
|
* reason the library keeps `aspect-ratio`'s own syntax below: inventing
|
|
9
9
|
* `fill-the-box` would only make a reader look up which CSS it maps to.
|
|
10
|
+
* `scale-down` is `contain` that never enlarges a file smaller than the box.
|
|
10
11
|
*/
|
|
11
|
-
export type PlAspectFit = 'cover' | 'contain' | 'fill' | 'none';
|
|
12
|
+
export type PlAspectFit = 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
|
|
12
13
|
export interface PlAspectRatioProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
13
14
|
/**
|
|
14
15
|
* The proportion the box holds, written the way CSS writes it — a number
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import*as e from"react";import{useDefaults as i}from"../../internal/defaults.js";import{useRender as o}from"@base-ui/react/use-render";import{cx as t,radiusClasses as c}from"../../internal/styles.js";const
|
|
1
|
+
"use client";import*as e from"react";import{useDefaults as i}from"../../internal/defaults.js";import{useRender as o}from"@base-ui/react/use-render";import{cx as t,radiusClasses as c}from"../../internal/styles.js";const l=/* @__PURE__ */["[&>img]:size-full","[&>video]:size-full","[&>canvas]:size-full","[&>svg]:size-full","[&>iframe]:size-full","[&>picture]:size-full","[&>picture>img]:size-full"].join(" "),r={cover:"[&>img]:object-cover [&>video]:object-cover [&>picture>img]:object-cover",contain:"[&>img]:object-contain [&>video]:object-contain [&>picture>img]:object-contain",fill:"[&>img]:object-fill [&>video]:object-fill [&>picture>img]:object-fill",none:"[&>img]:object-none [&>video]:object-none [&>picture>img]:object-none","scale-down":"[&>img]:object-scale-down [&>video]:object-scale-down [&>picture>img]:object-scale-down"};export const PlAspectRatio=/* @__PURE__ */e.forwardRef(function PlAspectRatio({ratio:e=1,fit:n="cover",rounded:s=!1,size:a,render:f,className:m,style:d,children:u,...j},b){const p=i(),v=a??p.size??"md",g=t("relative block w-full overflow-hidden",l,r[n],s?c[v]:"",m);return o({render:f,ref:b,props:{className:g,style:{aspectRatio:e,...d},children:u,...j}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as a from"react";import{useDefaults as t}from"../../internal/defaults.js";import{Avatar as s}from"@base-ui/react/avatar";import{
|
|
1
|
+
"use client";import{jsx as e,jsxs as r}from"react/jsx-runtime";import*as a from"react";import{useDefaults as t}from"../../internal/defaults.js";import{Avatar as s}from"@base-ui/react/avatar";import{controlHeightClasses as o,controlSlots as l,controlSquareClasses as n,forcedFieldEdgeClasses as i,glassClasses as c,hasContent as d,radiusClasses as m,srOnlyClasses as p,transitionClasses as f}from"../../internal/styles.js";const g={xs:"text-[0.5625rem]",sm:"text-[0.6875rem]",md:"text-[0.8125rem]",lg:"text-[1rem]",xl:"text-[1.1875rem]"},v={solid:/* @__PURE__ */["text-(--p-on-solid) [background-image:var(--p-fill)]","[box-shadow:var(--p-elev),var(--p-lift)]",i].join(" "),glass:/* @__PURE__ */[c,"border text-(--p-accent) bg-(--plass-glass)","[border-color:var(--plass-border)]","[box-shadow:var(--p-elev),var(--plass-gloss-glass)]"].join(" "),ghost:"text-(--p-accent) bg-(--p-soft-press) [box-shadow:var(--p-elev)]"},h=/* @__PURE__ */["relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden","align-middle leading-none font-semibold tracking-wide whitespace-nowrap","[&_svg]:pointer-events-none [&_svg]:size-[55%]",f].join(" ");function PersonIcon(){return r("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[e("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z"}),e("path",{d:"M12 14.25c-4.28 0-7.75 2.42-7.75 5.4 0 .75.6 1.35 1.35 1.35h12.8c.75 0 1.35-.6 1.35-1.35 0-2.98-3.47-5.4-7.75-5.4Z"})]})}export const PlAvatar=/* @__PURE__ */a.forwardRef(function PlAvatar({src:a,srcSet:i,alt:c,name:f,initials:u,shape:x,variant:b,size:j,color:y,elevation:w,delay:N,imageProps:z,onLoadingStatusChange:A,className:C,style:P,children:k,...B},S){const I=t(),L=x??"circle",F=b??"ghost",M=j??I.size??"md",R=y??I.color??"primary",Z=w??0,_=f?function initialsOf(e){const r=e.normalize("NFC").trim().split(/\s+/).filter(Boolean);return 0===r.length?"":((Array.from(r[0])[0]??"")+(r.length>1?Array.from(r[r.length-1])[0]??"":"")).toLocaleUpperCase()}(f):"",O=c??f,U=d(k)?k:(u??_)||e(PersonIcon,{}),q=d(k)||Boolean(u??_),D=[h,o[M],n[M],g[M],"circle"===L?"rounded-full":m[M],v[F],C??""].filter(Boolean).join(" ");return r(s.Root,{ref:S,className:D,style:{...l(R,Z,F),...P},...B,children:[a?e(s.Image,{src:a,srcSet:i,alt:O??"",className:"size-full object-cover",onLoadingStatusChange:A,...z}):null,r(s.Fallback,{delay:a?N:void 0,className:"flex size-full items-center justify-center",children:[O&&q?e("span",{className:p,children:O}):null,e("span",{"aria-hidden":!(!O||!q)||void 0,className:"contents",children:U})]})]})});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { type PlassScrollTarget } from '../../internal/scroll-target.js';
|
|
2
3
|
import type { PlassColor, PlassElevation, PlassSize, PlassVariant } from '../../types.js';
|
|
3
4
|
/** What is scrolled, and what is watched. */
|
|
4
|
-
export type PlBackTopTarget =
|
|
5
|
+
export type PlBackTopTarget = PlassScrollTarget;
|
|
5
6
|
export interface PlBackTopProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'color'> {
|
|
6
7
|
/**
|
|
7
8
|
* What is scrolled. The window by default; a ref or an element for a panel
|