material-plus-ui 1.9.0 → 1.10.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/a2ui/extended/api.d.ts +4 -4
- package/dist/components/accordion/MPAccordion.d.ts +13 -0
- package/dist/components/accordion/MPAccordion.js +1 -1
- package/dist/components/accordion/index.d.ts +1 -1
- package/dist/components/animate-counter/MPAnimateCounter.js +1 -1
- package/dist/components/animate-headline/MPAnimateHeadline.d.ts +8 -0
- package/dist/components/animate-headline/MPAnimateHeadline.js +1 -1
- package/dist/components/animate-lighting/MPAnimateLighting.js +1 -1
- package/dist/components/animate-marquee/MPAnimateMarquee.js +1 -1
- package/dist/components/animate-scramble/MPAnimateScramble.d.ts +8 -0
- package/dist/components/animate-scramble/MPAnimateScramble.js +1 -1
- package/dist/components/animate-split/MPAnimateSplit.d.ts +8 -0
- package/dist/components/animate-split/MPAnimateSplit.js +1 -1
- package/dist/components/animate-typing/MPAnimateTyping.d.ts +10 -2
- package/dist/components/animate-typing/MPAnimateTyping.js +1 -1
- package/dist/components/app-logo/MPAppLogo.d.ts +6 -1
- package/dist/components/area-chart/MPAreaChart.js +1 -1
- package/dist/components/avatar/MPAvatar.d.ts +16 -0
- package/dist/components/avatar/MPAvatar.js +1 -1
- package/dist/components/bar-chart/MPBarChart.js +1 -1
- package/dist/components/breadcrumb/MPBreadcrumb.d.ts +8 -0
- package/dist/components/breadcrumb/MPBreadcrumb.js +1 -1
- package/dist/components/carousel/MPCarousel.js +1 -1
- package/dist/components/checkbox/MPCheckbox.js +1 -1
- package/dist/components/code-block/MPCodeBlock.js +1 -1
- package/dist/components/combobox/MPCombobox.js +1 -1
- package/dist/components/command-palette/MPCommandPalette.js +1 -1
- package/dist/components/config/MPConfigProvider.d.ts +17 -1
- package/dist/components/config/MPConfigProvider.js +1 -1
- package/dist/components/confirm/MPConfirmProvider.js +1 -1
- package/dist/components/data-table/MPDataTable.d.ts +0 -34
- package/dist/components/data-table/MPDataTable.js +1 -1
- package/dist/components/date-range-picker/MPDateRangePicker.js +1 -1
- package/dist/components/drawer/MPDrawer.d.ts +13 -1
- package/dist/components/drawer/MPDrawer.js +1 -1
- package/dist/components/file-picker/MPFilePicker.js +1 -1
- package/dist/components/form/MPForm.d.ts +3 -0
- package/dist/components/form/MPForm.js +1 -1
- package/dist/components/gauge-chart/MPGaugeChart.js +1 -1
- package/dist/components/header/MPHeader.js +1 -1
- package/dist/components/heatmap-chart/MPHeatmapChart.js +1 -1
- package/dist/components/image/MPImage.d.ts +5 -0
- package/dist/components/image/MPImage.js +1 -1
- package/dist/components/line-chart/MPLineChart.js +1 -1
- package/dist/components/locale/MPLocaleProvider.d.ts +15 -30
- package/dist/components/locale/MPLocaleProvider.js +1 -1
- package/dist/components/menu/MPMenu.d.ts +9 -1
- package/dist/components/menu/MPMenu.js +1 -1
- package/dist/components/meter/MPMeter.d.ts +5 -0
- package/dist/components/meter/MPMeter.js +1 -1
- package/dist/components/mockup/MPMockup.js +1 -1
- package/dist/components/navigation-menu/MPNavigationMenu.d.ts +27 -1
- package/dist/components/navigation-menu/MPNavigationMenu.js +1 -1
- package/dist/components/number-field/MPNumberField.d.ts +2 -1
- package/dist/components/number-field/MPNumberField.js +1 -1
- package/dist/components/otp-field/MPOtpField.js +1 -1
- package/dist/components/page-layout/MPPageLayout.js +1 -1
- package/dist/components/pagination/MPPagination.d.ts +8 -0
- package/dist/components/pagination/MPPagination.js +1 -1
- package/dist/components/panes/MPPanes.js +1 -1
- package/dist/components/pie-chart/MPPieChart.js +1 -1
- package/dist/components/pill/MPPill.js +1 -1
- 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/scatter-chart/MPScatterChart.js +1 -1
- package/dist/components/sidebar/MPSidebar.d.ts +11 -0
- package/dist/components/sidebar/MPSidebar.js +1 -1
- package/dist/components/slider/MPSlider.d.ts +5 -0
- package/dist/components/slider/MPSlider.js +1 -1
- package/dist/components/snackbar/MPSnackbar.js +1 -1
- package/dist/components/switch/MPSwitch.js +1 -1
- package/dist/components/tabs/MPTabs.js +1 -1
- package/dist/components/text-field/MPTextField.js +1 -1
- package/dist/components/timeline-chart/MPTimelineChart.js +1 -1
- package/dist/components/tour/MPTour.js +1 -1
- package/dist/components/transfer/MPTransfer.js +1 -1
- package/dist/components/tree-select/MPTreeSelect.js +1 -1
- package/dist/components/tree-view/MPTreeView.d.ts +8 -0
- package/dist/components/tree-view/MPTreeView.js +1 -1
- package/dist/hooks/index.d.ts +4 -2
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/mpColorSchemeScript.d.ts +46 -0
- package/dist/hooks/mpColorSchemeScript.js +1 -0
- package/dist/hooks/useMPColorScheme.d.ts +2 -47
- package/dist/hooks/useMPColorScheme.js +1 -1
- package/dist/hooks/useMPMediaQuery.js +1 -1
- package/dist/hooks/useMPOnScreen.js +1 -1
- package/dist/internal/Calendar.js +1 -1
- package/dist/internal/ChartChrome.d.ts +11 -2
- package/dist/internal/ChartChrome.js +1 -1
- package/dist/internal/ChartFrame.js +1 -1
- package/dist/internal/FieldOutline.d.ts +9 -1
- package/dist/internal/FieldOutline.js +1 -1
- package/dist/internal/RenderedLink.d.ts +20 -0
- package/dist/internal/RenderedLink.js +2 -0
- package/dist/internal/SupportingText.js +1 -1
- package/dist/internal/animate.d.ts +4 -0
- package/dist/internal/animate.js +1 -1
- package/dist/internal/box-size.d.ts +22 -0
- package/dist/internal/box-size.js +2 -0
- package/dist/internal/chart.d.ts +21 -11
- package/dist/internal/chart.js +1 -1
- package/dist/internal/color-scheme-keys.d.ts +13 -0
- package/dist/internal/color-scheme-keys.js +1 -0
- package/dist/internal/color-scheme.d.ts +11 -2
- package/dist/internal/color-scheme.js +1 -1
- package/dist/internal/config.d.ts +2 -0
- package/dist/internal/date.d.ts +2 -8
- package/dist/internal/date.js +1 -1
- package/dist/internal/highlight.js +1 -1
- package/dist/internal/i18n.d.ts +0 -53
- package/dist/internal/i18n.js +1 -1
- package/dist/internal/intersection.d.ts +50 -0
- package/dist/internal/intersection.js +2 -0
- package/dist/internal/intl.d.ts +22 -21
- package/dist/internal/intl.js +1 -1
- package/dist/internal/keys.d.ts +0 -9
- package/dist/internal/keys.js +1 -1
- package/dist/internal/layout-effect.d.ts +7 -0
- package/dist/internal/layout-effect.js +2 -0
- package/dist/internal/locale.d.ts +10 -2
- package/dist/internal/media.d.ts +1 -0
- package/dist/internal/media.js +1 -0
- package/dist/internal/occurrence.d.ts +18 -0
- package/dist/internal/occurrence.js +1 -0
- package/dist/internal/page-layout.js +1 -1
- package/dist/internal/progress.d.ts +5 -0
- package/dist/internal/ref.d.ts +9 -0
- package/dist/internal/ref.js +1 -0
- package/dist/internal/remember.d.ts +36 -0
- package/dist/internal/remember.js +1 -0
- package/dist/internal/surface.d.ts +7 -1
- package/dist/internal/surface.js +1 -1
- package/dist/internal/text.d.ts +10 -4
- package/dist/internal/text.js +1 -1
- package/dist/internal/window-class.d.ts +8 -0
- package/dist/internal/window-class.js +1 -1
- package/dist/styles/accordion.css +1 -1
- package/dist/styles/alert.css +1 -1
- package/dist/styles/animate-appear.css +1 -1
- package/dist/styles/animate-blink.css +1 -1
- package/dist/styles/animate-counter.css +1 -1
- package/dist/styles/animate-fade.css +1 -1
- package/dist/styles/animate-float.css +1 -1
- 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 +1 -1
- package/dist/styles/animate-rotate.css +1 -1
- package/dist/styles/animate-scramble.css +1 -1
- package/dist/styles/animate-shake.css +1 -1
- package/dist/styles/animate-slide.css +1 -1
- package/dist/styles/animate-split.css +1 -1
- package/dist/styles/animate-typing.css +1 -1
- package/dist/styles/animate-zoom.css +1 -1
- package/dist/styles/avatar.css +1 -1
- package/dist/styles/blockquote.css +1 -1
- package/dist/styles/box.css +1 -1
- package/dist/styles/breadcrumb.css +1 -1
- package/dist/styles/calendar.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chip.css +1 -1
- 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/confirm.css +1 -1
- package/dist/styles/data-table.css +1 -1
- 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/drawer.css +1 -1
- package/dist/styles/empty.css +1 -1
- package/dist/styles/floating-bottom-navigation.css +1 -1
- package/dist/styles/footer.css +1 -1
- package/dist/styles/gauge-chart.css +1 -1
- package/dist/styles/header.css +1 -1
- package/dist/styles/highlight.css +1 -1
- package/dist/styles/hover-card.css +1 -1
- package/dist/styles/image.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/meter.css +1 -1
- 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/pill.css +1 -1
- package/dist/styles/popconfirm.css +1 -1
- package/dist/styles/popover.css +1 -1
- 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/select.css +1 -1
- package/dist/styles/sidebar.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/spoiler.css +1 -1
- package/dist/styles/stack.css +1 -1
- 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/time-picker.css +1 -1
- package/dist/styles/tokens.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tour.css +1 -1
- package/dist/styles/transfer.css +1 -1
- package/dist/styles/tree-select.css +1 -1
- package/dist/styles/tree-view.css +1 -1
- package/dist/styles/typography.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +116 -4
- package/package.json +1 -1
package/dist/tailwind.css
CHANGED
|
@@ -95,6 +95,27 @@
|
|
|
95
95
|
* Only the *derived* colours need it. Everything else here is a literal value
|
|
96
96
|
* with no `var()` to freeze, so plain inheritance from `:root` is enough.
|
|
97
97
|
*
|
|
98
|
+
* ## Why `*` and `::backdrop`, but not `::before` and `::after`
|
|
99
|
+
*
|
|
100
|
+
* The rule reaches every element of the page it is loaded into, not only the
|
|
101
|
+
* ones this library rendered, so what it costs per element is a cost to the
|
|
102
|
+
* whole page. A `::before` or `::after` in the selector multiplies it: a
|
|
103
|
+
* browser has to resolve both pseudo-elements of every element on the page to
|
|
104
|
+
* find out whether either one draws anything, and resolving each one means
|
|
105
|
+
* substituting all of the roles below again.
|
|
106
|
+
*
|
|
107
|
+
* Neither needs its own copy. A `::before` and an `::after` inherit from the
|
|
108
|
+
* element they belong to, which already holds the roles as resolved where it
|
|
109
|
+
* sits, and nothing sets a source colour, a tone stop or a role on a
|
|
110
|
+
* pseudo-element — so the copy they would compute is the copy they inherit.
|
|
111
|
+
* `::placeholder` and `::marker` have always been read this way. `::backdrop`
|
|
112
|
+
* stays, because before 2024 it inherited from nothing at all.
|
|
113
|
+
*
|
|
114
|
+
* Measured on a plain page of 1,430 elements with nothing of this library on
|
|
115
|
+
* it, the first style pass took 164ms in WebKit with the pseudo-elements in the
|
|
116
|
+
* selector and 21ms without them, against 9ms with no stylesheet at all;
|
|
117
|
+
* Firefox went from 68ms to 26ms. iOS runs every browser on WebKit.
|
|
118
|
+
*
|
|
98
119
|
* The computed results are `--_mp-*`: private, read by the components, and not
|
|
99
120
|
* a name to set. Material Web marks its own internal tokens the same way. The
|
|
100
121
|
* indirection is load-bearing — it is what keeps a consumer's
|
|
@@ -530,8 +551,6 @@
|
|
|
530
551
|
* passes the edge by less than 4% of one channel.
|
|
531
552
|
*/
|
|
532
553
|
*,
|
|
533
|
-
::before,
|
|
534
|
-
::after,
|
|
535
554
|
::backdrop {
|
|
536
555
|
/*
|
|
537
556
|
* The grey each accent tone sits on, in linear light: an OKLCh lightness
|
|
@@ -2045,8 +2064,6 @@
|
|
|
2045
2064
|
}
|
|
2046
2065
|
|
|
2047
2066
|
*,
|
|
2048
|
-
::before,
|
|
2049
|
-
::after,
|
|
2050
2067
|
::backdrop {
|
|
2051
2068
|
--_mp-color-primary: var(
|
|
2052
2069
|
--mp-sys-color-primary,
|
|
@@ -3849,6 +3866,21 @@
|
|
|
3849
3866
|
}
|
|
3850
3867
|
}
|
|
3851
3868
|
|
|
3869
|
+
/*
|
|
3870
|
+
* And the same for a page read without JavaScript.
|
|
3871
|
+
*
|
|
3872
|
+
* An entrance waiting for `trigger="visible"`, `manual` or `hover` sits paused
|
|
3873
|
+
* on its first frame until script starts it, and with no script that is
|
|
3874
|
+
* forever: the content was in the markup and drawn at `opacity: 0`, invisible
|
|
3875
|
+
* to the reader and present for nobody but a crawler. With scripting off the
|
|
3876
|
+
* entrance is dropped and the content shown, which is what it was carrying.
|
|
3877
|
+
*/
|
|
3878
|
+
@media (scripting: none) {
|
|
3879
|
+
.mp-anim {
|
|
3880
|
+
animation: none;
|
|
3881
|
+
}
|
|
3882
|
+
}
|
|
3883
|
+
|
|
3852
3884
|
/*
|
|
3853
3885
|
* Lighting: a light travelling around the outside of something.
|
|
3854
3886
|
*
|
|
@@ -3917,6 +3949,23 @@
|
|
|
3917
3949
|
}
|
|
3918
3950
|
}
|
|
3919
3951
|
|
|
3952
|
+
/*
|
|
3953
|
+
* The endless loops, held while they are off screen.
|
|
3954
|
+
*
|
|
3955
|
+
* `data-mp-offscreen` is written by the component while its element is out of
|
|
3956
|
+
* the viewport. A loop nobody can see is still one the browser runs — a style
|
|
3957
|
+
* pass a frame for the glow's angle, and a layout pass a frame for the linear
|
|
3958
|
+
* indicator, whose bars move by `inset`. Paused, each carries on from where it
|
|
3959
|
+
* stopped when it comes back, which for a loop is no difference at all.
|
|
3960
|
+
*/
|
|
3961
|
+
.mp-anim-lighting[data-mp-offscreen]::before,
|
|
3962
|
+
.mp-progress-linear[data-mp-offscreen] .mp-progress-linear-lead,
|
|
3963
|
+
.mp-progress-linear[data-mp-offscreen] .mp-progress-linear-trail,
|
|
3964
|
+
.mp-progress-circular[data-mp-offscreen] .mp-progress-circular-turn,
|
|
3965
|
+
.mp-progress-circular[data-mp-offscreen] .mp-progress-circular-arc {
|
|
3966
|
+
animation-play-state: paused;
|
|
3967
|
+
}
|
|
3968
|
+
|
|
3920
3969
|
/*
|
|
3921
3970
|
* Marquee: two identical copies, both moving by exactly one copy plus the gap.
|
|
3922
3971
|
*
|
|
@@ -4469,3 +4518,66 @@
|
|
|
4469
4518
|
inline-size: calc(var(--_mp-tree-indent) / 2 - 2px);
|
|
4470
4519
|
border-block-start: 1px solid var(--_mp-color-outline-variant);
|
|
4471
4520
|
}
|
|
4521
|
+
|
|
4522
|
+
/* ---------------------------------------------------------------------------
|
|
4523
|
+
* A fixed header's room, before the layout has measured it
|
|
4524
|
+
*
|
|
4525
|
+
* `MPPageLayout` keeps a fixed `MPHeader` from covering the top of the page by
|
|
4526
|
+
* measuring the bar and padding the page by its height. The measurement is an
|
|
4527
|
+
* effect, so on a server-rendered page the content was drawn under the bar and
|
|
4528
|
+
* then pushed down by its height once the page had hydrated — a layout shift
|
|
4529
|
+
* of a whole header's worth, on every page with one.
|
|
4530
|
+
*
|
|
4531
|
+
* These give the padding a first answer that needs no script: a fixed bar's
|
|
4532
|
+
* height is its size's rung on the ladder, plus a pixel for the rule an
|
|
4533
|
+
* `outlined` one draws under itself. The measurement still wins the moment it
|
|
4534
|
+
* arrives, and it then moves nothing unless the bar's content made it taller
|
|
4535
|
+
* than its rung. Only a bar that is the layout's own header is counted — the
|
|
4536
|
+
* slot it sits in when the header spans the page, or the content column's when
|
|
4537
|
+
* it does not — so a layout nested inside another does not answer for it.
|
|
4538
|
+
*
|
|
4539
|
+
* In a browser without `:has()` there is no first answer, which is how every
|
|
4540
|
+
* browser behaved before.
|
|
4541
|
+
* ------------------------------------------------------------------------- */
|
|
4542
|
+
|
|
4543
|
+
.mp-page-layout:is(
|
|
4544
|
+
:has(> .mp-header[data-mp-position='fixed'][data-mp-variant='outlined']),
|
|
4545
|
+
:has(> div > div > .mp-header[data-mp-position='fixed'][data-mp-variant='outlined'])
|
|
4546
|
+
) {
|
|
4547
|
+
--_mp-layout-header-rule: 1px;
|
|
4548
|
+
}
|
|
4549
|
+
|
|
4550
|
+
.mp-page-layout:is(
|
|
4551
|
+
:has(> .mp-header[data-mp-position='fixed'][data-mp-size='xs']),
|
|
4552
|
+
:has(> div > div > .mp-header[data-mp-position='fixed'][data-mp-size='xs'])
|
|
4553
|
+
) {
|
|
4554
|
+
--_mp-layout-header-seed: calc(3rem + var(--_mp-layout-header-rule, 0px));
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4557
|
+
.mp-page-layout:is(
|
|
4558
|
+
:has(> .mp-header[data-mp-position='fixed'][data-mp-size='sm']),
|
|
4559
|
+
:has(> div > div > .mp-header[data-mp-position='fixed'][data-mp-size='sm'])
|
|
4560
|
+
) {
|
|
4561
|
+
--_mp-layout-header-seed: calc(3.5rem + var(--_mp-layout-header-rule, 0px));
|
|
4562
|
+
}
|
|
4563
|
+
|
|
4564
|
+
.mp-page-layout:is(
|
|
4565
|
+
:has(> .mp-header[data-mp-position='fixed'][data-mp-size='md']),
|
|
4566
|
+
:has(> div > div > .mp-header[data-mp-position='fixed'][data-mp-size='md'])
|
|
4567
|
+
) {
|
|
4568
|
+
--_mp-layout-header-seed: calc(4rem + var(--_mp-layout-header-rule, 0px));
|
|
4569
|
+
}
|
|
4570
|
+
|
|
4571
|
+
.mp-page-layout:is(
|
|
4572
|
+
:has(> .mp-header[data-mp-position='fixed'][data-mp-size='lg']),
|
|
4573
|
+
:has(> div > div > .mp-header[data-mp-position='fixed'][data-mp-size='lg'])
|
|
4574
|
+
) {
|
|
4575
|
+
--_mp-layout-header-seed: calc(5rem + var(--_mp-layout-header-rule, 0px));
|
|
4576
|
+
}
|
|
4577
|
+
|
|
4578
|
+
.mp-page-layout:is(
|
|
4579
|
+
:has(> .mp-header[data-mp-position='fixed'][data-mp-size='xl']),
|
|
4580
|
+
:has(> div > div > .mp-header[data-mp-position='fixed'][data-mp-size='xl'])
|
|
4581
|
+
) {
|
|
4582
|
+
--_mp-layout-header-seed: calc(6rem + var(--_mp-layout-header-rule, 0px));
|
|
4583
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "material-plus-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "A React component library written from the Material Design 3 specification and extended past it — wider versions of the components it names, and the charts, data table and command palette it does not. Built on Base UI and Tailwind CSS v4, themed with CSS custom properties so it coexists with an existing Material setup. ESM only, types included.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|