Skip to content

Commit

Permalink
Merge pull request #686 from Tradeshift/v11/green-fix
Browse files Browse the repository at this point in the history
 [Colors] Use the correct `@ts-green`
  • Loading branch information
Daniel Spitzer authored Nov 7, 2018
2 parents a3be008 + b250b41 commit f35039f
Show file tree
Hide file tree
Showing 29 changed files with 608 additions and 608 deletions.
2 changes: 1 addition & 1 deletion docs/src/less/dox-page-intro.less
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
circle,
polygon,
path {
fill: @ts-green-lite;
fill: @ts-green;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/xhtml/appendix/autofocus/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
padding: 0 4px;
}
article .ts-buttons {
margin-top: 44px;
margin-top: 40px;
}
</style>
</head>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/xhtml/appendix/autolayout/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</script>
<style>
.ts-form {
margin-top: -22px; /* hack for empty SPAN */
margin-top: -20px; /* hack for empty SPAN */
}
label > span {
font-weight: 300;
Expand Down
12 changes: 6 additions & 6 deletions docs/src/xhtml/appendix/colors/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ts.ui.ready(function rendercolors() {
var rule = rules[i];
var color = rule.selectorText.substring(5);
var rgb = rule.style.color;
var channels = rgb.match(/rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)/);
var channels = rgb.match(/rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})/);
var row = color.split('-')[1];
colors[row] = colors[row] || {};
var hsl = rgbToHsl(channels[1], channels[2], channels[3]);
Expand Down Expand Up @@ -60,16 +60,16 @@ function rgbToHsl(r, g, b) {
}
h /= 6;
}
h = Math.floor(h * 360);
s = Math.floor(s * 100);
l = Math.floor(l * 100);
h = Math.round(h * 360);
s = Math.round(s * 100);
l = Math.round(l * 100);

return ['hsl(' + h + ', ' + s + ', ' + l + ')', h, s, l];
return ['hsl(' + h + ', ' + s + '%, ' + l + '%)', h, s, l];
}

