|
| 1 | +(ns quo.components.dropdowns.dropdown-input.properties |
| 2 | + (:require |
| 3 | + [quo.foundations.colors :as colors])) |
| 4 | + |
| 5 | +(def icon-size 20) |
| 6 | + |
| 7 | +(defn- grey-blur |
| 8 | + [theme active?] |
| 9 | + {:left-icon-color (colors/theme-colors colors/neutral-80-opa-40 colors/white-opa-70 theme) |
| 10 | + :right-icon-color (colors/theme-colors colors/neutral-80-opa-10 colors/white-opa-10 theme) |
| 11 | + :right-icon-color-2 (colors/theme-colors colors/neutral-100 colors/white theme) |
| 12 | + :label-color (colors/theme-colors colors/neutral-100 colors/white theme) |
| 13 | + :border-color (if active? |
| 14 | + (colors/theme-colors colors/neutral-80-opa-20 |
| 15 | + colors/white-opa-40 |
| 16 | + theme) |
| 17 | + (colors/theme-colors colors/neutral-80-opa-10 |
| 18 | + colors/white-opa-10 |
| 19 | + theme))}) |
| 20 | + |
| 21 | +(defn- outline |
| 22 | + [theme active?] |
| 23 | + {:left-icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme) |
| 24 | + :right-icon-color (colors/theme-colors colors/neutral-20 colors/neutral-80 theme) |
| 25 | + :right-icon-color-2 (colors/theme-colors colors/neutral-100 colors/white theme) |
| 26 | + :label-color (colors/theme-colors colors/neutral-100 colors/white theme) |
| 27 | + :border-color (if active? |
| 28 | + (colors/theme-colors colors/neutral-40 colors/neutral-60 theme) |
| 29 | + (colors/theme-colors colors/neutral-30 colors/neutral-70 theme))}) |
| 30 | + |
| 31 | +(defn- grey |
| 32 | + [theme active?] |
| 33 | + {:left-icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme) |
| 34 | + :right-icon-color (colors/theme-colors colors/neutral-20 colors/neutral-80 theme) |
| 35 | + :right-icon-color-2 (colors/theme-colors colors/neutral-100 colors/white theme) |
| 36 | + :label-color (colors/theme-colors colors/neutral-100 colors/white theme) |
| 37 | + :border-color (if active? |
| 38 | + (colors/theme-colors colors/neutral-40 colors/neutral-60 theme) |
| 39 | + (colors/theme-colors colors/neutral-20 |
| 40 | + colors/neutral-60 |
| 41 | + theme))}) |
| 42 | + |
| 43 | +(defn get-colors |
| 44 | + [{:keys [theme state blur?]}] |
| 45 | + (let [active? (= state :active)] |
| 46 | + (cond |
| 47 | + blur? (grey-blur theme active?) |
| 48 | + (= theme :dark) (outline theme active?) |
| 49 | + (= theme :light) (grey theme active?)))) |
0 commit comments