@nulllogic/scssleon 1.0.1 → 1.0.3

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.
Files changed (69) hide show
  1. package/package.json +5 -5
  2. package/scss/_base.scss +31 -0
  3. package/scss/_config.scss +109 -0
  4. package/scss/_content.scss +24 -0
  5. package/scss/_functions.scss +97 -0
  6. package/scss/_mixins.scss +22 -0
  7. package/scss/_reset.scss +347 -0
  8. package/scss/_root.scss +36 -0
  9. package/scss/_utilities.scss +356 -0
  10. package/scss/animations/_placeholder.scss +12 -0
  11. package/scss/components/_accordion.scss +15 -0
  12. package/scss/components/_alert.scss +15 -0
  13. package/scss/components/_badge.scss +15 -0
  14. package/scss/components/_breadcrumb.scss +15 -0
  15. package/scss/components/_button.scss +15 -0
  16. package/scss/components/_button_group.scss +15 -0
  17. package/scss/components/_card.scss +15 -0
  18. package/scss/components/_container.scss +39 -0
  19. package/scss/components/_dropdown.scss +5 -0
  20. package/scss/components/_form.scss +50 -0
  21. package/scss/components/_loader.scss +15 -0
  22. package/scss/components/_modal.scss +15 -0
  23. package/scss/components/_nav.scss +14 -0
  24. package/scss/components/_navbar.scss +15 -0
  25. package/scss/components/_overlay.scss +15 -0
  26. package/scss/components/_pagination.scss +15 -0
  27. package/scss/components/_placeholder.scss +34 -0
  28. package/scss/components/_sidecap.scss +15 -0
  29. package/scss/components/_table.scss +78 -0
  30. package/scss/forms/_checkbox.scss +14 -0
  31. package/scss/forms/_input-group.scss +14 -0
  32. package/scss/forms/_input.scss +14 -0
  33. package/scss/forms/_label.scss +14 -0
  34. package/scss/forms/_radio.scss +14 -0
  35. package/scss/forms/_range.scss +14 -0
  36. package/scss/forms/_select.scss +14 -0
  37. package/scss/forms/_switch.scss +14 -0
  38. package/scss/forms/_validation.scss +14 -0
  39. package/scss/helpers/_clearfix.scss +5 -0
  40. package/scss/helpers/_screen_reader.scss +11 -0
  41. package/scss/helpers/_text_truncate.scss +5 -0
  42. package/scss/mixins/_border-radius.scss +3 -0
  43. package/scss/mixins/_box-shadow.scss +16 -0
  44. package/scss/mixins/_breakpoints.scss +10 -0
  45. package/scss/mixins/_clearfix.scss +9 -0
  46. package/scss/mixins/_forms.scss +152 -0
  47. package/scss/mixins/_gradients.scss +6 -0
  48. package/scss/mixins/_grid.scss +93 -0
  49. package/scss/mixins/_transition.scss +30 -0
  50. package/scss/mixins/_utilities.scss +15 -0
  51. package/scss/mixins/generators/_color-sheme.scss +17 -0
  52. package/scss/mixins/generators/_components.scss +33 -0
  53. package/scss/mixins/generators/_properties.scss +116 -0
  54. package/scss/mixins/generators/_wrapper.scss +16 -0
  55. package/scss/mixins/variants/_alert.scss +24 -0
  56. package/scss/mixins/variants/_button.scss +122 -0
  57. package/scss/scssleon.scss +205 -0
  58. package/scss/themes/_default.scss +874 -0
  59. package/scss/themes/_wordpress_admin.scss +0 -0
  60. package/scss/utilities/_api.scss +24 -0
  61. package/.dockerignore +0 -2
  62. package/.eslintignore +0 -2
  63. package/.prettierignore +0 -1
  64. package/Dockerfile +0 -29
  65. package/Makefile +0 -22
  66. package/dist/css/scssleon.css +0 -1830
  67. package/dist/css/scssleon.css.map +0 -1
  68. /package/{CHANGELOG.md → scss/components/_icon.scss} +0 -0
  69. /package/{CONTRIBUTING.md → scss/themes/_shopify_app.scss} +0 -0
