@razerspine/pug-ui-kit 1.2.2 → 1.3.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/CHANGELOG.md +37 -0
- package/README.md +68 -23
- package/index.js +1 -0
- package/package.json +20 -4
- package/scss/components/_aside.scss +3 -2
- package/scss/components/_forms.scss +2 -1
- package/scss/components/_main.scss +3 -2
- package/scss/layout/_layout.scss +2 -1
- package/scss/utils/_helpers.scss +5 -2
- package/scss/utils/_mixins.scss +2 -1
- package/scss/utils/_utilities.scss +34 -20
- package/style/style.css +1899 -0
- package/style/style.css.map +1 -0
- package/style/style.min.css +2 -0
- package/style/style.min.css.map +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.1] - 2026-02-11
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Fixed broken SCSS imports caused by incorrect "exports" configuration in v1.3.0.
|
|
7
|
+
- Restored compatibility with sass-loader and webpack.
|
|
8
|
+
|
|
9
|
+
## [1.3.0] - 2026-02-11
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **Production CSS build pipeline**
|
|
13
|
+
- Compiles SCSS into `style/style.css`
|
|
14
|
+
- Generates minified version `style/style.min.css`
|
|
15
|
+
- Adds vendor prefixes via PostCSS + Autoprefixer
|
|
16
|
+
- **New build scripts**
|
|
17
|
+
- `clean`
|
|
18
|
+
- `build:css`
|
|
19
|
+
- `build:postcss`
|
|
20
|
+
- `build` (full pipeline)
|
|
21
|
+
- **Distributable CSS output**
|
|
22
|
+
- Users can now import compiled CSS directly:
|
|
23
|
+
```scss
|
|
24
|
+
@import "@razerspine/pug-ui-kit/style/style.min.css";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- Migrated SCSS utilities to modern Dart Sass syntax
|
|
29
|
+
- Replaced deprecated global built-in functions
|
|
30
|
+
- Removed deprecated `if()` Sass function usage
|
|
31
|
+
- Updated `map-get` → `map.get`
|
|
32
|
+
- Improved forward-compatibility with Dart Sass 3.0+
|
|
33
|
+
|
|
34
|
+
### Notes
|
|
35
|
+
- No breaking changes.
|
|
36
|
+
- Existing SCSS/LESS usage remains fully supported.
|
|
37
|
+
- CSS build output is optional — advanced users can still consume SCSS/LESS sources directly.
|
|
38
|
+
|
|
39
|
+
|
|
3
40
|
## [1.2.2] - 2026-02-08
|
|
4
41
|
|
|
5
42
|
### Added
|
package/README.md
CHANGED
|
@@ -11,11 +11,57 @@ This package is automatically included in templates generated via the CLI. To in
|
|
|
11
11
|
npm install @razerspine/pug-ui-kit
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## 🎨 Styling Options
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
You now have **three ways** to use the styles:
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
### 1. Use compiled production CSS (Recommended for simple setups)
|
|
19
|
+
|
|
20
|
+
Fully prefixed and minified:
|
|
21
|
+
```scss
|
|
22
|
+
@import "@razerspine/pug-ui-kit/style/style.min.css";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Non-minified version:
|
|
26
|
+
```scss
|
|
27
|
+
@import "@razerspine/pug-ui-kit/style/style.css";
|
|
28
|
+
```
|
|
29
|
+
- ✔ Includes vendor prefixes
|
|
30
|
+
- ✔ Cross-browser ready
|
|
31
|
+
- ✔ No Sass setup required
|
|
32
|
+
|
|
33
|
+
### 2. Use SCSS (Advanced / Customizable)
|
|
34
|
+
|
|
35
|
+
```scss
|
|
36
|
+
@use "@razerspine/pug-ui-kit/scss/ui-kit" as *;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If overriding settings:
|
|
40
|
+
|
|
41
|
+
```scss
|
|
42
|
+
@use "@razerspine/pug-ui-kit/scss/settings" with (
|
|
43
|
+
$font-path: "/my-custom-path/fonts"
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
@use "@razerspine/pug-ui-kit/scss/ui-kit" as *;
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 3. Use LESS
|
|
50
|
+
|
|
51
|
+
```less
|
|
52
|
+
@import "@razerspine/pug-ui-kit/less/ui-kit";
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Override font path:
|
|
56
|
+
|
|
57
|
+
```less
|
|
58
|
+
@font-path: "/my-custom-path/fonts";
|
|
59
|
+
@import "@razerspine/pug-ui-kit/less/ui-kit";
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 🛠 Webpack Configuration (Pug Mixins)
|
|
63
|
+
|
|
64
|
+
To avoid complex relative paths:
|
|
19
65
|
|
|
20
66
|
```js
|
|
21
67
|
const uiKit = require('@razerspine/pug-ui-kit');
|
|
@@ -31,27 +77,12 @@ module.exports = {
|
|
|
31
77
|
};
|
|
32
78
|
```
|
|
33
79
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Note: Always import settings first, as other components depend on them.
|
|
39
|
-
|
|
40
|
-
#### For SCSS:
|
|
41
|
-
|
|
42
|
-
```scss
|
|
43
|
-
// In your main.scss
|
|
44
|
-
@use "@razerspine/pug-ui-kit/scss/ui-kit" as *;
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
#### For LESS:
|
|
48
|
-
|
|
49
|
-
```less
|
|
50
|
-
// In your main.less
|
|
51
|
-
@import "@razerspine/pug-ui-kit/less/ui-kit";
|
|
80
|
+
Then:
|
|
81
|
+
```pug
|
|
82
|
+
include ~pug-ui-kit/btn.pug
|
|
52
83
|
```
|
|
53
84
|
|
|
54
|
-
## 🚀 Usage
|
|
85
|
+
## 🚀 Usage Examples
|
|
55
86
|
|
|
56
87
|
#### Button
|
|
57
88
|
|
|
@@ -389,7 +420,9 @@ include ~pug-ui-kit/single-select.pug
|
|
|
389
420
|
|
|
390
421
|
* mixins/ - reusable Pug components.
|
|
391
422
|
* scss/ - complete SCSS kit (Settings, Components, Themes, Layout).
|
|
392
|
-
* less/ - complete LESS version for alternative workflows.
|
|
423
|
+
* less/ - complete LESS version for alternative workflows.
|
|
424
|
+
* style/ → Compiled CSS output (since v1.3.0)
|
|
425
|
+
* fonts/ → Roboto font family
|
|
393
426
|
* index.js - path resolution helper.
|
|
394
427
|
|
|
395
428
|
## 🧱 Components Included
|
|
@@ -402,5 +435,17 @@ include ~pug-ui-kit/single-select.pug
|
|
|
402
435
|
* input-radio.pug
|
|
403
436
|
* single-select.pug
|
|
404
437
|
|
|
438
|
+
## ⚙ Build (for contributors)
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
npm run build
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
**This will:**
|
|
445
|
+
|
|
446
|
+
- Compile SCSS
|
|
447
|
+
- Run PostCSS + Autoprefixer
|
|
448
|
+
- Generate minified CSS
|
|
449
|
+
|
|
405
450
|
## 📄 License
|
|
406
451
|
This project is licensed under the ISC License.
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@razerspine/pug-ui-kit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Shared Pug mixins for Webpack Starter templates",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pug",
|
|
@@ -8,21 +8,25 @@
|
|
|
8
8
|
"mixins"
|
|
9
9
|
],
|
|
10
10
|
"main": "index.js",
|
|
11
|
+
"style": "style/style.min.css",
|
|
11
12
|
"files": [
|
|
12
13
|
"mixins",
|
|
13
14
|
"fonts",
|
|
14
15
|
"scss",
|
|
15
16
|
"less",
|
|
17
|
+
"style",
|
|
16
18
|
"index.js",
|
|
17
19
|
"README.md",
|
|
18
20
|
"LICENSE",
|
|
19
21
|
"CHANGELOG.md"
|
|
20
22
|
],
|
|
21
23
|
"scripts": {
|
|
22
|
-
"build": "
|
|
24
|
+
"build:css": "sass scss/ui-kit.scss style/style.css",
|
|
25
|
+
"build:postcss": "postcss style/style.css --config postcss.config.js --output style/style.min.css",
|
|
26
|
+
"build": "npm run clean && npm run build:css && npm run build:postcss",
|
|
27
|
+
"clean": "rm -rf style",
|
|
28
|
+
"prepublishOnly": "npm run build"
|
|
23
29
|
},
|
|
24
|
-
"style": "scss/ui-kit.scss",
|
|
25
|
-
"less": "less/ui-kit.less",
|
|
26
30
|
"author": "Razerspine",
|
|
27
31
|
"repository": {
|
|
28
32
|
"type": "git",
|
|
@@ -36,5 +40,17 @@
|
|
|
36
40
|
"license": "ISC",
|
|
37
41
|
"publishConfig": {
|
|
38
42
|
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"browserslist": [
|
|
45
|
+
">0.5%",
|
|
46
|
+
"last 2 versions",
|
|
47
|
+
"not dead"
|
|
48
|
+
],
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"sass": "^1.77.0",
|
|
51
|
+
"postcss": "^8.4.38",
|
|
52
|
+
"postcss-cli": "^11.0.0",
|
|
53
|
+
"autoprefixer": "^10.4.19",
|
|
54
|
+
"cssnano": "^6.1.2"
|
|
39
55
|
}
|
|
40
56
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use "sass:map";
|
|
1
2
|
@use '../settings/index' as *;
|
|
2
3
|
|
|
3
4
|
.aside {
|
|
@@ -5,7 +6,7 @@
|
|
|
5
6
|
display: flex;
|
|
6
7
|
justify-content: flex-start;
|
|
7
8
|
padding: 0 $gutter;
|
|
8
|
-
@media screen and (min-width: map
|
|
9
|
+
@media screen and (min-width: map.get($breakpoints, lg)) {
|
|
9
10
|
padding: 0;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
border-radius: $border-radius;
|
|
17
18
|
padding: $gutter;
|
|
18
19
|
width: 100%;
|
|
19
|
-
@media screen and (min-width: map
|
|
20
|
+
@media screen and (min-width: map.get($breakpoints, lg)) {
|
|
20
21
|
padding: calc($gutter * 2);
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use "sass:map";
|
|
1
2
|
@use '../settings/index' as *;
|
|
2
3
|
|
|
3
4
|
.main {
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
justify-content: flex-start;
|
|
7
8
|
padding: 0 $gutter;
|
|
8
9
|
overflow: hidden;
|
|
9
|
-
@media screen and (min-width: map
|
|
10
|
+
@media screen and (min-width: map.get($breakpoints, lg)) {
|
|
10
11
|
padding: 0;
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
width: 100%;
|
|
18
19
|
min-height: 100%;
|
|
19
20
|
padding: $gutter;
|
|
20
|
-
@media screen and (min-width: map
|
|
21
|
+
@media screen and (min-width: map.get($breakpoints, lg)) {
|
|
21
22
|
padding: calc($gutter * 2);
|
|
22
23
|
}
|
|
23
24
|
}
|
package/scss/layout/_layout.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use "sass:map";
|
|
1
2
|
@use '../settings/index' as *;
|
|
2
3
|
|
|
3
4
|
.layout {
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
font-size: $base-font-size;
|
|
15
16
|
font-weight: 400;
|
|
16
17
|
line-height: 1.5;
|
|
17
|
-
@media screen and (min-width: map
|
|
18
|
+
@media screen and (min-width: map.get($breakpoints, lg)) {
|
|
18
19
|
grid-template-areas:
|
|
19
20
|
'header header header header'
|
|
20
21
|
'gutter-left aside main gutter-right'
|
package/scss/utils/_helpers.scss
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "sass:meta";
|
|
3
|
+
|
|
1
4
|
$space-scale: (
|
|
2
5
|
0: 0,
|
|
3
6
|
1: 4px,
|
|
@@ -10,9 +13,9 @@ $space-scale: (
|
|
|
10
13
|
);
|
|
11
14
|
|
|
12
15
|
@function space($key) {
|
|
13
|
-
@return map
|
|
16
|
+
@return map.get($space-scale, $key);
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
@function suf($k) {
|
|
17
|
-
@return
|
|
20
|
+
@return $k;
|
|
18
21
|
}
|
package/scss/utils/_mixins.scss
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
2
|
@use 'helpers';
|
|
3
|
+
@use "sass:map";
|
|
4
|
+
@use "sass:meta";
|
|
3
5
|
|
|
4
6
|
// SPACING utilities: m- p- (margin/padding) with directions
|
|
5
7
|
$space-map: (0: 0rem, 1: 0.5rem, 2: 1rem, 3: 1.5rem, 4: 2rem);
|
|
@@ -7,8 +9,8 @@ $directions: ("" : "", t: "-top", r: "-right", b: "-bottom", l: "-left", x: ("-l
|
|
|
7
9
|
$scales: 0 1 2 3 4;
|
|
8
10
|
|
|
9
11
|
@function helpers-space($key) {
|
|
10
|
-
@if map
|
|
11
|
-
@return map
|
|
12
|
+
@if map.has-key($space-map, $key) {
|
|
13
|
+
@return map.get($space-map, $key);
|
|
12
14
|
} @else {
|
|
13
15
|
@warn "Unknown spacing key `#{$key}`. Returning 0rem.";
|
|
14
16
|
@return 0rem;
|
|
@@ -17,33 +19,45 @@ $scales: 0 1 2 3 4;
|
|
|
17
19
|
|
|
18
20
|
@each $d, $prop in $directions {
|
|
19
21
|
@each $s in $scales {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
|
|
23
|
+
// =====================
|
|
24
|
+
// Margin
|
|
25
|
+
// =====================
|
|
26
|
+
@if $d == "" {
|
|
27
|
+
.m-#{$s} {
|
|
24
28
|
margin: helpers-space($s);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
}
|
|
30
|
+
} @else {
|
|
31
|
+
.m-#{$d}-#{$s} {
|
|
32
|
+
@if meta.type-of($prop) == 'list' {
|
|
33
|
+
@each $p in $prop {
|
|
34
|
+
margin#{$p}: helpers-space($s);
|
|
35
|
+
}
|
|
36
|
+
} @else {
|
|
37
|
+
margin#{$prop}: helpers-space($s);
|
|
28
38
|
}
|
|
29
|
-
} @else {
|
|
30
|
-
margin#{$prop}: helpers-space($s);
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
41
|
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
// =====================
|
|
43
|
+
// Padding
|
|
44
|
+
// =====================
|
|
45
|
+
@if $d == "" {
|
|
46
|
+
.p-#{$s} {
|
|
38
47
|
padding: helpers-space($s);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
}
|
|
49
|
+
} @else {
|
|
50
|
+
.p-#{$d}-#{$s} {
|
|
51
|
+
@if meta.type-of($prop) == 'list' {
|
|
52
|
+
@each $p in $prop {
|
|
53
|
+
padding#{$p}: helpers-space($s);
|
|
54
|
+
}
|
|
55
|
+
} @else {
|
|
56
|
+
padding#{$prop}: helpers-space($s);
|
|
42
57
|
}
|
|
43
|
-
} @else {
|
|
44
|
-
padding#{$prop}: helpers-space($s);
|
|
45
58
|
}
|
|
46
59
|
}
|
|
60
|
+
|
|
47
61
|
}
|
|
48
62
|
}
|
|
49
63
|
|