@punch-in/buffet-modern 3.3.11

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 (181) hide show
  1. package/.stylelintignore +1 -0
  2. package/README.md +50 -0
  3. package/babel.config.js +18 -0
  4. package/build/18ea3062c6e779649b89c301e4d65a7c.ttf +0 -0
  5. package/build/1d2ca94dfba6f8d87cfda33b32f0febc.woff +0 -0
  6. package/build/21b3848a32fce5b0f5014948186f6964.woff2 +0 -0
  7. package/build/6cfa65c63939188f33ef0e3a68d09306.woff +0 -0
  8. package/build/6d20cff5b3255dd0078f935c34e2b882.woff2 +0 -0
  9. package/build/75614cfcfedd509b1f7ac1c26c53bb7f.woff2 +0 -0
  10. package/build/89b618086a797a8be0f4549489bb2993.woff +0 -0
  11. package/build/8acc961684668b6e28e961e26afc2af9.ttf +0 -0
  12. package/build/a6069540692725c247f13984a9598a92.woff2 +0 -0
  13. package/build/bb14dc80e8b5d860fe9cb2362987d630.ttf +0 -0
  14. package/build/bundle.development.js +951 -0
  15. package/build/bundle.production.js +1 -0
  16. package/build/c66465590541129e82d3d6f725c5658b.woff +0 -0
  17. package/build/c7687ac11011d85e040e2ce14d5bf6eb.ttf +0 -0
  18. package/build/esm/assets/fonts/lato/Lato-Black.ttf +0 -0
  19. package/build/esm/assets/fonts/lato/Lato-Black.woff +0 -0
  20. package/build/esm/assets/fonts/lato/Lato-Black.woff2 +0 -0
  21. package/build/esm/assets/fonts/lato/Lato-Bold.ttf +0 -0
  22. package/build/esm/assets/fonts/lato/Lato-Bold.woff +0 -0
  23. package/build/esm/assets/fonts/lato/Lato-Bold.woff2 +0 -0
  24. package/build/esm/assets/fonts/lato/Lato-Regular.ttf +0 -0
  25. package/build/esm/assets/fonts/lato/Lato-Regular.woff +0 -0
  26. package/build/esm/assets/fonts/lato/Lato-Regular.woff2 +0 -0
  27. package/build/esm/assets/fonts/lato/Lato-SemiBold.ttf +0 -0
  28. package/build/esm/assets/fonts/lato/Lato-SemiBold.woff +0 -0
  29. package/build/esm/assets/fonts/lato/Lato-SemiBold.woff2 +0 -0
  30. package/build/esm/assets/icons/icon_select.svg +1 -0
  31. package/build/esm/assets/icons/icon_trash.svg +1 -0
  32. package/build/esm/assets/styles/colors.js +84 -0
  33. package/build/esm/assets/styles/mixins.js +28 -0
  34. package/build/esm/assets/styles/sizes.js +77 -0
  35. package/build/esm/components/Button/PrefixIcon.js +7 -0
  36. package/build/esm/components/Button/index.js +34 -0
  37. package/build/esm/components/Card/index.js +23 -0
  38. package/build/esm/components/Checkbox/index.js +25 -0
  39. package/build/esm/components/CheckboxWrapper/index.js +36 -0
  40. package/build/esm/components/CustomRow/index.js +12 -0
  41. package/build/esm/components/DatePicker/index.js +24 -0
  42. package/build/esm/components/Description/index.js +12 -0
  43. package/build/esm/components/Enumeration/index.js +25 -0
  44. package/build/esm/components/EnumerationWrapper/index.js +13 -0
  45. package/build/esm/components/ErrorMessage/index.js +13 -0
  46. package/build/esm/components/Fonts/index.js +31 -0
  47. package/build/esm/components/GlobalStyle/index.js +7 -0
  48. package/build/esm/components/Header/index.js +13 -0
  49. package/build/esm/components/HeaderActions/index.js +12 -0
  50. package/build/esm/components/HeaderTitle/index.js +13 -0
  51. package/build/esm/components/Icon/index.js +16 -0
  52. package/build/esm/components/IconText/index.js +9 -0
  53. package/build/esm/components/IconWrapper/index.js +16 -0
  54. package/build/esm/components/InputNumber/index.js +14 -0
  55. package/build/esm/components/InputText/index.js +24 -0
  56. package/build/esm/components/InputWrapper/index.js +13 -0
  57. package/build/esm/components/Label/index.js +13 -0
  58. package/build/esm/components/Links/index.js +13 -0
  59. package/build/esm/components/List/index.js +13 -0
  60. package/build/esm/components/ListHeader/index.js +11 -0
  61. package/build/esm/components/ListRow/index.js +11 -0
  62. package/build/esm/components/ListSubtitle/index.js +12 -0
  63. package/build/esm/components/ListTitle/index.js +13 -0
  64. package/build/esm/components/LoadingBar/index.js +14 -0
  65. package/build/esm/components/LoadingIndicator/index.js +69 -0
  66. package/build/esm/components/Option/index.js +37 -0
  67. package/build/esm/components/Paging/index.js +13 -0
  68. package/build/esm/components/Select/index.js +14 -0
  69. package/build/esm/components/Tab/index.js +30 -0
  70. package/build/esm/components/Table/index.js +13 -0
  71. package/build/esm/components/TableRowEmpty/index.js +13 -0
  72. package/build/esm/components/Textarea/index.js +13 -0
  73. package/build/esm/components/TimeList/index.js +13 -0
  74. package/build/esm/components/TimePicker/index.js +20 -0
  75. package/build/esm/components/TimePickerWrapper/index.js +13 -0
  76. package/build/esm/components/Toggle/index.js +25 -0
  77. package/build/esm/components/ToggleWrapper/index.js +13 -0
  78. package/build/esm/components/Tooltip/index.js +28 -0
  79. package/build/esm/index.js +46 -0
  80. package/build/index.js +8 -0
  81. package/package.json +113 -0
  82. package/src/assets/fonts/lato/Lato-Black.ttf +0 -0
  83. package/src/assets/fonts/lato/Lato-Black.woff +0 -0
  84. package/src/assets/fonts/lato/Lato-Black.woff2 +0 -0
  85. package/src/assets/fonts/lato/Lato-Bold.ttf +0 -0
  86. package/src/assets/fonts/lato/Lato-Bold.woff +0 -0
  87. package/src/assets/fonts/lato/Lato-Bold.woff2 +0 -0
  88. package/src/assets/fonts/lato/Lato-Regular.ttf +0 -0
  89. package/src/assets/fonts/lato/Lato-Regular.woff +0 -0
  90. package/src/assets/fonts/lato/Lato-Regular.woff2 +0 -0
  91. package/src/assets/fonts/lato/Lato-SemiBold.ttf +0 -0
  92. package/src/assets/fonts/lato/Lato-SemiBold.woff +0 -0
  93. package/src/assets/fonts/lato/Lato-SemiBold.woff2 +0 -0
  94. package/src/assets/icons/icon_select.svg +1 -0
  95. package/src/assets/icons/icon_trash.svg +1 -0
  96. package/src/assets/styles/colors.js +92 -0
  97. package/src/assets/styles/mixins.js +45 -0
  98. package/src/assets/styles/sizes.js +87 -0
  99. package/src/components/Button/PrefixIcon.js +11 -0
  100. package/src/components/Button/index.js +122 -0
  101. package/src/components/Button/tests/__snapshots__/index.test.js.snap +169 -0
  102. package/src/components/Button/tests/index.test.js +91 -0
  103. package/src/components/Card/index.js +73 -0
  104. package/src/components/Checkbox/index.js +141 -0
  105. package/src/components/Checkbox/tests/Checkbox.test.js +19 -0
  106. package/src/components/Checkbox/tests/__snapshots__/Checkbox.test.js.snap +71 -0
  107. package/src/components/CheckboxWrapper/index.js +100 -0
  108. package/src/components/CustomRow/index.js +21 -0
  109. package/src/components/DatePicker/index.js +280 -0
  110. package/src/components/DatePicker/tests/Datepicker.test.js +12 -0
  111. package/src/components/Description/index.js +17 -0
  112. package/src/components/Enumeration/index.js +40 -0
  113. package/src/components/Enumeration/tests/Enumeration.test.js +12 -0
  114. package/src/components/EnumerationWrapper/index.js +47 -0
  115. package/src/components/ErrorMessage/index.js +18 -0
  116. package/src/components/Fonts/index.js +83 -0
  117. package/src/components/GlobalStyle/index.js +68 -0
  118. package/src/components/Header/index.js +73 -0
  119. package/src/components/Header/tests/__snapshots__/index.test.js.snap +75 -0
  120. package/src/components/Header/tests/index.test.js +18 -0
  121. package/src/components/HeaderActions/index.js +30 -0
  122. package/src/components/HeaderActions/tests/__snapshots__/index.test.js.snap +34 -0
  123. package/src/components/HeaderActions/tests/index.test.js +19 -0
  124. package/src/components/HeaderTitle/index.js +47 -0
  125. package/src/components/HeaderTitle/tests/__snapshots__/index.test.js.snap +39 -0
  126. package/src/components/HeaderTitle/tests/index.test.js +19 -0
  127. package/src/components/Icon/index.js +17 -0
  128. package/src/components/IconText/index.js +18 -0
  129. package/src/components/IconWrapper/index.js +29 -0
  130. package/src/components/InputNumber/index.js +209 -0
  131. package/src/components/InputNumber/tests/index.test.js +12 -0
  132. package/src/components/InputText/index.js +70 -0
  133. package/src/components/InputText/tests/index.test.js +39 -0
  134. package/src/components/InputWrapper/index.js +57 -0
  135. package/src/components/Label/index.js +18 -0
  136. package/src/components/Label/tests/index.test.js +12 -0
  137. package/src/components/Links/index.js +35 -0
  138. package/src/components/List/index.js +85 -0
  139. package/src/components/ListHeader/index.js +13 -0
  140. package/src/components/ListHeader/tests/index.test.js +12 -0
  141. package/src/components/ListRow/index.js +17 -0
  142. package/src/components/ListRow/tests/index.test.js +12 -0
  143. package/src/components/ListSubtitle/index.js +17 -0
  144. package/src/components/ListSubtitle/tests/index.test.js +12 -0
  145. package/src/components/ListTitle/index.js +20 -0
  146. package/src/components/ListTitle/tests/index.test.js +12 -0
  147. package/src/components/LoadingBar/index.js +41 -0
  148. package/src/components/LoadingBar/tests/index.test.js +19 -0
  149. package/src/components/LoadingIndicator/index.js +81 -0
  150. package/src/components/Option/index.js +39 -0
  151. package/src/components/Option/tests/__snapshots__/index.test.js.snap +29 -0
  152. package/src/components/Option/tests/index.test.js +16 -0
  153. package/src/components/Paging/index.js +68 -0
  154. package/src/components/Select/index.js +54 -0
  155. package/src/components/Select/tests/index.test.js +12 -0
  156. package/src/components/Tab/index.js +78 -0
  157. package/src/components/Table/index.js +147 -0
  158. package/src/components/TableRowEmpty/index.js +28 -0
  159. package/src/components/Textarea/index.js +50 -0
  160. package/src/components/Textarea/tests/__snapshots__/index.test.js.snap +71 -0
  161. package/src/components/Textarea/tests/index.test.js +33 -0
  162. package/src/components/TimeList/index.js +78 -0
  163. package/src/components/TimePicker/index.js +59 -0
  164. package/src/components/TimePickerWrapper/index.js +57 -0
  165. package/src/components/Toggle/index.js +82 -0
  166. package/src/components/Toggle/tests/index.test.js +12 -0
  167. package/src/components/ToggleWrapper/index.js +36 -0
  168. package/src/components/Tooltip/index.js +34 -0
  169. package/src/index.js +47 -0
  170. package/webfonts/Lato-Black.ttf +0 -0
  171. package/webfonts/Lato-Black.woff +0 -0
  172. package/webfonts/Lato-Black.woff2 +0 -0
  173. package/webfonts/Lato-Bold.ttf +0 -0
  174. package/webfonts/Lato-Bold.woff +0 -0
  175. package/webfonts/Lato-Bold.woff2 +0 -0
  176. package/webfonts/Lato-Regular.ttf +0 -0
  177. package/webfonts/Lato-Regular.woff +0 -0
  178. package/webfonts/Lato-Regular.woff2 +0 -0
  179. package/webfonts/Lato-SemiBold.ttf +0 -0
  180. package/webfonts/Lato-SemiBold.woff +0 -0
  181. package/webfonts/Lato-SemiBold.woff2 +0 -0
