@gettrx/core-styles 1.0.28 → 1.0.30

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.
Files changed (106) hide show
  1. package/dist/assets/core-icons.json +7512 -0
  2. package/dist/assets/fonts/Gettrx-Icon.ttf +0 -0
  3. package/dist/assets/fonts/Gettrx-Icon.woff +0 -0
  4. package/dist/assets/fonts/Gettrx-Icon.woff2 +0 -0
  5. package/dist/assets/fonts/Roboto-Black.ttf +0 -0
  6. package/dist/assets/fonts/Roboto-BlackItalic.ttf +0 -0
  7. package/dist/assets/fonts/Roboto-Bold.ttf +0 -0
  8. package/dist/assets/fonts/Roboto-BoldItalic.ttf +0 -0
  9. package/dist/assets/fonts/Roboto-Italic.ttf +0 -0
  10. package/dist/assets/fonts/Roboto-Light.ttf +0 -0
  11. package/dist/assets/fonts/Roboto-LightItalic.ttf +0 -0
  12. package/dist/assets/fonts/Roboto-Medium.ttf +0 -0
  13. package/dist/assets/fonts/Roboto-MediumItalic.ttf +0 -0
  14. package/dist/assets/fonts/Roboto-Regular.ttf +0 -0
  15. package/dist/assets/fonts/Roboto-Thin.ttf +0 -0
  16. package/dist/assets/fonts/Roboto-ThinItalic.ttf +0 -0
  17. package/dist/assets/fonts/tabler-icons.eot +0 -0
  18. package/dist/assets/fonts/tabler-icons.ttf +0 -0
  19. package/dist/assets/fonts/tabler-icons.woff +0 -0
  20. package/dist/assets/fonts/tabler-icons.woff2 +0 -0
  21. package/dist/core-styles.css +1 -0
  22. package/dist/core-styles.scss +12 -0
  23. package/dist/styles/_font-face.scss +77 -0
  24. package/dist/styles/_functions.scss +180 -0
  25. package/dist/styles/_icons.scss +1535 -0
  26. package/dist/styles/_reboot.scss +610 -0
  27. package/dist/styles/_variables.scss +1125 -0
  28. package/dist/styles/components/_accordion.scss +149 -0
  29. package/dist/styles/components/_alert.scss +68 -0
  30. package/dist/styles/components/_badge.scss +38 -0
  31. package/dist/styles/components/_breadcrumb.scss +40 -0
  32. package/dist/styles/components/_button-group.scss +142 -0
  33. package/dist/styles/components/_buttons.scss +192 -0
  34. package/dist/styles/components/_card.scss +239 -0
  35. package/dist/styles/components/_carousel.scss +209 -0
  36. package/dist/styles/components/_close.scss +56 -0
  37. package/dist/styles/components/_dropdown.scss +232 -0
  38. package/dist/styles/components/_forms.scss +9 -0
  39. package/dist/styles/components/_images.scss +42 -0
  40. package/dist/styles/components/_list-group.scss +197 -0
  41. package/dist/styles/components/_modal.scss +237 -0
  42. package/dist/styles/components/_nav.scss +209 -0
  43. package/dist/styles/components/_navbar.scss +268 -0
  44. package/dist/styles/components/_pagination.scss +109 -0
  45. package/dist/styles/components/_placeholders.scss +51 -0
  46. package/dist/styles/components/_popover.scss +196 -0
  47. package/dist/styles/components/_progress.scss +62 -0
  48. package/dist/styles/components/_spinners.scss +83 -0
  49. package/dist/styles/components/_tables.scss +171 -0
  50. package/dist/styles/components/_toasts.scss +73 -0
  51. package/dist/styles/components/_tooltip.scss +119 -0
  52. package/dist/styles/components/_type.scss +95 -0
  53. package/dist/styles/components/forms/_floating-labels.scss +94 -0
  54. package/dist/styles/components/forms/_form-check.scss +164 -0
  55. package/dist/styles/components/forms/_form-control.scss +216 -0
  56. package/dist/styles/components/forms/_form-range.scss +91 -0
  57. package/dist/styles/components/forms/_form-select.scss +69 -0
  58. package/dist/styles/components/forms/_form-text.scss +11 -0
  59. package/dist/styles/components/forms/_input-group.scss +132 -0
  60. package/dist/styles/components/forms/_labels.scss +36 -0
  61. package/dist/styles/components/forms/_validation.scss +12 -0
  62. package/dist/styles/components/mixins/_alert.scss +14 -0
  63. package/dist/styles/components/mixins/_backdrop.scss +14 -0
  64. package/dist/styles/components/mixins/_banner.scss +7 -0
  65. package/dist/styles/components/mixins/_box-shadow.scss +16 -0
  66. package/dist/styles/components/mixins/_buttons.scss +70 -0
  67. package/dist/styles/components/mixins/_caret.scss +68 -0
  68. package/dist/styles/components/mixins/_clearfix.scss +9 -0
  69. package/dist/styles/components/mixins/_deprecate.scss +10 -0
  70. package/dist/styles/components/mixins/_forms.scss +145 -0
  71. package/dist/styles/components/mixins/_gradients.scss +43 -0
  72. package/dist/styles/components/mixins/_image.scss +16 -0
  73. package/dist/styles/components/mixins/_list-group.scss +26 -0
  74. package/dist/styles/components/mixins/_lists.scss +7 -0
  75. package/dist/styles/components/mixins/_pagination.scss +10 -0
  76. package/dist/styles/components/mixins/_reset-text.scss +17 -0
  77. package/dist/styles/components/mixins/_resize.scss +6 -0
  78. package/dist/styles/components/mixins/_table-variants.scss +24 -0
  79. package/dist/styles/components/mixins/_text-truncate.scss +8 -0
  80. package/dist/styles/components/mixins/_transition.scss +24 -0
  81. package/dist/styles/components/mixins/_visually-hidden.scss +33 -0
  82. package/dist/styles/css/gettrx.css +13552 -0
  83. package/dist/styles/functions/_color.functions.scss +14 -0
  84. package/dist/styles/functions/_grid.functions.scss +41 -0
  85. package/dist/styles/functions/_map.functions.scss +36 -0
  86. package/dist/styles/layout/_containers.scss +43 -0
  87. package/dist/styles/layout/_grid.scss +26 -0
  88. package/dist/styles/layout/_layout.scss +2 -0
  89. package/dist/styles/maps/_border.maps.scss +24 -0
  90. package/dist/styles/maps/_colors.maps.scss +10 -0
  91. package/dist/styles/maps/_fonts.maps.scss +10 -0
  92. package/dist/styles/maps/_layout.maps.scss +33 -0
  93. package/dist/styles/maps/_positions.maps.scss +15 -0
  94. package/dist/styles/maps/_shadow.maps.scss +11 -0
  95. package/dist/styles/maps/_spacing.maps.scss +23 -0
  96. package/dist/styles/mixins/_border-radius.mixins.scss +61 -0
  97. package/dist/styles/mixins/_breakpoints.mixins.scss +129 -0
  98. package/dist/styles/mixins/_container.mixins.scss +13 -0
  99. package/dist/styles/mixins/_grid.mixins.scss +157 -0
  100. package/dist/styles/mixins/_utilities.mixins.scss +84 -0
  101. package/dist/styles/utilities/_api.scss +33 -0
  102. package/dist/styles/utilities/_utilities.scss +695 -0
  103. package/dist/tokens/_tokens.scss +216 -0
  104. package/dist/tokens/tokens.css +218 -0
  105. package/dist/tokens/tokens.js +216 -0
  106. package/package.json +1 -1
