pallote-css 0.6.0 → 0.7.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.
Files changed (40) hide show
  1. package/package.json +10 -2
  2. package/pallote-css-0.6.0.tgz +0 -0
  3. package/pallote.min.css +1 -0
  4. package/pallote.min.css.map +1 -0
  5. package/pallote.min.js +1 -0
  6. package/pallote.scss +37 -0
  7. package/styles/common/_editor.scss +181 -0
  8. package/styles/common/_fontface.scss +31 -0
  9. package/styles/common/_functions.scss +11 -0
  10. package/styles/common/_global.scss +157 -0
  11. package/styles/common/_mixins.scss +164 -0
  12. package/styles/common/_reset.scss +145 -0
  13. package/styles/common/_variables.scss +251 -0
  14. package/styles/components/_accordion.scss +132 -0
  15. package/styles/components/_alert.scss +188 -0
  16. package/styles/components/_breadcrumbs.scss +72 -0
  17. package/styles/components/_button.scss +184 -0
  18. package/styles/components/_buttons.scss +52 -0
  19. package/styles/components/_card.scss +316 -0
  20. package/styles/components/_divider.scss +53 -0
  21. package/styles/components/_form.scss +58 -0
  22. package/styles/components/_input.scss +340 -0
  23. package/styles/components/_link.scss +51 -0
  24. package/styles/components/_list.scss +59 -0
  25. package/styles/components/_nav.scss +185 -0
  26. package/styles/components/_navbar.scss +253 -0
  27. package/styles/components/_page.scss +33 -0
  28. package/styles/components/_section.scss +203 -0
  29. package/styles/components/_sidebar.scss +61 -0
  30. package/styles/components/_snippet.scss +85 -0
  31. package/styles/components/_status.scss +60 -0
  32. package/styles/components/_switch.scss +84 -0
  33. package/styles/components/_table.scss +157 -0
  34. package/styles/components/_tabs.scss +147 -0
  35. package/styles/components/_tag.scss +79 -0
  36. package/styles/modules/_cookie.scss +38 -0
  37. package/styles/utilities/_color.scss +119 -0
  38. package/styles/utilities/_global.scss +211 -0
  39. package/styles/utilities/_grid.scss +124 -0
  40. package/styles/utilities/_text.scss +199 -0
