nk_jtb 0.16.1 → 0.17.1
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/package.json +1 -1
- package/src/base/_base.scss +2 -1
- package/src/base/_content_gap.scss +6 -5
- package/src/base/_typography.scss +5 -5
- package/src/components/_menu.scss +6 -6
- package/{tmp427 → src/extras}/_hero.scss +3 -3
- package/src/extras/_nk-docs.scss +5 -5
- package/src/maps_and_variables/_base.scss +5 -3
- package/src/maps_and_variables/_components.scss +1 -1
- package/src/maps_and_variables/_utility-maps.scss +0 -36
- package/src/maps_and_variables/_values-variants-and-properties.scss +50 -0
- package/src/maps_and_variables/index.scss +4 -1
- package/src/utilities/_margin.scss +10 -10
- package/src/utilities/_padding.scss +4 -5
package/package.json
CHANGED
package/src/base/_base.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* stylelint-disable */
|
|
1
2
|
@use '../maps_and_variables/base' as *;
|
|
2
3
|
@use '../maps_and_variables/layout' as *;
|
|
3
4
|
@use '../maps_and_variables/typography' as *;
|
|
@@ -36,7 +37,7 @@ body {
|
|
|
36
37
|
|
|
37
38
|
hr {
|
|
38
39
|
height: 0;
|
|
39
|
-
margin: $
|
|
40
|
+
margin: $base-gap 0;
|
|
40
41
|
border-color: $border-color;
|
|
41
42
|
border-top-width: 2px;
|
|
42
43
|
}
|
|
@@ -2,23 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
// don't be tempted to add div here, it creates more problems than it solves
|
|
4
4
|
$html-elements: blockquote, p, pre, form, table, ol, ul, h1, h2, h3, h4, h5, h6;
|
|
5
|
-
$common-classes: '.bx', '.bx-content', '.bx-title', "[class*='container']", '.frm-row', '.grid',
|
|
5
|
+
$common-classes: '.bx', '.bx-content', '.bx-title', "[class*='container']", '.frm-row', '.grid',
|
|
6
|
+
"[class*='flex']:not(.inline-flex)";
|
|
6
7
|
|
|
7
8
|
// Content gap
|
|
8
9
|
:where(#{$html-elements}, #{$common-classes}) + :where(*) {
|
|
9
|
-
margin-top: $
|
|
10
|
+
margin-top: $base-gap;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
// This is experimental and may be more hassle than it's worth. It is to cover
|
|
13
14
|
// the case when there are hidden inputs in the form.
|
|
14
15
|
:where(input) + :where(div:not(.slider), p) {
|
|
15
|
-
margin-top: $
|
|
16
|
+
margin-top: $base-gap;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
// catch the strays (use with caution). The :where selector is to kill the
|
|
19
20
|
// specificity for easier override
|
|
20
|
-
:where(*:not([class*='flex']
|
|
21
|
-
margin-top: $
|
|
21
|
+
:where(*:not([class*='flex'], [class*='grid'])) > :where(.frm-row, table, form, pre):not(:first-child) {
|
|
22
|
+
margin-top: $base-gap;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
// opt out for `flex` and `grid` element and use `gap` instead.
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
:where(h1, h2, h3, h4, h5, h6) {
|
|
16
|
-
font-weight: $heading-font-weight;
|
|
17
16
|
color: $heading-color;
|
|
17
|
+
font-weight: $heading-font-weight;
|
|
18
18
|
line-height: 1.25;
|
|
19
19
|
text-wrap: balance;
|
|
20
20
|
}
|
|
@@ -51,10 +51,10 @@ code,
|
|
|
51
51
|
kbd,
|
|
52
52
|
pre,
|
|
53
53
|
samp {
|
|
54
|
+
border-radius: 0.25rem;
|
|
55
|
+
color: #d9558c;
|
|
54
56
|
font-family: $mono-font;
|
|
55
57
|
font-size: 0.875rem;
|
|
56
|
-
color: #d9558c;
|
|
57
|
-
border-radius: 0.25rem;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
pre {
|
|
@@ -69,8 +69,8 @@ pre {
|
|
|
69
69
|
|
|
70
70
|
:is(a) {
|
|
71
71
|
color: $link-color;
|
|
72
|
-
text-decoration: inherit;
|
|
73
72
|
cursor: pointer;
|
|
73
|
+
text-decoration: inherit;
|
|
74
74
|
|
|
75
75
|
&:hover {
|
|
76
76
|
color: $link-hover-color;
|
|
@@ -86,7 +86,7 @@ pre {
|
|
|
86
86
|
ul,
|
|
87
87
|
ol {
|
|
88
88
|
list-style-position: outside; // 1
|
|
89
|
-
margin-inline-start: $
|
|
89
|
+
margin-inline-start: $base-padding; // 2
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
li {
|
|
@@ -15,26 +15,26 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
:where(a, li a, .menu-item) {
|
|
18
|
+
align-items: center;
|
|
18
19
|
color: inherit;
|
|
19
|
-
padding: $menu-padding-y $menu-padding-x;
|
|
20
20
|
display: flex;
|
|
21
|
-
|
|
21
|
+
padding: $menu-padding-y $menu-padding-x;
|
|
22
22
|
|
|
23
23
|
&:is(.active, :hover):not(.disabled) {
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
color: $menu-link-hover-color;
|
|
26
24
|
background-color: $menu-hover-bg;
|
|
25
|
+
color: $menu-link-hover-color;
|
|
26
|
+
cursor: pointer;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.menu-title {
|
|
31
31
|
font-weight: 600;
|
|
32
32
|
letter-spacing: 0.05em;
|
|
33
|
-
margin-left: $menu-padding-x;
|
|
34
33
|
margin-bottom: 0.5em;
|
|
34
|
+
margin-left: $menu-padding-x;
|
|
35
35
|
|
|
36
36
|
&:not(:first-child) {
|
|
37
|
-
margin-top: $
|
|
37
|
+
margin-top: $base-gap;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../
|
|
1
|
+
@use '../common-tools' as *;
|
|
2
2
|
|
|
3
3
|
$hero-title-color: #eee !default;
|
|
4
4
|
$hero-title-lg: 3rem !default;
|
|
@@ -7,11 +7,11 @@ $hero-subtitle-color: #eee !default;
|
|
|
7
7
|
$hero-subtitle-lg: 2.5rem !default;
|
|
8
8
|
$hero-subtitle-sm: 1.75rem !default;
|
|
9
9
|
$hero-gradient: linear-gradient(rgb(0 0 0 / 30%), rgb(0 0 0 / 40%)) !default;
|
|
10
|
-
$hero-text-padding: $
|
|
10
|
+
$hero-text-padding: $base-padding !default;
|
|
11
11
|
|
|
12
12
|
.hero {
|
|
13
|
-
background-repeat: no-repeat;
|
|
14
13
|
background-position: center;
|
|
14
|
+
background-repeat: no-repeat;
|
|
15
15
|
background-size: cover;
|
|
16
16
|
|
|
17
17
|
.title {
|
package/src/extras/_nk-docs.scss
CHANGED
|
@@ -14,11 +14,11 @@ $question-color: #c40c9a !default;
|
|
|
14
14
|
// ==========================================================================
|
|
15
15
|
question {
|
|
16
16
|
color: $question-color;
|
|
17
|
-
margin-block-start: $content-gap;
|
|
18
|
-
font-weight: 700;
|
|
19
|
-
font-style: italic;
|
|
20
17
|
display: block;
|
|
21
18
|
font-size: 1.15rem;
|
|
19
|
+
font-style: italic;
|
|
20
|
+
font-weight: 700;
|
|
21
|
+
margin-block-start: $base-gap;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// Reduce margin between a <question> and the following paragraph.
|
|
@@ -40,8 +40,8 @@ p:has(question) + p {
|
|
|
40
40
|
*/
|
|
41
41
|
pre {
|
|
42
42
|
border-radius: 0.25rem;
|
|
43
|
-
margin-top: 1rem;
|
|
44
43
|
margin-bottom: 1rem;
|
|
44
|
+
margin-top: 1rem;
|
|
45
45
|
overflow-x: auto;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -54,8 +54,8 @@ pre {
|
|
|
54
54
|
pre code.torchlight {
|
|
55
55
|
display: block;
|
|
56
56
|
min-width: max-content;
|
|
57
|
-
padding-top: 1rem;
|
|
58
57
|
padding-bottom: 1rem;
|
|
58
|
+
padding-top: 1rem;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/*
|
|
@@ -37,12 +37,14 @@ $line-height-condensed: 1.25 !default;
|
|
|
37
37
|
//
|
|
38
38
|
$body-bg: hsl(0deg 0% 100%) !default;
|
|
39
39
|
|
|
40
|
-
|
|
41
40
|
// -- Spacing --
|
|
42
41
|
// ==========================================================================
|
|
43
42
|
$base-list-spacing: 0.25em !default;
|
|
44
|
-
$
|
|
45
|
-
$
|
|
43
|
+
$base-gap: 1.25rem !default; // default gap between content blocks
|
|
44
|
+
$base-padding: 1.25rem !default; // default padding inside content blocks
|
|
45
|
+
|
|
46
|
+
//
|
|
47
|
+
// ==========================================================================
|
|
46
48
|
$header-bg: $secondary !default;
|
|
47
49
|
$main-bg: transparent !default;
|
|
48
50
|
$footer-bg: #1d1d1c !default;
|
|
@@ -35,7 +35,7 @@ $icon-tick: url("data:image/svg+xml;utf8,<?xml version='1.0' encoding='utf-8'?><
|
|
|
35
35
|
// -- BOX --
|
|
36
36
|
// ==========================================================================
|
|
37
37
|
$bx-bg: #fff !default;
|
|
38
|
-
$bx-padding: $
|
|
38
|
+
$bx-padding: $base-padding !default;
|
|
39
39
|
$bx-border-radius: 0.5rem !default;
|
|
40
40
|
$bx-header-bg: rgb(250 250 250) !default;
|
|
41
41
|
$bx-title-font-weight: 600 !default;
|
|
@@ -6,30 +6,6 @@
|
|
|
6
6
|
@use '../functions/map-and-list-helpers' as *;
|
|
7
7
|
@use 'sass:map';
|
|
8
8
|
|
|
9
|
-
// ### Core Convention
|
|
10
|
-
|
|
11
|
-
// * **`$<name>-values`** — raw or ordered values used in class generation
|
|
12
|
-
// * **`$<name>-variants`** — named key\:value pairs for semantic or responsive variants
|
|
13
|
-
// * **`$<name>-map`** — final merged map, used in class generators
|
|
14
|
-
|
|
15
|
-
// ```
|
|
16
|
-
// $spacing-values: (0, 0.25, 0.5, 1, 1.5, 2, 3, 4) !default;
|
|
17
|
-
// $spacing-variants: (sm: 0.75, md: 1.25, lg: 2) !default;
|
|
18
|
-
// $spacing-map: smart-merge($spacing-values, $spacing-variants) !default;
|
|
19
|
-
// ```
|
|
20
|
-
|
|
21
|
-
// ```
|
|
22
|
-
// $size-values: (auto, full, screen) !default;
|
|
23
|
-
// $size-variants: (sm: 16rem, md: 32rem, lg: 64rem) !default;
|
|
24
|
-
// $size-map: smart-merge($size-values, $size-variants) !default;
|
|
25
|
-
// ```
|
|
26
|
-
|
|
27
|
-
// ```
|
|
28
|
-
// $color-values: (primary, secondary, accent, muted) !default;
|
|
29
|
-
// $color-variants: ( primary: #007bff, secondary: #6c757d) !default;
|
|
30
|
-
// $color-map: smart-merge($color-values, $color-variants) !default;
|
|
31
|
-
// ```
|
|
32
|
-
|
|
33
9
|
// ==========================================================================
|
|
34
10
|
// Border, and border-radius sizes
|
|
35
11
|
// ==========================================================================
|
|
@@ -67,18 +43,6 @@ $gap-values: (0, 0.25, 0.5, 1, 1.25, 1.5, 2, 3, 4, 5) !default;
|
|
|
67
43
|
$gap-variants: (sm:.75, base: 1.25, lg:2) !default;
|
|
68
44
|
$gap-map: smart-merge($gap-values, $gap-variants) !default;
|
|
69
45
|
|
|
70
|
-
// Space sizes and variants for margin and padding utilities
|
|
71
|
-
// ==========================================================================
|
|
72
|
-
$spacing-values: (0, 0.125, 0.25, 0.5, 0.75, 0.875, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 4, 5) !default;
|
|
73
|
-
$padding-variants: ( default: $content-padding ) !default;
|
|
74
|
-
$margin-variants: ( base: 1.5, auto: auto ) !default;
|
|
75
|
-
$padding-map: map.merge($margin-variants, list-to-map($spacing-values));
|
|
76
|
-
$margin-map: map.merge($margin-variants, list-to-map($spacing-values));
|
|
77
|
-
|
|
78
|
-
// magic variations
|
|
79
|
-
$magic-margin-y: ((5, 3, 2), (3, 2, 1)) !default;
|
|
80
|
-
$magic-padding-y: ((5, 3, 2), (5, 3, 2, 2), (3, 2, 1)) !default;
|
|
81
|
-
|
|
82
46
|
// ==========================================================================
|
|
83
47
|
// Sizing maps and variants
|
|
84
48
|
// ==========================================================================
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use '../maps_and_variables/base' as *;
|
|
2
|
+
@use '../maps_and_variables/layout' as *;
|
|
3
|
+
@use '../maps_and_variables/property-maps' as *;
|
|
4
|
+
@use '../maps_and_variables/colors' as *;
|
|
5
|
+
@use '../functions/list-helpers' as *;
|
|
6
|
+
@use '../functions/map-and-list-helpers' as *;
|
|
7
|
+
@use 'sass:map';
|
|
8
|
+
|
|
9
|
+
// ### Map Naming Convention
|
|
10
|
+
// ===========================================================================
|
|
11
|
+
// Use the following convention for defining values, variants, and CSS property values in SCSS maps:
|
|
12
|
+
|
|
13
|
+
// When only CSS property values are needed, use the property name as the map name:
|
|
14
|
+
// $position: (static, absolute, fixed, relative, sticky);
|
|
15
|
+
|
|
16
|
+
// For utility class generation with values, variants and css property values, use the following naming convention:
|
|
17
|
+
// * **`$<name>-values`** — raw or ordered numeric values used in class generation
|
|
18
|
+
// * **`$<name>-variants`** — named key:value pairs for semantic, responsive, or CSS property variants
|
|
19
|
+
// * **`$<name>-map`** — final merged map, used in class generators
|
|
20
|
+
|
|
21
|
+
// Note: Variants can include both custom semantic values AND CSS property values (like auto, inherit, etc.)
|
|
22
|
+
|
|
23
|
+
// ```
|
|
24
|
+
// $spacing-values: (0, 0.25, 0.5, 1, 1.5, 2) !default;
|
|
25
|
+
// $spacing-variants: (sm: 0.75rem, lg: 2rem, auto: auto, base: 1rem) !default;
|
|
26
|
+
// $spacing-map: smart-merge($spacing-values, $spacing-variants) !default;
|
|
27
|
+
// ```
|
|
28
|
+
|
|
29
|
+
// ==========================================================================
|
|
30
|
+
// -- SPACING -- (margin, padding, gap, inset)
|
|
31
|
+
// ==========================================================================
|
|
32
|
+
$spacing-values: (0, 0.125, 0.25, 0.5, 0.75, 0.875, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 4, 5) !default;
|
|
33
|
+
|
|
34
|
+
$margin-variants: ( base: $base-gap, auto: auto ) !default;
|
|
35
|
+
$margin-map: map.merge($margin-variants, list-to-map($spacing-values));
|
|
36
|
+
|
|
37
|
+
$padding-variants: ( base: $base-padding ) !default;
|
|
38
|
+
$padding-map: map.merge($padding-variants, list-to-map($spacing-values));
|
|
39
|
+
|
|
40
|
+
// Magic Variants
|
|
41
|
+
$margin-magic-y: ((5, 3, 2), (3, 2, 1)) !default;
|
|
42
|
+
$padding-magic-y: ((5, 3, 2), (5, 3, 2, 2), (3, 2, 1)) !default;
|
|
43
|
+
|
|
44
|
+
// ==========================================================================
|
|
45
|
+
// -- SIZING -- (width, height)
|
|
46
|
+
// ==========================================================================
|
|
47
|
+
|
|
48
|
+
// ==========================================================================
|
|
49
|
+
// -- BORDER -- (radius, width, color)
|
|
50
|
+
// ==========================================================================
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
@forward './config';
|
|
5
5
|
@forward './layout';
|
|
6
6
|
@forward './position-maps';
|
|
7
|
-
@forward './property-maps';
|
|
8
7
|
@forward './tailwind-colors';
|
|
9
8
|
@forward './typography';
|
|
9
|
+
@forward './values-variants-and-properties';
|
|
10
|
+
|
|
11
|
+
// DEPRECATED
|
|
12
|
+
@forward './property-maps';
|
|
10
13
|
@forward './utility-maps';
|
|
@@ -11,28 +11,28 @@ $margin-properties-map: (
|
|
|
11
11
|
)
|
|
12
12
|
);
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
margin-left: $content-gap;
|
|
14
|
+
// NKTD: Refactor to use build tools and include custom variants
|
|
15
|
+
:where(.space-x > *:not(:first-child)) {
|
|
16
|
+
margin-left: $base-gap;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
.space-y > *:not(:first-child) {
|
|
21
|
-
margin-top: $
|
|
19
|
+
:where(.space-y > *:not(:first-child)) {
|
|
20
|
+
margin-top: $base-gap;
|
|
22
21
|
}
|
|
23
22
|
|
|
23
|
+
// the problem here is that the spacing values do not include variants.
|
|
24
24
|
@each $value in $spacing-values {
|
|
25
25
|
$variant: #{sanitize-class-name($value)};
|
|
26
|
-
.space-x-#{$variant} > *:not(:first-child) {
|
|
26
|
+
:where(.space-x-#{$variant} > *:not(:first-child)) {
|
|
27
27
|
margin-left: #{$value}rem;
|
|
28
28
|
}
|
|
29
|
-
.space-y-#{$variant} > *:not(:first-child) {
|
|
29
|
+
:where(.space-y-#{$variant} > *:not(:first-child)) {
|
|
30
30
|
margin-top: #{$value}rem;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
@include from-xl {
|
|
35
|
-
.lg\:space-x > *:not(:first-child) {
|
|
35
|
+
:where(.lg\:space-x > *:not(:first-child)) {
|
|
36
36
|
margin-left: 1rem;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -41,4 +41,4 @@ $margin-properties-map: (
|
|
|
41
41
|
// Builds
|
|
42
42
|
// ==========================================================================
|
|
43
43
|
@include build-property-classes($margin-properties-map, $responsive: true);
|
|
44
|
-
@include build-magic-classes(margin, $magic-
|
|
44
|
+
@include build-magic-classes(margin, $margin-magic-y, 'my', $position-or-axis: y);
|
|
@@ -10,9 +10,8 @@ $padding-properties-map: (
|
|
|
10
10
|
)
|
|
11
11
|
);
|
|
12
12
|
|
|
13
|
+
// ==========================================================================
|
|
14
|
+
// Builds
|
|
15
|
+
// ==========================================================================
|
|
13
16
|
@include build-property-classes($padding-properties-map, $responsive: true);
|
|
14
|
-
|
|
15
|
-
// magic classes
|
|
16
|
-
$magic-padding-y: ((5, 3, 2), (5, 3, 2, 2), (3, 2, 1)) !default;
|
|
17
|
-
|
|
18
|
-
@include build-magic-classes(padding, $magic-padding-y, "py", $position-or-axis: y);
|
|
17
|
+
@include build-magic-classes(padding, $padding-magic-y, 'py', $position-or-axis: y);
|