@purple/phoenix-components 4.29.0 → 4.32.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
@@ -3,6 +3,7 @@ import React__default, { HTMLAttributes, ReactElement, InputHTMLAttributes, JSXE
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, BorderProps } from 'styled-system';
6
+ import * as CSS from 'csstype';
6
7
  import { DayPickerProps } from 'react-day-picker';
7
8
  import { Props } from 'tippy.js';
8
9
  import { OptionTypeBase, NamedProps } from 'react-select';
@@ -39,8 +40,6 @@ interface PaddingProps {
39
40
 
40
41
  declare const ColorTheme: readonly ["primary", "success", "warning", "error", "info", "neutral"];
41
42
  declare type ColorTheme = typeof ColorTheme[number];
42
- declare const ButtonColorTheme: readonly ["primary", "success", "error", "neutral"];
43
- declare type ButtonColorTheme = typeof ButtonColorTheme[number];
44
43
 
45
44
  declare const TextAlignment: readonly ["left", "center", "right", "justify"];
46
45
  declare type TextAlignment = typeof TextAlignment[number];
@@ -57,7 +56,13 @@ interface TextAlignProp {
57
56
  textAlign?: TextAlignment;
58
57
  }
59
58
 
60
- interface BoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>, LayoutProps, FlexboxProps, GridProps, MarginProps, PaddingProps, BackgroundColorProps, BackgroundProps, OpacityProps, PositionProps, TextAlignProp, BorderProps, GenericComponentProps {
59
+ interface GapProps {
60
+ gap?: CSS.Property.Gap;
61
+ rowGap?: Spacing | string | number;
62
+ columnGap?: Spacing | string | number;
63
+ }
64
+
65
+ interface BoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>, LayoutProps, FlexboxProps, GridProps, MarginProps, PaddingProps, BackgroundColorProps, BackgroundProps, OpacityProps, PositionProps, TextAlignProp, BorderProps, GenericComponentProps, GapProps {
61
66
  element?: IntrinsicElementsKeys;
62
67
  }
63
68
  declare const Box: React__default.FC<BoxProps>;
@@ -280,7 +285,7 @@ declare type PhoenixIcons = keyof typeof PhoenixIconsSrc;
280
285
  declare type IconType = PhoenixIconsOutlined | React.ReactElement | string;
281
286
 
282
287
  interface CommonButtonProps extends MarginProps {
283
- colorTheme?: ButtonColorTheme;
288
+ colorTheme?: ColorTheme;
284
289
  size?: ComponentSize;
285
290
  minimal?: boolean;
286
291
  light?: boolean;
@@ -311,7 +316,7 @@ declare type FormControlErrorType = ReactElement | string | boolean;
311
316
 
312
317
  interface CheckboxRadioCommonProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, GenericComponentProps {
313
318
  RTL?: boolean;
314
- colorTheme?: ButtonColorTheme;
319
+ colorTheme?: ColorTheme;
315
320
  size?: ComponentSizeMediumLarge;
316
321
  label?: React__default.ReactNode;
317
322
  warning?: FormControlWarningType;
@@ -352,9 +357,9 @@ interface InputLabels {
352
357
  year: string;
353
358
  }
354
359
  interface DateValue {
355
- day: string;
360
+ day: number;
356
361
  month: number;
357
- year: string;
362
+ year: number;
358
363
  }
359
364
  interface DateInputProps extends GenericComponentProps {
360
365
  value: DateValue | null;
@@ -532,6 +537,11 @@ declare const MultiSlider: React__default.FC<MultiSliderProps>;
532
537
  interface NoticeProps extends GenericComponentProps, MarginProps, PaddingProps {
533
538
  colorTheme?: ColorTheme;
534
539
  buttonText?: string;
540
+ buttonLoading?: boolean;
541
+ buttonIcon?: IconType;
542
+ buttonIconAlignment?: IconAlignment;
543
+ buttonTestId?: string;
544
+ closeTestId?: string;
535
545
  onClick?: (event: React__default.MouseEvent) => void;
536
546
  onClose?: (event: React__default.MouseEvent) => void;
537
547
  breakpoint?: number;
@@ -555,8 +565,8 @@ interface FormControlProps extends GenericComponentProps {
555
565
  interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'onChange'>, FormControlProps {
556
566
  value: number | null;
557
567
  onChange: (value: number | null) => void;
558
- numberFormatErrorMessage: string;
559
- maxDecimalCount: number;
568
+ numberFormatErrorMessage?: string;
569
+ maxDecimalCount?: number;
560
570
  }
561
571
  declare const NumberInput: React__default.FC<NumberInputProps>;
562
572
 
@@ -609,7 +619,7 @@ interface SelectPickerProps extends GenericComponentProps {
609
619
  warning?: string;
610
620
  onMouseOver?: (event: React__default.MouseEvent) => void;
611
621
  onMouseLeave?: (event: React__default.MouseEvent) => void;
612
- colorTheme?: ButtonColorTheme;
622
+ colorTheme?: ColorTheme;
613
623
  size?: ComponentSizeMediumLarge;
614
624
  imageSize?: string;
615
625
  }
@@ -665,7 +675,7 @@ declare const TabList: React__default.FC<TabListProps> & {
665
675
  tabsRole: 'TabList';
666
676
  };
667
677
 
668
- interface TagProps extends GenericComponentProps {
678
+ interface TagProps extends GenericComponentProps, MarginProps {
669
679
  colorTheme?: ColorTheme;
670
680
  size?: ComponentSizeSmallMedium;
671
681
  }
@@ -736,11 +746,21 @@ declare const prefixedTheme: {
736
746
  };
737
747
  warning: {
738
748
  dark: string;
749
+ darkHoverBackground: string;
750
+ darkDisabledBackground: string;
739
751
  light: string;
752
+ lightHoverBackground: string;
753
+ lightDisabledBackground: string;
754
+ lightDisabledColor: string;
740
755
  };
741
756
  info: {
742
757
  dark: string;
758
+ darkHoverBackground: string;
759
+ darkDisabledBackground: string;
743
760
  light: string;
761
+ lightHoverBackground: string;
762
+ lightDisabledBackground: string;
763
+ lightDisabledColor: string;
744
764
  };
745
765
  gray: {
746
766
  _0: string;
@@ -944,4 +964,4 @@ declare const prefixedTheme: {
944
964
 
945
965
  declare const GlobalStyles: styled_components.GlobalStyleComponent<{}, styled_components.DefaultTheme>;
946
966
 
947
- 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, List, ListItem, ListItemProps, ListProps, 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 };
967
+ export { Box, BoxProps, Button, 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, List, ListItem, ListItemProps, ListProps, 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@purple/phoenix-components",
3
- "version": "4.29.0",
3
+ "version": "4.32.0",
4
4
  "description": "",
5
5
  "main": "dist/bundle.umd.js",
6
6
  "module": "dist/bundle.esm.js",