@popsure/dirty-swan 0.33.4 → 0.34.0

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 (139) hide show
  1. package/dist/cjs/index.js +25 -18
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/lib/components/cards/cardButton/index.d.ts +8 -8
  4. package/dist/cjs/lib/components/cards/cardButton/index.stories.d.ts +39 -0
  5. package/dist/cjs/lib/components/cards/cardWithLeftIcon/index.d.ts +6 -12
  6. package/dist/cjs/lib/components/cards/cardWithLeftIcon/index.stories.d.ts +55 -0
  7. package/dist/cjs/lib/components/cards/cardWithTopIcon/index.d.ts +5 -11
  8. package/dist/cjs/lib/components/cards/cardWithTopIcon/index.stories.d.ts +59 -0
  9. package/dist/cjs/lib/components/cards/cardWithTopLeftIcon/index.d.ts +6 -12
  10. package/dist/cjs/lib/components/cards/cardWithTopLeftIcon/index.stories.d.ts +49 -0
  11. package/dist/cjs/lib/components/cards/index.d.ts +5 -5
  12. package/dist/cjs/lib/components/cards/infoCard/index.d.ts +4 -10
  13. package/dist/cjs/lib/components/cards/infoCard/index.stories.d.ts +47 -0
  14. package/dist/cjs/lib/components/dateSelector/index.d.ts +11 -11
  15. package/dist/cjs/lib/components/dateSelector/index.stories.d.ts +65 -0
  16. package/dist/cjs/lib/components/input/index.d.ts +4 -5
  17. package/dist/cjs/lib/components/input/input.stories.d.ts +90 -0
  18. package/dist/cjs/lib/components/input/stories/config.d.ts +71 -0
  19. package/dist/cjs/lib/components/multiDropzone/index.d.ts +4 -4
  20. package/dist/cjs/lib/components/multiDropzone/index.stories.d.ts +72 -0
  21. package/dist/cjs/lib/index.d.ts +3 -3
  22. package/dist/cjs/lib/util/images/index.d.ts +7 -0
  23. package/dist/esm/components/autocompleteAddress/index.js +1 -1
  24. package/dist/esm/components/autocompleteAddress/index.js.map +1 -1
  25. package/dist/esm/components/cards/cardButton/index.js +1 -1
  26. package/dist/esm/components/cards/cardButton/index.stories.js +49 -0
  27. package/dist/esm/components/cards/cardButton/index.stories.js.map +1 -0
  28. package/dist/esm/components/cards/cardWithLeftIcon/index.js +1 -1
  29. package/dist/esm/components/cards/cardWithLeftIcon/index.stories.js +64 -0
  30. package/dist/esm/components/cards/cardWithLeftIcon/index.stories.js.map +1 -0
  31. package/dist/esm/components/cards/cardWithTopIcon/index.js +1 -1
  32. package/dist/esm/components/cards/cardWithTopIcon/index.stories.js +68 -0
  33. package/dist/esm/components/cards/cardWithTopIcon/index.stories.js.map +1 -0
  34. package/dist/esm/components/cards/cardWithTopLeftIcon/index.js +1 -1
  35. package/dist/esm/components/cards/cardWithTopLeftIcon/index.stories.js +57 -0
  36. package/dist/esm/components/cards/cardWithTopLeftIcon/index.stories.js.map +1 -0
  37. package/dist/esm/components/cards/index.js +9 -9
  38. package/dist/esm/components/cards/index.js.map +1 -1
  39. package/dist/esm/components/cards/infoCard/index.js +1 -1
  40. package/dist/esm/components/cards/infoCard/index.stories.js +58 -0
  41. package/dist/esm/components/cards/infoCard/index.stories.js.map +1 -0
  42. package/dist/esm/components/comparisonTable/components/AccordionItem/AccordionItem.js +1 -1
  43. package/dist/esm/components/comparisonTable/components/TableArrows/index.js +1 -1
  44. package/dist/esm/components/comparisonTable/components/TableInfoButton/index.js +1 -1
  45. package/dist/esm/components/dateSelector/index.js +6 -2179
  46. package/dist/esm/components/dateSelector/index.js.map +1 -1
  47. package/dist/esm/components/dateSelector/index.stories.js +92 -0
  48. package/dist/esm/components/dateSelector/index.stories.js.map +1 -0
  49. package/dist/esm/components/dateSelector/index.test.js +1 -1
  50. package/dist/esm/components/dateSelector/index.test.js.map +1 -1
  51. package/dist/esm/components/input/autoSuggestInput/index.js +1 -1
  52. package/dist/esm/components/input/autoSuggestInput/index.js.map +1 -1
  53. package/dist/esm/components/input/checkbox/index.stories.js +1 -1
  54. package/dist/esm/components/input/currency/index.js +1 -1
  55. package/dist/esm/components/input/currency/index.js.map +1 -1
  56. package/dist/esm/components/input/iban/index.js +1 -1
  57. package/dist/esm/components/input/iban/index.js.map +1 -1
  58. package/dist/esm/components/input/index.js +1 -1
  59. package/dist/esm/components/input/index.js.map +1 -1
  60. package/dist/esm/components/input/input.stories.js +85 -0
  61. package/dist/esm/components/input/input.stories.js.map +1 -0
  62. package/dist/esm/components/multiDropzone/index.js +3 -3
  63. package/dist/esm/components/multiDropzone/index.js.map +1 -1
  64. package/dist/esm/components/multiDropzone/index.stories.js +147 -0
  65. package/dist/esm/components/multiDropzone/index.stories.js.map +1 -0
  66. package/dist/esm/components/multiDropzone/index.test.js +2 -2
  67. package/dist/esm/components/multiDropzone/index.test.js.map +1 -1
  68. package/dist/esm/{index-e81a1766.js → index-31224f74.js} +8 -1
  69. package/dist/esm/index-31224f74.js.map +1 -0
  70. package/dist/esm/index-47663d39.js.map +1 -1
  71. package/dist/esm/index-639cf8b3.js +2179 -0
  72. package/dist/esm/index-639cf8b3.js.map +1 -0
  73. package/dist/esm/index.js +4 -4
  74. package/dist/esm/lib/components/cards/cardButton/index.d.ts +8 -8
  75. package/dist/esm/lib/components/cards/cardButton/index.stories.d.ts +39 -0
  76. package/dist/esm/lib/components/cards/cardWithLeftIcon/index.d.ts +6 -12
  77. package/dist/esm/lib/components/cards/cardWithLeftIcon/index.stories.d.ts +55 -0
  78. package/dist/esm/lib/components/cards/cardWithTopIcon/index.d.ts +5 -11
  79. package/dist/esm/lib/components/cards/cardWithTopIcon/index.stories.d.ts +59 -0
  80. package/dist/esm/lib/components/cards/cardWithTopLeftIcon/index.d.ts +6 -12
  81. package/dist/esm/lib/components/cards/cardWithTopLeftIcon/index.stories.d.ts +49 -0
  82. package/dist/esm/lib/components/cards/index.d.ts +5 -5
  83. package/dist/esm/lib/components/cards/infoCard/index.d.ts +4 -10
  84. package/dist/esm/lib/components/cards/infoCard/index.stories.d.ts +47 -0
  85. package/dist/esm/lib/components/dateSelector/index.d.ts +11 -11
  86. package/dist/esm/lib/components/dateSelector/index.stories.d.ts +65 -0
  87. package/dist/esm/lib/components/input/index.d.ts +4 -5
  88. package/dist/esm/lib/components/input/input.stories.d.ts +90 -0
  89. package/dist/esm/lib/components/input/stories/config.d.ts +71 -0
  90. package/dist/esm/lib/components/multiDropzone/index.d.ts +4 -4
  91. package/dist/esm/lib/components/multiDropzone/index.stories.d.ts +72 -0
  92. package/dist/esm/lib/index.d.ts +3 -3
  93. package/dist/esm/lib/util/images/index.d.ts +7 -0
  94. package/dist/esm/scss/public/demo.js +1 -1
  95. package/dist/esm/scss/public/demo.js.map +1 -1
  96. package/dist/esm/util/images/index.stories.js +1 -1
  97. package/dist/index.css +10 -10
  98. package/dist/lib/scss/public/colors/default.scss +2 -2
  99. package/dist/lib/scss/public/demo.tsx +1 -1
  100. package/package.json +1 -1
  101. package/src/App.tsx +1 -1
  102. package/src/lib/components/autocompleteAddress/index.tsx +1 -1
  103. package/src/lib/components/cards/cardButton/index.stories.tsx +61 -0
  104. package/src/lib/components/cards/cardButton/index.tsx +9 -10
  105. package/src/lib/components/cards/cardWithLeftIcon/index.stories.tsx +79 -0
  106. package/src/lib/components/cards/cardWithLeftIcon/index.tsx +8 -6
  107. package/src/lib/components/cards/cardWithTopIcon/index.stories.tsx +85 -0
  108. package/src/lib/components/cards/cardWithTopIcon/index.tsx +9 -7
  109. package/src/lib/components/cards/cardWithTopLeftIcon/index.stories.tsx +73 -0
  110. package/src/lib/components/cards/cardWithTopLeftIcon/index.tsx +8 -6
  111. package/src/lib/components/cards/index.tsx +5 -5
  112. package/src/lib/components/cards/infoCard/index.stories.tsx +71 -0
  113. package/src/lib/components/cards/infoCard/index.tsx +7 -5
  114. package/src/lib/components/dateSelector/index.stories.tsx +104 -0
  115. package/src/lib/components/dateSelector/index.test.tsx +2 -2
  116. package/src/lib/components/dateSelector/index.tsx +14 -14
  117. package/src/lib/components/input/a.stories.mdx +2 -2
  118. package/src/lib/components/input/autoSuggestInput/index.tsx +1 -1
  119. package/src/lib/components/input/currency/index.tsx +1 -1
  120. package/src/lib/components/input/iban/index.tsx +1 -1
  121. package/src/lib/components/input/index.tsx +4 -4
  122. package/src/lib/components/input/input.stories.tsx +48 -0
  123. package/src/lib/components/input/stories/config.ts +56 -0
  124. package/src/lib/components/multiDropzone/index.stories.tsx +228 -0
  125. package/src/lib/components/multiDropzone/index.test.tsx +1 -1
  126. package/src/lib/components/multiDropzone/index.tsx +6 -6
  127. package/src/lib/index.tsx +4 -3
  128. package/src/lib/scss/public/colors/default.scss +2 -2
  129. package/src/lib/scss/public/demo.tsx +1 -1
  130. package/src/lib/util/images/index.ts +7 -0
  131. package/dist/esm/index-e81a1766.js.map +0 -1
  132. package/src/lib/components/cards/cardButton/index.stories.mdx +0 -47
  133. package/src/lib/components/cards/cardWithLeftIcon/index.stories.mdx +0 -103
  134. package/src/lib/components/cards/cardWithTopIcon/index.stories.mdx +0 -105
  135. package/src/lib/components/cards/cardWithTopLeftIcon/index.stories.mdx +0 -101
  136. package/src/lib/components/cards/infoCard/index.stories.mdx +0 -61
  137. package/src/lib/components/dateSelector/index.stories.mdx +0 -106
  138. package/src/lib/components/input/index.stories.mdx +0 -108
  139. package/src/lib/components/multiDropzone/index.stories.mdx +0 -187
