mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-28 04:46:57 -04:00
+2
-2
@@ -10,9 +10,9 @@ module.exports = function() {
|
|||||||
*/
|
*/
|
||||||
function toggleBackground() {
|
function toggleBackground() {
|
||||||
if (this.get()) {
|
if (this.get()) {
|
||||||
Clay.getItemByAppKey('background').enable();
|
Clay.getItemByAppKey('colorTest').enable();
|
||||||
} else {
|
} else {
|
||||||
Clay.getItemByAppKey('background').disable();
|
Clay.getItemByAppKey('colorTest').disable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ gulp.task('dev-js', ['js', 'sass'], function() {
|
|||||||
.transform(stringify(stringifyOptions))
|
.transform(stringify(stringifyOptions))
|
||||||
.transform('deamdify')
|
.transform('deamdify')
|
||||||
.transform(sassify, sassifyOptions)
|
.transform(sassify, sassifyOptions)
|
||||||
|
.transform(autoprefixify, autoprefixerOptions)
|
||||||
.bundle()
|
.bundle()
|
||||||
.pipe(source('dev.js'))
|
.pipe(source('dev.js'))
|
||||||
.pipe(gulp.dest('./tmp/'));
|
.pipe(gulp.dest('./tmp/'));
|
||||||
|
|||||||
@@ -15,8 +15,10 @@ module.exports = {
|
|||||||
|
|
||||||
var $value = self.$element.select('.value');
|
var $value = self.$element.select('.value');
|
||||||
|
|
||||||
self.on('change', function(ev) {
|
self.on('change', function() {
|
||||||
var value = self.$manipulatorTarget.select('option:checked').get('innerHTML');
|
var selectedIndex = self.$manipulatorTarget.get('selectedIndex');
|
||||||
|
var $options = self.$manipulatorTarget.select('option');
|
||||||
|
var value = $options[selectedIndex] && $options[selectedIndex].innerHTML;
|
||||||
$value.set('innerHTML', value);
|
$value.set('innerHTML', value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'submit',
|
name: 'submit',
|
||||||
template: require('../../templates/components/submit.tpl'),
|
template: require('../../templates/components/submit.tpl'),
|
||||||
|
style: require('../../styles/clay/components/submit.scss'),
|
||||||
manipulator: 'html',
|
manipulator: 'html',
|
||||||
defaults: {
|
defaults: {
|
||||||
attributes: {}
|
attributes: {}
|
||||||
|
|||||||
@@ -83,9 +83,12 @@ label {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tap-highlight {
|
||||||
|
@include tap-highlight();
|
||||||
|
}
|
||||||
|
|
||||||
.component {
|
.component {
|
||||||
padding-bottom: $item-spacing-v;
|
padding-bottom: $item-spacing-v;
|
||||||
@include tap-highlight();
|
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
opacity: 0.25;
|
opacity: 0.25;
|
||||||
@@ -108,10 +111,10 @@ label {
|
|||||||
&:last-child,
|
&:last-child,
|
||||||
&:first-child {
|
&:first-child {
|
||||||
padding-bottom: $item-spacing-v;
|
padding-bottom: $item-spacing-v;
|
||||||
|
}
|
||||||
&:after {
|
|
||||||
display: none;
|
&:last-child:after {
|
||||||
}
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
@@ -130,6 +133,10 @@ label {
|
|||||||
.component-heading:first-child {
|
.component-heading:first-child {
|
||||||
background: $color-gray-3;
|
background: $color-gray-3;
|
||||||
border-radius: $border-radius $border-radius 0 0;
|
border-radius: $border-radius $border-radius 0 0;
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -160,7 +167,7 @@ a {
|
|||||||
.input {
|
.input {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,8 @@
|
|||||||
|
|
||||||
.component-checkbox {
|
.component-checkbox {
|
||||||
|
|
||||||
@include tap-highlight(rgba(0,0,0,0));
|
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
|
|
||||||
> .label {
|
> .label {
|
||||||
display: block;
|
display: block;
|
||||||
padding-bottom: $item-spacing-v / 2;
|
padding-bottom: $item-spacing-v / 2;
|
||||||
@@ -16,7 +14,6 @@
|
|||||||
|
|
||||||
label {
|
label {
|
||||||
padding: $item-spacing-v / 2 0;
|
padding: $item-spacing-v / 2 0;
|
||||||
@include tap-highlight();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
@@ -39,7 +36,7 @@
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked ~ i {
|
input:checked + i {
|
||||||
border-color: $color-orange;
|
border-color: $color-orange;
|
||||||
background: $color-orange;
|
background: $color-orange;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
height: $base-height;
|
height: $base-height;
|
||||||
border-radius: $base-height / 2;
|
border-radius: $base-height / 2;
|
||||||
box-shadow: $box-shadow-small-components;
|
box-shadow: $box-shadow-small-components;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picker-wrap {
|
.picker-wrap {
|
||||||
|
|||||||
@@ -3,10 +3,8 @@
|
|||||||
|
|
||||||
.component-radio {
|
.component-radio {
|
||||||
|
|
||||||
@include tap-highlight(rgba(0,0,0,0));
|
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
|
|
||||||
> .label {
|
> .label {
|
||||||
display: block;
|
display: block;
|
||||||
padding-bottom: $item-spacing-v / 2;
|
padding-bottom: $item-spacing-v / 2;
|
||||||
@@ -16,7 +14,6 @@
|
|||||||
|
|
||||||
label {
|
label {
|
||||||
padding: $item-spacing-v / 2 0;
|
padding: $item-spacing-v / 2 0;
|
||||||
@include tap-highlight();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
@@ -39,7 +36,7 @@
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
input:checked ~ i {
|
input:checked + i {
|
||||||
border-color: $color-orange;
|
border-color: $color-orange;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
$triangle-size: 0.85rem;
|
$triangle-size: 0.85rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-right: $triangle-size + 0.25rem;
|
padding-right: $triangle-size + 0.25rem;
|
||||||
|
display: block;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: "";
|
content: "";
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
.component-submit {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ button,
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
border: none;
|
border: none;
|
||||||
display: block;
|
display: inline-block;
|
||||||
|
|
||||||
color: $color-white;
|
color: $color-white;
|
||||||
min-width: 12rem;
|
min-width: 12rem;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<span class="label">{{{label}}}</span>
|
<span class="label">{{{label}}}</span>
|
||||||
<div class="checkbox-group">
|
<div class="checkbox-group">
|
||||||
{{each options}}
|
{{each options}}
|
||||||
<label>
|
<label class="tap-highlight">
|
||||||
<span class="label">{{{this.label}}}</span>
|
<span class="label">{{{this.label}}}</span>
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="component component-color">
|
<div class="component component-color tap-highlight">
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input
|
||||||
data-manipulator-target
|
data-manipulator-target
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<label class="component component-input">
|
<label class="component component-input tap-highlight">
|
||||||
<span class="label">{{{label}}}</span>
|
<span class="label">{{{label}}}</span>
|
||||||
<span class="input">
|
<span class="input">
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<span class="label">{{{label}}}</span>
|
<span class="label">{{{label}}}</span>
|
||||||
<div class="radio-group">
|
<div class="radio-group">
|
||||||
{{each options}}
|
{{each options}}
|
||||||
<label>
|
<label class="tap-highlight">
|
||||||
<span class="label">{{{this.label}}}</span>
|
<span class="label">{{{this.label}}}</span>
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<label class="component component-select">
|
<label class="component component-select tap-highlight">
|
||||||
<span class="label">{{{label}}}</span>
|
<span class="label">{{{label}}}</span>
|
||||||
<span class="value"></span>
|
<span class="value"></span>
|
||||||
<select data-manipulator-target {{each key: attributes}}{{key}}="{{this}}"{{/each}}>
|
<select data-manipulator-target {{each key: attributes}}{{key}}="{{this}}"{{/each}}>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="component component-button">
|
<div class="component component-submit">
|
||||||
<button
|
<button
|
||||||
data-manipulator-target
|
data-manipulator-target
|
||||||
type="submit"
|
type="submit"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<label class="component component-toggle">
|
<label class="component component-toggle tap-highlight">
|
||||||
<span class="label">{{{label}}}</span>
|
<span class="label">{{{label}}}</span>
|
||||||
<span class="input">
|
<span class="input">
|
||||||
<input
|
<input
|
||||||
|
|||||||
Reference in New Issue
Block a user