@popsure/dirty-swan 20.0.11 → 27.0.2

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 (288) hide show
  1. package/Readme.md +10 -1
  2. package/dist/assets/checkmark.svg +1 -1
  3. package/dist/assets/icon-form-dropdown.svg +1 -1
  4. package/dist/index.css +1169 -137
  5. package/dist/index.css.map +1 -1
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +8453 -13347
  8. package/dist/index.js.map +1 -1
  9. package/dist/lib/components/button/index.d.ts +1 -1
  10. package/dist/lib/components/cards/cardButton/index.d.ts +16 -0
  11. package/dist/lib/components/cards/cardWithLeftIcon/index.d.ts +2 -2
  12. package/dist/lib/components/cards/cardWithTopIcon/index.d.ts +2 -2
  13. package/dist/lib/components/cards/cardWithTopLeftIcon/index.d.ts +2 -2
  14. package/dist/lib/components/cards/icons/index.d.ts +2 -1
  15. package/dist/lib/components/cards/index.d.ts +3 -2
  16. package/dist/lib/components/comparisonTable/components/Chevron.d.ts +5 -0
  17. package/dist/lib/components/comparisonTable/components/Row/index.d.ts +12 -0
  18. package/dist/lib/components/comparisonTable/components/TableArrows/Arrow.d.ts +5 -0
  19. package/dist/lib/components/comparisonTable/components/TableArrows/index.d.ts +9 -0
  20. package/dist/lib/components/comparisonTable/components/TableInfoButton/index.d.ts +6 -0
  21. package/dist/lib/components/comparisonTable/components/TableRating/StarIcon.d.ts +5 -0
  22. package/dist/lib/components/comparisonTable/components/TableRating/ZapIcon.d.ts +5 -0
  23. package/dist/lib/components/comparisonTable/components/TableRating/index.d.ts +8 -0
  24. package/dist/lib/components/comparisonTable/components/TableRowHeader/index.d.ts +8 -0
  25. package/dist/lib/components/comparisonTable/components/TableTrueFalse.d.ts +6 -0
  26. package/dist/lib/components/comparisonTable/hooks/useActiveTableArrows.d.ts +10 -0
  27. package/dist/lib/components/comparisonTable/index.d.ts +45 -0
  28. package/dist/lib/components/downloadButton/index.d.ts +10 -0
  29. package/dist/lib/components/input/autoSuggestInput/index.d.ts +2 -1
  30. package/dist/lib/components/input/autoSuggestMultiSelect/index.d.ts +2 -1
  31. package/dist/lib/components/input/index.d.ts +3 -3
  32. package/dist/lib/components/modal/bottomModal/index.d.ts +1 -1
  33. package/dist/lib/components/modal/hooks/useOnClose.d.ts +7 -0
  34. package/dist/lib/components/modal/index.d.ts +2 -0
  35. package/dist/lib/components/modal/regularModal/index.d.ts +1 -1
  36. package/dist/lib/components/segmentedControl/index.d.ts +12 -0
  37. package/dist/lib/index.d.ts +7 -2
  38. package/dist/lib/models/download.d.ts +1 -0
  39. package/dist/lib/scss/private/_reset.scss +10 -1
  40. package/dist/lib/scss/private/base/_border_radius.scss +15 -0
  41. package/dist/lib/scss/private/base/_display.scss +4 -0
  42. package/dist/lib/scss/private/base/_grid.scss +44 -0
  43. package/dist/lib/scss/private/base/_index.scss +2 -0
  44. package/dist/lib/scss/private/base/_spacing.scss +64 -18
  45. package/dist/lib/scss/private/base/_typography.scss +7 -0
  46. package/dist/lib/scss/private/base/demo.tsx +4 -0
  47. package/dist/lib/scss/private/base/flex/_flex.scss +63 -0
  48. package/dist/lib/scss/private/base/flex/style.module.scss +24 -0
  49. package/dist/lib/scss/private/base/style.module.scss +10 -0
  50. package/dist/lib/scss/private/components/_buttons.scss +4 -4
  51. package/dist/lib/scss/private/components/_input.scss +6 -4
  52. package/dist/lib/scss/private/components/_notices.scss +13 -1
  53. package/dist/lib/scss/private/components/assets/checkmark.svg +1 -1
  54. package/dist/lib/scss/private/components/assets/icon-form-dropdown.svg +1 -1
  55. package/dist/lib/scss/public/colors/default.scss +38 -0
  56. package/dist/lib/scss/public/demo.tsx +109 -22
  57. package/package.json +6 -3
  58. package/src/App.tsx +50 -0
  59. package/src/bin/index.ts +71 -0
  60. package/src/bin/tsconfig.json +13 -0
  61. package/src/bin/util/index.test.ts +85 -0
  62. package/src/bin/util/index.ts +132 -0
  63. package/src/bin/util/test/data.json +13 -0
  64. package/src/colors.scss +1 -0
  65. package/src/font-weight.scss +1 -0
  66. package/src/grid.scss +1 -0
  67. package/src/index.tsx +37 -0
  68. package/src/intro.stories.mdx +41 -0
  69. package/src/lib/components/autocompleteAddress/demo.tsx +38 -0
  70. package/src/lib/components/autocompleteAddress/index.stories.mdx +44 -0
  71. package/src/lib/components/autocompleteAddress/index.tsx +327 -0
  72. package/src/lib/components/autocompleteAddress/mapStyle.ts +187 -0
  73. package/src/lib/components/autocompleteAddress/style.module.scss +82 -0
  74. package/src/lib/components/autocompleteAddress/util/index.test.ts +51 -0
  75. package/src/lib/components/autocompleteAddress/util/index.ts +59 -0
  76. package/src/lib/components/button/icons/index.ts +14 -0
  77. package/src/lib/components/button/icons/send-purple.svg +4 -0
  78. package/src/lib/components/button/icons/send-white.svg +4 -0
  79. package/src/lib/components/button/index.stories.mdx +121 -0
  80. package/src/lib/components/button/index.tsx +64 -0
  81. package/src/lib/components/button/styles.module.scss +5 -0
  82. package/src/lib/components/cards/a.stories.mdx +44 -0
  83. package/src/lib/components/cards/cardButton/index.stories.mdx +47 -0
  84. package/src/lib/components/cards/cardButton/index.tsx +61 -0
  85. package/src/lib/components/cards/cardButton/style.module.scss +33 -0
  86. package/src/lib/components/cards/cardWithLeftIcon/index.stories.mdx +103 -0
  87. package/src/lib/components/cards/cardWithLeftIcon/index.tsx +87 -0
  88. package/src/lib/components/cards/cardWithLeftIcon/style.module.scss +23 -0
  89. package/src/lib/components/cards/cardWithTopIcon/index.stories.mdx +105 -0
  90. package/src/lib/components/cards/cardWithTopIcon/index.tsx +60 -0
  91. package/src/lib/components/cards/cardWithTopIcon/style.module.scss +10 -0
  92. package/src/lib/components/cards/cardWithTopLeftIcon/index.stories.mdx +101 -0
  93. package/src/lib/components/cards/cardWithTopLeftIcon/index.tsx +72 -0
  94. package/src/lib/components/cards/cardWithTopLeftIcon/style.module.scss +21 -0
  95. package/src/lib/components/cards/icons/arrow-right.svg +4 -0
  96. package/src/lib/components/cards/icons/chevron-right.svg +3 -0
  97. package/src/lib/components/cards/icons/feather-logo.svg +10 -0
  98. package/src/lib/components/cards/icons/index.ts +36 -0
  99. package/src/lib/components/cards/icons/info.svg +12 -0
  100. package/src/lib/components/cards/index.test.ts +37 -0
  101. package/src/lib/components/cards/index.tsx +57 -0
  102. package/src/lib/components/cards/infoCard/index.stories.mdx +61 -0
  103. package/src/lib/components/cards/infoCard/index.tsx +47 -0
  104. package/src/lib/components/cards/infoCard/style.module.scss +53 -0
  105. package/src/lib/components/chip/icons/remove-button-highlighted.svg +4 -0
  106. package/src/lib/components/chip/icons/remove-button.svg +4 -0
  107. package/src/lib/components/chip/index.stories.mdx +101 -0
  108. package/src/lib/components/chip/index.tsx +38 -0
  109. package/src/lib/components/chip/style.module.scss +54 -0
  110. package/src/lib/components/comparisonTable/components/Chevron.tsx +19 -0
  111. package/src/lib/components/comparisonTable/components/Row/index.tsx +68 -0
  112. package/src/lib/components/comparisonTable/components/Row/style.module.scss +114 -0
  113. package/src/lib/components/comparisonTable/components/TableArrows/Arrow.tsx +19 -0
  114. package/src/lib/components/comparisonTable/components/TableArrows/index.tsx +52 -0
  115. package/src/lib/components/comparisonTable/components/TableArrows/style.module.scss +53 -0
  116. package/src/lib/components/comparisonTable/components/TableInfoButton/index.tsx +37 -0
  117. package/src/lib/components/comparisonTable/components/TableInfoButton/style.module.scss +30 -0
  118. package/src/lib/components/comparisonTable/components/TableRating/StarIcon.tsx +13 -0
  119. package/src/lib/components/comparisonTable/components/TableRating/ZapIcon.tsx +17 -0
  120. package/src/lib/components/comparisonTable/components/TableRating/index.tsx +45 -0
  121. package/src/lib/components/comparisonTable/components/TableRating/style.module.scss +13 -0
  122. package/src/lib/components/comparisonTable/components/TableRowHeader/index.tsx +35 -0
  123. package/src/lib/components/comparisonTable/components/TableRowHeader/style.module.scss +3 -0
  124. package/src/lib/components/comparisonTable/components/TableTrueFalse.tsx +40 -0
  125. package/src/lib/components/comparisonTable/hooks/useActiveTableArrows.ts +63 -0
  126. package/src/lib/components/comparisonTable/index.stories.mdx +254 -0
  127. package/src/lib/components/comparisonTable/index.tsx +211 -0
  128. package/src/lib/components/comparisonTable/style.module.scss +104 -0
  129. package/src/lib/components/dateSelector/datepicker.scss +406 -0
  130. package/src/lib/components/dateSelector/icons/calendar.svg +6 -0
  131. package/src/lib/components/dateSelector/icons/chevron-left.svg +3 -0
  132. package/src/lib/components/dateSelector/icons/chevron-right.svg +3 -0
  133. package/src/lib/components/dateSelector/index.stories.mdx +62 -0
  134. package/src/lib/components/dateSelector/index.test.ts +33 -0
  135. package/src/lib/components/dateSelector/index.tsx +247 -0
  136. package/src/lib/components/dateSelector/style.module.scss +77 -0
  137. package/src/lib/components/downloadButton/icons/check.svg +3 -0
  138. package/src/lib/components/downloadButton/icons/download.svg +5 -0
  139. package/src/lib/components/downloadButton/index.stories.mdx +59 -0
  140. package/src/lib/components/downloadButton/index.tsx +67 -0
  141. package/src/lib/components/downloadButton/style.module.scss +19 -0
  142. package/src/lib/components/downloadRing/icons/check-outside-circle.tsx +26 -0
  143. package/src/lib/components/downloadRing/icons/download-cloud.tsx +18 -0
  144. package/src/lib/components/downloadRing/icons/style.module.scss +7 -0
  145. package/src/lib/components/downloadRing/index.stories.mdx +35 -0
  146. package/src/lib/components/downloadRing/index.tsx +79 -0
  147. package/src/lib/components/downloadRing/style.module.scss +66 -0
  148. package/src/lib/components/dropzone/images/error.tsx +18 -0
  149. package/src/lib/components/dropzone/images/file.tsx +26 -0
  150. package/src/lib/components/dropzone/images/style.module.scss +7 -0
  151. package/src/lib/components/dropzone/images/upload-complete.tsx +24 -0
  152. package/src/lib/components/dropzone/images/upload.tsx +18 -0
  153. package/src/lib/components/dropzone/index.stories.mdx +44 -0
  154. package/src/lib/components/dropzone/index.tsx +152 -0
  155. package/src/lib/components/dropzone/style.module.scss +90 -0
  156. package/src/lib/components/input/a.stories.mdx +28 -0
  157. package/src/lib/components/input/autoSuggestInput/index.stories.mdx +137 -0
  158. package/src/lib/components/input/autoSuggestInput/index.tsx +81 -0
  159. package/src/lib/components/input/autoSuggestInput/style.module.scss +71 -0
  160. package/src/lib/components/input/autoSuggestMultiSelect/index.stories.mdx +115 -0
  161. package/src/lib/components/input/autoSuggestMultiSelect/index.tsx +75 -0
  162. package/src/lib/components/input/autoSuggestMultiSelect/style.module.scss +4 -0
  163. package/src/lib/components/input/currency/format/index.test.ts +49 -0
  164. package/src/lib/components/input/currency/format/index.ts +15 -0
  165. package/src/lib/components/input/currency/index.stories.mdx +25 -0
  166. package/src/lib/components/input/currency/index.test.tsx +56 -0
  167. package/src/lib/components/input/currency/index.tsx +53 -0
  168. package/src/lib/components/input/iban/formatIban/index.test.ts +11 -0
  169. package/src/lib/components/input/iban/formatIban/index.ts +22 -0
  170. package/src/lib/components/input/iban/index.stories.mdx +21 -0
  171. package/src/lib/components/input/iban/index.tsx +20 -0
  172. package/src/lib/components/input/index.stories.mdx +62 -0
  173. package/src/lib/components/input/index.tsx +51 -0
  174. package/src/lib/components/input/style.module.scss +94 -0
  175. package/src/lib/components/modal/bottomModal/img/close.svg +4 -0
  176. package/src/lib/components/modal/bottomModal/index.tsx +68 -0
  177. package/src/lib/components/modal/bottomModal/style.module.scss +104 -0
  178. package/src/lib/components/modal/bottomOrRegularModal/index.tsx +43 -0
  179. package/src/lib/components/modal/bottomOrRegularModal/style.module.scss +16 -0
  180. package/src/lib/components/modal/hooks/useOnClose.ts +54 -0
  181. package/src/lib/components/modal/index.stories.mdx +313 -0
  182. package/src/lib/components/modal/index.ts +14 -0
  183. package/src/lib/components/modal/regularModal/img/close.svg +4 -0
  184. package/src/lib/components/modal/regularModal/index.tsx +55 -0
  185. package/src/lib/components/modal/regularModal/style.module.scss +114 -0
  186. package/src/lib/components/multiDropzone/UploadFileCell/index.tsx +138 -0
  187. package/src/lib/components/multiDropzone/UploadFileCell/style.module.scss +101 -0
  188. package/src/lib/components/multiDropzone/icons/bmp-complete.svg +10 -0
  189. package/src/lib/components/multiDropzone/icons/bmp.svg +10 -0
  190. package/src/lib/components/multiDropzone/icons/doc-complete.svg +11 -0
  191. package/src/lib/components/multiDropzone/icons/doc.svg +11 -0
  192. package/src/lib/components/multiDropzone/icons/docx-complete.svg +12 -0
  193. package/src/lib/components/multiDropzone/icons/docx.svg +12 -0
  194. package/src/lib/components/multiDropzone/icons/eye.svg +4 -0
  195. package/src/lib/components/multiDropzone/icons/generic-complete.svg +4 -0
  196. package/src/lib/components/multiDropzone/icons/generic-error.svg +7 -0
  197. package/src/lib/components/multiDropzone/icons/generic.svg +4 -0
  198. package/src/lib/components/multiDropzone/icons/heic-complete.svg +11 -0
  199. package/src/lib/components/multiDropzone/icons/heic.svg +11 -0
  200. package/src/lib/components/multiDropzone/icons/index.ts +51 -0
  201. package/src/lib/components/multiDropzone/icons/jpeg-complete.svg +11 -0
  202. package/src/lib/components/multiDropzone/icons/jpeg.svg +11 -0
  203. package/src/lib/components/multiDropzone/icons/jpg-complete.svg +10 -0
  204. package/src/lib/components/multiDropzone/icons/jpg.svg +10 -0
  205. package/src/lib/components/multiDropzone/icons/pdf-complete.svg +8 -0
  206. package/src/lib/components/multiDropzone/icons/pdf.svg +8 -0
  207. package/src/lib/components/multiDropzone/icons/png-complete.svg +10 -0
  208. package/src/lib/components/multiDropzone/icons/png.svg +10 -0
  209. package/src/lib/components/multiDropzone/icons/trash.svg +6 -0
  210. package/src/lib/components/multiDropzone/icons/upload.svg +5 -0
  211. package/src/lib/components/multiDropzone/index.stories.mdx +91 -0
  212. package/src/lib/components/multiDropzone/index.tsx +99 -0
  213. package/src/lib/components/multiDropzone/style.module.scss +32 -0
  214. package/src/lib/components/segmentedControl/index.stories.mdx +47 -0
  215. package/src/lib/components/segmentedControl/index.tsx +105 -0
  216. package/src/lib/components/segmentedControl/style.module.scss +36 -0
  217. package/src/lib/components/signaturePad/img/reset.svg +4 -0
  218. package/src/lib/components/signaturePad/img/sign.svg +3 -0
  219. package/src/lib/components/signaturePad/index.stories.mdx +17 -0
  220. package/src/lib/components/signaturePad/index.tsx +96 -0
  221. package/src/lib/components/signaturePad/style.module.scss +90 -0
  222. package/src/lib/index.tsx +71 -0
  223. package/src/lib/models/autoSuggestInput/index.ts +4 -0
  224. package/src/lib/models/download.ts +1 -0
  225. package/src/lib/models/downloadRing/index.ts +6 -0
  226. package/src/lib/scss/index.scss +22 -0
  227. package/src/lib/scss/private/_reset.scss +154 -0
  228. package/src/lib/scss/private/base/_border_radius.scss +15 -0
  229. package/src/lib/scss/private/base/_colors.scss +19 -0
  230. package/src/lib/scss/private/base/_cursors.scss +31 -0
  231. package/src/lib/scss/private/base/_display.scss +35 -0
  232. package/src/lib/scss/private/base/_grid.scss +60 -0
  233. package/src/lib/scss/private/base/_index.scss +10 -0
  234. package/src/lib/scss/private/base/_shadows.scss +2 -0
  235. package/src/lib/scss/private/base/_spacing.scss +89 -0
  236. package/src/lib/scss/private/base/_typography.scss +135 -0
  237. package/src/lib/scss/private/base/_width_and_height.scss +25 -0
  238. package/src/lib/scss/private/base/border_radius.stories.mdx +43 -0
  239. package/src/lib/scss/private/base/cursors.stories.mdx +18 -0
  240. package/src/lib/scss/private/base/demo.tsx +123 -0
  241. package/src/lib/scss/private/base/display.stories.mdx +19 -0
  242. package/src/lib/scss/private/base/flex/_flex.scss +63 -0
  243. package/src/lib/scss/private/base/flex/flex.stories.mdx +139 -0
  244. package/src/lib/scss/private/base/flex/style.module.scss +24 -0
  245. package/src/lib/scss/private/base/spacing.stories.mdx +185 -0
  246. package/src/lib/scss/private/base/style.module.scss +52 -0
  247. package/src/lib/scss/private/base/typography.stories.mdx +74 -0
  248. package/src/lib/scss/private/base/width_and_height.stories.mdx +172 -0
  249. package/src/lib/scss/private/components/_badge.scss +41 -0
  250. package/src/lib/scss/private/components/_buttons.scss +193 -0
  251. package/src/lib/scss/private/components/_cards.scss +32 -0
  252. package/src/lib/scss/private/components/_index.scss +6 -0
  253. package/src/lib/scss/private/components/_input.scss +238 -0
  254. package/src/lib/scss/private/components/_notices.scss +39 -0
  255. package/src/lib/scss/private/components/_spinner.scss +60 -0
  256. package/src/lib/scss/private/components/assets/checkmark.svg +3 -0
  257. package/src/lib/scss/private/components/assets/icon-form-dropdown.svg +3 -0
  258. package/src/lib/scss/private/components/badge.stories.mdx +37 -0
  259. package/src/lib/scss/private/components/button.stories.mdx +107 -0
  260. package/src/lib/scss/private/components/cards.stories.mdx +35 -0
  261. package/src/lib/scss/private/components/checkbox.stories.mdx +47 -0
  262. package/src/lib/scss/private/components/input.stories.mdx +33 -0
  263. package/src/lib/scss/private/components/notices.stories.mdx +37 -0
  264. package/src/lib/scss/private/components/radio.stories.mdx +47 -0
  265. package/src/lib/scss/private/components/select.stories.mdx +17 -0
  266. package/src/lib/scss/private/components/spinner.stories.mdx +25 -0
  267. package/src/lib/scss/public/colors/_index.scss +2 -0
  268. package/src/lib/scss/public/colors/default.scss +130 -0
  269. package/src/lib/scss/public/colors/overrides.scss +0 -0
  270. package/src/lib/scss/public/colors.stories.mdx +27 -0
  271. package/src/lib/scss/public/demo.tsx +297 -0
  272. package/src/lib/scss/public/font/_index.scss +2 -0
  273. package/src/lib/scss/public/font/default.scss +3 -0
  274. package/src/lib/scss/public/font/overrides.scss +0 -0
  275. package/src/lib/scss/public/font-weight.scss +9 -0
  276. package/src/lib/scss/public/font-weight.stories.mdx +32 -0
  277. package/src/lib/scss/public/grid.scss +21 -0
  278. package/src/lib/scss/public/grid.stories.mdx +41 -0
  279. package/src/lib/scss/third-party/_google_places.scss +62 -0
  280. package/src/lib/scss/third-party/_index.scss +1 -0
  281. package/src/lib/scss/utils/_index.scss +3 -0
  282. package/src/lib/util/calendarDate/index.test.ts +32 -0
  283. package/src/lib/util/calendarDate/index.ts +30 -0
  284. package/src/lib/util/zeroFill.test.ts +15 -0
  285. package/src/lib/util/zeroFill.ts +7 -0
  286. package/src/react-app-env.d.ts +1 -0
  287. package/src/setupTests.js +8 -0
  288. package/src/theme.stories.mdx +54 -0
