@razerspine/pug-ui-kit 1.1.0 → 1.2.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/CHANGELOG.md CHANGED
@@ -29,3 +29,30 @@ You should now update to:
29
29
  ### Added
30
30
  - **Styles**: Full SCSS and LESS support for all UI components.
31
31
  - **Architecture**: Added global settings, grid system, and themes (light/dark).
32
+
33
+ ## [1.2.0] - 2026-02-03
34
+ ### Added
35
+ - **Fonts**: Added local Roboto font family (Thin, Light, Regular, Medium, Bold, Black) directly into the package.
36
+ - **Variables**: Introduced $font-path (SCSS) and @font-path (LESS) variables to manage font asset resolution dynamically.
37
+ - **Styles**: Integrated @font-face declarations in base/_fonts.scss and base/_fonts.less
38
+
39
+ ### Fixed
40
+ - **Assets**: Resolved "Module not found" errors in Webpack by using tilde-prefixed paths (~) for internal asset resolution.
41
+
42
+ ### Migration Guide (Optional)
43
+ By default, the kit now looks for fonts inside the package.
44
+ If you wish to use a custom font path (e.g., a CDN or a different local folder), override the path variable before importing the kit:
45
+
46
+ #### SCSS:
47
+
48
+ ```scss
49
+ @use "@razerspine/pug-ui-kit/scss/settings" with (
50
+ $font-path: "/my-custom-path/fonts"
51
+ );
52
+ ```
53
+ #### LESS:
54
+
55
+ ```less
56
+ @font-path: "/my-custom-path/fonts";
57
+ @import "@razerspine/pug-ui-kit/less/ui-kit.less";
58
+ ```
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/index.js CHANGED
@@ -2,6 +2,7 @@ const path = require('path');
2
2
 
