@popsure/dirty-swan 0.31.1 → 0.32.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 (47) hide show
  1. package/dist/cjs/index.d.ts +2 -2
  2. package/dist/cjs/index.js +15 -3
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/lib/components/autocompleteAddress/index.d.ts +15 -14
  5. package/dist/cjs/lib/components/autocompleteAddress/index.stories.d.ts +66 -0
  6. package/dist/cjs/lib/components/segmentedControl/index.stories.d.ts +1 -5
  7. package/dist/cjs/lib/index.d.ts +3 -2
  8. package/dist/cjs/lib/util/images/index.d.ts +11 -0
  9. package/dist/cjs/lib/util/images/index.stories.d.ts +12 -0
  10. package/dist/esm/components/autocompleteAddress/index.js +2 -2
  11. package/dist/esm/components/autocompleteAddress/index.js.map +1 -1
  12. package/dist/esm/components/autocompleteAddress/index.stories.js +110 -0
  13. package/dist/esm/components/autocompleteAddress/index.stories.js.map +1 -0
  14. package/dist/esm/components/autocompleteAddress/index.test.js +2 -2
  15. package/dist/esm/components/autocompleteAddress/index.test.js.map +1 -1
  16. package/dist/esm/components/comparisonTable/components/Row/index.js +1 -1
  17. package/dist/esm/components/segmentedControl/index.stories.js +1 -5
  18. package/dist/esm/components/segmentedControl/index.stories.js.map +1 -1
  19. package/dist/esm/index-db2e797f.js +13 -0
  20. package/dist/esm/index-db2e797f.js.map +1 -0
  21. package/dist/esm/index.d.ts +2 -2
  22. package/dist/esm/index.js +2 -1
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/lib/components/autocompleteAddress/index.d.ts +15 -14
  25. package/dist/esm/lib/components/autocompleteAddress/index.stories.d.ts +66 -0
  26. package/dist/esm/lib/components/segmentedControl/index.stories.d.ts +1 -5
  27. package/dist/esm/lib/index.d.ts +3 -2
  28. package/dist/esm/lib/util/images/index.d.ts +11 -0
  29. package/dist/esm/lib/util/images/index.stories.d.ts +12 -0
  30. package/dist/esm/util/images/index.stories.js +23 -0
  31. package/dist/esm/util/images/index.stories.js.map +1 -0
  32. package/package.json +1 -1
  33. package/src/index.tsx +2 -1
  34. package/src/lib/components/autocompleteAddress/index.stories.tsx +147 -0
  35. package/src/lib/components/autocompleteAddress/index.test.tsx +2 -2
  36. package/src/lib/components/autocompleteAddress/index.tsx +11 -9
  37. package/src/lib/components/comparisonTable/components/Row/style.module.scss +2 -1
  38. package/src/lib/components/segmentedControl/index.stories.tsx +1 -5
  39. package/src/lib/index.tsx +3 -1
  40. package/src/lib/util/images/index.stories.tsx +27 -0
  41. package/src/lib/util/images/index.ts +12 -0
  42. package/dist/cjs/lib/components/autocompleteAddress/demo.d.ts +0 -4
  43. package/dist/esm/components/autocompleteAddress/demo.js +0 -64
  44. package/dist/esm/components/autocompleteAddress/demo.js.map +0 -1
  45. package/dist/esm/lib/components/autocompleteAddress/demo.d.ts +0 -4
  46. package/src/lib/components/autocompleteAddress/demo.tsx +0 -88
  47. package/src/lib/components/autocompleteAddress/index.stories.mdx +0 -53
@@ -1,19 +1,20 @@
1
1
  import { Address } from '@popsure/public-models';
