pallote-css 0.0.0 → 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.
Files changed (54) hide show
  1. package/README.md +100 -43
  2. package/dist/pallote.min.css +1 -0
  3. package/dist/pallote.min.css.map +1 -0
  4. package/dist/pallote.min.js +1 -0
  5. package/dist/pallote.scss +38 -0
  6. package/dist/scripts/accordion.js +42 -0
  7. package/dist/scripts/button.js +5 -0
  8. package/dist/scripts/cookie.js +15 -0
  9. package/dist/scripts/input.js +24 -0
  10. package/dist/scripts/nav.js +22 -0
  11. package/dist/scripts/navbar.js +28 -0
  12. package/dist/scripts/tabs.js +30 -0
  13. package/{assets/_sass → dist/styles}/common/_editor.scss +13 -2
  14. package/{assets/_sass → dist/styles}/common/_global.scss +28 -7
  15. package/{assets/_sass → dist/styles}/common/_mixins.scss +1 -1
  16. package/{assets/_sass → dist/styles}/common/_variables.scss +41 -29
  17. package/dist/styles/components/_accordion.scss +130 -0
  18. package/{assets/_sass → dist/styles}/components/_alert.scss +20 -16
  19. package/dist/styles/components/_breadcrumbs.scss +47 -0
  20. package/{assets/_sass → dist/styles}/components/_button.scss +3 -98
  21. package/{assets/_sass → dist/styles}/components/_card.scss +20 -8
  22. package/{assets/_sass/components/_nav.scss → dist/styles/components/_detail.scss} +18 -51
  23. package/dist/styles/components/_divider.scss +51 -0
  24. package/{assets/_sass → dist/styles}/components/_input.scss +2 -3
  25. package/dist/styles/components/_nav.scss +259 -0
  26. package/dist/styles/components/_navbar.scss +189 -0
  27. package/{assets/_sass → dist/styles}/components/_section.scss +86 -21
  28. package/dist/styles/components/_sidebar.scss +57 -0
  29. package/dist/styles/components/_snippet.scss +82 -0
  30. package/dist/styles/components/_status.scss +58 -0
  31. package/dist/styles/components/_switch.scss +72 -0
  32. package/dist/styles/components/_tabs.scss +115 -0
  33. package/{assets/_sass → dist/styles}/components/_tag.scss +3 -3
  34. package/{assets/_sass → dist/styles}/modules/_cookie.scss +7 -1
  35. package/{assets/_sass → dist/styles}/utilities/_color.scss +6 -6
  36. package/{assets/_sass → dist/styles}/utilities/_global.scss +1 -0
  37. package/package.json +13 -5
  38. package/_site/LICENSE +0 -21
  39. package/_site/README.md +0 -88
  40. package/_site/package.json +0 -28
  41. package/assets/_sass/.DS_Store +0 -0
  42. package/assets/_sass/components/_navbar.scss +0 -207
  43. package/assets/_sass/components/_sidebar.scss +0 -27
  44. package/assets/_sass/plugins/_highlighter-theme.scss +0 -68
  45. /package/{assets/_sass → dist/styles}/common/_fontface.scss +0 -0
  46. /package/{assets/_sass → dist/styles}/common/_reset.scss +0 -0
  47. /package/{assets/_sass → dist/styles}/components/_buttons.scss +0 -0
  48. /package/{assets/_sass → dist/styles}/components/_form.scss +0 -0
  49. /package/{assets/_sass → dist/styles}/components/_grid.scss +0 -0
  50. /package/{assets/_sass → dist/styles}/components/_link.scss +0 -0
  51. /package/{assets/_sass → dist/styles}/components/_list.scss +0 -0
  52. /package/{assets/_sass → dist/styles}/components/_page.scss +0 -0
  53. /package/{assets/_sass → dist/styles}/components/_text.scss +0 -0
  54. /package/{assets/_sass → dist/styles}/utilities/_text.scss +0 -0
@@ -15,15 +15,15 @@ $spacing-alert: $spacing-sm;
15
15
 
