chai-tailwind 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chai-tailwind.js +39 -1
- package/package.json +1 -1
package/dist/chai-tailwind.js
CHANGED
|
@@ -1 +1,39 @@
|
|
|
1
|
-
"use strict";(()=>{
|
|
1
|
+
"use strict";(()=>{function s(){let e=document.createElement("style");e.innerHTML=`
|
|
2
|
+
@keyframes chai-fade-in {
|
|
3
|
+
from { opacity: 0; }
|
|
4
|
+
to { opacity: 1; }
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@keyframes chai-slide-up {
|
|
8
|
+
from { transform: translateY(20px); opacity: 0; }
|
|
9
|
+
to { transform: translateY(0); opacity: 1; }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@keyframes chai-bounce {
|
|
13
|
+
0%, 100% { transform: translateY(0); }
|
|
14
|
+
50% { transform: translateY(-10px); }
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@keyframes chai-spin {
|
|
18
|
+
from { transform: rotate(0deg); }
|
|
19
|
+
to { transform: rotate(360deg); }
|
|
20
|
+
}
|
|
21
|
+
`,document.head.appendChild(e)}var m={"chai-bg-red":{backgroundColor:"red"},"chai-bg-blue":{backgroundColor:"blue"},"chai-bg-green":{backgroundColor:"green"},"chai-bg-yellow":{backgroundColor:"yellow"},"chai-bg-gray":{backgroundColor:"#6b7280"},"chai-bg-white":{backgroundColor:"#ffffff"},"chai-bg-black":{backgroundColor:"#000000"},"chai-text-white":{color:"white"},"chai-text-black":{color:"black"},"chai-text-gray":{color:"#6b7280"},"chai-text-sm":{fontSize:"12px"},"chai-text-base":{fontSize:"16px"},"chai-text-lg":{fontSize:"18px"},"chai-text-xl":{fontSize:"20px"},"chai-font-bold":{fontWeight:"bold"},"chai-font-medium":{fontWeight:"500"},"chai-p-1":{padding:"4px"},"chai-p-2":{padding:"8px"},"chai-p-3":{padding:"12px"},"chai-p-4":{padding:"16px"},"chai-p-6":{padding:"24px"},"chai-m-1":{margin:"4px"},"chai-m-2":{margin:"8px"},"chai-m-4":{margin:"16px"},"chai-m-auto":{margin:"auto"},"chai-rounded-sm":{borderRadius:"4px"},"chai-rounded-md":{borderRadius:"8px"},"chai-rounded-lg":{borderRadius:"12px"},"chai-rounded-xl":{borderRadius:"16px"},"chai-rounded-full":{borderRadius:"9999px"},"chai-border":{border:"1px solid #e5e7eb"},"chai-border-2":{border:"2px solid #e5e7eb"},"chai-border-black":{borderColor:"#000"},"chai-border-white":{borderColor:"#fff"},"chai-w-full":{width:"100%"},"chai-w-screen":{width:"100vw"},"chai-w-fit":{width:"fit-content"},"chai-h-full":{height:"100%"},"chai-h-screen":{height:"100vh"},"chai-max-w-sm":{maxWidth:"640px"},"chai-max-w-md":{maxWidth:"768px"},"chai-max-w-lg":{maxWidth:"1024px"},"chai-flex":{display:"flex"},"chai-inline-flex":{display:"inline-flex"},"chai-flex-col":{flexDirection:"column"},"chai-flex-row":{flexDirection:"row"},"chai-flex-wrap":{flexWrap:"wrap"},"chai-items-center":{alignItems:"center"},"chai-items-start":{alignItems:"flex-start"},"chai-items-end":{alignItems:"flex-end"},"chai-justify-center":{justifyContent:"center"},"chai-justify-between":{justifyContent:"space-between"},"chai-justify-around":{justifyContent:"space-around"},"chai-gap-2":{gap:"8px"},"chai-gap-4":{gap:"16px"},"chai-relative":{position:"relative"},"chai-absolute":{position:"absolute"},"chai-fixed":{position:"fixed"},"chai-top-0":{top:"0"},"chai-left-0":{left:"0"},"chai-right-0":{right:"0"},"chai-bottom-0":{bottom:"0"},"chai-block":{display:"block"},"chai-inline-block":{display:"inline-block"},"chai-hidden":{display:"none"},"chai-shadow-sm":{boxShadow:"0 1px 2px rgba(0,0,0,0.1)"},"chai-shadow-md":{boxShadow:"0 4px 6px rgba(0,0,0,0.1)"},"chai-shadow-lg":{boxShadow:"0 10px 15px rgba(0,0,0,0.2)"},"chai-transition":{transition:"all 0.3s ease"},"chai-cursor-pointer":{cursor:"pointer"},"chai-text-center":{textAlign:"center"},"chai-text-left":{textAlign:"left"},"chai-text-right":{textAlign:"right"},"chai-overflow-hidden":{overflow:"hidden"},"chai-opacity-50":{opacity:"0.5"},"chai-opacity-75":{opacity:"0.75"},"chai-opacity-100":{opacity:"1"},"chai-animate-fade-in":{animation:"chai-fade-in 0.5s ease-in-out"},"chai-animate-slide-up":{animation:"chai-slide-up 0.4s ease-out"},"chai-animate-bounce":{animation:"chai-bounce 1s infinite"},"chai-animate-spin":{animation:"chai-spin 1s linear infinite"},"chai-card":{transition:"transform 0.3s ease, box-shadow 0.3s ease",transformStyle:"preserve-3d"},"chai-tilt-3d":{transition:"transform 0.15s ease-out",transformStyle:"preserve-3d",willChange:"transform"}};function l(){let e=document.createElement("style"),t="";Object.entries(m).forEach(([i,a])=>{let n=`.${i}`,c=Object.entries(a).map(([o,r])=>`${camelToKebab(o)}: ${r}`).join("; ");t+=`${n} { ${c}; }
|
|
22
|
+
`}),e.innerHTML=t,document.head.appendChild(e)}var u={"chai-hover-bg-red":{backgroundColor:"red"},"chai-hover-bg-blue":{backgroundColor:"blue"},"chai-hover-scale":{transform:"scale(1.05)"},"chai-hover-opacity-75":{opacity:"0.75"},"chai-hover-tilt":{transform:"rotate(3deg) scale(1.03)"},"chai-hover-tilt-left":{transform:"rotate(-3deg) scale(1.03)"},"chai-hover-tilt-3d":{transform:"perspective(1000px) rotateX(8deg) rotateY(8deg) scale(1.05)"}};function k(e){return e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}function d(){let e=document.createElement("style"),t="";Object.entries(u).forEach(([i,a])=>{let n=`.${i}:hover`,c=Object.entries(a).map(([o,r])=>`${k(o)}: ${r}`).join("; ");t+=`${n} { ${c}; }
|
|
23
|
+
`}),e.innerHTML=t,document.head.appendChild(e)}function h(e){e.addEventListener("mousemove",i=>{let a=e.getBoundingClientRect(),n=i.clientX-a.left,c=i.clientY-a.top,o=n/a.width,r=c/a.height,b=(o-.5)*15*2,y=(.5-r)*15*2,w=1.06;e.style.transform=`
|
|
24
|
+
perspective(1000px)
|
|
25
|
+
rotateX(${y}deg)
|
|
26
|
+
rotateY(${b}deg)
|
|
27
|
+
scale(${w})
|
|
28
|
+
`;let C=o*100,v=r*100;e.style.background=`
|
|
29
|
+
radial-gradient(
|
|
30
|
+
circle at ${C}% ${v}%,
|
|
31
|
+
rgba(255,255,255,0.15),
|
|
32
|
+
transparent 60%
|
|
33
|
+
)
|
|
34
|
+
`}),e.addEventListener("mouseleave",()=>{e.style.transform=`
|
|
35
|
+
perspective(1000px)
|
|
36
|
+
rotateX(0deg)
|
|
37
|
+
rotateY(0deg)
|
|
38
|
+
scale(1)
|
|
39
|
+
`,e.style.background=""})}function p(){document.querySelectorAll(".chai-tilt-3d").forEach(t=>h(t))}function x(){s(),l(),d(),p()}var g=!1;function f(){g||(g=!0,x())}typeof window<"u"&&(window.ChaiTailwind={init:f},document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f());})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chai-tailwind",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "A package that you can use to build mordern website, just like tailwind, But you shouldn't since tailwind is already there, It was just a fun project to learn dom.",
|
|
5
5
|
"main": "dist/chai-tailwind.js",
|
|
6
6
|
"unpkg": "dist/chai-tailwind.js",
|