@popsure/dirty-swan 0.26.10 → 0.26.13

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 (240) hide show
  1. package/dist/index.css +62 -0
  2. package/dist/index.css.map +1 -1
  3. package/dist/lib/scss/private/base/_border_radius.scss +15 -0
  4. package/dist/lib/scss/private/base/_grid.scss +8 -0
  5. package/dist/lib/scss/private/base/_index.scss +1 -0
  6. package/dist/lib/scss/private/base/style.module.scss +10 -0
  7. package/dist/lib/scss/public/colors/default.scss +5 -0
  8. package/dist/lib/scss/public/demo.tsx +13 -1
  9. package/package.json +2 -1
  10. package/src/App.tsx +50 -0
  11. package/src/bin/index.ts +71 -0
  12. package/src/bin/tsconfig.json +13 -0
  13. package/src/bin/util/index.test.ts +85 -0
  14. package/src/bin/util/index.ts +132 -0
  15. package/src/bin/util/test/data.json +13 -0
  16. package/src/colors.scss +1 -0
  17. package/src/font-weight.scss +1 -0
  18. package/src/grid.scss +1 -0
  19. package/src/index.tsx +37 -0
  20. package/src/intro.stories.mdx +41 -0
  21. package/src/lib/components/autocompleteAddress/demo.tsx +38 -0
  22. package/src/lib/components/autocompleteAddress/index.stories.mdx +44 -0
  23. package/src/lib/components/autocompleteAddress/index.tsx +316 -0
  24. package/src/lib/components/autocompleteAddress/mapStyle.ts +187 -0
  25. package/src/lib/components/autocompleteAddress/style.module.scss +82 -0
  26. package/src/lib/components/autocompleteAddress/util/index.test.ts +51 -0
  27. package/src/lib/components/autocompleteAddress/util/index.ts +55 -0
  28. package/src/lib/components/button/icons/index.ts +14 -0
  29. package/src/lib/components/button/icons/send-purple.svg +4 -0
  30. package/src/lib/components/button/icons/send-white.svg +4 -0
  31. package/src/lib/components/button/index.stories.mdx +121 -0
  32. package/src/lib/components/button/index.tsx +64 -0
  33. package/src/lib/components/button/styles.module.scss +5 -0
  34. package/src/lib/components/cards/a.stories.mdx +44 -0
  35. package/src/lib/components/cards/cardButton/index.stories.mdx +47 -0
  36. package/src/lib/components/cards/cardButton/index.tsx +61 -0
  37. package/src/lib/components/cards/cardButton/style.module.scss +33 -0
  38. package/src/lib/components/cards/cardWithLeftIcon/index.stories.mdx +103 -0
  39. package/src/lib/components/cards/cardWithLeftIcon/index.tsx +87 -0
  40. package/src/lib/components/cards/cardWithLeftIcon/style.module.scss +23 -0
  41. package/src/lib/components/cards/cardWithTopIcon/index.stories.mdx +105 -0
  42. package/src/lib/components/cards/cardWithTopIcon/index.tsx +60 -0
  43. package/src/lib/components/cards/cardWithTopIcon/style.module.scss +10 -0
  44. package/src/lib/components/cards/cardWithTopLeftIcon/index.stories.mdx +101 -0
  45. package/src/lib/components/cards/cardWithTopLeftIcon/index.tsx +72 -0
  46. package/src/lib/components/cards/cardWithTopLeftIcon/style.module.scss +21 -0
  47. package/src/lib/components/cards/icons/arrow-right.svg +4 -0
  48. package/src/lib/components/cards/icons/chevron-right.svg +3 -0
  49. package/src/lib/components/cards/icons/feather-logo.svg +10 -0
  50. package/src/lib/components/cards/icons/index.ts +36 -0
  51. package/src/lib/components/cards/icons/info.svg +12 -0
  52. package/src/lib/components/cards/index.test.ts +37 -0
  53. package/src/lib/components/cards/index.tsx +57 -0
  54. package/src/lib/components/cards/infoCard/index.stories.mdx +61 -0
  55. package/src/lib/components/cards/infoCard/index.tsx +47 -0
  56. package/src/lib/components/cards/infoCard/style.module.scss +53 -0
  57. package/src/lib/components/chip/icons/remove-button-highlighted.svg +4 -0
  58. package/src/lib/components/chip/icons/remove-button.svg +4 -0
  59. package/src/lib/components/chip/index.stories.mdx +101 -0
  60. package/src/lib/components/chip/index.tsx +38 -0
  61. package/src/lib/components/chip/style.module.scss +54 -0
  62. package/src/lib/components/comparisonTable/components/Chevron.tsx +19 -0
  63. package/src/lib/components/comparisonTable/components/Row/index.tsx +68 -0
  64. package/src/lib/components/comparisonTable/components/Row/style.module.scss +114 -0
  65. package/src/lib/components/comparisonTable/components/TableArrows/Arrow.tsx +19 -0
  66. package/src/lib/components/comparisonTable/components/TableArrows/index.tsx +52 -0
  67. package/src/lib/components/comparisonTable/components/TableArrows/style.module.scss +53 -0
  68. package/src/lib/components/comparisonTable/components/TableInfoButton/index.tsx +37 -0
  69. package/src/lib/components/comparisonTable/components/TableInfoButton/style.module.scss +30 -0
  70. package/src/lib/components/comparisonTable/components/TableRating/StarIcon.tsx +13 -0
  71. package/src/lib/components/comparisonTable/components/TableRating/ZapIcon.tsx +17 -0
  72. package/src/lib/components/comparisonTable/components/TableRating/index.tsx +45 -0
  73. package/src/lib/components/comparisonTable/components/TableRating/style.module.scss +13 -0
  74. package/src/lib/components/comparisonTable/components/TableRowHeader/index.tsx +35 -0
  75. package/src/lib/components/comparisonTable/components/TableRowHeader/style.module.scss +3 -0
  76. package/src/lib/components/comparisonTable/components/TableTrueFalse.tsx +40 -0
  77. package/src/lib/components/comparisonTable/hooks/useActiveTableArrows.ts +63 -0
  78. package/src/lib/components/comparisonTable/index.stories.mdx +254 -0
  79. package/src/lib/components/comparisonTable/index.tsx +211 -0
  80. package/src/lib/components/comparisonTable/style.module.scss +104 -0
  81. package/src/lib/components/dateSelector/datepicker.scss +406 -0
  82. package/src/lib/components/dateSelector/icons/calendar.svg +6 -0
  83. package/src/lib/components/dateSelector/icons/chevron-left.svg +3 -0
  84. package/src/lib/components/dateSelector/icons/chevron-right.svg +3 -0
  85. package/src/lib/components/dateSelector/index.stories.mdx +62 -0
  86. package/src/lib/components/dateSelector/index.test.ts +33 -0
  87. package/src/lib/components/dateSelector/index.tsx +247 -0
  88. package/src/lib/components/dateSelector/style.module.scss +77 -0
  89. package/src/lib/components/downloadButton/icons/check.svg +3 -0
  90. package/src/lib/components/downloadButton/icons/download.svg +5 -0
  91. package/src/lib/components/downloadButton/index.stories.mdx +59 -0
  92. package/src/lib/components/downloadButton/index.tsx +67 -0
  93. package/src/lib/components/downloadButton/style.module.scss +19 -0
  94. package/src/lib/components/downloadRing/icons/check-outside-circle.tsx +26 -0
  95. package/src/lib/components/downloadRing/icons/download-cloud.tsx +18 -0
  96. package/src/lib/components/downloadRing/icons/style.module.scss +7 -0
  97. package/src/lib/components/downloadRing/index.stories.mdx +35 -0
  98. package/src/lib/components/downloadRing/index.tsx +79 -0
  99. package/src/lib/components/downloadRing/style.module.scss +66 -0
  100. package/src/lib/components/dropzone/images/error.tsx +18 -0
  101. package/src/lib/components/dropzone/images/file.tsx +26 -0
  102. package/src/lib/components/dropzone/images/style.module.scss +7 -0
  103. package/src/lib/components/dropzone/images/upload-complete.tsx +24 -0
  104. package/src/lib/components/dropzone/images/upload.tsx +18 -0
  105. package/src/lib/components/dropzone/index.stories.mdx +44 -0
  106. package/src/lib/components/dropzone/index.tsx +152 -0
  107. package/src/lib/components/dropzone/style.module.scss +90 -0
  108. package/src/lib/components/input/a.stories.mdx +28 -0
  109. package/src/lib/components/input/autoSuggestInput/index.stories.mdx +137 -0
  110. package/src/lib/components/input/autoSuggestInput/index.tsx +81 -0
  111. package/src/lib/components/input/autoSuggestInput/style.module.scss +71 -0
  112. package/src/lib/components/input/autoSuggestMultiSelect/index.stories.mdx +115 -0
  113. package/src/lib/components/input/autoSuggestMultiSelect/index.tsx +75 -0
  114. package/src/lib/components/input/autoSuggestMultiSelect/style.module.scss +4 -0
  115. package/src/lib/components/input/currency/format/index.test.ts +49 -0
  116. package/src/lib/components/input/currency/format/index.ts +15 -0
  117. package/src/lib/components/input/currency/index.stories.mdx +25 -0
  118. package/src/lib/components/input/currency/index.test.tsx +56 -0
  119. package/src/lib/components/input/currency/index.tsx +53 -0
  120. package/src/lib/components/input/iban/formatIban/index.test.ts +11 -0
  121. package/src/lib/components/input/iban/formatIban/index.ts +22 -0
  122. package/src/lib/components/input/iban/index.stories.mdx +21 -0
  123. package/src/lib/components/input/iban/index.tsx +20 -0
  124. package/src/lib/components/input/index.stories.mdx +62 -0
  125. package/src/lib/components/input/index.tsx +51 -0
  126. package/src/lib/components/input/style.module.scss +94 -0
  127. package/src/lib/components/modal/bottomModal/img/close.svg +4 -0
  128. package/src/lib/components/modal/bottomModal/index.tsx +68 -0
  129. package/src/lib/components/modal/bottomModal/style.module.scss +104 -0
  130. package/src/lib/components/modal/bottomOrRegularModal/index.tsx +43 -0
  131. package/src/lib/components/modal/bottomOrRegularModal/style.module.scss +16 -0
  132. package/src/lib/components/modal/hooks/useOnClose.ts +51 -0
  133. package/src/lib/components/modal/index.stories.mdx +316 -0
  134. package/src/lib/components/modal/index.ts +14 -0
  135. package/src/lib/components/modal/regularModal/img/close.svg +4 -0
  136. package/src/lib/components/modal/regularModal/index.tsx +55 -0
  137. package/src/lib/components/modal/regularModal/style.module.scss +106 -0
  138. package/src/lib/components/multiDropzone/UploadFileCell/index.tsx +138 -0
  139. package/src/lib/components/multiDropzone/UploadFileCell/style.module.scss +101 -0
  140. package/src/lib/components/multiDropzone/icons/bmp-complete.svg +10 -0
  141. package/src/lib/components/multiDropzone/icons/bmp.svg +10 -0
  142. package/src/lib/components/multiDropzone/icons/doc-complete.svg +11 -0
  143. package/src/lib/components/multiDropzone/icons/doc.svg +11 -0
  144. package/src/lib/components/multiDropzone/icons/docx-complete.svg +12 -0
  145. package/src/lib/components/multiDropzone/icons/docx.svg +12 -0
  146. package/src/lib/components/multiDropzone/icons/eye.svg +4 -0
  147. package/src/lib/components/multiDropzone/icons/generic-complete.svg +4 -0
  148. package/src/lib/components/multiDropzone/icons/generic-error.svg +7 -0
  149. package/src/lib/components/multiDropzone/icons/generic.svg +4 -0
  150. package/src/lib/components/multiDropzone/icons/heic-complete.svg +11 -0
  151. package/src/lib/components/multiDropzone/icons/heic.svg +11 -0
  152. package/src/lib/components/multiDropzone/icons/index.ts +51 -0
  153. package/src/lib/components/multiDropzone/icons/jpeg-complete.svg +11 -0
  154. package/src/lib/components/multiDropzone/icons/jpeg.svg +11 -0
  155. package/src/lib/components/multiDropzone/icons/jpg-complete.svg +10 -0
  156. package/src/lib/components/multiDropzone/icons/jpg.svg +10 -0
  157. package/src/lib/components/multiDropzone/icons/pdf-complete.svg +8 -0
  158. package/src/lib/components/multiDropzone/icons/pdf.svg +8 -0
  159. package/src/lib/components/multiDropzone/icons/png-complete.svg +10 -0
  160. package/src/lib/components/multiDropzone/icons/png.svg +10 -0
  161. package/src/lib/components/multiDropzone/icons/trash.svg +6 -0
  162. package/src/lib/components/multiDropzone/icons/upload.svg +5 -0
  163. package/src/lib/components/multiDropzone/index.stories.mdx +91 -0
  164. package/src/lib/components/multiDropzone/index.tsx +99 -0
  165. package/src/lib/components/multiDropzone/style.module.scss +32 -0
  166. package/src/lib/components/segmentedControl/index.stories.mdx +47 -0
  167. package/src/lib/components/segmentedControl/index.tsx +105 -0
  168. package/src/lib/components/segmentedControl/style.module.scss +36 -0
  169. package/src/lib/components/signaturePad/img/reset.svg +4 -0
  170. package/src/lib/components/signaturePad/img/sign.svg +3 -0
  171. package/src/lib/components/signaturePad/index.stories.mdx +17 -0
  172. package/src/lib/components/signaturePad/index.tsx +96 -0
  173. package/src/lib/components/signaturePad/style.module.scss +90 -0
  174. package/src/lib/index.tsx +71 -0
  175. package/src/lib/models/autoSuggestInput/index.ts +4 -0
  176. package/src/lib/models/download.ts +1 -0
  177. package/src/lib/models/downloadRing/index.ts +6 -0
  178. package/src/lib/scss/index.scss +22 -0
  179. package/src/lib/scss/private/_reset.scss +149 -0
  180. package/src/lib/scss/private/base/_border_radius.scss +15 -0
  181. package/src/lib/scss/private/base/_colors.scss +19 -0
  182. package/src/lib/scss/private/base/_cursors.scss +31 -0
  183. package/src/lib/scss/private/base/_display.scss +35 -0
  184. package/src/lib/scss/private/base/_grid.scss +60 -0
  185. package/src/lib/scss/private/base/_index.scss +10 -0
  186. package/src/lib/scss/private/base/_shadows.scss +2 -0
  187. package/src/lib/scss/private/base/_spacing.scss +89 -0
  188. package/src/lib/scss/private/base/_typography.scss +128 -0
  189. package/src/lib/scss/private/base/_width_and_height.scss +25 -0
  190. package/src/lib/scss/private/base/border_radius.stories.mdx +43 -0
  191. package/src/lib/scss/private/base/cursors.stories.mdx +18 -0
  192. package/src/lib/scss/private/base/demo.tsx +119 -0
  193. package/src/lib/scss/private/base/display.stories.mdx +19 -0
  194. package/src/lib/scss/private/base/flex/_flex.scss +63 -0
  195. package/src/lib/scss/private/base/flex/flex.stories.mdx +139 -0
  196. package/src/lib/scss/private/base/flex/style.module.scss +24 -0
  197. package/src/lib/scss/private/base/spacing.stories.mdx +185 -0
  198. package/src/lib/scss/private/base/style.module.scss +52 -0
  199. package/src/lib/scss/private/base/typography.stories.mdx +71 -0
  200. package/src/lib/scss/private/base/width_and_height.stories.mdx +172 -0
  201. package/src/lib/scss/private/components/_badge.scss +41 -0
  202. package/src/lib/scss/private/components/_buttons.scss +193 -0
  203. package/src/lib/scss/private/components/_cards.scss +32 -0
  204. package/src/lib/scss/private/components/_index.scss +6 -0
  205. package/src/lib/scss/private/components/_input.scss +241 -0
  206. package/src/lib/scss/private/components/_notices.scss +39 -0
  207. package/src/lib/scss/private/components/_spinner.scss +60 -0
  208. package/src/lib/scss/private/components/assets/checkmark.svg +3 -0
  209. package/src/lib/scss/private/components/assets/icon-form-dropdown.svg +3 -0
  210. package/src/lib/scss/private/components/badge.stories.mdx +37 -0
  211. package/src/lib/scss/private/components/button.stories.mdx +107 -0
  212. package/src/lib/scss/private/components/cards.stories.mdx +35 -0
  213. package/src/lib/scss/private/components/checkbox.stories.mdx +47 -0
  214. package/src/lib/scss/private/components/input.stories.mdx +33 -0
  215. package/src/lib/scss/private/components/notices.stories.mdx +37 -0
  216. package/src/lib/scss/private/components/radio.stories.mdx +47 -0
  217. package/src/lib/scss/private/components/select.stories.mdx +17 -0
  218. package/src/lib/scss/private/components/spinner.stories.mdx +25 -0
  219. package/src/lib/scss/public/colors/_index.scss +2 -0
  220. package/src/lib/scss/public/colors/default.scss +130 -0
  221. package/src/lib/scss/public/colors/overrides.scss +0 -0
  222. package/src/lib/scss/public/colors.stories.mdx +27 -0
  223. package/src/lib/scss/public/demo.tsx +297 -0
  224. package/src/lib/scss/public/font/_index.scss +2 -0
  225. package/src/lib/scss/public/font/default.scss +3 -0
  226. package/src/lib/scss/public/font/overrides.scss +0 -0
  227. package/src/lib/scss/public/font-weight.scss +9 -0
  228. package/src/lib/scss/public/font-weight.stories.mdx +32 -0
  229. package/src/lib/scss/public/grid.scss +21 -0
  230. package/src/lib/scss/public/grid.stories.mdx +41 -0
  231. package/src/lib/scss/third-party/_google_places.scss +62 -0
  232. package/src/lib/scss/third-party/_index.scss +1 -0
  233. package/src/lib/scss/utils/_index.scss +3 -0
  234. package/src/lib/util/calendarDate/index.test.ts +32 -0
  235. package/src/lib/util/calendarDate/index.ts +30 -0
  236. package/src/lib/util/zeroFill.test.ts +15 -0
  237. package/src/lib/util/zeroFill.ts +7 -0
  238. package/src/react-app-env.d.ts +1 -0
  239. package/src/setupTests.js +8 -0
  240. package/src/theme.stories.mdx +54 -0