@@ -0,0 +1,116 @@
1
+ @use "sass:meta";
2
+ @use "sass:string";
3
+ @use "sass:map";
4
+
5
+ @use "../../functions" as functions;
6
+ @use "../../mixins/generators/color-sheme" as mixin;
7
+
8
+ @mixin generate-css-properties($tag, $property, $value, $config) {
9
+ $prefix: functions.get-config($config, "prefix");
10
+
11
+ & {
12
+ --#{$prefix}-#{$tag}-#{functions.str-replace($property, '--', '')}: #{meta.inspect(
13
+ $value
14
+ )};
15
+ }
16
+ }
17
+
18
+ @mixin generate-css-variables($tag, $property, $value, $config) {
19
+ $prefix: functions.get-config($config, "prefix");
20
+
21
+ @if (meta.type-of($value) == "string" and str-index($value, "var(--") == 1) {
22
+ & {
23
+ #{$property}: #{meta.inspect(
24
+ functions.str-replace($value, "--", "--" + $prefix + "-" + $tag + "-")
25
+ )};
26
+ }
27
+ } @else if (type-of($value) == "string" and str-index($value, "var(global(") == 1) {
28
+ & {
29
+ #{$property}: #{meta.inspect(
30
+ functions.str-replace(
31
+ string.slice($value, 0, string.length($value) - 1),
32
+ "global(--",
33
+ "--" + $prefix + "-root-"
34
+ )
35
+ )};
36
+ }
37
+ } @else {
38
+ & {
39
+ #{$property}: #{meta.inspect($value)};
40
+ }
41
+ }
42
+ }
43
+
44
+ @mixin generate-colors($tag, $value, $config) {
45
+ $prefix: functions.get-config($config, "prefix");
46
+
47
+ @each $color, $color-properties in $value {
48
+ @each $scheme in functions.str-split(functions.get-config($config, "color-scheme"), " ") {
49
+ @if $scheme == $color {
50
+ @include mixin.generate-color-scheme($color) {
51
+ @each $color-property, $color-value in $color-properties {
52
+ & {
53
+ --#{$prefix}-#{$tag}-#{functions.str-replace($color-property, '--', '')}: #{meta.inspect(
54
+ $color-value
55
+ )};
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ @mixin generate-subclasses($tag, $class, $properties, $config) {
65
+ #{$class} {
66
+ @include generate-properties($tag, $properties, $config);
67
+ }
68
+ }
69
+
70
+ @mixin generate-responsive($tag, $properties, $config) {
71
+ $breakpoints: functions.get-config($config, "breakpoints");
72
+
73
+ @each $breakpoint, $value in $breakpoints {
74
+ $property: map.get($properties, $breakpoint);
75
+
76
+ @if $property != null {
77
+ @media (min-width: $value) {
78
+ @include generate-properties($tag, $property, $config);
79
+ }
80
+ }
81
+ }
82
+ }
83
+
84
+ @mixin generate-properties($tag, $properties, $config) {
85
+ $prefix: functions.get-config($config, "prefix");
86
+
87
+ @each $property, $value in $properties {
88
+ // Variables
89
+ // Looking for "--" symbols in the beginning of the property
90
+ // Example: --flex-direction : row
91
+ @if (
92
+ meta.type-of($property) == "string" and str-index($property, "--") == 1
93
+ ) {
94
+ @include generate-css-properties($tag, $property, $value, $config);
95
+ }
96
+
97
+ // Colors
98
+ @else if ($property == "colors") {
99
+ @include generate-colors($tag, $value, $config);
100
+ }
101
+
102
+ // Responsive
103
+ @else if ($property == "responsive") {
104
+ @include generate-responsive($tag, $value, $config);
105
+ }
106
+
107
+ // Subclasses
108
+ @else if ($property == "subclasses") {
109
+ @each $class, $class_properties in $value {
110
+ @include generate-subclasses($tag, $class, $class_properties, $config);
111
+ }
112
+ } @else {
113
+ @include generate-css-variables($tag, $property, $value, $config);
114
+ }
115
+ }
116
+ }
@@ -0,0 +1,16 @@
1
+ @use "sass:map";
2
+ @use "../../functions" as functions;
3
+
4
+ @mixin generate-wrapper($config) {
5
+ /* Wrapper class variables assigment */
6
+ $is_wrapper_enabled: functions.get-config($config, "enable.wrapper");
7
+ $wrapper_class: functions.get-config($config, "wrapper-class");
8
+
9
+ @if $is_wrapper_enabled {
10
+ .#{$wrapper_class} {
11
+ @content;
12
+ }
13
+ } @else {
14
+ @content;
15
+ }
16
+ }
@@ -0,0 +1,24 @@
1
+ @use '../../config';
2
+
3
+ // Button variants
4
+ // scss-docs-start alert-variant-mixin
5
+ @mixin alert($name, $value) {
6
+
7
+ @if ($name == 'background') {
8
+ --#{config.$prefix}alert-bg: #{$value};
9
+ }
10
+
11
+ @if ($name == 'shadow') {
12
+ --#{config.$prefix}alert-box-shadow: #{$value};
13
+ }
14
+
15
+ @if ($name == 'icon') {
16
+ .icon-wrapper {
17
+ .icon {
18
+ --#{config.$prefix}alert-icon-fill: #{$value};
19
+ }
20
+ }
21
+ }
22
+
23
+ }
24
+ // scss-docs-end alert-variant-mixin
@@ -0,0 +1,122 @@
1
+ @use '../../config';
2
+
3
+ // Button variants
4
+ // scss-docs-start btn-variant-mixin
5
+ @mixin button($state, $options) {
6
+
7
+ @if ($state == 'origin') {
8
+ @each $name, $value in $options {
9
+
10
+ // Default state
11
+ @if ($name == 'background') {
12
+ --#{config.$prefix}btn-bg: #{$value};
13
+ }
14
+
15
+ @if ($name == 'border') {
16
+ --#{config.$prefix}btn-border-color: #{$value};
17
+ }
18
+
19
+ @if ($name == 'color') {
20
+ --#{config.$prefix}btn-color: #{$value};
21
+ }
22
+ }
23
+ }
24
+
25
+ @if ($state == 'hover') {
26
+ @each $name, $value in $options {
27
+ // Hover state
28
+ @if ($name == 'background') {
29
+ --#{config.$prefix}btn-hover-bg: #{$value};
30
+ }
31
+
32
+ @if ($name == 'border') {
33
+ --#{config.$prefix}btn-hover-border-color: #{$value};
34
+ }
35
+
36
+ @if ($name == 'color') {
37
+ --#{config.$prefix}btn-hover-color: #{$value};
38
+ }
39
+
40
+ //@if ($focus-shadow != null) {
41
+ // --#{config.$prefix}btn-focus-shadow-rgb: #{$focus-shadow};
42
+ //}
43
+ }
44
+ }
45
+
46
+ @if ($state == 'active') {
47
+ @each $name, $value in $options {
48
+ // Active state
49
+ @if ($name == 'background') {
50
+ --#{config.$prefix}btn-active-bg: #{$value};
51
+ }
52
+
53
+ @if ($name == 'border') {
54
+ --#{config.$prefix}btn-active-border-color: #{$value};
55
+ }
56
+
57
+ @if ($name == 'color') {
58
+ --#{config.$prefix}btn-active-color: #{$value};
59
+ }
60
+
61
+ //@if($btn-active-box-shadow != null) {
62
+ // --#{config.$prefix}btn-active-shadow: #{$btn-active-box-shadow};
63
+ //}
64
+ }
65
+ }
66
+
67
+ @if ($state == 'disabled') {
68
+ @each $name, $value in $options {
69
+
70
+ // Disabled state
71
+ @if ($name == 'background') {
72
+ --#{config.$prefix}btn-disabled-bg: #{$value};
73
+ }
74
+
75
+ @if ($name == 'border') {
76
+ --#{config.$prefix}btn-disabled-border-color: #{$value};
77
+ }
78
+
79
+ @if ($name == 'color') {
80
+ --#{config.$prefix}btn-disabled-color: #{$value};
81
+ }
82
+
83
+ }
84
+ }
85
+ }
86
+
87
+ // scss-docs-end btn-variant-mixin
88
+
89
+ // scss-docs-start btn-outline-variant-mixin
90
+ @mixin outline-button(
91
+ $color,
92
+ $color-hover: color-contrast($color),
93
+ $active-background: $color,
94
+ $active-border: $color,
95
+ $active-color: color-contrast($active-background)
96
+ ) {
97
+ --#{config.$prefix}btn-color: #{$color};
98
+ --#{config.$prefix}btn-border-color: #{$color};
99
+ --#{config.$prefix}btn-hover-color: #{$color-hover};
100
+ --#{config.$prefix}btn-hover-bg: #{$active-background};
101
+ --#{config.$prefix}btn-hover-border-color: #{$active-border};
102
+ //--#{config.$prefix}btn-focus-shadow-rgb: #{to-rgb($color)};
103
+ --#{config.$prefix}btn-active-color: #{$active-color};
104
+ --#{config.$prefix}btn-active-bg: #{$active-background};
105
+ --#{config.$prefix}btn-active-border-color: #{$active-border};
106
+ --#{config.$prefix}btn-active-shadow: #{$btn-active-box-shadow};
107
+ --#{config.$prefix}btn-disabled-color: #{$color};
108
+ --#{config.$prefix}btn-disabled-bg: transparent;
109
+ --#{config.$prefix}btn-disabled-border-color: #{$color};
110
+ --#{config.$prefix}gradient: none;
111
+ }
112
+
113
+ // scss-docs-end btn-outline-variant-mixin
114
+
115
+ // scss-docs-start btn-size-mixin
116
+ @mixin size($padding-y, $padding-x, $font-size, $border-radius) {
117
+ padding: $padding-y $padding-x;
118
+ font-size: $font-size;
119
+ // Manually declare to provide an override to the browser default
120
+ //@include border-radius($border-radius, 0);
121
+ }
122
+ // scss-docs-end btn-size-mixin
@@ -0,0 +1,205 @@
1
+ /*
2
+ * ------------------------------------------------------------------
3
+ * ███████╗ ██████╗ ██████╗███████╗██╗ ███████╗ ██████╗ ███╗ ██╗
4
+ * ██╔════╝██╔════╝██╔════╝██╔════╝██║ ██╔════╝██╔═══██╗████╗ ██║
5
+ * ███████╗██║ ██║ ███████╗██║ █████╗ ██║ ██║██╔██╗ ██║
6
+ * ╚════██║██║ ██║ ╚════██║██║ ██╔══╝ ██║ ██║██║╚██╗██║
7
+ * ███████║╚██████╗╚██████╗███████║███████╗███████╗╚██████╔╝██║ ╚████║
8
+ * ╚══════╝ ╚═════╝ ╚═════╝╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═══╝
9
+ *
10
+ * SCSSLEON v1.0.0 (https://nulllogic.github.io/scssleon/)
11
+ * Copyright 2011-2024 NullLogic
12
+ * Licensed under MIT (https://nulllogic.github.io/scssleon/blob/main/LICENSE)
13
+ * ------------------------------------------------------------------
14
+ */
15
+
16
+ /*
17
+ -------------------------------------------------------
18
+ Main configuration - initial configuration requirement
19
+ -------------------------------------------------------
20
+ */
21
+
22
+ // Defining two main variables ( config and theme ) at the top
23
+ // Those two variables will be used to store configuration settings and theme settings
24
+ // You can easily customize any available options to fit your needs
25
+ $config: (
26
+ prefix: "xii",
27
+ enable: (
28
+ wrapper: false,
29
+ ),
30
+ ) !default;
31
+
32
+ $theme: (
33
+ html: (
34
+ body: (),
35
+ ),
36
+ ) !default;
37
+
38
+ // ↓ Config
39
+ // Override default config | @example
40
+ @use "config" as config with (
41
+ $config: $config
42
+ );
43
+
44
+ // ↓ Theme
45
+ /* Override default settings in the theme | @example */
46
+ @use "themes/default" as theme with (
47
+ $theme: $theme
48
+ );
49
+
50
+ // Getting updated variables
51
+ $config: config.$config;
52
+ $theme: theme.$theme;
53
+
54
+ /* Main configuration END
55
+ -------------------------------------------------------*/
56
+
57
+ /* ------------------------------------------------------------------
58
+ * Loading modules - this is default configuration with all modules enabled
59
+ */
60
+
61
+ // ↓ Root
62
+ @use "root" with (
63
+ $config: $config,
64
+ $theme: $theme
65
+ );
66
+
67
+ // Great reset
68
+ @use "reset" with (
69
+ $config: $config,
70
+ $theme: $theme
71
+ );
72
+
73
+ // Base
74
+ // Special utility, that will dynamically generate CSS
75
+ // properties for HTML tags, specified in theme
76
+ @use "base" with (
77
+ $config: $config,
78
+ $theme: $theme
79
+ );
80
+
81
+ // Amazing content
82
+ // Special class `.content` to allow formatting of the default html tags
83
+ @use "content" with (
84
+ $config: $config,
85
+ $theme: $theme
86
+ );
87
+
88
+ // ↓ Container
89
+ @use "components/container" with (
90
+ $config: $config,
91
+ $theme: $theme
92
+ );
93
+
94
+ // ↓ Card
95
+ @use "components/card" with (
96
+ $config: $config,
97
+ $theme: $theme
98
+ );
99
+
100
+ // ↓ Badge
101
+ @use "components/badge" with (
102
+ $config: $config,
103
+ $theme: $theme
104
+ );
105
+
106
+ // ↓ Form
107
+ @use "components/form" with (
108
+ $config: $config,
109
+ $theme: $theme
110
+ );
111
+
112
+ // ↓ Buttons
113
+ @use "components/button" with (
114
+ $config: $config,
115
+ $theme: $theme
116
+ );
117
+ @use "components/button_group" with (
118
+ $config: $config,
119
+ $theme: $theme
120
+ );
121
+
122
+ ////@use "components/icon";
123
+ //@use "components/button";
124
+ ////@use "components/button-group";
125
+
126
+ // ↓ Breadcrumbs
127
+ @use "components/breadcrumb" with (
128
+ $config: $config,
129
+ $theme: $theme
130
+ );
131
+
132
+ @use "components/alert" with (
133
+ $config: $config,
134
+ $theme: $theme
135
+ );
136
+
137
+ @use "components/accordion" with (
138
+ $config: $config,
139
+ $theme: $theme
140
+ );
141
+
142
+ // ↓ Table
143
+ //@use 'components/table' with (
144
+ // $config : config.$updated,
145
+ // $theme: theme.$updated
146
+ //);
147
+
148
+ // ↓ Overlay
149
+ @use "components/overlay" with (
150
+ $config: $config,
151
+ $theme: $theme
152
+ );
153
+
154
+ // ↓ Pagination
155
+ @use "components/pagination" with (
156
+ $config: $config,
157
+ $theme: $theme
158
+ );
159
+
160
+ // ↓ Placeholder
161
+ @use "components/placeholder" with (
162
+ $config: $config,
163
+ $theme: $theme
164
+ );
165
+
166
+ // ↓ Modal
167
+ @use "components/modal" with (
168
+ $config: $config,
169
+ $theme: $theme
170
+ );
171
+
172
+ // ↓ Loader
173
+ @use "components/loader" with (
174
+ $config: $config,
175
+ $theme: $theme
176
+ );
177
+
178
+ // ↓ Nav
179
+ @use "components/nav" with (
180
+ $config: $config,
181
+ $theme: $theme
182
+ );
183
+
184
+ // ↓ Navigation bar
185
+ @use "components/navbar" with (
186
+ $config: $config,
187
+ $theme: $theme
188
+ );
189
+
190
+ // ↓ Sidecap
191
+ @use "components/sidecap" with (
192
+ $config: $config,
193
+ $theme: $theme
194
+ );
195
+
196
+ // ↓ Helpers
197
+ @use "helpers/clearfix";
198
+ @use "helpers/screen_reader";
199
+ @use "helpers/text_truncate";
200
+
201
+ // ↓ Utilities
202
+ @use "utilities/api" with (
203
+ $config: $config,
204
+ $theme: $theme
205
+ );