pallote-react 0.2.25

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 (94) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/dist/components/Accordion.js +70 -0
  4. package/dist/components/AccordionItem.js +90 -0
  5. package/dist/components/Alert.js +86 -0
  6. package/dist/components/Breadcrumbs.js +40 -0
  7. package/dist/components/Button.js +74 -0
  8. package/dist/components/Buttons.js +41 -0
  9. package/dist/components/Card.js +74 -0
  10. package/dist/components/CardActions.js +34 -0
  11. package/dist/components/CardContent.js +34 -0
  12. package/dist/components/CardHeader.js +83 -0
  13. package/dist/components/CardMedia.js +48 -0
  14. package/dist/components/Checkbox.js +54 -0
  15. package/dist/components/Checkboxes.js +76 -0
  16. package/dist/components/Chip.js +58 -0
  17. package/dist/components/Component.js +38 -0
  18. package/dist/components/Display.js +48 -0
  19. package/dist/components/Divider.js +39 -0
  20. package/dist/components/Grid.js +73 -0
  21. package/dist/components/Input.js +101 -0
  22. package/dist/components/Layer.js +55 -0
  23. package/dist/components/Link.js +42 -0
  24. package/dist/components/List.js +34 -0
  25. package/dist/components/ListItem.js +47 -0
  26. package/dist/components/Loader.js +45 -0
  27. package/dist/components/Modal.js +75 -0
  28. package/dist/components/ModalActions.js +31 -0
  29. package/dist/components/ModalContent.js +31 -0
  30. package/dist/components/ModalHeader.js +29 -0
  31. package/dist/components/Nav.js +39 -0
  32. package/dist/components/NavBar.js +53 -0
  33. package/dist/components/NavGroup.js +30 -0
  34. package/dist/components/NavItem.js +73 -0
  35. package/dist/components/Page.js +30 -0
  36. package/dist/components/PageHeader.js +57 -0
  37. package/dist/components/Paragraph.js +54 -0
  38. package/dist/components/Radio.js +53 -0
  39. package/dist/components/RadioButtons.js +76 -0
  40. package/dist/components/Section.js +59 -0
  41. package/dist/components/SectionHeader.js +45 -0
  42. package/dist/components/Select.js +80 -0
  43. package/dist/components/Snippet.js +49 -0
  44. package/dist/components/Status.js +42 -0
  45. package/dist/components/Step.js +63 -0
  46. package/dist/components/Stepper.js +81 -0
  47. package/dist/components/Switch.js +56 -0
  48. package/dist/components/Table.js +55 -0
  49. package/dist/components/TableBody.js +30 -0
  50. package/dist/components/TableCell.js +46 -0
  51. package/dist/components/TableFooter.js +89 -0
  52. package/dist/components/TableHead.js +37 -0
  53. package/dist/components/TableRow.js +30 -0
  54. package/dist/components/Tabs.js +30 -0
  55. package/dist/components/TabsContent.js +28 -0
  56. package/dist/components/TabsControl.js +46 -0
  57. package/dist/components/Tag.js +42 -0
  58. package/dist/components/Text.js +63 -0
  59. package/dist/components/Textarea.js +82 -0
  60. package/dist/components/Tooltip.js +52 -0
  61. package/dist/index.js +376 -0
  62. package/dist/styles/common/_global.scss +98 -0
  63. package/dist/styles/common/_mixins.scss +58 -0
  64. package/dist/styles/common/_variables.scss +222 -0
  65. package/dist/styles/components/accordion.scss +181 -0
  66. package/dist/styles/components/button.scss +210 -0
  67. package/dist/styles/components/buttons.scss +56 -0
  68. package/dist/styles/components/card.scss +243 -0
  69. package/dist/styles/components/checkbox.scss +78 -0
  70. package/dist/styles/components/chip.scss +77 -0
  71. package/dist/styles/components/component.scss +17 -0
  72. package/dist/styles/components/detail.scss +36 -0
  73. package/dist/styles/components/divider.scss +54 -0
  74. package/dist/styles/components/form-field.scss +262 -0
  75. package/dist/styles/components/link.scss +36 -0
  76. package/dist/styles/components/loader.scss +131 -0
  77. package/dist/styles/components/modal.scss +112 -0
  78. package/dist/styles/components/nav-group.scss +72 -0
  79. package/dist/styles/components/nav-item.scss +127 -0
  80. package/dist/styles/components/navbar.scss +41 -0
  81. package/dist/styles/components/page.scss +48 -0
  82. package/dist/styles/components/radio.scss +58 -0
  83. package/dist/styles/components/section.scss +169 -0
  84. package/dist/styles/components/snippet.scss +79 -0
  85. package/dist/styles/components/stepper.scss +78 -0
  86. package/dist/styles/components/switch.scss +71 -0
  87. package/dist/styles/components/table.scss +167 -0
  88. package/dist/styles/components/tabs.scss +102 -0
  89. package/dist/styles/components/tag.scss +41 -0
  90. package/dist/styles/components/tooltip.scss +65 -0
  91. package/dist/styles/index.scss +8 -0
  92. package/dist/styles/mixins/layer.scss +109 -0
  93. package/dist/styles/mixins/text.scss +150 -0
  94. package/package.json +91 -0
