@purple/phoenix-components 4.20.1 → 4.22.1
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 +29 -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 +27 -16
- package/package.json +20 -26
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { HTMLAttributes,
|
|
2
|
+
import React__default, { HTMLAttributes, ReactElement, InputHTMLAttributes, JSXElementConstructor, MouseEventHandler, FocusEventHandler, TextareaHTMLAttributes } from 'react';
|
|
3
3
|
import * as styled_components from 'styled-components';
|
|
4
4
|
import { IntrinsicElementsKeys } from 'styled-components';
|
|
5
5
|
import { LayoutProps, FlexboxProps, GridProps, BackgroundColorProps, BackgroundProps, OpacityProps, PositionProps } from 'styled-system';
|
|
@@ -242,11 +242,11 @@ declare const PhoenixIconsSrc: {
|
|
|
242
242
|
readonly withdrawal: string;
|
|
243
243
|
readonly wrench: string;
|
|
244
244
|
};
|
|
245
|
-
declare const PhoenixIconsOutlined: ("filter" | "
|
|
245
|
+
declare const PhoenixIconsOutlined: ("filter" | "search" | "revert" | "document" | "list" | "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")[];
|
|
246
246
|
declare type PhoenixIconsOutlined = keyof typeof PhoenixIconsOutlinedSrc;
|
|
247
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")[];
|
|
248
248
|
declare type PhoenixIconsColored = keyof typeof PhoenixIconsColoredSrc;
|
|
249
|
-
declare const PhoenixIcons: ("filter" | "
|
|
249
|
+
declare const PhoenixIcons: ("filter" | "search" | "revert" | "document" | "list" | "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")[];
|
|
250
250
|
declare type PhoenixIcons = keyof typeof PhoenixIconsSrc;
|
|
251
251
|
|
|
252
252
|
declare type IconType = PhoenixIconsOutlined | React.ReactElement | string;
|
|
@@ -278,11 +278,16 @@ interface CardProps extends PaddingProps, MarginProps, GenericComponentProps {
|
|
|
278
278
|
}
|
|
279
279
|
declare const Card: React__default.FC<CardProps>;
|
|
280
280
|
|
|
281
|
+
declare type FormControlWarningType = ReactElement | string;
|
|
282
|
+
declare type FormControlErrorType = ReactElement | string | boolean;
|
|
283
|
+
|
|
281
284
|
interface CheckboxRadioCommonProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, GenericComponentProps {
|
|
282
285
|
RTL?: boolean;
|
|
283
286
|
colorTheme?: ButtonColorTheme;
|
|
284
287
|
size?: ComponentSizeMediumLarge;
|
|
285
288
|
label?: React__default.ReactNode;
|
|
289
|
+
warning?: FormControlWarningType;
|
|
290
|
+
error?: FormControlErrorType;
|
|
286
291
|
}
|
|
287
292
|
|
|
288
293
|
declare type CheckboxProps = CheckboxRadioCommonProps;
|
|
@@ -309,9 +314,6 @@ interface CollapsibleCardProps extends CardProps, GenericComponentProps {
|
|
|
309
314
|
}
|
|
310
315
|
declare const CollapsibleCard: React$1.FC<CollapsibleCardProps>;
|
|
311
316
|
|
|
312
|
-
declare type FormControlWarningType = ReactElement | string;
|
|
313
|
-
declare type FormControlErrorType = ReactElement | string | boolean;
|
|
314
|
-
|
|
315
317
|
interface Month {
|
|
316
318
|
value: number;
|
|
317
319
|
label: string;
|
|
@@ -452,11 +454,12 @@ declare const MenuItem: React__default.FC<MenuItemProps>;
|
|
|
452
454
|
|
|
453
455
|
interface ModalProps extends GenericComponentProps, PaddingProps, MarginProps {
|
|
454
456
|
open: boolean;
|
|
455
|
-
onClose
|
|
457
|
+
onClose?: () => void;
|
|
456
458
|
showCloseButton?: boolean;
|
|
457
459
|
size?: ComponentSize;
|
|
458
460
|
animate?: boolean;
|
|
459
461
|
center?: boolean;
|
|
462
|
+
closeOnOverlayClick?: boolean;
|
|
460
463
|
}
|
|
461
464
|
declare const Modal: React__default.FC<ModalProps>;
|
|
462
465
|
|
|
@@ -488,14 +491,6 @@ interface NoticeProps extends GenericComponentProps, MarginProps, PaddingProps {
|
|
|
488
491
|
}
|
|
489
492
|
declare const Notice: React__default.FC<NoticeProps>;
|
|
490
493
|
|
|
491
|
-
interface ParagraphProps extends CommonTextProps<HTMLParagraphElement>, PaddingProps, MarginProps {
|
|
492
|
-
size?: ComponentSizeSmallMediumLarge | string | number;
|
|
493
|
-
}
|
|
494
|
-
declare const Paragraph: React__default.FC<ParagraphProps>;
|
|
495
|
-
|
|
496
|
-
declare type RadioProps = CheckboxRadioCommonProps;
|
|
497
|
-
declare const Radio: React__default.VoidFunctionComponent<RadioProps>;
|
|
498
|
-
|
|
499
494
|
interface FormControlProps extends GenericComponentProps {
|
|
500
495
|
label?: string;
|
|
501
496
|
success?: boolean;
|
|
@@ -510,6 +505,22 @@ interface FormControlProps extends GenericComponentProps {
|
|
|
510
505
|
minimal?: boolean;
|
|
511
506
|
}
|
|
512
507
|
|
|
508
|
+
interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'onChange'>, FormControlProps {
|
|
509
|
+
value: number | null;
|
|
510
|
+
onChange: (value: number | null) => void;
|
|
511
|
+
numberFormatErrorMessage: string;
|
|
512
|
+
maxDecimalCount: number;
|
|
513
|
+
}
|
|
514
|
+
declare const NumberInput: React__default.FC<NumberInputProps>;
|
|
515
|
+
|
|
516
|
+
interface ParagraphProps extends CommonTextProps<HTMLParagraphElement>, PaddingProps, MarginProps {
|
|
517
|
+
size?: ComponentSizeSmallMediumLarge | string | number;
|
|
518
|
+
}
|
|
519
|
+
declare const Paragraph: React__default.FC<ParagraphProps>;
|
|
520
|
+
|
|
521
|
+
declare type RadioProps = CheckboxRadioCommonProps;
|
|
522
|
+
declare const Radio: React__default.VoidFunctionComponent<RadioProps>;
|
|
523
|
+
|
|
513
524
|
interface CommonSelectProps extends FormControlProps {
|
|
514
525
|
name?: string;
|
|
515
526
|
options?: SelectOption[];
|
|
@@ -885,4 +896,4 @@ declare const prefixedTheme: {
|
|
|
885
896
|
|
|
886
897
|
declare const GlobalStyles: styled_components.GlobalStyleComponent<{}, styled_components.DefaultTheme>;
|
|
887
898
|
|
|
888
|
-
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 };
|
|
899
|
+
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, NumberInput, NumberInputProps, 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,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purple/phoenix-components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/bundle.umd.js",
|
|
6
6
|
"module": "dist/bundle.esm.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": ">=
|
|
10
|
+
"node": ">=12"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"dist"
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"release:feature": "standard-version && git push --follow-tags",
|
|
41
41
|
"release:publish": "npm run build && npm publish --access public && npm run deploy-storybook",
|
|
42
42
|
"deploy-storybook": "npm run storybook:build && cp -r .circleci storybook-static && storybook-to-ghpages -e=storybook-static",
|
|
43
|
-
"snapshot": "build-storybook -c .storybook && percy
|
|
43
|
+
"snapshot": "build-storybook -c .storybook && percy storybook ./storybook-static",
|
|
44
|
+
"percy": "if [[ $(git rev-parse --symbolic-full-name --abbrev-ref HEAD) != \"master\" ]]; then percy storybook ./storybook-static; else echo \"ERROR: percy should not be run on master because these snapshots are auto-approved\"; fi;",
|
|
44
45
|
"test": "jest"
|
|
45
46
|
},
|
|
46
47
|
"lint-staged": {
|
|
@@ -69,32 +70,30 @@
|
|
|
69
70
|
"styled-components": "^5.1.0"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
72
|
-
"@babel/cli": "^7.4.4",
|
|
73
73
|
"@babel/core": "^7.4.4",
|
|
74
74
|
"@babel/preset-env": "^7.4.4",
|
|
75
75
|
"@babel/preset-react": "^7.0.0",
|
|
76
76
|
"@babel/preset-typescript": "^7.15.0",
|
|
77
|
-
"@commitlint/cli": "^
|
|
78
|
-
"@commitlint/config-conventional": "^
|
|
79
|
-
"@percy/
|
|
77
|
+
"@commitlint/cli": "^16.0.0",
|
|
78
|
+
"@commitlint/config-conventional": "^16.0.0",
|
|
79
|
+
"@percy/cli": "^1.0.0-beta.71",
|
|
80
|
+
"@percy/storybook": "^4.1.0",
|
|
80
81
|
"@pxblue/storybook-rtl-addon": "^1.0.1",
|
|
81
82
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
82
83
|
"@rollup/plugin-typescript": "^8.2.1",
|
|
83
84
|
"@rollup/plugin-url": "^6.0.0",
|
|
84
|
-
"@storybook/addon-a11y": "^6.
|
|
85
|
-
"@storybook/addon-docs": "^6.
|
|
86
|
-
"@storybook/addon-essentials": "^6.
|
|
87
|
-
"@storybook/addon-links": "^6.
|
|
88
|
-
"@storybook/addon-viewport": "^6.
|
|
89
|
-
"@storybook/
|
|
90
|
-
"@storybook/react": "^6.3.8",
|
|
85
|
+
"@storybook/addon-a11y": "^6.4.12",
|
|
86
|
+
"@storybook/addon-docs": "^6.4.12",
|
|
87
|
+
"@storybook/addon-essentials": "^6.4.12",
|
|
88
|
+
"@storybook/addon-links": "^6.4.12",
|
|
89
|
+
"@storybook/addon-viewport": "^6.4.12",
|
|
90
|
+
"@storybook/react": "^6.4.12",
|
|
91
91
|
"@storybook/storybook-deployer": "^2.8.10",
|
|
92
92
|
"@testing-library/jest-dom": "^5.14.1",
|
|
93
93
|
"@testing-library/react": "^12.1.2",
|
|
94
94
|
"@types/countries-and-timezones": "^2.0.3",
|
|
95
95
|
"@types/jest": "^27.0.2",
|
|
96
96
|
"@types/lodash.isequal": "^4.5.5",
|
|
97
|
-
"@types/node": "^12.7.2",
|
|
98
97
|
"@types/react": "^17.0.6",
|
|
99
98
|
"@types/react-dom": "^17.0.5",
|
|
100
99
|
"@types/react-select": "^4.0.15",
|
|
@@ -103,37 +102,32 @@
|
|
|
103
102
|
"@types/styled-system": "^5.1.13",
|
|
104
103
|
"@typescript-eslint/eslint-plugin": "^4.8.2",
|
|
105
104
|
"@typescript-eslint/parser": "^4.8.2",
|
|
106
|
-
"awesome-typescript-loader": "^5.2.1",
|
|
107
105
|
"babel-core": "^7.0.0-bridge.0",
|
|
108
106
|
"babel-loader": "^8.0.5",
|
|
109
|
-
"coveralls": "^3.0.2",
|
|
110
107
|
"eslint": "^7.27.0",
|
|
111
108
|
"eslint-config-prettier": "^8.3.0",
|
|
112
|
-
"eslint-plugin-prettier": "^
|
|
109
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
113
110
|
"eslint-plugin-react": "^7.23.2",
|
|
114
111
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
115
112
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
116
113
|
"formik": "^2.1.4",
|
|
117
114
|
"husky": "^7.0.1",
|
|
118
115
|
"jest": "^27.2.4",
|
|
119
|
-
"lint-staged": "^
|
|
116
|
+
"lint-staged": "^12.0.0",
|
|
120
117
|
"prettier": "2.3.2",
|
|
121
118
|
"react": "^17.0.2",
|
|
122
119
|
"react-docgen-typescript-loader": "^3.1.1",
|
|
123
120
|
"react-dom": "^17.0.2",
|
|
124
|
-
"rimraf": "^
|
|
125
|
-
"rollup": "^2.
|
|
126
|
-
"rollup-plugin-dts": "^
|
|
121
|
+
"rimraf": "^3.0.0",
|
|
122
|
+
"rollup": "^2.63.0",
|
|
123
|
+
"rollup-plugin-dts": "^4.0.0",
|
|
127
124
|
"rollup-plugin-peer-deps-external": "^2.2.0",
|
|
128
125
|
"rollup-plugin-styles": "^3.14.1",
|
|
129
|
-
"rollup-plugin-svg-import": "^1.5.1",
|
|
130
126
|
"rollup-plugin-terser": "^7.0.2",
|
|
131
127
|
"standard-version": "^9.3.0",
|
|
132
128
|
"storybook-addon-designs": "^6.0.0",
|
|
133
129
|
"styled-components": "^5.3.0",
|
|
134
|
-
"ts-transformer-keys": "^0.4.3",
|
|
135
130
|
"tslib": "^2.2.0",
|
|
136
|
-
"typescript": "
|
|
137
|
-
"webpack-cli": "^3.3.1"
|
|
131
|
+
"typescript": "^4.5.4"
|
|
138
132
|
}
|
|
139
133
|
}
|