Skip to content

Commit 5ad5e06

Browse files
author
Zaydek Michels-Gualtieri
committed
Upgraded to Tailwind UI defaults (fixed checkmark color bug) and tweaked class order for transitions
1 parent 32229f3 commit 5ad5e06

File tree

5 files changed

+41
-21
lines changed

5 files changed

+41
-21
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
22
"name": "codex-editor-prototypes",
3-
"version": "0.1.0",
4-
"private": true,
53
"dependencies": {
64
"emoji-trie": "https://github.com/codex-src/emoji-trie.js",
75
"lodash": "^4.17.15",
@@ -36,6 +34,7 @@
3634
]
3735
},
3836
"devDependencies": {
37+
"@tailwindcss/ui": "^0.3.0",
3938
"debug.css": "https://github.com/codex-src/debug.css",
4039
"raw.macro": "^0.3.0",
4140
"serve": "^11.3.0",

src/Editor/Elements/Elements.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -168,21 +168,7 @@ export const TodoItem = React.memo(({ id, syntax, checked, children, dispatch })
168168
<div className="absolute" contentEditable={false}>
169169
<input
170170
ref={ref}
171-
className={dedupeSpaces(`
172-
form-checkbox
173-
text-blue-500
174-
border-none
175-
rounded-md
176-
shadow-hero
177-
transform
178-
scale-105
179-
transition
180-
ease-out
181-
duration-150
182-
cursor-pointer
183-
`)}
184-
// FIXME: Remove style={{ ... }}
185-
style={{ color: "var(--blue-500)" }}
171+
className={dedupeSpaces(`form-checkbox text-blue-500 border-none rounded-md shadow-hero transform scale-105 transition duration-150 ease-out cursor-pointer`)}
186172
type="checkbox"
187173
checked={checked}
188174
onChange={() => {

src/EditorApp/FixedPreferences.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const FixedPreferences = ({
3535
Zoom -
3636
</Button>
3737
<div
38-
className="p-2 flex flex-row items-center font-medium text-xxs transition ease-out duration-500"
38+
className="p-2 flex flex-row items-center font-medium text-xxs transition duration-500 ease-out"
3939
style={{ opacity: !saveStatus || saveStatus === 3 ? "0" : "1" }}
4040
>
4141
Saved
@@ -98,10 +98,10 @@ const FixedPreferences = ({
9898
<Transition
9999
unmountOnExit={false}
100100
show={prefs.showSidebar}
101-
enter="transition ease-out duration-300"
101+
enter="transition duration-300 ease-out"
102102
enterFrom="transform opacity-0 translate-x-32"
103103
enterTo="transform opacity-100 translate-x-0 pointer-events-auto"
104-
leave="transition ease-in duration-300"
104+
leave="transition duration-300 ease-in"
105105
leaveFrom="transform opacity-100 translate-x-0"
106106
leaveTo="transform opacity-0 translate-x-32 pointer-events-none"
107107
>

tailwind.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,7 @@ module.exports = {
4343
},
4444
},
4545
variants: {},
46-
plugins: [],
46+
plugins: [
47+
require("@tailwindcss/ui"),
48+
],
4749
}

yarn.lock

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,24 @@
13281328
"@svgr/plugin-svgo" "^4.3.1"
13291329
loader-utils "^1.2.3"
13301330

1331+
"@tailwindcss/custom-forms@^0.2.1":
1332+
version "0.2.1"
1333+
resolved "https://registry.yarnpkg.com/@tailwindcss/custom-forms/-/custom-forms-0.2.1.tgz#40e5ed1fff6d29d8ed1c508a0b2aaf8da96962e0"
1334+
integrity sha512-XdP5XY6kxo3x5o50mWUyoYWxOPV16baagLoZ5uM41gh6IhXzhz/vJYzqrTb/lN58maGIKlpkxgVsQUNSsbAS3Q==
1335+
dependencies:
1336+
lodash "^4.17.11"
1337+
mini-svg-data-uri "^1.0.3"
1338+
traverse "^0.6.6"
1339+
1340+
"@tailwindcss/ui@^0.3.0":
1341+
version "0.3.0"
1342+
resolved "https://registry.yarnpkg.com/@tailwindcss/ui/-/ui-0.3.0.tgz#846e489c61bdeb60bdd4e2c32033db770ad8d429"
1343+
integrity sha512-LucyddG60/XAGN7aau+Jn84dsl2BFMZya7o/rGVKSXBVXUv+9SoaGmkbPdl0G3kkpcfQrGndDPSkdUgVTS0y8g==
1344+
dependencies:
1345+
"@tailwindcss/custom-forms" "^0.2.1"
1346+
hex-rgb "^4.1.0"
1347+
postcss-selector-parser "^6.0.2"
1348+
13311349
"@types/babel__core@^7.1.0":
13321350
version "7.1.7"
13331351
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.7.tgz#1dacad8840364a57c98d0dd4855c6dd3752c6b89"
@@ -5087,6 +5105,11 @@ hex-color-regex@^1.1.0:
50875105
resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e"
50885106
integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
50895107

5108+
hex-rgb@^4.1.0:
5109+
version "4.1.0"
5110+
resolved "https://registry.yarnpkg.com/hex-rgb/-/hex-rgb-4.1.0.tgz#2d5d3a2943bd40e7dc9b0d5b98903d7d17035967"
5111+
integrity sha512-n7xsIfyBkFChITGPh6FLtxNzAt2HxZLcQIY9hYH4gm2gmMQJHMguMH3E+jnmvUbSTF5QrmFnGab5Ippi+D7e/g==
5112+
50905113
hmac-drbg@^1.0.0:
50915114
version "1.0.1"
50925115
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
@@ -6871,6 +6894,11 @@ mini-css-extract-plugin@0.9.0:
68716894
schema-utils "^1.0.0"
68726895
webpack-sources "^1.1.0"
68736896

6897+
mini-svg-data-uri@^1.0.3:
6898+
version "1.2.3"
6899+
resolved "https://registry.yarnpkg.com/mini-svg-data-uri/-/mini-svg-data-uri-1.2.3.tgz#e16baa92ad55ddaa1c2c135759129f41910bc39f"
6900+
integrity sha512-zd6KCAyXgmq6FV1mR10oKXYtvmA9vRoB6xPSTUJTbFApCtkefDnYueVR1gkof3KcdLZo1Y8mjF2DFmQMIxsHNQ==
6901+
68746902
minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
68756903
version "1.0.1"
68766904
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
@@ -10408,6 +10436,11 @@ tr46@^1.0.1:
1040810436
dependencies:
1040910437
punycode "^2.1.0"
1041010438

10439+
traverse@^0.6.6:
10440+
version "0.6.6"
10441+
resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137"
10442+
integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=
10443+
1041110444
ts-pnp@1.1.6:
1041210445
version "1.1.6"
1041310446
resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.1.6.tgz#389a24396d425a0d3162e96d2b4638900fdc289a"

0 commit comments

Comments
 (0)