16
16
  .alert {
17
17
  border-radius: $spacing-sm;
18
- background-color: $info-light;
19
- color: $info-text;
18
+ background-color: $info-background;
19
+ color: $text;
20
20
  padding: $spacing-alert;
21
21
  position: fixed;
22
22
  top: $spacing-md;
23
23
  right: $spacing-md;
24
+ width: 100%;
24
25
  max-width: $spacing-xxl*3;
25
- min-width: $spacing-xxl*2;
26
- z-index: 200;
26
+ z-index: 20;
27
27
 
28
28
  &:not(.alert--bar) {
29
29
  padding-left: $spacing-lg + $spacing-sm;
@@ -51,7 +51,7 @@ $spacing-alert: $spacing-sm;
51
51
  }
52
52
 
53
53
  &__title {
54
- font-weight: $font-bold;
54
+ font-weight: $font-bold !important;
55
55
  }
56
56
 
57
57
  &__subtitle {
@@ -82,21 +82,22 @@ $spacing-alert: $spacing-sm;
82
82
  // color
83
83
  // —————————————————————————————————————————————————————————————————
84
84
 
85
- @mixin color($color, $color-light: $info-light, $color-text: $info-text) {
86
- @if $color == success { $color-light: $success-light; $color-text: $success-text; }
87
- @else if $color == info { $color-light: $info-light; $color-text: $info-text; }
88
- @else if $color == warning { $color-light: $warning-light; $color-text: $warning-text; }
89
- @else if $color == error { $color-light: $error-light; $color-text: $error-text; }
85
+ @mixin color($color, $background-color: $info-background, $border-color: $info) {
86
+ @if $color == success { $background-color: $success-background; $border-color: $success; }
87
+ @else if $color == info { $background-color: $info-background; $border-color: $info; }
88
+ @else if $color == warning { $background-color: $warning-background; $border-color: $warning; }
89
+ @else if $color == error { $background-color: $error-background; $border-color: $error; }
90
90
 
91
- background-color: $color-light;
92
- color: $color-text;
91
+ background-color: $background-color;
92
+ border: 1px solid $border-color;
93
+ color: $text;
93
94
 
94
95
  &:not(.alert--bar):before {
95
96
 
96
- @if $color == success { content: url('../icons/phosphor/check-circle.svg'); }
97
- @else if $color == info { content: url('../icons/phosphor/info.svg'); }
98
- @else if $color == warning { content: url('../icons/phosphor/warning.svg'); }
99
- @else if $color == error { content: url('../icons/phosphor/x-circle.svg'); }
97
+ @if $color == success { content: url($icons-path + '/phosphor/check-circle.svg'); }
98
+ @else if $color == info { content: url($icons-path + '/phosphor/info.svg'); }
99
+ @else if $color == warning { content: url($icons-path + '/phosphor/warning.svg'); }
100
+ @else if $color == error { content: url($icons-path + '/phosphor/x-circle.svg'); }
100
101
  }
101
102
  }
102
103
 
@@ -117,6 +118,7 @@ $spacing-alert: $spacing-sm;
117
118
  &--notice {
118
119
  position: relative;
119
120
  max-width: none;
121
+ z-index: 1;
120
122
  }
121
123
  }
122
124
 
@@ -135,6 +137,8 @@ $spacing-alert: $spacing-sm;
135
137
  width: 100%; // needed for small devices to not overflow the container
136
138
  z-index: 1;
137
139
  border-radius: 0;
140
+ border-left: 0;
141
+ border-right: 0;
138
142
  text-align: center;
139
143
  }
140
144
  }