// @see https://gist.github.com/sabman/1018593
function rgbToHex(rgb) {
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
rgb = rgb.match(/rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})/);
function hex(x) {
return ('0' + parseInt(x).toString(16)).slice(-2);
}
Expand Down
32 changes: 16 additions & 16 deletions docs/src/xhtml/components/bars/tabbar.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -104,33 +104,33 @@
<div data-ts="DoxApi">
<script type="application/json">
{
name: "ts.ui.TabBarSpirit",
methods: [
"name": "ts.ui.TabBarSpirit",
"methods": [
{
name: "tabs",
args: "(array)",
desc: "Get or set the tabs."
"name": "tabs",
"args": "(array)",
"desc": "Get or set the tabs."
},
{
name: "buttons",
args: "(array)",
desc: "Get or set the buttons."
"name": "buttons",
"args": "(array)",
"desc": "Get or set the buttons."
},
{
name: "clear",
desc: "Clear all tabs and buttons."
"name": "clear",
"desc": "Clear all tabs and buttons."
},
{
name: "uncompact",
desc: "Don't collect multiple tertiary buttons in a menu. You can call `compact` to restore default behavior."
"name": "uncompact",
"desc": "Don't collect multiple tertiary buttons in a menu. You can call `compact` to restore default behavior."
},
{
name: "white",
desc: "Use [white](white) background for selected tab."
"name": "white",
"desc": "Use [white](white) background for selected tab."
},
{
name: "lite",
desc: "Use [light](lite) background for selected tab."
"name": "lite",
"desc": "Use [light](lite) background for selected tab."
}
]
}
Expand Down
152 changes: 76 additions & 76 deletions docs/src/xhtml/components/bars/toolbar.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -134,53 +134,53 @@
<div data-ts="DoxApi">
<script type="application/json">
{
name: "ts.ui.SearchModel",
properties: [
"name": "ts.ui.SearchModel",
"properties": [
{
name: "value",
type: "string",
desc: "The search field value."
"name": "value",
"type": "string",
"desc": "The search field value."
},
{
name: "idletime",
type: "number",
desc: "Time before the user is considered idle."
"name": "idletime",
"type": "number",
"desc": "Time before the user is considered idle."
},
{
name: "info",
type: "string",
desc: "The placeholder and/or mouseover tooltip."
"name": "info",
"type": "string",
"desc": "The placeholder and/or mouseover tooltip."
},
{
name: "flex",
type: "number",
desc: "Fill the available width of the ToolBar. The value should be `1`."
"name": "flex",
"type": "number",
"desc": "Fill the available width of the ToolBar. The value should be `1`."
}
],
methods: [
"methods": [
{
name: "onsearch",
desc: "Called when the user presses ENTER."
"name": "onsearch",
"desc": "Called when the user presses ENTER."
},
{
name: "onidle",
desc: "Called when the user pauses typing."
"name": "onidle",
"desc": "Called when the user pauses typing."
},
{
name: "onfocus",
desc: "Called when the search field is focused."
"name": "onfocus",
"desc": "Called when the search field is focused."
},
{
name: "onblur",
desc: "Called when the search field gets blurred."
"name": "onblur",
"desc": "Called when the search field gets blurred."
},
{
name: "focus",
desc: "Focus the search field."
"name": "focus",
"desc": "Focus the search field."
},
{
name: "blur",
desc: "Blur the search field."
"name": "blur",
"desc": "Blur the search field."
}
]
}
Expand All @@ -192,59 +192,59 @@
<div data-ts="DoxApi">
<script type="application/json">
{
name: "ts.ui.ToolBar",
methods: [
"name": "ts.ui.ToolBar",
"methods": [
{
name: "title",
args: "(string)",
desc: "Get or set the title."
"name": "title",
"args": "(string)",
"desc": "Get or set the title."
},
{
name: "buttons",
args: "(array)",
desc: "Get or set the buttons."
"name": "buttons",
"args": "(array)",
"desc": "Get or set the buttons."
},
{
name: "search",
args: "(object)",
desc: "Get or set the search configuration."
"name": "search",
"args": "(object)",
"desc": "Get or set the search configuration."
},
{
name: "clear",
desc: "Delete title, buttons and search. Note that this will not hide the ToolBar, see below."
"name": "clear",
"desc": "Delete title, buttons and search. Note that this will not hide the ToolBar, see below."
},
{
name: "hide",
desc: "Hide the ToolBar. Once hidden, you can use `show` to show it again."
"name": "hide",
"desc": "Hide the ToolBar. Once hidden, you can use `show` to show it again."
},
{
name: "showClose",
args: "(function)",
desc: "Show closing `X` button with an optional callback."
"name": "showClose",
"args": "(function)",
"desc": "Show closing `X` button with an optional callback."
},
{
name: "hideClose",
desc: "Hide the closing `X` button."
"name": "hideClose",
"desc": "Hide the closing `X` button."
},
{
name: "green",
desc: "Change the general color scheme to [green](green)."
"name": "green",
"desc": "Change the general color scheme to [green](green)."
},
{
name: "blue",
desc: "Change the general color scheme to [blue](blue)."
"name": "blue",
"desc": "Change the general color scheme to [blue](blue)."
},
{
name: "purple",
desc: "Change the general color scheme to [purple](purple)."
"name": "purple",
"desc": "Change the general color scheme to [purple](purple)."
},
{
name: "dark",
desc: "Change the general color scheme to [dark](dark)"
"name": "dark",
"desc": "Change the general color scheme to [dark](dark)"
},
{
name: "lite",
desc: "Revert back to the [default](lite) color scheme."
"name": "lite",
"desc": "Revert back to the [default](lite) color scheme."
}
]
}
Expand Down Expand Up @@ -308,38 +308,38 @@
<div data-ts="DoxApi">
<script type="application/json">
{
name: "ts.ui.ToolBarSpirit",
methods: [
"name": "ts.ui.ToolBarSpirit",
"methods": [
{
name: "buttons",
args: "(array)",
desc: "Get or set the buttons."
"name": "buttons",
"args": "(array)",
"desc": "Get or set the buttons."
},
{
name: "search",
args: "(object)",
desc: "Get or set the search configuration."
"name": "search",
"args": "(object)",
"desc": "Get or set the search configuration."
},
{
name: "clear",
desc: "Delete title, buttons and search."
"name": "clear",
"desc": "Delete title, buttons and search."
},
{
name: "micro",
desc: "Shrink the ToolBar. You can call `macro` to grow it back again."
"name": "micro",
"desc": "Shrink the ToolBar. You can call `macro` to grow it back again."
},
{
name: "uncompact",
desc: "Don't collect multiple tertiary buttons in a menu. You can call `compact` to restore default behavior."
"name": "uncompact",
"desc": "Don't collect multiple tertiary buttons in a menu. You can call `compact` to restore default behavior."
},
{
name: "showClose",
args: "(function)",
desc: "Show closing `X` button with an optional callback."
"name": "showClose",
"args": "(function)",
"desc": "Show closing `X` button with an optional callback."
},
{
name: "hideClose",
desc: "Hide the closing `X` button."
"name": "hideClose",
"desc": "Hide the closing `X` button."
}
]
}
Expand Down
Loading

0 comments on commit f35039f

Please sign in to comment.