Skip to content

Commit

Permalink
v0.6.0 - Update deps, :on-click everywhere, fix handling true
Browse files Browse the repository at this point in the history
  • Loading branch information
deg committed Oct 15, 2017
1 parent 4239ced commit bb64849
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ _(nothing)_
### Fixed
_(nothing)_

## [0.6.0]
### Changed
- Updated dependencies: re-frame, lein-doo
### Added
- Support :on-click in all components
### Fixed
- Correctly handle true value from dom

## [0.5.0]- 2017-10-02
### Added
- Added components advertisement, divider, icon, icon-group, menu-header, menu-menu, segment, segment-group
Expand Down Expand Up @@ -54,7 +62,8 @@ _(nothing)_
- Minor helper functions: `<sub`, `>evt`, etc.


[Unreleased]: https://github.com/deg/sodium/compare/a1dd09e...HEAD
[Unreleased]: https://github.com/deg/sodium/compare/HEAD...HEAD
[0.6.0]: https://github.com/deg/sodium/compare/a1dd09e...HEAD
[0.5.0]: https://github.com/deg/sodium/compare/0dd1e35...a1dd09e
[0.4.0]: https://github.com/deg/sodium/compare/17de322...0dd1e35
[0.3.0]: https://github.com/deg/sodium/compare/043f00a...17de322
Expand Down
6 changes: 3 additions & 3 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
(defproject
com.degel/sodium "0.6.0-SNAPSHOT"
com.degel/sodium "0.6.0"
:description "A wrapper around soda-ash and semantic-ui-react"
:url "https://github.com/deg/sodium"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha17"]
[org.clojure/clojurescript "1.9.908"]
[re-frame "0.10.1"]
[re-frame "0.10.2"]
[reagent "0.7.0"]
[soda-ash "0.4.0"]]
:plugins [[lein-cljsbuild "1.1.7"]
[lein-doo "0.1.7"]]
[lein-doo "0.1.8"]]
:cljsbuild
{:builds
[{:id "dev"
Expand Down
7 changes: 6 additions & 1 deletion src/sodium/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
[sodium.macros :refer [defcomponent def-simple-component]])
(:require
[clojure.spec.alpha :as s]
[re-frame.loggers :refer [console]]
[soda-ash.core :as sa]
[sodium.re-utils :refer [<sub >evt]]
[sodium.utils :as utils]))

(s/def :sodium/size #{:tiny :small :medium :large :huge})

(defn- negligible?
[x]
(if (seqable? x) (empty? x) (not x)))

(defn >event
"Return a function suitable for an on-* handler, to deliver the value
into into a re-frame event. See also >atom.
Expand All @@ -29,7 +34,7 @@
([event default coercer]
#(>evt (let [value (or (.-value %2) (.-checked %2))]
(conj event
(coercer (if (empty? value)
(coercer (if (negligible? value)
default
value)))))))

Expand Down
7 changes: 1 addition & 6 deletions src/sodium/keys.clj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
;; *** NOT LISTED IN DOC!
:key
:style
:on-click
])

;;; From https://react.semantic-ui.com/views/advertisement
Expand All @@ -57,7 +58,6 @@
:label-position ;; enum [right left]
:loading? ;; bool
:negative? ;; bool
:on-click ;; func
:positive? ;; bool
:primary? ;; bool
:secondary? ;; bool
Expand All @@ -78,7 +78,6 @@
:label
:name
:on-change
:on-click
:on-mouse-down
:radio
:read-only?
Expand Down Expand Up @@ -134,7 +133,6 @@
:on-add-item
:on-blur
:on-change
:on-click
:on-close
:on-focus
:on-label-click
Expand Down Expand Up @@ -354,7 +352,6 @@
:horizontal?
:icon
:image
:on-click
:on-remove
:pointing
:remove-icon
Expand Down Expand Up @@ -389,7 +386,6 @@
:header
:icon
:image
:on-click
:value])

;;; From https://react.semantic-ui.com/collections/menu
Expand Down Expand Up @@ -436,7 +432,6 @@
:index
:link?
:name
:on-click
:position
])

Expand Down

0 comments on commit bb64849

Please sign in to comment.