From 7b568de2802db5309d97698dca5e1c2c72e33799 Mon Sep 17 00:00:00 2001 From: Lingxi Li Date: Tue, 19 Dec 2023 18:06:49 -0500 Subject: [PATCH] feat: add tailwind config helper. --- bun.lockb | Bin 72276 -> 51733 bytes package.json | 7 ++----- src/index.ts | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 src/index.ts diff --git a/bun.lockb b/bun.lockb index d144b254a3a3518779976ee7fa5bfc46d1630a03..6743235cb016d6b8e40401dfc5ac786666ff000e 100755 GIT binary patch delta 6430 zcmeHLd3aRS6@Pb<0bceEl9z#m1VRXqA(Kg%NJ3sji--+NOTYyPlVpe!639Y9EOaIc zh^T-bR1~8IY9SyZMp}_gWixDn$Racfk&k{3LS4SrPqAu$=e`+=pVq(H|GeM#d*`0z zoqNu?%bU3;Uk`qARnSUn#-^gz<_+BYrkb{H>APW}V(Z>_Dv#ae%B|13R`5ubtMR_Y zZHjD5AD^7;`FM%J7|))H;`N{#0_tk0cF&rlD4R?M-|VNEK?eV{pYH@81^a5(+*$0U z!>`}sr`tg_=qp^V+DvzYvJ~${@;IO>2J?2B4M9;i!*Mof1mq1c2m>7png&|ckU8I3 zQ>{4bD{Gzg4Xz@{+0NaNSy?^1OsVf-yq^nsD9bBn&8~MT$`J4>cs6oYHz?16VLk=& z5;mOSo>h_gyIQ3bX){03Pir%)XO}zYAna;)jeCwV5lYra<3-N+5*V&jy}PE~IYUuo z6sW+n)F#qXRv>n^p6QxDm+O*)Sec(u?VK~mRiT(D+7y423#BlsU0d%$u%8M=iG|g9 z$T>)7`RsZw>qW@97~P@`c{@2x$zmThn&Q=(7=Hn&*%Y4=9A}i}US~rl#;W`p?s(iI zkcWd>=&UJO+lZ-#z`GJO5p*;B$AdOebWpsf0$q+GH^CUS5tQdF4U{wYz&Z)E0@MP! z0~6dE^ltE+%@|O&Yk_O_(*(-VPlhqmF`yjFB~Z@N276v3v7qo9F6Vk#&r*3kB# zWK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vs@MDQa>?%gnM*iyxS-h^Ja~WTFdS(b=Q)lSPB^Zw2|XF$P@980q&#I zCM#6aj746)G&)WZouFXM%WXaXMX#ig{;akh_z@FUDb=qfgQ}D3iuX*)y2N0ZUbys!U0WS1Gs%%T+4Go;w<)7$zE0cP*LP z*QD8#Rf=O?GoR586w8|qw%;BAmHd?L1swGK1nT}=7_CL9T5y3`gxGg3^PYQwc_d!7U@An!^b%%c+HCX#vX4gWWKB3_@@&oLQAo>`$>aZ zKgrC?4b4J$P|YEz1*}m>HSb3Woi8~?o|sOjDxG-ryd;g5026qLv5RYIM?z`E!$_jn+wyqFNF+kMLJSTIW8B{H)NFYWY31DDeHB z7M^B((Xi7;3fv=!Dcz$aG0Y7w#_^z&AwI=`3a{win{CcEKb}EI{r!Q2E#GIWV=MlX z5?J|L%pH7GLb1gTfHvhy9H-c?Xy~l@2TqjdZ`oPmvE9*{e@umqzXg^b1*q-MP$==U z;-^khgNlqa1)j`OlGz#K%DM4F3xt2@0K$$&L;hJEh4@?M)wX7a_`rx%%8^oEn(EE} V{=f#~_lGwr`ymrWfsrc~{}0sqp{f7? diff --git a/package.json b/package.json index a82ec0b..f60080b 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "radix-colors-tailwind", - "version": "0.0.1", + "version": "0.1.0", "main": "dist/index.ts", "type": "module", "files": [ "dist" ], "scripts": { - "prod": "bun generator/index.ts", + "prod": "rm -R dist && bun build src/index.ts --target bun --outfile ./dist/index.js && bun generator/index.ts", "lint": "eslint generator/*" }, "devDependencies": { @@ -18,8 +18,5 @@ "eslint": "^8.32.0", "bun-types": "latest", "typescript": "^5.0.0" - }, - "peerDependencies": { - "tailwindcss": ">=3.0.0 || insiders" } } diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..d7a4950 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,48 @@ +type RadixColorsTransformedFamily = { + 1: string; + 2: string; + 3: string; + 4: string; + 5: string; + 6: string; + 7: string; + 8: string; + 9: string; + 10: string; + 11: string; + 12: string; +}; + +export function transformRadixColors(familyName: string): RadixColorsTransformedFamily { + return Array.from({ length: 12 }, (_, i) => i + 1).reduce((acc, number) => { + return { + ...acc, + [number]: `rgb(var(--radix-rgb-${familyName}-${number}) / )`, + }; + }, {} as RadixColorsTransformedFamily); +} + +type RadixColorsTransformedWithAlphaFamily = RadixColorsTransformedFamily & { + a1: string; + a2: string; + a3: string; + a4: string; + a5: string; + a6: string; + a7: string; + a8: string; + a9: string; + a10: string; + a11: string; + a12: string; +}; + +export function transformRadixColorsWithAlpha(familyName: string): RadixColorsTransformedWithAlphaFamily { + return Array.from({ length: 12 }, (_, i) => i + 1).reduce((acc, number) => { + return { + ...acc, + [number]: `rgb(var(--radix-rgb-${familyName}-${number}) / )`, + [`a${number}`]: `rgb(var(--radix-rgb-${familyName}-a${number}))`, + }; + }, {} as RadixColorsTransformedWithAlphaFamily); +}