@purple/phoenix-components 4.19.1 → 4.21.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { HTMLAttributes, InputHTMLAttributes, ReactElement, JSXElementConstructor, MouseEventHandler, FocusEventHandler, TextareaHTMLAttributes } from 'react';
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" | "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")[];
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" | "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")[];
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: () => void;
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
 
@@ -507,6 +510,7 @@ interface FormControlProps extends GenericComponentProps {
507
510
  size?: ComponentSize;
508
511
  disabled?: boolean;
509
512
  focused?: boolean;
513
+ minimal?: boolean;
510
514
  }
511
515
 
512
516
  interface CommonSelectProps extends FormControlProps {
@@ -712,6 +716,11 @@ declare const prefixedTheme: {
712
716
  };
713
717
  };
714
718
  fontFamily: string;
719
+ fontWeight: {
720
+ regular: number;
721
+ bold: number;
722
+ };
723
+ fontSize: number;
715
724
  borderRadius: {
716
725
  tiny: string;
717
726
  small: string;
@@ -760,6 +769,18 @@ declare const prefixedTheme: {
760
769
  medium: number;
761
770
  large: number;
762
771
  };
772
+ padding: {
773
+ tiny: string;
774
+ small: string;
775
+ medium: string;
776
+ large: string;
777
+ };
778
+ borderRadius: {
779
+ tiny: number;
780
+ small: number;
781
+ medium: number;
782
+ large: number;
783
+ };
763
784
  };
764
785
  card: {
765
786
  default: {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@purple/phoenix-components",
3
- "version": "4.19.1",
3
+ "version": "4.21.0",
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": ">=8"
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-storybook --widths=320,1280",
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": "^12.1.4",
78
- "@commitlint/config-conventional": "^12.1.4",
79
- "@percy/storybook": "^3.3.1",
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.3.8",
85
- "@storybook/addon-docs": "^6.3.8",
86
- "@storybook/addon-essentials": "^6.3.8",
87
- "@storybook/addon-links": "^6.3.9",
88
- "@storybook/addon-viewport": "^6.3.8",
89
- "@storybook/client-api": "^6.3.8",
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": "^3.4.0",
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": "^11.0.0",
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": "^2.6.3",
125
- "rollup": "^2.50.6",
126
- "rollup-plugin-dts": "^3.0.2",
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": "~4.2.2",
137
- "webpack-cli": "^3.3.1"
131
+ "typescript": "^4.5.4"
138
132
  }
139
133
  }