From c7a44ace9db43a5f894a0344384b09520175df80 Mon Sep 17 00:00:00 2001 From: Thomas Danecker Date: Mon, 3 Feb 2020 15:44:44 +0100 Subject: [PATCH 1/9] use consistent parinfer style --- src/sodium/keys.clj | 76 ++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/src/sodium/keys.clj b/src/sodium/keys.clj index 53dc8cb..d9b0990 100644 --- a/src/sodium/keys.clj +++ b/src/sodium/keys.clj @@ -81,8 +81,8 @@ :secondary? ;; bool :size ;; enum: [mini tiny small medium large big huge massive] :tab-index ;; number|string - :toggle? ;; bool - ]) + :toggle?]) ;; bool + ;;; From https://react.semantic-ui.com/modules/checkbox @@ -174,8 +174,8 @@ :test :trigger :upward? - :value - ]) + :value]) + ;;; From https://react.semantic-ui.com/collections/form @@ -189,8 +189,8 @@ :size :success? :warning? - :widths - ]) + :widths]) + ;;; From https://react.semantic-ui.com/collections/form (tab: Form.Field) @@ -202,8 +202,8 @@ :label ;; node|object (mutually exclusive with :children) :required? ;; bool :type ;; custom - :width ;; enum: [1,,, 16, one,,, sixteen] - ]) + :width]) ;; enum: [1,,, 16, one,,, sixteen] + ;;; From https://react.semantic-ui.com/collections/form (add-key-set :form-group @@ -273,8 +273,8 @@ :size :sub? :subheader - :text-align - ]) + :text-align]) + ;;; From https://react.semantic-ui.com/elements/icon @@ -291,13 +291,13 @@ :loading? :name :rotated - :size - ]) + :size]) + ;;; From https://react.semantic-ui.com/elements/icon (tab: Icon.Group) (add-key-set :icon-group - [:size - ]) + [:size]) + ;;; From https://react.semantic-ui.com/elements/image (add-key-set :image @@ -320,8 +320,8 @@ :ui? :vertical-align :width - :wrapped - ]) + :wrapped]) + ;;; From https://react.semantic-ui.com/elements/input @@ -349,16 +349,16 @@ :size :tab-index :transparent? - :type - ]) + :type]) + ;;; HTML input parameters not listed in the semantic-ui docs (add-key-set :input-html [:value :step - :placeholder - ]) + :placeholder]) + ;;; From https://react.semantic-ui.com/elements/label @@ -435,14 +435,14 @@ :tabular? :text? :vertical? - :widths - ]) + :widths]) + ;;; From https://react.semantic-ui.com/collections/menu (tab: Menu.Header) (add-key-set :menu-header - [:content - ]) + [:content]) + ;;; From https://react.semantic-ui.com/collections/menu (tab: Menu.Item) (add-key-set :menu-item @@ -456,13 +456,13 @@ :index :link? :name - :position - ]) + :position]) + ;;; From https://react.semantic-ui.com/collections/menu (tab: Menu.Menu) (add-key-set :menu-menu - [:position - ]) + [:position]) + ;;; From https://react.semantic-ui.com/modules/modal (add-key-set :modal @@ -484,25 +484,25 @@ :on-unmount :open? :size - :style - ]) + :style]) + ;;; From https://react.semantic-ui.com/modules/modal (tab: Modal.Header) (add-key-set :modal-header - [:content - ]) + [:content]) + ;;; From https://react.semantic-ui.com/modules/modal (tab: Modal.Content) (add-key-set :modal-content [:content :image? - :scrolling? - ]) + :scrolling?]) + ;;; From https://react.semantic-ui.com/modules/modal (tab: Modal.Description) (add-key-set :modal-description - [ - ]) + []) + ;;; From https://react.semantic-ui.com/modules/modal (tab: Modal.Actions) (add-key-set :modal-actions @@ -568,8 +568,8 @@ :stacked? :tertiary? :text-align - :vertical? - ]) + :vertical?]) + ;;; From https://react.semantic-ui.com/elements/segment (tab: Segment.Group) (add-key-set :segment-group From c5706b40b7830a44a2c19b6e7e6a2de58a9fd9c4 Mon Sep 17 00:00:00 2001 From: Thomas Danecker Date: Mon, 3 Feb 2020 15:48:40 +0100 Subject: [PATCH 2/9] fix typo in dropdown keys --- src/sodium/keys.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sodium/keys.clj b/src/sodium/keys.clj index d9b0990..7942784 100644 --- a/src/sodium/keys.clj +++ b/src/sodium/keys.clj @@ -171,7 +171,7 @@ :selection :simple? :tab-index - :test + :text :trigger :upward? :value]) From 86abb5d027188ccebf90b7bca18161b27d1fbb90 Mon Sep 17 00:00:00 2001 From: Thomas Danecker Date: Mon, 3 Feb 2020 15:51:37 +0100 Subject: [PATCH 3/9] add dropdown menu, advanced list content and message components --- src/sodium/core.cljs | 8 +++++ src/sodium/keys.clj | 70 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/src/sodium/core.cljs b/src/sodium/core.cljs index 79048a6..3027bb2 100644 --- a/src/sodium/core.cljs +++ b/src/sodium/core.cljs @@ -71,6 +71,9 @@ (def-simple-component checkbox sa/Checkbox [:basic :checkbox]) (def-simple-component container sa/Container [:basic :container]) (def-simple-component dropdown sa/Dropdown [:basic :dropdown]) +(def-simple-component dropdown-divider sa/DropdownDivider [:basic :dropdown-divider]) +(def-simple-component dropdown-item sa/DropdownItem [:basic :dropdown-item]) +(def-simple-component dropdown-menu sa/DropdownMenu [:basic :dropdown-menu]) (def-simple-component divider sa/Divider [:basic :divider]) (def-simple-component form sa/Form [:basic :form]) (def-simple-component form-input sa/FormInput [:basic :form-field :input :input-html]) @@ -85,11 +88,16 @@ (def-simple-component input sa/Input [:basic :form-field :input :input-html]) (def-simple-component label sa/Label [:basic :label]) (def-simple-component list-na sa/ListSA [:basic :list]) ;; (Renamed, to avoid clash with clojure.core/list) +(def-simple-component list-content sa/ListContent [:basic :list-content]) +(def-simple-component list-description sa/ListDescription [:basic :list-description]) +(def-simple-component list-header sa/ListHeader [:basic :list-header]) +(def-simple-component list-icon sa/ListIcon [:basic :list-icon]) (def-simple-component list-item sa/ListItem [:basic :list-item]) (def-simple-component menu sa/Menu [:basic :menu]) (def-simple-component menu-header sa/MenuHeader [:basic :menu-header]) (def-simple-component menu-item sa/MenuItem [:basic :menu-item]) (def-simple-component menu-menu sa/MenuMenu [:basic :menu-menu]) +(def-simple-component message sa/Message [:basic :message]) (def-simple-component modal sa/Modal [:basic :modal]) (def-simple-component modal-header sa/ModalHeader [:basic :modal-header]) (def-simple-component modal-content sa/ModalContent [:basic :modal-content]) diff --git a/src/sodium/keys.clj b/src/sodium/keys.clj index 7942784..224ada6 100644 --- a/src/sodium/keys.clj +++ b/src/sodium/keys.clj @@ -135,6 +135,7 @@ :default-open? :default-selected-label :default-value + :direction :disabled? :error? :floating? @@ -177,6 +178,29 @@ :value]) +;;; From https://react.semantic-ui.com/modules/dropdown (tab: Dropdown.Item) +(add-key-set :dropdown-item + [:active? + :content + :description + :disabled? + :flag + :icon + :image + :label + :on-click + :selected? + :text + :value]) + + +;;; From https://react.semantic-ui.com/modules/dropdown (tab: Dropdown.Menu) +(add-key-set :dropdown-menu + [:content + :direction + :open? + :scrolling?]) + ;;; From https://react.semantic-ui.com/collections/form (add-key-set :form @@ -401,6 +425,31 @@ :size :vertical-align]) + +;;; From https://react.semantic-ui.com/elements/list (tab: List.Content) +(add-key-set :list-content + [:content + :description + :floated + :header + :vertical-align]) + + +;;; From https://react.semantic-ui.com/elements/list (tab: List.Description) +(add-key-set :list-description + [:content]) + + +;;; From https://react.semantic-ui.com/elements/list (tab: List.Header) +(add-key-set :list-header + [:content]) + + +;;; From https://react.semantic-ui.com/elements/list (tab: List.Icon) +(add-key-set :list-icon + [:vertical-align]) + + ;;; From https://react.semantic-ui.com/elements/list (tab: List.Item) (add-key-set :list-item [:active? @@ -464,6 +513,27 @@ [:position]) +;;; From https://react.semantic-ui.com/collections/message +(add-key-set :message + [:attached + :color + :compact? + :content + :error? + :floating? + :header + :icon + :info? + :list + :negative? + :on-dismiss + :positive? + :size + :success? + :visible? + :warning?]) + + ;;; From https://react.semantic-ui.com/modules/modal (add-key-set :modal [:actions From fc7931b338a316c48029a9e85260a18fe3e4e588 Mon Sep 17 00:00:00 2001 From: Thomas Danecker Date: Mon, 30 Mar 2020 05:56:22 +0200 Subject: [PATCH 4/9] update soda-ash version --- project.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.clj b/project.clj index d062e20..3b2c1dc 100644 --- a/project.clj +++ b/project.clj @@ -8,7 +8,7 @@ [org.clojure/clojurescript "1.10.238"] [re-frame "0.10.5"] [reagent "0.8.1"] - [soda-ash "0.79.1"] + [soda-ash "0.83.0"] [com.degel/iron "0.4.0"]] :plugins [[lein-cljsbuild "1.1.7"] [lein-doo "0.1.8"]] From fbf15323c4e09901c9ae204a800315a981a097af Mon Sep 17 00:00:00 2001 From: Thomas Danecker Date: Mon, 16 Mar 2020 12:39:05 +0100 Subject: [PATCH 5/9] add accordion component --- src/sodium/core.cljs | 4 ++++ src/sodium/keys.clj | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/sodium/core.cljs b/src/sodium/core.cljs index 3027bb2..694fa4f 100644 --- a/src/sodium/core.cljs +++ b/src/sodium/core.cljs @@ -67,6 +67,10 @@ ;;; Components that we supply so far. More coming soon. ;;; The final argument here is the descriptor groups of the acceptable parameters. ;;; For more details about this, see keys.clj and macros.clj +(def-simple-component accordion sa/Accordion [:basic :accordion]) +(def-simple-component accordion-content sa/AccordionContent [:basic :accordion-content]) +(def-simple-component accordion-panel sa/AccordionPanel [:basic :accordion-panel]) +(def-simple-component accordion-title sa/AccordionTitle [:basic :accordion-title]) (def-simple-component advertisement sa/Advertisement [:basic :advertisement]) (def-simple-component checkbox sa/Checkbox [:basic :checkbox]) (def-simple-component container sa/Container [:basic :container]) diff --git a/src/sodium/keys.clj b/src/sodium/keys.clj index 224ada6..e42dd27 100644 --- a/src/sodium/keys.clj +++ b/src/sodium/keys.clj @@ -51,6 +51,36 @@ :title :translate]) + +;;; From https://react.semantic-ui.com/modules/accordion +(add-key-set :accordion + [:active-index + :default-active-index + :exclusive? + :fluid? + :inverted? + :on-title-click + :panels + :styled?]) + +;;; From https://react.semantic-ui.com/modules/accordion (tab: Accordion.Content) +(add-key-set :accordion-content + [:active?]) + +;;; From https://react.semantic-ui.com/modules/accordion (tab: Accordion.Panel) +(add-key-set :accordion-panel + [:active? + :content + :index + :on-title-click + :title]) + +;;; From https://react.semantic-ui.com/modules/accordion (tab: Accordion.Title) +(add-key-set :accordion-title + [:active? + :icon + :index]) + ;;; From https://react.semantic-ui.com/views/advertisement (add-key-set :advertisement [:centered? From c7e4c9bd68f4bfe684f50779f73075eff856d5b2 Mon Sep 17 00:00:00 2001 From: Thomas Danecker Date: Mon, 16 Mar 2020 12:39:42 +0100 Subject: [PATCH 6/9] add form-checkbox component --- src/sodium/core.cljs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sodium/core.cljs b/src/sodium/core.cljs index 694fa4f..97dd102 100644 --- a/src/sodium/core.cljs +++ b/src/sodium/core.cljs @@ -80,6 +80,7 @@ (def-simple-component dropdown-menu sa/DropdownMenu [:basic :dropdown-menu]) (def-simple-component divider sa/Divider [:basic :divider]) (def-simple-component form sa/Form [:basic :form]) +(def-simple-component form-checkbox sa/FormCheckbox [:basic :form-field :checkbox]) (def-simple-component form-input sa/FormInput [:basic :form-field :input :input-html]) (def-simple-component form-group sa/FormGroup [:basic :form-group]) (def-simple-component grid sa/Grid [:basic :grid]) From d623292f72b7377eafef4fa66a2610a078477aed Mon Sep 17 00:00:00 2001 From: Thomas Danecker Date: Mon, 16 Mar 2020 12:40:01 +0100 Subject: [PATCH 7/9] add progress component --- src/sodium/core.cljs | 1 + src/sodium/keys.clj | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/sodium/core.cljs b/src/sodium/core.cljs index 97dd102..25fc3c2 100644 --- a/src/sodium/core.cljs +++ b/src/sodium/core.cljs @@ -108,6 +108,7 @@ (def-simple-component modal-content sa/ModalContent [:basic :modal-content]) (def-simple-component modal-description sa/ModalDescription [:basic :modal-description]) (def-simple-component modal-actions sa/ModalActions [:basic :modal-actions]) +(def-simple-component progress sa/Progress [:basic :progress]) (def-simple-component rail sa/Rail [:basic :rail]) (def-simple-component search sa/Search [:basic :search]) (def-simple-component segment sa/Segment [:basic :segment]) diff --git a/src/sodium/keys.clj b/src/sodium/keys.clj index e42dd27..f33f36b 100644 --- a/src/sodium/keys.clj +++ b/src/sodium/keys.clj @@ -610,6 +610,27 @@ :on-action-click]) +;;; From https://react.semantic-ui.com/modules/progress +(add-key-set :progress + [:active? + :attached + :auto-success + :color + :disabled? + :error? + :indicating? + :inverted? + :label + :percent + :precision + :progress + :size + :success? + :total + :value + :warning?]) + + ;;; From https://react.semantic-ui.com/elements/rail (add-key-set :rail [:attached? From ae661acfd90eb5680734943b6950de172fef654f Mon Sep 17 00:00:00 2001 From: Thomas Danecker Date: Tue, 24 Mar 2020 20:55:51 +0100 Subject: [PATCH 8/9] add card components --- src/sodium/core.cljs | 6 ++++++ src/sodium/keys.clj | 50 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/src/sodium/core.cljs b/src/sodium/core.cljs index 25fc3c2..ec7e774 100644 --- a/src/sodium/core.cljs +++ b/src/sodium/core.cljs @@ -72,6 +72,12 @@ (def-simple-component accordion-panel sa/AccordionPanel [:basic :accordion-panel]) (def-simple-component accordion-title sa/AccordionTitle [:basic :accordion-title]) (def-simple-component advertisement sa/Advertisement [:basic :advertisement]) +(def-simple-component card sa/Card [:basic :card]) +(def-simple-component card-content sa/CardContent [:basic :card-content]) +(def-simple-component card-description sa/CardDescription [:basic :card-description]) +(def-simple-component card-group sa/CardGroup [:basic :card-group]) +(def-simple-component card-header sa/CardHeader [:basic :card-header]) +(def-simple-component card-meta sa/CardMeta [:basic :card-meta]) (def-simple-component checkbox sa/Checkbox [:basic :checkbox]) (def-simple-component container sa/Container [:basic :container]) (def-simple-component dropdown sa/Dropdown [:basic :dropdown]) diff --git a/src/sodium/keys.clj b/src/sodium/keys.clj index f33f36b..ff8a57a 100644 --- a/src/sodium/keys.clj +++ b/src/sodium/keys.clj @@ -114,6 +114,56 @@ :toggle?]) ;; bool +;;; From https://react.semantic-ui.com/views/card +(add-key-set :card + [:centered? + :color + :content + :description + :extra + :fluid? + :header + :href + :image + :link? + :meta + :on-click + :raised?]) + +;;; From https://react.semantic-ui.com/views/card (tab: Card.Content) +(add-key-set :card-content + [:content + :description + :extra? + :header + :meta + :text-align]) + +;;; From https://react.semantic-ui.com/views/card (tab: Card.Description) +(add-key-set :card-description + [:content + :text-align]) + +;;; From https://react.semantic-ui.com/views/card (tab: Card.Group) +(add-key-set :card-group + [:centered? + :content + :doubling? + :items + :items-per-row + :stackable? + :text-align]) + +;;; From https://react.semantic-ui.com/views/card (tab: Card.Header) +(add-key-set :card-header + [:content + :text-align]) + +;;; From https://react.semantic-ui.com/views/card (tab: Card.Meta) +(add-key-set :card-meta + [:content + :text-align]) + ;;; From https://react.semantic-ui.com/modules/checkbox (add-key-set :checkbox From 5e6b366bf1addd193ff4c19f6385123c373e5ae7 Mon Sep 17 00:00:00 2001 From: Thomas Danecker Date: Fri, 24 Apr 2020 17:12:16 +0200 Subject: [PATCH 9/9] add form field error key --- src/sodium/keys.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sodium/keys.clj b/src/sodium/keys.clj index ff8a57a..76b6a2b 100644 --- a/src/sodium/keys.clj +++ b/src/sodium/keys.clj @@ -301,6 +301,7 @@ (add-key-set :form-field [:control ;; custom (mutually exclusive with :children) :disabled? ;; bool + :error ;; custom :error? ;; bool :inline? ;; bool :label ;; node|object (mutually exclusive with :children)