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,127 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // variables
3
+ // mixins
4
+ // elements
5
+ // size
6
+ // active
7
+ // disabled
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ // —————————————————————————————————————————————————————————————————
11
+ // variables
12
+ // —————————————————————————————————————————————————————————————————
13
+
14
+ $padding: $spacing*1.5;
15
+
16
+ // —————————————————————————————————————————————————————————————————
17
+ // mixins
18
+ // —————————————————————————————————————————————————————————————————
19
+
20
+ @mixin sizeItem($proportion, $size) {
21
+
22
+ .navItem {
23
+
24
+ &__trigger {
25
+ padding: $size*0.75 $size !important;
26
+ border-radius: calc($size*2/3);
27
+
28
+ @if $proportion == lg { font-size: 1rem; }
29
+ @else { font-size: 0.875rem; }
30
+ }
31
+
32
+ &__icon {
33
+
34
+ @if $proportion == lg { width: 1rem; height: 1rem; }
35
+ @else { width: 0.875rem; height: 0.875rem; }
36
+
37
+ &:first-child { margin-right: calc($size*2/3); }
38
+ &:last-child { margin-left: calc($size*2/3); }
39
+ }
40
+ }
41
+ }
42
+
43
+ // —————————————————————————————————————————————————————————————————
44
+ // elements
45
+ // —————————————————————————————————————————————————————————————————
46
+
47
+ .navItem {
48
+ cursor: pointer;
49
+ font-size: 0.875rem;
50
+ text-transform: uppercase;
51
+ font-weight: $font-bold;
52
+ position: relative;
53
+ will-change: background-color, color;
54
+ display: inline-flex;
55
+
56
+ &__trigger {
57
+ display: flex;
58
+ align-items: center;
59
+ line-height: 1;
60
+ padding: $spacing $padding;
61
+ border-radius: $border-radius-md;
62
+
63
+ @include hover {
64
+ background-color: $hover;
65
+ }
66
+ }
67
+
68
+ &__icon {
69
+ display: flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ }
73
+
74
+ &__dropdown {
75
+ display: flex;
76
+ flex-direction: column;
77
+ align-items: stretch;
78
+ background-color: $paper;
79
+ border-radius: $border-radius-lg;
80
+ position: absolute;
81
+ top: $spacing*5;
82
+ left: -$spacing*2;
83
+ width: $spacing*25;
84
+ opacity: 0;
85
+ visibility: hidden;
86
+ box-shadow: $box-shadow-md;
87
+ max-width: $spacing*20;
88
+
89
+ &--active {
90
+ opacity: 1;
91
+ visibility: visible;
92
+ }
93
+ }
94
+ }
95
+
96
+ // —————————————————————————————————————————————————————————————————
97
+ // size
98
+ // —————————————————————————————————————————————————————————————————
99
+
100
+ .navItem {
101
+
102
+ &--sm { @include sizeItem(sm, $spacing); }
103
+ &--md { @include sizeItem(md, $spacing*1.5); }
104
+ &--lg { @include sizeItem(lg, $spacing*2); }
105
+ }
106
+
107
+ // —————————————————————————————————————————————————————————————————
108
+ // active
109
+ // —————————————————————————————————————————————————————————————————
110
+
111
+ .navItem--active .navItem__trigger {
112
+ background-color: $paper;
113
+ color: $primary;
114
+ }
115
+
116
+ // —————————————————————————————————————————————————————————————————
117
+ // disabled
118
+ // —————————————————————————————————————————————————————————————————
119
+
120
+ .navItem--disabled .navItem__trigger {
121
+ opacity: 0.4;
122
+ cursor: not-allowed;
123
+
124
+ @include hover {
125
+ background-color: initial;
126
+ }
127
+ }
@@ -0,0 +1,41 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // elements
3
+ // —————————————————————————————————————————————————————————————————
4
+
5
+ .navBar {
6
+ position: fixed;
7
+ background-color: $paper;
8
+ height: $navbar-height;
9
+ top: 0;
10
+ z-index: 10;
11
+
12
+ &.section {
13
+ padding-top: 0;
14
+ padding-bottom: 0;
15
+ }
16
+
17
+ .section__content {
18
+ display: flex;
19
+ flex-direction: row;
20
+ align-items: center;
21
+ justify-content: space-between;
22
+ width: 100%;
23
+ }
24
+
25
+ &__logo {
26
+ margin-right: $spacing*2;
27
+ }
28
+
29
+ &__nav {
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: space-between;
33
+ flex-grow: 1;
34
+
35
+ @include responsive(down, laptop) {
36
+ flex-direction: column;
37
+ align-items: flex-start;
38
+ width: 100%;
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,48 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // reset
3
+ // elements
4
+ // —————————————————————————————————————————————————————————————————
5
+
6
+ // —————————————————————————————————————————————————————————————————
7
+ // reset
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ html, body {
11
+ background-color: $background;
12
+ color: $text;
13
+ font-family: $font;
14
+ }
15
+
16
+ #root {
17
+ color: $text;
18
+ }
19
+
20
+ // —————————————————————————————————————————————————————————————————
21
+ // elements
22
+ // —————————————————————————————————————————————————————————————————
23
+
24
+ .page {
25
+ display: flex;
26
+ flex-direction: column;
27
+ align-items: center;
28
+ min-height: 100vh;
29
+ width: 100vw;
30
+
31
+ &__header.section,
32
+ &__header.section.section--fill {
33
+ padding-top: $section-spacing*1.5;
34
+ padding-bottom: $section-spacing*1.5;
35
+ }
36
+
37
+ &__label + .page__title {
38
+ margin-top: 0.25em;
39
+ }
40
+
41
+ &__title + .page__subtitle {
42
+ margin-top: 1.5em;
43
+ }
44
+
45
+ &__subtitle {
46
+ max-width: calc($page-max-width*0.5);
47
+ }
48
+ }
@@ -0,0 +1,58 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // elements
3
+ // disabled
4
+ // —————————————————————————————————————————————————————————————————
5
+
6
+ // —————————————————————————————————————————————————————————————————
7
+ // elements
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ .radio {
11
+ display: flex;
12
+ align-items: center;
13
+
14
+ &__input {
15
+ position: absolute;
16
+ height: 0;
17
+ width: 0;
18
+ opacity: 0;
19
+ cursor: pointer;
20
+
21
+ &:checked + .radio__label:before {
22
+ border-color: $primary;
23
+ border-width: $spacing*0.75;
24
+ }
25
+ }
26
+
27
+ &__label {
28
+ position: relative;
29
+ display: flex;
30
+ align-items: center;
31
+ cursor: pointer;
32
+
33
+ &:before {
34
+ content: "";
35
+ box-sizing: border-box;
36
+ display: inline-block;
37
+ width: $spacing*2;
38
+ height: $spacing*2;
39
+ left: 0;
40
+ top: 0;
41
+ margin-right: $spacing;
42
+ border-radius: $spacing*2;
43
+ border: $spacing*0.25 solid $grey-20;
44
+ }
45
+ }
46
+ }
47
+
48
+ // —————————————————————————————————————————————————————————————————
49
+ // disabled
50
+ // —————————————————————————————————————————————————————————————————
51
+
52
+ .radio--disabled {
53
+ opacity: 0.4;
54
+
55
+ * {
56
+ cursor: not-allowed;
57
+ }
58
+ }
@@ -0,0 +1,169 @@
1
+ @import '../mixins/layer.scss';
2
+
3
+ // —————————————————————————————————————————————————————————————————
4
+ // mixins
5
+ // elements
6
+ // align
7
+ // fullWidth
8
+ // subheader
9
+ // margin
10
+ // —————————————————————————————————————————————————————————————————
11
+
12
+ // —————————————————————————————————————————————————————————————————
13
+ // mixins
14
+ // —————————————————————————————————————————————————————————————————
15
+
16
+ @mixin fill($title-color: $primary) {
17
+
18
+ & + & {
19
+ padding-top: 0;
20
+ }
21
+
22
+ .section__title {
23
+ color: $title-color;
24
+ }
25
+ }
26
+
27
+ @mixin align($align, $flex-align) {
28
+ text-align: $align;
29
+ align-items: $flex-align;
30
+
31
+ .section__header {
32
+ align-items: $flex-align;
33
+ }
34
+ }
35
+
36
+ // —————————————————————————————————————————————————————————————————
37
+ // elements
38
+ // —————————————————————————————————————————————————————————————————
39
+
40
+ .section {
41
+ display: flex;
42
+ flex-direction: column;
43
+ justify-content: center;
44
+ width: 100%;
45
+ padding: $section-spacing calc(100% / 12);
46
+
47
+ & + & {
48
+ padding-top: 0;
49
+ }
50
+
51
+ &.section--fill {
52
+ padding-top: $section-spacing;
53
+ padding-bottom: $section-spacing;
54
+
55
+ + .section {
56
+ padding-top: $section-spacing;
57
+ }
58
+ }
59
+
60
+ &__container {
61
+ display: flex;
62
+ flex-direction: column;
63
+ align-items: center;
64
+ width: 100%;
65
+ max-width: 1280px;
66
+ box-sizing: content-box;
67
+ }
68
+
69
+ &__header {
70
+ display: flex;
71
+ flex-direction: column;
72
+ width: 100%;
73
+
74
+ & + &,
75
+ & + .section__content {
76
+ margin-top: $section-spacing-content;
77
+ }
78
+ }
79
+
80
+ &__content {
81
+ display: flex;
82
+ flex-direction: column;
83
+ align-items: stretch;
84
+
85
+ & + .section__header {
86
+ margin-top: $section-spacing-content;
87
+ }
88
+ }
89
+
90
+ &__label {
91
+
92
+ & + .section__title {
93
+ margin-top: $spacing*2;
94
+ }
95
+ }
96
+
97
+ &__title {
98
+
99
+ +.section__subtitle {
100
+ margin-top: $spacing*3;
101
+ }
102
+ }
103
+
104
+ &__subtitle {
105
+ max-width: $page-max-width*0.5;
106
+ }
107
+ }
108
+
109
+ // —————————————————————————————————————————————————————————————————
110
+ // fill
111
+ // —————————————————————————————————————————————————————————————————
112
+
113
+ // fill color is partially handled with the Layer component
114
+
115
+ .section--fill.fill {
116
+
117
+ &--black { @include fill(); }
118
+ &--white { @include fill($text-contrast); }
119
+ &--background { @include fill(); }
120
+ &--paper { @include fill(); }
121
+ &--overlay { @include fill(); }
122
+ &--primary { @include fill($primary-text-contrast); }
123
+ &--secondary { @include fill($secondary-text-contrast); }
124
+ &--highlight { @include fill($highlight-text-contrast); }
125
+ }
126
+
127
+ // —————————————————————————————————————————————————————————————————
128
+ // align
129
+ // —————————————————————————————————————————————————————————————————
130
+
131
+ .section__container {
132
+
133
+ &.section--left { @include align(left, flex-start); }
134
+ &.section--center { @include align(center, center); }
135
+ &.section--right { @include align(right, flex-end); }
136
+ }
137
+
138
+ // —————————————————————————————————————————————————————————————————
139
+ // fullWidth
140
+ // —————————————————————————————————————————————————————————————————
141
+
142
+ .section--fullWidth {
143
+
144
+ &.section {
145
+ padding-right: $spacing*4;
146
+ padding-left: $spacing*4;
147
+ }
148
+
149
+ &.section__container {
150
+ max-width: unset;
151
+ }
152
+ }
153
+
154
+ // —————————————————————————————————————————————————————————————————
155
+ // subheader
156
+ // —————————————————————————————————————————————————————————————————
157
+
158
+ .section__header--subheader {
159
+
160
+ &.section__header--margin {
161
+ margin-bottom: $spacing*4;
162
+ }
163
+
164
+ .section {
165
+
166
+ &__label + .section__title { margin-top: $spacing*1.5; }
167
+ &__title + .section__subtitle { margin-top: $spacing*2; }
168
+ }
169
+ }
@@ -0,0 +1,79 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // elements
3
+ // isDefault
4
+ // dense
5
+ // isTransparent
6
+ // —————————————————————————————————————————————————————————————————
7
+
8
+ // —————————————————————————————————————————————————————————————————
9
+ // elements
10
+ // —————————————————————————————————————————————————————————————————
11
+
12
+ .snippet {
13
+ font-family: "Roboto Mono", Courier, monospace;
14
+ word-wrap: break-word;
15
+ width: 100%;
16
+ position: relative;
17
+ border-radius: $spacing;
18
+ font-size: $spacing*1.5;
19
+ margin: 0;
20
+ padding: $spacing $spacing*1.25 !important;
21
+ background-color: $grey-90 !important;
22
+
23
+ * {
24
+ font-weight: $font-regular !important;
25
+ }
26
+
27
+ & + & {
28
+ margin-top: $spacing*0.5;
29
+ }
30
+
31
+ &__wrapper {
32
+ width: 100%;
33
+ position: relative;
34
+ }
35
+ }
36
+
37
+ // —————————————————————————————————————————————————————————————————
38
+ // isDefault
39
+ // —————————————————————————————————————————————————————————————————
40
+
41
+ .snippet__default,
42
+ .snippet__default.text {
43
+ position: absolute;
44
+ top: $spacing*0.75;
45
+ right: $spacing*0.75;
46
+ background-color: $overlay;
47
+ padding: $spacing*0.25 $spacing*0.75;
48
+ border-radius: $spacing*0.5;
49
+ }
50
+
51
+ // —————————————————————————————————————————————————————————————————
52
+ // dense
53
+ // —————————————————————————————————————————————————————————————————
54
+
55
+ .snippet--dense {
56
+ padding: $spacing*0.5 $spacing !important;
57
+
58
+ ~ .snippet__default,
59
+ ~ .snippet__default.text {
60
+ top: $spacing*0.5;
61
+ right: $spacing*0.5;
62
+ padding: 0 $spacing*0.5;
63
+ }
64
+ }
65
+
66
+ // —————————————————————————————————————————————————————————————————
67
+ // isTransparent
68
+ // —————————————————————————————————————————————————————————————————
69
+
70
+ .snippet.snippet--transparent {
71
+ background-color: transparent !important;
72
+ padding: 0 !important;
73
+
74
+ ~ .snippet__default,
75
+ ~ .snippet__default.text {
76
+ top: 0;
77
+ right: 0;
78
+ }
79
+ }
@@ -0,0 +1,78 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // elements
3
+ // active & completed
4
+ // —————————————————————————————————————————————————————————————————
5
+
6
+ // —————————————————————————————————————————————————————————————————
7
+ // elements
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ .stepper {
11
+
12
+ &__icons {
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ margin-bottom: $spacing*3;
17
+ }
18
+
19
+ &__step {
20
+ display: flex;
21
+ flex-direction: column;
22
+ align-items: center;
23
+ width: $spacing*4;
24
+
25
+ &:not(:first-child) {
26
+ margin-left: $spacing*10;
27
+
28
+ .stepper__icon {
29
+
30
+ &:before {
31
+ content: "";
32
+ position: absolute;
33
+ height: 2px;
34
+ background-color: $paper;
35
+ width: $spacing*8;
36
+ right: $spacing*5;
37
+ }
38
+ }
39
+ }
40
+ }
41
+
42
+ &__icon {
43
+ position: relative;
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ background-color: $paper;
48
+ width: $spacing*4;
49
+ height: $spacing*4;
50
+ border-radius: 50%;
51
+ }
52
+
53
+ &__label {
54
+ margin-top: $spacing;
55
+ width: 300%;
56
+ text-align: center;
57
+ }
58
+ }
59
+
60
+ // —————————————————————————————————————————————————————————————————
61
+ // active & completed
62
+ // —————————————————————————————————————————————————————————————————
63
+
64
+ .stepper__icon--active {
65
+ background-color: $primary;
66
+ color: $primary-text-contrast;
67
+ }
68
+
69
+ .stepper__step:not(:first-child) {
70
+
71
+ .stepper__icon--active,
72
+ .stepper__icon--completed {
73
+
74
+ &:before {
75
+ background-color: $primary;
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,71 @@
1
+ // —————————————————————————————————————————————————————————————————
2
+ // elements
3
+ // disabled
4
+ // —————————————————————————————————————————————————————————————————
5
+
6
+ // —————————————————————————————————————————————————————————————————
7
+ // elements
8
+ // —————————————————————————————————————————————————————————————————
9
+
10
+ .switch {
11
+ display: flex;
12
+ align-items: center;
13
+ height: $spacing*3;
14
+
15
+ &__input {
16
+ position: absolute;
17
+ height: 0;
18
+ width: 0;
19
+ opacity: 0;
20
+
21
+ &:checked + .switch__switch {
22
+ background-color: $primary-light;
23
+
24
+ .switch__toggle {
25
+ @include calc(left, '100% -'($spacing*2));
26
+ background-color: $primary;
27
+ }
28
+ }
29
+ }
30
+
31
+ &__label {
32
+
33
+ &:first-child { margin-right: $spacing*1.5; }
34
+ &:last-child { margin-left: $spacing*1.5; }
35
+ }
36
+
37
+ &__switch {
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: space-between;
41
+ cursor: pointer;
42
+ width: $spacing*4;
43
+ height: $spacing*2;
44
+ background: $grey-10;
45
+ border-radius: $spacing*3;
46
+ position: relative;
47
+
48
+ &:nth-child(2) { margin-left: $spacing*0.25; }
49
+ }
50
+
51
+ &__toggle {
52
+ position: absolute;
53
+ left: -$spacing*0.25;
54
+ width: $spacing*2.5;
55
+ height: $spacing*2.5;
56
+ border-radius: $spacing*2.5;
57
+ background: $grey-20;
58
+ }
59
+ }
60
+
61
+ // —————————————————————————————————————————————————————————————————
62
+ // disabled
63
+ // —————————————————————————————————————————————————————————————————
64
+
65
+ .switch--disabled {
66
+ opacity: 0.4;
67
+
68
+ * {
69
+ cursor: not-allowed;
70
+ }
71
+ }