nk_jtb 0.9.5 → 0.9.7
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 +62 -28
- package/package.json +1 -1
- package/src/base/_content_gap.scss +7 -4
- package/src/forms/_file.scss +6 -7
- package/src/forms/_form.scss +6 -1
- package/src/variables/_base.scss +3 -2
package/index.html
CHANGED
|
@@ -14,36 +14,70 @@
|
|
|
14
14
|
|
|
15
15
|
<div class="quick-hide-div zebra">
|
|
16
16
|
<section id="radio-checkbox-slider" class="py-3">
|
|
17
|
-
<div class="container">
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
<div class="container grid cols-2">
|
|
18
|
+
<div>
|
|
19
|
+
<h5>Radio</h5>
|
|
20
|
+
<div class="space-x">
|
|
21
|
+
<label><input type="radio" name="abc">Option</label>
|
|
22
|
+
<label><input type="radio" name="abc" checked>Checked</label>
|
|
23
|
+
<label><input type="radio" name="abc" disabled>Disabled</label>
|
|
24
|
+
</div>
|
|
25
|
+
<h5>Checkbox</h5>
|
|
26
|
+
<div class="space-x">
|
|
27
|
+
<label><input type="checkbox">Option</label>
|
|
28
|
+
<label><input type="checkbox" checked>Checked</label>
|
|
29
|
+
<label><input type="checkbox" disabled>Disabled</label>
|
|
30
|
+
</div>
|
|
31
|
+
<h5>Slider</h5>
|
|
32
|
+
<div class="space-x">
|
|
33
|
+
<label class="toggle">
|
|
34
|
+
<input type="checkbox">
|
|
35
|
+
<div class="slider"></div>
|
|
36
|
+
<span>Option</span>
|
|
37
|
+
</label>
|
|
38
|
+
<label class="toggle">
|
|
39
|
+
<input type="checkbox" checked>
|
|
40
|
+
<div class="slider"></div>
|
|
41
|
+
<span>Checked</span>
|
|
42
|
+
</label>
|
|
43
|
+
<label class="toggle">
|
|
44
|
+
<input type="checkbox" disabled>
|
|
45
|
+
<div class="slider"></div>
|
|
46
|
+
<span>Disabled</span>
|
|
47
|
+
</label>
|
|
48
|
+
</div>
|
|
29
49
|
</div>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<input type="checkbox" checked>
|
|
39
|
-
<div class="slider"></div>
|
|
40
|
-
<span>Checked</span>
|
|
41
|
-
</label>
|
|
42
|
-
<label class="toggle">
|
|
43
|
-
<input type="checkbox" disabled>
|
|
44
|
-
<div class="slider"></div>
|
|
45
|
-
<span>Disabled</span>
|
|
50
|
+
<label class="file">
|
|
51
|
+
<input type="file" name="name">
|
|
52
|
+
<span> Select file... </span>
|
|
53
|
+
</label>
|
|
54
|
+
<div>
|
|
55
|
+
<label class="file bdr">
|
|
56
|
+
<input type="file" name="file">
|
|
57
|
+
<span>Choose a file…</span>
|
|
46
58
|
</label>
|
|
59
|
+
<div class="frm-row my">
|
|
60
|
+
<label class="file btn">
|
|
61
|
+
<input type="file" name="">
|
|
62
|
+
<svg class="wh-1.25 mr-075" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" data-slot="icon">
|
|
63
|
+
<path fill-rule="evenodd" d="M11.47 2.47a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06l-3.22-3.22V16.5a.75.75 0 0 1-1.5 0V4.81L8.03 8.03a.75.75 0 0 1-1.06-1.06l4.5-4.5ZM3 15.75a.75.75 0 0 1 .75.75v2.25a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5V16.5a.75.75 0 0 1 1.5 0v2.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V16.5a.75.75 0 0 1 .75-.75Z" clip-rule="evenodd" />
|
|
64
|
+
</svg>
|
|
65
|
+
<span>Choose a file...</span>
|
|
66
|
+
</label>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</section>
|
|
72
|
+
|
|
73
|
+
<section id="box" class="py-3">
|
|
74
|
+
<div class="container">
|
|
75
|
+
<h2>Boxes</h2>
|
|
76
|
+
<div class="grid cols-3">
|
|
77
|
+
<div class="bx">
|
|
78
|
+
<div class="bx-title">Super Awesome Title</div>
|
|
79
|
+
<p>Lorem ipsum dolor sit amet consectetur pepe adipisicing elit. Quas debitis unde aut, sed repellendus tempora, molestiae eveniet.</p>
|
|
80
|
+
</div>
|
|
47
81
|
</div>
|
|
48
82
|
</div>
|
|
49
83
|
</section>
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
@use "../variables" as *;
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
:where(
|
|
3
|
+
// Use `em` for heading to allow for better spacing when larger sizes.
|
|
4
|
+
:where(h1, h2, h3, h4, h5, h6) + *:not(label) {
|
|
5
|
+
margin-top: $content-gap-em;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:where(blockquote, p, pre, form, table, ol, ul, h1, h2, h3, h4, h5, h6) + *:not(label) {
|
|
5
9
|
margin-top: $content-gap;
|
|
6
10
|
}
|
|
7
11
|
|
|
@@ -11,7 +15,7 @@
|
|
|
11
15
|
margin-top: $content-gap;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
|
-
:where(.bx, .bx-title, .bx-content, .frm-row, .container) + :where(*):not(.dd-content) {
|
|
18
|
+
:where(.bx, .bx-title, .bx-content, .frm-row, .container) + :where(*):not(.dd-content):not(label) {
|
|
15
19
|
margin-top: $content-gap;
|
|
16
20
|
}
|
|
17
21
|
|
|
@@ -20,7 +24,6 @@
|
|
|
20
24
|
margin-top: $content-gap;
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
|
|
24
27
|
// opt-out
|
|
25
28
|
// - Remove margin from all direct child elements of "flex" or
|
|
26
29
|
// "grid" because it is too inconsistent to manage.
|
package/src/forms/_file.scss
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
.file {
|
|
2
2
|
user-select: none;
|
|
3
|
-
align-items: stretch;
|
|
4
3
|
display: inline-flex;
|
|
5
4
|
justify-content: flex-start;
|
|
5
|
+
align-items: center;
|
|
6
|
+
align-self: flex-start; //prevent stretching
|
|
6
7
|
position: relative;
|
|
7
8
|
cursor: pointer;
|
|
8
9
|
|
|
9
|
-
//
|
|
10
|
+
// bring to front and hide default input
|
|
10
11
|
input[type="file"] {
|
|
11
|
-
|
|
12
|
+
margin: 0;
|
|
13
|
+
inset: 0;
|
|
12
14
|
opacity: 0;
|
|
13
15
|
outline: none;
|
|
14
16
|
position: absolute;
|
|
15
|
-
top: 0;
|
|
16
|
-
width: 100%;
|
|
17
17
|
z-index: 1000; // allow parent cursor to use pointer
|
|
18
|
-
|
|
18
|
+
pointer-events: none; // ignore pointer events and allow parent to use pointer
|
|
19
19
|
}
|
|
20
|
-
|
|
21
20
|
}
|
package/src/forms/_form.scss
CHANGED
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
// -- Base Elements --
|
|
5
5
|
// ==========================================================================
|
|
6
|
+
|
|
7
|
+
// 1. leave the `file` label alone and let the class take care of it
|
|
8
|
+
|
|
6
9
|
label {
|
|
7
10
|
font-weight: 600;
|
|
8
|
-
margin-block-end: 0.375rem;
|
|
9
11
|
font-size: 0.875rem;
|
|
12
|
+
&:not(.file) {
|
|
13
|
+
margin-block-end: 0.375rem; // 1.
|
|
14
|
+
}
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
// !! Do not include a width here, the `frm-row` class will handle
|
package/src/variables/_base.scss
CHANGED
|
@@ -60,8 +60,9 @@ $copyright-text-color: $footer-text-color !default;
|
|
|
60
60
|
// -- Spacing --
|
|
61
61
|
// ==========================================================================
|
|
62
62
|
$base-list-spacing: 0.25em !default;
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
$content-gap: 1.25rem;
|
|
64
|
+
// better for headings
|
|
65
|
+
$content-gap-em: 1.25em;
|
|
65
66
|
|
|
66
67
|
// ==========================================================================
|
|
67
68
|
// -- Responsive Sizes and Breakpoints --
|