@purple/phoenix-components 4.32.0 → 4.34.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/CHANGELOG.md +14 -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 +63 -49
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { HTMLAttributes, ReactElement, InputHTMLAttributes, JSXElementConstructor, MouseEventHandler,
|
|
2
|
+
import React__default, { HTMLAttributes, ReactElement, InputHTMLAttributes, FocusEventHandler, JSXElementConstructor, MouseEventHandler, 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, BorderProps } from 'styled-system';
|
|
6
6
|
import * as CSS from 'csstype';
|
|
7
|
+
import { OptionTypeBase, NamedProps } from 'react-select';
|
|
7
8
|
import { DayPickerProps } from 'react-day-picker';
|
|
8
9
|
import { Props } from 'tippy.js';
|
|
9
|
-
import { OptionTypeBase, NamedProps } from 'react-select';
|
|
10
10
|
import { TippyProps } from '@tippyjs/react';
|
|
11
11
|
export { TabPanel, Tabs } from 'react-tabs';
|
|
12
12
|
|
|
@@ -347,6 +347,49 @@ interface CollapsibleCardProps extends CardProps, GenericComponentProps {
|
|
|
347
347
|
}
|
|
348
348
|
declare const CollapsibleCard: React$1.FC<CollapsibleCardProps>;
|
|
349
349
|
|
|
350
|
+
interface FormControlProps extends GenericComponentProps {
|
|
351
|
+
label?: string;
|
|
352
|
+
success?: boolean;
|
|
353
|
+
warning?: FormControlWarningType;
|
|
354
|
+
error?: FormControlErrorType;
|
|
355
|
+
contentRight?: string | React__default.ReactNode;
|
|
356
|
+
helperText?: string;
|
|
357
|
+
RTL?: boolean;
|
|
358
|
+
size?: ComponentSize;
|
|
359
|
+
disabled?: boolean;
|
|
360
|
+
focused?: boolean;
|
|
361
|
+
minimal?: boolean;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'onChange'>, FormControlProps {
|
|
365
|
+
value: number | null;
|
|
366
|
+
onChange: (value: number | null) => void;
|
|
367
|
+
numberFormatErrorMessage?: string;
|
|
368
|
+
maxDecimalCount?: number;
|
|
369
|
+
}
|
|
370
|
+
declare const NumberInput: React__default.FC<NumberInputProps>;
|
|
371
|
+
|
|
372
|
+
interface CommonSelectProps extends FormControlProps {
|
|
373
|
+
name?: string;
|
|
374
|
+
options?: SelectOption[];
|
|
375
|
+
onFocus?: FocusEventHandler<HTMLSelectElement>;
|
|
376
|
+
onBlur?: FocusEventHandler<HTMLSelectElement>;
|
|
377
|
+
reactSelectProps?: Omit<NamedProps, 'theme'>;
|
|
378
|
+
preventSearch?: boolean;
|
|
379
|
+
}
|
|
380
|
+
interface SelectOption extends OptionTypeBase {
|
|
381
|
+
label: string;
|
|
382
|
+
value: string | number;
|
|
383
|
+
isDisabled?: boolean;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
interface SelectProps extends CommonSelectProps {
|
|
387
|
+
onChange: (option: SelectOption | null) => void;
|
|
388
|
+
value?: SelectOption | null;
|
|
389
|
+
useNativeSelectOnMobile?: boolean;
|
|
390
|
+
}
|
|
391
|
+
declare const Select: React__default.FC<SelectProps>;
|
|
392
|
+
|
|
350
393
|
interface Month {
|
|
351
394
|
value: number;
|
|
352
395
|
label: string;
|
|
@@ -375,6 +418,9 @@ interface DateInputProps extends GenericComponentProps {
|
|
|
375
418
|
size?: ComponentSizeSmallMediumLarge;
|
|
376
419
|
disabled?: boolean;
|
|
377
420
|
setTouched?: (touched: boolean) => void;
|
|
421
|
+
dayProps?: Omit<NumberInputProps, 'value' | 'onChange'>;
|
|
422
|
+
monthProps?: Omit<SelectProps, 'onChange'>;
|
|
423
|
+
yearProps?: Omit<NumberInputProps, 'value' | 'onChange'>;
|
|
378
424
|
}
|
|
379
425
|
declare const DateInput: React__default.FC<DateInputProps>;
|
|
380
426
|
|
|
@@ -548,28 +594,6 @@ interface NoticeProps extends GenericComponentProps, MarginProps, PaddingProps {
|
|
|
548
594
|
}
|
|
549
595
|
declare const Notice: React__default.FC<NoticeProps>;
|
|
550
596
|
|
|
551
|
-
interface FormControlProps extends GenericComponentProps {
|
|
552
|
-
label?: string;
|
|
553
|
-
success?: boolean;
|
|
554
|
-
warning?: FormControlWarningType;
|
|
555
|
-
error?: FormControlErrorType;
|
|
556
|
-
contentRight?: string | React__default.ReactNode;
|
|
557
|
-
helperText?: string;
|
|
558
|
-
RTL?: boolean;
|
|
559
|
-
size?: ComponentSize;
|
|
560
|
-
disabled?: boolean;
|
|
561
|
-
focused?: boolean;
|
|
562
|
-
minimal?: boolean;
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'value' | 'onChange'>, FormControlProps {
|
|
566
|
-
value: number | null;
|
|
567
|
-
onChange: (value: number | null) => void;
|
|
568
|
-
numberFormatErrorMessage?: string;
|
|
569
|
-
maxDecimalCount?: number;
|
|
570
|
-
}
|
|
571
|
-
declare const NumberInput: React__default.FC<NumberInputProps>;
|
|
572
|
-
|
|
573
597
|
interface ParagraphProps extends CommonTextProps<HTMLParagraphElement>, PaddingProps, MarginProps {
|
|
574
598
|
size?: ComponentSizeSmallMediumLarge | string | number;
|
|
575
599
|
}
|
|
@@ -578,27 +602,6 @@ declare const Paragraph: React__default.FC<ParagraphProps>;
|
|
|
578
602
|
declare type RadioProps = CheckboxRadioCommonProps;
|
|
579
603
|
declare const Radio: React__default.VoidFunctionComponent<RadioProps>;
|
|
580
604
|
|
|
581
|
-
interface CommonSelectProps extends FormControlProps {
|
|
582
|
-
name?: string;
|
|
583
|
-
options?: SelectOption[];
|
|
584
|
-
onFocus?: FocusEventHandler<HTMLSelectElement>;
|
|
585
|
-
onBlur?: FocusEventHandler<HTMLSelectElement>;
|
|
586
|
-
reactSelectProps?: Omit<NamedProps, 'theme'>;
|
|
587
|
-
preventSearch?: boolean;
|
|
588
|
-
}
|
|
589
|
-
interface SelectOption extends OptionTypeBase {
|
|
590
|
-
label: string;
|
|
591
|
-
value: string | number;
|
|
592
|
-
isDisabled?: boolean;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
interface SelectProps extends CommonSelectProps {
|
|
596
|
-
onChange: (option: SelectOption | null) => void;
|
|
597
|
-
value?: SelectOption | null;
|
|
598
|
-
useNativeSelectOnMobile?: boolean;
|
|
599
|
-
}
|
|
600
|
-
declare const Select: React__default.FC<SelectProps>;
|
|
601
|
-
|
|
602
605
|
interface SelectNativeProps extends FormControlProps {
|
|
603
606
|
onChange: (option: SelectOption | null) => void;
|
|
604
607
|
value?: SelectOption | null;
|
|
@@ -654,10 +657,16 @@ interface SpinnerProps extends MarginProps, GenericComponentProps {
|
|
|
654
657
|
}
|
|
655
658
|
declare const Spinner: React__default.FC<SpinnerProps>;
|
|
656
659
|
|
|
657
|
-
interface
|
|
660
|
+
interface TabListCommonProps {
|
|
658
661
|
animate?: boolean;
|
|
662
|
+
size?: ComponentSizeSmallMediumLarge;
|
|
663
|
+
}
|
|
664
|
+
interface TabCommonProps extends TabListCommonProps {
|
|
659
665
|
selected?: boolean;
|
|
660
666
|
disabled?: boolean;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
interface TabProps extends Omit<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, 'tabIndex'>, GenericComponentProps, TabCommonProps {
|
|
661
670
|
disabledClassName?: string;
|
|
662
671
|
selectedClassName?: string;
|
|
663
672
|
tabIndex?: string;
|
|
@@ -668,9 +677,7 @@ declare type TabFunctionProps = React__default.ForwardRefExoticComponent<TabProp
|
|
|
668
677
|
} & React__default.RefAttributes<HTMLAnchorElement>;
|
|
669
678
|
declare const Tab: TabFunctionProps;
|
|
670
679
|
|
|
671
|
-
|
|
672
|
-
animate?: boolean;
|
|
673
|
-
}
|
|
680
|
+
declare type TabListProps = GenericComponentProps & TabListCommonProps;
|
|
674
681
|
declare const TabList: React__default.FC<TabListProps> & {
|
|
675
682
|
tabsRole: 'TabList';
|
|
676
683
|
};
|
|
@@ -942,6 +949,13 @@ declare const prefixedTheme: {
|
|
|
942
949
|
large: number;
|
|
943
950
|
};
|
|
944
951
|
};
|
|
952
|
+
tabs: {
|
|
953
|
+
size: {
|
|
954
|
+
small: number;
|
|
955
|
+
medium: number;
|
|
956
|
+
large: number;
|
|
957
|
+
};
|
|
958
|
+
};
|
|
945
959
|
tag: {
|
|
946
960
|
padding: {
|
|
947
961
|
small: string;
|