claritas-web-framework 6.0.0-beta-12 → 6.0.0-beta-13
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/index.html +106 -4
- package/package.json +1 -1
- package/scss/_variables.scss +2 -0
- package/scss/modules/_form.scss +4 -2
- package/scss/modules/form/_checkbox.scss +55 -73
- package/scss/modules/form/_progress.scss +0 -1
- package/scss/modules/form/_radio.scss +56 -13
- package/scss/modules/form/_select.scss +0 -1
- package/scss/modules/form/_toggle.scss +101 -0
package/index.html
CHANGED
|
@@ -9,10 +9,112 @@
|
|
|
9
9
|
|
|
10
10
|
<body>
|
|
11
11
|
<div class="container">
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
<form>
|
|
13
|
+
<div class="form--field">
|
|
14
|
+
<label for="exampleInputEmail1" class="form--label">Email address</label>
|
|
15
|
+
<div class="form--control">
|
|
16
|
+
<input
|
|
17
|
+
type="email"
|
|
18
|
+
id="exampleInputEmail1"
|
|
19
|
+
name="exampleInputEmail1"
|
|
20
|
+
placeholder="Email address"
|
|
21
|
+
required
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
<small>We'll never share your email with anyone else.</small>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div class="form--field">
|
|
28
|
+
<div class="form--control form--control-toggle">
|
|
29
|
+
<input type="checkbox" class="input--toggle input--danger" id="exampleToggle1" name="exampleToggle1" />
|
|
30
|
+
<label class="form--label" for="exampleToggle1">Remember</label>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="form--field">
|
|
35
|
+
<label for="exampleInputPassword1" class="form--label">Password</label>
|
|
36
|
+
<div class="form--control">
|
|
37
|
+
<input
|
|
38
|
+
type="password"
|
|
39
|
+
id="exampleInputPassword1"
|
|
40
|
+
name="exampleInputPassword1"
|
|
41
|
+
placeholder="Password"
|
|
42
|
+
required
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="form--field">
|
|
48
|
+
<label for="exampleInputDisabled1" class="form--label">Disabled</label>
|
|
49
|
+
<div class="form--control">
|
|
50
|
+
<input
|
|
51
|
+
type="text"
|
|
52
|
+
id="exampleInputDisabled1"
|
|
53
|
+
name="exampleInputDisabled1"
|
|
54
|
+
placeholder="Some text..."
|
|
55
|
+
disabled
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div class="form--field">
|
|
61
|
+
<label class="form--label" for="exampleSelect1">Colour</label>
|
|
62
|
+
<div class="form--control">
|
|
63
|
+
<select id="exampleSelect1" name="exampleSelect1">
|
|
64
|
+
<option value="">--Please Select --</option>
|
|
65
|
+
<option value="1">Red</option>
|
|
66
|
+
<option value="2">Blue</option>
|
|
67
|
+
</select>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div class="form--field display--flex">
|
|
72
|
+
<div class="form--control form--control-radio margin-right--3">
|
|
73
|
+
<input type="radio" id="exampleRadio1" name="yesno" class="input--success" />
|
|
74
|
+
<label class="form--label" for="exampleRadio1">Yes</label>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="form--control form--control-radio">
|
|
77
|
+
<input type="radio" id="exampleRadio2" name="yesno" />
|
|
78
|
+
<label class="form--label" for="exampleRadio2">No</label>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div class="form--field">
|
|
83
|
+
<label for="exampleTextarea1" class="form--label">Message</label>
|
|
84
|
+
<div class="form--control">
|
|
85
|
+
<textarea
|
|
86
|
+
class="input--success"
|
|
87
|
+
id="exampleTextarea1"
|
|
88
|
+
name="exampleTextarea1"
|
|
89
|
+
placeholder="Message..."
|
|
90
|
+
rows="4"
|
|
91
|
+
></textarea>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<div class="form--field">
|
|
96
|
+
<label for="exampleRange1" class="form--label">Range</label>
|
|
97
|
+
<div class="form--control">
|
|
98
|
+
<input type="range" class="" id="exampleRange1" name="exampleRangle1" min="0" max="11" />
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div class="form--field">
|
|
103
|
+
<div class="form--control form--control-checkbox">
|
|
104
|
+
<input type="checkbox" class="input--danger" id="exampleCheck1" name="exampleCheck1" />
|
|
105
|
+
<label class="form--label" for="exampleCheck1">Check me out</label>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<div class="form--field">
|
|
110
|
+
<label class="form--label" for="exampleFile1">Choose your file...</label>
|
|
111
|
+
<div class="form--control">
|
|
112
|
+
<input type="file" id="exampleFile1" name="exampleFile1" />
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<button type="submit" class="button button--primary">Submit</button>
|
|
117
|
+
</form>
|
|
16
118
|
</div>
|
|
17
119
|
</body>
|
|
18
120
|
</html>
|
package/package.json
CHANGED
package/scss/_variables.scss
CHANGED
|
@@ -594,6 +594,8 @@ $input-font-size-small: $input-button-font-size-small !default;
|
|
|
594
594
|
|
|
595
595
|
$input-focus-box-shadow: $input-button-focus-box-shadow !default;
|
|
596
596
|
|
|
597
|
+
$input-size: calc(($font-size-base * $line-height-base + ($input-padding-y * 2)) + 2px) !default;
|
|
598
|
+
|
|
597
599
|
// Button
|
|
598
600
|
$button-border-width: $input-button-border-width !default;
|
|
599
601
|
$button-border-style: $input-button-border-style !default;
|
package/scss/modules/_form.scss
CHANGED
|
@@ -35,6 +35,7 @@ progress,
|
|
|
35
35
|
appearance: none;
|
|
36
36
|
width: 100%;
|
|
37
37
|
transition: $form-transition;
|
|
38
|
+
position: relative;
|
|
38
39
|
|
|
39
40
|
&:hover {
|
|
40
41
|
border-color: $input-border-color-hover;
|
|
@@ -79,7 +80,7 @@ progress,
|
|
|
79
80
|
border-color: $value;
|
|
80
81
|
|
|
81
82
|
&:hover {
|
|
82
|
-
border-color:
|
|
83
|
+
border-color: shade-color($value, $link-shade-percentage);
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
&:focus {
|
|
@@ -94,7 +95,7 @@ progress,
|
|
|
94
95
|
border-color: $value;
|
|
95
96
|
|
|
96
97
|
&:hover {
|
|
97
|
-
border-color:
|
|
98
|
+
border-color: shade-color($value, $link-shade-percentage);
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
&:focus {
|
|
@@ -175,3 +176,4 @@ textarea {
|
|
|
175
176
|
@import "./form/select";
|
|
176
177
|
@import "./form/text";
|
|
177
178
|
@import "./form/textarea";
|
|
179
|
+
@import "./form/toggle";
|
|
@@ -1,95 +1,77 @@
|
|
|
1
1
|
input[type="checkbox"] {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
vertical-align: text-bottom;
|
|
9
|
-
position: relative;
|
|
10
|
-
margin-right: calc($spacer * 0.5);
|
|
11
|
-
padding: 0;
|
|
2
|
+
&:not(.input--toggle) {
|
|
3
|
+
height: $input-size;
|
|
4
|
+
width: $input-size;
|
|
5
|
+
vertical-align: text-bottom;
|
|
6
|
+
margin-right: $spacer;
|
|
7
|
+
padding: 0;
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
left: 0;
|
|
18
|
-
right: 0;
|
|
19
|
-
bottom: 0;
|
|
20
|
-
top: 0;
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&:checked {
|
|
25
|
-
background-color: $primary;
|
|
26
|
-
border-color: $primary;
|
|
27
|
-
|
|
28
|
-
&::before {
|
|
29
|
-
border-right: 2px solid $white;
|
|
30
|
-
border-bottom: 2px solid $white;
|
|
31
|
-
height: 65%;
|
|
32
|
-
width: 32.5%;
|
|
33
|
-
transform: rotate(45deg) translateY(-15%) translateX(-15%);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&:disabled,
|
|
37
|
-
&.disabled,
|
|
38
|
-
&[aria-disabled="true"] {
|
|
39
|
-
background-color: rgba($primary, 0.4);
|
|
40
|
-
border-color: rgba($primary, 0.8);
|
|
9
|
+
@include media-breakpoint-up("desktop") {
|
|
10
|
+
height: calc($input-size * 0.75);
|
|
11
|
+
width: calc($input-size * 0.75);
|
|
12
|
+
margin-right: calc($spacer * 0.5);
|
|
41
13
|
}
|
|
42
|
-
}
|
|
43
14
|
|
|
44
|
-
&:indeterminate,
|
|
45
|
-
&[aria-checked="mixed"] {
|
|
46
15
|
&::before {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
16
|
+
content: "";
|
|
17
|
+
position: absolute;
|
|
18
|
+
margin: auto;
|
|
19
|
+
left: 0;
|
|
20
|
+
right: 0;
|
|
21
|
+
bottom: 0;
|
|
22
|
+
top: 0;
|
|
23
|
+
overflow: hidden;
|
|
50
24
|
}
|
|
51
|
-
}
|
|
52
25
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
26
|
+
&:checked {
|
|
27
|
+
background-color: $primary;
|
|
28
|
+
border-color: $primary;
|
|
56
29
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
30
|
+
&::before {
|
|
31
|
+
border-right: 2px solid $white;
|
|
32
|
+
border-bottom: 2px solid $white;
|
|
33
|
+
height: 65%;
|
|
34
|
+
width: 32.5%;
|
|
35
|
+
transform: rotate(45deg) translateY(-15%) translateX(-15%);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:disabled,
|
|
39
|
+
&.disabled,
|
|
40
|
+
&[aria-disabled="true"] {
|
|
41
|
+
background-color: rgba($primary, 0.4);
|
|
42
|
+
border-color: rgba($primary, 0.8);
|
|
43
|
+
}
|
|
66
44
|
}
|
|
67
45
|
|
|
68
|
-
&:
|
|
46
|
+
&:indeterminate,
|
|
47
|
+
&[aria-checked="mixed"] {
|
|
69
48
|
&::before {
|
|
70
|
-
|
|
49
|
+
border: 2px solid $white;
|
|
71
50
|
height: 0;
|
|
72
|
-
width:
|
|
73
|
-
background: $white;
|
|
51
|
+
width: 65%;
|
|
74
52
|
}
|
|
75
53
|
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&.input--large {
|
|
79
|
-
height: calc($spacer * 2);
|
|
80
|
-
width: calc($spacer * 2);
|
|
81
54
|
|
|
82
|
-
&.input--
|
|
83
|
-
|
|
55
|
+
&.input--large {
|
|
56
|
+
height: calc($spacer * 2);
|
|
57
|
+
width: calc($spacer * 2);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
84
60
|
|
|
85
|
-
|
|
86
|
-
|
|
61
|
+
@each $key, $value in $colors {
|
|
62
|
+
&.input--#{$key} {
|
|
63
|
+
&:checked {
|
|
64
|
+
background-color: $value;
|
|
65
|
+
border-color: $value;
|
|
87
66
|
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
88
69
|
|
|
70
|
+
@each $key, $value in $theme-colors {
|
|
71
|
+
&.input--#{$key} {
|
|
89
72
|
&:checked {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
73
|
+
background-color: $value;
|
|
74
|
+
border-color: $value;
|
|
93
75
|
}
|
|
94
76
|
}
|
|
95
77
|
}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
1
3
|
input[type="radio"] {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
width: calc($spacer * 1.5);
|
|
5
|
-
min-width: calc($spacer * 1.5);
|
|
6
|
-
display: inline-block;
|
|
4
|
+
height: $input-size;
|
|
5
|
+
width: $input-size;
|
|
7
6
|
vertical-align: text-bottom;
|
|
8
|
-
|
|
9
|
-
margin-right: calc($spacer * 0.5);
|
|
7
|
+
margin-right: $spacer;
|
|
10
8
|
border-radius: $border-radius-round;
|
|
11
9
|
padding: 0;
|
|
12
10
|
|
|
11
|
+
@include media-breakpoint-up("desktop") {
|
|
12
|
+
height: calc($input-size * 0.75);
|
|
13
|
+
width: calc($input-size * 0.75);
|
|
14
|
+
margin-right: calc($spacer * 0.5);
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
&::before {
|
|
14
18
|
content: "";
|
|
15
19
|
position: absolute;
|
|
@@ -21,16 +25,15 @@ input[type="radio"] {
|
|
|
21
25
|
overflow: hidden;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
|
-
&::before {
|
|
25
|
-
height: 0;
|
|
26
|
-
width: 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
28
|
&:checked {
|
|
30
29
|
&::before {
|
|
31
|
-
border:
|
|
30
|
+
border: 8px solid $input-background-color;
|
|
32
31
|
border-radius: $border-radius-round;
|
|
33
32
|
background: $primary;
|
|
33
|
+
|
|
34
|
+
@include media-breakpoint-up("desktop") {
|
|
35
|
+
border-width: 5px;
|
|
36
|
+
}
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
&:disabled,
|
|
@@ -44,4 +47,44 @@ input[type="radio"] {
|
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
}
|
|
50
|
+
|
|
51
|
+
@each $key, $value in $colors {
|
|
52
|
+
&.input--#{$key} {
|
|
53
|
+
&:checked {
|
|
54
|
+
&::before {
|
|
55
|
+
background: $value;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:disabled,
|
|
59
|
+
&.disabled,
|
|
60
|
+
&[aria-disabled="true"] {
|
|
61
|
+
border-color: rgba($value, 0.4);
|
|
62
|
+
|
|
63
|
+
&::before {
|
|
64
|
+
background: rgba($value, 0.4);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@each $key, $value in $theme-colors {
|
|
72
|
+
&.input--#{$key} {
|
|
73
|
+
&:checked {
|
|
74
|
+
&::before {
|
|
75
|
+
background: $value;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:disabled,
|
|
79
|
+
&.disabled,
|
|
80
|
+
&[aria-disabled="true"] {
|
|
81
|
+
border-color: rgba($value, 0.4);
|
|
82
|
+
|
|
83
|
+
&::before {
|
|
84
|
+
background: rgba($value, 0.4);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
47
90
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
input[type="checkbox"] {
|
|
2
|
+
&.input--toggle {
|
|
3
|
+
height: $input-size;
|
|
4
|
+
width: calc($input-size * 2);
|
|
5
|
+
vertical-align: text-bottom;
|
|
6
|
+
margin-right: $spacer;
|
|
7
|
+
border-radius: $border-radius-round;
|
|
8
|
+
padding: 0;
|
|
9
|
+
|
|
10
|
+
@include media-breakpoint-up("desktop") {
|
|
11
|
+
height: calc($input-size * 0.75);
|
|
12
|
+
width: calc(($input-size * 0.75) * 2);
|
|
13
|
+
margin-right: calc($spacer * 0.5);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&::before {
|
|
17
|
+
content: "";
|
|
18
|
+
position: absolute;
|
|
19
|
+
margin: auto;
|
|
20
|
+
left: 0;
|
|
21
|
+
right: 50%;
|
|
22
|
+
bottom: 0;
|
|
23
|
+
top: 0;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
border: 8px solid $input-background-color;
|
|
26
|
+
border-radius: $border-radius-round;
|
|
27
|
+
background: $input-border-color;
|
|
28
|
+
transition: left 0.2s, right 0.2s, border 0.2s;
|
|
29
|
+
|
|
30
|
+
@include media-breakpoint-up("desktop") {
|
|
31
|
+
border-width: 5px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:checked {
|
|
36
|
+
background: $primary;
|
|
37
|
+
|
|
38
|
+
&::before {
|
|
39
|
+
background: $white;
|
|
40
|
+
left: 50%;
|
|
41
|
+
right: 0;
|
|
42
|
+
border-color: $primary;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:disabled,
|
|
46
|
+
&.disabled,
|
|
47
|
+
&[aria-disabled="true"] {
|
|
48
|
+
background-color: $white;
|
|
49
|
+
border-color: rgba($primary, 0.4);
|
|
50
|
+
|
|
51
|
+
&::before {
|
|
52
|
+
background: rgba($primary, 0.4);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@each $key, $value in $colors {
|
|
58
|
+
&.input--#{$key} {
|
|
59
|
+
&:checked {
|
|
60
|
+
background: $value;
|
|
61
|
+
|
|
62
|
+
&::before {
|
|
63
|
+
border-color: $value;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:disabled,
|
|
67
|
+
&.disabled,
|
|
68
|
+
&[aria-disabled="true"] {
|
|
69
|
+
border-color: rgba($value, 0.4);
|
|
70
|
+
|
|
71
|
+
&::before {
|
|
72
|
+
background: rgba($value, 0.4);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@each $key, $value in $theme-colors {
|
|
80
|
+
&.input--#{$key} {
|
|
81
|
+
&:checked {
|
|
82
|
+
background: $value;
|
|
83
|
+
|
|
84
|
+
&::before {
|
|
85
|
+
border-color: $value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:disabled,
|
|
89
|
+
&.disabled,
|
|
90
|
+
&[aria-disabled="true"] {
|
|
91
|
+
border-color: rgba($value, 0.4);
|
|
92
|
+
|
|
93
|
+
&::before {
|
|
94
|
+
background: rgba($value, 0.4);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|