@@ -1,24 +1,63 @@
1
+ @use 'grid';
2
+
1
3
  @for $i from 0 through 12 {
2
- .mt#{$i * 8} {
3
- margin-top: $i * 8px;
4
+ .m#{$i * 8} {
5
+ margin: $i * 8px;
4
6
  }
5
- }
6
7
 
7
- @for $i from 0 through 12 {
8
- .mb#{$i * 8} {
9
- margin-bottom: $i * 8px;
8
+ .p#{$i * 8} {
9
+ padding: $i * 8px;
10
10
  }
11
11
  }
12
12
 
13
+ // Spacing left & right
13
14
  @for $i from 0 through 12 {
14
- .mr#{$i * 8} {
15
+ .mx#{$i * 8} {
16
+ margin-left: $i * 8px;
15
17
  margin-right: $i * 8px;
16
18
  }
19
+
20
+ .px#{$i * 8} {
21
+ padding-left: $i * 8px;
22
+ padding-right: $i * 8px;
23
+ }
17
24
  }
18
25
 
26
+ // Spacing up & down
19
27
  @for $i from 0 through 12 {
20
- .ml#{$i * 8} {
21
- margin-left: $i * 8px;
28
+ .my#{$i * 8} {
29
+ margin-top: $i * 8px;
30
+ margin-bottom: $i * 8px;
31
+ }
32
+
33
+ .py#{$i * 8} {
34
+ padding-top: $i * 8px;
35
+ padding-bottom: $i * 8px;
36
+ }
37
+ }
38
+
39
+ // Spacing for each specific area
40
+ $valid_areas: (
41
+ 't': 'top',
42
+ 'b': 'bottom',
43
+ 'l': 'left',
44
+ 'r': 'right',
45
+ );
46
+
47
+ @each $key, $area in $valid_areas {
48
+ @for $i from 0 through 12 {
49
+ .m#{$key}#{$i * 8} {
50
+ margin-#{$area}: $i * 8px;
51
+ }
52
+
53
+ .p#{$key}#{$i * 8} {
54
+ padding-#{$area}: $i * 8px;
55
+ }
56
+ }
57
+
58
+ // Auto value for margin
59
+ .m#{$key}-auto {
60
+ margin-#{$area}: auto;
22
61
  }