@@ -0,0 +1,12 @@
1
+ @forward "tokens/tokens.css";
2
+
3
+ @forward "styles/reboot";
4
+
5
+ @forward "styles/font-face";
6
+ @forward "styles/icons";
7
+ @forward "styles/layout/containers";
8
+ @forward "styles/layout/grid";
9
+
10
+ @forward "styles/utilities/api";
11
+
12
+ @forward "styles/css/gettrx.css";
@@ -0,0 +1,77 @@
1
+ $gtr-font-face-path: '/assets/fonts' !default;
2
+
3
+ @font-face {
4
+ font-family: 'Roboto';
5
+ font-style: normal;
6
+ font-weight: 100;
7
+ font-display: auto;
8
+ src: url('#{$gtr-font-face-path}/Roboto-Thin.ttf?') format('truetype');
9
+ }
10
+ @font-face {
11
+ font-family: 'Roboto';
12
+ font-style: italic;
13
+ font-weight: 100;
14
+ font-display: auto;
15
+ src: url('#{$gtr-font-face-path}/Roboto-ThinItalic.ttf?') format('truetype');
16
+ }
17
+ @font-face {
18
+ font-family: 'Roboto';
19
+ font-style: normal;
20
+ font-weight: 300;
21
+ font-display: auto;
22
+ src: url('#{$gtr-font-face-path}/Roboto-Light.ttf?') format('truetype');
23
+ }
24
+ @font-face {
25
+ font-family: 'Roboto';
26
+ font-style: italic;
27
+ font-weight: 300;
28
+ font-display: auto;
29
+ src: url('#{$gtr-font-face-path}/Roboto-LightItalic.ttf?') format('truetype');
30
+ }
31
+
32
+ @font-face {
33
+ font-family: 'Roboto';
34
+ font-style: normal;
35
+ font-weight: 400;
36
+ font-display: auto;
37
+ src: url('#{$gtr-font-face-path}/Roboto-Regular.ttf?') format('truetype');
38
+ }
39
+
40
+ @font-face {
41
+ font-family: 'Roboto';
42
+ font-style: italic;
43
+ font-weight: 400;
44
+ font-display: auto;
45
+ src: url('#{$gtr-font-face-path}/Roboto-Italic.ttf?') format('truetype');
46
+ }
47
+
48
+ @font-face {
49
+ font-family: 'Roboto';
50
+ font-style: normal;
51
+ font-weight: 700;
52
+ font-display: auto;
53
+ src: url('#{$gtr-font-face-path}/Roboto-Bold.ttf?') format('truetype');
54
+ }
55
+
56
+ @font-face {
57
+ font-family: 'Roboto';
58
+ font-style: italic;
59
+ font-weight: 700;
60
+ font-display: auto;
61
+ src: url('#{$gtr-font-face-path}/Roboto-BoldItalic.ttf?') format('truetype');
62
+ }
63
+
64
+ @font-face {
65
+ font-family: 'Roboto';
66
+ font-style: normal;
67
+ font-weight: 900;
68
+ font-display: auto;
69
+ src: url('#{$gtr-font-face-path}/Roboto-Black.ttf?') format('truetype');
70
+ }
71
+ @font-face {
72
+ font-family: 'Roboto';
73
+ font-style: italic;
74
+ font-weight: 900;
75
+ font-display: auto;
76
+ src: url('#{$gtr-font-face-path}/Roboto-BlackItalic.ttf?') format('truetype');
77
+ }
@@ -0,0 +1,180 @@
1
+ // Bootstrap functions
2
+ //
3
+ // Utility mixins and functions for evaluating source code across our variables, maps, and mixins.
4
+
5
+
6
+ @function varify($list) {
7
+ $result: null;
8
+ @each $entry in $list {
9
+ $result: append($result, var(--gtr-#{$entry}), space);
10
+ }
11
+ @return $result;
12
+ }
13
+
14
+ // Internal Bootstrap function to turn maps into its negative variant.
15
+ // It prefixes the keys with `n` and makes the value negative.
16
+ @function negativify-map($map) {
17
+ $result: ();
18
+ @each $key, $value in $map {
19
+ @if $key != 0 {
20
+ $result: map-merge($result, ("n" + $key: (-$value)));
21
+ }
22
+ }
23
+ @return $result;
24
+ }
25
+
26
+ // Get multiple keys from a sass map
27
+
28
+
29
+ // Replace `$search` with `$replace` in `$string`
30
+ // Used on our SVG icon backgrounds for custom forms.
31
+ //
32
+ // @author Kitty Giraudel
33
+ // @param {String} $string - Initial string
34
+ // @param {String} $search - Substring to replace
35
+ // @param {String} $replace ('') - New value
36
+ // @return {String} - Updated string
37
+ @function str-replace($string, $search, $replace: "") {
38
+ $index: str-index($string, $search);
39
+
40
+ @if $index {
41
+ @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
42
+ }
43
+
44
+ @return $string;
45
+ }
46
+
47
+ // See https://codepen.io/kevinweber/pen/dXWoRw
48
+ //
49
+ // Requires the use of quotes around data URIs.
50
+
51
+ @function escape-svg($string) {
52
+ @if str-index($string, "data:image/svg+xml") {
53
+ @each $char, $encoded in $escaped-characters {
54
+ // Do not escape the url brackets
55
+ @if str-index($string, "url(") == 1 {
56
+ $string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
57
+ } @else {
58
+ $string: str-replace($string, $char, $encoded);
59
+ }
60
+ }
61
+ }
62
+
63
+ @return $string;
64
+ }
65
+
66
+ // Color contrast
67
+ // See https://github.com/twbs/bootstrap/pull/30168
68
+
69
+ // A list of pre-calculated numbers of pow(divide((divide($value, 255) + .055), 1.055), 2.4). (from 0 to 255)
70
+ // stylelint-disable-next-line scss/dollar-variable-default, scss/dollar-variable-pattern
71
+ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 .0033 .0037 .004 .0044 .0048 .0052 .0056 .006 .0065 .007 .0075 .008 .0086 .0091 .0097 .0103 .011 .0116 .0123 .013 .0137 .0144 .0152 .016 .0168 .0176 .0185 .0194 .0203 .0212 .0222 .0232 .0242 .0252 .0262 .0273 .0284 .0296 .0307 .0319 .0331 .0343 .0356 .0369 .0382 .0395 .0409 .0423 .0437 .0452 .0467 .0482 .0497 .0513 .0529 .0545 .0561 .0578 .0595 .0612 .063 .0648 .0666 .0685 .0704 .0723 .0742 .0762 .0782 .0802 .0823 .0844 .0865 .0887 .0908 .0931 .0953 .0976 .0999 .1022 .1046 .107 .1095 .1119 .1144 .117 .1195 .1221 .1248 .1274 .1301 .1329 .1356 .1384 .1413 .1441 .147 .15 .1529 .1559 .159 .162 .1651 .1683 .1714 .1746 .1779 .1812 .1845 .1878 .1912 .1946 .1981 .2016 .2051 .2086 .2122 .2159 .2195 .2232 .227 .2307 .2346 .2384 .2423 .2462 .2502 .2542 .2582 .2623 .2664 .2705 .2747 .2789 .2831 .2874 .2918 .2961 .3005 .305 .3095 .314 .3185 .3231 .3278 .3325 .3372 .3419 .3467 .3515 .3564 .3613 .3663 .3712 .3763 .3813 .3864 .3916 .3968 .402 .4072 .4125 .4179 .4233 .4287 .4342 .4397 .4452 .4508 .4564 .4621 .4678 .4735 .4793 .4851 .491 .4969 .5029 .5089 .5149 .521 .5271 .5333 .5395 .5457 .552 .5583 .5647 .5711 .5776 .5841 .5906 .5972 .6038 .6105 .6172 .624 .6308 .6376 .6445 .6514 .6584 .6654 .6724 .6795 .6867 .6939 .7011 .7084 .7157 .7231 .7305 .7379 .7454 .7529 .7605 .7682 .7758 .7835 .7913 .7991 .807 .8148 .8228 .8308 .8388 .8469 .855 .8632 .8714 .8796 .8879 .8963 .9047 .9131 .9216 .9301 .9387 .9473 .956 .9647 .9734 .9823 .9911 1;
72
+
73
+ @function color-contrast($background, $color-contrast-dark: $gtr-color-base-black-100, $color-contrast-light: $gtr-color-base-white-100, $min-contrast-ratio: $min-contrast-ratio) {
74
+ $foregrounds: $color-contrast-light, $color-contrast-dark, $white, $black;
75
+ $max-ratio: 0;
76
+ $max-ratio-color: null;
77
+
78
+ @each $color in $foregrounds {
79
+ $contrast-ratio: contrast-ratio($background, $color);
80
+ @if $contrast-ratio > $min-contrast-ratio {
81
+ @return $color;
82
+ } @else if $contrast-ratio > $max-ratio {
83
+ $max-ratio: $contrast-ratio;
84
+ $max-ratio-color: $color;
85
+ }
86
+ }
87
+
88
+ @warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$background}...";
89
+
90
+ @return $max-ratio-color;
91
+ }
92
+
93
+ @function contrast-ratio($background, $foreground: $gtr-color-base-white-100) {
94
+ $l1: luminance($background);
95
+ $l2: luminance(opaque($background, $foreground));
96
+
97
+ @return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
98
+ }
99
+
100
+ // Return WCAG2.1 relative luminance
101
+ // See https://www.w3.org/TR/WCAG/#dfn-relative-luminance
102
+ // See https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
103
+ @function luminance($color) {
104
+ $rgb: (
105
+ "r": red($color),
106
+ "g": green($color),
107
+ "b": blue($color)
108
+ );
109
+
110
+ @each $name, $value in $rgb {
111
+ $value: if(divide($value, 255) < .04045, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
112
+ $rgb: map-merge($rgb, ($name: $value));
113
+ }
114
+
115
+ @return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
116
+ }
117
+
118
+ // Return opaque color
119
+ // opaque(#fff, rgba(0, 0, 0, .5)) => #808080
120
+ @function opaque($background, $foreground) {
121
+ @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100%);
122
+ }
123
+
124
+ // scss-docs-start color-functions
125
+ // Tint a color: mix a color with white
126
+ @function tint-color($color, $weight) {
127
+ @return mix(white, $color, $weight);
128
+ }
129
+
130
+ // Shade a color: mix a color with black
131
+ @function shade-color($color, $weight) {
132
+ @return mix(black, $color, $weight);
133
+ }
134
+
135
+ // Shade the color if the weight is positive, else tint it
136
+ @function shift-color($color, $weight) {
137
+ @return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight));
138
+ }
139
+ // scss-docs-end color-functions
140
+
141
+ // Return valid calc
142
+ @function add($value1, $value2, $return-calc: true) {
143
+ @if $value1 == null {
144
+ @return $value2;
145
+ }
146
+
147
+ @if $value2 == null {
148
+ @return $value1;
149
+ }
150
+
151
+ @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
152
+ @return $value1 + $value2;
153
+ }
154
+
155
+ @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
156
+ }
157
+
158
+ @function subtract($value1, $value2, $return-calc: true) {
159
+ @if $value1 == null and $value2 == null {
160
+ @return null;
161
+ }
162
+
163
+ @if $value1 == null {
164
+ @return -$value2;
165
+ }
166
+
167
+ @if $value2 == null {
168
+ @return $value1;
169
+ }
170
+
171
+ @if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
172
+ @return $value1 - $value2;
173
+ }
174
+
175
+ @if type-of($value2) != number {
176
+ $value2: unquote("(") + $value2 + unquote(")");
177
+ }
178
+
179
+ @return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
180
+ }