Skip to content

Commit 519b128

Browse files
authored
feat(theme): Better Contrast Colors by Default and dev-utils refactor (#955)
* chore(docs): updated demo sandboxes to include filetype icons * feat(theme): choose best contrast ratio color by default This adds a new `function` that is used for default variables within react-md that tried to guess if the text color should be white or black. Going forward, this one will use the color that has the biggest contrast ratio instead of always choosing white if it met the minimum ratio. * chore: removed unneeded scripts from package.jsons * temp move * chore(docs): updated sandboxes * chore(dev-utils): strict tsconfig * chore(dev-utils): refactored the dev-utils code and removed unneeded scripts * chore(tsconfig): simplified tsconfig since strict was enabled * chore(dev-utils): copied over indexer stuff * chore(dev-utils): removed the old_src * chore(dev-utils): cleanup and lint fixes * chore(sandbox): fixed html comment
1 parent bf6d379 commit 519b128

File tree

290 files changed

+4708
-5997
lines changed

Some content is hidden

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

290 files changed

+4708
-5997
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"release": "dev-utils release",
99
"dev-utils": "dev-utils",
10-
"sandbox": "yarn workspace documentation sandbox",
10+
"sandbox": "dev-utils sandbox",
1111
"start": "yarn workspace documentation start-dev",
1212
"dev": "npm-run-all -p watch start",
1313
"setup": "npm-run-all build-dev-utils force-install build",

packages/alert/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
"name": "@react-md/alert",
33
"version": "2.3.1",
44
"description": "Create accessible alerts through snackbars and banners.",
5-
"scripts": {
6-
"build": "dev-utils build",
7-
"clean": "dev-utils clean"
8-
},
95
"main": "./lib/index.js",
106
"module": "./es/index.js",
117
"types": "./types/index.d.ts",

packages/app-bar/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
"name": "@react-md/app-bar",
33
"version": "2.3.1",
44
"description": "This small package implments the AppBar spec in material design.",
5-
"scripts": {
6-
"build": "dev-utils build",
7-
"clean": "dev-utils clean"
8-
},
95
"main": "./lib/index.js",
106
"module": "./es/index.js",
117
"types": "./types/index.d.ts",

packages/autocomplete/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
"name": "@react-md/autocomplete",
33
"version": "2.3.1",
44
"description": "",
5-
"scripts": {
6-
"build": "dev-utils build",
7-
"clean": "dev-utils clean"
8-
},
95
"main": "./lib/index.js",
106
"module": "./es/index.js",
117
"types": "./types/index.d.ts",

packages/avatar/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
"name": "@react-md/avatar",
33
"version": "2.3.1",
44
"description": "This package is used to avatars which are used to symbolize people or objects.",
5-
"scripts": {
6-
"build": "dev-utils build",
7-
"clean": "dev-utils clean"
8-
},
95
"main": "./lib/index.js",
106
"module": "./es/index.js",
117
"types": "./types/index.d.ts",

packages/badge/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
"name": "@react-md/badge",
33
"version": "2.3.1",
44
"description": "Create a badge that is fixed to another element. This is generally used for notification counts.",
5-
"scripts": {
6-
"build": "dev-utils build",
7-
"clean": "dev-utils clean"
8-
},
95
"main": "./lib/index.js",
106
"module": "./es/index.js",
117
"types": "./types/index.d.ts",

packages/button/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
"name": "@react-md/button",
33
"version": "2.3.1",
44
"description": "This package is used to create buttons with the material design spec. There is built-in support to be able to render accessible clickable divs that look like buttons, or even apply button styles to any element.",
5-
"scripts": {
6-
"build": "dev-utils build",
7-
"clean": "dev-utils clean"
8-
},
95
"main": "./lib/index.js",
106
"module": "./es/index.js",
117
"types": "./types/index.d.ts",

packages/card/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
"name": "@react-md/card",
33
"version": "2.3.1",
44
"description": "Create interactable cards from the material design specifications.",
5-
"scripts": {
6-
"build": "dev-utils build",
7-
"clean": "dev-utils clean"
8-
},
95
"main": "./lib/index.js",
106
"module": "./es/index.js",
117
"types": "./types/index.d.ts",

packages/chip/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
"name": "@react-md/chip",
33
"version": "2.3.1",
44
"description": "",
5-
"scripts": {
6-
"build": "dev-utils build",
7-
"clean": "dev-utils clean"
8-
},
95
"main": "./lib/index.js",
106
"module": "./es/index.js",
117
"types": "./types/index.d.ts",

packages/dev-utils/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,28 @@ re-installing dev dependencies in each project and all the tsconfig files. All
66
of it will be handled automatically behind the scenes.
77

88
For more info, run `yarn dev-utils --help`.
9+
10+
```sh
11+
Usage: dev-utils [options] [command]
12+
13+
Options:
14+
-h, --help display help for command
15+
16+
Commands:
17+
clean [options] Cleans all the distributables for all publishable packages.
18+
styles [options] Copies all the SCSS files into the dist folder as well as creating non-webpack specific versions.
19+
sassdoc [options] Creates the sassdoc for the documentation site in all scoped packages.
20+
variables [options] Creates the `src/scssVariables` file in all scoped packages.
21+
changelogs [options] Updates the changelogs to be a bit prettier.
22+
configs [options] Re-generates all the `tsconfig.*` files for the Typescript project references.
23+
copy-shared [options] Copies all the shared markdown files and utils throughout the repo into the documentation folder.
24+
doc-index [options] Indexes (terribly) metadata throughout react-md for the documentation site.
25+
release [options] Goes through the steps of releasing a new version of react-md.
26+
sandbox [options] Creates the `*-Sandbox.json` files in the documentation site.
27+
libsize [options] Prints the gzpped size for the entire library based on the UMD bundles and the pre-compiled themes.
28+
themes [options] Creates all the pre-compiled css themes in the root `/themes` folder. This really shouldn't be run other than during the release script since`the
29+
`/themes` folder is ignored by git until a release is tagged.
30+
umd [options] Compiles the UMD bundles for `react-md`. This really shouldn't be used as it's handled by the `release` script automatically.
31+
watch [options] A custom watch script that handles copying all changed scss files as well as starting tsc watchers.
32+
help [command] display help for command
33+
```

0 commit comments

Comments
 (0)