Skip to content

Commit 034bdf7

Browse files
committed
chore: updates
1 parent fa02799 commit 034bdf7

File tree

114 files changed

+3567
-1767
lines changed

Some content is hidden

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

114 files changed

+3567
-1767
lines changed

.knip.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@
44
"project": [],
55
"ignore": ["**/*.{native,test}.{ts,tsx}"],
66
"ignoreDependencies": [
7+
"@md3-ui/core",
78
"@md3-ui/test-utils",
8-
"prettier",
9-
"react-native-svg",
10-
"react-native-web"
9+
"@preconstruct/hook",
10+
"@svgr/plugin-jsx",
11+
"prettier-plugin-organize-imports",
12+
"webpack",
13+
"yarn-deduplicate"
1114
],
1215
"rules": {
1316
"unresolved": "off"
1417
},
1518
"workspaces": {
1619
".": {
17-
"entry": ["scripts/*.ts"],
18-
"project": ["scripts/**/.ts"],
19-
"ignoreDependencies": [
20-
"prettier-plugin-organize-imports",
21-
"yarn-deduplicate"
22-
]
20+
"entry": [".storybook/main.ts", ".storybook/preview.tsx", "scripts/*.ts"],
21+
"project": [".storybook/**/*.{ts,tsx}", "scripts/**/.ts"]
2322
},
2423
"app": {
2524
"entry": ["app.config.js", "metro.config.js", "src/index.ts"],
@@ -35,7 +34,8 @@
3534
"packages/*": {
3635
"entry": ["src/index.ts", "scripts/*.ts"],
3736
"project": ["src/**/*.{ts,tsx}", "scripts/**/.ts"],
38-
"ignore": ["src/**/*.test.{ts,tsx}"]
37+
"ignore": ["src/**/*.test.{ts,tsx}"],
38+
"ignoreDependencies": ["prettier"]
3939
}
4040
}
4141
}

.storybook/main.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { StorybookConfig } from "@storybook/react-webpack5"
2+
import webpack from "webpack"
23

