@solexllc/usx 0.1.8 → 0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solexllc/usx",
3
- "version": "0.1.8",
3
+ "version": "0.2.0",
4
4
  "description": "Compiled USWDS-based component styles for USX.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "src"
33
33
  ],
34
34
  "dependencies": {
35
- "@solexllc/usx-theme": "0.2.3"
35
+ "@solexllc/usx-theme": "0.3.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "sass": "^1.98.0"
@@ -56,24 +56,11 @@
56
56
  }
57
57
  }
58
58
 
59
- .usx-rounded-sm {
60
- border-radius: $usx-radius-sm;
61
- overflow: clip;
62
- }
63
-
64
- .usx-rounded-md {
65
- border-radius: $usx-radius-md;
66
- overflow: clip;
67
- }
68
-
69
- .usx-rounded-lg {
70
- border-radius: $usx-radius-lg;
71
- overflow: clip;
72
- }
73
-
74
- .usx-rounded-xl {
75
- border-radius: $usx-radius-xl;
76
- overflow: clip;
59
+ @each $radius-name, $radius-value in $border-radius {
60
+ .usx-rounded-#{$radius-name} {
61
+ border-radius: $radius-value !important;
62
+ overflow: clip;
63
+ }
77
64
  }
78
65
 
79
66
  .usx-circle {
@@ -81,6 +68,12 @@
81
68
  overflow: clip;
82
69
  }
83
70
 
