@popsure/dirty-swan 0.57.6 → 0.57.8

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,6 +1,6 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { C as Calendar } from '../../../Calendar-d39056f4.js';
3
+ export { C as Calendar } from '../../../Calendar-2d7e51b5.js';
4
4
  import '../../icon/icons/Calendar.js';
5
5
  import '../../button/index.js';
6
6
  import '../../../_commonjsHelpers-4730bd53.js';
@@ -1,7 +1,7 @@
1
1
  import { a as __assign } from '../../tslib.es6-a39f91fc.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { useRef, useState, useEffect } from 'react';
4
- import { a as dayjs, C as Calendar } from '../../Calendar-d39056f4.js';
4
+ import { a as dayjs, C as Calendar } from '../../Calendar-2d7e51b5.js';
5
5
  import { c as commonjsGlobal } from '../../_commonjsHelpers-4730bd53.js';
6
6
  import { s as styleInject } from '../../style-inject.es-1f59c1d0.js';
7
7
  import { Input } from '../input/index.js';
@@ -2,7 +2,7 @@ import { jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { DateSelector } from './index.js';
4
4
  import { c as commonjsGlobal } from '../../_commonjsHelpers-4730bd53.js';
5
- import { d as dayjs_min } from '../../Calendar-d39056f4.js';
5
+ import { d as dayjs_min } from '../../Calendar-2d7e51b5.js';
6
6
  import '../../tslib.es6-a39f91fc.js';
7
7
  import '../../style-inject.es-1f59c1d0.js';
8
8
  import '../input/index.js';
@@ -6,7 +6,7 @@ import 'react';
6
6
  import 'react-dom';
7
7
  import '../../_commonjsHelpers-4730bd53.js';
8
8
  import 'react-dom/test-utils';
9
- import '../../Calendar-d39056f4.js';
9
+ import '../../Calendar-2d7e51b5.js';
10
10
  import '../icon/icons/Calendar.js';
11
11
  import '../icon/IconWrapper/IconWrapper.js';
12
12
  import '../../index-6ea95111.js';
@@ -1,3 +1,3 @@
1
- export { Accordion, DateSelector, SignaturePad, AutocompleteAddress, Input, MultiDropzone, IbanInput, CurrencyInput, BottomModal, RegularModal, BottomOrRegularModal, FullScreenModal, InfoCard, CardButton, Card, Button, AutoSuggestMultiSelect, Chip, AutoSuggestInput, ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, SegmentedControl, DownloadButton, Checkbox, Radio, Link, InformationBox, Badge, images, illustrations, Spinner, Table, Toggle, Toaster, toast, useEscapeKey, useFocusWithin, useMediaQuery, } from './lib';
1
+ export { Accordion, DateSelector, SignaturePad, AutocompleteAddress, Input, MultiDropzone, IbanInput, CurrencyInput, BottomModal, RegularModal, BottomOrRegularModal, FullScreenModal, InfoCard, CardButton, Card, Button, AutoSuggestMultiSelect, Chip, AutoSuggestInput, ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, SegmentedControl, DownloadButton, Checkbox, Radio, Link, InformationBox, Badge, images, illustrations, Spinner, Table, Toggle, Toaster, toast, useEscapeKey, useFocusWithin, useMediaQuery, useOnClickOutside, } from './lib';
2
2
  export * from './lib/components/icon';
3
3
  export type { AccordionProps, DownloadStatus, InformationBoxProps, InputProps, IllustrationKeys, FileType, MultiDropzoneProps, TableHeader, UploadedFile, UploadStatus, CardProps, IconWrapperProps, TableData, TableProps, } from './lib';
package/dist/esm/index.js CHANGED
@@ -32,6 +32,7 @@ export { Accordion } from './components/accordion/index.js';
32
32
  export { Table } from './components/table/Table.js';
33
33
  import { useCallback, useEffect } from 'react';
34
34
  export { u as useMediaQuery } from './TableSection-a26ba0c5.js';
35
+ export { u as useOnClickOutside } from './Calendar-2d7e51b5.js';
35
36
  export { default as Svg1Icon } from './components/icon/icons/1.js';
36
37
  export { default as Svg2Icon } from './components/icon/icons/2.js';
37
38
  export { default as Svg3Icon } from './components/icon/icons/3.js';
@@ -421,7 +422,6 @@ export { default as TableButton } from './components/comparisonTable/components/
421
422
  export { default as TableInfoButton } from './components/comparisonTable/components/TableInfoButton/index.js';
422
423
  import './tslib.es6-a39f91fc.js';
423
424
  import 'react/jsx-runtime';
424
- import './Calendar-d39056f4.js';
425
425
  import './_commonjsHelpers-4730bd53.js';
426
426
  import './style-inject.es-1f59c1d0.js';
427
427
  import './index-6ea95111.js';
@@ -31,7 +31,6 @@ export interface AutocompleteAddressProps {
31
31
  manualAddressEntryTexts?: {
32
32
  preText?: string;
33
33
  cta?: string;
34
- ctaSearch?: string;
35
34
  };
36
35
  countryCode?: string;
37
36
  }
@@ -30,7 +30,8 @@ import { Table, TableData, TableProps } from './components/table/Table';
30
30
  import { useEscapeKey } from './hooks/useEscapeKey';
31
31
  import { useFocusWithin } from './hooks/useFocusWithin';
32
32
  import { useMediaQuery } from './hooks/useMediaQuery';
33
+ import { useOnClickOutside } from './hooks/useOnClickOutside';
33
34
  export * from './components/icon';
34
- export { Accordion, DateSelector, SignaturePad, AutocompleteAddress, Input, MultiDropzone, DownloadButton, IbanInput, BottomModal, RegularModal, BottomOrRegularModal, FullScreenModal, InfoCard, Card, CardButton, Button, CurrencyInput, AutoSuggestMultiSelect, Chip, AutoSuggestInput, ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, SegmentedControl, Checkbox, Radio, Link, InformationBox, Badge, images, illustrations, Spinner, Table, Toggle, Toaster, toast, useEscapeKey, useFocusWithin, useMediaQuery, };
35
+ export { Accordion, DateSelector, SignaturePad, AutocompleteAddress, Input, MultiDropzone, DownloadButton, IbanInput, BottomModal, RegularModal, BottomOrRegularModal, FullScreenModal, InfoCard, Card, CardButton, Button, CurrencyInput, AutoSuggestMultiSelect, Chip, AutoSuggestInput, ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, SegmentedControl, Checkbox, Radio, Link, InformationBox, Badge, images, illustrations, Spinner, Table, Toggle, Toaster, toast, useEscapeKey, useFocusWithin, useOnClickOutside, useMediaQuery, };
35
36
  export type { AccordionProps, IllustrationKeys, InformationBoxProps, InputProps, FileType, MultiDropzoneProps, TableHeader, UploadedFile, UploadStatus, CardProps, IconWrapperProps, TableData, TableProps, };
36
37
  export type { DownloadStatus } from './models/download';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popsure/dirty-swan",
3
- "version": "0.57.6",
3
+ "version": "0.57.8",
4
4
  "author": "Vincent Audoire <vincent@getpopsure.com>",
5
5
  "license": "MIT",
6
6
  "private": false,
package/src/index.tsx CHANGED
@@ -44,6 +44,7 @@ export {
44
44
  useEscapeKey,
45
45
  useFocusWithin,
46
46
  useMediaQuery,
47
+ useOnClickOutside,
47
48
  } from './lib';
48
49
 
49
50
  export * from './lib/components/icon';
@@ -80,7 +80,6 @@ export interface AutocompleteAddressProps {
80
80
  manualAddressEntryTexts?: {
81
81
  preText?: string;
82
82
  cta?: string;
83
- ctaSearch?: string;
84
83
  };
85
84
  countryCode?: string;
86
85
  }
@@ -259,7 +258,7 @@ const AutocompleteAddress = ({
259
258
  )}
260
259
  </div>
261
260
  <div className={`wmx8`}>
262
- {!manualAddressEntry ? (
261
+ {manualAddressEntry === false ? (
263
262
  <div style={{ position: 'relative' }}>
264
263
  <Input
265
264
  className="w100"
@@ -344,20 +343,18 @@ const AutocompleteAddress = ({
344
343
  </>
345
344
  )}
346
345
  </div>
347
- <div className="p-p mt8">
348
- {manualAddressEntryTexts?.preText || 'Or '}
349
- <button
350
- className={'p-a p-p fw-bold c-pointer bg-transparent'}
351
- onClick={() => {
352
- manualAddressEntry ? setManualAddressEntry(false) : handleEnterAddressManually();
353
- }}
354
- type="button"
355
- >
356
- {manualAddressEntry
357
- ? manualAddressEntryTexts?.ctaSearch || 'search for address'
358
- : manualAddressEntryTexts?.cta || 'enter address manually'}
359
- </button>
360
- </div>
346
+ {manualAddressEntry === false && (
347
+ <div className="p-p mt8">
348
+ {manualAddressEntryTexts?.preText || 'Or '}
349
+ <button
350
+ className={'p-a p-p fw-bold c-pointer bg-transparent'}
351
+ onClick={handleEnterAddressManually}
352
+ type="button"
353
+ >
354
+ {manualAddressEntryTexts?.cta || 'enter address manually'}
355
+ </button>
356
+ </div>
357
+ )}
361
358
  </>
362
359
  );
363
360
  };
package/src/lib/index.tsx CHANGED
@@ -52,6 +52,7 @@ import { Table, TableData, TableProps } from './components/table/Table';
52
52
  import { useEscapeKey } from './hooks/useEscapeKey';
53
53
  import { useFocusWithin } from './hooks/useFocusWithin';
54
54
  import { useMediaQuery } from './hooks/useMediaQuery';
55
+ import { useOnClickOutside } from './hooks/useOnClickOutside';
55
56
 
56
57
  export * from './components/icon';
57
58
 
@@ -97,6 +98,7 @@ export {
97
98
  toast,
98
99
  useEscapeKey,
99
100
  useFocusWithin,
101
+ useOnClickOutside,
100
102
  useMediaQuery,
101
103
  };
102
104