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