nk_jtb 0.2.0 → 0.4.0
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/composer.lock +1286 -0
- package/index.html +29 -6
- package/main.js +2 -1
- package/package.json +7 -5
- package/public/images/logo.svg +1 -25
- package/scss/_nk.scss +33 -38
- package/scss/base/_base.scss +39 -16
- package/scss/base/_content_gap.scss +8 -4
- package/scss/base/_vars_base.scss +41 -11
- package/scss/base/_vars_colors.scss +5 -3
- package/scss/base/_vars_components.scss +17 -32
- package/scss/base/_vars_utility_maps.scss +33 -11
- package/scss/components/_box.scss +1 -1
- package/scss/components/_button.scss +1 -12
- package/scss/components/_dropdown.scss +0 -12
- package/scss/components/_hero.scss +2 -2
- package/scss/components/_icon.scss +1 -4
- package/scss/components/_list.scss +32 -0
- package/scss/components/_menu.scss +13 -7
- package/scss/components/_navbar.scss +10 -3
- package/scss/components/_other.scss +11 -16
- package/scss/components/_sidebar.scss +20 -6
- package/scss/forms/_control.scss +4 -3
- package/scss/forms/_form.scss +36 -39
- package/scss/forms/_index.scss +1 -0
- package/scss/forms/_toggle.scss +54 -0
- package/scss/functions/_colorFunctions.scss +35 -0
- package/scss/functions/_helpers.scss +4 -0
- package/scss/jtb.scss +7 -8
- package/scss/layouts/__two-column.scss +32 -0
- package/scss/mixins/_colorSchemeSimple.scss +1 -1
- package/scss/mixins/_createState.scss +1 -1
- package/scss/mixins/_makeColorSchemeAdvanced.scss +1 -1
- package/scss/mixins/_makeCssPropertyMixins.scss +8 -3
- package/scss/mixins/_makeMagicClass.scss +61 -0
- package/scss/mixins/_makeMagicGrid2Cols.scss +70 -0
- package/scss/mixins/_makeMagicGridFixedWidth.scss +55 -0
- package/scss/mixins/_makeResponsiveClasses.scss +91 -0
- package/scss/mixins/_makeResponsivePositionUtilities.scss +3 -3
- package/scss/mixins/_media.scss +23 -27
- package/scss/mixins/_positionUtilityClasses.scss +5 -2
- package/scss/play.scss +30 -0
- package/scss/utilities/_border.scss +76 -64
- package/scss/utilities/_display_visibility.scss +66 -0
- package/scss/utilities/_flex.scss +21 -3
- package/scss/utilities/_general.scss +15 -21
- package/scss/utilities/_grid.scss +44 -135
- package/scss/utilities/_opacity.scss +8 -0
- package/scss/utilities/_position.scss +16 -36
- package/scss/utilities/_sizes.scss +32 -23
- package/scss/utilities/_spacing.scss +95 -27
- package/scss/utilities/_state.scss +7 -0
- package/scss/utilities/_text.scss +44 -13
- package/scss/utilities/_themes.scss +69 -43
- package/scss/utilities/_transition.scss +5 -0
- package/scss/utilities/_translate.scss +32 -0
- package/public/images/hero-lg.jpg +0 -0
- package/public/images/hero-md.jpg +0 -0
- package/public/images/hero-sm.jpg +0 -0
- package/public/images/hero-xl.jpg +0 -0
- package/public/images/logo-alt.svg +0 -24
- package/public/images/logo.png +0 -0
- package/public/images/painting.jpg +0 -0
- package/scss/functions/_setTextColor.scss +0 -12
- package/scss/layout/_grid_old.scss +0 -88
- package/scss/utilities/_display.scss +0 -127
- package/tests.html +0 -252
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
@use "../base/vars_all" as *;
|
|
2
2
|
@use "../forms/control" as *;
|
|
3
|
-
@use "../functions/
|
|
3
|
+
@use "../functions/colorFunctions" as *;
|
|
4
4
|
@use "../mixins/createState" as *;
|
|
5
5
|
|
|
6
6
|
// base class
|
|
7
7
|
// ----------------------------
|
|
8
8
|
|
|
9
|
-
// [class*="#{$button-class}"] {
|
|
10
|
-
// &.focus,
|
|
11
|
-
// &:focus {
|
|
12
|
-
// outline: none;
|
|
13
|
-
// }
|
|
14
|
-
// }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// DO NOT add <button> here, it is best to add the class for more
|
|
18
|
-
// flexibility using button in livewire components
|
|
19
|
-
|
|
20
9
|
.#{$button-class} {
|
|
21
10
|
@extend %control;
|
|
22
11
|
background: $btn-bg;
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
opacity: 0;
|
|
17
17
|
transform: translateY(-2em);
|
|
18
18
|
top: calc(100% + 4px); // push to bottom of toggle element
|
|
19
|
-
// top: calc(100% + $dropdown-toggle-gap); // push to bottom of toggle element
|
|
20
19
|
left: 0;
|
|
21
20
|
transition: all 0.1s ease-in-out 1s, visibility 0s linear 0.1s, z-index 0s linear 0.01s;
|
|
22
21
|
z-index: 1000;
|
|
@@ -33,14 +32,3 @@
|
|
|
33
32
|
transition-delay: 0s, 0s, 0.1s; // this removes the transition delay so the menu will be visible while the other styles transition
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
|
-
|
|
37
|
-
// ?????????????
|
|
38
|
-
.dd-item {
|
|
39
|
-
letter-spacing: -0.025em;
|
|
40
|
-
line-height: 1.25rem;
|
|
41
|
-
padding: 0.25rem 0.75rem;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.dd-item:hover {
|
|
45
|
-
background-color: rgb(243, 244, 246);
|
|
46
|
-
}
|
|
@@ -16,7 +16,7 @@ $hero-gradient: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.4));
|
|
|
16
16
|
font-size: 2.25rem;
|
|
17
17
|
|
|
18
18
|
// font size never is or will be a one size fits all! STOP changing!!!
|
|
19
|
-
@include from-
|
|
19
|
+
@include from-md {
|
|
20
20
|
font-size: 3rem;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -27,7 +27,7 @@ $hero-gradient: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.4));
|
|
|
27
27
|
color: $hero-subtitle-color;
|
|
28
28
|
font-size: 1.5rem;
|
|
29
29
|
|
|
30
|
-
@include from-
|
|
30
|
+
@include from-xl {
|
|
31
31
|
font-size: 2.1rem;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
@use '../base/vars_all' as *;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
// 1. aligns better
|
|
4
|
+
// 1. aligns better text to text when inline
|
|
5
5
|
// 2. better alignment rather than changing size
|
|
6
6
|
|
|
7
7
|
.#{$icon-class} {
|
|
8
8
|
width: $icon-xy;
|
|
9
9
|
height: $icon-xy;
|
|
10
|
-
// align-items: center;
|
|
11
|
-
// display: inline-flex;
|
|
12
|
-
// justify-content: center;
|
|
13
10
|
vertical-align: bottom; // 1
|
|
14
11
|
color: $icon-color;
|
|
15
12
|
padding: 2px; // 2
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@use "../base/vars_colors" as *;
|
|
2
|
+
@use "../base/vars_components" as *;
|
|
3
|
+
|
|
4
|
+
// --------------------------------------------------------------------------
|
|
5
|
+
// -- TICK ICON LIST --
|
|
6
|
+
// --------------------------------------------------------------------------
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
.icon-list {
|
|
10
|
+
// leave as fallback?
|
|
11
|
+
// list-style: none;
|
|
12
|
+
ul {
|
|
13
|
+
margin-left: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where(svg) {
|
|
17
|
+
margin-right: 1rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
& li {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
background-repeat: no-repeat;
|
|
24
|
+
background-position: left center;
|
|
25
|
+
padding-block: 0.25rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.tick-svg li {
|
|
29
|
+
background-image: $icon-tick;
|
|
30
|
+
padding-left: 2rem;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use "../base/vars_all" as *;
|
|
2
|
-
@use "../functions/
|
|
2
|
+
@use "../functions/colorFunctions" as *;
|
|
3
3
|
|
|
4
4
|
.menu {
|
|
5
5
|
flex-wrap: wrap;
|
|
@@ -7,23 +7,29 @@
|
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
line-height: 1.25;
|
|
9
9
|
list-style: none;
|
|
10
|
+
margin-left: 0; // remove margin for ul
|
|
10
11
|
|
|
11
|
-
:where(a) {
|
|
12
|
-
|
|
13
|
-
color: $menu-link-color;
|
|
12
|
+
:where(a, li a, .menu-item) {
|
|
13
|
+
color: inherit;
|
|
14
14
|
padding: $menu-padding-y $menu-padding-x;
|
|
15
|
-
// display
|
|
15
|
+
// this was initially set to display block but it is too difficult to
|
|
16
|
+
// work with icons and chevrons on the anchor element.
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
16
19
|
|
|
20
|
+
&.active,
|
|
17
21
|
&:hover {
|
|
22
|
+
cursor: pointer;
|
|
18
23
|
color: $menu-link-hover-color;
|
|
19
|
-
background: $menu-hover-bg;
|
|
24
|
+
background-color: $menu-hover-bg;
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
.menu-title {
|
|
24
29
|
font-weight: 600;
|
|
25
|
-
color: #7a7a7a;
|
|
26
30
|
letter-spacing: 0.05em;
|
|
31
|
+
margin-left: $menu-padding-x;
|
|
32
|
+
margin-bottom: 0.5em;
|
|
27
33
|
|
|
28
34
|
&:not(:first-child) {
|
|
29
35
|
margin-top: $content-gap;
|
|
@@ -9,11 +9,17 @@
|
|
|
9
9
|
|
|
10
10
|
.#{$navbar-class} {
|
|
11
11
|
background: $navbar-bg;
|
|
12
|
-
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
|
13
12
|
padding: $navbar-padding-y $navbar-padding-x;
|
|
14
13
|
position: relative;
|
|
14
|
+
box-shadow: 1px 2px 5px #2a2a2b;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
li {
|
|
17
|
+
list-style: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
nav,
|
|
21
|
+
ul {
|
|
22
|
+
margin: 0; // this may be a problem for nested elements
|
|
17
23
|
display: flex;
|
|
18
24
|
}
|
|
19
25
|
|
|
@@ -21,7 +27,7 @@
|
|
|
21
27
|
padding: $navbar-nav-padding-y $navbar-nav-padding-x;
|
|
22
28
|
display: block; // 1. allowing the navbar to grow in height
|
|
23
29
|
background: $navbar-nav-item-bg;
|
|
24
|
-
color: $navbar-nav-
|
|
30
|
+
color: $navbar-nav-item-color;
|
|
25
31
|
line-height: 1.2rem;
|
|
26
32
|
|
|
27
33
|
&:hover {
|
|
@@ -30,6 +36,7 @@
|
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
&.active {
|
|
39
|
+
color: $navbar-nav-active-color;
|
|
33
40
|
background: $navbar-nav-active-bg;
|
|
34
41
|
}
|
|
35
42
|
}
|
|
@@ -24,21 +24,16 @@
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
// ==========================================================================
|
|
28
|
-
// -- Badge --
|
|
29
|
-
// ==========================================================================
|
|
30
27
|
.badge {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
right:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
border: 1px solid hsl(354, 70%, 44%);
|
|
43
|
-
color: rgb(255, 255, 255);
|
|
28
|
+
// font-size: 0.75em;
|
|
29
|
+
// padding-left: 0.25em;
|
|
30
|
+
// padding-right: 0.25em;
|
|
31
|
+
// padding-top: 0.25em;
|
|
32
|
+
// padding-bottom: 0.25em;
|
|
33
|
+
|
|
34
|
+
padding: 0.25em 0.4em;
|
|
35
|
+
font-size: .7rem;
|
|
36
|
+
line-height: 1;
|
|
37
|
+
text-align: center;
|
|
38
|
+
border-radius: 0.25rem;
|
|
44
39
|
}
|
|
@@ -3,10 +3,24 @@
|
|
|
3
3
|
left: 0;
|
|
4
4
|
top: 0;
|
|
5
5
|
bottom: 0;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
right: 0;
|
|
7
|
+
// width: 100%;
|
|
8
|
+
// max-width: 360px;
|
|
9
|
+
// z-index: 1000;
|
|
10
|
+
// overflow-y: auto;
|
|
11
|
+
// outline: none;
|
|
12
|
+
// transition: transform 0.25s ease-in-out;
|
|
13
|
+
z-index: 500;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.overlay {
|
|
17
|
+
position: fixed;
|
|
18
|
+
top: 0;
|
|
19
|
+
bottom: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
right: 0;
|
|
9
22
|
overflow-y: auto;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
background: rgba(0, 0, 0, 0.7);
|
|
24
|
+
z-index: 30;
|
|
25
|
+
margin: 0;
|
|
26
|
+
}
|
package/scss/forms/_control.scss
CHANGED
|
@@ -28,7 +28,10 @@ $ctrl-line-height: 1.5 !default;
|
|
|
28
28
|
// 1. line height is required to get consistent heights
|
|
29
29
|
// 2. creates control and button sizes sm, md, lg
|
|
30
30
|
%control {
|
|
31
|
-
border: $ctrl-border;
|
|
31
|
+
border-top: $ctrl-border;
|
|
32
|
+
border-bottom: $ctrl-border;
|
|
33
|
+
border-left: $ctrl-border;
|
|
34
|
+
border-right: $ctrl-border;
|
|
32
35
|
border-radius: $ctrl-border-radius;
|
|
33
36
|
font-size: $ctrl-font-size;
|
|
34
37
|
padding: $ctrl-padding-y $ctrl-padding-x;
|
|
@@ -37,7 +40,6 @@ $ctrl-line-height: 1.5 !default;
|
|
|
37
40
|
align-items: center;
|
|
38
41
|
position: relative;
|
|
39
42
|
background-color: $ctrl-bg-color;
|
|
40
|
-
// cursor: text;
|
|
41
43
|
|
|
42
44
|
// create control sizes
|
|
43
45
|
@each $size, $value in $control-sizes {
|
|
@@ -47,4 +49,3 @@ $ctrl-line-height: 1.5 !default;
|
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
// use button hover styles?
|
package/scss/forms/_form.scss
CHANGED
|
@@ -57,59 +57,56 @@ select {
|
|
|
57
57
|
gap: 1rem;
|
|
58
58
|
|
|
59
59
|
label {
|
|
60
|
-
width:
|
|
60
|
+
width: 10rem; // use flex-basis to override
|
|
61
61
|
flex-shrink: 0; // prevent shrink for 100%
|
|
62
62
|
margin-top: 4px; // better alignment
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
//
|
|
78
|
-
// 2. allow everything to align vertically
|
|
79
|
-
// 3. inputs using trailing icons must be 100%
|
|
80
|
-
|
|
81
|
-
.with-addons {
|
|
82
|
-
position: relative;
|
|
83
|
-
display: flex; // 1.
|
|
84
|
-
align-items: center; // 1.
|
|
85
|
-
|
|
86
|
-
.leadingAddon,
|
|
87
|
-
.trailingAddon {
|
|
88
|
-
position: absolute;
|
|
89
|
-
pointer-events: none;
|
|
90
|
-
// z-index: 10;
|
|
91
|
-
color: $placeholder-color;
|
|
92
|
-
line-height: 1; // 2.
|
|
67
|
+
.withAddons {
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
flex: 1 1 0%;
|
|
71
|
+
|
|
72
|
+
input {
|
|
73
|
+
flex-grow: 1;
|
|
74
|
+
// border-top-left-radius: 0;
|
|
75
|
+
// border-bottom-left-radius: 0;
|
|
76
|
+
// border-top-right-radius: 0;
|
|
77
|
+
// border-bottom-right-radius: 0;
|
|
93
78
|
}
|
|
94
79
|
|
|
95
80
|
.leadingAddon {
|
|
96
|
-
left: $
|
|
81
|
+
border-top-left-radius: $ctrl-border-radius;
|
|
82
|
+
border-bottom-left-radius: $ctrl-border-radius;
|
|
97
83
|
}
|
|
98
84
|
|
|
99
85
|
.trailingAddon {
|
|
100
|
-
right: $
|
|
86
|
+
border-top-right-radius: $ctrl-border-radius;
|
|
87
|
+
border-bottom-right-radius: $ctrl-border-radius;
|
|
101
88
|
}
|
|
102
89
|
|
|
103
|
-
//
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
90
|
+
// style addons the same as the control
|
|
91
|
+
.leadingAddon,
|
|
92
|
+
.trailingAddon {
|
|
93
|
+
border: $ctrl-border;
|
|
94
|
+
font-size: $ctrl-font-size;
|
|
95
|
+
padding: $ctrl-padding-y $ctrl-padding-x;
|
|
96
|
+
line-height: $ctrl-line-height; // 1
|
|
97
|
+
display: inline-flex;
|
|
110
98
|
}
|
|
99
|
+
}
|
|
111
100
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
101
|
+
|
|
102
|
+
.withAddons:has(.leadingAddon){
|
|
103
|
+
background: green;
|
|
115
104
|
}
|
|
105
|
+
// the width of the addon will vary depending on the content
|
|
106
|
+
// :where(input) {
|
|
107
|
+
// padding-left: 2rem;
|
|
108
|
+
// width: 100%; // 3.
|
|
109
|
+
// &:focus ~ * {
|
|
110
|
+
// color: rgb(73, 73, 73);
|
|
111
|
+
// }
|
|
112
|
+
// }
|
package/scss/forms/_index.scss
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@use "../utilities/display_visibility" as *;
|
|
2
|
+
@use "../utilities/transition" as *;
|
|
3
|
+
|
|
4
|
+
$toggle-body-height: 1.5rem;
|
|
5
|
+
$toggle-body-width: 3rem;
|
|
6
|
+
$toggle-gap: 0.25rem;
|
|
7
|
+
|
|
8
|
+
.toggle {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
|
|
14
|
+
input[type="checkbox"] {
|
|
15
|
+
@extend .sr-only;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// toggle body
|
|
19
|
+
div {
|
|
20
|
+
border-radius: 9999px;
|
|
21
|
+
width: $toggle-body-width;
|
|
22
|
+
height: $toggle-body-height;
|
|
23
|
+
background-color: hsl(0deg, 0%, 90%);
|
|
24
|
+
|
|
25
|
+
// toggle off
|
|
26
|
+
&::after {
|
|
27
|
+
position: absolute;
|
|
28
|
+
content: "";
|
|
29
|
+
height: calc($toggle-body-height - $toggle-gap);
|
|
30
|
+
width: calc($toggle-body-height - $toggle-gap);
|
|
31
|
+
top: calc($toggle-gap / 2);
|
|
32
|
+
left: calc($toggle-gap / 2);
|
|
33
|
+
background-color: hsl(0, 0%, 100%);
|
|
34
|
+
border-color: rgba(0, 0, 0, 0.15);
|
|
35
|
+
border-radius: 9999px;
|
|
36
|
+
border-width: 1px;
|
|
37
|
+
@extend .transition;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
input[type="checkbox"]:checked {
|
|
43
|
+
// toggle body on (checked)
|
|
44
|
+
~ div {
|
|
45
|
+
background-color: hsl(100, 70%, 40%);
|
|
46
|
+
@extend .transition;
|
|
47
|
+
// toggle when checked
|
|
48
|
+
&::after {
|
|
49
|
+
// background-color: hsl(50, 10%, 10%);
|
|
50
|
+
transform: translateX(calc($toggle-body-width - $toggle-body-height));
|
|
51
|
+
@extend .transition;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@use "../base/vars_base" as *;
|
|
2
|
+
|
|
3
|
+
// set text colour based on the background
|
|
4
|
+
// --------------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
@function setTextColor($bg-color) {
|
|
7
|
+
@if (lightness($bg-color) > 60) {
|
|
8
|
+
@return $base-color;
|
|
9
|
+
} @else {
|
|
10
|
+
@return #fff;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// --------------------------------------------------------------
|
|
15
|
+
// -- CONVERT COLOR TO RGBA --
|
|
16
|
+
// --------------------------------------------------------------
|
|
17
|
+
// will convert when passing in rgb, hex or hsl
|
|
18
|
+
//
|
|
19
|
+
// manually set a colour to convert
|
|
20
|
+
// background-color: convertToRgba(#e23465);
|
|
21
|
+
//
|
|
22
|
+
// optionally set the opacity
|
|
23
|
+
// background-color: convertToRgba(#e23465, 0.5);
|
|
24
|
+
//
|
|
25
|
+
// fetch a color from the color-map
|
|
26
|
+
// background-color: convertToRgba(map-get($color-map, 'blue'));
|
|
27
|
+
|
|
28
|
+
@function convertToRgba($color, $alpha: 1) {
|
|
29
|
+
@return rgba(red($color), green($color), blue($color), $alpha);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
package/scss/jtb.scss
CHANGED
|
@@ -12,9 +12,6 @@
|
|
|
12
12
|
// @use "nk_components";
|
|
13
13
|
@forward "nk";
|
|
14
14
|
@forward "forms";
|
|
15
|
-
@forward "layout/grid_old";
|
|
16
|
-
|
|
17
|
-
|
|
18
15
|
|
|
19
16
|
@forward "components/accordion";
|
|
20
17
|
@forward "components/box";
|
|
@@ -22,24 +19,26 @@
|
|
|
22
19
|
@forward "components/dropdown";
|
|
23
20
|
@forward "components/hero"; // has problems with img
|
|
24
21
|
@forward "components/icon";
|
|
22
|
+
@forward "components/list";
|
|
25
23
|
@forward "components/menu";
|
|
26
24
|
@forward "components/navbar";
|
|
27
25
|
@forward "components/other";
|
|
28
26
|
@forward "components/sidebar";
|
|
29
27
|
|
|
28
|
+
// this is completly optional
|
|
29
|
+
// @forward "layouts/_two-column";
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
// @forward "utilities/visibility";
|
|
33
|
-
// why forward???
|
|
34
31
|
@forward "utilities/border";
|
|
35
|
-
@forward "utilities/
|
|
32
|
+
@forward "utilities/display_visibility";
|
|
36
33
|
@forward "utilities/flex";
|
|
37
34
|
@forward "utilities/general";
|
|
38
35
|
@forward "utilities/grid";
|
|
36
|
+
@forward "utilities/opacity";
|
|
39
37
|
@forward "utilities/position";
|
|
40
38
|
@forward "utilities/sizes";
|
|
41
39
|
@forward "utilities/spacing";
|
|
42
40
|
@forward "utilities/state";
|
|
43
41
|
@forward "utilities/text";
|
|
44
42
|
@forward "utilities/themes";
|
|
45
|
-
|
|
43
|
+
@forward "utilities/transition";
|
|
44
|
+
@forward "utilities/translate";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@use "../mixins/media" as *;
|
|
2
|
+
@use "../base/vars_base" as *;
|
|
3
|
+
|
|
4
|
+
// These are common design patterns layouts
|
|
5
|
+
|
|
6
|
+
// add reverse to swap column positions or use order utility classes??
|
|
7
|
+
|
|
8
|
+
// utility structure
|
|
9
|
+
|
|
10
|
+
// <div class="flex-col md:flex-row gg">
|
|
11
|
+
// <div class="w-24-full"></div>
|
|
12
|
+
// <div class="fg1"></div>
|
|
13
|
+
// </div>
|
|
14
|
+
|
|
15
|
+
// TEST: can i still override??
|
|
16
|
+
.two-column {
|
|
17
|
+
display: flex;
|
|
18
|
+
// gap: 3rem;
|
|
19
|
+
|
|
20
|
+
// > div {
|
|
21
|
+
// flex: 1;
|
|
22
|
+
// }
|
|
23
|
+
|
|
24
|
+
// aside {
|
|
25
|
+
// width: 24rem;
|
|
26
|
+
// flex: 0 1 100%;
|
|
27
|
+
// }
|
|
28
|
+
|
|
29
|
+
// @include to-lg {
|
|
30
|
+
// flex-direction: column;
|
|
31
|
+
// }
|
|
32
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use "../base/vars_all" as *; // required to set defaults
|
|
2
2
|
@use "../mixins/colorSchemeSimple" as *;
|
|
3
|
-
@use "../functions/
|
|
3
|
+
@use "../functions/colorFunctions" as *;
|
|
4
4
|
|
|
5
5
|
// The minimum requirement for creating a theme-map is the $base
|
|
6
6
|
// color, all other properties can be created intuitively.
|
|
@@ -13,9 +13,12 @@
|
|
|
13
13
|
// --------------------------------------------------------------
|
|
14
14
|
// -- CREATE SINGLE CSS PROPERTY --
|
|
15
15
|
// --------------------------------------------------------------
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
// creates a single size based properties. if the situation arises when you do
|
|
17
|
+
// not need a unit, re-write with conditional
|
|
18
|
+
@mixin makeCssProperty($property, $value, $unit: null) {
|
|
19
|
+
$val: if($value == "full", 100, $value);
|
|
20
|
+
$u: if($value == "full", "%", $unit);
|
|
21
|
+
#{$property}: #{$val}#{$u};
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
// --------------------------------------------------------------
|
|
@@ -26,3 +29,5 @@
|
|
|
26
29
|
#{$property}: $value;
|
|
27
30
|
}
|
|
28
31
|
}
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@use "./media" as *;
|
|
2
|
+
@use "./makeCssPropertyMixins" as *;
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
@use "sass:string";
|
|
6
|
+
|
|
7
|
+
// Make magic responsive class for a single css property.
|
|
8
|
+
//
|
|
9
|
+
// accepts single css property with list of lists with responsive sizes
|
|
10
|
+
|
|
11
|
+
@mixin makeMagicClass($property, $prefix, $listOfLists, $unit: rem) {
|
|
12
|
+
// must have at least two list
|
|
13
|
+
@each $list in $listOfLists {
|
|
14
|
+
// exclude empty list when creating single list
|
|
15
|
+
@if ($list != ()) {
|
|
16
|
+
$numBreakPoints: list.length($list);
|
|
17
|
+
|
|
18
|
+
// set the value of the BP based on position using negative
|
|
19
|
+
// numbers. This makes sure the position is always the same
|
|
20
|
+
$smValue: nth($list, -1);
|
|
21
|
+
$mdValue: nth($list, -2);
|
|
22
|
+
$lgValue: if($numBreakPoints >= 3, nth($list, -3), null);
|
|
23
|
+
$xlValue: if($numBreakPoints >= 4, nth($list, -4), null);
|
|
24
|
+
$xxlValue: if($numBreakPoints >= 5, nth($list, -5), null);
|
|
25
|
+
|
|
26
|
+
$derived-class: #{$mdValue}-#{$smValue};
|
|
27
|
+
|
|
28
|
+
@if ($numBreakPoints == 3) {
|
|
29
|
+
$derived-class: #{$lgValue}-#{$mdValue}-#{$smValue};
|
|
30
|
+
} @else if ($numBreakPoints == 4) {
|
|
31
|
+
$derived-class: #{$xlValue}-#{$lgValue}-#{$mdValue}-#{$smValue};
|
|
32
|
+
} @else if ($numBreakPoints == 5) {
|
|
33
|
+
$derived-class: #{$xxlValue}-#{$xlValue}-#{$lgValue}-#{$mdValue}-#{$smValue};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.#{$prefix}-#{$derived-class} {
|
|
37
|
+
@include from-sm {
|
|
38
|
+
@include makeCssProperty($property, $smValue, $unit);
|
|
39
|
+
}
|
|
40
|
+
@include from-md {
|
|
41
|
+
@include makeCssProperty($property, $mdValue, $unit);
|
|
42
|
+
}
|
|
43
|
+
@if ($numBreakPoints >= 3) {
|
|
44
|
+
@include from-lg {
|
|
45
|
+
@include makeCssProperty($property, $lgValue, $unit);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
@if ($numBreakPoints >= 4) {
|
|
49
|
+
@include from-xl {
|
|
50
|
+
@include makeCssProperty($property, $xlValue, $unit);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
@if ($numBreakPoints >= 5) {
|
|
54
|
+
@include from-xxl {
|
|
55
|
+
@include makeCssProperty($property, $xxlValue,$unit);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|