diff --git a/project.clj b/project.clj index ec18be60..12cf86f9 100644 --- a/project.clj +++ b/project.clj @@ -32,12 +32,12 @@ ;; --------------------------------------------------------------------------------------- -(defproject re-com "0.2.1" +(defproject re-com "0.2.2" :description "Reusable UI components for Reagent" :url "https://github.com/Day8/re-com.git" :dependencies [[org.clojure/clojure "1.6.0"] - [org.clojure/clojurescript "0.0-3058" scope="provided"] + [org.clojure/clojurescript "0.0-2843" scope="provided"] ;[stabilized/clojurescript "1.0.0" scope="provided"] ;; TODO: Eventually switch to this one (when it works) [org.clojure/core.async "0.1.346.0-17112a-alpha" scope="provided"] [reagent "0.5.0-alpha3" scope="provided"] diff --git a/src/re_com/core.cljs b/src/re_com/core.cljs new file mode 100644 index 00000000..99370a32 --- /dev/null +++ b/src/re_com/core.cljs @@ -0,0 +1,78 @@ +(ns re-com.core + (:require [re-com.alert :as alert] + [re-com.box :as box] + [re-com.buttons :as buttons] + [re-com.datepicker :as datepicker] + [re-com.dropdown :as dropdown] + [re-com.input-time :as input-time] + [re-com.layout :as layout] + [re-com.misc :as misc] + [re-com.modal-panel :as modal-panel] + [re-com.popover :as popover] + [re-com.selection-list :as selection-list] + [re-com.tabs :as tabs] + [re-com.text :as text] + [re-com.tour :as tour])) + +;; ----------------------------------------------------------------------------- +;; re-com public API (see also re-com.util) +;; ----------------------------------------------------------------------------- + +(def alert-box alert/alert-box) +(def alert-list alert/alert-list) + +(def h-box box/h-box) +(def v-box box/v-box) +(def box box/box) +(def line box/line) +(def gap box/gap) +(def scroller box/scroller) +(def border box/border) + +(def button buttons/button) +(def md-circle-icon-button buttons/md-circle-icon-button) +(def md-icon-button buttons/md-icon-button) +(def info-button buttons/info-button) +(def row-button buttons/row-button) +(def hyperlink buttons/hyperlink) +(def hyperlink-href buttons/hyperlink-href) + +(def datepicker datepicker/datepicker) +(def datepicker-dropdown datepicker/datepicker-dropdown) + +(def single-dropdown dropdown/single-dropdown) + +(def input-time input-time/input-time) + +(def h-layout layout/h-layout) +(def v-layout layout/v-layout) + +(def input-text misc/input-text) +(def input-textarea misc/input-textarea) +(def checkbox misc/checkbox) +(def radio-button misc/radio-button) +(def slider misc/slider) +(def progress-bar misc/progress-bar) +(def spinner misc/spinner) + +(def modal-panel modal-panel/modal-panel) + +(def popover-content-wrapper popover/popover-content-wrapper) +(def popover-anchor-wrapper popover/popover-anchor-wrapper) +(def popover-border popover/popover-border) +(def popover-tooltip popover/popover-tooltip) + +(def selection-list selection-list/selection-list) + +(def horizontal-tabs tabs/horizontal-tabs) +(def horizontal-bar-tabs tabs/horizontal-bar-tabs) +(def vertical-bar-tabs tabs/vertical-bar-tabs) +(def horizontal-pill-tabs tabs/horizontal-pill-tabs) +(def vertical-pill-tabs tabs/vertical-pill-tabs) + +(def label text/label) +(def title text/title) + +(def make-tour tour/make-tour) +(def start-tour tour/start-tour) +(def make-tour-nav tour/make-tour-nav) diff --git a/src/re_com/dropdown.cljs b/src/re_com/dropdown.cljs index 26661695..16bd5086 100644 --- a/src/re_com/dropdown.cljs +++ b/src/re_com/dropdown.cljs @@ -35,7 +35,7 @@ (flatten (interleave group-headers groups)))) -(defn filter-choices +(defn- filter-choices "Filter a list of choices based on a filter string using plain string searches (case insensitive). Less powerful than regex's but no confusion with reserved characters" [choices filter-text] @@ -49,7 +49,7 @@ (filter filter-fn choices))) -(defn filter-choices-regex +(defn- filter-choices-regex "Filter a list of choices based on a filter string using regex's (case insensitive). More powerful but can cause confusion for users entering reserved characters such as [ ] * + . ( ) etc." [choices filter-text] diff --git a/src/re_com/popover.cljs b/src/re_com/popover.cljs index 2e3858be..f5446396 100644 --- a/src/re_com/popover.cljs +++ b/src/re_com/popover.cljs @@ -106,7 +106,7 @@ (def backdrop-args (extract-arg-data backdrop-args-desc)) -(defn backdrop +(defn- backdrop "Renders a backdrop dive which fills the entire page and responds to clicks on it. Can also specify how tranparent it should be" [& {:keys [opacity on-click] :as args}] {:pre [(validate-args backdrop-args args "backdrop")]} @@ -233,7 +233,7 @@ (def popover-title-args (extract-arg-data popover-title-args-desc)) -(defn popover-title +(defn- popover-title "Renders a title at the top of a popover with an optional close button on the far right" [& {:keys [title showing? close-button? close-callback] :as args}] diff --git a/src/re_com/tour.cljs b/src/re_com/tour.cljs index 3ba6cd45..8176cb31 100644 --- a/src/re_com/tour.cljs +++ b/src/re_com/tour.cljs @@ -8,9 +8,6 @@ ;; Component: tour ;; ;; Strings together -;; -;; Notes/todo: -;; - TBA ;;-------------------------------------------------------------------------------------------------- (defn make-tour diff --git a/src/re_demo/alert_box.cljs b/src/re_demo/alert_box.cljs index b033eb06..1be27de1 100644 --- a/src/re_demo/alert_box.cljs +++ b/src/re_demo/alert_box.cljs @@ -1,9 +1,9 @@ (ns re-demo.alert-box - (:require-macros [re-com.core :refer [defn-meta add-meta]]) - (:require [re-com.box :refer [h-box v-box box line gap]] - [re-com.text :refer [label]] - [re-com.alert :refer [alert-box alert-box-args-desc - alert-list alert-list-args-desc]] + ;(:require-macros [re-com.core :refer [defn-meta add-meta]]) + (:require [re-com.core :refer [h-box v-box box line gap label alert-box alert-list] :refer-macros [defn-meta add-meta]] + [re-com.alert :refer [alert-box-args-desc alert-list-args-desc]] + ;[re-com.box :refer [h-box v-box box line gap]] + ;[re-com.text :refer [label]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.debug :refer-macros [dbg prn println log dev? warn warn-unless]] [reagent.core :as reagent])) diff --git a/src/re_demo/alert_list.cljs b/src/re_demo/alert_list.cljs index 27f92e0f..559b4a64 100644 --- a/src/re_demo/alert_list.cljs +++ b/src/re_demo/alert_list.cljs @@ -1,9 +1,10 @@ (ns re-demo.alert-list - (:require [re-com.util :refer [insert-nth remove-id-item]] - [re-com.text :refer [label title]] - [re-com.buttons :refer [button]] - [re-com.box :refer [h-box v-box box line gap]] - [re-com.alert :refer [alert-box alert-list alert-box-args-desc alert-list-args-desc]] + (:require [re-com.core :refer [h-box v-box box line gap label title button alert-box alert-list]] + [re-com.alert :refer [alert-box-args-desc alert-list-args-desc]] + [re-com.util :refer [insert-nth remove-id-item]] + ;[re-com.text :refer [label title]] + ;[re-com.buttons :refer [button]] + ;[re-com.box :refer [h-box v-box box line gap]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/border.cljs b/src/re_demo/border.cljs index e343889f..5de5fc0b 100644 --- a/src/re_demo/border.cljs +++ b/src/re_demo/border.cljs @@ -1,5 +1,6 @@ (ns re-demo.border - (:require [re-com.box :refer [h-box v-box gap border border-args-desc]] + (:require [re-com.core :refer [h-box v-box gap border]] + [re-com.box :refer [border-args-desc]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) diff --git a/src/re_demo/box.cljs b/src/re_demo/box.cljs index dad36754..912f08e2 100644 --- a/src/re_demo/box.cljs +++ b/src/re_demo/box.cljs @@ -1,6 +1,7 @@ (ns re-demo.box - (:require [re-com.box :refer [h-box v-box box box-args-desc gap]] - [re-com.buttons :refer [hyperlink-href]] + (:require [re-com.core :refer [h-box v-box box gap hyperlink-href]] + [re-com.box :refer [box-args-desc]] + ;[re-com.buttons :refer [hyperlink-href]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) diff --git a/src/re_demo/button.cljs b/src/re_demo/button.cljs index 65302da6..2de8b91d 100644 --- a/src/re_demo/button.cljs +++ b/src/re_demo/button.cljs @@ -1,9 +1,9 @@ (ns re-demo.button - (:require-macros [re-com.core :refer [handler-fn]]) - (:require [re-com.text :refer [label]] - [re-com.misc :refer [spinner]] - [re-com.buttons :refer [button button-args-desc]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line button label spinner]] + [re-com.buttons :refer [button-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [spinner]] + ;[re-com.buttons :refer [button button-args-desc]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/checkbox.cljs b/src/re_demo/checkbox.cljs index fa156c23..fc1c83e5 100644 --- a/src/re_demo/checkbox.cljs +++ b/src/re_demo/checkbox.cljs @@ -1,7 +1,8 @@ (ns re-demo.checkbox - (:require [re-com.text :refer [label]] - [re-com.misc :refer [checkbox checkbox-args-desc]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line checkbox label]] + [re-com.misc :refer [checkbox-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.box :refer [h-box v-box box gap line]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) @@ -64,7 +65,8 @@ :model always-false] [h-box - :gap "10px" + :gap "10px" + :height "20px" :children [[checkbox :label "tick me " :model ticked? @@ -73,13 +75,13 @@ (when @ticked? [label :label " is ticked"])]] [h-box - :gap "1px" + :gap "1px" :children [[checkbox :model all-for-one? :on-change #(reset! all-for-one? %)] [checkbox :model all-for-one? :on-change #(reset! all-for-one? %)] [checkbox :model all-for-one? :on-change #(reset! all-for-one? %) :label "all for one, and one for all. "]]] [h-box - :gap "15px" + :gap "15px" :children [[checkbox :label "tick this one, to \"disable\"" :model disabled? @@ -93,7 +95,7 @@ :on-change #(reset! something1? %)]]] [h-box - :gap "1px" + :gap "1px" :children [[checkbox :model something2? :on-change #(reset! something2? %)] diff --git a/src/re_demo/core.cljs b/src/re_demo/core.cljs index 764144ad..69665162 100644 --- a/src/re_demo/core.cljs +++ b/src/re_demo/core.cljs @@ -1,6 +1,5 @@ (ns re-demo.core - (:require-macros [re-com.core :refer [handler-fn]] - [cljs.core.async.macros :refer [go]] + (:require-macros [cljs.core.async.macros :refer [go]] [secretary.core :refer [defroute]]) (:require [goog.events :as events] [reagent.core :as reagent] @@ -8,7 +7,7 @@ [secretary.core :as secretary] [re-demo.utils :refer [panel-title re-com-title]] [re-com.util :as util] - [re-com.box :refer [h-box v-box box gap line scroller border]] + [re-com.core :refer [h-box v-box box gap line scroller border] :refer-macros [handler-fn]] [re-demo.welcome :as welcome] [re-demo.radio-button :as radio-button] [re-demo.checkbox :as checkbox] @@ -223,11 +222,28 @@ :children [[re-com-title]]]) -(def selected-tab-id (reagent/atom (:id (first tabs-definition)))) ;; TODO: Avoid this global? +(def id-store (local-storage (atom nil) ::id-store)) + +(def selected-tab-id (reagent/atom (if (or (nil? @id-store) (nil? (util/item-for-id @id-store tabs-definition))) + (:id (first tabs-definition)) + @id-store))) ;; id of the selected tab + +;; -- Routes and History ------------------------------------------------------ + +(defroute "/" [] (do (println "defroute - root") (reset! selected-tab-id :welcome))) +(defroute "/:tab" [tab query-params] (do (println "defroute - tab: '" tab "', query-params:" query-params) (reset! selected-tab-id (keyword tab)))) +(defroute "*" [] (do (println "defroute - UNKNOWN ROUTE"))) + +(def history (History.)) +(events/listen history EventType/NAVIGATE (fn [e] (secretary/dispatch! (.-token e)))) +(.setEnabled history true) + + + (defn main [] - (let [id-store (local-storage (atom nil) ::id-store) ;; TODO: Want to get local-storage working with secretary! + (let [;id-store (local-storage (atom nil) ::id-store) ;; TODO: Want to get local-storage working with secretary! ;selected-tab-id (reagent/atom (if (or (nil? @id-store) (nil? (util/item-for-id @id-store tabs-definition))) ; (:id (first tabs-definition)) ; @id-store)) ;; id of the selected tab @@ -265,17 +281,6 @@ :child [(:panel (util/item-for-id @selected-tab-id tabs-definition))]]]]]))) ;; the tab panel to show, for the selected tab -;; -- Routes and History ------------------------------------------------------ - -(defroute "/" [] (do (println "defroute - root") (reset! selected-tab-id :welcome))) -(defroute "/:tab" [tab query-params] (do (println "defroute - tab: '" tab "', query-params:" query-params) (reset! selected-tab-id (keyword tab)))) -(defroute "*" [] (do (println "defroute - UNKNOWN ROUTE"))) - -(def history (History.)) -(events/listen history EventType/NAVIGATE (fn [e] (secretary/dispatch! (.-token e)))) -(.setEnabled history true) - - (defn ^:export mount-demo [] (reagent/render [main] (util/get-element-by-id "app")) diff --git a/src/re_demo/datepicker.cljs b/src/re_demo/datepicker.cljs index ac66e51d..2872ff3e 100644 --- a/src/re_demo/datepicker.cljs +++ b/src/re_demo/datepicker.cljs @@ -1,15 +1,16 @@ (ns re-demo.datepicker - (:require - [reagent.core :as r] - [cljs-time.core :refer [now days minus]] - [cljs-time.format :refer [formatter unparse]] - [re-com.text :refer [label title]] - [re-com.misc :refer [checkbox]] - [re-com.datepicker :refer [datepicker datepicker-dropdown iso8601->date datepicker-args-desc]] - [re-com.box :refer [h-box v-box gap]] - [re-com.dropdown :refer [single-dropdown]] - [re-com.util :refer [golden-ratio-a golden-ratio-b]] - [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) + (:require [reagent.core :as reagent] + [cljs-time.core :refer [now days minus]] + [cljs-time.format :refer [formatter unparse]] + ;[re-com.text :refer [label title]] + ;[re-com.misc :refer [checkbox]] + ;[re-com.datepicker :refer [datepicker datepicker-dropdown iso8601->date datepicker-args-desc]] + ;[re-com.box :refer [h-box v-box gap]] + ;[re-com.dropdown :refer [single-dropdown]] + [re-com.core :refer [h-box v-box gap single-dropdown datepicker datepicker-dropdown checkbox label title]] + [re-com.datepicker :refer [iso8601->date datepicker-args-desc]] + [re-com.util :refer [golden-ratio-a golden-ratio-b]] + [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) (defn- toggle-inclusion! @@ -78,12 +79,12 @@ (defn- show-variant [variation] - (let [model1 (r/atom (minus (now) (days 3))) - model2 (r/atom (iso8601->date "20140914")) - disabled? (r/atom false) - show-today? (r/atom true) - show-weeks? (r/atom false) - enabled-days (r/atom (-> days-map keys set)) + (let [model1 (reagent/atom (minus (now) (days 3))) + model2 (reagent/atom (iso8601->date "20140914")) + disabled? (reagent/atom false) + show-today? (reagent/atom true) + show-weeks? (reagent/atom false) + enabled-days (reagent/atom (-> days-map keys set)) label-style {:font-style "italic" :font-size "smaller" :color "#777"}] (case variation :inline [(fn @@ -163,7 +164,7 @@ (defn panel2 [] - (let [selected-variation (r/atom :inline)] + (let [selected-variation (reagent/atom :inline)] (fn [] [v-box :size "auto" diff --git a/src/re_demo/dropdowns.cljs b/src/re_demo/dropdowns.cljs index 195de0df..7da3a2de 100644 --- a/src/re_demo/dropdowns.cljs +++ b/src/re_demo/dropdowns.cljs @@ -1,9 +1,11 @@ (ns re-demo.dropdowns - (:require [re-com.util :refer [item-for-id]] - [re-com.text :refer [label title]] - [re-com.misc :refer [input-text checkbox]] - [re-com.box :refer [h-box v-box box gap]] - [re-com.dropdown :refer [single-dropdown filter-choices-by-keyword single-dropdown-args-desc]] + (:require [re-com.core :refer [h-box v-box box gap single-dropdown input-text checkbox label title]] + [re-com.dropdown :refer [filter-choices-by-keyword single-dropdown-args-desc]] + [re-com.util :refer [item-for-id]] + ;[re-com.text :refer [label title]] + ;[re-com.misc :refer [input-text checkbox]] + ;[re-com.box :refer [h-box v-box box gap]] + ;[re-com.dropdown :refer [single-dropdown filter-choices-by-keyword single-dropdown-args-desc]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/gap.cljs b/src/re_demo/gap.cljs index 26bc95e3..845846fa 100644 --- a/src/re_demo/gap.cljs +++ b/src/re_demo/gap.cljs @@ -1,5 +1,6 @@ (ns re-demo.gap - (:require [re-com.box :refer [h-box v-box gap gap-args-desc]] + (:require [re-com.core :refer [h-box v-box gap]] + [re-com.box :refer [gap-args-desc]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) diff --git a/src/re_demo/h_box.cljs b/src/re_demo/h_box.cljs index 2e1c1bff..cbeded02 100644 --- a/src/re_demo/h_box.cljs +++ b/src/re_demo/h_box.cljs @@ -1,12 +1,7 @@ (ns re-demo.h-box - (:require [re-com.box :refer [h-box h-box-args-desc - v-box v-box-args-desc - box box-args-desc - gap gap-args-desc - line line-args-desc - scroller scroller-args-desc - border border-args-desc]] - [re-com.buttons :refer [button hyperlink-href]] + (:require [re-com.core :refer [h-box v-box box gap line scroller border button hyperlink-href]] + [re-com.box :refer [h-box-args-desc v-box-args-desc box-args-desc gap-args-desc line-args-desc scroller-args-desc border-args-desc]] + ;[re-com.buttons :refer [button hyperlink-href]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [re-com.validate :refer [extract-arg-data validate-args string-or-hiccup? alert-type? vector-of-maps?]])) diff --git a/src/re_demo/hyperlink.cljs b/src/re_demo/hyperlink.cljs index c8c42b05..441de97e 100644 --- a/src/re_demo/hyperlink.cljs +++ b/src/re_demo/hyperlink.cljs @@ -1,8 +1,10 @@ (ns re-demo.hyperlink - (:require [re-com.text :refer [label]] - [re-com.misc :refer [checkbox]] - [re-com.buttons :refer [hyperlink hyperlink-args-desc]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line label checkbox hyperlink]] + [re-com.buttons :refer [hyperlink-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [checkbox]] + ;[re-com.buttons :refer [hyperlink hyperlink-args-desc]] + ;[re-com.box :refer [h-box v-box box gap line]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/hyperlink_href.cljs b/src/re_demo/hyperlink_href.cljs index 7dddcbd7..fa9bb4f9 100644 --- a/src/re_demo/hyperlink_href.cljs +++ b/src/re_demo/hyperlink_href.cljs @@ -1,8 +1,10 @@ (ns re-demo.hyperlink-href - (:require [re-com.text :refer [label]] - [re-com.misc :refer [radio-button]] - [re-com.buttons :refer [hyperlink-href hyperlink-href-args-desc]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line label radio-button hyperlink-href]] + [re-com.buttons :refer [hyperlink-href-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [radio-button]] + ;[re-com.buttons :refer [hyperlink-href hyperlink-href-args-desc]] + ;[re-com.box :refer [h-box v-box box gap line]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/info_button.cljs b/src/re_demo/info_button.cljs index 1f4e06ae..ad1e2b01 100644 --- a/src/re_demo/info_button.cljs +++ b/src/re_demo/info_button.cljs @@ -1,8 +1,10 @@ (ns re-demo.info-button - (:require [re-com.text :refer [label]] - [re-com.misc :refer [input-text]] - [re-com.buttons :refer [info-button info-button-args-desc hyperlink-href]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line info-button label input-text hyperlink-href]] + [re-com.buttons :refer [info-button-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [input-text]] + ;[re-com.buttons :refer [info-button info-button-args-desc hyperlink-href]] + ;[re-com.box :refer [h-box v-box box gap line]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) diff --git a/src/re_demo/input_text.cljs b/src/re_demo/input_text.cljs index fe0cffa4..44e60aed 100644 --- a/src/re_demo/input_text.cljs +++ b/src/re_demo/input_text.cljs @@ -1,7 +1,9 @@ (ns re-demo.input-text - (:require [re-com.text :refer [label]] - [re-com.misc :refer [input-text input-textarea input-text-args-desc checkbox radio-button slider]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line input-text input-textarea label checkbox radio-button slider]] + [re-com.misc :refer [input-text-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [input-text input-textarea input-text-args-desc checkbox radio-button slider]] + ;[re-com.box :refer [h-box v-box box gap]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/input_time.cljs b/src/re_demo/input_time.cljs index 0490e46b..c8f3b91e 100644 --- a/src/re_demo/input_time.cljs +++ b/src/re_demo/input_time.cljs @@ -1,9 +1,11 @@ (ns re-demo.input-time - (:require [re-com.text :refer [label]] - [re-com.misc :refer [checkbox]] - [re-com.buttons :refer [button]] - [re-com.input-time :refer [input-time input-time-args-desc]] - [re-com.box :refer [h-box v-box box gap]] + (:require [re-com.core :refer [h-box v-box box gap input-time label button checkbox]] + [re-com.input-time :refer [input-time-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [checkbox]] + ;[re-com.buttons :refer [button]] + ;[re-com.input-time :refer [input-time input-time-args-desc]] + ;[re-com.box :refer [h-box v-box box gap]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/label.cljs b/src/re_demo/label.cljs index 72268b59..9cda4fd3 100644 --- a/src/re_demo/label.cljs +++ b/src/re_demo/label.cljs @@ -1,6 +1,8 @@ (ns re-demo.label - (:require [re-com.text :refer [label label-args-desc]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line label]] + [re-com.text :refer [label-args-desc]] + ;[re-com.text :refer [label label-args-desc]] + ;[re-com.box :refer [h-box v-box box gap line]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) diff --git a/src/re_demo/layouts.cljs b/src/re_demo/layouts.cljs index be75cf8c..ee4d35a5 100644 --- a/src/re_demo/layouts.cljs +++ b/src/re_demo/layouts.cljs @@ -1,7 +1,9 @@ (ns re-demo.layouts - (:require [re-com.box :refer [h-box v-box box gap line scroller border]] - [re-com.layout :refer [h-layout h-layout-args-desc - v-layout v-layout-args-desc]] + (:require [re-com.core :refer [h-box v-box box gap line scroller border h-layout v-layout]] + [re-com.layout :refer [h-layout-args-desc v-layout-args-desc]] + ;[re-com.box :refer [h-box v-box box gap line scroller border]] + ;[re-com.layout :refer [h-layout h-layout-args-desc + ; v-layout v-layout-args-desc]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) diff --git a/src/re_demo/line.cljs b/src/re_demo/line.cljs index 865294bb..116ca0d3 100644 --- a/src/re_demo/line.cljs +++ b/src/re_demo/line.cljs @@ -1,5 +1,7 @@ (ns re-demo.line - (:require [re-com.box :refer [h-box v-box box gap line line-args-desc]] + (:require [re-com.core :refer [h-box v-box box gap line]] + [re-com.box :refer [line-args-desc]] + ;[re-com.box :refer [h-box v-box box gap line line-args-desc]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) diff --git a/src/re_demo/md_circle_icon_button.cljs b/src/re_demo/md_circle_icon_button.cljs index 0b5cbaba..8c810fc6 100644 --- a/src/re_demo/md_circle_icon_button.cljs +++ b/src/re_demo/md_circle_icon_button.cljs @@ -1,8 +1,10 @@ (ns re-demo.md-circle-icon-button - (:require [re-com.text :refer [label]] - [re-com.buttons :refer [md-circle-icon-button md-circle-icon-button-args-desc #_round-button]] - [re-com.box :refer [h-box v-box box gap line]] - [re-com.tabs :refer [horizontal-bar-tabs vertical-bar-tabs]] + (:require [re-com.core :refer [h-box v-box box gap line label md-circle-icon-button horizontal-bar-tabs vertical-bar-tabs #_round-button]] + [re-com.buttons :refer [md-circle-icon-button-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.buttons :refer [md-circle-icon-button md-circle-icon-button-args-desc #_round-button]] + ;[re-com.box :refer [h-box v-box box gap line]] + ;[re-com.tabs :refer [horizontal-bar-tabs vertical-bar-tabs]] [re-demo.utils :refer [panel-title component-title args-table material-design-hyperlink github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/md_icon_button.cljs b/src/re_demo/md_icon_button.cljs index d7954f6b..d1997c96 100644 --- a/src/re_demo/md_icon_button.cljs +++ b/src/re_demo/md_icon_button.cljs @@ -1,9 +1,11 @@ (ns re-demo.md-icon-button - (:require [re-com.text :refer [label]] - [re-com.buttons :refer [md-icon-button md-icon-button-args-desc]] + (:require [re-com.core :refer [h-box v-box box gap line md-icon-button label horizontal-bar-tabs vertical-bar-tabs]] + [re-com.buttons :refer [md-icon-button-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.buttons :refer [md-icon-button md-icon-button-args-desc]] + ;[re-com.box :refer [h-box v-box box gap line]] + ;[re-com.tabs :refer [horizontal-bar-tabs vertical-bar-tabs]] [re-demo.md-circle-icon-button :refer [icons example-icons]] - [re-com.box :refer [h-box v-box box gap line]] - [re-com.tabs :refer [horizontal-bar-tabs vertical-bar-tabs]] [re-demo.utils :refer [panel-title component-title args-table material-design-hyperlink github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/modal_panel.cljs b/src/re_demo/modal_panel.cljs index aff80846..e0224580 100644 --- a/src/re_demo/modal_panel.cljs +++ b/src/re_demo/modal_panel.cljs @@ -1,10 +1,12 @@ (ns re-demo.modal-panel - (:require-macros [re-com.core :refer [handler-fn]]) - (:require [re-com.text :refer [title label]] - [re-com.misc :refer [progress-bar input-text checkbox]] - [re-com.buttons :refer [button]] - [re-com.box :refer [h-box v-box box gap line border]] - [re-com.modal-panel :refer [modal-panel modal-panel-args-desc modal-panel-args]] + ;(:require-macros [re-com.core :refer [handler-fn]]) + (:require [re-com.core :refer [h-box v-box box gap line border title label modal-panel progress-bar input-text checkbox button]] + [re-com.modal-panel :refer [modal-panel-args-desc modal-panel-args]] + ;[re-com.text :refer [title label]] + ;[re-com.misc :refer [progress-bar input-text checkbox]] + ;[re-com.buttons :refer [button]] + ;[re-com.box :refer [h-box v-box box gap line border]] + ;[re-com.modal-panel :refer [modal-panel modal-panel-args-desc modal-panel-args]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/popovers.cljs b/src/re_demo/popovers.cljs index 679b0f2e..cf96d49a 100644 --- a/src/re_demo/popovers.cljs +++ b/src/re_demo/popovers.cljs @@ -1,15 +1,18 @@ (ns re-demo.popovers - (:require-macros [re-com.core :refer [handler-fn]]) - (:require [re-com.text :refer [label]] - [re-com.misc :refer [input-text checkbox radio-button]] - [re-com.buttons :refer [button hyperlink]] - [re-com.box :refer [h-box v-box box gap line scroller border]] - [re-com.popover :refer [popover-content-wrapper popover-content-wrapper-args-desc - popover-anchor-wrapper popover-anchor-wrapper-args-desc - popover-border popover-border-args-desc - popover-tooltip popover-tooltip-args-desc]] - [re-com.dropdown :refer [single-dropdown]] + ;(:require-macros [re-com.core :refer [handler-fn]]) + (:require [re-com.core :refer [h-box v-box box gap line scroller border label input-text checkbox radio-button button hyperlink single-dropdown popover-content-wrapper popover-anchor-wrapper popover-border popover-tooltip] :refer-macros [handler-fn]] + [re-com.popover :refer [popover-content-wrapper-args-desc popover-anchor-wrapper-args-desc popover-border-args-desc popover-tooltip-args-desc]] [re-demo.popover-dialog-demo :as popover-dialog-demo] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [input-text checkbox radio-button]] + ;[re-com.buttons :refer [button hyperlink]] + ;[re-com.box :refer [h-box v-box box gap line scroller border]] + ;[re-com.popover :refer [popover-content-wrapper popover-content-wrapper-args-desc + ; popover-anchor-wrapper popover-anchor-wrapper-args-desc + ; popover-border popover-border-args-desc + ; popover-tooltip popover-tooltip-args-desc]] + ;[re-com.dropdown :refer [single-dropdown]] + ;[re-demo.popover-dialog-demo :as popover-dialog-demo] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/progress_bar.cljs b/src/re_demo/progress_bar.cljs index fcbe5ca3..eaec109a 100644 --- a/src/re_demo/progress_bar.cljs +++ b/src/re_demo/progress_bar.cljs @@ -1,7 +1,10 @@ (ns re-demo.progress-bar - (:require [re-com.text :refer [label]] - [re-com.misc :refer [progress-bar progress-bar-args-desc slider checkbox]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line label progress-bar slider checkbox]] + [re-com.misc :refer [progress-bar-args-desc]] + [re-com.text :refer [label]] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [progress-bar progress-bar-args-desc slider checkbox]] + ;[re-com.box :refer [h-box v-box box gap line]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/radio_button.cljs b/src/re_demo/radio_button.cljs index 1e1cf2e1..de2b940e 100644 --- a/src/re_demo/radio_button.cljs +++ b/src/re_demo/radio_button.cljs @@ -1,6 +1,8 @@ (ns re-demo.radio-button - (:require [re-com.misc :refer [radio-button radio-button-args-desc]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line radio-button]] + [re-com.misc :refer [radio-button-args-desc]] + ;[re-com.misc :refer [radio-button radio-button-args-desc]] + ;[re-com.box :refer [h-box v-box box gap line]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/row_button.cljs b/src/re_demo/row_button.cljs index 45e01d06..bbf933a9 100644 --- a/src/re_demo/row_button.cljs +++ b/src/re_demo/row_button.cljs @@ -1,13 +1,15 @@ (ns re-demo.row-button - (:require-macros [re-com.core :refer [handler-fn]]) - (:require [re-com.text :refer [label]] - [re-com.misc :refer [checkbox]] - [re-com.buttons :refer [row-button row-button-args-desc]] + ;(:require-macros [re-com.core :refer [handler-fn]]) + (:require [re-com.core :refer [h-box v-box box gap line row-button label checkbox horizontal-bar-tabs vertical-bar-tabs] :refer-macros [handler-fn]] + [re-com.buttons :refer [row-button-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [checkbox]] + ;[re-com.buttons :refer [row-button row-button-args-desc]] + ;[re-com.box :refer [h-box v-box box gap line]] + ;[re-com.tabs :refer [horizontal-bar-tabs vertical-bar-tabs]] + [re-com.util :refer [enumerate]] [re-demo.md-circle-icon-button :refer [icons example-icons]] - [re-com.box :refer [h-box v-box box gap line]] - [re-com.tabs :refer [horizontal-bar-tabs vertical-bar-tabs]] [re-demo.utils :refer [panel-title component-title args-table material-design-hyperlink github-hyperlink status-text]] - [re-com.util :refer [enumerate]] [reagent.core :as reagent])) diff --git a/src/re_demo/scroller.cljs b/src/re_demo/scroller.cljs index e2d0081f..ff17b3ae 100644 --- a/src/re_demo/scroller.cljs +++ b/src/re_demo/scroller.cljs @@ -1,5 +1,7 @@ (ns re-demo.scroller - (:require [re-com.box :refer [h-box v-box gap scroller scroller-args-desc]] + (:require [re-com.core :refer [h-box v-box gap scroller]] + [re-com.box :refer [scroller-args-desc]] + ;[re-com.box :refer [h-box v-box gap scroller scroller-args-desc]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) diff --git a/src/re_demo/selection_list.cljs b/src/re_demo/selection_list.cljs index 4c14cdd2..5810fc52 100644 --- a/src/re_demo/selection_list.cljs +++ b/src/re_demo/selection_list.cljs @@ -1,12 +1,13 @@ (ns re-demo.selection-list - (:require - [reagent.core :as reagent] - [re-com.text :refer [label]] - [re-com.misc :refer [checkbox]] - [re-com.box :refer [h-box v-box box]] - [re-com.selection-list :refer [selection-list selection-list-args-desc]] - [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] - [re-com.util :refer [golden-ratio-a golden-ratio-b]])) + (:require [re-com.core :refer [h-box v-box box selection-list label checkbox]] + [re-com.selection-list :refer [selection-list-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [checkbox]] + ;[re-com.box :refer [h-box v-box box]] + ;[re-com.selection-list :refer [selection-list selection-list-args-desc]] + [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] + [re-com.util :refer [golden-ratio-a golden-ratio-b]] + [reagent.core :as reagent])) (defn- options-with diff --git a/src/re_demo/slider.cljs b/src/re_demo/slider.cljs index eeb50732..0366c598 100644 --- a/src/re_demo/slider.cljs +++ b/src/re_demo/slider.cljs @@ -1,8 +1,10 @@ (ns re-demo.slider - (:require [re-com.text :refer [label]] - [re-com.misc :refer [slider slider-args-desc checkbox input-text]] - [re-com.box :refer [h-box v-box box gap line]] - [re-com.tabs :refer [horizontal-bar-tabs vertical-bar-tabs]] + (:require [re-com.core :refer [h-box v-box box gap line label slider checkbox input-text horizontal-bar-tabs vertical-bar-tabs]] + [re-com.misc :refer [slider-args-desc]] + ;[re-com.text :refer [label]] + ;[re-com.misc :refer [slider slider-args-desc checkbox input-text]] + ;[re-com.box :refer [h-box v-box box gap line]] + ;[re-com.tabs :refer [horizontal-bar-tabs vertical-bar-tabs]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] [reagent.core :as reagent])) diff --git a/src/re_demo/tabs.cljs b/src/re_demo/tabs.cljs index de9da088..78fbab91 100644 --- a/src/re_demo/tabs.cljs +++ b/src/re_demo/tabs.cljs @@ -1,13 +1,15 @@ (ns re-demo.tabs - (:require [reagent.core :as reagent] - [alandipert.storage-atom :refer [local-storage]] - [re-com.box :refer [h-box v-box box gap line scroller border]] - [re-com.dropdown :refer [single-dropdown]] - [re-com.text :refer [label]] - [re-com.buttons :refer [button]] + (:require [re-com.core :refer [h-box v-box box gap line scroller border horizontal-tabs horizontal-bar-tabs vertical-bar-tabs horizontal-pill-tabs vertical-pill-tabs label button single-dropdown]] + [re-com.tabs :refer [tabs-args-desc]] + ;[re-com.box :refer [h-box v-box box gap line scroller border]] + ;[re-com.dropdown :refer [single-dropdown]] + ;[re-com.text :refer [label]] + ;[re-com.buttons :refer [button]] + ;[re-com.tabs :refer [horizontal-tabs horizontal-bar-tabs vertical-bar-tabs horizontal-pill-tabs vertical-pill-tabs tabs-args-desc]] [re-com.util :refer [item-for-id]] - [re-com.tabs :refer [horizontal-tabs horizontal-bar-tabs vertical-bar-tabs horizontal-pill-tabs vertical-pill-tabs tabs-args-desc]] - [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) + [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]] + [alandipert.storage-atom :refer [local-storage]] + [reagent.core :as reagent])) (def demos [{:id 1 :label "Tab Styles"} diff --git a/src/re_demo/title.cljs b/src/re_demo/title.cljs index 0af39c89..983e2789 100644 --- a/src/re_demo/title.cljs +++ b/src/re_demo/title.cljs @@ -1,6 +1,8 @@ (ns re-demo.title - (:require [re-com.text :refer [title title-args-desc]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line title]] + [re-com.text :refer [title-args-desc]] + ;[re-com.box :refer [h-box v-box box gap line]] + ;[re-com.text :refer [title title-args-desc]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) diff --git a/src/re_demo/tour.cljs b/src/re_demo/tour.cljs index fe10a012..a5793ac6 100644 --- a/src/re_demo/tour.cljs +++ b/src/re_demo/tour.cljs @@ -1,8 +1,9 @@ (ns re-demo.tour - (:require [re-com.buttons :refer [button]] - [re-com.box :refer [h-box v-box box gap]] - [re-com.tour :refer [make-tour start-tour make-tour-nav]] - [re-com.popover :refer [popover-content-wrapper popover-anchor-wrapper]] + (:require [re-com.core :refer [h-box v-box box gap make-tour start-tour make-tour-nav button popover-content-wrapper popover-anchor-wrapper]] + ;[re-com.tour :refer [make-tour start-tour make-tour-nav]] + ;[re-com.buttons :refer [button]] + ;[re-com.box :refer [h-box v-box box gap]] + ;[re-com.popover :refer [popover-content-wrapper popover-anchor-wrapper]] [re-demo.utils :refer [panel-title component-title github-hyperlink status-text]])) diff --git a/src/re_demo/utils.cljs b/src/re_demo/utils.cljs index bfe30fcc..1bcd7a67 100644 --- a/src/re_demo/utils.cljs +++ b/src/re_demo/utils.cljs @@ -1,7 +1,9 @@ (ns re-demo.utils - (:require [re-com.text :refer [title label]] - [re-com.buttons :refer [hyperlink-href]] - [re-com.box :refer [h-box v-box box gap line]])) + (:require [re-com.core :refer [h-box v-box box gap line title label hyperlink-href]] + ;[re-com.text :refer [title label]] + ;[re-com.buttons :refer [hyperlink-href]] + ;[re-com.box :refer [h-box v-box box gap line]] + )) (defn re-com-title diff --git a/src/re_demo/v_box.cljs b/src/re_demo/v_box.cljs index e56d9ded..f1dd31dd 100644 --- a/src/re_demo/v_box.cljs +++ b/src/re_demo/v_box.cljs @@ -1,6 +1,8 @@ (ns re-demo.v-box - (:require [re-com.box :refer [h-box gap v-box v-box-args-desc]] - [re-com.buttons :refer [hyperlink-href]] + (:require [re-com.core :refer [h-box gap v-box hyperlink-href]] + [re-com.box :refer [v-box-args-desc]] + ;[re-com.box :refer [h-box gap v-box v-box-args-desc]] + ;[re-com.buttons :refer [hyperlink-href]] [re-demo.utils :refer [panel-title component-title args-table github-hyperlink status-text]])) diff --git a/src/re_demo/welcome.cljs b/src/re_demo/welcome.cljs index cd7779a1..8336ece9 100644 --- a/src/re_demo/welcome.cljs +++ b/src/re_demo/welcome.cljs @@ -1,11 +1,11 @@ (ns re-demo.welcome - (:require [re-com.text :refer [title label]] - [re-com.buttons :refer [hyperlink-href]] - [re-com.box :refer [h-box v-box box gap line]] + (:require [re-com.core :refer [h-box v-box box gap line title label hyperlink-href]] + ;[re-com.box :refer [h-box v-box box gap line]] + ;[re-com.text :refer [title label]] + ;[re-com.buttons :refer [hyperlink-href]] [re-demo.utils :refer [panel-title component-title]])) - (defn panel2 [] [v-box