igniteui-theming 1.2.0 → 1.3.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/index.js +2 -0
- package/package.json +17 -4
- package/sass/color/_functions.scss +1 -1
- package/sass/themes/_functions.scss +11 -2
- package/sass/themes/_mixins.scss +1 -1
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "igniteui-theming",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "A set of Sass variables, mixins, and functions for generating palettes, typography, and elevations used by Ignite UI components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,10 +13,17 @@
|
|
|
13
13
|
"build:docs:en:staging": "set NODE_ENV=staging && npx sassdoc ./sass -d docs",
|
|
14
14
|
"build:e2e": "sass ./test/e2e/theme.scss ./test/e2e/theme.css",
|
|
15
15
|
"build:json": "node scripts/buildJSON.mjs",
|
|
16
|
-
"
|
|
16
|
+
"serve:docs": "npx http-server ./docs",
|
|
17
17
|
"preview:palette": "node scripts/previewPalette.mjs",
|
|
18
|
+
"lint": "stylelint ./sass",
|
|
18
19
|
"test": "jest",
|
|
19
|
-
"
|
|
20
|
+
"format": "stylelint \"**/*.{scss,css}\" --fix --allow-empty-input --ignore-path .gitignore",
|
|
21
|
+
"prepare": "husky install"
|
|
22
|
+
},
|
|
23
|
+
"lint-staged": {
|
|
24
|
+
"**/*.{scss,css}": [
|
|
25
|
+
"npm run format"
|
|
26
|
+
]
|
|
20
27
|
},
|
|
21
28
|
"files": [
|
|
22
29
|
"/sass",
|
|
@@ -44,7 +51,12 @@
|
|
|
44
51
|
"homepage": "https://github.com/IgniteUI/igniteui-theming#readme",
|
|
45
52
|
"exports": {
|
|
46
53
|
".": {
|
|
47
|
-
"sass": "./_index.scss"
|
|
54
|
+
"sass": "./_index.scss",
|
|
55
|
+
"esm2020": "./index.js",
|
|
56
|
+
"es2020": "./index.js",
|
|
57
|
+
"es2015": "./index.js",
|
|
58
|
+
"node": "./index.js",
|
|
59
|
+
"default": "./index.js"
|
|
48
60
|
},
|
|
49
61
|
"./functions": {
|
|
50
62
|
"sass": "./sass/_functions.scss"
|
|
@@ -52,6 +64,7 @@
|
|
|
52
64
|
},
|
|
53
65
|
"devDependencies": {
|
|
54
66
|
"globby": "^13.1.2",
|
|
67
|
+
"husky": "^8.0.2",
|
|
55
68
|
"igniteui-sassdoc-theme": "^1.1.4",
|
|
56
69
|
"jest": "^28.1.1",
|
|
57
70
|
"lunr": "^2.3.9",
|
|
@@ -30,7 +30,7 @@ $_enhanced-accessibility: false;
|
|
|
30
30
|
/// @group Palettes
|
|
31
31
|
/// @param {Color} $primary - The primary color used to generate the primary color palette (required).
|
|
32
32
|
/// @param {Color} $secondary - The secondary color used to generate the secondary color palette (required).
|
|
33
|
-
/// @param {Color} $surface - The color used as a background in components
|
|
33
|
+
/// @param {Color} $surface - The color used as a background in components (required).
|
|
34
34
|
/// @param {Color} $gray [null] - The color used for generating the grayscale palette (optional).
|
|
35
35
|
/// @param {Color} $info [#1377d5] - The information color used throughout the application (optional).
|
|
36
36
|
/// @param {Color} $success [#4eb862] - The success color used throughout the application (optional).
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
$result: ();
|
|
27
27
|
|
|
28
28
|
@each $key, $value in $schema {
|
|
29
|
-
@if meta.type-of($value) == 'map' {
|
|
29
|
+
@if meta.type-of($value) == 'map' and $key != '_meta' {
|
|
30
30
|
$result: map.merge($result, (#{$key}: resolve-value($value)));
|
|
31
31
|
} @else {
|
|
32
32
|
$result: map.merge($result, (#{$key}: $value));
|
|
@@ -126,6 +126,7 @@
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
/// Used to switch between values based on the size of the component.
|
|
129
|
+
/// The passed sizes are converted to absolute values before comparing.
|
|
129
130
|
/// @group themes
|
|
130
131
|
/// @access public
|
|
131
132
|
/// @param {Number} $sm - The preferred value when the component's size is small.
|
|
@@ -135,6 +136,10 @@
|
|
|
135
136
|
/// --size: #{sizable(rem(40px), rem(64px), rem(88px))};
|
|
136
137
|
/// @return {Function} - The evaluated value.
|
|
137
138
|
@function sizable($sm, $md: $sm, $lg: $md) {
|
|
139
|
+
$sm: max(#{$sm}, -1 * #{$sm});
|
|
140
|
+
$md: max(#{$md}, -1 * #{$md});
|
|
141
|
+
$lg: max(#{$lg}, -1 * #{$lg});
|
|
142
|
+
|
|
138
143
|
@return max(
|
|
139
144
|
calc(var(--is-large, 1) * #{$lg}),
|
|
140
145
|
calc(var(--is-medium, 1) * #{$md}),
|
|
@@ -142,7 +147,8 @@
|
|
|
142
147
|
);
|
|
143
148
|
}
|
|
144
149
|
|
|
145
|
-
///
|
|
150
|
+
/// Returns a value based on the size of the component taking spacing values into consideration.
|
|
151
|
+
/// The passed sizes are converted to absolute values before comparing.
|
|
146
152
|
/// @group utilities
|
|
147
153
|
/// @access public
|
|
148
154
|
/// @param {Number} $sm - The preferred value when the component's size is small.
|
|
@@ -156,6 +162,9 @@
|
|
|
156
162
|
/// @return {Function} - The evaluated value.
|
|
157
163
|
@function pad($sm, $md: $sm, $lg: $md, $dir: null) {
|
|
158
164
|
$spacing: if($dir, --ig-spacing-#{$dir}, --ig-spacing);
|
|
165
|
+
$sm: max(#{$sm}, -1 * #{$sm});
|
|
166
|
+
$md: max(#{$md}, -1 * #{$md});
|
|
167
|
+
$lg: max(#{$lg}, -1 * #{$lg});
|
|
159
168
|
|
|
160
169
|
@return max(
|
|
161
170
|
calc(var(--is-large, 1) * #{$lg} * var(#{$spacing}-large, var(#{$spacing}, --ig-spacing))),
|
package/sass/themes/_mixins.scss
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
/// A list of ignored keywords to be excluded when generating CSS variables for a theme.
|
|
9
9
|
/// @access private
|
|
10
|
-
$ignored-keys: ('name', 'palette', 'variant', 'selector');
|
|
10
|
+
$ignored-keys: ('name', 'palette', 'variant', 'selector', 'type', '_meta');
|
|
11
11
|
|
|
12
12
|
/// Parses a map of key value pairs from component themes to css variables.
|
|
13
13
|
/// @access private
|