diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index d4f80c2..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-sudo: true
-language: clojure
-lein: lein2
-before_install: yes y | sudo lein2 upgrade
-script: lein2 with-profile test doo phantom unit once
diff --git a/CHANGES.md b/CHANGES.md
index 85a0b7f..a1f1e13 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,40 +1,9 @@
-## 0.1.0-beta
+## 0.2.0-SNAPSHOT
-* adds the following elements
- * list
- * rail
- * step
-* remove :group? and replace with plural version of the element.1 In other words, adds the following:
- * buttons
- * icons
- * images
- * labels
- * segments
+* targets semantic-ui-react version "0.64.0-0"
-1 Breaking change. Example for how to update affected elements:
+---
-```
-;; 0.1.0-alpha2
-[s/button {:soda {:tag :div
- :group? true
- :color :red}}
- ... ]
+*DONT USE ANYTHING BEFORE VERSION 0.2.0.*
-;; 0.1.0-beta
-[s/buttons {:soda {:color :red}} ;; <-- note the extra "s"
- ... ]
-```
-
-
-## 0.1.0-alpha2 [source](https://github.com/gadfly361/soda-ash/tree/4f266c3d3a9dbca240238a3c6f3d2f62cf80586a)
-
-* initial release
-* targets Semantic UI version 2.1.8 and Reagent 0.5.1
-
-## 0.1.0-alpha1
-
-* broken release (forgot to set :source-paths)
-
-## 0.1.0-alpha
-
-* broken release (forgot to set :source-paths)
+The previous versions were incomplete and wrapped semantic-ui instead of semantic-ui-react.
diff --git a/README.md b/README.md
index 0dc24eb..3a0a4e3 100644
--- a/README.md
+++ b/README.md
@@ -1,87 +1,77 @@
# soda-ash
-[![Build Status](https://travis-ci.org/gadfly361/soda-ash.svg?branch=master)](https://travis-ci.org/gadfly361/soda-ash)
-
-**WARNING** I am currently working on a complete re-write of soda-ash. I strongly urge you to *not* depend on this library yet. Also, the current release only covers Semantic UI's Elements.
-
-Soda-ash is an interface between clojurescript's [reagent](https://github.com/reagent-project/reagent) and [Semantic UI](http://semantic-ui.com/).
-
-Semantic UI is awesome ... however, at its core, you are concatenating
-ordered classes into a string. Soda-ash bubbles Semantic UI's classes
-out of this regex-hell and softens them into clojurescript's familiar,
-powerful, and unordered hash-map. Furthermore, soda-ash allows you to
-place this hash-map inside a reagent atom at your desired path. This
-means you can swap! Semantic UI classes and have your component
-reactively update.
-
-## Docs
-
-The
-**[documentation](http://soda-ash.s3-website-us-east-1.amazonaws.com/#!/soda_ash.an_overview_card)**
-has *lots* of devcard examples.
-
-If you have questions, I can usually be found hanging out in the
-[clojurians](http://clojurians.net/) #reagent slack channel (my handle
-is [@gadfly361](https://twitter.com/gadfly361)).
+Soda-ash is an interface between
+clojurescript's [reagent](https://github.com/reagent-project/reagent)
+and [semantic-ui-react](http://react.semantic-ui.com/introduction).
## Usage
Put the following in the `:dependencies` vector of your *project.clj*
-```
-[soda-ash "0.1.0-beta"
- :exclusions [cljsjs/react-with-addons]]
+```clojure
+[soda-ash "0.2.0-SNAPSHOT"]
```
Then require soda-ash in your namespace.
-```
+```clojure
(ns foo.bar
- (:require [soda-ash.element :as s]))
+ (:require [soda-ash.core :as sa]))
```
-Finally, add Semantic UI to your index.html file:
-
+### Example
+
+Let's take a look at a modal. In javascript, you'd write something like this:
+
+```jsx
+import React from 'react'
+import { Button, Header, Image, Modal } from 'semantic-ui-react'
+
+const ModalModalExample = () => (
+ Show Modal}>
+ Select a Photo
+
+
+
+
+ We've found the following gravatar image associated with your e-mail address.
+ Is it okay to use this photo?
+
+
+
+)
+
+export default ModalModalExample
```
-
-```
-
-## Roadmap
-
-Next up, Collections.
-
-## Development
-### Devcards
+However, in clojurescript with soda-ash, you'd write something like this:
+```clojure
+(ns foo.bar
+ (:require
+ [reagent.core :as reagent]
+ [soda-ash.core :as sa]))
+
+(defn modal-example []
+ [sa/Modal {:trigger (reagent/as-element [sa/Button "Show Modal"])}
+ [sa/ModalHeader "Select a Photo"]
+ [sa/ModalContent {:image true}
+ [sa/Image {:wrapped true
+ :size "medium"
+ :src "http://semantic-ui.com/images/avatar2/large/rachel.png"}]
+ [sa/ModalDescription
+ [sa/Header "Default Profile Image"]
+ [:p "We've found the following gravatar image associated with your e-mail address."]
+ [:p "Is it okay to use this photo?"]
+ ]]]))
```
-lein clean
-lein figwheel devcards
-```
-
-Figwheel will automatically push cljs changes to the browser.
-
-Wait a bit, then browse to [http://localhost:3449](http://localhost:3449).
-
----
-
-To build a minified version:
-
-```
-lein clean
-lein cljsbuild once hostedcards
-```
-
-Then open *resources/public/index.html*
-### Tests
-```
-lein clean
-lein with-profile test doo phantom unit once
-```
+## Questions
-The above command assumes that you have [phantomjs](https://www.npmjs.com/package/phantomjs) installed.
+If you have questions, I can usually be found hanging out in the
+[clojurians](http://clojurians.net/) #reagent slack channel (my handle
+is [@gadfly361](https://twitter.com/gadfly361)).
# License
diff --git a/project.clj b/project.clj
index 0e8eae3..d41d8b2 100644
--- a/project.clj
+++ b/project.clj
@@ -1,67 +1,15 @@
-(defproject soda-ash "0.1.0-beta"
+(defproject soda-ash "0.2.0-SNAPSHOT"
:description "Soda-ash is an interface between clojurescript's reagent
- and Semantic UI"
+ and Semantic UI React"
:url "https://github.com/gadfly361/soda-ash"
:license {:name "MIT"}
:scm {:name "git"
- :url "https://github.com/gadfly361/soda-ash"}
+ :url "https://github.com/gadfly361/soda-ash"}
:min-lein-version "2.5.3"
- :source-paths ["src/main/cljs"] ;; needed for clojars
-
:dependencies
- [[org.clojure/clojure "1.7.0"]
- [org.clojure/clojurescript "1.7.170"]
- [reagent "0.5.1" :exclusions [cljsjs/react]]
- [cljsjs/react-with-addons "0.13.3-0"]]
-
- :plugins
- [[lein-cljsbuild "1.1.1"]]
-
- :clean-targets ^{:protect false}
- ["resources/public/js/compiled" "target"]
-
-
- :profiles
- {:dev
- {:dependencies
- [[devcards "0.2.0-8" :exclusions [cljsjs/react]]]
-
- :plugins
- [[lein-figwheel "0.5.0-2"]]
-
- :cljsbuild
- {:builds
- [{:id "devcards"
- :source-paths ["src/devcards" "src/main/cljs"]
- :figwheel {:devcards true }
- :compiler {:main "soda-ash.core-card"
- :asset-path "js/compiled/devcards_out"
- :output-to "resources/public/js/compiled/devcards.js"
- :output-dir "resources/public/js/compiled/devcards_out"
- :source-map-timestamp true }}
-
- {:id "hostedcards"
- :source-paths ["src/devcards" "src/main/cljs"]
- :compiler {:main "soda-ash.core-card"
- :devcards true
- :asset-path "js/compiled/devcards_out"
- :output-to "resources/public/js/compiled/devcards.js"
- :optimizations :advanced}}]}}
-
- :test
- {:dependencies
- [[cljs-react-test "0.1.3-SNAPSHOT"]
- [prismatic/dommy "1.1.0"]]
-
- :plugins
- [[lein-doo "0.1.6"]]
-
- :cljsbuild
- {:builds
- [{:id "unit"
- :source-paths ["src/main/cljs" "src/test/cljs"]
- :compiler {:output-to "resources/public/js/compiled/test.js"
- :main soda-ash.runner
- :optimizations :none}}]}}})
+ [[org.clojure/clojure "1.8.0"]
+ [org.clojure/clojurescript "1.9.229"]
+ [reagent "0.6.0"]
+ [cljsjs/semantic-ui-react "0.64.0-0"]])
diff --git a/resources/public/images/avatar/large/ade.jpg b/resources/public/images/avatar/large/ade.jpg
deleted file mode 100644
index a7424e5..0000000
Binary files a/resources/public/images/avatar/large/ade.jpg and /dev/null differ
diff --git a/resources/public/images/avatar/large/nan.jpg b/resources/public/images/avatar/large/nan.jpg
deleted file mode 100644
index fb4f456..0000000
Binary files a/resources/public/images/avatar/large/nan.jpg and /dev/null differ
diff --git a/resources/public/images/avatar/small/christian.jpg b/resources/public/images/avatar/small/christian.jpg
deleted file mode 100644
index 96217de..0000000
Binary files a/resources/public/images/avatar/small/christian.jpg and /dev/null differ
diff --git a/resources/public/images/avatar/small/elliot.jpg b/resources/public/images/avatar/small/elliot.jpg
deleted file mode 100644
index b5a46b5..0000000
Binary files a/resources/public/images/avatar/small/elliot.jpg and /dev/null differ
diff --git a/resources/public/images/avatar/small/joe.jpg b/resources/public/images/avatar/small/joe.jpg
deleted file mode 100644
index 9b2adf9..0000000
Binary files a/resources/public/images/avatar/small/joe.jpg and /dev/null differ
diff --git a/resources/public/images/avatar/small/matt.jpg b/resources/public/images/avatar/small/matt.jpg
deleted file mode 100644
index 4c1e2b4..0000000
Binary files a/resources/public/images/avatar/small/matt.jpg and /dev/null differ
diff --git a/resources/public/images/avatar/small/stevie.jpg b/resources/public/images/avatar/small/stevie.jpg
deleted file mode 100644
index 61955de..0000000
Binary files a/resources/public/images/avatar/small/stevie.jpg and /dev/null differ
diff --git a/resources/public/images/avatar/small/tom.jpg b/resources/public/images/avatar/small/tom.jpg
deleted file mode 100644
index a5a7753..0000000
Binary files a/resources/public/images/avatar/small/tom.jpg and /dev/null differ
diff --git a/resources/public/images/avatar2/small/elyse.png b/resources/public/images/avatar2/small/elyse.png
deleted file mode 100644
index 7ffeeac..0000000
Binary files a/resources/public/images/avatar2/small/elyse.png and /dev/null differ
diff --git a/resources/public/images/avatar2/small/eve.png b/resources/public/images/avatar2/small/eve.png
deleted file mode 100644
index f2ee342..0000000
Binary files a/resources/public/images/avatar2/small/eve.png and /dev/null differ
diff --git a/resources/public/images/avatar2/small/lindsay.png b/resources/public/images/avatar2/small/lindsay.png
deleted file mode 100644
index 685c61f..0000000
Binary files a/resources/public/images/avatar2/small/lindsay.png and /dev/null differ
diff --git a/resources/public/images/avatar2/small/molly.png b/resources/public/images/avatar2/small/molly.png
deleted file mode 100644
index 8cdf068..0000000
Binary files a/resources/public/images/avatar2/small/molly.png and /dev/null differ
diff --git a/resources/public/images/avatar2/small/rachel.png b/resources/public/images/avatar2/small/rachel.png
deleted file mode 100644
index ee83e28..0000000
Binary files a/resources/public/images/avatar2/small/rachel.png and /dev/null differ
diff --git a/resources/public/images/icons/school.png b/resources/public/images/icons/school.png
deleted file mode 100644
index 9b3a88f..0000000
Binary files a/resources/public/images/icons/school.png and /dev/null differ
diff --git a/resources/public/images/wireframe/image.png b/resources/public/images/wireframe/image.png
deleted file mode 100644
index 5d0d0df..0000000
Binary files a/resources/public/images/wireframe/image.png and /dev/null differ
diff --git a/resources/public/images/wireframe/square-image.png b/resources/public/images/wireframe/square-image.png
deleted file mode 100644
index fac4acc..0000000
Binary files a/resources/public/images/wireframe/square-image.png and /dev/null differ
diff --git a/resources/public/images/wireframe/white-image.png b/resources/public/images/wireframe/white-image.png
deleted file mode 100644
index 9ceb2a9..0000000
Binary files a/resources/public/images/wireframe/white-image.png and /dev/null differ
diff --git a/resources/public/index.html b/resources/public/index.html
deleted file mode 100644
index 87c0f93..0000000
--- a/resources/public/index.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/devcards/soda_ash/a_faq_card.cljs b/src/devcards/soda_ash/a_faq_card.cljs
deleted file mode 100644
index 2437c51..0000000
--- a/src/devcards/soda_ash/a_faq_card.cljs
+++ /dev/null
@@ -1,212 +0,0 @@
-(ns soda-ash.a-faq-card
- (:require-macros [devcards.core :refer [defcard-doc
- defcard-rg
- mkdn-pprint-source]])
- (:require [devcards.core]
- [devcards.util.edn-renderer :as edn]
- [reagent.core :as reagent]
- [soda-ash.element :as s]))
-
-
-(defcard-doc
- "
-[back](#!/soda_ash.an_overview_card)
-
-# What is soda-ash?
-
-Soda-ash is an interface between clojurescript's
-[reagent](https://github.com/reagent-project/reagent) and [Semantic
-UI](http://semantic-ui.com/).
-
-# What is `:soda`?
-
-`:soda` is a special attribute that is *added* to the normal attribute
-map, and **replaces** the `:class` attribute. `:soda` takes a hash-map
-of unordered key-value pairs.
-
-For example, let's take a look at an image.")
-
-(defn image []
- [s/image {:soda {:size :small} ;; <-- attention
- :src "images/wireframe/image.png"}]
-
- ;;
- )
-
-(defcard-rg
- [image])
-
-(defcard-doc
- (mkdn-pprint-source image)
- "
-As you can see, `:soda` is added to the normal attribute map. The
-resulting class is `ui small image`. This is because the base class
-for the `s/image` element is `ui small` and the `{:size :small}` soda
-adds the `small` class.
-
-# How does the attribute map work with `:soda`?
-
-Continuing with the image example above, `:src` or any other normal
-attribute is defined *alongside* `:soda` and not inside `:soda`'s
-hash-map. For example, the following **does not** work.
- ")
-
-(defn image-bad []
- [s/image {:soda {:size :small
- :src "images/wireframe/image.png" ;; <-- attention (don't do this)
- }}])
-
-(defcard-doc
- (mkdn-pprint-source image-bad)
- "
-This will not render. Instead, soda-ash will throw an error letting
-you know the key-value pair that isn't accepted. If you open up the
-browser's console, you will see the following error message.
-
-```
-Uncaught Error: Soda-ash :src images/wireframe/image.png doesn't exist for image element
-```
- ")
-
-
-(defcard-doc
- "
-# If `:soda` replaces `:class`, how do I add my own class?
-
-Soda-ash gives you an escape hatch to add your own class, with `:add-class`.
-")
-
-
-(defn image-add-class []
- [s/image {:soda {:size :small
- :add-class "gadfly"} ;; <-- attention
- :src "images/wireframe/image.png"}]
-
- ;;
- )
-
-(defcard-doc
- (mkdn-pprint-source image-add-class))
-
-
-(defcard-doc
- "
-# How do I make soda-ash reactive?
-
-By default, soda-ash is **not** reactive. The `:soda`
-hash-map replaces `:class` when the component *mounts* , and will
-**not** update on render.
-
-To make soda-ash reactive, you need to add `:ratom` and `:path` to your `:soda`.
-")
-
-(defonce app-state (reagent/atom {}))
-
-(defn image-reactive []
- [s/image {:soda {:ratom app-state ;; <-- attention
- :path :foo ;; <-- attention
- :size :small}
- :src "images/wireframe/image.png"}])
-
-(defn wrap-element [ratom element]
- [:div
- (if (vector? element) element [element])
- [:div [:strong "app-state"]]
- (edn/html-edn @ratom)])
-
-(defcard-doc
- (mkdn-pprint-source app-state)
- (mkdn-pprint-source image-reactive))
-
-(defcard-rg
- [wrap-element app-state
- [image-reactive]])
-
-(defn size->tiny []
- [s/button {:on-click #(swap! app-state assoc-in [:foo :soda :size] :tiny)}
- "tiny"])
-
-(defn size->small []
- [s/button {:on-click #(swap! app-state assoc-in [:foo :soda :size] :small)}
- "Small"])
-
-(defcard-doc
- "
-As you can see, your `:soda` is added to your `:ratom` (i.e.,
-`app-state`) at the specified `:path` (i.e., `:foo`). Now your element
-is reactive! If you `swap!` your `:soda` in the ratom, the element's
-class will update.
-"
- (mkdn-pprint-source size->tiny)
- (mkdn-pprint-source size->small))
-
-(defcard-rg
- [wrap-element app-state
- [:div
- [image-reactive]
- [:br]
- [size->tiny]
- [size->small]]])
-
-
-(defcard-doc
- "
-# How do I read the docs?
-
-Let's look at a subset of the docs for the `image` element:
-
----
-# image
-
-* **base class** ui image
-* **default tag** :img
-* **:state** :hidden | :disabled
-* **variations**
- :rounded? | :size |
-
-where
-
-* **:size** :mini | :tiny | :small | :medium | :large | :big | :huge | :massive
-
----
-
-* The **base class** let's you know what the class will be if you
-don't pass in any `:soda` to the attribute map.
-* Every element has a tag. You can set this by passing `:tag` to your
- `:soda` (i.e., `{:soda {:tag :div}}`). However, if`:tag` is not set,
- then it will revert to the **default tag**.
-* Many elements can have `:state`. For example `{:soda {:state :disabled}}`.
-* Most elements have variations. For example, an image can be rounded
- and vary in size `{:soda {:rounded? true :size :massive}}`
-
-# What is `h/fake-content` in the docs?
-
-A lot of elements need some content to look as intended ... so
-`h/fake-content` is just some lorem ipsum.
-
-```
-(defn fake-content []
- [:div
- \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
- eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
- ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
- aliquip ex ea commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
- pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
- culpa qui officia deserunt mollit anim id est laborum.\"])
-```
-
-# Do I always have to pass in an attribute map?
-
-For the time being ... yes. :(
-
-```
-[s/button {} ;; <-- note the empty attribute map
- \"This works\"]
-```
-
-```
-[s/button ;; <-- not the lack of attribute map
- \"This doesn't work\"]
-```
- ")
diff --git a/src/devcards/soda_ash/an_overview_card.cljs b/src/devcards/soda_ash/an_overview_card.cljs
deleted file mode 100644
index ed8e88e..0000000
--- a/src/devcards/soda_ash/an_overview_card.cljs
+++ /dev/null
@@ -1,189 +0,0 @@
-(ns soda-ash.an-overview-card
- (:require-macros [devcards.core :refer [defcard-doc
- defcard-rg
- mkdn-pprint-source]])
- (:require [devcards.core]
- [devcards.util.edn-renderer :as edn]
- [reagent.core :as reagent]
- [soda-ash.element :as s]))
-
-
-
-;; avatar example
-
-
-(defn avatar-no-soda []
- [:a.ui.basic.teal.label
- [:img.ui.right.spaced.avatar.image
- {:src "images/avatar/small/elliot.jpg"}
- "Elliot"]])
-
-(defn avatar-with-soda []
- [s/label {:soda {:tag :a
- :basic? true
- :color :teal}}
- [s/image {:soda {:spaced :right
- :avatar? true}
- :src "images/avatar/small/elliot.jpg"}]
- "Elliot"])
-
-
-
-;; dynamic example
-
-
-(defn wrap-element [ratom element]
- [:div
- (if (vector? element) element [element])
- [:div [:strong "Element State"]]
- (edn/html-edn @ratom)])
-
-(defonce app-state (reagent/atom {}))
-
-(defn option-btn [k v]
- (let [current-v (get-in @app-state [:foo :bar :soda k])]
- [:button {:on-click #(swap! app-state assoc-in [:foo :bar :soda k] v)
- :style {:background-color (when (= current-v v)
- "grey")}}
- (name v)]))
-
-(def colors
- [:red :orange :yellow :olive
- :green :teal :blue :violet
- :purple :pink :brown :grey
- :black])
-
-(def sizes
- [:mini :tiny :small :large
- :big :huge :massive])
-
-(def icons
- [:area-chart :bar-chart :camera-retro
- :newspaper :film :line-chart
- :photo :pie-chart :sound])
-
-(defn icon []
- [s/icon {:soda {:ratom app-state
- :path [:foo :bar]
- :icon :sound
- :color :violet
- :size :large}}])
-
-
-
-;; docs
-
-
-(defcard-doc
- "
-# Soda-ash (version 0.1.0-beta)
-
-Soda-ash is an interface between clojurescript's [reagent](https://github.com/reagent-project/reagent) and [Semantic UI](http://semantic-ui.com/).
-
---- **[github repo](https://github.com/gadfly361/soda-ash)** ---
-
-
-## [FAQs](#!/soda_ash.a_faq_card)
-
-## Elements
-
-* [button](#!/soda_ash.elements.button_card)
-* [container](#!/soda_ash.elements.container_card)
-* [divider](#!/soda_ash.elements.divider_card)
-* [flag](#!/soda_ash.elements.flag_card)
-* [header](#!/soda_ash.elements.header_card)
-* [icon](#!/soda_ash.elements.icon_card)
-* [image](#!/soda_ash.elements.image_card)
-* [input](#!/soda_ash.elements.input_card)
-* [label](#!/soda_ash.elements.label_card)
-* [list](#!/soda_ash.elements.list_card)
-* [loader](#!/soda_ash.elements.loader_card)
-* [rail](#!/soda_ash.elements.rail_card)
-* [reveal](#!/soda_ash.elements.reveal_card)
-* [segment](#!/soda_ash.elements.segment_card)
-* [step](#!/soda_ash.elements.step_card)
-
-## Why use soda-ash?
-
-Semantic UI is awesome ... however, at its core, you are concatenating
-ordered classes into a string. Soda-ash bubbles Semantic UI's classes
-out of this regex-hell and softens them into clojurescript's familiar,
-powerful, and unordered hash-map.
-
-What was once this:
-"
-
-(mkdn-pprint-source avatar-no-soda)
-
-"Becomes this:"
-
- (mkdn-pprint-source avatar-with-soda))
-
-(defcard-rg
- [s/label {:soda {:tag :a
- :basic? true
- :color :teal}}
- [s/image {:soda {:spaced :right
- :avatar? true}
- :src "images/avatar/small/elliot.jpg"}]
- "Elliot"])
-
-
-
-(defcard-doc
-"`:soda` is a new attribute that is *added* to the normal attibute
-map, and **replaces the `:class` attribute. `:soda` takes a hash-map
-of unordered key-value pairs. Now you are able to take full advantage
-of the hash-map data structure ... assoc, dissoc, merge etc.
-
-Finally, soda-ash allows you to place your `:soda` inside a reagent
-atom at your desired path. This means you can swap! Semantic UI
-classes and have your component reactively update.
-"
- (mkdn-pprint-source app-state)
-
- (mkdn-pprint-source icon))
-
-(defcard-rg
- [:div
- [wrap-element app-state
- [icon]]
- [:div "Color: "
- (for [color colors]
- ^{:key color}
- [option-btn :color color])]
-
- [:div "Size: "
- (for [size sizes]
- ^{:key size}
- [option-btn :size size])]
- [:div "Icon: "
- (for [icon icons]
- ^{:key icon}
- [option-btn :icon icon])]])
-
-
-
-(defcard-doc
- "
-## Usage
-
-Put the following in the `:dependencies` vector of your *project.clj*
-
-```
-[soda-ash \"0.1.0-beta\"]
-```
-
-Then require soda-ash in your namespace.
-
-```
-(ns foo.bar
- (:require [soda-ash.element :as s]))
-```
-
-Finally, add Semantic UI to your index.html file:
-
-```
-
-```
-")
diff --git a/src/devcards/soda_ash/core_card.cljs b/src/devcards/soda_ash/core_card.cljs
deleted file mode 100644
index b55e8de..0000000
--- a/src/devcards/soda_ash/core_card.cljs
+++ /dev/null
@@ -1,22 +0,0 @@
-(ns soda-ash.core-card
- (:require-macros [devcards.core :as dc])
- (:require [soda-ash.a-faq-card]
- [soda-ash.an-overview-card]
- [soda-ash.elements.button-card]
- [soda-ash.elements.container-card]
- [soda-ash.elements.divider-card]
- [soda-ash.elements.flag-card]
- [soda-ash.elements.header-card]
- [soda-ash.elements.icon-card]
- [soda-ash.elements.image-card]
- [soda-ash.elements.input-card]
- [soda-ash.elements.label-card]
- [soda-ash.elements.list-card]
- [soda-ash.elements.loader-card]
- [soda-ash.elements.rail-card]
- [soda-ash.elements.reveal-card]
- [soda-ash.elements.segment-card]
- [soda-ash.elements.step-card]))
-
-
-(dc/start-devcard-ui!)
diff --git a/src/devcards/soda_ash/elements/button_card.cljs b/src/devcards/soda_ash/elements/button_card.cljs
deleted file mode 100644
index 7896e88..0000000
--- a/src/devcards/soda_ash/elements/button_card.cljs
+++ /dev/null
@@ -1,803 +0,0 @@
-(ns soda-ash.elements.button-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [reagent.core :as reagent]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
- "
-[back](#!/soda_ash.an_overview_card)
-
-# button
-
-* **base class** ui button
-* **default tag** :button
-* **:type**
- *ANIMATED* :animated | :vertical-animated | :animated-fade |
- *BASIC* :basic | :inverted-basic |
- *EMPHASIS* :primary | :secondary |
- *ICON* :icon | :labeled-icon | :right-labeled-icon |
- *INVERTED* :inverted | :inverted-basc |
- *LABELED* :labeled | :left-labeled | :labeled-icon | :right-labeled-icon
-* **content** conditionals
-* **:state** :default | :active | :disabled | :loading
-* **variations**
- :attached | :circular? | :color | :compact? | :consequence |
- :floated | :fluid? | :size | :social | :toggle?
-
-where
-
-* **:attached** :top | :bottom | :left | :right
-* **:color**
- :red | :orange | :yellow | :olive |
- :green | :teal | :blue | :violet |
- :purple | :pink | :brown | :grey |
- :black
-* **consequence** :positive | :negative
-* **:floated** :left | :right
-* **size**
- :mini | :tiny | :small | :medium |
- :large | :big | :huge | :massive
-* **:social**
- :facebook | :twitter | :google-plus |
- :vk | :linkedin | :instagram | :youtube
-
-Notes:
-
-* Although any tag can be used for a button, it will only be keyboard focusable if you use a `:button` tag or you add the property `:tab-index \"0\"`. Keyboard accessible buttons will preserve focus styles after click, which may be visually jarring.
-
-# Buttons
-
-* **base class* ui buttons
-* **default tag** :div
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
- "# TYPES")
-
-
-;; Button
-
-(defn button []
- [:div
- ;; :button
- [s/button {:soda {:type :default}}
- "button"]
-
- ;; :div
- [s/button {:soda {:tag :div
- :type :default}
- :tab-index "0"}
- "div"]])
-
-(defcard-doc
- "
-### Button
-
-A standard button
-"
- (mkdn-pprint-source button))
-
-(defcard-rg
- [button])
-
-
-;; Emphasis
-
-(defn emphasis []
- [:div
- [s/button {:soda {:type :primary}}
- "primary"]
-
- [s/button {:soda {:tag :div
- :type :secondary}
- :tab-index "0"}
- "secondary"]])
-
-(defcard-doc
- "
-### Emphasis
-
-A button can be formatted to show different levels of emphasis
-
-Notes:
-
-* Setting your brand colors to primary and secondary color variables in site.variables will allow you to use your color theming for UI elements
-"
- (mkdn-pprint-source emphasis))
-
-(defcard-rg
- [emphasis])
-
-
-;; Animated
-
-(defn animated []
- [:div
- [s/button {:soda {:type :animated}}
- [:div.visible.content
- "Next"]
- [:div.hidden.content
- [s/icon {:soda {:icon :right-arrow}}]]]
-
- [s/button {:soda {:type :vertical-animated}}
- [:div.visible.content
- [s/icon {:soda {:icon :shop}}]]
- [:div.hidden.content
- "Shop"]]
-
- [s/button {:soda {:type :animated-fade}}
- [:div.visible.content
- "Sign-up for a Pro account"]
- [:div.hidden.content
- "$12.99 a mont"]]])
-
-(defcard-doc
- "
-### Animated
-
-A button can animate to show hidden content
-
-Notes:
-
-* The button will be automatically sized according to the visible content size. Make sure there is enough room for the hidden content to show
-"
- (mkdn-pprint-source animated))
-
-(defcard-rg
- [animated])
-
-
-;; Labeled
-
-(defn labeled []
- [:div
- [s/button {:soda {:tag :div
- :type :labeled}
- :tab-index "0"}
- [s/button {}
- [s/icon {:soda {:icon :heart}}]
- "Like"]
- [s/label {:soda {:tag :a
- :basic? true}}
- "2,048"]]
-
- [s/button {:soda {:tag :div
- :type :left-labeled}
- :tab-index "0"}
- [s/label {:soda {:tag :a
- :type :right-pointing
- :basic? true}}
- "2,048"]
- [s/button {}
- [s/icon {:soda {:icon :heart}}]
- "Like"]]])
-
-(defcard-doc
- "
-### Labeled
-
-A button can appear alongside a label
-"
- (mkdn-pprint-source labeled))
-
-(defcard-rg
- [labeled])
-
-
-;; Icon
-
-(defn icon []
- [s/button {:soda {:type :icon}}
- [s/icon {:soda {:icon :cloud}}]])
-
-(defcard-doc
- "
-### Icon
-
-A button can have only an icon
-"
- (mkdn-pprint-source icon))
-
-(defcard-rg
- [icon])
-
-
-
-;; Labeled-Icon
-
-(defn labeled-icon []
- [:div
- [s/button {:soda {:type :labeled-icon}}
- [s/icon {:soda {:icon :pause}}]
- "Pause"]
-
- [s/button {:soda {:type :right-labeled-icon}}
- [s/icon {:soda {:icon :right-arrow}}]
- "Next"]])
-
-(defcard-doc
- "
-### Labeled Icon
-
-A button can use an icon as a label
-"
- (mkdn-pprint-source labeled-icon))
-
-(defcard-rg
- [labeled-icon])
-
-
-;; Basic
-
-(defn basic []
- [s/button {:soda {:type :basic}}
- [s/icon {:soda {:icon :user}}]
- "Add Friend"])
-
-(defcard-doc
- "
-### Basic
-
-A basic button is less pronounced
-"
- (mkdn-pprint-source basic))
-
-(defcard-rg
- [basic])
-
-
-;; Inverted
-
-(defn inverted []
- [s/segment {:soda {:inverted? true}}
- [s/button {:soda {:type :inverted
- :color :red}}
- "Red"]
-
- [s/button {:soda {:type :inverted
- :color :orange}}
- "Orange"]
-
- [s/button {:soda {:type :inverted
- :color :yellow}}
- "Yellow"]])
-
-(defcard-doc
- "
-### Inverted
-
-A button can be formatted to appear on dark backgrounds
-"
- (mkdn-pprint-source inverted))
-
-(defcard-rg
- [inverted])
-
-
-;; Inverted-Basic
-
-(defn inverted-basic []
- [s/segment {:soda {:inverted? true}}
- [s/button {:soda {:type :inverted-basic
- :color :red}}
- "Red"]
-
- [s/button {:soda {:type :inverted-basic
- :color :orange}}
- "Orange"]
-
- [s/button {:soda {:type :inverted-basic
- :color :yellow}}
- "Yellow"]])
-
-(defcard-doc
- "
-### Inverted Basic
-"
- (mkdn-pprint-source inverted-basic))
-
-(defcard-rg
- [inverted-basic])
-
-
-
-;; ====================
-;; GROUPS
-
-(defcard-doc
- "# GROUPS")
-
-
-;; Buttons
-
-(defn buttons []
- [:div
- [s/buttons {}
- [s/button {} "One"]
- [s/button {} "Two"]
- [s/button {} "Three"]]
-
- [s/buttons {:soda {:color :red}}
- [s/button {} "Four"]
- [s/button {} "Five"]
- [s/button {} "Six"]]
- ])
-
-(defcard-doc
- "
-### Buttons
-
-Buttons can exist together as a group
-"
- (mkdn-pprint-source buttons))
-
-(defcard-rg
- [buttons])
-
-
-;; Icon-Buttons
-
-(defn icon-buttons []
- [s/buttons {:soda {:type :icon}}
- [s/button {}
- [s/icon {:soda {:icon :align-left}}]]
- [s/button {}
- [s/icon {:soda {:icon :align-center}}]]
- [s/button {}
- [s/icon {:soda {:icon :align-right}}]]
- [s/button {}
- [s/icon {:soda {:icon :align-justify}}]]
- ])
-
-(defcard-doc
- "
-### Icon Buttons
-
-Button groups can show groups of icons
-"
- (mkdn-pprint-source icon-buttons))
-
-(defcard-rg
- [icon-buttons])
-
-
-
-;; ====================
-;; CONTENT
-
-(defcard-doc
- "# CONTENT")
-
-
-;; Conditionals
-
-(defn conditionals []
- [s/buttons {}
- [s/button {} "Cancel"]
- [:div.or] ;; <-- attention
- [s/button {:soda {:consequence :positive}} "Save"]])
-
-(defcard-doc
- "
-### Conditionals
-
-Conditionals can exist together as a group
-"
- (mkdn-pprint-source conditionals))
-
-(defcard-rg
- [conditionals])
-
-
-
-;; ====================
-;; STATES
-
-(defcard-doc
- "# STATES")
-
-
-;; Active
-
-(defn active []
- [s/button {:soda {:state :active}}
- [s/icon {:soda {:icon :user}}]
- "Follow"])
-
-(defcard-doc
- "
-### Active
-
-A button can show it is currently the active user selection
-"
- (mkdn-pprint-source active))
-
-(defcard-rg
- [active])
-
-
-;; Disabled
-
-(defn disabled []
- [s/button {:soda {:state :disabled}}
- [s/icon {:soda {:icon :user}}]
- "Followed"])
-
-(defcard-doc
- "
-### Disabled
-
-A button can show it is currently unable to be interacted with
-"
- (mkdn-pprint-source disabled))
-
-(defcard-rg
- [disabled])
-
-
-;; Loading
-
-(defn loading []
- [s/button {:soda {:state :loading}}
- [s/icon {:soda {:icon :user}}]
- "Follow"])
-
-(defcard-doc
- "
-### Loading
-
-A button can show a loading indicator
-"
- (mkdn-pprint-source loading))
-
-(defcard-rg
- [loading])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
- "# VARIATIONS")
-
-
-;; Social
-
-(defn social []
- [:div
- [s/button {:soda {:social :facebook}}
- [s/icon {:soda {:icon :facebook}}]
- "Facebook"]
-
- [s/button {:soda {:social :twitter}}
- [s/icon {:soda {:icon :twitter}}]
- "Twitter"]
-
- [s/button {:soda {:social :google-plus}}
- [s/icon {:soda {:icon :google-plus}}]
- "Google Plus"]
-
- [s/button {:soda {:social :vk}}
- [s/icon {:soda {:icon :vk}}]
- "VK"]
-
- [s/button {:soda {:social :linkedin}}
- [s/icon {:soda {:icon :linkedin}}]
- "LinkedIn"]
-
- [s/button {:soda {:social :youtube}}
- [s/icon {:soda {:icon :youtube}}]
- "YouTube"]])
-
-(defcard-doc
- "
-### Social
-
-A button can be formatted to link to a social website
-"
- (mkdn-pprint-source social))
-
-(defcard-rg
- [social])
-
-
-;; Size
-
-(defn size []
- [:div
- [s/button {:soda {:size :mini}}
- "Mini"]
- [s/button {:soda {:size :tiny}}
- "Tiny"]
- [s/button {:soda {:size :small}}
- "Small"]
- [s/button {:soda {:size :medium}}
- "Medium"]
- [s/button {:soda {:size :large}}
- "Large"]
- [s/button {:soda {:size :big}}
- "Big"]
- [s/button {:soda {:size :huge}}
- "Huge"]
- [s/button {:soda {:size :massive}}
- "Massive"]])
-
-(defcard-doc
- "
-### Size
-
-A button can have different sizes
-"
- (mkdn-pprint-source size))
-
-(defcard-rg
- [size])
-
-
-;; Floated
-
-(defn floated []
- [:div
- [s/button {:soda {:floated :left}}
- "Left Floated"]
-
- [s/button {:soda {:floated :right}}
- "Right Floated"]
-
- [h/fake-content]
- ])
-
-(defcard-doc
- "
-### Floated
-
-A button can be aligned to the left or right of its container
-"
- (mkdn-pprint-source floated))
-
-(defcard-rg
- [floated])
-
-
-;; Colored
-
-(defn colored []
- [:div
- [s/button {:soda {:color :red}}
- "Red"]
- [s/button {:soda {:color :orange}}
- "Orange"]
- [s/button {:soda {:color :yellow}}
- "Yellow"]
- [s/button {:soda {:color :olive}}
- "Olive"]
- [s/button {:soda {:color :green}}
- "Green"]
- [s/button {:soda {:color :teal}}
- "Teal"]
- [s/button {:soda {:color :blue}}
- "Blue"]
- [s/button {:soda {:color :violet}}
- "Violet"]
- [s/button {:soda {:color :purple}}
- "Purple"]
- [s/button {:soda {:color :pink}}
- "Pink"]
- [s/button {:soda {:color :brown}}
- "Brown"]
- [s/button {:soda {:color :grey}}
- "Grey"]
- [s/button {:soda {:color :black}}
- "Black"]])
-
-(defcard-doc
- "
-### Colored
-
-A button can have different colors
-"
- (mkdn-pprint-source colored))
-
-(defcard-rg
- [colored])
-
-
-;; Compact
-
-(defn compact []
- [:div
- [s/button {:soda {:compact? true}}
- "Hold"]
-
- [s/button {:soda {:type :labeled-icon
- :compact? true}}
- [s/icon {:soda {:icon :pause}}]
- "Pause"]])
-
-(defcard-doc
- "
-### Compact
-
-A button can reduce its padding to fit into tighter spaces
-"
- (mkdn-pprint-source compact))
-
-(defcard-rg
- [compact])
-
-
-;; Toggle
-
-(defn toggle-state [state]
- (if (= :active state)
- :default
- :active))
-
-(defn toggle-text [state]
- (if (= :active state)
- "Voted"
- "Vote"))
-
-(defn handle-on-click! [ratom state]
- (swap! ratom update-in [:foo :soda :state] toggle-state))
-
-(defn toggle-component []
- (let [ratom (reagent/atom {})]
- (fn []
- (let [state (get-in @ratom [:foo :soda :state])]
- [s/button {:soda {:ratom ratom
- :path :foo
- :toggle? true
- :state :default}
- :on-click #(handle-on-click! ratom state)}
- (toggle-text state)]))))
-
-(defcard-doc
- "
-### Toggle
-
-A button can be formatted to toggle on and off
-"
- (mkdn-pprint-source toggle-state)
- (mkdn-pprint-source toggle-text)
- (mkdn-pprint-source handle-on-click!)
- (mkdn-pprint-source toggle-component))
-
-(defcard-rg
- [toggle-component])
-
-
-;; Positive
-
-(defn positive []
- [s/button {:soda {:consequence :positive}}
- "Positive"])
-
-(defcard-doc
- "
-### Positive
-
-A button can hint towards a positive consequence
-"
- (mkdn-pprint-source positive))
-
-(defcard-rg
- [positive])
-
-
-;; Negative
-
-(defn negative []
- [s/button {:soda {:consequence :negative}}
- "Negative"])
-
-(defcard-doc
- "
-### Negative
-
-A button can hint towards a negative consequence
-"
- (mkdn-pprint-source negative))
-
-(defcard-rg
- [negative])
-
-
-;; Fluid
-
-(defn fluid []
- [s/button {:soda {:fluid? true}}
- "Fluid"])
-
-(defcard-doc
- "
-### Fluid
-
-A button can take the width of its container
-"
- (mkdn-pprint-source fluid))
-
-(defcard-rg
- [fluid])
-
-
-;; Circular
-
-(defn circular []
- [s/button {:soda {:type :icon
- :circular? true}}
- [s/icon {:soda {:icon :settings}}]])
-
-(defcard-doc
- "
-### Circular
-
-A button can be circular
-"
- (mkdn-pprint-source circular))
-
-(defcard-rg
- [circular])
-
-
-;; Vertically Attached
-
-(defn vertically-attached []
- [:div
- [s/button {:soda {:tag :div
- :attached :top}
- :tab-index "0"}
- "Top"]
- [s/segment {:soda {:attached :default}}
- [h/fake-content]]
- [s/button {:soda {:tag :div
- :attached :bottom}
- :tab-index "0"}
- "Bottom"]])
-
-(defcard-doc
- "
-### Vertically Attached
-
-A button can be attached to the top or bottom of other content
-"
- (mkdn-pprint-source vertically-attached))
-
-(defcard-rg
- [vertically-attached])
-
-
-;; Horizontally Attached
-
-(defn horizontally-attached []
- [:div
- [s/button {:soda {:attached :left}}
- "Left"]
- [s/button {:soda {:attached :right}}
- "Right"]])
-
-(defcard-doc
- "
-### Horizontally Attached
-
-A button can be attached to the left or right of other content
-"
- (mkdn-pprint-source horizontally-attached))
-
-(defcard-rg
- [horizontally-attached])
diff --git a/src/devcards/soda_ash/elements/card_helpers.cljs b/src/devcards/soda_ash/elements/card_helpers.cljs
deleted file mode 100644
index 57e0eb9..0000000
--- a/src/devcards/soda_ash/elements/card_helpers.cljs
+++ /dev/null
@@ -1,12 +0,0 @@
-(ns soda-ash.elements.card-helpers)
-
-
-(defn fake-content []
- [:div
- "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
- eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
- ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
- aliquip ex ea commodo consequat. Duis aute irure dolor in
- reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
- pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
- culpa qui officia deserunt mollit anim id est laborum."])
diff --git a/src/devcards/soda_ash/elements/container_card.cljs b/src/devcards/soda_ash/elements/container_card.cljs
deleted file mode 100644
index 2a73f7f..0000000
--- a/src/devcards/soda_ash/elements/container_card.cljs
+++ /dev/null
@@ -1,133 +0,0 @@
-(ns soda-ash.elements.container-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# container
-
-* **base class** ui container
-* **default tag** :div
-* **:type** :default | :text
-* **variations** :aligned | :fluid?
-
-where
-
-* **:aligned** :left | :right | :justified | :center
-
-Notes:
-
-The devcards have their own width, so some of the options like :fluid? aren't presented well.
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
-"# TYPES")
-
-
-;; Container
-
-(defn container []
- [s/container {:soda {:type :default}}
- [h/fake-content]])
-
-(defcard-doc
- "
-### Container
-
-A standard container
-"
- (mkdn-pprint-source container))
-
-(defcard-rg
- [container])
-
-
-;; Text-Container
-
-(defn text-container []
- [s/container {:soda {:type :text}}
- [h/fake-content]])
-
-(defcard-doc
- "
-### Text Container
-
-A container can reduce its maximum width to more naturally accomodate a single column of text
-
-Notes:
-
-* A text container is a simpler markup alternative to using a grid with a single column, and is designed to have a reasonable maximum width for displaying flowing text
-"
- (mkdn-pprint-source text-container))
-
-(defcard-rg
- [text-container])
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
-"# VARIATIONS")
-
-
-;; Aligned
-
-(defn aligned []
- [:div
- [s/container {:soda {:aligned :left}}
- "Left Aligned"]
-
- [s/container {:soda {:aligned :center}}
- "Center Aligned"]
-
- [s/container {:soda {:aligned :right}}
- "Right Aligned"]
-
- [s/container {:soda {:aligned :justified}}
- [h/fake-content]]])
-
-(defcard-doc
- "
-### Text Alignment
-
-A container can specify its text alignment
-"
- (mkdn-pprint-source aligned))
-
-(defcard-rg
- [aligned])
-
-
-;; Fluid
-
-(defn fluid []
- [s/container {:soda {:fluid? true}}
- [h/fake-content]])
-
-(defcard-doc
- "
-### Text Alignment
-
-A fluid container has no maximum width
-"
- (mkdn-pprint-source fluid))
-
-(defcard-rg
- [fluid])
diff --git a/src/devcards/soda_ash/elements/divider_card.cljs b/src/devcards/soda_ash/elements/divider_card.cljs
deleted file mode 100644
index f3e7840..0000000
--- a/src/devcards/soda_ash/elements/divider_card.cljs
+++ /dev/null
@@ -1,228 +0,0 @@
-(ns soda-ash.elements.divider-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# divider
-
-* **base class** ui divider
-* **default tag** :div
-* **:type**
- :default | :vertical | :horizontal
-* **variations** clearing? | fitted? | hidden? | inverted? | section?
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
-"# TYPES")
-
-
-;; Divider
-
-(defn divider []
- [:div
- [h/fake-content]
- [s/divider {:soda {:type :default}}]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Divider
-
-A standard divider
-
-Notes:
-
-* To add a divider between parts of a grid use a divided grid variation.
-"
- (mkdn-pprint-source divider))
-
-(defcard-rg
- [divider])
-
-
-;; Vertical
-
-(defn vertical []
- [:div.ui.two.column.very.relaxed.grid
- [:div.column
- [h/fake-content]]
-
- [s/divider {:soda {:type :vertical}}
- "and"]
-
- [:div.column
- [h/fake-content]]])
-
-(defcard-doc
- "
-### Vertical Divider
-
-A divider can segment content vertically
-
-Notes:
-
-* Vertical dividers requires position: relative on the element that you would like to contain the divider
-* A vertical divider will automatically swap to a horizontal divider at mobile resolutions when used inside a stackable grid
-"
- (mkdn-pprint-source vertical))
-
-(defcard-rg
- [vertical])
-
-
-;; Horizontal
-
-(defn horizontal []
- [:div
- [h/fake-content]
- [s/divider {:soda {:type :horizontal}}
- [s/icon {:soda {:icon :bar-chart}}]
- "Specifications"]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Horizontal
-
-A divider can segment content horizontally
-
-Notes:
-
-* Horizontal dividers can also be used in combination with headers and icons to create different styles of dividers.
-* Dividers will automatically vary the size of their dividing rules to match the length of your text
-"
- (mkdn-pprint-source horizontal))
-
-(defcard-rg
- [horizontal])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
-"# VARIATIONS")
-
-
-;; Inverted
-
-(defn inverted []
- [s/segment {:soda {:inverted? true}}
- [h/fake-content]
- [s/divider {:soda {:inverted? true}}]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Inverted
-
-A divider can have its colors inverted
-"
- (mkdn-pprint-source inverted))
-
-(defcard-rg
- [inverted])
-
-
-;; Fitted
-
-(defn fitted []
- [:div
- [h/fake-content]
- [s/divider {:soda {:fitted? true}}]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Fitted
-
-A divider can be fitted, without any space above or below it.
-"
- (mkdn-pprint-source fitted))
-
-(defcard-rg
- [fitted])
-
-
-;; Hidden
-
-(defn hidden []
- [:div
- [h/fake-content]
- [s/divider {:soda {:hidden? true}}]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Hidden
-
-A hidden divider divides content without creating a dividing line
-"
- (mkdn-pprint-source hidden))
-
-(defcard-rg
- [hidden])
-
-
-;; Section
-
-(defn section []
- [:div
- [s/header {:soda {:tag :h3}}
- "Section Two"]
- [h/fake-content]
- [s/divider {:soda {:section? true}}]
- [s/header {:soda {:tag :h3}}
- "Section Two"]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Section
-
-A divider can provide greater margins to divide sections of content
-"
- (mkdn-pprint-source section))
-
-(defcard-rg
- [section])
-
-
-;; Clearing
-
-(defn clearing []
- [s/segment {:soda {:type :default}}
- [s/header {:soda {:tag :h2
- :floated :right}}
- "Floated Content"]
- [s/divider {:soda {:clearing? true}}]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Clearing
-
-A divider can clear the contents above it
-"
- (mkdn-pprint-source clearing))
-
-(defcard-rg
- [clearing])
diff --git a/src/devcards/soda_ash/elements/flag_card.cljs b/src/devcards/soda_ash/elements/flag_card.cljs
deleted file mode 100644
index 6e00202..0000000
--- a/src/devcards/soda_ash/elements/flag_card.cljs
+++ /dev/null
@@ -1,43 +0,0 @@
-(ns soda-ash.elements.flag-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# flag
-
-* **base class* flag
-* **default tag** :i
-* **:flag** see [Semantic UI docs](http://semantic-ui.com/elements/flag.html)
-
----
-")
-
-
-;; Flag
-
-(defn flag []
- [:div
- [s/flag {:soda {:flag :ae}}]
- [s/flag {:soda {:flag :france}}]
- [s/flag {:soda {:flag :myanmar}}]])
-
-(defcard-doc
- "
-### Flag
-
-A flag can use the two digit country code, the full name, or a common alias
-"
- (mkdn-pprint-source flag))
-
-(defcard-rg
- [flag])
diff --git a/src/devcards/soda_ash/elements/header_card.cljs b/src/devcards/soda_ash/elements/header_card.cljs
deleted file mode 100644
index 7098800..0000000
--- a/src/devcards/soda_ash/elements/header_card.cljs
+++ /dev/null
@@ -1,457 +0,0 @@
-(ns soda-ash.elements.header-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# header
-
-* **base class** ui header
-* **default tag** :div
-* **:type**
- :default |
- *HEADERS* :huge | :large | :medium | :small | :tiny
- *ICON* :icon
- *SUB* :sub
-* **:state** :default | :disabled
-* **content** image | icon | subheader
-* **variations**
- :aligned | :attached | :block? | :color |
- :dividing? | :floated | inverted?
-
-where
-
-* **aligned** :right | :left | :justified | :center
-* **:color**
- :red | :orange | :yellow | :olive |
- :green | :teal | :blue | :violet |
- :purple | :pink | :brown | :grey |
- :black
-* **:floated** :right | :left
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
-"# TYPES")
-
-
-;; page headers
-
-(defn page-headers []
- [:div
- [s/header {:soda {:tag :h1}} "First header"]
- [s/header {:soda {:tag :h2}} "Second header"]
- [s/header {:soda {:tag :h3}} "Third header"]
- [s/header {:soda {:tag :h4}} "Fourth header"]
- [s/header {:soda {:tag :h5}} "Fifth header"]
- ])
-
-(defcard-doc
- "
-### Page Headers
-
-Headers may be oriented to give the hierarchy of a section in the context of the page
-
-Notes:
-
-* Page headings are sized using rem and are not affected by surrounding content size.
-"
- (mkdn-pprint-source page-headers))
-
-(defcard-rg
- [page-headers])
-
-
-;; content headers
-
-(defn content-headers []
- [:div
- [s/header {:soda {:type :huge}} "Huge"]
- [s/header {:soda {:type :large}} "Large"]
- [s/header {:soda {:type :medium}} "Medium"]
- [s/header {:soda {:type :small}} "Small"]
- [s/header {:soda {:type :tiny}} "Tiny"]
- ])
-
-(defcard-doc
- "
-### Content Headers
-
-Headers may be oriented to give the importance of a section in the context of the content that surrounds it.
-
-Notes:
-
-* Content headings are sized with *em* and are based on the font-size of their container.
-"
- (mkdn-pprint-source content-headers))
-
-(defcard-rg
- [content-headers])
-
-
-;; icon headers
-
-(defn icon-headers []
- [s/header {:soda {:tag :h2
- :type :icon}}
- [s/icon {:soda {:icon :settings}}]
- "Account Settings"])
-
-(defcard-doc
- "
-### Icon Headers
-
-A header can be formatted to emphasize an icon
-"
- (mkdn-pprint-source icon-headers))
-
-(defcard-rg
- [icon-headers])
-
-
-;; sub headers
-
-(defn sub-headers []
- [:div
- [s/header {:soda {:tag :h2
- :type :sub}}
- "Price"]
- [:span "$10.99"]])
-
-(defcard-doc
- "
-### Sub Headers
-
-Headers may be formatted to label smaller or de-emphasized content.
-"
- (mkdn-pprint-source sub-headers))
-
-(defcard-rg
- [sub-headers])
-
-
-
-;; ====================
-;; CONTENT
-
-(defcard-doc
-"# Content")
-
-
-;; image
-
-(defn image []
- [s/header {:soda {:tag :h2}}
- [s/image {:src "images/icons/school.png"}]
- [:div.content
- "Learn More"]])
-
-(defcard-doc
- "
-### Image
-
-A header may contain an image
-"
- (mkdn-pprint-source image))
-
-(defcard-rg
- [image])
-
-
-;; icon
-
-(defn icon []
- [s/header {:soda {:tag :h2}}
- [s/icon {:soda {:icon :plug}}]
- [:div.content
- "Uptime Guarantee"]])
-
-(defcard-doc
- "
-### Icon
-
-A header may contain an icon
-"
- (mkdn-pprint-source icon))
-
-(defcard-rg
- [icon])
-
-
-;; subheader
-
-(defn subheader []
- [:div
- [s/header {:soda {:tag :h2}}
- "H1"
- [:div.sub.header ;; <-- attention (note: this isn't a soda header element)
- "Sub Header"]]
-
- [s/header {:soda {:tag :h2}}
- "H2"
- [:div.sub.header
- "Sub Header"]]
-
- [s/header {:soda {:tag :h3}}
- "H3"
- [:div.sub.header
- "Sub Header"]]
-
- [s/header {:soda {:tag :h4}}
- "H4"
- [:div.sub.header
- "Sub Header"]]
-
- [s/header {:soda {:tag :h5}}
- "H5"
- [:div.sub.header
- "Sub Header"]]])
-
-(defcard-doc
- "
-### Subheader
-
-Headers may contain subheaders
-"
- (mkdn-pprint-source subheader))
-
-(defcard-rg
- [subheader])
-
-
-
-;; ====================
-;; STATES
-
-(defcard-doc
-"# States")
-
-
-(defn states []
- [s/header {:soda {:state :disabled}}
- "Disabled Header"])
-
-(defcard-doc
- "
-### Disabled
-
-A header can show that it is inactive
-"
- (mkdn-pprint-source states))
-
-(defcard-rg
- [states])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
-"# Variations")
-
-
-;; dividing
-
-(defn dividing []
- [:div
- [h/fake-content]
- [s/header {:soda {:dividing? true}}
- "Dividing Header"]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Dividing
-
-A header can be formatted to divide itself from the content below it
-"
- (mkdn-pprint-source dividing))
-
-(defcard-rg
- [dividing])
-
-
-;; block
-
-(defn block []
- [:div
- [s/header {:soda {:block? true}}
- "Block Header"]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Block
-
-A header can be formatted to appear inside a content block
-"
- (mkdn-pprint-source block))
-
-(defcard-rg
- [block])
-
-
-;; attached
-
-(defn attached []
- [:div
- [s/header {:soda {:tag :h3
- :attached :top}}
- "Top Attached"]
- [s/segment {:soda {:attached :default}}
- [h/fake-content]]
- [s/header {:soda {:tag :h3
- :attached :default}}
- "Attached"]
- [s/segment {:soda {:attached :default}}
- [h/fake-content]]
- [s/header {:soda {:tag :h3
- :attached :bottom}}
- "Bottom Attached"]])
-
-(defcard-doc
- "
-### Attached
-
-A header can be attached to other content, like a segment
-"
- (mkdn-pprint-source attached))
-
-(defcard-rg
- [attached])
-
-
-;; floating
-
-(defn floating []
- [s/segment {:soda {:clearing? true}}
- [s/header {:soda {:floated :right}}
- "Go Forward"]
- [s/header {:soda {:floated :left}}
- "Go Back"]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Floating
-
-A header can sit to the left or right of other content
-"
- (mkdn-pprint-source floating))
-
-(defcard-rg
- [floating])
-
-
-;; alignment
-
-(defn alignment []
- [s/segment {:soda {:type :default}}
- [s/header {:soda {:aligned :right}} "Right"]
- [s/header {:soda {:aligned :left}} "Left"]
- [s/header {:soda {:aligned :justified}}
- "This should take up the full width even if only one line"]
- [s/header {:soda {:aligned :center}} "Center"]])
-
-(defcard-doc
- "
-### Text Alignment
-
-A header can have its text aligned to a side
-"
- (mkdn-pprint-source alignment))
-
-(defcard-rg
- [alignment])
-
-
-;; colored
-
-(defn colored []
- [:div
- [s/header {:soda {:color :red}} "Red"]
- [s/header {:soda {:color :orange}} "Orange"]
- [s/header {:soda {:color :yellow}} "Yellow"]
- [s/header {:soda {:color :olive}} "Olive"]
- [s/header {:soda {:color :green}} "Green"]
- [s/header {:soda {:color :teal}} "Teal"]
- [s/header {:soda {:color :blue}} "Blue"]
- [s/header {:soda {:color :purple}} "Purple"]
- [s/header {:soda {:color :violet}} "Violet"]
- [s/header {:soda {:color :pink}} "Pink"]
- [s/header {:soda {:color :brown}} "Brown"]
- [s/header {:soda {:color :grey}} "Grey"]
- ])
-
-(defcard-doc
- "
-### Colored
-
-A header can be formatted with different colors
-"
- (mkdn-pprint-source colored))
-
-(defcard-rg
- [colored])
-
-
-;; inverted-colored
-
-(defn inverted-colored []
- [s/segment {:soda {:inverted? true}}
- [s/header {:soda {:inverted? true
- :color :red}} "Red"]
- [s/header {:soda {:inverted? true
- :color :orange}} "Orange"]
- [s/header {:soda {:inverted? true
- :color :yellow}} "Yellow"]
- [s/header {:soda {:inverted? true
- :color :olive}} "Olive"]
- [s/header {:soda {:inverted? true
- :color :green}} "Green"]
- [s/header {:soda {:inverted? true
- :color :teal}} "Teal"]
- [s/header {:soda {:inverted? true
- :color :blue}} "Blue"]
- [s/header {:soda {:inverted? true
- :color :purple}} "Purple"]
- [s/header {:soda {:inverted? true
- :color :violet}} "Violet"]
- [s/header {:soda {:inverted? true
- :color :pink}} "Pink"]
- [s/header {:soda {:inverted? true
- :color :brown}} "Brown"]
- [s/header {:soda {:inverted? true
- :color :grey}} "Grey"]
- ])
-
-(defcard-doc
- "
-### Inverted-Colored
-
-A header can have its colors inverted for contrast
-
-Notes:
-
-* Inverted headers use modified light versions of your site's color scheme that are adapted to have more contrast on dark background
-"
- (mkdn-pprint-source inverted-colored))
-
-(defcard-rg
- [inverted-colored])
diff --git a/src/devcards/soda_ash/elements/icon_card.cljs b/src/devcards/soda_ash/elements/icon_card.cljs
deleted file mode 100644
index 3a578c4..0000000
--- a/src/devcards/soda_ash/elements/icon_card.cljs
+++ /dev/null
@@ -1,427 +0,0 @@
-(ns soda-ash.elements.icon-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
- "
-[back](#!/soda_ash.an_overview_card)
-
-# icon
-
-* **base class** icon
-* **default tag** :i
-* **:icon** see [Semantic UI docs](http://semantic-ui.com/elements/icon.html)
-* **:state** :default | :disabled | :loading
-* **variations**
- :bordered? | :circular? | :color | :corner? (inside icons) |
- :flipped | :fitted? | :inverted? | :link? | :rotated | :size
-
-where
-
-* **:color**
- :red | :orange | :yellow | :olive |
- :green | :teal | :blue | :violet |
- :purple | :pink | :brown | :grey |
- :black
-* **:flipped** :horizontally | :vertically
-* **:rotated** :clockwise | :counterclockwise
-* **:size**
- :mini | :tiny | :small | :large | :big | :huge | :massive
-
-# icons
-
-* **base class** icons
-* **default tag** :i
-
----
-")
-
-
-
-;; ====================
-;; STATES
-
-(defcard-doc
- "# STATES")
-
-
-;; Disabled
-
-(defn disabled []
- [s/icon {:soda {:icon :users
- :state :disabled}}])
-
-(defcard-doc
- "
-### Disabled
-
-An icon can show that it is disabled
-"
- (mkdn-pprint-source disabled))
-
-(defcard-rg
- [disabled])
-
-
-;; Loading
-
-(defn loading []
- [:div
- [s/icon {:soda {:icon :spinner
- :state :loading}}]
-
- [s/icon {:soda {:icon :notched-circle
- :state :loading}}]
-
- [s/icon {:soda {:icon :asterisk
- :state :loading}}]])
-
-(defcard-doc
- "
-### Loading
-
-An icon can be used as a simple loader
-"
- (mkdn-pprint-source loading))
-
-(defcard-rg
- [loading])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
- "# VARIATIONS")
-
-
-;; Fitted
-
-(defn fitted []
- [:div
- "Tight spacing"
- [s/icon {:soda {:icon :help
- :fitted? true}}]
- "Tight spacing"])
-
-(defcard-doc
- "
-### Fitted
-
-An icon can be fitted, without any space to the left or right of it.
-"
- (mkdn-pprint-source fitted))
-
-(defcard-rg
- [fitted])
-
-
-
-;; Size
-
-(defn size []
- [:div
- [s/icon {:soda {:icon :home :size :mini}}]
- [s/icon {:soda {:icon :home :size :tiny}}]
- [s/icon {:soda {:icon :home :size :small}}]
- [s/icon {:soda {:icon :home}}]
- [s/icon {:soda {:icon :home :size :large}}]
- [s/icon {:soda {:icon :home :size :big}}]
- [s/icon {:soda {:icon :home :size :huge}}]
- [s/icon {:soda {:icon :home :size :massive}}]])
-
-(defcard-doc
- "
-### Size
-
-An icon can vary in size
-"
- (mkdn-pprint-source size))
-
-(defcard-rg
- [size])
-
-
-;; Link
-
-(defn link []
- [:div
- [s/icon {:soda {:icon :close
- :link? true}}]
- [s/icon {:soda {:icon :help
- :link? true}}]])
-
-(defcard-doc
- "
-### Link
-
-An icon can be formatted as a link
-"
- (mkdn-pprint-source link))
-
-(defcard-rg
- [link])
-
-
-;; Flipped
-
-(defn flipped []
- [:div
- [s/icon {:soda {:icon :cloud
- :flipped :horizontally}}]
- [s/icon {:soda {:icon :cloud
- :flipped :vertically}}]])
-
-(defcard-doc
- "
-### Flipped
-
-An icon can be flipped
-"
- (mkdn-pprint-source flipped))
-
-(defcard-rg
- [flipped])
-
-
-;; Rotated
-
-(defn rotated []
- [:div
- [s/icon {:soda {:icon :cloud
- :rotated :clockwise}}]
- [s/icon {:soda {:icon :cloud
- :rotated :counterclockwise}}]])
-
-(defcard-doc
- "
-### Rotated
-
-An icon can be rotated
-"
- (mkdn-pprint-source rotated))
-
-(defcard-rg
- [rotated])
-
-
-;; Circular
-
-(defn circular []
- [:div
- [s/icon {:soda {:icon :users
- :circular? true}}]
- [s/icon {:soda {:icon :users
- :circular? true
- :color :teal}}]
- [s/icon {:soda {:icon :users
- :circular? true
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :circular? true
- :color :teal
- :inverted? true}}]])
-
-(defcard-doc
- "
-### Circular
-
-An icon can be formatted to appear circular
-"
- (mkdn-pprint-source circular))
-
-(defcard-rg
- [circular])
-
-
-;; Bordered
-
-(defn bordered []
- [:div
- [s/icon {:soda {:icon :users
- :bordered? true}}]
- [s/icon {:soda {:icon :users
- :bordered? true
- :color :teal}}]
- [s/icon {:soda {:icon :users
- :bordered? true
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :bordered? true
- :color :teal
- :inverted? true}}]])
-
-(defcard-doc
- "
-### Bordered
-
-An icon can be formatted to appear bordered
-"
- (mkdn-pprint-source bordered))
-
-(defcard-rg
- [bordered])
-
-
-;; Colored
-
-(defn colored []
- [:div
- [s/icon {:soda {:icon :users
- :color :red}}]
- [s/icon {:soda {:icon :users
- :color :orange}}]
- [s/icon {:soda {:icon :users
- :color :yellow}}]
- [s/icon {:soda {:icon :users
- :color :olive}}]
- [s/icon {:soda {:icon :users
- :color :green}}]
- [s/icon {:soda {:icon :users
- :color :teal}}]
- [s/icon {:soda {:icon :users
- :color :blue}}]
- [s/icon {:soda {:icon :users
- :color :violet}}]
- [s/icon {:soda {:icon :users
- :color :purple}}]
- [s/icon {:soda {:icon :users
- :color :pink}}]
- [s/icon {:soda {:icon :users
- :color :brown}}]
- [s/icon {:soda {:icon :users
- :color :grey}}]
- [s/icon {:soda {:icon :users
- :color :black}}]])
-
-(defcard-doc
- "
-### Colored
-
-An icon can be formatted with different colors
-"
- (mkdn-pprint-source colored))
-
-(defcard-rg
- [colored])
-
-
-;; Inverted
-
-(defn inverted []
- [s/segment {:soda {:inverted? true}}
- [s/icon {:soda {:icon :users
- :color :red
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :orange
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :yellow
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :olive
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :green
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :teal
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :blue
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :violet
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :purple
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :pink
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :brown
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :grey
- :inverted? true}}]
- [s/icon {:soda {:icon :users
- :color :black
- :inverted? true}}]])
-
-(defcard-doc
- "
-### Inverted
-
-An icon can have its colors inverted for contrast
-"
- (mkdn-pprint-source inverted))
-
-(defcard-rg
- [inverted])
-
-
-
-
-;; ====================
-;; GROUPS
-
-(defcard-doc
- "# GROUPS")
-
-
-;; Icons
-
-(defn icons []
- [:div
- [s/icons {:soda {:size :huge}}
- [s/icon {:soda {:icon :thin-circle
- :size :big}}]
- [s/icon {:soda {:icon :user}}]]
-
- [s/icons {:soda {:size :huge}}
- [s/icon {:soda {:icon :loading-sun
- :color :teal
- :size :big}}]
- [s/icon {:soda {:icon :user}}]]])
-
-(defcard-doc
- "
-### Icons
-
-Several icons can be used together as a group
-"
- (mkdn-pprint-source icons))
-
-(defcard-rg
- [icons])
-
-
-;; Corner-Icons
-
-(defn corner-icons []
- [:div
- [s/icons {:soda {:size :huge}}
- [s/icon {:soda {:icon :puzzle}}]
- [s/icon {:soda {:icon :add
- :corner? true}}]]])
-
-(defcard-doc
- "
-### Corner Icons
-
-A group of icons can display a smaller corner icon
-"
- (mkdn-pprint-source corner-icons))
-
-(defcard-rg
- [corner-icons])
diff --git a/src/devcards/soda_ash/elements/image_card.cljs b/src/devcards/soda_ash/elements/image_card.cljs
deleted file mode 100644
index 5485691..0000000
--- a/src/devcards/soda_ash/elements/image_card.cljs
+++ /dev/null
@@ -1,413 +0,0 @@
-(ns soda-ash.elements.image-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
- "
-[back](#!/soda_ash.an_overview_card)
-
-# image
-
-* **base class** ui image
-* **default tag** :img
-* **:state** :hidden | :disabled
-* **variations**
- :aligned | :avatar? | :bordered? | :centered? |
- :circular? | :floated | :fluid? | :rounded? | :size |
- :spaced | :state
-
-where
-
-* **:aligned** :top | :middle | :bottom
-* **:floated** :left | :right
-* **:size** :mini | :tiny | :small | :medium | :large | :big | :huge | :massive
-* **:spaced** :default | :left | :right
-* **:state** :default | :hidden | :disabled
-
-# images
-
-* **base class** ui images
-* **default tag** :div
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
- "# TYPES")
-
-
-;; Image
-
-(defn image []
- [s/image {:soda {:size :small}
- :src "images/wireframe/image.png"}])
-
-(defcard-doc
- "
-### Image
-
-An image
-"
- (mkdn-pprint-source image))
-
-(defcard-rg
- [image])
-
-
-;; Image-Link
-
-(defn image-link []
- [:a {:href "http://google.com"
- :target "_blank"}
- [s/image {:soda {:size :medium}
- :src "images/wireframe/image.png"}]])
-
-(defcard-doc
- "
-### Image Link
-
-An image can be formatted to link to other content
-"
- (mkdn-pprint-source image-link))
-
-(defcard-rg
- [image-link])
-
-
-
-;; ====================
-;; STATES
-
-(defcard-doc
- "# STATES")
-
-
-;; hidden
-
-(defn hidden []
- [s/image {:soda {:state :hidden}
- :src "images/wireframe/image.png"}])
-
-(defcard-doc
- "
-### Hidden
-
-An image can be hidden
-"
- (mkdn-pprint-source hidden))
-
-(defcard-rg
- [hidden])
-
-
-;; disabled
-
-(defn disabled []
- [s/image {:soda {:state :disabled
- :size :medium}
- :src "images/wireframe/image.png"}])
-
-(defcard-doc
- "
-### Disabled
-
-An image can show that it is disabled and cannot be selected
-"
- (mkdn-pprint-source disabled))
-
-(defcard-rg
- [disabled])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
- "# VARIATIONS")
-
-
-;; avatar
-
-(defn avatar []
- [:div
- [s/image {:soda {:avatar? true}
- :src "images/wireframe/image.png"}]
- "Username"])
-
-(defcard-doc
- "
-### Avatar
-
-An image may be formatted to appear inline with text as an avatar
-"
- (mkdn-pprint-source avatar))
-
-(defcard-rg
- [avatar])
-
-
-;; bordered
-
-(defn bordered []
- [s/image {:soda {:bordered? true
- :size :medium}
- :src "images/wireframe/white-image.png"}])
-
-(defcard-doc
- "
-### Bordered
-
-An image may include a border to emphasize the edges of white or transparent content
-"
- (mkdn-pprint-source bordered))
-
-(defcard-rg
- [bordered])
-
-
-;; fluid
-
-(defn fluid []
- [s/image {:soda {:fluid? true}
- :src "images/wireframe/image.png"}])
-
-(defcard-doc
- "
-### Fluid
-
-An image can take up the width of its container
-"
- (mkdn-pprint-source fluid))
-
-(defcard-rg
- [fluid])
-
-
-;; rounded
-
-(defn rounded []
- [s/image {:soda {:rounded? true
- :size :medium}
- :src "images/wireframe/image.png"}])
-
-(defcard-doc
- "
-### Rounded
-
-An image may appear rounded
-"
- (mkdn-pprint-source rounded))
-
-(defcard-rg
- [rounded])
-
-
-;; circular
-
-(defn circular []
- [s/image {:soda {:circular? true
- :size :medium}
- :src "images/wireframe/square-image.png"}])
-
-(defcard-doc
- "
-### Circular
-
-An image may appear circular
-"
- (mkdn-pprint-source circular))
-
-(defcard-rg
- [circular])
-
-
-;; aligned
-
-(defn aligned []
- [:div
- [s/image {:soda {:aligned :top
- :size :tiny}
- :src "images/wireframe/square-image.png"}]
- "Top Aligned"
-
- [s/divider {:soda {:type :default}}]
-
- [s/image {:soda {:aligned :middle
- :size :tiny}
- :src "images/wireframe/square-image.png"}]
- "Middle Aligned"
-
- [s/divider {:soda {:type :default}}]
-
- [s/image {:soda {:aligned :bottom
- :size :tiny}
- :src "images/wireframe/square-image.png"}]
- "Bottom Aligned"])
-
-(defcard-doc
- "
-### Vertically Aligned
-
-An image can specify its vertical alignment
-"
- (mkdn-pprint-source aligned))
-
-(defcard-rg
- [aligned])
-
-
-;; centered
-
-(defn centered []
- [s/segment {:soda {:type :default}}
- [s/image {:soda {:centered? true
- :size :medium}
- :src "images/wireframe/square-image.png"}]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Centered
-
-An image can appear centered in a content block
-"
- (mkdn-pprint-source centered))
-
-(defcard-rg
- [centered])
-
-
-;; spaced
-
-(defn spaced []
- [s/segment {:soda {:type :default}}
- [s/image {:soda {:spaced :right
- :size :mini}
- :src "images/wireframe/square-image.png"}]
-
- "foo bar baz"
-
- [s/image {:soda {:spaced :default
- :size :mini}
- :src "images/wireframe/square-image.png"}]
-
- "foo bar baz"
-
- [s/image {:soda {:spaced :left
- :size :mini}
- :src "images/wireframe/square-image.png"}]
- ])
-
-(defcard-doc
- "
-### Spaced
-
-An image can appear spaced in a content block
-"
- (mkdn-pprint-source spaced))
-
-(defcard-rg
- [spaced])
-
-
-;; floated
-
-(defn floated []
- [s/segment {:soda {:type :default}}
- [s/image {:soda {:floated :left
- :size :small}
- :src "images/wireframe/square-image.png"}]
- [h/fake-content]
- [h/fake-content]
-
- [s/image {:soda {:floated :right
- :size :small}
- :src "images/wireframe/square-image.png"}]
- [h/fake-content]
- [h/fake-content]
- ])
-
-(defcard-doc
- "
-### Floated
-
-An image can sit to the left or right of other content
-"
- (mkdn-pprint-source floated))
-
-(defcard-rg
- [floated])
-
-
-;; size
-
-(defn size []
- [:div
- [s/image {:soda {:size :mini}
- :src "images/wireframe/square-image.png"}]
- [s/image {:soda {:size :tiny}
- :src "images/wireframe/square-image.png"}]
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]
- [s/image {:soda {:size :medium}
- :src "images/wireframe/square-image.png"}]
- [s/image {:soda {:size :large}
- :src "images/wireframe/square-image.png"}]
- [s/image {:soda {:size :big}
- :src "images/wireframe/square-image.png"}]
- [s/image {:soda {:size :huge}
- :src "images/wireframe/square-image.png"}]
- [s/image {:soda {:size :massive}
- :src "images/wireframe/square-image.png"}]])
-
-(defcard-doc
- "
-### Size
-
-An image may appear at different sizes
-"
- (mkdn-pprint-source size))
-
-(defcard-rg
- [size])
-
-
-
-;; ====================
-;; GROUPS
-
-(defcard-doc
- "# GROUPS")
-
-
-;; Groups-Size
-
-(defn groups-size []
- [s/images {:soda {:size :tiny}}
- [s/image {:src "images/wireframe/image.png"}]
- [s/image {:src "images/wireframe/image.png"}]
- [s/image {:src "images/wireframe/image.png"}]])
-
-(defcard-doc
- "
-### Size
-
-A group of images can be formatted to have the same size.
-"
- (mkdn-pprint-source groups-size))
-
-(defcard-rg
- [groups-size])
diff --git a/src/devcards/soda_ash/elements/input_card.cljs b/src/devcards/soda_ash/elements/input_card.cljs
deleted file mode 100644
index 14c0650..0000000
--- a/src/devcards/soda_ash/elements/input_card.cljs
+++ /dev/null
@@ -1,416 +0,0 @@
-(ns soda-ash.elements.input-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# input
-
-* **base class** ui input
-* **default tag** :div
-* **:state** :focus | :loading | :disabled | :error
-* **variations**
- :action | :fluid? | :icon | :inverted? | :labeled | :transparent? |
- :size
-
-where
-
-* **:action** :default | :left
-* **:icon** :default | :left
-* **:labeled** :default | :right | :left-corner | :corner
-* **size**
- :mini | :tiny | :small | :large | :big | :huge | :massive
-
----
-")
-
-
-;; Input
-
-(defn input []
- [s/input {}
- [:input {:type "text"
- :placeholder "Search..."}]])
-
-(defcard-doc
- "
-### Input
-
-A standard input
-"
- (mkdn-pprint-source input))
-
-(defcard-rg
- [input])
-
-
-
-;; ====================
-;; STATES
-
-(defcard-doc
-"# STATES")
-
-
-;; Focus
-
-(defn focus []
- [s/input {:soda {:state :focus}}
- [:input {:type "text"
- :placeholder "Search..."}]])
-
-(defcard-doc
- "
-### Focus
-
-An input field can show a user is currently interacting with it
-"
- (mkdn-pprint-source focus))
-
-(defcard-rg
- [focus])
-
-
-;; Loading
-
-(defn loading []
- [s/input {:soda {:icon :left
- :state :loading}}
- [:input {:type "text"
- :placeholder "Search..."}]
- [s/icon {:soda {:icon :search}}]])
-
-(defcard-doc
- "
-### Loading
-
-An icon input field can show that it is currently loading data
-
-Notes:
-
-* Loading inputs automatically modify the input's icon on loading state to show loading indication
-"
- (mkdn-pprint-source loading))
-
-(defcard-rg
- [loading])
-
-
-;; Disabled
-
-(defn disabled []
- [s/input {:soda {:state :disabled}}
- [:input {:type "text"
- :placeholder "Search..."}]])
-
-(defcard-doc
- "
-### Disabled
-
-An input field can show that it is disabled
-"
- (mkdn-pprint-source disabled))
-
-(defcard-rg
- [disabled])
-
-
-;; Error
-
-(defn error []
- [s/input {:soda {:state :error}}
- [:input {:type "text"
- :placeholder "Search..."}]])
-
-(defcard-doc
- "
-### Error
-
-An input field can show the data contains errors
-"
- (mkdn-pprint-source error))
-
-(defcard-rg
- [error])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
-"# VARIATIONS")
-
-
-;; Icon
-
-(defn icon []
- [:div
- [s/input {:soda {:icon :default}}
- [:input {:type "text"
- :placeholder "Search..."}]
- [s/icon {:soda {:icon :search}}]]
-
- [s/divider {}]
-
- [s/input {:soda {:icon :left}}
- [:input {:type "text"
- :placeholder "Search users..."}]
- [s/icon {:soda {:icon :users}}]]])
-
-(defcard-doc
- "
-### Icon
-
-An input can be formatted with an icon
-
-Notes:
-
-* Input icons do not receive pointer-events unless a link icon is used.
-"
- (mkdn-pprint-source icon))
-
-(defcard-rg
- [icon])
-
-
-;; Labeled
-
-(defn labeled []
- [s/input {:soda {:labeled :default}}
- [s/label {} "http://"]
- [:input {:type "text" :placeholder "mysite.com"}]])
-
-(defcard-doc
- "
-### Labeled
-
-An input can be formatted with a label
-"
- (mkdn-pprint-source labeled))
-
-(defcard-rg
- [labeled])
-
-
-;; Labeled-right
-
-(defn labeled-right []
- [s/input {:soda {:labeled :right}}
- [:input {:type "text" :placeholder "Enter weight.."}]
- [s/label {:soda {:basic? true}} "kg"]])
-
-(defcard-doc
- (mkdn-pprint-source labeled-right))
-
-(defcard-rg
- [labeled-right])
-
-
-;; Labeled-right2
-
-(defn labeled-right2 []
- [s/input {:soda {:labeled :right}}
- [s/label {} "$"]
- [:input {:type "text" :placeholder "Amount"}]
- [s/label {:soda {:basic? true}} ".00"]
-])
-
-(defcard-doc
- (mkdn-pprint-source labeled-right2))
-
-(defcard-rg
- [labeled-right2])
-
-
-;; Labeled-right-icon-left
-
-(defn labeled-right-icon-left []
- [s/input {:soda {:labeled :right
- :icon :left}}
- [s/icon {:soda {:icon :tags}}]
- [:input {:type "text" :placeholder "Enter tags"}]
- [s/label {:soda {:tag :a
- :type :tag}} "Add Tag"]])
-
-(defcard-doc
- (mkdn-pprint-source labeled-right-icon-left))
-
-(defcard-rg
- [labeled-right-icon-left])
-
-
-;; Labeled-left-corner
-
-(defn labeled-left-corner []
- [s/input {:soda {:labeled :left-corner}}
- [:input {:type "text" :placeholder "Search"}]
- [s/label {:soda {:type :left-corner}}
- [s/icon {:soda {:icon :asterisk}}]]])
-
-(defcard-doc
- (mkdn-pprint-source labeled-left-corner))
-
-(defcard-rg
- [labeled-left-corner])
-
-
-;; Labeled-right-corner
-
-(defn labeled-right-corner []
- [s/input {:soda {:labeled :corner}}
- [:input {:type "text" :placeholder "Search"}]
- [s/label {:soda {:type :right-corner}}
- [s/icon {:soda {:icon :asterisk}}]]])
-
-(defcard-doc
- (mkdn-pprint-source labeled-right-corner))
-
-(defcard-rg
- [labeled-right-corner])
-
-
-;; action
-
-(defn action []
- [s/input {:soda {:action :default}}
- [:input {:type "text" :placeholder "Search"}]
- [s/button {:on-click #(js/console.log "clicked!")}
- "Search"]])
-
-(defcard-doc
- "
-### Action
-
-An input can be formatted to alert the user to an action they may perform
-"
- (mkdn-pprint-source action))
-
-(defcard-rg
- [action])
-
-
-;; left-action
-
-(defn left-action []
- [s/input {:soda {:action :left}}
- [s/button {:soda {:type :labeled-icon
- :color :teal}
- :on-click #(js/console.log "clicked!")}
- [s/icon {:soda {:icon :cart}}]
- "Checkout"]
- [:input {:type "text" :value "52.03"}]])
-
-(defcard-doc
- (mkdn-pprint-source left-action))
-
-(defcard-rg
- [left-action])
-
-
-;; transparent
-
-(defn transparent []
- [s/input {:soda {:transparent? true}}
- [:input {:type "text" :placeholder "Search..."}]])
-
-(defcard-doc
- "
-### Transparent
-
-A transparent input has no background
-"
- (mkdn-pprint-source transparent))
-
-(defcard-rg
- [transparent])
-
-
-;; inverted
-
-(defn inverted []
- [s/segment {:soda {:inverted? true}}
- [s/input {:soda {:inverted? true}}
- [:input {:type "text" :placeholder "Search..."}]]])
-
-(defcard-doc
- "
-### Inverted
-
-An input can be formatted to appear on dark backgrounds
-"
- (mkdn-pprint-source inverted))
-
-(defcard-rg
- [inverted])
-
-
-;; fluid
-
-(defn fluid []
- [s/input {:soda {:fluid? true}}
- [:input {:type "text" :placeholder "Search..."}]])
-
-(defcard-doc
- "
-### Fluid
-
-An input can take the size of its container
-"
- (mkdn-pprint-source fluid))
-
-(defcard-rg
- [fluid])
-
-
-;; size
-
-(defn size []
- [:div
- [s/input {:soda {:size :mini}}
- [:input {:type "text" :placeholder "Search mini..."}]]
-
- [s/divider {:soda {:hidden? true}}]
- [s/input {:soda {:size :small}}
- [:input {:type "text" :placeholder "Search small..."}]]
-
- [s/divider {:soda {:hidden? true}}]
- [s/input {:soda {:size :large}}
- [:input {:type "text" :placeholder "Search large..."}]]
-
- [s/divider {:soda {:hidden? true}}]
- [s/input {:soda {:size :big}}
- [:input {:type "text" :placeholder "Search big..."}]]
-
- [s/divider {:soda {:hidden? true}}]
- [s/input {:soda {:size :huge}}
- [:input {:type "text" :placeholder "Search huge..."}]]
-
- [s/divider {:soda {:hidden? true}}]
- [s/input {:soda {:size :massive}}
- [:input {:type "text" :placeholder "Search massive..."}]]
- ])
-
-(defcard-doc
- "
-### Size
-
-An input can vary in size
-
-Notes:
-
-* Inputs will automatically size themselves unless you manually declare a width
-"
- (mkdn-pprint-source size))
-
-(defcard-rg
- [size])
diff --git a/src/devcards/soda_ash/elements/label_card.cljs b/src/devcards/soda_ash/elements/label_card.cljs
deleted file mode 100644
index 8b2e31a..0000000
--- a/src/devcards/soda_ash/elements/label_card.cljs
+++ /dev/null
@@ -1,737 +0,0 @@
-(ns soda-ash.elements.label-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# label
-
-* **base class** ui label
-* **default tag** :div
-* **:type**
- :default |
- *ATTACHED*
- :top-attached |
- :bottom-attached |
- :top-right-attached |
- :top-left-attached |
- :bottom-left-attached |
- :bottom-right-attached |
- *CORNER*
- :left-corner |
- :right-corner |
- *FLOATING*
- :floating |
- *HORIZONTAL*
- :horizontal |
- *IMAGE*
- :image |
- *POINTING*
- :pointing |
- :pointing-below |
- :left-pointing |
- :right-pointing |
- *TAG*
- :tag |
- *RIBBON*
- :ribbon |
- :right-ribbon
-* **content** detail | icon | image | link
-* **variations** :basic? | :circular? | :color | :size
-
-where
-
-* **:color**
- :red | :orange | :yellow | :olive |
- :green | :teal | :blue | :violet |
- :purple | :pink | :brown | :grey |
- :black
-* **:size**
- :mini | :tiny | :small | :large | :big | :huge | :massive
-
-# labels
-
-* **base class** ui labels
-* **default tag** :div
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
-"# TYPES")
-
-
-;; Label
-
-(defn label []
- [s/label {:soda {:type :default}}
- [s/icon {:soda {:icon :mail}}]
- "23"])
-
-(defcard-doc
- "
-### Label
-
-A label
-"
- (mkdn-pprint-source label))
-
-(defcard-rg
- [label])
-
-
-;; Image
-
-(defn image []
- [:div
- [s/label {:soda {:tag :a
- :type :image}}
- [s/image {:src "images/avatar/small/joe.jpg"}]
- "Joe"
- [s/icon {:soda {:icon :delete}}]]
- [s/label {:soda {:tag :a
- :type :image}}
- [s/image {:src "images/avatar/small/elliot.jpg"}]
- "Elliot"
- [s/icon {:soda {:icon :delete}}]]
- [s/label {:soda {:tag :a
- :type :image}}
- [s/image {:src "images/avatar/small/stevie.jpg"}]
- "Stevie"
- [s/icon {:soda {:icon :delete}}]]
- ])
-
-(defcard-doc
- "
-### Image
-
-A label can be formatted to emphasize an image
-"
- (mkdn-pprint-source image))
-
-(defcard-rg
- [image])
-
-
-;; Pointing
-
-(defn pointing []
- [:form.ui.fluid.form
- [:div.field
- [:input {:type "text" :placeholder "Some text.."}]
- [s/label {:soda {:type :pointing}}
- "Please enter a value"]]
-
- [:div.field
- [s/label {:soda {:type :pointing-below}}
- "Please enter a value"]
- [:input {:type "text" :placeholder "Some text.."}]]
-
- [:div.inline.field
- [:input {:type "text" :placeholder "Some text.."}]
- [s/label {:soda {:type :left-pointing
- :color :red
- :basic? :red}}
- "Please enter a value"]]
-
- [:div.inline.field
- [s/label {:soda {:type :right-pointing}}
- "Please enter a value"]
- [:input {:type "text" :placeholder "Some text.."}]]
- ])
-
-(defcard-doc
- "
-### Pointing
-
-A label can point to content next to it
-"
- (mkdn-pprint-source pointing))
-
-(defcard-rg
- [pointing])
-
-
-;; Corner
-
-(defn corner []
- [:div.ui.two.column.grid
- [:div.column
- [:div.ui.fluid.image
- [s/label {:soda {:type :left-corner}}
- [s/icon {:soda {:icon :heart}}]]
- [s/image {:src "images/wireframe/image.png"}]
- ]]
-
- [:div.column
- [:div.ui.fluid.image
- [s/label {:soda {:type :right-corner
- :color :red}}
- [s/icon {:soda {:icon :save}}]]
- [s/image {:src "images/wireframe/image.png"}]
- ]]])
-
-(defcard-doc
- "
-### Corner
-
-A label can position itself in the corner of an element
-
-Notes:
-
-* Regarding style (not soda): A corner label must be positioned inside a container with *position: relative* to display properly. If a container is rounded you will need to add *overflow:hidden* to the container to produce a rounded label.
-"
- (mkdn-pprint-source corner))
-
-(defcard-rg
- [corner])
-
-
-;; Tag
-
-(defn tag []
- [:div
- [s/label {:soda {:tag :a
- :type :tag}}
- "New"]
-
- [s/label {:soda {:tag :a
- :type :tag
- :color :red}}
- "Upcoming"]
-
- [s/label {:soda {:tag :a
- :type :tag
- :color :teal}}
- "Featured"]])
-
-(defcard-doc
- "
-### Tag
-
-A label can appear as a tag
-"
- (mkdn-pprint-source tag))
-
-(defcard-rg
- [tag])
-
-
-;; Ribbon
-
-(defn ribbon []
- [:div.ui.two.column.grid
- [:div.column
- [s/segment {:soda {:type :raised}}
- [s/label {:soda {:type :ribbon
- :color :red}}
- "Overview"]
- [:span "Account Details"]
- [h/fake-content]
- ]]
-
- [:div.column
- [s/segment {:soda {:type :raised}}
- [s/label {:soda {:type :right-ribbon
- :color :orange}}
- "Specs"]
- [h/fake-content]]]])
-
-(defcard-doc
- "
-### Ribbon
-
-A label can appear as a ribbon attaching itself to an element.
-"
- (mkdn-pprint-source ribbon))
-
-(defcard-rg
- [ribbon])
-
-
-
-;; Attached
-
-(defn attached []
- [:div
- [s/segment {:soda {:type :default}}
- [s/label {:soda {:type :top-attached}} "HTML"]
- [h/fake-content]]
-
- [s/segment {:soda {:type :default}}
- [s/label {:soda {:type :bottom-attached}} "CSS"]
- [h/fake-content]]
-
- [s/segment {:soda {:type :default}}
- [s/label {:soda {:type :top-right-attached}} "Code"]
- [h/fake-content]]
-
- [s/segment {:soda {:type :default}}
- [s/label {:soda {:type :top-left-attached}} "View"]
- [h/fake-content]]
-
- [s/segment {:soda {:type :default}}
- [s/label {:soda {:type :bottom-left-attached}} "User View"]
- [h/fake-content]]
-
- [s/segment {:soda {:type :default}}
- [s/label {:soda {:type :bottom-right-attached}} "Admin View"]
- [h/fake-content]]])
-
-(defcard-doc
- "
-### Attached
-
-A label can attach to a content segment
-
-Notes:
-
-* Attached labels attempt to intelligently pad other content to account for their position, but may not in all cases apply this padding correctly. If this happens you may need to manually correct the padding of the other elements inside the container.
-"
- (mkdn-pprint-source attached))
-
-(defcard-rg
- [attached])
-
-
-;; Horizontal
-
-(defn horizontal []
- [:div.ui.divided.selection.list
- [:a.item
- [s/label {:soda {:type :horizontal
- :color :red}}
- "Fruit"]
- "Kumquats"]
- [:a.item
- [s/label {:soda {:type :horizontal
- :color :purple}}
- "Candy"]
- "Ice Cream"]
- ])
-
-(defcard-doc
- "
-### Horizontal
-
-A horizontal label is formatted to label content along-side it horizontally
-"
- (mkdn-pprint-source horizontal))
-
-(defcard-rg
- [horizontal])
-
-
-;; Floating
-
-(defn floating []
- [:div.ui.compact.menu
- [:a.item
- [s/icon {:soda {:icon :mail}}]
- "Messages"
- [s/label {:soda {:type :floating
- :color :red}}
- "22"]]
-
- [:a.item
- [s/icon {:soda {:icon :users}}]
- "Friends"
- [s/label {:soda {:type :floating
- :color :teal}}
- "22"]]])
-
-(defcard-doc
- "
-### Floating
-
-A label can float above another element
-"
- (mkdn-pprint-source floating))
-
-(defcard-rg
- [floating])
-
-
-
-;; ====================
-;; CONTENT
-
-(defcard-doc
-"# CONTENT")
-
-
-;; Detail
-
-(defn detail []
- [s/label {:soda {:type :default}}
- "Dogs"
- [:div.detail "214"]])
-
-(defcard-doc
- "
-### Detail
-
-A label can contain a detail
-"
- (mkdn-pprint-source detail))
-
-(defcard-rg
- [detail])
-
-
-;; Icon
-
-(defn icon []
- [:div
- [s/label {:soda {:tag :a}}
- [s/icon {:soda {:icon :mail}}]
- "Mail"]
-
- [s/label {:soda {:tag :a}}
- "Tag"
- [s/icon {:soda {:icon :delete}}]]])
-
-(defcard-doc
- "
-### Icon
-
-A label can contain a icon
-"
- (mkdn-pprint-source icon))
-
-(defcard-rg
- [icon])
-
-
-;; Image
-
-(defn content-image []
- [:div
- [s/label {:soda {:tag :a}}
- [s/image {:soda {:spaced :right
- :avatar? true}
- :src "images/avatar/small/elliot.jpg"}]
- "Elliot"]
-
- [s/label {:soda {:tag :a}}
- [:img {:src "images/avatar/small/stevie.jpg"}]
- "Stevie"]])
-
-(defcard-doc
- "
-### Image
-
-A label can include an image
-"
- (mkdn-pprint-source content-image))
-
-(defcard-rg
- [content-image])
-
-
-;; Link
-
-(defn content-link []
- [s/label {:soda {:tag :a}}
- [s/icon {:soda {:icon :mail}}]
- "23"])
-
-(defcard-doc
- "
-### Link
-
-A label can be a link or contain an item that links
-"
- (mkdn-pprint-source content-link))
-
-(defcard-rg
- [content-link])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
- "# VARIATIONS")
-
-(def colors
- [:red :orange :yellow :olive
- :green :teal :blue :violet
- :purple :pink :brown :grey
- :black])
-
-
-;; Circular
-
-(defn circle [color]
- [s/label {:soda {:tag :a
- :circular? true
- :color color}}
- "2"])
-
-(defn circular []
- [:div
- (for [color colors]
- ^{:key color}
- [circle color])])
-
-(defcard-doc
- "
-### Circular
-
-A label can be circular
-"
- (mkdn-pprint-source circular))
-
-(defcard-rg
- [circular])
-
-
-;; Circular-Empty
-
-(defn circle-empty [color]
- [s/label {:soda {:tag :a
- :circular? true
- :color color
- :empty? true}}])
-
-(defn circular-empty []
- [:div
- (for [color colors]
- ^{:key color}
- [circle-empty color])])
-
-(defcard-doc
- (mkdn-pprint-source circular-empty))
-
-(defcard-rg
- [circular-empty])
-
-
-;; Basic
-
-(defn basic []
- [:div
- [s/label {:soda {:tag :a
- :basic? true}}
- "Basic"]
-
- [s/label {:soda {:tag :a
- :type :pointing
- :basic? true
- :color :blue}}
- "Pointing"]
-
- [s/label {:soda {:type :image
- :basic? true}}
- [s/image {:src "images/avatar/small/elliot.jpg"}]
- "Elliot"]])
-
-(defcard-doc
- "
-### Basic
-
-A label can reduce its complexity
-"
- (mkdn-pprint-source basic))
-
-(defcard-rg
- [basic])
-
-
-;; Colored
-
-(defn colored []
- [:div
- [s/label {:soda {:tag :a
- :color :red}}
- "Red"]
- [s/label {:soda {:tag :a
- :color :orange}}
- "Orange"]
- [s/label {:soda {:tag :a
- :color :yellow}}
- "Yellow"]
- [s/label {:soda {:tag :a
- :color :olive}}
- "Olive"]
- [s/label {:soda {:tag :a
- :color :green}}
- "Green"]
- [s/label {:soda {:tag :a
- :color :teal}}
- "Teal"]
- [s/label {:soda {:tag :a
- :color :blue}}
- "Blue"]
- [s/label {:soda {:tag :a
- :color :violet}}
- "Violet"]
- [s/label {:soda {:tag :a
- :color :purple}}
- "Purple"]
- [s/label {:soda {:tag :a
- :color :pink}}
- "Pink"]
- [s/label {:soda {:tag :a
- :color :brown}}
- "Brown"]
- [s/label {:soda {:tag :a
- :color :grey}}
- "Grey"]
- [s/label {:soda {:tag :a
- :color :black}}
- "Black"]])
-
-(defcard-doc
- "
-### Colored
-
-A label can have different colors
-"
- (mkdn-pprint-source colored))
-
-(defcard-rg
- [colored])
-
-
-
-;; Size
-
-(defn size []
- [:div
- [s/label {:soda {:size :mini}}
- "Mini"]
- [s/label {:soda {:size :tiny}}
- "Tiny"]
- [s/label {:soda {:size :small}}
- "Small"]
- [s/label {:soda {:type :default}}
- "Medium"]
- [s/label {:soda {:size :large}}
- "Large"]
- [s/label {:soda {:size :big}}
- "Big"]
- [s/label {:soda {:size :huge}}
- "Huge"]
- [s/label {:soda {:size :massive}}
- "Massive"]
- ])
-
-(defcard-doc
- "
-### Size
-
-A label can have different sizes
-"
- (mkdn-pprint-source size))
-
-(defcard-rg
- [size])
-
-
-
-;; ====================
-;; GROUPS
-
-(defcard-doc
-"# GROUPS")
-
-
-;; Group-Size
-
-(defn group-size []
- [s/labels {:soda {:size :huge}}
- [s/label {} "Fun"]
- [s/label {} "Happy"]
- [s/label {} "Smart"]
- [s/label {} "Witty"]])
-
-(defcard-doc
- "
-### Group Size
-
-Labels can share sizes together
-"
- (mkdn-pprint-source group-size))
-
-(defcard-rg
- [group-size])
-
-
-;; Colored-Group
-
-(defn colored-group []
- [s/labels {:soda {:color :blue}}
- [s/label {} "Fun"]
- [s/label {} "Happy"]
- [s/label {} "Smart"]
- [s/label {} "Witty"]])
-
-(defcard-doc
- "
-### Colored Group
-
-Labels can share colors together
-"
- (mkdn-pprint-source colored-group))
-
-(defcard-rg
- [colored-group])
-
-
-;; Tag-Group
-
-(defn tag-group []
- [s/labels {:soda {:type :tag}}
- [s/label {} "Fun"]
- [s/label {} "Happy"]
- [s/label {} "Smart"]
- [s/label {} "Witty"]])
-
-(defcard-doc
- "
-### Tag Group
-
-Labels can share tag formatting
-"
- (mkdn-pprint-source tag-group))
-
-(defcard-rg
- [tag-group])
-
-
-;; Circular-Group
-
-(defn circular-group []
- [s/labels {:soda {:circular? true}}
- [s/label {} "Fun"]
- [s/label {} "Happy"]
- [s/label {} "Smart"]
- [s/label {} "Witty"]])
-
-(defcard-doc
- "
-### Circular Group
-
-Labels can share shapes
-"
- (mkdn-pprint-source circular-group))
-
-(defcard-rg
- [circular-group])
diff --git a/src/devcards/soda_ash/elements/list_card.cljs b/src/devcards/soda_ash/elements/list_card.cljs
deleted file mode 100644
index a62dec5..0000000
--- a/src/devcards/soda_ash/elements/list_card.cljs
+++ /dev/null
@@ -1,911 +0,0 @@
-(ns soda-ash.elements.list-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# list
-
-* **base class** ui list
-* **default tag** :div
-* **:type** :bulleted | :bulleted-link | :link | :ordered | :ordered-link
-* **variations**
- :aligned | :animated? | :celled? | :divided? | :horizontal? |
- :inverted? | :right-floated? | :relaxed | :selection? | :size
-
-where
-
-* **:aligned** :top | :middle | :bottom
-* **:relaxed** :default | :very
-* **:size** :default | :mini | :tiny | :small | :large | :big | :huge | :massive
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
- "# TYPES")
-
-
-;; List
-
-(defn s-list []
- [s/s-list {}
- [:div.item "Apples"]
- [:div.item "Pears"]
- [:div.item "Oranges"]])
-
-(defcard-doc
- "
-### List
-
-A list groups related content
-"
- (mkdn-pprint-source s-list))
-
-(defcard-rg
- [s-list])
-
-
-
-;; List2
-
-(defn s-list2 []
- [s/s-list {}
- [:div.item
- [s/icon {:soda {:icon :users}}]
- [:div.content "Semantic UI"]]
-
- [:div.item
- [s/icon {:soda {:icon :marker}}]
- [:div.content "New York, NY"]]
-
- [:div.item
- [s/icon {:soda {:icon :mail}}]
- [:div.content
- [:a {:href "mailto:jack@semantic-ui.com"}
- "jack@semantic-ui.com"]]]
-
- [:div.item
- [s/icon {:soda {:icon :linkify}}]
- [:div.content
- [:a {:href "http://www.semantic-ui.com"}
- "semantic-ui.com"]]]])
-
-(defcard-doc
- (mkdn-pprint-source s-list2))
-
-(defcard-rg
- [s-list2])
-
-
-;; Bulleted
-
-(defn s-bulleted []
- [s/s-list {:soda {:type :bulleted}}
- [:div.item "Gaining Access"]
- [:div.item "Inviting Friends"]
- [:div.item
- [:div "Benefits"]
- [:div.list ;; <-- Note: not the same as an s-list
- [:div.item "Use Anywhere"]
- [:div.item "Rebates"]
- [:div.item "Discounts"]]]
- [:div.item "Warranty"]])
-
-(defcard-doc
-"
-### Bulleted
-
-A list can mark items with a bullet
-"
- (mkdn-pprint-source s-bulleted))
-
-(defcard-rg
- [s-bulleted])
-
-
-;; Bulleted2
-
-(defn s-bulleted2 []
- [s/s-list {:soda {:tag :ul
- :type :bulleted}}
- [:li "Gaining Access"]
- [:li "Inviting Friends"]
- [:li "Benefits"
- [:ul
- [:li "Use Anywhere"]
- [:li "Rebates"]
- [:li "Discounts"]]]
- [:li "Warranty"]])
-
-(defcard-doc
-"
-For convenience, a simple bulleted list can also use `:ul` tag.
-"
- (mkdn-pprint-source s-bulleted2))
-
-(defcard-rg
- [s-bulleted2])
-
-
-
-;; Ordered
-
-(defn s-ordered []
- [s/s-list {:soda {:type :ordered}}
- [:div.item "Gaining Access"]
- [:div.item "Inviting Friends"]
- [:div.item
- [:div "Benefits"]
- [:div.list ;; <-- Note: not the same as an s-list
- [:div.item "Use Anywhere"]
- [:div.item "Rebates"]
- [:div.item "Discounts"]]]
- [:div.item "Warranty"]])
-
-(defcard-doc
-"
-### Ordered
-
-A list can be ordered numerically
-"
- (mkdn-pprint-source s-ordered))
-
-(defcard-rg
- [s-ordered])
-
-
-;; Ordered2
-
-(defn s-ordered2 []
- [s/s-list {:soda {:tag :ol
- :type :ordered}}
- [:li "Gaining Access"]
- [:li "Inviting Friends"]
- [:li "Benefits"
- [:ol
- [:li "Use Anywhere"]
- [:li "Rebates"]
- [:li "Discounts"]]]
- [:li "Warranty"]])
-
-(defcard-doc
-"
-An ordered list can also use the `:ol` tag
-"
- (mkdn-pprint-source s-ordered2))
-
-(defcard-rg
- [s-ordered2])
-
-
-;; Ordered3
-
-(defn s-ordered3 []
- [s/s-list {:soda {:tag :ol
- :type :ordered}}
- [:li {:value "*"} "Gaining Access"]
- [:li {:value "*"} "Inviting Friends"]
- [:li {:value "*"} "Benefits"
- [:ol
- [:li {:value "-"} "Use Anywhere"]
- [:li {:value "-"} "Rebates"]
- [:li {:value "-"} "Discounts"]]]
- [:li {:value "*"} "Warranty"]])
-
-(defcard-doc
-"
-You can also manually specify a value for an ordered list using `:data-value` on a `:div`, or `:value` on an `:li`.
-"
- (mkdn-pprint-source s-ordered3))
-
-(defcard-rg
- [s-ordered3])
-
-
-;; Link
-
-(defn s-link []
- [s/s-list {:soda {:type :link}}
- [:a.active.item "Home"]
- [:a.item "About"]
- [:a.item "Jobs"]
- [:a.item "Team"]])
-
-(defcard-doc
-"
-### Link
-
-A list can be specially formatted for navigation links
-"
- (mkdn-pprint-source s-link))
-
-(defcard-rg
- [s-link])
-
-
-
-;; ====================
-;; CONTENT
-
-(defcard-doc
- "# CONTENT")
-
-
-;; Item
-
-(defn s-item []
- [s/s-list {}
- [:div.item "1"]
- [:div.item "2"]
- [:div.item "3"]])
-
-(defcard-doc
-"
-### Item
-
-A list item can contain a set of items
-"
- (mkdn-pprint-source s-item))
-
-(defcard-rg
- [s-item])
-
-
-;; Icon
-
-(defn s-icon []
- [s/s-list {}
- [:a.item
- [s/icon {:soda {:icon :help}}]
- [:div.content
- [:div.header "Floated Icon"]
- [:div.description
- "This text will always have a left margin to make sure it sits
- alongside your icon"]]]
-
- [:a.item
- [s/icon {:soda {:icon :right-triangle}}]
- [:div.content
- [:div.header "Icon Alignment"]
- [:div.description
- "Floated icons are by default top aligned. To have an icon top
- aligned try this example."]]]])
-
-(defcard-doc
-"
-### Icon
-
-A list item can contain an icon
-"
- (mkdn-pprint-source s-icon))
-
-(defcard-rg
- [s-icon])
-
-
-;; Image
-
-(defn s-image []
- [s/s-list {}
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar2/small/rachel.png"}]
- [:div.content
- [s/header {} "Rachel"]
- [:div.description
- "Last seen watching "
- [:a [:b "Arrested Development"]]
- " just now."]]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar2/small/lindsay.png"}]
- [:div.content
- [s/header {} "Lindsay"]
- [:div.description
- "Last seen watching "
- [:a [:b "Bob's Burgers"]]
- " 10 hours ago."]]]])
-
-(defcard-doc
-"
-### Image
-
-A list item can contain an image
-"
- (mkdn-pprint-source s-image))
-
-(defcard-rg
- [s-image])
-
-
-;; Link-content
-
-(defn s-link-content []
- [s/s-list {}
- [:a.item "What is a FAQ?"]
- [:a.item "Who is our user?"]
- [:a.item "Where is our office located?"]])
-
-(defcard-doc
-"
-### Link
-
-A list can contain links
-"
- (mkdn-pprint-source s-link-content))
-
-(defcard-rg
- [s-link-content])
-
-
-;; Link-content2
-
-(defn s-link-content2 []
- [s/s-list {}
- [:div.item
- [:a.header "Header"]
- [:div.description
- "Click a link in our "
- [:a "description"]]]
-
- [:div.item
- [:a.header "Learn More"]
- [:div.description
- "Learn more about this site on "
- [:a "our FAQ page."]]]])
-
-(defcard-doc
- (mkdn-pprint-source s-link-content2))
-
-(defcard-rg
- [s-link-content2])
-
-
-;; header
-
-(defn s-header []
- [s/s-list {}
- [:div.item
- [:div.header "New York City"]
- "A lovely city"]
-
- [:div.item
- [:div.header "Chicago"]
- "Also quite a lovely city"]
-
- [:div.item
- [:div.header "Los Angeles"]
- "Sometimes can be a lovely city"]
- ])
-
-(defcard-doc
-"
-### Header
-
-A list item can contain a header
-"
- (mkdn-pprint-source s-header))
-
-(defcard-rg
- [s-header])
-
-
-;; description
-
-(defn s-description []
- [s/s-list {}
- [:div.item
- [s/icon {:soda {:icon :marker}}]
- [:div.content
- [:a.header "Krowlewski Jadlo"]
- [:div.description
- "Ad excellent polish restaurant, quick delivery and heart,
- filling mieals."]]]
-
- [:div.item
- [s/icon {:soda {:icon :marker}}]
- [:div.content
- [:a.header "Xian Famous Foods"]
- [:div.description
- "A taste of Shaanxi's delicious culinary traditions, with
- delights like spicy cold noodles and lamb burgers."]]]])
-
-(defcard-doc
-"
-### Description
-
-A list item can contain a description
-"
- (mkdn-pprint-source s-description))
-
-(defcard-rg
- [s-description])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
- "# VARIATIONS")
-
-
-;; Horizontal
-
-(defn s-horizontal []
- [s/s-list {:soda {:horizontal? true}}
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/tom.jpg"}]
- [:div.content
- [:div.header "Tom"]
- "Top Contributor"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/christian.jpg"}]
- [:div.content
- [:div.header "Christian Rocha"]
- "Admin"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/matt.jpg"}]
- [:div.content
- [:div.header "Matt"]
- "Top Rated User"]]])
-
-(defcard-doc
- "
-### Horizontal
-
-A list can be formatted to have items appear horizontally
-"
- (mkdn-pprint-source s-horizontal))
-
-(defcard-rg
- [s-horizontal])
-
-
-;; Ordered-Horizontal
-
-(defn s-ordered-horizontal []
- [s/s-list {:soda {:type :ordered
- :horizontal? true}}
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/tom.jpg"}]
- [:div.content
- [:div.header "Tom"]
- "Top Contributor"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/christian.jpg"}]
- [:div.content
- [:div.header "Christian Rocha"]
- "Admin"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/matt.jpg"}]
- [:div.content
- [:div.header "Matt"]
- "Top Rated User"]]])
-
-(defcard-doc
- "
-### Ordered Horizontal
-"
- (mkdn-pprint-source s-ordered-horizontal))
-
-(defcard-rg
- [s-ordered-horizontal])
-
-
-;; Inverted
-
-(defn s-inverted []
- [s/segment {:soda {:inverted? true}}
- [s/s-list {:soda {:inverted? true
- :divided? true
- :relaxed :default}}
- [:div.item
- [:div.content
- [:div.header "Snickerdoodle"]
- "An excellent companion"]]
-
- [:div.item
- [:div.content
- [:div.header "Poodle"]
- "A poodle, its pretty basic"]]
-
- [:div.item
- [:div.content
- [:div.header "Paulo"]
- "He's alsa a dog"]]]])
-
-(defcard-doc
- "
-### Inverted
-
-A list can be inverted to appear on a dark background
-"
- (mkdn-pprint-source s-inverted))
-
-(defcard-rg
- [s-inverted])
-
-
-;; Selection
-
-(defn s-selection []
- [s/s-list {:soda {:selection? true}}
- [:div.item
- [:div.content
- [:div.header "Snickerdoodle"]
- "An excellent companion"]]
-
- [:div.item
- [:div.content
- [:div.header "Poodle"]
- "A poodle, its pretty basic"]]
-
- [:div.item
- [:div.content
- [:div.header "Paulo"]
- "He's alsa a dog"]]])
-
-(defcard-doc
- "
-### Selection
-
-A selection list formats list items as possible choices
-"
- (mkdn-pprint-source s-selection))
-
-(defcard-rg
- [s-selection])
-
-
-;; Animated
-
-(defn s-animated []
- [s/s-list {:soda {:animated? true}}
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/tom.jpg"}]
- [:div.content
- [:div.header "Tom"]
- "Top Contributor"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/christian.jpg"}]
- [:div.content
- [:div.header "Christian Rocha"]
- "Admin"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/matt.jpg"}]
- [:div.content
- [:div.header "Matt"]
- "Top Rated User"]]])
-
-(defcard-doc
- "
-### Animated
-
-A list can animate to set the current item apart from the list
-
-Notes:
-
-* Be sure content can fit on one line when using the animated variation, otherwise text content will reflow when hovered.
-"
- (mkdn-pprint-source s-animated))
-
-(defcard-rg
- [s-animated])
-
-
-;; Relaxed
-
-(defn s-relaxed []
- [s/s-list {:soda {:relaxed :default}}
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/tom.jpg"}]
- [:div.content
- [:div.header "Tom"]
- "Top Contributor"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/christian.jpg"}]
- [:div.content
- [:div.header "Christian Rocha"]
- "Admin"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/matt.jpg"}]
- [:div.content
- [:div.header "Matt"]
- "Top Rated User"]]])
-
-(defcard-doc
- "
-### Relaxed
-
-A list can relax its padding to provide more negative space
-
-Notes:
-
-* Be sure content can fit on one line when using the relaxed variation, otherwise text content will reflow when hovered.
-"
- (mkdn-pprint-source s-relaxed))
-
-(defcard-rg
- [s-relaxed])
-
-
-;; Very-Relaxed
-
-(defn s-very-relaxed []
- [s/s-list {:soda {:relaxed :very}}
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/tom.jpg"}]
- [:div.content
- [:div.header "Tom"]
- "Top Contributor"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/christian.jpg"}]
- [:div.content
- [:div.header "Christian Rocha"]
- "Admin"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/matt.jpg"}]
- [:div.content
- [:div.header "Matt"]
- "Top Rated User"]]])
-
-(defcard-doc
- "
-### Very Relaxed
-"
- (mkdn-pprint-source s-very-relaxed))
-
-(defcard-rg
- [s-very-relaxed])
-
-
-;; Divided
-
-(defn s-divided []
- [s/s-list {:soda {:divided? true}}
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/tom.jpg"}]
- [:div.content
- [:div.header "Tom"]
- "Top Contributor"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/christian.jpg"}]
- [:div.content
- [:div.header "Christian Rocha"]
- "Admin"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/avatar/small/matt.jpg"}]
- [:div.content
- [:div.header "Matt"]
- "Top Rated User"]]])
-
-(defcard-doc
- "
-### Divided
-
-A list can show divisions between content
-"
- (mkdn-pprint-source s-divided))
-
-(defcard-rg
- [s-divided])
-
-
-;; Celled
-
-(defn s-celled []
- [s/s-list {:soda {:horizontal? true
- :celled? true}}
- [:div.item "About Us"]
- [:div.item "Contact"]
- [:div.item "Support"]])
-
-(defcard-doc
- "
-### Celled
-
-A list can divide its items into cells
-"
- (mkdn-pprint-source s-celled))
-
-(defcard-rg
- [s-celled])
-
-
-;; Size
-
-(defn s-size []
- [:div
- [s/s-list {:soda {:horizontal? true
- :size :mini}}
- [:div.item "About Us"]
- [:div.item "Contact"]
- [:div.item "Support"]]
-
- [s/divider {}]
-
- [s/s-list {:soda {:horizontal? true
- :size :tiny}}
- [:div.item "About Us"]
- [:div.item "Contact"]
- [:div.item "Support"]]
-
- [s/divider {}]
-
- [s/s-list {:soda {:horizontal? true
- :size :small}}
- [:div.item "About Us"]
- [:div.item "Contact"]
- [:div.item "Support"]]
-
- [s/divider {}]
-
- [s/s-list {:soda {:horizontal? true
- :size :default}}
- [:div.item "About Us"]
- [:div.item "Contact"]
- [:div.item "Support"]]
-
- [s/divider {}]
-
- [s/s-list {:soda {:horizontal? true
- :size :large}}
- [:div.item "About Us"]
- [:div.item "Contact"]
- [:div.item "Support"]]
-
- [s/divider {}]
-
- [s/s-list {:soda {:horizontal? true
- :size :big}}
- [:div.item "About Us"]
- [:div.item "Contact"]
- [:div.item "Support"]]
-
- [s/divider {}]
-
- [s/s-list {:soda {:horizontal? true
- :size :huge}}
- [:div.item "About Us"]
- [:div.item "Contact"]
- [:div.item "Support"]]
-
- [s/divider {}]
-
- [s/s-list {:soda {:horizontal? true
- :size :massive}}
- [:div.item "About Us"]
- [:div.item "Contact"]
- [:div.item "Support"]]])
-
-(defcard-doc
- "
-### Size
-
-A list can vary in size
-"
- (mkdn-pprint-source s-size))
-
-(defcard-rg
- [s-size])
-
-
-
-;; ====================
-;; CONTENT VARIATIONS
-
-(defcard-doc
- "# CONTENT VARIATIONS")
-
-
-;; Aligned
-
-(defn s-aligned []
- [s/s-list {:soda {:horizontal? true}}
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/wireframe/square-image.png"}]
- [:div.top.aligned.content
- "Top Aligned"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/wireframe/square-image.png"}]
- [:div.middle.aligned.content
- "Middle Aligned"]]
-
- [:div.item
- [s/image {:soda {:avatar? true}
- :src "images/wireframe/square-image.png"}]
- [:div.bottom.aligned.content
- "Bottom Aligned"]]])
-
-(defcard-doc
- "
-### Vertically Aligned
-
-An element inside a list can be vertically aligned
-"
- (mkdn-pprint-source s-aligned))
-
-(defcard-rg
- [s-aligned])
-
-
-;; Floated
-
-(defn s-floated []
- [:div
- [s/s-list {:soda {:horizontal? true
- :right-floated? true}}
- [:div.disabled.item {:href "#"}]
- "© GitHub, Inc."
- [:a.item {:href "#"} "Terms"]
- [:a.item {:href "#"} "Privacy"]
- [:a.item {:href "#"} "Contact"]]
-
- [s/s-list {:soda {:horizontal? true}}
- [:a.item {:href "#"} "About Us"]
- [:a.item {:href "#"} "Jobs"]]])
-
-(defcard-doc
- "
-### Floated
-
-An list, or an element inside a list can be floated left or right
-"
- (mkdn-pprint-source s-floated))
-
-(defcard-rg
- [s-floated])
diff --git a/src/devcards/soda_ash/elements/loader_card.cljs b/src/devcards/soda_ash/elements/loader_card.cljs
deleted file mode 100644
index 91bc276..0000000
--- a/src/devcards/soda_ash/elements/loader_card.cljs
+++ /dev/null
@@ -1,281 +0,0 @@
-(ns soda-ash.elements.loader-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# loader
-
-* **base class** ui loader
-* **default tag** :i
-* **:type** :default | :text
-* **variations** :centered? | :inline | :inverted? | :size | :state
-
-where
-
-* **:inline** :default | :small | :large
-* **:size** :mini | :small | :medium | :large
-* **:state** :default | :indeterminate | :active | :disabled
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
-"# TYPES")
-
-
-;; Loader
-
-(defn loader []
- [s/segment {:soda {:type :default}}
- [h/fake-content]
- [:div.ui.active.dimmer
- [s/loader {:soda {:type :default}}]]])
-
-(defcard-doc
- "
-### Loader
-
-A loader
-
-Notes:
-
-* Loaders are hidden unless active or inside an active dimmer.
-"
- (mkdn-pprint-source loader))
-
-(defcard-rg
- [loader])
-
-
-;; Text
-
-(defn text []
- [s/segment {:soda {:type :default}}
- [h/fake-content]
- [:div.ui.active.inverted.dimmer
- [s/loader {:soda {:type :text}}
- "Loading"]]])
-
-(defcard-doc
- "
-### Text Loader
-
-A loader can contain text
-"
- (mkdn-pprint-source text))
-
-(defcard-rg
- [text])
-
-
-
-;; ====================
-;; STATES
-
-(defcard-doc
- "# STATES")
-
-
-;; Indeterminate
-
-(defn indeterminate []
- [s/segment {:soda {:type :default}}
- [:div.ui.active.dimmer
- [s/loader {:soda {:type :text
- :state :indeterminate}}
- "Preparing Files"]]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Indeterminate
-
-A loader can show it's unsure of how long a task will take
-"
- (mkdn-pprint-source indeterminate))
-
-(defcard-rg
- [indeterminate])
-
-
-;; Active
-
-(defn active []
- [s/segment {:soda {:type :default}}
- [s/loader {:soda {:state :active}}]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Active
-
-A loader can be active or visible
-
-Notes:
-
-* An active dimmer may not be clearly visible without using a ui dimmer
-"
- (mkdn-pprint-source active))
-
-(defcard-rg
- [active])
-
-
-;; Disabled
-
-(defn disabled []
- [s/segment {:soda {:type :default}}
- [s/loader {:soda {:state :disabled}}]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Disabled
-
-A loader can be disabled or hidden
-
-Notes:
-
-* An disabled dimmer may not be clearly visible without using a ui dimmer
-"
- (mkdn-pprint-source disabled))
-
-(defcard-rg
- [disabled])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
-"# VARIATIONS")
-
-
-;; Inline
-
-(defn inline []
- [:div
- [s/loader {:soda {:state :active
- :inline :small}}]
- [s/loader {:soda {:state :active
- :inline :default}}]
- [s/loader {:soda {:state :active
- :inline :large}}]
-
- ;; centered
- [s/loader {:soda {:state :active
- :centered? true
- :inline :small}}]
- [s/loader {:soda {:state :active
- :centered? true
- :inline :default}}]
- [s/loader {:soda {:state :active
- :centered? true
- :inline :large}}]
- ])
-
-(defcard-doc
- "
-### Inline
-
-Loaders can appear inline with content
-"
- (mkdn-pprint-source inline))
-
-(defcard-rg
- [inline])
-
-
-
-;; Size
-
-(defn size []
- [:div
- [s/segment {:soda {:type :default}}
- [:div.ui.active.dimmer
- [s/loader {:soda {:type :text
- :size :mini}}
- "Loading"]]
- [h/fake-content]]
-
-
- [s/segment {:soda {:type :default}}
- [:div.ui.active.dimmer
- [s/loader {:soda {:type :text
- :size :small}}
- "Loading"]]
- [h/fake-content]]
-
- [s/segment {:soda {:type :default}}
- [:div.ui.active.dimmer
- [s/loader {:soda {:type :text
- :size :medium}}
- "Loading"]]
- [h/fake-content]]
-
-
- [s/segment {:soda {:type :default}}
- [:div.ui.active.dimmer
- [s/loader {:soda {:type :text
- :size :lage}}
- "Loading"]]
- [h/fake-content]]])
-
-(defcard-doc
- "
-### Size
-
-Loaders can have different sizes
-"
- (mkdn-pprint-source size))
-
-(defcard-rg
- [size])
-
-
-;; Inverted
-
-(defn inverted []
- [:div
- [s/segment {:soda {:inverted? true}}
- [s/loader {:soda {:state :active
- :inverted? true}}]
- [h/fake-content]]
-
- ;; with dimmer
- [s/segment {:soda {:type :default}}
- [:div.ui.active.inverted.dimmer
- [s/loader {:soda {:type :default}}]]
- [h/fake-content]]
- ])
-
-(defcard-doc
- "
-### Inverted
-
-Loaders can have their colors inverted.
-
-Notes:
-
-* Loaders will automatically be inverted inside inverted dimmer
-"
- (mkdn-pprint-source inverted))
-
-(defcard-rg
- [inverted])
diff --git a/src/devcards/soda_ash/elements/rail_card.cljs b/src/devcards/soda_ash/elements/rail_card.cljs
deleted file mode 100644
index 17454ea..0000000
--- a/src/devcards/soda_ash/elements/rail_card.cljs
+++ /dev/null
@@ -1,208 +0,0 @@
-(ns soda-ash.elements.rail-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# rail
-
-* **base class** ui rail
-* **default tag** :div
-* **:type** :left | :right | *INTERNAL* :left-internal | :right-internal | *DIVIDING* :left-dividing | :right-dividing
-* **variations** :attached? | :close
-
-where
-
-* **:close** :default | :very
-
-### Notes
-
-#### When to Use
-
-Rails display optional accompanying content outside of the main viewport of your website. Sites often use rails with sticky content to fix additional—often optional—content to your viewport as you scroll through the page.
-
-Semantic's default rail is 300px wide, just large enough to fit many common ad unit sizes, and just wide enough for a sub-navigation menu or a prominent call-to-action.
-
-#### Adjusting Sizes
-
-Railed content will most likely require arbitrary breakpoints that are specific to your site's content, to ensure they do not exceed the horizontal width of a user's browser.
-
-Rails are generally used beside long, single-column containers with long-form content like blog posts, articles, or user profiles. Generally your main text container width should be set between around 600-800px depending on your font size to optimize line length for readability.
-
-This set-up means most tablet browsers can only accomodate a single rail. Ultrabooks and lower resolution computers two small rails, and larger monitors, usually two full-sized rails. The specifics of this implementation is left up to you in your project.
-
-#### Regarding the Examples Below
-
-The following examples **do not** use any breakpoints, so some railed content may appear outside your browser's viewport on smaller screens.
-
----
-")
-
-
-;; Rail
-
-(defn rail []
- [s/segment {}
- [s/rail {:soda {:type :left}}
- [s/segment {}
- "Left Rail Content"]]
-
- [s/rail {:soda {:type :right}}
- [s/segment {}
- "Right Rail Content"]]
-
- [h/fake-content]])
-
-(defcard-doc
- "
-### Rail
-
-A rail can be presented on the left or right side of a container
-"
- (mkdn-pprint-source rail))
-
-(defcard-rg
- [rail])
-
-
-;; Internal Rail
-
-(defn internal-rail []
- [s/segment {}
- [s/rail {:soda {:type :left-internal}}
- [s/segment {}
- "Left Rail Content"]]
-
- [s/rail {:soda {:type :right-internal}}
- [s/segment {}
- "Right Rail Content"]]
-
- [h/fake-content]])
-
-(defcard-doc
- "
-### Internal
-
-A rail can attach itself to the inside of a container
-"
- (mkdn-pprint-source internal-rail))
-
-(defcard-rg
- [internal-rail])
-
-
-;; Dividing Rail
-
- (defn dividing-rail []
- [s/segment {}
- [s/rail {:soda {:type :left-dividing}}
- [s/segment {:soda {:type :default}}
- "Left Rail Content"]]
-
- [s/rail {:soda {:type :right-dividing}}
- [s/segment {}
- "Right Rail Content"]]
-
- [h/fake-content]])
-
-(defcard-doc
- "
-### Dividing
-
-A rail can create a division between itself and a container
-"
- (mkdn-pprint-source dividing-rail))
-
-(defcard-rg
- [dividing-rail])
-
-
-;; Attached
-
- (defn attached []
- [s/segment {}
- [s/rail {:soda {:type :left
- :attached? true}}
- [s/segment {}
- "Left Rail Content"]]
-
- [s/rail {:soda {:type :right
- :attached? true}}
- [s/segment {}
- "Right Rail Content"]]
-
- [h/fake-content]])
-
-(defcard-doc
- "
-### Attached
-
-A rail can appear attached to the main viewport
-"
- (mkdn-pprint-source attached))
-
-(defcard-rg
- [attached])
-
-
-;; Close
-
- (defn close []
- [s/segment {}
- [s/rail {:soda {:type :left
- :close :default}}
- [s/segment {}
- "Left Rail Content"]]
-
- [s/rail {:soda {:type :right
- :close :default}}
- [s/segment {}
- "Right Rail Content"]]
-
- [h/fake-content]])
-
-(defcard-doc
- "
-### Close
-
-A rail can appear closer to the main viewport
-"
- (mkdn-pprint-source close))
-
-(defcard-rg
- [close])
-
-
-;; Very-Close
-
- (defn very-close []
- [s/segment {}
- [s/rail {:soda {:type :left
- :close :very}}
- [s/segment {}
- "Left Rail Content"]]
-
- [s/rail {:soda {:type :right
- :close :very}}
- [s/segment {}
- "Right Rail Content"]]
-
- [h/fake-content]])
-
-(defcard-doc
- "
-### Very Close
-"
- (mkdn-pprint-source very-close))
-
-(defcard-rg
- [very-close])
diff --git a/src/devcards/soda_ash/elements/reveal_card.cljs b/src/devcards/soda_ash/elements/reveal_card.cljs
deleted file mode 100644
index ae818cd..0000000
--- a/src/devcards/soda_ash/elements/reveal_card.cljs
+++ /dev/null
@@ -1,318 +0,0 @@
-(ns soda-ash.elements.reveal-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# reveal
-
-* **base class** ui reveal
-* **default tag** :div
-* **:type**
- *FADE* :fade |
- *MOVE* :move | :move-right | :move-up | :move-down |
- *ROTATE* :rotate | :rotate-left
-* **content** visible | hidden
-* **:state** :default | :active | :disabled
-* **variations** :instant?
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
-"# TYPES")
-
-
-;; Fade
-
-(defn fade []
- [s/reveal {:soda {:type :fade}}
-
- [:div.visible.content
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]]
-
- [:div.hidden.content
- [s/image {:soda {:size :small}
- :src "images/avatar/large/ade.jpg"}]]])
-
-(defcard-doc
- "
-### Fade
-
-An element can disappear to reveal content below
-"
- (mkdn-pprint-source fade))
-
-(defcard-rg
- [fade])
-
-
-;; Move
-
-(defn move []
- [s/reveal {:soda {:type :move}}
-
- [:div.visible.content
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]]
-
- [:div.hidden.content
- [s/image {:soda {:size :small}
- :src "images/avatar/large/ade.jpg"}]]])
-
-(defcard-doc
- "
-### Move
-
-An element can move in a direction to reveal content
-"
- (mkdn-pprint-source move))
-
-(defcard-rg
- [move])
-
-
-;; move right
-
-(defn move-right []
- [s/reveal {:soda {:type :move-right}}
-
- [:div.visible.content
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]]
-
- [:div.hidden.content
- [s/image {:soda {:size :small}
- :src "images/avatar/large/ade.jpg"}]]])
-
-(defcard-doc
- (mkdn-pprint-source move-right))
-
-(defcard-rg
- [move-right])
-
-
-;; move up
-
-(defn move-up []
- [s/reveal {:soda {:type :move-up}}
-
- [:div.visible.content
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]]
-
- [:div.hidden.content
- [s/image {:soda {:size :small}
- :src "images/avatar/large/ade.jpg"}]]])
-
-(defcard-doc
- (mkdn-pprint-source move-up))
-
-(defcard-rg
- [move-up])
-
-
-;; move down
-
-(defn move-down []
- [s/reveal {:soda {:type :move-down}}
-
- [:div.visible.content
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]]
-
- [:div.hidden.content
- [s/image {:soda {:size :small}
- :src "images/avatar/large/ade.jpg"}]]])
-
-(defcard-doc
- (mkdn-pprint-source move-down))
-
-(defcard-rg
- [move-down])
-
-
-(defcard-doc
- "
-### Rotate
-
-An element can rotate to reveal content below
-
-**Soda-ash does not support rotate at this time :(**
-")
-
-
-
-;; ====================
-;; CONTENT
-
-(defcard-doc
-"# CONTENT")
-
-
-;; Visible
-
-(defn visible []
- [s/reveal {:soda {:type :fade}}
-
- [:div.visible.content
- [s/image {:soda {:size :small}
- :src "images/avatar/large/ade.jpg"}]]
-
- [:div.hidden.content
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]]])
-
-(defcard-doc
- "
-### Visible
-
-A reveal may contain content that is visible before interaction
-
-Notes:
-
-* Visible and hidden content should be the same aspect ratio
-"
- (mkdn-pprint-source visible))
-
-(defcard-rg
- [visible])
-
-
-;; Hidden
-
-(defn hidden []
- [s/reveal {:soda {:type :fade}}
-
- [:div.hidden.content
- [s/image {:soda {:size :small}
- :src "images/avatar/large/ade.jpg"}]]
-
- [:div.visible.content
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]]])
-
-(defcard-doc
- "
-### Hidden
-
-A reveal may contain content that is hidden before user interaction
-"
- (mkdn-pprint-source hidden))
-
-(defcard-rg
- [hidden])
-
-
-
-;; ====================
-;; STATES
-
-(defcard-doc
-"# STATES")
-
-
-;; Active
-
-(defn active []
- [s/reveal {:soda {:type :move
- :state :active}}
-
- [:div.hidden.content ;; <-- active overrides this and makes visible
- [s/image {:soda {:size :small}
- :src "images/avatar/large/nan.jpg"}]]
-
- [:div.visible.content
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]]])
-
-(defcard-doc
- "
-### Active
-
-An active reveal displays its hidden content
-
-Notes:
-
-* Adding the class active can allow you to show the hidden contents programatically
-"
- (mkdn-pprint-source active))
-
-(defcard-rg
- [active])
-
-
-;; Disabled
-
-(defn disabled []
- [s/reveal {:soda {:type :move
- :state :disabled ;; <-- this disables the move reveal
- }}
-
- [:div.disabled.content
- [s/image {:soda {:size :small}
- :src "images/avatar/large/nan.jpg"}]]
-
- [:div.hidden.content
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]]])
-
-(defcard-doc
- "
-### Disabled
-
-A disabled reveal will not animate when hovered
-"
- (mkdn-pprint-source disabled))
-
-(defcard-rg
- [disabled])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
-"# VARIATIONS")
-
-
-;; Instant
-
-(defn instant []
- [s/reveal {:soda {:type :move
- :instant? true}}
-
- [:div.hidden.content
- [s/image {:soda {:size :small}
- :src "images/avatar/large/nan.jpg"}]]
-
- [:div.visible.content
- [s/image {:soda {:size :small}
- :src "images/wireframe/square-image.png"}]]])
-
-(defcard-doc
- "
-### Instant
-
-An element can show its content without delay
-"
- (mkdn-pprint-source instant))
-
-(defcard-rg
- [instant])
diff --git a/src/devcards/soda_ash/elements/segment_card.cljs b/src/devcards/soda_ash/elements/segment_card.cljs
deleted file mode 100644
index d8c722e..0000000
--- a/src/devcards/soda_ash/elements/segment_card.cljs
+++ /dev/null
@@ -1,711 +0,0 @@
-(ns soda-ash.elements.segment-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# segment
-
-* **base class** ui segment
-* **default tag** :div
-* **:type**
- :default |
- *RAISED*
- :raised |
- *STACKED*
- :stacked |
- :tall-stacked |
- *PILED*
- :piled |
- *VERTICAL*
- :vertical
-* **:state** :disabled | :loading
-* **variations**
- :aligned | :attached | :basic? |
- :circular? | :clearing? | :color | :compact? |
- :horizontal? (inside segments) | :empasis | :floated | :inverted? | padded
-
-where
-
-* **:aligned** :left | :right | :center
-* **:attached** :default | :top | :bottom
-* **:color**
- :red | :orange | :yellow | :olive |
- :green | :teal | :blue | :violet |
- :purple | :pink | :brown | :grey |
- :black
-* **:emphasis** :secondary | :tertiary
-* **floated** :left | :right
-* **:padded** :defanult | :very
-
-# segments
-
-* **base class** ui segments
-* **default tag** :div
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
-"# TYPES")
-
-
-;; Segment
-
-(defn segment []
- [s/segment {:soda {:type :default}}
- [h/fake-content]])
-
-(defcard-doc
- "
-### Segment
-
-A segment of content
-"
- (mkdn-pprint-source segment))
-
-(defcard-rg
- [segment])
-
-
-;; Raised
-
-(defn raised []
- [s/segment {:soda {:type :raised}}
- [h/fake-content]])
-
-(defcard-doc
- "
-### Raised
-
-A segment may be formatted to raise above the page.
-"
- (mkdn-pprint-source raised))
-
-(defcard-rg
- [raised])
-
-
-;; Stacked
-
-(defn stacked []
- [s/segment {:soda {:type :stacked}}
- [h/fake-content]])
-
-(defcard-doc
- "
-### Stacked
-
-A segment can be formatted to show it contains multiple pages
-"
- (mkdn-pprint-source stacked))
-
-(defcard-rg
- [stacked])
-
-
-;; Tall-Stacked
-
-(defn tall-stacked []
- [s/segment {:soda {:type :tall-stacked}}
- [h/fake-content]])
-
-(defcard-doc
- (mkdn-pprint-source tall-stacked))
-
-(defcard-rg
- [tall-stacked])
-
-
-;; Piled
-
-(defn piled []
- [s/segment {:soda {:type :piled}}
- [s/header {:soda {:tag :h4}}
- "A header"]
- [h/fake-content]])
-
-(defcard-doc
- "
-### Piled
-
-A segment can be formatted to look like a pile of pages
-
-Notes:
-
-* Piled segments use negative z-index to format the additional pages below the segment. In order for them to appear correctly, your segment's offset container must have a z-index declared.
-"
- (mkdn-pprint-source piled))
-
-(defcard-rg
- [piled])
-
-
-;; Vertical
-
-(defn vertical []
- [:div
- [s/segment {:soda {:type :vertical}}
- [h/fake-content]]
- [s/segment {:soda {:type :vertical}}
- [h/fake-content]]
- [s/segment {:soda {:type :vertical}}
- [h/fake-content]]
- ])
-
-(defcard-doc
- "
-### Vertical Segment
-
-A vertical segment formats content to be aligned as part of a vertical group
-"
- (mkdn-pprint-source vertical))
-
-(defcard-rg
- [vertical])
-
-
-
-;; ====================
-;; GROUPS
-
-(defcard-doc
-"# GROUPS")
-
-
-;; Segments
-
-(defn segments []
- [s/segments {}
- [s/segment {} [:p "Top"]]
- [s/segment {} [:p "Middle"]]
- [s/segment {} [:p "Middle"]]
- [s/segment {} [:p "Bottom"]]])
-
-(defcard-doc
- "
-### Segments
-
-A group of segments can be nested in another group of segments
-"
- (mkdn-pprint-source segments))
-
-(defcard-rg
- [segments])
-
-
-;; Nested-Segments
-
-(defn nested-segments []
- [s/segments {}
- [s/segment {} [:p "Top"]]
- [s/segments {}
- [s/segment {} [:p "Nested Top"]]
- [s/segment {} [:p "Nested Middle"]]
- [s/segment {} [:p "Nested Bottom"]]]
- [s/segment {} [:p "Bottom"]]])
-
-(defcard-doc
- "
-### Nested Segments
-
-A group of segments can be nested in another group of segments
-"
- (mkdn-pprint-source nested-segments))
-
-(defcard-rg
- [nested-segments])
-
-
-;; Horizontal-Segments
-
-(defn horizontal-segments []
- [s/segments {:soda {:horizontal? true}}
- [s/segment {} [:p "Left"]]
- [s/segment {} [:p "Middle"]]
- [s/segment {} [:p "Middle"]]
- [s/segment {} [:p "Right"]]])
-
-(defcard-doc
- "
-### Horizontal Segments
-
-A segment group can appear horizontally
-"
- (mkdn-pprint-source horizontal-segments))
-
-(defcard-rg
- [horizontal-segments])
-
-
-;; Raised-Segments
-
-(defn raised-segments []
- [s/segments {:soda {:type :raised}}
- [s/segment {} [:p "Top"]]
- [s/segment {} [:p "Middle"]]
- [s/segment {} [:p "Middle"]]
- [s/segment {} [:p "Bottom"]]])
-
-(defcard-doc
- "
-### Raised Segments
-
-A group of segments can be raised
-"
- (mkdn-pprint-source raised-segments))
-
-(defcard-rg
- [raised-segments])
-
-
-;; Stacked-Segments
-
-(defn stacked-segments []
- [s/segments {:soda {:type :stacked}}
- [s/segment {} [:p "Top"]]
- [s/segment {} [:p "Middle"]]
- [s/segment {} [:p "Middle"]]
- [s/segment {} [:p "Bottom"]]])
-
-(defcard-doc
- "
-### Stacked Segments
-
-A group of segments can be stacked
-"
- (mkdn-pprint-source stacked-segments))
-
-(defcard-rg
- [stacked-segments])
-
-
-;; Piled-Segments
-
-(defn piled-segments []
- [s/segments {:soda {:type :piled}}
- [s/segment {} [:p "Top"]]
- [s/segment {} [:p "Middle"]]
- [s/segment {} [:p "Bottom"]]])
-
-(defcard-doc
- "
-### Piled Segments
-
-A group of segments can be piled
-
-Notes:
-
-* **This isn't appearing as it is supposed to.**
-"
- (mkdn-pprint-source piled-segments))
-
-(defcard-rg
- [piled-segments])
-
-
-
-;; ====================
-;; STATES
-
-(defcard-doc
-"# STATES")
-
-
-;; Disabled
-
-(defn disabled []
- [s/segment {:soda {:state :disabled}}
- [h/fake-content]])
-
-(defcard-doc
- "
-### Disabled
-
-A segment may show its content is disabled
-"
- (mkdn-pprint-source disabled))
-
-(defcard-rg
- [disabled])
-
-
-;; Loading
-
-(defn loading []
- [s/segment {:soda {:state :loading}}
- [h/fake-content]])
-
-(defcard-doc
- "
-### Loading
-
-A segment may show its content is being loaded
-"
- (mkdn-pprint-source loading))
-
-(defcard-rg
- [loading])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
-"# VARIATIONS")
-
-
-;; Inverted
-
-(defn inverted []
- [s/segment {:soda {:inverted? true}}
- [h/fake-content]])
-
-(defcard-doc
- "
-### Inverted
-
-A segment can have its colors inverted for contrast
-"
- (mkdn-pprint-source inverted))
-
-(defcard-rg
- [inverted])
-
-
-;; Attached
-
-(defn attached []
- [:div
- [s/segment {:soda {:attached :top}}
- [h/fake-content]]
- [s/segment {:soda {:attached :default}}
- [h/fake-content]]
- [s/segment {:soda {:attached :bottom}}
- [h/fake-content]]])
-
-(defcard-doc
- "
-### Attached
-
-A segment can be attached to other content on a page
-
-Notes:
-
-* Attached segments are designed to be used with other attached variations like attached header or attached messages.
-"
- (mkdn-pprint-source attached))
-
-(defcard-rg
- [attached])
-
-
-;; Padded
-
-(defn padded []
- [:div
- [s/segment {:soda {:type :default}}
- [h/fake-content]]
- [s/segment {:soda {:padded :default}}
- [h/fake-content]]
- [s/segment {:soda {:padded :very}}
- [h/fake-content]]])
-
-(defcard-doc
- "
-### Padded
-
-A segment can increase its padding
-"
- (mkdn-pprint-source padded))
-
-(defcard-rg
- [padded])
-
-
-;; Compact
-
-(defn compact []
- [s/segment {:soda {:compact? true}}
- "foo bar baz"])
-
-(defcard-doc
- "
-### Compact
-
-A segment may take up only as much space as is necessary
-"
- (mkdn-pprint-source compact))
-
-(defcard-rg
- [compact])
-
-
-;; Colored
-
-(defn colored []
- [:div
- [s/segment {:soda {:color :red}}
- "foo bar baz"]
- [s/segment {:soda {:color :orange}}
- "foo bar baz"]
- [s/segment {:soda {:color :yellow}}
- "foo bar baz"]
- [s/segment {:soda {:color :olive}}
- "foo bar baz"]
- [s/segment {:soda {:color :green}}
- "foo bar baz"]
- [s/segment {:soda {:color :teal}}
- "foo bar baz"]
- [s/segment {:soda {:color :blue}}
- "foo bar baz"]
- [s/segment {:soda {:color :violet}}
- "foo bar baz"]
- [s/segment {:soda {:color :purple}}
- "foo bar baz"]
- [s/segment {:soda {:color :pink}}
- "foo bar baz"]
- [s/segment {:soda {:color :brown}}
- "foo bar baz"]
- [s/segment {:soda {:color :grey}}
- "foo bar baz"]
- [s/segment {:soda {:color :black}}
- "foo bar baz"]])
-
-(defcard-doc
- "
-### Colored
-
-A segment can be colored
-"
- (mkdn-pprint-source colored))
-
-(defcard-rg
- [colored])
-
-
-;; Inverted-Color
-
-(defn inverted-color []
- [:div
- [s/segment {:soda {:color :red
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :orange
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :yellow
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :olive
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :green
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :teal
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :blue
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :violet
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :purple
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :pink
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :brown
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :grey
- :inverted? true}}
- "foo bar baz"]
- [s/segment {:soda {:color :black
- :inverted? true}}
- "foo bar baz"]])
-
-(defcard-doc
- "
-These colors can be inverted
-"
- (mkdn-pprint-source inverted-color))
-
-(defcard-rg
- [inverted-color])
-
-
-;; Emphasis
-
-(defn emphasis []
- [:div
- [s/segment {:soda {:type :default}}
- [h/fake-content]]
- [s/segment {:soda {:emphasis :secondary}}
- [h/fake-content]]
- [s/segment {:soda {:emphasis :tertiary}}
- [h/fake-content]]
-
- ;; inverted
- [s/segment {:soda {:inverted? true}}
- [h/fake-content]]
- [s/segment {:soda {:emphasis :secondary
- :inverted? true}}
- [h/fake-content]]
- [s/segment {:soda {:emphasis :tertiary
- :inverted? true}}
- [h/fake-content]]
-
- ;; inverted & color
- [s/segment {:soda {:inverted? true
- :color :red}}
- [h/fake-content]]
- [s/segment {:soda {:emphasis :secondary
- :inverted? true
- :color :red}}
- [h/fake-content]]
- [s/segment {:soda {:emphasis :tertiary
- :inverted? true
- :color :red}}
- [h/fake-content]]])
-
-(defcard-doc
- "
-### Emphasis
-
-A segment can be formatted to appear more or less noticeable
-"
- (mkdn-pprint-source emphasis))
-
-(defcard-rg
- [emphasis])
-
-
-;; Circular
-
-(defn circular []
- [:div
- [s/segment {:soda {:circular? true}}
- [s/header {:soda {:tag :h2}}
- "Buy Now"
- [:div.sub.header "$10.99"]]]
-
- [s/segment {:soda {:circular? true
- :inverted? true}}
- [s/header {:soda {:tag :h2
- :inverted? true}}
- "Buy Now"
- [:div.sub.header "$10.99"]]]
- ])
-
-(defcard-doc
- "
-### Circular
-
-A segment can be circular
-"
- (mkdn-pprint-source circular))
-
-(defcard-rg
- [circular])
-
-
-;; Clearing
-
-(defn clearing []
- [s/segment {:soda {:clearing? true}}
- [:div.ui.right.floated.button "Floated"]])
-
-(defcard-doc
- "
-### Clearing
-
-A segment can clear floated content
-"
- (mkdn-pprint-source clearing))
-
-(defcard-rg
- [clearing])
-
-
-;; Floated
-
-(defn floated []
- [:div
- [s/segment {:soda {:floated :right}}
- [:p "This segment will appear to the right"]]
-
- [s/segment {:soda {:floated :left}}
- [:p "This segment will appear to the left"]]
-
- [h/fake-content]])
-
-(defcard-doc
- "
-### Floated
-
-A segment can appear to the left or right of other content
-"
- (mkdn-pprint-source floated))
-
-(defcard-rg
- [floated])
-
-
-;; Aligned
-
-(defn aligned []
- [:div
- [s/segment {:soda {:aligned :right}}
- "Right"]
- [s/segment {:soda {:aligned :left}}
- "Left"]
- [s/segment {:soda {:aligned :center}}
- "Center"]])
-
-(defcard-doc
- "
-### Aligned
-
-A segment can have its text aligned to a side
-"
- (mkdn-pprint-source aligned))
-
-(defcard-rg
- [aligned])
-
-
-;; Basic
-
-(defn basic []
- [s/segment {:soda {:basic? true}}
- [h/fake-content]])
-
-(defcard-doc
- "
-### Basic
-
-A basic segment has no special formatting
-"
- (mkdn-pprint-source basic))
-
-(defcard-rg
- [basic])
diff --git a/src/devcards/soda_ash/elements/step_card.cljs b/src/devcards/soda_ash/elements/step_card.cljs
deleted file mode 100644
index 44f8bee..0000000
--- a/src/devcards/soda_ash/elements/step_card.cljs
+++ /dev/null
@@ -1,597 +0,0 @@
-(ns soda-ash.elements.step-card
- (:require-macros [devcards.core
- :as dc
- :refer [defcard-rg defcard-doc mkdn-pprint-source]])
- (:require [reagent.core :as reagent]
- [devcards.core]
- [soda-ash.elements.card-helpers :as h]
- [soda-ash.element :as s]))
-
-
-
-(defcard-doc
-"
-[back](#!/soda_ash.an_overview_card)
-
-# step
-
-* **base class** step
-* **default tag** :div
-* **:type** :default | :link
-* **:state** :default | :active | :completed | :disabled
-* **content** description
-
-# steps
-* **base class** ui steps
-* **default tag** :div
-* **:type** :default :ordered | :vertical | :tablet-stackable
-* **variations** :attached | :divided | :fluid? | :size
-
-where
-
-* **:attached** :top | :bottom
-* **:divided** :one | :two | ...
-* **:size** :default | :small | :large
-
----
-")
-
-
-
-;; ====================
-;; TYPES
-
-(defcard-doc
- "# TYPES")
-
-
-;; Step
-
-(defn step []
- [s/steps {}
- [s/step {}
- "Shipping"]])
-
-(defcard-doc
- "
-### Step
-
-A single step
-"
- (mkdn-pprint-source step))
-
-(defcard-rg
- [step])
-
-
-
-;; ====================
-;; GROUPS
-
-(defcard-doc
- "# GROUPS")
-
-
-;; Steps
-
-(defn steps []
- [s/steps {}
-
- [s/step {}
- [s/icon {:soda {:icon :truck}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]
-
- [s/step {:soda {:state :disabled}}
- [s/icon {:soda {:icon :info}}]
- [:div.content
- [:div.title "Confirm Order"]]]])
-
-(defcard-doc
- "
-### Steps
-
-A set of steps
-
-Notes:
-
-* Responsive Element. Steps will automatically stack on mobile. To make steps automatically stack for tablet use :tablet-stackable?.
-"
- (mkdn-pprint-source steps))
-
-(defcard-rg
- [steps])
-
-
-;; Ordered
-
-(defn ordered []
- [s/steps {:soda {:type :ordered}}
-
- [s/step {:soda {:state :completed}}
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :completed}}
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]
-
- [s/step {:soda {:state :active}}
- [:div.content
- [:div.title "Confirm Order"]]]])
-
-(defcard-doc
- "
-### Ordered
-
-A step can show a ordered sequence of steps
-"
- (mkdn-pprint-source ordered))
-
-(defcard-rg
- [ordered])
-
-
-;; Vertical
-
-(defn vertical []
- [s/steps {:soda {:type :vertical}}
-
- [s/step {:soda {:state :completed}}
- [s/icon {:soda {:icon :truck}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :completed}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]
-
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :info}}]
- [:div.content
- [:div.title "Confirm Order"]]]])
-
-(defcard-doc
- "
-### Vertical
-
-A step can be displayed stacked vertically
-"
- (mkdn-pprint-source vertical))
-
-(defcard-rg
- [vertical])
-
-
-
-;; ====================
-;; CONTENT
-
-(defcard-doc
- "# CONTENT")
-
-
-;; Description
-
-(defn description []
- [s/steps {}
- [s/step {}
- [:div.title "Shipping"]
- [:div.description
- "Choose your shipping options"]]])
-
-(defcard-doc
- "
-### Description
-
-A step can contain a description
-"
- (mkdn-pprint-source description))
-
-(defcard-rg
- [description])
-
-
-;; Icon
-
-(defn icon []
- [s/steps {}
- [s/step {}
- [s/icon {:soda {:icon :truck}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description
- "Choose your shipping options"]]]])
-
-(defcard-doc
- "
-### Icon
-
-A step can contain a icon
-"
- (mkdn-pprint-source icon))
-
-(defcard-rg
- [icon])
-
-
-;; Link1
-
-(defn link1 []
- [s/steps {}
-
- [s/step {:soda {:tag :a
- :state :active}}
- [s/icon {:soda {:icon :truck}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description
- "Choose your shipping options"]]]
-
- [s/step {}
- [:div.content
- [:div.title "Billing"]
- [:div.description
- "Enter billing information"]]]])
-
-(defcard-doc
- "
-### Link
-
-A step can link
-"
- (mkdn-pprint-source link1))
-
-(defcard-rg
- [link1])
-
-
-;; Link2
-
-(defn link2 []
- [s/steps {}
-
- [s/step {:soda {:type :link}}
- [s/icon {:soda {:icon :truck}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description
- "Choose your shipping options"]]]
-
- [s/step {:soda {:type :link}}
- [:div.content
- [:div.title "Billing"]
- [:div.description
- "Enter billing information"]]]])
-
-(defcard-doc
- "
-### Link
-
-A step can link
-"
- (mkdn-pprint-source link2))
-
-(defcard-rg
- [link2])
-
-
-
-;; ====================
-;; STATES
-
-(defcard-doc
- "# STATES")
-
-
-;; Active
-
-(defn active []
- [s/steps {}
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]])
-
-(defcard-doc
- "
-### Active
-
-A step can be highlighted as active
-"
- (mkdn-pprint-source active))
-
-(defcard-rg
- [active])
-
-
-;; Completed
-
-(defn completed []
- [s/steps {}
- [s/step {:soda {:state :completed}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]])
-
-(defcard-doc
- "
-### Completed
-
-A step can show that a user has completed it
-"
- (mkdn-pprint-source completed))
-
-(defcard-rg
- [completed])
-
-
-;; Disabled
-
-(defn disabled []
- [s/steps {}
- [s/step {:soda {:state :disabled}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]])
-
-(defcard-doc
- "
-### Disabled
-
-A step can show that it cannot be selected
-"
- (mkdn-pprint-source disabled))
-
-(defcard-rg
- [disabled])
-
-
-
-;; ====================
-;; VARIATIONS
-
-(defcard-doc
- "# VARIATIONS")
-
-
-;; Stackable
-
-(defn stackable []
- [s/steps {:soda {:type :tablet-stackable}}
-
- [s/step {}
- [s/icon {:soda {:icon :plane}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]
-
- [s/step {:soda {:state :disabled}}
- [s/icon {:soda {:icon :info}}]
- [:div.content
- [:div.title "Confirm Order"]]]])
-
-(defcard-doc
- "
-### Stackable
-
-A step can stack vertically only on smaller screens
-"
- (mkdn-pprint-source stackable))
-
-(defcard-rg
- [stackable])
-
-
-;; Fluid
-
-(defn fluid []
- [:div.ui.two.column.grid
-
- [:div.column
- [s/steps {:soda {:type :vertical
- :fluid? true}}
-
- [s/step {}
- [s/icon {:soda {:icon :plane}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]]]
-
- [:div.column "The steps take up the entire column width"]])
-
-(defcard-doc
- "
-### Fluid
-
-A fluid step takes up the width of its container
-"
- (mkdn-pprint-source fluid))
-
-(defcard-rg
- [fluid])
-
-
-;; Attached
-
-(defn attached []
- [:div
- ;; top
- [s/steps {:soda {:attached :top
- :divided :three}}
-
- [s/step {}
- [s/icon {:soda {:icon :plane}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]
-
- [s/step {:soda {:state :disabled}}
- [s/icon {:soda {:icon :info}}]
- [:div.content
- [:div.title "Confirm Order"]]]]
-
- ;; body
- [h/fake-content]
-
- ;; bottom
- [s/steps {:soda {:attached :bottom
- :divided :three}}
-
- [s/step {}
- [s/icon {:soda {:icon :plane}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]
-
- [s/step {:soda {:state :disabled}}
- [s/icon {:soda {:icon :info}}]
- [:div.content
- [:div.title "Confirm Order"]]]]
- ])
-
-(defcard-doc
- "
-### Attached
-
-Steps can be attached to other elements
-"
- (mkdn-pprint-source attached))
-
-(defcard-rg
- [attached])
-
-
-;; Divided
-
-(defn divided []
- [s/steps {:soda {:divided :three}}
-
- [s/step {}
- [s/icon {:soda {:icon :plane}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]
-
- [s/step {:soda {:state :disabled}}
- [s/icon {:soda {:icon :info}}]
- [:div.content
- [:div.title "Confirm Order"]]]])
-
-(defcard-doc
- "
-### Divided
-
-A step can stack vertically only on smaller screens
-"
- (mkdn-pprint-source divided))
-
-(defcard-rg
- [divided])
-
-
-;; Size
-
-(defn size []
- [:div
-
- ;; small
- [s/steps {:soda {:size :small}}
-
- [s/step {}
- [s/icon {:soda {:icon :plane}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]]
-
- ;; default
- [s/steps {:soda {:size :default}}
-
- [s/step {}
- [s/icon {:soda {:icon :plane}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]]
-
- ;; large
- [s/steps {:soda {:size :large}}
-
- [s/step {}
- [s/icon {:soda {:icon :plane}}]
- [:div.content
- [:div.title "Shipping"]
- [:div.description "Choose your shipping options"]]]
-
- [s/step {:soda {:state :active}}
- [s/icon {:soda {:icon :payment}}]
- [:div.content
- [:div.title "Billing"]
- [:div.description "Enter billing information"]]]]])
-
-(defcard-doc
- "
-### Size
-
-Steps can have different sizes
-"
- (mkdn-pprint-source size))
-
-(defcard-rg
- [size])
diff --git a/src/main/cljs/soda_ash/element.cljs b/src/main/cljs/soda_ash/element.cljs
deleted file mode 100644
index 2b90baa..0000000
--- a/src/main/cljs/soda_ash/element.cljs
+++ /dev/null
@@ -1,60 +0,0 @@
-(ns soda-ash.element
- (:require
- [soda-ash.elements.button :as button]
- [soda-ash.elements.buttons :as buttons]
- [soda-ash.elements.container :as container]
- [soda-ash.elements.divider :as divider]
- [soda-ash.elements.flag :as flag]
- [soda-ash.elements.header :as header]
- [soda-ash.elements.icon :as icon]
- [soda-ash.elements.icons :as icons]
- [soda-ash.elements.image :as image]
- [soda-ash.elements.images :as images]
- [soda-ash.elements.input :as input]
- [soda-ash.elements.label :as label]
- [soda-ash.elements.labels :as labels]
- [soda-ash.elements.loader :as loader]
- [soda-ash.elements.rail :as rail]
- [soda-ash.elements.reveal :as reveal]
- [soda-ash.elements.segment :as segment]
- [soda-ash.elements.segments :as segments]
- [soda-ash.elements.s-list :as s-list]
- [soda-ash.elements.step :as step]
- [soda-ash.elements.steps :as steps]))
-
-
-(def button button/element)
-(def buttons buttons/element)
-
-(def container container/element)
-
-(def divider divider/element)
-
-(def flag flag/element)
-
-(def header header/element)
-
-(def icon icon/element)
-(def icons icons/element)
-
-(def image image/element)
-(def images images/element)
-
-(def input input/element)
-
-(def label label/element)
-(def labels labels/element)
-
-(def loader loader/element)
-
-(def rail rail/element)
-
-(def reveal reveal/element)
-
-(def segment segment/element)
-(def segments segments/element)
-
-(def s-list s-list/element)
-
-(def step step/element)
-(def steps steps/element)
diff --git a/src/main/cljs/soda_ash/elements/button.cljs b/src/main/cljs/soda_ash/elements/button.cljs
deleted file mode 100644
index 193ff77..0000000
--- a/src/main/cljs/soda_ash/elements/button.cljs
+++ /dev/null
@@ -1,82 +0,0 @@
-(ns soda-ash.elements.button
- (:require [soda-ash.elements.template :as t]
- [clojure.set :as set]))
-
-
-;; Meta
-
-(def e-name "button")
-
-(def default-tag :button)
-
-(def ui? true)
-
-
-;; Variations + States
-
-(def animated-types
- #{:animated
- :vertical-animated
- :animated-fade})
-
-(def basic-type
- #{:basic})
-
-(def emphasis-types
- #{:primary
- :secondary})
-
-(def icon-type
- #{:icon})
-
-(def inverted-type
- #{:inverted})
-
-(def inverted-basic-type
- #{:inverted-basic})
-
-(def labeled-types
- #{:labeled
- :left-labeled})
-
-(def labeled-icon-types
- #{:labeled-icon
- :right-labeled-icon})
-
-(def type-set
- (set/union
- animated-types
- basic-type
- emphasis-types
- icon-type
- inverted-type
- inverted-basic-type
- labeled-types
- labeled-icon-types))
-
-(def bool-set
- #{:circular? :compact? :fluid? :toggle?
- })
-
-(def mod-set
- #{:attached ;; top | bottom | left | right
- :floated ;; left | right
- })
-
-(def opt-set
- #{:color
- :consequence ;; positive | negative
- :size
- :social ;; :facebook | :twitter | :google-plus | :vk | :linkedin | :instagram | :youtube
- :state ;; default | active | disabled | loading
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set
- :mod-set mod-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/buttons.cljs b/src/main/cljs/soda_ash/elements/buttons.cljs
deleted file mode 100644
index d381122..0000000
--- a/src/main/cljs/soda_ash/elements/buttons.cljs
+++ /dev/null
@@ -1,23 +0,0 @@
-(ns soda-ash.elements.buttons
- (:require [soda-ash.elements.template :as t]
- [soda-ash.elements.button :as b]
- [clojure.set :as set]))
-
-
-;; Meta
-
-(def e-name "buttons")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set b/type-set
- :bool-set b/bool-set
- :mod-set b/mod-set
- :opt-set b/opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/container.cljs b/src/main/cljs/soda_ash/elements/container.cljs
deleted file mode 100644
index f623b84..0000000
--- a/src/main/cljs/soda_ash/elements/container.cljs
+++ /dev/null
@@ -1,38 +0,0 @@
-(ns soda-ash.elements.container
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "container")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Types
-
-(def type-set
- #{:text})
-
-
-;; Variations
-
-(def bool-set
- #{:fluid?})
-
-(def special-map
- {:aligned {:right "right aligned"
- :left "left aligned"
- :justified "justified"
- :center "center aligned"}})
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set
- :special-map special-map}))
diff --git a/src/main/cljs/soda_ash/elements/divider.cljs b/src/main/cljs/soda_ash/elements/divider.cljs
deleted file mode 100644
index ce77579..0000000
--- a/src/main/cljs/soda_ash/elements/divider.cljs
+++ /dev/null
@@ -1,31 +0,0 @@
-(ns soda-ash.elements.divider
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "divider")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Types
-
-(def type-set
- #{:vertical :horizontal})
-
-
-;; Variations
-
-(def bool-set
- #{:clearing? :fitted? :hidden? :inverted? :section?})
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set}))
diff --git a/src/main/cljs/soda_ash/elements/flag.cljs b/src/main/cljs/soda_ash/elements/flag.cljs
deleted file mode 100644
index 6f4f67b..0000000
--- a/src/main/cljs/soda_ash/elements/flag.cljs
+++ /dev/null
@@ -1,24 +0,0 @@
-(ns soda-ash.elements.flag
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "flag")
-
-(def default-tag :i)
-
-(def ui? false)
-
-
-;; Variations
-
-(def opt-set
- #{:flag})
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/header.cljs b/src/main/cljs/soda_ash/elements/header.cljs
deleted file mode 100644
index c6da4cc..0000000
--- a/src/main/cljs/soda_ash/elements/header.cljs
+++ /dev/null
@@ -1,66 +0,0 @@
-(ns soda-ash.elements.header
- (:require [soda-ash.elements.template :as t]
- [clojure.set :as set]))
-
-
-;; Meta
-
-(def e-name "header")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Types
-
-(def content-types
- #{:huge
- :large
- :medium
- :small
- :tiny})
-
-(def icon-type #{:icon})
-
-(def sub-type #{:sub})
-
-(def type-set
- (set/union content-types
- icon-type
- sub-type))
-
-
-;; Variations + States
-
-(def bool-set
- #{:block?
- :dividing?
- :inverted?})
-
-(def mod-set
- #{:attached ;; attached | top attached | bottom attached
- :floated ;; right floated | left floated
- })
-
-(def opt-set
- #{:color
- :state ;; disabled
- })
-
-(def special-map
- {:aligned {:right "right aligned"
- :left "left aligned"
- :justified "justified"
- :center "center aligned"}})
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set
- :mod-set mod-set
- :opt-set opt-set
- :special-map special-map}))
diff --git a/src/main/cljs/soda_ash/elements/helpers.cljs b/src/main/cljs/soda_ash/elements/helpers.cljs
deleted file mode 100644
index f362da5..0000000
--- a/src/main/cljs/soda_ash/elements/helpers.cljs
+++ /dev/null
@@ -1,108 +0,0 @@
-(ns soda-ash.elements.helpers
- (:require [clojure.string :as string]))
-
-
-
-;; errors
-
-
-(defn throw-error [k v e-name]
- (throw (js/Error.
- (string/join " "
- ["Soda-ash"
- k v
- "doesn't exist for"
- e-name
- "element"]))))
-
-(def throw-type-error
- (partial throw-error :type))
-
-
-
-;; class
-
-
-(defn value->class [v]
- (-> (name v)
- (string/replace #"-" " ")))
-
-(defn add-class->class [v]
- (value->class v))
-
-(defn type->class [v type-set e-name]
- (when-not (= :default v)
- (if (type-set v)
- (value->class v)
- (throw-type-error v e-name))))
-
-(defn bool->class [k v]
- (when v
- (-> (value->class k)
- (string/replace #"\?" ""))))
-
-(defn mod->class [k v]
- (let [k' (name k)
- v' (when-not (= :default v)
- (value->class v))]
- (->> [v' k']
- (remove nil?)
- (string/join " "))))
-
-(defn opt->class [v]
- (when-not (= :default v)
- (value->class v)))
-
-(defn special->class [k v special-map e-name]
- (or ((special-map k) v)
- (throw-error k v e-name)))
-
-
-(defn soda->class [e-name
- soda
- type-set
- bool-set
- mod-set
- opt-set
- special-map]
- (when (keys soda)
- (->> (for [[k v] soda]
- (cond (= :add-class k) (add-class->class v)
- (= :type k) (type->class v type-set e-name)
- (bool-set k) (bool->class k v)
- (mod-set k) (mod->class k v)
- (opt-set k) (opt->class v)
- (special-map k) (special->class k v special-map e-name)
- :else (throw-error k v e-name)))
- (remove nil?)
- (string/join " "))))
-
-
-(defn class [ui?
- soda-class
- e-name]
- (let [ui?' (when ui? "ui")]
- (->> [ui?' soda-class e-name]
- (remove nil?)
- (string/join " "))))
-
-
-
-;; sanitize
-
-
-(defn sanitize-soda [soda]
- (dissoc soda :ratom :path :tag :ui?))
-
-(defn sanitize-attrs [attrs]
- (dissoc attrs :soda))
-
-
-
-;; state
-
-
-(defn set-initial-values! [ratom path sanitized-soda]
- (when ratom
- (doseq [[k v] sanitized-soda]
- (swap! ratom assoc-in (flatten [path :soda k]) v))))
diff --git a/src/main/cljs/soda_ash/elements/icon.cljs b/src/main/cljs/soda_ash/elements/icon.cljs
deleted file mode 100644
index 8408025..0000000
--- a/src/main/cljs/soda_ash/elements/icon.cljs
+++ /dev/null
@@ -1,40 +0,0 @@
-(ns soda-ash.elements.icon
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "icon")
-
-(def default-tag :i)
-
-(def ui? false)
-
-
-;; Variations + States
-
-(def bool-set
- #{:bordered? :circular? :fitted? :inverted? :link?
- :corner? ;; for icons
- })
-
-(def mod-set
- #{:flipped ;; horizontally | vertically
- :rotated ;; clockwise | counterclockwise
- })
-
-(def opt-set
- #{:color
- :icon
- :size
- :state ;; disabled | loading
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :bool-set bool-set
- :mod-set mod-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/icons.cljs b/src/main/cljs/soda_ash/elements/icons.cljs
deleted file mode 100644
index 05f6d3e..0000000
--- a/src/main/cljs/soda_ash/elements/icons.cljs
+++ /dev/null
@@ -1,21 +0,0 @@
-(ns soda-ash.elements.icons
- (:require [soda-ash.elements.template :as t]
- [soda-ash.elements.icon :as i]))
-
-
-;; Meta
-
-(def e-name "icons")
-
-(def default-tag :i)
-
-(def ui? false)
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :bool-set i/bool-set
- :mod-set i/mod-set
- :opt-set i/opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/image.cljs b/src/main/cljs/soda_ash/elements/image.cljs
deleted file mode 100644
index a3db850..0000000
--- a/src/main/cljs/soda_ash/elements/image.cljs
+++ /dev/null
@@ -1,38 +0,0 @@
-(ns soda-ash.elements.image
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "image")
-
-(def default-tag :img)
-
-(def ui? true)
-
-
-;; Variations + States
-
-(def bool-set
- #{:avatar? :bordered? :centered?
- :circular? :fluid? :rounded?})
-
-(def mod-set
- #{:aligned ;; top | middle | bottom
- :spaced ;; default | left | right
- :floated ;; left | right
- })
-
-(def opt-set
- #{:state ;; hidden | disabled
- :size
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :bool-set bool-set
- :mod-set mod-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/images.cljs b/src/main/cljs/soda_ash/elements/images.cljs
deleted file mode 100644
index d7ae81d..0000000
--- a/src/main/cljs/soda_ash/elements/images.cljs
+++ /dev/null
@@ -1,21 +0,0 @@
-(ns soda-ash.elements.images
- (:require [soda-ash.elements.template :as t]
- [soda-ash.elements.image :as i]))
-
-
-;; Meta
-
-(def e-name "images")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :bool-set i/bool-set
- :mod-set i/mod-set
- :opt-set i/opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/input.cljs b/src/main/cljs/soda_ash/elements/input.cljs
deleted file mode 100644
index e44b28b..0000000
--- a/src/main/cljs/soda_ash/elements/input.cljs
+++ /dev/null
@@ -1,37 +0,0 @@
-(ns soda-ash.elements.input
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "input")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Variations
-
-(def bool-set
- #{:fluid? :inverted? :transparent?})
-
-(def mod-set
- #{:action ;; default | left | (right)
- :icon ;; default | left
- :labeled ;; default | right | left-corner | corner
- })
-
-(def opt-set
- #{:size
- :state ;; focus | loading | disabled | error
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :bool-set bool-set
- :mod-set mod-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/label.cljs b/src/main/cljs/soda_ash/elements/label.cljs
deleted file mode 100644
index dec258f..0000000
--- a/src/main/cljs/soda_ash/elements/label.cljs
+++ /dev/null
@@ -1,78 +0,0 @@
-(ns soda-ash.elements.label
- (:require [soda-ash.elements.template :as t]
- [clojure.set :as set]))
-
-
-;; Meta
-
-(def e-name "label")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Types
-
-(def attached-types
- #{:top-attached
- :bottom-attached
- :top-right-attached
- :top-left-attached
- :bottom-left-attached
- :bottom-right-attached})
-
-(def corner-types
- #{:left-corner
- :right-corner})
-
-(def floating-type
- #{:floating})
-
-(def horizontal-type
- #{:horizontal})
-
-(def image-type
- #{:image})
-
-(def pointing-types
- #{:pointing
- :pointing-below
- :left-pointing
- :right-pointing})
-
-(def tag-type
- #{:tag})
-
-(def ribbon-types
- #{:ribbon
- :right-ribbon})
-
-(def type-set
- (set/union attached-types
- corner-types
- horizontal-type
- floating-type
- image-type
- pointing-types
- tag-type
- ribbon-types))
-
-
-;; Variations + States
-
-(def bool-set
- #{:circular? :empty? :basic?})
-
-(def opt-set
- #{:color
- :size})
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/labels.cljs b/src/main/cljs/soda_ash/elements/labels.cljs
deleted file mode 100644
index dab7adf..0000000
--- a/src/main/cljs/soda_ash/elements/labels.cljs
+++ /dev/null
@@ -1,22 +0,0 @@
-(ns soda-ash.elements.labels
- (:require [soda-ash.elements.template :as t]
- [soda-ash.elements.label :as l]
- [clojure.set :as set]))
-
-
-;; Meta
-
-(def e-name "labels")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set l/type-set
- :bool-set l/bool-set
- :opt-set l/opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/loader.cljs b/src/main/cljs/soda_ash/elements/loader.cljs
deleted file mode 100644
index 8ae1654..0000000
--- a/src/main/cljs/soda_ash/elements/loader.cljs
+++ /dev/null
@@ -1,43 +0,0 @@
-(ns soda-ash.elements.loader
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "loader")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Types
-
-(def type-set
- #{:text})
-
-
-;; Variations
-
-(def bool-set
- #{:centered? ;; couples with inline
- :inverted?})
-
-(def mod-set
- #{:inline ;; default | small | large
- })
-
-(def opt-set
- #{:size ;; mini | small | medium | large
- :state ;; indeterminate | active | disabled
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set
- :mod-set mod-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/rail.cljs b/src/main/cljs/soda_ash/elements/rail.cljs
deleted file mode 100644
index 48e7a69..0000000
--- a/src/main/cljs/soda_ash/elements/rail.cljs
+++ /dev/null
@@ -1,42 +0,0 @@
-(ns soda-ash.elements.rail
- (:require [soda-ash.elements.template :as t]
- [clojure.set :as set]))
-
-
-;; Meta
-
-(def e-name "rail")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Types
-
-(def type-set
- #{:left
- :right
- :left-internal
- :right-internal
- :left-dividing
- :right-dividing})
-
-
-;; Variations + States
-
-(def bool-set
- #{:attached?})
-
-(def mod-set
- #{:close ;; :default | :very
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set
- :mod-set mod-set}))
diff --git a/src/main/cljs/soda_ash/elements/reveal.cljs b/src/main/cljs/soda_ash/elements/reveal.cljs
deleted file mode 100644
index de58a70..0000000
--- a/src/main/cljs/soda_ash/elements/reveal.cljs
+++ /dev/null
@@ -1,42 +0,0 @@
-(ns soda-ash.elements.reveal
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "reveal")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Types
-
-(def type-set
- #{:fade
- :move
- :move-right
- :move-up
- :move-down
- :rotate
- :rotate-left})
-
-
-;; Variations + States
-
-(def bool-set
- #{:instant?})
-
-(def opt-set
- #{:state ;; :active :disabled
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/s_list.cljs b/src/main/cljs/soda_ash/elements/s_list.cljs
deleted file mode 100644
index 5f4995d..0000000
--- a/src/main/cljs/soda_ash/elements/s_list.cljs
+++ /dev/null
@@ -1,51 +0,0 @@
-(ns soda-ash.elements.s-list
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "list")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Variations
-
-(def type-set
- #{:bulleted
- :bulleted-link
- :link
- :ordered
- :ordered-link
- })
-
-(def bool-set
- #{:animated?
- :celled?
- :divided?
- :horizontal?
- :inverted?
- :right-floated?
- :selection?
- })
-
-(def mod-set
- #{:aligned ;; top | middle | bottom
- :relaxed ;; default | very
- })
-
-(def opt-set
- #{:size ;; default | mini | tiny | small | large | big | huge | massive
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set
- :mod-set mod-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/segment.cljs b/src/main/cljs/soda_ash/elements/segment.cljs
deleted file mode 100644
index 967cae7..0000000
--- a/src/main/cljs/soda_ash/elements/segment.cljs
+++ /dev/null
@@ -1,52 +0,0 @@
-(ns soda-ash.elements.segment
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "segment")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Types
-
-(def type-set
- #{:raised
- :stacked
- :tall-stacked
- :piled
- :vertical})
-
-
-;; Variations + States
-
-(def bool-set
- #{:basic? :circular? :clearing? :compact? :inverted?
- :horizontal? ;; for segments
- })
-
-(def mod-set
- #{:aligned ;; left | right | center
- :attached ;; default | top | bottom
- :floated ;; left | right
- :padded ;; default | very
- })
-
-(def opt-set
- #{:color
- :emphasis ;; secondary | tertiary
- :state ;; disabled | loading
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set
- :mod-set mod-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/segments.cljs b/src/main/cljs/soda_ash/elements/segments.cljs
deleted file mode 100644
index e136328..0000000
--- a/src/main/cljs/soda_ash/elements/segments.cljs
+++ /dev/null
@@ -1,22 +0,0 @@
-(ns soda-ash.elements.segments
- (:require [soda-ash.elements.template :as t]
- [soda-ash.elements.segment :as s]))
-
-
-;; Meta
-
-(def e-name "segments")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set s/type-set
- :bool-set s/bool-set
- :mod-set s/mod-set
- :opt-set s/opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/step.cljs b/src/main/cljs/soda_ash/elements/step.cljs
deleted file mode 100644
index 6d9821d..0000000
--- a/src/main/cljs/soda_ash/elements/step.cljs
+++ /dev/null
@@ -1,32 +0,0 @@
-(ns soda-ash.elements.step
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "step")
-
-(def default-tag :div)
-
-(def ui? false)
-
-
-;; Types
-
-(def type-set
- #{:link})
-
-
-;; Variations + States
-
-(def opt-set
- #{:state ;; active | completed | disabled
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/steps.cljs b/src/main/cljs/soda_ash/elements/steps.cljs
deleted file mode 100644
index 5e073b5..0000000
--- a/src/main/cljs/soda_ash/elements/steps.cljs
+++ /dev/null
@@ -1,44 +0,0 @@
-(ns soda-ash.elements.steps
- (:require [soda-ash.elements.template :as t]))
-
-
-;; Meta
-
-(def e-name "steps")
-
-(def default-tag :div)
-
-(def ui? true)
-
-
-;; Types
-
-(def type-set
- #{:ordered
- :tablet-stackable
- :vertical})
-
-
-;; Variations + States
-
-(def bool-set
- #{:fluid?})
-
-(def mod-set
- #{:attached ;; top | bottom
- :divided ;; one | two | ...
- })
-
-(def opt-set
- #{:size ;; :default | small | large
- })
-
-
-(def element
- (t/element {:e-name e-name
- :default-tag default-tag
- :ui? ui?
- :type-set type-set
- :bool-set bool-set
- :mod-set mod-set
- :opt-set opt-set}))
diff --git a/src/main/cljs/soda_ash/elements/template.cljs b/src/main/cljs/soda_ash/elements/template.cljs
deleted file mode 100644
index 0d5e6b5..0000000
--- a/src/main/cljs/soda_ash/elements/template.cljs
+++ /dev/null
@@ -1,66 +0,0 @@
-(ns soda-ash.elements.template
- (:require [soda-ash.elements.helpers :as h]))
-
-
-(defn create-attrs [sanitized-attrs class]
- (merge sanitized-attrs
- {:class class}))
-
-(defn select-soda [r-soda sanitized-soda]
- (or r-soda sanitized-soda))
-
-(defn select-tag [tag default-tag]
- (or tag default-tag))
-
-
-(defn element [{:keys [e-name
- default-tag
- ui?
- type-set
- bool-set
- mod-set
- opt-set
- special-map]
- :or {ui? true
- type-set #{}
- bool-set #{}
- mod-set #{}
- opt-set #{}
- special-map {}}}]
- (fn [{:keys [soda]
- :as attrs}
- & children]
-
- (let [;; get
- tag (:tag soda)
- ratom (:ratom soda)
- path (:path soda)
- ;; sanitize
- sanitized-soda (h/sanitize-soda soda)
- sanitized-attrs (h/sanitize-attrs attrs)]
-
- (when (and ratom path)
- (h/set-initial-values! ratom path sanitized-soda))
-
- (fn [_ & children]
- (let [;; get
- m (when ratom @ratom)
- r-soda (get-in m (flatten [path :soda]))
- selected-soda (select-soda r-soda sanitized-soda)
- selected-tag (select-tag tag default-tag)
- ;; class
- soda-class (h/soda->class e-name
- selected-soda
- type-set
- bool-set
- mod-set
- opt-set
- special-map)
- class (h/class ui?
- soda-class
- e-name)
- ;; attrs
- r-attrs (create-attrs sanitized-attrs class)]
-
- (into [selected-tag r-attrs]
- children))))))
diff --git a/src/soda_ash/core.cljs b/src/soda_ash/core.cljs
new file mode 100644
index 0000000..9797290
--- /dev/null
+++ b/src/soda_ash/core.cljs
@@ -0,0 +1,9 @@
+(ns soda-ash.core
+ (:require-macros
+ [soda-ash.macros :refer [export-semantic-ui-react-components]])
+ (:require
+ [cljsjs.semantic-ui-react]
+ [reagent.core]))
+
+
+(export-semantic-ui-react-components)
diff --git a/src/soda_ash/macros.clj b/src/soda_ash/macros.clj
new file mode 100644
index 0000000..2615466
--- /dev/null
+++ b/src/soda_ash/macros.clj
@@ -0,0 +1,161 @@
+(ns soda-ash.macros)
+
+
+(def semantic-ui-react-tags
+ '[Accordion
+ AccordionContent
+ AccordionTitle
+ Breadcrumb
+ BreadcrumbDivider
+ BreadcrumbSection
+ Button
+ ButtonContent
+ ButtonGroup
+ ButtonOr
+ Card
+ CardContent
+ CardDescription
+ CardGroup
+ CardHeader
+ CardMeta
+ Checkbox
+ Comment ;; use as CommentSA
+ CommentAction
+ CommentActions
+ CommentAuthor
+ CommentAvatar
+ CommentContent
+ CommentGroup
+ CommentMetadata
+ CommentText
+ Confirm
+ Container
+ Dimmer
+ DimmerDimmable
+ Divider
+ Dropdown
+ DropdownDivider
+ DropdownHeader
+ DropdownItem
+ DropdownMenu
+ Embed
+ Feed
+ FeedContent
+ FeedDate
+ FeedEvent
+ FeedExtra
+ FeedLabel
+ FeedLike
+ FeedMeta
+ FeedSummary
+ FeedUser
+ Flag
+ Form
+ FormButton
+ FormCheckbox
+ FormDropdown
+ FormField
+ FormGroup
+ FormInput
+ FormRadio
+ FormSelect
+ FormTextArea
+ Grid
+ GridColumn
+ GridRow
+ Header
+ HeaderContent
+ HeaderSubheader
+ Icon
+ IconGroup
+ Image
+ ImageGroup
+ Input
+ Item
+ ItemContent
+ ItemDescription
+ ItemExtra
+ ItemGroup
+ ItemHeader
+ ItemImage
+ ItemMeta
+ Label
+ LabelDetail
+ LabelGroup
+ List ;; use as ListSA
+ ListContent
+ ListDescription
+ ListHeader
+ ListIcon
+ ListItem
+ ListList
+ Loader
+ Menu
+ MenuHeader
+ MenuItem
+ MenuMenu
+ Message
+ MessageContent
+ MessageHeader
+ MessageItem
+ MessageList
+ Modal
+ ModalActions
+ ModalContent
+ ModalDescription
+ ModalHeader
+ Popup
+ PopupContent
+ PopupHeader
+ Portal
+ Progress
+ Radio
+ Rail
+ Rating
+ RatingIcon
+ Reveal
+ RevealContent
+ Search
+ SearchCategory
+ SearchResult
+ SearchResults
+ Segment
+ SegmentGroup
+ Select
+ Sidebar
+ SidebarPushable
+ SidebarPusher
+ Statistic
+ StatisticGroup
+ StatisticLabel
+ StatisticValue
+ Step
+ StepContent
+ StepDescription
+ StepGroup
+ StepTitle
+ Table
+ TableBody
+ TableCell
+ TableFooter
+ TableHeader
+ TableHeaderCell
+ TableRow
+ TextArea])
+
+
+(def reserved-tags #{"Comment"
+ "List"})
+
+
+(defn create-semantic-ui-react-component [tag]
+ (let [tag-name (if (reserved-tags (name tag))
+ (-> tag name (str "SA") symbol)
+ tag)]
+ `(def ~tag-name (reagent.core/adapt-react-class
+ (aget js/semanticUIReact ~(name tag))))))
+
+
+(defmacro export-semantic-ui-react-components []
+ `(do ~@(map create-semantic-ui-react-component
+ semantic-ui-react-tags)))
diff --git a/src/test/cljs/soda_ash/elements/button_test.cljs b/src/test/cljs/soda_ash/elements/button_test.cljs
deleted file mode 100644
index c9891ee..0000000
--- a/src/test/cljs/soda_ash/elements/button_test.cljs
+++ /dev/null
@@ -1,106 +0,0 @@
-(ns soda-ash.elements.button-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/button {}] c)
- node (sel1 c [:button])
- class (h/get-class node)]
- (is (= "ui button" class))))
-
-
-(deftest soda-add-class
- (let [_ (reagent/render [s/button {:soda {:add-class "gadfly"}}] c)
- node (sel1 c [:button])
- class (h/get-class node)]
- (is (= "ui gadfly button" class)
- ":add-class should add a class between ui and button")))
-
-
-(def soda
- {:type :animated
- :circular? true
- :compact? true
- :fluid? true
- :toggle? true
- :attached :top
- :color :orange
- :consequence :positive
- :size :massive
- :social :twitter
- :state :loading})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"animated")
- (h/check-class #"circular")
- (h/check-class #"compact")
- (h/check-class #"fluid")
- (h/check-class #"toggle")
- (h/check-class #"attached")
- (h/check-class #"orange")
- (h/check-class #"positive")
- (h/check-class #"massive")
- (h/check-class #"twitter")
- (h/check-class #"loading")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/button {:soda soda}] c)
- node (sel1 c [:button])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/button {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:button])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
-
-
-(deftest buttons-with-soda
- (let [_ (reagent/render [s/buttons {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest group-with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/buttons {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/container_test.cljs b/src/test/cljs/soda_ash/elements/container_test.cljs
deleted file mode 100644
index 0800d32..0000000
--- a/src/test/cljs/soda_ash/elements/container_test.cljs
+++ /dev/null
@@ -1,61 +0,0 @@
-(ns soda-ash.elements.container-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/container {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui container" class))))
-
-
-(def soda
- {:type :text
- :aligned :center
- :fluid? true})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"text")
- (h/check-class #"center aligned")
- (h/check-class #"fluid")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/container {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/container {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/divider_test.cljs b/src/test/cljs/soda_ash/elements/divider_test.cljs
deleted file mode 100644
index 61fb0ab..0000000
--- a/src/test/cljs/soda_ash/elements/divider_test.cljs
+++ /dev/null
@@ -1,67 +0,0 @@
-(ns soda-ash.elements.divider-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/divider {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui divider" class))))
-
-
-(def soda
- {:type :vertical
- :clearing? true
- :fitted? true
- :hidden? true
- :inverted? true
- :section? true})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"vertical")
- (h/check-class #"clearing")
- (h/check-class #"fitted")
- (h/check-class #"hidden")
- (h/check-class #"inverted")
- (h/check-class #"section")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/divider {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/divider {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/flag_test.cljs b/src/test/cljs/soda_ash/elements/flag_test.cljs
deleted file mode 100644
index 9f23f5c..0000000
--- a/src/test/cljs/soda_ash/elements/flag_test.cljs
+++ /dev/null
@@ -1,57 +0,0 @@
-(ns soda-ash.elements.flag-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/flag {}] c)
- node (sel1 c [:i])
- class (h/get-class node)]
- (is (= "flag" class))))
-
-
-(def soda
- {:flag :france})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"france")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/flag {:soda soda}] c)
- node (sel1 c [:i])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/flag {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:i])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/header_test.cljs b/src/test/cljs/soda_ash/elements/header_test.cljs
deleted file mode 100644
index ec99bb4..0000000
--- a/src/test/cljs/soda_ash/elements/header_test.cljs
+++ /dev/null
@@ -1,71 +0,0 @@
-(ns soda-ash.elements.header-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/header {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui header" class))))
-
-
-(def soda
- {:type :tiny
- :block? true
- :dividing? true
- :inverted? true
- :state :disabled
- :attached :top
- :floated :left
- :color :teal})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"tiny")
- (h/check-class #"block")
- (h/check-class #"disabled")
- (h/check-class #"dividing")
- (h/check-class #"inverted")
- (h/check-class #"top attached")
- (h/check-class #"left floated")
- (h/check-class #"teal")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/header {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/header {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/helpers_test.cljs b/src/test/cljs/soda_ash/elements/helpers_test.cljs
deleted file mode 100644
index 90222f1..0000000
--- a/src/test/cljs/soda_ash/elements/helpers_test.cljs
+++ /dev/null
@@ -1,139 +0,0 @@
-(ns soda-ash.elements.helpers-test
- (:require [cljs.test :refer-macros [deftest testing is]]
- [soda-ash.elements.helpers :as h]))
-
-
-
-;; errors
-
-
-(deftest throw-error
- (is (thrown-with-msg? js/Error.
- #"Soda-ash :foo :bar doesn't exist for baz element"
- (h/throw-error :foo :bar "baz"))))
-
-
-(deftest throw-type-error
- (is (thrown-with-msg? js/Error.
- #"Soda-ash :type :bar doesn't exist for baz element"
- (h/throw-type-error :bar "baz"))))
-
-
-
-;; class
-
-
-(deftest value->class
- (is (= "foo" (h/value->class :foo)))
- (is (= "foo bar" (h/value->class :foo-bar))))
-
-
-(deftest add-class->class
- (is (= "gadfly" (h/add-class->class :gadfly))
- (is (= "soda ash" (h/add-class->class :soda-ash)))))
-
-
-(deftest type->class
- (is (nil? (h/type->class :default #{:foo} "baz")))
- (is (= "foo" (h/type->class :foo #{:foo} "baz")))
- (is (thrown-with-msg? js/Error.
- #"Soda-ash :type :foo doesn't exist for baz element"
- (h/type->class :foo #{:bar} "baz"))))
-
-
-(deftest bool->class
- (is (= "foo" (h/bool->class :foo? true)))
- (is (nil? (h/bool->class :foo? false)))
-
- (is (= "foo bar" (h/bool->class :foo-bar? true)))
- (is (nil? (h/bool->class :foo-bar? false))))
-
-
-(deftest mod->class
- (is (= "foo" (h/mod->class :foo :default)))
- (is (= "bar foo" (h/mod->class :foo :bar))))
-
-
-(deftest opt->class
- (is (nil? (h/opt->class :default)))
- (is (= "foo" (h/opt->class :foo)))
- (is (= "foo bar" (h/opt->class :foo-bar))))
-
-
-(deftest special->class
- (let [special-map {:aligned {:right "right aligned"
- :left "left aligned"
- :justified "justified"
- :center "center aligned"}}]
- (is (= "right aligned" (h/special->class :aligned
- :right
- special-map
- "baz")))
- (is (thrown-with-msg? js/Error.
- #"Soda-ash :aligned :bad-option doesn't exist for baz element"
- (h/special->class :aligned
- :bad-option
- special-map
- "baz")))))
-
-
-(deftest class
- (is (= "foo" (h/class false nil "foo")))
- (is (= "ui foo" (h/class true nil "foo")))
- (is (= "ui bar foo" (h/class true "bar" "foo")))
- (is (= "bar foo" (h/class false "bar" "foo")))
- (is (= "ui bar baz foo" (h/class true "bar baz" "foo")))
- (is (= "ui foos" (h/class true nil "foos"))))
-
-
-
-;; sanitize
-
-
-(deftest sanitize-soda
- (is (nil? (h/sanitize-soda nil)))
- (is (= {} (h/sanitize-soda {})))
- (is (= {:foo :bar} (h/sanitize-soda {:foo :bar})))
- (is (= {:foo :bar
- :baz :quux} (h/sanitize-soda {:foo :bar
- :baz :quux
- :tag :div
- :ui? false
- :ratom :foo-ratom
- :path :foo-path}))))
-
-
-(deftest sanitize-attrs
- (is (nil? (h/sanitize-attrs nil)))
- (is (= {} (h/sanitize-attrs {})))
- (is (= {:foo :bar} (h/sanitize-attrs {:foo :bar})))
- (is (= {:foo :bar
- :baz :quux} (h/sanitize-attrs {:foo :bar
- :baz :quux
- :soda {:alpha :beta}}))))
-
-
-
-;; state
-
-
-(deftest set-initial-values!
- (let [ratom (atom {})]
- (h/set-initial-values! ratom :foo nil)
- (is (nil? (get-in @ratom [:foo :soda]))))
-
- (let [ratom (atom {})]
- (h/set-initial-values! ratom :foo {})
- (is (nil? (get-in @ratom [:foo :soda]))))
-
- (let [ratom (atom {})]
- (h/set-initial-values! ratom :foo {:bar :baz})
- (is (= {:bar :baz} (get-in @ratom [:foo :soda]))))
-
- (let [ratom (atom {})]
- (h/set-initial-values! ratom [:foo] {:bar :baz})
- (is (= {:bar :baz} (get-in @ratom [:foo :soda]))))
-
- (let [ratom (atom {})]
- (h/set-initial-values! ratom [:foo :quux] {:bar :baz})
- (is (= {:bar :baz} (get-in @ratom [:foo :quux :soda])))))
diff --git a/src/test/cljs/soda_ash/elements/icon_test.cljs b/src/test/cljs/soda_ash/elements/icon_test.cljs
deleted file mode 100644
index 116e675..0000000
--- a/src/test/cljs/soda_ash/elements/icon_test.cljs
+++ /dev/null
@@ -1,95 +0,0 @@
-(ns soda-ash.elements.icon-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/icon {}] c)
- node (sel1 c [:i])
- class (h/get-class node)]
- (is (= "icon" class))))
-
-
-(def soda
- {:bordered? true
- :circular? true
- :fitted? true
- :inverted? true
- :link? true
-
- :flipped :horizontally
- :rotated :clockwise
-
- :color :teal
- :icon :user
- :size :tiny
- :state :loading})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"bordered")
- (h/check-class #"circular")
- (h/check-class #"fitted")
- (h/check-class #"inverted")
- (h/check-class #"link")
-
- (h/check-class #"horizontally flipped")
- (h/check-class #"clockwise rotated")
-
- (h/check-class #"teal")
- (h/check-class #"user")
- (h/check-class #"tiny")
- (h/check-class #"loading")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/icon {:soda soda}] c)
- node (sel1 c [:i])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/icon {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:i])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
-
-
-(deftest group-with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/icons {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:i])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/image_test.cljs b/src/test/cljs/soda_ash/elements/image_test.cljs
deleted file mode 100644
index 4935374..0000000
--- a/src/test/cljs/soda_ash/elements/image_test.cljs
+++ /dev/null
@@ -1,91 +0,0 @@
-(ns soda-ash.elements.image-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/image {}] c)
- node (sel1 c [:img])
- class (h/get-class node)]
- (is (= "ui image" class))))
-
-
-(def soda
- {:state :disabled
- :aligned :top
- :avatar? true
- :bordered? true
- :centered? true
- :circular? true
- :floated :left
- :fluid? true
- :rounded? true
- :size :tiny
- :spaced :left})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"disabled")
- (h/check-class #"top aligned")
- (h/check-class #"avatar")
- (h/check-class #"bordered")
- (h/check-class #"centered")
- (h/check-class #"circular")
- (h/check-class #"left floated")
- (h/check-class #"fluid")
- (h/check-class #"rounded")
- (h/check-class #"tiny")
- (h/check-class #"left spaced")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/image {:soda soda}] c)
- node (sel1 c [:img])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/image {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:img])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
-
-
-(deftest group-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/images {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/input_test.cljs b/src/test/cljs/soda_ash/elements/input_test.cljs
deleted file mode 100644
index 6e2ade0..0000000
--- a/src/test/cljs/soda_ash/elements/input_test.cljs
+++ /dev/null
@@ -1,72 +0,0 @@
-(ns soda-ash.elements.input-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/input {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui input" class))))
-
-
-(def soda
- {:state :focus
- :action :left
- :fluid? true
- :icon :left
- :inverted? true
- :labeled :left-corner
- :transparent? true
- :size :massive
- })
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"focus")
- (h/check-class #"left action")
- (h/check-class #"fluid")
- (h/check-class #"left icon")
- (h/check-class #"inverted")
- (h/check-class #"left corner labeled")
- (h/check-class #"transparent")
- (h/check-class #"massive")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/input {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/input {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/label_test.cljs b/src/test/cljs/soda_ash/elements/label_test.cljs
deleted file mode 100644
index b57e7a4..0000000
--- a/src/test/cljs/soda_ash/elements/label_test.cljs
+++ /dev/null
@@ -1,79 +0,0 @@
-(ns soda-ash.elements.label-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/label {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui label" class))))
-
-
-(def soda
- {:type :top-attached
- :basic? true
- :circular? true
- :color :teal
- :size :massive})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"top attached")
- (h/check-class #"basic")
- (h/check-class #"circular")
- (h/check-class #"teal")
- (h/check-class #"massive")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/label {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/label {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
-
-
-(deftest group-with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/labels {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/list_card.cljs b/src/test/cljs/soda_ash/elements/list_card.cljs
deleted file mode 100644
index be552fb..0000000
--- a/src/test/cljs/soda_ash/elements/list_card.cljs
+++ /dev/null
@@ -1,77 +0,0 @@
-(ns soda-ash.elements.list-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/s-list {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui list" class))))
-
-
-(def soda
- {:type :bulleted
- :aligned :top
- :animated? true
- :celled? true
- :divided? true
- :horizontal? true
- :inverted? true
- :right-floated? true
- :relaxed :default
- :selection? true
- :size :massive})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"bulleted")
- (h/check-class #"top aligned")
- (h/check-class #"animated")
- (h/check-class #"celled")
- (h/check-class #"divided")
- (h/check-class #"horizontal")
- (h/check-class #"inverted")
- (h/check-class #"right floated")
- (h/check-class #"relaxed")
- (h/check-class #"selection")
- (h/check-class #"massive")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/s-list {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/s-list {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/loader_test.cljs b/src/test/cljs/soda_ash/elements/loader_test.cljs
deleted file mode 100644
index 5cb89c4..0000000
--- a/src/test/cljs/soda_ash/elements/loader_test.cljs
+++ /dev/null
@@ -1,65 +0,0 @@
-(ns soda-ash.elements.loader-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/loader {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui loader" class))))
-
-
-(def soda
- {:type :text
- :centered? true
- :inline :small
- :size :medium
- :state :default})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"text")
- (h/check-class #"centered")
- (h/check-class #"small inline")
- (h/check-class #"medium")
- (h/!check-class #"active")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/loader {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/loader {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/rail_test.cljs b/src/test/cljs/soda_ash/elements/rail_test.cljs
deleted file mode 100644
index 1d45696..0000000
--- a/src/test/cljs/soda_ash/elements/rail_test.cljs
+++ /dev/null
@@ -1,61 +0,0 @@
-(ns soda-ash.elements.rail-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/rail {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui rail" class))))
-
-
-(def soda
- {:type :left-internal
- :attached? true
- :close :very})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"left internal")
- (h/check-class #"attached")
- (h/check-class #"very close")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/rail {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/rail {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/reveal_test.cljs b/src/test/cljs/soda_ash/elements/reveal_test.cljs
deleted file mode 100644
index 21add32..0000000
--- a/src/test/cljs/soda_ash/elements/reveal_test.cljs
+++ /dev/null
@@ -1,61 +0,0 @@
-(ns soda-ash.elements.reveal-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/reveal {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui reveal" class))))
-
-
-(def soda
- {:type :move-right
- :state :disabled
- :instant? true})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"move right")
- (h/check-class #"disabled")
- (h/check-class #"instant")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/reveal {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/reveal {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/segment_test.cljs b/src/test/cljs/soda_ash/elements/segment_test.cljs
deleted file mode 100644
index 07b6f1c..0000000
--- a/src/test/cljs/soda_ash/elements/segment_test.cljs
+++ /dev/null
@@ -1,95 +0,0 @@
-(ns soda-ash.elements.segment-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/segment {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui segment" class))))
-
-
-(def soda
- {:type :raised
- :state :loading
- :aligned :left
- :attached :left
- :basic? true
- :circular? true
- :clearing? true
- :color :olive
- :compact? true
- :emphasis :secondary
- :floated :right
- :inverted? true
- :padded :very})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"raised")
- (h/check-class #"loading")
- (h/check-class #"left aligned")
- (h/check-class #"left attached")
- (h/check-class #"basic")
- (h/check-class #"circular")
- (h/check-class #"clearing")
- (h/check-class #"olive")
- (h/check-class #"compact")
- (h/check-class #"secondary")
- (h/check-class #"right floated")
- (h/check-class #"inverted")
- (h/check-class #"very padded")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/segment {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/segment {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
-
-
-(deftest group-with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/segments {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/step_test.cljs b/src/test/cljs/soda_ash/elements/step_test.cljs
deleted file mode 100644
index 6704f08..0000000
--- a/src/test/cljs/soda_ash/elements/step_test.cljs
+++ /dev/null
@@ -1,97 +0,0 @@
-(ns soda-ash.elements.step-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.element :as s]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest no-soda
- (let [_ (reagent/render [s/step {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "step" class))))
-
-
-(def soda
- {:type :link
- :state :completed})
-
-(defn check-classes [class]
- (doto class
- (h/check-class #"link")
- (h/check-class #"completed")))
-
-
-(deftest with-soda
- (let [_ (reagent/render [s/step {:soda soda}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (check-classes class)))
-
-
-(deftest with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/step {:soda (merge
- {:ratom ratom
- :path :foo}
- soda)}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes class)
-
- (h/check-soda soda ratom-soda)))
-
-
-
-(deftest group-no-soda
- (let [_ (reagent/render [s/steps {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui steps" class))))
-
-
-(def soda2
- {:type :tablet-stackable
- :fluid? true
- :attached :top
- :divided :two
- :size :large})
-
-(defn check-classes2 [class]
- (doto class
- (h/check-class #"tablet stackable")
- (h/check-class #"fluid")
- (h/check-class #"top attached")
- (h/check-class #"two")
- (h/check-class #"large")))
-
-(deftest group-with-soda-with-ratom
- (let [ratom (reagent/atom {})
- _ (reagent/render [s/steps {:soda (merge
- {:ratom ratom
- :path :foo}
- soda2
- )}] c)
- node (sel1 c [:div])
- class (h/get-class node)
- ratom-soda (get-in @ratom [:foo :soda])]
- (check-classes2 class)
-
- (h/check-soda soda2 ratom-soda)))
diff --git a/src/test/cljs/soda_ash/elements/template_test.cljs b/src/test/cljs/soda_ash/elements/template_test.cljs
deleted file mode 100644
index 9d8fd00..0000000
--- a/src/test/cljs/soda_ash/elements/template_test.cljs
+++ /dev/null
@@ -1,43 +0,0 @@
-(ns soda-ash.elements.template-test
- (:require [cljs.test :refer-macros [deftest testing is use-fixtures]]
- [cljs-react-test.utils :as tu]
- [dommy.core :as dommy :refer-macros [sel1]]
- [reagent.core :as reagent]
- [soda-ash.elements.template :as t]
- [soda-ash.elements.test-helpers :as h]))
-
-
-;; Util
-
-(def ^:dynamic c)
-
-(use-fixtures :each (fn [test-fn]
- (binding [c (tu/new-container!)]
- (test-fn)
- (tu/unmount! c))))
-
-
-
-;; Tests
-
-
-(deftest template
- (testing "base case"
- (let [_ (reagent/render [(t/element
- {:e-name "foo"
- :default-tag :div})
- {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "ui foo" class))))
-
- (testing "ui?"
- (testing "create element with ui? false"
- (let [_ (reagent/render [(t/element
- {:e-name "foo"
- :default-tag :div
- :ui? false})
- {}] c)
- node (sel1 c [:div])
- class (h/get-class node)]
- (is (= "foo" class))))))
diff --git a/src/test/cljs/soda_ash/elements/test_helpers.cljs b/src/test/cljs/soda_ash/elements/test_helpers.cljs
deleted file mode 100644
index a03754c..0000000
--- a/src/test/cljs/soda_ash/elements/test_helpers.cljs
+++ /dev/null
@@ -1,28 +0,0 @@
-(ns soda-ash.elements.test-helpers
- (:require [cljs.test :refer-macros [is]]))
-
-
-(defn get-attr [attr node]
- (.getAttribute node attr))
-
-(def get-class (partial get-attr "class"))
-
-
-(defn check-class
- ([class regex]
- (check-class class regex nil))
- ([class regex doc-string]
- (is (re-find regex class)
- doc-string)))
-
-(defn !check-class
- ([class regex]
- (!check-class class regex nil))
- ([class regex doc-string]
- (is (not (re-find regex class))
- doc-string)))
-
-
-(defn check-soda [soda ratom-soda]
- (doseq [[k v] soda]
- (is (= v (k ratom-soda)))))
diff --git a/src/test/cljs/soda_ash/runner.cljs b/src/test/cljs/soda_ash/runner.cljs
deleted file mode 100644
index b915f9a..0000000
--- a/src/test/cljs/soda_ash/runner.cljs
+++ /dev/null
@@ -1,40 +0,0 @@
-(ns soda-ash.runner
- (:require
- [doo.runner :refer-macros [doo-tests]]
- [soda-ash.elements.button-test]
- [soda-ash.elements.container-test]
- [soda-ash.elements.divider-test]
- [soda-ash.elements.flag-test]
- [soda-ash.elements.header-test]
- [soda-ash.elements.helpers-test]
- [soda-ash.elements.icon-test]
- [soda-ash.elements.image-test]
- [soda-ash.elements.input-test]
- [soda-ash.elements.label-test]
- [soda-ash.elements.list-test]
- [soda-ash.elements.loader-test]
- [soda-ash.elements.rail-test]
- [soda-ash.elements.reveal-test]
- [soda-ash.elements.segment-test]
- [soda-ash.elements.step-test]
- [soda-ash.elements.template-test]))
-
-
-(doo-tests
- 'soda-ash.elements.button-test
- 'soda-ash.elements.container-test
- 'soda-ash.elements.divider-test
- 'soda-ash.elements.header-test
- 'soda-ash.elements.flag-test
- 'soda-ash.elements.helpers-test
- 'soda-ash.elements.icon-test
- 'soda-ash.elements.image-test
- 'soda-ash.elements.input-test
- 'soda-ash.elements.label-test
- 'soda-ash.elements.list-test
- 'soda-ash.elements.loader-test
- 'soda-ash.elements.rail-test
- 'soda-ash.elements.reveal-test
- 'soda-ash.elements.segment-test
- 'soda-ash.elements.step-test
- 'soda-ash.elements.template-test)