@@ -0,0 +1,228 @@
1
+ import { useState } from 'react';
2
+ import { MultiDropzone, MultiDropzoneProps } from '.';
3
+ import { UploadedFile } from './types';
4
+
5
+ const story = {
6
+ title: 'JSX/MultiDropzone',
7
+ component: MultiDropzone,
8
+ argTypes: {
9
+ uploadedFiles: {
10
+ defaultValue: [{
11
+ id: '123456789',
12
+ name: 'dummyfile.png'
13
+ }],
14
+ description: 'List of files to be displayed on the component.',
15
+ },
16
+ uploading: {
17
+ defaultValue: false,
18
+ description: 'Property that allows to display component in an uploading state',
19
+ },
20
+ isCondensed: {
21
+ defaultValue: false,
22
+ description: 'Property that allows to display component in a smaller layout',
23
+ },
24
+ maxFiles: {
25
+ description: 'Property that allows to display the maximum number of files allowed',
26
+ table: {
27
+ category: 'File Validation',
28
+ },
29
+ },
30
+ maxSize: {
31
+ description: 'Property that allows to display the maximum size of files allowed',
32
+ table: {
33
+ category: 'File Validation',
34
+ },
35
+ },
36
+ accept: {
37
+ description: 'Property that allows to define which file types are accepted',
38
+ table: {
39
+ category: 'File Validation',
40
+ },
41
+ },
42
+ onRemoveFile: {
43
+ description: 'Called when a file remove button is clicked',
44
+ action: true,
45
+ table: {
46
+ category: 'Callbacks',
47
+ },
48
+ },
49
+ onFileSelect: {
50
+ description: 'Called when a file is uploaded',
51
+ action: true,
52
+ table: {
53
+ category: 'Callbacks',
54
+ },
55
+ },
56
+ textOverrides: {
57
+ description: 'Properties that allow to localise component',
58
+ },
59
+ },
60
+ parameters: {
61
+ componentSubtitle: 'MultiDropzone component allows upload of multiple documents / files.',
62
+ },
63
+ };
64
+
65
+ export const MultiDropzoneStory = ({
66
+ onFileSelect,
67
+ onRemoveFile,
68
+ uploading,
69
+ uploadedFiles = [],
70
+ isCondensed,
71
+ maxFiles,
72
+ maxSize,
73
+ textOverrides,
74
+ }: MultiDropzoneProps) => {
75
+ const [localFiles, setLocalFiles] = useState<UploadedFile[]>(uploadedFiles);
76
+
77
+ const handleOnRemoveFile = (id: string) => {
78
+ onRemoveFile(id);
79
+ setLocalFiles((prevFiles) => prevFiles.filter((file) => file.id !== id));
80
+ };
81
+
82
+ const handleOnFileSelect = (files: File[]) => {
83
+ const newFiles = files.map((newFile) => ({
84
+ id: String(new Date().getTime()),
85
+ name: newFile.name,
86
+ progress: 100,
87
+ }));
88
+ setLocalFiles((prevFiles) => [...prevFiles, ...newFiles]);
89
+ onFileSelect(files);
90
+ };
91
+
92
+ return (
93
+ <MultiDropzone
94
+ onFileSelect={handleOnFileSelect}
95
+ onRemoveFile={handleOnRemoveFile}
96
+ uploadedFiles={localFiles}
97
+ uploading={uploading}
98
+ isCondensed={isCondensed}
99
+ maxFiles={maxFiles}
100
+ maxSize={maxSize}
101
+ textOverrides={textOverrides}
102
+ />
103
+ );
104
+ };
105
+
106
+ MultiDropzoneStory.storyName = "MultiDropzone";
107
+
108
+ export const UploadingState = () => (
109
+ <MultiDropzone
110
+ uploadedFiles={[
111
+ {
112
+ id: '123',
113
+ progress: 72,
114
+ name: 'test_file_name.pdf',
115
+ previewUrl: 'http://getpopsure.com/test_file_name.pdf',
116
+ },
117
+ {
118
+ id: '124',
119
+ progress: 72,
120
+ name: 'test_file_name.pdf',
121
+ previewUrl: 'http://getpopsure.com/test_file_name.pdf',
122
+ showLoadingSpinner: true,
123
+ showProgressBar: false,
124
+ },
125
+ {
126
+ id: '125',
127
+ progress: 72,
128
+ name: 'test_file_name.pdf',
129
+ previewUrl: 'http://getpopsure.com/test_file_name.pdf',
130
+ showLoadingSpinner: true,
131
+ },
132
+ {
133
+ id: '456',
134
+ progress: 100,
135
+ name: 'test_file_name2.pdf',
136
+ previewUrl: 'http://getpopsure.com/test_file_name2.pdf',
137
+ },
138
+ ]}
139
+ onFileSelect={() => {}}
140
+ uploading={true}
141
+ onRemoveFile={() => {}}
142
+ />
143
+ );
144
+
145
+
146
+ export const CondensedView = () => (
147
+ <MultiDropzone
148
+ uploadedFiles={[
149
+ {
150
+ id: '123',
151
+ progress: 100,
152
+ name: 'test_file_name.pdf',
153
+ previewUrl: 'http://getpopsure.com/test_file_name.pdf',
154
+ },
155
+ ]}
156
+ onFileSelect={() => {}}
157
+ uploading={false}
158
+ onRemoveFile={() => {}}
159
+ isCondensed
160
+ />
161
+ );
162
+
163
+ export const ErrorState = () => (
164
+ <MultiDropzone
165
+ uploadedFiles={[
166
+ {
167
+ id: '123',
168
+ progress: 0,
169
+ name: 'test_file_name.pdf',
170
+ previewUrl: 'http://getpopsure.com/test_file_name.pdf',
171
+ error: 'File is too big!',
172
+ },
173
+ ]}
174
+ onFileSelect={() => {}}
175
+ uploading={false}
176
+ onRemoveFile={() => {}}
177
+ />
178
+ );
179
+
180
+ export const AcceptingOnlyImages = () => (
181
+ <MultiDropzone
182
+ accept="image"
183
+ isCondensed
184
+ uploadedFiles={[]}
185
+ onFileSelect={() => {}}
186
+ uploading={false}
187
+ onRemoveFile={() => {}}
188
+ />
189
+ );
190
+
191
+ export const AcceptingOnlyDocuments = () => (
192
+ <MultiDropzone
193
+ accept="document"
194
+ isCondensed
195
+ uploadedFiles={[]}
196
+ onFileSelect={() => {}}
197
+ uploading={false}
198
+ onRemoveFile={() => {}}
199
+ />
200
+ );
201
+
202
+ export const LimitingFileSizeTo2MB = () => (
203
+ <MultiDropzone
204
+ isCondensed
205
+ uploadedFiles={[]}
206
+ onFileSelect={() => {}}
207
+ uploading={false}
208
+ onRemoveFile={() => {}}
209
+ maxSize={2096000}
210
+ />
211
+ );
212
+
213
+ export const I18nSupport = () => (
214
+ <MultiDropzone
215
+ uploadedFiles={[]}
216
+ onFileSelect={() => {}}
217
+ uploading={false}
218
+ onRemoveFile={() => {}}
219
+ textOverrides={{
220
+ instructionsText: 'Datei auswählen oder per Drag & Drop platzieren',
221
+ supportsTextShort: 'Unterstützt werden',
222
+ currentlyUploadingText:
223
+ 'Bitte warten während die Datei hochgeladen wird...'
224
+ }}
225
+ />
226
+ );
227
+
228
+ export default story;
@@ -1,7 +1,7 @@
1
1
  import { act, fireEvent, render } from '../../util/testUtils';
