mirror of
https://github.com/status-im/status-react.git
synced 2025-02-24 00:28:29 +00:00
rename quo2 (#17660)
This commit is contained in:
parent
6bbe930425
commit
6f9bcd1bb1
1
Makefile
1
Makefile
@ -312,7 +312,6 @@ lint: export TARGET := clojure
|
|||||||
lint: export CLJ_LINTER_PRINT_WARNINGS ?= false
|
lint: export CLJ_LINTER_PRINT_WARNINGS ?= false
|
||||||
lint: ##@test Run code style checks
|
lint: ##@test Run code style checks
|
||||||
@sh scripts/lint-re-frame-in-quo-components.sh && \
|
@sh scripts/lint-re-frame-in-quo-components.sh && \
|
||||||
sh scripts/lint-old-quo-usage.sh && \
|
|
||||||
clj-kondo --config .clj-kondo/config.edn --cache false --fail-level error --lint src $(if $(filter $(CLJ_LINTER_PRINT_WARNINGS),true),,| grep -v ': warning: ') && \
|
clj-kondo --config .clj-kondo/config.edn --cache false --fail-level error --lint src $(if $(filter $(CLJ_LINTER_PRINT_WARNINGS),true),,| grep -v ': warning: ') && \
|
||||||
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
|
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
|
||||||
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
|
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
### Redesign
|
### Redesign
|
||||||
|
|
||||||
* Quo2, Switcher Navigation by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13167
|
* quo, Switcher Navigation by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13167
|
||||||
* Switcher and Bottom Tabs Animations and UI Performance Improvements by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13470
|
* Switcher and Bottom Tabs Animations and UI Performance Improvements by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13470
|
||||||
* feat: add token tag component (#13599) by @J-Son89 in https://github.com/status-im/status-mobile/pull/13644
|
* feat: add token tag component (#13599) by @J-Son89 in https://github.com/status-im/status-mobile/pull/13644
|
||||||
* [13565] icon-avatar component by @ibrkhalil in https://github.com/status-im/status-mobile/pull/13692
|
* [13565] icon-avatar component by @ibrkhalil in https://github.com/status-im/status-mobile/pull/13692
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
QUO_USAGES=$(grep -r -E '\[quo\.[^ ]* :(?:as|refer)|\[quo\.[^ ]*\]' --include '*.cljs' --include '*.clj' './src/status_im2' --exclude='./src/status_im2/common/theme/core.cljs' || true)
|
|
||||||
|
|
||||||
echo -e "\nChecking 'status_im2' namespace for 'quo' namespace usage."
|
|
||||||
|
|
||||||
if [ -n "$QUO_USAGES" ]; then
|
|
||||||
echo -e "\033[0;31mERROR: Usage of the old 'quo' namespace detected in 'status_im2' code. Please update to 'quo2'. \n"
|
|
||||||
echo -e "$QUO_USAGES \033[0m"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
INVALID_CHANGES=$(grep -E -r '(re-frame/dispatch|rf/dispatch|re-frame/subscribe|rf/subscribe|rf/sub|<sub|>evt|status-im\.|status-im2\.)' --include '*.cljs' --include '*.clj' './src/quo2')
|
INVALID_CHANGES=$(grep -E -r '(re-frame/dispatch|rf/dispatch|re-frame/subscribe|rf/subscribe|rf/sub|<sub|>evt|status-im\.|status-im2\.)' --include '*.cljs' --include '*.clj' './src/quo')
|
||||||
|
|
||||||
if test -n "$INVALID_CHANGES"; then
|
if test -n "$INVALID_CHANGES"; then
|
||||||
echo "WARNING: re-frame, status-im are not allowed in quo2 components"
|
echo "WARNING: re-frame, status-im are not allowed in quo components"
|
||||||
echo ''
|
echo ''
|
||||||
echo "$INVALID_CHANGES"
|
echo "$INVALID_CHANGES"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -148,7 +148,7 @@
|
|||||||
:compiler-options {:optimizations :simple
|
:compiler-options {:optimizations :simple
|
||||||
:source-map false}}
|
:source-map false}}
|
||||||
:component-test {:target :npm-module
|
:component-test {:target :npm-module
|
||||||
:entries [quo2.core-spec status-im2.core-spec]
|
:entries [quo.core-spec status-im2.core-spec]
|
||||||
:ns-regexp "component-spec$"
|
:ns-regexp "component-spec$"
|
||||||
:output-dir "component-spec"
|
:output-dir "component-spec"
|
||||||
:compiler-options {:warnings-as-errors false
|
:compiler-options {:warnings-as-errors false
|
||||||
|
@ -27,7 +27,7 @@ and the component name is `Banner`.
|
|||||||
Therefore, the structure should look like:
|
Therefore, the structure should look like:
|
||||||
|
|
||||||
```
|
```
|
||||||
quo2/
|
quo/
|
||||||
└── components/
|
└── components/
|
||||||
└── banners/
|
└── banners/
|
||||||
└── banner/
|
└── banner/
|
||||||
@ -63,7 +63,7 @@ In the image above we can see the properties are `Type`, `State`, `Size`,
|
|||||||
`Icon`, `Theme`, and `Background`. Translated to Clojure:
|
`Icon`, `Theme`, and `Background`. Translated to Clojure:
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
;; ns quo2.components.buttons.button.view
|
;; ns quo.components.buttons.button.view
|
||||||
(def view
|
(def view
|
||||||
[{:keys [type state size icon theme background]}]
|
[{:keys [type state size icon theme background]}]
|
||||||
...)
|
...)
|
||||||
@ -114,7 +114,7 @@ if events are triggered as intended and that all component variations are
|
|||||||
rendered. We use [React Native Testing Library](https://callstack.github.io/react-native-testing-library/).
|
rendered. We use [React Native Testing Library](https://callstack.github.io/react-native-testing-library/).
|
||||||
|
|
||||||
There are dozens of examples in the repository, so use them as a reference. A
|
There are dozens of examples in the repository, so use them as a reference. A
|
||||||
good and complete example is [quo2.components.avatars.user-avatar.component-spec](/src/quo2/components/avatars/user_avatar/component_spec.cljs)
|
good and complete example is [quo.components.avatars.user-avatar.component-spec](/src/quo/components/avatars/user_avatar/component_spec.cljs)
|
||||||
|
|
||||||
## Do not couple the library with re-frame
|
## Do not couple the library with re-frame
|
||||||
|
|
||||||
@ -142,15 +142,15 @@ Our goal is to make all design system components *themeable*, which means they
|
|||||||
should not use, nor fallback to the OS theme, because themes are *contextual*
|
should not use, nor fallback to the OS theme, because themes are *contextual*
|
||||||
and can be overridden in specific parts of the app.
|
and can be overridden in specific parts of the app.
|
||||||
|
|
||||||
To achieve this, use the higher-order function `quo2.theme/with-theme` to
|
To achieve this, use the higher-order function `quo.theme/with-theme` to
|
||||||
automatically inject the current theme context (based on the [React Context
|
automatically inject the current theme context (based on the [React Context
|
||||||
API](https://react.dev/learn/passing-data-deeply-with-context)).
|
API](https://react.dev/learn/passing-data-deeply-with-context)).
|
||||||
|
|
||||||
Use the following pattern:
|
Use the following pattern:
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
(ns quo2.components.<figma page>.<component name>.view
|
(ns quo.components.<figma page>.<component name>.view
|
||||||
(:require [quo2.theme :as quo.theme]))
|
(:require [quo.theme :as quo.theme]))
|
||||||
|
|
||||||
(defn- view-internal [{:keys [theme]}]
|
(defn- view-internal [{:keys [theme]}]
|
||||||
...)
|
...)
|
||||||
@ -159,30 +159,30 @@ Use the following pattern:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Then pass the `theme` value down to all functions that may rely on the OS theme,
|
Then pass the `theme` value down to all functions that may rely on the OS theme,
|
||||||
like `quo2.foundations.colors/theme-colors` or `quo2.foundations.shadows/get`.
|
like `quo.foundations.colors/theme-colors` or `quo.foundations.shadows/get`.
|
||||||
|
|
||||||
## Avoid using quo's version number in namespace aliases
|
## Avoid using quo's version number in namespace aliases
|
||||||
|
|
||||||
When requiring quo2 namespaces, don't use the version number in the
|
When requiring quo namespaces, don't use the version number in the
|
||||||
[alias](https://clojure.org/guides/learn/namespaces#_require), unless for a
|
[alias](https://clojure.org/guides/learn/namespaces#_require), unless for a
|
||||||
special reason you need to require both the old and new namespaces in the same
|
special reason you need to require both the old and new namespaces in the same
|
||||||
file.
|
file.
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> Keep in mind that, at the moment, we need to keep both `src/quo/` and
|
> Keep in mind that, at the moment, we need to keep both `src/quo/` and
|
||||||
> `src/quo2/` directories in the repository, but eventually the old one will go
|
> `src/quo/` directories in the repository, but eventually the old one will go
|
||||||
> away and the version number will lose its meaning.
|
> away and the version number will lose its meaning.
|
||||||
|
|
||||||
```clojure
|
```clojure
|
||||||
;; bad
|
;; bad
|
||||||
(ns ...
|
(ns ...
|
||||||
(require [quo2.theme :as quo2.theme]
|
(require [quo.theme :as quo.theme]
|
||||||
[quo2.core :as quo2]))
|
[quo.core :as quo]))
|
||||||
|
|
||||||
;; good
|
;; good
|
||||||
(ns ...
|
(ns ...
|
||||||
(require [quo2.theme :as quo.theme]
|
(require [quo.theme :as quo.theme]
|
||||||
[quo2.core :as quo]))
|
[quo.core :as quo]))
|
||||||
```
|
```
|
||||||
|
|
||||||
## Preview screens
|
## Preview screens
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.animated-header-flatlist.style
|
(ns quo.components.animated-header-flatlist.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[react-native.reanimated :as reanimated]))
|
[react-native.reanimated :as reanimated]))
|
||||||
|
|
||||||
(defn container-view
|
(defn container-view
|
@ -1,10 +1,10 @@
|
|||||||
(ns quo2.components.animated-header-flatlist.view
|
(ns quo.components.animated-header-flatlist.view
|
||||||
(:require
|
(:require
|
||||||
[oops.core :as oops]
|
[oops.core :as oops]
|
||||||
[quo2.components.animated-header-flatlist.style :as style]
|
[quo.components.animated-header-flatlist.style :as style]
|
||||||
[quo2.core :as quo]
|
[quo.core :as quo]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.fast-image :as fast-image]
|
[react-native.fast-image :as fast-image]
|
||||||
[react-native.platform :as platform]
|
[react-native.platform :as platform]
|
@ -1,8 +1,8 @@
|
|||||||
(ns quo2.components.avatars.account-avatar.component-spec
|
(ns quo.components.avatars.account-avatar.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.avatars.account-avatar.style :as style]
|
[quo.components.avatars.account-avatar.style :as style]
|
||||||
[quo2.components.avatars.account-avatar.view :as account-avatar]
|
[quo.components.avatars.account-avatar.view :as account-avatar]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "Account Avatar"
|
(h/describe "Account Avatar"
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.avatars.account-avatar.style
|
(ns quo.components.avatars.account-avatar.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def default-size 80)
|
(def default-size 80)
|
||||||
(def default-border-radius 16)
|
(def default-border-radius 16)
|
@ -1,8 +1,8 @@
|
|||||||
(ns quo2.components.avatars.account-avatar.view
|
(ns quo.components.avatars.account-avatar.view
|
||||||
(:require
|
(:require
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[quo2.components.avatars.account-avatar.style :as style]
|
[quo.components.avatars.account-avatar.style :as style]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn- view-internal
|
(defn- view-internal
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.avatars.channel-avatar.component-spec
|
(ns quo.components.avatars.channel-avatar.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.avatars.channel-avatar.view :as component]
|
[quo.components.avatars.channel-avatar.view :as component]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "Channel Avatar"
|
(h/describe "Channel Avatar"
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.avatars.channel-avatar.style
|
(ns quo.components.avatars.channel-avatar.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def lock-icon-size 12)
|
(def lock-icon-size 12)
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
(ns quo2.components.avatars.channel-avatar.view
|
(ns quo.components.avatars.channel-avatar.view
|
||||||
(:require
|
(:require
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[quo2.components.avatars.channel-avatar.style :as style]
|
[quo.components.avatars.channel-avatar.style :as style]
|
||||||
[quo2.components.icon :as icons]
|
[quo.components.icon :as icons]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[utils.string]))
|
[utils.string]))
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.avatars.collection-avatar.component-spec
|
(ns quo.components.avatars.collection-avatar.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.avatars.collection-avatar.view :as collection-avatar]
|
[quo.components.avatars.collection-avatar.view :as collection-avatar]
|
||||||
[quo2.foundations.resources :as resources]
|
[quo.foundations.resources :as resources]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "collection avatar"
|
(h/describe "collection avatar"
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.avatars.collection-avatar.style
|
(ns quo.components.avatars.collection-avatar.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(defn collection-avatar
|
(defn collection-avatar
|
||||||
[theme]
|
[theme]
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.avatars.collection-avatar.view
|
(ns quo.components.avatars.collection-avatar.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.avatars.collection-avatar.style :as style]
|
[quo.components.avatars.collection-avatar.style :as style]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.fast-image :as fast-image]))
|
[react-native.fast-image :as fast-image]))
|
||||||
|
|
||||||
(defn- view-internal
|
(defn- view-internal
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.avatars.group-avatar.style
|
(ns quo.components.avatars.group-avatar.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(defn container
|
(defn container
|
||||||
[{:keys [container-size customization-color theme]}]
|
[{:keys [container-size customization-color theme]}]
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.avatars.group-avatar.view
|
(ns quo.components.avatars.group-avatar.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.avatars.group-avatar.style :as style]
|
[quo.components.avatars.group-avatar.style :as style]
|
||||||
[quo2.components.icon :as icon]
|
[quo.components.icon :as icon]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.fast-image :as fast-image]))
|
[react-native.fast-image :as fast-image]))
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
(ns quo2.components.avatars.icon-avatar
|
(ns quo.components.avatars.icon-avatar
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.icon :as icons]
|
[quo.components.icon :as icons]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(def ^:private sizes
|
(def ^:private sizes
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.avatars.user-avatar.component-spec
|
(ns quo.components.avatars.user-avatar.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.avatars.user-avatar.view :as user-avatar]
|
[quo.components.avatars.user-avatar.view :as user-avatar]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(defonce mock-picture {:uri (js/require "../resources/images/mock2/user_picture_male4.png")})
|
(defonce mock-picture {:uri (js/require "../resources/images/mock2/user_picture_male4.png")})
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.avatars.user-avatar.style
|
(ns quo.components.avatars.user-avatar.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def sizes
|
(def sizes
|
||||||
{:big {:dimensions 80
|
{:big {:dimensions 80
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.avatars.user-avatar.view
|
(ns quo.components.avatars.user-avatar.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.avatars.user-avatar.style :as style]
|
[quo.components.avatars.user-avatar.style :as style]
|
||||||
[quo2.components.common.no-flicker-image :as no-flicker-image]
|
[quo.components.common.no-flicker-image :as no-flicker-image]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.theme]
|
[quo.theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.fast-image :as fast-image]
|
[react-native.fast-image :as fast-image]
|
||||||
utils.string))
|
utils.string))
|
||||||
@ -108,4 +108,4 @@
|
|||||||
|
|
||||||
:else {:uri profile-picture})}])]))
|
:else {:uri profile-picture})}])]))
|
||||||
|
|
||||||
(def user-avatar (quo2.theme/with-theme user-avatar-internal))
|
(def user-avatar (quo.theme/with-theme user-avatar-internal))
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.avatars.wallet-user-avatar
|
(ns quo.components.avatars.wallet-user-avatar
|
||||||
(:require
|
(:require
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(def circle-sizes
|
(def circle-sizes
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.banners.banner.component-spec
|
(ns quo.components.banners.banner.component-spec
|
||||||
(:require
|
(:require
|
||||||
["@testing-library/react-native" :as rtl]
|
["@testing-library/react-native" :as rtl]
|
||||||
[quo2.components.banners.banner.view :as banner]
|
[quo.components.banners.banner.view :as banner]
|
||||||
[reagent.core :as reagent]))
|
[reagent.core :as reagent]))
|
||||||
|
|
||||||
(defn render-banner
|
(defn render-banner
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.banners.banner.style
|
(ns quo.components.banners.banner.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
|
|
||||||
(def container
|
(def container
|
@ -1,11 +1,11 @@
|
|||||||
(ns quo2.components.banners.banner.view
|
(ns quo.components.banners.banner.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.banners.banner.style :as style]
|
[quo.components.banners.banner.style :as style]
|
||||||
[quo2.components.counter.counter.view :as counter]
|
[quo.components.counter.counter.view :as counter]
|
||||||
[quo2.components.icon :as icons]
|
[quo.components.icon :as icons]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn- view-internal
|
(defn- view-internal
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.browser.browser-input.component-spec
|
(ns quo.components.browser.browser-input.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.browser.browser-input.view :as browser-input]
|
[quo.components.browser.browser-input.view :as browser-input]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "Browser input"
|
(h/describe "Browser input"
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.browser.browser-input.style
|
(ns quo.components.browser.browser-input.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def clear-icon-container
|
(def clear-icon-container
|
||||||
{:align-items :center
|
{:align-items :center
|
@ -1,10 +1,10 @@
|
|||||||
(ns quo2.components.browser.browser-input.view
|
(ns quo.components.browser.browser-input.view
|
||||||
(:require
|
(:require
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[quo2.components.browser.browser-input.style :as style]
|
[quo.components.browser.browser-input.style :as style]
|
||||||
[quo2.components.icon :as icon]
|
[quo.components.icon :as icon]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo2.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.platform :as platform]
|
[react-native.platform :as platform]
|
||||||
[reagent.core :as reagent]))
|
[reagent.core :as reagent]))
|
||||||
@ -142,4 +142,4 @@
|
|||||||
(when on-clear (on-clear)))
|
(when on-clear (on-clear)))
|
||||||
:theme theme}])]]))))
|
:theme theme}])]]))))
|
||||||
|
|
||||||
(def view (quo2.theme/with-theme view-internal))
|
(def view (quo.theme/with-theme view-internal))
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.buttons.button.component-spec
|
(ns quo.components.buttons.button.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.button.view :as button]
|
[quo.components.buttons.button.view :as button]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "button tests"
|
(h/describe "button tests"
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.buttons.button.properties
|
(ns quo.components.buttons.button.properties
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def backgrounds #{:photo :blur})
|
(def backgrounds #{:photo :blur})
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
(ns quo2.components.buttons.button.style)
|
(ns quo.components.buttons.button.style)
|
||||||
|
|
||||||
(def blur-view
|
(def blur-view
|
||||||
{:position :absolute
|
{:position :absolute
|
@ -1,11 +1,11 @@
|
|||||||
(ns quo2.components.buttons.button.view
|
(ns quo.components.buttons.button.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.button.properties :as button-properties]
|
[quo.components.buttons.button.properties :as button-properties]
|
||||||
[quo2.components.buttons.button.style :as style]
|
[quo.components.buttons.button.style :as style]
|
||||||
[quo2.components.icon :as quo2.icons]
|
[quo.components.icon :as quo.icons]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.foundations.customization-colors :as customization-colors]
|
[quo.foundations.customization-colors :as customization-colors]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.blur :as blur]
|
[react-native.blur :as blur]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[reagent.core :as reagent]))
|
[reagent.core :as reagent]))
|
||||||
@ -91,7 +91,7 @@
|
|||||||
:style style/blur-view}])
|
:style style/blur-view}])
|
||||||
(when icon-top
|
(when icon-top
|
||||||
[rn/view
|
[rn/view
|
||||||
[quo2.icons/icon icon-top
|
[quo.icons/icon icon-top
|
||||||
{:container-style {:margin-bottom 2}
|
{:container-style {:margin-bottom 2}
|
||||||
:color icon-color
|
:color icon-color
|
||||||
:size icon-size}]])
|
:size icon-size}]])
|
||||||
@ -100,13 +100,13 @@
|
|||||||
{:style (style/icon-left-icon-style
|
{:style (style/icon-left-icon-style
|
||||||
{:size size
|
{:size size
|
||||||
:icon-size icon-size})}
|
:icon-size icon-size})}
|
||||||
[quo2.icons/icon icon-left
|
[quo.icons/icon icon-left
|
||||||
{:color icon-color
|
{:color icon-color
|
||||||
:size icon-size}]])
|
:size icon-size}]])
|
||||||
[rn/view
|
[rn/view
|
||||||
(cond
|
(cond
|
||||||
icon-only?
|
icon-only?
|
||||||
[quo2.icons/icon children
|
[quo.icons/icon children
|
||||||
{:color label-color
|
{:color label-color
|
||||||
:size icon-size}]
|
:size icon-size}]
|
||||||
|
|
||||||
@ -125,7 +125,7 @@
|
|||||||
{:style (style/icon-right-icon-style
|
{:style (style/icon-right-icon-style
|
||||||
{:size size
|
{:size size
|
||||||
:icon-size icon-size})}
|
:icon-size icon-size})}
|
||||||
[quo2.icons/icon icon-right
|
[quo.icons/icon icon-right
|
||||||
{:color icon-color
|
{:color icon-color
|
||||||
:size icon-size}]])]]]))))
|
:size icon-size}]])]]]))))
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.buttons.composer-button.component-spec
|
(ns quo.components.buttons.composer-button.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.composer-button.view :as composer-button]
|
[quo.components.buttons.composer-button.view :as composer-button]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "button tests"
|
(h/describe "button tests"
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.buttons.composer-button.style
|
(ns quo.components.buttons.composer-button.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(defn get-border-color
|
(defn get-border-color
|
||||||
[{:keys [pressed? blur? theme]}]
|
[{:keys [pressed? blur? theme]}]
|
@ -1,8 +1,8 @@
|
|||||||
(ns quo2.components.buttons.composer-button.view
|
(ns quo.components.buttons.composer-button.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.composer-button.style :as style]
|
[quo.components.buttons.composer-button.style :as style]
|
||||||
[quo2.components.icon :as quo2.icons]
|
[quo.components.icon :as quo.icons]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[reagent.core :as reagent]))
|
[reagent.core :as reagent]))
|
||||||
|
|
||||||
@ -23,7 +23,7 @@
|
|||||||
:theme theme
|
:theme theme
|
||||||
:disabled? disabled?})
|
:disabled? disabled?})
|
||||||
container-style)}
|
container-style)}
|
||||||
[quo2.icons/icon icon
|
[quo.icons/icon icon
|
||||||
{:color (style/get-label-color {:blur? blur?
|
{:color (style/get-label-color {:blur? blur?
|
||||||
:theme theme})}]])))
|
:theme theme})}]])))
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
(ns quo2.components.buttons.dynamic-button.style)
|
(ns quo.components.buttons.dynamic-button.style)
|
||||||
|
|
||||||
(defn container
|
(defn container
|
||||||
[type]
|
[type]
|
@ -1,10 +1,10 @@
|
|||||||
(ns quo2.components.buttons.dynamic-button.view
|
(ns quo.components.buttons.dynamic-button.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.dynamic-button.style :as style]
|
[quo.components.buttons.dynamic-button.style :as style]
|
||||||
[quo2.components.icon :as icon]
|
[quo.components.icon :as icon]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[reagent.core :as reagent]))
|
[reagent.core :as reagent]))
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.buttons.predictive-keyboard.component-spec
|
(ns quo.components.buttons.predictive-keyboard.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.predictive-keyboard.view :as predictive-keyboard]
|
[quo.components.buttons.predictive-keyboard.view :as predictive-keyboard]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "predictive-keyboard"
|
(h/describe "predictive-keyboard"
|
@ -1,4 +1,4 @@
|
|||||||
(ns quo2.components.buttons.predictive-keyboard.style)
|
(ns quo.components.buttons.predictive-keyboard.style)
|
||||||
|
|
||||||
(defn wrapper
|
(defn wrapper
|
||||||
[type]
|
[type]
|
@ -1,10 +1,10 @@
|
|||||||
(ns quo2.components.buttons.predictive-keyboard.view
|
(ns quo.components.buttons.predictive-keyboard.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.button.view :as button]
|
[quo.components.buttons.button.view :as button]
|
||||||
[quo2.components.buttons.predictive-keyboard.style :as style]
|
[quo.components.buttons.predictive-keyboard.style :as style]
|
||||||
[quo2.components.info.info-message :as info-message]
|
[quo.components.info.info-message :as info-message]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.linear-gradient :as linear-gradient]))
|
[react-native.linear-gradient :as linear-gradient]))
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.buttons.slide-button.animations
|
(ns quo.components.buttons.slide-button.animations
|
||||||
(:require
|
(:require
|
||||||
[oops.core :as oops]
|
[oops.core :as oops]
|
||||||
[quo2.components.buttons.slide-button.utils :as utils]
|
[quo.components.buttons.slide-button.utils :as utils]
|
||||||
[react-native.gesture :as gesture]
|
[react-native.gesture :as gesture]
|
||||||
[react-native.reanimated :as reanimated]))
|
[react-native.reanimated :as reanimated]))
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.buttons.slide-button.component-spec
|
(ns quo.components.buttons.slide-button.component-spec
|
||||||
(:require
|
(:require
|
||||||
["@testing-library/react-native" :as rtl]
|
["@testing-library/react-native" :as rtl]
|
||||||
["react-native-gesture-handler/jest-utils" :as gestures-jest]
|
["react-native-gesture-handler/jest-utils" :as gestures-jest]
|
||||||
[quo2.components.buttons.slide-button.constants :as constants]
|
[quo.components.buttons.slide-button.constants :as constants]
|
||||||
[quo2.components.buttons.slide-button.view :as slide-button]
|
[quo.components.buttons.slide-button.view :as slide-button]
|
||||||
[reagent.core :as r]
|
[reagent.core :as r]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
(ns quo2.components.buttons.slide-button.constants)
|
(ns quo.components.buttons.slide-button.constants)
|
||||||
|
|
||||||
(def track-padding 4)
|
(def track-padding 4)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.buttons.slide-button.style
|
(ns quo.components.buttons.slide-button.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.slide-button.constants :as constants]
|
[quo.components.buttons.slide-button.constants :as constants]
|
||||||
[quo2.components.buttons.slide-button.utils :as utils]
|
[quo.components.buttons.slide-button.utils :as utils]
|
||||||
[react-native.reanimated :as reanimated]))
|
[react-native.reanimated :as reanimated]))
|
||||||
|
|
||||||
(def absolute-fill
|
(def absolute-fill
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.buttons.slide-button.utils
|
(ns quo.components.buttons.slide-button.utils
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.slide-button.constants :as constants]
|
[quo.components.buttons.slide-button.constants :as constants]
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(defn main-color
|
(defn main-color
|
||||||
"`customization-color` Customization color"
|
"`customization-color` Customization color"
|
@ -1,14 +1,14 @@
|
|||||||
(ns quo2.components.buttons.slide-button.view
|
(ns quo.components.buttons.slide-button.view
|
||||||
(:require
|
(:require
|
||||||
[oops.core :as oops]
|
[oops.core :as oops]
|
||||||
[quo2.components.buttons.slide-button.animations :as animations]
|
[quo.components.buttons.slide-button.animations :as animations]
|
||||||
[quo2.components.buttons.slide-button.constants :as constants]
|
[quo.components.buttons.slide-button.constants :as constants]
|
||||||
[quo2.components.buttons.slide-button.style :as style]
|
[quo.components.buttons.slide-button.style :as style]
|
||||||
[quo2.components.buttons.slide-button.utils :as utils]
|
[quo.components.buttons.slide-button.utils :as utils]
|
||||||
[quo2.components.icon :as icon]
|
[quo.components.icon :as icon]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.gesture :as gesture]
|
[react-native.gesture :as gesture]
|
||||||
[react-native.reanimated :as reanimated]
|
[react-native.reanimated :as reanimated]
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.buttons.wallet-button.component-spec
|
(ns quo.components.buttons.wallet-button.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.wallet-button.view :as wallet-button]
|
[quo.components.buttons.wallet-button.view :as wallet-button]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "button tests"
|
(h/describe "button tests"
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.buttons.wallet-button.style
|
(ns quo.components.buttons.wallet-button.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(defn get-border-color
|
(defn get-border-color
|
||||||
[{:keys [pressed? theme]}]
|
[{:keys [pressed? theme]}]
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.buttons.wallet-button.view
|
(ns quo.components.buttons.wallet-button.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.wallet-button.style :as style]
|
[quo.components.buttons.wallet-button.style :as style]
|
||||||
[quo2.components.icon :as quo2.icons]
|
[quo.components.icon :as quo.icons]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[reagent.core :as reagent]))
|
[reagent.core :as reagent]))
|
||||||
|
|
||||||
@ -23,7 +23,7 @@
|
|||||||
:theme theme
|
:theme theme
|
||||||
:disabled? disabled?})
|
:disabled? disabled?})
|
||||||
container-style)}
|
container-style)}
|
||||||
[quo2.icons/icon icon
|
[quo.icons/icon icon
|
||||||
{:color (colors/theme-colors colors/neutral-100 colors/white theme)}]])))
|
{:color (colors/theme-colors colors/neutral-100 colors/white theme)}]])))
|
||||||
|
|
||||||
(def view (theme/with-theme view-internal))
|
(def view (theme/with-theme view-internal))
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.buttons.wallet-ctas.component-spec
|
(ns quo.components.buttons.wallet-ctas.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.wallet-ctas.view :as wallet-ctas]
|
[quo.components.buttons.wallet-ctas.view :as wallet-ctas]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "Wallet CTAs test"
|
(h/describe "Wallet CTAs test"
|
@ -1,4 +1,4 @@
|
|||||||
(ns quo2.components.buttons.wallet-ctas.style)
|
(ns quo.components.buttons.wallet-ctas.style)
|
||||||
|
|
||||||
(def container
|
(def container
|
||||||
{:padding-top 24
|
{:padding-top 24
|
@ -1,10 +1,10 @@
|
|||||||
(ns quo2.components.buttons.wallet-ctas.view
|
(ns quo.components.buttons.wallet-ctas.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.wallet-button.view :as wallet-button]
|
[quo.components.buttons.wallet-button.view :as wallet-button]
|
||||||
[quo2.components.buttons.wallet-ctas.style :as style]
|
[quo.components.buttons.wallet-ctas.style :as style]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[utils.i18n :as i18n]))
|
[utils.i18n :as i18n]))
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.calendar.calendar.component-spec
|
(ns quo.components.calendar.calendar.component-spec
|
||||||
(:require
|
(:require
|
||||||
[cljs-time.core :as time]
|
[cljs-time.core :as time]
|
||||||
[quo2.components.calendar.calendar.view :as calendar]
|
[quo.components.calendar.calendar.view :as calendar]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(def start-date (time/date-time (time/year (time/now)) (time/month (time/now)) 5))
|
(def start-date (time/date-time (time/year (time/now)) (time/month (time/now)) 5))
|
@ -1,4 +1,4 @@
|
|||||||
(ns quo2.components.calendar.calendar.days-grid.style)
|
(ns quo.components.calendar.calendar.days-grid.style)
|
||||||
|
|
||||||
(def container-days
|
(def container-days
|
||||||
{:flex-grow 1
|
{:flex-grow 1
|
@ -1,4 +1,4 @@
|
|||||||
(ns quo2.components.calendar.calendar.days-grid.utils
|
(ns quo.components.calendar.calendar.days-grid.utils
|
||||||
(:require
|
(:require
|
||||||
[cljs-time.core :as time]
|
[cljs-time.core :as time]
|
||||||
[utils.number :as utils.number]))
|
[utils.number :as utils.number]))
|
@ -1,8 +1,8 @@
|
|||||||
(ns quo2.components.calendar.calendar.days-grid.utils-test
|
(ns quo.components.calendar.calendar.days-grid.utils-test
|
||||||
(:require
|
(:require
|
||||||
[cljs-time.core :as time]
|
[cljs-time.core :as time]
|
||||||
[cljs.test :refer-macros [deftest is testing]]
|
[cljs.test :refer-macros [deftest is testing]]
|
||||||
[quo2.components.calendar.calendar.days-grid.utils :as utils]))
|
[quo.components.calendar.calendar.days-grid.utils :as utils]))
|
||||||
|
|
||||||
(deftest day-grid-test
|
(deftest day-grid-test
|
||||||
(let [day-grid-result (utils/day-grid "2023" "7")]
|
(let [day-grid-result (utils/day-grid "2023" "7")]
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.calendar.calendar.days-grid.view
|
(ns quo.components.calendar.calendar.days-grid.view
|
||||||
(:require
|
(:require
|
||||||
[cljs-time.core :as time]
|
[cljs-time.core :as time]
|
||||||
[quo2.components.calendar.calendar-day.view :as calendar-day]
|
[quo.components.calendar.calendar-day.view :as calendar-day]
|
||||||
[quo2.components.calendar.calendar.days-grid.style :as style]
|
[quo.components.calendar.calendar.days-grid.style :as style]
|
||||||
[quo2.components.calendar.calendar.days-grid.utils :as utils]
|
[quo.components.calendar.calendar.days-grid.utils :as utils]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn- day-view
|
(defn- day-view
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.calendar.calendar.month-picker.component-spec
|
(ns quo.components.calendar.calendar.month-picker.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.calendar.calendar.month-picker.view :as month-picker]
|
[quo.components.calendar.calendar.month-picker.view :as month-picker]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "month-picker component"
|
(h/describe "month-picker component"
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.calendar.calendar.month-picker.style
|
(ns quo.components.calendar.calendar.month-picker.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def container
|
(def container
|
||||||
{:align-items :center
|
{:align-items :center
|
@ -1,4 +1,4 @@
|
|||||||
(ns quo2.components.calendar.calendar.month-picker.utils
|
(ns quo.components.calendar.calendar.month-picker.utils
|
||||||
(:require
|
(:require
|
||||||
[utils.datetime :as datetime]))
|
[utils.datetime :as datetime]))
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.calendar.calendar.month-picker.utils-test
|
(ns quo.components.calendar.calendar.month-picker.utils-test
|
||||||
(:require
|
(:require
|
||||||
[cljs.test :refer-macros [deftest is testing]]
|
[cljs.test :refer-macros [deftest is testing]]
|
||||||
[quo2.components.calendar.calendar.month-picker.utils :as utils]))
|
[quo.components.calendar.calendar.month-picker.utils :as utils]))
|
||||||
|
|
||||||
(deftest format-month-year-test
|
(deftest format-month-year-test
|
||||||
(testing "returns correct format for given year and month"
|
(testing "returns correct format for given year and month"
|
@ -1,10 +1,10 @@
|
|||||||
(ns quo2.components.calendar.calendar.month-picker.view
|
(ns quo.components.calendar.calendar.month-picker.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.buttons.button.view :as button]
|
[quo.components.buttons.button.view :as button]
|
||||||
[quo2.components.calendar.calendar.month-picker.style :as style]
|
[quo.components.calendar.calendar.month-picker.style :as style]
|
||||||
[quo2.components.calendar.calendar.month-picker.utils :as utils]
|
[quo.components.calendar.calendar.month-picker.utils :as utils]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[utils.number :as utils.number]))
|
[utils.number :as utils.number]))
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.calendar.calendar.style
|
(ns quo.components.calendar.calendar.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(defn container
|
(defn container
|
||||||
[theme]
|
[theme]
|
@ -1,4 +1,4 @@
|
|||||||
(ns quo2.components.calendar.calendar.utils
|
(ns quo.components.calendar.calendar.utils
|
||||||
(:require
|
(:require
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[utils.datetime :as datetime]
|
[utils.datetime :as datetime]
|
@ -1,8 +1,8 @@
|
|||||||
(ns quo2.components.calendar.calendar.utils-test
|
(ns quo.components.calendar.calendar.utils-test
|
||||||
(:require
|
(:require
|
||||||
[cljs.test :refer-macros [deftest is testing]]
|
[cljs.test :refer-macros [deftest is testing]]
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[quo2.components.calendar.calendar.utils :as utils]
|
[quo.components.calendar.calendar.utils :as utils]
|
||||||
[utils.datetime :as datetime]
|
[utils.datetime :as datetime]
|
||||||
[utils.number :as utils.number]))
|
[utils.number :as utils.number]))
|
||||||
|
|
@ -1,12 +1,12 @@
|
|||||||
(ns quo2.components.calendar.calendar.view
|
(ns quo.components.calendar.calendar.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.calendar.calendar.days-grid.view :as days-grid]
|
[quo.components.calendar.calendar.days-grid.view :as days-grid]
|
||||||
[quo2.components.calendar.calendar.month-picker.view :as month-picker]
|
[quo.components.calendar.calendar.month-picker.view :as month-picker]
|
||||||
[quo2.components.calendar.calendar.style :as style]
|
[quo.components.calendar.calendar.style :as style]
|
||||||
[quo2.components.calendar.calendar.utils :as utils]
|
[quo.components.calendar.calendar.utils :as utils]
|
||||||
[quo2.components.calendar.calendar.weekdays-header.view :as weekdays-header]
|
[quo.components.calendar.calendar.weekdays-header.view :as weekdays-header]
|
||||||
[quo2.components.calendar.calendar.years-list.view :as years-list]
|
[quo.components.calendar.calendar.years-list.view :as years-list]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[reagent.core :as reagent]
|
[reagent.core :as reagent]
|
||||||
[utils.number :as utils.number]))
|
[utils.number :as utils.number]))
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.calendar.calendar.weekdays-header.style
|
(ns quo.components.calendar.calendar.weekdays-header.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def container-weekday-row
|
(def container-weekday-row
|
||||||
{:flex-direction :row
|
{:flex-direction :row
|
@ -1,8 +1,8 @@
|
|||||||
(ns quo2.components.calendar.calendar.weekdays-header.view
|
(ns quo.components.calendar.calendar.weekdays-header.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.calendar.calendar.weekdays-header.style :as style]
|
[quo.components.calendar.calendar.weekdays-header.style :as style]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[utils.datetime :as datetime]
|
[utils.datetime :as datetime]
|
||||||
[utils.i18n :as i18n]))
|
[utils.i18n :as i18n]))
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.calendar.calendar.years-list.style
|
(ns quo.components.calendar.calendar.years-list.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(defn gradient-start-color
|
(defn gradient-start-color
|
||||||
[theme]
|
[theme]
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.calendar.calendar.years-list.view
|
(ns quo.components.calendar.calendar.years-list.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.calendar.calendar-year.view :as calendar-year]
|
[quo.components.calendar.calendar-year.view :as calendar-year]
|
||||||
[quo2.components.calendar.calendar.utils :as utils]
|
[quo.components.calendar.calendar.utils :as utils]
|
||||||
[quo2.components.calendar.calendar.years-list.style :as style]
|
[quo.components.calendar.calendar.years-list.style :as style]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.linear-gradient :as linear-gradient]))
|
[react-native.linear-gradient :as linear-gradient]))
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.calendar.calendar-day.component-spec
|
(ns quo.components.calendar.calendar-day.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.calendar.calendar-day.view :as calendar-day]
|
[quo.components.calendar.calendar-day.view :as calendar-day]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "calendar-day component"
|
(h/describe "calendar-day component"
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.calendar.calendar-day.style
|
(ns quo.components.calendar.calendar-day.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def wrapper
|
(def wrapper
|
||||||
{:flex 1
|
{:flex 1
|
@ -1,8 +1,8 @@
|
|||||||
(ns quo2.components.calendar.calendar-day.view
|
(ns quo.components.calendar.calendar-day.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.calendar.calendar-day.style :as style]
|
[quo.components.calendar.calendar-day.style :as style]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn- view-internal
|
(defn- view-internal
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.calendar.calendar-year.component-spec
|
(ns quo.components.calendar.calendar-year.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.calendar.calendar-year.view :as calendar-year]
|
[quo.components.calendar.calendar-year.view :as calendar-year]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
||||||
(h/describe "calendar-year component"
|
(h/describe "calendar-year component"
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.calendar.calendar-year.style
|
(ns quo.components.calendar.calendar-year.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def container-base
|
(def container-base
|
||||||
{:align-items :center
|
{:align-items :center
|
@ -1,8 +1,8 @@
|
|||||||
(ns quo2.components.calendar.calendar-year.view
|
(ns quo.components.calendar.calendar-year.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.calendar.calendar-year.style :as style]
|
[quo.components.calendar.calendar-year.style :as style]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn- view-internal
|
(defn- view-internal
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.code.common.style
|
(ns quo.components.code.common.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
;; Example themes:
|
;; Example themes:
|
||||||
;; https://github.com/react-syntax-highlighter/react-syntax-highlighter/tree/master/src/styles/hljs
|
;; https://github.com/react-syntax-highlighter/react-syntax-highlighter/tree/master/src/styles/hljs
|
@ -1,10 +1,10 @@
|
|||||||
(ns quo2.components.code.common.view
|
(ns quo.components.code.common.view
|
||||||
(:require
|
(:require
|
||||||
[cljs-bean.core :as bean]
|
[cljs-bean.core :as bean]
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[quo2.components.buttons.button.view :as button]
|
[quo.components.buttons.button.view :as button]
|
||||||
[quo2.components.code.common.style :as style]
|
[quo.components.code.common.style :as style]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[react-native.linear-gradient :as linear-gradient]
|
[react-native.linear-gradient :as linear-gradient]
|
||||||
[react-native.syntax-highlighter :as highlighter]
|
[react-native.syntax-highlighter :as highlighter]
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.code.snippet.view
|
(ns quo.components.code.snippet.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.code.common.view :as code-common]
|
[quo.components.code.common.view :as code-common]
|
||||||
[quo2.theme :as theme]))
|
[quo.theme :as theme]))
|
||||||
|
|
||||||
(defn- view-internal
|
(defn- view-internal
|
||||||
[_]
|
[_]
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.code.snippet-preview.view
|
(ns quo.components.code.snippet-preview.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.code.common.view :as code-common]))
|
[quo.components.code.common.view :as code-common]))
|
||||||
|
|
||||||
(defn view
|
(defn view
|
||||||
[{:keys [language]} children]
|
[{:keys [language]} children]
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.colors.color.style
|
(ns quo.components.colors.color.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def color-button-common
|
(def color-button-common
|
||||||
{:width 48
|
{:width 48
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.colors.color.view
|
(ns quo.components.colors.color.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.colors.color.style :as style]
|
[quo.components.colors.color.style :as style]
|
||||||
[quo2.components.icon :as icon]
|
[quo.components.icon :as icon]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn- feng-shui
|
(defn- feng-shui
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.colors.color-picker.component-spec
|
(ns quo.components.colors.color-picker.component-spec
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.colors.color-picker.view :as color-picker]
|
[quo.components.colors.color-picker.view :as color-picker]
|
||||||
[reagent.core :as reagent]
|
[reagent.core :as reagent]
|
||||||
[test-helpers.component :as h]))
|
[test-helpers.component :as h]))
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.colors.color-picker.view
|
(ns quo.components.colors.color-picker.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.colors.color.view :as color]
|
[quo.components.colors.color.view :as color]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
||||||
[reagent.core :as reagent]))
|
[reagent.core :as reagent]))
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
(ns quo2.components.common.no-flicker-image
|
(ns quo.components.common.no-flicker-image
|
||||||
(:require
|
(:require
|
||||||
[oops.core :as oops]
|
[oops.core :as oops]
|
||||||
[react-native.core :as rn]
|
[react-native.core :as rn]
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.common.not-implemented.style
|
(ns quo.components.common.not-implemented.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(defn text
|
(defn text
|
||||||
[blur? theme]
|
[blur? theme]
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.common.not-implemented.view
|
(ns quo.components.common.not-implemented.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.common.not-implemented.style :as style]
|
[quo.components.common.not-implemented.style :as style]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn- view-internal
|
(defn- view-internal
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.common.notification-dot.style
|
(ns quo.components.common.notification-dot.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def ^:const size 8)
|
(def ^:const size 8)
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.common.notification-dot.view
|
(ns quo.components.common.notification-dot.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.common.notification-dot.style :as style]
|
[quo.components.common.notification-dot.style :as style]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn view-internal
|
(defn view-internal
|
16
src/quo/components/common/separator/view.cljs
Normal file
16
src/quo/components/common/separator/view.cljs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
(ns quo.components.common.separator.view
|
||||||
|
(:require
|
||||||
|
[quo.foundations.colors :as quo.colors]
|
||||||
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
|
(defn separator
|
||||||
|
[{:keys [style]}]
|
||||||
|
[rn/view
|
||||||
|
{:style
|
||||||
|
(merge
|
||||||
|
style
|
||||||
|
{:background-color (quo.colors/theme-colors
|
||||||
|
quo.colors/neutral-10
|
||||||
|
quo.colors/neutral-80)
|
||||||
|
:align-self :stretch
|
||||||
|
:height 1})}])
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.common.unread-grey-dot.style
|
(ns quo.components.common.unread-grey-dot.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def unread-grey-dot
|
(def unread-grey-dot
|
||||||
{:width 8
|
{:width 8
|
@ -1,6 +1,6 @@
|
|||||||
(ns quo2.components.common.unread-grey-dot.view
|
(ns quo.components.common.unread-grey-dot.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.common.unread-grey-dot.style :as style]
|
[quo.components.common.unread-grey-dot.style :as style]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn unread-grey-dot
|
(defn unread-grey-dot
|
@ -1,7 +1,7 @@
|
|||||||
(ns quo2.components.community.banner.style
|
(ns quo.components.community.banner.style
|
||||||
(:require
|
(:require
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.foundations.shadows :as shadows]))
|
[quo.foundations.shadows :as shadows]))
|
||||||
|
|
||||||
(defn community-card
|
(defn community-card
|
||||||
[theme]
|
[theme]
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.community.banner.view
|
(ns quo.components.community.banner.view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.community.banner.style :as style]
|
[quo.components.community.banner.style :as style]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as theme]
|
[quo.theme :as theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn- card-title-and-description
|
(defn- card-title-and-description
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.community.channel-actions
|
(ns quo.components.community.channel-actions
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.community.style :as style]
|
[quo.components.community.style :as style]
|
||||||
[quo2.components.counter.counter.view :as counter]
|
[quo.components.counter.counter.view :as counter]
|
||||||
[quo2.components.icon :as icons]
|
[quo.components.icon :as icons]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn channel-action
|
(defn channel-action
|
@ -1,9 +1,9 @@
|
|||||||
(ns quo2.components.community.community-card-view
|
(ns quo.components.community.community-card-view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.community.community-view :as community-view]
|
[quo.components.community.community-view :as community-view]
|
||||||
[quo2.components.community.icon :as icon]
|
[quo.components.community.icon :as icon]
|
||||||
[quo2.components.community.style :as style]
|
[quo.components.community.style :as style]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn- loading-card-view
|
(defn- loading-card-view
|
@ -1,14 +1,14 @@
|
|||||||
(ns quo2.components.community.community-list-view
|
(ns quo.components.community.community-list-view
|
||||||
(:require
|
(:require
|
||||||
[quo2.components.common.unread-grey-dot.view :refer [unread-grey-dot]]
|
[quo.components.common.unread-grey-dot.view :refer [unread-grey-dot]]
|
||||||
[quo2.components.community.community-view :as community-view]
|
[quo.components.community.community-view :as community-view]
|
||||||
[quo2.components.community.icon :as community-icon]
|
[quo.components.community.icon :as community-icon]
|
||||||
[quo2.components.community.style :as style]
|
[quo.components.community.style :as style]
|
||||||
[quo2.components.counter.counter.view :as counter]
|
[quo.components.counter.counter.view :as counter]
|
||||||
[quo2.components.icon :as icons]
|
[quo.components.icon :as icons]
|
||||||
[quo2.components.markdown.text :as text]
|
[quo.components.markdown.text :as text]
|
||||||
[quo2.foundations.colors :as colors]
|
[quo.foundations.colors :as colors]
|
||||||
[quo2.theme :as quo.theme]
|
[quo.theme :as quo.theme]
|
||||||
[react-native.core :as rn]))
|
[react-native.core :as rn]))
|
||||||
|
|
||||||
(defn notification-view
|
(defn notification-view
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user