@purple/phoenix-components 5.28.2 → 5.30.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/bundle.cjs.js +306 -185
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +324 -203
- package/dist/bundle.esm.js.map +1 -1
- package/dist/bundle.umd.js +309 -188
- package/dist/bundle.umd.js.map +1 -1
- package/dist/index.d.ts +92 -88
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React$1
|
|
2
|
-
import
|
|
3
|
-
import { DefaultTheme, IntrinsicElementsKeys } from 'styled-components';
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default, { HTMLAttributes, JSX, PropsWithChildren, ReactElement, InputHTMLAttributes, FocusEventHandler, JSXElementConstructor, MouseEventHandler, TextareaHTMLAttributes } from 'react';
|
|
4
3
|
import { LayoutProps, FlexboxProps, GridProps, BackgroundColorProps, BackgroundProps, OpacityProps, PositionProps, BorderProps, DisplayProps } from 'styled-system';
|
|
4
|
+
import * as styled_components from 'styled-components';
|
|
5
|
+
import { DefaultTheme } from 'styled-components';
|
|
5
6
|
import * as CSS from 'csstype';
|
|
6
7
|
import { Props } from 'react-select';
|
|
7
8
|
import { DayPickerSingleProps, DayPickerProps, DayPickerRangeProps } from 'react-day-picker';
|
|
@@ -82,9 +83,9 @@ interface GapProps {
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
interface BoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>, LayoutProps, FlexboxProps, GridProps, MarginProps, PaddingProps, BackgroundColorProps, BackgroundProps, OpacityProps, PositionProps, TextAlignProp, BorderProps, GenericComponentProps, GapProps {
|
|
85
|
-
element?:
|
|
86
|
+
element?: keyof JSX.IntrinsicElements;
|
|
86
87
|
}
|
|
87
|
-
declare const Box:
|
|
88
|
+
declare const Box: React__default.FC<BoxProps>;
|
|
88
89
|
|
|
89
90
|
declare const IconAlignment: readonly ["left", "right"];
|
|
90
91
|
type IconAlignment = typeof IconAlignment[number];
|
|
@@ -349,24 +350,24 @@ interface CommonButtonProps extends MarginProps {
|
|
|
349
350
|
loading?: boolean;
|
|
350
351
|
}
|
|
351
352
|
|
|
352
|
-
interface ButtonProps extends Omit<
|
|
353
|
+
interface ButtonProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, 'color'>, CommonButtonProps, GenericComponentProps {
|
|
353
354
|
light?: boolean;
|
|
354
|
-
ref?:
|
|
355
|
+
ref?: React__default.Ref<HTMLButtonElement>;
|
|
355
356
|
}
|
|
356
|
-
declare const Button:
|
|
357
|
+
declare const Button: React__default.FC<ButtonProps>;
|
|
357
358
|
|
|
358
359
|
interface ButtonGroupProps extends GenericComponentProps {
|
|
359
360
|
children: JSX.Element[];
|
|
360
361
|
dividers?: boolean;
|
|
361
362
|
}
|
|
362
|
-
declare const ButtonGroup:
|
|
363
|
+
declare const ButtonGroup: React__default.FC<ButtonGroupProps>;
|
|
363
364
|
|
|
364
365
|
interface CardProps extends PaddingProps, MarginProps, GenericComponentProps {
|
|
365
366
|
elevated?: boolean;
|
|
366
367
|
disabled?: boolean;
|
|
367
|
-
onClick?:
|
|
368
|
+
onClick?: React__default.MouseEventHandler<HTMLDivElement>;
|
|
368
369
|
}
|
|
369
|
-
declare const Card:
|
|
370
|
+
declare const Card: React__default.FC<PropsWithChildren<CardProps>>;
|
|
370
371
|
|
|
371
372
|
type FormControlWarningType = ReactElement | string;
|
|
372
373
|
type FormControlErrorType = ReactElement | string | boolean;
|
|
@@ -374,7 +375,7 @@ type FormControlErrorType = ReactElement | string | boolean;
|
|
|
374
375
|
interface CheckboxRadioCommonProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, GenericComponentProps {
|
|
375
376
|
colorTheme?: ColorTheme;
|
|
376
377
|
size?: SizingSmMdLg;
|
|
377
|
-
label?:
|
|
378
|
+
label?: React__default.ReactNode;
|
|
378
379
|
warning?: FormControlWarningType;
|
|
379
380
|
error?: FormControlErrorType;
|
|
380
381
|
}
|
|
@@ -382,23 +383,23 @@ interface CheckboxRadioCommonProps extends Omit<InputHTMLAttributes<HTMLInputEle
|
|
|
382
383
|
type CheckboxProps = CheckboxRadioCommonProps & {
|
|
383
384
|
indeterminate?: boolean;
|
|
384
385
|
};
|
|
385
|
-
declare const Checkbox:
|
|
386
|
+
declare const Checkbox: React__default.FC<CheckboxProps>;
|
|
386
387
|
|
|
387
|
-
interface ClosableButtonProps extends
|
|
388
|
-
onClose?:
|
|
389
|
-
ref?:
|
|
388
|
+
interface ClosableButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement>, GenericComponentProps {
|
|
389
|
+
onClose?: React__default.MouseEventHandler<HTMLButtonElement>;
|
|
390
|
+
ref?: React__default.Ref<HTMLButtonElement>;
|
|
390
391
|
}
|
|
391
|
-
declare const ClosableButton:
|
|
392
|
+
declare const ClosableButton: React__default.FC<ClosableButtonProps>;
|
|
392
393
|
|
|
393
394
|
interface ClosableItemProps extends GenericComponentProps {
|
|
394
|
-
onClose?:
|
|
395
|
+
onClose?: React__default.MouseEventHandler<HTMLButtonElement>;
|
|
395
396
|
}
|
|
396
|
-
declare const ClosableItem:
|
|
397
|
+
declare const ClosableItem: React__default.FC<PropsWithChildren<ClosableItemProps>>;
|
|
397
398
|
|
|
398
399
|
interface CollapsibleProps extends GenericComponentProps {
|
|
399
400
|
collapsed: boolean;
|
|
400
401
|
}
|
|
401
|
-
declare const Collapsible:
|
|
402
|
+
declare const Collapsible: React__default.FC<PropsWithChildren<CollapsibleProps>>;
|
|
402
403
|
|
|
403
404
|
interface CollapsibleCardProps extends CardProps, GenericComponentProps {
|
|
404
405
|
heading: ReactElement | string;
|
|
@@ -410,14 +411,14 @@ interface CollapsibleCardProps extends CardProps, GenericComponentProps {
|
|
|
410
411
|
showCard?: boolean;
|
|
411
412
|
iconRotationDeg?: number;
|
|
412
413
|
}
|
|
413
|
-
declare const CollapsibleCard:
|
|
414
|
+
declare const CollapsibleCard: React__default.FC<PropsWithChildren<CollapsibleCardProps>>;
|
|
414
415
|
|
|
415
416
|
interface FormControlProps extends GenericComponentProps {
|
|
416
417
|
label?: string;
|
|
417
418
|
success?: boolean;
|
|
418
419
|
warning?: FormControlWarningType;
|
|
419
420
|
error?: FormControlErrorType;
|
|
420
|
-
contentRight?: string |
|
|
421
|
+
contentRight?: string | React__default.ReactNode;
|
|
421
422
|
helperText?: string;
|
|
422
423
|
size?: Sizing;
|
|
423
424
|
disabled?: boolean;
|
|
@@ -449,14 +450,14 @@ interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, '
|
|
|
449
450
|
numberBelowMinErrorMessage?: string;
|
|
450
451
|
numberAboveMaxErrorMessage?: string;
|
|
451
452
|
}
|
|
452
|
-
declare const NumberInput:
|
|
453
|
+
declare const NumberInput: React__default.FC<NumberInputProps>;
|
|
453
454
|
|
|
454
455
|
interface SelectProps<Option extends SelectOption = SelectOption> extends CommonSelectProps<Option, false> {
|
|
455
456
|
onChange: (option: Option | null) => void;
|
|
456
457
|
value?: Option | null;
|
|
457
458
|
useNativeSelectOnMobile?: boolean;
|
|
458
459
|
}
|
|
459
|
-
declare const Select: <Option extends SelectOption = SelectOption>({ testId, useNativeSelectOnMobile, ...props }: SelectProps<Option>) =>
|
|
460
|
+
declare const Select: <Option extends SelectOption = SelectOption>({ testId, useNativeSelectOnMobile, ...props }: SelectProps<Option>) => React__default.ReactElement;
|
|
460
461
|
|
|
461
462
|
interface InputLabels {
|
|
462
463
|
day: string;
|
|
@@ -485,7 +486,7 @@ interface DateInputProps extends GenericComponentProps {
|
|
|
485
486
|
monthProps?: Omit<SelectProps, 'onChange'>;
|
|
486
487
|
yearProps?: Omit<NumberInputProps, 'value' | 'onChange'>;
|
|
487
488
|
}
|
|
488
|
-
declare const DateInput:
|
|
489
|
+
declare const DateInput: React__default.FC<DateInputProps>;
|
|
489
490
|
|
|
490
491
|
interface DatePickerProps extends DayPickerSingleProps, GenericComponentProps {
|
|
491
492
|
value: Date | null;
|
|
@@ -493,7 +494,7 @@ interface DatePickerProps extends DayPickerSingleProps, GenericComponentProps {
|
|
|
493
494
|
dayPickerProps?: DayPickerProps;
|
|
494
495
|
yearMonthSelect?: boolean;
|
|
495
496
|
}
|
|
496
|
-
declare const DatePicker:
|
|
497
|
+
declare const DatePicker: React__default.FC<DatePickerProps>;
|
|
497
498
|
|
|
498
499
|
interface DateRangeValue {
|
|
499
500
|
from: Date | null;
|
|
@@ -505,13 +506,13 @@ interface DateRangePickerProps extends DayPickerRangeProps, GenericComponentProp
|
|
|
505
506
|
dayPickerProps?: DayPickerProps;
|
|
506
507
|
yearMonthSelect?: boolean;
|
|
507
508
|
}
|
|
508
|
-
declare const DateRangePicker:
|
|
509
|
+
declare const DateRangePicker: React__default.FC<DateRangePickerProps>;
|
|
509
510
|
|
|
510
511
|
interface DropdownProps extends Partial<Omit<TippyProps, 'content' | 'render'>>, GenericComponentProps {
|
|
511
512
|
children: ReactElement<unknown, string | JSXElementConstructor<unknown>>;
|
|
512
|
-
content: (hide?: () => void) =>
|
|
513
|
+
content: (hide?: () => void) => React__default.ReactNode;
|
|
513
514
|
}
|
|
514
|
-
declare const Dropdown:
|
|
515
|
+
declare const Dropdown: React__default.FC<DropdownProps>;
|
|
515
516
|
|
|
516
517
|
interface FileWithPreview extends File {
|
|
517
518
|
preview: string;
|
|
@@ -549,58 +550,60 @@ interface FileUploadProps extends GenericComponentProps, FilePreviewCommonProps,
|
|
|
549
550
|
unsupportedFileFormatErrorMessage?: string;
|
|
550
551
|
}
|
|
551
552
|
|
|
552
|
-
declare const FileUpload:
|
|
553
|
+
declare const FileUpload: React__default.FC<FileUploadProps>;
|
|
553
554
|
|
|
554
|
-
declare const Flex:
|
|
555
|
+
declare const Flex: React__default.FC<BoxProps>;
|
|
555
556
|
|
|
556
|
-
declare const Grid:
|
|
557
|
+
declare const Grid: React__default.FC<BoxProps>;
|
|
557
558
|
|
|
558
559
|
type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4';
|
|
559
560
|
interface HeadingProps extends CommonTextProps<HTMLHeadingElement>, PaddingProps, MarginProps {
|
|
560
561
|
element?: HeadingElement;
|
|
561
562
|
}
|
|
562
|
-
declare const Heading:
|
|
563
|
+
declare const Heading: React__default.FC<HeadingProps>;
|
|
563
564
|
|
|
564
565
|
interface HorizontalDividerProps extends MarginProps, GenericComponentProps {
|
|
565
566
|
colorTheme?: ColorTheme;
|
|
566
567
|
height?: number;
|
|
567
568
|
}
|
|
568
|
-
declare const HorizontalDivider:
|
|
569
|
+
declare const HorizontalDivider: React__default.FC<HorizontalDividerProps>;
|
|
569
570
|
|
|
570
571
|
interface IconProps extends MarginProps, GenericComponentProps {
|
|
572
|
+
disabled?: boolean;
|
|
573
|
+
colorTheme?: ColorTheme;
|
|
571
574
|
icon: PhoenixIcons;
|
|
572
|
-
size?:
|
|
575
|
+
size?: Sizing | CSSValue;
|
|
573
576
|
color?: Color;
|
|
574
|
-
ref?:
|
|
577
|
+
ref?: React__default.Ref<HTMLSpanElement>;
|
|
575
578
|
}
|
|
576
|
-
declare const Icon:
|
|
579
|
+
declare const Icon: React__default.FC<IconProps>;
|
|
577
580
|
|
|
578
|
-
interface ImageProps extends Omit<
|
|
581
|
+
interface ImageProps extends Omit<React__default.ImgHTMLAttributes<HTMLImageElement>, 'width' | 'height'>, MarginProps, PaddingProps, DisplayProps, GenericComponentProps {
|
|
579
582
|
width?: CSSValue;
|
|
580
583
|
height?: CSSValue;
|
|
581
584
|
maxWidth?: CSSValue;
|
|
582
585
|
maxHeight?: CSSValue;
|
|
583
586
|
}
|
|
584
|
-
declare const Image:
|
|
587
|
+
declare const Image: React__default.FC<ImageProps>;
|
|
585
588
|
|
|
586
|
-
type LabelProps =
|
|
587
|
-
declare const Label:
|
|
589
|
+
type LabelProps = React__default.LabelHTMLAttributes<HTMLLabelElement> & GenericComponentProps & PaddingProps & MarginProps;
|
|
590
|
+
declare const Label: React__default.FC<LabelProps>;
|
|
588
591
|
|
|
589
|
-
interface LinkProps extends
|
|
592
|
+
interface LinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement>, GenericComponentProps, MarginProps, PaddingProps {
|
|
590
593
|
icon?: IconType;
|
|
591
594
|
iconAlignment?: IconAlignment;
|
|
592
595
|
color?: Color;
|
|
593
596
|
bold?: boolean;
|
|
594
597
|
noUnderline?: boolean;
|
|
595
|
-
ref?:
|
|
598
|
+
ref?: React__default.Ref<HTMLAnchorElement>;
|
|
596
599
|
}
|
|
597
|
-
declare const Link:
|
|
600
|
+
declare const Link: React__default.FC<LinkProps>;
|
|
598
601
|
|
|
599
|
-
interface LinkButtonProps extends
|
|
602
|
+
interface LinkButtonProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement>, CommonButtonProps, GenericComponentProps {
|
|
600
603
|
light?: boolean;
|
|
601
|
-
ref?:
|
|
604
|
+
ref?: React__default.Ref<HTMLAnchorElement>;
|
|
602
605
|
}
|
|
603
|
-
declare const LinkButton:
|
|
606
|
+
declare const LinkButton: React__default.FC<LinkButtonProps>;
|
|
604
607
|
|
|
605
608
|
interface ListCommonProps {
|
|
606
609
|
size?: Sizing | CSSValue;
|
|
@@ -611,25 +614,25 @@ interface ListCommonProps {
|
|
|
611
614
|
|
|
612
615
|
interface ListProps extends ListCommonProps, Omit<HTMLAttributes<HTMLUListElement>, 'color'>, PaddingProps, MarginProps, GenericComponentProps {
|
|
613
616
|
}
|
|
614
|
-
declare const List:
|
|
617
|
+
declare const List: React__default.FC<ListProps>;
|
|
615
618
|
|
|
616
619
|
interface ListItemProps extends ListCommonProps, Omit<HTMLAttributes<HTMLLIElement>, 'size' | 'color'>, MarginProps, GenericComponentProps {
|
|
617
620
|
}
|
|
618
|
-
declare const ListItem:
|
|
621
|
+
declare const ListItem: React__default.FC<ListItemProps>;
|
|
619
622
|
|
|
620
623
|
interface MenuProps extends MarginProps, PaddingProps, GenericComponentProps {
|
|
621
624
|
}
|
|
622
|
-
declare const Menu:
|
|
625
|
+
declare const Menu: React__default.FC<PropsWithChildren<MenuProps>>;
|
|
623
626
|
|
|
624
627
|
interface MenuItemProps extends MarginProps, PaddingProps, GenericComponentProps {
|
|
625
628
|
target?: string;
|
|
626
629
|
href?: string;
|
|
627
|
-
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
630
|
+
onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
|
|
628
631
|
icon?: IconType | PhoenixIconsColored;
|
|
629
632
|
colorTheme?: ColorTheme;
|
|
630
633
|
disabled?: boolean;
|
|
631
634
|
}
|
|
632
|
-
declare const MenuItem:
|
|
635
|
+
declare const MenuItem: React__default.FC<PropsWithChildren<MenuItemProps>>;
|
|
633
636
|
|
|
634
637
|
interface ModalProps extends GenericComponentProps, PaddingProps, MarginProps {
|
|
635
638
|
open: boolean;
|
|
@@ -641,14 +644,14 @@ interface ModalProps extends GenericComponentProps, PaddingProps, MarginProps {
|
|
|
641
644
|
closeOnOverlayClick?: boolean;
|
|
642
645
|
container?: Element;
|
|
643
646
|
}
|
|
644
|
-
declare const Modal:
|
|
647
|
+
declare const Modal: React__default.FC<PropsWithChildren<ModalProps>>;
|
|
645
648
|
|
|
646
649
|
interface MultiSelectProps<Option extends SelectOption = SelectOption> extends CommonSelectProps<Option, true>, GenericComponentProps {
|
|
647
650
|
onChange: (option: readonly Option[]) => void;
|
|
648
651
|
value: Option[];
|
|
649
652
|
maxVisibleSelectedItems?: number;
|
|
650
653
|
}
|
|
651
|
-
declare const MultiSelect: <Option extends SelectOption = SelectOption>({ value, testId, ...props }: MultiSelectProps<Option>) =>
|
|
654
|
+
declare const MultiSelect: <Option extends SelectOption = SelectOption>({ value, testId, ...props }: MultiSelectProps<Option>) => React__default.ReactElement;
|
|
652
655
|
|
|
653
656
|
interface CommonSliderProps {
|
|
654
657
|
range: {
|
|
@@ -706,7 +709,7 @@ interface MultiSliderProps extends CommonSliderProps, ComponentSliderProps {
|
|
|
706
709
|
onChange(value: MultiSliderValue): void;
|
|
707
710
|
onRelease?(value: MultiSliderValue): void;
|
|
708
711
|
}
|
|
709
|
-
declare const MultiSlider:
|
|
712
|
+
declare const MultiSlider: React__default.FC<MultiSliderProps>;
|
|
710
713
|
|
|
711
714
|
interface NoticeProps extends GenericComponentProps, MarginProps, PaddingProps {
|
|
712
715
|
colorTheme?: ColorTheme;
|
|
@@ -716,12 +719,12 @@ interface NoticeProps extends GenericComponentProps, MarginProps, PaddingProps {
|
|
|
716
719
|
buttonIconAlignment?: IconAlignment;
|
|
717
720
|
buttonTestId?: string;
|
|
718
721
|
closeTestId?: string;
|
|
719
|
-
onClick?: (event:
|
|
720
|
-
onClose?: (event:
|
|
722
|
+
onClick?: (event: React__default.MouseEvent) => void;
|
|
723
|
+
onClose?: (event: React__default.MouseEvent) => void;
|
|
721
724
|
breakpoint?: number;
|
|
722
725
|
borderRadius?: CSSValue;
|
|
723
726
|
}
|
|
724
|
-
declare const Notice:
|
|
727
|
+
declare const Notice: React__default.FC<PropsWithChildren<NoticeProps>>;
|
|
725
728
|
|
|
726
729
|
interface PaginationProps extends GenericComponentProps, MarginProps {
|
|
727
730
|
onChange: (page: number) => void;
|
|
@@ -732,22 +735,22 @@ interface PaginationProps extends GenericComponentProps, MarginProps {
|
|
|
732
735
|
colorTheme?: ColorTheme;
|
|
733
736
|
size?: Sizing;
|
|
734
737
|
}
|
|
735
|
-
declare const Pagination:
|
|
738
|
+
declare const Pagination: React__default.FC<PaginationProps>;
|
|
736
739
|
|
|
737
740
|
interface ParagraphProps extends CommonTextProps<HTMLParagraphElement>, PaddingProps, MarginProps {
|
|
738
741
|
lineHeight?: Sizing | CSSValue;
|
|
739
742
|
}
|
|
740
|
-
declare const Paragraph:
|
|
743
|
+
declare const Paragraph: React__default.FC<ParagraphProps>;
|
|
741
744
|
|
|
742
745
|
interface TextInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, FormControlProps {
|
|
743
|
-
ref?:
|
|
746
|
+
ref?: React__default.Ref<HTMLInputElement>;
|
|
744
747
|
}
|
|
745
|
-
declare const TextInput:
|
|
748
|
+
declare const TextInput: React__default.FC<TextInputProps>;
|
|
746
749
|
|
|
747
750
|
interface PasswordInputProps extends Omit<TextInputProps, 'type' | 'contentRight'> {
|
|
748
|
-
ref?:
|
|
751
|
+
ref?: React__default.Ref<HTMLInputElement>;
|
|
749
752
|
}
|
|
750
|
-
declare const PasswordInput:
|
|
753
|
+
declare const PasswordInput: React__default.FC<PasswordInputProps>;
|
|
751
754
|
|
|
752
755
|
declare enum PasswordStrengthEnum {
|
|
753
756
|
NONE = "none",
|
|
@@ -768,16 +771,16 @@ interface PasswordStrengthProps extends GenericComponentProps, MarginProps, Padd
|
|
|
768
771
|
[PasswordStrengthEnum.EXCELLENT]?: string;
|
|
769
772
|
};
|
|
770
773
|
}
|
|
771
|
-
declare const PasswordStrength:
|
|
774
|
+
declare const PasswordStrength: React__default.FC<PasswordStrengthProps>;
|
|
772
775
|
|
|
773
776
|
interface ProgressBarProps extends MarginProps, GenericComponentProps {
|
|
774
777
|
value?: number;
|
|
775
778
|
color?: ColorTheme | CSSColor;
|
|
776
779
|
}
|
|
777
|
-
declare const ProgressBar:
|
|
780
|
+
declare const ProgressBar: React__default.FC<ProgressBarProps>;
|
|
778
781
|
|
|
779
782
|
type RadioProps = CheckboxRadioCommonProps;
|
|
780
|
-
declare const Radio:
|
|
783
|
+
declare const Radio: React__default.FunctionComponent<RadioProps>;
|
|
781
784
|
|
|
782
785
|
interface SelectNativeProps<Option extends SelectOption = SelectOption> extends FormControlProps {
|
|
783
786
|
onChange: (option: Option | null) => void;
|
|
@@ -787,7 +790,7 @@ interface SelectNativeProps<Option extends SelectOption = SelectOption> extends
|
|
|
787
790
|
onFocus?: FocusEventHandler<HTMLSelectElement>;
|
|
788
791
|
onBlur?: FocusEventHandler<HTMLSelectElement>;
|
|
789
792
|
}
|
|
790
|
-
declare const SelectNative: <Option extends SelectOption = SelectOption>({ testId, size, options, ...props }: SelectNativeProps<Option>) =>
|
|
793
|
+
declare const SelectNative: <Option extends SelectOption = SelectOption>({ testId, size, options, ...props }: SelectNativeProps<Option>) => React__default.ReactElement;
|
|
791
794
|
|
|
792
795
|
interface SelectPickerProps extends GenericComponentProps {
|
|
793
796
|
value: string | string[];
|
|
@@ -797,8 +800,8 @@ interface SelectPickerProps extends GenericComponentProps {
|
|
|
797
800
|
multiSelect?: boolean;
|
|
798
801
|
error?: string | boolean;
|
|
799
802
|
warning?: string;
|
|
800
|
-
onMouseOver?: (event:
|
|
801
|
-
onMouseLeave?: (event:
|
|
803
|
+
onMouseOver?: (event: React__default.MouseEvent) => void;
|
|
804
|
+
onMouseLeave?: (event: React__default.MouseEvent) => void;
|
|
802
805
|
colorTheme?: ColorTheme;
|
|
803
806
|
size?: SizingMdLg;
|
|
804
807
|
imageSize?: string;
|
|
@@ -810,7 +813,7 @@ interface SelectPickerOption {
|
|
|
810
813
|
image?: string;
|
|
811
814
|
isDisabled?: boolean;
|
|
812
815
|
}
|
|
813
|
-
declare const SelectPicker:
|
|
816
|
+
declare const SelectPicker: React__default.FC<SelectPickerProps>;
|
|
814
817
|
|
|
815
818
|
type SliderValue = number | string;
|
|
816
819
|
interface SliderProps extends CommonSliderProps, ComponentSliderProps {
|
|
@@ -819,17 +822,17 @@ interface SliderProps extends CommonSliderProps, ComponentSliderProps {
|
|
|
819
822
|
onRelease?(value: SliderValue): void;
|
|
820
823
|
limit?: number;
|
|
821
824
|
}
|
|
822
|
-
declare const Slider:
|
|
825
|
+
declare const Slider: React__default.FC<SliderProps>;
|
|
823
826
|
|
|
824
827
|
interface SpinnerProps extends MarginProps, GenericComponentProps {
|
|
825
828
|
size?: Sizing | CSSValue;
|
|
826
829
|
colorTheme?: ColorTheme;
|
|
827
830
|
light?: boolean;
|
|
828
831
|
}
|
|
829
|
-
declare const Spinner:
|
|
832
|
+
declare const Spinner: React__default.FC<SpinnerProps>;
|
|
830
833
|
|
|
831
834
|
type TabsProps = TabsProps$1 & GenericComponentProps;
|
|
832
|
-
declare const Tabs:
|
|
835
|
+
declare const Tabs: React__default.FC<TabsProps>;
|
|
833
836
|
|
|
834
837
|
interface TabListCommonProps {
|
|
835
838
|
animate?: boolean;
|
|
@@ -840,20 +843,20 @@ interface TabCommonProps extends TabListCommonProps {
|
|
|
840
843
|
disabled?: boolean;
|
|
841
844
|
}
|
|
842
845
|
|
|
843
|
-
interface TabProps extends Omit<
|
|
846
|
+
interface TabProps extends Omit<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, 'tabIndex'>, GenericComponentProps, TabCommonProps {
|
|
844
847
|
disabledClassName?: string;
|
|
845
848
|
selectedClassName?: string;
|
|
846
849
|
tabIndex?: string;
|
|
847
850
|
id?: string;
|
|
848
|
-
ref?:
|
|
851
|
+
ref?: React__default.Ref<HTMLAnchorElement>;
|
|
849
852
|
}
|
|
850
|
-
type TabFunctionProps =
|
|
853
|
+
type TabFunctionProps = React__default.FC<TabProps> & {
|
|
851
854
|
tabsRole?: 'Tab';
|
|
852
855
|
};
|
|
853
856
|
declare const Tab: TabFunctionProps;
|
|
854
857
|
|
|
855
858
|
type TabListProps = GenericComponentProps & TabListCommonProps;
|
|
856
|
-
declare const TabList:
|
|
859
|
+
declare const TabList: React__default.FC<PropsWithChildren<TabListProps>> & {
|
|
857
860
|
tabsRole: 'TabList';
|
|
858
861
|
};
|
|
859
862
|
|
|
@@ -863,34 +866,34 @@ interface TagProps extends GenericComponentProps, MarginProps {
|
|
|
863
866
|
secondary?: boolean;
|
|
864
867
|
outline?: boolean;
|
|
865
868
|
}
|
|
866
|
-
declare const Tag:
|
|
869
|
+
declare const Tag: React__default.FC<PropsWithChildren<TagProps>>;
|
|
867
870
|
|
|
868
871
|
interface TextProps extends CommonTextProps<HTMLDivElement>, PaddingProps, MarginProps {
|
|
869
872
|
ellipsize?: boolean;
|
|
870
873
|
element?: 'div' | 'span';
|
|
871
874
|
title?: string;
|
|
872
875
|
}
|
|
873
|
-
declare const Text:
|
|
876
|
+
declare const Text: React__default.FC<TextProps>;
|
|
874
877
|
|
|
875
878
|
interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, FormControlProps {
|
|
876
879
|
}
|
|
877
|
-
declare const TextArea:
|
|
880
|
+
declare const TextArea: React__default.FC<TextAreaProps>;
|
|
878
881
|
|
|
879
882
|
type TimezonePickerProps = Omit<SelectProps, 'options'> & GenericComponentProps;
|
|
880
|
-
declare const TimezonePicker:
|
|
883
|
+
declare const TimezonePicker: React__default.FC<TimezonePickerProps>;
|
|
881
884
|
|
|
882
885
|
declare const getOptions: () => SelectOption[];
|
|
883
886
|
|
|
884
887
|
interface ToggleProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, GenericComponentProps {
|
|
885
888
|
colorTheme?: ColorTheme;
|
|
886
|
-
label?:
|
|
889
|
+
label?: React__default.ReactNode;
|
|
887
890
|
warning?: FormControlWarningType;
|
|
888
891
|
error?: FormControlErrorType;
|
|
889
892
|
}
|
|
890
|
-
declare const Toggle:
|
|
893
|
+
declare const Toggle: React__default.FC<ToggleProps>;
|
|
891
894
|
|
|
892
895
|
type TooltipProps = Omit<TippyProps, 'theme'> & GenericComponentProps;
|
|
893
|
-
declare const Tooltip:
|
|
896
|
+
declare const Tooltip: React__default.FC<TooltipProps>;
|
|
894
897
|
|
|
895
898
|
declare const prefixedTheme: {
|
|
896
899
|
$pc: {
|
|
@@ -1993,15 +1996,16 @@ declare const prefixedTheme: {
|
|
|
1993
1996
|
};
|
|
1994
1997
|
};
|
|
1995
1998
|
};
|
|
1999
|
+
dir: "ltr" | "rtl";
|
|
1996
2000
|
};
|
|
1997
2001
|
|
|
1998
|
-
declare const GlobalStyles:
|
|
2002
|
+
declare const GlobalStyles: React$1.NamedExoticComponent<styled_components.ExecutionProps & object>;
|
|
1999
2003
|
|
|
2000
2004
|
interface ColorAndTheme {
|
|
2001
|
-
|
|
2005
|
+
color?: Color;
|
|
2002
2006
|
theme: DefaultTheme;
|
|
2003
2007
|
}
|
|
2004
|
-
declare const getTextColor: (brandDefault?: boolean) => ({
|
|
2008
|
+
declare const getTextColor: (brandDefault?: boolean) => ({ color, theme }: ColorAndTheme) => string;
|
|
2005
2009
|
declare const getUnitlessNumber: (number: string) => number;
|
|
2006
2010
|
declare const getLineHeightUnitless: (lineHeightPercentage: string) => number;
|
|
2007
2011
|
interface BoxShadowObj {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purple/phoenix-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.30.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/bundle.umd.js",
|
|
6
6
|
"module": "dist/bundle.esm.js",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"*.{ts,tsx,js,jsx,json,d.ts}": "eslint --fix"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"@emotion/is-prop-valid": "1.4.0",
|
|
35
36
|
"@react-hook/previous": "~1.0.1",
|
|
36
37
|
"@tippyjs/react": "~4.2.6",
|
|
37
38
|
"countries-and-timezones": "^3.3.0",
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
"react-select": "^5.10.2",
|
|
48
49
|
"react-tabs": "^6.1.0",
|
|
49
50
|
"styled-system": "~5.1.5",
|
|
51
|
+
"stylis": "4.3.6",
|
|
50
52
|
"zxcvbn": "~4.4.2"
|
|
51
53
|
},
|
|
52
54
|
"peerDependencies": {
|
|
@@ -93,7 +95,6 @@
|
|
|
93
95
|
"@types/react": "^19.1.8",
|
|
94
96
|
"@types/react-dom": "^19.1.6",
|
|
95
97
|
"@types/react-tabs": "^5.0.5",
|
|
96
|
-
"@types/styled-components": "^5.1.26",
|
|
97
98
|
"@types/styled-system": "^5.1.13",
|
|
98
99
|
"@types/zxcvbn": "^4.4.2",
|
|
99
100
|
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
@@ -130,7 +131,7 @@
|
|
|
130
131
|
"storybook": "^9.0.12",
|
|
131
132
|
"style-dictionary": "^5.0.0",
|
|
132
133
|
"style-dictionary-utils": "^4.1.0",
|
|
133
|
-
"styled-components": "
|
|
134
|
+
"styled-components": "6.1.19",
|
|
134
135
|
"tippy.js": "^6.3.7",
|
|
135
136
|
"ts-node": "^10.9.1",
|
|
136
137
|
"tslib": "^2.6.2",
|