@flourish/ui-styles 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/RELEASE_NOTES.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flourish/ui-styles",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Flourish module for styling UI elements",
|
|
5
5
|
"main": "ui-styles.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"precommit": "lint-staged"
|
|
13
13
|
},
|
|
14
14
|
"author": "Kiln Enterprises Ltd",
|
|
15
|
-
"license": "
|
|
15
|
+
"license": "https://flourish.studio/terms/fcl/",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@flourish/pocket-knife": "^0.5.0",
|
|
18
18
|
"d3-selection": "^1.4.0"
|
|
@@ -49,7 +49,6 @@ ButtonStyle.prototype.update = function() {
|
|
|
49
49
|
this._styles.select(this._selector + ".fl-control .button")
|
|
50
50
|
.style("overflow", "hidden")
|
|
51
51
|
.style("white-space", "nowrap")
|
|
52
|
-
.style("box-sizing", "content-box")
|
|
53
52
|
.style("margin", "0 2px 0 0 !important")
|
|
54
53
|
.style("background-color", background_color)
|
|
55
54
|
.style("color", text_color)
|
|
@@ -44,22 +44,21 @@ DropdownStyle.prototype.update = function() {
|
|
|
44
44
|
this._styles.select(this._selector)
|
|
45
45
|
.style("pointer-events", "all");
|
|
46
46
|
|
|
47
|
-
this._styles.select(this._selector + "
|
|
47
|
+
this._styles.select(this._selector + " select")
|
|
48
48
|
.style("display", "inline-block")
|
|
49
49
|
.style("cursor", "pointer")
|
|
50
50
|
.style("overflow", "hidden")
|
|
51
51
|
.style("white-space", "nowrap")
|
|
52
52
|
.style("position", "relative")
|
|
53
|
+
.style("font-family", "inherit")
|
|
53
54
|
.style("background-color", background_color)
|
|
54
55
|
.style("color", text_color)
|
|
55
56
|
.style("border", this._state.border_style == "bottom" ? this._state.border_width + "px solid transparent" : this._state.border_width + "px solid " + border_color)
|
|
56
57
|
.style("border-bottom", this._state.border_style == "bottom" ? this._state.border_width + "px solid " + border_color : null)
|
|
57
58
|
.style("border-radius", this._state.border_style == "bottom" ? null : this._state.border_radius + "px");
|
|
58
59
|
|
|
59
|
-
this._styles.select(this._selector + "
|
|
60
|
-
.style("
|
|
61
|
-
.select("div")
|
|
62
|
-
.style("border-top-color", text_color + " !important");
|
|
60
|
+
this._styles.select(this._selector + ":after")
|
|
61
|
+
.style("right", this._state.border_style == "bottom" ? null : this._state.border_width + 5 + "px");
|
|
63
62
|
|
|
64
63
|
this._styles.select(this._selector + " .main .current")
|
|
65
64
|
.style("line-height", "1em")
|
|
@@ -3,7 +3,7 @@ import Stylesheet from "../lib/js2css";
|
|
|
3
3
|
var DEFAULTS = Object.freeze({
|
|
4
4
|
font_size: 1,
|
|
5
5
|
font_weight: "bold",
|
|
6
|
-
|
|
6
|
+
height: 2
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
function GeneralControlsStyle(state_, selector_, layout_) {
|
|
@@ -43,20 +43,21 @@ GeneralControlsStyle.prototype.update = function() {
|
|
|
43
43
|
.style("vertical-align", "middle");
|
|
44
44
|
|
|
45
45
|
this._styles.select(this._selector + ".fl-control .button")
|
|
46
|
-
.style("
|
|
46
|
+
.style("height", this._state.height + "rem")
|
|
47
|
+
.style("padding", "0 0.5em");
|
|
47
48
|
|
|
48
|
-
this._styles.select(this._selector + "
|
|
49
|
-
.style("
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
.style("padding",
|
|
49
|
+
this._styles.select(this._selector + "-dropdown select")
|
|
50
|
+
.style("height", this._state.height + "rem")
|
|
51
|
+
.style("font-size", this._state.font_size + "rem")
|
|
52
|
+
.style("font-weight", this._state.font_weight)
|
|
53
|
+
.style("padding", 0 + " " + this._state.height * 0.1 + "rem");
|
|
53
54
|
|
|
54
55
|
this._styles.select(this._selector + "-slider .slider-end-labels")
|
|
55
56
|
.style("font-size", this._state.font_size + "rem")
|
|
56
57
|
.style("font-weight", this._state.font_weight);
|
|
57
58
|
|
|
58
59
|
this._styles.select(this._selector + "-slider")
|
|
59
|
-
.style("
|
|
60
|
+
.style("height", this._state.height + "rem");
|
|
60
61
|
|
|
61
62
|
// Some additional styling for slider controls
|
|
62
63
|
// TODO: should move this somewhere else at some point
|
package/ui-styles.js
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
var DEFAULTS = Object.freeze({
|
|
60
60
|
font_size: 1,
|
|
61
61
|
font_weight: "bold",
|
|
62
|
-
|
|
62
|
+
height: 2
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
function GeneralControlsStyle(state_, selector_, layout_) {
|
|
@@ -99,20 +99,21 @@
|
|
|
99
99
|
.style("vertical-align", "middle");
|
|
100
100
|
|
|
101
101
|
this._styles.select(this._selector + ".fl-control .button")
|
|
102
|
-
.style("
|
|
102
|
+
.style("height", this._state.height + "rem")
|
|
103
|
+
.style("padding", "0 0.5em");
|
|
103
104
|
|
|
104
|
-
this._styles.select(this._selector + "
|
|
105
|
-
.style("
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
.style("padding",
|
|
105
|
+
this._styles.select(this._selector + "-dropdown select")
|
|
106
|
+
.style("height", this._state.height + "rem")
|
|
107
|
+
.style("font-size", this._state.font_size + "rem")
|
|
108
|
+
.style("font-weight", this._state.font_weight)
|
|
109
|
+
.style("padding", 0 + " " + this._state.height * 0.1 + "rem");
|
|
109
110
|
|
|
110
111
|
this._styles.select(this._selector + "-slider .slider-end-labels")
|
|
111
112
|
.style("font-size", this._state.font_size + "rem")
|
|
112
113
|
.style("font-weight", this._state.font_weight);
|
|
113
114
|
|
|
114
115
|
this._styles.select(this._selector + "-slider")
|
|
115
|
-
.style("
|
|
116
|
+
.style("height", this._state.height + "rem");
|
|
116
117
|
|
|
117
118
|
// Some additional styling for slider controls
|
|
118
119
|
// TODO: should move this somewhere else at some point
|
|
@@ -744,7 +745,6 @@
|
|
|
744
745
|
this._styles.select(this._selector + ".fl-control .button")
|
|
745
746
|
.style("overflow", "hidden")
|
|
746
747
|
.style("white-space", "nowrap")
|
|
747
|
-
.style("box-sizing", "content-box")
|
|
748
748
|
.style("margin", "0 2px 0 0 !important")
|
|
749
749
|
.style("background-color", background_color)
|
|
750
750
|
.style("color", text_color)
|
|
@@ -820,22 +820,21 @@
|
|
|
820
820
|
this._styles.select(this._selector)
|
|
821
821
|
.style("pointer-events", "all");
|
|
822
822
|
|
|
823
|
-
this._styles.select(this._selector + "
|
|
823
|
+
this._styles.select(this._selector + " select")
|
|
824
824
|
.style("display", "inline-block")
|
|
825
825
|
.style("cursor", "pointer")
|
|
826
826
|
.style("overflow", "hidden")
|
|
827
827
|
.style("white-space", "nowrap")
|
|
828
828
|
.style("position", "relative")
|
|
829
|
+
.style("font-family", "inherit")
|
|
829
830
|
.style("background-color", background_color)
|
|
830
831
|
.style("color", text_color)
|
|
831
832
|
.style("border", this._state.border_style == "bottom" ? this._state.border_width + "px solid transparent" : this._state.border_width + "px solid " + border_color)
|
|
832
833
|
.style("border-bottom", this._state.border_style == "bottom" ? this._state.border_width + "px solid " + border_color : null)
|
|
833
834
|
.style("border-radius", this._state.border_style == "bottom" ? null : this._state.border_radius + "px");
|
|
834
835
|
|
|
835
|
-
this._styles.select(this._selector + "
|
|
836
|
-
.style("
|
|
837
|
-
.select("div")
|
|
838
|
-
.style("border-top-color", text_color + " !important");
|
|
836
|
+
this._styles.select(this._selector + ":after")
|
|
837
|
+
.style("right", this._state.border_style == "bottom" ? null : this._state.border_width + 5 + "px");
|
|
839
838
|
|
|
840
839
|
this._styles.select(this._selector + " .main .current")
|
|
841
840
|
.style("line-height", "1em")
|