@paygreen/pgui 2.14.0 → 2.14.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/cjs/index.js +61 -92
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/InputDayPicker/index.d.ts +4 -2
- package/dist/cjs/types/components/InputRangePicker/index.d.ts +8 -4
- package/dist/cjs/types/theme/components/input.d.ts +2 -0
- package/dist/cjs/types/theme/components/pin-input.d.ts +2 -0
- package/dist/cjs/types/theme/components/textarea.d.ts +2 -0
- package/dist/esm/index.js +61 -92
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/InputDayPicker/index.d.ts +4 -2
- package/dist/esm/types/components/InputRangePicker/index.d.ts +8 -4
- package/dist/esm/types/theme/components/input.d.ts +2 -0
- package/dist/esm/types/theme/components/pin-input.d.ts +2 -0
- package/dist/esm/types/theme/components/textarea.d.ts +2 -0
- package/dist/index.d.ts +12 -6
- package/package.json +1 -1
|
@@ -7,12 +7,14 @@ export type InputDayPickerProps = {
|
|
|
7
7
|
value: Date | null;
|
|
8
8
|
locale?: 'fr' | 'en';
|
|
9
9
|
variant?: 'filled' | 'outline';
|
|
10
|
-
dateFormat?: string;
|
|
11
10
|
withTime?: boolean;
|
|
12
11
|
minDate?: Date | null | undefined;
|
|
13
12
|
maxDate?: Date | null | undefined;
|
|
14
13
|
isDisabled?: boolean;
|
|
15
14
|
inputProps?: any;
|
|
16
15
|
dayPickerProps?: any;
|
|
16
|
+
isOpen?: boolean;
|
|
17
|
+
onOpen?: () => void;
|
|
18
|
+
onClose?: () => void;
|
|
17
19
|
};
|
|
18
|
-
export declare const InputDayPicker: ({ value, onChange, placeholder, name, isDisabled, withTime, locale, minDate, maxDate,
|
|
20
|
+
export declare const InputDayPicker: ({ value, onChange, placeholder, name, isDisabled, withTime, locale, minDate, maxDate, variant, inputProps, dayPickerProps, isOpen: isOpenProp, onOpen: onOpenProp, onClose: onCloseProp, }: InputDayPickerProps) => React.JSX.Element;
|
|
@@ -12,10 +12,14 @@ export type InputRangePickerProps = {
|
|
|
12
12
|
} | null;
|
|
13
13
|
locale?: 'fr' | 'en';
|
|
14
14
|
variant?: 'filled' | 'outline';
|
|
15
|
-
dateFormat?: string;
|
|
16
15
|
withTime?: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
minStartDate?: Date | null | undefined;
|
|
17
|
+
maxStartDate?: Date | null | undefined;
|
|
18
|
+
minEndDate?: Date | null | undefined;
|
|
19
|
+
maxEndDate?: Date | null | undefined;
|
|
19
20
|
isDisabled?: boolean;
|
|
21
|
+
breakpoint?: 'base' | 'sm' | 'md' | 'lg';
|
|
22
|
+
inputProps?: any;
|
|
23
|
+
dayPickerProps?: any;
|
|
20
24
|
};
|
|
21
|
-
export declare const InputRangePicker: ({ value, onChange, placeholder, name, isDisabled, withTime, locale,
|
|
25
|
+
export declare const InputRangePicker: ({ value, onChange, placeholder, name, isDisabled, withTime, locale, minStartDate, maxStartDate, minEndDate, maxEndDate, variant, breakpoint, inputProps, dayPickerProps, }: InputRangePickerProps) => React.JSX.Element;
|
|
@@ -21,6 +21,7 @@ declare const _default: {
|
|
|
21
21
|
};
|
|
22
22
|
_placeholder: {
|
|
23
23
|
color: string;
|
|
24
|
+
opacity: number;
|
|
24
25
|
};
|
|
25
26
|
};
|
|
26
27
|
addon: {
|
|
@@ -45,6 +46,7 @@ declare const _default: {
|
|
|
45
46
|
};
|
|
46
47
|
_placeholder: {
|
|
47
48
|
color: string;
|
|
49
|
+
opacity: number;
|
|
48
50
|
};
|
|
49
51
|
};
|
|
50
52
|
addon: {
|
|
@@ -14,6 +14,7 @@ declare const _default: {
|
|
|
14
14
|
};
|
|
15
15
|
_placeholder: {
|
|
16
16
|
color: string;
|
|
17
|
+
opacity: number;
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
20
|
filled: (props: any) => {
|
|
@@ -33,6 +34,7 @@ declare const _default: {
|
|
|
33
34
|
};
|
|
34
35
|
_placeholder: {
|
|
35
36
|
color: string;
|
|
37
|
+
opacity: number;
|
|
36
38
|
};
|
|
37
39
|
};
|
|
38
40
|
};
|
|
@@ -22,6 +22,7 @@ declare const _default: {
|
|
|
22
22
|
};
|
|
23
23
|
_placeholder: {
|
|
24
24
|
color: string;
|
|
25
|
+
opacity: number;
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
28
|
filled: (props: any) => {
|
|
@@ -41,6 +42,7 @@ declare const _default: {
|
|
|
41
42
|
};
|
|
42
43
|
_placeholder: {
|
|
43
44
|
color: string;
|
|
45
|
+
opacity: number;
|
|
44
46
|
};
|
|
45
47
|
};
|
|
46
48
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -85,15 +85,17 @@ type InputDayPickerProps = {
|
|
|
85
85
|
value: Date | null;
|
|
86
86
|
locale?: 'fr' | 'en';
|
|
87
87
|
variant?: 'filled' | 'outline';
|
|
88
|
-
dateFormat?: string;
|
|
89
88
|
withTime?: boolean;
|
|
90
89
|
minDate?: Date | null | undefined;
|
|
91
90
|
maxDate?: Date | null | undefined;
|
|
92
91
|
isDisabled?: boolean;
|
|
93
92
|
inputProps?: any;
|
|
94
93
|
dayPickerProps?: any;
|
|
94
|
+
isOpen?: boolean;
|
|
95
|
+
onOpen?: () => void;
|
|
96
|
+
onClose?: () => void;
|
|
95
97
|
};
|
|
96
|
-
declare const InputDayPicker: ({ value, onChange, placeholder, name, isDisabled, withTime, locale, minDate, maxDate,
|
|
98
|
+
declare const InputDayPicker: ({ value, onChange, placeholder, name, isDisabled, withTime, locale, minDate, maxDate, variant, inputProps, dayPickerProps, isOpen: isOpenProp, onOpen: onOpenProp, onClose: onCloseProp, }: InputDayPickerProps) => React.JSX.Element;
|
|
97
99
|
|
|
98
100
|
var css_248z = "/* CSS variables. */\r\n:root {\r\n\t--PhoneInput-color--focus: #03b2cb;\r\n\t--PhoneInputInternationalIconPhone-opacity: 0.8;\r\n\t--PhoneInputInternationalIconGlobe-opacity: 0.65;\r\n\t--PhoneInputCountrySelect-marginRight: 0.35em;\r\n\t--PhoneInputCountrySelectArrow-width: 0.3em;\r\n\t--PhoneInputCountrySelectArrow-marginLeft: var(--PhoneInputCountrySelect-marginRight);\r\n\t--PhoneInputCountrySelectArrow-borderWidth: 1px;\r\n\t--PhoneInputCountrySelectArrow-opacity: 0.45;\r\n\t--PhoneInputCountrySelectArrow-color: currentColor;\r\n\t--PhoneInputCountrySelectArrow-color--focus: var(--PhoneInput-color--focus);\r\n\t--PhoneInputCountrySelectArrow-transform: rotate(45deg);\r\n\t--PhoneInputCountryFlag-aspectRatio: 1.5;\r\n\t--PhoneInputCountryFlag-height: 1em;\r\n\t--PhoneInputCountryFlag-borderWidth: 1px;\r\n\t--PhoneInputCountryFlag-borderColor: rgba(0,0,0,0.5);\r\n\t--PhoneInputCountryFlag-borderColor--focus: var(--PhoneInput-color--focus);\r\n\t--PhoneInputCountryFlag-backgroundColor--loading: rgba(0,0,0,0.1);\r\n}\r\n\r\n.PhoneInput {\r\n\t/* This is done to stretch the contents of this component. */\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n\r\n.PhoneInputInput {\r\n\t/* The phone number input stretches to fill all empty space */\r\n\tflex: 1;\r\n\t/* The phone number input should shrink\r\n\t to make room for the extension input */\r\n\tmin-width: 0;\r\n}\r\n\r\n.PhoneInputCountryIcon {\r\n\twidth: calc(var(--PhoneInputCountryFlag-height) * var(--PhoneInputCountryFlag-aspectRatio));\r\n\theight: var(--PhoneInputCountryFlag-height);\r\n}\r\n\r\n.PhoneInputCountryIcon--square {\r\n\twidth: var(--PhoneInputCountryFlag-height);\r\n}\r\n\r\n.PhoneInputCountryIcon--border {\r\n\t/* Removed `background-color` because when an `<img/>` was still loading\r\n\t it would show a dark gray rectangle. */\r\n\t/* For some reason the `<img/>` is not stretched to 100% width and height\r\n\t and sometime there can be seen white pixels of the background at top and bottom. */\r\n\tbackground-color: var(--PhoneInputCountryFlag-backgroundColor--loading);\r\n\t/* Border is added via `box-shadow` because `border` interferes with `width`/`height`. */\r\n\t/* For some reason the `<img/>` is not stretched to 100% width and height\r\n\t and sometime there can be seen white pixels of the background at top and bottom,\r\n\t so an additional \"inset\" border is added. */\r\n\tbox-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor),\r\n\t\tinset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor);\r\n}\r\n\r\n.PhoneInputCountryIconImg {\r\n\t/* Fixes weird vertical space above the flag icon. */\r\n\t/* https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/7#note_348586559 */\r\n\tdisplay: block;\r\n\t/* 3rd party <SVG/> flag icons won't stretch if they have `width` and `height`.\r\n\t Also, if an <SVG/> icon's aspect ratio was different, it wouldn't fit too. */\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n\r\n.PhoneInputInternationalIconPhone {\r\n\topacity: var(--PhoneInputInternationalIconPhone-opacity);\r\n}\r\n\r\n.PhoneInputInternationalIconGlobe {\r\n\topacity: var(--PhoneInputInternationalIconGlobe-opacity);\r\n}\r\n\r\n/* Styling native country `<select/>`. */\r\n\r\n.PhoneInputCountry {\r\n\tposition: relative;\r\n\talign-self: stretch;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tmargin-right: var(--PhoneInputCountrySelect-marginRight);\r\n}\r\n\r\n.PhoneInputCountrySelect {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\tz-index: 1;\r\n\tborder: 0;\r\n\topacity: 0;\r\n\tcursor: pointer;\r\n}\r\n\r\n.PhoneInputCountrySelect[disabled],\r\n.PhoneInputCountrySelect[readonly] {\r\n\tcursor: default;\r\n}\r\n\r\n.PhoneInputCountrySelectArrow {\r\n\tdisplay: block;\r\n\tcontent: '';\r\n\twidth: var(--PhoneInputCountrySelectArrow-width);\r\n\theight: var(--PhoneInputCountrySelectArrow-width);\r\n\tmargin-left: var(--PhoneInputCountrySelectArrow-marginLeft);\r\n\tborder-style: solid;\r\n\tborder-color: var(--PhoneInputCountrySelectArrow-color);\r\n\tborder-top-width: 0;\r\n\tborder-bottom-width: var(--PhoneInputCountrySelectArrow-borderWidth);\r\n\tborder-left-width: 0;\r\n\tborder-right-width: var(--PhoneInputCountrySelectArrow-borderWidth);\r\n\ttransform: var(--PhoneInputCountrySelectArrow-transform);\r\n\topacity: var(--PhoneInputCountrySelectArrow-opacity);\r\n}\r\n\r\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon + .PhoneInputCountrySelectArrow {\r\n\topacity: 1;\r\n\tcolor: var(--PhoneInputCountrySelectArrow-color--focus);\r\n}\r\n\r\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon--border {\r\n\tbox-shadow: 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus),\r\n\t\tinset 0 0 0 var(--PhoneInputCountryFlag-borderWidth) var(--PhoneInputCountryFlag-borderColor--focus);\r\n}\r\n\r\n.PhoneInputCountrySelect:focus + .PhoneInputCountryIcon .PhoneInputInternationalIconGlobe {\r\n\topacity: 1;\r\n\tcolor: var(--PhoneInputCountrySelectArrow-color--focus);\r\n}";
|
|
99
101
|
styleInject(css_248z);
|
|
@@ -122,13 +124,17 @@ type InputRangePickerProps = {
|
|
|
122
124
|
} | null;
|
|
123
125
|
locale?: 'fr' | 'en';
|
|
124
126
|
variant?: 'filled' | 'outline';
|
|
125
|
-
dateFormat?: string;
|
|
126
127
|
withTime?: boolean;
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
minStartDate?: Date | null | undefined;
|
|
129
|
+
maxStartDate?: Date | null | undefined;
|
|
130
|
+
minEndDate?: Date | null | undefined;
|
|
131
|
+
maxEndDate?: Date | null | undefined;
|
|
129
132
|
isDisabled?: boolean;
|
|
133
|
+
breakpoint?: 'base' | 'sm' | 'md' | 'lg';
|
|
134
|
+
inputProps?: any;
|
|
135
|
+
dayPickerProps?: any;
|
|
130
136
|
};
|
|
131
|
-
declare const InputRangePicker: ({ value, onChange, placeholder, name, isDisabled, withTime, locale,
|
|
137
|
+
declare const InputRangePicker: ({ value, onChange, placeholder, name, isDisabled, withTime, locale, minStartDate, maxStartDate, minEndDate, maxEndDate, variant, breakpoint, inputProps, dayPickerProps, }: InputRangePickerProps) => React.JSX.Element;
|
|
132
138
|
|
|
133
139
|
type ModalResponsiveProps = ModalProps & DrawerProps;
|
|
134
140
|
declare const ModalResponsive: ({ isOpen, onClose, finalFocusRef, children, ...rest }: ModalResponsiveProps) => React.JSX.Element;
|