Skip to content

Commit cca1827

Browse files
committed
feat: update to mdc-web 14, implement new features and fixes
1 parent 88a2cd3 commit cca1827

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1736
-1158
lines changed

MIGRATING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,40 @@ This doc contains information that will help you migrate your code from an older
44

55
# SMUI 6 -> SMUI 7
66

7+
SMUI 7 migrated to upstream MDC 14.0 from 13.0:
8+
https://github.com/material-components/material-components-web/blob/master/CHANGELOG.md#1400-2022-04-27
9+
710
## Breaking Changes
811

912
- The `@smui/common/elements` components are gone. They are replaced with the `SmuiElement` component exported from `@smui/common`. It takes a `tag` prop and creates an element dynamically with that tag name. There's also a `Svg` component exported from `@smui/common` if you need an svg.
1013
- The "\*ComponentDev" types (like `MenuComponentDev`) are gone. You can now use the component as its type. Components that can take a `component` or `tag` prop (like `Button`) have required generic arguments that you can get around by using "InstanceType", like `let button: InstanceType<typeof Button>;`.
1114
- If you're using `classAdderBuilder`, you need to use `keyof SmuiElementMap` instead of `string` as its generic argument.
1215

16+
## Changes
17+
18+
### Components
19+
20+
- Banner
21+
- New `autoClose` prop.
22+
- New `SMUIBanner:actionClicked` event. It is fired when an action is clicked and `autoClose` is `false`.
23+
- Dialog
24+
- New `sheet` prop.
25+
- New `noContentPadding` prop.
26+
- FAB
27+
- New `focusRing` prop. Use this to support rendering focused FABs in High Contrast Mode.
28+
- List
29+
- New `disabledItemsFocusable` prop.
30+
- New `wrapper` prop on Item. This should be used for items that only act as the container of a nested list.
31+
- Menu Surface
32+
- New `SMUIMenuSurface:opening` event.
33+
- New `openBottomBias` prop.
34+
- Slider
35+
- `valueToAriaValueTextFn` now gets a `thumb` argument.
36+
- New `hideFocusStylesForPointerEvents` prop. Comes from [upstream](https://github.com/material-components/material-components-web/commit/ec54d904621360bcb27e6d3cd1f33112e2a54aac).
37+
- New `minRange` prop to limit selectable range.
38+
- Switch
39+
- New `focusRing` prop. Use this to support rendering focused switches in High Contrast Mode.
40+
1341
# SMUI 5 -> SMUI 6
1442

1543
SMUI 6 migrated to upstream MDC 13.0 from 11.0:

0 commit comments

Comments
 (0)