34
const config: StorybookConfig = {
45
stories: ["../packages/*/stories/*.stories.tsx"],
@@ -20,6 +21,12 @@ const config: StorybookConfig = {
2021
},
2122
webpackFinal: (config) => ({
2223
...config,
24+
plugins: [
25+
...(config.plugins ?? []),
26+
new webpack.DefinePlugin({
27+
__DEV__: JSON.stringify(true),
28+
}),
29+
],
2330
resolve: {
2431
...config.resolve,
2532
alias: {

.storybook/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const preview: Preview = {
3434
decorators: [
3535
withPerformance,
3636
(StoryFn, context) => (
37-
<SafeAreaProvider style={{ height: "100%" }}>
37+
<SafeAreaProvider style={{ display: "contents" as any }}>
3838
<Md3Provider theme={createTheme()}>
3939
<Box
4040
dir={context.globals.direction.toLowerCase()}

app/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"dependencies": {
77
"@expo/vector-icons": "^13.0.0",
88
"@md3-ui/core": "^0.2.1",
9-
"expo": "^48.0.16",
9+
"expo": "^48.0.17",
1010
"expo-status-bar": "~1.4.4",
1111
"react": "18.2.0",
1212
"react-dom": "18.2.0",
13-
"react-native": "0.71.7",
13+
"react-native": "0.71.8",
1414
"react-native-iphone-x-helper": "^1.3.1",
1515
"react-native-safe-area-context": "4.5.0",
16-
"react-router-native": "^6.11.1",
17-
"uuid": "^9.0.0"
16+
"react-router-native": "^6.11.2",
17+
"uuid": "^3.4.0"
1818
},
1919
"devDependencies": {
2020
"babel-preset-expo": "^9.3.2",

docs/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@
1515
"@md3-ui/utils": "^0.2.1",
1616
"@mdx-js/loader": "^2.3.0",
1717
"@mdx-js/react": "^2.3.0",
18-
"@next/mdx": "^13.4.1",
18+
"@next/mdx": "^13.4.2",
1919
"@preconstruct/next": "^4.0.0",
2020
"copy-to-clipboard": "^3.3.3",
21-
"next": "^13.4.1",
21+
"next": "^13.4.2",
2222
"next-seo": "^6.0.0",
2323
"prism-react-renderer": "^1.3.5",
2424
"react": "18.2.0",
2525
"react-dom": "18.2.0",
26-
"react-live": "^4.0.1",
27-
"react-native": "0.71.7",
26+
"react-live": "^4.1.1",
27+
"react-native": "0.71.8",
2828
"react-native-safe-area-context": "4.5.0",
2929
"react-native-svg": "13.4.0",
3030
"react-native-web": "^0.19.4",
3131
"remark-emoji": "^3.1.1",
3232
"remark-gfm": "^3.0.1",
3333
"remark-slug": "^7.0.1",
34-
"webpack": "^5.82.0"
34+
"webpack": "^5.83.1"
3535
},
3636
"devDependencies": {
37-
"eslint": "^8.39.0",
38-
"eslint-config-next": "^13.4.1"
37+
"eslint": "^8.40.0",
38+
"eslint-config-next": "^13.4.2"
3939
}
4040
}

docs/pages/_app.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => (
2323
frame: { width: 0, height: 0, x: 0, y: 0 },
2424
insets: { left: 0, right: 0, bottom: 0, top: 0 },
2525
}}
26-
style={{
27-
display: "contents" as any,
28-
flex: 0,
29-
}}
26+
style={{ display: "contents" as any }}
3027
>
3128
<Md3Provider
3229
theme={createTheme({

docs/pages/index.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { Box, ElevatedButton, OutlinedButton, Stack, Text } from "@md3-ui/core"
22
import { ChangeHistory } from "@md3-ui/icons"
33
import { NextPage } from "next"
44
import Head from "next/head"
5+
import { MDXComponents } from "../src/mdx-components"
56

67
const Home: NextPage = () => (
78
<>
@@ -50,6 +51,29 @@ const Home: NextPage = () => (
5051
</ElevatedButton>
5152
<OutlinedButton>$ npm i @md3-ui/core</OutlinedButton>
5253
</Stack>
54+
<MDXComponents.ul>
55+
<MDXComponents.li>
56+
<Text sx={{ fontWeight: "500" }}>Accessible HTML</Text>. Support
57+
different devices and input modes, render semantic tags.
58+
</MDXComponents.li>
59+
<MDXComponents.li>
60+
<Text sx={{ fontWeight: "500" }}>High-quality interactions</Text>.
61+
Support gestures and multiple input modes (touch, mouse, keyboard).
62+
</MDXComponents.li>
63+
<MDXComponents.li>
64+
<Text sx={{ fontWeight: "500" }}>Reliable styles</Text>. Rely on
65+
scoped styles and automatic vendor-prefixing. Support RTL layouts.
66+
</MDXComponents.li>
67+
<MDXComponents.li>
68+
<Text sx={{ fontWeight: "500" }}>Responsive containers</Text>.
69+
Respond to element resize events.
70+
</MDXComponents.li>
71+
<MDXComponents.li>
72+
<Text sx={{ fontWeight: "500" }}>Incremental adoption</Text>.
73+
Interoperates with existing React DOM components. Bundle only what
74+
you use.
75+
</MDXComponents.li>
76+
</MDXComponents.ul>
5377
</Box>
5478
</Box>
5579
</>

docs/src/components/code-block/react-live-block.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ const ReactLiveBlock: React.FC<ReactLiveBlockProps> = ({
5959
return (
6060
<LiveProvider {...liveProviderProps}>
6161
<LivePreview
62-
// @ts-expect-error: `style` does not exist in props, but works
6362
style={{
6463
backgroundColor: theme.sys.color.surface,
6564
borderColor: theme.sys.color.outlineVariant,

docs/src/components/props-table.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { Box, Stack, Text } from "@md3-ui/core"
2-
import * as propsDocs from "@md3-ui/props-docs"
2+
import { getPropDoc } from "@md3-ui/props-docs"
33
import * as React from "react"
44
import { MDXComponents } from "../mdx-components"
55
import { convertBackticksToInlineCode } from "../utils/convert-backticks-to-inline-code"
66

77
interface PropsTableProps {
8-
of: keyof typeof propsDocs
8+
of: string
99
omit?: string[] | null
1010
only?: string[] | null
1111
}
1212

1313
function makePropsTable({ of, omit, only }: PropsTableProps) {
14-
const props = propsDocs[of]?.props
14+
const props = getPropDoc(of)
1515

1616
if (!props) {
1717
return []
@@ -29,10 +29,9 @@ function makePropsTable({ of, omit, only }: PropsTableProps) {
2929
})
3030
.map(([name, value]) => ({
3131
name,
32-
required: value.required,
33-
type: cleanType(value.type.name),
34-
defaultValue: cleanDefaultValue(value.defaultValue?.value),
35-
description: value.description,
32+
...value,
33+
type: cleanType(value.type),
34+
defaultValue: cleanDefaultValue(value.defaultValue),
3635
}))
3736
}
3837

docs/src/mdx-components.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ export const MDXComponents = {
4545
ol: (props: React.HTMLAttributes<HTMLOListElement>) => (
4646
<Text as="ol" variant="bodyLarge" {...props} />
4747
),
48+
li: (props: React.HTMLAttributes<HTMLLIElement>) => (
49+
<Text as="li" {...props} />
50+
),
4851
code: (props: React.HTMLAttributes<HTMLParagraphElement>) => (
4952
<Text
5053
as="code"

0 commit comments

Comments
 (0)