|
1 | 1 | (ns lambdaisland.ornament |
2 | 2 | "CSS-in-clj(s)" |
| 3 | +<<<<<<< Updated upstream |
3 | 4 | #?@ |
4 | 5 | (:clj |
5 | 6 | [(:require |
|
19 | 20 | [meta-merge.core :as meta-merge])] |
20 | 21 | :cljs |
21 | 22 | [(:require [clojure.string :as str] [garden.util :as gu])])) |
| 23 | +||||||| Stash base |
| 24 | + (:require [clojure.string :as str] |
| 25 | + [meta-merge.core :as meta-merge] |
| 26 | + #?@(:clj [[clojure.walk :as walk] |
| 27 | + [garden.compiler :as gc] |
| 28 | + [garden.core :as garden] |
| 29 | + [garden.color :as gcolor] |
| 30 | + [garden.types :as gt] |
| 31 | + [garden.stylesheet :as gs] |
| 32 | + [girouette.version :as girouette-version] |
| 33 | + [girouette.tw.core :as girouette] |
| 34 | + [girouette.tw.preflight :as girouette-preflight] |
| 35 | + [girouette.tw.typography :as girouette-typography] |
| 36 | + [girouette.tw.color :as girouette-color] |
| 37 | + [girouette.tw.default-api :as girouette-default]])) |
| 38 | + #?(:cljs |
| 39 | + (:require-macros [lambdaisland.ornament :refer [defstyled]]))) |
| 40 | +======= |
| 41 | + (:require [clojure.string :as str] |
| 42 | + [meta-merge.core :as meta-merge] |
| 43 | + #?@(:clj [[clojure.walk :as walk] |
| 44 | + [garden.compiler :as gc] |
| 45 | + [garden.core :as garden] |
| 46 | + [garden.color :as gcolor] |
| 47 | + [garden.types :as gt] |
| 48 | + [garden.stylesheet :as gs] |
| 49 | + [girouette.version :as girouette-version] |
| 50 | + [girouette.tw.core :as girouette] |
| 51 | + [girouette.tw.preflight :as girouette-preflight] |
| 52 | + [girouette.tw.typography :as girouette-typography] |
| 53 | + [girouette.tw.color :as girouette-color]])) |
| 54 | + #?(:cljs |
| 55 | + (:require-macros [lambdaisland.ornament :refer [defstyled]]))) |
| 56 | +>>>>>>> Stashed changes |
22 | 57 |
|
23 | 58 | #?(:clj |
24 | 59 | (defonce ^{:doc "Registry of styled components |
|
78 | 113 | (atom nil)) |
79 | 114 |
|
80 | 115 | (def default-tokens-v2 |
81 | | - {:components (-> girouette-default/all-tw-components |
82 | | - (girouette-version/filter-components-by-version [:tw 2])) |
83 | | - :colors girouette-color/tw-v2-colors |
84 | | - :fonts girouette-typography/tw-v2-font-family-map}) |
| 116 | + (delay |
| 117 | + {:components (-> @(requiring-resolve 'girouette.tw.default-api/all-tw-components) |
| 118 | + (girouette-version/filter-components-by-version [:tw 2])) |
| 119 | + :colors girouette-color/tw-v2-colors |
| 120 | + :fonts girouette-typography/tw-v2-font-family-map})) |
85 | 121 |
|
86 | 122 | (def default-tokens-v3 |
87 | | - {:components (-> girouette-default/all-tw-components |
88 | | - (girouette-version/filter-components-by-version [:tw 3])) |
89 | | - :colors girouette-color/tw-v3-unified-colors-extended |
90 | | - :fonts girouette-typography/tw-v2-font-family-map}) |
| 123 | + (delay |
| 124 | + {:components (-> @(requiring-resolve 'girouette.tw.default-api/all-tw-components) |
| 125 | + (girouette-version/filter-components-by-version [:tw 3])) |
| 126 | + :colors girouette-color/tw-v3-unified-colors-extended |
| 127 | + :fonts girouette-typography/tw-v2-font-family-map})) |
91 | 128 |
|
92 | 129 | (def default-tokens default-tokens-v2) |
93 | 130 |
|
|
127 | 164 | (let [{:keys [components colors fonts]} |
128 | 165 | (meta-merge/meta-merge |
129 | 166 | (case tw-version |
130 | | - 2 default-tokens-v2 |
131 | | - 3 default-tokens-v3) |
| 167 | + 2 @default-tokens-v2 |
| 168 | + 3 @default-tokens-v3) |
132 | 169 | {:components |
133 | 170 | (into (empty components) |
134 | 171 | (map (fn [{:keys [id rules garden] :as c}] |
|
0 commit comments