23
62
  }
24
63
 
@@ -26,18 +65,25 @@
26
65
  margin: auto;
27
66
  }
28
67
 
29
- .mt-auto {
30
- margin-top: auto;
68
+ .mx-auto {
69
+ margin-left: auto;
70
+ margin-right: auto;
31
71
  }
32
-
33
- .mb-auto {
72
+ .my-auto {
73
+ margin-top: auto;
34
74
  margin-bottom: auto;
35
75
  }
36
76
 
37
- .mr-auto {
38
- margin-right: auto;
39
- }
77
+ @for $i from 0 through 12 {
78
+ .gap#{$i * 8} {
79
+ gap: $i * 8px;
80
+ }
40
81
 
41
- .ml-auto {
42
- margin-left: auto;
82
+ .c-gap#{$i * 8} {
83
+ column-gap: $i * 8px;
84
+ }
85
+
86
+ .r-gap#{$i * 8} {
87
+ row-gap: $i * 8px;
88
+ }
43
89
  }
@@ -95,10 +95,17 @@ body {
95
95
  .p-a {
96
96
  color: $ds-primary-500;
97
97
  text-decoration: none;
98
+
98
99
  &:hover,
99
100
  &:focus {
100
101
  color: $ds-primary-700;
101
102
  }
103
+
104
+ &:focus-visible {
105
+ outline: 2px solid $ds-grey-900;
106
+ border-radius: 2px;
107
+ outline-offset: 2px;
108
+ }
102
109
  }
103
110
 
104
111
  // Layout
@@ -11,6 +11,10 @@ export const Typography = () => (
11
11
  <h4 className="p-h4">The quick brown fox jumps over the lazy dog</h4>
12
12
  <p className="p-p">The quick brown fox jumps over the lazy dog</p>
13
13
  <p className="p-p--small">The quick brown fox jumps over the lazy dog</p>
14
+ <a href="#" className="p-a">
15
+ The quick brown fox jumps over the lazy dog
16
+ </a>
17
+ <p className="p-error">The quick brown fox jumps over the lazy dog</p>
14
18
  </>
15
19
  );
16
20
 
@@ -0,0 +1,63 @@
1
+ @use '../../../private/base/grid';
2
+
3
+ /** Shared values across align and justify properties */
4
+ $common-values: (
5
+ 'start': flex-start,
6
+ 'end': flex-end,
7
+ 'center': center,
8
+ );
9
+
10
+ $align-values: map-merge(
11
+ $common-values,
12
+ (
13
+ 'stretch': stretch,
14
+ 'baseline': baseline,
15
+ )
16
+ );
17
+
18
+ $jutify-values: map-merge(
19
+ $common-values,
20
+ (
21
+ 'between': space-between,
22
+ 'around': space-around,
23
+ 'evenly': space-evenly,
24
+ )
25
+ );
26
+
27
+ // Align items
28
+ @each $name, $value in $align-values {
29
+ .ai-#{$name} {
30
+ align-items: $value;
31
+ }
32
+ }
33
+
34
+ // Justify content
35
+ @each $name, $value in $jutify-values {
36
+ .jc-#{$name} {
37
+ justify-content: $value;
38
+ }
39
+ }
40
+
41
+ .fd-row {
42
+ flex-direction: row !important;
43
+ }
44
+
45
+ .fd-row-reverse {
46
+ flex-direction: row-reverse !important;
47
+ }
48
+
49
+ .fd-column {
50
+ flex-direction: column !important;
51
+ }
52
+
53
+ .fd-column-reverse {
54
+ flex-direction: column-reverse !important;
55
+ }
56
+
57
+ .f-wrap {
58
+ flex-wrap: wrap;
59
+ }
60
+
61
+ .f-nowrap {
62
+ flex-wrap: nowrap;
63
+ }
@@ -0,0 +1,24 @@
1
+ .container {
2
+ margin-bottom: 24px;
3
+ background-color: #f8f8f8 !important;
4
+ border: 1px solid #d2d2d7;
5
+ border-radius: 8px;
6
+ }
7
+
8
+ .ai-container {
9
+ height: 200px;
10
+ }
11
+
12
+ .item {
13
+ margin: 8px !important;
14
+ background-color: white !important;
15
+ border: 1px solid #d2d2d7;
16
+ }
17
+
18
+ .ai-item-2 {
19
+ min-height: 100px;
20
+ }
21
+
22
+ .ai-item-3 {
23
+ min-height: 80px;
24
+ }
@@ -40,3 +40,13 @@
40
40
  }
