material-plus-ui 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/badge/MPBadge.js +1 -1
- package/dist/components/bottom-navigation/MPBottomNavigation.js +1 -1
- package/dist/components/checkbox/MPCheckbox.js +1 -1
- package/dist/components/color-picker/MPColorPicker.js +1 -1
- package/dist/components/combobox/MPCombobox.js +1 -1
- package/dist/components/dialog/MPDialog.js +1 -1
- package/dist/components/drawer/MPDrawer.d.ts +25 -6
- package/dist/components/drawer/MPDrawer.js +1 -1
- package/dist/components/floating-action-button/MPFloatingActionButton.js +1 -1
- package/dist/components/radio-group/MPRadioGroup.js +1 -1
- package/dist/components/segmented-button/MPSegmentedButton.js +1 -1
- package/dist/components/select/MPSelect.js +1 -1
- 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/internal/Calendar.js +1 -1
- package/dist/internal/surface.d.ts +42 -12
- package/dist/internal/surface.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +55 -5
- package/package.json +10 -10
package/dist/tailwind.css
CHANGED
|
@@ -958,16 +958,23 @@
|
|
|
958
958
|
/*
|
|
959
959
|
* Motion.
|
|
960
960
|
*
|
|
961
|
-
*
|
|
962
|
-
* the ones something in the library actually reads, on the rule every
|
|
963
|
-
* token here follows. `short4` is what a text field's label and
|
|
964
|
-
* transition on; the rest arrived with the `MPAnimate*`
|
|
965
|
-
* take these as their defaults rather than numbers of
|
|
961
|
+
* Seven of MD3's sixteen duration tokens and six of its seven easing curves
|
|
962
|
+
* — the ones something in the library actually reads, on the rule every
|
|
963
|
+
* other token here follows. `short4` is what a text field's label and
|
|
964
|
+
* outline transition on; most of the rest arrived with the `MPAnimate*`
|
|
965
|
+
* components, which take these as their defaults rather than numbers of
|
|
966
|
+
* their own.
|
|
967
|
+
*
|
|
968
|
+
* `short2` is the shortest of them and has one reader: an `MPSlider`'s
|
|
969
|
+
* handle catching up with a value the keyboard moved. A control the reader
|
|
970
|
+
* is holding an arrow key on has to arrive before the next press, and 200ms
|
|
971
|
+
* is longer than a key repeats.
|
|
966
972
|
*
|
|
967
973
|
* Worth knowing if these controls sit beside another library's: 250ms is a
|
|
968
974
|
* common default elsewhere, and a field from here will settle slightly
|
|
969
975
|
* sooner unless `short4` is set to match.
|
|
970
976
|
*/
|
|
977
|
+
--mp-sys-motion-duration-short2: 100ms;
|
|
971
978
|
--mp-sys-motion-duration-short4: 200ms;
|
|
972
979
|
--mp-sys-motion-duration-medium2: 300ms;
|
|
973
980
|
--mp-sys-motion-duration-medium4: 400ms;
|
|
@@ -1520,6 +1527,49 @@
|
|
|
1520
1527
|
}
|
|
1521
1528
|
}
|
|
1522
1529
|
|
|
1530
|
+
/* ---------------------------------------------------------------------------
|
|
1531
|
+
* The calendar's page turn
|
|
1532
|
+
*
|
|
1533
|
+
* A keyframe rather than a transition, for the reason the indicators above are:
|
|
1534
|
+
* what changes when a month is stepped is the *content* of six rows, and there
|
|
1535
|
+
* are no two states for CSS to interpolate between — the weeks that were there
|
|
1536
|
+
* are gone. An animation on the arriving set is the only thing there is to run.
|
|
1537
|
+
*
|
|
1538
|
+
* `internal/Calendar.tsx` supplies the direction as a sign and restarts the
|
|
1539
|
+
* animation by clearing `animation-name` and putting it back, which is the same
|
|
1540
|
+
* move `internal/animate.ts` makes and for the same reason: React cannot rewind
|
|
1541
|
+
* a CSS animation, and a `key` would restart it by unmounting the cell the
|
|
1542
|
+
* reader's focus is standing on.
|
|
1543
|
+
*
|
|
1544
|
+
* The distance is one cell, which is deliberately short. A full grid's width
|
|
1545
|
+
* would be a filmstrip, and the thing being said is only which way the reader
|
|
1546
|
+
* went — a page that comes from the right and settles says that in the first
|
|
1547
|
+
* hundred milliseconds, and the rest of the animation is the numbers arriving
|
|
1548
|
+
* where they can be read.
|
|
1549
|
+
*
|
|
1550
|
+
* Unlayered, like the keyframes above, and switched off for a reader who asked
|
|
1551
|
+
* for less motion. What is left then is the swap the grid did before, which
|
|
1552
|
+
* loses the direction and nothing else.
|
|
1553
|
+
* ------------------------------------------------------------------------- */
|
|
1554
|
+
|
|
1555
|
+
@keyframes mp-calendar-page {
|
|
1556
|
+
from {
|
|
1557
|
+
opacity: 0;
|
|
1558
|
+
translate: calc(var(--_mp-calendar-from, 0) * var(--_mp-cell)) 0;
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
.mp-calendar__page[data-mp-paged] {
|
|
1563
|
+
animation: mp-calendar-page var(--mp-sys-motion-duration-medium2)
|
|
1564
|
+
var(--mp-sys-motion-easing-emphasized-decelerate);
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1568
|
+
.mp-calendar__page[data-mp-paged] {
|
|
1569
|
+
animation: none;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1523
1573
|
/* ---------------------------------------------------------------------------
|
|
1524
1574
|
* Animation
|
|
1525
1575
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "material-plus-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A React component library implementing Material Design 3 — the components other Material libraries do not ship, and wider versions of the ones they do. Built on Base UI and Tailwind CSS v4, themed with CSS custom properties so it can coexist with an existing Material setup. ESM only, types included.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"typecheck": "tsc --project tsconfig.prod.json --noEmit && tsc --project test/tsconfig.json && tsc --project docs/tsconfig.json"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
|
-
"node": ">=
|
|
34
|
+
"node": ">=22.0.0"
|
|
35
35
|
},
|
|
36
36
|
"main": "dist/index.js",
|
|
37
37
|
"exports": {
|
|
@@ -106,13 +106,13 @@
|
|
|
106
106
|
"@types/react": "^19.2.18",
|
|
107
107
|
"@types/react-dom": "^19.2.4",
|
|
108
108
|
"@typescript-eslint/parser": "^8.67.0",
|
|
109
|
-
"@vitejs/plugin-react": "^6.0
|
|
110
|
-
"@vitest/browser": "^4.1.
|
|
111
|
-
"@vitest/browser-playwright": "^4.1.
|
|
109
|
+
"@vitejs/plugin-react": "^6.1.0",
|
|
110
|
+
"@vitest/browser": "^4.1.11",
|
|
111
|
+
"@vitest/browser-playwright": "^4.1.11",
|
|
112
112
|
"eslint": "^9.39.1",
|
|
113
113
|
"eslint-config-prettier": "^10.1.8",
|
|
114
114
|
"eslint-plugin-n": "^18.3.0",
|
|
115
|
-
"globals": "^17.
|
|
115
|
+
"globals": "^17.11.0",
|
|
116
116
|
"jiti": "^2.7.0",
|
|
117
117
|
"playwright": "^1.62.1",
|
|
118
118
|
"postcss": "^8.5.26",
|
|
@@ -125,15 +125,15 @@
|
|
|
125
125
|
"tsx": "^4.23.12",
|
|
126
126
|
"typescript": "^6.0.3",
|
|
127
127
|
"typescript-eslint": "^8.67.0",
|
|
128
|
-
"vite": "^8.2.
|
|
128
|
+
"vite": "^8.2.2",
|
|
129
129
|
"vitepress": "^1.6.4",
|
|
130
130
|
"vitepress-i18n": "^1.3.5",
|
|
131
|
-
"vitepress-sidebar": "^1.
|
|
132
|
-
"vitest": "^4.1.
|
|
131
|
+
"vitepress-sidebar": "^1.39.0",
|
|
132
|
+
"vitest": "^4.1.11",
|
|
133
133
|
"vitest-browser-react": "^2.2.0"
|
|
134
134
|
},
|
|
135
135
|
"dependencies": {
|
|
136
|
-
"lucide-react": "^1.
|
|
136
|
+
"lucide-react": "^1.33.0"
|
|
137
137
|
},
|
|
138
138
|
"peerDependencies": {
|
|
139
139
|
"@base-ui/react": "^1.7.0",
|