@@ -0,0 +1,262 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // reset
3
+ // variables
4
+ // elements
5
+ // direction
6
+ // active
7
+ // disabled
8
+ // error
9
+ // dense
10
+ // —————————————————————————————————————————————————————————————————
11
+
12
+ // —————————————————————————————————————————————————————————————————
13
+ // reset
14
+ // —————————————————————————————————————————————————————————————————
15
+
16
+ // Chrome/Opera/Safari
17
+ ::-webkit-input-placeholder {
18
+ color: $grey-50;
19
+ opacity: 1;
20
+ font-size: 1rem;
21
+ }
22
+
23
+ // Firefox 19+
24
+ ::-moz-placeholder {
25
+ color: $grey-50;
26
+ opacity: 1;
27
+ font-size: 1rem;
28
+ }
29
+
30
+ // IE 10+
31
+ :-ms-input-placeholder {
32
+ color: $grey-50;
33
+ opacity: 1;
34
+ font-size: 1rem;
35
+ }
36
+
37
+ // Firefox 18-
38
+ :-moz-placeholder {
39
+ color: $grey-50;
40
+ opacity: 1;
41
+ font-size: 1rem;
42
+ }
43
+
44
+ // change autofilled color on Chrome
45
+ input:-webkit-autofill,
46
+ input:-webkit-autofill:hover,
47
+ input:-webkit-autofill:focus,
48
+ input:-webkit-autofill:active {
49
+ box-shadow: 0 0 0 1000px $overlay inset !important;
50
+ -webkit-box-shadow: 0 0 0 1000px $overlay inset !important;
51
+ }
52
+
53
+ fieldset {
54
+ border: 0;
55
+ padding: 0.01rem 0 0 0;
56
+ margin: 0;
57
+ min-width: 0;
58
+ }
59
+
60
+ body:not(:-moz-handler-blocked) fieldset {
61
+ display: table-cell;
62
+ }
63
+
64
+ legend {
65
+ display: table;
66
+ padding: 0;
67
+ }
68
+
69
+ input, button, select, textarea, button, input[type="reset"], input[type="submit"], input[type="button"] {
70
+ -webkit-appearance: none;
71
+ -moz-appearance:none;
72
+ appearance:none;
73
+ border: 0;
74
+ box-sizing: border-box;
75
+ -webkit-border-radius: 0;
76
+ border-radius: 0;
77
+ }
78
+
79
+ input, textarea, select {
80
+ outline: 0;
81
+ }
82
+
83
+ textarea {
84
+ resize: vertical;
85
+ height: unset !important;
86
+ }
87
+
88
+ // —————————————————————————————————————————————————————————————————
89
+ // variables
90
+ // —————————————————————————————————————————————————————————————————
91
+
92
+ $height: $spacing*4;
93
+ $height-dense: $spacing*3.5;
94
+
95
+ // —————————————————————————————————————————————————————————————————
96
+ // elements
97
+ // —————————————————————————————————————————————————————————————————
98
+
99
+ .field {
100
+ display: inline-flex;
101
+ flex-direction: column;
102
+ width: 100%;
103
+ color: $text;
104
+ margin: 0;
105
+
106
+ &:not(:last-child) {
107
+ margin-bottom: $spacing*1.5;
108
+ }
109
+
110
+ &__label {
111
+ margin-bottom: $spacing*0.5;
112
+ cursor: pointer;
113
+ }
114
+
115
+ &__field {
116
+ position: relative;
117
+ height: $height;
118
+ display: flex;
119
+ }
120
+
121
+ &__fieldInput {
122
+ background-color: transparent;
123
+ border: $border-sm $border;
124
+ padding: $spacing*0.5 $spacing;
125
+ border-radius: $spacing;
126
+ width: 100%;
127
+ height: 100%;
128
+ white-space: nowrap;
129
+ text-overflow: ellipsis;
130
+ }
131
+
132
+ &--textarea {
133
+ height: unset;
134
+ }
135
+
136
+ &__icon {
137
+ position: absolute;
138
+ right: $spacing;
139
+ top: $spacing*0.6;
140
+ margin-right: 0;
141
+ pointer-events: none;
142
+ color: inherit;
143
+
144
+ svg {
145
+ height: $spacing*2;
146
+ width: $spacing*2;
147
+ }
148
+
149
+ & + .field__fieldInput {
150
+ padding-right: $spacing*3.5;
151
+ }
152
+ }
153
+
154
+ &__notice {
155
+ margin-top: $spacing*0.5;
156
+ }
157
+ }
158
+
159
+ textarea.field__fieldInput {
160
+ white-space: initial;
161
+ }
162
+
163
+ select.field__fieldInput {
164
+ line-height: 1;
165
+ height: $height;
166
+ padding-top: 0;
167
+ padding-bottom: 0;
168
+ }
169
+
170
+ // —————————————————————————————————————————————————————————————————
171
+ // direction
172
+ // —————————————————————————————————————————————————————————————————
173
+
174
+ @mixin direction($direction) {
175
+ display: flex;
176
+ flex-direction: $direction;
177
+
178
+ > * {
179
+ margin-bottom: $spacing*0.5;
180
+
181
+ &:not(:last-child) {
182
+ @if $direction == row {
183
+ margin-right: $spacing*1.5;
184
+ }
185
+
186
+ &.field__icon {
187
+ margin-right: 0;
188
+ margin-bottom: 0;
189
+ }
190
+ }
191
+ }
192
+ }
193
+
194
+ .field--portrait {
195
+ @include direction(column);
196
+ height: unset;
197
+ padding-top: $spacing*0.5;
198
+ }
199
+
200
+ .field--landscape {
201
+ @include direction(row);
202
+ align-items: center;
203
+ flex-wrap: wrap;
204
+ }
205
+
206
+ // —————————————————————————————————————————————————————————————————
207
+ // active
208
+ // —————————————————————————————————————————————————————————————————
209
+
210
+ .field--active {
211
+
212
+ .field__label {
213
+ color: $primary;
214
+ }
215
+
216
+ .field__fieldInput {
217
+ border-color: $primary;
218
+ }
219
+ }
220
+
221
+ // —————————————————————————————————————————————————————————————————
222
+ // disabled
223
+ // —————————————————————————————————————————————————————————————————
224
+
225
+ .field--disabled {
226
+ opacity: 0.4;
227
+
228
+ .field__label,
229
+ .field__fieldInput {
230
+ cursor: not-allowed;
231
+ }
232
+ }
233
+
234
+ // —————————————————————————————————————————————————————————————————
235
+ // error
236
+ // —————————————————————————————————————————————————————————————————
237
+
238
+ .field--error {
239
+
240
+ .field__label {
241
+ color: $error;
242
+ }
243
+
244
+ .field__fieldInput {
245
+ border-color: $error;
246
+ }
247
+ }
248
+
249
+ // —————————————————————————————————————————————————————————————————
250
+ // dense
251
+ // —————————————————————————————————————————————————————————————————
252
+
253
+ .field--dense {
254
+
255
+ &.field__field {
256
+ height: $height-dense;
257
+
258
+ select.field__fieldInput {
259
+ height: $height-dense;
260
+ }
261
+ }
262
+ }
@@ -0,0 +1,36 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // elements
3
+ // color
4
+ // disabled
5
+ // —————————————————————————————————————————————————————————————————
6
+
7
+ // —————————————————————————————————————————————————————————————————
8
+ // elements
9
+ // —————————————————————————————————————————————————————————————————
10
+
11
+ .link {
12
+ text-decoration: underline;
13
+ cursor: pointer;
14
+
15
+ &:not(.link--disabled) {
16
+
17
+ @include hover {
18
+ text-decoration: none;
19
+ }
20
+ }
21
+ }
22
+
23
+ // —————————————————————————————————————————————————————————————————
24
+ // color
25
+ // —————————————————————————————————————————————————————————————————
26
+
27
+ // color is handled with the Text component
28
+
29
+ // —————————————————————————————————————————————————————————————————
30
+ // disabled
31
+ // —————————————————————————————————————————————————————————————————
32
+
33
+ .link--disabled {
34
+ opacity: 0.5;
35
+ cursor: not-allowed;
36
+ }
@@ -0,0 +1,131 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // variables
3
+ // mixins
4
+ // animation
5
+ // elements
6
+ // variant
7
+ // color
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ // —————————————————————————————————————————————————————————————————
11
+ // variables
12
+ // —————————————————————————————————————————————————————————————————
13
+
14
+ $spacing-circle: $spacing*4;
15
+
16
+ // —————————————————————————————————————————————————————————————————
17
+ // mixins
18
+ // —————————————————————————————————————————————————————————————————
19
+
20
+ @mixin color($color) {
21
+
22
+ &.loader--dots > span { background-color: $color; }
23
+ &.loader--circle > span:after { background-color: $color; }
24
+ }
25
+
26
+ // —————————————————————————————————————————————————————————————————
27
+ // animation
28
+ // —————————————————————————————————————————————————————————————————
29
+
30
+ @keyframes dots {
31
+ 0% { transform: scale(0.25); }
32
+ 32% { transform: scale(1.1); }
33
+ 44% { transform: scale(1); }
34
+ 72% { transform: scale(1); }
35
+ 80% { transform: scale(1.1); }
36
+ 84% { transform: scale(1); }
37
+ 98% { transform: scale(0.25); }
38
+ 100% { transform: scale(0.25); }
39
+ }
40
+
41
+ @keyframes rotate {
42
+ 0% { transform: rotate(0); }
43
+ 100% { transform: rotate(360deg); }
44
+ }
45
+
46
+ // —————————————————————————————————————————————————————————————————
47
+ // elements
48
+ // —————————————————————————————————————————————————————————————————
49
+
50
+ .loader {
51
+ display: flex;
52
+
53
+ > span {
54
+ display: block;
55
+ }
56
+ }
57
+
58
+ // —————————————————————————————————————————————————————————————————
59
+ // variant
60
+ // —————————————————————————————————————————————————————————————————
61
+
62
+ .loader {
63
+
64
+ &--dots {
65
+
66
+ > span {
67
+ height: $spacing;
68
+ width: $spacing;
69
+ border-radius: 50%;
70
+ transform-origin: center center;
71
+
72
+ &:not(:last-child) {
73
+ margin-right: $spacing;
74
+ }
75
+
76
+ &:nth-child(1) { animation: dots 1.6s ease 0s infinite; }
77
+ &:nth-child(2) { animation: dots 1.6s ease 0.2s infinite; }
78
+ &:nth-child(3) { animation: dots 1.6s ease 0.4s infinite; }
79
+ }
80
+ }
81
+
82
+ &--circle {
83
+ align-items: center;
84
+ justify-content: center;
85
+ width: $spacing-circle;
86
+ height: $spacing-circle;
87
+ display: block;
88
+
89
+ > span {
90
+ position: absolute;
91
+ flex-shrink: 0;
92
+ height: $spacing-circle;
93
+ width: 2px;
94
+ transform-origin: 1px $spacing-circle*0.5;
95
+ margin-left: $spacing-circle*0.5;
96
+
97
+ &:after {
98
+ content: '';
99
+ position: absolute;
100
+ height: $spacing*0.5;
101
+ width: $spacing*0.5;
102
+ border-radius: 50%;
103
+ }
104
+
105
+ &:nth-child(1) { transform: rotate(0deg); &:after { animation: dots 2s ease 0s infinite; } }
106
+ &:nth-child(2) { transform: rotate(30deg); &:after { animation: dots 2s ease 0.1s infinite; } }
107
+ &:nth-child(3) { transform: rotate(60deg); &:after { animation: dots 2s ease 0.2s infinite; } }
108
+ &:nth-child(4) { transform: rotate(90deg); &:after { animation: dots 2s ease 0.3s infinite; } }
109
+ &:nth-child(5) { transform: rotate(120deg); &:after { animation: dots 2s ease 0.4s infinite; } }
110
+ &:nth-child(6) { transform: rotate(150deg); &:after { animation: dots 2s ease 0.5s infinite; } }
111
+ &:nth-child(7) { transform: rotate(180deg); &:after { animation: dots 2s ease 0.6s infinite; } }
112
+ &:nth-child(8) { transform: rotate(210deg); &:after { animation: dots 2s ease 0.7s infinite; } }
113
+ &:nth-child(9) { transform: rotate(240deg); &:after { animation: dots 2s ease 0.8s infinite; } }
114
+ &:nth-child(10) { transform: rotate(270deg); &:after { animation: dots 2s ease 0.9s infinite; } }
115
+ &:nth-child(11) { transform: rotate(300deg); &:after { animation: dots 2s ease 1s infinite; } }
116
+ &:nth-child(12) { transform: rotate(330deg); &:after { animation: dots 2s ease 1.1s infinite; } }
117
+ }
118
+ }
119
+ }
120
+
121
+ // —————————————————————————————————————————————————————————————————
122
+ // color
123
+ // —————————————————————————————————————————————————————————————————
124
+
125
+ .loader {
126
+
127
+ &--primary { @include color($primary); }
128
+ &--secondary { @include color($secondary); }
129
+ &--black { @include color($black); }
130
+ &--white { @include color($white); }
131
+ }
@@ -0,0 +1,112 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // elements
3
+ // animation
4
+ // transition
5
+ // —————————————————————————————————————————————————————————————————
6
+
7
+ // —————————————————————————————————————————————————————————————————
8
+ // elements
9
+ // —————————————————————————————————————————————————————————————————
10
+
11
+ .modal {
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ position: fixed;
16
+ width: 100vw;
17
+ height: 100vh;
18
+ top: 0;
19
+ right: 0;
20
+ bottom: 0;
21
+ left: 0;
22
+ padding: $spacing*2;
23
+ z-index: 20;
24
+
25
+ &__backdrop {
26
+ position: fixed;
27
+ width: 100%;
28
+ height: 100%;
29
+ top: 0;
30
+ right: 0;
31
+ bottom: 0;
32
+ left: 0;
33
+ background-color: rgba(0,0,0,0.8);
34
+ animation-fill-mode: forwards !important;
35
+ }
36
+
37
+ &__modal {
38
+ transform-origin: center center;
39
+ position: relative;
40
+ border: 0;
41
+ animation-fill-mode: forwards !important;
42
+ }
43
+
44
+ &__close {
45
+ cursor: pointer;
46
+ position: absolute;
47
+ top: $spacing*3;
48
+ right: $spacing*3;
49
+ }
50
+ }
51
+
52
+ // —————————————————————————————————————————————————————————————————
53
+ // animation
54
+ // —————————————————————————————————————————————————————————————————
55
+
56
+ @keyframes fadeIn {
57
+ 0% { opacity: 0; }
58
+ 100% { opacity: 1; }
59
+ }
60
+
61
+ @keyframes fadeOut {
62
+ 0% { opacity: 1; }
63
+ 100% { opacity: 0; }
64
+ }
65
+
66
+ @keyframes slideIn {
67
+ 0% { transform: translateY(-200%); }
68
+ 100% { transform: translateY(0); }
69
+ }
70
+
71
+ @keyframes slideOut {
72
+ 0% { transform: translateY(0); }
73
+ 100% { transform: translateY(-200%); }
74
+ }
75
+
76
+ @keyframes zoomIn {
77
+ 0% { transform: scale(0); }
78
+ 100% { transform: scale(1); }
79
+ }
80
+
81
+ @keyframes zoomOut {
82
+ 0% { transform: scale(1); }
83
+ 100% { transform: scale(0); }
84
+ }
85
+
86
+ // —————————————————————————————————————————————————————————————————
87
+ // transition
88
+ // —————————————————————————————————————————————————————————————————
89
+
90
+ .modal {
91
+
92
+ &--fadeIn { animation: fadeIn 0.4s ease; }
93
+ &--fadeOut { animation: fadeOut 0.4s ease; }
94
+
95
+ &--slideIn { animation: slideIn 0.4s ease, fadeIn 0.4s ease; }
96
+ &--slideOut { animation: slideOut 0.4s ease, fadeOut 0.4s ease; }
97
+
98
+ &--zoomIn { animation: zoomIn 0.4s ease; }
99
+ &--zoomOut { animation: zoomOut 0.4s ease; }
100
+ }
101
+
102
+ // —————————————————————————————————————————————————————————————————
103
+ // width
104
+ // —————————————————————————————————————————————————————————————————
105
+
106
+ .modal {
107
+
108
+ &--laptop { max-width: $laptop-up; }
109
+ &--tablet { max-width: $tablet-up; }
110
+ &--mobile { max-width: $mobile-up; }
111
+ &--mobile-sm { max-width: $mobile-sm-up; }
112
+ }
@@ -0,0 +1,72 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // mixins
3
+ // elements
4
+ // size
5
+ // direction
6
+ // transparent
7
+ // —————————————————————————————————————————————————————————————————
8
+
9
+ // —————————————————————————————————————————————————————————————————
10
+ // mixins
11
+ // —————————————————————————————————————————————————————————————————
12
+
13
+ @mixin size($proportion, $size) {
14
+ padding: $size;
15
+ border-radius: $size*1.5;
16
+
17
+ &.navGroup--portrait .navItem + .navItem { margin-top: calc($size/4); }
18
+ &.navGroup--landscape .navItem + .navItem { margin-left: calc($size/4); }
19
+ &.navItem__dropdown { left: -$size; }
20
+ }
21
+
22
+ // —————————————————————————————————————————————————————————————————
23
+ // elements
24
+ // —————————————————————————————————————————————————————————————————
25
+
26
+ .navGroup {
27
+ display: flex;
28
+ justify-content: flex-start;
29
+ flex-wrap: wrap;
30
+ box-shadow: $box-shadow-md;
31
+ background-color: $paper;
32
+ }
33
+
34
+ // —————————————————————————————————————————————————————————————————
35
+ // size
36
+ // —————————————————————————————————————————————————————————————————
37
+
38
+ .navGroup {
39
+
40
+ &--sm { @include size(sm, $spacing); }
41
+ &--md { @include size(md, $spacing*1.5); }
42
+ &--lg { @include size(lg, $spacing*2); }
43
+ }
44
+
45
+ // —————————————————————————————————————————————————————————————————
46
+ // direction
47
+ // —————————————————————————————————————————————————————————————————
48
+
49
+ .navGroup {
50
+
51
+ &--portrait {
52
+ flex-direction: column;
53
+
54
+ .navItem__trigger {
55
+ width: 100%;
56
+ }
57
+ }
58
+
59
+ &--landscape {
60
+ flex-direction: row;
61
+ }
62
+ }
63
+
64
+ // —————————————————————————————————————————————————————————————————
65
+ // transparent
66
+ // —————————————————————————————————————————————————————————————————
67
+
68
+ .navGroup--transparent {
69
+ padding: 0;
70
+ box-shadow: none;
71
+ background-color: transparent;
72
+ }