41
41
  }
42
42
  }
43
+
44
+ .rectangle {
45
+ width: 100px;
46
+ height: 50px;
47
+ }
48
+
49
+ .square {
50
+ width: 100px;
51
+ height: 100px;
52
+ }
@@ -12,18 +12,18 @@
12
12
  }
13
13
 
14
14
  .p-btn {
15
- position: relative;
16
-
17
15
  display: inline-block;
18
16
 
17
+ position: relative;
19
18
  cursor: pointer;
20
19
 
21
20
  height: 48px;
22
- padding: 0 16px;
21
+ padding: 12px 24px;
22
+
23
+ line-height: 24px;
23
24
 
24
25
  font-size: 16px;
25
26
  font-family: inherit;
26
- line-height: 48px;
27
27
  letter-spacing: 0.5px;
28
28
  text-decoration: none;
29
29
  text-align: center;
@@ -38,6 +38,11 @@
38
38
  &--error {
39
39
  @extend .p-input;
40
40
  border: 1px solid $ds-red-500;
41
+
42
+ &:focus {
43
+ outline: none;
44
+ box-shadow: 0 0 0 2px $ds-red-500;
45
+ }
41
46
  }
42
47
 
43
48
  input {
@@ -89,10 +94,7 @@
89
94
  .p-radio:checked {
90
95
  & + label::before {
91
96
  border-color: $ds-primary-500;
92
-
93
- background-image: url('data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="6" cy="6" r="5.5" fill="#{util.url-encoded-color($ds-primary-500)}" /></svg>');
94
- background-repeat: no-repeat;
95
- background-position: center;
97
+ background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 20 20" stroke="white" stroke-width="4" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="50%" fill="#{util.url-encoded-color($ds-primary-500)}"/></svg>');
96
98
  }
97
99
  }
98
100
 
@@ -5,7 +5,7 @@
5
5
  border: 1px solid;
6
6
  border-radius: 8px;
7
7
 
8
- &--info {
8
+ &--primary {
9
9
  @extend .p-notice;
10
10
  background-color: $ds-purple-100;
11
11
  border-color: $ds-purple-500;
@@ -24,4 +24,16 @@
24
24
  background-color: $ds-yellow-100;
25
25
  border-color: $ds-yellow-500;
26
26
  }
27
+
28
+ &--success {
29
+ @extend .p-notice;
30
+ background-color: $ds-green-100;
31
+ border-color: $ds-green-500;
32
+ }
33
+
34
+ &--info {
35
+ @extend .p-notice;
36
+ background-color: $ds-blue-100;
37
+ border-color: $ds-blue-500;
38
+ }
27
39
  }
@@ -1,3 +1,3 @@
1
1
  <svg width="12" height="9" viewBox="0 0 12 9" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M10.6667 1.5L4.25 7.91667L1.33334 5" stroke="#F4F4F9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
2
+ <path d="M10.6667 1.5L4.25 7.91667L1.33334 5" stroke="#F4F4F9" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
3
3
  </svg>
@@ -1,3 +1,3 @@
1
1
  <svg width="32" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M6 9L12 15L18 9" stroke="#B4B4BA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
2
+ <path d="M6 9L12 15L18 9" stroke="#B4B4BA" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
3
3
  </svg>
@@ -21,12 +21,24 @@ $ds-blue-500: #8bb4ea;
21
21
  $ds-blue-700: #5f7ba0;
22
22
  $ds-blue-900: #2d394a;
23
23
 
24
+ $ds-glacier-100: #e0f7fe;
25
+ $ds-glacier-300: #aeddec;
26
+ $ds-glacier-500: #8bcbdf;
27
+ $ds-glacier-700: #5d8896;
28
+ $ds-glacier-900: #2d4148;
29
+
24
30
  $ds-red-100: #fedede;
25
31
  $ds-red-300: #faa0a0;
26
32
  $ds-red-500: #e55454;
27
33
  $ds-red-700: #c64848;
28
34
  $ds-red-900: #4b2525;
29
35
 
36
+ $ds-pink-100: #ffebf1;
37
+ $ds-pink-300: #ffb1cb;
38
+ $ds-pink-500: #f96092;
39
+ $ds-pink-700: #c0305f;
40
+ $ds-pink-900: #700024;
41
+
30
42
  $ds-grey-100: #fafaff;
31
43
  $ds-grey-200: #f5f5fa;
32
44
  $ds-grey-300: #d2d2d8;
@@ -41,13 +53,24 @@ $ds-green-500: #84de8a;
41
53
  $ds-green-700: #5b985f;
42
54
  $ds-green-900: #354a2d;
43
55
 
56
+ $ds-spearmint-100: #e3fff2;
57
+ $ds-spearmint-300: #aaeacc;
58
+ $ds-spearmint-500: #85dcb4;
59
+ $ds-spearmint-700: #599278;
60
+ $ds-spearmint-900: #2b4639;
61
+
44
62
  $ds-yellow-100: #fff8e3;
45
63
  $ds-yellow-300: #fae3a5;
46
64
  $ds-yellow-500: #f7ce5c;
47
65
  $ds-yellow-700: #cc9e21;
48
66
  $ds-yellow-900: #4a3d10;
49
67
 
68
+ $ds-white: #fff;
69
+ $ds-transparent: transparent;
70
+
50
71
  $colors: (
72
+ 'white': #fff,
73
+ 'transparent': transparent,
51
74
  'blue-100': $ds-blue-100,
52
75
  'blue-300': $ds-blue-300,
53
76
  'blue-500': $ds-blue-500,
@@ -84,6 +107,21 @@ $colors: (
84
107
  'green-500': $ds-green-500,
85
108
  'green-700': $ds-green-700,
86
109
  'green-900': $ds-green-900,
110
+ 'glacier-100': $ds-glacier-100,
111
+ 'glacier-300': $ds-glacier-300,
112
+ 'glacier-500': $ds-glacier-500,
113
+ 'glacier-700': $ds-glacier-700,
114
+ 'glacier-900': $ds-glacier-900,
115
+ 'spearmint-100': $ds-spearmint-100,
116
+ 'spearmint-300': $ds-spearmint-300,
117
+ 'spearmint-500': $ds-spearmint-500,
118
+ 'spearmint-700': $ds-spearmint-700,
119
+ 'spearmint-900': $ds-spearmint-900,
120
+ 'pink-100': $ds-pink-100,
121
+ 'pink-300': $ds-pink-300,
122
+ 'pink-500': $ds-pink-500,
123
+ 'pink-700': $ds-pink-700,
124
+ 'pink-900': $ds-pink-900,
87
125
  'yellow-100': $ds-yellow-100,
88
126
  'yellow-300': $ds-yellow-300,
89
127
  'yellow-500': $ds-yellow-500,
@@ -2,29 +2,14 @@ import React from 'react';
2
2
 
3
3
  const colors = [
4
4
  {
5
- name: 'Blue 100',
6
- code: 'blue-100',
7
- hex: '#e5f0ff',
8
- },
9
- {
10
- name: 'Blue 300',
11
- code: 'blue-300',
12
- hex: '#b0cdf3',
5
+ name: 'Transparent',
6
+ code: 'transparent',
7
+ hex: 'transparent',
13
8
  },
14
9
  {
15
- name: 'Blue 500',
16
- code: 'blue-500',
17
- hex: '#8bb4ea',
18
- },
19
- {
20
- name: 'Blue 700',
21
- code: 'blue-700',
22
- hex: '#5f7ba0',
23
- },
24
- {
25
- name: 'Blue 900',
26
- code: 'blue-900',
27
- hex: '#2d394a',
10
+ name: 'White',
11
+ code: 'white',
12
+ hex: '#fff',
28
13
  },
29
14
  {
30
15
  name: 'Primary 25',
@@ -61,6 +46,56 @@ const colors = [
61
46
  code: 'primary-900',
62
47
  hex: '#2e2e4c',
63
48
  },
49
+ {
50
+ name: 'Blue 100',
51
+ code: 'blue-100',
52
+ hex: '#e5f0ff',
53
+ },
54
+ {
55
+ name: 'Blue 300',
56
+ code: 'blue-300',
57
+ hex: '#b0cdf3',
58
+ },
59
+ {
60
+ name: 'Blue 500',
61
+ code: 'blue-500',
62
+ hex: '#8bb4ea',
63
+ },
64
+ {
65
+ name: 'Blue 700',
66
+ code: 'blue-700',
67
+ hex: '#5f7ba0',
68
+ },
69
+ {
70
+ name: 'Blue 900',
71
+ code: 'blue-900',
72
+ hex: '#2d394a',
73
+ },
74
+ {
75
+ name: 'Glacier 100',
76
+ code: 'glacier-100',
77
+ hex: '#e0f7fe',
78
+ },
79
+ {
80
+ name: 'Glacier 300',
81
+ code: 'glacier-300',
82
+ hex: '#aeddec',
83
+ },
84
+ {
85
+ name: 'Glacier 500',
86
+ code: 'glacier-500',
87
+ hex: '#8bcbdf',
88
+ },
89
+ {
90
+ name: 'Glacier 700',
91
+ code: 'glacier-700',
92
+ hex: '#5d8896',
93
+ },
94
+ {
95
+ name: 'Glacier 900',
96
+ code: 'glacier-900',
97
+ hex: '#2d4148',
98
+ },
64
99
  {
65
100
  name: 'Red 100',
66
101
  code: 'red-100',
@@ -86,6 +121,31 @@ const colors = [
86
121
  code: 'red-900',
87
122
  hex: '#4b2525',
88
123
  },
124
+ {
125
+ name: 'Pink 100',
126
+ code: 'pink-100',
127
+ hex: '#ffebf1',
128
+ },
129
+ {
130
+ name: 'Pink 300',
131
+ code: 'pink-300',
132
+ hex: '#ffb1cb',
133
+ },
134
+ {
135
+ name: 'Pink 500',
136
+ code: 'pink-500',
137
+ hex: '#f96092',
138
+ },
139
+ {
140
+ name: 'Pink 700',
141
+ code: 'pink-700',
142
+ hex: '#c0305f',
143
+ },
144
+ {
145
+ name: 'Pink 900',
146
+ code: 'pink-900',
147
+ hex: '#700024',
148
+ },
89
149
  {
90
150
  name: 'Grey 100',
91
151
  code: 'grey-100',
@@ -146,6 +206,31 @@ const colors = [
146
206
  code: 'green-900',
147
207
  hex: '#354a2d',
148
208
  },
209
+ {
210
+ name: 'Spearmint 100',
211
+ code: 'spearmint-100',
212
+ hex: '#e3fff2',
213
+ },
214
+ {
215
+ name: 'Spearmint 300',
216
+ code: 'spearmint-300',
217
+ hex: '#aaeacc',
218
+ },
219
+ {
220
+ name: 'Spearmint 500',
221
+ code: 'spearmint-500',
222
+ hex: '#85dcb4',
223
+ },
224
+ {
225
+ name: 'Spearmint 700',
226
+ code: 'spearmint-700',
227
+ hex: '#599278',
228
+ },
229
+ {
230
+ name: 'Spearmint 900',
231
+ code: 'spearmint-900',
232
+ hex: '#2b4639',
233
+ },
149
234
  {
150
235
  name: 'Yellow 100',
151
236
  code: 'yellow-100',
@@ -185,7 +270,8 @@ export const Colors = () => (
185
270
  <th style={{ fontWeight: 'bold' }}>Color</th>
186
271
  <th style={{ fontWeight: 'bold' }}>Name</th>
187
272
  <th style={{ fontWeight: 'bold' }}>Sass</th>
188
- <th style={{ fontWeight: 'bold' }}>Text class</th>
273
+ <th style={{ fontWeight: 'bold' }}>Text color class</th>
274
+ <th style={{ fontWeight: 'bold' }}>BG color class</th>
189
275
  <th style={{ fontWeight: 'bold' }}>Hex</th>
190
276
  </tr>
191
277
  {colors.map((color) => (
@@ -203,6 +289,7 @@ export const Colors = () => (
203
289
  <td>{color.name}</td>
204
290
  <td>{`$ds-${color.code}`}</td>
205
291
  <td>{`tc-${color.code}`}</td>
292
+ <td>{`bg-${color.code}`}</td>
206
293
  <td>{color.hex}</td>
207
294
  </tr>
208
295
  ))}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popsure/dirty-swan",
3
- "version": "20.0.11",
3
+ "version": "27.0.2",
4
4
  "author": "Vincent Audoire <vincent@getpopsure.com>",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -16,17 +16,19 @@
16
16
  "bin": "dist/bin/index.js",
17
17
  "files": [
18
18
  "dist",
19
+ "src",
19
20
  "Readme.md"
20
21
  ],
21
22
  "dependencies": {
22
- "@popsure/public-models": "^0.0.14",
23
+ "@popsure/public-models": "^1.0.1",
23
24
  "classnames": "^2.3.1",
25
+ "dayjs": "^1.10.7",
24
26
  "lodash.debounce": "^4.0.8",
25
27
  "lodash.isequal": "^4.5.0",
26
- "moment": "^2.24.0",
27
28
  "react-autosuggest": "^10.1.0",
28
29
  "react-day-picker": "^7.4.10",
29
30
  "react-dropzone": "^11.3.2",
31
+ "react-scroll-sync": "^0.9.0",
30
32
  "sass": "^1.35.1",
31
33
  "signature_pad": "^3.0.0-beta.3"
32
34
  },
@@ -83,6 +85,7 @@
83
85
  "@types/react-autosuggest": "^10.1.4",
84
86
  "@types/react-day-picker": "^5.3.0",
85
87
  "@types/react-dom": "^17.0.8",
88
+ "@types/react-scroll-sync": "^0.8.2",
86
89
  "@types/sass": "^1.16.0",
87
90
  "babel-core": "^6.26.3",
88
91
  "babel-runtime": "^6.26.0",
package/src/App.tsx ADDED
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import './lib/scss/index.scss';
3
+
4
+ import DateSelector from './lib/components/dateSelector';
5
+ import Dropzone from './lib/components/dropzone';
6
+ import SignaturePad from './lib/components/signaturePad';
7
+ import { CardWithLeftIcon } from './lib/components/cards';
8
+ import AutocompleteAddress from './lib/components/autocompleteAddress';
9
+
10
+ function App() {
11
+ return (
12
+ <div>
13
+ <div className="p-btn p-btn--primary">Hello world</div>
14
+ <DateSelector
15
+ onChange={() => {}}
16
+ yearBoundaries={{ min: 1990, max: 2010 }}
17
+ />
18
+ <div className="p-notice p-notice--info d-flex">
19
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque
20
+ malesuada laoreet nulla, non maximus ante porta sit amet. Aenean non
21
+ ipsum nec quam gravida convallis vitae sit amet nisi.
22
+ </div>
23
+ <Dropzone
24
+ uploading={true}
25
+ progress={32}
26
+ onSelectedFile={() => {}}
27
+ // uploadedFileUrl="http://foo.com/my-file.png"
28
+ />
29
+ <div style={{ backgroundColor: 'white', padding: '24px' }}>
30
+ <SignaturePad
31
+ onChange={(v) => {
32
+ console.log(v);
33
+ }}
34
+ />
35
+ </div>
36
+ <div className="mt80"></div>
37
+ <CardWithLeftIcon
38
+ title="Lorem ipsum"
39
+ cardSize="small"
40
+ className="wmx6 mt8"
41
+ rightIcon="arrow"
42
+ >
43
+ Praesent euismod porta odio at tempus. Aenean urna massa, facilisis
44
+ malesuada eros at, rhoncus imperdiet nunc
45
+ </CardWithLeftIcon>
46
+ </div>
47
+ );
48
+ }
49
+
50
+ export default App;