@nulllogic/scssleon 1.0.3 → 1.0.4
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/README.md +3 -3
- package/package.json +12 -10
- package/scss/_base.scss +7 -19
- package/scss/_config.scss +4 -10
- package/scss/_content.scss +4 -3
- package/scss/_functions.scss +12 -25
- package/scss/_reset.scss +20 -7
- package/scss/_root.scss +9 -11
- package/scss/components/_accordion.scss +4 -4
- package/scss/components/_alert.scss +4 -4
- package/scss/components/_badge.scss +4 -4
- package/scss/components/_breadcrumb.scss +4 -4
- package/scss/components/_button.scss +4 -4
- package/scss/components/_button_group.scss +4 -4
- package/scss/components/_card.scss +4 -4
- package/scss/components/_container.scss +3 -3
- package/scss/components/_dropdown.scss +11 -1
- package/scss/components/_loader.scss +4 -4
- package/scss/components/_modal.scss +4 -4
- package/scss/components/_nav.scss +4 -3
- package/scss/components/_navbar.scss +4 -4
- package/scss/components/_overlay.scss +4 -4
- package/scss/components/_pagination.scss +4 -4
- package/scss/components/_placeholder.scss +4 -9
- package/scss/components/_sidecap.scss +4 -4
- package/scss/components/_table.scss +3 -3
- package/scss/forms/_checkbox.scss +5 -5
- package/scss/forms/_input-group.scss +4 -4
- package/scss/forms/_input.scss +4 -4
- package/scss/forms/_label.scss +4 -4
- package/scss/forms/_radio.scss +4 -4
- package/scss/forms/_range.scss +4 -4
- package/scss/forms/_select.scss +4 -4
- package/scss/forms/_switch.scss +4 -4
- package/scss/forms/_validation.scss +4 -4
- package/scss/mixins/_utilities.scss +1 -1
- package/scss/mixins/generators/_components.scss +16 -11
- package/scss/mixins/generators/_properties.scss +50 -36
- package/scss/scssleon.scss +10 -6
- package/scss/themes/_default.scss +381 -150
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
@use '../functions' as functions;
|
|
1
|
+
/* Load mixins/functions */
|
|
3
2
|
@use '../mixins' as mixins;
|
|
3
|
+
@use '../functions' as functions;
|
|
4
4
|
|
|
5
5
|
/* SCSS variables definition requirement */
|
|
6
6
|
$config: nil !default;
|
|
7
7
|
$theme: nil !default;
|
|
8
8
|
|
|
9
9
|
@include mixins.generate-component(
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'form.input-group',
|
|
11
|
+
'input-group',
|
|
12
12
|
$config,
|
|
13
13
|
$theme
|
|
14
14
|
);
|
package/scss/forms/_input.scss
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
@use '../functions' as functions;
|
|
1
|
+
/* Load mixins/functions */
|
|
3
2
|
@use '../mixins' as mixins;
|
|
3
|
+
@use '../functions' as functions;
|
|
4
4
|
|
|
5
5
|
/* SCSS variables definition requirement */
|
|
6
6
|
$config: nil !default;
|
|
7
7
|
$theme: nil !default;
|
|
8
8
|
|
|
9
9
|
@include mixins.generate-component(
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'form.input',
|
|
11
|
+
'input',
|
|
12
12
|
$config,
|
|
13
13
|
$theme
|
|
14
14
|
);
|
package/scss/forms/_label.scss
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
@use '../functions' as functions;
|
|
1
|
+
/* Load mixins/functions */
|
|
3
2
|
@use '../mixins' as mixins;
|
|
3
|
+
@use '../functions' as functions;
|
|
4
4
|
|
|
5
5
|
/* SCSS variables definition requirement */
|
|
6
6
|
$config: nil !default;
|
|
7
7
|
$theme: nil !default;
|
|
8
8
|
|
|
9
9
|
@include mixins.generate-component(
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'form.label',
|
|
11
|
+
'label',
|
|
12
12
|
$config,
|
|
13
13
|
$theme
|
|
14
14
|
);
|
package/scss/forms/_radio.scss
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
@use '../functions' as functions;
|
|
1
|
+
/* Load mixins/functions */
|
|
3
2
|
@use '../mixins' as mixins;
|
|
3
|
+
@use '../functions' as functions;
|
|
4
4
|
|
|
5
5
|
/* SCSS variables definition requirement */
|
|
6
6
|
$config: nil !default;
|
|
7
7
|
$theme: nil !default;
|
|
8
8
|
|
|
9
9
|
@include mixins.generate-component(
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'form.radio',
|
|
11
|
+
'radio',
|
|
12
12
|
$config,
|
|
13
13
|
$theme
|
|
14
14
|
);
|
package/scss/forms/_range.scss
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
@use '../functions' as functions;
|
|
1
|
+
/* Load mixins/functions */
|
|
3
2
|
@use '../mixins' as mixins;
|
|
3
|
+
@use '../functions' as functions;
|
|
4
4
|
|
|
5
5
|
/* SCSS variables definition requirement */
|
|
6
6
|
$config: nil !default;
|
|
7
7
|
$theme: nil !default;
|
|
8
8
|
|
|
9
9
|
@include mixins.generate-component(
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'form.range',
|
|
11
|
+
'range',
|
|
12
12
|
$config,
|
|
13
13
|
$theme
|
|
14
14
|
);
|
package/scss/forms/_select.scss
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
@use '../functions' as functions;
|
|
1
|
+
/* Load mixins/functions */
|
|
3
2
|
@use '../mixins' as mixins;
|
|
3
|
+
@use '../functions' as functions;
|
|
4
4
|
|
|
5
5
|
/* SCSS variables definition requirement */
|
|
6
6
|
$config: nil !default;
|
|
7
7
|
$theme: nil !default;
|
|
8
8
|
|
|
9
9
|
@include mixins.generate-component(
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'form.select',
|
|
11
|
+
'select',
|
|
12
12
|
$config,
|
|
13
13
|
$theme
|
|
14
14
|
);
|
package/scss/forms/_switch.scss
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
@use '../functions' as functions;
|
|
1
|
+
/* Load mixins/functions */
|
|
3
2
|
@use '../mixins' as mixins;
|
|
3
|
+
@use '../functions' as functions;
|
|
4
4
|
|
|
5
5
|
/* SCSS variables definition requirement */
|
|
6
6
|
$config: nil !default;
|
|
7
7
|
$theme: nil !default;
|
|
8
8
|
|
|
9
9
|
@include mixins.generate-component(
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'form.switch',
|
|
11
|
+
'switch',
|
|
12
12
|
$config,
|
|
13
13
|
$theme
|
|
14
14
|
);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
@use '../functions' as functions;
|
|
1
|
+
/* Load mixins/functions */
|
|
3
2
|
@use '../mixins' as mixins;
|
|
3
|
+
@use '../functions' as functions;
|
|
4
4
|
|
|
5
5
|
/* SCSS variables definition requirement */
|
|
6
6
|
$config: nil !default;
|
|
7
7
|
$theme: nil !default;
|
|
8
8
|
|
|
9
9
|
@include mixins.generate-component(
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
'form.validation',
|
|
11
|
+
'validation',
|
|
12
12
|
$config,
|
|
13
13
|
$theme
|
|
14
14
|
);
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
3
3
|
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
4
|
+
@use 'properties';
|
|
5
|
+
@use 'wrapper';
|
|
6
6
|
|
|
7
|
-
@use
|
|
7
|
+
@use '../../functions' as functions;
|
|
8
8
|
|
|
9
|
-
@mixin generate-component($component, $class, $config, $theme) {
|
|
10
|
-
$theme-component:
|
|
9
|
+
@mixin generate-component($component, $class, $config, $theme, $options : ()) {
|
|
10
|
+
$theme-component: '';
|
|
11
11
|
|
|
12
|
-
// Checking, if the component was previously defined inside theme components
|
|
13
|
-
@if (meta.type-of($component) ==
|
|
12
|
+
// Checking, if the component was previously defined inside theme's components
|
|
13
|
+
@if (meta.type-of($component) == 'string') {
|
|
14
14
|
/* Loading component settings and styling */
|
|
15
15
|
$theme-component: functions.get-theme(
|
|
16
16
|
$theme,
|
|
17
|
-
|
|
17
|
+
'components' + '.' + $component
|
|
18
18
|
);
|
|
19
19
|
} @else {
|
|
20
20
|
$theme-component: $component;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
%#{$class} {
|
|
24
|
-
@include properties.generate-properties($class, $theme-component, $config);
|
|
24
|
+
@include properties.generate-properties($class, $theme-component, $config, $options);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
@include wrapper.generate-wrapper($config) {
|
|
@@ -31,3 +31,8 @@
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
//@mixin generate-components($component, $class, $config, $theme) {
|
|
35
|
+
|
|
36
|
+
@mixin get-structure ($component) {
|
|
37
|
+
@debug $component;
|
|
38
|
+
}
|
|
@@ -5,11 +5,15 @@
|
|
|
5
5
|
@use "../../functions" as functions;
|
|
6
6
|
@use "../../mixins/generators/color-sheme" as mixin;
|
|
7
7
|
|
|
8
|
-
@mixin generate-css-properties($tag, $property, $value, $config) {
|
|
8
|
+
@mixin generate-css-properties($tag, $property, $value, $config, $options : ()) {
|
|
9
9
|
$prefix: functions.get-config($config, "prefix");
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
--#{$prefix}-#{
|
|
11
|
+
@if(functions.get-config($options, 'add_pseudo_tag') != nil and functions.get-config($options, 'add_pseudo_tag') == false) {
|
|
12
|
+
--#{$prefix}-#{functions.replace($property, '--', '')}: #{meta.inspect(
|
|
13
|
+
$value
|
|
14
|
+
)};
|
|
15
|
+
} @else {
|
|
16
|
+
--#{$prefix}-#{$tag}-#{functions.replace($property, '--', '')}: #{meta.inspect(
|
|
13
17
|
$value
|
|
14
18
|
)};
|
|
15
19
|
}
|
|
@@ -18,26 +22,20 @@
|
|
|
18
22
|
@mixin generate-css-variables($tag, $property, $value, $config) {
|
|
19
23
|
$prefix: functions.get-config($config, "prefix");
|
|
20
24
|
|
|
21
|
-
@if (meta.type-of($value) == "string" and
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
& {
|
|
29
|
-
#{$property}: #{meta.inspect(
|
|
30
|
-
functions.str-replace(
|
|
25
|
+
@if (meta.type-of($value) == "string" and string.index($value, "var(--") == 1) {
|
|
26
|
+
#{$property}: #{meta.inspect(
|
|
27
|
+
functions.replace($value, "--", "--" + $prefix + "-" + $tag + "-")
|
|
28
|
+
)};
|
|
29
|
+
} @else if (meta.type-of($value) == "string" and string.index($value, "var(global(") == 1) {
|
|
30
|
+
#{$property}: #{meta.inspect(
|
|
31
|
+
functions.replace(
|
|
31
32
|
string.slice($value, 0, string.length($value) - 1),
|
|
32
33
|
"global(--",
|
|
33
34
|
"--" + $prefix + "-root-"
|
|
34
35
|
)
|
|
35
36
|
)};
|
|
36
|
-
}
|
|
37
37
|
} @else {
|
|
38
|
-
|
|
39
|
-
#{$property}: #{meta.inspect($value)};
|
|
40
|
-
}
|
|
38
|
+
#{$property}: #{meta.inspect($value)};
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
41
|
|
|
@@ -45,15 +43,13 @@
|
|
|
45
43
|
$prefix: functions.get-config($config, "prefix");
|
|
46
44
|
|
|
47
45
|
@each $color, $color-properties in $value {
|
|
48
|
-
@each $scheme in
|
|
46
|
+
@each $scheme in string.split(functions.get-config($config, "color-scheme"), " ") {
|
|
49
47
|
@if $scheme == $color {
|
|
50
48
|
@include mixin.generate-color-scheme($color) {
|
|
51
49
|
@each $color-property, $color-value in $color-properties {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
)};
|
|
56
|
-
}
|
|
50
|
+
--#{$prefix}-#{$tag}-#{functions.replace($color-property, '--', '')}: #{meta.inspect(
|
|
51
|
+
$color-value
|
|
52
|
+
)};
|
|
57
53
|
}
|
|
58
54
|
}
|
|
59
55
|
}
|
|
@@ -61,9 +57,9 @@
|
|
|
61
57
|
}
|
|
62
58
|
}
|
|
63
59
|
|
|
64
|
-
@mixin generate-subclasses($tag, $class, $properties, $config) {
|
|
60
|
+
@mixin generate-subclasses($tag, $class, $properties, $config, $options : ()) {
|
|
65
61
|
#{$class} {
|
|
66
|
-
@include generate-properties($tag, $properties, $config);
|
|
62
|
+
@include generate-properties($tag, $properties, $config, $options);
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
65
|
|
|
@@ -81,7 +77,20 @@
|
|
|
81
77
|
}
|
|
82
78
|
}
|
|
83
79
|
|
|
84
|
-
@mixin generate-
|
|
80
|
+
@mixin generate-atrule($tag, $value, $config, $options) {
|
|
81
|
+
@each $at-rule, $properties in $value {
|
|
82
|
+
// Keep @ at the beginning
|
|
83
|
+
@#{functions.replace($at-rule, '@', '')} {
|
|
84
|
+
@include generate-properties($tag, $properties, $config, $options);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@mixin generate-animation($tag, $value, $config, $options) {
|
|
90
|
+
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@mixin generate-properties($tag, $properties, $config, $options : ()) {
|
|
85
94
|
$prefix: functions.get-config($config, "prefix");
|
|
86
95
|
|
|
87
96
|
@each $property, $value in $properties {
|
|
@@ -89,27 +98,32 @@
|
|
|
89
98
|
// Looking for "--" symbols in the beginning of the property
|
|
90
99
|
// Example: --flex-direction : row
|
|
91
100
|
@if (
|
|
92
|
-
meta.type-of($property) == "string" and
|
|
101
|
+
meta.type-of($property) == "string" and string.index($property, "--") == 1
|
|
93
102
|
) {
|
|
94
|
-
@include generate-css-properties($tag, $property, $value, $config);
|
|
103
|
+
@include generate-css-properties($tag, $property, $value, $config, $options);
|
|
95
104
|
}
|
|
96
105
|
|
|
97
|
-
|
|
98
|
-
@else if ($property == "
|
|
106
|
+
// Colors
|
|
107
|
+
@else if ($property == "_colors") {
|
|
99
108
|
@include generate-colors($tag, $value, $config);
|
|
100
109
|
}
|
|
101
110
|
|
|
102
|
-
|
|
103
|
-
@else if ($property == "
|
|
111
|
+
// Responsive
|
|
112
|
+
@else if ($property == "_responsive") {
|
|
104
113
|
@include generate-responsive($tag, $value, $config);
|
|
105
114
|
}
|
|
106
115
|
|
|
107
|
-
|
|
108
|
-
@else if ($property == "
|
|
116
|
+
// Sub classes
|
|
117
|
+
@else if ($property == "_subclasses") {
|
|
109
118
|
@each $class, $class_properties in $value {
|
|
110
|
-
@include generate-subclasses($tag, $class, $class_properties, $config);
|
|
119
|
+
@include generate-subclasses($tag, $class, $class_properties, $config, $options);
|
|
111
120
|
}
|
|
112
|
-
}
|
|
121
|
+
}
|
|
122
|
+
// At-rules
|
|
123
|
+
@else if ($property == "_atrule") {
|
|
124
|
+
@include generate-atrule($tag, $value, $config, $options);
|
|
125
|
+
}
|
|
126
|
+
@else {
|
|
113
127
|
@include generate-css-variables($tag, $property, $value, $config);
|
|
114
128
|
}
|
|
115
129
|
}
|
package/scss/scssleon.scss
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
@use "./mixins" as mixins;
|
|
3
|
+
@use "./functions" as functions;
|
|
4
|
+
|
|
1
5
|
/*
|
|
2
6
|
* ------------------------------------------------------------------
|
|
3
7
|
* ███████╗ ██████╗ ██████╗███████╗██╗ ███████╗ ██████╗ ███╗ ██╗
|
|
@@ -44,15 +48,13 @@ $theme: (
|
|
|
44
48
|
// ↓ Theme
|
|
45
49
|
/* Override default settings in the theme | @example */
|
|
46
50
|
@use "themes/default" as theme with (
|
|
47
|
-
$theme: $theme
|
|
51
|
+
$theme: $theme,
|
|
48
52
|
);
|
|
49
53
|
|
|
50
54
|
// Getting updated variables
|
|
51
55
|
$config: config.$config;
|
|
52
56
|
$theme: theme.$theme;
|
|
53
57
|
|
|
54
|
-
/* Main configuration END
|
|
55
|
-
-------------------------------------------------------*/
|
|
56
58
|
|
|
57
59
|
/* ------------------------------------------------------------------
|
|
58
60
|
* Loading modules - this is default configuration with all modules enabled
|
|
@@ -64,13 +66,13 @@ $theme: theme.$theme;
|
|
|
64
66
|
$theme: $theme
|
|
65
67
|
);
|
|
66
68
|
|
|
67
|
-
// Great reset
|
|
69
|
+
// ↓ Great reset
|
|
68
70
|
@use "reset" with (
|
|
69
71
|
$config: $config,
|
|
70
72
|
$theme: $theme
|
|
71
73
|
);
|
|
72
74
|
|
|
73
|
-
// Base
|
|
75
|
+
// ↓ Base
|
|
74
76
|
// Special utility, that will dynamically generate CSS
|
|
75
77
|
// properties for HTML tags, specified in theme
|
|
76
78
|
@use "base" with (
|
|
@@ -78,7 +80,7 @@ $theme: theme.$theme;
|
|
|
78
80
|
$theme: $theme
|
|
79
81
|
);
|
|
80
82
|
|
|
81
|
-
// Amazing content
|
|
83
|
+
// ↓ Amazing content
|
|
82
84
|
// Special class `.content` to allow formatting of the default html tags
|
|
83
85
|
@use "content" with (
|
|
84
86
|
$config: $config,
|
|
@@ -129,11 +131,13 @@ $theme: theme.$theme;
|
|
|
129
131
|
$theme: $theme
|
|
130
132
|
);
|
|
131
133
|
|
|
134
|
+
// ↓ Alert
|
|
132
135
|
@use "components/alert" with (
|
|
133
136
|
$config: $config,
|
|
134
137
|
$theme: $theme
|
|
135
138
|
);
|
|
136
139
|
|
|
140
|
+
// ↓ Accordion
|
|
137
141
|
@use "components/accordion" with (
|
|
138
142
|
$config: $config,
|
|
139
143
|
$theme: $theme
|