pallote-css 0.3.11 → 0.3.12

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