@gettrx/core-styles 2.1.1 → 2.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.
@@ -1,7 +1,10 @@
1
1
  @use "sass:map";
2
2
  @use "sass:math";
3
3
  @function divide($dividend, $divisor, $precision: 10) {
4
- $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
4
+ $sign: -1;
5
+ @if $dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0 {
6
+ $sign: 1;
7
+ }
5
8
  $dividend: math.abs($dividend);
6
9
  $divisor: math.abs($divisor);
7
10
  @if $dividend == 0 {
@@ -23,7 +23,10 @@
23
23
  @if not $n {
24
24
  @error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
25
25
  }
26
- @return if($n < list.length($breakpoint-names), list.nth($breakpoint-names, $n + 1), null);
26
+ @if $n < list.length($breakpoint-names) {
27
+ @return list.nth($breakpoint-names, $n + 1);
28
+ }
29
+ @return null;
27
30
  }
28
31
 
29
32
  // Minimum breakpoint width. Null for the smallest (first) breakpoint.
@@ -32,7 +35,10 @@
32
35
  // 576px
33
36
  @function breakpoint-min($name, $breakpoints: layout-maps.$grid-breakpoints) {
34
37
  $min: map.get($breakpoints, $name);
35
- @return if($min != 0, $min, null);
38
+ @if $min != 0 {
39
+ @return $min;
40
+ }
41
+ @return null;
36
42
  }
37
43
 
38
44
  // Maximum breakpoint width.
@@ -46,7 +52,10 @@
46
52
  // 767.98px
47
53
  @function breakpoint-max($name, $breakpoints: layout-maps.$grid-breakpoints) {
48
54
  $max: map.get($breakpoints, $name);
49
- @return if($max and $max > 0, $max - .02, null);
55
+ @if $max and $max > 0 {
56
+ @return $max - .02;
57
+ }
58
+ @return null;
50
59
  }
51
60
 
52
61
  // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
@@ -57,7 +66,10 @@
57
66
  // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
58
67
  // "-sm"
59
68
  @function breakpoint-infix($name, $breakpoints: layout-maps.$grid-breakpoints) {
60
- @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
69
+ @if breakpoint-min($name, $breakpoints) == null {
70
+ @return "";
71
+ }
72
+ @return "-#{$name}";
61
73
  }
62
74
 
63
75
  // Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
@@ -22,7 +22,9 @@
22
22
 
23
23
  @mixin make-col-ready() {
24
24
  // Add box sizing if only the grid is loaded
25
- box-sizing: if(meta.variable-exists(include-column-box-sizing), border-box, null);
25
+ @if meta.variable-exists(include-column-box-sizing) {
26
+ box-sizing: border-box;
27
+ }
26
28
  // Prevent columns from becoming too narrow when at smaller grid tiers by
27
29
  // always setting `width: 100%;`. This works because we set the width
28
30
  // later on to override this initial width.
@@ -52,7 +54,11 @@
52
54
 
53
55
  @mixin make-col-offset($size, $columns: tokens.$gtr-content-layout-grid-columns) {
54
56
  $num: grid-functions.divide($size, $columns);
55
- margin-left: if($num == 0, 0, math.percentage($num));
57
+ @if $num == 0 {
58
+ margin-left: 0;
59
+ } @else {
60
+ margin-left: math.percentage($num);
61
+ }
56
62
  }
57
63
 
58
64
  // Row columns
@@ -21,19 +21,43 @@
21
21
  }
22
22
 
23
23
  // Use custom class if present
24
- $property-class: if(map.has-key($utility, class), map.get($utility, class), list.nth($properties, 1));
25
- $property-class: if($property-class == null, "", $property-class);
24
+ $property-class: null;
25
+ @if map.has-key($utility, class) {
26
+ $property-class: map.get($utility, class);
27
+ } @else {
28
+ $property-class: list.nth($properties, 1);
29
+ }
30
+ @if $property-class == null {
31
+ $property-class: "";
32
+ }
26
33
 
27
34
  // Use custom CSS variable name if present, otherwise default to `class`
28
- $css-variable-name: if(map.has-key($utility, css-variable-name), map.get($utility, css-variable-name), map.get($utility, class));
35
+ $css-variable-name: null;
36
+ @if map.has-key($utility, css-variable-name) {
37
+ $css-variable-name: map.get($utility, css-variable-name);
38
+ } @else {
39
+ $css-variable-name: map.get($utility, class);
40
+ }
29
41
 
30
42
  // State params to generate pseudo-classes
31
- $state: if(map.has-key($utility, state), map.get($utility, state), ());
43
+ $state: ();
44
+ @if map.has-key($utility, state) {
45
+ $state: map.get($utility, state);
46
+ }
32
47
 
33
- $infix: if($property-class == "" and string.slice($infix, 1, 1) == "-", string.slice($infix, 2), $infix);
48
+ @if $property-class == "" and string.slice($infix, 1, 1) == "-" {
49
+ $infix: string.slice($infix, 2);
50
+ }
34
51
 
35
52
  // Don't prefix if value key is null (e.g. with shadow class)
36
- $property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
53
+ $property-class-modifier: "";
54
+ @if $key {
55
+ @if $property-class == "" and $infix == "" {
56
+ $property-class-modifier: "" + $key;
57
+ } @else {
58
+ $property-class-modifier: "-" + $key;
59
+ }
60
+ }
37
61
 
38
62
  $is-css-var: map.get($utility, css-var);
39
63
  $is-local-vars: map.get($utility, local-vars);
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * Gettrx Core Styles
3
3
  * Do not edit directly
4
- * Generated on Mon, 12 Oct 2026 22:14:49 GMT
4
+ * Generated on Tue, 17 Nov 2026 13:15:29 GMT
5
5
  */
6
6
 
7
7
  $gtr-color-background-base : var(--gtr-color-background-base);
8
8
  $gtr-color-background-success : var(--gtr-color-background-success);
9
9
  $gtr-color-background-danger : var(--gtr-color-background-danger);
10
+ $gtr-color-background-warning : var(--gtr-color-background-warning);
10
11
  $gtr-color-base-primary-5 : var(--gtr-color-base-primary-5);
11
12
  $gtr-color-base-primary-10 : var(--gtr-color-base-primary-10);
12
13
  $gtr-color-base-primary-20 : var(--gtr-color-base-primary-20);
@@ -47,6 +48,16 @@ $gtr-color-base-danger-100 : var(--gtr-color-base-danger-100);
47
48
  $gtr-color-base-danger-base : var(--gtr-color-base-danger-base);
48
49
  $gtr-color-base-danger-hover : var(--gtr-color-base-danger-hover);
49
50
  $gtr-color-base-danger-pressed : var(--gtr-color-base-danger-pressed);
51
+ $gtr-color-base-warning-5 : var(--gtr-color-base-warning-5);
52
+ $gtr-color-base-warning-10 : var(--gtr-color-base-warning-10);
53
+ $gtr-color-base-warning-20 : var(--gtr-color-base-warning-20);
54
+ $gtr-color-base-warning-40 : var(--gtr-color-base-warning-40);
55
+ $gtr-color-base-warning-60 : var(--gtr-color-base-warning-60);
56
+ $gtr-color-base-warning-80 : var(--gtr-color-base-warning-80);
57
+ $gtr-color-base-warning-100 : var(--gtr-color-base-warning-100);
58
+ $gtr-color-base-warning-base : var(--gtr-color-base-warning-base);
59
+ $gtr-color-base-warning-hover : var(--gtr-color-base-warning-hover);
60
+ $gtr-color-base-warning-pressed : var(--gtr-color-base-warning-pressed);
50
61
  $gtr-color-base-black-5 : var(--gtr-color-base-black-5);
51
62
  $gtr-color-base-black-10 : var(--gtr-color-base-black-10);
52
63
  $gtr-color-base-black-20 : var(--gtr-color-base-black-20);
@@ -71,18 +82,21 @@ $gtr-color-border-primary : var(--gtr-color-border-primary);
71
82
  $gtr-color-border-secondary : var(--gtr-color-border-secondary);
72
83
  $gtr-color-border-success : var(--gtr-color-border-success);
73
84
  $gtr-color-border-danger : var(--gtr-color-border-danger);
85
+ $gtr-color-border-warning : var(--gtr-color-border-warning);
74
86
  $gtr-color-border-black : var(--gtr-color-border-black);
75
87
  $gtr-color-border-white : var(--gtr-color-border-white);
76
88
  $gtr-color-font-primary : var(--gtr-color-font-primary);
77
89
  $gtr-color-font-secondary : var(--gtr-color-font-secondary);
78
90
  $gtr-color-font-success : var(--gtr-color-font-success);
79
91
  $gtr-color-font-danger : var(--gtr-color-font-danger);
92
+ $gtr-color-font-warning : var(--gtr-color-font-warning);
80
93
  $gtr-color-font-black : var(--gtr-color-font-black);
81
94
  $gtr-color-font-white : var(--gtr-color-font-white);
82
95
  $gtr-color-font-inverse-primary : var(--gtr-color-font-inverse-primary);
83
96
  $gtr-color-font-inverse-secondary : var(--gtr-color-font-inverse-secondary);
84
97
  $gtr-color-font-inverse-success : var(--gtr-color-font-inverse-success);
85
98
  $gtr-color-font-inverse-danger : var(--gtr-color-font-inverse-danger);
99
+ $gtr-color-font-inverse-warning : var(--gtr-color-font-inverse-warning);
86
100
  $gtr-color-font-inverse-black : var(--gtr-color-font-inverse-black);
87
101
  $gtr-color-font-inverse-white : var(--gtr-color-font-inverse-white);
88
102
  $gtr-component-button-padding : var(--gtr-component-button-padding);
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Gettrx Core Styles
3
3
  * Do not edit directly
4
- * Generated on Mon, 12 Oct 2026 22:14:49 GMT
4
+ * Generated on Tue, 17 Nov 2026 13:15:29 GMT
5
5
  */
6
6
 
7
7
  :root {
@@ -113,6 +113,15 @@
113
113
  --gtr-color-base-black-20: rgba(0, 0, 0, 0.2);
114
114
  --gtr-color-base-black-10: rgba(0, 0, 0, 0.1);
115
115
  --gtr-color-base-black-5: rgba(0, 0, 0, 0.05);
116
+ --gtr-color-base-warning-pressed: #df7210;
117
+ --gtr-color-base-warning-hover: #ef7e1a;
118
+ --gtr-color-base-warning-100: #f2994a;
119
+ --gtr-color-base-warning-80: rgba(242, 153, 74, 0.8);
120
+ --gtr-color-base-warning-60: rgba(242, 153, 74, 0.6);
121
+ --gtr-color-base-warning-40: rgba(242, 153, 74, 0.4);
122
+ --gtr-color-base-warning-20: rgba(242, 153, 74, 0.2);
123
+ --gtr-color-base-warning-10: rgba(242, 153, 74, 0.1);
124
+ --gtr-color-base-warning-5: rgba(242, 153, 74, 0.05);
116
125
  --gtr-color-base-danger-pressed: #d71a1c;
117
126
  --gtr-color-base-danger-hover: #e42728;
118
127
  --gtr-color-base-danger-100: #ea5455;
@@ -187,28 +196,33 @@
187
196
  --gtr-component-button-padding: var(--gtr-size-padding-medium);
188
197
  --gtr-color-font-inverse-white: var(--gtr-color-base-black-80);
189
198
  --gtr-color-font-inverse-black: var(--gtr-color-base-white-100);
199
+ --gtr-color-font-inverse-warning: var(--gtr-color-base-white-100);
190
200
  --gtr-color-font-inverse-danger: var(--gtr-color-base-white-100);
191
201
  --gtr-color-font-inverse-success: var(--gtr-color-base-white-100);
192
202
  --gtr-color-font-inverse-secondary: var(--gtr-color-base-white-100);
193
203
  --gtr-color-font-inverse-primary: var(--gtr-color-base-white-100);
194
204
  --gtr-color-font-white: var(--gtr-color-base-white-100);
195
205
  --gtr-color-font-black: var(--gtr-color-base-black-100);
206
+ --gtr-color-font-warning: var(--gtr-color-base-warning-100);
196
207
  --gtr-color-font-danger: var(--gtr-color-base-danger-100);
197
208
  --gtr-color-font-success: var(--gtr-color-base-success-100);
198
209
  --gtr-color-font-secondary: var(--gtr-color-base-secondary-100);
199
210
  --gtr-color-font-primary: var(--gtr-color-base-primary-100);
200
211
  --gtr-color-border-white: var(--gtr-color-base-white-100);
201
212
  --gtr-color-border-black: var(--gtr-color-base-black-100);
213
+ --gtr-color-border-warning: var(--gtr-color-base-warning-100);
202
214
  --gtr-color-border-danger: var(--gtr-color-base-danger-100);
203
215
  --gtr-color-border-success: var(--gtr-color-base-success-100);
204
216
  --gtr-color-border-secondary: var(--gtr-color-base-secondary-100);
205
217
  --gtr-color-border-primary: var(--gtr-color-base-primary-100);
206
218
  --gtr-color-base-white-base: var(--gtr-color-base-white-100);
207
219
  --gtr-color-base-black-base: var(--gtr-color-base-black-100);
220
+ --gtr-color-base-warning-base: var(--gtr-color-base-warning-100);
208
221
  --gtr-color-base-danger-base: var(--gtr-color-base-danger-100);
209
222
  --gtr-color-base-success-base: var(--gtr-color-base-success-100);
210
223
  --gtr-color-base-secondary-base: var(--gtr-color-base-secondary-100);
211
224
  --gtr-color-base-primary-base: var(--gtr-color-base-primary-100);
225
+ --gtr-color-background-warning: var(--gtr-color-base-warning-100);
212
226
  --gtr-color-background-danger: var(--gtr-color-base-danger-100);
213
227
  --gtr-color-background-success: var(--gtr-color-base-success-100);
214
228
  --gtr-color-background-base: var(--gtr-color-base-white-100);
@@ -1,12 +1,13 @@
1
1
  /**
2
2
  * Gettrx Core Styles
3
3
  * Do not edit directly
4
- * Generated on Mon, 12 Oct 2026 22:14:49 GMT
4
+ * Generated on Tue, 17 Nov 2026 13:15:29 GMT
5
5
  */
6
6
 
7
7
  export const GtrColorBackgroundBase = 'var(--GtrColorBackgroundBase)';
8
8
  export const GtrColorBackgroundSuccess = 'var(--GtrColorBackgroundSuccess)';
9
9
  export const GtrColorBackgroundDanger = 'var(--GtrColorBackgroundDanger)';
10
+ export const GtrColorBackgroundWarning = 'var(--GtrColorBackgroundWarning)';
10
11
  export const GtrColorBasePrimary5 = 'var(--GtrColorBasePrimary5)';
11
12
  export const GtrColorBasePrimary10 = 'var(--GtrColorBasePrimary10)';
12
13
  export const GtrColorBasePrimary20 = 'var(--GtrColorBasePrimary20)';
@@ -47,6 +48,16 @@ export const GtrColorBaseDanger100 = 'var(--GtrColorBaseDanger100)';
47
48
  export const GtrColorBaseDangerBase = 'var(--GtrColorBaseDangerBase)';
48
49
  export const GtrColorBaseDangerHover = 'var(--GtrColorBaseDangerHover)';
49
50
  export const GtrColorBaseDangerPressed = 'var(--GtrColorBaseDangerPressed)';
51
+ export const GtrColorBaseWarning5 = 'var(--GtrColorBaseWarning5)';
52
+ export const GtrColorBaseWarning10 = 'var(--GtrColorBaseWarning10)';
53
+ export const GtrColorBaseWarning20 = 'var(--GtrColorBaseWarning20)';
54
+ export const GtrColorBaseWarning40 = 'var(--GtrColorBaseWarning40)';
55
+ export const GtrColorBaseWarning60 = 'var(--GtrColorBaseWarning60)';
56
+ export const GtrColorBaseWarning80 = 'var(--GtrColorBaseWarning80)';
57
+ export const GtrColorBaseWarning100 = 'var(--GtrColorBaseWarning100)';
58
+ export const GtrColorBaseWarningBase = 'var(--GtrColorBaseWarningBase)';
59
+ export const GtrColorBaseWarningHover = 'var(--GtrColorBaseWarningHover)';
60
+ export const GtrColorBaseWarningPressed = 'var(--GtrColorBaseWarningPressed)';
50
61
  export const GtrColorBaseBlack5 = 'var(--GtrColorBaseBlack5)';
51
62
  export const GtrColorBaseBlack10 = 'var(--GtrColorBaseBlack10)';
52
63
  export const GtrColorBaseBlack20 = 'var(--GtrColorBaseBlack20)';
@@ -71,18 +82,21 @@ export const GtrColorBorderPrimary = 'var(--GtrColorBorderPrimary)';
71
82
  export const GtrColorBorderSecondary = 'var(--GtrColorBorderSecondary)';
72
83
  export const GtrColorBorderSuccess = 'var(--GtrColorBorderSuccess)';
73
84
  export const GtrColorBorderDanger = 'var(--GtrColorBorderDanger)';
85
+ export const GtrColorBorderWarning = 'var(--GtrColorBorderWarning)';
74
86
  export const GtrColorBorderBlack = 'var(--GtrColorBorderBlack)';
75
87
  export const GtrColorBorderWhite = 'var(--GtrColorBorderWhite)';
76
88
  export const GtrColorFontPrimary = 'var(--GtrColorFontPrimary)';
77
89
  export const GtrColorFontSecondary = 'var(--GtrColorFontSecondary)';
78
90
  export const GtrColorFontSuccess = 'var(--GtrColorFontSuccess)';
79
91
  export const GtrColorFontDanger = 'var(--GtrColorFontDanger)';
92
+ export const GtrColorFontWarning = 'var(--GtrColorFontWarning)';
80
93
  export const GtrColorFontBlack = 'var(--GtrColorFontBlack)';
81
94
  export const GtrColorFontWhite = 'var(--GtrColorFontWhite)';
82
95
  export const GtrColorFontInversePrimary = 'var(--GtrColorFontInversePrimary)';
83
96
  export const GtrColorFontInverseSecondary = 'var(--GtrColorFontInverseSecondary)';
84
97
  export const GtrColorFontInverseSuccess = 'var(--GtrColorFontInverseSuccess)';
85
98
  export const GtrColorFontInverseDanger = 'var(--GtrColorFontInverseDanger)';
99
+ export const GtrColorFontInverseWarning = 'var(--GtrColorFontInverseWarning)';
86
100
  export const GtrColorFontInverseBlack = 'var(--GtrColorFontInverseBlack)';
87
101
  export const GtrColorFontInverseWhite = 'var(--GtrColorFontInverseWhite)';
88
102
  export const GtrComponentButtonPadding = 'var(--GtrComponentButtonPadding)';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gettrx/core-styles",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Gettrx core styles",
5
5
  "keywords": [
6
6
  "gettrx",