@@ -0,0 +1,47 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // elements
3
+ // separator
4
+ // —————————————————————————————————————————————————————————————————
5
+
6
+ // —————————————————————————————————————————————————————————————————
7
+ // elements
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ .breadcrumbs {
11
+ display: inline-flex;
12
+ align-items: baseline;
13
+
14
+ @include responsive(down, tablet) {
15
+ flex-direction: column;
16
+ }
17
+
18
+ &__item {
19
+ cursor: pointer;
20
+
21
+ &:not(:first-child) {
22
+ margin-left: $spacing-xs;
23
+
24
+ &:before {
25
+ content: "/";
26
+ margin-right: $spacing-xs;
27
+ color: $text-alt;
28
+ display: inline-block; // required to remove underline on hover for before element
29
+ }
30
+ }
31
+
32
+ @include hover {
33
+ text-decoration: underline;
34
+ }
35
+ }
36
+ }
37
+
38
+ // —————————————————————————————————————————————————————————————————
39
+ // separator
40
+ // —————————————————————————————————————————————————————————————————
41
+
42
+ .breadcrumbs--arrow .breadcrumbs__item:not(:first-child):before {
43
+ content: "\2039";
44
+ transform: rotate(180deg);
45
+ font-size: 1.5em;
46
+ float: left;
47
+ }
@@ -134,9 +134,9 @@
134
134
  }
135
135
 
136
136
  @include color('button',
137
- '' $primary $primary-text,
138
- '--secondary' $secondary $secondary-text,
139
- '--highlight' $highlight $highlight-text,
137
+ '' $primary $primary-contrast,
138
+ '--secondary' $secondary $secondary-contrast,
139
+ '--highlight' $highlight $highlight-contrast,
140
140
  '--default' $background-default $primary,
141
141
  '--grey' $text-disabled $text,
142
142
  '--success' $success $success-contrast,
@@ -160,98 +160,3 @@ button {
160
160
  outline: none;
161
161
  }
162
162
  }
163
-
164
- // —————————————————————————————————————————————————————————————————
165
- // menu
166
- // —————————————————————————————————————————————————————————————————
167
-
168
- // button apparition
169
- @include keyframes(button-menu-opacity) {
170
- 0% { opacity: 0; }
171
- 50% { opacity: 0; }
172
- 100% { opacity: 100%; }
173
- }
174
-
175
- // lines > close
176
- @include keyframes(button-menu-open-before) {
177
- 0% { transform: translateY($spacing-xs*1.5); }
178
- 50% { transform: translateY(0);
179
- transform: rotate(0); }
180
- 100% { transform: rotate(45deg); }
181
- }
182
- @include keyframes(button-menu-open-after) {
183
- 0% { transform: translateY(-$spacing-xs*1.5); }
184
- 50% { transform: translateY(0);
185
- transform: rotate(0); }
186
- 100% { transform: rotate(-45deg); }
187
- }
188
-
189
- // close > lines
190
- @include keyframes(button-menu-close-before) {
191
- 0% { transform: rotate(45deg); }
192
- 50% { transform: rotate(0);
193
- transform: translateY(0); }
194
- 100% { transform: translateY($spacing-xs*1.5); }
195
- }
196
- @include keyframes(button-menu-close-after) {
197
- 0% { transform: rotate(-45deg); }
198
- 50% { transform: rotate(0);
199
- transform: translateY(0); }
200
- 100% { transform: translateY(-$spacing-xs*1.5); }
201
- }
202
-
203
- .button--menu {
204
- display: flex;
205
- align-items: center;
206
- justify-content: center;
207
- animation: button-menu-opacity $transition-lg;
208
- cursor: pointer;
209
- position: relative;
210
- overflow: visible;
211
- width: $spacing-md;
212
- height: $spacing-md;
213
- background-color: transparent !important;
214
- border: 0;
215
- padding: 0;
216
-
217
- &:before,
218
- &:after,
219
- .button__inner {
220
- background-color: $text;
221
- }
222
-
223
- &:before,
224
- &:after {
225
- @include pseudo-element('', auto, auto, auto, auto, $spacing-md, 2px);
226
- @include transition($transition-md, transform);
227
- border-radius: 0.15rem;
228
- }
229
-
230
- &:before {
231
- transform: translateY($spacing-xs*1.5);
232
- animation: button-menu-close-before $transition-lg;
233
- }
234
-
235
- &:after {
236
- transform: translateY(-$spacing-xs*1.5);
237
- animation: button-menu-close-after $transition-lg;
238
- }
239
-
240
- .button__inner {
241
- @include transition($transition-md, opacity);
242
- border-radius: 0.15rem;
243
- width: $spacing-md;
244
- height: 2px;
245
- position: absolute;
246
- }
247
-
248
- &.button--menu--open {
249
-
250
- &:before { animation: button-menu-open-before $transition-lg forwards; }
251
- &:after { animation: button-menu-open-after $transition-lg forwards; }
252
-
253
- .button__inner {
254
- opacity: 0;
255
- }
256
- }
257
- }
@@ -31,24 +31,26 @@
31
31
  background-position: center center;
