Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
colejd committed Nov 16, 2021
2 parents 0010310 + 5e3236a commit e21b614
Show file tree
Hide file tree
Showing 13 changed files with 125 additions and 43 deletions.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.14.1

- Fixed incorrect `interval` height and background
- Made component height `2rem` by default
- Should fix component height issues on some pages
- Reduced line height for `display` component

## 0.14.0

- Allow setting input listening mode on `text` components using a new `listenMode` option. New values are `"input"` (default) and `"change"`.
Expand Down
109 changes: 93 additions & 16 deletions lib/guify.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/guify.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/guify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/guify.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"//": "--------------- Script Info --------------- ",
"name": "guify",
"author": "Jonathan Cole <[email protected]>",
"version": "0.14.0",
"version": "0.14.1",
"description": "A simple GUI for inspecting and changing JS variables",
"keywords": [
"gui",
Expand Down
8 changes: 8 additions & 0 deletions src/components/partials/container.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import "../variables.css";

.guify-component-container {
position: relative;
min-height: var(--size-component-height);
line-height: var(--size-component-height);
margin-bottom: var(--size-component-spacing);
}
8 changes: 2 additions & 6 deletions src/components/partials/container.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import css from "dom-css";
import "./container.css";

// eslint-disable-next-line no-unused-vars
let Container = (root, label, theme) => {
let container = root.appendChild(document.createElement("div"));
container.classList.add("guify-component-container");
css(container, {
position: "relative",
"min-height": theme.sizing.componentHeight,
"margin-bottom": theme.sizing.componentSpacing
});
return container;
};

Expand Down
10 changes: 3 additions & 7 deletions src/components/partials/label.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
display: inline-block;
margin-right: 2%;
vertical-align: top;
}

.guify-component-label-text {
color: var(--color-text-primary);
display: inline-block;
vertical-align: sub;
min-height: var(--size-component-height);
line-height: var(--size-component-height);

color: var(--color-text-primary);
}

/* Disabled styles */
.disabled .guify-component-label-text {
.disabled .guify-component-label {
color: var(--color-text-disabled);
}
7 changes: 2 additions & 5 deletions src/components/partials/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ import "./label.css";

// eslint-disable-next-line no-unused-vars
export default (root, text, theme) => {
var background = root.appendChild(document.createElement("div"));
background.classList.add("guify-component-label");

var label = background.appendChild(document.createElement("div"));
label.classList.add("guify-component-label-text");
var label = root.appendChild(document.createElement("div"));
label.classList.add("guify-component-label");
label.innerHTML = text;
return label;
};
3 changes: 2 additions & 1 deletion src/components/public/display.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.guify-display {
display: inline-block;
height: unset;
min-height: var(--size-component-height);
width: calc(100% - var(--size-label-width));
border: none;
color: var(--color-text-secondary);
Expand All @@ -11,7 +12,7 @@
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
vertical-align: sub;
line-height: var(--size-component-height);
line-height: 1rem;
user-select: text;
}

Expand Down
6 changes: 3 additions & 3 deletions src/components/public/interval.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.guify-interval {
-webkit-appearance: none;
position: absolute;
height: 20px;
height: var(--size-component-height);
margin: 0px 0;
width: 33%;
left: 54.5%;
Expand All @@ -38,9 +38,9 @@

.disabled .guify-interval {
pointer-events: none;
background-color: var(--range-track-color-disabled);
background-color: var(--interval-track-color-disabled);
}

.disabled .guify-interval .guify-interval-handle {
background: var(--range-thumb-color-disabled);
background: var(--interval-thumb-color-disabled);
}
2 changes: 1 addition & 1 deletion src/components/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
--color-text-disabled: "black";

--size-menu-bar-height: 25px;
--size-component-height: 20px;
--size-component-height: 2rem;
--size-component-spacing: 5px;
--size-label-width: 42%;
}

0 comments on commit e21b614

Please sign in to comment.