71
+ @each $width-name, $width-value in $border-width {
72
+ .usx-border-#{$width-name} {
73
+ border-width: $width-value !important;
74
+ }
75
+ }
76
+
84
77
  .usx-ping {
85
78
  position: relative;
86
79
 
@@ -44,6 +44,8 @@
44
44
  .usx-avatar__img {
45
45
  height: auto;
46
46
  width: auto;
47
+ max-height: 100%;
48
+ max-width: 100%;
47
49
  }
48
50
 
49
51
  .usx-avatar__content {
@@ -0,0 +1,89 @@
1
+ @use 'pkg:@solexllc/usx-theme/variables' as *;
2
+
3
+ /* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
4
+ .usa-card.usx-card {
5
+ > .usa-card__container {
6
+ background-color: usx-when($usx-card-bg);
7
+ color: usx-when($usx-card-text);
8
+ border-color: usx-when($usx-card-border-color);
9
+ border-width: usx-when($usx-card-border-width);
10
+ border-radius: usx-when($usx-card-radius);
11
+ }
12
+
13
+ .usa-card__heading {
14
+ color: usx-when($usx-card-heading-text);
15
+ }
16
+
17
+ .usa-card__img {
18
+ background-color: usx-when($usx-card-media-bg);
19
+ }
20
+
21
+ @if $usx-card-radius and $usx-card-border-width {
22
+ $inner-radius: max(0px, calc(#{$usx-card-radius} - #{$usx-card-border-width}));
23
+
24
+ .usa-card__img {
25
+ border-radius: $inner-radius $inner-radius 0 0;
26
+ }
27
+
28
+ .usa-card__media--exdent .usa-card__img {
29
+ border-radius: $usx-card-radius $usx-card-radius 0 0;
30
+ }
31
+
32
+ &.usa-card--header-first {
33
+ .usa-card__header {
34
+ border-radius: $inner-radius $inner-radius 0 0;
35
+ }
36
+
37
+ .usa-card__img {
38
+ border-radius: 0;
39
+ }
40
+ }
41
+
42
+ .usa-card__media--inset .usa-card__img {
43
+ border-radius: 0;
44
+ }
45
+
46
+ @media (min-width: $breakpoint-tablet) {
47
+ &.usa-card--flag {
48
+ .usa-card__img {
49
+ border-radius: $inner-radius 0 0 $inner-radius;
50
+ }
51
+
52
+ .usa-card__media--exdent .usa-card__img {
53
+ border-radius: $usx-card-radius 0 0 $usx-card-radius;
54
+ }
55
+
56
+ &.usa-card--media-right {
57
+ .usa-card__img {
58
+ border-radius: 0 $inner-radius $inner-radius 0;
59
+ }
60
+
61
+ .usa-card__media--exdent .usa-card__img {
62
+ border-radius: 0 $usx-card-radius $usx-card-radius 0;
63
+ }
64
+ }
65
+
66
+ .usa-card__media--inset .usa-card__img {
67
+ border-radius: 0;
68
+ }
69
+ }
70
+ }
71
+ }
72
+
73
+ @if $usx-card-border-width {
74
+ .usa-card__media--exdent {
75
+ margin-inline: calc(-1 * #{$usx-card-border-width});
76
+ margin-top: calc(-1 * #{$usx-card-border-width});
77
+ }
78
+
79
+ &.usa-card--header-first .usa-card__media--exdent {
80
+ margin-top: 0;
81
+ }
82
+
83
+ @media (min-width: $breakpoint-tablet) {
84
+ &.usa-card--flag .usa-card__media--exdent {
85
+ margin: calc(-1 * #{$usx-card-border-width});
86
+ }
87
+ }
88
+ }
89
+ }
@@ -3,7 +3,6 @@
3
3
  /* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
4
4
  .usx-layout {
5
5
  position: relative;
6
- min-height: 100vh;
7
6
 
8
7
  background-color: usx-when($usx-surface-1);
9
8
 
@@ -1,3 +1,5 @@
1
+ @use 'pkg:@solexllc/usx-theme/variables' as *;
2
+
1
3
  @keyframes usx-spin {
2
4
  from {
3
5
  transform: rotate(0deg);
@@ -10,11 +12,24 @@
10
12
 
11
13
  /* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
12
14
  .usx-spinner {
13
- animation: usx-spin 800ms infinite linear;
14
- will-change: transform;
15
+ display: flex;
16
+ flex-direction: row;
17
+ justify-content: center;
18
+ align-items: center;
19
+ width: fit-content;
20
+
21
+ .usa-label.usx-label {
22
+ margin: 0 0 0 units(2);
23
+ font-style: italic;
24
+ }
25
+
26
+ svg {
27
+ animation: usx-spin 800ms infinite linear;
28
+ will-change: transform;
15
29
 
16
- @media (forced-colors: active) {
17
- forced-color-adjust: auto;
30
+ @media (forced-colors: active) {
31
+ forced-color-adjust: auto;
32
+ }
18
33
  }
19
34
  }
20
35
 
@@ -116,6 +116,16 @@ textarea,
116
116
  font-family: $usx-font-family;
117
117
  }
118
118
 
119
+ .usx-card {
120
+ .usa-card__container {
121
+ font-family: $usx-font-family;
122
+ }
123
+
124
+ .usa-card__heading {
125
+ font-family: $usx-font-family-heading;
126
+ }
127
+ }
128
+
119
129
  .usx-step-indicator {
120
130
  font-family: $usx-font-family;
121
131
 
@@ -143,3 +153,19 @@ textarea,
143
153
  .usx-accordion {
144
154
  font-family: $usx-font-family;
145
155
  }
156
+
157
+ .usx-section {
158
+
159
+ h2.usx-section__title {
160
+ font-family: $usx-font-family-heading;
161
+ font-size: $usx-font-size-h2;
162
+ }
163
+ }
164
+
165
+ .usx-page {
166
+
167
+ h1.usx-page__title {
168
+ font-family: $usx-font-family-heading;
169
+ font-size: $usx-font-size-h1;
170
+ }
171
+ }
package/src/index.scss CHANGED
@@ -37,6 +37,7 @@
37
37
  @forward './components/pagination';
38
38
  @forward './components/modal';
39
39
  @forward './components/summary-box';
40
+ @forward './components/card';
40
41
  @forward './components/sidenav';
41
42
  @forward './components/icon-list';
42
43
  @forward './components/step-indicator';