2
2
  import '@testing-library/jest-dom';
3
3
 
4
- import MultiDropzone, { MultiDropzoneProps } from '.';
4
+ import { MultiDropzone, MultiDropzoneProps } from '.';
5
5
 
6
6
  const mockOnFileSelect = jest.fn();
7
7
  const mockOnRemoveFile = jest.fn();
@@ -25,24 +25,24 @@ import {
25
25
  import { formatBytes } from '../../util/formatBytes';
26
26
 
27
27
  interface MultiDropzoneProps {
28
- accept?: AcceptType;
29
- onFileSelect: (files: File[]) => void;
30
28
  uploadedFiles: UploadedFile[];
31
29
  uploading: boolean;
30
+ onFileSelect: (files: File[]) => void;
32
31
  onRemoveFile: (id: string) => void;
32
+ accept?: AcceptType;
33
33
  isCondensed?: boolean;
34
34
  maxFiles?: number;
35
35
  maxSize?: number;
36
36
  textOverrides?: TextOverrides;
37
37
  }
38
38
 
39
- const MultiDropZone = ({
40
- accept,
39
+ const MultiDropzone = ({
41
40
  uploadedFiles,
42
41
  onFileSelect,
43
- uploading,
44
42
  onRemoveFile,
43
+ uploading,
45
44
  isCondensed = false,
45
+ accept,
46
46
  maxFiles = 0,
47
47
  maxSize,
48
48
  textOverrides,
@@ -157,4 +157,4 @@ const placeholder = `${textOverrides?.supportsTextShort || "Supports"} ${fileLis
157
157
  };
158
158
 
159
159
  export type { FileType, MultiDropzoneProps, UploadedFile, UploadStatus };
160
- export default MultiDropZone;
160
+ export { MultiDropzone };
package/src/lib/index.tsx CHANGED
@@ -1,8 +1,9 @@
1
- import DateSelector from './components/dateSelector';
1
+ import { DateSelector } from './components/dateSelector';
2
2
  import { SignaturePad } from './components/signaturePad';
3
3
  import { AutocompleteAddress } from './components/autocompleteAddress';
4
- import Input from './components/input';
5
- import MultiDropzone, {
4
+ import { Input } from './components/input';
5
+ import {
6
+ MultiDropzone,
6
7
  FileType,
7
8
  MultiDropzoneProps,
8
9
  UploadedFile,
@@ -1,7 +1,7 @@
1
1
  // TODO: Reference colors
2
2
  $ds-primary-25: #fcfcff !default;
3
3
  $ds-primary-50: #f7f7ff !default;
4
- $ds-primary-100: #e6e5ff !default;
4
+ $ds-primary-100: #ebebff !default;
5
5
  $ds-primary-300: #b1b0f5 !default;
6
6
  $ds-primary-500: #8e8cee !default;
7
7
  $ds-primary-700: #6160a2 !default;
@@ -9,7 +9,7 @@ $ds-primary-900: #2e2e4c !default;
9
9
 
10
10
  $ds-purple-25: #fcfcff;
11
11
  $ds-purple-50: #f7f7ff;
12
- $ds-purple-100: #e6e5ff;
12
+ $ds-purple-100: #ebebff;
13
13
  $ds-purple-300: #b1b0f5;
14
14
  $ds-purple-500: #8e8cee;
15
15
  $ds-purple-700: #6160a2;
@@ -24,7 +24,7 @@ const colors = [
24
24
  {
25
25
  name: 'Primary 100',
26
26
  code: 'primary-100',
27
- hex: '#e6e5ff',
27
+ hex: '#ebebff',
28
28
  },
29
29
  {
30
30
  name: 'Primary 300',
@@ -8,12 +8,19 @@ const images = {
8
8
  dogLiability: `${basePath}/dogLiabilityIcon.png`,
9
9
  dogLiability2x: `${basePath}/dogLiabilityIcon2x.png`,
10
10
  dogLiability3x: `${basePath}/dogLiabilityIcon3x.png`,
11
+ lifeIcon: `${basePath}/lifeIcon.png`,
12
+ lifeIcon2x: `${basePath}/lifeIcon2x.png`,
13
+ lifeIcon3x: `${basePath}/lifeIcon3x.png`,
11
14
  },
12
15
  brokenAquarium: `${basePath}/brokenAquarium.svg`,
13
16
  brokenGlass: `${basePath}/brokenGlass.svg`,
14
17
  damagedLaptop: `${basePath}/damagedLaptop.svg`,
15
18
  moneyIncome: `${basePath}/moneyIncome.svg`,
16
19
  washingMachine: `${basePath}/washingMachine.svg`,
20
+ bill: `${basePath}/bill.svg`,
21
+ books: `${basePath}/books.svg`,
22
+ finalExpenses: `${basePath}/finalExpenses.svg`,
23
+ mortgage: `${basePath}/mortgage.svg`,
17
24
  } as const;
18
25
 
19
26
  export { images };
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-e81a1766.js","sources":["../../../src/lib/util/images/index.ts"],"sourcesContent":["const basePath = 'https://assets.cdn.feather-insurance.com/assets/images';\n\nconst images = {\n aid: `${basePath}/aid.svg`,\n bed: `${basePath}/bed.svg`,\n bigDog: `${basePath}/bigDog.svg`,\n verticalIcons: {\n dogLiability: `${basePath}/dogLiabilityIcon.png`,\n dogLiability2x: `${basePath}/dogLiabilityIcon2x.png`,\n dogLiability3x: `${basePath}/dogLiabilityIcon3x.png`,\n },\n brokenAquarium: `${basePath}/brokenAquarium.svg`,\n brokenGlass: `${basePath}/brokenGlass.svg`,\n damagedLaptop: `${basePath}/damagedLaptop.svg`,\n moneyIncome: `${basePath}/moneyIncome.svg`,\n washingMachine: `${basePath}/washingMachine.svg`,\n} as const;\n\nexport { images };\n"],"names":[],"mappings":"AAAA,IAAM,QAAQ,GAAG,wDAAwD,CAAC;IAEpE,MAAM,GAAG;IACb,GAAG,EAAK,QAAQ,aAAU;IAC1B,GAAG,EAAK,QAAQ,aAAU;IAC1B,MAAM,EAAK,QAAQ,gBAAa;IAChC,aAAa,EAAE;QACb,YAAY,EAAK,QAAQ,0BAAuB;QAChD,cAAc,EAAK,QAAQ,4BAAyB;QACpD,cAAc,EAAK,QAAQ,4BAAyB;KACrD;IACD,cAAc,EAAK,QAAQ,wBAAqB;IAChD,WAAW,EAAK,QAAQ,qBAAkB;IAC1C,aAAa,EAAK,QAAQ,uBAAoB;IAC9C,WAAW,EAAK,QAAQ,qBAAkB;IAC1C,cAAc,EAAK,QAAQ,wBAAqB;;;;;"}
@@ -1,47 +0,0 @@
1
- import { Meta, Preview } from '@storybook/addon-docs/blocks';
2
-
3
- import CardButton from '.';
4
-
5
- <Meta title="JSX/Cards/Card Button" />
6
-
7
- # Card Button
8
-
9
- | attribute | unit | description | default value | required |
10
- | ----------- | ------------------------ | ---------------------------------------------- | ------------- | ----------------------------------- |
11
- | title | string | Title text that needs to be displayed | n/a | true |
12
- | description | string / ReactNode (JSX) | Description text that is displayed under title | n/a | true |
13
- | disabled | boolean | Disabled state of the button | false | false |
14
- | className | string | Class name for most top parent element | n/a | false |
15
- | onClick | function | Function that runs on click of the button | n/a | true (false if href prop exists) |
16
- | href | string | Redirect URL on click of the button | n/a | true (false if onClick prop exists) |
17
-
18
- <Preview>
19
- <>
20
- <h4 className="p-h4">Normal state</h4>
21
- <br />
22
- <CardButton
23
- title="Name"
24
- description="Seungha Kong"
25
- onClick={() => console.log('This is a button component')}
26
- />
27
- <br />
28
- <br />
29
- <h4 className="p-h4">Long description</h4>
30
- <br />
31
- <CardButton
32
- title="Risky Sports"
33
- description="Mountain or rock climbing, Bouldering, Martial arts, Extreme sports, Scuba diving, Sky diving, Bungee jumping, Mountain or rock climbing, Bouldering, Martial arts,"
34
- onClick={() => console.log('This is a button component')}
35
- />
36
- <br />
37
- <br />
38
- <h4 className="p-h4">Disabled state</h4>
39
- <br />
40
- <CardButton
41
- title="Address"
42
- description="Lohmühlenstraße 65 10557 Berlin"
43
- onClick={() => console.log('This is a button component')}
44
- disabled
45
- />
46
- </>
47
- </Preview>
@@ -1,103 +0,0 @@
1
- import { Meta, Preview } from '@storybook/addon-docs/blocks';
2
-
3
- import CardWithLeftIcon from '.';
4
- import { featherLogo } from '../icons';
5
-
6
- <Meta title="JSX/Cards/Card with left icon" />
7
-
8
- # Card with left icon
9
-
10
- | attribute | unit | description | default value | required |
11
- | ---------- | ------------------------------------------------------------------------------------ | ------------------------------------------------- | ------------- | -------- |
12
- | title | string | The title text that needs to be displayed | n/a | true |
13
- | cardSize | [Card Size (xs,s,m,b)](?path=/story/jsx-cards-intro--page#card-size-xsmall-small-medium-big) | Size of the card | medium | false |
14
- | leftIcon | [Icon](?path=/story/jsx-cards-intro--page#icon) | Icon displayed on the left hand side of the card | n/a | false |
15
- | rightIcon | [Icon](?path=/story/jsx-cards-intro--page#icon) | Icon displayed on the right hand side of the card | n/a | false |
16
- | state | [Card State](?path=/story/jsx-cards-intro--page#card-state) | State that describe the interation with the card | actionable | false |
17
- | dropshadow | boolean | If the card should have a box-shadow or not | true | false |
18
- | className | string | Class name for most top parent element | 'n/a' | false |
19
-
20
- <Preview>
21
- <>
22
- <h4 className="p-h4">Extra small card</h4>
23
- <CardWithLeftIcon
24
- title="Lorem ipsum"
25
- cardSize="xsmall"
26
- className="wmx6 mt8"
27
- rightIcon="arrow"
28
- leftIcon={featherLogo}
29
- >
30
- Praesent euismod porta odio at tempus.{' '}
31
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
32
- eros at, rhoncus imperdiet nunc
33
- </CardWithLeftIcon>
34
- <h4 className="p-h4">Small card</h4>
35
- <CardWithLeftIcon
36
- title="Lorem ipsum"
37
- cardSize="small"
38
- className="wmx6 mt8"
39
- rightIcon="arrow"
40
- leftIcon={featherLogo}
41
- >
42
- Praesent euismod porta odio at tempus.{' '}
43
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
44
- eros at, rhoncus imperdiet nunc
45
- </CardWithLeftIcon>
46
- <h4 className="p-h4 mt24">Medium card</h4>
47
- <CardWithLeftIcon
48
- title="Lorem ipsum"
49
- cardSize="medium"
50
- className="wmx6 mt8"
51
- rightIcon="arrow"
52
- leftIcon={featherLogo}
53
- >
54
- Praesent euismod porta odio at tempus.{' '}
55
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
56
- eros at, rhoncus imperdiet nunc
57
- </CardWithLeftIcon>
58
- <h4 className="p-h4 mt24">Big card</h4>
59
- <CardWithLeftIcon
60
- title="Lorem ipsum"
61
- cardSize="big"
62
- className="wmx6 mt8"
63
- rightIcon="arrow"
64
- leftIcon={featherLogo}
65
- >
66
- Praesent euismod porta odio at tempus.{' '}
67
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
68
- eros at, rhoncus imperdiet nunc
69
- </CardWithLeftIcon>
70
- <h4 className="p-h4 mt24">Muted</h4>
71
- <CardWithLeftIcon
72
- state="muted"
73
- title="Lorem ipsum"
74
- cardSize="big"
75
- className="wmx6 mt8"
76
- rightIcon="arrow"
77
- leftIcon={featherLogo}
78
- >
79
- Praesent euismod porta odio at tempus.{' '}
80
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
81
- eros at, rhoncus imperdiet nunc
82
- </CardWithLeftIcon>
83
- <h4 className="p-h4 mt24">No left icon and right icon</h4>
84
- <CardWithLeftIcon title="Lorem ipsum" cardSize="big" className="wmx6 mt8">
85
- Praesent euismod porta odio at tempus.{' '}
86
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
87
- eros at, rhoncus imperdiet nunc
88
- </CardWithLeftIcon>
89
- <h4 className="p-h4 mt24">No dropshadow</h4>
90
- <CardWithLeftIcon
91
- title="Lorem ipsum"
92
- cardSize="medium"
93
- className="wmx6 mt8"
94
- rightIcon="arrow"
95
- leftIcon={featherLogo}
96
- dropshadow={false}
97
- >
98
- Praesent euismod porta odio at tempus.{' '}
99
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
100
- eros at, rhoncus imperdiet nunc
101
- </CardWithLeftIcon>
102
- </>
103
- </Preview>
@@ -1,105 +0,0 @@
1
- import { Meta, Preview } from '@storybook/addon-docs/blocks';
2
-
3
- import CardWithTopIcon from '.';
4
- import { featherLogo } from '../icons';
5
-
6
- <Meta title="JSX/Cards/Card with top icon" />
7
-
8
- # Card with top icon
9
-
10
- | attribute | unit | description | default value | required |
11
- | ---------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------- | -------- |
12
- | title | string | The title text that needs to be displayed | n/a | true |
13
- | cardSize | [Card Size (s,m,b)](?path=/story/jsx-cards-intro--page#card-size-xsmall-small-medium-big) | Size of the card | medium | false |
14
- | topIcon | [Icon](?path=/story/jsx-cards-intro--page#icon) | Icon displayed on the top of the card | n/a | true |
15
- | rightIcon | [Icon](?path=/story/jsx-cards-intro--page#icon) | Icon displayed on the right of the title | n/a | false |
16
- | state | [Card State](?path=/story/jsx-cards-intro--page#card-state) | State that describe the interation with the card | actionable | false |
17
- | dropshadow | boolean | If the card should have a box-shadow or not | true | false |
18
-
19
- <Preview>
20
- <>
21
- <h4 className="p-h4">Small card</h4>
22
- <CardWithTopIcon
23
- title="Lorem ipsum"
24
- cardSize="small"
25
- className="wmx6 mt8"
26
- rightIcon="arrow"
27
- topIcon={featherLogo}
28
- >
29
- <p className="p-p mt16 tc-grey-600">
30
- Praesent euismod porta odio at tempus.{' '}
31
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
32
- eros at, rhoncus imperdiet nunc
33
- </p>
34
- </CardWithTopIcon>
35
- <h4 className="p-h4 mt24">Medium card</h4>
36
- <CardWithTopIcon
37
- title="Lorem ipsum"
38
- cardSize="medium"
39
- className="wmx6 mt8"
40
- rightIcon="arrow"
41
- topIcon={featherLogo}
42
- >
43
- <p className="p-p mt16 tc-grey-600">
44
- Praesent euismod porta odio at tempus.{' '}
45
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
46
- eros at, rhoncus imperdiet nunc
47
- </p>
48
- </CardWithTopIcon>
49
- <h4 className="p-h4 mt24">Big card</h4>
50
- <CardWithTopIcon
51
- title="Lorem ipsum"
52
- cardSize="big"
53
- className="wmx6 mt8"
54
- rightIcon="arrow"
55
- topIcon={featherLogo}
56
- >
57
- <p className="p-p mt16 tc-grey-600">
58
- Praesent euismod porta odio at tempus.{' '}
59
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
60
- eros at, rhoncus imperdiet nunc
61
- </p>
62
- </CardWithTopIcon>
63
- <h4 className="p-h4 mt24">Muted</h4>
64
- <CardWithTopIcon
65
- title="Lorem ipsum"
66
- className="wmx6 mt8"
67
- rightIcon="arrow"
68
- topIcon={featherLogo}
69
- state="muted"
70
- >
71
- <p className="p-p mt16 tc-grey-600">
72
- Praesent euismod porta odio at tempus.{' '}
73
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
74
- eros at, rhoncus imperdiet nunc
75
- </p>
76
- </CardWithTopIcon>
77
- <h4 className="p-h4 mt24">No right icon</h4>
78
- <CardWithTopIcon
79
- title="Lorem ipsum"
80
- topIcon={featherLogo}
81
- cardSize="small"
82
- className="wmx6 mt8"
83
- >
84
- <p className="p-p mt16 tc-grey-600">
85
- Praesent euismod porta odio at tempus.{' '}
86
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
87
- eros at, rhoncus imperdiet nunc
88
- </p>
89
- </CardWithTopIcon>
90
- <h4 className="p-h4 mt24">No dropshadow</h4>
91
- <CardWithTopIcon
92
- title="Lorem ipsum"
93
- topIcon={featherLogo}
94
- cardSize="small"
95
- className="wmx6 mt8"
96
- dropshadow={false}
97
- >
98
- <p className="p-p mt16 tc-grey-600">
99
- Praesent euismod porta odio at tempus.{' '}
100
- <span className="fw-bold">Aenean urna massa</span>, facilisis malesuada
101
- eros at, rhoncus imperdiet nunc
102
- </p>
103
- </CardWithTopIcon>
104
- </>
105
- </Preview>