@brady_h/styles 0.0.0-stage → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,16 @@
1
- {
2
- "name": "@brady_h/styles",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
1
+ {
2
+ "name": "@brady_h/styles",
3
+ "version": "1.0.2",
4
+ "description": "Shared SCSS styling foundation for projects",
5
+ "license": "MIT",
6
+ "files": [
7
+ "src"
8
+ ],
9
+ "sass": "./src/_index.scss",
10
+ "style": "./src/_index.scss",
11
+ "scripts": {
12
+ "release:patch": "npm version patch && npm publish --access public",
13
+ "release:minor": "npm version minor && npm publish --access public",
14
+ "release:major": "npm version major && npm publish --access public"
15
+ }
16
+ }
@@ -0,0 +1,14 @@
1
+ @use "sass:map";
2
+
3
+ $breakpoints: (
4
+ xs: 320px,
5
+ sm: 576px,
6
+ md: 768px,
7
+ lg: 992px,
8
+ xl: 1200px,
9
+ xxl: 1400px,
10
+ );
11
+
12
+ @function breakpoint($name) {
13
+ @return map.get($breakpoints, $name);
14
+ }
@@ -0,0 +1,54 @@
1
+ @use "./mixins" as *;
2
+
3
+ .u-flex-center {
4
+ @include flex-center;
5
+ }
6
+
7
+ .u-flex-between {
8
+ @include flex-between;
9
+ }
10
+
11
+ .u-flex {
12
+ display: flex;
13
+ }
14
+
15
+ .u-flex-column {
16
+ display: flex;
17
+ flex-direction: column;
18
+ }
19
+
20
+ .u-flex-wrap {
21
+ flex-wrap: wrap;
22
+ }
23
+
24
+ .u-text-center {
25
+ text-align: center;
26
+ }
27
+
28
+ .u-text-truncate {
29
+ @include text-truncate;
30
+ }
31
+
32
+ .u-w-full {
33
+ width: 100%;
34
+ }
35
+
36
+ .u-h-full {
37
+ height: 100%;
38
+ }
39
+
40
+ .u-mx-auto {
41
+ margin-inline: auto;
42
+ }
43
+
44
+ .u-sr-only {
45
+ @include visually-hidden;
46
+ }
47
+
48
+ .u-pointer {
49
+ cursor: pointer;
50
+ }
51
+
52
+ .u-select-none {
53
+ user-select: none;
54
+ }
@@ -0,0 +1,5 @@
1
+ @use "sass:math";
2
+
3
+ @function to-rem($value, $base: 16px) {
4
+ @return math.div($value, $base) * 1rem;
5
+ }
@@ -0,0 +1,5 @@
1
+ @forward "variables";
2
+ @forward "breakpoints";
3
+ @forward "mixins";
4
+ @forward "classes";
5
+ @forward "functions";
@@ -0,0 +1,76 @@
1
+ @use "./breakpoints" as bp;
2
+
3
+ @mixin respond-down($breakpoint: md) {
4
+ @media (max-width: bp.breakpoint($breakpoint)) {
5
+ @content;
6
+ }
7
+ }
8
+
9
+ @mixin respond-up($breakpoint: md) {
10
+ @media (min-width: bp.breakpoint($breakpoint)) {
11
+ @content;
12
+ }
13
+ }
14
+
15
+ @mixin touch-query($breakpoint: md) {
16
+ @media (max-width: bp.breakpoint($breakpoint)) and (pointer: coarse) and (hover: none) {
17
+ @content;
18
+ }
19
+ }
20
+
21
+ @mixin pointer-query($breakpoint: md) {
22
+ $min-width: bp.breakpoint($breakpoint) + 1px;
23
+
24
+ @media (min-width: #{$min-width}) and (hover: hover) and (pointer: fine) {
25
+ @content;
26
+ }
27
+ }
28
+
29
+ @mixin mobile-query($bp: md) {
30
+ @include touch-query($bp) {
31
+ @content;
32
+ }
33
+ }
34
+
35
+ @mixin not-mobile-query($bp: md) {
36
+ @include pointer-query($bp) {
37
+ @content;
38
+ }
39
+ }
40
+
41
+ @mixin flex-center {
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ }
46
+
47
+ @mixin flex-between {
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: space-between;
51
+ }
52
+
53
+ @mixin text-truncate {
54
+ overflow: hidden;
55
+ white-space: nowrap;
56
+ text-overflow: ellipsis;
57
+ }
58
+
59
+ @mixin visually-hidden {
60
+ position: absolute;
61
+ width: 1px;
62
+ height: 1px;
63
+ padding: 0;
64
+ margin: -1px;
65
+ overflow: hidden;
66
+ clip: rect(0, 0, 0, 0);
67
+ white-space: nowrap;
68
+ border: 0;
69
+ }
70
+
71
+ @mixin focus-ring($color: currentColor) {
72
+ &:focus-visible {
73
+ outline: 2px solid $color;
74
+ outline-offset: 3px;
75
+ }
76
+ }
@@ -0,0 +1,27 @@
1
+ $spacing: (
2
+ 0: 0,
3
+ 1: 4px,
4
+ 2: 8px,
5
+ 3: 12px,
6
+ 4: 16px,
7
+ 5: 24px,
8
+ 6: 32px,
9
+ 7: 48px,
10
+ 8: 64px,
11
+ );
12
+
13
+ $border-radius: (
14
+ sm: 4px,
15
+ md: 8px,
16
+ lg: 12px,
17
+ xl: 16px,
18
+ full: 9999px,
19
+ );
20
+
21
+ $z-index: (
22
+ dropdown: 100,
23
+ sticky: 200,
24
+ overlay: 300,
25
+ modal: 400,
26
+ tooltip: 500,
27
+ );
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.