2
- declare const AutoCompleteAddress: ({ apiKey, address: initialAddress, onAddressChange, placeholders, manualAddressEntryTexts, }: {
2
+ export interface AutocompleteAddressProps {
3
3
  apiKey: string;
4
- address?: Partial<Address> | undefined;
4
+ address?: Partial<Address>;
5
5
  onAddressChange: (address: Partial<Address>) => void;
6
6
  placeholders?: {
7
- manualAddressEntry?: string | undefined;
8
- street?: string | undefined;
9
- houseNumber?: string | undefined;
10
- additionalInformation?: string | undefined;
11
- postcode?: string | undefined;
12
- city?: string | undefined;
13
- } | undefined;
7
+ manualAddressEntry?: string;
8
+ street?: string;
9
+ houseNumber?: string;
10
+ additionalInformation?: string;
11
+ postcode?: string;
12
+ city?: string;
13
+ };
14
14
  manualAddressEntryTexts?: {
15
- preText?: string | undefined;
16
- cta?: string | undefined;
17
- } | undefined;
18
- }) => JSX.Element;
19
- export default AutoCompleteAddress;
15
+ preText?: string;
16
+ cta?: string;
17
+ };
18
+ }
19
+ declare const AutocompleteAddress: ({ apiKey, address: initialAddress, onAddressChange, placeholders, manualAddressEntryTexts, }: AutocompleteAddressProps) => JSX.Element;
20
+ export { AutocompleteAddress };
@@ -0,0 +1,66 @@
1
+ import { AutocompleteAddressProps } from '.';
2
+ declare const story: {
3
+ title: string;
4
+ component: ({ apiKey, address: initialAddress, onAddressChange, placeholders, manualAddressEntryTexts, }: AutocompleteAddressProps) => JSX.Element;
5
+ argTypes: {
6
+ address: {
7
+ description: string;
8
+ table: {
9
+ type: {
10
+ summary: string;
11
+ };
12
+ };
13
+ };
14
+ apiKey: {
15
+ defaultValue: string;
16
+ description: string;
17
+ table: {
18
+ type: {
19
+ summary: string;
20
+ };
21
+ };
22
+ };
23
+ onAddressChange: {
24
+ description: string;
25
+ action: boolean;
26
+ table: {
27
+ category: string;
28
+ };
29
+ };
30
+ manualAddressEntryTexts: {
31
+ description: string;
32
+ table: {
33
+ type: {
34
+ summary: string;
35
+ };
36
+ };
37
+ };
38
+ placeholders: {
39
+ description: string;
40
+ table: {
41
+ type: {
42
+ summary: string;
43
+ };
44
+ };
45
+ };
46
+ };
47
+ parameters: {
48
+ componentSubtitle: string;
49
+ docs: {
50
+ description: {
51
+ component: string;
52
+ };
53
+ };
54
+ customTypes: {
55
+ Address: string;
56
+ };
57
+ };
58
+ };
59
+ export declare const AutocompleteAddressStory: {
60
+ ({ address: defaultAddress, apiKey, manualAddressEntryTexts, onAddressChange, placeholders, }: AutocompleteAddressProps): JSX.Element;
61
+ storyName: string;
62
+ };
63
+ export declare const WithAddress: ({ apiKey, onAddressChange, placeholders, }: AutocompleteAddressProps) => JSX.Element;
64
+ export declare const WithLocalisationEntryText: ({ apiKey, onAddressChange, }: AutocompleteAddressProps) => JSX.Element;
65
+ export declare const WithLocalisationPlaceholders: ({ apiKey, onAddressChange, }: AutocompleteAddressProps) => JSX.Element;
66
+ export default story;
@@ -26,11 +26,7 @@ declare const story: {
26
26
  selectedIndex: number;
27
27
  };
28
28
  parameters: {
29
- docs: {
30
- description: {
31
- component: string;
32
- };
33
- };
29
+ componentSubtitle: string;
34
30
  };
35
31
  };
