@propellerads/button-drop-down 2.1.0 → 2.2.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/CHANGELOG.md +4 -0
- package/dist/AdFormat/index.d.ts +7 -2
- package/dist/AdFormat/style.d.ts +9 -2
- package/dist/ArrowButton/style.d.ts +1 -1
- package/dist/ButtonDropDown/src/index.d.ts +4 -0
- package/dist/ButtonDropDown/src/style.d.ts +3 -3
- package/dist/Card/src/index.d.ts +2 -1
- package/dist/Card/src/style.d.ts +5 -5
- package/dist/CheckboxCardGroup/src/styles.d.ts +9 -9
- package/dist/CodeViewer/style.d.ts +3 -3
- package/dist/Collapser/src/style.d.ts +4 -4
- package/dist/Currency/src/style.d.ts +1 -1
- package/dist/DatePicker/DatePickerControls/style.d.ts +4 -4
- package/dist/DatePicker/DatePickerInput/styles.d.ts +1 -1
- package/dist/DatePicker/DatePickerPresets/style.d.ts +2 -2
- package/dist/DatePicker/index.d.ts +3 -0
- package/dist/DatePicker/style.d.ts +6 -6
- package/dist/EditableField/src/style.d.ts +7 -7
- package/dist/ErrorLabel/src/ErrorsList/ErrorItem/style.d.ts +1 -1
- package/dist/ErrorLabel/src/ErrorsList/style.d.ts +2 -2
- package/dist/ErrorLabel/src/style.d.ts +2 -2
- package/dist/Header/HeaderBalance/style.d.ts +6 -6
- package/dist/Header/HeaderDivider/style.d.ts +1 -1
- package/dist/Header/HeaderDropdown/style.d.ts +1 -1
- package/dist/Header/HeaderDropdownList/style.d.ts +1 -1
- package/dist/Header/HeaderItem/style.d.ts +4 -4
- package/dist/Header/HeaderTime/style.d.ts +1 -1
- package/dist/Header/index.d.ts +25 -1
- package/dist/Header/style.d.ts +3 -3
- package/dist/Header/themes/variables.d.ts +26 -0
- package/dist/Hint/src/style.d.ts +4 -4
- package/dist/Icon/src/icons/AddCircleBracket.d.ts +2 -0
- package/dist/Icon/src/icons/AddImage.d.ts +2 -0
- package/dist/Icon/src/icons/AirlineStops.d.ts +2 -0
- package/dist/Icon/src/icons/Announcement.d.ts +2 -0
- package/dist/Icon/src/icons/Apps.d.ts +2 -0
- package/dist/Icon/src/icons/AutoRenew.d.ts +2 -0
- package/dist/Icon/src/icons/BellActive.d.ts +2 -0
- package/dist/Icon/src/icons/BellCrossed.d.ts +2 -0
- package/dist/Icon/src/icons/BlockedImage.d.ts +2 -0
- package/dist/Icon/src/icons/Cancel.d.ts +2 -0
- package/dist/Icon/src/icons/CircleNotification.d.ts +2 -0
- package/dist/Icon/src/icons/DeleteForever.d.ts +2 -0
- package/dist/Icon/src/icons/Diamond.d.ts +2 -0
- package/dist/Icon/src/icons/DragIndicator.d.ts +2 -0
- package/dist/Icon/src/icons/Draggable.d.ts +2 -0
- package/dist/Icon/src/icons/Favorite.d.ts +2 -0
- package/dist/Icon/src/icons/Fingerprint.d.ts +2 -0
- package/dist/Icon/src/icons/Http.d.ts +2 -0
- package/dist/Icon/src/icons/Info.d.ts +2 -0
- package/dist/Icon/src/icons/LaughingSmile.d.ts +2 -0
- package/dist/Icon/src/icons/LocalAtm.d.ts +2 -0
- package/dist/Icon/src/icons/MailFilled.d.ts +2 -0
- package/dist/Icon/src/icons/ManageHistory.d.ts +2 -0
- package/dist/Icon/src/icons/MissedCall.d.ts +2 -0
- package/dist/Icon/src/icons/Monetization.d.ts +2 -0
- package/dist/Icon/src/icons/OnlinePrediction.d.ts +2 -0
- package/dist/Icon/src/icons/PhotoCamera.d.ts +2 -0
- package/dist/Icon/src/icons/PlayCircleFilled.d.ts +2 -0
- package/dist/Icon/src/icons/PrivacyTip.d.ts +2 -0
- package/dist/Icon/src/icons/QrCode.d.ts +2 -0
- package/dist/Icon/src/icons/QuestionMark.d.ts +2 -0
- package/dist/Icon/src/icons/SaveAs.d.ts +2 -0
- package/dist/Icon/src/icons/ShoppingBag.d.ts +2 -0
- package/dist/Icon/src/icons/ShoppingCart.d.ts +2 -0
- package/dist/Icon/src/icons/SurveyOffer.d.ts +2 -0
- package/dist/Icon/src/icons/SwipeDown.d.ts +2 -0
- package/dist/Icon/src/icons/Update.d.ts +2 -0
- package/dist/Icon/src/icons/Verified.d.ts +2 -0
- package/dist/Icon/src/index.d.ts +38 -0
- package/dist/Icon/src/types.d.ts +10 -0
- package/dist/ImageUploader/src/styles.d.ts +4 -4
- package/dist/InputText/src/style.d.ts +4 -4
- package/dist/KYCForm/src/KYCDocumentParts/index.d.ts +2 -1
- package/dist/KYCForm/src/KYCDocumentParts/style.d.ts +2 -2
- package/dist/KYCForm/src/KYCDocumentParts/types.d.ts +4 -0
- package/dist/KYCForm/src/document.types.d.ts +4 -2
- package/dist/Label/src/style.d.ts +1 -1
- package/dist/MoneyDashboard/style.d.ts +4 -4
- package/dist/MultiSelect/src/style.d.ts +4 -4
- package/dist/PageHeader/src/style.d.ts +3 -3
- package/dist/Pagination/src/allowJavaScriptModules.d.ts +1 -0
- package/dist/Pagination/src/styles.d.ts +7 -0
- package/dist/Pagination/src/types.d.ts +26 -0
- package/dist/PasswordValidator/src/index.d.ts +1 -1
- package/dist/PasswordValidator/src/types.d.ts +2 -0
- package/dist/Popup/src/index.d.ts +1 -1
- package/dist/Popup/src/styles.d.ts +2 -1
- package/dist/Popup/src/types.d.ts +2 -0
- package/dist/RadioCardGroup/src/style.d.ts +7 -7
- package/dist/Select/src/index.d.ts +1 -1
- package/dist/Select/src/style.d.ts +1 -15
- package/dist/Select/src/types.d.ts +30 -0
- package/dist/SingleDatePicker/src/DatePickerControls/index.d.ts +1 -1
- package/dist/SingleDatePicker/src/DatePickerControls/style.d.ts +4 -3
- package/dist/SingleDatePicker/src/index.d.ts +1 -1
- package/dist/SingleDatePicker/src/styles.d.ts +3 -1
- package/dist/SingleDatePicker/src/types.d.ts +12 -1
- package/dist/SmartHint/src/index.d.ts +5 -1
- package/dist/SmartHint/src/style.d.ts +6 -6
- package/dist/SmartTooltip/src/style.d.ts +1 -1
- package/dist/Switch/src/style.d.ts +2 -2
- package/dist/Table/src/index.d.ts +19 -10
- package/dist/Table/src/propsGetter.d.ts +9 -0
- package/dist/Table/src/style.d.ts +20 -2
- package/dist/Table/src/types.d.ts +108 -2
- package/dist/Table/src/useLoadingState.d.ts +3 -2
- package/dist/Table/src/useTableShadow.d.ts +2 -0
- package/dist/Tabs/style.d.ts +2 -2
- package/dist/TagsInput/src/style.d.ts +1 -0
- package/dist/TextMaxLength/src/allowJavaScriptModules.d.ts +1 -0
- package/dist/TextMaxLength/src/index.d.ts +2 -12
- package/dist/TextMaxLength/src/style.d.ts +3 -1
- package/dist/TextMaxLength/src/types.d.ts +7 -0
- package/dist/Textarea/src/types.d.ts +22 -0
- package/dist/ThemeAnnotation/src/components/Input.d.ts +1 -0
- package/dist/ThemeAnnotation/src/index.d.ts +5 -0
- package/dist/ThemeAnnotation/src/types.d.ts +9 -0
- package/dist/TimePicker/src/allowJavaScriptModules.d.ts +1 -0
- package/dist/TimePicker/src/index.d.ts +4 -0
- package/dist/TimePicker/src/style.d.ts +4 -0
- package/dist/TimePicker/src/types.d.ts +11 -0
- package/dist/button-drop-down.cjs.development.js +14 -4
- package/dist/button-drop-down.cjs.development.js.map +1 -1
- package/dist/button-drop-down.cjs.production.min.js +1 -1
- package/dist/button-drop-down.cjs.production.min.js.map +1 -1
- package/dist/button-drop-down.esm.js +14 -4
- package/dist/button-drop-down.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/Pagination/index.d.ts +0 -25
- package/dist/TextMaxLength/rollup.config.d.ts +0 -15
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TableProps } from '
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { TableProps, DefaultObject } from './types';
|
|
3
|
+
export declare const defaultProps: {
|
|
4
|
+
hasDefaultPagination: boolean;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
footerPlacement: never[];
|
|
7
|
+
loadingMessage: string;
|
|
8
|
+
labelPerPage: string;
|
|
9
|
+
parentElementId: string;
|
|
10
|
+
tableContentId: string;
|
|
11
|
+
showLoadingState: boolean;
|
|
12
|
+
initialState: {};
|
|
13
|
+
LoadingCellComponent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
+
getRowPreProps: () => DefaultObject;
|
|
15
|
+
isEnableRowSelect: () => boolean;
|
|
16
|
+
selectColumnProps: {};
|
|
17
|
+
noDataMessage: string;
|
|
11
18
|
};
|
|
19
|
+
declare type DefaultProps = Readonly<typeof defaultProps>;
|
|
20
|
+
declare const Table: FunctionComponent<TableProps & DefaultProps>;
|
|
12
21
|
export { Table };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ElementGetter, ElementCellPropGetter, ElementRowPropGetter, ElementHeaderFooterPropGetter, GetTableElementPropsGetter, GetTableContainerPropsGetter, GetTableElementInternalPropsGetter } from './types';
|
|
2
|
+
export declare const defaultGetter: ElementGetter;
|
|
3
|
+
export declare const cellGetter: ElementGetter;
|
|
4
|
+
export declare const mainCellGetter: ElementGetter;
|
|
5
|
+
export declare const getTableProps: GetTableContainerPropsGetter;
|
|
6
|
+
export declare const getTableElementProps: GetTableElementPropsGetter<ElementHeaderFooterPropGetter>;
|
|
7
|
+
export declare const getTableRowProps: GetTableElementPropsGetter<ElementRowPropGetter>;
|
|
8
|
+
export declare const getTableCellProps: GetTableElementPropsGetter<ElementCellPropGetter>;
|
|
9
|
+
export declare const getTableElementInternalProps: GetTableElementInternalPropsGetter;
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
export declare const TableLoading: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
}, never>;
|
|
5
|
+
export declare const TableLoadingInner: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const TableWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const TableRoot: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const TableContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const TableCore: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
+
export declare const HeadCell: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
+
export declare const TD: import("styled-components").StyledComponent<"div", any, {
|
|
12
|
+
align?: CSSObject | undefined;
|
|
13
|
+
colSpan?: number | undefined;
|
|
14
|
+
}, never>;
|
|
1
15
|
export declare const EmptyStateCell: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
declare const
|
|
3
|
-
export
|
|
16
|
+
export declare const TH: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
export declare const THead: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
18
|
+
export declare const TRGroup: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
19
|
+
export declare const TR: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
20
|
+
export declare const TBody: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
21
|
+
export declare const TFoot: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,8 +1,114 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Column,
|
|
1
|
+
import React, { FunctionComponent, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { Cell, CellPropGetter, Column, FooterGroupPropGetter, FooterPropGetter, HeaderGroup, HeaderGroupPropGetter, Hooks, Meta, Row, RowPropGetter, TableBodyPropGetter, TablePropGetter, TableState, UsePaginationInstanceProps, UsePaginationOptions, UsePaginationState, UseRowSelectInstanceProps, UseRowSelectState, UseSortByColumnProps, UseRowSelectRowProps, UseSortByInstanceProps, UseSortByOptions, UseTableOptions, HeaderPropGetter } from 'react-table';
|
|
3
|
+
export declare type DefaultObject = Record<string, string | number | unknown>;
|
|
3
4
|
export declare type LoadingState = {
|
|
4
5
|
loadingColumns?: Column[];
|
|
5
6
|
loadingData: any[];
|
|
6
7
|
};
|
|
8
|
+
export declare enum FOOTER_PLACEMENT {
|
|
9
|
+
TOP = "top",
|
|
10
|
+
BOTTOM = "bottom"
|
|
11
|
+
}
|
|
12
|
+
export declare type PaginationProps = {
|
|
13
|
+
paginationAmount?: string | ReactNode | ReactElement;
|
|
14
|
+
parentElementId: string;
|
|
15
|
+
labelPerPage?: string;
|
|
16
|
+
pageSizes?: Array<string | number>;
|
|
17
|
+
pageIndex: number;
|
|
18
|
+
perPage: number;
|
|
19
|
+
totalPages: number;
|
|
20
|
+
totalItems: number;
|
|
21
|
+
canNextPage: boolean;
|
|
22
|
+
canPreviousPage: boolean;
|
|
23
|
+
nextPageHandler: () => void;
|
|
24
|
+
previousPageHandler: () => void;
|
|
25
|
+
setPageSize: (size: number) => void;
|
|
26
|
+
gotoPage: (page: number) => void;
|
|
27
|
+
};
|
|
28
|
+
export declare type ControlledPagination = {
|
|
29
|
+
paginationAmount?: string | ReactNode | ReactElement;
|
|
30
|
+
pageSize: number;
|
|
31
|
+
pageIndex: number;
|
|
32
|
+
pageCount: number;
|
|
33
|
+
};
|
|
34
|
+
export declare type TableProps = {
|
|
35
|
+
columns: Array<Column<DefaultObject>>;
|
|
36
|
+
data: [];
|
|
37
|
+
totalItems?: number;
|
|
38
|
+
PaginationComponent: React.FunctionComponent<PaginationProps>;
|
|
39
|
+
initialState: Partial<TableState<DefaultObject>>;
|
|
40
|
+
fetchData?: (params: {
|
|
41
|
+
pageIndex: number;
|
|
42
|
+
pageSize: number;
|
|
43
|
+
}) => void;
|
|
44
|
+
onSortedChange?: (id: string, isDesc: boolean) => void;
|
|
45
|
+
isLoading?: boolean;
|
|
46
|
+
footerPlacement?: Array<FOOTER_PLACEMENT>;
|
|
47
|
+
hasDefaultPagination?: boolean;
|
|
48
|
+
onSelectRowsChange?: (rows: Array<DefaultObject>) => void;
|
|
49
|
+
controlledPagination?: ControlledPagination;
|
|
50
|
+
loadingMessage?: string;
|
|
51
|
+
labelPerPage?: string;
|
|
52
|
+
parentElementId?: string;
|
|
53
|
+
tableContentId?: string;
|
|
54
|
+
getRowPreProps?: (row: Row) => DefaultObject;
|
|
55
|
+
getTableProps?: TableGetter;
|
|
56
|
+
getHeaderGroupProps?: ElementGetter;
|
|
57
|
+
getHeaderProps?: ElementGetter;
|
|
58
|
+
getRowProps?: ElementGetter;
|
|
59
|
+
getCellProps?: ElementGetter;
|
|
60
|
+
getFooterProps?: ElementGetter;
|
|
61
|
+
getFooterGroupProps?: ElementGetter;
|
|
62
|
+
showLoadingState?: boolean;
|
|
63
|
+
LoadingCellComponent?: FunctionComponent<DefaultObject>;
|
|
64
|
+
noDataMessage?: string | ReactElement;
|
|
65
|
+
rowSubComponent?: (row: StandardRow) => ReactElement;
|
|
66
|
+
isEnableRowSelect?: (original: DefaultObject) => boolean;
|
|
67
|
+
};
|
|
68
|
+
export declare type TableOptions = {
|
|
69
|
+
columns: Array<Column<DefaultObject>>;
|
|
70
|
+
data: Array<DefaultObject>;
|
|
71
|
+
initialState: {
|
|
72
|
+
pageIndex?: number;
|
|
73
|
+
pageSize?: number;
|
|
74
|
+
};
|
|
75
|
+
disableSortRemove: boolean;
|
|
76
|
+
disableMultiSort: boolean;
|
|
77
|
+
disableMultiRemove: boolean;
|
|
78
|
+
manualSortBy?: boolean;
|
|
79
|
+
autoResetPage?: boolean;
|
|
80
|
+
manualPagination?: boolean;
|
|
81
|
+
pageCount?: number;
|
|
82
|
+
};
|
|
83
|
+
export declare type MetaProps = {
|
|
84
|
+
column?: HeaderGroup<DefaultObject>;
|
|
85
|
+
cell?: Cell;
|
|
86
|
+
};
|
|
87
|
+
export declare type BaseMeta = Meta<DefaultObject, MetaProps>;
|
|
88
|
+
export declare type TableGetter = (props: DefaultObject) => DefaultObject;
|
|
89
|
+
export declare type ElementGetter = (props: DefaultObject, meta: BaseMeta) => DefaultObject;
|
|
90
|
+
export declare type ElementCellPropGetter = CellPropGetter<DefaultObject>;
|
|
91
|
+
export declare type ElementRowPropGetter = RowPropGetter<DefaultObject>;
|
|
92
|
+
export declare type ElementHeaderFooterPropGetter = FooterGroupPropGetter<DefaultObject> | HeaderGroupPropGetter<DefaultObject> | FooterPropGetter<DefaultObject>;
|
|
93
|
+
export declare type GetTableContainerPropsGetter = (userGetter?: TableGetter, getter?: TableGetter) => TablePropGetter<DefaultObject> | TableBodyPropGetter<DefaultObject>;
|
|
94
|
+
export declare type GetTableElementPropsGetter<T> = (userGetter?: ElementGetter, getter?: ElementGetter) => T;
|
|
95
|
+
export declare type GetTableElementInternalPropsGetter = (internalProps: DefaultObject, userGetter?: ElementGetter, getter?: ElementGetter) => HeaderPropGetter<DefaultObject>;
|
|
96
|
+
export declare type ColumnWithSort = HeaderGroup<DefaultObject> & Partial<UseSortByColumnProps<DefaultObject>>;
|
|
97
|
+
export declare type StandardColumn = Column<DefaultObject>;
|
|
98
|
+
export declare type StandardRow = Row<DefaultObject> & {
|
|
99
|
+
isExpanded?: boolean;
|
|
100
|
+
};
|
|
101
|
+
export declare type SelectableRow = Row<{
|
|
102
|
+
id: string;
|
|
103
|
+
}> & UseRowSelectRowProps<DefaultObject>;
|
|
104
|
+
export declare type StandardCell = Cell<DefaultObject>;
|
|
105
|
+
export declare type SelectableRowInstanceProps = UseRowSelectInstanceProps<DefaultObject>;
|
|
106
|
+
export declare type StandardHooks = Hooks<DefaultObject>;
|
|
107
|
+
export declare type TableHooksInstanceProps = UseSortByInstanceProps<DefaultObject> & UsePaginationInstanceProps<DefaultObject> & UseRowSelectInstanceProps<DefaultObject> & {
|
|
108
|
+
state: UseRowSelectState<DefaultObject> & UsePaginationState<DefaultObject>;
|
|
109
|
+
};
|
|
110
|
+
export declare type TableOptionsProps = UseTableOptions<DefaultObject> & UseSortByOptions<DefaultObject> & UsePaginationOptions<DefaultObject> & {
|
|
111
|
+
initialState: Partial<TableState<DefaultObject>> & Partial<UsePaginationState<DefaultObject>>;
|
|
112
|
+
};
|
|
7
113
|
export declare class Table extends React.Component<Partial<TableProps>> {
|
|
8
114
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
1
2
|
import { Column } from 'react-table';
|
|
2
|
-
import { LoadingState } from './types';
|
|
3
|
-
declare const useLoadingState: (showLoadingState: boolean, loading: boolean, pageSize: number, columns: Column[], LoadingCellComponent
|
|
3
|
+
import { DefaultObject, LoadingState } from './types';
|
|
4
|
+
declare const useLoadingState: (showLoadingState: boolean, loading: boolean, pageSize: number, columns: Column<DefaultObject>[], LoadingCellComponent: FunctionComponent<DefaultObject>) => LoadingState;
|
|
4
5
|
export default useLoadingState;
|
package/dist/Tabs/style.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export const StyledTabs: any
|
|
2
|
-
export const StyledTab: any
|
|
1
|
+
export const StyledTabs: import("styled-components").StyledComponent<"ul", any, {}, never>;
|
|
2
|
+
export const StyledTab: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
3
3
|
export namespace VIEW_TYPE {
|
|
4
4
|
export const DEFAULT: string;
|
|
5
5
|
export const ROUNDED: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module '*';
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
+
import { TextMaxLengthProps } from './types';
|
|
2
|
+
declare const TextMaxLength: ({ maxLength, value }: TextMaxLengthProps) => false | JSX.Element;
|
|
1
3
|
export default TextMaxLength;
|
|
2
|
-
declare function TextMaxLength({ maxLength, value }: {
|
|
3
|
-
maxLength: any;
|
|
4
|
-
value: any;
|
|
5
|
-
}): false | JSX.Element;
|
|
6
|
-
declare namespace TextMaxLength {
|
|
7
|
-
export namespace propTypes {
|
|
8
|
-
export const maxLength: PropTypes.Validator<number>;
|
|
9
|
-
export const value: PropTypes.Validator<React.ReactText>;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
import PropTypes from "prop-types";
|
|
13
|
-
import React from "react";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface TextareaProps {
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
onBlur: (value: string) => void;
|
|
5
|
+
onFocus?: () => void;
|
|
6
|
+
elementId: string;
|
|
7
|
+
errors: string[];
|
|
8
|
+
maxLength?: number;
|
|
9
|
+
value: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
label?: string | React.ReactNode;
|
|
12
|
+
name: string;
|
|
13
|
+
isDisabled?: boolean;
|
|
14
|
+
isRequired?: boolean;
|
|
15
|
+
isReadonly?: boolean;
|
|
16
|
+
rows?: number;
|
|
17
|
+
style?: Record<string, string>;
|
|
18
|
+
onMouseEnter?: () => void;
|
|
19
|
+
onMouseLeave?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export default class Textarea extends React.Component<TextareaProps> {
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Input: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AnyStyledComponent, FlattenInterpolation, ThemedStyledProps } from 'styled-components';
|
|
2
|
+
declare type AnnotationFunction = (baseComponent: AnyStyledComponent, annotationComponents: FlattenInterpolation<ThemedStyledProps<any, any>>) => string;
|
|
3
|
+
declare const themeAnnotation: AnnotationFunction;
|
|
4
|
+
export { themeAnnotation, };
|
|
5
|
+
export { Input } from './components/Input';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module '*';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { StyledComponent } from 'styled-components';
|
|
2
|
+
export declare const StyledTimeContainer: StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const StyledInputTime: StyledComponent<"input", any, {}, never>;
|
|
4
|
+
export declare const StyledTimePickerHelper: StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare type TimePickerProps = {
|
|
2
|
+
elementId: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
value: string;
|
|
5
|
+
label?: string | null | undefined;
|
|
6
|
+
errors?: Array<string> | undefined;
|
|
7
|
+
isRequired?: boolean;
|
|
8
|
+
isReadonly?: boolean;
|
|
9
|
+
showErrorLabel?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export { TimePickerProps };
|
|
@@ -57,7 +57,11 @@ var ButtonDropDown = function ButtonDropDown(props) {
|
|
|
57
57
|
elementId = props.elementId,
|
|
58
58
|
options = props.options,
|
|
59
59
|
title = props.title,
|
|
60
|
-
onClick = props.onClick
|
|
60
|
+
onClick = props.onClick,
|
|
61
|
+
_props$onMouseEnter = props.onMouseEnter,
|
|
62
|
+
onMouseEnter = _props$onMouseEnter === void 0 ? undefined : _props$onMouseEnter,
|
|
63
|
+
_props$onMouseLeave = props.onMouseLeave,
|
|
64
|
+
onMouseLeave = _props$onMouseLeave === void 0 ? undefined : _props$onMouseLeave;
|
|
61
65
|
var containerRef = React.useRef(null);
|
|
62
66
|
|
|
63
67
|
var _useState = React.useState(false),
|
|
@@ -95,7 +99,9 @@ var ButtonDropDown = function ButtonDropDown(props) {
|
|
|
95
99
|
elementId: elementId,
|
|
96
100
|
onClick: function onClick() {
|
|
97
101
|
return setExpanded(!isExpanded);
|
|
98
|
-
}
|
|
102
|
+
},
|
|
103
|
+
onMouseEnter: onMouseEnter,
|
|
104
|
+
onMouseLeave: onMouseLeave
|
|
99
105
|
}, title), isExpanded && options.length > 0 && /*#__PURE__*/React__default.createElement(ButtonDropDownListContainer, null, options.map(function (option) {
|
|
100
106
|
return /*#__PURE__*/React__default.createElement(ButtonDropDownList, {
|
|
101
107
|
option: option,
|
|
@@ -112,13 +118,17 @@ ButtonDropDown.propTypes = {
|
|
|
112
118
|
isLoading: PropTypes.bool,
|
|
113
119
|
isDisabled: PropTypes.bool,
|
|
114
120
|
title: PropTypes.string.isRequired,
|
|
115
|
-
onClick: PropTypes.func.isRequired
|
|
121
|
+
onClick: PropTypes.func.isRequired,
|
|
122
|
+
onMouseEnter: PropTypes.func,
|
|
123
|
+
onMouseLeave: PropTypes.func
|
|
116
124
|
};
|
|
117
125
|
ButtonDropDown.defaultProps = {
|
|
118
126
|
type: BUTTON_DROPDOWN_TYPE.ADVANCED,
|
|
119
127
|
isLoading: false,
|
|
120
128
|
isDisabled: false,
|
|
121
|
-
options: []
|
|
129
|
+
options: [],
|
|
130
|
+
onMouseEnter: undefined,
|
|
131
|
+
onMouseLeave: undefined
|
|
122
132
|
};
|
|
123
133
|
|
|
124
134
|
exports.BUTTON_DROPDOWN_TYPE = BUTTON_DROPDOWN_TYPE;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-drop-down.cjs.development.js","sources":["../src/style.jsx","../src/index.jsx"],"sourcesContent":["import styled from 'styled-components';\nimport {\n gray80,\n gray95,\n white,\n spacing,\n fontNormal,\n borderRadius,\n} from '@propellerads/stylevariables';\n\nconst ButtonDropDownContainer = styled.div`\n position: relative;\n width: fit-content;\n`;\n\nconst ButtonDropDownListContainer = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n min-width: 100%;\n width: fit-content;\n border: 1px solid ${gray80};\n border-radius: ${borderRadius}px;\n background-color: ${white};\n padding: ${spacing * 2}px 0;\n margin-top: 2px;\n font-size: ${fontNormal}px;\n z-index: 1;\n`;\n\nconst ButtonDropDownListItemContainer = styled.div`\n width: 100%;\n text-align: left;\n min-height: 32px;\n padding: ${spacing * 2}px ${spacing * 3}px;\n\n &:hover {\n background-color: ${gray95};\n }\n`;\n\nexport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n};\n","import React, {useState, useEffect, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport Button, {BUTTON_TYPE} from '@propellerads/button';\n\nimport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n} from './style.jsx';\n\nexport const BUTTON_DROPDOWN_TYPE = BUTTON_TYPE;\n\nconst ButtonDropDownList = (props) => {\n const {\n option,\n onClick,\n } = props;\n\n return (\n <Button\n elementId={option.id}\n type={BUTTON_TYPE.PLAIN}\n onClick={() => onClick(option)}\n >\n <ButtonDropDownListItemContainer>\n {option.title}\n </ButtonDropDownListItemContainer>\n </Button>\n );\n};\n\nconst ButtonDropDownListProps = PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n title: PropTypes.string.isRequired,\n}).isRequired;\n\nButtonDropDownList.propTypes = {\n option: ButtonDropDownListProps,\n onClick: PropTypes.func.isRequired,\n};\n\nButtonDropDownList.defaultProps = {\n option: {},\n};\n\nconst ButtonDropDown = (props) => {\n const {\n type,\n isLoading,\n isDisabled,\n elementId,\n options,\n title,\n onClick,\n } = props;\n\n const containerRef = useRef(null);\n\n const [isExpanded, setExpanded] = useState(false);\n\n useEffect(() => {\n const handleClickOutside = (event) => {\n const {current} = containerRef;\n\n if (current && !current.contains(event.target)) {\n setExpanded(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('touchstart', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('touchstart', handleClickOutside);\n };\n }, [containerRef]);\n\n const onItemClick = (value) => {\n setExpanded(false);\n onClick(value);\n };\n\n return (\n <ButtonDropDownContainer\n ref={containerRef}\n >\n <Button\n type={type}\n isLoading={isLoading}\n isDisabled={isDisabled}\n elementId={elementId}\n onClick={() => setExpanded(!isExpanded)}\n >\n {title}\n </Button>\n\n {isExpanded && options.length > 0 && (\n <ButtonDropDownListContainer>\n {options.map((option) => (\n <ButtonDropDownList\n option={option}\n key={option.id}\n onClick={onItemClick}\n />\n ))}\n </ButtonDropDownListContainer>\n )}\n </ButtonDropDownContainer>\n );\n};\n\nButtonDropDown.propTypes = {\n type: PropTypes.oneOf(Object.values(BUTTON_DROPDOWN_TYPE)),\n options: PropTypes.arrayOf(ButtonDropDownListProps),\n elementId: PropTypes.string.isRequired,\n isLoading: PropTypes.bool,\n isDisabled: PropTypes.bool,\n title: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n};\n\nButtonDropDown.defaultProps = {\n type: BUTTON_DROPDOWN_TYPE.ADVANCED,\n isLoading: false,\n isDisabled: false,\n options: [],\n};\n\nexport default ButtonDropDown;\n"],"names":["ButtonDropDownContainer","styled","div","ButtonDropDownListContainer","gray80","borderRadius","white","spacing","fontNormal","ButtonDropDownListItemContainer","gray95","BUTTON_DROPDOWN_TYPE","BUTTON_TYPE","ButtonDropDownList","props","option","onClick","React","Button","id","PLAIN","title","ButtonDropDownListProps","PropTypes","shape","oneOfType","number","string","isRequired","propTypes","func","defaultProps","ButtonDropDown","type","isLoading","isDisabled","elementId","options","containerRef","useRef","useState","isExpanded","setExpanded","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","onItemClick","value","length","map","oneOf","Object","values","arrayOf","bool","ADVANCED"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,uBAAuB,gBAAGC,MAAM,CAACC,GAAV,uIAA7B;AAKA,IAAMC,2BAA2B,gBAAGF,MAAM,CAACC,GAAV,0WAMXE,qBANW,EAOdC,2BAPc,EAQXC,oBARW,EASpBC,sBAAO,GAAG,CATU,EAWlBC,yBAXkB,CAAjC;AAeA,IAAMC,+BAA+B,gBAAGR,MAAM,CAACC,GAAV,kOAIxBK,sBAAO,GAAG,CAJc,EAIPA,sBAAO,GAAG,CAJH,EAObG,qBAPa,CAArC;;ICpBaC,oBAAoB,GAAGC;;AAEpC,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,KAAD,EAAW;AACpC,MACEC,MADF,GAGID,KAHJ,CACEC,MADF;AAAA,MAEEC,QAFF,GAGIF,KAHJ,CAEEE,OAFF;AAKA,sBACEC,6BAACC,eAAD;AACE,IAAA,SAAS,EAAEH,MAAM,CAACI,EADpB;AAEE,IAAA,IAAI,EAAEP,kBAAW,CAACQ,KAFpB;AAGE,IAAA,OAAO,EAAE;AAAA,aAAMJ,QAAO,CAACD,MAAD,CAAb;AAAA;AAHX,kBAKEE,6BAAC,+BAAD,QACGF,MAAM,CAACM,KADV,CALF,CADF;AAWD,CAjBD;;AAmBA,IAAMC,uBAAuB,gBAAGC,SAAS,CAACC,KAAV,CAAgB;AAC9CL,EAAAA,EAAE,eAAEI,SAAS,CAACE,SAAV,CAAoB,CAACF,SAAS,CAACG,MAAX,EAAmBH,SAAS,CAACI,MAA7B,CAApB,EAA0DC,UADhB;AAE9CP,EAAAA,KAAK,EAAEE,SAAS,CAACI,MAAV,CAAiBC;AAFsB,CAAhB,EAG7BA,UAHH;AAKAf,kBAAkB,CAACgB,SAAnB,GAA+B;AAC7Bd,EAAAA,MAAM,EAAEO,uBADqB;AAE7BN,EAAAA,OAAO,EAAEO,SAAS,CAACO,IAAV,CAAeF;AAFK,CAA/B;AAKAf,kBAAkB,CAACkB,YAAnB,GAAkC;AAChChB,EAAAA,MAAM,EAAE;AADwB,CAAlC;;AAIA,IAAMiB,cAAc,GAAG,SAAjBA,cAAiB,CAAClB,KAAD,EAAW;AAChC,MACEmB,IADF,
|
|
1
|
+
{"version":3,"file":"button-drop-down.cjs.development.js","sources":["../src/style.jsx","../src/index.jsx"],"sourcesContent":["import styled from 'styled-components';\nimport {\n gray80,\n gray95,\n white,\n spacing,\n fontNormal,\n borderRadius,\n} from '@propellerads/stylevariables';\n\nconst ButtonDropDownContainer = styled.div`\n position: relative;\n width: fit-content;\n`;\n\nconst ButtonDropDownListContainer = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n min-width: 100%;\n width: fit-content;\n border: 1px solid ${gray80};\n border-radius: ${borderRadius}px;\n background-color: ${white};\n padding: ${spacing * 2}px 0;\n margin-top: 2px;\n font-size: ${fontNormal}px;\n z-index: 1;\n`;\n\nconst ButtonDropDownListItemContainer = styled.div`\n width: 100%;\n text-align: left;\n min-height: 32px;\n padding: ${spacing * 2}px ${spacing * 3}px;\n\n &:hover {\n background-color: ${gray95};\n }\n`;\n\nexport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n};\n","import React, {useState, useEffect, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport Button, {BUTTON_TYPE} from '@propellerads/button';\n\nimport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n} from './style.jsx';\n\nexport const BUTTON_DROPDOWN_TYPE = BUTTON_TYPE;\n\nconst ButtonDropDownList = (props) => {\n const {\n option,\n onClick,\n } = props;\n\n return (\n <Button\n elementId={option.id}\n type={BUTTON_TYPE.PLAIN}\n onClick={() => onClick(option)}\n >\n <ButtonDropDownListItemContainer>\n {option.title}\n </ButtonDropDownListItemContainer>\n </Button>\n );\n};\n\nconst ButtonDropDownListProps = PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n title: PropTypes.string.isRequired,\n}).isRequired;\n\nButtonDropDownList.propTypes = {\n option: ButtonDropDownListProps,\n onClick: PropTypes.func.isRequired,\n};\n\nButtonDropDownList.defaultProps = {\n option: {},\n};\n\nconst ButtonDropDown = (props) => {\n const {\n type,\n isLoading,\n isDisabled,\n elementId,\n options,\n title,\n onClick,\n onMouseEnter = undefined,\n onMouseLeave = undefined,\n } = props;\n\n const containerRef = useRef(null);\n\n const [isExpanded, setExpanded] = useState(false);\n\n useEffect(() => {\n const handleClickOutside = (event) => {\n const {current} = containerRef;\n\n if (current && !current.contains(event.target)) {\n setExpanded(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('touchstart', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('touchstart', handleClickOutside);\n };\n }, [containerRef]);\n\n const onItemClick = (value) => {\n setExpanded(false);\n onClick(value);\n };\n\n return (\n <ButtonDropDownContainer\n ref={containerRef}\n >\n <Button\n type={type}\n isLoading={isLoading}\n isDisabled={isDisabled}\n elementId={elementId}\n onClick={() => setExpanded(!isExpanded)}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {title}\n </Button>\n\n {isExpanded && options.length > 0 && (\n <ButtonDropDownListContainer>\n {options.map((option) => (\n <ButtonDropDownList\n option={option}\n key={option.id}\n onClick={onItemClick}\n />\n ))}\n </ButtonDropDownListContainer>\n )}\n </ButtonDropDownContainer>\n );\n};\n\nButtonDropDown.propTypes = {\n type: PropTypes.oneOf(Object.values(BUTTON_DROPDOWN_TYPE)),\n options: PropTypes.arrayOf(ButtonDropDownListProps),\n elementId: PropTypes.string.isRequired,\n isLoading: PropTypes.bool,\n isDisabled: PropTypes.bool,\n title: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n};\n\nButtonDropDown.defaultProps = {\n type: BUTTON_DROPDOWN_TYPE.ADVANCED,\n isLoading: false,\n isDisabled: false,\n options: [],\n onMouseEnter: undefined,\n onMouseLeave: undefined,\n};\n\nexport default ButtonDropDown;\n"],"names":["ButtonDropDownContainer","styled","div","ButtonDropDownListContainer","gray80","borderRadius","white","spacing","fontNormal","ButtonDropDownListItemContainer","gray95","BUTTON_DROPDOWN_TYPE","BUTTON_TYPE","ButtonDropDownList","props","option","onClick","React","Button","id","PLAIN","title","ButtonDropDownListProps","PropTypes","shape","oneOfType","number","string","isRequired","propTypes","func","defaultProps","ButtonDropDown","type","isLoading","isDisabled","elementId","options","onMouseEnter","undefined","onMouseLeave","containerRef","useRef","useState","isExpanded","setExpanded","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","onItemClick","value","length","map","oneOf","Object","values","arrayOf","bool","ADVANCED"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,uBAAuB,gBAAGC,MAAM,CAACC,GAAV,uIAA7B;AAKA,IAAMC,2BAA2B,gBAAGF,MAAM,CAACC,GAAV,0WAMXE,qBANW,EAOdC,2BAP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AAeF,UAPC;AAQzBU,EAAAA,YAAY,EAAEf,SAAS,CAACO,IARC;AASzBU,EAAAA,YAAY,EAAEjB,SAAS,CAACO;AATC,CAA3B;AAYAE,cAAc,CAACD,YAAf,GAA8B;AAC5BE,EAAAA,IAAI,EAAEtB,oBAAoB,CAACqD,QADC;AAE5B9B,EAAAA,SAAS,EAAE,KAFiB;AAG5BC,EAAAA,UAAU,EAAE,KAHgB;AAI5BE,EAAAA,OAAO,EAAE,EAJmB;AAK5BC,EAAAA,YAAY,EAAEC,SALc;AAM5BC,EAAAA,YAAY,EAAED;AANc,CAA9B;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var n,t,i,
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var n,t,i,o=require("react"),r=e(o),s=e(require("prop-types")),u=require("@propellerads/button"),d=e(u),a=e(require("styled-components")),l=require("@propellerads/stylevariables");function c(e,n){return n||(n=e.slice(0)),e.raw=n,e}var p=a.div(n||(n=c(["\n position: relative;\n width: fit-content;\n"]))),f=a.div(t||(t=c(["\n position: absolute;\n display: flex;\n flex-direction: column;\n min-width: 100%;\n width: fit-content;\n border: 1px solid ",";\n border-radius: ","px;\n background-color: ",";\n padding: ","px 0;\n margin-top: 2px;\n font-size: ","px;\n z-index: 1;\n"])),l.gray80,l.borderRadius,l.white,2*l.spacing,l.fontNormal),v=a.div(i||(i=c(["\n width: 100%;\n text-align: left;\n min-height: 32px;\n padding: ","px ","px;\n\n &:hover {\n background-color: ",";\n }\n"])),2*l.spacing,3*l.spacing,l.gray95),m=u.BUTTON_TYPE,g=function(e){var n=e.option,t=e.onClick;return r.createElement(d,{elementId:n.id,type:u.BUTTON_TYPE.PLAIN,onClick:function(){return t(n)}},r.createElement(v,null,n.title))},E=s.shape({id:s.oneOfType([s.number,s.string]).isRequired,title:s.string.isRequired}).isRequired;g.propTypes={option:E,onClick:s.func.isRequired},g.defaultProps={option:{}};var b=function(e){var n=e.type,t=e.isLoading,i=e.isDisabled,s=e.elementId,u=e.options,a=e.title,l=e.onClick,c=e.onMouseEnter,v=void 0===c?void 0:c,m=e.onMouseLeave,E=void 0===m?void 0:m,b=o.useRef(null),y=o.useState(!1),x=y[0],L=y[1];o.useEffect((function(){var e=function(e){var n=b.current;n&&!n.contains(e.target)&&L(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[b]);var h=function(e){L(!1),l(e)};return r.createElement(p,{ref:b},r.createElement(d,{type:n,isLoading:t,isDisabled:i,elementId:s,onClick:function(){return L(!x)},onMouseEnter:v,onMouseLeave:E},a),x&&u.length>0&&r.createElement(f,null,u.map((function(e){return r.createElement(g,{option:e,key:e.id,onClick:h})}))))};b.propTypes={type:s.oneOf(Object.values(m)),options:s.arrayOf(E),elementId:s.string.isRequired,isLoading:s.bool,isDisabled:s.bool,title:s.string.isRequired,onClick:s.func.isRequired,onMouseEnter:s.func,onMouseLeave:s.func},b.defaultProps={type:m.ADVANCED,isLoading:!1,isDisabled:!1,options:[],onMouseEnter:void 0,onMouseLeave:void 0},exports.BUTTON_DROPDOWN_TYPE=m,exports.default=b;
|
|
2
2
|
//# sourceMappingURL=button-drop-down.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-drop-down.cjs.production.min.js","sources":["../src/style.jsx","../src/index.jsx"],"sourcesContent":["import styled from 'styled-components';\nimport {\n gray80,\n gray95,\n white,\n spacing,\n fontNormal,\n borderRadius,\n} from '@propellerads/stylevariables';\n\nconst ButtonDropDownContainer = styled.div`\n position: relative;\n width: fit-content;\n`;\n\nconst ButtonDropDownListContainer = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n min-width: 100%;\n width: fit-content;\n border: 1px solid ${gray80};\n border-radius: ${borderRadius}px;\n background-color: ${white};\n padding: ${spacing * 2}px 0;\n margin-top: 2px;\n font-size: ${fontNormal}px;\n z-index: 1;\n`;\n\nconst ButtonDropDownListItemContainer = styled.div`\n width: 100%;\n text-align: left;\n min-height: 32px;\n padding: ${spacing * 2}px ${spacing * 3}px;\n\n &:hover {\n background-color: ${gray95};\n }\n`;\n\nexport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n};\n","import React, {useState, useEffect, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport Button, {BUTTON_TYPE} from '@propellerads/button';\n\nimport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n} from './style.jsx';\n\nexport const BUTTON_DROPDOWN_TYPE = BUTTON_TYPE;\n\nconst ButtonDropDownList = (props) => {\n const {\n option,\n onClick,\n } = props;\n\n return (\n <Button\n elementId={option.id}\n type={BUTTON_TYPE.PLAIN}\n onClick={() => onClick(option)}\n >\n <ButtonDropDownListItemContainer>\n {option.title}\n </ButtonDropDownListItemContainer>\n </Button>\n );\n};\n\nconst ButtonDropDownListProps = PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n title: PropTypes.string.isRequired,\n}).isRequired;\n\nButtonDropDownList.propTypes = {\n option: ButtonDropDownListProps,\n onClick: PropTypes.func.isRequired,\n};\n\nButtonDropDownList.defaultProps = {\n option: {},\n};\n\nconst ButtonDropDown = (props) => {\n const {\n type,\n isLoading,\n isDisabled,\n elementId,\n options,\n title,\n onClick,\n } = props;\n\n const containerRef = useRef(null);\n\n const [isExpanded, setExpanded] = useState(false);\n\n useEffect(() => {\n const handleClickOutside = (event) => {\n const {current} = containerRef;\n\n if (current && !current.contains(event.target)) {\n setExpanded(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('touchstart', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('touchstart', handleClickOutside);\n };\n }, [containerRef]);\n\n const onItemClick = (value) => {\n setExpanded(false);\n onClick(value);\n };\n\n return (\n <ButtonDropDownContainer\n ref={containerRef}\n >\n <Button\n type={type}\n isLoading={isLoading}\n isDisabled={isDisabled}\n elementId={elementId}\n onClick={() => setExpanded(!isExpanded)}\n >\n {title}\n </Button>\n\n {isExpanded && options.length > 0 && (\n <ButtonDropDownListContainer>\n {options.map((option) => (\n <ButtonDropDownList\n option={option}\n key={option.id}\n onClick={onItemClick}\n />\n ))}\n </ButtonDropDownListContainer>\n )}\n </ButtonDropDownContainer>\n );\n};\n\nButtonDropDown.propTypes = {\n type: PropTypes.oneOf(Object.values(BUTTON_DROPDOWN_TYPE)),\n options: PropTypes.arrayOf(ButtonDropDownListProps),\n elementId: PropTypes.string.isRequired,\n isLoading: PropTypes.bool,\n isDisabled: PropTypes.bool,\n title: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n};\n\nButtonDropDown.defaultProps = {\n type: BUTTON_DROPDOWN_TYPE.ADVANCED,\n isLoading: false,\n isDisabled: false,\n options: [],\n};\n\nexport default ButtonDropDown;\n"],"names":["ButtonDropDownContainer","styled","div","ButtonDropDownListContainer","gray80","borderRadius","white","spacing","fontNormal","ButtonDropDownListItemContainer","gray95","BUTTON_DROPDOWN_TYPE","BUTTON_TYPE","ButtonDropDownList","props","option","onClick","React","Button","elementId","id","type","PLAIN","title","ButtonDropDownListProps","PropTypes","shape","oneOfType","number","string","isRequired","propTypes","func","defaultProps","ButtonDropDown","isLoading","isDisabled","options","containerRef","useRef","useState","isExpanded","setExpanded","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","onItemClick","value","ref","length","map","key","oneOf","Object","values","arrayOf","bool","ADVANCED"],"mappings":"0TAUA,IAAMA,EAA0BC,EAAOC,oEAKjCC,EAA8BF,EAAOC,8RAMrBE,SACHC,eACGC,QACC,EAAVC,UAEEC,cAITC,EAAkCR,EAAOC,wJAIxB,EAAVK,UAA2B,EAAVA,UAGNG,UC3BXC,EAAuBC,cAE9BC,EAAqB,SAACC,OAExBC,EAEED,EAFFC,OACAC,EACEF,EADFE,eAIAC,gBAACC,GACCC,UAAWJ,EAAOK,GAClBC,KAAMT,cAAYU,MAClBN,QAAS,kBAAMA,EAAQD,KAEvBE,gBAACR,OACEM,EAAOQ,SAMVC,EAA0BC,EAAUC,MAAM,CAC9CN,GAAIK,EAAUE,UAAU,CAACF,EAAUG,OAAQH,EAAUI,SAASC,WAC9DP,MAAOE,EAAUI,OAAOC,aACvBA,WAEHjB,EAAmBkB,UAAY,CAC7BhB,OAAQS,EACRR,QAASS,EAAUO,KAAKF,YAG1BjB,EAAmBoB,aAAe,CAChClB,OAAQ,IAGV,IAAMmB,EAAiB,SAACpB,OAEpBO,
|
|
1
|
+
{"version":3,"file":"button-drop-down.cjs.production.min.js","sources":["../src/style.jsx","../src/index.jsx"],"sourcesContent":["import styled from 'styled-components';\nimport {\n gray80,\n gray95,\n white,\n spacing,\n fontNormal,\n borderRadius,\n} from '@propellerads/stylevariables';\n\nconst ButtonDropDownContainer = styled.div`\n position: relative;\n width: fit-content;\n`;\n\nconst ButtonDropDownListContainer = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n min-width: 100%;\n width: fit-content;\n border: 1px solid ${gray80};\n border-radius: ${borderRadius}px;\n background-color: ${white};\n padding: ${spacing * 2}px 0;\n margin-top: 2px;\n font-size: ${fontNormal}px;\n z-index: 1;\n`;\n\nconst ButtonDropDownListItemContainer = styled.div`\n width: 100%;\n text-align: left;\n min-height: 32px;\n padding: ${spacing * 2}px ${spacing * 3}px;\n\n &:hover {\n background-color: ${gray95};\n }\n`;\n\nexport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n};\n","import React, {useState, useEffect, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport Button, {BUTTON_TYPE} from '@propellerads/button';\n\nimport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n} from './style.jsx';\n\nexport const BUTTON_DROPDOWN_TYPE = BUTTON_TYPE;\n\nconst ButtonDropDownList = (props) => {\n const {\n option,\n onClick,\n } = props;\n\n return (\n <Button\n elementId={option.id}\n type={BUTTON_TYPE.PLAIN}\n onClick={() => onClick(option)}\n >\n <ButtonDropDownListItemContainer>\n {option.title}\n </ButtonDropDownListItemContainer>\n </Button>\n );\n};\n\nconst ButtonDropDownListProps = PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n title: PropTypes.string.isRequired,\n}).isRequired;\n\nButtonDropDownList.propTypes = {\n option: ButtonDropDownListProps,\n onClick: PropTypes.func.isRequired,\n};\n\nButtonDropDownList.defaultProps = {\n option: {},\n};\n\nconst ButtonDropDown = (props) => {\n const {\n type,\n isLoading,\n isDisabled,\n elementId,\n options,\n title,\n onClick,\n onMouseEnter = undefined,\n onMouseLeave = undefined,\n } = props;\n\n const containerRef = useRef(null);\n\n const [isExpanded, setExpanded] = useState(false);\n\n useEffect(() => {\n const handleClickOutside = (event) => {\n const {current} = containerRef;\n\n if (current && !current.contains(event.target)) {\n setExpanded(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('touchstart', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('touchstart', handleClickOutside);\n };\n }, [containerRef]);\n\n const onItemClick = (value) => {\n setExpanded(false);\n onClick(value);\n };\n\n return (\n <ButtonDropDownContainer\n ref={containerRef}\n >\n <Button\n type={type}\n isLoading={isLoading}\n isDisabled={isDisabled}\n elementId={elementId}\n onClick={() => setExpanded(!isExpanded)}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {title}\n </Button>\n\n {isExpanded && options.length > 0 && (\n <ButtonDropDownListContainer>\n {options.map((option) => (\n <ButtonDropDownList\n option={option}\n key={option.id}\n onClick={onItemClick}\n />\n ))}\n </ButtonDropDownListContainer>\n )}\n </ButtonDropDownContainer>\n );\n};\n\nButtonDropDown.propTypes = {\n type: PropTypes.oneOf(Object.values(BUTTON_DROPDOWN_TYPE)),\n options: PropTypes.arrayOf(ButtonDropDownListProps),\n elementId: PropTypes.string.isRequired,\n isLoading: PropTypes.bool,\n isDisabled: PropTypes.bool,\n title: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n};\n\nButtonDropDown.defaultProps = {\n type: BUTTON_DROPDOWN_TYPE.ADVANCED,\n isLoading: false,\n isDisabled: false,\n options: [],\n onMouseEnter: undefined,\n onMouseLeave: undefined,\n};\n\nexport default ButtonDropDown;\n"],"names":["ButtonDropDownContainer","styled","div","ButtonDropDownListContainer","gray80","borderRadius","white","spacing","fontNormal","ButtonDropDownListItemContainer","gray95","BUTTON_DROPDOWN_TYPE","BUTTON_TYPE","ButtonDropDownList","props","option","onClick","React","Button","elementId","id","type","PLAIN","title","ButtonDropDownListProps","PropTypes","shape","oneOfType","number","string","isRequired","propTypes","func","defaultProps","ButtonDropDown","isLoading","isDisabled","options","onMouseEnter","undefined","onMouseLeave","containerRef","useRef","useState","isExpanded","setExpanded","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","onItemClick","value","ref","length","map","key","oneOf","Object","values","arrayOf","bool","ADVANCED"],"mappings":"0TAUA,IAAMA,EAA0BC,EAAOC,oEAKjCC,EAA8BF,EAAOC,8RAMrBE,SACHC,eACGC,QACC,EAAVC,UAEEC,cAITC,EAAkCR,EAAOC,wJAIxB,EAAVK,UAA2B,EAAVA,UAGNG,UC3BXC,EAAuBC,cAE9BC,EAAqB,SAACC,OAExBC,EAEED,EAFFC,OACAC,EACEF,EADFE,eAIAC,gBAACC,GACCC,UAAWJ,EAAOK,GAClBC,KAAMT,cAAYU,MAClBN,QAAS,kBAAMA,EAAQD,KAEvBE,gBAACR,OACEM,EAAOQ,SAMVC,EAA0BC,EAAUC,MAAM,CAC9CN,GAAIK,EAAUE,UAAU,CAACF,EAAUG,OAAQ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MAAOE,EAAUI,OAAOC,WACxBd,QAASS,EAAUO,KAAKF,WACxBQ,aAAcb,EAAUO,KACxBQ,aAAcf,EAAUO,MAG1BE,EAAeD,aAAe,CAC5BZ,KAAMV,EAAqBuD,SAC3B/B,WAAW,EACXC,YAAY,EACZC,QAAS,GACTC,kBAAcC,EACdC,kBAAcD"}
|
|
@@ -51,7 +51,11 @@ var ButtonDropDown = function ButtonDropDown(props) {
|
|
|
51
51
|
elementId = props.elementId,
|
|
52
52
|
options = props.options,
|
|
53
53
|
title = props.title,
|
|
54
|
-
onClick = props.onClick
|
|
54
|
+
onClick = props.onClick,
|
|
55
|
+
_props$onMouseEnter = props.onMouseEnter,
|
|
56
|
+
onMouseEnter = _props$onMouseEnter === void 0 ? undefined : _props$onMouseEnter,
|
|
57
|
+
_props$onMouseLeave = props.onMouseLeave,
|
|
58
|
+
onMouseLeave = _props$onMouseLeave === void 0 ? undefined : _props$onMouseLeave;
|
|
55
59
|
var containerRef = useRef(null);
|
|
56
60
|
|
|
57
61
|
var _useState = useState(false),
|
|
@@ -89,7 +93,9 @@ var ButtonDropDown = function ButtonDropDown(props) {
|
|
|
89
93
|
elementId: elementId,
|
|
90
94
|
onClick: function onClick() {
|
|
91
95
|
return setExpanded(!isExpanded);
|
|
92
|
-
}
|
|
96
|
+
},
|
|
97
|
+
onMouseEnter: onMouseEnter,
|
|
98
|
+
onMouseLeave: onMouseLeave
|
|
93
99
|
}, title), isExpanded && options.length > 0 && /*#__PURE__*/React.createElement(ButtonDropDownListContainer, null, options.map(function (option) {
|
|
94
100
|
return /*#__PURE__*/React.createElement(ButtonDropDownList, {
|
|
95
101
|
option: option,
|
|
@@ -106,13 +112,17 @@ ButtonDropDown.propTypes = {
|
|
|
106
112
|
isLoading: PropTypes.bool,
|
|
107
113
|
isDisabled: PropTypes.bool,
|
|
108
114
|
title: PropTypes.string.isRequired,
|
|
109
|
-
onClick: PropTypes.func.isRequired
|
|
115
|
+
onClick: PropTypes.func.isRequired,
|
|
116
|
+
onMouseEnter: PropTypes.func,
|
|
117
|
+
onMouseLeave: PropTypes.func
|
|
110
118
|
};
|
|
111
119
|
ButtonDropDown.defaultProps = {
|
|
112
120
|
type: BUTTON_DROPDOWN_TYPE.ADVANCED,
|
|
113
121
|
isLoading: false,
|
|
114
122
|
isDisabled: false,
|
|
115
|
-
options: []
|
|
123
|
+
options: [],
|
|
124
|
+
onMouseEnter: undefined,
|
|
125
|
+
onMouseLeave: undefined
|
|
116
126
|
};
|
|
117
127
|
|
|
118
128
|
export default ButtonDropDown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-drop-down.esm.js","sources":["../src/style.jsx","../src/index.jsx"],"sourcesContent":["import styled from 'styled-components';\nimport {\n gray80,\n gray95,\n white,\n spacing,\n fontNormal,\n borderRadius,\n} from '@propellerads/stylevariables';\n\nconst ButtonDropDownContainer = styled.div`\n position: relative;\n width: fit-content;\n`;\n\nconst ButtonDropDownListContainer = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n min-width: 100%;\n width: fit-content;\n border: 1px solid ${gray80};\n border-radius: ${borderRadius}px;\n background-color: ${white};\n padding: ${spacing * 2}px 0;\n margin-top: 2px;\n font-size: ${fontNormal}px;\n z-index: 1;\n`;\n\nconst ButtonDropDownListItemContainer = styled.div`\n width: 100%;\n text-align: left;\n min-height: 32px;\n padding: ${spacing * 2}px ${spacing * 3}px;\n\n &:hover {\n background-color: ${gray95};\n }\n`;\n\nexport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n};\n","import React, {useState, useEffect, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport Button, {BUTTON_TYPE} from '@propellerads/button';\n\nimport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n} from './style.jsx';\n\nexport const BUTTON_DROPDOWN_TYPE = BUTTON_TYPE;\n\nconst ButtonDropDownList = (props) => {\n const {\n option,\n onClick,\n } = props;\n\n return (\n <Button\n elementId={option.id}\n type={BUTTON_TYPE.PLAIN}\n onClick={() => onClick(option)}\n >\n <ButtonDropDownListItemContainer>\n {option.title}\n </ButtonDropDownListItemContainer>\n </Button>\n );\n};\n\nconst ButtonDropDownListProps = PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n title: PropTypes.string.isRequired,\n}).isRequired;\n\nButtonDropDownList.propTypes = {\n option: ButtonDropDownListProps,\n onClick: PropTypes.func.isRequired,\n};\n\nButtonDropDownList.defaultProps = {\n option: {},\n};\n\nconst ButtonDropDown = (props) => {\n const {\n type,\n isLoading,\n isDisabled,\n elementId,\n options,\n title,\n onClick,\n } = props;\n\n const containerRef = useRef(null);\n\n const [isExpanded, setExpanded] = useState(false);\n\n useEffect(() => {\n const handleClickOutside = (event) => {\n const {current} = containerRef;\n\n if (current && !current.contains(event.target)) {\n setExpanded(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('touchstart', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('touchstart', handleClickOutside);\n };\n }, [containerRef]);\n\n const onItemClick = (value) => {\n setExpanded(false);\n onClick(value);\n };\n\n return (\n <ButtonDropDownContainer\n ref={containerRef}\n >\n <Button\n type={type}\n isLoading={isLoading}\n isDisabled={isDisabled}\n elementId={elementId}\n onClick={() => setExpanded(!isExpanded)}\n >\n {title}\n </Button>\n\n {isExpanded && options.length > 0 && (\n <ButtonDropDownListContainer>\n {options.map((option) => (\n <ButtonDropDownList\n option={option}\n key={option.id}\n onClick={onItemClick}\n />\n ))}\n </ButtonDropDownListContainer>\n )}\n </ButtonDropDownContainer>\n );\n};\n\nButtonDropDown.propTypes = {\n type: PropTypes.oneOf(Object.values(BUTTON_DROPDOWN_TYPE)),\n options: PropTypes.arrayOf(ButtonDropDownListProps),\n elementId: PropTypes.string.isRequired,\n isLoading: PropTypes.bool,\n isDisabled: PropTypes.bool,\n title: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n};\n\nButtonDropDown.defaultProps = {\n type: BUTTON_DROPDOWN_TYPE.ADVANCED,\n isLoading: false,\n isDisabled: false,\n options: [],\n};\n\nexport default ButtonDropDown;\n"],"names":["ButtonDropDownContainer","styled","div","ButtonDropDownListContainer","gray80","borderRadius","white","spacing","fontNormal","ButtonDropDownListItemContainer","gray95","BUTTON_DROPDOWN_TYPE","BUTTON_TYPE","ButtonDropDownList","props","option","onClick","id","PLAIN","title","ButtonDropDownListProps","PropTypes","shape","oneOfType","number","string","isRequired","propTypes","func","defaultProps","ButtonDropDown","type","isLoading","isDisabled","elementId","options","containerRef","useRef","useState","isExpanded","setExpanded","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","onItemClick","value","length","map","oneOf","Object","values","arrayOf","bool","ADVANCED"],"mappings":";;;;;;;;;;;;;;;;AAUA,IAAMA,uBAAuB,gBAAGC,MAAM,CAACC,GAAV,uIAA7B;AAKA,IAAMC,2BAA2B,gBAAGF,MAAM,CAACC,GAAV,0WAMXE,MANW,EAOdC,YAPc,EAQXC,KARW,EASpBC,OAAO,GAAG,CATU,EAWlBC,UAXkB,CAAjC;AAeA,IAAMC,+BAA+B,gBAAGR,MAAM,CAACC,GAAV,kOAIxBK,OAAO,GAAG,CAJc,EAIPA,OAAO,GAAG,CAJH,EAObG,MAPa,CAArC;;ICpBaC,oBAAoB,GAAGC,WAA7B;;AAEP,IAAMC,kBAAkB,GAAG,SAArBA,kBAAqB,CAACC,KAAD,EAAW;AACpC,MACEC,MADF,GAGID,KAHJ,CACEC,MADF;AAAA,MAEEC,QAFF,GAGIF,KAHJ,CAEEE,OAFF;AAKA,sBACE,oBAAC,MAAD;AACE,IAAA,SAAS,EAAED,MAAM,CAACE,EADpB;AAEE,IAAA,IAAI,EAAEL,WAAW,CAACM,KAFpB;AAGE,IAAA,OAAO,EAAE;AAAA,aAAMF,QAAO,CAACD,MAAD,CAAb;AAAA;AAHX,kBAKE,oBAAC,+BAAD,QACGA,MAAM,CAACI,KADV,CALF,CADF;AAWD,CAjBD;;AAmBA,IAAMC,uBAAuB,gBAAGC,SAAS,CAACC,KAAV,CAAgB;AAC9CL,EAAAA,EAAE,eAAEI,SAAS,CAACE,SAAV,CAAoB,CAACF,SAAS,CAACG,MAAX,EAAmBH,SAAS,CAACI,MAA7B,CAApB,EAA0DC,UADhB;AAE9CP,EAAAA,KAAK,EAAEE,SAAS,CAACI,MAAV,CAAiBC;AAFsB,CAAhB,EAG7BA,UAHH;AAKAb,kBAAkB,CAACc,SAAnB,GAA+B;AAC7BZ,EAAAA,MAAM,EAAEK,uBADqB;AAE7BJ,EAAAA,OAAO,EAAEK,SAAS,CAACO,IAAV,CAAeF;AAFK,CAA/B;AAKAb,kBAAkB,CAACgB,YAAnB,GAAkC;AAChCd,EAAAA,MAAM,EAAE;AADwB,CAAlC;;AAIA,IAAMe,cAAc,GAAG,SAAjBA,cAAiB,CAAChB,KAAD,EAAW;AAChC,MACEiB,IADF,
|
|
1
|
+
{"version":3,"file":"button-drop-down.esm.js","sources":["../src/style.jsx","../src/index.jsx"],"sourcesContent":["import styled from 'styled-components';\nimport {\n gray80,\n gray95,\n white,\n spacing,\n fontNormal,\n borderRadius,\n} from '@propellerads/stylevariables';\n\nconst ButtonDropDownContainer = styled.div`\n position: relative;\n width: fit-content;\n`;\n\nconst ButtonDropDownListContainer = styled.div`\n position: absolute;\n display: flex;\n flex-direction: column;\n min-width: 100%;\n width: fit-content;\n border: 1px solid ${gray80};\n border-radius: ${borderRadius}px;\n background-color: ${white};\n padding: ${spacing * 2}px 0;\n margin-top: 2px;\n font-size: ${fontNormal}px;\n z-index: 1;\n`;\n\nconst ButtonDropDownListItemContainer = styled.div`\n width: 100%;\n text-align: left;\n min-height: 32px;\n padding: ${spacing * 2}px ${spacing * 3}px;\n\n &:hover {\n background-color: ${gray95};\n }\n`;\n\nexport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n};\n","import React, {useState, useEffect, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport Button, {BUTTON_TYPE} from '@propellerads/button';\n\nimport {\n ButtonDropDownContainer,\n ButtonDropDownListContainer,\n ButtonDropDownListItemContainer,\n} from './style.jsx';\n\nexport const BUTTON_DROPDOWN_TYPE = BUTTON_TYPE;\n\nconst ButtonDropDownList = (props) => {\n const {\n option,\n onClick,\n } = props;\n\n return (\n <Button\n elementId={option.id}\n type={BUTTON_TYPE.PLAIN}\n onClick={() => onClick(option)}\n >\n <ButtonDropDownListItemContainer>\n {option.title}\n </ButtonDropDownListItemContainer>\n </Button>\n );\n};\n\nconst ButtonDropDownListProps = PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,\n title: PropTypes.string.isRequired,\n}).isRequired;\n\nButtonDropDownList.propTypes = {\n option: ButtonDropDownListProps,\n onClick: PropTypes.func.isRequired,\n};\n\nButtonDropDownList.defaultProps = {\n option: {},\n};\n\nconst ButtonDropDown = (props) => {\n const {\n type,\n isLoading,\n isDisabled,\n elementId,\n options,\n title,\n onClick,\n onMouseEnter = undefined,\n onMouseLeave = undefined,\n } = props;\n\n const containerRef = useRef(null);\n\n const [isExpanded, setExpanded] = useState(false);\n\n useEffect(() => {\n const handleClickOutside = (event) => {\n const {current} = containerRef;\n\n if (current && !current.contains(event.target)) {\n setExpanded(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('touchstart', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('touchstart', handleClickOutside);\n };\n }, [containerRef]);\n\n const onItemClick = (value) => {\n setExpanded(false);\n onClick(value);\n };\n\n return (\n <ButtonDropDownContainer\n ref={containerRef}\n >\n <Button\n type={type}\n isLoading={isLoading}\n isDisabled={isDisabled}\n elementId={elementId}\n onClick={() => setExpanded(!isExpanded)}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {title}\n </Button>\n\n {isExpanded && options.length > 0 && (\n <ButtonDropDownListContainer>\n {options.map((option) => (\n <ButtonDropDownList\n option={option}\n key={option.id}\n onClick={onItemClick}\n />\n ))}\n </ButtonDropDownListContainer>\n )}\n </ButtonDropDownContainer>\n );\n};\n\nButtonDropDown.propTypes = {\n type: PropTypes.oneOf(Object.values(BUTTON_DROPDOWN_TYPE)),\n options: PropTypes.arrayOf(ButtonDropDownListProps),\n elementId: PropTypes.string.isRequired,\n isLoading: PropTypes.bool,\n isDisabled: PropTypes.bool,\n title: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n};\n\nButtonDropDown.defaultProps = {\n type: BUTTON_DROPDOWN_TYPE.ADVANCED,\n isLoading: false,\n isDisabled: false,\n options: [],\n onMouseEnter: undefined,\n onMouseLeave: undefined,\n};\n\nexport default ButtonDropDown;\n"],"names":["ButtonDropDownContainer","styled","div","ButtonDropDownListContainer","gray80","borderRadius","white","spacing","fontNormal","ButtonDropDownListItemContainer","gray95","BUTTON_DROPDOWN_TYPE","BUTTON_TYPE","ButtonDropDownList","props","option","onClick","id","PLAIN","title","ButtonDropDownListProps","PropTypes","shape","oneOfType","number","string","isRequired","propTypes","func","defaultProps","ButtonDropDown","type","isLoading","isDisabled","elementId","options","onMouseEnter","undefined","onMouseLeave","containerRef","useRef","useState","isExpanded","setExpanded","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","onItemClick","value","length","map","oneOf","Object","values","arrayOf","bool","ADVANCED"],"mappings":";;;;;;;;;;;;;;;;AAUA,IAAMA,uBAAuB,gBAAGC,MAAM,CAACC,GAAV,uIAA7B;AAKA,IAAMC,2BAA2B,gBAAGF,MAAM,CAACC,GAAV,0WAMXE,MANW,EAOdC,YAPc,EAQXC,KARW,EASpBC,OAAO,GAAG,CATU,EAWlBC,UAXkB,CAAjC;AAeA,IAAMC,+BAA+B,gBAAGR,MAAM,CAACC,GA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ACD,YAAf,GAA8B;AAC5BE,EAAAA,IAAI,EAAEpB,oBAAoB,CAACmD,QADC;AAE5B9B,EAAAA,SAAS,EAAE,KAFiB;AAG5BC,EAAAA,UAAU,EAAE,KAHgB;AAI5BE,EAAAA,OAAO,EAAE,EAJmB;AAK5BC,EAAAA,YAAY,EAAEC,SALc;AAM5BC,EAAAA,YAAY,EAAED;AANc,CAA9B;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@propellerads/button-drop-down",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "ButtonDropDown component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/button-drop-down.esm.js",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"tslib": "^2.3.1",
|
|
38
38
|
"typescript": "^4.4.2"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "7c6e78b4236ce45b20e573ff3f7fa035ec5d9296"
|
|
41
41
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export default Pagination;
|
|
2
|
-
declare function Pagination(props: any): JSX.Element;
|
|
3
|
-
declare namespace Pagination {
|
|
4
|
-
export namespace propTypes {
|
|
5
|
-
export const paginationAmount: PropTypes.Requireable<string | PropTypes.ReactElementLike>;
|
|
6
|
-
export const parentElementId: PropTypes.Validator<string>;
|
|
7
|
-
export const labelPerPage: PropTypes.Requireable<string>;
|
|
8
|
-
export const pageSizes: PropTypes.Requireable<(string | number | null | undefined)[]>;
|
|
9
|
-
export const page: PropTypes.Validator<number>;
|
|
10
|
-
export const perPage: PropTypes.Validator<number>;
|
|
11
|
-
export const totalPages: PropTypes.Validator<number>;
|
|
12
|
-
export const nextPageHandler: PropTypes.Validator<(...args: any[]) => any>;
|
|
13
|
-
export const previousPageHandler: PropTypes.Validator<(...args: any[]) => any>;
|
|
14
|
-
export const setPageSize: PropTypes.Validator<(...args: any[]) => any>;
|
|
15
|
-
}
|
|
16
|
-
export namespace defaultProps {
|
|
17
|
-
const paginationAmount_1: string;
|
|
18
|
-
export { paginationAmount_1 as paginationAmount };
|
|
19
|
-
const labelPerPage_1: string;
|
|
20
|
-
export { labelPerPage_1 as labelPerPage };
|
|
21
|
-
const pageSizes_1: number[];
|
|
22
|
-
export { pageSizes_1 as pageSizes };
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
import PropTypes from "prop-types";
|