@tacc/core-styles 0.5.1 → 0.5.2-alpha

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/README.md CHANGED
@@ -2,12 +2,11 @@
2
2
 
3
3
  The shared styles for TACC WMA Workspace Portals & Websites
4
4
 
5
- > __Notice__: Currently only [Core CMS] is using these styles.
6
-
7
5
 
8
6
  ## Related Repositories
9
7
 
10
8
  - [Core CMS], the base CMS code for TACC WMA CMS Websites
9
+ - [Core Portal], the base Portal code for TACC WMA CMS Websites
11
10
 
12
11
 
13
12
  ## External Project Usage
@@ -92,7 +91,7 @@ Notes:
92
91
  #### Build Script
93
92
 
94
93
  ```js
95
- const buildStylesheets = require('core-styles');
94
+ const buildStylesheets = require('core-styles').buildStylesheets;
96
95
 
97
96
  buildStylesheets(
98
97
  // Parse CSS files from which directory (required)
@@ -112,8 +111,6 @@ buildStylesheets(
112
111
  verbose: true,
113
112
  // Print version of this software (optional, default: false)
114
113
  version: true,
115
- // Extension of CSS files to parse (optional, default: "css")
116
- fileExt: 'css',
117
114
  // Any value to help identify the build (optional, default: app version)
118
115
  buildId: process.env.npm_package_version + someUniqueId
119
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tacc/core-styles",
3
- "version": "0.5.1",
3
+ "version": "0.5.2-alpha",
4
4
  "license": "MIT",
5
5
  "author": "TACC ACI WMA <wma-portals@gmail.com>",
6
6
  "description": "CSS source and processor for TACC Core-CMS and Core-Portal.",
@@ -5,7 +5,8 @@ A button that may have icon(s) before and/or after its text.
5
5
 
6
6
  .c-button--primary - A primary (expected) user action
7
7
  .c-button--secondary - For an optional user action
8
- .c-button--is-active - A button that represents the current state
8
+ .c-button--tertiary - A button that represents inactive buttons among many
9
+ .c-button--is-active - A button that represents the one active button among many
9
10
  .c-button--as-link - A button that visually resembles a link
10
11
  .c-button--is-busy - A clicked button that started an incomplete process
11
12
 
@@ -49,21 +50,18 @@ Styleguide Components.Button
49
50
  pointer-events: none;
50
51
  }
51
52
 
52
- .c-button:active:not(:disabled) {
53
- transform: translateY(1px);
54
- }
55
-
56
53
 
57
54
 
58
55
 
59
56
 
60
57
  /* Modifiers */
61
58
 
62
-
63
59
  /* Modifiers: Types */
64
60
 
65
61
  .c-button--primary,
66
- .c-button--secondary {
62
+ .c-button--secondary,
63
+ .c-button--tertiary,
64
+ .c-button--is-active {
67
65
  padding: 6px 18px;
68
66
  min-width: var(--min-width);
69
67
  max-width: var(--max-width);
@@ -77,7 +75,7 @@ Styleguide Components.Button
77
75
  border-color: var(--global-color-accent--dark);
78
76
  }
79
77
 
80
- .c-button--primary:active {
78
+ .c-button--primary:active:not(.c-button--is-busy) {
81
79
  color: var(--global-color-primary--xx-light);
82
80
  background-color: var(--global-color-accent--x-dark);
83
81
  border-color: var(--global-color-accent--dark);
@@ -111,12 +109,50 @@ Styleguide Components.Button
111
109
  /* Modifiers: Types: Secondary */
112
110
 
113
111
  .c-button--secondary:hover {
112
+ color: var(--global-color-primary--xx-dark);
113
+ background-color: var(--global-color-accent--weak);
114
+ border-color: var(--global-color-accent--normal);
115
+ }
116
+
117
+ .c-button--secondary:active:not(.c-button--is-busy) {
118
+ color: var(--global-color-primary--xx-dark);
119
+ background-color: var(--global-color-accent--x-light);
120
+ border-color: var(--global-color-accent--dark);
121
+
122
+ border-width: var(--global-border-width--normal);
123
+ outline: var(--global-border-width--normal) solid
124
+ var(--global-color-accent--dark);
125
+ }
126
+
127
+ .c-button--secondary:focus:not(:active) {
128
+ color: var(--global-color-primary--xx-dark);
129
+ background-color: var(--global-color-accent--weak);
130
+ border-color: var(--global-color-primary--xx-dark);
131
+
132
+ outline: var(--global-border-width--thick) solid
133
+ var(--global-color-accent--light);
134
+ }
135
+
136
+ .c-button--secondary.c-button--is-busy,
137
+ .c-button--secondary:not(.c-button:hover, .c-button:focus, .c-button:active, .c-button:disabled) {
138
+ color: var(--global-color-primary--xx-dark);
139
+ background-color: var(--global-color-primary--x-light);
140
+ border-color: var(--global-color-primary--xx-dark);
141
+ }
142
+
143
+ .c-button/* for specificity to override */.c-button--secondary:disabled {
144
+ background-color: var(--global-color-primary--x-light);
145
+ }
146
+
147
+ /* Modifiers: Types: Tertiary */
148
+
149
+ .c-button--tertiary:hover {
114
150
  color: var(--global-color-primary--xx-dark);
115
151
  background-color: var(--global-color-primary--light);
116
152
  border-color: var(--global-color-accent--dark);
117
153
  }
118
154
 
119
- .c-button--secondary:active {
155
+ .c-button--tertiary:active:not(.c-button--is-busy) {
120
156
  color: var(--global-color-primary--xx-dark);
121
157
  background-color: var(--global-color-accent--x-light);
122
158
  border-color: var(--global-color-accent--dark);
@@ -126,7 +162,7 @@ Styleguide Components.Button
126
162
  var(--global-color-accent--dark);
127
163
  }
128
164
 
129
- .c-button--secondary:focus:not(:active) {
165
+ .c-button--tertiary:focus:not(:active) {
130
166
  color: var(--global-color-primary--xx-dark);
131
167
  background-color: var(--global-color-primary--light);
132
168
  border-color: var(--global-color-primary--xx-dark);
@@ -135,8 +171,8 @@ Styleguide Components.Button
135
171
  var(--global-color-accent--light);
136
172
  }
137
173
 
138
- .c-button--secondary.c-button--is-busy,
139
- .c-button--secondary:not(
174
+ .c-button--tertiary.c-button--is-busy,
175
+ .c-button--tertiary:not(
140
176
  .c-button:hover,
141
177
  .c-button:focus,
142
178
  .c-button:active,
@@ -149,12 +185,41 @@ Styleguide Components.Button
149
185
 
150
186
  /* Modifiers: Types: Is Active */
151
187
 
188
+ .c-button--is-active:hover {
189
+ color: var(--global-color-primary--xx-dark);
190
+ background-color: var(--global-color-accent--alt);
191
+ border-color: var(--global-color-accent--dark);
192
+ }
193
+
194
+ .c-button--is-active:active {
195
+ color: var(--global-color-primary--xx-dark);
196
+ background-color: var(--global-color-accent--x-light);
197
+ border-color: var(--global-color-accent--dark);
198
+
199
+ border-width: var(--global-border-width--normal);
200
+ outline: var(--global-border-width--normal) solid
201
+ var(--global-color-accent--dark);
202
+ }
203
+
204
+ .c-button--is-active:focus:not(:active) {
205
+ color: var(--global-color-primary--xx-dark);
206
+ background-color: var(--global-color-accent--alt);
207
+ border-color: var(--global-color-primary--xx-dark);
208
+
209
+ outline: var(--global-border-width--thick) solid
210
+ var(--global-color-accent--light);
211
+ }
212
+
213
+ .c-button--is-active.c-button--is-busy,
152
214
  .c-button--is-active:not(
153
215
  .c-button:hover,
154
216
  .c-button:focus,
155
- .c-button:active
217
+ .c-button:active,
218
+ .c-button:disabled
156
219
  ) {
220
+ color: var(--global-color-primary--xx-dark);
157
221
  background-color: var(--global-color-accent--x-light);
222
+ border-color: var(--global-color-primary--xx-dark);
158
223
  }
159
224
 
160
225
  /* Modifiers: Types: As Link */
@@ -192,7 +257,7 @@ Styleguide Components.Button
192
257
  }
193
258
  .c-button--size-small {
194
259
  min-width: 0;
195
- padding: 3px 9px;
260
+ padding: 4px 9px;
196
261
  line-height: 1;
197
262
  }
198
263
 
@@ -4,7 +4,7 @@
4
4
  </button>
5
5
 
6
6
  <button class="c-button c-button--primary">
7
- <i class="c-button__icon" data-icon="✓">(check input)</i>
7
+ <i class="c-button__icon--before" data-icon="✓">(check input)</i>
8
8
  <span class="c-button__text">Confirm</span>
9
9
  <i class="c-button__icon--after" data-icon="→">(and exit)</i>
10
10
  </button>
@@ -14,6 +14,12 @@
14
14
  <i class="c-button__icon--after" data-icon="→">(and move to next form)</i>
15
15
  </button>
16
16
 
17
+ <div class="display: flex; gap: 5px">
18
+ <button class="c-button c-button--tertiary">1</button>
19
+ <button class="c-button c-button--tertiary">2</button>
20
+ <button class="c-button c-button--tertiary">3</button>
21
+ </div>
22
+
17
23
  <button class="c-button c-button--is-active">
18
24
  <span class="c-button__text">Current Item</span>
19
25
  </button>