@lifesg/react-design-system 1.0.0-alpha.20 → 1.0.0-alpha.21
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/animations/index.d.ts +1 -0
- package/animations/index.js +6 -3
- package/animations/index.js.map +1 -1
- package/animations/loading-dots-spinner/loading-dots-spinner.d.ts +2 -0
- package/animations/loading-dots-spinner/lottie-animation.d.ts +2 -0
- package/calendar/calendar-day.d.ts +11 -0
- package/calendar/calendar-day.style.d.ts +23 -0
- package/calendar/calendar-month.d.ts +12 -0
- package/calendar/calendar-month.style.d.ts +12 -0
- package/calendar/calendar-year.d.ts +12 -0
- package/calendar/calendar-year.style.d.ts +12 -0
- package/calendar/calendar.d.ts +4 -0
- package/calendar/calendar.style.d.ts +35 -0
- package/calendar/index.d.ts +2 -0
- package/calendar/index.js +381 -0
- package/calendar/index.js.map +1 -0
- package/calendar/package.json +7 -0
- package/calendar/types.d.ts +15 -0
- package/cjs/index.js +426 -221
- package/cjs/index.js.map +1 -1
- package/date-input/index.js +115 -115
- package/date-input/index.js.map +1 -1
- package/error-display/index.js +1 -0
- package/error-display/index.js.map +1 -1
- package/form/index.js +440 -471
- package/form/index.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +461 -256
- package/index.js.map +1 -1
- package/input/index.js +71 -70
- package/input/index.js.map +1 -1
- package/input/input.style.d.ts +3 -7
- package/input-group/index.js +375 -363
- package/input-group/index.js.map +1 -1
- package/input-group/input-group-list-addon.d.ts +1 -1
- package/input-group/input-group-list-addon.style.d.ts +9 -1
- package/input-group/input-group.style.d.ts +4 -7
- package/input-group/types.d.ts +3 -2
- package/input-select/index.js +10 -4
- package/input-select/index.js.map +1 -1
- package/otp-input/index.d.ts +2 -0
- package/otp-input/index.js +600 -0
- package/otp-input/index.js.map +1 -0
- package/otp-input/otp-input.d.ts +3 -0
- package/otp-input/otp-input.styles.d.ts +5 -0
- package/otp-input/package.json +7 -0
- package/otp-input/types.d.ts +22 -0
- package/package.json +1 -1
- package/phone-number-input/index.d.ts +1 -0
- package/phone-number-input/index.js +375 -365
- package/phone-number-input/index.js.map +1 -1
- package/phone-number-input/phone-number-input-helper.d.ts +2 -2
- package/phone-number-input/phone-number-input.d.ts +1 -1
- package/phone-number-input/types.d.ts +9 -0
- package/shared/dropdown-list/dropdown-list.d.ts +1 -1
- package/shared/dropdown-list/types.d.ts +1 -0
- package/shared/input-wrapper/input-wrapper.d.ts +8 -0
- package/unit-number/index.js +256 -302
- package/unit-number/index.js.map +1 -1
- package/unit-number/unit-number-input.style.d.ts +7 -12
- package/util/calendar-helper.d.ts +10 -0
- package/util/index.d.ts +1 -0
- package/phone-number-input/phone-number-input.styles.d.ts +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CountryValue } from "./types";
|
|
2
2
|
export declare namespace PhoneNumberInputHelper {
|
|
3
|
-
const getCountries: CountryValue[];
|
|
4
|
-
const formatNumber: (
|
|
3
|
+
const getCountries: () => CountryValue[];
|
|
4
|
+
const formatNumber: (numberText?: string, country?: CountryValue) => string;
|
|
5
5
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PhoneNumberInputProps } from "./types";
|
|
3
|
-
export declare const PhoneNumberInput: ({ onChange, value, allowClear, onClear, error, optionPlaceholder, optionSearchPlaceholder, enableSearch, onHideOptions, onShowOptions, placeholder, ...otherProps }: PhoneNumberInputProps) => JSX.Element;
|
|
3
|
+
export declare const PhoneNumberInput: ({ onChange, value, allowClear, onClear, onBlur, error, fixedCountry, optionPlaceholder, optionSearchPlaceholder, enableSearch, onHideOptions, onShowOptions, placeholder, ...otherProps }: PhoneNumberInputProps) => JSX.Element;
|
|
@@ -15,14 +15,23 @@ export interface PhoneNumberInputValue {
|
|
|
15
15
|
number?: string | undefined;
|
|
16
16
|
}
|
|
17
17
|
export interface PhoneNumberInputProps extends React.AriaAttributes {
|
|
18
|
+
/** The value of the input */
|
|
18
19
|
value?: PhoneNumberInputValue | undefined;
|
|
19
20
|
error?: boolean | undefined;
|
|
20
21
|
/** Specifies if the clear button should be present in the input */
|
|
21
22
|
allowClear?: boolean | undefined;
|
|
22
23
|
"data-testid"?: string | undefined;
|
|
24
|
+
className?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Specifies if the country code is a fixed value and the user
|
|
27
|
+
* cannot select another option
|
|
28
|
+
*/
|
|
29
|
+
fixedCountry?: boolean | undefined;
|
|
23
30
|
onChange?: ((value: PhoneNumberInputValue) => void) | undefined;
|
|
24
31
|
/** Called when the clear button in the input field is clicked */
|
|
25
32
|
onClear?: () => void | undefined;
|
|
33
|
+
/** Called when a defocus happens */
|
|
34
|
+
onBlur?: (() => void) | undefined;
|
|
26
35
|
/** The placeholder value for the dropdown selector */
|
|
27
36
|
optionPlaceholder?: string | undefined;
|
|
28
37
|
/** The placeholder value for the dropdown search */
|
|
@@ -4,4 +4,4 @@ import { DropdownListProps } from "./types";
|
|
|
4
4
|
* NOTE: This component is not directly exportables
|
|
5
5
|
* but forms part of a component
|
|
6
6
|
*/
|
|
7
|
-
export declare const DropdownList: <T, V>({ listItems, listExtractor, valueExtractor, onSelectItem, listStyleWidth, visible, enableSearch, searchPlaceholder, onSearch, searchFunction, onDismiss, multiSelect, selectedItems, onSelectAll, onRetry, itemsLoadState, itemTruncationType, renderListItem, ...otherProps }: DropdownListProps<T, V>) => JSX.Element;
|
|
7
|
+
export declare const DropdownList: <T, V>({ listItems, listExtractor, valueExtractor, onSelectItem, listStyleWidth, visible, enableSearch, searchPlaceholder, onSearch, searchFunction, onDismiss, multiSelect, selectedItems, onSelectAll, onRetry, itemsLoadState, itemTruncationType, renderListItem, onBlur, ...otherProps }: DropdownListProps<T, V>) => JSX.Element;
|
|
@@ -46,6 +46,7 @@ export interface DropdownListProps<T, V> extends React.HTMLAttributes<HTMLUListE
|
|
|
46
46
|
onDismiss?: (() => void) | undefined;
|
|
47
47
|
onSelectAll?: (() => void) | undefined;
|
|
48
48
|
onRetry?: (() => void) | undefined;
|
|
49
|
+
onBlur?: (() => void) | undefined;
|
|
49
50
|
}
|
|
50
51
|
export interface ListItemSelectorProps {
|
|
51
52
|
onClick?: (() => void) | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface StyleProps {
|
|
2
|
+
disabled?: boolean | undefined;
|
|
3
|
+
$error?: boolean | undefined;
|
|
4
|
+
$readOnly?: boolean | undefined;
|
|
5
|
+
$position?: "left" | "right" | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, StyleProps, never>;
|
|
8
|
+
export {};
|