@@ -0,0 +1,4 @@
1
+ export interface Option {
2
+ value: string;
3
+ leftIcon?: string;
4
+ }
@@ -0,0 +1 @@
1
+ export type DownloadStatus = 'INITIAL' | 'GENERATING' | 'COMPLETED' | 'FAILED';
@@ -0,0 +1,6 @@
1
+ export type DownloadRingDownloadStatus =
2
+ | 'INITIAL'
3
+ | 'GENERATING'
4
+ | 'DOWNLOADING'
5
+ | 'COMPLETED'
6
+ | 'FAILED';
@@ -0,0 +1,22 @@
1
+ @forward 'private/reset';
2
+
3
+ @forward 'private/base';
4
+ @forward 'private/components';
5
+
6
+ @import 'public/colors';
7
+
8
+ @import 'third-party';
9
+
10
+ html {
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ *,
15
+ *:before,
16
+ *:after {
17
+ box-sizing: inherit;
18
+ }
19
+
20
+ body {
21
+ background-color: $ds-grey-200;
22
+ }
@@ -0,0 +1,149 @@
1
+ html,
2
+ body,
3
+ div,
4
+ span,
5
+ applet,
6
+ object,
7
+ iframe,
8
+ h1,
9
+ h2,
10
+ h3,
11
+ h4,
12
+ h5,
13
+ h6,
14
+ p,
15
+ blockquote,
16
+ pre,
17
+ a,
18
+ abbr,
19
+ acronym,
20
+ address,
21
+ big,
22
+ cite,
23
+ code,
24
+ del,
25
+ dfn,
26
+ em,
27
+ img,
28
+ ins,
29
+ kbd,
30
+ q,
31
+ s,
32
+ samp,
33
+ small,
34
+ strike,
35
+ strong,
36
+ sub,
37
+ sup,
38
+ tt,
39
+ var,
40
+ b,
41
+ u,
42
+ i,
43
+ center,
44
+ dl,
45
+ dt,
46
+ dd,
47
+ ol,
48
+ ul,
49
+ li,
50
+ fieldset,
51
+ form,
52
+ label,
53
+ legend,
54
+ table,
55
+ caption,
56
+ tbody,
57
+ tfoot,
58
+ thead,
59
+ tr,
60
+ th,
61
+ td,
62
+ article,
63
+ aside,
64
+ canvas,
65
+ details,
66
+ embed,
67
+ figure,
68
+ figcaption,
69
+ footer,
70
+ header,
71
+ hgroup,
72
+ menu,
73
+ nav,
74
+ output,
75
+ ruby,
76
+ section,
77
+ summary,
78
+ time,
79
+ mark,
80
+ audio,
81
+ video,
82
+ input,
83
+ select,
84
+ button,
85
+ textarea {
86
+ margin: 0;
87
+ padding: 0;
88
+ border: 0;
89
+ font-size: 100%;
90
+ font: inherit;
91
+ vertical-align: baseline;
92
+ }
93
+
94
+ /* HTML5 display-role reset for older browsers */
95
+
96
+ article,
97
+ aside,
98
+ details,
99
+ figcaption,
100
+ figure,
101
+ footer,
102
+ header,
103
+ hgroup,
104
+ menu,
105
+ nav,
106
+ section {
107
+ display: block;
108
+ }
109
+
110
+ body {
111
+ line-height: 1;
112
+ }
113
+
114
+ ol,
115
+ ul {
116
+ list-style: none;
117
+ }
118
+
119
+ blockquote,
120
+ q {
121
+ quotes: none;
122
+ }
123
+
124
+ blockquote {
125
+ &:before,
126
+ &:after {
127
+ content: '';
128
+ content: none;
129
+ }
130
+ }
131
+
132
+ q {
133
+ &:before,
134
+ &:after {
135
+ content: '';
136
+ content: none;
137
+ }
138
+ }
139
+
140
+ table {
141
+ border-collapse: collapse;
142
+ border-spacing: 0;
143
+ }
144
+
145
+ input[type='number']::-webkit-inner-spin-button,
146
+ input[type='number']::-webkit-outer-spin-button {
147
+ -webkit-appearance: none;
148
+ margin: 0;
149
+ }
@@ -0,0 +1,15 @@
1
+ $border_sizes: 0, 2, 4, 8, 12, 16, 24;
2
+
3
+ @each $size in $border_sizes {
4
+ .br#{$size} {
5
+ border-radius: $size * 1px;
6
+ }
7
+ }
8
+
9
+ .br-circle {
10
+ border-radius: 50%;
11
+ }
12
+
13
+ .br-pill {
14
+ border-radius: 999px;
15
+ }
@@ -0,0 +1,19 @@
1
+ @use '../../public/colors' as *;
2
+
3
+ @each $name, $hex in $colors {
4
+ .tc-#{$name} {
5
+ color: $hex !important;
6
+ }
7
+ }
8
+
9
+ @each $name, $hex in $colors {
10
+ .bg-#{$name} {
11
+ background-color: $hex !important;
12
+ }
13
+ }
14
+
15
+ :root {
16
+ @each $name, $hex in $colors {
17
+ --ds-#{$name}: #{$hex};
18
+ }
19
+ }
@@ -0,0 +1,31 @@
1
+ .c-auto {
2
+ cursor: auto;
3
+ }
4
+
5
+ .c-default {
6
+ cursor: default;
7
+ }
8
+
9
+ .c-pointer {
10
+ cursor: pointer;
11
+ }
12
+
13
+ .c-text {
14
+ cursor: text;
15
+ }
16
+
17
+ .c-wait {
18
+ cursor: wait;
19
+ }
20
+
21
+ .c-move {
22
+ cursor: move;
23
+ }
24
+
25
+ .c-not-allowed {
26
+ cursor: not-allowed;
27
+ }
28
+
29
+ .c-help {
30
+ cursor: help;
31
+ }
@@ -0,0 +1,35 @@
1
+ .d-block {
2
+ display: block !important;
3
+ }
4
+
5
+ .d-inline {
6
+ display: inline !important;
7
+ }
8
+
9
+ .d-inline-block {
10
+ display: inline-block !important;
11
+ }
12
+
13
+ .d-flex {
14
+ display: flex !important;
15
+ }
16
+
17
+ .d-inline-flex {
18
+ display: inline-flex !important;
19
+ }
20
+
21
+ .d-table {
22
+ display: table !important;
23
+ }
24
+
25
+ .d-table-cell {
26
+ display: table-cell !important;
27
+ }
28
+
29
+ .d-none {
30
+ display: none !important;
31
+ }
32
+
33
+ .d-grid {
34
+ display: grid !important;
35
+ }
@@ -0,0 +1,60 @@
1
+ @use '../../public/grid';
2
+
3
+ .p-body {
4
+ @include grid.p-size-mobile {
5
+ margin: 0 1rem;
6
+ }
7
+
8
+ @include grid.p-size-tablet {
9
+ margin: 0 1.5rem;
10
+ }
11
+
12
+ @include grid.p-size-desktop {
13
+ width: 56rem;
14
+ margin: 0 auto;
15
+ }
16
+ }
17
+
18
+ .p-container {
19
+ max-width: 928px; // 896px + 2 * 16px padding
20
+ padding-left: 16px;
21
+ padding-right: 16px;
22
+ margin-left: auto;
23
+ margin-right: auto;
24
+ }
25
+
26
+ // Taken from https://gist.github.com/Bamieh/912a6f0b63cbb53f3ad0bd8df7171c6a
27
+ @function remove-dot-from-class($class) {
28
+ $class-string: quote($class);
29
+ @return if(
30
+ str-slice($class-string, 0, 1) == '.',
31
+ str-slice($class-string, 2, str-length($class-string)),
32
+ $class-string
33
+ );
34
+ }
35
+
36
+ @mixin add-responsive {
37
+ $selector: remove-dot-from-class(#{&});
38
+ @content;
39
+
40
+ // We need to use @at-root to prevent the following rules to be nested inside the selector
41
+ @at-root {
42
+ .sm\:#{$selector} {
43
+ @include grid.p-size-mobile {
44
+ @content;
45
+ }
46
+ }
47
+
48
+ .md\:#{$selector} {
49
+ @include grid.p-size-tablet {
50
+ @content;
51
+ }
52
+ }
53
+
54
+ .lg\:#{$selector} {
55
+ @include grid.p-size-desktop {
56
+ @content;
57
+ }
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,10 @@
1
+ @forward "display";
2
+ @forward "shadows";
3
+ @forward "flex/flex";
4
+ @forward "grid";
5
+ @forward "spacing";
6
+ @forward "width_and_height";
7
+ @forward "colors";
8
+ @forward "typography";
9
+ @forward "cursors";
10
+ @forward "border_radius";
@@ -0,0 +1,2 @@
1
+ $popsure-box-shadow-raised: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
2
+ $popsure-box-shadow-hover: 0 2px 9px 0 rgba(0, 0, 0, 0.25);
@@ -0,0 +1,89 @@
1
+ @use 'grid';
2
+
3
+ @for $i from 0 through 12 {
4
+ .m#{$i * 8} {
5
+ margin: $i * 8px;
6
+ }
7
+
8
+ .p#{$i * 8} {
9
+ padding: $i * 8px;
10
+ }
11
+ }
12
+
13
+ // Spacing left & right
14
+ @for $i from 0 through 12 {
15
+ .mx#{$i * 8} {
16
+ margin-left: $i * 8px;
17
+ margin-right: $i * 8px;
18
+ }
19
+
20
+ .px#{$i * 8} {
21
+ padding-left: $i * 8px;
22
+ padding-right: $i * 8px;
23
+ }
24
+ }
25
+
26
+ // Spacing up & down
27
+ @for $i from 0 through 12 {
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;
61
+ }
62
+ }
63
+
64
+ .m-auto {
65
+ margin: auto;
66
+ }
67
+
68
+ .mx-auto {
69
+ margin-left: auto;
70
+ margin-right: auto;
71
+ }
72
+ .my-auto {
73
+ margin-top: auto;
74
+ margin-bottom: auto;
75
+ }
76
+
77
+ @for $i from 0 through 12 {
78
+ .gap#{$i * 8} {
79
+ gap: $i * 8px;
80
+ }
81
+
82
+ .c-gap#{$i * 8} {
83
+ column-gap: $i * 8px;
84
+ }
85
+
86
+ .r-gap#{$i * 8} {
87
+ row-gap: $i * 8px;
88
+ }
89
+ }
@@ -0,0 +1,128 @@
1
+ @use '../../public/colors' as *;
2
+ @use '../../public/font-weight' as *;
3
+ @use '../../public/grid' as *;
4
+ @use '../../public/font' as *;
5
+
6
+ @import url('https://fonts.googleapis.com/css?family=Merriweather:700&display=swap');
7
+
8
+ body {
9
+ font-family: $font-family;
10
+ }
11
+
12
+ .p--serif {
13
+ font-family: 'Merriweather', serif;
14
+ }
15
+
16
+ .p-h1,
17
+ .p-h2,
18
+ .p-h3,
19
+ .p-h4,
20
+ .p-p {
21
+ color: $ds-grey-900;
22
+ }
23
+
24
+ .p-h1 {
25
+ font-weight: $p-font-weight-bold;
26
+ font-size: 32px;
27
+ line-height: 42px;
28
+ letter-spacing: 0.5px;
29
+
30
+ @include p-size-mobile {
31
+ font-size: 24px;
32
+ line-height: 34px;
33
+ }
34
+
35
+ &--xl {
36
+ @extend .p-h1;
37
+ font-size: 48px;
38
+ line-height: 58px;
39
+
40
+ @include p-size-mobile {
41
+ font-size: 32px;
42
+ line-height: 42px;
43
+ }
44
+ }
45
+ }
46
+
47
+ .p-h2 {
48
+ font-weight: bold;
49
+ font-size: 24px;
50
+ line-height: 34px;
51
+ letter-spacing: 0.5px;
52
+
53
+ @include p-size-mobile {
54
+ font-size: 18px;
55
+ line-height: 24px;
56
+ }
57
+ }
58
+
59
+ .p-h3 {
60
+ font-weight: $p-font-weight-bold;
61
+ font-size: 18px;
62
+ line-height: 24px;
63
+ letter-spacing: 0.5px;
64
+
65
+ @include p-size-mobile {
66
+ font-size: 16px;
67
+ line-height: 24px;
68
+ }
69
+ }
70
+
71
+ .p-h4 {
72
+ font-weight: $p-font-weight-bold;
73
+ font-size: 16px;
74
+ line-height: 24px;
75
+ letter-spacing: 0.5px;
76
+ }
77
+
78
+ .p-p {
79
+ font-weight: $p-font-weight-normal;
80
+ font-size: 16px;
81
+ line-height: 24px;
82
+ letter-spacing: 0.5px;
83
+
84
+ &--small {
85
+ @extend .p-p;
86
+ font-size: 12px;
87
+ line-height: 18px;
88
+ }
89
+ }
90
+
91
+ .p-error {
92
+ color: $ds-red-500;
93
+ }
94
+
95
+ .p-a {
96
+ color: $ds-primary-500;
97
+ text-decoration: none;
98
+ &:hover,
99
+ &:focus {
100
+ color: $ds-primary-700;
101
+ }
102
+ }
103
+
104
+ // Layout
105
+ .ta-left {
106
+ text-align: left;
107
+ }
108
+
109
+ .ta-center {
110
+ text-align: center;
111
+ }
112
+
113
+ .ta-right {
114
+ text-align: right;
115
+ }
116
+
117
+ .ta-justify {
118
+ text-align: justify;
119
+ }
120
+
121
+ // Font style
122
+ .fs-italic {
123
+ font-style: italic;
124
+ }
125
+
126
+ .fs-normal {
127
+ font-style: normal;
128
+ }
@@ -0,0 +1,25 @@
1
+ @for $i from 1 through 12 {
2
+ .ws#{$i} {
3
+ width: $i * 60px + ($i - 1) * 16px;
4
+ }
5
+ .wmn#{$i} {
6
+ min-width: $i * 60px + ($i - 1) * 16px;
7
+ }
8
+ .wmx#{$i} {
9
+ max-width: $i * 60px + ($i - 1) * 16px;
10
+ }
11
+ }
12
+
13
+ .w-auto {
14
+ width: auto;
15
+ }
16
+
17
+ .w0 {
18
+ width: 0;
19
+ }
20
+
21
+ @for $i from 1 through 10 {
22
+ .w#{$i * 10} {
23
+ width: $i * 10%;
24
+ }
25
+ }
@@ -0,0 +1,43 @@
1
+ <Meta title="CSS/Base/Border Radius" />
2
+
3
+ import styles from './style.module.scss';
4
+
5
+ # Border Radius
6
+
7
+ Utilities for changing an element's border radius
8
+
9
+ ## Classes
10
+
11
+ | Class | Output |
12
+ | ------------ | ----------------------- |
13
+ | `.br0` | `border-radius: 0;` |
14
+ | `.br2` | `border-radius: 2px;` |
15
+ | `.br4` | `border-radius: 4px;` |
16
+ | `.br8` | `border-radius: 8px;` |
17
+ | `.br12` | `border-radius: 12px;` |
18
+ | `.br16` | `border-radius: 16px;` |
19
+ | `.br24` | `border-radius: 24px;` |
20
+ | | |
21
+ | `.br-circle` | `border-radius: 50%;` |
22
+ | `.br-pill` | `border-radius: 999px;` |
23
+
24
+ export const BorderRadiusExample = () => {
25
+ const values = ['0', '2', '4', '8', '12', '16', '24', '-circle', '-pill'];
26
+ return (
27
+ <div className="d-flex gap16">
28
+ {values.map((value) =>
29
+ value === '-pill' ? (
30
+ <div
31
+ className={`d-flex ai-center jc-center bg-primary-100 br${value} ${styles.rectangle}`}
32
+ >{`br${value}`}</div>
33
+ ) : (
34
+ <div
35
+ className={`d-flex ai-center jc-center bg-primary-100 br${value} ${styles.square}`}
36
+ >{`br${value}`}</div>
37
+ )
38
+ )}
39
+ </div>
40
+ );
41
+ };
42
+
43
+ <BorderRadiusExample />
@@ -0,0 +1,18 @@
1
+ <Meta title="CSS/Base/Cursors" />
2
+
3
+ # Cursors
4
+
5
+ Utilities for controlling the cursor style when hovering over an element.
6
+
7
+ ## Classes
8
+
9
+ | Class | Output |
10
+ | ---------------- | ---------------------- |
11
+ | `.c-auto` | `cursor: auto;` |
12
+ | `.c-default` | `cursor: default;` |
13
+ | `.c-pointer` | `cursor: pointer;` |
14
+ | `.c-text` | `cursor: text;` |
15
+ | `.c-wait` | `cursor: wait;` |
16
+ | `.c-move` | `cursor: move;` |
17
+ | `.c-not-allowed` | `cursor: not-allowed;` |
18
+ | `.c-help` | `cursor: help;` |