@popsure/dirty-swan 0.27.3 → 0.27.6

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.
@@ -1,3 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  export declare const WithoutAddress: () => JSX.Element;
3
3
  export declare const WithAddress: () => JSX.Element;
4
+ export declare const WithoutAddressLocalized: () => JSX.Element;
5
+ export declare const WithAddressLocalized: () => JSX.Element;
@@ -1,8 +1,20 @@
1
1
  /// <reference types="react" />
2
2
  import { Address } from '@popsure/public-models';
3
- declare const AutoCompleteAddress: ({ apiKey, address: initialAddress, onAddressChange, }: {
3
+ declare const AutoCompleteAddress: ({ apiKey, address: initialAddress, onAddressChange, placeholders, manualAddressEntryTexts, }: {
4
4
  apiKey: string;
5
5
  address?: Partial<Address> | undefined;
6
6
  onAddressChange: (address: Partial<Address>) => void;
7
+ placeholders?: {
8
+ manualAddressEntry?: string | undefined;
9
+ street?: string | undefined;
10
+ houseNumber?: string | undefined;
11
+ additionalInformation?: string | undefined;
12
+ postcode?: string | undefined;
13
+ city?: string | undefined;
14
+ } | undefined;
15
+ manualAddressEntryTexts?: {
16
+ preText?: string | undefined;
17
+ cta?: string | undefined;
18
+ } | undefined;
7
19
  }) => JSX.Element;
8
20
  export default AutoCompleteAddress;
@@ -5,7 +5,7 @@ export declare const daysInMonthOfYear: ({ month, year, }: {
5
5
  month: number;
6
6
  year: number;
7
7
  }) => number;
8
- declare const DateSelector: ({ value, onChange, yearBoundaries, displayCalendar, }: {
8
+ declare const DateSelector: ({ value, onChange, yearBoundaries, displayCalendar, placeholders, dayjsLocale, firstDayOfWeek, }: {
9
9
  value?: string | undefined;
10
10
  onChange: (date: string) => void;
11
11
  yearBoundaries: {
@@ -13,5 +13,12 @@ declare const DateSelector: ({ value, onChange, yearBoundaries, displayCalendar,
13
13
  max: number;
14
14
  };
15
15
  displayCalendar?: boolean | undefined;
16
+ placeholders?: {
17
+ day?: string | undefined;
18
+ month?: string | undefined;
19
+ year?: string | undefined;
20
+ } | undefined;
21
+ dayjsLocale?: ILocale | undefined;
22
+ firstDayOfWeek?: number | undefined;
16
23
  }) => JSX.Element;
17
24
  export default DateSelector;
@@ -14,6 +14,7 @@ interface Props {
14
14
  uploadedFiles: UploadedFile[];
15
15
  uploading: boolean;
16
16
  onRemoveFile: (id: string) => void;
17
+ isCondensed?: boolean;
17
18
  }
18
- declare const _default: ({ uploadedFiles, onFileSelect, uploading, onRemoveFile, }: Props) => JSX.Element;
19
+ declare const _default: ({ uploadedFiles, onFileSelect, uploading, onRemoveFile, isCondensed, }: Props) => JSX.Element;
19
20
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popsure/dirty-swan",
3
- "version": "0.27.3",
3
+ "version": "0.27.6",
4
4
  "author": "Vincent Audoire <vincent@getpopsure.com>",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -36,3 +36,53 @@ export const WithAddress = () => {
36
36
  />
37
37
  );
38
38
  };
39
+
40
+ export const WithoutAddressLocalized = () => {
41
+ const [address, setAddress] = useState<Partial<Address> | undefined>();
42
+ return (
43
+ <AutoCompleteAddress
44
+ onAddressChange={(address) => {
45
+ setAddress(address);
46
+ }}
47
+ address={address}
48
+ apiKey="AIzaSyDg0DSrjYKt5smmsjkVasDz7c4T5rbOXT8"
49
+ placeholders={{
50
+ manualAddressEntry: 'Adresse suchen',
51
+ street: 'Straße',
52
+ houseNumber: 'Hausnummer',
53
+ additionalInformation: 'Adresszusatz (c/o, z. Hd., o.V.i.A, ...)',
54
+ postcode: 'PLZ',
55
+ city: 'Stadt',
56
+ }}
57
+ manualAddressEntryTexts={{
58
+ preText: 'Oder ',
59
+ cta: 'Adresse direkt eingeben',
60
+ }}
61
+ />
62
+ );
63
+ };
64
+
65
+ export const WithAddressLocalized = () => {
66
+ const [address, setAddress] = useState<Partial<Address> | undefined>({});
67
+ return (
68
+ <AutoCompleteAddress
69
+ onAddressChange={(address) => {
70
+ setAddress(address);
71
+ }}
72
+ address={address}
73
+ apiKey="AIzaSyDg0DSrjYKt5smmsjkVasDz7c4T5rbOXT8"
74
+ placeholders={{
75
+ manualAddressEntry: 'Adresse suchen',
76
+ street: 'Straße',
77
+ houseNumber: 'Hausnummer',
78
+ additionalInformation: 'Adresszusatz (c/o, z.Hd., o.V.i.A, ...)',
79
+ postcode: 'PLZ',
80
+ city: 'Stadt',
81
+ }}
82
+ manualAddressEntryTexts={{
83
+ preText: 'Oder ',
84
+ cta: 'Adresse direkt eingeben',
85
+ }}
86
+ />
87
+ );
88
+ };
@@ -3,17 +3,24 @@ import { useState } from 'react';
3
3
  import { Meta, Preview } from '@storybook/addon-docs/blocks';
4
4
 
5
5
  import AutocompleteAddress from '.';
6
- import { WithoutAddress, WithAddress } from './demo';
6
+ import {
7
+ WithoutAddress,
8
+ WithoutAddressLocalized,
9
+ WithAddress,
10
+ WithAddressLocalized,
11
+ } from './demo';
7
12
 
8
13
  <Meta title="JSX/Autocomplete Address" component={AutocompleteAddress} />
9
14
 
10
15
  # Autocomplete Address
11
16
 
12
- | attribute | unit | description | default value | required |
13
- | --------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------- | -------- |
14
- | address | `Partial<Address>` | The address | undefined | false |
15
- | onAddressChange | `function (newAddress: Partial<Address>)` | Callback with the updated address, this function will get called everytime the address gets updated. | n/a | true |
16
- | apiKey | string | Your private API key for the [Google Places API](https://developers.google.com/maps/documentation/places/web-service/overview) | n/a | true |
17
+ | attribute | unit | description | default value | required |
18
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------- | -------- |
19
+ | address | `Partial<Address>` | The address | undefined | false |
20
+ | onAddressChange | `function (newAddress: Partial<Address>)` | Callback with the updated address, this function will get called everytime the address gets updated. | n/a | true |
21
+ | apiKey | string | Your private API key for the [Google Places API](https://developers.google.com/maps/documentation/places/web-service/overview) | n/a | true |
22
+ | placeholders | `{ manualAddressEntry?: string; street: string?; houseNumber?: string; additionalInformation?: string; postcode?: string; city?: string; }` | Placeholder text | undefined | false |
23
+ | manualAddressEntryTexts | `{ preText?: string; cta: string?; }` | The CTA that enables manual address entry and the text preceding it | undefined | false |
17
24
 
18
25
  Autocomplete Address are user interface elements which allow users start typing an address and get autocompletion suggestions on the address.
19
26
 
@@ -31,10 +38,12 @@ This component is for now only restricted to "address" types and will restrict e
31
38
 
32
39
  <WithAddress />
33
40
 
34
- ```typescript
35
- import React, { useState } from 'react';
36
- import { Address } from '@popsure/public-models';
41
+ ### Localized inputs
37
42
 
43
+ <WithoutAddressLocalized />
44
+ <WithAddressLocalized />
45
+
46
+ ```typescript import React, {useState} from 'react'; import {Address} from '@popsure/public-models';
38
47
  import AutoCompleteAddress from '.';
39
48
 
40
49
  export default () => {
@@ -53,10 +53,24 @@ const AutoCompleteAddress = ({
53
53
  apiKey,
54
54
  address: initialAddress,
55
55
  onAddressChange,
56
+ placeholders,
57
+ manualAddressEntryTexts,
56
58
  }: {
57
59
  apiKey: string;
58
60
  address?: Partial<Address>;
59
61
  onAddressChange: (address: Partial<Address>) => void;
62
+ placeholders?: {
63
+ manualAddressEntry?: string;
64
+ street?: string;
65
+ houseNumber?: string;
66
+ additionalInformation?: string;
67
+ postcode?: string;
68
+ city?: string;
69
+ };
70
+ manualAddressEntryTexts?: {
71
+ preText?: string;
72
+ cta?: string;
73
+ };
60
74
  }) => {
61
75
  const [manualAddressEntry, setManualAddressEntry] = useState(false);
62
76
  const [isLoading, setIsLoading] = useState(false);
@@ -216,7 +230,9 @@ const AutoCompleteAddress = ({
216
230
  id="autocomplete"
217
231
  data-cy="autocomplete"
218
232
  type="text"
219
- placeholder="Search for address"
233
+ placeholder={
234
+ placeholders?.manualAddressEntry || 'Search for address'
235
+ }
220
236
  ref={autocompleteElement}
221
237
  />
222
238
  {hasLoadedGoogleAPI === false && (
@@ -227,12 +243,12 @@ const AutoCompleteAddress = ({
227
243
  </div>
228
244
  ) : (
229
245
  <>
230
- <div className={`d-flex ${styles['input-line']}`}>
246
+ <div className={`d-flex c-gap16 ${styles['input-line']}`}>
231
247
  <Input
232
248
  className="w100"
233
249
  data-cy="autocomplete"
234
250
  type="text"
235
- placeholder="Street"
251
+ placeholder={placeholders?.street || 'Street'}
236
252
  value={address?.street || ''}
237
253
  onChange={(e) => {
238
254
  const newAddress = {
@@ -247,7 +263,7 @@ const AutoCompleteAddress = ({
247
263
  <Input
248
264
  className={`wmx2 ${styles['house-number-input']}`}
249
265
  data-cy="autocomplete-house-number"
250
- placeholder="House Number"
266
+ placeholder={placeholders?.houseNumber || 'House Number'}
251
267
  value={address?.houseNumber || ''}
252
268
  onChange={(e) => {
253
269
  const newAddress = {
@@ -263,7 +279,10 @@ const AutoCompleteAddress = ({
263
279
  <Input
264
280
  className="mt16"
265
281
  data-cy="autocomplete-additional-info"
266
- placeholder="Additional information (C/O, appartment…)"
282
+ placeholder={
283
+ placeholders?.additionalInformation ||
284
+ 'Additional information (C/O, apartment, …)'
285
+ }
267
286
  value={address?.additionalInformation || ''}
268
287
  onChange={(e) => {
269
288
  const newAddress = {
@@ -274,11 +293,11 @@ const AutoCompleteAddress = ({
274
293
  setAddress(newAddress);
275
294
  }}
276
295
  />
277
- <div className={`d-flex mt16 ${styles['input-line']}`}>
296
+ <div className={`d-flex mt16 c-gap16 ${styles['input-line']}`}>
278
297
  <Input
279
298
  className="w100"
280
299
  data-cy="autocomplete-postcode"
281
- placeholder="Postcode"
300
+ placeholder={placeholders?.postcode || 'Postcode'}
282
301
  value={address?.postcode || ''}
283
302
  onChange={(e) => {
284
303
  const newAddress = {
@@ -293,7 +312,7 @@ const AutoCompleteAddress = ({
293
312
  <Input
294
313
  className="w100"
295
314
  data-cy="autocomplete-city"
296
- placeholder="City"
315
+ placeholder={placeholders?.city || 'City'}
297
316
  value={address?.city || ''}
298
317
  onChange={(e) => {
299
318
  const newAddress = {
@@ -311,12 +330,12 @@ const AutoCompleteAddress = ({
311
330
  </div>
312
331
  {manualAddressEntry === false && (
313
332
  <div className="p-p mt8">
314
- Or{' '}
333
+ {manualAddressEntryTexts?.preText || 'Or '}
315
334
  <span
316
335
  className="p-a fw-bold c-pointer"
317
336
  onClick={handleEnterAddressManually}
318
337
  >
319
- Enter address manually
338
+ {manualAddressEntryTexts?.cta || 'Enter address manually'}
320
339
  </span>
321
340
  </div>
322
341
  )}
@@ -2,12 +2,6 @@
2
2
  @use "../../scss/public/colors" as *;
3
3
 
4
4
  .input-line {
5
- margin-left: -16px;
6
-
7
- > * {
8
- margin-left: 16px;
9
- }
10
-
11
5
  @include p-size-mobile {
12
6
  flex-direction: column;
13
7
 
@@ -19,7 +13,7 @@
19
13
 
20
14
  .house-number-input {
21
15
  @include p-size-mobile {
22
- max-width: none;
16
+ max-width: none !important;
23
17
  }
24
18
  }
25
19
 
@@ -2,6 +2,7 @@ import { useState } from 'react';
2
2
  import { Meta, Preview } from '@storybook/addon-docs/blocks';
3
3
 
4
4
  import DateSelector from '.';
5
+ import de from 'dayjs/locale/de';
5
6
 
6
7
  <Meta title="JSX/Date selector" component={DateSelector} />
7
8
 
@@ -60,3 +61,46 @@ export const DateSelectorWithCalendarStory = () => {
60
61
  };
61
62
 
62
63
  <DateSelectorWithCalendarStory />
64
+
65
+ ### Localization
66
+
67
+ | attribute | unit | description | default value | required |
68
+ | -------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------- | -------- |
69
+ | placeholders | `{ day?: string; month: string?; year?: string; }` | Placeholder text | undefined | false |
70
+ | dayjsLocale | `ILocale` | Imported [Day.js locale Object](https://day.js.org/docs/en/customization/customization) | undefined | false |
71
+ | firstDayOfWeek | number | Index of the first day of the week (0 = Sunday, 1 = Monday, etc.) | 0 | false |
72
+
73
+ The `dayjsLocale` and `firstDayOfWeek` properties are used to localize the calendar of the `DateSelector`, whereas
74
+ the `placeholders` object can be used to change the text of the different dropdowns. If no `dayjsLocale` is supplied, the default locale 'en' will be used for the DateSelector.
75
+
76
+ Additional locales can be imported from dayjs like
77
+ `import de from 'dayjs/locale/de';` and then passed on to the component:
78
+ `<DateSelector ... dayjsLocale={de} />`
79
+
80
+ [List of all supported locales](https://github.com/iamkun/dayjs/tree/dev/src/locale)
81
+
82
+ export const DateSelectorWithCalendarLocalizedStory = () => {
83
+ const [date, setDate] = useState('');
84
+ return (
85
+ <div style={{ paddingBottom: '120px' }}>
86
+ <DateSelector
87
+ value={date}
88
+ className="mt24"
89
+ yearBoundaries={{ min: 2020, max: 2022 }}
90
+ onChange={(date) => {
91
+ setDate(date);
92
+ }}
93
+ displayCalendar={true}
94
+ placeholders={{
95
+ day: 'Tag',
96
+ month: 'Monat',
97
+ year: 'Jahr',
98
+ }}
99
+ dayjsLocale={de}
100
+ firstDayOfWeek={1}
101
+ />
102
+ </div>
103
+ );
104
+ };
105
+
106
+ <DateSelectorWithCalendarLocalizedStory />
@@ -1,5 +1,6 @@
1
1
  import { useState, useEffect } from 'react';
2
2
  import dayjs from 'dayjs';
3
+
3
4
  import localeData from 'dayjs/plugin/localeData';
4
5
  import { CalendarDate } from '@popsure/public-models';
5
6
  import DayPicker from 'react-day-picker';
@@ -13,7 +14,6 @@ import './datepicker.scss';
13
14
  import calendarIcon from './icons/calendar.svg';
14
15
 
15
16
  dayjs.extend(localeData);
16
-
17
17
  const COLLECTABLE_DATE_FORMAT = 'YYYY-MM-DD';
18
18
 
19
19
  /*
@@ -55,11 +55,21 @@ const DateSelector = ({
55
55
  onChange,
56
56
  yearBoundaries,
57
57
  displayCalendar,
58
+ placeholders,
59
+ dayjsLocale,
60
+ firstDayOfWeek = 0,
58
61
  }: {
59
62
  value?: string;
60
63
  onChange: (date: string) => void;
61
64
  yearBoundaries: { min: number; max: number };
62
65
  displayCalendar?: boolean;
66
+ placeholders?: {
67
+ day?: string;
68
+ month?: string;
69
+ year?: string;
70
+ };
71
+ dayjsLocale?: ILocale;
72
+ firstDayOfWeek?: number;
63
73
  }) => {
64
74
  const calendarDateValue = value ? isoStringtoCalendarDate(value) : undefined;
65
75
  const daysInSelectedDate = calendarDateValue
@@ -68,9 +78,19 @@ const DateSelector = ({
68
78
  year: calendarDateValue.year,
69
79
  })
70
80
  : 31;
81
+
82
+ const localeDate = dayjsLocale
83
+ ? dayjs().locale(dayjsLocale).localeData()
84
+ : dayjs().locale('en').localeData();
85
+
86
+ const localizedWeekdays = localeDate.weekdays();
87
+ const localizedWeekdaysShort = localeDate.weekdaysShort();
88
+ const localizedMonths = localeDate.months();
89
+ const localizedMonthsShort = localeDate.monthsShort();
90
+
71
91
  const availableDays = fillArray(1, daysInSelectedDate);
72
92
  const availableYears = fillArray(yearBoundaries.max, yearBoundaries.min);
73
- const availableMonths = dayjs.monthsShort();
93
+ const availableMonths = localizedMonthsShort;
74
94
 
75
95
  const [date, setDate] = useState<Partial<CalendarDate>>(
76
96
  calendarDateValue ?? {}
@@ -154,7 +174,7 @@ const DateSelector = ({
154
174
  }}
155
175
  >
156
176
  <option value="" disabled={true}>
157
- Day
177
+ {placeholders?.day || 'Day'}
158
178
  </option>
159
179
  {availableDays.map((day) => (
160
180
  <option key={day} value={day}>
@@ -174,7 +194,7 @@ const DateSelector = ({
174
194
  }}
175
195
  >
176
196
  <option value="" disabled={true}>
177
- Month
197
+ {placeholders?.month || 'Month'}
178
198
  </option>
179
199
  {availableMonths.map((month, i) => (
180
200
  <option key={month} value={i + 1}>
@@ -195,7 +215,7 @@ const DateSelector = ({
195
215
  }}
196
216
  >
197
217
  <option value="" disabled={true}>
198
- Year
218
+ {placeholders?.year || 'Year'}
199
219
  </option>
200
220
  {availableYears.map((year) => (
201
221
  <option key={year} value={year}>
@@ -236,6 +256,11 @@ const DateSelector = ({
236
256
  before: dateCalendarFromMonth,
237
257
  after: dateCalendarToMonth,
238
258
  }}
259
+ firstDayOfWeek={firstDayOfWeek}
260
+ locale={dayjsLocale?.name || 'en'}
261
+ months={localizedMonths}
262
+ weekdaysLong={localizedWeekdays}
263
+ weekdaysShort={localizedWeekdaysShort}
239
264
  />
240
265
  )}
241
266
  </div>
@@ -1,5 +1,5 @@
1
- <svg width="74" height="65" viewBox="0 0 74 65" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M26.7331 51.0225H16.9671C12.207 51.0225 2 46.6745 2 35.4347C2 23.341 12.207 19.2864 17.3221 19.2864C18.0198 13.4585 21.8677 2.64515 36.0438 1.896C49.6806 1.896 55.7671 14.2015 54.7655 23.3697C60.0996 23.0395 72 25.4458 72 37.4209C72 47.6065 61.3317 51.4782 55.9975 51.0225H47.5947" stroke="#8E8CEE" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"/>
3
- <path d="M36.9999 62.9938V29.5552" stroke="#8E8CEE" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"/>
4
- <path d="M28.6452 37.91L37 29.5552L45.3548 37.91" stroke="#8E8CEE" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round"/>
1
+ <svg width="70" height="70" viewBox="0 0 70 70" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M25.589 52.324H16.6368C12.2734 52.324 2.91699 48.3383 2.91699 38.0351C2.91699 26.9493 12.2734 23.2325 16.9623 23.2325C17.6018 17.8902 21.1291 7.97805 34.1238 7.29132C46.6242 7.29132 52.2035 18.5714 51.2854 26.9756C56.175 26.6729 67.0837 28.8787 67.0837 39.8558C67.0837 49.1926 57.3044 52.7417 52.4147 52.324H44.7121" stroke="#8E8CEE" stroke-width="3.08333" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M35 63.2981V32.646" stroke="#8E8CEE" stroke-width="3.08333" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M27.3428 40.3045L35.0013 32.646L42.6599 40.3045" stroke="#8E8CEE" stroke-width="3.08333" stroke-linecap="round" stroke-linejoin="round"/>
5
5
  </svg>
@@ -69,6 +69,27 @@ MultiDropzone component allows upload of multiple documents / files.
69
69
  />
70
70
  </Preview>
71
71
 
72
+ ### Condensed view
73
+
74
+ <Preview>
75
+ <MultiDropzone
76
+ uploadedFiles={[
77
+ {
78
+ id: '123',
79
+ type: 'pdf',
80
+ progress: '100',
81
+ name: 'test_file_name.pdf',
82
+ token: 'abc',
83
+ previewUrl: 'http://getpopsure.com/test_file_name.pdf',
84
+ },
85
+ ]}
86
+ onFileSelect={() => {}}
87
+ uploading={false}
88
+ onRemoveFile={() => {}}
89
+ isCondensed
90
+ />
91
+ </Preview>
92
+
72
93
  ### Error state
73
94
 
74
95
  <Preview>
@@ -1,4 +1,4 @@
1
- import React, { useCallback } from 'react';
1
+ import { useCallback } from 'react';
2
2
  import { useDropzone } from 'react-dropzone';
3
3
  import classnames from 'classnames';
4
4
 
@@ -44,6 +44,7 @@ interface Props {
44
44
  uploadedFiles: UploadedFile[];
45
45
  uploading: boolean;
46
46
  onRemoveFile: (id: string) => void;
47
+ isCondensed?: boolean;
47
48
  }
48
49
 
49
50
  export default ({
@@ -51,6 +52,7 @@ export default ({
51
52
  onFileSelect,
52
53
  uploading,
53
54
  onRemoveFile,
55
+ isCondensed = false,
54
56
  }: Props) => {
55
57
  const onDrop = useCallback(
56
58
  (acceptedFiles) => {
@@ -62,16 +64,23 @@ export default ({
62
64
  const { getRootProps, getInputProps } = useDropzone({ onDrop });
63
65
 
64
66
  return (
65
- <div className={`w100 ${styles.container}`}>
67
+ <div className={styles.container}>
66
68
  <div
67
- className={classnames(`w100 ta-center ${styles['upload-container']}`, {
68
- [styles['upload-container-disabled']]: uploading,
69
- })}
69
+ className={classnames(
70
+ `w100 ta-center br8 c-pointer ${styles.dropzoneContainer}`,
71
+ {
72
+ [styles['dropzoneContainerDisabled']]: uploading,
73
+ }
74
+ )}
70
75
  {...getRootProps()}
71
76
  >
72
77
  <input {...getInputProps()} />
73
- <img src={icons.uploadIcon} alt="" />
74
- <div className="p-h4 mt8">
78
+ <img
79
+ className={isCondensed ? styles.img : ''}
80
+ src={icons.uploadIcon}
81
+ alt="purple cloud with an arrow"
82
+ />
83
+ <div className={`p-h4 mt8 ${isCondensed ? styles.textInline : ''}`}>
75
84
  {uploading
76
85
  ? 'Please wait while uploading file...'
77
86
  : 'Choose file or drag & drop'}
@@ -79,7 +88,7 @@ export default ({
79
88
  <div className="p-p--small tc-grey-500">Supports JPEG, PNG, PDF</div>
80
89
  </div>
81
90
  {uploadedFiles.length > 0 && (
82
- <div className={`w100 mt16`}>
91
+ <div className="w100 mt16">
83
92
  {uploadedFiles.map((file) => {
84
93
  const uploadStatus = getUploadStatus(file.progress, file.error);
85
94
  return (
@@ -1,32 +1,37 @@
1
1
  @use "../../scss/public/grid" as *;
2
2
 
3
3
  .container {
4
- background-color: white;
5
- padding: 24px;
6
- box-shadow: 0px 2px 3px rgba(38, 38, 46, 0.04);
7
- border-radius: 8px;
8
-
9
- @include p-size-mobile {
10
- padding: 16px;
11
- }
4
+ background-color: transparent;
12
5
  }
13
6
 
14
- .upload-container {
7
+ .dropzoneContainer {
15
8
  border: 1px dashed var(--ds-primary-500);
16
9
  padding: 32px 0;
17
- cursor: pointer;
18
- border-radius: 8px;
10
+ background-color: white;
11
+
12
+ transition: all 0.6s ease-in-out;
13
+ }
14
+
15
+ .img {
16
+ vertical-align: middle;
17
+ margin-right: 8px;
18
+ height: 18px;
19
+ }
20
+
21
+ .textInline {
22
+ display: inline-flex;
19
23
  }
20
24
 
21
- .upload-container:focus {
25
+ .dropzoneContainer:focus {
22
26
  outline: none;
23
27
  }
24
28
 
25
- .upload-container:hover {
29
+ .dropzoneContainer:hover {
26
30
  background-color: var(--ds-primary-100);
27
31
  transition: 0.5s ease;
28
32
  }
29
33
 
30
- .upload-container-disabled {
34
+ .dropzoneContainerDisabled {
31
35
  pointer-events: none;
36
+ opacity: 0.4
32
37
  }