material-plus-ui 1.5.0 → 1.7.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/README.md +2 -2
- package/dist/components/accordion/MPAccordion.d.ts +21 -1
- package/dist/components/accordion/MPAccordion.js +1 -1
- package/dist/components/alert/MPAlert.d.ts +33 -2
- package/dist/components/alert/MPAlert.js +1 -1
- package/dist/components/anchor/MPAnchor.d.ts +107 -0
- package/dist/components/anchor/MPAnchor.js +2 -0
- package/dist/components/anchor/index.d.ts +2 -0
- package/dist/components/anchor/index.js +1 -0
- package/dist/components/animate-appear/MPAnimateAppear.d.ts +2 -2
- package/dist/components/animate-appear/MPAnimateAppear.js +1 -1
- package/dist/components/animate-blink/MPAnimateBlink.d.ts +2 -2
- package/dist/components/animate-blink/MPAnimateBlink.js +2 -1
- package/dist/components/animate-counter/MPAnimateCounter.d.ts +67 -0
- package/dist/components/animate-counter/MPAnimateCounter.js +2 -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/MPAnimateFade.d.ts +2 -2
- package/dist/components/animate-fade/MPAnimateFade.js +2 -1
- package/dist/components/animate-float/MPAnimateFloat.d.ts +53 -0
- package/dist/components/animate-float/MPAnimateFloat.js +2 -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/MPAnimateGrow.d.ts +2 -2
- package/dist/components/animate-grow/MPAnimateGrow.js +2 -1
- package/dist/components/animate-lighting/MPAnimateLighting.js +2 -1
- package/dist/components/animate-reveal/MPAnimateReveal.d.ts +64 -0
- package/dist/components/animate-reveal/MPAnimateReveal.js +2 -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/MPAnimateRotate.d.ts +2 -2
- package/dist/components/animate-rotate/MPAnimateRotate.js +2 -1
- package/dist/components/animate-scramble/MPAnimateScramble.d.ts +65 -0
- package/dist/components/animate-scramble/MPAnimateScramble.js +2 -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/MPAnimateShake.d.ts +65 -0
- package/dist/components/animate-shake/MPAnimateShake.js +2 -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/MPAnimateSlide.d.ts +2 -2
- package/dist/components/animate-slide/MPAnimateSlide.js +2 -1
- package/dist/components/animate-split/MPAnimateSplit.d.ts +56 -0
- package/dist/components/animate-split/MPAnimateSplit.js +2 -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/MPAnimateTyping.js +1 -1
- package/dist/components/animate-zoom/MPAnimateZoom.d.ts +2 -2
- package/dist/components/animate-zoom/MPAnimateZoom.js +2 -1
- package/dist/components/app-logo/MPAppLogo.d.ts +156 -0
- package/dist/components/app-logo/MPAppLogo.js +2 -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/MPAreaChart.d.ts +79 -0
- package/dist/components/area-chart/MPAreaChart.js +2 -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/MPAspectRatio.js +2 -1
- package/dist/components/avatar/MPAvatar.d.ts +10 -1
- package/dist/components/avatar/MPAvatar.js +1 -1
- package/dist/components/badge/MPBadge.js +1 -1
- package/dist/components/bar-chart/MPBarChart.d.ts +74 -0
- package/dist/components/bar-chart/MPBarChart.js +2 -0
- package/dist/components/bar-chart/index.d.ts +2 -0
- package/dist/components/bar-chart/index.js +1 -0
- package/dist/components/blockquote/MPBlockquote.d.ts +10 -1
- package/dist/components/blockquote/MPBlockquote.js +1 -1
- package/dist/components/bottom-navigation/MPBottomNavigation.d.ts +19 -18
- package/dist/components/bottom-navigation/MPBottomNavigation.js +1 -1
- package/dist/components/box/MPBox.d.ts +43 -8
- package/dist/components/box/MPBox.js +2 -1
- package/dist/components/breadcrumb/MPBreadcrumb.js +1 -1
- package/dist/components/button/MPButton.d.ts +49 -3
- package/dist/components/button/MPButton.js +1 -1
- package/dist/components/calendar/MPCalendar.d.ts +160 -0
- package/dist/components/calendar/MPCalendar.js +2 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/calendar/index.js +1 -0
- package/dist/components/card/MPCard.js +1 -1
- package/dist/components/carousel/MPCarousel.js +1 -1
- package/dist/components/chat-bubble/MPChatBubble.js +1 -1
- package/dist/components/checkbox/MPCheckbox.js +1 -1
- package/dist/components/chip/MPChip.d.ts +31 -7
- package/dist/components/chip/MPChip.js +1 -1
- package/dist/components/code-block/MPCodeBlock.d.ts +177 -0
- package/dist/components/code-block/MPCodeBlock.js +2 -0
- package/dist/components/code-block/index.d.ts +2 -0
- package/dist/components/code-block/index.js +1 -0
- package/dist/components/collapsible/MPCollapsible.d.ts +12 -1
- package/dist/components/collapsible/MPCollapsible.js +1 -1
- package/dist/components/color-picker/MPColorPicker.js +1 -1
- package/dist/components/combobox/MPCombobox.d.ts +71 -5
- package/dist/components/combobox/MPCombobox.js +1 -1
- package/dist/components/command-palette/MPCommandPalette.d.ts +12 -2
- package/dist/components/command-palette/MPCommandPalette.js +1 -1
- package/dist/components/config/MPConfigProvider.d.ts +166 -0
- package/dist/components/config/MPConfigProvider.js +2 -0
- package/dist/components/config/index.d.ts +2 -0
- package/dist/components/config/index.js +1 -0
- package/dist/components/confirm/MPConfirmProvider.d.ts +143 -0
- package/dist/components/confirm/MPConfirmProvider.js +2 -0
- package/dist/components/confirm/index.d.ts +2 -0
- package/dist/components/confirm/index.js +1 -0
- package/dist/components/container/MPContainer.d.ts +9 -2
- package/dist/components/container/MPContainer.js +2 -1
- package/dist/components/data-list/MPDataList.d.ts +82 -0
- package/dist/components/data-list/MPDataList.js +2 -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/MPDataTable.d.ts +295 -0
- package/dist/components/data-table/MPDataTable.js +2 -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/MPDatePicker.d.ts +53 -2
- package/dist/components/date-picker/MPDatePicker.js +1 -1
- package/dist/components/date-picker/index.d.ts +1 -1
- package/dist/components/date-range-picker/MPDateRangePicker.js +1 -1
- package/dist/components/date-time-picker/MPDateTimePicker.js +1 -1
- package/dist/components/dialog/MPDialog.d.ts +24 -3
- package/dist/components/dialog/MPDialog.js +1 -1
- package/dist/components/divider/MPDivider.js +1 -1
- package/dist/components/drawer/MPDrawer.d.ts +8 -2
- package/dist/components/drawer/MPDrawer.js +1 -1
- package/dist/components/empty/MPEmpty.d.ts +10 -1
- package/dist/components/empty/MPEmpty.js +1 -1
- package/dist/components/fieldset/MPFieldset.js +1 -1
- package/dist/components/file-picker/MPFilePicker.js +1 -1
- package/dist/components/flex/MPFlex.d.ts +95 -0
- package/dist/components/flex/MPFlex.js +2 -0
- package/dist/components/flex/index.d.ts +2 -0
- package/dist/components/flex/index.js +1 -0
- package/dist/components/floating-action-button/MPFloatingActionButton.js +1 -1
- package/dist/components/floating-bottom-navigation/MPFloatingBottomNavigation.d.ts +127 -0
- package/dist/components/floating-bottom-navigation/MPFloatingBottomNavigation.js +2 -0
- package/dist/components/floating-bottom-navigation/index.d.ts +2 -0
- package/dist/components/floating-bottom-navigation/index.js +1 -0
- package/dist/components/footer/MPFooter.d.ts +24 -4
- package/dist/components/footer/MPFooter.js +1 -1
- package/dist/components/form/MPForm.js +1 -1
- package/dist/components/gauge-chart/MPGaugeChart.d.ts +78 -0
- package/dist/components/gauge-chart/MPGaugeChart.js +2 -0
- package/dist/components/gauge-chart/index.d.ts +2 -0
- package/dist/components/gauge-chart/index.js +1 -0
- package/dist/components/grid/MPGrid.d.ts +23 -1
- package/dist/components/grid/MPGrid.js +1 -1
- package/dist/components/header/MPHeader.d.ts +26 -4
- package/dist/components/header/MPHeader.js +1 -1
- package/dist/components/heatmap-chart/MPHeatmapChart.d.ts +75 -0
- package/dist/components/heatmap-chart/MPHeatmapChart.js +2 -0
- package/dist/components/heatmap-chart/index.d.ts +2 -0
- package/dist/components/heatmap-chart/index.js +1 -0
- package/dist/components/hover-card/MPHoverCard.d.ts +100 -0
- package/dist/components/hover-card/MPHoverCard.js +2 -0
- package/dist/components/hover-card/index.d.ts +2 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/image/MPImage.d.ts +121 -0
- package/dist/components/image/MPImage.js +2 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/image/index.js +1 -0
- package/dist/components/line-chart/MPLineChart.d.ts +66 -0
- package/dist/components/line-chart/MPLineChart.js +2 -0
- package/dist/components/line-chart/index.d.ts +2 -0
- package/dist/components/line-chart/index.js +1 -0
- package/dist/components/list/MPList.d.ts +51 -1
- package/dist/components/list/MPList.js +1 -1
- package/dist/components/menu/MPMenu.d.ts +21 -2
- package/dist/components/menu/MPMenu.js +1 -1
- package/dist/components/menubar/MPMenubar.js +1 -1
- package/dist/components/meter/MPMeter.d.ts +87 -0
- package/dist/components/meter/MPMeter.js +2 -0
- package/dist/components/meter/index.d.ts +2 -0
- package/dist/components/meter/index.js +1 -0
- package/dist/components/mockup/MPMockup.d.ts +143 -0
- package/dist/components/mockup/MPMockup.js +2 -0
- package/dist/components/mockup/index.d.ts +2 -0
- package/dist/components/mockup/index.js +1 -0
- package/dist/components/navigation-menu/MPNavigationMenu.js +1 -1
- package/dist/components/number-field/MPNumberField.d.ts +3 -3
- package/dist/components/number-field/MPNumberField.js +1 -1
- package/dist/components/otp-field/MPOtpField.js +1 -1
- package/dist/components/overlay/MPOverlay.d.ts +1 -1
- package/dist/components/overlay/MPOverlay.js +1 -1
- package/dist/components/pagination/MPPagination.js +1 -1
- package/dist/components/panes/MPPanes.js +1 -1
- package/dist/components/pie-chart/MPPieChart.d.ts +77 -0
- package/dist/components/pie-chart/MPPieChart.js +2 -0
- package/dist/components/pie-chart/index.d.ts +2 -0
- package/dist/components/pie-chart/index.js +1 -0
- package/dist/components/pill/MPPill.js +1 -1
- package/dist/components/popconfirm/MPPopconfirm.d.ts +92 -0
- package/dist/components/popconfirm/MPPopconfirm.js +2 -0
- package/dist/components/popconfirm/index.d.ts +2 -0
- package/dist/components/popconfirm/index.js +1 -0
- package/dist/components/popover/MPPopover.d.ts +1 -1
- package/dist/components/popover/MPPopover.js +1 -1
- package/dist/components/portal/MPPortal.d.ts +75 -0
- package/dist/components/portal/MPPortal.js +2 -0
- package/dist/components/portal/index.d.ts +2 -0
- package/dist/components/portal/index.js +1 -0
- package/dist/components/progress-box/MPProgressBox.js +1 -1
- package/dist/components/progress-circular/MPProgressCircular.js +1 -1
- package/dist/components/progress-linear/MPProgressLinear.js +1 -1
- package/dist/components/radio-group/MPRadioGroup.js +1 -1
- package/dist/components/rating/MPRating.js +1 -1
- package/dist/components/scatter-chart/MPScatterChart.d.ts +66 -0
- package/dist/components/scatter-chart/MPScatterChart.js +2 -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/MPScrollArea.d.ts +82 -0
- package/dist/components/scroll-area/MPScrollArea.js +2 -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/MPScrollZone.d.ts +165 -0
- package/dist/components/scroll-zone/MPScrollZone.js +2 -0
- package/dist/components/scroll-zone/index.d.ts +2 -0
- package/dist/components/scroll-zone/index.js +1 -0
- package/dist/components/segmented-button/MPSegmentedButton.js +1 -1
- package/dist/components/select/MPSelect.d.ts +28 -5
- package/dist/components/select/MPSelect.js +1 -1
- package/dist/components/shortcut/MPShortcut.js +1 -1
- package/dist/components/show/MPShow.d.ts +78 -0
- package/dist/components/show/MPShow.js +2 -0
- package/dist/components/show/index.d.ts +2 -0
- package/dist/components/show/index.js +1 -0
- package/dist/components/sidebar/MPSidebar.d.ts +20 -1
- package/dist/components/sidebar/MPSidebar.js +1 -1
- package/dist/components/skeleton/MPSkeleton.js +1 -1
- package/dist/components/slider/MPSlider.d.ts +27 -0
- package/dist/components/slider/MPSlider.js +1 -1
- package/dist/components/snackbar/MPSnackbar.d.ts +20 -1
- package/dist/components/snackbar/MPSnackbar.js +1 -1
- package/dist/components/sparkline/MPSparkline.d.ts +85 -0
- package/dist/components/sparkline/MPSparkline.js +2 -0
- package/dist/components/sparkline/index.d.ts +2 -0
- package/dist/components/sparkline/index.js +1 -0
- package/dist/components/spoiler/MPSpoiler.d.ts +12 -0
- package/dist/components/spoiler/MPSpoiler.js +1 -1
- package/dist/components/stack/MPStack.d.ts +198 -0
- package/dist/components/stack/MPStack.js +2 -0
- package/dist/components/stack/index.d.ts +2 -0
- package/dist/components/stack/index.js +1 -0
- package/dist/components/statistic/MPStatistic.d.ts +104 -0
- package/dist/components/statistic/MPStatistic.js +2 -0
- package/dist/components/statistic/index.d.ts +2 -0
- package/dist/components/statistic/index.js +1 -0
- package/dist/components/stepper/MPStepper.d.ts +153 -0
- package/dist/components/stepper/MPStepper.js +2 -0
- package/dist/components/stepper/index.d.ts +2 -0
- package/dist/components/stepper/index.js +1 -0
- package/dist/components/switch/MPSwitch.js +1 -1
- package/dist/components/table/MPTable.d.ts +24 -2
- package/dist/components/table/MPTable.js +1 -1
- package/dist/components/tabs/MPTabs.d.ts +12 -0
- package/dist/components/tabs/MPTabs.js +1 -1
- package/dist/components/text-field/MPTextField.d.ts +38 -14
- package/dist/components/text-field/MPTextField.js +1 -1
- package/dist/components/time-picker/MPTimePicker.js +1 -1
- package/dist/components/timeline/MPTimeline.d.ts +10 -2
- package/dist/components/timeline/MPTimeline.js +1 -1
- package/dist/components/timeline-chart/MPTimelineChart.d.ts +63 -0
- package/dist/components/timeline-chart/MPTimelineChart.js +2 -0
- package/dist/components/timeline-chart/index.d.ts +2 -0
- package/dist/components/timeline-chart/index.js +1 -0
- package/dist/components/toggle/MPToggle.js +1 -1
- package/dist/components/toolbar/MPToolbar.d.ts +106 -0
- package/dist/components/toolbar/MPToolbar.js +2 -0
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/index.js +1 -0
- package/dist/components/tour/MPTour.d.ts +120 -0
- package/dist/components/tour/MPTour.js +2 -0
- package/dist/components/tour/index.d.ts +2 -0
- package/dist/components/tour/index.js +1 -0
- package/dist/components/transfer/MPTransfer.js +1 -1
- package/dist/components/tree-select/MPTreeSelect.d.ts +113 -0
- package/dist/components/tree-select/MPTreeSelect.js +2 -0
- package/dist/components/tree-select/index.d.ts +2 -0
- package/dist/components/tree-select/index.js +1 -0
- package/dist/components/tree-view/MPTreeView.d.ts +153 -0
- package/dist/components/tree-view/MPTreeView.js +2 -0
- package/dist/components/tree-view/index.d.ts +2 -0
- package/dist/components/tree-view/index.js +1 -0
- package/dist/components/typography/MPTypography.d.ts +17 -1
- package/dist/components/typography/MPTypography.js +1 -1
- package/dist/components/visually-hidden/MPVisuallyHidden.d.ts +60 -0
- package/dist/components/visually-hidden/MPVisuallyHidden.js +2 -0
- package/dist/components/visually-hidden/index.d.ts +2 -0
- package/dist/components/visually-hidden/index.js +1 -0
- package/dist/constants/glyphs.d.ts +4 -0
- package/dist/constants/glyphs.js +1 -1
- package/dist/constants/icons.d.ts +2 -0
- package/dist/constants/icons.js +1 -1
- package/dist/hooks/index.d.ts +40 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useMPColorScheme.d.ts +135 -0
- package/dist/hooks/useMPColorScheme.js +2 -0
- package/dist/hooks/useMPDisclosure.d.ts +58 -0
- package/dist/hooks/useMPDisclosure.js +2 -0
- package/dist/hooks/useMPElementSize.d.ts +55 -0
- package/dist/hooks/useMPElementSize.js +2 -0
- package/dist/hooks/useMPMediaQuery.d.ts +40 -0
- package/dist/hooks/useMPMediaQuery.js +2 -0
- package/dist/hooks/useMPOnScreen.d.ts +58 -0
- package/dist/hooks/useMPOnScreen.js +2 -0
- package/dist/hooks/useMPReducedMotion.d.ts +32 -0
- package/dist/hooks/useMPReducedMotion.js +2 -0
- package/dist/hooks/useMPShortcut.d.ts +105 -0
- package/dist/hooks/useMPShortcut.js +2 -0
- package/dist/hooks/useMPWindowClass.d.ts +55 -0
- package/dist/hooks/useMPWindowClass.js +2 -0
- package/dist/index.d.ts +43 -1
- package/dist/index.js +1 -1
- package/dist/internal/Calendar.d.ts +19 -4
- package/dist/internal/Calendar.js +1 -1
- package/dist/internal/ChartChrome.d.ts +205 -0
- package/dist/internal/ChartChrome.js +2 -0
- package/dist/internal/ChartFrame.d.ts +197 -0
- package/dist/internal/ChartFrame.js +2 -0
- package/dist/internal/FieldOutline.d.ts +14 -5
- package/dist/internal/FieldOutline.js +1 -1
- package/dist/internal/Picker.d.ts +15 -3
- package/dist/internal/Picker.js +1 -1
- package/dist/internal/SupportingText.d.ts +24 -0
- package/dist/internal/SupportingText.js +1 -1
- package/dist/internal/animate-core.d.ts +121 -0
- package/dist/internal/animate-core.js +1 -0
- package/dist/internal/animate.d.ts +75 -55
- package/dist/internal/animate.js +1 -1
- package/dist/internal/bottom-navigation.d.ts +58 -0
- package/dist/internal/bottom-navigation.js +2 -0
- package/dist/internal/chart.d.ts +471 -0
- package/dist/internal/chart.js +1 -0
- package/dist/internal/color-scheme.d.ts +28 -0
- package/dist/internal/color-scheme.js +2 -0
- package/dist/internal/config.d.ts +62 -0
- package/dist/internal/config.js +2 -0
- package/dist/internal/data-table.d.ts +162 -0
- package/dist/internal/data-table.js +1 -0
- package/dist/internal/date.d.ts +50 -3
- package/dist/internal/date.js +1 -1
- package/dist/internal/density.d.ts +9 -0
- package/dist/internal/density.js +1 -0
- package/dist/internal/elevation.d.ts +26 -0
- package/dist/internal/elevation.js +1 -0
- package/dist/internal/highlight.d.ts +96 -0
- package/dist/internal/highlight.js +1 -0
- package/dist/internal/i18n.d.ts +196 -1
- package/dist/internal/initials.d.ts +28 -0
- package/dist/internal/initials.js +1 -0
- package/dist/internal/mark.d.ts +52 -0
- package/dist/internal/mark.js +1 -0
- package/dist/internal/measure.d.ts +31 -0
- package/dist/internal/measure.js +1 -0
- package/dist/internal/messages/anchor.d.ts +3 -0
- package/dist/internal/messages/anchor.js +1 -0
- package/dist/internal/messages/chart.d.ts +3 -0
- package/dist/internal/messages/chart.js +1 -0
- package/dist/internal/messages/code.d.ts +3 -0
- package/dist/internal/messages/code.js +1 -0
- package/dist/internal/messages/confirm.d.ts +3 -0
- package/dist/internal/messages/confirm.js +1 -0
- package/dist/internal/messages/data-table.d.ts +3 -0
- package/dist/internal/messages/data-table.js +1 -0
- package/dist/internal/messages/picker.js +1 -1
- package/dist/internal/messages/scroll.d.ts +3 -0
- package/dist/internal/messages/scroll.js +1 -0
- package/dist/internal/messages/sparkline.d.ts +3 -0
- package/dist/internal/messages/sparkline.js +1 -0
- package/dist/internal/messages/tour.d.ts +3 -0
- package/dist/internal/messages/tour.js +1 -0
- package/dist/internal/mockup.d.ts +174 -0
- package/dist/internal/mockup.js +2 -0
- package/dist/internal/page-layout.d.ts +24 -5
- package/dist/internal/page-layout.js +1 -1
- package/dist/internal/progress.d.ts +14 -0
- package/dist/internal/responsive.d.ts +55 -0
- package/dist/internal/responsive.js +1 -0
- package/dist/internal/scale.d.ts +0 -17
- package/dist/internal/scale.js +1 -1
- package/dist/internal/step.d.ts +86 -0
- package/dist/internal/step.js +1 -0
- package/dist/internal/table.d.ts +53 -0
- package/dist/internal/table.js +1 -0
- package/dist/internal/text.d.ts +57 -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/time-scale.d.ts +44 -0
- package/dist/internal/time-scale.js +1 -0
- package/dist/internal/transition.d.ts +33 -0
- package/dist/internal/transition.js +1 -0
- package/dist/internal/visibility.d.ts +48 -0
- package/dist/internal/visibility.js +1 -0
- package/dist/internal/window-class.d.ts +48 -0
- package/dist/internal/window-class.js +2 -0
- package/dist/locales/ar.js +1 -1
- package/dist/locales/de.js +1 -1
- package/dist/locales/es.js +1 -1
- package/dist/locales/fr.js +1 -1
- package/dist/locales/hi.js +1 -1
- package/dist/locales/id.js +1 -1
- package/dist/locales/it.js +1 -1
- package/dist/locales/ja.js +1 -1
- package/dist/locales/ko.js +1 -1
- package/dist/locales/nl.js +1 -1
- package/dist/locales/pl.js +1 -1
- package/dist/locales/pt.js +1 -1
- package/dist/locales/ru.js +1 -1
- package/dist/locales/th.js +1 -1
- package/dist/locales/tr.js +1 -1
- package/dist/locales/vi.js +1 -1
- package/dist/locales/zh-hans.js +1 -1
- package/dist/locales/zh-hant.js +1 -1
- package/dist/styles/accordion.css +1 -1
- package/dist/styles/alert.css +1 -1
- package/dist/styles/anchor.css +2 -0
- package/dist/styles/animate-appear.css +1 -1
- package/dist/styles/animate-blink.css +1 -1
- package/dist/styles/animate-counter.css +2 -0
- package/dist/styles/animate-fade.css +1 -1
- package/dist/styles/animate-float.css +2 -0
- package/dist/styles/animate-grow.css +1 -1
- package/dist/styles/animate-headline.css +1 -1
- package/dist/styles/animate-lighting.css +1 -1
- package/dist/styles/animate-marquee.css +1 -1
- package/dist/styles/animate-reveal.css +2 -0
- package/dist/styles/animate-rotate.css +1 -1
- package/dist/styles/animate-scramble.css +2 -0
- package/dist/styles/animate-shake.css +2 -0
- package/dist/styles/animate-slide.css +1 -1
- package/dist/styles/animate-split.css +2 -0
- package/dist/styles/animate-typing.css +1 -1
- package/dist/styles/animate-zoom.css +1 -1
- package/dist/styles/app-logo.css +2 -0
- package/dist/styles/area-chart.css +2 -0
- package/dist/styles/aspect-ratio.css +1 -1
- package/dist/styles/avatar.css +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/bar-chart.css +2 -0
- package/dist/styles/blockquote.css +1 -1
- package/dist/styles/bottom-navigation.css +1 -1
- package/dist/styles/box.css +1 -1
- package/dist/styles/breadcrumb.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/calendar.css +2 -0
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/chat-bubble.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chip.css +1 -1
- package/dist/styles/code-block.css +2 -0
- package/dist/styles/collapsible.css +1 -1
- package/dist/styles/color-picker.css +1 -1
- package/dist/styles/combobox.css +1 -1
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/config.css +2 -0
- package/dist/styles/confirm.css +2 -0
- package/dist/styles/container.css +1 -1
- package/dist/styles/data-list.css +2 -0
- package/dist/styles/data-table.css +2 -0
- package/dist/styles/date-picker.css +1 -1
- package/dist/styles/date-range-picker.css +1 -1
- package/dist/styles/date-time-picker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/empty.css +1 -1
- package/dist/styles/fieldset.css +1 -1
- package/dist/styles/file-picker.css +1 -1
- package/dist/styles/flex.css +2 -0
- package/dist/styles/floating-action-button.css +1 -1
- package/dist/styles/floating-bottom-navigation.css +2 -0
- package/dist/styles/footer.css +1 -1
- package/dist/styles/form.css +1 -1
- package/dist/styles/gauge-chart.css +2 -0
- package/dist/styles/grid.css +1 -1
- package/dist/styles/header.css +1 -1
- package/dist/styles/heatmap-chart.css +2 -0
- package/dist/styles/highlight.css +1 -1
- package/dist/styles/hover-card.css +2 -0
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/image.css +2 -0
- package/dist/styles/line-chart.css +2 -0
- package/dist/styles/list.css +1 -1
- package/dist/styles/locale.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/meter.css +2 -0
- package/dist/styles/mockup.css +2 -0
- package/dist/styles/navigation-menu.css +1 -1
- package/dist/styles/number-field.css +1 -1
- package/dist/styles/otp-field.css +1 -1
- package/dist/styles/overlay.css +1 -1
- package/dist/styles/page-layout.css +1 -1
- package/dist/styles/pagination.css +1 -1
- package/dist/styles/panes.css +1 -1
- package/dist/styles/pie-chart.css +2 -0
- package/dist/styles/pill.css +1 -1
- package/dist/styles/popconfirm.css +2 -0
- package/dist/styles/popover.css +1 -1
- package/dist/styles/portal.css +2 -0
- package/dist/styles/progress-box.css +1 -1
- package/dist/styles/progress-circular.css +1 -1
- package/dist/styles/progress-linear.css +1 -1
- package/dist/styles/radio-group.css +1 -1
- package/dist/styles/rating.css +1 -1
- package/dist/styles/scatter-chart.css +2 -0
- package/dist/styles/scroll-area.css +2 -0
- package/dist/styles/scroll-zone.css +2 -0
- package/dist/styles/segmented-button.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/shortcut.css +1 -1
- package/dist/styles/show.css +2 -0
- package/dist/styles/sidebar.css +1 -1
- package/dist/styles/skeleton.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/sparkline.css +2 -0
- package/dist/styles/spoiler.css +1 -1
- package/dist/styles/stack.css +2 -0
- package/dist/styles/statistic.css +2 -0
- package/dist/styles/stepper.css +2 -0
- package/dist/styles/switch.css +1 -1
- package/dist/styles/table.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/text-link.css +1 -1
- package/dist/styles/time-picker.css +1 -1
- package/dist/styles/timeline-chart.css +2 -0
- package/dist/styles/timeline.css +1 -1
- package/dist/styles/toggle.css +1 -1
- package/dist/styles/tokens.css +1 -1
- package/dist/styles/toolbar.css +2 -0
- package/dist/styles/tour.css +2 -0
- package/dist/styles/transfer.css +1 -1
- package/dist/styles/tree-select.css +2 -0
- package/dist/styles/tree-view.css +2 -0
- package/dist/styles/typography.css +1 -1
- package/dist/styles/visually-hidden.css +2 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1423 -114
- package/dist/types.d.ts +628 -3
- package/package.json +8 -2
- package/dist/components/avatar-group/MPAvatarGroup.d.ts +0 -74
- package/dist/components/avatar-group/MPAvatarGroup.js +0 -2
- package/dist/components/avatar-group/index.d.ts +0 -2
- package/dist/components/avatar-group/index.js +0 -1
- package/dist/internal/avatar-group.d.ts +0 -22
- package/dist/internal/avatar-group.js +0 -2
- package/dist/styles/avatar-group.css +0 -2
package/dist/internal/i18n.d.ts
CHANGED
|
@@ -137,8 +137,17 @@ export interface MPMessages {
|
|
|
137
137
|
/** The two header buttons that open the month grid and the year grid. */
|
|
138
138
|
chooseMonth: string;
|
|
139
139
|
chooseYear: string;
|
|
140
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* The footer's actions.
|
|
142
|
+
*
|
|
143
|
+
* `today` has two coarser spellings rather than one word doing all three
|
|
144
|
+
* jobs: the shortcut lands on whatever unit the picker asks for, and a
|
|
145
|
+
* button that said *Today* on a year picker would be naming a day the
|
|
146
|
+
* control has no way to choose.
|
|
147
|
+
*/
|
|
141
148
|
today: string;
|
|
149
|
+
thisMonth: string;
|
|
150
|
+
thisYear: string;
|
|
142
151
|
now: string;
|
|
143
152
|
clear: string;
|
|
144
153
|
done: string;
|
|
@@ -180,6 +189,57 @@ export interface MPMessages {
|
|
|
180
189
|
/** One slide, and its own position mark. `Slide 2 of 5`. */
|
|
181
190
|
slide: string;
|
|
182
191
|
};
|
|
192
|
+
/**
|
|
193
|
+
* MPScrollZone.
|
|
194
|
+
*
|
|
195
|
+
* Read out and never drawn, like the carousel's above — but a namespace of
|
|
196
|
+
* its own rather than three more keys in that one, because the words differ
|
|
197
|
+
* where it matters. A carousel's arrow moves to the *slide* before this one
|
|
198
|
+
* and there is a countable thing on the other side of the press; a scroll
|
|
199
|
+
* zone's moves the strip along and lands wherever the content happens to
|
|
200
|
+
* start. A translation that reused *Previous slide* for it would be naming a
|
|
201
|
+
* slide the reader is not being taken to.
|
|
202
|
+
*/
|
|
203
|
+
scroll: {
|
|
204
|
+
/** What the strip is called when the caller has not said what is in it. */
|
|
205
|
+
label: string;
|
|
206
|
+
/** The two buttons, named by which way they travel. */
|
|
207
|
+
previous: string;
|
|
208
|
+
next: string;
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* MPAnchor.
|
|
212
|
+
*
|
|
213
|
+
* One string, and it is read out rather than drawn: the rows are the page's
|
|
214
|
+
* own headings, and the only thing the component says on its own behalf is
|
|
215
|
+
* what the `<nav>` around them is called. A page with a table of contents and
|
|
216
|
+
* a menu in it has two navigation landmarks, and a screen reader that offers
|
|
217
|
+
* both of them as "navigation" has told the reader nothing.
|
|
218
|
+
*/
|
|
219
|
+
anchor: {
|
|
220
|
+
/** The name of the `<nav>` the list of headings is inside. */
|
|
221
|
+
label: string;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* MPCodeBlock.
|
|
225
|
+
*
|
|
226
|
+
* Two of these are **drawn** — the copy button says its own word, and says a
|
|
227
|
+
* different one once the clipboard has taken the code — which is unusual in
|
|
228
|
+
* this table and is what makes the namespace necessary. A Korean page with a
|
|
229
|
+
* button reading *Copy* is a page the component broke.
|
|
230
|
+
*/
|
|
231
|
+
code: {
|
|
232
|
+
/** The button that puts the code on the clipboard. */
|
|
233
|
+
copy: string;
|
|
234
|
+
/** What it says for a moment afterwards. */
|
|
235
|
+
copied: string;
|
|
236
|
+
/** And what it says when the browser refused. */
|
|
237
|
+
copyFailed: string;
|
|
238
|
+
/** The toggle that drops the colouring. Read out; the button is a glyph. */
|
|
239
|
+
raw: string;
|
|
240
|
+
/** What the scrollable region is called when nothing named it. */
|
|
241
|
+
label: string;
|
|
242
|
+
};
|
|
183
243
|
/**
|
|
184
244
|
* MPBreadcrumb.
|
|
185
245
|
*
|
|
@@ -206,6 +266,74 @@ export interface MPMessages {
|
|
|
206
266
|
/** The row that offers what was typed as a value of its own. */
|
|
207
267
|
add: string;
|
|
208
268
|
};
|
|
269
|
+
/**
|
|
270
|
+
* MPSparkline.
|
|
271
|
+
*
|
|
272
|
+
* One string, and it is the whole of what a sparkline says to a reader who
|
|
273
|
+
* cannot see it. The mark has no axis and no tooltip — see the note on the
|
|
274
|
+
* component — so the shape has to arrive as a sentence or not at all.
|
|
275
|
+
*
|
|
276
|
+
* `{count}`, `{first}` and `{last}` are filled in by `fillMessage`, and the
|
|
277
|
+
* two ends rather than the two extremes because it is the direction a reader
|
|
278
|
+
* wants from a sparkline: 120 to 400 says which way it went, and 90 to 410
|
|
279
|
+
* does not.
|
|
280
|
+
*/
|
|
281
|
+
/**
|
|
282
|
+
* The framed charts.
|
|
283
|
+
*
|
|
284
|
+
* Three words, and every one of them is a name for a thing the chart drew
|
|
285
|
+
* rather than a thing the caller wrote. A chart's own content — its series
|
|
286
|
+
* names, its categories, its title — is the caller's and is never translated
|
|
287
|
+
* here; these are the scaffolding around it.
|
|
288
|
+
*
|
|
289
|
+
* `label` is the fallback accessible name. A chart is a focusable
|
|
290
|
+
* `role="img"`, and one with nothing to be called by is a tab stop that
|
|
291
|
+
* announces silence, so there is always a name even when the caller gave
|
|
292
|
+
* none.
|
|
293
|
+
*
|
|
294
|
+
* `table` names the grid under every chart — the relief channel that makes a
|
|
295
|
+
* picture readable to somebody who cannot see it — and `category` heads its
|
|
296
|
+
* first column, the one holding whatever the marks are filed under.
|
|
297
|
+
*/
|
|
298
|
+
chart: {
|
|
299
|
+
/** What an unnamed chart is called. */
|
|
300
|
+
label: string;
|
|
301
|
+
/** The caption on the table under it. */
|
|
302
|
+
table: string;
|
|
303
|
+
/** The heading over that table's first column. */
|
|
304
|
+
category: string;
|
|
305
|
+
};
|
|
306
|
+
sparkline: {
|
|
307
|
+
summary: string;
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* MPTour.
|
|
311
|
+
*
|
|
312
|
+
* The four buttons and the counter — every one of them drawn, and none of
|
|
313
|
+
* them the caller's. A tour is a component whose whole content is somebody
|
|
314
|
+
* else's writing, so these five are the only words it says on its own behalf,
|
|
315
|
+
* and a tour whose steps are in Korean under a *Next* button is a tour that
|
|
316
|
+
* was translated halfway.
|
|
317
|
+
*
|
|
318
|
+
* The × is `common`'s, because it is the same × every sheet in the library
|
|
319
|
+
* closes with.
|
|
320
|
+
*
|
|
321
|
+
* `{index}` and `{total}` are filled in by `fillMessage`, and they are
|
|
322
|
+
* positional for the reason the pagination's are: a language that counts the
|
|
323
|
+
* total first is not one an argument order can serve.
|
|
324
|
+
*/
|
|
325
|
+
tour: {
|
|
326
|
+
/** Back one step. Missing on the first. */
|
|
327
|
+
previous: string;
|
|
328
|
+
/** On one step. */
|
|
329
|
+
next: string;
|
|
330
|
+
/** What Next becomes on the last step. */
|
|
331
|
+
done: string;
|
|
332
|
+
/** Leaves the tour without finishing it. */
|
|
333
|
+
skip: string;
|
|
334
|
+
/** Where the reader is: "Step 2 of 5". */
|
|
335
|
+
position: string;
|
|
336
|
+
};
|
|
209
337
|
/**
|
|
210
338
|
* MPTable.
|
|
211
339
|
*
|
|
@@ -216,6 +344,57 @@ export interface MPMessages {
|
|
|
216
344
|
table: {
|
|
217
345
|
empty: string;
|
|
218
346
|
};
|
|
347
|
+
/**
|
|
348
|
+
* MPDataTable.
|
|
349
|
+
*
|
|
350
|
+
* The words the table says on its own behalf, and not one of them is the
|
|
351
|
+
* caller's data. Three are read out and never drawn — the ticks have no
|
|
352
|
+
* visible label, and a column of unnamed checkboxes is a column a screen
|
|
353
|
+
* reader announces as nothing at all — and three are drawn in the bar under
|
|
354
|
+
* the rows.
|
|
355
|
+
*
|
|
356
|
+
* The empty line is `table`'s, the search field's word is `transfer`'s and the
|
|
357
|
+
* pages are `pagination`'s: what is here is only what none of them says.
|
|
358
|
+
*
|
|
359
|
+
* `{count}` and `{total}` are filled in by `fillMessage`.
|
|
360
|
+
*/
|
|
361
|
+
dataTable: {
|
|
362
|
+
/** The tick in the header, which chooses every row on the page. */
|
|
363
|
+
selectAll: string;
|
|
364
|
+
/** One row's tick. Read out with the row it is in. */
|
|
365
|
+
selectRow: string;
|
|
366
|
+
/**
|
|
367
|
+
* How many rows there are, after the search and before the page.
|
|
368
|
+
*
|
|
369
|
+
* A label with a number after it — "Rows: 7" — in every language that
|
|
370
|
+
* inflects a noun for number, and the natural phrase in the ones that do
|
|
371
|
+
* not. "1 rows" is what a single `{total} rows` says one row in seven times
|
|
372
|
+
* out of seven, and the alternative is a plural form per language in a table
|
|
373
|
+
* that holds one string per key: Polish and Arabic need four and six of
|
|
374
|
+
* them. Naming the thing and then counting it is right in every language and
|
|
375
|
+
* costs nothing.
|
|
376
|
+
*/
|
|
377
|
+
total: string;
|
|
378
|
+
/**
|
|
379
|
+
* And how many of them are held, when any are.
|
|
380
|
+
*
|
|
381
|
+
* A second fact beside the first rather than a sentence joining the two.
|
|
382
|
+
* Written as one — "{count} of {total} selected" — the two numbers are
|
|
383
|
+
* counted over different sets, because a row the search has hidden is still
|
|
384
|
+
* chosen: a table of seven with one hidden row held would have said "1 of 1
|
|
385
|
+
* selected" the moment a search left one row on screen.
|
|
386
|
+
*/
|
|
387
|
+
selected: string;
|
|
388
|
+
/** The button that writes the rows out as a file. */
|
|
389
|
+
download: string;
|
|
390
|
+
/** The label on the footer's page-size control. */
|
|
391
|
+
perPage: string;
|
|
392
|
+
/**
|
|
393
|
+
* The handle between two headings, which is a control a keyboard can reach:
|
|
394
|
+
* the arrow keys widen and narrow the column it belongs to.
|
|
395
|
+
*/
|
|
396
|
+
resize: string;
|
|
397
|
+
};
|
|
219
398
|
/**
|
|
220
399
|
* MPFilePicker.
|
|
221
400
|
*
|
|
@@ -431,6 +610,22 @@ export interface MPMessages {
|
|
|
431
610
|
/** What the trigger reads before anything has been chosen. */
|
|
432
611
|
empty: string;
|
|
433
612
|
};
|
|
613
|
+
/**
|
|
614
|
+
* The two buttons on a confirmation, and the one on an acknowledgement.
|
|
615
|
+
*
|
|
616
|
+
* A namespace of its own rather than three more entries in `common`, because
|
|
617
|
+
* `common` is the glyph labels — the × that is read out as *close* — and these
|
|
618
|
+
* are the words on the buttons themselves. A caller who wants *Delete* rather
|
|
619
|
+
* than *Confirm* passes a label; these are what is drawn when they do not.
|
|
620
|
+
*/
|
|
621
|
+
confirm: {
|
|
622
|
+
/** The button that says yes. */
|
|
623
|
+
confirm: string;
|
|
624
|
+
/** The button that says no, and what a dismissal counts as. */
|
|
625
|
+
cancel: string;
|
|
626
|
+
/** The single button on an acknowledgement, which has nothing to refuse. */
|
|
627
|
+
ok: string;
|
|
628
|
+
};
|
|
434
629
|
}
|
|
435
630
|
/** A translation may fill in as much or as little of the table as it has. */
|
|
436
631
|
export type MPPartialMessages = {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A name reduced to the letters that stand in for it.
|
|
3
|
+
*
|
|
4
|
+
* The first character of the first word plus the first of the last — "Jane Doe"
|
|
5
|
+
* is `JD`, "Acme Supply Co" is `AC`, and "홍길동" is `홍`.
|
|
6
|
+
*
|
|
7
|
+
* One word gives one character on purpose. Korean, Japanese and Chinese names
|
|
8
|
+
* are a single token, and two of their characters at 32px is a smudge where one
|
|
9
|
+
* of them is a name.
|
|
10
|
+
*
|
|
11
|
+
* `Array.from` rather than indexing, and that is the whole reason this is a
|
|
12
|
+
* function rather than a `slice(0, 1)` at each call site: a string index is a
|
|
13
|
+
* UTF-16 code unit, so `name[0]` on a name beginning with an emoji or any
|
|
14
|
+
* character outside the basic plane returns half of it, and half a surrogate
|
|
15
|
+
* pair renders as the replacement glyph. `normalize('NFC')` is the other half
|
|
16
|
+
* of the same care — a decomposed "Å" would otherwise give the bare A, with the
|
|
17
|
+
* ring left behind on the next character.
|
|
18
|
+
*
|
|
19
|
+
* The rule is wrong for some names, which is what every caller's own `initials`
|
|
20
|
+
* prop is for. It is not wrong often enough to be worth a locale-aware guess
|
|
21
|
+
* that would be wrong differently.
|
|
22
|
+
*
|
|
23
|
+
* A file of its own because two components need it and neither should import
|
|
24
|
+
* the other. `MPAvatar` derives a person's initials and `MPAppLogo` derives a
|
|
25
|
+
* product's, and a page carrying both would otherwise be able to disagree with
|
|
26
|
+
* itself about what a two-word name comes to.
|
|
27
|
+
*/
|
|
28
|
+
export declare function initialsOf(name: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function initialsOf(r){const t=r.normalize("NFC").trim().split(/\s+/).filter(Boolean);if(0===t.length)return"";return((Array.from(t[0])[0]??"")+(t.length>1?Array.from(t[t.length-1])[0]??"":"")).toLocaleUpperCase()}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mark that comes and goes, and the timing every one of them shares.
|
|
3
|
+
*
|
|
4
|
+
* Six controls in this library draw a small shape to say "this one" — a
|
|
5
|
+
* checkbox's tick, a radio's dot, the tick beside a chosen row in a select, in a
|
|
6
|
+
* combobox, and in a menu's two kinds of item. They are the same event, so they
|
|
7
|
+
* have to be the same motion: a tick that grows into a `MPSelect` and one that
|
|
8
|
+
* is stamped into an `MPMenu` beside it read as two libraries, and that is
|
|
9
|
+
* exactly what the library had before this file.
|
|
10
|
+
*
|
|
11
|
+
* It is a string rather than a component because the elements it goes on are
|
|
12
|
+
* Base UI's own indicator parts. There is nothing to wrap: what differs between
|
|
13
|
+
* the six is which part renders and what the mark is drawn with, and what does
|
|
14
|
+
* not differ is the two hundred milliseconds and the frame it arrives from.
|
|
15
|
+
*
|
|
16
|
+
* ## Two from-states, because there are two kinds of mark
|
|
17
|
+
*
|
|
18
|
+
* A tick is a **stroke**. Drawn from nothing it spends its first frames as a
|
|
19
|
+
* smudge too small to read as a tick, and the eye takes the arrival for a
|
|
20
|
+
* flicker rather than for a stroke — so it starts at 0.6, already legible.
|
|
21
|
+
*
|
|
22
|
+
* A dot is a **disc**, and a disc at any size is still a disc. It can grow out
|
|
23
|
+
* of the centre of the ring taking the accent around it, which is the arrival
|
|
24
|
+
* MD3 draws for a radio.
|
|
25
|
+
*
|
|
26
|
+
* ## Why the third one is spelled differently
|
|
27
|
+
*
|
|
28
|
+
* `data-starting-style` and `data-ending-style` are Base UI's own two frames,
|
|
29
|
+
* and they are what `MARK_MOTION` and `DOT_MOTION` are written against. They
|
|
30
|
+
* work wherever the part stays mounted for the length of its exit, which the
|
|
31
|
+
* checkbox's, the radio's and the menu's indicators all do.
|
|
32
|
+
*
|
|
33
|
+
* `Select.ItemIndicator` and `Combobox.ItemIndicator` do not: both return `null`
|
|
34
|
+
* the moment their row stops being the chosen one, so `data-ending-style` never
|
|
35
|
+
* reaches the DOM and a tick that faded in vanished in a frame. Their answer is
|
|
36
|
+
* `keepMounted` plus `MARK_MOTION_KEPT`, which drives both directions off
|
|
37
|
+
* `data-selected` and needs neither frame. The cost is one empty `aria-hidden`
|
|
38
|
+
* span per row, in a column the list already reserves the width of.
|
|
39
|
+
*/
|
|
40
|
+
/** A stroke, arriving from 0.6 and leaving the same way. */
|
|
41
|
+
export declare const MARK_MOTION: string;
|
|
42
|
+
/** A disc, arriving from nothing. */
|
|
43
|
+
export declare const DOT_MOTION: string;
|
|
44
|
+
/**
|
|
45
|
+
* A stroke on a part that is kept mounted, so its resting state is the empty
|
|
46
|
+
* one and `data-selected` is what draws it.
|
|
47
|
+
*
|
|
48
|
+
* Always paired with `keepMounted` on the indicator. Without it the part is only
|
|
49
|
+
* ever in the DOM while it is selected, and a rule that hides everything else
|
|
50
|
+
* would hide the only thing there is.
|
|
51
|
+
*/
|
|
52
|
+
export declare const MARK_MOTION_KEPT: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=/*@__PURE__*/["transition-[opacity,scale]","duration-(--mp-sys-motion-duration-short4)","ease-mp-standard"].join(" ");export const MARK_MOTION=/*@__PURE__*/[t,"data-starting-style:scale-60 data-starting-style:opacity-0","data-ending-style:scale-60 data-ending-style:opacity-0"].join(" ");export const DOT_MOTION=/*@__PURE__*/[t,"data-starting-style:scale-0 data-starting-style:opacity-0","data-ending-style:scale-0 data-ending-style:opacity-0"].join(" ");export const MARK_MOTION_KEPT=/*@__PURE__*/[t,"scale-60 opacity-0","data-selected:scale-100 data-selected:opacity-100"].join(" ");
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How wide content is allowed to get, and the ladder it is usually asked for on.
|
|
3
|
+
*
|
|
4
|
+
* A module of its own rather than a third table in `internal/scale.ts`, and the
|
|
5
|
+
* reason is what `scale.ts` is: ladders of literal Tailwind class names, read by
|
|
6
|
+
* nearly every component in the library. The measure stopped being one of those
|
|
7
|
+
* when it started being read off the window size classes — and an `MPBox`, which
|
|
8
|
+
* wants a padding ladder and nothing else, should not carry those into its
|
|
9
|
+
* bundle to get one.
|
|
10
|
+
*
|
|
11
|
+
* Three components import this: `MPContainer`, `MPHeader` and `MPFooter`. They
|
|
12
|
+
* are the three that hold content to a width while the sheet around it spans the
|
|
13
|
+
* window, and they have to agree about where that edge is or the bar and the
|
|
14
|
+
* article under it line up at every width but one.
|
|
15
|
+
*/
|
|
16
|
+
import type { MPMeasure, MPWindowClass } from '../types.js';
|
|
17
|
+
/**
|
|
18
|
+
* One `maxWidth`, as the length `max-width` is given.
|
|
19
|
+
*
|
|
20
|
+
* A rung of the ladder above, resolved against the boundaries in force where the
|
|
21
|
+
* component is — so a page that moved one with `MPConfigProvider` moves its
|
|
22
|
+
* measures too — or anything else the caller wrote, which reaches CSS untouched.
|
|
23
|
+
* `'60ch'` and `'42rem'` are the same kind of answer as `'lg'` rather than a
|
|
24
|
+
* second prop. See `MPMeasure`.
|
|
25
|
+
*
|
|
26
|
+
* The rungs were once four `rem` values written out — `37.5rem`, `52.5rem`,
|
|
27
|
+
* `75rem`, `100rem` — which are the four boundaries at a 16px root and only at a
|
|
28
|
+
* 16px root. A reader who had scaled their text up got a container that agreed
|
|
29
|
+
* with the media queries at no width at all.
|
|
30
|
+
*/
|
|
31
|
+
export declare function measureValue(value: MPMeasure, mins: Record<MPWindowClass, number>): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={xs:null,sm:"medium",md:"expanded",lg:"large",xl:"extra-large"};export function measureValue(n,r){if(!(n in e))return n;const l=e[n];return`${l?r[l]:480}px`}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ANCHOR={name:"anchor",en:{label:"On this page"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const CHART={name:"chart",en:{label:"Chart",table:"Chart data",category:"Category"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const CODE={name:"code",en:{copy:"Copy",copied:"Copied",copyFailed:"Could not copy",raw:"Plain text",label:"Code"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const CONFIRM={name:"confirm",en:{confirm:"Confirm",cancel:"Cancel",ok:"OK"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DATA_TABLE={name:"dataTable",en:{selectAll:"Select all rows",selectRow:"Select row",total:"Rows: {total}",selected:"Selected: {count}",download:"Download CSV",perPage:"Rows per page",resize:"Resize column"}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PICKER={name:"picker",en:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",chooseMonth:"Choose a month",chooseYear:"Choose a year",today:"Today",now:"Now",clear:"Clear",done:"Done",hour:"Hour",minute:"Minute",second:"Second",meridiem:"AM/PM",start:"Start",end:"End"}};
|
|
1
|
+
export const PICKER={name:"picker",en:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",chooseMonth:"Choose a month",chooseYear:"Choose a year",today:"Today",thisMonth:"This month",thisYear:"This year",now:"Now",clear:"Clear",done:"Done",hour:"Hour",minute:"Minute",second:"Second",meridiem:"AM/PM",start:"Start",end:"End"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SCROLL={name:"scroll",en:{label:"Scrollable content",previous:"Scroll back",next:"Scroll forward"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SPARKLINE={name:"sparkline",en:{summary:"{count} points, from {first} to {last}"}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const TOUR={name:"tour",en:{previous:"Back",next:"Next",done:"Done",skip:"Skip",position:"Step {index} of {total}"}};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The parts a device mockup is drawn out of.
|
|
3
|
+
*
|
|
4
|
+
* `MPMockup` is one component with a lot of pictures in it: three devices, six
|
|
5
|
+
* systems, four bezels, three finishes and four cut-outs. Kept in the component
|
|
6
|
+
* that would be a thousand-line file whose interesting fifty lines — the scale,
|
|
7
|
+
* the screen, the content — are buried in geometry.
|
|
8
|
+
*
|
|
9
|
+
* So the geometry lives here, as tables and small drawings, and the component
|
|
10
|
+
* is left holding the decisions: what a caller asked for, what the device
|
|
11
|
+
* implies when they did not, and how big it all comes out on the page.
|
|
12
|
+
*
|
|
13
|
+
* ## Why the numbers are in the screen's own pixels
|
|
14
|
+
*
|
|
15
|
+
* Every measurement below is in the device's logical resolution rather than in
|
|
16
|
+
* page pixels, and that is what makes one scale at the end work: a bezel that
|
|
17
|
+
* was 14 device pixels stays 14 device pixels whether the mockup is drawn at
|
|
18
|
+
* full size or at a third of it, so the hardware never thickens as the picture
|
|
19
|
+
* shrinks.
|
|
20
|
+
*
|
|
21
|
+
* ## What is not a token
|
|
22
|
+
*
|
|
23
|
+
* The finishes. A graphite phone stays graphite on a page switched to dark,
|
|
24
|
+
* because the hardware is a photograph of an object rather than a surface of
|
|
25
|
+
* this library's — a mockup whose aluminium turned white with the page would be
|
|
26
|
+
* a mockup of nothing.
|
|
27
|
+
*/
|
|
28
|
+
import * as React from 'react';
|
|
29
|
+
import type { MPSize } from '../types.js';
|
|
30
|
+
/** Which machine the mockup is a picture of. */
|
|
31
|
+
export type MPMockupDevice = 'desktop' | 'tablet' | 'mobile';
|
|
32
|
+
/** The system whose chrome is drawn on the screen. */
|
|
33
|
+
export type MPMockupOs = 'macos' | 'windows' | 'linux' | 'ios' | 'ipados' | 'android';
|
|
34
|
+
/** What holds a desktop screen up. */
|
|
35
|
+
export type MPMockupHardware = 'monitor' | 'laptop';
|
|
36
|
+
/** The camera cut-out along the top edge of a handheld. */
|
|
37
|
+
export type MPMockupNotch = 'none' | 'notch' | 'dynamic-island' | 'punch-hole';
|
|
38
|
+
/**
|
|
39
|
+
* How much hardware there is around the screen.
|
|
40
|
+
*
|
|
41
|
+
* `none` is not a thinner bezel — it is no hardware at all, leaving the screen
|
|
42
|
+
* on its own with its corners cut, which is what a mockup that only wants the
|
|
43
|
+
* viewport is asking for.
|
|
44
|
+
*/
|
|
45
|
+
export type MPMockupBezel = 'none' | 'thin' | 'standard' | 'thick';
|
|
46
|
+
/** What the hardware is made of. */
|
|
47
|
+
export type MPMockupFinish = 'graphite' | 'silver' | 'white';
|
|
48
|
+
/** Which way a handheld is held. */
|
|
49
|
+
export type MPMockupOrientation = 'portrait' | 'landscape';
|
|
50
|
+
/** A screen's logical size, in CSS pixels. */
|
|
51
|
+
export interface MPMockupResolution {
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The system to draw, with a mismatch corrected rather than refused.
|
|
57
|
+
*
|
|
58
|
+
* `os="macos"` on a phone is a caller who changed `device` and forgot the other
|
|
59
|
+
* prop, and the useful answer is the phone's own system — not a desktop menu
|
|
60
|
+
* bar across a 390-pixel screen.
|
|
61
|
+
*/
|
|
62
|
+
export declare function resolveOs(device: MPMockupDevice, os?: MPMockupOs): MPMockupOs;
|
|
63
|
+
/** The cut-out a device would have if nobody said otherwise. */
|
|
64
|
+
export declare function defaultNotch(device: MPMockupDevice, os: MPMockupOs): MPMockupNotch;
|
|
65
|
+
/**
|
|
66
|
+
* Five real resolutions per device, which is what `size` picks between.
|
|
67
|
+
*
|
|
68
|
+
* Real ones rather than a smooth ladder, because the number that matters is the
|
|
69
|
+
* one a media query fires at: a layout tested at 390 and at 430 has been tested
|
|
70
|
+
* at the two widths most phones actually are, and a made-up 400 would be a
|
|
71
|
+
* width nobody's device has.
|
|
72
|
+
*/
|
|
73
|
+
export declare const RESOLUTIONS: Record<MPMockupDevice, Record<MPSize, MPMockupResolution>>;
|
|
74
|
+
/** How much hardware sits on each side of the screen, in screen pixels. */
|
|
75
|
+
interface Shell {
|
|
76
|
+
side: number;
|
|
77
|
+
top: number;
|
|
78
|
+
bottom: number;
|
|
79
|
+
/** The outer corner. The screen's own is this minus `side`. */
|
|
80
|
+
radius: number;
|
|
81
|
+
}
|
|
82
|
+
/** What the stand under a desktop is made of, in screen pixels. */
|
|
83
|
+
interface Stand {
|
|
84
|
+
neckWidth: number;
|
|
85
|
+
neckHeight: number;
|
|
86
|
+
footWidth: number;
|
|
87
|
+
footHeight: number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Everything the component needs to draw one device, resolved.
|
|
91
|
+
*
|
|
92
|
+
* One object rather than eight return values, because the frame's size is the
|
|
93
|
+
* sum of the rest and a caller that recomputed it would be a second place for
|
|
94
|
+
* the arithmetic to be wrong.
|
|
95
|
+
*/
|
|
96
|
+
export interface MPMockupMetrics {
|
|
97
|
+
screen: MPMockupResolution;
|
|
98
|
+
/** The device itself: the screen plus its hardware. */
|
|
99
|
+
body: MPMockupResolution;
|
|
100
|
+
/** The whole picture: the body plus whatever holds it up. */
|
|
101
|
+
frame: MPMockupResolution;
|
|
102
|
+
shell: Shell;
|
|
103
|
+
screenRadius: number;
|
|
104
|
+
stand: Stand | null;
|
|
105
|
+
/** The wedge a laptop sits on, drawn as a trapezium. */
|
|
106
|
+
laptop: {
|
|
107
|
+
width: number;
|
|
108
|
+
height: number;
|
|
109
|
+
lipWidth: number;
|
|
110
|
+
} | null;
|
|
111
|
+
}
|
|
112
|
+
export declare function mockupMetrics(options: {
|
|
113
|
+
device: MPMockupDevice;
|
|
114
|
+
bezel: MPMockupBezel;
|
|
115
|
+
hardware: MPMockupHardware;
|
|
116
|
+
orientation: MPMockupOrientation;
|
|
117
|
+
resolution: MPMockupResolution;
|
|
118
|
+
}): MPMockupMetrics;
|
|
119
|
+
/**
|
|
120
|
+
* The three finishes, as fixed colours.
|
|
121
|
+
*
|
|
122
|
+
* Not tokens, and not derived from the source colour: a graphite phone stays
|
|
123
|
+
* graphite on a page switched to dark, because the hardware is a photograph of
|
|
124
|
+
* an object rather than a surface of this library's. A mockup whose aluminium
|
|
125
|
+
* turned white with the page would be a mockup of nothing.
|
|
126
|
+
*
|
|
127
|
+
* Two slots each — the face and the edge — because the hardware is drawn as a
|
|
128
|
+
* flat face with a hairline of a darker shade inside it, which is what reads as
|
|
129
|
+
* an edge rather than as a border.
|
|
130
|
+
*/
|
|
131
|
+
export declare const FINISHES: Record<MPMockupFinish, React.CSSProperties>;
|
|
132
|
+
/** What every piece of hardware is painted with. */
|
|
133
|
+
export declare const HARDWARE = "bg-(--_mp-device) ring-1 ring-(--_mp-device-edge) ring-inset";
|
|
134
|
+
/**
|
|
135
|
+
* The camera cut-out, drawn into the top edge of the screen.
|
|
136
|
+
*
|
|
137
|
+
* Hardware rather than chrome, so it is drawn whether or not `systemUi` is on —
|
|
138
|
+
* a phone does not stop having a camera because the status bar was turned off.
|
|
139
|
+
* It sits over the screen rather than taking room from it, which is what the
|
|
140
|
+
* real thing does: the content runs underneath and the system inset keeps the
|
|
141
|
+
* words clear of it.
|
|
142
|
+
*/
|
|
143
|
+
export declare function MockupCutout({ notch, width }: {
|
|
144
|
+
notch: MPMockupNotch;
|
|
145
|
+
width: number;
|
|
146
|
+
}): React.JSX.Element | null;
|
|
147
|
+
/** What one system puts above and below the content. */
|
|
148
|
+
export interface MPMockupChrome {
|
|
149
|
+
top: React.ReactNode;
|
|
150
|
+
bottom: React.ReactNode;
|
|
151
|
+
/** How much room each takes out of the screen, in screen pixels. */
|
|
152
|
+
insetTop: number;
|
|
153
|
+
insetBottom: number;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* A system's own bars.
|
|
157
|
+
*
|
|
158
|
+
* Each takes its own room out of the screen rather than covering the content,
|
|
159
|
+
* so turning `systemUi` off gives the screen back to `children` rather than
|
|
160
|
+
* uncovering something that was hidden underneath.
|
|
161
|
+
*
|
|
162
|
+
* The bars are drawn out of this library's own roles — `surface`, `on-surface`
|
|
163
|
+
* — rather than out of each system's real colours, and that is the line this
|
|
164
|
+
* component keeps: the *hardware* is a photograph and has fixed colours, the
|
|
165
|
+
* *software* on the screen is a page and follows the page. A macOS menu bar
|
|
166
|
+
* that stayed light on a dark mockup would be a picture of somebody else's
|
|
167
|
+
* screenshot rather than a frame around yours.
|
|
168
|
+
*/
|
|
169
|
+
export declare function mockupChrome(options: {
|
|
170
|
+
os: MPMockupOs;
|
|
171
|
+
width: number;
|
|
172
|
+
notch: MPMockupNotch;
|
|
173
|
+
}): MPMockupChrome;
|
|
174
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";const i={desktop:["macos","windows","linux"],tablet:["ipados","android"],mobile:["ios","android"]},s={desktop:"macos",tablet:"ipados",mobile:"ios"};export function resolveOs(t,e){return e&&i[t].includes(e)?e:s[t]}export function defaultNotch(t,e){return"mobile"!==t?"none":"ios"===e?"dynamic-island":"punch-hole"}export const RESOLUTIONS={mobile:{xs:{width:320,height:568},sm:{width:360,height:780},md:{width:390,height:844},lg:{width:414,height:896},xl:{width:430,height:932}},tablet:{xs:{width:744,height:1133},sm:{width:810,height:1080},md:{width:820,height:1180},lg:{width:1024,height:1366},xl:{width:1032,height:1376}},desktop:{xs:{width:1024,height:640},sm:{width:1280,height:800},md:{width:1440,height:900},lg:{width:1680,height:1050},xl:{width:1920,height:1200}}};const a={mobile:{thin:{side:10,top:10,bottom:10,radius:46},standard:{side:14,top:14,bottom:14,radius:52},thick:{side:12,top:62,bottom:82,radius:26}},tablet:{thin:{side:14,top:14,bottom:14,radius:28},standard:{side:22,top:22,bottom:22,radius:36},thick:{side:20,top:58,bottom:58,radius:22}},desktop:{thin:{side:10,top:10,bottom:10,radius:12},standard:{side:14,top:14,bottom:52,radius:16},thick:{side:20,top:20,bottom:72,radius:10}}},n={mobile:44,tablet:26,desktop:8};export function mockupMetrics(t){const{device:e,bezel:i,hardware:s,orientation:h,resolution:d}=t,o="desktop"!==e&&"landscape"===h?{width:d.height,height:d.width}:{width:d.width,height:d.height};if("none"===i)return{screen:o,body:o,frame:o,shell:{side:0,top:0,bottom:0,radius:n[e]},screenRadius:n[e],stand:null,laptop:null};const r=a[e][i],l={width:o.width+2*r.side,height:o.height+r.top+r.bottom};if("desktop"!==e)return{screen:o,body:l,frame:l,shell:r,screenRadius:Math.max(2,r.radius-r.side),stand:null,laptop:null};if("laptop"===s){const t={width:Math.round(1.14*l.width),height:Math.round(.028*l.height)+12,lipWidth:Math.round(.12*l.width)};return{screen:o,body:l,frame:{width:t.width,height:l.height+t.height},shell:r,screenRadius:Math.max(2,r.radius-r.side),stand:null,laptop:t}}const c={neckWidth:Math.round(.16*l.width),neckHeight:Math.round(.11*l.height),footWidth:Math.round(.42*l.width),footHeight:Math.max(8,Math.round(.018*l.height))};return{screen:o,body:l,frame:{width:Math.max(l.width,c.footWidth),height:l.height+c.neckHeight+c.footHeight},shell:r,screenRadius:Math.max(2,r.radius-r.side),stand:c,laptop:null}}export const FINISHES={graphite:{"--_mp-device":"#2f3033","--_mp-device-edge":"#131416"},silver:{"--_mp-device":"#d8d9dd","--_mp-device-edge":"#a3a5aa"},white:{"--_mp-device":"#f3f3f5","--_mp-device-edge":"#c8c9ce"}};export const HARDWARE="bg-(--_mp-device) ring-1 ring-(--_mp-device-edge) ring-inset";export function MockupCutout({notch:e,width:i}){if("none"===e)return null;if("punch-hole"===e){const e=Math.round(.032*i);return t("span",{"aria-hidden":"true",className:"absolute left-1/2 -translate-x-1/2 rounded-full bg-black",style:{top:.8*e,width:e,height:e}})}if("dynamic-island"===e){const e=Math.round(.09*i);return t("span",{"aria-hidden":"true",className:"absolute left-1/2 -translate-x-1/2 rounded-full bg-black",style:{top:.35*e,width:Math.round(.31*i),height:e}})}const s=Math.round(.075*i);return t("span",{"aria-hidden":"true",className:"absolute top-0 left-1/2 -translate-x-1/2 bg-black",style:{width:Math.round(.52*i),height:s,borderBottomLeftRadius:.6*s,borderBottomRightRadius:.6*s}})}function h({width:e,height:i,round:s}){return t("span",{className:"bg-mp-on-surface/38 shrink-0",style:{width:e,height:i,borderRadius:s?"9999px":.3*i}})}function d({widths:e,height:i,gap:s,round:a}){return t("span",{className:"flex items-center",style:{gap:s},children:e.map((e,s)=>t(h,{width:e,height:i,round:a},s))})}function o({height:i}){const s=Math.max(1,Math.round(.18*i));return e("span",{className:"flex items-end",style:{gap:.4*i},children:[t("span",{className:"flex items-end",style:{gap:.6*s},children:[.4,.6,.8,1].map(e=>t("span",{className:"bg-mp-on-surface rounded-[1px]",style:{width:s,height:i*e}},e))}),t("span",{className:"relative",style:{width:1.2*i,height:i},children:[1,.62,.26].map((e,a)=>t("span",{className:"border-mp-on-surface absolute bottom-0 left-1/2 -translate-x-1/2 rounded-t-full border-t",style:{width:1.2*i*e,height:i*e,borderWidth:2===a?.3*i:s}},e))}),e("span",{className:"flex items-center",style:{gap:.8*s},children:[t("span",{className:"border-mp-on-surface/60 relative rounded-[2px] border",style:{width:1.9*i,height:i,padding:.6*s},children:t("span",{className:"bg-mp-on-surface block h-full rounded-[1px]",style:{width:"68%"}})}),t("span",{className:"bg-mp-on-surface/60 rounded-r-[1px]",style:{width:s,height:.4*i}})]})]})}function r({size:i}){return e("span",{className:"flex items-center",style:{gap:1.6*i},children:[t("span",{className:"border-mp-on-surface rotate-45 border-b-2 border-l-2",style:{width:.6*i,height:.6*i}}),t("span",{className:"border-mp-on-surface rounded-full border-2",style:{width:.75*i,height:.75*i}}),t("span",{className:"border-mp-on-surface rounded-[2px] border-2",style:{width:.7*i,height:.7*i}})]})}export function mockupChrome(i){const{os:s,width:a,notch:n}=i,l=Math.max(10,Math.round(.035*a)),c=Math.round(.36*l),p=Math.round(.5*l),u="text-mp-on-surface pointer-events-none flex shrink-0 items-center";if("ios"===s||"ipados"===s||"android"===s){const i="none"===n?Math.round(1.3*l):Math.round(2.2*l),d=Math.round(1.4*l),m=e("span",{className:`${u} justify-between`,style:{height:i,paddingInline:2*p,paddingTop:"none"===n?0:Math.round(.6*l)},children:[t(h,{width:Math.round(1.4*l),height:c}),t(o,{height:c})]});return"android"===s?{top:m,bottom:t("span",{className:`${u} justify-center`,style:{height:Math.round(1.8*l)},children:t(r,{size:1.6*c})}),insetTop:i,insetBottom:Math.round(1.8*l)}:{top:m,bottom:t("span",{className:`${u} justify-center`,style:{height:d},children:t("span",{className:"bg-mp-on-surface/60 rounded-full",style:{width:Math.round(.36*a),height:Math.max(3,.28*c)}})}),insetTop:i,insetBottom:d}}if("macos"===s){const i=Math.round(.95*l),s=Math.round(2.1*l),a=Math.round(1.3*l);return{top:e("span",{className:`${u} bg-mp-surface-container/80 justify-between`,style:{height:i,paddingInline:1.5*p,gap:2*p},children:[e("span",{className:"flex items-center",style:{gap:p},children:[t("span",{className:"flex items-center",style:{gap:.7*p},children:["#ff5f57","#febc2e","#28c840"].map(e=>t("span",{className:"rounded-full",style:{width:c,height:c,background:e}},e))}),t(d,{widths:[3*c,2*c,2.4*c],height:c,gap:p})]}),t(d,{widths:[1.6*c,3*c],height:c,gap:p})]}),bottom:t("span",{className:`${u} justify-center`,style:{height:s},children:t("span",{className:"bg-mp-surface-container-high/80 flex items-center rounded-[18%]",style:{gap:p,padding:p},children:[0,1,2,3,4].map(e=>t(h,{width:a,height:a},e))})}),insetTop:i,insetBottom:s}}const m=Math.round(1.5*l),g=Math.round(.95*l);return"windows"===s?{top:null,bottom:e("span",{className:`${u} bg-mp-surface-container/85 justify-center`,style:{height:m,gap:1.5*p},children:[t("span",{className:"grid shrink-0",style:{width:g,height:g,gap:.14*g,gridTemplateColumns:"1fr 1fr"},children:[0,1,2,3].map(e=>t("span",{className:"bg-mp-on-surface/60 rounded-[1px]"},e))}),t(d,{widths:[g,g,g,g],height:g,gap:p})]}),insetTop:0,insetBottom:m}:{top:e("span",{className:`${u} bg-mp-surface-container/85 justify-between`,style:{height:m,paddingInline:2*p},children:[t(d,{widths:[3*c,2*c],height:c,gap:p}),t(h,{width:3.4*c,height:c}),t(d,{widths:[1.6*c,1.6*c,2.4*c],height:c,gap:p})]}),bottom:null,insetTop:m,insetBottom:0}}
|