@lifesg/react-design-system 1.0.0-alpha.17 → 1.0.0-alpha.18
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/card/types.d.ts +1 -1
- package/checkbox/checkbox.d.ts +1 -1
- package/checkbox/index.js +6 -6
- package/checkbox/index.js.map +1 -1
- package/cjs/index.js +101 -29
- package/cjs/index.js.map +1 -1
- package/color/types.d.ts +1 -1
- package/date-input/date-input.d.ts +1 -1
- package/date-input/index.js +76 -76
- package/date-input/index.js.map +1 -1
- package/date-input/types.d.ts +6 -19
- package/feedback-rating/feedback-rating-stars-container.styles.d.ts +1 -1
- package/feedback-rating/feedback-rating.styles.d.ts +1 -1
- package/feedback-rating/index.js.map +1 -1
- package/footer/index.js +2 -2
- package/footer/index.js.map +1 -1
- package/footer/types.d.ts +2 -2
- package/form/index.js +455 -442
- package/form/index.js.map +1 -1
- package/form/types.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +101 -29
- package/index.js.map +1 -1
- package/input-group/index.js +14 -2
- package/input-group/index.js.map +1 -1
- package/input-group/types.d.ts +6 -6
- package/input-select/index.js +15 -3
- package/input-select/index.js.map +1 -1
- package/input-select/input-select-wrapper.d.ts +1 -1
- package/input-select/input-select.styles.d.ts +1 -0
- package/input-select/types.d.ts +11 -9
- package/input-textarea/types.d.ts +1 -1
- package/link-list/types.d.ts +1 -1
- package/modal/types.d.ts +3 -3
- package/navbar/brand.d.ts +1 -1
- package/navbar/index.js.map +1 -1
- package/navbar/types.d.ts +5 -5
- package/notification-banner/types.d.ts +1 -1
- package/overlay/types.d.ts +1 -1
- package/package.json +1 -1
- package/popover/types.d.ts +3 -3
- package/progress-indicator/types.d.ts +1 -1
- package/shared/dropdown-list/dropdown-list.styles.d.ts +1 -1
- package/shared/dropdown-list/types.d.ts +11 -11
- package/smart-app-banner/types.d.ts +1 -1
- package/timepicker/types.d.ts +3 -3
- package/unit-number/types.d.ts +5 -5
- package/util/date-helper.d.ts +19 -0
- package/util/index.d.ts +2 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputSelectWrapperProps } from "./types";
|
|
3
|
-
export declare const InputSelectWrapper: ({ children, show, error, disabled, testId, onBlur, }: InputSelectWrapperProps) => JSX.Element;
|
|
3
|
+
export declare const InputSelectWrapper: ({ children, show, error, disabled, testId, onBlur, readOnly, }: InputSelectWrapperProps) => JSX.Element;
|
package/input-select/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DropdownDisplayProps, DropdownSearchProps, DropdownStyleProps, ItemsLoadStateType, TruncateType } from "../shared/dropdown-list/types";
|
|
3
3
|
export interface InputSelectOptionsProps<T> {
|
|
4
|
-
options: T[]
|
|
4
|
+
options: T[];
|
|
5
5
|
/**
|
|
6
6
|
* Used when options are loaded from an api call.
|
|
7
7
|
* Values: "loading" | "fail" | "success"
|
|
@@ -9,9 +9,9 @@ export interface InputSelectOptionsProps<T> {
|
|
|
9
9
|
optionsLoadState?: ItemsLoadStateType | undefined;
|
|
10
10
|
/** Specifies the truncation type. Truncated text will be replaced with ellipsis. Values: "middle" | "end" */
|
|
11
11
|
optionTruncationType?: TruncateType | undefined;
|
|
12
|
-
onShowOptions?: () => void | undefined;
|
|
13
|
-
onHideOptions?: () => void | undefined;
|
|
14
|
-
onRetry?: () => void | undefined;
|
|
12
|
+
onShowOptions?: (() => void) | undefined;
|
|
13
|
+
onHideOptions?: (() => void) | undefined;
|
|
14
|
+
onRetry?: (() => void) | undefined;
|
|
15
15
|
}
|
|
16
16
|
export interface InputSelectSharedProps<T> {
|
|
17
17
|
/** HTML button props */
|
|
@@ -30,22 +30,24 @@ export interface InputSelectWrapperProps {
|
|
|
30
30
|
error?: boolean | undefined;
|
|
31
31
|
disabled?: boolean | undefined;
|
|
32
32
|
testId?: string | undefined;
|
|
33
|
+
readOnly?: boolean | undefined;
|
|
33
34
|
}
|
|
34
35
|
export interface InputSelectProps<T, V> extends React.HTMLAttributes<HTMLElement>, InputSelectOptionsProps<T>, InputSelectSharedProps<T>, DropdownDisplayProps<T, V>, DropdownSearchProps<T>, DropdownStyleProps {
|
|
36
|
+
readOnly?: boolean | undefined;
|
|
35
37
|
selectedOption?: T | undefined;
|
|
36
|
-
onSelectOption?: (option: T, extractedValue: V) => void | undefined;
|
|
38
|
+
onSelectOption?: ((option: T, extractedValue: V) => void) | undefined;
|
|
37
39
|
/** Function to derive display value for selected option */
|
|
38
|
-
displayValueExtractor?: (option: T) => string | undefined;
|
|
40
|
+
displayValueExtractor?: ((option: T) => string) | undefined;
|
|
39
41
|
/** Function to convert value into a string */
|
|
40
|
-
valueToStringFunction?: (value: V) => string | undefined;
|
|
42
|
+
valueToStringFunction?: ((value: V) => string) | undefined;
|
|
41
43
|
/** Function to render selected custom component */
|
|
42
|
-
renderCustomSelectedOption?: (option: T) => JSX.Element | undefined;
|
|
44
|
+
renderCustomSelectedOption?: ((option: T) => JSX.Element) | undefined;
|
|
43
45
|
}
|
|
44
46
|
/** To be exposed for Form component inheritance */
|
|
45
47
|
export declare type InputSelectPartialProps<T, V> = Omit<InputSelectProps<T, V>, "error">;
|
|
46
48
|
export interface InputMultiSelectProps<T, V> extends React.HTMLAttributes<HTMLElement>, InputSelectOptionsProps<T>, InputSelectSharedProps<T>, DropdownDisplayProps<T, V>, DropdownSearchProps<T>, DropdownStyleProps {
|
|
47
49
|
selectedOptions?: T[] | undefined;
|
|
48
|
-
onSelectOptions?: (options: T[]) => void | undefined;
|
|
50
|
+
onSelectOptions?: ((options: T[]) => void) | undefined;
|
|
49
51
|
}
|
|
50
52
|
/** To be exposed for Form component inheritance */
|
|
51
53
|
export declare type InputMultiSelectPartialProps<T, V> = Omit<InputMultiSelectProps<T, V>, "error">;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
3
|
error?: boolean | undefined;
|
|
4
4
|
"data-testid"?: string | undefined;
|
|
5
|
-
renderCustomCounter?: (maxLength: number, currentValueLength: number) => JSX.Element;
|
|
5
|
+
renderCustomCounter?: ((maxLength: number, currentValueLength: number) => JSX.Element) | undefined;
|
|
6
6
|
}
|
|
7
7
|
/** To be exposed for Form component inheritance */
|
|
8
8
|
export declare type TextareaPartialProps = Omit<TextareaProps, "error">;
|
package/link-list/types.d.ts
CHANGED
|
@@ -16,5 +16,5 @@ export interface LinkListProps<T> {
|
|
|
16
16
|
className?: string | undefined;
|
|
17
17
|
"data-testid"?: string | undefined;
|
|
18
18
|
/** Captures item clicks on a component level */
|
|
19
|
-
onItemClick?: (item: LinkListItemProps<T>, event: React.MouseEvent<HTMLAnchorElement>) => void | undefined;
|
|
19
|
+
onItemClick?: ((item: LinkListItemProps<T>, event: React.MouseEvent<HTMLAnchorElement>) => void) | undefined;
|
|
20
20
|
}
|
package/modal/types.d.ts
CHANGED
|
@@ -9,12 +9,12 @@ export interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
/** The identifier of the element to inject the Modal into */
|
|
10
10
|
rootComponentId?: string | undefined;
|
|
11
11
|
zIndex?: number | undefined;
|
|
12
|
-
onOverlayClick?: () => void | undefined;
|
|
12
|
+
onOverlayClick?: (() => void) | undefined;
|
|
13
13
|
/** Dismiss keyboard to keep modal in fullscreen */
|
|
14
|
-
dismissKeyboardOnShow?: boolean;
|
|
14
|
+
dismissKeyboardOnShow?: boolean | undefined;
|
|
15
15
|
}
|
|
16
16
|
export interface ModalBoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
17
17
|
children: JSX.Element | JSX.Element[];
|
|
18
18
|
showCloseButton?: boolean | undefined;
|
|
19
|
-
onClose?: () => void | undefined;
|
|
19
|
+
onClose?: (() => void) | undefined;
|
|
20
20
|
}
|
package/navbar/brand.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ interface Props {
|
|
|
4
4
|
resources: NavbarResourcesProps;
|
|
5
5
|
compress?: boolean | undefined;
|
|
6
6
|
"data-testid"?: string | undefined;
|
|
7
|
-
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void | undefined;
|
|
7
|
+
onClick?: ((event: React.MouseEvent<HTMLAnchorElement>) => void) | undefined;
|
|
8
8
|
}
|
|
9
9
|
export declare const Brand: ({ resources, compress, onClick, "data-testid": testId, }: Props) => JSX.Element;
|
|
10
10
|
export {};
|