3
3
  module.exports = {
4
4
  paths: {
5
+ fonts: path.join(__dirname, 'fonts'),
5
6
  scss: path.join(__dirname, 'scss'),
6
7
  less: path.join(__dirname, 'less'),
7
8
  mixins: path.join(__dirname, 'mixins')
@@ -1,7 +1,9 @@
1
+ @import '../settings/_variables';
2
+
1
3
  @font-face {
2
4
  font-family: 'Roboto';
3
- src: url('../../../fonts/Roboto-Thin.woff2') format('woff2'),
4
- url('../../../fonts/Roboto-Thin.woff') format('woff');
5
+ src: url('@{font-path}/Roboto-Thin.woff2') format('woff2'),
6
+ url('@{font-path}/Roboto-Thin.woff') format('woff');
5
7
  font-weight: 100;
6
8
  font-style: normal;
7
9
  font-display: swap;
@@ -9,8 +11,8 @@
9
11
 
10
12
  @font-face {
11
13
  font-family: 'Roboto';
12
- src: url('../../../fonts/Roboto-Light.woff2') format('woff2'),
13
- url('../../../fonts/Roboto-Light.woff') format('woff');
14
+ src: url('@{font-path}/Roboto-Light.woff2') format('woff2'),
15
+ url('@{font-path}/Roboto-Light.woff') format('woff');
14
16
  font-weight: 300;
15
17
  font-style: normal;
16
18
  font-display: swap;
@@ -18,8 +20,8 @@
18
20
 
19
21
  @font-face {
20
22
  font-family: 'Roboto';
21
- src: url('../../../fonts/Roboto-Regular.woff2') format('woff2'),
22
- url('../../../fonts/Roboto-Regular.woff') format('woff');
23
+ src: url('@{font-path}/Roboto-Regular.woff2') format('woff2'),
24
+ url('@{font-path}/Roboto-Regular.woff') format('woff');
23
25
  font-weight: 400;
24
26
  font-style: normal;
25
27
  font-display: swap;
@@ -27,8 +29,8 @@
27
29
 
28
30
  @font-face {
29
31
  font-family: 'Roboto';
30
- src: url('../../../fonts/Roboto-Medium.woff2') format('woff2'),
31
- url('../../../fonts/Roboto-Medium.woff') format('woff');
32
+ src: url('@{font-path}/Roboto-Medium.woff2') format('woff2'),
33
+ url('@{font-path}/Roboto-Medium.woff') format('woff');
32
34
  font-weight: 500;
33
35
  font-style: normal;
34
36
  font-display: swap;
@@ -36,8 +38,8 @@
36
38
 
37
39
  @font-face {
38
40
  font-family: 'Roboto';
39
- src: url('../../../fonts/Roboto-Bold.woff2') format('woff2'),
40
- url("../../../fonts/Roboto-Bold.woff") format('woff');
41
+ src: url('@{font-path}/Roboto-Bold.woff2') format('woff2'),
42
+ url("@{font-path}/Roboto-Bold.woff") format('woff');
41
43
  font-weight: 700;
42
44
  font-style: normal;
43
45
  font-display: swap;
@@ -11,3 +11,6 @@
11
11
  @main-min: 320px;
12
12
  @total-ratio: (@aside-ratio + @main-ratio);
13
13
  @available-width: calc(@container-max - (@gutter * 2)); // when layout have gap
14
+
15
+ // font path
16
+ @font-path: '~@razerspine/pug-ui-kit/fonts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razerspine/pug-ui-kit",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Shared Pug mixins for Webpack Starter templates",
5
5
  "keywords": [
6
6
  "pug",
@@ -10,6 +10,7 @@
10
10
  "main": "index.js",
11
11
  "files": [
12
12
  "mixins",
13
+ "fonts",
13
14
  "scss",
14
15
  "less",
15
16
  "index.js",
@@ -1,7 +1,9 @@
1
+ @use '../settings/_variables';
2
+
1
3
  @font-face {
2
4
  font-family: 'Roboto';
3
- src: url('../../../fonts/Roboto-Thin.woff2') format('woff2'),
4
- url('../../../fonts/Roboto-Thin.woff') format('woff');
5
+ src: url('#{$font-path}/Roboto-Thin.woff2') format('woff2'),
6
+ url('#{$font-path}/Roboto-Thin.woff') format('woff');
5
7
  font-weight: 100;
6
8
  font-style: normal;
7
9
  font-display: swap;
@@ -9,8 +11,8 @@
9
11
 
10
12
  @font-face {
11
13
  font-family: 'Roboto';
12
- src: url('../../../fonts/Roboto-Light.woff2') format('woff2'),
13
- url('../../../fonts/Roboto-Light.woff') format('woff');
14
+ src: url('#{$font-path}/Roboto-Light.woff2') format('woff2'),
15
+ url('#{$font-path}/Roboto-Light.woff') format('woff');
14
16
  font-weight: 300;
15
17
  font-style: normal;
16
18
  font-display: swap;
@@ -18,8 +20,8 @@
18
20
 
19
21
  @font-face {
20
22
  font-family: 'Roboto';
21
- src: url('../../../fonts/Roboto-Regular.woff2') format('woff2'),
22
- url('../../../fonts/Roboto-Regular.woff') format('woff');
23
+ src: url('#{$font-path}/Roboto-Regular.woff2') format('woff2'),
24
+ url('#{$font-path}/Roboto-Regular.woff') format('woff');
23
25
  font-weight: 400;
24
26
  font-style: normal;
25
27
  font-display: swap;
@@ -27,8 +29,8 @@
27
29
 
28
30
  @font-face {
29
31
  font-family: 'Roboto';
30
- src: url('../../../fonts/Roboto-Medium.woff2') format('woff2'),
31
- url('../../../fonts/Roboto-Medium.woff') format('woff');
32
+ src: url('#{$font-path}/Roboto-Medium.woff2') format('woff2'),
33
+ url('#{$font-path}/Roboto-Medium.woff') format('woff');
32
34
  font-weight: 500;
33
35
  font-style: normal;
34
36
  font-display: swap;
@@ -36,8 +38,8 @@
36
38
 
37
39
  @font-face {
38
40
  font-family: 'Roboto';
39
- src: url('../../../fonts/Roboto-Bold.woff2') format('woff2'),
40
- url("../../../fonts/Roboto-Bold.woff") format('woff');
41
+ src: url('#{$font-path}/Roboto-Bold.woff2') format('woff2'),
42
+ url('#{$font-path}/Roboto-Bold.woff') format('woff');
41
43
  font-weight: 700;
42
44
  font-style: normal;
43
45
  font-display: swap;
@@ -11,3 +11,6 @@ $aside-min: 300px;
11
11
  $main-min: 320px;
12
12
  $total-ratio: $aside-ratio + $main-ratio;
13
13
  $available-width: calc(#{$container-max} - #{calc(#{$gutter} * 2)}); // when layout have gap
14
+
15
+ // font path
16
+ $font-path: '~@razerspine/pug-ui-kit/fonts' !default;