32
32
  width: 100%;
33
33
  height: 100%;
34
- background-color: $backdrop;
34
+ background-color: $overlay;
35
35
  overflow: hidden;
36
36
  padding-bottom: 50%;
37
37
 
38
38
  .card--transparent & {
39
- background-color: $backdrop-contrast;
39
+ background-color: $overlay-contrast;
40
40
  }
41
41
  }
42
42
  }
43
43
 
44
+ &__label,
44
45
  &__title {
45
- @extend %h6;
46
46
  @extend %text--bold;
47
+ }
48
+
49
+ &__title {
47
50
  line-height: 1.25;
48
51
  }
49
52
 
50
53
  &__subtitle {
51
- @extend %subtitle;
52
54
  @extend %text--regular;
53
55
  }
54
56
 
@@ -139,9 +141,18 @@
139
141
 
140
142
  .card {
141
143
 
144
+ &__label {
145
+ @if $value == xs { @extend %overline; }
146
+ @else if $value == sm { @extend %overline; }
147
+ @else if $value == md { @extend %overline; }
148
+ @else if $value == lg { @extend %caption; }
149
+ @else if $value == xl { @extend %body; }
150
+ }
151
+
142
152
  &__title {
143
153
  @if $value == xs { @extend %body; }
144
154
  @else if $value == sm { @extend %subtitle; }
155
+ @else if $value == md { @extend %h6; }
145
156
  @else if $value == lg { @extend %h5; }
146
157
  @else if $value == xl { @extend %h4; }
147
158
  }
@@ -149,6 +160,7 @@
149
160
  &__subtitle {
150
161
  @if $value == xs { @extend %caption; }
151
162
  @else if $value == sm { @extend %body; }
163
+ @else if $value == md { @extend %subtitle; }
152
164
  @else if $value == lg { @extend %h6; }
153
165
  @else if $value == xl { @extend %h5; }
154
166
  margin-top: calc($size / 3);
@@ -214,10 +226,10 @@
214
226
 
215
227
  .card {
216
228
  @include size(md, $spacing-md+$spacing-sm);
217
- &--xs { @include size(xs, $spacing-sm+$spacing-xs); }
218
- &--sm { @include size(sm, $spacing-md); }
219
- &--lg { @include size(lg, $spacing-lg); }
220
- &--xl { @include size(xl, $spacing-lg+$spacing-sm); }
229
+ &--xs.card { @include size(xs, $spacing-sm+$spacing-xs); }
230
+ &--sm.card { @include size(sm, $spacing-md); }
231
+ &--lg.card { @include size(lg, $spacing-lg); }
232
+ &--xl.card { @include size(xl, $spacing-lg+$spacing-sm); }
221
233
  }
222
234
 
223
235
  // —————————————————————————————————————————————————————————————————
@@ -1,5 +1,6 @@
1
1
  // —————————————————————————————————————————————————————————————————
2
2
  // elements
3
+ // bold
3
4
  // dense
4
5
  // —————————————————————————————————————————————————————————————————
5
6
 
@@ -7,66 +8,32 @@
7
8
  // elements
8
9
  // —————————————————————————————————————————————————————————————————
9
10
 
10
- .nav {
11
+ .detail {
11
12
  display: flex;
13
+ align-items: center;
12
14
 
13
- // override ul & li styling
14
- ul { list-style: none; }
15
-
16
- li { margin-left: 0; }
17
- li + li { padding-top: 0; }
18
-
19
- &__group {
20
- display: flex;
21
-
22
- & + & {
23
- margin-top: $spacing-md;
24
- }
25
- }
26
-
27
- &__title {
28
- @extend %overline;
29
- color: $text-alt;
30
- font-weight: $font-bold;
31
- margin-bottom: $spacing-xs;
32
- }
33
-
34
- &__item {
35
- cursor: pointer;
36
- font-weight: $font-bold;
37
- position: relative;
38
- display: inline-flex;
15
+ & + & {
16
+ margin-top: $spacing-sm;
39
17
  }
40
18
 
41
- &__trigger {
42
- @extend %caption;
43
- font-weight: $font-bold;
44
- padding: $spacing-sm $spacing-md;
45
- border-radius: $border-radius-sm;
46
-
47
- @include hover { background-color: $hover; }
48
-
49
- &--active {
50
- color: $primary;
51
- background-color: $hover;
52
- }
19
+ &__icon {
20
+ display: flex;
21
+ align-items: center;
22
+ width: 1em;
23
+ height: 1em;
24
+ margin-right: $spacing-sm;
53
25
  }
54
26
  }
55
27
 
56
28
  // —————————————————————————————————————————————————————————————————
57
- // dense
29
+ // bold
58
30
  // —————————————————————————————————————————————————————————————————
59
31
 
60
- .nav--dense {
32
+ .detail--bold {
33
+ @extend %text--bold;
61
34
 
62
- .nav {
63
-
64
- &__item + .nav__item {
65
- margin-top: $spacing-xxs;
66
- }
67
-
68
- &__trigger {
69
- padding: $spacing-xs $spacing-sm;
70
- }
35
+ .detail__icon,
36
+ .detail__icon * {
37
+ stroke-width: 24;
71
38
  }
72
- }
39
+ }
@@ -0,0 +1,51 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // elements
3
+ // direction
4
+ // size
5
+ // —————————————————————————————————————————————————————————————————
6
+
7
+ // —————————————————————————————————————————————————————————————————
8
+ // elements
9
+ // —————————————————————————————————————————————————————————————————
10
+
11
+ .divider {
12
+ display: inline-block;
13
+ background-color: $border-color;
14
+ height: 1px;
15
+ width: 100%;
16
+ }
17
+
18
+ // —————————————————————————————————————————————————————————————————
19
+ // direction
20
+ // —————————————————————————————————————————————————————————————————
21
+
22
+ .divider {
23
+
24
+ &--portrait {
25
+ height: 100%;
26
+ width: 1px;
27
+ }
28
+ }
29
+
30
+ // —————————————————————————————————————————————————————————————————
31
+ // size
32
+ // —————————————————————————————————————————————————————————————————
33
+
34
+ @mixin size($size) {
35
+ margin-top: $size;
36
+ margin-bottom: $size;
37
+
38
+ &.divider--portrait {
39
+ margin-top: 0;
40
+ margin-right: $size;
41
+ margin-bottom: 0;
42
+ margin-left: $size;
43
+ }
44
+ }
45
+
46
+ .divider {
47
+ @include size($spacing-md);
48
+
49
+ &--sm { @include size($spacing-sm); }
50
+ &--lg { @include size($spacing-lg); }
51
+ }
@@ -28,7 +28,6 @@ $checkbox-width: $spacing-md*1.25;
28
28
  @include transition($transition-md, color);
29
29
  @extend %caption;
30
30
  font-weight: $font-bold;
31
- color: $text-alt;
32
31
  text-overflow: ellipsis;
33
32
  cursor: pointer;
34
33
  display: block;
@@ -45,10 +44,10 @@ $checkbox-width: $spacing-md*1.25;
45
44
  width: 100%;
46
45
  border-radius: $border-radius-md !important;
47
46
  padding: $spacing-xs*1.5 $spacing-sm;
48
- background-color: $background-paper;
47
+ background-color: $hover;
49
48
 
50
49
  @include responsive(down, mobile) {
51
- background-color: $background-paper;
50
+ background-color: $hover;
52
51
  }
53
52
 
54
53
  &:not(textarea) {