@servicetitan/anvil2 2.0.3 → 2.1.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 +44 -0
- package/dist/{Calendar-DUGQQkga.js → Calendar-BhCce9hE.js} +19 -845
- package/dist/Calendar-BhCce9hE.js.map +1 -0
- package/dist/{Calendar-BTr5I3t-.js → Calendar-D93exRLI.js} +2 -2
- package/dist/{Calendar-BTr5I3t-.js.map → Calendar-D93exRLI.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-ZXftLNwB.js → Checkbox-DHWOiSml.js} +2 -2
- package/dist/{Checkbox-ZXftLNwB.js.map → Checkbox-DHWOiSml.js.map} +1 -1
- package/dist/{Checkbox-9VbydUcM.js → Checkbox-cVlWQOTq.js} +11 -11
- package/dist/Checkbox-cVlWQOTq.js.map +1 -0
- package/dist/Checkbox.js +1 -1
- package/dist/{Combobox-CNObHLjp.js → Combobox-BGYeW0ZF.js} +3 -3
- package/dist/{Combobox-CNObHLjp.js.map → Combobox-BGYeW0ZF.js.map} +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-CQpySyDq.js → DataTable-Dnt-q7jf.js} +222 -18
- package/dist/DataTable-Dnt-q7jf.js.map +1 -0
- package/dist/{DateFieldRange-Cfnw1Chk.js → DateFieldRange-Dx2YbnQ-.js} +9 -9
- package/dist/DateFieldRange-Dx2YbnQ-.js.map +1 -0
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-BRuERJAl.js → DateFieldSingle-CZg1n-n2.js} +7 -7
- package/dist/DateFieldSingle-CZg1n-n2.js.map +1 -0
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-Dw1k3_PY.js → DateFieldYearless-D7-O2FLP.js} +13 -12
- package/dist/DateFieldYearless-D7-O2FLP.js.map +1 -0
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange--plyld10.js → DateFieldYearlessRange-6EocQch6.js} +13 -12
- package/dist/DateFieldYearlessRange-6EocQch6.js.map +1 -0
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-vE310Rjp.js → DaysOfTheWeek-BfCVsQK7.js} +7 -3
- package/dist/DaysOfTheWeek-BfCVsQK7.js.map +1 -0
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-DZPaz84r.js → Dialog-DVBl8phs.js} +4 -4
- package/dist/{Dialog-DZPaz84r.js.map → Dialog-DVBl8phs.js.map} +1 -1
- package/dist/Dialog.js +1 -1
- package/dist/{Drawer-pMQOa2jH.js → Drawer-c_d511iA.js} +4 -4
- package/dist/{Drawer-pMQOa2jH.js.map → Drawer-c_d511iA.js.map} +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/DrillDown.js +1 -1
- package/dist/{FieldDialog-Be54L3E-.js → FieldDialog-BHDi3oXg.js} +536 -139
- package/dist/FieldDialog-BHDi3oXg.js.map +1 -0
- package/dist/FieldDialog.css +58 -28
- package/dist/FieldMessage-B0LBQl0D.js +132 -0
- package/dist/FieldMessage-B0LBQl0D.js.map +1 -0
- package/dist/FieldMessage.css +18 -4
- package/dist/FieldMessage.js +2 -1
- package/dist/FieldMessage.js.map +1 -1
- package/dist/{Helper-CK-XjpR3.js → Helper-BXiz9ZRC.js} +7 -4
- package/dist/Helper-BXiz9ZRC.js.map +1 -0
- package/dist/{InputMask-DoqWRi3t.js → InputMask-CdJ-cfLV.js} +2 -2
- package/dist/{InputMask-DoqWRi3t.js.map → InputMask-CdJ-cfLV.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{ListView-CtRhYAls.js → ListView-D7GBpVnV.js} +2 -2
- package/dist/{ListView-CtRhYAls.js.map → ListView-D7GBpVnV.js.map} +1 -1
- package/dist/ListView.js +1 -1
- package/dist/MultiSelectField.js +1 -1
- package/dist/{MultiSelectFieldSync-xj7jXas-.js → MultiSelectFieldSync-Bc7IphJ7.js} +158 -57
- package/dist/MultiSelectFieldSync-Bc7IphJ7.js.map +1 -0
- package/dist/NumberField-CcGYnIFG.js +237 -0
- package/dist/NumberField-CcGYnIFG.js.map +1 -0
- package/dist/NumberField.js +1 -1
- package/dist/{Page-vc7zs4tn.js → Page-D_IpquWk.js} +5 -5
- package/dist/{Page-vc7zs4tn.js.map → Page-D_IpquWk.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Popover-OOLK0hUz.js → Popover-BxgfNjyI.js} +3 -2
- package/dist/{Popover-OOLK0hUz.js.map → Popover-BxgfNjyI.js.map} +1 -1
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-HA9RPZfC.js → ProgressBar-B_g3VRUD.js} +15 -10
- package/dist/ProgressBar-B_g3VRUD.js.map +1 -0
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-31wKzlZ4.js → Radio-CtG1jOiO.js} +11 -11
- package/dist/Radio-CtG1jOiO.js.map +1 -0
- package/dist/{Radio-BwWDJuLF.js → Radio-DpSPaTCO.js} +2 -2
- package/dist/{Radio-BwWDJuLF.js.map → Radio-DpSPaTCO.js.map} +1 -1
- package/dist/Radio.js +1 -1
- package/dist/{SelectCard-C91twG1S.js → SelectCard-WXTxM25t.js} +3 -3
- package/dist/{SelectCard-C91twG1S.js.map → SelectCard-WXTxM25t.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldSync-BFsJssdD.js → SelectFieldSync-0UwcyJTA.js} +47 -49
- package/dist/SelectFieldSync-0UwcyJTA.js.map +1 -0
- package/dist/{SelectTrigger-Cxhx9IVo.js → SelectTrigger-DhEe9uk9.js} +2 -2
- package/dist/{SelectTrigger-Cxhx9IVo.js.map → SelectTrigger-DhEe9uk9.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-aaOWep-V.js → SelectTriggerBase-C6HYuH_N.js} +11 -6
- package/dist/SelectTriggerBase-C6HYuH_N.js.map +1 -0
- package/dist/{Stepper-Jv9A3Ned.js → Stepper-D8lkCP8Y.js} +11 -2
- package/dist/Stepper-D8lkCP8Y.js.map +1 -0
- package/dist/Stepper.js +1 -1
- package/dist/{Switch-DQICcdAv.js → Switch-stfkX7Jb.js} +2 -2
- package/dist/{Switch-DQICcdAv.js.map → Switch-stfkX7Jb.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{TextField-CDiiYSlT.js → TextField-DoC8YyDM.js} +12 -11
- package/dist/TextField-DoC8YyDM.js.map +1 -0
- package/dist/{TextField-CnYxS52Y.js → TextField-rpj9q7zM.js} +2 -2
- package/dist/{TextField-CnYxS52Y.js.map → TextField-rpj9q7zM.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-BnHIDj2P.js → Textarea-NLBfav5i.js} +12 -11
- package/dist/Textarea-NLBfav5i.js.map +1 -0
- package/dist/Textarea.js +1 -1
- package/dist/{TimeField-ChqK40k_.js → TimeField-CnhHEvuK.js} +4 -4
- package/dist/{TimeField-ChqK40k_.js.map → TimeField-CnhHEvuK.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-BlycAc63.js → Toaster-Ca0dk3qg.js} +18 -18
- package/dist/Toaster-Ca0dk3qg.js.map +1 -0
- package/dist/{Toaster-DW_bi2L9.js → Toaster-ChpE9e3Z.js} +2 -2
- package/dist/{Toaster-DW_bi2L9.js.map → Toaster-ChpE9e3Z.js.map} +1 -1
- package/dist/{Toolbar-CUjj2YEZ.js → Toolbar-BO_vOFMg.js} +69 -22
- package/dist/Toolbar-BO_vOFMg.js.map +1 -0
- package/dist/Toolbar.js +1 -1
- package/dist/{YearlessDateInputWithPicker-DZSb8sPf.js → YearlessDateInputWithPicker-BqDyd-Vq.js} +3 -3
- package/dist/{YearlessDateInputWithPicker-DZSb8sPf.js.map → YearlessDateInputWithPicker-BqDyd-Vq.js.map} +1 -1
- package/dist/beta/components/MultiSelectField/MultiSelectField.d.ts +2 -0
- package/dist/beta/components/MultiSelectField/MultiSelectFieldSync.d.ts +43 -4
- package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldList.d.ts +5 -5
- package/dist/beta/components/MultiSelectField/internal/useComboMultiple.d.ts +13 -2
- package/dist/beta/components/MultiSelectField/stories/MultiSelectField.stories.data.d.ts +1 -0
- package/dist/beta/components/MultiSelectField/types.d.ts +50 -8
- package/dist/beta/components/SelectField/SelectFieldSync.d.ts +10 -3
- package/dist/beta/components/SelectField/internal/FieldListBase.d.ts +6 -5
- package/dist/beta/components/SelectField/internal/SelectFieldList.d.ts +4 -2
- package/dist/beta/components/SelectField/internal/SelectFieldListItem.d.ts +2 -1
- package/dist/beta/components/SelectField/internal/VirtualizedFieldListBase.d.ts +2 -0
- package/dist/beta/components/SelectField/internal/useCombo.d.ts +3 -1
- package/dist/beta/components/SelectField/internal/useFieldListSections.d.ts +55 -0
- package/dist/beta/components/SelectField/stories/SelectField.stories.data.d.ts +1 -0
- package/dist/beta/components/SelectField/types.d.ts +22 -6
- package/dist/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableNumberCell.d.ts +7 -0
- package/dist/beta/components/Table/DataTable/internal/util/getTanStackColumnDef.d.ts +1 -0
- package/dist/beta/components/Table/DataTable/stories/DataTable.story-data.d.ts +1 -0
- package/dist/beta/components/Table/createColumnHelper.d.ts +36 -9
- package/dist/beta/components/Table/types.d.ts +54 -4
- package/dist/beta/components/Toolbar/Filters/internal/utils/filter-state.d.ts +1 -0
- package/dist/beta.js +7 -7
- package/dist/components/ButtonToggle/ButtonToggle.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +2 -1
- package/dist/components/Checkbox/CheckboxGroup.d.ts +16 -8
- package/dist/components/Checkbox/internal/Checkbox.d.ts +1 -1
- package/dist/components/DateFieldSingle/internal/utils.d.ts +11 -0
- package/dist/components/DateFieldYearless/DateFieldYearless.d.ts +8 -3
- package/dist/components/DateFieldYearlessRange/DateFieldYearlessRange.d.ts +12 -1
- package/dist/components/DaysOfTheWeek/DaysOfTheWeek.d.ts +20 -6
- package/dist/components/Dialog/internal/useInitialFocus.d.ts +5 -1
- package/dist/components/FieldMessage/FieldMessage.d.ts +39 -20
- package/dist/components/FieldMessage/index.d.ts +1 -0
- package/dist/components/FieldMessage/utils.d.ts +7 -0
- package/dist/components/NumberField/NumberField.d.ts +24 -2
- package/dist/components/Page/Page.d.ts +2 -2
- package/dist/components/ProgressBar/ProgressBar.d.ts +8 -3
- package/dist/components/Radio/Radio.d.ts +2 -1
- package/dist/components/Radio/RadioGroup.d.ts +16 -8
- package/dist/components/SelectTrigger/internal/SelectTriggerBase.d.ts +1 -1
- package/dist/components/Stepper/Stepper.d.ts +6 -2
- package/dist/components/TextField/internal/TextField.d.ts +12 -1
- package/dist/components/Textarea/Textarea.d.ts +8 -5
- package/dist/index-DXeGMe23.js +836 -0
- package/dist/index-DXeGMe23.js.map +1 -0
- package/dist/{useOnClickOutside-Cyqbe1n3.js → index.esm-BZV0wNKZ.js} +87 -94
- package/dist/index.esm-BZV0wNKZ.js.map +1 -0
- package/dist/{index.esm-BMOZFPwN.js → index.esm-C2ZhC_8d.js} +2 -2
- package/dist/{index.esm-BMOZFPwN.js.map → index.esm-C2ZhC_8d.js.map} +1 -1
- package/dist/index.js +29 -28
- package/dist/index.js.map +1 -1
- package/dist/internal/components/Helper/Helper.d.ts +12 -3
- package/dist/internal/components/StatusIcon/StatusIcon.d.ts +45 -0
- package/dist/internal/components/StatusIcon/index.d.ts +1 -0
- package/dist/internal/functions/index.d.ts +1 -0
- package/dist/internal/functions/warnOnce.d.ts +5 -0
- package/dist/internal/hooks/useNumberField/useNumberField.d.ts +1 -1
- package/dist/{useDrilldown-lAdB3FFW.js → useDrilldown-CjabTI9n.js} +2 -598
- package/dist/useDrilldown-CjabTI9n.js.map +1 -0
- package/dist/{useInitialFocus-nOW12jQ5.js → useInitialFocus-CdoVwSbr.js} +2 -2
- package/dist/{useInitialFocus-nOW12jQ5.js.map → useInitialFocus-CdoVwSbr.js.map} +1 -1
- package/dist/{NumberField-W1k8V5Qq.js → useNumberField-eMyk7MB8.js} +5 -235
- package/dist/useNumberField-eMyk7MB8.js.map +1 -0
- package/dist/useOnClickOutside-Zw5vzxSq.js +71 -0
- package/dist/useOnClickOutside-Zw5vzxSq.js.map +1 -0
- package/dist/{utils-Cj6v6CZ-.js → utils-BHKRoLps.js} +9 -2
- package/dist/utils-BHKRoLps.js.map +1 -0
- package/dist/utils-pudAMGnO.js +25 -0
- package/dist/utils-pudAMGnO.js.map +1 -0
- package/package.json +10 -10
- package/dist/Calendar-DUGQQkga.js.map +0 -1
- package/dist/Checkbox-9VbydUcM.js.map +0 -1
- package/dist/DataTable-CQpySyDq.js.map +0 -1
- package/dist/DateFieldRange-Cfnw1Chk.js.map +0 -1
- package/dist/DateFieldSingle-BRuERJAl.js.map +0 -1
- package/dist/DateFieldYearless-Dw1k3_PY.js.map +0 -1
- package/dist/DateFieldYearlessRange--plyld10.js.map +0 -1
- package/dist/DaysOfTheWeek-vE310Rjp.js.map +0 -1
- package/dist/FieldDialog-Be54L3E-.js.map +0 -1
- package/dist/FieldMessage-tEr6rWXS.js +0 -54
- package/dist/FieldMessage-tEr6rWXS.js.map +0 -1
- package/dist/Helper-CK-XjpR3.js.map +0 -1
- package/dist/MultiSelectFieldSync-xj7jXas-.js.map +0 -1
- package/dist/NumberField-W1k8V5Qq.js.map +0 -1
- package/dist/ProgressBar-HA9RPZfC.js.map +0 -1
- package/dist/Radio-31wKzlZ4.js.map +0 -1
- package/dist/SelectFieldSync-BFsJssdD.js.map +0 -1
- package/dist/SelectTriggerBase-aaOWep-V.js.map +0 -1
- package/dist/Stepper-Jv9A3Ned.js.map +0 -1
- package/dist/TextField-CDiiYSlT.js.map +0 -1
- package/dist/Textarea-BnHIDj2P.js.map +0 -1
- package/dist/Toaster-BlycAc63.js.map +0 -1
- package/dist/Toolbar-CUjj2YEZ.js.map +0 -1
- package/dist/useDrilldown-lAdB3FFW.js.map +0 -1
- package/dist/useOnClickOutside-Cyqbe1n3.js.map +0 -1
- package/dist/utils-Cj6v6CZ-.js.map +0 -1
|
@@ -20,14 +20,18 @@ export type CheckboxGroupProps = ComponentPropsWithoutRef<"fieldset"> & LayoutUt
|
|
|
20
20
|
*/
|
|
21
21
|
legend: string | ReactElement;
|
|
22
22
|
/**
|
|
23
|
-
* Error state for the field.
|
|
24
|
-
*
|
|
23
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
24
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
25
25
|
*/
|
|
26
|
-
error?:
|
|
26
|
+
error?: boolean | string | ReactElement | string[];
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
29
29
|
*/
|
|
30
30
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
31
|
+
/**
|
|
32
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
33
|
+
*/
|
|
34
|
+
warning?: string | string[];
|
|
31
35
|
/**
|
|
32
36
|
* Description text to display below the field.
|
|
33
37
|
*/
|
|
@@ -69,14 +73,18 @@ export declare const CheckboxGroup: import('react').ForwardRefExoticComponent<Om
|
|
|
69
73
|
*/
|
|
70
74
|
legend: string | ReactElement;
|
|
71
75
|
/**
|
|
72
|
-
* Error state for the field.
|
|
73
|
-
*
|
|
76
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
77
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
74
78
|
*/
|
|
75
|
-
error?:
|
|
79
|
+
error?: boolean | string | ReactElement | string[];
|
|
76
80
|
/**
|
|
77
|
-
*
|
|
81
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
78
82
|
*/
|
|
79
83
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
84
|
+
/**
|
|
85
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
86
|
+
*/
|
|
87
|
+
warning?: string | string[];
|
|
80
88
|
/**
|
|
81
89
|
* Description text to display below the field.
|
|
82
90
|
*/
|
|
@@ -80,7 +80,7 @@ export type CheckboxProps = LayoutUtilProps & Omit<ComponentPropsWithoutRef<"inp
|
|
|
80
80
|
* required
|
|
81
81
|
* />
|
|
82
82
|
*/
|
|
83
|
-
export declare const Checkbox: import('react').ForwardRefExoticComponent<LayoutUtilProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "
|
|
83
|
+
export declare const Checkbox: import('react').ForwardRefExoticComponent<LayoutUtilProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "onClick" | "indeterminate"> & {
|
|
84
84
|
/**
|
|
85
85
|
* Controlled state
|
|
86
86
|
* @default false
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { DateTime } from 'luxon';
|
|
2
|
+
/**
|
|
3
|
+
* Converts a JS Date (created with local timezone midnight) to a UTC Luxon DateTime
|
|
4
|
+
* preserving the local date components (year, month, day).
|
|
5
|
+
*
|
|
6
|
+
* This is necessary because maskitoParseDate creates Date objects using
|
|
7
|
+
* `new Date(year, month, day)` which produces midnight in the local timezone.
|
|
8
|
+
* Directly using DateTime.fromJSDate with zone: "utc" can shift the *calendar day*
|
|
9
|
+
* for timezones where local midnight falls on a different UTC date (typically
|
|
10
|
+
* positive-offset zones), which would change the intended date.
|
|
11
|
+
*/
|
|
12
|
+
export declare function jsDateToUtcDateTime(jsDate: Date): DateTime;
|
|
2
13
|
export declare function convertStringToDate(v: string | null | undefined): DateTime | null | undefined;
|
|
3
14
|
export declare function validateDate({ date, constraints, }: {
|
|
4
15
|
date: DateTime | null;
|
|
@@ -46,9 +46,10 @@ export type DateFieldYearlessProps = Omit<ComponentPropsWithoutRef<"input">, "on
|
|
|
46
46
|
*/
|
|
47
47
|
disablePicker?: boolean;
|
|
48
48
|
/**
|
|
49
|
-
* Error state
|
|
49
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
50
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
50
51
|
*/
|
|
51
|
-
error?:
|
|
52
|
+
error?: boolean | string | ReactElement | string[];
|
|
52
53
|
/**
|
|
53
54
|
* Label for the field
|
|
54
55
|
*/
|
|
@@ -62,9 +63,13 @@ export type DateFieldYearlessProps = Omit<ComponentPropsWithoutRef<"input">, "on
|
|
|
62
63
|
*/
|
|
63
64
|
description?: HelperProps["description"];
|
|
64
65
|
/**
|
|
65
|
-
* Error aria-live
|
|
66
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
66
67
|
*/
|
|
67
68
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
69
|
+
/**
|
|
70
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
71
|
+
*/
|
|
72
|
+
warning?: string | string[];
|
|
68
73
|
/**
|
|
69
74
|
* Size of the input
|
|
70
75
|
*/
|
|
@@ -41,12 +41,23 @@ export type DateFieldYearlessRangeProps = {
|
|
|
41
41
|
* Whether to disable the hint
|
|
42
42
|
*/
|
|
43
43
|
disableHint?: boolean;
|
|
44
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
46
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
47
|
+
*/
|
|
48
|
+
error?: boolean | string | ReactElement | string[];
|
|
45
49
|
label: string;
|
|
46
50
|
hideLabel?: boolean;
|
|
47
51
|
size?: Extract<Size, "small" | "medium" | "large">;
|
|
48
52
|
description?: HelperProps["description"];
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
55
|
+
*/
|
|
49
56
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
57
|
+
/**
|
|
58
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
59
|
+
*/
|
|
60
|
+
warning?: string | string[];
|
|
50
61
|
disabled?: boolean;
|
|
51
62
|
onFocus?: (event: React.FocusEvent) => void;
|
|
52
63
|
onBlur?: (event: React.FocusEvent) => void;
|
|
@@ -36,12 +36,19 @@ export type DaysOfTheWeekProps = {
|
|
|
36
36
|
*/
|
|
37
37
|
description?: ReactElement | string;
|
|
38
38
|
/**
|
|
39
|
-
* Error message to display
|
|
39
|
+
* Error message(s) to display. Supports a single string or an array of strings.
|
|
40
|
+
*/
|
|
41
|
+
error?: string | string[];
|
|
42
|
+
/**
|
|
43
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
44
|
+
*/
|
|
45
|
+
warning?: string | string[];
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Use the `error` prop instead.
|
|
40
48
|
*/
|
|
41
49
|
errorMessage?: ReactElement | string;
|
|
42
50
|
/**
|
|
43
|
-
*
|
|
44
|
-
* @default assertive
|
|
51
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
45
52
|
*/
|
|
46
53
|
errorAriaLive?: AriaAttributes["aria-live"];
|
|
47
54
|
/**
|
|
@@ -115,12 +122,19 @@ export declare const DaysOfTheWeek: import('react').ForwardRefExoticComponent<{
|
|
|
115
122
|
*/
|
|
116
123
|
description?: ReactElement | string;
|
|
117
124
|
/**
|
|
118
|
-
* Error message to display
|
|
125
|
+
* Error message(s) to display. Supports a single string or an array of strings.
|
|
126
|
+
*/
|
|
127
|
+
error?: string | string[];
|
|
128
|
+
/**
|
|
129
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
130
|
+
*/
|
|
131
|
+
warning?: string | string[];
|
|
132
|
+
/**
|
|
133
|
+
* @deprecated Use the `error` prop instead.
|
|
119
134
|
*/
|
|
120
135
|
errorMessage?: ReactElement | string;
|
|
121
136
|
/**
|
|
122
|
-
*
|
|
123
|
-
* @default assertive
|
|
137
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
124
138
|
*/
|
|
125
139
|
errorAriaLive?: AriaAttributes["aria-live"];
|
|
126
140
|
/**
|
|
@@ -12,4 +12,8 @@ export type InitialFocusOptions = {
|
|
|
12
12
|
* @param options - Options for the hook
|
|
13
13
|
* @param options.computeFocus - Function to pick the initial focus target, given an array of focusable elements
|
|
14
14
|
*/
|
|
15
|
-
export declare const useInitialFocus: (
|
|
15
|
+
export declare const useInitialFocus: (
|
|
16
|
+
/**
|
|
17
|
+
* Ref to the dialog element
|
|
18
|
+
*/
|
|
19
|
+
dialogRef: RefObject<HTMLDialogElement>, { computeFocus }: InitialFocusOptions) => void;
|
|
@@ -9,44 +9,53 @@ export type FieldMessageProps = ComponentPropsWithoutRef<"div"> & {
|
|
|
9
9
|
*/
|
|
10
10
|
id?: string;
|
|
11
11
|
/**
|
|
12
|
-
* Hint text or element to display
|
|
12
|
+
* Hint text or element to display. Always visible regardless of error or warning state.
|
|
13
13
|
*/
|
|
14
14
|
hint?: ReactElement | string;
|
|
15
15
|
/**
|
|
16
|
-
* Description text or element to display below the
|
|
16
|
+
* Description text or element to display below the hint.
|
|
17
17
|
*/
|
|
18
18
|
description?: ReactElement | string;
|
|
19
|
+
/**
|
|
20
|
+
* Error message(s) to display. Supports a single string, an array of strings,
|
|
21
|
+
* or a ReactElement (deprecated).
|
|
22
|
+
* All error messages use `aria-live="assertive"`.
|
|
23
|
+
*/
|
|
24
|
+
error?: string | string[] | ReactElement;
|
|
25
|
+
/**
|
|
26
|
+
* Warning message(s) to display. Supports a single string, an array of strings,
|
|
27
|
+
* or a ReactElement (deprecated).
|
|
28
|
+
* All warning messages use `aria-live="polite"`.
|
|
29
|
+
*/
|
|
30
|
+
warning?: string | string[] | ReactElement;
|
|
19
31
|
/**
|
|
20
32
|
* Error message or element to display when there's an error.
|
|
33
|
+
* @deprecated Use the `error` prop instead.
|
|
21
34
|
*/
|
|
22
35
|
errorMessage?: ReactElement | string;
|
|
23
36
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @default assertive
|
|
26
|
-
* @remarks Controls how screen readers announce error messages. "assertive" interrupts current speech, "polite" waits for current speech to finish.
|
|
27
|
-
* @link https://www.w3.org/WAI/tutorials/forms/notifications/
|
|
37
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
28
38
|
*/
|
|
29
39
|
errorAriaLive?: AriaAttributes["aria-live"];
|
|
30
40
|
};
|
|
31
41
|
/**
|
|
32
|
-
* FieldMessage component for displaying hints, descriptions, and
|
|
42
|
+
* FieldMessage component for displaying hints, descriptions, error messages, and warning messages for form fields.
|
|
33
43
|
*
|
|
34
44
|
* Features:
|
|
35
|
-
* - Displays hint text
|
|
36
|
-
* - Shows error messages with
|
|
45
|
+
* - Displays hint text that remains visible regardless of error or warning state
|
|
46
|
+
* - Shows one or more error messages with error icon (aria-live="assertive")
|
|
47
|
+
* - Shows one or more warning messages with warning icon (aria-live="polite")
|
|
37
48
|
* - Supports both string and React element content
|
|
38
|
-
* - Configurable aria-live behavior for screen readers
|
|
39
49
|
* - Optional description text for additional context
|
|
40
50
|
* - Accessible with proper ARIA attributes
|
|
41
|
-
* - Visual error indicators with
|
|
42
|
-
* - Conditional rendering based on error state
|
|
43
|
-
* - Supports layout utilities for positioning and spacing
|
|
51
|
+
* - Visual error and warning indicators with status icons
|
|
44
52
|
*
|
|
45
53
|
* @example
|
|
46
54
|
* <FieldMessage
|
|
47
55
|
* hint="Enter your email address"
|
|
48
56
|
* description="We'll use this to send you updates"
|
|
49
|
-
*
|
|
57
|
+
* error="Please enter a valid email address"
|
|
58
|
+
* warning="This email is associated with another account"
|
|
50
59
|
* />
|
|
51
60
|
*/
|
|
52
61
|
export declare const FieldMessage: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
@@ -55,22 +64,32 @@ export declare const FieldMessage: import('react').ForwardRefExoticComponent<Omi
|
|
|
55
64
|
*/
|
|
56
65
|
id?: string;
|
|
57
66
|
/**
|
|
58
|
-
* Hint text or element to display
|
|
67
|
+
* Hint text or element to display. Always visible regardless of error or warning state.
|
|
59
68
|
*/
|
|
60
69
|
hint?: ReactElement | string;
|
|
61
70
|
/**
|
|
62
|
-
* Description text or element to display below the
|
|
71
|
+
* Description text or element to display below the hint.
|
|
63
72
|
*/
|
|
64
73
|
description?: ReactElement | string;
|
|
74
|
+
/**
|
|
75
|
+
* Error message(s) to display. Supports a single string, an array of strings,
|
|
76
|
+
* or a ReactElement (deprecated).
|
|
77
|
+
* All error messages use `aria-live="assertive"`.
|
|
78
|
+
*/
|
|
79
|
+
error?: string | string[] | ReactElement;
|
|
80
|
+
/**
|
|
81
|
+
* Warning message(s) to display. Supports a single string, an array of strings,
|
|
82
|
+
* or a ReactElement (deprecated).
|
|
83
|
+
* All warning messages use `aria-live="polite"`.
|
|
84
|
+
*/
|
|
85
|
+
warning?: string | string[] | ReactElement;
|
|
65
86
|
/**
|
|
66
87
|
* Error message or element to display when there's an error.
|
|
88
|
+
* @deprecated Use the `error` prop instead.
|
|
67
89
|
*/
|
|
68
90
|
errorMessage?: ReactElement | string;
|
|
69
91
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @default assertive
|
|
72
|
-
* @remarks Controls how screen readers announce error messages. "assertive" interrupts current speech, "polite" waits for current speech to finish.
|
|
73
|
-
* @link https://www.w3.org/WAI/tutorials/forms/notifications/
|
|
92
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
74
93
|
*/
|
|
75
94
|
errorAriaLive?: AriaAttributes["aria-live"];
|
|
76
95
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Logs a dev-only deprecation warning when `error` is passed as a `ReactElement`.
|
|
4
|
+
* String values are the preferred type and are NOT deprecated.
|
|
5
|
+
* Should be called in consumer components that accept the union `error` prop.
|
|
6
|
+
*/
|
|
7
|
+
export declare function warnDeprecatedErrorUsage(componentName: string, error: ReactElement | string | boolean | string[] | undefined): void;
|
|
@@ -3,14 +3,25 @@ import { HelperProps } from '../../internal/components';
|
|
|
3
3
|
import { LayoutUtilProps, Size, DataTrackingId } from '../../types';
|
|
4
4
|
import { FieldLabelProps } from '../../internal/types';
|
|
5
5
|
export type NumberFieldProps = Omit<ComponentPropsWithoutRef<"input">, "size" | "prefix" | "type" | "inputMode" | "value" | "defaultValue" | "onFocus" | "onBlur" | "onChange"> & LayoutUtilProps & FieldLabelProps & {
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
8
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
9
|
+
*/
|
|
10
|
+
error?: boolean | string | ReactElement | string[];
|
|
7
11
|
label?: string;
|
|
8
12
|
prefix?: string;
|
|
9
13
|
suffix?: string;
|
|
10
14
|
size?: Extract<Size, "small" | "medium" | "large">;
|
|
11
15
|
description?: HelperProps["description"];
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
18
|
+
*/
|
|
12
19
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
13
20
|
hint?: HelperProps["hint"];
|
|
21
|
+
/**
|
|
22
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
23
|
+
*/
|
|
24
|
+
warning?: string | string[];
|
|
14
25
|
loading?: boolean;
|
|
15
26
|
disabled?: boolean;
|
|
16
27
|
minValue?: number;
|
|
@@ -28,14 +39,25 @@ export type NumberFieldProps = Omit<ComponentPropsWithoutRef<"input">, "size" |
|
|
|
28
39
|
export declare const NumberField: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "value" | "onBlur" | "onFocus" | "onChange" | "defaultValue" | "prefix" | "inputMode" | "type"> & LayoutUtilProps & Pick<import('../../internal').LabelProps, "required" | "moreInfo"> & {
|
|
29
40
|
labelProps?: Omit<import('../../internal').LabelProps, "children" | "moreInfo" | "required" | "id" | "htmlFor">;
|
|
30
41
|
} & {
|
|
31
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
44
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
45
|
+
*/
|
|
46
|
+
error?: boolean | string | ReactElement | string[];
|
|
32
47
|
label?: string;
|
|
33
48
|
prefix?: string;
|
|
34
49
|
suffix?: string;
|
|
35
50
|
size?: Extract<Size, "small" | "medium" | "large">;
|
|
36
51
|
description?: HelperProps["description"];
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
54
|
+
*/
|
|
37
55
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
38
56
|
hint?: HelperProps["hint"];
|
|
57
|
+
/**
|
|
58
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
59
|
+
*/
|
|
60
|
+
warning?: string | string[];
|
|
39
61
|
loading?: boolean;
|
|
40
62
|
disabled?: boolean;
|
|
41
63
|
minValue?: number;
|
|
@@ -138,9 +138,9 @@ export declare const Page: import('react').ForwardRefExoticComponent<Omit<import
|
|
|
138
138
|
label: string;
|
|
139
139
|
})[];
|
|
140
140
|
};
|
|
141
|
-
preferenceAction?: (Omit<import('..').ButtonProps, "size" | "className" | "aria-label" | "
|
|
141
|
+
preferenceAction?: (Omit<import('..').ButtonProps, "size" | "className" | "aria-label" | "appearance" | "icon"> & {
|
|
142
142
|
"aria-label": string;
|
|
143
|
-
}) | (Omit<import('..').ButtonLinkProps, "size" | "className" | "aria-label" | "
|
|
143
|
+
}) | (Omit<import('..').ButtonLinkProps, "size" | "className" | "aria-label" | "appearance" | "icon"> & {
|
|
144
144
|
"aria-label": string;
|
|
145
145
|
});
|
|
146
146
|
layout?: import('..').LayoutProps;
|
|
@@ -9,14 +9,19 @@ import { LayoutUtilProps } from '../../types';
|
|
|
9
9
|
*/
|
|
10
10
|
export type ProgressBarProps = Omit<ComponentPropsWithoutRef<"progress">, "value"> & LayoutUtilProps & {
|
|
11
11
|
/**
|
|
12
|
-
* Error state
|
|
12
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
13
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
13
14
|
* @default false
|
|
14
15
|
*/
|
|
15
|
-
error?:
|
|
16
|
+
error?: boolean | string | ReactElement | string[];
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
18
19
|
*/
|
|
19
20
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
21
|
+
/**
|
|
22
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
23
|
+
*/
|
|
24
|
+
warning?: string | string[];
|
|
20
25
|
/**
|
|
21
26
|
* Description text to display below the progress bar
|
|
22
27
|
*/
|
|
@@ -90,8 +90,9 @@ export declare const Radio: import('react').ForwardRefExoticComponent<Omit<CoreR
|
|
|
90
90
|
Group: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref"> & import('..').LayoutUtilProps & Omit<import('../../internal').FieldLabelProps, "labelProps"> & {
|
|
91
91
|
required?: boolean;
|
|
92
92
|
legend: string | import('react').ReactElement;
|
|
93
|
-
error?: import('
|
|
93
|
+
error?: boolean | string | import('react').ReactElement | string[];
|
|
94
94
|
errorAriaLive?: import('../../internal').HelperProps["errorAriaLive"];
|
|
95
|
+
warning?: string | string[];
|
|
95
96
|
description?: import('../../internal').HelperProps["description"];
|
|
96
97
|
hint?: import('../../internal').HelperProps["hint"];
|
|
97
98
|
} & import('react').RefAttributes<HTMLFieldSetElement>>;
|
|
@@ -19,14 +19,18 @@ export type RadioGroupProps = ComponentPropsWithoutRef<"fieldset"> & LayoutUtilP
|
|
|
19
19
|
*/
|
|
20
20
|
legend: string | ReactElement;
|
|
21
21
|
/**
|
|
22
|
-
* Error state for the field.
|
|
23
|
-
*
|
|
22
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
23
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
24
24
|
*/
|
|
25
|
-
error?:
|
|
25
|
+
error?: boolean | string | ReactElement | string[];
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
28
28
|
*/
|
|
29
29
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
30
|
+
/**
|
|
31
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
32
|
+
*/
|
|
33
|
+
warning?: string | string[];
|
|
30
34
|
/**
|
|
31
35
|
* Description text to display below the field.
|
|
32
36
|
*/
|
|
@@ -77,14 +81,18 @@ export declare const RadioGroup: import('react').ForwardRefExoticComponent<Omit<
|
|
|
77
81
|
*/
|
|
78
82
|
legend: string | ReactElement;
|
|
79
83
|
/**
|
|
80
|
-
* Error state for the field.
|
|
81
|
-
*
|
|
84
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
85
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
82
86
|
*/
|
|
83
|
-
error?:
|
|
87
|
+
error?: boolean | string | ReactElement | string[];
|
|
84
88
|
/**
|
|
85
|
-
*
|
|
89
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
86
90
|
*/
|
|
87
91
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
92
|
+
/**
|
|
93
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
94
|
+
*/
|
|
95
|
+
warning?: string | string[];
|
|
88
96
|
/**
|
|
89
97
|
* Description text to display below the field.
|
|
90
98
|
*/
|
|
@@ -36,5 +36,5 @@ export type SelectTriggerBaseProps<Item = unknown> = DistributiveOmit<TextFieldP
|
|
|
36
36
|
} & {
|
|
37
37
|
prefix?: string | ReactNode;
|
|
38
38
|
};
|
|
39
|
-
export declare const SelectTriggerBase: <Item>({ className, label, size, error, hint, description, prefix, suffix, maxRows, selectedItemProps, disabled, readOnly, disableClearSelection, itemToString: itemToStringProp, selectedItem, selectedItems, removeSelectedItem, inputValue, referenceRef, variant, onClearButtonClick, labelProps, inputWrapperProps, toggleButtonProps, inputProps, chipProps, placeholder, ...rest }: SelectTriggerBaseProps<Item>) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const SelectTriggerBase: <Item>({ className, label, size, error, hint, description, prefix, suffix, maxRows, selectedItemProps, disabled, readOnly, disableClearSelection, itemToString: itemToStringProp, selectedItem, selectedItems, removeSelectedItem, inputValue, referenceRef, variant, onClearButtonClick, labelProps, inputWrapperProps, toggleButtonProps, inputProps, chipProps, warning, placeholder, ...rest }: SelectTriggerBaseProps<Item>) => import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
export {};
|
|
@@ -7,7 +7,9 @@ import { LayoutUtilProps } from '../../types';
|
|
|
7
7
|
*/
|
|
8
8
|
export type StepperProps = Omit<ComponentPropsWithoutRef<"div">, "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "onChange"> & LayoutUtilProps & {
|
|
9
9
|
/**
|
|
10
|
-
* Default step to start on.
|
|
10
|
+
* Default step to start on (0-based index).
|
|
11
|
+
* To start in the completed state (showing FinalPanel with all steps marked complete),
|
|
12
|
+
* set this to the total number of steps (e.g. `items.length`).
|
|
11
13
|
* @default undefined
|
|
12
14
|
*/
|
|
13
15
|
defaultIndex?: number;
|
|
@@ -80,7 +82,9 @@ export type StepperProps = Omit<ComponentPropsWithoutRef<"div">, "onAnimationSta
|
|
|
80
82
|
*/
|
|
81
83
|
export declare const Stepper: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onChange" | "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart"> & LayoutUtilProps & {
|
|
82
84
|
/**
|
|
83
|
-
* Default step to start on.
|
|
85
|
+
* Default step to start on (0-based index).
|
|
86
|
+
* To start in the completed state (showing FinalPanel with all steps marked complete),
|
|
87
|
+
* set this to the total number of steps (e.g. `items.length`).
|
|
84
88
|
* @default undefined
|
|
85
89
|
*/
|
|
86
90
|
defaultIndex?: number;
|
|
@@ -3,15 +3,26 @@ import { DataTrackingId, LayoutUtilProps, Size, MaxLengthCounterProps } from '..
|
|
|
3
3
|
import { HelperProps } from '../../../internal/components';
|
|
4
4
|
import { FieldLabelProps } from '../../FieldLabel';
|
|
5
5
|
export type TextFieldProps = Omit<ComponentPropsWithoutRef<"input">, "size" | "prefix"> & LayoutUtilProps & {
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
8
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
9
|
+
*/
|
|
10
|
+
error?: boolean | string | ReactElement | string[];
|
|
7
11
|
label?: FieldLabelProps["children"];
|
|
8
12
|
prefix?: string | ReactElement;
|
|
9
13
|
suffix?: string | ReactElement;
|
|
10
14
|
size?: Extract<Size, "small" | "medium" | "large">;
|
|
11
15
|
type?: "text" | "email" | "tel" | "url" | "password" | "number";
|
|
12
16
|
description?: HelperProps["description"];
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
19
|
+
*/
|
|
13
20
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
14
21
|
hint?: HelperProps["hint"];
|
|
22
|
+
/**
|
|
23
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
24
|
+
*/
|
|
25
|
+
warning?: string | string[];
|
|
15
26
|
loading?: boolean;
|
|
16
27
|
disabled?: boolean;
|
|
17
28
|
labelProps?: FieldLabelProps;
|
|
@@ -8,11 +8,10 @@ import { TextareaAutosizeConditionalProps, TextareaState } from './types';
|
|
|
8
8
|
*/
|
|
9
9
|
export type TextareaProps = Omit<ComponentPropsWithoutRef<"textarea">, "onChange"> & LayoutUtilProps & DataTrackingId & MaxLengthCounterProps & TextareaAutosizeConditionalProps & Pick<FieldLabelProps, "moreInfo" | "moreInfoOpen"> & {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* Note: error string replaces helpText over, if both present.
|
|
11
|
+
* Error state for the field. Pass `true` to indicate error styling without a message.
|
|
12
|
+
* Pass a string, string[], or ReactElement (deprecated) for error messages.
|
|
14
13
|
*/
|
|
15
|
-
error?:
|
|
14
|
+
error?: boolean | string | ReactElement | string[];
|
|
16
15
|
/**
|
|
17
16
|
* Hint text displayed below the textarea
|
|
18
17
|
*/
|
|
@@ -43,9 +42,13 @@ export type TextareaProps = Omit<ComponentPropsWithoutRef<"textarea">, "onChange
|
|
|
43
42
|
labelProps?: FieldLabelProps;
|
|
44
43
|
} & {
|
|
45
44
|
/**
|
|
46
|
-
*
|
|
45
|
+
* @deprecated No longer used. Error messages always use `aria-live="assertive"`.
|
|
47
46
|
*/
|
|
48
47
|
errorAriaLive?: HelperProps["errorAriaLive"];
|
|
48
|
+
/**
|
|
49
|
+
* Warning message(s) to display. Supports a single string or an array of strings.
|
|
50
|
+
*/
|
|
51
|
+
warning?: string | string[];
|
|
49
52
|
};
|
|
50
53
|
/**
|
|
51
54
|
* Textarea component for multi-line text input with advanced features.
|