Skip to content

Commit 69cf2dc

Browse files
committed
UPDATE: Update to pkg: import statements
1 parent 2c5d407 commit 69cf2dc

25 files changed

+1128
-2794
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ npm install @matteusan/sentro --save
1313
## Showcase
1414
#### SCSS Input
1515
```scss
16-
@use '@matteusan/sentro' with (
16+
@use 'pkg:@matteusan/sentro' with (
1717
$prefix: 'sdc',
1818
$context: 'theme'
1919
);

docs/api/breakpoints.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ breakpoint-config($map: (), $breakpoints...) {}
2525
### Usage
2626

2727
```scss
28-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
28+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
2929

3030
:root {
3131
@include sentro.token-config(
@@ -55,7 +55,7 @@ breakpoint-check($query) {}
5555
### Usage
5656

5757
```scss
58-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
58+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
5959

6060
@function tell-me-if-its-a-breakpoint($breakpoint) {
6161
@if sentro.breakpoint-check($breakpoint) {
@@ -83,7 +83,7 @@ breakpoint-create($key, $value) {}
8383
### Usage
8484

8585
```scss
86-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
86+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
8787

8888
dialog {
8989
// CSS Styles
@@ -112,7 +112,7 @@ token-get($key) {}
112112
### Usage
113113

114114
```scss
115-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
115+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
116116

117117
dialog {
118118
// CSS Styles

docs/api/keys.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ key-bind($key, $value) {}
2020
### Usage
2121

2222
```scss
23-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
23+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
2424

2525
.sdc-card {
2626
@include sentro.key-bind('card-bg', sentro.token-switch('surface-light'));
@@ -45,7 +45,7 @@ key-create($key, $value) {}
4545
### Usage
4646

4747
```scss
48-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
48+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
4949

5050
.sdc-card {
5151
background: sentro.key-create('card-bg', sentro.token-switch('surface-light'));
@@ -70,7 +70,7 @@ key-check($query) {}
7070
### Usage
7171

7272
```scss
73-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
73+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
7474

7575
@function tell-me-if-its-a-key($key) {
7676
@if sentro.key-check($key) {
@@ -98,7 +98,7 @@ key-get($key) {}
9898
### Usage
9999

100100
```scss
101-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
101+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
102102

103103
.sdc-card {
104104
background: sentro.key-get('card-bg');
@@ -122,7 +122,7 @@ key-get-raw($key) {}
122122
### Usage
123123

124124
```scss
125-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
125+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
126126

127127
.sdc-card {
128128
background: sentro.key-get-raw('card-bg');

docs/api/settings.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ It accepts a string. This will be the separator for your tokens. By default, it
2222
This is specifically useful if your design system specifications call for a different separator for tokens. For example, you want to use `.` instead of `-` for your tokens. You can set it like this:
2323

2424
```scss
25-
@use 'node_modules/@matteusan/sentro' with (
25+
@use 'pkg:@matteusan/sentro' with (
2626
$prefix: 'sdc',
2727
$context: 'theme',
2828
$separator: '.' // uses . instead of - to separate tokens.
@@ -46,7 +46,7 @@ body {
4646
The scope of this setting is not only exclusive to tokens but also to keys and breakpoints:
4747

4848
```scss
49-
@use 'node_modules/@matteusan/sentro' with (
49+
@use 'pkg:@matteusan/sentro' with (
5050
$prefix: 'sdc',
5151
$context: 'theme',
5252
$separator: '.'
@@ -97,7 +97,7 @@ It accepts a boolean value. This will enable/disable token validation throughout
9797
Use it upon using the module in the root stylesheet.
9898

9999
```scss
100-
@use 'node_modules/@matteusan/sentro' with (
100+
@use 'pkg:@matteusan/sentro' with (
101101
$prefix: 'sdc',
102102
$context: 'theme',
103103
$token-validation: false
@@ -111,7 +111,7 @@ It accepts a boolean value. This will enable/disable key validation throughout t
111111
Use it upon using the module in the root stylesheet.
112112

113113
```scss
114-
@use 'node_modules/@matteusan/sentro' with (
114+
@use 'pkg:@matteusan/sentro' with (
115115
$prefix: 'sdc',
116116
$context: 'theme',
117117
$key-validation: false
@@ -122,7 +122,7 @@ Use it upon using the module in the root stylesheet.
122122
It accepts a character. This will be the default token separator for your entire design system.
123123

124124
```scss
125-
@use 'node_modules/@matteusan/sentro' with (
125+
@use 'pkg:@matteusan/sentro' with (
126126
$prefix: 'sdc',
127127
$context: 'theme',
128128
$default-separator: '.' // uses . instead of - to separate tokens.

docs/api/throw.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Throws an error. Must be used within a valid SCSS conditional statement or a val
2323
### Usage
2424

2525
```scss
26-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
26+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
2727

2828
.sdc-card {
2929
@if sentro.key-check('card-bg') {
@@ -53,7 +53,7 @@ Throws a warning. Must be used within a valid SCSS conditional statement or a va
5353
### Usage
5454

5555
```scss
56-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
56+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
5757

5858
.sdc-card {
5959
@if sentro.key-check('card-bg') {

docs/api/tokens.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ token-config($map: (), $tokens...) {}
2525
### Usage
2626

2727
```scss
28-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
28+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
2929

3030
:root {
3131
@include sentro.token-config(
@@ -57,7 +57,7 @@ token-check($query) {}
5757
### Usage
5858

5959
```scss
60-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
60+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
6161

6262
@function tell-me-if-its-a-token($token) {
6363
@if sentro.token-check($token) {
@@ -88,7 +88,7 @@ token-create($key, $value) {}
8888
### Usage
8989

9090
```scss
91-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
91+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
9292

9393
:root {
9494
@include sentro.token-create('brand-color-light', #ff7700);
@@ -114,7 +114,7 @@ token-get($key) {}
114114
### Usage
115115

116116
```scss
117-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
117+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
118118

119119
.my-selector {
120120
background-color: sentro.token-get('brand-color-light');
@@ -142,7 +142,7 @@ token-get-raw($key) {}
142142
### Usage
143143

144144
```scss
145-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
145+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
146146

147147
.my-selector {
148148
background-color: rgba(sentro.token-get-raw('brand-color-light'), 70%);
@@ -166,7 +166,7 @@ token-switch($query, $fallback: ()) {}
166166
```
167167
### Usage
168168
```scss
169-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
169+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
170170

171171
$fill: #ff7700 !default;
172172

@@ -195,7 +195,7 @@ token-switch-raw($query, $fallback: ()) {}
195195
### Usage
196196

197197
```scss
198-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
198+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
199199

200200
$fill: #ff7700 !default;
201201

docs/breakpoints/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Configure your breakpoints using the `sentro.breakpoint-config()` mixin.
1313
- For maps, the `default` key is the set non-variant key for the parent key (please see the examples below).
1414

1515
```scss
16-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
16+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
1717

1818
@include sentro.breakpoint-config(
1919
$small: 320px,
@@ -26,7 +26,7 @@ Configure your breakpoints using the `sentro.breakpoint-config()` mixin.
2626
The `breakpoint-config()` mixin also supports map-based token sets using the `$map` parameter.
2727

2828
```scss
29-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
29+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
3030

3131
$_my-breakpoint-map: (
3232
small: 320px,
@@ -46,7 +46,7 @@ $_my-breakpoint-map: (
4646
You can also nest breakpoints within each other.
4747

4848
```scss
49-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
49+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
5050

5151
$_my-breakpoint-map: (
5252
mobile: (
@@ -75,7 +75,7 @@ You can use these breakpoints by doing this:
7575
It also supports both at the same time.
7676

7777
```scss
78-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
78+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
7979

8080
$_my-breakpoint-map: (
8181
large: 890px,
@@ -94,7 +94,7 @@ $_my-breakpoint-map: (
9494
When using the breakpoints in your CSS, you are going to use the `breakpoint-create()` mixin. It takes in a valid breakpoint token you've configured in the `breakpoint-config()` mixin.
9595

9696
```scss
97-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
97+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
9898

9999
$_my-breakpoint-map: (
100100
small: 320px,
@@ -119,7 +119,7 @@ When you want a specific type of breakpoint in your CSS, you can use the same mi
119119
- `$property` refers to what property to watch for. The usual values for this property are `'width'` and `'height'` with the default being `'height'`.
120120

121121
```scss
122-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
122+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
123123

124124
$_my-breakpoint-map: (
125125
small: 320px,

docs/getting-started/installation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npm install @matteusan/sentro --save
1818
In your main SCSS stylesheet, use the `@use` at-rule to use the library.
1919

2020
```scss
21-
@use 'node_modules/@matteusan/sentro';
21+
@use 'pkg:@matteusan/sentro';
2222
```
2323

2424
Then configure the **prefix** to be used and the **context** in your design system using the `with ()` sass feature.
@@ -27,7 +27,7 @@ Then configure the **prefix** to be used and the **context** in your design syst
2727
- **Context** provides an additional unique prefix for your tokens (e.g. `'token'`, `'theme'`, etc.)
2828

2929
```scss
30-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
30+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
3131
```
3232

3333
### When using it in partials
@@ -37,10 +37,10 @@ requires you to configure the `$prefix` and `$context` once in your main SCSS fi
3737

3838
```scss
3939
// main.scss
40-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
40+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
4141

4242
// _partial.scss
43-
@use 'node_modules/@matteusan/sentro';
43+
@use 'pkg:@matteusan/sentro';
4444
```
4545

4646
The case is different for SCSS files that are not partials and will not get used/imported in the main SCSS file. You
@@ -49,10 +49,10 @@ the main SCSS file.
4949

5050
```scss
5151
// main.scss
52-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
52+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
5353

5454
// my-component.scss
55-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'my-component');
55+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'my-component');
5656
```
5757

5858
As seen above, we recommend that the `$context` value is the same as the component name.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Sentro is well-equipped for making your design system into a production ready de
1515
## Showcase
1616
#### SCSS Input
1717
```scss
18-
@use '@matteusan/sentro' with (
18+
@use 'pkg:@matteusan/sentro' with (
1919
$prefix: 'sdc',
2020
$context: 'theme'
2121
);

docs/selector/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The selector module is a powerful tool for selecting elements in the DOM. It all
1313
Create a selector using the `sentro.selector-create()` mixin.
1414

1515
```scss
16-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
16+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
1717

1818
@include sentro.selector-create('.button') {
1919
// Your styles here
@@ -30,7 +30,7 @@ And it outputs:
3030
You can nest selectors using the `&` symbol.
3131

3232
```scss
33-
@use 'node_modules/@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
33+
@use 'pkg:@matteusan/sentro' with ($prefix: 'sdc', $context: 'theme');
3434

3535
@include sentro.selector-create('.button') {
3636
// Your base styles here

0 commit comments

Comments
 (0)