carbon-react 111.4.0 → 111.4.1
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/esm/__internal__/radio-button-mapper/radio-button-mapper.component.js +1 -0
- package/esm/__internal__/radio-button-mapper/radio-button-mapper.d.ts +0 -1
- package/esm/components/date/__internal__/date-formats/index.d.ts +3 -1
- package/esm/components/date/date.d.ts +1 -2
- package/esm/components/decimal/decimal.component.d.ts +44 -0
- package/esm/components/decimal/decimal.component.js +535 -93
- package/esm/components/decimal/index.d.ts +2 -1
- package/esm/components/heading/heading.style.d.ts +9 -2
- package/esm/components/menu/menu.d.ts +4 -1
- package/esm/components/search/search.d.ts +1 -0
- package/esm/components/select/filterable-select/filterable-select.d.ts +2 -2
- package/esm/components/select/multi-select/multi-select.d.ts +2 -2
- package/esm/components/select/select-textbox/select-textbox.d.ts +1 -1
- package/esm/components/select/simple-select/simple-select.d.ts +1 -1
- package/esm/components/tabs/tabs.d.ts +1 -1
- package/esm/components/typography/index.d.ts +4 -2
- package/esm/components/typography/list.component.d.ts +11 -0
- package/esm/components/typography/list.component.js +915 -4
- package/esm/components/typography/typography.component.d.ts +42 -0
- package/esm/components/typography/typography.component.js +13 -50
- package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.js +1 -0
- package/lib/__internal__/radio-button-mapper/radio-button-mapper.d.ts +0 -1
- package/lib/components/date/__internal__/date-formats/index.d.ts +3 -1
- package/lib/components/date/date.d.ts +1 -2
- package/lib/components/decimal/decimal.component.d.ts +44 -0
- package/lib/components/decimal/decimal.component.js +536 -97
- package/lib/components/decimal/index.d.ts +2 -1
- package/lib/components/heading/heading.style.d.ts +9 -2
- package/lib/components/menu/menu.d.ts +4 -1
- package/lib/components/search/search.d.ts +1 -0
- package/lib/components/select/filterable-select/filterable-select.d.ts +2 -2
- package/lib/components/select/multi-select/multi-select.d.ts +2 -2
- package/lib/components/select/select-textbox/select-textbox.d.ts +1 -1
- package/lib/components/select/simple-select/simple-select.d.ts +1 -1
- package/lib/components/tabs/tabs.d.ts +1 -1
- package/lib/components/typography/index.d.ts +4 -2
- package/lib/components/typography/list.component.d.ts +11 -0
- package/lib/components/typography/list.component.js +914 -3
- package/lib/components/typography/typography.component.d.ts +42 -0
- package/lib/components/typography/typography.component.js +14 -52
- package/package.json +2 -1
- package/esm/components/decimal/decimal.d.ts +0 -37
- package/esm/components/typography/list.d.ts +0 -11
- package/esm/components/typography/typography.d.ts +0 -60
- package/lib/components/decimal/decimal.d.ts +0 -37
- package/lib/components/typography/list.d.ts +0 -11
- package/lib/components/typography/typography.d.ts +0 -60
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { Locale as DateFnsLocale } from "date-fns";
|
|
2
|
+
|
|
1
3
|
interface LocaleFormats {
|
|
2
4
|
formats: string[];
|
|
3
5
|
format: string;
|
|
4
6
|
}
|
|
5
7
|
|
|
6
|
-
declare function getFormatData(
|
|
8
|
+
declare function getFormatData(locale: DateFnsLocale): LocaleFormats;
|
|
7
9
|
|
|
8
10
|
export default getFormatData;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CommonTextboxProps } from "../textbox";
|
|
3
|
+
export interface CustomEvent {
|
|
4
|
+
target: {
|
|
5
|
+
name?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
value: {
|
|
8
|
+
formattedValue: string;
|
|
9
|
+
rawValue: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface DecimalProps extends Omit<CommonTextboxProps, "onChange" | "onBlur"> {
|
|
14
|
+
/** Text alignment of the label */
|
|
15
|
+
align?: "left" | "right";
|
|
16
|
+
/** Allow an empty value instead of defaulting to 0.00 */
|
|
17
|
+
allowEmptyValue?: boolean;
|
|
18
|
+
/** The default value of the input if it's meant to be used as an uncontrolled component */
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
/** The input id */
|
|
21
|
+
id?: string;
|
|
22
|
+
/** The width of the input as a percentage */
|
|
23
|
+
inputWidth?: number;
|
|
24
|
+
/** Handler for change event if input is meant to be used as a controlled component */
|
|
25
|
+
onChange?: (ev: CustomEvent) => void;
|
|
26
|
+
/** Handler for blur event */
|
|
27
|
+
onBlur?: (ev: CustomEvent) => void;
|
|
28
|
+
/** Handler for key press event */
|
|
29
|
+
onKeyPress?: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
30
|
+
/** The input name */
|
|
31
|
+
name?: string;
|
|
32
|
+
/** The decimal precision of the value in the input */
|
|
33
|
+
precision?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
34
|
+
/** If true, the component will be read-only */
|
|
35
|
+
readOnly?: boolean;
|
|
36
|
+
/** Flag to configure component as mandatory */
|
|
37
|
+
required?: boolean;
|
|
38
|
+
/** The value of the input if it's used as a controlled component */
|
|
39
|
+
value?: string;
|
|
40
|
+
/** The locale string - default en */
|
|
41
|
+
locale?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const Decimal: ({ align, defaultValue, precision, inputWidth, readOnly, onChange, onBlur, onKeyPress, id, name, allowEmptyValue, required, locale, value, ...rest }: DecimalProps) => JSX.Element;
|
|
44
|
+
export default Decimal;
|