36
32
  export declare const SegmentedControlStory: {
@@ -1,6 +1,6 @@
1
1
  import DateSelector from './components/dateSelector';
2
2
  import SignaturePad from './components/signaturePad';
3
- import AutocompleteAddress from './components/autocompleteAddress';
3
+ import { AutocompleteAddress } from './components/autocompleteAddress';
4
4
  import Input from './components/input';
5
5
  import MultiDropzone, { FileType, MultiDropzoneProps, UploadedFile, UploadStatus } from './components/multiDropzone';
6
6
  import DownloadButton from './components/downloadButton';
@@ -15,6 +15,7 @@ import AutoSuggestInput from './components/input/autoSuggestInput';
15
15
  import { ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, TableHeader } from './components/comparisonTable';
16
16
  import { SegmentedControl } from './components/segmentedControl';
17
17
  import Markdown from './components/markdown';
18
- export { DateSelector, SignaturePad, AutocompleteAddress, Input, MultiDropzone, DownloadButton, IbanInput, BottomModal, RegularModal, BottomOrRegularModal, CardWithTopLeftIcon, CardWithLeftIcon, CardWithTopIcon, InfoCard, CardButton, Button, CurrencyInput, AutoSuggestMultiSelect, Chip, AutoSuggestInput, ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, SegmentedControl, Markdown, };
18
+ import { images } from './util/images';
19
+ export { DateSelector, SignaturePad, AutocompleteAddress, Input, MultiDropzone, DownloadButton, IbanInput, BottomModal, RegularModal, BottomOrRegularModal, CardWithTopLeftIcon, CardWithLeftIcon, CardWithTopIcon, InfoCard, CardButton, Button, CurrencyInput, AutoSuggestMultiSelect, Chip, AutoSuggestInput, ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, SegmentedControl, Markdown, images, };
19
20
  export type { FileType, MultiDropzoneProps, TableHeader, UploadedFile, UploadStatus };
20
21
  export type { DownloadStatus } from './models/download';
@@ -0,0 +1,11 @@
1
+ declare const images: {
2
+ readonly aid: "https://assets.cdn.feather-insurance.com/assets/images/aid.svg";
3
+ readonly bed: "https://assets.cdn.feather-insurance.com/assets/images/bed.svg";
4
+ readonly bigDog: "https://assets.cdn.feather-insurance.com/assets/images/bigDog.svg";
5
+ readonly brokenAquarium: "https://assets.cdn.feather-insurance.com/assets/images/brokenAquarium.svg";
6
+ readonly brokenGlass: "https://assets.cdn.feather-insurance.com/assets/images/brokenGlass.svg";
7
+ readonly damagedLaptop: "https://assets.cdn.feather-insurance.com/assets/images/damagedLaptop.svg";
8
+ readonly moneyIncome: "https://assets.cdn.feather-insurance.com/assets/images/moneyIncome.svg";
9
+ readonly washingMachine: "https://assets.cdn.feather-insurance.com/assets/images/washingMachine.svg";
10
+ };
11
+ export { images };
@@ -0,0 +1,12 @@
1
+ declare const story: {
2
+ title: string;
3
+ parameters: {
4
+ docs: {
5
+ description: {
6
+ component: string;
7
+ };
8
+ };
9
+ };
10
+ };
11
+ export declare const Images: () => JSX.Element;
12
+ export default story;
@@ -1932,7 +1932,7 @@ var loadGoogleMapsApiDynamically = function (callback, apiKey) {
1932
1932
  callback();
1933
1933
  };
1934
1934
  };
1935
- var AutoCompleteAddress = function (_a) {
1935
+ var AutocompleteAddress = function (_a) {
1936
1936
  var _b;
1937
1937
  var apiKey = _a.apiKey, initialAddress = _a.address, onAddressChange = _a.onAddressChange, placeholders = _a.placeholders, manualAddressEntryTexts = _a.manualAddressEntryTexts;
1938
1938
  var _c = useState(false), manualAddressEntry = _c[0], setManualAddressEntry = _c[1];
@@ -2058,5 +2058,5 @@ var AutoCompleteAddress = function (_a) {
2058
2058
  jsx("span", __assign({ className: "p-a fw-bold c-pointer", onClick: handleEnterAddressManually }, { children: (manualAddressEntryTexts === null || manualAddressEntryTexts === void 0 ? void 0 : manualAddressEntryTexts.cta) || 'Enter address manually' }), void 0)] }), void 0))] }, void 0));
2059
2059
  };
2060
2060
 
2061
- export default AutoCompleteAddress;
2061
+ export { AutocompleteAddress };
2062
2062
  //# sourceMappingURL=index.js.map