@popsure/dirty-swan 0.65.0 → 0.66.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.
- package/agent-documentation.md +35 -0
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +334 -209
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/searchableDropdown/index.d.ts +22 -0
- package/dist/cjs/lib/components/searchableDropdown/index.stories.d.ts +108 -0
- package/dist/cjs/lib/components/searchableDropdown/index.test.d.ts +1 -0
- package/dist/cjs/lib/index.d.ts +3 -2
- package/dist/esm/{Calendar-C7I0F5Gv.js → Calendar-8rhyapMz.js} +3 -19
- package/dist/esm/Calendar-8rhyapMz.js.map +1 -0
- package/dist/esm/components/dateSelector/components/Calendar.js +2 -1
- package/dist/esm/components/dateSelector/components/Calendar.js.map +1 -1
- package/dist/esm/components/dateSelector/index.js +2 -1
- package/dist/esm/components/dateSelector/index.js.map +1 -1
- package/dist/esm/components/dateSelector/index.stories.js +2 -1
- package/dist/esm/components/dateSelector/index.stories.js.map +1 -1
- package/dist/esm/components/dateSelector/index.test.js +2 -1
- package/dist/esm/components/dateSelector/index.test.js.map +1 -1
- package/dist/esm/components/searchableDropdown/index.js +13 -0
- package/dist/esm/components/searchableDropdown/index.js.map +1 -0
- package/dist/esm/components/searchableDropdown/index.stories.js +201 -0
- package/dist/esm/components/searchableDropdown/index.stories.js.map +1 -0
- package/dist/esm/components/searchableDropdown/index.test.js +607 -0
- package/dist/esm/components/searchableDropdown/index.test.js.map +1 -0
- package/dist/esm/components/toast/index.js +1 -1
- package/dist/esm/components/toast/index.stories.js +1 -1
- package/dist/esm/components/toast/index.test.js +1 -1
- package/dist/esm/{index-C4IAMlRE.js → index-CT0_LjIR.js} +2 -2
- package/dist/esm/{index-C4IAMlRE.js.map → index-CT0_LjIR.js.map} +1 -1
- package/dist/esm/index-DgTZdYln.js +148 -0
- package/dist/esm/index-DgTZdYln.js.map +1 -0
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +7 -17
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/components/searchableDropdown/index.d.ts +22 -0
- package/dist/esm/lib/components/searchableDropdown/index.stories.d.ts +108 -0
- package/dist/esm/lib/components/searchableDropdown/index.test.d.ts +1 -0
- package/dist/esm/lib/index.d.ts +3 -2
- package/dist/esm/useOnClickOutside-B5hujnpp.js +21 -0
- package/dist/esm/useOnClickOutside-B5hujnpp.js.map +1 -0
- package/dist/esm/util/images/index.stories.js +2 -1
- package/dist/esm/util/images/index.stories.js.map +1 -1
- package/package.json +3 -2
- package/src/index.tsx +3 -0
- package/src/lib/components/searchableDropdown/index.stories.tsx +286 -0
- package/src/lib/components/searchableDropdown/index.test.tsx +355 -0
- package/src/lib/components/searchableDropdown/index.tsx +262 -0
- package/src/lib/components/searchableDropdown/style.module.scss +132 -0
- package/src/lib/index.tsx +8 -0
- package/dist/esm/Calendar-C7I0F5Gv.js.map +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SearchableDropdownOption {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface SearchableDropdownProps {
|
|
8
|
+
options: SearchableDropdownOption[];
|
|
9
|
+
value: string | null;
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
searchable?: boolean;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
triggerPlaceholder?: string;
|
|
14
|
+
noResultsText?: string;
|
|
15
|
+
groupName?: string;
|
|
16
|
+
dropUp?: boolean;
|
|
17
|
+
condensed?: boolean;
|
|
18
|
+
bordered?: boolean;
|
|
19
|
+
showChevron?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const SearchableDropdown: ({ options, value, onChange, searchable, placeholder, triggerPlaceholder, noResultsText, groupName: groupNameProp, dropUp, condensed, bordered, showChevron, disabled, }: SearchableDropdownProps) => JSX.Element;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { SearchableDropdownProps } from '.';
|
|
2
|
+
declare const story: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ options, value, onChange, searchable, placeholder, triggerPlaceholder, noResultsText, groupName: groupNameProp, dropUp, condensed, bordered, showChevron, disabled, }: SearchableDropdownProps) => JSX.Element;
|
|
5
|
+
argTypes: {
|
|
6
|
+
options: {
|
|
7
|
+
description: string;
|
|
8
|
+
table: {
|
|
9
|
+
type: {
|
|
10
|
+
summary: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
value: {
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
onChange: {
|
|
18
|
+
action: boolean;
|
|
19
|
+
table: {
|
|
20
|
+
category: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
searchable: {
|
|
24
|
+
description: string;
|
|
25
|
+
control: string;
|
|
26
|
+
};
|
|
27
|
+
placeholder: {
|
|
28
|
+
description: string;
|
|
29
|
+
control: string;
|
|
30
|
+
};
|
|
31
|
+
triggerPlaceholder: {
|
|
32
|
+
description: string;
|
|
33
|
+
control: string;
|
|
34
|
+
};
|
|
35
|
+
noResultsText: {
|
|
36
|
+
description: string;
|
|
37
|
+
control: string;
|
|
38
|
+
};
|
|
39
|
+
groupName: {
|
|
40
|
+
description: string;
|
|
41
|
+
control: string;
|
|
42
|
+
};
|
|
43
|
+
dropUp: {
|
|
44
|
+
description: string;
|
|
45
|
+
control: string;
|
|
46
|
+
};
|
|
47
|
+
condensed: {
|
|
48
|
+
description: string;
|
|
49
|
+
control: string;
|
|
50
|
+
};
|
|
51
|
+
bordered: {
|
|
52
|
+
description: string;
|
|
53
|
+
control: string;
|
|
54
|
+
};
|
|
55
|
+
showChevron: {
|
|
56
|
+
description: string;
|
|
57
|
+
control: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
args: {
|
|
61
|
+
options: {
|
|
62
|
+
id: string;
|
|
63
|
+
label: string;
|
|
64
|
+
}[];
|
|
65
|
+
value: string;
|
|
66
|
+
searchable: boolean;
|
|
67
|
+
placeholder: string;
|
|
68
|
+
triggerPlaceholder: string;
|
|
69
|
+
noResultsText: string;
|
|
70
|
+
groupName: string;
|
|
71
|
+
dropUp: boolean;
|
|
72
|
+
condensed: boolean;
|
|
73
|
+
bordered: boolean;
|
|
74
|
+
showChevron: boolean;
|
|
75
|
+
};
|
|
76
|
+
parameters: {
|
|
77
|
+
componentSubtitle: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export declare const Default: {
|
|
81
|
+
render: (args: SearchableDropdownProps) => JSX.Element;
|
|
82
|
+
name: string;
|
|
83
|
+
};
|
|
84
|
+
export declare const Searchable: {
|
|
85
|
+
render: (args: SearchableDropdownProps) => JSX.Element;
|
|
86
|
+
name: string;
|
|
87
|
+
};
|
|
88
|
+
export declare const WithIcons: {
|
|
89
|
+
render: (args: SearchableDropdownProps) => JSX.Element;
|
|
90
|
+
name: string;
|
|
91
|
+
};
|
|
92
|
+
export declare const Condensed: {
|
|
93
|
+
render: (args: SearchableDropdownProps) => JSX.Element;
|
|
94
|
+
name: string;
|
|
95
|
+
};
|
|
96
|
+
export declare const WithChevron: {
|
|
97
|
+
render: (args: SearchableDropdownProps) => JSX.Element;
|
|
98
|
+
name: string;
|
|
99
|
+
};
|
|
100
|
+
export declare const Disabled: {
|
|
101
|
+
render: (args: SearchableDropdownProps) => JSX.Element;
|
|
102
|
+
name: string;
|
|
103
|
+
};
|
|
104
|
+
export declare const DropUp: {
|
|
105
|
+
render: (args: SearchableDropdownProps) => JSX.Element;
|
|
106
|
+
name: string;
|
|
107
|
+
};
|
|
108
|
+
export default story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/cjs/lib/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import Chip from './components/chip';
|
|
|
19
19
|
import { AutoSuggestInput } from './components/input/autoSuggestInput';
|
|
20
20
|
import { ComparisonTable, TableRating, TableTrueFalse, TableRowHeader, TableButton, TableInfoButton, TableHeader } from './components/comparisonTable';
|
|
21
21
|
import { SegmentedControl } from './components/segmentedControl';
|
|
22
|
+
import { SearchableDropdown, SearchableDropdownProps, SearchableDropdownOption } from './components/searchableDropdown';
|
|
22
23
|
import { Link } from './components/link';
|
|
23
24
|
import { illustrations, images, IllustrationKeys } from './util/images';
|
|
24
25
|
import { Spinner } from './components/spinner';
|
|
@@ -40,6 +41,6 @@ import { LogoInverted } from './components/logo/LogoInverted';
|
|
|
40
41
|
import { LogoPositiveColor } from './components/logo/LogoPositiveColor';
|
|
41
42
|
import { LogoPositiveBlack } from './components/logo/LogoPositiveBlack';
|
|
42
43
|
export * from './components/icon';
|
|
43
|
-
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, LogoColor, LogoWhite, LogoBlack, LogoOrangeBox, LogoInvertedColor, LogoInverted, LogoPositiveColor, LogoPositiveBlack, };
|
|
44
|
-
export type { AccordionProps, BadgeProps, IllustrationKeys, InformationBoxProps, InputProps, FileType, MultiDropzoneProps, TableHeader, UploadedFile, UploadStatus, CardProps, IconWrapperProps, TableData, TableProps, };
|
|
44
|
+
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, SearchableDropdown, SegmentedControl, Checkbox, Radio, Link, InformationBox, Badge, images, illustrations, Spinner, Table, Toggle, Toaster, toast, useEscapeKey, useFocusWithin, useOnClickOutside, useMediaQuery, LogoColor, LogoWhite, LogoBlack, LogoOrangeBox, LogoInvertedColor, LogoInverted, LogoPositiveColor, LogoPositiveBlack, };
|
|
45
|
+
export type { AccordionProps, SearchableDropdownProps, SearchableDropdownOption, BadgeProps, IllustrationKeys, InformationBoxProps, InputProps, FileType, MultiDropzoneProps, TableHeader, UploadedFile, UploadStatus, CardProps, IconWrapperProps, TableData, TableProps, };
|
|
45
46
|
export type { DownloadStatus } from './models/download';
|
|
@@ -3,6 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import React__default, { createContext, useContext, useCallback, useRef, useLayoutEffect, useState, useEffect, useMemo } from 'react';
|
|
4
4
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers-BFTU3MAI.js';
|
|
5
5
|
import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
|
|
6
|
+
import { u as useOnClickOutside } from './useOnClickOutside-B5hujnpp.js';
|
|
6
7
|
import './index-DLQEsiym.js';
|
|
7
8
|
import CalendarIcon from './components/icon/icons/Calendar.js';
|
|
8
9
|
import { Button as Button$1 } from './components/button/index.js';
|
|
@@ -7950,23 +7951,6 @@ var css_248z$2 = "/* Variables declaration */\n.style-module_root__397VY {\n --
|
|
|
7950
7951
|
var rdpStyles = {"root":"style-module_root__397VY","day":"style-module_day__3Of7v","day_button":"style-module_day_button__NHOJQ","caption_label":"style-module_caption_label__2jNru","dropdown":"style-module_dropdown__2Hqem","button_next":"style-module_button_next__1Y8VT","button_previous":"style-module_button_previous__4lqFd","chevron":"style-module_chevron__27dGE","nav":"style-module_nav__1oqsc","dropdowns":"style-module_dropdowns__3dfRh","dropdown_root":"style-module_dropdown_root__1LpNh","month_caption":"style-module_month_caption__2sS7m","month":"style-module_month__1jOhg","months":"style-module_months__1inbJ","month_grid":"style-module_month_grid__649FG","weekday":"style-module_weekday__2A6l9","week_number":"style-module_week_number__1XQcM","today":"style-module_today__22ht3","outside":"style-module_outside__HzwPr","selected":"style-module_selected__3vu1p","disabled":"style-module_disabled__1DY3G","hidden":"style-module_hidden__1I1H_","range_start":"style-module_range_start__17hzi","range_middle":"style-module_range_middle__3V7gH","range_end":"style-module_range_end__1x_xp","focusable":"style-module_focusable__2S7MB","weeks_before_enter":"style-module_weeks_before_enter__2DcyY","rdp-slide_in_left":"style-module_rdp-slide_in_left__35fJM","weeks_before_exit":"style-module_weeks_before_exit__3JiYu","rdp-slide_out_left":"style-module_rdp-slide_out_left__15i75","weeks_after_enter":"style-module_weeks_after_enter__1wXPr","rdp-slide_in_right":"style-module_rdp-slide_in_right__3c2Yx","weeks_after_exit":"style-module_weeks_after_exit__QowsX","rdp-slide_out_right":"style-module_rdp-slide_out_right__3P_so","caption_after_enter":"style-module_caption_after_enter__11QIZ","rdp-fade_in":"style-module_rdp-fade_in__1kFDk","caption_after_exit":"style-module_caption_after_exit__N0Asa","rdp-fade_out":"style-module_rdp-fade_out__f0rb_","caption_before_enter":"style-module_caption_before_enter__1MZup","caption_before_exit":"style-module_caption_before_exit__2XjDZ"};
|
|
7951
7952
|
styleInject(css_248z$2);
|
|
7952
7953
|
|
|
7953
|
-
var useOnClickOutside = function (ref, callback) {
|
|
7954
|
-
useEffect(function () {
|
|
7955
|
-
var listener = function (event) {
|
|
7956
|
-
if (!ref.current || ref.current.contains(event.target)) {
|
|
7957
|
-
return;
|
|
7958
|
-
}
|
|
7959
|
-
callback(event);
|
|
7960
|
-
};
|
|
7961
|
-
document.addEventListener('mousedown', listener);
|
|
7962
|
-
document.addEventListener('touchstart', listener);
|
|
7963
|
-
return function () {
|
|
7964
|
-
document.removeEventListener('mousedown', listener);
|
|
7965
|
-
document.removeEventListener('touchstart', listener);
|
|
7966
|
-
};
|
|
7967
|
-
}, [ref, callback]);
|
|
7968
|
-
};
|
|
7969
|
-
|
|
7970
7954
|
var css_248z$1 = ".style-module_container__3SY_g {\n position: relative;\n}";
|
|
7971
7955
|
var styles = {"container":"style-module_container__3SY_g"};
|
|
7972
7956
|
styleInject(css_248z$1);
|
|
@@ -8028,5 +8012,5 @@ var Calendar = function (_a) {
|
|
|
8028
8012
|
}, classNames: __assign(__assign({}, rdpStyles), datepickerStyles) }))] }));
|
|
8029
8013
|
};
|
|
8030
8014
|
|
|
8031
|
-
export { Calendar as C, dayjs as d, requireDayjs_min as r
|
|
8032
|
-
//# sourceMappingURL=Calendar-
|
|
8015
|
+
export { Calendar as C, dayjs as d, requireDayjs_min as r };
|
|
8016
|
+
//# sourceMappingURL=Calendar-8rhyapMz.js.map
|