@@ -0,0 +1,340 @@
1
+ @use '../common/mixins';
2
+ @use '../common/variables';
3
+ @use '../utilities/text';
4
+
5
+ // —————————————————————————————————————————————————————————————————
6
+ // elements / default
7
+ // elements / select
8
+ // elements / textarea
9
+ // elements / checkbox & radio
10
+ // error
11
+ // disabled
12
+ // optional
13
+ // dense
14
+ // icon
15
+ // —————————————————————————————————————————————————————————————————
16
+
17
+ // —————————————————————————————————————————————————————————————————
18
+ // elements / default
19
+ // —————————————————————————————————————————————————————————————————
20
+
21
+ .input {
22
+ display: flex;
23
+ flex-direction: column;
24
+ text-align: left;
25
+ position: relative;
26
+ width: 100%;
27
+ max-width: variables.$max-width-form;
28
+
29
+ & + & {
30
+ margin-top: 1rem;
31
+ }
32
+
33
+ &_label,
34
+ &_hint,
35
+ &_error {
36
+ display: block;
37
+ }
38
+
39
+ &_hint,
40
+ &_error {
41
+ font-size: variables.$caption-size;
42
+ margin-top: -.125rem;
43
+ margin-bottom: .5rem;
44
+ }
45
+
46
+ &_label {
47
+ @include mixins.transition(variables.$transition-md, color);
48
+ font-weight: variables.$font-bold;
49
+ text-overflow: ellipsis;
50
+ overflow: hidden;
51
+ white-space: nowrap;
52
+ position: relative;
53
+ margin-bottom: .25rem;
54
+ }
55
+
56
+ &_error {
57
+ font-weight: variables.$font-bold;
58
+ color: variables.$error;
59
+ border-left: .25rem solid variables.$error;
60
+ padding-left: .5rem;
61
+ }
62
+
63
+ &_control {
64
+ @include mixins.transition(variables.$transition-md, border-color);
65
+ font-size: 1rem;
66
+ font-family: variables.$font, variables.$font-fallback;
67
+ width: 100%;
68
+ border-radius: variables.$border-radius-md !important;
69
+ padding: .325rem .5rem;
70
+ background-color: variables.$input-background;
71
+ border: variables.$border;
72
+
73
+ @include mixins.responsive(down, mobile) {
74
+ background-color: variables.$input-background;
75
+ }
76
+
77
+ &:focus {
78
+ outline: 2px solid variables.$primary;
79
+ }
80
+
81
+ &:not(textarea):not(.checkboxes):not(.radios) {
82
+ display: inline-block;
83
+ align-items: center;
84
+ white-space: nowrap;
85
+ text-overflow: ellipsis;
86
+ line-height: 1.2;
87
+ white-space: nowrap;
88
+ text-overflow: ellipsis;
89
+ }
90
+
91
+ &:not(textarea) {
92
+ height: variables.$input-height;
93
+ }
94
+ }
95
+ }
96
+
97
+ @include mixins.placeholder {
98
+ color: variables.$text-alt;
99
+ opacity: 1;
100
+ }
101
+
102
+ // —————————————————————————————————————————————————————————————————
103
+ // elements / select
104
+ // —————————————————————————————————————————————————————————————————
105
+
106
+ .select {
107
+
108
+ &:after {
109
+ content: '';
110
+ border: solid variables.$text;
111
+ border-width: 0 .125rem .125rem 0;
112
+ padding: .2rem;
113
+ transform: rotate(45deg);
114
+ position: absolute;
115
+ bottom: variables.$input-height*.45;
116
+ right: 1rem;
117
+ }
118
+
119
+ .input_control {
120
+ display: flex;
121
+ align-items: center;
122
+ padding-right: 2rem;
123
+ }
124
+ }
125
+
126
+ // —————————————————————————————————————————————————————————————————
127
+ // elements / textarea
128
+ // —————————————————————————————————————————————————————————————————
129
+
130
+ textarea {
131
+ resize: vertical;
132
+ }
133
+
134
+ // —————————————————————————————————————————————————————————————————
135
+ // elements / checkbox & radio
136
+ // —————————————————————————————————————————————————————————————————
137
+
138
+ .checkboxes,
139
+ .radios {
140
+ display: flex;
141
+ background-color: transparent;
142
+ border: 0;
143
+ padding-right: 0;
144
+ padding-left: 0;
145
+
146
+ &:not(&-landscape) {
147
+ flex-direction: column;
148
+ align-items: flex-start !important;
149
+ height: auto !important;
150
+
151
+ .checkbox + .checkbox,
152
+ .radio + .radio {
153
+ margin-top: 0.75rem;
154
+ margin-left: 0;
155
+ }
156
+ }
157
+
158
+ &-landscape {
159
+
160
+ .checkbox + .checkbox,
161
+ .radio + .radio {
162
+ margin-left: 1rem;
163
+ }
164
+ }
165
+ }
166
+
167
+ .checkbox,
168
+ .radio {
169
+ display: flex;
170
+ align-items: center;
171
+ }
172
+
173
+ input[type="checkbox"],
174
+ input[type='radio'] {
175
+ display: flex;
176
+ align-items: center;
177
+ justify-content: center;
178
+ height: variables.$checkbox-width;
179
+ width: variables.$checkbox-width;
180
+ background-color: variables.$input-background;
181
+ border: variables.$border;
182
+ margin-right: .5rem;
183
+ color: variables.$primary;
184
+ }
185
+
186
+ input[type='checkbox'] { border-radius: variables.$border-radius-sm; }
187
+ input[type='radio'] { border-radius: 50%; }
188
+
189
+ input[type='checkbox']:checked {
190
+ background-color: variables.$primary;
191
+
192
+ &:after {
193
+ content: "✔";
194
+ font-size: 1rem;
195
+ color: variables.$text-contrast;
196
+ }
197
+ }
198
+
199
+ input[type='radio']:checked {
200
+
201
+ &:after {
202
+ content: "";
203
+ height: variables.$checkbox-width*.5;
204
+ width: variables.$checkbox-width*.5;
205
+ background-color: variables.$primary;
206
+ border-radius: 50%;
207
+ }
208
+ }
209
+
210
+ // —————————————————————————————————————————————————————————————————
211
+ // error
212
+ // —————————————————————————————————————————————————————————————————
213
+
214
+ .input.js-error {
215
+
216
+ .input {
217
+
218
+ &_label { color: variables.$error; }
219
+
220
+ &_control {
221
+ border: 1px solid variables.$error;
222
+
223
+ &.checkboxes,
224
+ &.radios {
225
+ border: 0;
226
+ }
227
+ }
228
+ }
229
+ }
230
+
231
+ // —————————————————————————————————————————————————————————————————
232
+ // disabled
233
+ // —————————————————————————————————————————————————————————————————
234
+
235
+ .input-disabled,
236
+ .input:disabled {
237
+ opacity: 0.5;
238
+
239
+ .input {
240
+
241
+ &_label,
242
+ &_control {
243
+ cursor: not-allowed;
244
+ }
245
+ }
246
+
247
+ &.select:after {
248
+ opacity: 0.5;
249
+ }
250
+
251
+ .checkbox,
252
+ .radio {
253
+
254
+ &_control,
255
+ &_label {
256
+ pointer-events: none;
257
+ }
258
+ }
259
+ }
260
+
261
+ .checkbox-disabled,
262
+ .radio-disabled {
263
+ cursor: not-allowed;
264
+ opacity: 0.5;
265
+
266
+ > * {
267
+ pointer-events: none;
268
+ }
269
+ }
270
+
271
+ // —————————————————————————————————————————————————————————————————
272
+ // optional
273
+ // —————————————————————————————————————————————————————————————————
274
+
275
+ .input-optional {
276
+
277
+ .input_label:after {
278
+ content: " (optional)";
279
+ }
280
+ }
281
+
282
+ // —————————————————————————————————————————————————————————————————
283
+ // dense
284
+ // —————————————————————————————————————————————————————————————————
285
+
286
+ .input-dense {
287
+
288
+ .input_control:not(textarea) {
289
+ height: 2rem;
290
+ }
291
+
292
+ &.select {
293
+
294
+ &:after {
295
+ bottom: 0.9rem;
296
+ right: 0.75rem;
297
+ }
298
+
299
+ .input_control {
300
+ padding-right: 1.5rem;
301
+ }
302
+ }
303
+ }
304
+
305
+ // —————————————————————————————————————————————————————————————————
306
+ // icon
307
+ // —————————————————————————————————————————————————————————————————
308
+
309
+ .input-withIcon {
310
+
311
+ .input_control {
312
+ padding-right: variables.$input-height*1.25;
313
+ }
314
+ }
315
+
316
+ // remove right padding to allow native input trigger
317
+ input[type="date"],
318
+ input[type="time"],
319
+ input[type="number"] {
320
+ appearance: initial;
321
+ padding-right: 0;
322
+ }
323
+
324
+ .input_icon {
325
+ display: flex;
326
+ align-items: center;
327
+ justify-content: center;
328
+ position: absolute;
329
+ bottom: 0;
330
+ right: 0;
331
+ width: variables.$input-height;
332
+ height: variables.$input-height;
333
+ pointer-events: none;
334
+ border-left: variables.$border;
335
+
336
+ svg {
337
+ width: 50%;
338
+ height: 50%;
339
+ }
340
+ }
@@ -0,0 +1,51 @@
1
+ @use '../common/mixins';
2
+ @use '../common/variables';
3
+
4
+ // —————————————————————————————————————————————————————————————————
5
+ // elements
6
+ // color
7
+ // —————————————————————————————————————————————————————————————————
8
+
9
+ // —————————————————————————————————————————————————————————————————
10
+ // elements
11
+ // —————————————————————————————————————————————————————————————————
12
+
13
+ .link {
14
+ display: inline-flex;
15
+ align-items: center;
16
+ font-weight: variables.$font-regular;
17
+ border-radius: variables.$border-radius-sm;
18
+ text-decoration: underline;
19
+ text-underline-offset: .15em;
20
+ white-space: nowrap;
21
+
22
+ &_icon {
23
+ display: flex;
24
+ margin-top: 0.1em;
25
+ margin-left: 0.25em;
26
+
27
+ svg {
28
+ height: 1em;
29
+ width: 1em;
30
+ }
31
+ }
32
+ }
33
+
34
+ // —————————————————————————————————————————————————————————————————
35
+ // color
36
+ // —————————————————————————————————————————————————————————————————
37
+
38
+ // change the link colour using text utililty classes
39
+
40
+ .link {
41
+ color: variables.$primary;
42
+ text-decoration: underline currentColor;
43
+
44
+ &:hover {
45
+ text-decoration: underline 3px;
46
+ }
47
+
48
+ &.text-inherit {
49
+ color: inherit;
50
+ }
51
+ }
@@ -0,0 +1,59 @@
1
+ @use '../utilities/text';
2
+
3
+ // —————————————————————————————————————————————————————————————————
4
+ // elements
5
+ // dense
6
+ // list item - bold
7
+ // —————————————————————————————————————————————————————————————————
8
+
9
+ // —————————————————————————————————————————————————————————————————
10
+ // elements
11
+ // —————————————————————————————————————————————————————————————————
12
+
13
+ .list {
14
+ display: flex;
15
+ flex-direction: column;
16
+ align-items: flex-start; // so that children don't take 100% width (for focus style)
17
+
18
+ &_item {
19
+ display: flex;
20
+ align-items: center;
21
+
22
+ & + & {
23
+ margin-top: .5rem;
24
+ }
25
+
26
+ &Icon {
27
+ display: flex;
28
+ height: 1em;
29
+ width: 1em;
30
+ margin-right: .5em;
31
+ }
32
+ }
33
+ }
34
+
35
+ // —————————————————————————————————————————————————————————————————
36
+ // dense
37
+ // —————————————————————————————————————————————————————————————————
38
+
39
+ .list-dense .list_item,
40
+ .list_item-dense {
41
+ @extend %caption;
42
+
43
+ + .list_item {
44
+ margin-top: .25rem;
45
+ }
46
+ }
47
+
48
+ // —————————————————————————————————————————————————————————————————
49
+ // list item - bold
50
+ // —————————————————————————————————————————————————————————————————
51
+
52
+ .list_item-bold {
53
+ @extend %text-bold;
54
+
55
+ .list_itemIcon * {
56
+ stroke: currentColor;
57
+ stroke-width: 0.5rem;
58
+ }
59
+ }
@@ -0,0 +1,185 @@
1
+ @use '../common/mixins';
2
+ @use '../common/variables';
3
+ @use '../utilities/text';
4
+
5
+ // —————————————————————————————————————————————————————————————————
6
+ // elements
7
+ // active
8
+ // show
9
+ // direction
10
+ // dense
11
+ // —————————————————————————————————————————————————————————————————
12
+
13
+ // —————————————————————————————————————————————————————————————————
14
+ // elements
15
+ // —————————————————————————————————————————————————————————————————
16
+
17
+ .nav_trigger,
18
+ a.nav_trigger {
19
+ outline-offset: -2px;
20
+
21
+ &:focus {
22
+ outline: 2px solid variables.$primary;
23
+ }
24
+ }
25
+
26
+ .nav {
27
+ width: fit-content;
28
+
29
+ &_container {
30
+ display: flex;
31
+ gap: calc(variables.$nav-item/4);
32
+ }
33
+
34
+ &_item,
35
+ &_trigger {
36
+ border-radius: variables.$border-radius-sm;
37
+ }
38
+
39
+ &_item {
40
+ margin: 0;
41
+ position: relative;
42
+
43
+ &:not(:first-child) {
44
+ padding-top: 0;
45
+ }
46
+
47
+ &-dropdown {
48
+ display: flex;
49
+ flex-direction: column;
50
+ }
51
+ }
52
+
53
+ &_trigger {
54
+ @extend %caption;
55
+ font-weight: variables.$button-weight;
56
+ text-transform: variables.$button-transform;
57
+ white-space: nowrap;
58
+ cursor: pointer;
59
+ height: variables.$nav-item*2;
60
+ padding-right: variables.$nav-item*.75;
61
+ padding-left: variables.$nav-item*.75;
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: space-between;
65
+ text-underline-offset: .15em;
66
+
67
+ &:not(.nav_trigger-active):hover {
68
+ background-color: variables.$hover;
69
+ }
70
+
71
+ .nav_item-dropdown > & {
72
+
73
+ &:after {
74
+ content: '';
75
+ border: solid variables.$text;
76
+ border-width: 0 .125rem .125rem 0;
77
+ padding: .125rem;
78
+ transform: rotate(45deg);
79
+ margin-left: variables.$nav-item*0.5;
80
+ }
81
+ }
82
+ }
83
+
84
+ &_icon {
85
+ display: flex;
86
+ width: 1rem;
87
+ height: 1rem;
88
+ align-items: center;
89
+ justify-content: center;
90
+ margin-right: 0.25rem;
91
+ margin-left: -0.25rem;
92
+ }
93
+
94
+ &_target {
95
+ display: none;
96
+ flex-direction: column;
97
+ padding: variables.$nav-item*0.25 variables.$nav-item*0.5 variables.$nav-item*0.5 variables.$nav-item*0.5;
98
+ gap: .25rem;
99
+
100
+ .nav_trigger {
101
+ padding-right: variables.$nav-item*0.5;
102
+ padding-left: variables.$nav-item*0.5;
103
+ border-radius: variables.$border-radius-sm;
104
+ }
105
+ }
106
+ }
107
+
108
+ // —————————————————————————————————————————————————————————————————
109
+ // active
110
+ // —————————————————————————————————————————————————————————————————
111
+
112
+ .nav_trigger-active {
113
+ color: variables.$primary;
114
+ background-color: variables.$hover;
115
+
116
+ .nav_item-dropdown &:after {
117
+ border-color: variables.$primary;
118
+ }
119
+ }
120
+
121
+ // —————————————————————————————————————————————————————————————————
122
+ // show
123
+ // —————————————————————————————————————————————————————————————————
124
+
125
+ .nav_item-dropdown.js-show {
126
+ height: auto;
127
+ background-color: variables.$hover;
128
+
129
+ > .nav {
130
+
131
+ &_trigger-active,
132
+ &_trigger:hover {
133
+ background-color: transparent;
134
+ }
135
+
136
+ &_target {
137
+ display: flex;
138
+ }
139
+ }
140
+ }
141
+
142
+ // —————————————————————————————————————————————————————————————————
143
+ // direction
144
+ // —————————————————————————————————————————————————————————————————
145
+
146
+ .nav-portrait {
147
+ width: 100%;
148
+
149
+ .nav_container{
150
+ flex-direction: column;
151
+ }
152
+ }
153
+
154
+ // —————————————————————————————————————————————————————————————————
155
+ // dense
156
+ // —————————————————————————————————————————————————————————————————
157
+
158
+ .nav-dense {
159
+
160
+ .nav {
161
+
162
+ &_item,
163
+ &_trigger {
164
+ border-radius: variables.$border-radius-sm;
165
+ }
166
+
167
+ &_trigger {
168
+ padding-right: variables.$nav-item*0.5;
169
+ padding-left: variables.$nav-item*0.5;
170
+ height: variables.$nav-item*1.5;
171
+ }
172
+
173
+ &_item-dropdown {
174
+
175
+ .nav_target {
176
+ padding: 0 variables.$nav-item*0.25 variables.$nav-item*0.25 variables.$nav-item*0.25;
177
+
178
+ .nav_trigger {
179
+ padding-right: variables.$nav-item*0.25;
180
+ padding-left: variables.$nav-item*0.25;
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }