@mui/utils 5.14.3 → 5.14.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +176 -8
- package/composeClasses/composeClasses.js +1 -1
- package/esm/composeClasses/composeClasses.js +1 -1
- package/esm/generateUtilityClass/generateUtilityClass.js +3 -0
- package/generateUtilityClass/generateUtilityClass.js +2 -0
- package/index.js +1 -1
- package/legacy/composeClasses/composeClasses.js +1 -1
- package/legacy/generateUtilityClass/generateUtilityClass.js +3 -0
- package/legacy/index.js +1 -1
- package/modern/composeClasses/composeClasses.js +1 -1
- package/modern/generateUtilityClass/generateUtilityClass.js +3 -0
- package/modern/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,173 @@
|
|
|
1
1
|
# [Versions](https://mui.com/versions/)
|
|
2
2
|
|
|
3
|
+
## 5.14.5
|
|
4
|
+
|
|
5
|
+
<!-- generated comparing v5.14.4..master -->
|
|
6
|
+
|
|
7
|
+
_Aug 14, 2023_
|
|
8
|
+
|
|
9
|
+
A big thanks to the 17 contributors who made this release possible. Here are some highlights ✨:
|
|
10
|
+
|
|
11
|
+
- @mnajdova [made it easier to use third-party components in Base UI slots](https://mui.com/base-ui/getting-started/customization/#overriding-subcomponent-slots) with the introduction of the `prepareForSlot` utility (#38138)
|
|
12
|
+
|
|
13
|
+
### `@mui/material@5.14.5`
|
|
14
|
+
|
|
15
|
+
- ​<!-- 04 -->[TextField] Fix to handle `onClick` on root element (#38072) @LukasTy
|
|
16
|
+
|
|
17
|
+
### `@mui/codemod@5.14.5`
|
|
18
|
+
|
|
19
|
+
- ​<!-- 31 -->[codemod] Add v5.0.0/tree-view-moved-to-x codemod (#38248) @flaviendelangle
|
|
20
|
+
|
|
21
|
+
### `@mui/joy@5.0.0-beta.2`
|
|
22
|
+
|
|
23
|
+
- ​<!-- 07 -->[Input][joy-ui] Fix the `FormHelperText` icon color (#38387) @TheNatkat
|
|
24
|
+
- ​<!-- 06 -->[Skeleton][joy-ui] Soften the pulse animation (#38384) @zanivan
|
|
25
|
+
- ​<!-- 05 -->[TabPanel][joy-ui] Add `keepMounted` prop (#38293) @decadef20
|
|
26
|
+
|
|
27
|
+
### `@mui/base@5.0.0-beta.11`
|
|
28
|
+
|
|
29
|
+
- ​<!-- 30 -->[base-ui] Remove the legacy Extend\* types (#38184) @michaldudak
|
|
30
|
+
- ​<!-- 29 -->[base-ui] Add `useModal` hook (#38187) @mnajdova
|
|
31
|
+
- ​<!-- 28 -->[base-ui] Add `prepareForSlot` util (#38138) @mnajdova
|
|
32
|
+
- ​<!-- 26 -->[useButton][base-ui] Fix tabIndex not being forwarded (#38417) @DiegoAndai
|
|
33
|
+
- ​<!-- 25 -->[useButton][base-ui] Fix onFocusVisible not being handled (#38399) @DiegoAndai
|
|
34
|
+
|
|
35
|
+
### Docs
|
|
36
|
+
|
|
37
|
+
- ​<!-- 32 -->[blog] Blog post for MUI X mid v6. Date Pickers, Data Grid, and Charts (#38241) @richbustos
|
|
38
|
+
- ​<!-- 35 -->[docs][base-ui] Update number input API docs (#38363) @mj12albert
|
|
39
|
+
- ​<!-- 29 -->[docs] Improve page transition speed (#38394) @oliviertassinari
|
|
40
|
+
- ​<!-- 28 -->[docs] Improve examples (#38398) @oliviertassinari
|
|
41
|
+
- ​<!-- 19 -->[docs][docs] Add `FileUpload` demo (#38420) @sai6855
|
|
42
|
+
- ​<!-- 18 -->[docs][joy-ui] Refine the Order Dashboard template design (#38395) @zanivan
|
|
43
|
+
- ​<!-- 17 -->[docs][material-ui][joy-ui] Simplify the Quickstart section on the Usage page (#38385) @danilo-leal
|
|
44
|
+
- ​<!-- 16 -->[docs][Menu][joy] Explain how to control the open state (#38355) @michaldudak
|
|
45
|
+
- ​<!-- 15 -->[docs][material] Revise the Support page (#38207) @samuelsycamore
|
|
46
|
+
- ​<!-- 14 -->[docs][material-ui] Remove incorrect `aria-label`s in extended variant examples of Floating Action Button (#37170) @ashleykolodziej
|
|
47
|
+
- ​<!-- 13 -->[docs][material-ui] Adjust slightly the installation page content (#38380) @danilo-leal
|
|
48
|
+
- ​<!-- 12 -->[docs][Switch] Fix the readOnly class name in docs (#38277) @michaldudak
|
|
49
|
+
- ​<!-- 11 -->[docs][TablePagination] Add Tailwind CSS & plain CSS introduction demo (#38286) @mnajdova
|
|
50
|
+
|
|
51
|
+
### Examples
|
|
52
|
+
|
|
53
|
+
- ​<!-- 10 -->[examples] Add Joy UI + Vite.js + TypeScript example app (#37406) @nithins1
|
|
54
|
+
|
|
55
|
+
### Core
|
|
56
|
+
|
|
57
|
+
- ​<!-- 30 -->[core] Consistent URL add leading / @oliviertassinari
|
|
58
|
+
- ​<!-- 27 -->[docs-infra] Fix rebase issue @oliviertassinari
|
|
59
|
+
- ​<!-- 26 -->[docs-infra] Fix typo in docs infra docs @oliviertassinari
|
|
60
|
+
- ​<!-- 25 -->[docs-infra] Fix nested list margin (#38456) @oliviertassinari
|
|
61
|
+
- ​<!-- 24 -->[docs-infra] Move the Diamond Sponsors to the TOC (#38410) @danilo-leal
|
|
62
|
+
- ​<!-- 22 -->[docs-infra] Move imports into page data (#38297) @alexfauquette
|
|
63
|
+
- ​<!-- 21 -->[docs-infra] Adjust heading styles (#38365) @danilo-leal
|
|
64
|
+
- ​<!-- 20 -->[docs-infra] Fix info callout border color (#38370) @danilo-leal
|
|
65
|
+
- ​<!-- 05 -->[website] Upgrade the homepage hero demos design (#38388) @danilo-leal
|
|
66
|
+
- ​<!-- 04 -->[website] Improve Base UI hero section demo (#38255) @danilo-leal
|
|
67
|
+
- ​<!-- 03 -->[website] Fix EmailSubscribe look (#38429) @oliviertassinari
|
|
68
|
+
- ​<!-- 02 -->[website] Link Discord in footer (#38369) @richbustos
|
|
69
|
+
- ​<!-- 01 -->[website] Clean up the `GetStartedButtons` component (#38256) @danilo-leal
|
|
70
|
+
|
|
71
|
+
All contributors of this release in alphabetical order: @alexfauquette, @ashleykolodziej, @danilo-leal, @decadef20, @DiegoAndai, @flaviendelangle, @LukasTy, @michaldudak, @mj12albert, @mnajdova, @nithins1, @oliviertassinari, @richbustos, @sai6855, @samuelsycamore, @TheNatkat, @zanivan
|
|
72
|
+
|
|
73
|
+
## 5.14.4
|
|
74
|
+
|
|
75
|
+
<!-- generated comparing v5.14.3..master -->
|
|
76
|
+
|
|
77
|
+
_Aug 8, 2023_
|
|
78
|
+
|
|
79
|
+
A big thanks to the 18 contributors who made this release possible. Here are some highlights ✨:
|
|
80
|
+
|
|
81
|
+
- 🎉 Added [Number input](https://mui.com/base-ui/react-number-input) component & [useNumberInput](https://mui.com/base-ui/react-number-input#hook) hook in [Base UI](https://mui.com/base-ui/getting-started/) @mj12albert
|
|
82
|
+
|
|
83
|
+
### `@mui/material@5.14.4`
|
|
84
|
+
|
|
85
|
+
- ​<!-- 25 -->[Checkbox][material] Add size classes (#38182) @michaldudak
|
|
86
|
+
- ​<!-- 03 -->[Typography] Improve inherit variant logic (#38123) @ZeeshanTamboli
|
|
87
|
+
|
|
88
|
+
### `@mui/system@5.14.4`
|
|
89
|
+
|
|
90
|
+
- ​<!-- 34 -->Revert "[Box] Remove `component` from TypeMap (#38168)" (#38356) @michaldudak
|
|
91
|
+
|
|
92
|
+
### `@mui/base@5.0.0-beta.10`
|
|
93
|
+
|
|
94
|
+
#### Breaking changes
|
|
95
|
+
|
|
96
|
+
- ​<!-- 32 -->[base] Ban default exports (#38200) @michaldudak
|
|
97
|
+
|
|
98
|
+
Base UI default exports were changed to named ones. Previously we had a mix of default and named ones.
|
|
99
|
+
This was changed to improve consistency and avoid problems some bundlers have with default exports.
|
|
100
|
+
See https://github.com/mui/material-ui/issues/21862 for more context.
|
|
101
|
+
|
|
102
|
+
```diff
|
|
103
|
+
- import Button, { buttonClasses } from '@mui/base/Button';
|
|
104
|
+
+ import { Button, buttonClasses } from '@mui/base/Button';
|
|
105
|
+
- import BaseMenu from '@mui/base/Menu';
|
|
106
|
+
+ import { Menu as BaseMenu } from '@mui/base/Menu';
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Additionally, the `ClassNameGenerator` has been moved to the directory matching its name:
|
|
110
|
+
|
|
111
|
+
```diff
|
|
112
|
+
- import ClassNameGenerator from '@mui/base/className';
|
|
113
|
+
+ import { ClassNameGenerator } from '@mui/base/ClassNameGenerator';
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
A codemod is provided to help with the migration:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npx @mui/codemod v5.0.0/base-use-named-imports <path>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### Changes
|
|
123
|
+
|
|
124
|
+
- ​<!-- 31 -->[base] Create useNumberInput and NumberInput (#36119) @mj12albert
|
|
125
|
+
- ​<!-- 28 -->[Select][base] Fix flicker on click of controlled Select button (#37855) @VishruthR
|
|
126
|
+
- ​<!-- 09 -->[Dropdown] Fix imports of types (#38296) @yash-thakur
|
|
127
|
+
|
|
128
|
+
### `@mui/joy@5.0.0-beta.1`
|
|
129
|
+
|
|
130
|
+
- ​<!-- 06 -->[joy-ui][MenuButton] Fix disable of `MenuButton` (#38342) @sai6855
|
|
131
|
+
|
|
132
|
+
### Docs
|
|
133
|
+
|
|
134
|
+
- ​<!-- 33 -->[docs][AppBar] Fix `ResponsiveAppBar` demo logo href (#38346) @iownthegame
|
|
135
|
+
- ​<!-- 30 -->[docs][base] Add Tailwind CSS + plain CSS demo on the Button page (#38240) @alisasanib
|
|
136
|
+
- ​<!-- 29 -->[docs][Menu][base] Remove `Unstyled` prefix from demos' function names (#38270) @sai6855
|
|
137
|
+
- ​<!-- 22 -->[docs] Add themeable component guide (#37908) @siriwatknp
|
|
138
|
+
- ​<!-- 21 -->[docs] Fix Joy UI demo background color (#38307) @oliviertassinari
|
|
139
|
+
- ​<!-- 20 -->[docs] Update API docs for Number Input component (#38301) @ZeeshanTamboli
|
|
140
|
+
- ​<!-- 14 -->[docs][joy-ui] Revise the theme typography page (#38285) @danilo-leal
|
|
141
|
+
- ​<!-- 13 -->[docs][joy-ui] Add TS demo for Menu Bar (#38308) @sai6855
|
|
142
|
+
- ​<!-- 10 -->[docs][joy-ui] Updated Typography callout at getting started (#38289) @zanivan
|
|
143
|
+
- ​<!-- 12 -->[docs][joy-ui] Fix the Inter font installation instructions (#38284) @danilo-leal
|
|
144
|
+
- ​<!-- 11 -->[docs][material] Add note to Autocomplete about ref forwarding (#38305) @samuelsycamore
|
|
145
|
+
- ​<!-- 05 -->[docs][Skeleton] Make the demos feel more realistic (#38212) @oliviertassinari
|
|
146
|
+
|
|
147
|
+
- ​<!-- 08 -->[examples] Swap Next.js examples between App Router and Pages Router; update naming convention (#38204) @samuelsycamore
|
|
148
|
+
- ​<!-- 07 -->[examples][material-ui] Add Material UI + Next.js (App Router) example in JS (#38323) @samuelsycamore
|
|
149
|
+
- ​<!-- 27 -->[blog] Discord announcement blog (#38258) @richbustos
|
|
150
|
+
- ​<!-- 26 -->[blog] Fix 301 links to Toolpad @oliviertassinari
|
|
151
|
+
- ​<!-- 04 -->[website] Updating Charts demo with real charts usage for MUI X marketing page (#38317) @richbustos
|
|
152
|
+
- ​<!-- 03 -->[website] Adjust styles of the Product section on the homepage (#38366) @danilo-leal
|
|
153
|
+
- ​<!-- 02 -->[website] Add Nora teamMember card to 'About' (#38358) @noraleonte
|
|
154
|
+
- ​<!-- 01 -->[website] Fix image layout shift (#38326) @oliviertassinari
|
|
155
|
+
|
|
156
|
+
### Core
|
|
157
|
+
|
|
158
|
+
- ​<!-- 24 -->[core] Fix docs demo export function consistency (#38191) @oliviertassinari
|
|
159
|
+
- ​<!-- 23 -->[core] Fix the link-check script on Windows (#38276) @michaldudak
|
|
160
|
+
- ​<!-- 26 -->[core] Use @testing-library/user-event direct API (#38325) @mj12albert
|
|
161
|
+
- ​<!-- 29 -->[core] Port GitHub workflow for ensuring triage label is present (#38312) @DanailH
|
|
162
|
+
- ​<!-- 19 -->[docs-infra] Consider files ending with .types.ts as props files (#37533) @mnajdova
|
|
163
|
+
- ​<!-- 18 -->[docs-infra] Fix skip to content design (#38304) @oliviertassinari
|
|
164
|
+
- ​<!-- 17 -->[docs-infra] Add a general round of polish to the API content display (#38282) @danilo-leal
|
|
165
|
+
- ​<!-- 16 -->[docs-infra] Make the side nav collapse animation snappier (#38259) @danilo-leal
|
|
166
|
+
- ​<!-- 15 -->[docs-infra] New Component API design followup (#38183) @cherniavskii
|
|
167
|
+
- ​<!-- 06 -->[test] Remove unnecessary `async` keyword from test (#38373) @ZeeshanTamboli
|
|
168
|
+
|
|
169
|
+
All contributors of this release in alphabetical order: @alisasanib, @cherniavskii, @DanailH, @danilo-leal, @iownthegame, @michaldudak, @mj12albert, @mnajdova, @noraleonte, @oliviertassinari, @richbustos, @sai6855, @samuelsycamore, @siriwatknp, @VishruthR, @yash-thakur, @zanivan, @ZeeshanTamboli
|
|
170
|
+
|
|
3
171
|
## 5.14.3
|
|
4
172
|
|
|
5
173
|
<!-- generated comparing v5.14.2..master -->
|
|
@@ -129,7 +297,7 @@ A big thanks to the 23 contributors who made this release possible.
|
|
|
129
297
|
- ​<!-- 19 -->[docs][joy] Add adjustments to the color inversion page (#37143) @danilo-leal
|
|
130
298
|
- ​<!-- 18 -->[docs][material] Improve documentation about adding custom colors (#37743) @DiegoAndai
|
|
131
299
|
- ​<!-- 17 -->[examples] Fix Joy UI Next.js App Router font loading (#38095) @IgnacioUtrilla
|
|
132
|
-
- ​<!-- 16 -->[examples] Fix material-next
|
|
300
|
+
- ​<!-- 16 -->[examples] Fix material-next Font Usage with next/font (#38026) @onderonur
|
|
133
301
|
|
|
134
302
|
### Core
|
|
135
303
|
|
|
@@ -401,7 +569,7 @@ _Jun 21, 2023_
|
|
|
401
569
|
A big thanks to the 25 contributors who made this release possible. Here are some highlights ✨:
|
|
402
570
|
|
|
403
571
|
- 💫 Added [Slider](https://mui.com/material-ui/react-slider/#material-you-version) component using the new Material You design language (#37520) @DiegoAndai.
|
|
404
|
-
- 📚 Added [examples](https://github.com/mui/material-ui/tree/master/examples/material-
|
|
572
|
+
- 📚 Added [examples](https://github.com/mui/material-ui/tree/master/examples/material-ui-nextjs-ts) showcasing how you can use Material UI with next.js's app directory (#37315) @smo043
|
|
405
573
|
|
|
406
574
|
### `@mui/material@5.13.6`
|
|
407
575
|
|
|
@@ -462,7 +630,7 @@ A big thanks to the 25 contributors who made this release possible. Here are som
|
|
|
462
630
|
- ​<!-- 19 -->[docs-infra] Add analyticsTags to Algolia (#37600) @Janpot
|
|
463
631
|
- ​<!-- 18 -->[docs-infra] Simplify product id handling (#37593) @oliviertassinari
|
|
464
632
|
- ​<!-- 35 -->[CHANGELOG] Add missing release date for v5.13.5 @oliviertassinari
|
|
465
|
-
- ​<!-- 16 -->[examples] Shell command fix in the readme file of material-next-
|
|
633
|
+
- ​<!-- 16 -->[examples] Shell command fix in the readme file of material-next-ts example (#37675) @bablukpik
|
|
466
634
|
- ​<!-- 15 -->[examples] Next.js v13 app router with Material UI (#37315) @smo043
|
|
467
635
|
|
|
468
636
|
### Core
|
|
@@ -3619,7 +3787,7 @@ A big thanks to the 19 contributors who made this release possible. Here are som
|
|
|
3619
3787
|
- [docs] Add webpack alias for legacy utils package (#33376) @jgbae
|
|
3620
3788
|
- [docs] Improve external link icons synonyms (#33257) @davidgarciab
|
|
3621
3789
|
- [examples] Update Base UI with Tailwind CSS to use the latest versions of the dependencies (#33401) @mnajdova
|
|
3622
|
-
- [examples] Add
|
|
3790
|
+
- [examples] Add Base UI example (#33154) @siriwatknp
|
|
3623
3791
|
|
|
3624
3792
|
### Core
|
|
3625
3793
|
|
|
@@ -3638,7 +3806,7 @@ _Jul 4, 2022_
|
|
|
3638
3806
|
|
|
3639
3807
|
A big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
3640
3808
|
|
|
3641
|
-
- 🐛 Fixed an issue causing
|
|
3809
|
+
- 🐛 Fixed an issue causing TypeScript errors when building a project with Material UI v5.8.6 (@michaldudak)
|
|
3642
3810
|
- 🐛 Fixed a few bugs in Material UI components. Thanks @henriqueholtz, @jake-collibra, @MattiasMartens and @TimoWilhelm!
|
|
3643
3811
|
- many other 🐛 bug fixes and 📚 documentation improvements
|
|
3644
3812
|
|
|
@@ -3667,7 +3835,7 @@ A big thanks to the 13 contributors who made this release possible. Here are som
|
|
|
3667
3835
|
|
|
3668
3836
|
### `@mui/base@5.0.0-alpha.88`
|
|
3669
3837
|
|
|
3670
|
-
- [base] Remove a type incompatible with
|
|
3838
|
+
- [base] Remove a type incompatible with TypeScript 3.5 (#33361) @michaldudak
|
|
3671
3839
|
- [BadgeUnstyled] Export BadgeUnstyledOwnProps interface to fix typescript compiler error (#33314) @aaronlademann-wf
|
|
3672
3840
|
- [TablePaginationUnstyled] Accept callbacks in componentsProps (#33309) @michaldudak
|
|
3673
3841
|
|
|
@@ -5109,7 +5277,7 @@ _Feb 1, 2022_
|
|
|
5109
5277
|
|
|
5110
5278
|
A big thanks to the 22 contributors who made this release possible. Here are some highlights ✨:
|
|
5111
5279
|
|
|
5112
|
-
- 🛠 @goncalovf added an example project using [Material UI with Vite.js](https://github.com/mui/material-ui/tree/master/examples/material-vite) (#28241)
|
|
5280
|
+
- 🛠 @goncalovf added an example project using [Material UI with Vite.js](https://github.com/mui/material-ui/tree/master/examples/material-ui-vite) (#28241)
|
|
5113
5281
|
- Number of 🐛 bug fixes and 📚 documentation improvements.
|
|
5114
5282
|
|
|
5115
5283
|
### `@mui/material@5.4.0`
|
|
@@ -10284,7 +10452,7 @@ A big thanks to the 34 contributors who made this release possible. Here are som
|
|
|
10284
10452
|
- [theme] Add htmlFontSize to Typography interface (#23412) @fergusmcdonald
|
|
10285
10453
|
- [Tooltip] Fix PopperProps popper modifiers not being merged properly (#23421) @dominique-mueller
|
|
10286
10454
|
- [Tooltip] Long press select text on iOS (#23466) @hmaddisb
|
|
10287
|
-
- [Tooltip] Unexpected
|
|
10455
|
+
- [Tooltip] Unexpected behavior onOpen/onClose (#23482) @brorlarsnicklas
|
|
10288
10456
|
|
|
10289
10457
|
### `@material-ui/lab@v5.0.0-alpha.16`
|
|
10290
10458
|
|
|
@@ -7,7 +7,7 @@ exports.default = composeClasses;
|
|
|
7
7
|
function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
8
8
|
const output = {};
|
|
9
9
|
Object.keys(slots).forEach(
|
|
10
|
-
// `
|
|
10
|
+
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
11
11
|
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
12
12
|
slot => {
|
|
13
13
|
output[slot] = slots[slot].reduce((acc, key) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
2
2
|
const output = {};
|
|
3
3
|
Object.keys(slots).forEach(
|
|
4
|
-
// `
|
|
4
|
+
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
5
5
|
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
6
6
|
slot => {
|
|
7
7
|
output[slot] = slots[slot].reduce((acc, key) => {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import ClassNameGenerator from '../ClassNameGenerator';
|
|
2
|
+
|
|
3
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
4
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
2
5
|
const globalStateClassesMapping = {
|
|
3
6
|
active: 'active',
|
|
4
7
|
checked: 'checked',
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = generateUtilityClass;
|
|
8
8
|
var _ClassNameGenerator = _interopRequireDefault(require("../ClassNameGenerator"));
|
|
9
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
10
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
9
11
|
const globalStateClassesMapping = {
|
|
10
12
|
active: 'active',
|
|
11
13
|
checked: 'checked',
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export default function composeClasses(slots, getUtilityClass) {
|
|
|
2
2
|
var classes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
3
3
|
var output = {};
|
|
4
4
|
Object.keys(slots).forEach(
|
|
5
|
-
// `
|
|
5
|
+
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
6
6
|
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
7
7
|
function (slot) {
|
|
8
8
|
output[slot] = slots[slot].reduce(function (acc, key) {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import ClassNameGenerator from '../ClassNameGenerator';
|
|
2
|
+
|
|
3
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
4
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
2
5
|
var globalStateClassesMapping = {
|
|
3
6
|
active: 'active',
|
|
4
7
|
checked: 'checked',
|
package/legacy/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default function composeClasses(slots, getUtilityClass, classes = undefined) {
|
|
2
2
|
const output = {};
|
|
3
3
|
Object.keys(slots).forEach(
|
|
4
|
-
// `
|
|
4
|
+
// `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
|
|
5
5
|
// @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
|
|
6
6
|
slot => {
|
|
7
7
|
output[slot] = slots[slot].reduce((acc, key) => {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import ClassNameGenerator from '../ClassNameGenerator';
|
|
2
|
+
|
|
3
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
4
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
2
5
|
const globalStateClassesMapping = {
|
|
3
6
|
active: 'active',
|
|
4
7
|
checked: 'checked',
|
package/modern/index.js
CHANGED