@purple/phoenix-components 4.32.0 → 4.33.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 +7 -0
- package/dist/bundle.cjs.js +1 -1
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +1 -1
- 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 +48 -45
- 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;
|