@@ -0,0 +1,100 @@
1
+ /**
2
+ *
3
+ * CheckboxWrapper
4
+ *
5
+ */
6
+
7
+ import styled from 'styled-components';
8
+ import PropTypes from 'prop-types';
9
+ import sizes from '../../assets/styles/sizes';
10
+ import colors from '../../assets/styles/colors';
11
+
12
+ const CheckboxWrapper = styled.div`
13
+ position: relative;
14
+ display: flex;
15
+ align-items: flex-start;
16
+ gap: ${sizes.margin}px;
17
+ padding: ${({ hasSpacing }) =>
18
+ hasSpacing ? `${sizes.spacing.sm}px 0` : '0'};
19
+ width: 100%;
20
+
21
+ .checkbox-container {
22
+ display: inline-flex;
23
+ align-items: flex-start;
24
+ min-height: ${sizes.checkbox.height};
25
+ position: relative;
26
+ flex: 1;
27
+ }
28
+
29
+ input[type='checkbox'] {
30
+ margin: 0;
31
+ flex-shrink: 0;
32
+ }
33
+
34
+ label {
35
+ display: inline-block;
36
+ width: fit-content;
37
+ max-width: calc(100% - ${sizes.checkbox.width} - ${sizes.margin}px);
38
+ margin: 0;
39
+ padding-top: 1px;
40
+ line-height: 1.4;
41
+ cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
42
+ color: ${({ disabled }) => (disabled ? colors.brightGrey : colors.blueTxt)};
43
+ transition: color 0.2s ease;
44
+ word-break: break-word;
45
+ hyphens: auto;
46
+ }
47
+
48
+ ${({ error }) =>
49
+ error &&
50
+ `
51
+ input[type="checkbox"]:before {
52
+ border-color: ${colors.darkOrange} !important;
53
+ }
54
+
55
+ .error-message {
56
+ color: ${colors.darkOrange};
57
+ font-size: 1.2rem;
58
+ margin-top: ${sizes.spacing.xs}px;
59
+ display: block;
60
+ width: 100%;
61
+ }
62
+ `}
63
+
64
+ .helper-text {
65
+ color: ${colors.greySubtitle};
66
+ font-size: 1.2rem;
67
+ margin-top: ${sizes.spacing.xs}px;
68
+ display: block;
69
+ width: 100%;
70
+ }
71
+
72
+ &.checkbox-group {
73
+ flex-direction: column;
74
+ gap: ${sizes.spacing.sm}px;
75
+
76
+ .checkbox-container {
77
+ width: 100%;
78
+ }
79
+ }
80
+
81
+ @media (max-width: ${sizes.tablet}) {
82
+ label {
83
+ max-width: calc(100% - ${sizes.checkbox.width} - ${sizes.margin / 2}px);
84
+ }
85
+ }
86
+ `;
87
+
88
+ CheckboxWrapper.defaultProps = {
89
+ disabled: false,
90
+ error: null,
91
+ hasSpacing: true,
92
+ };
93
+
94
+ CheckboxWrapper.propTypes = {
95
+ disabled: PropTypes.bool,
96
+ error: PropTypes.string,
97
+ hasSpacing: PropTypes.bool,
98
+ };
99
+
100
+ export default CheckboxWrapper;
@@ -0,0 +1,21 @@
1
+ /**
2
+ *
3
+ * CustomRow
4
+ *
5
+ */
6
+
7
+ import styled from 'styled-components';
8
+
9
+ import colors from '../../assets/styles/colors';
10
+
11
+ const CustomRow = styled.tr`
12
+ background-color: transparent;
13
+ cursor: pointer;
14
+ transition: background-color 0.15s ease;
15
+
16
+ &:hover {
17
+ background-color: ${colors.greyHover};
18
+ }
19
+ `;
20
+
21
+ export default CustomRow;
@@ -0,0 +1,280 @@
1
+ /**
2
+ *
3
+ * DatePicker
4
+ *
5
+ */
6
+
7
+ import styled from 'styled-components';
8
+ import PropTypes from 'prop-types';
9
+ import 'react-dates/lib/css/_datepicker.css';
10
+ import colors from '../../assets/styles/colors';
11
+ import sizes from '../../assets/styles/sizes';
12
+
13
+ const DatePicker = styled.div`
14
+ position: relative;
15
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
16
+ 'Helvetica Neue', Arial, sans-serif;
17
+
18
+ ${({ isOpen }) =>
19
+ isOpen &&
20
+ `
21
+ z-index: 999;
22
+ `}
23
+
24
+ * {
25
+ outline: 0;
26
+ box-sizing: border-box;
27
+ }
28
+
29
+ /* Input field styling */
30
+ .DateInput {
31
+ width: 100%;
32
+ position: relative;
33
+ transition: all 0.2s ease;
34
+ }
35
+
36
+ /* Calendar icon */
37
+ svg.fa-calendar-alt {
38
+ font-size: 16px;
39
+ color: ${colors.greyIconBkgd};
40
+ position: absolute;
41
+ left: 12px;
42
+ top: 50%;
43
+ transform: translateY(-50%);
44
+ z-index: 2;
45
+ transition: color 0.2s ease;
46
+ }
47
+
48
+ /* Input styling */
49
+ input {
50
+ font-weight: ${sizes.fontWeight.regular};
51
+ position: relative;
52
+ z-index: 1;
53
+ width: 100%;
54
+ height: ${sizes.input.height};
55
+ padding: 0 ${sizes.input.padding};
56
+ font-size: ${sizes.input.fontSize};
57
+ cursor: pointer;
58
+ border: 1px solid ${colors.lightGrey};
59
+ border-radius: 8px;
60
+ color: ${colors.black};
61
+ background-color: ${colors.white};
62
+ padding-left: 42px;
63
+ transition: all 0.2s ease;
64
+
65
+ &:hover {
66
+ border-color: ${colors.blueBorder};
67
+ }
68
+
69
+ &::-webkit-input-placeholder {
70
+ color: ${colors.greyPlaceholder};
71
+ }
72
+
73
+ &:disabled {
74
+ background-color: ${colors.greyIconBkgd}20;
75
+ cursor: not-allowed;
76
+ opacity: 0.7;
77
+ }
78
+
79
+ &:focus {
80
+ border-color: ${colors.blueBorder};
81
+ box-shadow: 0 0 0 3px ${colors.blueBorder}20;
82
+ }
83
+ }
84
+
85
+ /* Calendar container styling */
86
+ .SingleDatePicker,
87
+ .SingleDatePickerInput__withBorder {
88
+ width: 100%;
89
+ }
90
+
91
+ .SingleDatePickerInput__withBorder {
92
+ border: 0;
93
+ }
94
+
95
+ .DateInput_input__focused {
96
+ border-color: ${colors.blueBorder};
97
+ }
98
+
99
+ /* Calendar header styling */
100
+ .DayPicker_weekHeader {
101
+ color: ${colors.black};
102
+ border-top: 1px solid ${colors.lightGrey}40;
103
+ margin-top: -10px;
104
+ padding: 0 8px;
105
+
106
+ li {
107
+ padding: 12px 0;
108
+ small {
109
+ font-size: 1.3rem;
110
+ font-weight: 600;
111
+ color: ${colors.greyIconBkgd};
112
+ }
113
+ }
114
+ }
115
+
116
+ /* Calendar popup styling */
117
+ .DayPicker__withBorder {
118
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
119
+ 0 2px 4px -1px rgba(0, 0, 0, 0.06);
120
+ border: 1px solid ${colors.lightGrey}20;
121
+ border-radius: 8px;
122
+ background: ${colors.white};
123
+ position: absolute;
124
+ overflow: hidden;
125
+ }
126
+
127
+ .DateInput_fang {
128
+ display: none;
129
+ }
130
+
131
+ /* Month caption styling */
132
+ .CalendarMonth_caption {
133
+ font-size: 1.4rem;
134
+ font-weight: 600;
135
+ padding: 24px 0;
136
+ color: ${colors.black};
137
+ }
138
+
139
+ .DayPicker_transitionContainer {
140
+ padding: 4px;
141
+ }
142
+
143
+ .DayPickerKeyboardShortcuts_show {
144
+ display: none;
145
+ }
146
+
147
+ /* Navigation buttons styling */
148
+ .DayPickerNavigation {
149
+ div[role='button'] {
150
+ font-size: 24px;
151
+ width: 40px;
152
+ height: 40px;
153
+ color: ${colors.black};
154
+ border-radius: 50%;
155
+ text-align: center;
156
+ top: 18px;
157
+ display: flex;
158
+ align-items: center;
159
+ justify-content: center;
160
+ transition: all 0.2s ease;
161
+
162
+ &::before {
163
+ line-height: 1;
164
+ }
165
+
166
+ &.DayPickerNavigation_leftButton__horizontalDefault {
167
+ left: 22px;
168
+ &::before {
169
+ content: '‹';
170
+ }
171
+ }
172
+
173
+ &.DayPickerNavigation_rightButton__horizontalDefault {
174
+ right: 22px;
175
+ &::before {
176
+ content: '›';
177
+ }
178
+ }
179
+
180
+ svg {
181
+ display: none;
182
+ }
183
+
184
+ &:hover {
185
+ background: ${colors.lightGrey}20;
186
+ color: ${colors.blueBorder};
187
+ }
188
+ }
189
+ }
190
+
191
+ /* Date cells styling */
192
+ td {
193
+ position: relative;
194
+ cursor: pointer;
195
+ width: 40px;
196
+ height: 40px;
197
+ font-size: 1.4rem;
198
+ border-radius: 50%;
199
+ transition: all 0.2s ease;
200
+
201
+ &,
202
+ &.CalendarDay__selected,
203
+ &.CalendarDay__selected:active,
204
+ &.CalendarDay__selected:hover,
205
+ &.CalendarDay__default:hover {
206
+ border: 0;
207
+ }
208
+
209
+ &.CalendarDay__default:hover {
210
+ background: ${colors.lightGrey}20;
211
+ color: ${colors.black};
212
+ }
213
+
214
+ &.CalendarDay__today {
215
+ font-weight: 600;
216
+ color: ${colors.blueBorder};
217
+
218
+ &::before {
219
+ content: '';
220
+ position: absolute;
221
+ bottom: 4px;
222
+ left: 50%;
223
+ transform: translateX(-50%);
224
+ width: 4px;
225
+ height: 4px;
226
+ border-radius: 50%;
227
+ background: ${colors.blueBorder};
228
+ }
229
+ }
230
+
231
+ &.CalendarDay__selected {
232
+ background-color: ${colors.blueBorder};
233
+ color: ${colors.white};
234
+ font-weight: 600;
235
+ transform: scale(0.9);
236
+
237
+ &:hover {
238
+ background-color: ${colors.blueBorder};
239
+ }
240
+
241
+ &.CalendarDay__today {
242
+ &::before {
243
+ background: ${colors.white};
244
+ }
245
+ }
246
+ }
247
+
248
+ &.CalendarDay__blocked_out_of_range {
249
+ color: ${colors.lightGrey};
250
+ cursor: not-allowed;
251
+
252
+ &:hover {
253
+ background: none;
254
+ }
255
+ }
256
+ }
257
+
258
+ /* Mobile optimization */
259
+ @media (max-width: ${sizes.tablet}) {
260
+ .DayPicker__withBorder {
261
+ left: 50% !important;
262
+ transform: translateX(-50%);
263
+ width: calc(100vw - 32px);
264
+ }
265
+
266
+ td {
267
+ height: 48px;
268
+ }
269
+ }
270
+ `;
271
+
272
+ DatePicker.defaultProps = {
273
+ isOpen: false,
274
+ };
275
+
276
+ DatePicker.propTypes = {
277
+ isOpen: PropTypes.bool,
278
+ };
279
+
280
+ export default DatePicker;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { shallow } from 'enzyme';
3
+
4
+ import Datepicker from '../index';
5
+
6
+ const renderComponent = () => shallow(<Datepicker />);
7
+
8
+ describe('<Datepicker />', () => {
9
+ it('should not crash', () => {
10
+ renderComponent();
11
+ });
12
+ });
@@ -0,0 +1,17 @@
1
+ /**
2
+ *
3
+ * Description
4
+ *
5
+ */
6
+
7
+ import styled from 'styled-components';
8
+ import colors from '../../assets/styles/colors';
9
+
10
+ const Description = styled.p`
11
+ color: ${colors.greySubtitle};
12
+ font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
13
+ font-size: 1.2rem;
14
+ line-height: 1.6;
15
+ `;
16
+
17
+ export default Description;
@@ -0,0 +1,40 @@
1
+ /**
2
+ *
3
+ * Enumeration
4
+ *
5
+ */
6
+
7
+ import styled from 'styled-components';
8
+ import PropTypes from 'prop-types';
9
+
10
+ import colors from '../../assets/styles/colors';
11
+ import sizes from '../../assets/styles/sizes';
12
+
13
+ const Enumeration = styled.input`
14
+ position: absolute;
15
+ top: 0;
16
+ left: 0;
17
+ width: 100%;
18
+ height: 100%;
19
+ cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
20
+ margin: 0;
21
+ opacity: 0;
22
+ &:checked + span {
23
+ background-image: ${colors.blueGradient};
24
+ color: ${colors.white};
25
+ box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.1);
26
+ font-weight: ${sizes.fontWeight.bold};
27
+ }
28
+ `;
29
+
30
+ Enumeration.defaultProps = {
31
+ disabled: false,
32
+ type: 'radio',
33
+ };
34
+
35
+ Enumeration.propTypes = {
36
+ disabled: PropTypes.bool,
37
+ type: PropTypes.string,
38
+ };
39
+
40
+ export default Enumeration;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { shallow } from 'enzyme';
3
+
4
+ import Enumeration from '../index';
5
+
6
+ const renderComponent = () => shallow(<Enumeration />);
7
+
8
+ describe('<Enumeration />', () => {
9
+ it('should not crash', () => {
10
+ renderComponent();
11
+ });
12
+ });
@@ -0,0 +1,47 @@
1
+ /**
2
+ *
3
+ * EnumerationWrapper
4
+ *
5
+ */
6
+
7
+ import styled from 'styled-components';
8
+
9
+ import colors from '../../assets/styles/colors';
10
+ import sizes from '../../assets/styles/sizes';
11
+
12
+ const EnumerationWrapper = styled.div`
13
+ display: flex;
14
+ width: fit-content;
15
+ height: 34px;
16
+ border: 1px solid ${colors.lightGrey};
17
+ border-radius: ${sizes.borderRadiusSm};
18
+ background-color: ${colors.white};
19
+ overflow: hidden;
20
+
21
+ label {
22
+ position: relative;
23
+ display: inline-block;
24
+ height: 100%;
25
+ width: fit-content;
26
+ color: ${colors.brightGrey};
27
+
28
+ span {
29
+ display: inline-block;
30
+ padding: 0 1.5rem;
31
+ line-height: 32px;
32
+ margin: auto;
33
+ letter-spacing: 0.65px;
34
+ font-size: 1.2rem;
35
+ font-weight: ${sizes.fontWeight.semiBold};
36
+ text-transform: uppercase;
37
+ }
38
+
39
+ &:not(:last-of-type) {
40
+ span {
41
+ border-right: 1px solid ${colors.lightGrey};
42
+ }
43
+ }
44
+ }
45
+ `;
46
+
47
+ export default EnumerationWrapper;
@@ -0,0 +1,18 @@
1
+ /**
2
+ *
3
+ * ErrorMessage
4
+ *
5
+ */
6
+
7
+ import styled from 'styled-components';
8
+
9
+ import colors from '../../assets/styles/colors';
10
+ import sizes from '../../assets/styles/sizes';
11
+
12
+ const ErrorMessage = styled.p`
13
+ font-size: ${sizes.input.fontSize};
14
+ color: ${colors.darkOrange};
15
+ margin-top: 0.25rem;
16
+ `;
17
+
18
+ export default ErrorMessage;
@@ -0,0 +1,83 @@
1
+ import { createGlobalStyle } from 'styled-components';
2
+ import faBrandsLight from '@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff';
3
+ import faBrandsLight2 from '@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2';
4
+ import faRegularLight from '@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff';
5
+ import faRegularLight2 from '@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2';
6
+ import faSolidHeavy from '@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff';
7
+ import faSolidHeavy2 from '@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2';
8
+
9
+ /* Lato Regular */
10
+ import latoRegular from '../../assets/fonts/lato/Lato-Regular.ttf';
11
+ import latoRegularWoff from '../../assets/fonts/lato/Lato-Regular.woff';
12
+ import latoRegularWoff2 from '../../assets/fonts/lato/Lato-Regular.woff2';
13
+
14
+ /* Lato SemiBold */
15
+ import latoSemiBold from '../../assets/fonts/lato/Lato-SemiBold.ttf';
16
+ import latoSemiBoldWoff from '../../assets/fonts/lato/Lato-SemiBold.woff';
17
+ import latoSemiBoldWoff2 from '../../assets/fonts/lato/Lato-SemiBold.woff2';
18
+
19
+ /* Lato Bold */
20
+ import latoBold from '../../assets/fonts/lato/Lato-Bold.ttf';
21
+ import latoBoldWoff from '../../assets/fonts/lato/Lato-Bold.woff';
22
+ import latoBoldWoff2 from '../../assets/fonts/lato/Lato-Bold.woff2';
23
+
24
+ /* Lato Black */
25
+ import latoBlack from '../../assets/fonts/lato/Lato-Black.ttf';
26
+ import latoBlackWoff from '../../assets/fonts/lato/Lato-Black.woff';
27
+ import latoBlackWoff2 from '../../assets/fonts/lato/Lato-Black.woff2';
28
+
29
+ const Font = createGlobalStyle`
30
+ @font-face {
31
+ font-family: 'FontAwesome';
32
+ src: url(${faBrandsLight2}) format("woff2"), url(${faBrandsLight}) format("woff");
33
+ font-weight: 400;
34
+ font-style: normal;
35
+ };
36
+
37
+ @font-face {
38
+ font-family: 'FontAwesome';
39
+ src: url(${faRegularLight2}) format("woff2"), url(${faRegularLight}) format("woff");
40
+ font-weight: 400;
41
+ font-style: normal;
42
+ };
43
+
44
+ @font-face {
45
+ font-family: 'FontAwesome';
46
+ src: url(${faSolidHeavy2}) format("woff2"), url(${faSolidHeavy}) format("woff");
47
+ font-weight: 400;
48
+ font-style: normal;
49
+ };
50
+
51
+ /* Lato Regular - 400 */
52
+ @font-face {
53
+ font-family: 'Lato';
54
+ src: url(${latoRegularWoff2}) format('woff2'), url(${latoRegularWoff}) format('woff'), url(${latoRegular}) format('truetype');
55
+ font-weight: 400;
56
+ font-style: normal;
57
+ };
58
+
59
+ /* Lato Semi-Bold - 500 */
60
+ @font-face {
61
+ font-family: 'Lato';
62
+ src: url(${latoSemiBoldWoff2}) format('woff2'), url(${latoSemiBoldWoff}) format('woff'), url(${latoSemiBold}) format('truetype');
63
+ font-weight: 500;
64
+ font-style: normal;
65
+ };
66
+
67
+ /* Lato Bold - 600 */
68
+ @font-face {
69
+ font-family: 'Lato';
70
+ src: url(${latoBoldWoff2}) format('woff2'), url(${latoBoldWoff}) format('woff'), url(${latoBold}) format('truetype');
71
+ font-weight: 600;
72
+ font-style: normal;
73
+ };
74
+
75
+ /* Lato Black - 900 */
76
+ @font-face {
77
+ font-family: 'Lato';
78
+ src: url(${latoBlackWoff2}) format('woff2'), url(${latoBlackWoff}) format('woff'), url(${latoBlack}) format('truetype');
79
+ font-weight: 900;
80
+ font-style: normal;
81
+ };`;
82
+
83
+ export default Font;
@@ -0,0 +1,68 @@
1
+ import { createGlobalStyle } from 'styled-components';
2
+
3
+ import mixins from '../../assets/styles/mixins';
4
+ import colors from '../../assets/styles/colors';
5
+
6
+ const GlobalStyle = createGlobalStyle`
7
+ *, *::before, *::after {
8
+ ${mixins().bbox}
9
+ }
10
+
11
+ html {
12
+ font-size: 62.5%;
13
+ -webkit-text-size-adjust: 100%;
14
+ }
15
+
16
+ html, body {
17
+ -webkit-font-smoothing: antialiased;
18
+ -moz-osx-font-smoothing: grayscale;
19
+ }
20
+
21
+ body {
22
+ background-color: ${colors.greyIconBkgd};
23
+ line-height: 1.5;
24
+ }
25
+
26
+ p {
27
+ margin: 0;
28
+ }
29
+
30
+ a, button {
31
+ cursor: pointer;
32
+ outline: 0;
33
+ }
34
+
35
+ a:focus-visible,
36
+ button:focus-visible {
37
+ outline: 2px solid ${colors.blue};
38
+ outline-offset: 2px;
39
+ }
40
+
41
+ h1, h2, h3, p, label, button, input, textarea {
42
+ font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
43
+ }
44
+
45
+ input:-webkit-autofill,
46
+ input:-webkit-autofill:hover,
47
+ input:-webkit-autofill:focus,
48
+ input:-webkit-autofill:active {
49
+ -webkit-transition: color 9999s ease-out, background-color 9999s ease-out;
50
+ transition-delay: 9999s;
51
+ }
52
+
53
+ ul {
54
+ list-style: none;
55
+ padding: 0;
56
+ margin: 0;
57
+ }
58
+
59
+ @media (prefers-reduced-motion: reduce) {
60
+ *, *::before, *::after {
61
+ animation-duration: 0.01ms !important;
62
+ animation-iteration-count: 1 !important;
63
+ transition-duration: 0.01ms !important;
64
+ }
65
+ }
66
+ `;
67
+
68
+ export default GlobalStyle;