Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: more AiIcon changes. moved all styling to CSS module

Jonathan Summers-Muir8292e544472f
diff --git a/packages/config/ui.config.js b/packages/config/ui.config.js
index be34a9cf667..15f5ed8d476 100644
--- a/packages/config/ui.config.js
+++ b/packages/config/ui.config.js
@@ -26,7 +26,7 @@ const excludedRadixColors = [
// generates fixed scales
// based on the root/light mode version
-const fixedOptions = ['scale', 'scaleA', 'brand']
+const fixedOptions = ['scale', 'scaleA']
function radixColorKeys() {
let keys = Object.keys(radixUiColors)
diff --git a/packages/ui/build/css/source/global.css b/packages/ui/build/css/source/global.css
index 93545e90fee..ddfdf56d469 100644
--- a/packages/ui/build/css/source/global.css
+++ b/packages/ui/build/css/source/global.css
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Fri, 28 Jul 2023 11:07:13 GMT
+ * Generated on Sun, 30 Jul 2023 10:24:00 GMT
*/
:root {
diff --git a/packages/ui/build/css/themes/dark.css b/packages/ui/build/css/themes/dark.css
index d78986e5532..faee96610d9 100644
--- a/packages/ui/build/css/themes/dark.css
+++ b/packages/ui/build/css/themes/dark.css
@@ -1,11 +1,11 @@
/**
* Do not edit directly
- * Generated on Fri, 28 Jul 2023 11:07:13 GMT
+ * Generated on Sun, 30 Jul 2023 10:24:00 GMT
*/
.dark {
--brand-default: 152.9deg 60% 52.9%;
- --brand-600: 152.9deg 60% 50%;
+ --brand-600: 153deg 59.5% 70%;
--brand-500: 153.5deg 61.8% 21.6%;
--brand-400: 153.3deg 65.2% 13.5%;
--brand-300: 153.8deg 69.6% 9%;
diff --git a/packages/ui/build/css/themes/light.css b/packages/ui/build/css/themes/light.css
index 422e4e2e9f9..29b85330647 100644
--- a/packages/ui/build/css/themes/light.css
+++ b/packages/ui/build/css/themes/light.css
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Fri, 28 Jul 2023 11:07:13 GMT
+ * Generated on Sun, 30 Jul 2023 10:24:00 GMT
*/
.light {
diff --git a/packages/ui/build/css/tw-extend/color.js b/packages/ui/build/css/tw-extend/color.js
index 6c17c9aa676..937addc4752 100644
--- a/packages/ui/build/css/tw-extend/color.js
+++ b/packages/ui/build/css/tw-extend/color.js
@@ -545,7 +545,7 @@ module.exports = {
},
"brand-600": {
cssVariable: "var(--brand-600)",
- value: "hsl(152.89999999999998, 60%, 50%)"
+ value: "hsl(153, 59.5%, 70%)"
},
"brand-DEFAULT": {
cssVariable: "var(--brand-default)",
diff --git a/studio/components/animations/ai-icon-style.module.css b/studio/components/animations/ai-icon-style.module.css
new file mode 100644
index 00000000000..06ff308f33e
--- /dev/null
+++ b/studio/components/animations/ai-icon-style.module.css
@@ -0,0 +1,1114 @@
+/*
+* STEP ONE
+*/
+
+@keyframes step1_square1 {
+ 0% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+
+ 100% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 0px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes step1_square2 {
+ 0% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+
+ 100% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 8px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes step1_square3 {
+ 0% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+
+ 100% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 0px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes step1_square4 {
+ 0% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+
+ 100% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 8px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+}
+
+/*
+* STEP TWO
+*/
+
+@keyframes step2_square1 {
+ 0% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 0px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 1px;
+ left: 1px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes step2_square2 {
+ 0% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 8px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 1px;
+ left: 15px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes step2_square3 {
+ 0% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 0px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 15px;
+ left: 1px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes step2_square4 {
+ 0% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 8px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 15px;
+ left: 15px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+}
+
+/*
+* STEP THREE
+*/
+
+@keyframes step3_square1 {
+ 0% {
+ transform: rotate(45deg);
+ top: 0px;
+ left: 0px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 0px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes step3_square2 {
+ 0% {
+ transform: rotate(45deg);
+ top: 0px;
+ left: 16px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 18px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes step3_square3 {
+ 0% {
+ transform: rotate(45deg);
+ top: 16px;
+ left: 0px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(0deg);
+ top: 18px;
+ left: 0px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes step3_square4 {
+ 0% {
+ transform: rotate(45deg);
+ top: 16px;
+ left: 16px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(0deg);
+ top: 18px;
+ left: 18px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+}
+
+/*
+* STEP FOUR
+*/
+
+@keyframes step4_square1 {
+ 0% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 0px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes step4_square2 {
+ 0% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 18px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 16px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes step4_square3 {
+ 0% {
+ transform: rotate(0deg);
+ top: 18px;
+ left: 0px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 0px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes step4_square4 {
+ 0% {
+ transform: rotate(0deg);
+ top: 18px;
+ left: 18px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(0deg);
+ top: 16px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+/* STEP FIVE */
+
+@keyframes step5_square1 {
+ 0% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes step5_square2 {
+ 0% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 16px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes step5_square3 {
+ 0% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 0px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes step5_square4 {
+ 0% {
+ transform: rotate(0deg);
+ top: 16px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes spinAiIconContainer {
+ 0% {
+ transform: rotate(0deg);
+ }
+ 40% {
+ transform: rotate(-45deg);
+ }
+ 80% {
+ transform: rotate(90deg);
+ }
+ /* 80% {
+ transform: rotate(90deg);
+ } */
+ 100% {
+ transform: rotate(90deg);
+ }
+}
+
+.spin-ai-icon-container {
+ width: 100%;
+ height: 100%;
+ /*
+
+ please note
+
+ the duration is the setInterval in the component useEffect multiplied by 5
+ this is due having 5 steps in animation sequence
+
+ So if the setInterval is 800ms then the duration below should be is 4000ms
+
+ */
+ animation: spinAiIconContainer 2500ms infinite;
+ animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
+}
+
+.ai-icon__container {
+ width: 24px;
+ height: 24px;
+ /* background: red; */
+}
+
+.ai-icon__grid {
+ position: relative;
+ width: 24px;
+ height: 24px;
+}
+
+.ai-icon__grid__square {
+ position: absolute;
+ transition: all 0.2s;
+ border: 1px solid hsl(var(--brand-default));
+}
+
+.ai-icon__grid__square--static:nth-child(1) {
+ transform: rotate(45deg);
+ top: 4px;
+ left: 4px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+}
+.ai-icon__grid__square--static:nth-child(2) {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+}
+.ai-icon__grid__square--static:nth-child(3) {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+}
+.ai-icon__grid__square--static:nth-child(4) {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+}
+
+.ai-icon__container--allow-hover-effect:hover .ai-icon__grid__square--static:nth-child(1) {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+}
+.ai-icon__container--allow-hover-effect:hover .ai-icon__grid__square--static:nth-child(2) {
+ transform: rotate(45deg);
+ top: 0;
+ left: 0;
+ width: 24px;
+ height: 24px;
+ border-radius: 100%;
+}
+.ai-icon__container--allow-hover-effect:hover .ai-icon__grid__square--static:nth-child(3) {
+ transform: rotate(45deg);
+ top: 0;
+ left: 0;
+ width: 24px;
+ height: 24px;
+ border-radius: 100%;
+}
+.ai-icon__container--allow-hover-effect:hover .ai-icon__grid__square--static:nth-child(4) {
+ transform: rotate(45deg);
+ top: 0;
+ left: 0;
+ width: 24px;
+ height: 24px;
+ border-radius: 100%;
+}
+
+.ai-icon__grid__square--step-1:nth-child(1) {
+ animation: step1_square1 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+ /* animation-delay: 0; */
+}
+.ai-icon__grid__square--step-1:nth-child(2) {
+ animation: step1_square2 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+ /* animation-delay: 200ms; */
+}
+.ai-icon__grid__square--step-1:nth-child(3) {
+ animation: step1_square3 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+ /* animation-delay: 400ms; */
+}
+.ai-icon__grid__square--step-1:nth-child(4) {
+ animation: step1_square4 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+ /* animation-delay: 600ms; */
+}
+
+.ai-icon__grid__square--step-2:nth-child(1) {
+ animation-delay: 200;
+ animation: step2_square1 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--step-2:nth-child(2) {
+ animation-delay: 400ms;
+ animation: step2_square2 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--step-2:nth-child(3) {
+ animation-delay: 600ms;
+ animation: step2_square3 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--step-2:nth-child(4) {
+ animation-delay: 800ms;
+ animation: step2_square4 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+
+.ai-icon__grid__square--step-3:nth-child(1) {
+ animation: step3_square1 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--step-3:nth-child(2) {
+ animation: step3_square2 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--step-3:nth-child(3) {
+ animation: step3_square3 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--step-3:nth-child(4) {
+ animation: step3_square4 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+
+.ai-icon__grid__square--step-4:nth-child(1) {
+ animation: step4_square1 0.4s forwards;
+ /* animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); */
+ animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
+}
+.ai-icon__grid__square--step-4:nth-child(2) {
+ animation: step4_square2 0.4s forwards;
+ /* animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); */
+ animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
+}
+.ai-icon__grid__square--step-4:nth-child(3) {
+ animation: step4_square3 0.4s forwards;
+ /* animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); */
+ animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
+}
+.ai-icon__grid__square--step-4:nth-child(4) {
+ animation: step4_square4 0.4s forwards;
+ /* animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); */
+ animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
+}
+
+.ai-icon__grid__square--step-5:nth-child(1) {
+ animation: step5_square1 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--step-5:nth-child(2) {
+ animation: step5_square2 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--step-5:nth-child(3) {
+ animation: step5_square3 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--step-5:nth-child(4) {
+ animation: step5_square4 0.4s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+
+/* EXIT ANIMATIONS */
+
+/*
+* STEP ONE
+*/
+
+@keyframes exit_step1_square1 {
+ 0% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 0px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 4px;
+ left: 4px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes exit_step1_square2 {
+ 0% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 8px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes exit_step1_square3 {
+ 0% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 0px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes exit_step1_square4 {
+ 0% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 8px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+/*
+* STEP TWO
+*/
+
+@keyframes exit_step2_square1 {
+ 0% {
+ transform: rotate(45deg);
+ top: 1px;
+ left: 1px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 4px;
+ left: 4px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes exit_step2_square2 {
+ 0% {
+ transform: rotate(45deg);
+ top: 1px;
+ left: 15px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes exit_step2_square3 {
+ 0% {
+ transform: rotate(45deg);
+ top: 15px;
+ left: 1px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes exit_step2_square4 {
+ 0% {
+ transform: rotate(45deg);
+ top: 15px;
+ left: 15px;
+ width: 8px;
+ height: 8px;
+ border-radius: 0%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+/*
+* STEP THREE
+*/
+
+@keyframes exit_step3_square1 {
+ 0% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 0px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 4px;
+ left: 4px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes exit_step3_square2 {
+ 0% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 18px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes exit_step3_square3 {
+ 0% {
+ transform: rotate(0deg);
+ top: 18px;
+ left: 0px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes exit_step3_square4 {
+ 0% {
+ transform: rotate(0deg);
+ top: 18px;
+ left: 18px;
+ width: 6px;
+ height: 6px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+/*
+* STEP FOUR
+*/
+
+@keyframes exit_step4_square1 {
+ 0% {
+ transform: rotate(0deg);
+ top: 0px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 4px;
+ left: 4px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes exit_step4_square2 {
+ 0% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 16px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes exit_step4_square3 {
+ 0% {
+ transform: rotate(0deg);
+ top: 8px;
+ left: 0px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes exit_step4_square4 {
+ 0% {
+ transform: rotate(0deg);
+ top: 16px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+/* STEP FIVE */
+
+@keyframes exit_step5_square1 {
+ 0% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 4px;
+ left: 4px;
+ width: 16px;
+ height: 16px;
+ border-radius: 0%;
+ }
+}
+
+@keyframes exit_step5_square2 {
+ 0% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes exit_step5_square3 {
+ 0% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+@keyframes exit_step5_square4 {
+ 0% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+ 100% {
+ transform: rotate(45deg);
+ top: 8px;
+ left: 8px;
+ width: 8px;
+ height: 8px;
+ border-radius: 100%;
+ }
+}
+
+.ai-icon__grid__square--exiting--step-1:nth-child(1) {
+ animation: exit_step1_square1 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+ /* animation-delay: 0; */
+}
+.ai-icon__grid__square--exiting--step-1:nth-child(2) {
+ animation: exit_step1_square2 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+ /* animation-delay: 200ms; */
+}
+.ai-icon__grid__square--exiting--step-1:nth-child(3) {
+ animation: exit_step1_square3 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+ /* animation-delay: 400ms; */
+}
+.ai-icon__grid__square--exiting--step-1:nth-child(4) {
+ animation: exit_step1_square4 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+ /* animation-delay: 600ms; */
+}
+
+.ai-icon__grid__square--exiting--step-2:nth-child(1) {
+ animation-delay: exit_ 200;
+ animation: exit_step2_square1 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--exiting--step-2:nth-child(2) {
+ animation-delay: exit_ 400ms;
+ animation: exit_step2_square2 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--exiting--step-2:nth-child(3) {
+ animation-delay: exit_ 600ms;
+ animation: exit_step2_square3 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--exiting--step-2:nth-child(4) {
+ animation-delay: exit_ 800ms;
+ animation: exit_step2_square4 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+
+.ai-icon__grid__square--exiting--step-3:nth-child(1) {
+ animation: exit_step3_square1 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--exiting--step-3:nth-child(2) {
+ animation: exit_step3_square2 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--exiting--step-3:nth-child(3) {
+ animation: exit_step3_square3 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--exiting--step-3:nth-child(4) {
+ animation: exit_step3_square4 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+
+.ai-icon__grid__square--exiting--step-4:nth-child(1) {
+ animation: exit_step4_square1 0.5s forwards;
+ /* animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); */
+ animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
+}
+.ai-icon__grid__square--exiting--step-4:nth-child(2) {
+ animation: exit_step4_square2 0.5s forwards;
+ /* animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); */
+ animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
+}
+.ai-icon__grid__square--exiting--step-4:nth-child(3) {
+ animation: exit_step4_square3 0.5s forwards;
+ /* animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); */
+ animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
+}
+.ai-icon__grid__square--exiting--step-4:nth-child(4) {
+ animation: exit_step4_square4 0.5s forwards;
+ /* animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); */
+ animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
+}
+
+.ai-icon__grid__square--exiting--step-5:nth-child(1) {
+ animation: exit_step5_square1 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--exiting--step-5:nth-child(2) {
+ animation: exit_step5_square2 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--exiting--step-5:nth-child(3) {
+ animation: exit_step5_square3 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
+.ai-icon__grid__square--exiting--step-5:nth-child(4) {
+ animation: exit_step5_square4 0.5s forwards;
+ animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
+}
diff --git a/studio/components/animations/ai-icon.tsx b/studio/components/animations/ai-icon.tsx
index 9977cb0ee76..c077dea5b4d 100644
--- a/studio/components/animations/ai-icon.tsx
+++ b/studio/components/animations/ai-icon.tsx
@@ -1,26 +1,94 @@
// make a function that returns a component
import { useState, useEffect } from 'react'
+import styles from './ai-icon-style.module.css'
+import { cn } from 'ui'
-const AiIconAnimation = () => {
+interface Props {
+ loading?: boolean
+ className?: string
+ allowHoverEffect?: boolean
+}
+
+const AiIconAnimation = ({ loading = false, className, allowHoverEffect = false }: Props) => {
const [step, setStep] = useState(1)
+ const [exitStep, setExitStep] = useState(1)
+ const [isAnimating, setIsAnimating] = useState(true)
useEffect(() => {
const interval = setInterval(() => {
- setStep((step) => {
- return (step % 5) + 1
- })
- }, 2000)
+ if (loading) {
+ setIsAnimating(true)
+ setStep((step) => {
+ return (step % 5) + 1
+ })
+ setExitStep((step) => {
+ return (step % 5) + 1
+ })
+ }
+ }, 500)
return () => clearInterval(interval)
- }, [])
+ }, [loading])
+
+ useEffect(() => {
+ if (loading === false) {
+ setTimeout(() => {
+ setIsAnimating(false)
+ }, 500)
+ setStep(1)
+ }
+ }, [loading])
return (
- <div className="ai-icon__container animate--[spin_5s_ease-in-out_infinite] spin-ai-icon-container">
- <div className="ai-icon__grid">
- <div className={`ai-icon__grid__square ai-icon__grid__square--step-${step}`}></div>
- <div className={`ai-icon__grid__square ai-icon__grid__square--step-${step}`}></div>
- <div className={`ai-icon__grid__square ai-icon__grid__square--step-${step}`}></div>
- <div className={`ai-icon__grid__square ai-icon__grid__square--step-${step}`}></div>
+ <div
+ className={cn(
+ styles['ai-icon__container'],
+ allowHoverEffect && styles['ai-icon__container--allow-hover-effect'],
+ loading && isAnimating && styles['spin-ai-icon-container'],
+ className
+ )}
+ >
+ <div className={cn(styles['ai-icon__grid'])}>
+ <div
+ className={cn(
+ styles['ai-icon__grid__square'],
+ loading
+ ? styles[`ai-icon__grid__square--step-${step}`]
+ : isAnimating
+ ? styles[`ai-icon__grid__square--exiting--step-${exitStep}`]
+ : styles[`ai-icon__grid__square--static`]
+ )}
+ ></div>
+ <div
+ className={cn(
+ styles['ai-icon__grid__square'],
+ loading
+ ? styles[`ai-icon__grid__square--step-${step}`]
+ : isAnimating
+ ? styles[`ai-icon__grid__square--exiting--step-${exitStep}`]
+ : styles[`ai-icon__grid__square--static`]
+ )}
+ ></div>
+ <div
+ className={cn(
+ styles['ai-icon__grid__square'],
+ loading
+ ? styles[`ai-icon__grid__square--step-${step}`]
+ : isAnimating
+ ? styles[`ai-icon__grid__square--exiting--step-${exitStep}`]
+ : styles[`ai-icon__grid__square--static`]
+ )}
+ ></div>
+ <div
+ className={cn(
+ styles['ai-icon__grid__square'],
+ loading
+ ? styles[`ai-icon__grid__square--step-${step}`]
+ : isAnimating
+ ? styles[`ai-icon__grid__square--exiting--step-${exitStep}`]
+ : styles[`ai-icon__grid__square--static`]
+ )}
+ ></div>
</div>
</div>
)
diff --git a/studio/components/interfaces/SQLEditor/RenameQueryModal.tsx b/studio/components/interfaces/SQLEditor/RenameQueryModal.tsx
index 4cbd2890d6d..1e71d400f75 100644
--- a/studio/components/interfaces/SQLEditor/RenameQueryModal.tsx
+++ b/studio/components/interfaces/SQLEditor/RenameQueryModal.tsx
@@ -1,4 +1,5 @@
import { useParams } from 'common'
+import { AiIconAnimation } from 'components/animations/ai-icon'
import { useSqlTitleGenerateMutation } from 'data/ai/sql-title-mutation'
import { SqlSnippet } from 'data/content/sql-snippets-query'
import { useStore } from 'hooks'
@@ -73,32 +74,33 @@ const RenameQueryModal = ({ snippet, visible, onCancel, onComplete }: RenameQuer
name="name"
value={nameInput}
onChange={(e) => setNameInput(e.target.value)}
- inputClassName={cn(isAiButtonVisible && 'pr-[6.5rem]')}
- actions={
- isAiButtonVisible ? (
- <Button
- onClick={async () => {
- const { title, description } = await generateSqlTitle({
- sql: snippet.content.sql,
- })
- setNameInput(title)
- if (!descriptionInput) {
- setDescriptionInput(description)
- }
- }}
- icon={
- !isTitleGenerationLoading ? (
- <AiIcon className="w-3 h-3" />
- ) : (
- <IconLoader className="animate-spin" size={14} />
- )
- }
- >
- Generate
- </Button>
- ) : undefined
- }
+ // inputClassName={cn(isAiButtonVisible && 'pr-[6.5rem]')}
+ // actions={}
/>
+ <div className="flex w-full justify-end mt-2">
+ {isAiButtonVisible && (
+ <Button
+ type="default"
+ onClick={async () => {
+ const { title, description } = await generateSqlTitle({
+ sql: snippet.content.sql,
+ })
+ setNameInput(title)
+ if (!descriptionInput) {
+ setDescriptionInput(description)
+ }
+ }}
+ size="tiny"
+ disabled={isTitleGenerationLoading}
+ // className="!px-2 !py-0.5 !pr-3"
+ >
+ <div className="flex items-center gap-1">
+ <AiIconAnimation loading={isTitleGenerationLoading} className="scale-75" />
+ <span>Rename with AI</span>
+ </div>
+ </Button>
+ )}
+ </div>
</Modal.Content>
<Modal.Content>
<Input.TextArea
diff --git a/studio/components/interfaces/SQLEditor/SQLEditor.tsx b/studio/components/interfaces/SQLEditor/SQLEditor.tsx
index 0dedb56b4b3..d33638517d3 100644
--- a/studio/components/interfaces/SQLEditor/SQLEditor.tsx
+++ b/studio/components/interfaces/SQLEditor/SQLEditor.tsx
@@ -434,7 +434,7 @@ const SQLEditor = () => {
}}
initial="visible"
animate="visible"
- className="w-full flex justify-center z-10 h-[60px] bg-brand-200 border-b border-brand-400 px-5"
+ className="w-full flex justify-center z-10 h-[60px] bg-brand-300 border-b border-brand-400 px-5"
>
<div
className={cn(
@@ -442,76 +442,7 @@ const SQLEditor = () => {
'flex items-center gap-3'
)}
>
- {/* <div className="group h-12 w-12 relative group"> */}
- {/* <div className="absolute duration-2000 h-12 w-12 skew--y-[24deg]">
- <div
- className={cn(
- 'transition-all',
- 'absolute top-3 left-3 h-4 w-4 border border-brand',
- 'group-hover:top-4 group-hover:left-4 group-hover:rotate--0 group-hover:skew-x--12 duration-200 delay-75'
- )}
- ></div>
- <div
- className={cn(
- 'transition-all',
- 'absolute top-3 left-5 h-4 w-4 border border-brand',
- 'group-hover:top-4 group-hover:left-4 group-hover:rotate--0 group-hover:skew-x--12 duration-200 delay-200'
- )}
- ></div>
- <div
- className={cn(
- 'transition-all',
- 'absolute top-5 left-3 h-4 w-4 border border-brand',
- 'group-hover:top-4 group-hover:left-4 group-hover:rotate--0 group-hover:skew-x--12 duration-200 delay-400'
- )}
- ></div>
- <div
- className={cn(
- 'transition-all',
- 'absolute top-5 left-5 h-4 w-4 border border-brand',
- 'group-hover:top-4 group-hover:left-4 group-hover:rotate--0 group-hover:skew-x--12 duration-200 delay-600'
- )}
- ></div>
- </div> */}
-
- {/* <div className="absolute top-0.5 right-0.5 duration-2000 h-12 w-12 skew-y-[24deg] hover:top-0 hover:right-0">
- <div
- className={cn(
- 'transition-all',
- 'absolute top-3 left-3 h-4 w-4 border border-brand',
- 'group-hover:top-4 group-hover:left-4 group-hover:rotate--0 group-hover:skew-x--12 duration-200 delay-75'
- )}
- ></div>
- <div
- className={cn(
- 'transition-all',
- 'absolute top-3 left-5 h-4 w-4 border border-brand',
- 'group-hover:top-4 group-hover:left-4 group-hover:rotate--0 group-hover:skew-x--12 duration-200 delay-200'
- )}
- ></div>
- <div
- className={cn(
- 'transition-all',
- 'absolute top-5 left-3 h-4 w-4 border border-brand',
- 'group-hover:top-4 group-hover:left-4 group-hover:rotate--0 group-hover:skew-x--12 duration-200 delay-400'
- )}
- ></div>
- <div
- className={cn(
- 'transition-all',
- 'absolute top-5 left-5 h-4 w-4 border border-brand',
- 'group-hover:top-4 group-hover:left-4 group-hover:rotate--0 group-hover:skew-x--12 duration-200 delay-600'
- )}
- ></div>
- </div> */}
- {/* </div> */}
- {/* <div className="flex flex-row gap-3 items-center">
- <motion.div layoutId="ask-ai-input-icon">
- <AiIcon className="w-4 h-4 text-brand" />
- </motion.div>
- </div> */}
-
- <AiIconAnimation />
+ <AiIconAnimation loading={isEditSqlLoading} />
<AnimatePresence initial={false} exitBeforeEnter>
{debugSolution && (
@@ -547,7 +478,7 @@ const SQLEditor = () => {
disabled={isDiffOpen}
ref={inputRef}
className={cn(
- '!p-0 bg-transparent border-transparent text-sm text-brand placeholder:text-brand-600 focus:!ring-0',
+ '!p-0 bg-transparent border-transparent text-sm text-brand placeholder:text-brand-500 focus:!ring-0',
'focus-visible:ring-0 focus-visible:ring-offset-0',
'appearance-none outline-none'
// "after:content-['_↗']",
@@ -555,6 +486,11 @@ const SQLEditor = () => {
// 'after:placeholder:content-["hello"]'
)}
placeholder={!debugSolution ? 'Ask Supabase AI to modify your query' : ''}
+ onKeyDown={(e) => {
+ if (e.key === 'Escape' && !aiInput) {
+ setAiOpen(false)
+ }
+ }}
onKeyPress={async (e) => {
if (e.key === 'Enter') {
console.log('entering')
@@ -730,18 +666,17 @@ const SQLEditor = () => {
>
<IconCornerDownLeft size={16} strokeWidth={1.5} />
</div>
-
<button
- className="text-brand hover:text-brand-600"
- onClick={() => setAiOpen(false)}
+ onClick={() => setIsAISettingsOpen(true)}
+ className="text-brand-500 hover:text-brand hover:text transition"
>
- <IconX size={21} />
+ <IconSettings className="cursor-pointer" />
</button>
<button
- onClick={() => setIsAISettingsOpen(true)}
- className="text-lighter hover:text transition"
+ className="text-brand hover:text-brand-600"
+ onClick={() => setAiOpen(false)}
>
- <IconSettings className="cursor-pointer" />
+ <IconX size={21} />
</button>
</>
)}
@@ -770,22 +705,12 @@ const SQLEditor = () => {
'group',
'absolute z-10',
'rounded-lg',
- 'right-5 top-1.5',
- 'w-10 h-10 bg-brand-400 border border-brand-600 shadow-sm',
+ 'right-[18px] top-4',
'transition-all duration-200',
- 'ease-out hover:w-[155px]',
- 'flex items-center justify-center group-hover:justify-between gap-3'
+ 'ease-out'
)}
>
- <span
- className={cn(
- 'hidden text-brand w-0 ',
- 'group-hover:w-auto group-hover:inline-block truncate'
- )}
- >
- Supabase AI
- </span>
- <AiIcon className="text-brand w-4 h-4" />
+ <AiIconAnimation loading={false} allowHoverEffect />
</button>
)}
diff --git a/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx b/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx
index a5b176b38be..d9f8dbc1460 100644
--- a/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx
+++ b/studio/components/layouts/SQLEditorLayout/SQLEditorMenu.tsx
@@ -14,7 +14,7 @@ import { useCheckPermissions, useStore } from 'hooks'
import { uuidv4 } from 'lib/helpers'
import { useProfile } from 'lib/profile'
import { useSnippets, useSqlEditorStateSnapshot } from 'state/sql-editor'
-import { Button, IconSearch, IconX, Input, Menu, cn } from 'ui'
+import { Button, IconPlus, IconSearch, IconX, Input, Menu, cn } from 'ui'
import QueryItem from './QueryItem'
const SideBarContent = observer(() => {
@@ -101,13 +101,12 @@ const SideBarContent = observer(() => {
<div className="space-y-6">
<div className="px-3 flex flex-col gap-2">
<Button
- // isActive={false}
type="default"
- className="mx-3"
+ className="mx-3 justify-start"
onClick={() => {
handleNewQuery()
}}
- icon={<IconSearch size="tiny" />}
+ icon={<IconPlus size="tiny" />}
>
New query
</Button>
@@ -129,20 +128,27 @@ const SideBarContent = observer(() => {
<div className="editor-product-menu">
<div className="flex flex-row justify-between">
<Menu.Group title="Favorites" />
- <IconSearch
- className={cn(
- 'w-4',
- 'h-4',
- 'cursor-pointer',
- isFavoritesFilterOpen ? 'text-scale-1200' : 'text-scale-900'
- )}
+ <button
+ className="flex items-center w-4 h-4 cursor-pointer mr-3"
onClick={() => {
- setIsFavoritesFilterOpen((state) => !state)
+ setIsFavoritesFilterOpen(!isFavoritesFilterOpen)
}}
- />
+ >
+ <IconSearch
+ className={cn(
+ 'w-4',
+ 'h-4',
+ 'cursor-pointer',
+ isFavoritesFilterOpen ? 'text-scale-1200' : 'text-scale-900'
+ )}
+ onClick={() => {
+ setIsFavoritesFilterOpen((state) => !state)
+ }}
+ />
+ </button>
</div>
{isFavoritesFilterOpen && (
- <div className="pl-3 mb-2">
+ <div className="pl-3 mb-2 mr-3">
<Input
autoFocus
size="tiny"
@@ -151,6 +157,12 @@ const SideBarContent = observer(() => {
disabled={isLoading}
onChange={(e) => setFavoritesFilterString(e.target.value)}
value={favoritesFilterString}
+ onKeyDown={(e) => {
+ if (e.key === 'Escape') {
+ setIsFavoritesFilterOpen(false)
+ setFavoritesFilterString('')
+ }
+ }}
actions={
favoritesFilterString && (
<IconX
@@ -196,6 +208,12 @@ const SideBarContent = observer(() => {
disabled={isLoading}
onChange={(e) => setSnippetsFilterString(e.target.value)}
value={snippetsFilterString}
+ onKeyDown={(e) => {
+ if (e.key === 'Escape') {
+ setIsSnippetsFilterOpen(false)
+ setSnippetsFilterString('')
+ }
+ }}
actions={
snippetsFilterString && (
<IconX
diff --git a/studio/styles/monaco.scss b/studio/styles/monaco.scss
index 0ef8126a48f..edb6be20dd6 100644
--- a/studio/styles/monaco.scss
+++ b/studio/styles/monaco.scss
@@ -46,618 +46,3 @@ span.th.tr.td.textarea {
background: var(--vscode-quickInput-background);
}
}
-
-/*
-* STEP ONE
-*/
-
-@keyframes step1_square1 {
- 0% {
- transform: rotate(45deg);
- top: 10px;
- left: 10px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-
- 100% {
- transform: rotate(0deg);
- top: 0px;
- left: 0px;
- width: 16px;
- height: 16px;
- }
-}
-
-@keyframes step1_square2 {
- 0% {
- transform: rotate(45deg);
- top: 10px;
- left: 10px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-
- 100% {
- transform: rotate(0deg);
- top: 0px;
- left: 8px;
- width: 16px;
- height: 16px;
- }
-}
-
-@keyframes step1_square3 {
- 0% {
- transform: rotate(45deg);
- top: 10px;
- left: 10px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-
- 100% {
- transform: rotate(0deg);
- top: 8px;
- left: 0px;
- width: 16px;
- height: 16px;
- }
-}
-
-@keyframes step1_square4 {
- 0% {
- transform: rotate(45deg);
- top: 10px;
- left: 10px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-
- 100% {
- transform: rotate(0deg);
- top: 8px;
- left: 8px;
- width: 16px;
- height: 16px;
- }
-}
-
-/*
-* STEP TWO
-*/
-
-@keyframes step2_square1 {
- 0% {
- transform: rotate(0deg);
- top: 0px;
- left: 0px;
- width: 16px;
- height: 16px;
- }
- 100% {
- transform: rotate(45deg);
- top: 0px;
- left: 0px;
- width: 8px;
- height: 8px;
- }
-}
-
-@keyframes step2_square2 {
- 0% {
- transform: rotate(0deg);
- top: 0px;
- left: 8px;
- width: 16px;
- height: 16px;
- }
- 100% {
- transform: rotate(45deg);
- top: 0px;
- left: 16px;
- width: 8px;
- height: 8px;
- }
-}
-
-@keyframes step2_square3 {
- 0% {
- transform: rotate(0deg);
- top: 8px;
- left: 0px;
- width: 16px;
- height: 16px;
- }
- 100% {
- transform: rotate(45deg);
- top: 16px;
- left: 0px;
- width: 8px;
- height: 8px;
- }
-}
-
-@keyframes step2_square4 {
- 0% {
- transform: rotate(0deg);
- top: 8px;
- left: 8px;
- width: 16px;
- height: 16px;
- }
- 100% {
- transform: rotate(45deg);
- top: 16px;
- left: 16px;
- width: 8px;
- height: 8px;
- }
-}
-
-/*
-* STEP THREE
-*/
-
-@keyframes step3_square1 {
- 0% {
- transform: rotate(45deg);
- top: 0px;
- left: 0px;
- width: 8px;
- height: 8px;
- }
- 100% {
- transform: rotate(0deg);
- top: 0px;
- left: 0px;
- width: 6px;
- height: 6px;
- border-radius: 100%;
- }
-}
-
-@keyframes step3_square2 {
- 0% {
- transform: rotate(45deg);
- top: 0px;
- left: 16px;
- width: 8px;
- height: 8px;
- }
- 100% {
- transform: rotate(0deg);
- top: 0px;
- left: 18px;
- width: 6px;
- height: 6px;
- border-radius: 100%;
- }
-}
-
-@keyframes step3_square3 {
- 0% {
- transform: rotate(45deg);
- top: 16px;
- left: 0px;
- width: 8px;
- height: 8px;
- }
- 100% {
- transform: rotate(0deg);
- top: 18px;
- left: 0px;
- width: 6px;
- height: 6px;
- border-radius: 100%;
- }
-}
-
-@keyframes step3_square4 {
- 0% {
- transform: rotate(45deg);
- top: 16px;
- left: 16px;
- width: 8px;
- height: 8px;
- }
- 100% {
- transform: rotate(0deg);
- top: 18px;
- left: 18px;
- width: 6px;
- height: 6px;
- border-radius: 100%;
- }
-}
-
-/*
-* STEP FOUR
-*/
-
-@keyframes step4_square1 {
- 0% {
- transform: rotate(0deg);
- top: 0px;
- left: 0px;
- width: 6px;
- height: 6px;
- border-radius: 100%;
- }
- 100% {
- transform: rotate(0deg);
- top: 0px;
- left: 8px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-}
-
-@keyframes step4_square2 {
- 0% {
- transform: rotate(0deg);
- top: 0px;
- left: 18px;
- width: 6px;
- height: 6px;
- border-radius: 100%;
- }
- 100% {
- transform: rotate(0deg);
- top: 8px;
- left: 16px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-}
-
-@keyframes step4_square3 {
- 0% {
- transform: rotate(0deg);
- top: 18px;
- left: 0px;
- width: 6px;
- height: 6px;
- border-radius: 100%;
- }
- 100% {
- transform: rotate(0deg);
- top: 8px;
- left: 0px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-}
-
-@keyframes step4_square4 {
- 0% {
- transform: rotate(0deg);
- top: 18px;
- left: 18px;
- width: 6px;
- height: 6px;
- border-radius: 100%;
- }
- 100% {
- transform: rotate(0deg);
- top: 16px;
- left: 8px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-}
-
-// STEP FIVE
-
-@keyframes step5_square1 {
- 0% {
- transform: rotate(0deg);
- top: 0px;
- left: 8px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
- 100% {
- transform: rotate(45deg);
- top: 8px;
- left: 8px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-}
-
-@keyframes step5_square2 {
- 0% {
- transform: rotate(0deg);
- top: 8px;
- left: 16px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
- 100% {
- transform: rotate(45deg);
- top: 8px;
- left: 8px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-}
-
-@keyframes step5_square3 {
- 0% {
- transform: rotate(0deg);
- top: 8px;
- left: 0px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
- 100% {
- transform: rotate(45deg);
- top: 8px;
- left: 8px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-}
-
-@keyframes step5_square4 {
- 0% {
- transform: rotate(0deg);
- top: 16px;
- left: 8px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
- 100% {
- transform: rotate(45deg);
- top: 8px;
- left: 8px;
- width: 8px;
- height: 8px;
- border-radius: 100%;
- }
-}
-
-@keyframes spinAiIconContainer {
- 0% {
- transform: rotate(0deg);
- }
- 40% {
- transform: rotate(-45deg);
- }
- // 40% {
- // transform: rotate(-45deg);
- // }
- // 60% {
- // transform: rotate(90deg); /* 360 degrees * 3 (3 full spins) */
- // }
- 80% {
- transform: rotate(180deg); /* 360 degrees * 3 (3 full spins) */
- }
- 100% {
- transform: rotate(180deg); /* 360 degrees * 3 (3 full spins) */
- }
- // 90% {
- // transform: rotate(360deg); /* 360 degrees * 5 (5 full spins) */
- // }
- // 100% {
- // transform: rotate(360deg); /* 360 degrees * 5 (5 full spins) */
- // }
-}
-
-.spin-ai-icon-container {
- // width: 100%;
- // height: 100%;
- // background-color: #f00; /* Replace this with your desired background color */
- // border-radius: 50%;
- // position: absolute;
- // animation: spinAiIconContainer 10s infinite;
- // animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
- // animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
-}
-
-/*
-* STEP SIX
-*/
-
-// @keyframes step6_square1 {
-// 0% {
-// transform: rotate(45deg);
-// left: 0px;
-// top: 0px;
-// width: 12px;
-// height: 12px;
-// }
-// 100% {
-// transform: rotate(0deg);
-// top: 8px;
-// left: 8px;
-// width: 8px;
-// height: 8px;
-// }
-// }
-
-// @keyframes step6_square2 {
-// 0% {
-// transform: rotate(45deg);
-// top: 0px;
-// left: 8px;
-// width: 12px;
-// height: 12px;
-// }
-// 100% {
-// transform: rotate(0deg);
-// top: 8px;
-// left: 8px;
-// width: 8px;
-// height: 8px;
-// }
-// }
-
-// @keyframes step6_square3 {
-// 0% {
-// transform: rotate(45deg);
-// top: 8px;
-// left: 0px;
-// width: 12px;
-// height: 12px;
-// }
-// 100% {
-// transform: rotate(0deg);
-// top: 8px;
-// left: 8px;
-// width: 8px;
-// height: 8px;
-// }
-// }
-
-// @keyframes step6_square4 {
-// 0% {
-// transform: rotate(45deg);
-// top: 8px;
-// left: 8px;
-// width: 12px;
-// height: 12px;
-// }
-// 100% {
-// transform: rotate(0deg);
-// top: 8px;
-// left: 8px;
-// width: 8px;
-// height: 8px;
-// }
-// }
-
-.ai-icon__container {
- width: 24px;
- height: 24px;
- // background: red;
-}
-
-.ai-icon__grid {
- position: relative;
- width: 24px;
- height: 24px;
- // background: yellow;
-}
-
-.ai-icon__grid__square {
- position: absolute;
- border: 1px solid hsl(var(--brand-default));
-}
-
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-1:nth-child(1) {
- animation: step1_square1 700ms forwards;
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
- // animation-delay: 0;
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-1:nth-child(2) {
- animation: step1_square2 700ms forwards;
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
- // animation-delay: 200ms;
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-1:nth-child(3) {
- animation: step1_square3 700ms forwards;
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
- // animation-delay: 400ms;
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-1:nth-child(4) {
- animation: step1_square4 700ms forwards;
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
- // animation-delay: 600ms;
-}
-
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-2:nth-child(1) {
- animation-delay: 200;
- animation: step2_square1 0.7s forwards;
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-2:nth-child(2) {
- animation-delay: 400ms;
- animation: step2_square2 0.7s forwards;
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-2:nth-child(3) {
- animation-delay: 600ms;
- animation: step2_square3 0.7s forwards;
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-2:nth-child(4) {
- animation-delay: 800ms;
- animation: step2_square4 0.7s forwards;
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-3:nth-child(1) {
- animation: step3_square1 0.7s forwards;
- // animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-3:nth-child(2) {
- animation: step3_square2 0.7s forwards;
- // animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-3:nth-child(3) {
- animation: step3_square3 0.7s forwards;
- // animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-3:nth-child(4) {
- animation: step3_square4 0.7s forwards;
- // animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
- animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-4:nth-child(1) {
- animation: step4_square1 1s forwards;
- // animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
- // animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-4:nth-child(2) {
- animation: step4_square2 1s forwards;
- // animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
- // animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-4:nth-child(3) {
- animation: step4_square3 1s forwards;
- // animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
- // animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-4:nth-child(4) {
- animation: step4_square4 1s forwards;
- // animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
- // animation-timing-function: cubic-bezier(0.68, -0.55, 0.27, 1.55);
-}
-
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-5:nth-child(1) {
- animation: step5_square1 3s forwards;
- // animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-5:nth-child(2) {
- animation: step5_square2 3s forwards;
- // animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-5:nth-child(3) {
- animation: step5_square3 3s forwards;
- // animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}
-.ai-icon__grid .ai-icon__grid__square.ai-icon__grid__square--step-5:nth-child(4) {
- animation: step5_square4 3s forwards;
- // animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
-}