@purple/phoenix-components 4.16.0 → 4.19.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 +41 -0
- package/dist/bundle.cjs.js +1 -1
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +2 -2
- package/dist/bundle.esm.js.map +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/bundle.umd.js.map +1 -1
- package/dist/index.d.ts +80 -46
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,67 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { InputHTMLAttributes, ReactElement, JSXElementConstructor,
|
|
2
|
+
import React__default, { HTMLAttributes, InputHTMLAttributes, ReactElement, JSXElementConstructor, MouseEventHandler, FocusEventHandler, TextareaHTMLAttributes } from 'react';
|
|
3
|
+
import * as styled_components from 'styled-components';
|
|
4
|
+
import { IntrinsicElementsKeys } from 'styled-components';
|
|
5
|
+
import { LayoutProps, FlexboxProps, GridProps, BackgroundColorProps, BackgroundProps, OpacityProps, PositionProps } from 'styled-system';
|
|
3
6
|
import { DayPickerProps } from 'react-day-picker';
|
|
4
7
|
import { Props } from 'tippy.js';
|
|
5
8
|
import { OptionTypeBase, NamedProps } from 'react-select';
|
|
6
9
|
import { TippyProps } from '@tippyjs/react';
|
|
7
10
|
export { TabPanel, Tabs } from 'react-tabs';
|
|
8
|
-
import * as styled_components from 'styled-components';
|
|
9
11
|
|
|
10
12
|
declare type GenericComponentProps = {
|
|
11
13
|
testId?: string;
|
|
12
14
|
className?: string;
|
|
13
15
|
};
|
|
14
16
|
|
|
17
|
+
declare const Spacing: readonly ["xxxs", "xxs", "xs", "s", "m", "l", "xl", "xxl", "xxxl"];
|
|
18
|
+
declare type Spacing = typeof Spacing[number];
|
|
19
|
+
|
|
20
|
+
interface MarginProps {
|
|
21
|
+
ml?: Spacing | string | number;
|
|
22
|
+
mr?: Spacing | string | number;
|
|
23
|
+
mt?: Spacing | string | number;
|
|
24
|
+
mb?: Spacing | string | number;
|
|
25
|
+
mx?: Spacing | string | number;
|
|
26
|
+
my?: Spacing | string | number;
|
|
27
|
+
m?: Spacing | string | number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface PaddingProps {
|
|
31
|
+
pl?: Spacing | string | number;
|
|
32
|
+
pr?: Spacing | string | number;
|
|
33
|
+
pt?: Spacing | string | number;
|
|
34
|
+
pb?: Spacing | string | number;
|
|
35
|
+
px?: Spacing | string | number;
|
|
36
|
+
py?: Spacing | string | number;
|
|
37
|
+
p?: Spacing | string | number;
|
|
38
|
+
}
|
|
39
|
+
|
|
15
40
|
declare const ColorTheme: readonly ["primary", "success", "warning", "error", "info", "neutral"];
|
|
16
41
|
declare type ColorTheme = typeof ColorTheme[number];
|
|
17
42
|
declare const ButtonColorTheme: readonly ["primary", "success", "error", "neutral"];
|
|
18
43
|
declare type ButtonColorTheme = typeof ButtonColorTheme[number];
|
|
19
44
|
|
|
45
|
+
declare const TextAlignment: readonly ["left", "center", "right", "justify"];
|
|
46
|
+
declare type TextAlignment = typeof TextAlignment[number];
|
|
47
|
+
|
|
48
|
+
declare const TextColor: readonly ["darkest", "dark", "light", "lightest", "white"];
|
|
49
|
+
declare type TextColor = typeof TextColor[number];
|
|
50
|
+
|
|
51
|
+
interface CommonTextProps<T> extends HTMLAttributes<T>, GenericComponentProps, TextAlignProp {
|
|
52
|
+
colorTheme?: ColorTheme;
|
|
53
|
+
color?: TextColor;
|
|
54
|
+
bold?: boolean;
|
|
55
|
+
}
|
|
56
|
+
interface TextAlignProp {
|
|
57
|
+
textAlign?: TextAlignment;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface BoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>, LayoutProps, FlexboxProps, GridProps, MarginProps, PaddingProps, BackgroundColorProps, BackgroundProps, OpacityProps, PositionProps, TextAlignProp, GenericComponentProps {
|
|
61
|
+
element?: IntrinsicElementsKeys;
|
|
62
|
+
}
|
|
63
|
+
declare const Box: React__default.FC<BoxProps>;
|
|
64
|
+
|
|
20
65
|
declare const ComponentSize: readonly ["tiny", "small", "medium", "large"];
|
|
21
66
|
declare type ComponentSize = typeof ComponentSize[number];
|
|
22
67
|
declare const ComponentSizeSmallMedium: readonly ["small", "medium"];
|
|
@@ -197,28 +242,15 @@ declare const PhoenixIconsSrc: {
|
|
|
197
242
|
readonly withdrawal: string;
|
|
198
243
|
readonly wrench: string;
|
|
199
244
|
};
|
|
200
|
-
declare const PhoenixIconsOutlined: ("filter" | "actions" | "add-circle" | "android" | "angled-arrow-left" | "angled-arrow-right" | "apple" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "asterisk" | "browser" | "burger" | "calendar" | "camera" | "check" | "check-circle" | "clock" | "cog" | "
|
|
245
|
+
declare const PhoenixIconsOutlined: ("filter" | "revert" | "document" | "list" | "search" | "email" | "copy" | "download" | "actions" | "add-circle" | "android" | "angled-arrow-left" | "angled-arrow-right" | "apple" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "asterisk" | "browser" | "burger" | "calendar" | "camera" | "check" | "check-circle" | "clock" | "cog" | "cross" | "deposit" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "dots-handle-reorder" | "edit" | "ellipsis" | "exclamation" | "exit" | "external" | "forward-arrow" | "gift" | "history" | "house" | "id-card" | "info-circle" | "language" | "lock" | "paper" | "passport" | "photo-user" | "pin" | "play-circle" | "profile" | "question-circle" | "refresh" | "scales" | "star" | "star-circle" | "stopwatch" | "subtract-circle" | "times-circle" | "transfer" | "trash" | "upload" | "windows" | "withdrawal" | "wrench")[];
|
|
201
246
|
declare type PhoenixIconsOutlined = keyof typeof PhoenixIconsOutlinedSrc;
|
|
202
247
|
declare const PhoenixIconsColored: ("calendar-primary" | "camera-primary" | "email-primary" | "exclamation-error" | "exclamation-warning" | "house-primary" | "id-card-primary" | "lock-primary" | "lock-success" | "paper-primary" | "passport-primary" | "photo-user-primary" | "pin-primary" | "trash-error")[];
|
|
203
248
|
declare type PhoenixIconsColored = keyof typeof PhoenixIconsColoredSrc;
|
|
204
|
-
declare const PhoenixIcons: ("filter" | "actions" | "add-circle" | "android" | "angled-arrow-left" | "angled-arrow-right" | "apple" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "asterisk" | "browser" | "burger" | "calendar" | "camera" | "check" | "check-circle" | "clock" | "cog" | "
|
|
249
|
+
declare const PhoenixIcons: ("filter" | "revert" | "document" | "list" | "search" | "email" | "copy" | "download" | "actions" | "add-circle" | "android" | "angled-arrow-left" | "angled-arrow-right" | "apple" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "asterisk" | "browser" | "burger" | "calendar" | "camera" | "check" | "check-circle" | "clock" | "cog" | "cross" | "deposit" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "dots-handle-reorder" | "edit" | "ellipsis" | "exclamation" | "exit" | "external" | "forward-arrow" | "gift" | "history" | "house" | "id-card" | "info-circle" | "language" | "lock" | "paper" | "passport" | "photo-user" | "pin" | "play-circle" | "profile" | "question-circle" | "refresh" | "scales" | "star" | "star-circle" | "stopwatch" | "subtract-circle" | "times-circle" | "transfer" | "trash" | "upload" | "windows" | "withdrawal" | "wrench" | "calendar-primary" | "camera-primary" | "email-primary" | "exclamation-error" | "exclamation-warning" | "house-primary" | "id-card-primary" | "lock-primary" | "lock-success" | "paper-primary" | "passport-primary" | "photo-user-primary" | "pin-primary" | "trash-error")[];
|
|
205
250
|
declare type PhoenixIcons = keyof typeof PhoenixIconsSrc;
|
|
206
251
|
|
|
207
252
|
declare type IconType = PhoenixIconsOutlined | React.ReactElement | string;
|
|
208
253
|
|
|
209
|
-
declare const Spacing: readonly ["xxxs", "xxs", "xs", "s", "m", "l", "xl", "xxl", "xxxl"];
|
|
210
|
-
declare type Spacing = typeof Spacing[number];
|
|
211
|
-
|
|
212
|
-
interface MarginProps {
|
|
213
|
-
ml?: Spacing | string | number;
|
|
214
|
-
mr?: Spacing | string | number;
|
|
215
|
-
mt?: Spacing | string | number;
|
|
216
|
-
mb?: Spacing | string | number;
|
|
217
|
-
mx?: Spacing | string | number;
|
|
218
|
-
my?: Spacing | string | number;
|
|
219
|
-
m?: Spacing | string | number;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
254
|
interface CommonButtonProps extends MarginProps {
|
|
223
255
|
colorTheme?: ButtonColorTheme;
|
|
224
256
|
size?: ComponentSize;
|
|
@@ -239,20 +271,10 @@ interface ButtonGroupProps extends GenericComponentProps {
|
|
|
239
271
|
}
|
|
240
272
|
declare const ButtonGroup: React__default.FC<ButtonGroupProps>;
|
|
241
273
|
|
|
242
|
-
interface PaddingProps {
|
|
243
|
-
pl?: Spacing | string | number;
|
|
244
|
-
pr?: Spacing | string | number;
|
|
245
|
-
pt?: Spacing | string | number;
|
|
246
|
-
pb?: Spacing | string | number;
|
|
247
|
-
px?: Spacing | string | number;
|
|
248
|
-
py?: Spacing | string | number;
|
|
249
|
-
p?: Spacing | string | number;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
274
|
interface CardProps extends PaddingProps, MarginProps, GenericComponentProps {
|
|
253
275
|
elevated?: boolean;
|
|
254
276
|
disabled?: boolean;
|
|
255
|
-
onClick?:
|
|
277
|
+
onClick?: React__default.MouseEventHandler<HTMLDivElement>;
|
|
256
278
|
}
|
|
257
279
|
declare const Card: React__default.FC<CardProps>;
|
|
258
280
|
|
|
@@ -267,12 +289,12 @@ declare type CheckboxProps = CheckboxRadioCommonProps;
|
|
|
267
289
|
declare const Checkbox: React__default.VoidFunctionComponent<CheckboxProps>;
|
|
268
290
|
|
|
269
291
|
interface ClosableButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement>, GenericComponentProps {
|
|
270
|
-
onClose?:
|
|
292
|
+
onClose?: React__default.MouseEventHandler<HTMLButtonElement>;
|
|
271
293
|
}
|
|
272
294
|
declare const ClosableButton: React__default.ForwardRefExoticComponent<React__default.PropsWithoutRef<ClosableButtonProps> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
273
295
|
|
|
274
296
|
interface ClosableItemProps extends GenericComponentProps {
|
|
275
|
-
onClose?:
|
|
297
|
+
onClose?: React__default.MouseEventHandler<HTMLButtonElement>;
|
|
276
298
|
}
|
|
277
299
|
declare const ClosableItem: React__default.FC<ClosableItemProps>;
|
|
278
300
|
|
|
@@ -370,20 +392,9 @@ interface FileUploadProps extends GenericComponentProps {
|
|
|
370
392
|
}
|
|
371
393
|
declare const FileUpload: React__default.FC<FileUploadProps>;
|
|
372
394
|
|
|
373
|
-
declare const
|
|
374
|
-
declare type TextAlignment = typeof TextAlignment[number];
|
|
395
|
+
declare const Flex: React__default.FC<BoxProps>;
|
|
375
396
|
|
|
376
|
-
declare const
|
|
377
|
-
declare type TextColor = typeof TextColor[number];
|
|
378
|
-
|
|
379
|
-
interface CommonTextProps<T> extends HTMLAttributes<T>, GenericComponentProps, TextAlignProp {
|
|
380
|
-
colorTheme?: ColorTheme;
|
|
381
|
-
color?: TextColor;
|
|
382
|
-
bold?: boolean;
|
|
383
|
-
}
|
|
384
|
-
interface TextAlignProp {
|
|
385
|
-
textAlign?: TextAlignment;
|
|
386
|
-
}
|
|
397
|
+
declare const Grid: React__default.FC<BoxProps>;
|
|
387
398
|
|
|
388
399
|
declare type HeadingSizes = 'h1' | 'h2' | 'h3' | 'h4';
|
|
389
400
|
interface HeadingProps extends CommonTextProps<HTMLHeadingElement>, PaddingProps, MarginProps {
|
|
@@ -433,11 +444,22 @@ interface MenuItemProps extends GenericComponentProps {
|
|
|
433
444
|
target?: string;
|
|
434
445
|
href?: string;
|
|
435
446
|
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
436
|
-
icon?: IconType;
|
|
447
|
+
icon?: IconType | PhoenixIconsColored;
|
|
437
448
|
colorTheme?: ColorTheme;
|
|
449
|
+
disabled?: boolean;
|
|
438
450
|
}
|
|
439
451
|
declare const MenuItem: React__default.FC<MenuItemProps>;
|
|
440
452
|
|
|
453
|
+
interface ModalProps extends GenericComponentProps, PaddingProps, MarginProps {
|
|
454
|
+
open: boolean;
|
|
455
|
+
onClose: () => void;
|
|
456
|
+
showCloseButton?: boolean;
|
|
457
|
+
size?: ComponentSize;
|
|
458
|
+
animate?: boolean;
|
|
459
|
+
center?: boolean;
|
|
460
|
+
}
|
|
461
|
+
declare const Modal: React__default.FC<ModalProps>;
|
|
462
|
+
|
|
441
463
|
declare type SubRange = number | [number] | [number, number];
|
|
442
464
|
interface CommonSliderProps extends GenericComponentProps {
|
|
443
465
|
range: {
|
|
@@ -457,11 +479,12 @@ interface MultiSliderProps extends CommonSliderProps {
|
|
|
457
479
|
}
|
|
458
480
|
declare const MultiSlider: React__default.FC<MultiSliderProps>;
|
|
459
481
|
|
|
460
|
-
interface NoticeProps extends GenericComponentProps {
|
|
482
|
+
interface NoticeProps extends GenericComponentProps, MarginProps, PaddingProps {
|
|
461
483
|
colorTheme?: ColorTheme;
|
|
462
484
|
buttonText?: string;
|
|
463
485
|
onClick?: (event: React__default.MouseEvent) => void;
|
|
464
486
|
onClose?: (event: React__default.MouseEvent) => void;
|
|
487
|
+
breakpoint?: number;
|
|
465
488
|
}
|
|
466
489
|
declare const Notice: React__default.FC<NoticeProps>;
|
|
467
490
|
|
|
@@ -770,6 +793,17 @@ declare const prefixedTheme: {
|
|
|
770
793
|
h4: number;
|
|
771
794
|
};
|
|
772
795
|
};
|
|
796
|
+
modal: {
|
|
797
|
+
zIndex: number;
|
|
798
|
+
overlayBackground: string;
|
|
799
|
+
windowShadow: string;
|
|
800
|
+
size: {
|
|
801
|
+
tiny: number;
|
|
802
|
+
small: number;
|
|
803
|
+
medium: number;
|
|
804
|
+
large: number;
|
|
805
|
+
};
|
|
806
|
+
};
|
|
773
807
|
multiSelect: {
|
|
774
808
|
multiValueLabel: {
|
|
775
809
|
paddingX: {
|
|
@@ -833,4 +867,4 @@ declare const prefixedTheme: {
|
|
|
833
867
|
|
|
834
868
|
declare const GlobalStyles: styled_components.GlobalStyleComponent<{}, styled_components.DefaultTheme>;
|
|
835
869
|
|
|
836
|
-
export { Button, ButtonColorTheme, ButtonGroup, ButtonGroupProps, ButtonProps, Card, CardProps, Checkbox, CheckboxProps, ClosableButton, ClosableButtonProps, ClosableItem, ClosableItemProps, Collapsible, CollapsibleCard, CollapsibleCardProps, CollapsibleProps, ColorTheme, ComponentSize, ComponentSizeMediumLarge, ComponentSizeSmallMedium, ComponentSizeSmallMediumLarge, DateInput, DateInputProps, DatePicker, DatePickerProps, DateRangePicker, DateRangePickerProps, DateRangeValue, DateValue, Dropdown, DropdownProps, FileUpload, FileUploadProps, FileWithPreview, GlobalStyles, Heading, HeadingProps, HeadingSizes, HorizontalDivider, HorizontalDividerProps, Icon, IconAlignment, IconProps, IconType, Label, LabelProps, Link, LinkButton, LinkButtonProps, LinkProps, Menu, MenuDivider, MenuItem, MenuItemProps, MenuProps, MultiSlider, MultiSliderProps, MultiSliderValue, Notice, NoticeProps, Paragraph, ParagraphProps, PhoenixIcons, PhoenixIconsColored, PhoenixIconsColoredSrc, PhoenixIconsOutlined, PhoenixIconsOutlinedSrc, PhoenixIconsSrc, Radio, RadioProps, Select, SelectNative, SelectNativeProps, SelectOption, SelectPicker, SelectPickerOption, SelectPickerProps, SelectProps, Slider, SliderProps, SliderValue, Spacer, SpacerProps, Spacing, Spinner, SpinnerProps, Tab, TabFunctionProps, TabList, TabListProps, TabProps, Tag, TagProps, Text, TextArea, TextAreaProps, TextColor, TextInput, TextInputProps, TextProps, prefixedTheme as Theme, TimezonePicker, TimezonePickerProps, Tooltip, TooltipProps, getOptions as getTimezoneOptions };
|
|
870
|
+
export { Box, BoxProps, Button, ButtonColorTheme, ButtonGroup, ButtonGroupProps, ButtonProps, Card, CardProps, Checkbox, CheckboxProps, ClosableButton, ClosableButtonProps, ClosableItem, ClosableItemProps, Collapsible, CollapsibleCard, CollapsibleCardProps, CollapsibleProps, ColorTheme, ComponentSize, ComponentSizeMediumLarge, ComponentSizeSmallMedium, ComponentSizeSmallMediumLarge, DateInput, DateInputProps, DatePicker, DatePickerProps, DateRangePicker, DateRangePickerProps, DateRangeValue, DateValue, Dropdown, DropdownProps, FileUpload, FileUploadProps, FileWithPreview, Flex, GlobalStyles, Grid, Heading, HeadingProps, HeadingSizes, HorizontalDivider, HorizontalDividerProps, Icon, IconAlignment, IconProps, IconType, Label, LabelProps, Link, LinkButton, LinkButtonProps, LinkProps, Menu, MenuDivider, MenuItem, MenuItemProps, MenuProps, Modal, ModalProps, MultiSlider, MultiSliderProps, MultiSliderValue, Notice, NoticeProps, Paragraph, ParagraphProps, PhoenixIcons, PhoenixIconsColored, PhoenixIconsColoredSrc, PhoenixIconsOutlined, PhoenixIconsOutlinedSrc, PhoenixIconsSrc, Radio, RadioProps, Select, SelectNative, SelectNativeProps, SelectOption, SelectPicker, SelectPickerOption, SelectPickerProps, SelectProps, Slider, SliderProps, SliderValue, Spacer, SpacerProps, Spacing, Spinner, SpinnerProps, Tab, TabFunctionProps, TabList, TabListProps, TabProps, Tag, TagProps, Text, TextArea, TextAreaProps, TextColor, TextInput, TextInputProps, TextProps, prefixedTheme as Theme, TimezonePicker, TimezonePickerProps, Tooltip, TooltipProps, getOptions as getTimezoneOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purple/phoenix-components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/bundle.umd.js",
|
|
6
6
|
"module": "dist/bundle.esm.js",
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
"react-inlinesvg": "~2.3.0",
|
|
61
61
|
"react-pdf": "~5.3.2",
|
|
62
62
|
"react-select": "~4.3.1",
|
|
63
|
-
"react-tabs": "~3.2.2"
|
|
63
|
+
"react-tabs": "~3.2.2",
|
|
64
|
+
"styled-system": "~5.1.5"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
66
67
|
"react": ">=16.3",
|
|
@@ -130,7 +131,6 @@
|
|
|
130
131
|
"standard-version": "^9.3.0",
|
|
131
132
|
"storybook-addon-designs": "^6.0.0",
|
|
132
133
|
"styled-components": "^5.3.0",
|
|
133
|
-
"styled-system": "^5.1.5",
|
|
134
134
|
"ts-transformer-keys": "^0.4.3",
|
|
135
135
|
"tslib": "^2.2.0",
|
|
136
136
|
"typescript": "~4.2.2",
|