@purple/phoenix-components 5.28.0 → 5.28.2

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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import React$1, { HTMLAttributes, JSX, PropsWithChildren, ReactElement, InputHTMLAttributes, FocusEventHandler, JSXElementConstructor, MouseEventHandler, TextareaHTMLAttributes } from 'react';
3
2
  import * as styled_components from 'styled-components';
4
3
  import { DefaultTheme, IntrinsicElementsKeys } from 'styled-components';
@@ -22,7 +21,7 @@ type CSSColor = string & {};
22
21
 
23
22
  declare const Spacing: readonly ["3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl"];
24
23
  type Spacing = typeof Spacing[number];
25
- declare const isSpacing: (size?: Spacing | CSSValue) => size is "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
24
+ declare const isSpacing: (size?: Spacing | CSSValue) => size is Spacing;
26
25
  declare const getSpacingCssValue: (theme: DefaultTheme, value?: Spacing | CSSValue, defaultValue?: string) => string;
27
26
 
28
27
  interface MarginProps {
@@ -47,15 +46,15 @@ interface PaddingProps {
47
46
 
48
47
  declare const ColorTheme: readonly ["brand", "success", "warning", "error", "info", "neutral"];
49
48
  type ColorTheme = typeof ColorTheme[number];
50
- declare const isColorTheme: (color?: Color) => color is "brand" | "success" | "warning" | "error" | "info" | "neutral";
49
+ declare const isColorTheme: (color?: Color) => color is ColorTheme;
51
50
  declare const TextColor: readonly ["primary", "secondary", "tertiary", "quaternary"];
52
51
  type TextColor = typeof TextColor[number];
53
- declare const isTextColor: (color?: Color) => color is "primary" | "secondary" | "tertiary" | "quaternary";
52
+ declare const isTextColor: (color?: Color) => color is TextColor;
54
53
  type Color = TextColor | ColorTheme | CSSColor;
55
54
 
56
55
  declare const Sizing: readonly ["xs", "sm", "md", "lg"];
57
56
  type Sizing = typeof Sizing[number];
58
- declare const isSizing: (size?: Sizing | CSSValue) => size is "xs" | "sm" | "md" | "lg";
57
+ declare const isSizing: (size?: Sizing | CSSValue) => size is Sizing;
59
58
  declare const SizingSmMd: readonly ["sm", "md"];
60
59
  type SizingSmMd = typeof SizingSmMd[number];
61
60
  declare const SizingMdLg: readonly ["md", "lg"];
@@ -330,11 +329,11 @@ declare const PhoenixIconsSrc: {
330
329
  readonly withdrawal: string;
331
330
  readonly wrench: string;
332
331
  };
333
- declare const PhoenixIconsOutlined: ("search" | "filter" | "revert" | "actions" | "add" | "add-circle" | "android" | "angled-arrow-left" | "angled-arrow-right" | "apple" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-right-up" | "arrow-switch" | "arrow-up" | "asterisk" | "bell" | "bitcoin-circle" | "block" | "browser" | "bullet-point" | "burger" | "calculator" | "calendar" | "camera" | "chart-bar-increase" | "chat" | "check" | "check-circle" | "clock" | "clock-idle" | "cog" | "contrast" | "copy" | "cross" | "deposit" | "document" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "dots-handle-reorder" | "download" | "driving-licence" | "edit" | "ellipsis" | "email" | "exclamation" | "exit" | "external" | "eye" | "eye-hidden" | "forward-arrow" | "globe" | "gift" | "history" | "house" | "id-card" | "info-circle" | "key" | "language" | "later" | "lightning" | "list" | "lock" | "paper" | "passport" | "pencil" | "photo-user" | "pin" | "play-circle" | "profile" | "question-circle" | "refresh" | "refund" | "scales" | "search-plus" | "share-social" | "sliders" | "smartphone" | "speedometer" | "star" | "star-circle" | "stopwatch" | "subtract-circle" | "times-circle" | "transfer" | "trash" | "upload" | "windows" | "withdrawal" | "wrench")[];
332
+ declare const PhoenixIconsOutlined: PhoenixIconsOutlined[];
334
333
  type PhoenixIconsOutlined = keyof typeof PhoenixIconsOutlinedSrc;
335
- declare const PhoenixIconsColored: ("bell-brand" | "browser-brand" | "calendar-brand" | "camera-brand" | "contrast-brand" | "driving-licence-brand" | "email-brand" | "exclamation-error" | "exclamation-warning" | "house-brand" | "id-card-brand" | "key-brand" | "language-brand" | "lock-brand" | "lock-success" | "paper-brand" | "passport-brand" | "photo-user-brand" | "pin-brand" | "question-circle-brand" | "smartphone-brand" | "star-brand" | "star-warning" | "trash-error")[];
334
+ declare const PhoenixIconsColored: PhoenixIconsColored[];
336
335
  type PhoenixIconsColored = keyof typeof PhoenixIconsColoredSrc;
337
- declare const PhoenixIcons: ("search" | "filter" | "revert" | "actions" | "add" | "add-circle" | "android" | "angled-arrow-left" | "angled-arrow-right" | "apple" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-right-up" | "arrow-switch" | "arrow-up" | "asterisk" | "bell" | "bitcoin-circle" | "block" | "browser" | "bullet-point" | "burger" | "calculator" | "calendar" | "camera" | "chart-bar-increase" | "chat" | "check" | "check-circle" | "clock" | "clock-idle" | "cog" | "contrast" | "copy" | "cross" | "deposit" | "document" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "dots-handle-reorder" | "download" | "driving-licence" | "edit" | "ellipsis" | "email" | "exclamation" | "exit" | "external" | "eye" | "eye-hidden" | "forward-arrow" | "globe" | "gift" | "history" | "house" | "id-card" | "info-circle" | "key" | "language" | "later" | "lightning" | "list" | "lock" | "paper" | "passport" | "pencil" | "photo-user" | "pin" | "play-circle" | "profile" | "question-circle" | "refresh" | "refund" | "scales" | "search-plus" | "share-social" | "sliders" | "smartphone" | "speedometer" | "star" | "star-circle" | "stopwatch" | "subtract-circle" | "times-circle" | "transfer" | "trash" | "upload" | "windows" | "withdrawal" | "wrench" | "bell-brand" | "browser-brand" | "calendar-brand" | "camera-brand" | "contrast-brand" | "driving-licence-brand" | "email-brand" | "exclamation-error" | "exclamation-warning" | "house-brand" | "id-card-brand" | "key-brand" | "language-brand" | "lock-brand" | "lock-success" | "paper-brand" | "passport-brand" | "photo-user-brand" | "pin-brand" | "question-circle-brand" | "smartphone-brand" | "star-brand" | "star-warning" | "trash-error")[];
336
+ declare const PhoenixIcons: PhoenixIcons[];
338
337
  type PhoenixIcons = keyof typeof PhoenixIconsSrc;
339
338
 
340
339
  type IconType = PhoenixIconsOutlined | React.ReactElement | string;
@@ -352,8 +351,9 @@ interface CommonButtonProps extends MarginProps {
352
351
 
353
352
  interface ButtonProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'color'>, CommonButtonProps, GenericComponentProps {
354
353
  light?: boolean;
354
+ ref?: React$1.Ref<HTMLButtonElement>;
355
355
  }
356
- declare const Button: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ButtonProps> & React$1.RefAttributes<HTMLButtonElement>>;
356
+ declare const Button: React$1.FC<ButtonProps>;
357
357
 
358
358
  interface ButtonGroupProps extends GenericComponentProps {
359
359
  children: JSX.Element[];
@@ -386,8 +386,9 @@ declare const Checkbox: React$1.FC<CheckboxProps>;
386
386
 
387
387
  interface ClosableButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, GenericComponentProps {
388
388
  onClose?: React$1.MouseEventHandler<HTMLButtonElement>;
389
+ ref?: React$1.Ref<HTMLButtonElement>;
389
390
  }
390
- declare const ClosableButton: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<ClosableButtonProps> & React$1.RefAttributes<HTMLButtonElement>>;
391
+ declare const ClosableButton: React$1.FC<ClosableButtonProps>;
391
392
 
392
393
  interface ClosableItemProps extends GenericComponentProps {
393
394
  onClose?: React$1.MouseEventHandler<HTMLButtonElement>;
@@ -570,8 +571,9 @@ interface IconProps extends MarginProps, GenericComponentProps {
570
571
  icon: PhoenixIcons;
571
572
  size?: Spacing | CSSValue;
572
573
  color?: Color;
574
+ ref?: React$1.Ref<HTMLSpanElement>;
573
575
  }
574
- declare const Icon: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<IconProps> & React$1.RefAttributes<HTMLSpanElement>>;
576
+ declare const Icon: React$1.FC<IconProps>;
575
577
 
576
578
  interface ImageProps extends Omit<React$1.ImgHTMLAttributes<HTMLImageElement>, 'width' | 'height'>, MarginProps, PaddingProps, DisplayProps, GenericComponentProps {
577
579
  width?: CSSValue;
@@ -590,13 +592,15 @@ interface LinkProps extends React$1.AnchorHTMLAttributes<HTMLAnchorElement>, Gen
590
592
  color?: Color;
591
593
  bold?: boolean;
592
594
  noUnderline?: boolean;
595
+ ref?: React$1.Ref<HTMLAnchorElement>;
593
596
  }
594
- declare const Link: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<LinkProps> & React$1.RefAttributes<HTMLAnchorElement>>;
597
+ declare const Link: React$1.FC<LinkProps>;
595
598
 
596
599
  interface LinkButtonProps extends React$1.AnchorHTMLAttributes<HTMLAnchorElement>, CommonButtonProps, GenericComponentProps {
597
600
  light?: boolean;
601
+ ref?: React$1.Ref<HTMLAnchorElement>;
598
602
  }
599
- declare const LinkButton: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<LinkButtonProps> & React$1.RefAttributes<HTMLAnchorElement>>;
603
+ declare const LinkButton: React$1.FC<LinkButtonProps>;
600
604
 
601
605
  interface ListCommonProps {
602
606
  size?: Sizing | CSSValue;
@@ -736,11 +740,14 @@ interface ParagraphProps extends CommonTextProps<HTMLParagraphElement>, PaddingP
736
740
  declare const Paragraph: React$1.FC<ParagraphProps>;
737
741
 
738
742
  interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, FormControlProps {
743
+ ref?: React$1.Ref<HTMLInputElement>;
739
744
  }
740
- declare const TextInput: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<TextInputProps> & React$1.RefAttributes<HTMLInputElement>>;
745
+ declare const TextInput: React$1.FC<TextInputProps>;
741
746
 
742
- type PasswordInputProps = Omit<TextInputProps, 'type' | 'contentRight'>;
743
- declare const PasswordInput: React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<PasswordInputProps> & React$1.RefAttributes<HTMLInputElement>>;
747
+ interface PasswordInputProps extends Omit<TextInputProps, 'type' | 'contentRight'> {
748
+ ref?: React$1.Ref<HTMLInputElement>;
749
+ }
750
+ declare const PasswordInput: React$1.FC<PasswordInputProps>;
744
751
 
745
752
  declare enum PasswordStrengthEnum {
746
753
  NONE = "none",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purple/phoenix-components",
3
- "version": "5.28.0",
3
+ "version": "5.28.2",
4
4
  "description": "",
5
5
  "main": "dist/bundle.umd.js",
6
6
  "module": "dist/bundle.esm.js",
@@ -40,7 +40,7 @@
40
40
  "lodash": "~4.17.21",
41
41
  "nanoid": "~3.3.4",
42
42
  "nouislider": "~15.7.2",
43
- "react-day-picker": "~8.7.1",
43
+ "react-day-picker": "~8.10.1",
44
44
  "react-dropzone": "~14.3.8",
45
45
  "react-inlinesvg": "~3.0.1",
46
46
  "react-pdf": "~8.0.2",
@@ -135,7 +135,7 @@
135
135
  "ts-node": "^10.9.1",
136
136
  "tslib": "^2.6.2",
137
137
  "tsx": "^4.20.3",
138
- "typescript": "^4.8.4"
138
+ "typescript": "^5.7.2"
139
139
  },
140
140
  "scripts": {
141
141
  "lint": "eslint 'src' '.storybook' --ext .ts,.tsx,.js,.jsx,.json,.d.ts",