Skip to content

Commit 84999ea

Browse files
committed
Add styles for Material Symbols and update package configuration
1 parent 1310b70 commit 84999ea

File tree

3 files changed

+58
-3
lines changed

3 files changed

+58
-3
lines changed

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,19 @@
2222
"react-components",
2323
"material-react"
2424
],
25+
"main": "dist/index.js",
26+
"types": "dist/index.d.ts",
27+
"exports": {
28+
"./styles": "./dist/styles.css",
29+
".": "./dist/index.js"
30+
},
31+
"files": [
32+
"dist"
33+
],
2534
"dependencies": {
2635
"@fontsource/roboto": "^5.1.0",
2736
"@lit/react": "^1.0.6",
28-
"@material/web": "^2.2.0",
37+
"@material/web": "^2.4.0",
2938
"material-symbols": "^0.34.1"
3039
},
3140
"devDependencies": {
@@ -37,7 +46,7 @@
3746
"typescript": "^5.4.3"
3847
},
3948
"scripts": {
40-
"build": "tsc && copyfiles -u 1 src/**/*.tsx dist/",
49+
"build": "tsc && copyfiles -u 1 src/**/*.tsx src/**/*.css dist/",
4150
"build:clean": "rimraf dist && npm run build",
4251
"typecheck": "tsc --noEmit",
4352
"generate": "node generate.js && npm run format",

src/styles.css

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
@import 'material-symbols';
2+
@import '@fontsource/roboto';
3+
4+
.material-symbols-rounded {
5+
font-family: 'Material Symbols Rounded', serif;
6+
font-weight: normal;
7+
font-style: normal;
8+
font-size: 24px;
9+
line-height: 1;
10+
letter-spacing: normal;
11+
text-transform: none;
12+
display: inline-block;
13+
white-space: nowrap;
14+
word-wrap: normal;
15+
direction: ltr;
16+
-webkit-font-feature-settings: 'liga';
17+
-webkit-font-smoothing: antialiased;
18+
}
19+
20+
.material-symbols-sharp {
21+
font-family: 'Material Symbols Sharp', serif;
22+
font-weight: normal;
23+
font-style: normal;
24+
font-size: 24px;
25+
line-height: 1;
26+
letter-spacing: normal;
27+
text-transform: none;
28+
display: inline-block;
29+
white-space: nowrap;
30+
word-wrap: normal;
31+
direction: ltr;
32+
-webkit-font-feature-settings: 'liga';
33+
-webkit-font-smoothing: antialiased;
34+
}
35+
36+
md-icon[filled] {
37+
font-variation-settings: 'FILL' 1;
38+
}
39+
40+
md-icon.rounded {
41+
--md-icon-font: 'Material Symbols Rounded';
42+
}
43+
44+
md-icon.sharp {
45+
--md-icon-font: 'Material Symbols Sharp';
46+
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
"dist",
3131
"temp-material-web"
3232
]
33-
}
33+
}

0 commit comments

Comments
 (0)