@orianatech/pire 1.5.0 → 2.0.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/dist/components/forms/ChoiceCardGroup.d.cts +11 -1
- package/dist/components/forms/ChoiceCardGroup.d.ts +11 -1
- package/dist/components/forms/ChoiceCardGroup.d.ts.map +1 -1
- package/dist/components/forms/ComboBox.d.cts +11 -1
- package/dist/components/forms/ComboBox.d.ts +11 -1
- package/dist/components/forms/ComboBox.d.ts.map +1 -1
- package/dist/components/forms/DatePicker.d.cts +11 -1
- package/dist/components/forms/DatePicker.d.ts +11 -1
- package/dist/components/forms/DatePicker.d.ts.map +1 -1
- package/dist/components/forms/DateRangePicker.d.cts +11 -1
- package/dist/components/forms/DateRangePicker.d.ts +11 -1
- package/dist/components/forms/DateRangePicker.d.ts.map +1 -1
- package/dist/components/forms/FieldDescription.d.cts +16 -0
- package/dist/components/forms/FieldDescription.d.ts +17 -0
- package/dist/components/forms/FieldDescription.d.ts.map +1 -0
- package/dist/components/forms/FieldHelp.d.cts +19 -0
- package/dist/components/forms/FieldHelp.d.ts +20 -0
- package/dist/components/forms/FieldHelp.d.ts.map +1 -0
- package/dist/components/forms/FieldLabel.d.cts +36 -0
- package/dist/components/forms/FieldLabel.d.ts +37 -0
- package/dist/components/forms/FieldLabel.d.ts.map +1 -0
- package/dist/components/forms/FormField.d.cts +10 -1
- package/dist/components/forms/FormField.d.ts +10 -1
- package/dist/components/forms/FormField.d.ts.map +1 -1
- package/dist/components/forms/Input.d.cts +11 -1
- package/dist/components/forms/Input.d.ts +11 -1
- package/dist/components/forms/Input.d.ts.map +1 -1
- package/dist/components/forms/MultiComboBox.d.cts +11 -1
- package/dist/components/forms/MultiComboBox.d.ts +11 -1
- package/dist/components/forms/MultiComboBox.d.ts.map +1 -1
- package/dist/components/forms/NumberField.d.cts +11 -1
- package/dist/components/forms/NumberField.d.ts +11 -1
- package/dist/components/forms/NumberField.d.ts.map +1 -1
- package/dist/components/forms/Select.d.cts +38 -4
- package/dist/components/forms/Select.d.ts +38 -4
- package/dist/components/forms/Select.d.ts.map +1 -1
- package/dist/components/forms/TextArea.d.cts +11 -1
- package/dist/components/forms/TextArea.d.ts +11 -1
- package/dist/components/forms/TextArea.d.ts.map +1 -1
- package/dist/components/patterns/NumPad.d.cts +19 -2
- package/dist/components/patterns/NumPad.d.ts +19 -2
- package/dist/components/patterns/NumPad.d.ts.map +1 -1
- package/dist/components/utils/decimalSeparator.d.cts +9 -0
- package/dist/components/utils/decimalSeparator.d.ts +10 -0
- package/dist/components/utils/decimalSeparator.d.ts.map +1 -0
- package/dist/components/utils/devWarn.d.cts +9 -0
- package/dist/components/utils/devWarn.d.ts +10 -0
- package/dist/components/utils/devWarn.d.ts.map +1 -0
- package/dist/components.css +19 -0
- package/dist/i18n/messages.d.cts +16 -1
- package/dist/i18n/messages.d.ts +16 -1
- package/dist/i18n/messages.d.ts.map +1 -1
- package/dist/index.cjs +988 -845
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +874 -752
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,16 @@ export interface ChoiceCardGroupProps {
|
|
|
22
22
|
/** Guidance that applies to the group as a whole, below the cards — not a per-option detail,
|
|
23
23
|
* which belongs in that option's `description`. */
|
|
24
24
|
description?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
27
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
28
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
29
|
+
*
|
|
30
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
31
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
32
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
33
|
+
*/
|
|
34
|
+
help?: React.ReactNode;
|
|
25
35
|
/** Shown when `isRequired` and nothing has been chosen at validation time. */
|
|
26
36
|
errorMessage?: React.ReactNode;
|
|
27
37
|
options: ChoiceCardOption[];
|
|
@@ -47,4 +57,4 @@ export interface ChoiceCardGroupProps {
|
|
|
47
57
|
* posting mode. Use it when the choice deserves a sentence; use `Radio` when the label is enough
|
|
48
58
|
* and `SegmentedControl` when the options only change how data is displayed.
|
|
49
59
|
*/
|
|
50
|
-
export declare function ChoiceCardGroup({ label, description, errorMessage, options, value, defaultValue, onChange, columns, isDisabled, isRequired, className, style, ...rest }: ChoiceCardGroupProps): React.JSX.Element;
|
|
60
|
+
export declare function ChoiceCardGroup({ label, description, help, errorMessage, options, value, defaultValue, onChange, columns, isDisabled, isRequired, className, style, ...rest }: ChoiceCardGroupProps): React.JSX.Element;
|
|
@@ -22,6 +22,16 @@ export interface ChoiceCardGroupProps {
|
|
|
22
22
|
/** Guidance that applies to the group as a whole, below the cards — not a per-option detail,
|
|
23
23
|
* which belongs in that option's `description`. */
|
|
24
24
|
description?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
27
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
28
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
29
|
+
*
|
|
30
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
31
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
32
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
33
|
+
*/
|
|
34
|
+
help?: React.ReactNode;
|
|
25
35
|
/** Shown when `isRequired` and nothing has been chosen at validation time. */
|
|
26
36
|
errorMessage?: React.ReactNode;
|
|
27
37
|
options: ChoiceCardOption[];
|
|
@@ -47,5 +57,5 @@ export interface ChoiceCardGroupProps {
|
|
|
47
57
|
* posting mode. Use it when the choice deserves a sentence; use `Radio` when the label is enough
|
|
48
58
|
* and `SegmentedControl` when the options only change how data is displayed.
|
|
49
59
|
*/
|
|
50
|
-
export declare function ChoiceCardGroup({ label, description, errorMessage, options, value, defaultValue, onChange, columns, isDisabled, isRequired, className, style, ...rest }: ChoiceCardGroupProps): React.JSX.Element;
|
|
60
|
+
export declare function ChoiceCardGroup({ label, description, help, errorMessage, options, value, defaultValue, onChange, columns, isDisabled, isRequired, className, style, ...rest }: ChoiceCardGroupProps): React.JSX.Element;
|
|
51
61
|
//# sourceMappingURL=ChoiceCardGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChoiceCardGroup.d.ts","sourceRoot":"","sources":["../../../src/components/forms/ChoiceCardGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChoiceCardGroup.d.ts","sourceRoot":"","sources":["../../../src/components/forms/ChoiceCardGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAOpC,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mFAAmF;IACnF,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;6FACyF;IACzF,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;0FACsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,iGAAiG;IACjG,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;oBAEgB;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;wDACoD;IACpD,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,yGAAyG;IACzG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC;iFAC6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;iHAC6G;IAC7G,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;iEAC6D;IAC7D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,OAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,oBAAoB,qBAuCtB"}
|
|
@@ -65,6 +65,16 @@ export interface ComboBoxProps {
|
|
|
65
65
|
onLoadMore?: () => void;
|
|
66
66
|
placeholder?: string;
|
|
67
67
|
description?: React.ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
70
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
71
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
72
|
+
*
|
|
73
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
74
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
75
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
76
|
+
*/
|
|
77
|
+
help?: React.ReactNode;
|
|
68
78
|
errorMessage?: React.ReactNode;
|
|
69
79
|
isInvalid?: boolean;
|
|
70
80
|
isDisabled?: boolean;
|
|
@@ -80,4 +90,4 @@ export interface ComboBoxProps {
|
|
|
80
90
|
}
|
|
81
91
|
/** Type-ahead picker for lists too long to scroll — material, cost centre, G/L account.
|
|
82
92
|
* Below ~10 fixed options use Select; for master-data search with several columns use ValueHelpField. */
|
|
83
|
-
export declare function ComboBox({ label, value, defaultValue, onChange, onInputChange, inputValue, options, description, errorMessage, size, fullWidth, isFilteredExternally, isLoading, loadingLabel, emptyLabel, isClearable, clearLabel, onLoadMore, className, style, ...rest }: ComboBoxProps): React.JSX.Element;
|
|
93
|
+
export declare function ComboBox({ label, value, defaultValue, onChange, onInputChange, inputValue, options, description, help, errorMessage, size, fullWidth, isFilteredExternally, isLoading, loadingLabel, emptyLabel, isClearable, clearLabel, onLoadMore, className, style, ...rest }: ComboBoxProps): React.JSX.Element;
|
|
@@ -65,6 +65,16 @@ export interface ComboBoxProps {
|
|
|
65
65
|
onLoadMore?: () => void;
|
|
66
66
|
placeholder?: string;
|
|
67
67
|
description?: React.ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
70
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
71
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
72
|
+
*
|
|
73
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
74
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
75
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
76
|
+
*/
|
|
77
|
+
help?: React.ReactNode;
|
|
68
78
|
errorMessage?: React.ReactNode;
|
|
69
79
|
isInvalid?: boolean;
|
|
70
80
|
isDisabled?: boolean;
|
|
@@ -80,5 +90,5 @@ export interface ComboBoxProps {
|
|
|
80
90
|
}
|
|
81
91
|
/** Type-ahead picker for lists too long to scroll — material, cost centre, G/L account.
|
|
82
92
|
* Below ~10 fixed options use Select; for master-data search with several columns use ValueHelpField. */
|
|
83
|
-
export declare function ComboBox({ label, value, defaultValue, onChange, onInputChange, inputValue, options, description, errorMessage, size, fullWidth, isFilteredExternally, isLoading, loadingLabel, emptyLabel, isClearable, clearLabel, onLoadMore, className, style, ...rest }: ComboBoxProps): React.JSX.Element;
|
|
93
|
+
export declare function ComboBox({ label, value, defaultValue, onChange, onInputChange, inputValue, options, description, help, errorMessage, size, fullWidth, isFilteredExternally, isLoading, loadingLabel, emptyLabel, isClearable, clearLabel, onLoadMore, className, style, ...rest }: ComboBoxProps): React.JSX.Element;
|
|
84
94
|
//# sourceMappingURL=ComboBox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../src/components/forms/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;IACzC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE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KAAK,CAAC,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4GAA4G;IAC5G,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAKD;0GAC0G;AAC1G,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,UAAU,EACV,OAAY,EACZ,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,IAAW,EACX,SAAgB,EAChB,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,aAAa,qBAuJf"}
|
|
@@ -28,6 +28,16 @@ export interface DatePickerProps<TFormat extends 'object' | 'iso' = 'object'> {
|
|
|
28
28
|
/** Return true for dates that cannot be picked — factory calendar, blocked periods. */
|
|
29
29
|
isDateUnavailable?: (date: DateValue) => boolean;
|
|
30
30
|
description?: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
33
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
34
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
35
|
+
*
|
|
36
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
37
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
38
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
39
|
+
*/
|
|
40
|
+
help?: React.ReactNode;
|
|
31
41
|
errorMessage?: React.ReactNode;
|
|
32
42
|
isInvalid?: boolean;
|
|
33
43
|
isDisabled?: boolean;
|
|
@@ -52,4 +62,4 @@ export interface DatePickerProps<TFormat extends 'object' | 'iso' = 'object'> {
|
|
|
52
62
|
/** Date entry with a segmented field and a calendar popover. Segments follow the user's locale,
|
|
53
63
|
* so a German user types dd.mm.yyyy without any prop change. Wrap the app in React Aria's
|
|
54
64
|
* I18nProvider to pin a locale. */
|
|
55
|
-
export declare function DatePicker<TFormat extends 'object' | 'iso' = 'object'>({ label, description, errorMessage, size, fullWidth, className, style, value, defaultValue, onChange, valueFormat, minValue, maxValue, isClearable, clearLabel, ...rest }: DatePickerProps<TFormat>): React.JSX.Element;
|
|
65
|
+
export declare function DatePicker<TFormat extends 'object' | 'iso' = 'object'>({ label, description, help, errorMessage, size, fullWidth, className, style, value, defaultValue, onChange, valueFormat, minValue, maxValue, isClearable, clearLabel, ...rest }: DatePickerProps<TFormat>): React.JSX.Element;
|
|
@@ -28,6 +28,16 @@ export interface DatePickerProps<TFormat extends 'object' | 'iso' = 'object'> {
|
|
|
28
28
|
/** Return true for dates that cannot be picked — factory calendar, blocked periods. */
|
|
29
29
|
isDateUnavailable?: (date: DateValue) => boolean;
|
|
30
30
|
description?: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
33
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
34
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
35
|
+
*
|
|
36
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
37
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
38
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
39
|
+
*/
|
|
40
|
+
help?: React.ReactNode;
|
|
31
41
|
errorMessage?: React.ReactNode;
|
|
32
42
|
isInvalid?: boolean;
|
|
33
43
|
isDisabled?: boolean;
|
|
@@ -52,5 +62,5 @@ export interface DatePickerProps<TFormat extends 'object' | 'iso' = 'object'> {
|
|
|
52
62
|
/** Date entry with a segmented field and a calendar popover. Segments follow the user's locale,
|
|
53
63
|
* so a German user types dd.mm.yyyy without any prop change. Wrap the app in React Aria's
|
|
54
64
|
* I18nProvider to pin a locale. */
|
|
55
|
-
export declare function DatePicker<TFormat extends 'object' | 'iso' = 'object'>({ label, description, errorMessage, size, fullWidth, className, style, value, defaultValue, onChange, valueFormat, minValue, maxValue, isClearable, clearLabel, ...rest }: DatePickerProps<TFormat>): React.JSX.Element;
|
|
65
|
+
export declare function DatePicker<TFormat extends 'object' | 'iso' = 'object'>({ label, description, help, errorMessage, size, fullWidth, className, style, value, defaultValue, onChange, valueFormat, minValue, maxValue, isClearable, clearLabel, ...rest }: DatePickerProps<TFormat>): React.JSX.Element;
|
|
56
66
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/forms/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/forms/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AASvD,MAAM,WAAW,eAAe,CAAC,OAAO,SAAS,QAAQ,GAAG,KAAK,GAAG,QAAQ;IAC1E,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;;wDAIoD;IACpD,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,IAA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WAAW,EACX,IAAI,EACJ,YAAY,EACZ,IAAW,EACX,SAAgB,EAChB,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,UAAU,EACV,GAAG,IAAI,EACR,EAAE,eAAe,CAAC,OAAO,CAAC,qBAoF1B"}
|
|
@@ -73,6 +73,16 @@ export interface DateRangePickerProps<TFormat extends 'object' | 'iso' = 'object
|
|
|
73
73
|
/** The clear button's visible text. Defaults to the dictionary's `inputClear`. */
|
|
74
74
|
clearLabel?: string;
|
|
75
75
|
description?: React.ReactNode;
|
|
76
|
+
/**
|
|
77
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
78
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
79
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
80
|
+
*
|
|
81
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
82
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
83
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
84
|
+
*/
|
|
85
|
+
help?: React.ReactNode;
|
|
76
86
|
errorMessage?: React.ReactNode;
|
|
77
87
|
isInvalid?: boolean;
|
|
78
88
|
isDisabled?: boolean;
|
|
@@ -102,4 +112,4 @@ export declare function rangeLengthInDays(range: DateRangeInput | null | undefin
|
|
|
102
112
|
* between them, and locale-driven segment order. Wrap the app in `I18nProvider` to pin a locale:
|
|
103
113
|
* `es-PY` reads dd/mm/yyyy and `en-US` mm/dd/yyyy off the same value.
|
|
104
114
|
*/
|
|
105
|
-
export declare function DateRangePicker<TFormat extends 'object' | 'iso' = 'object'>({ label, description, errorMessage, maxRangeDays, presets, size, fullWidth, startName, endName, className, style, value, defaultValue, onChange, valueFormat, minValue, maxValue, isClearable, clearLabel, ...rest }: DateRangePickerProps<TFormat>): React.JSX.Element;
|
|
115
|
+
export declare function DateRangePicker<TFormat extends 'object' | 'iso' = 'object'>({ label, description, help, errorMessage, maxRangeDays, presets, size, fullWidth, startName, endName, className, style, value, defaultValue, onChange, valueFormat, minValue, maxValue, isClearable, clearLabel, ...rest }: DateRangePickerProps<TFormat>): React.JSX.Element;
|
|
@@ -73,6 +73,16 @@ export interface DateRangePickerProps<TFormat extends 'object' | 'iso' = 'object
|
|
|
73
73
|
/** The clear button's visible text. Defaults to the dictionary's `inputClear`. */
|
|
74
74
|
clearLabel?: string;
|
|
75
75
|
description?: React.ReactNode;
|
|
76
|
+
/**
|
|
77
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
78
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
79
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
80
|
+
*
|
|
81
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
82
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
83
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
84
|
+
*/
|
|
85
|
+
help?: React.ReactNode;
|
|
76
86
|
errorMessage?: React.ReactNode;
|
|
77
87
|
isInvalid?: boolean;
|
|
78
88
|
isDisabled?: boolean;
|
|
@@ -102,5 +112,5 @@ export declare function rangeLengthInDays(range: DateRangeInput | null | undefin
|
|
|
102
112
|
* between them, and locale-driven segment order. Wrap the app in `I18nProvider` to pin a locale:
|
|
103
113
|
* `es-PY` reads dd/mm/yyyy and `en-US` mm/dd/yyyy off the same value.
|
|
104
114
|
*/
|
|
105
|
-
export declare function DateRangePicker<TFormat extends 'object' | 'iso' = 'object'>({ label, description, errorMessage, maxRangeDays, presets, size, fullWidth, startName, endName, className, style, value, defaultValue, onChange, valueFormat, minValue, maxValue, isClearable, clearLabel, ...rest }: DateRangePickerProps<TFormat>): React.JSX.Element;
|
|
115
|
+
export declare function DateRangePicker<TFormat extends 'object' | 'iso' = 'object'>({ label, description, help, errorMessage, maxRangeDays, presets, size, fullWidth, startName, endName, className, style, value, defaultValue, onChange, valueFormat, minValue, maxValue, isClearable, clearLabel, ...rest }: DateRangePickerProps<TFormat>): React.JSX.Element;
|
|
106
116
|
//# sourceMappingURL=DateRangePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/forms/DateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/forms/DateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmB/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AASvD,0FAA0F;AAC1F,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,GAAG,EAAE,SAAS,CAAC;CAChB;AAED,yFAAyF;AACzF,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC,GAAG,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd;kFAC8E;IAC9E,KAAK,EAAE,MAAM,cAAc,CAAC;CAC7B;AAyBD,MAAM,WAAW,oBAAoB,CAAC,OAAO,SAAS,QAAQ,GAAG,KAAK,GAAG,QAAQ;IAC/E,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;uBACmB;IACnB,KAAK,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,E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CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;AAC5D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAAC;AAkC3F;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,SAAS,QAAQ,GAAG,KAAK,GAAG,QAAQ,EAAE,EAC3E,KAAK,EACL,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,OAAO,EACP,IAAW,EACX,SAAgB,EAChB,SAAS,EACT,OAAO,EACP,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,UAAU,EACV,GAAG,IAAI,EACR,EAAE,oBAAoB,CAAC,OAAO,CAAC,qBA6I/B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface FieldDescriptionProps {
|
|
3
|
+
description?: React.ReactNode;
|
|
4
|
+
/** Contextual explanation. Announced with the field, and shown visually by the help icon. */
|
|
5
|
+
help?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Internal. The one `Text slot="description"` a field renders.
|
|
9
|
+
*
|
|
10
|
+
* There is exactly one description slot per field — two `Text slot="description"` elements would
|
|
11
|
+
* collide on a single generated id — so `description` and `help` merge here rather than each
|
|
12
|
+
* rendering their own node. `help` is announced with the field as well as shown on the icon,
|
|
13
|
+
* because a tooltip-only explanation is reachable only by visiting a tab stop, and a dense form
|
|
14
|
+
* has one of those per helped field.
|
|
15
|
+
*/
|
|
16
|
+
export declare function FieldDescription({ description, help }: FieldDescriptionProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface FieldDescriptionProps {
|
|
3
|
+
description?: React.ReactNode;
|
|
4
|
+
/** Contextual explanation. Announced with the field, and shown visually by the help icon. */
|
|
5
|
+
help?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Internal. The one `Text slot="description"` a field renders.
|
|
9
|
+
*
|
|
10
|
+
* There is exactly one description slot per field — two `Text slot="description"` elements would
|
|
11
|
+
* collide on a single generated id — so `description` and `help` merge here rather than each
|
|
12
|
+
* rendering their own node. `help` is announced with the field as well as shown on the icon,
|
|
13
|
+
* because a tooltip-only explanation is reachable only by visiting a tab stop, and a dense form
|
|
14
|
+
* has one of those per helped field.
|
|
15
|
+
*/
|
|
16
|
+
export declare function FieldDescription({ description, help }: FieldDescriptionProps): React.JSX.Element | null;
|
|
17
|
+
//# sourceMappingURL=FieldDescription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldDescription.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FieldDescription.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,6FAA6F;IAC7F,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,qBAAqB,4BAY5E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface FieldHelpProps {
|
|
3
|
+
/** The explanation. Shown on hover and immediately on keyboard focus. Never put an instruction
|
|
4
|
+
* here that is unavailable elsewhere — there is no hover on touch. */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Overrides the dictionary's `fieldHelp`. This names the *icon* ("More information"), not the
|
|
7
|
+
* explanation — say what is being explained when a form has several. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Which side the explanation opens on. Change it when the default would put the bubble off
|
|
10
|
+
* screen or over the thing being explained — a field at the top of a dialog, or the last row
|
|
11
|
+
* of a table where `top` covers the row above. */
|
|
12
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The help icon beside a field label: an explanation reachable by pointer and by keyboard, with
|
|
16
|
+
* the markup a consumer would otherwise hand-write. Fields take a `help` prop that renders this
|
|
17
|
+
* for you; reach for the component directly beside a `FormField` or a bare control.
|
|
18
|
+
*/
|
|
19
|
+
export declare function FieldHelp({ children, label, placement }: FieldHelpProps): React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface FieldHelpProps {
|
|
3
|
+
/** The explanation. Shown on hover and immediately on keyboard focus. Never put an instruction
|
|
4
|
+
* here that is unavailable elsewhere — there is no hover on touch. */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** Overrides the dictionary's `fieldHelp`. This names the *icon* ("More information"), not the
|
|
7
|
+
* explanation — say what is being explained when a form has several. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Which side the explanation opens on. Change it when the default would put the bubble off
|
|
10
|
+
* screen or over the thing being explained — a field at the top of a dialog, or the last row
|
|
11
|
+
* of a table where `top` covers the row above. */
|
|
12
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The help icon beside a field label: an explanation reachable by pointer and by keyboard, with
|
|
16
|
+
* the markup a consumer would otherwise hand-write. Fields take a `help` prop that renders this
|
|
17
|
+
* for you; reach for the component directly beside a `FormField` or a bare control.
|
|
18
|
+
*/
|
|
19
|
+
export declare function FieldHelp({ children, label, placement }: FieldHelpProps): React.JSX.Element;
|
|
20
|
+
//# sourceMappingURL=FieldHelp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldHelp.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FieldHelp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAMpC,MAAM,WAAW,cAAc;IAC7B;2EACuE;IACvE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;6EACyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;uDAEmD;IACnD,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;CACjD;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAiB,EAAE,EAAE,cAAc,qBAkB/E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface FieldLabelProps {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
isRequired?: boolean;
|
|
5
|
+
/** Contextual explanation, rendered as a help icon beside the label. */
|
|
6
|
+
help?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Internal, dev-only. `help` draws its icon beside the label, so a field named only by
|
|
10
|
+
* `aria-label` has nowhere to put it: the explanation still reaches a screen reader through the
|
|
11
|
+
* field's `description`, but the visual affordance is silently missing — the same shape of defect
|
|
12
|
+
* as an icon name that resolves to a blank square. Every field calls this before deciding whether
|
|
13
|
+
* to render a label row.
|
|
14
|
+
*
|
|
15
|
+
* A warning rather than a bare icon: an icon with no label to sit beside is an unanchored control,
|
|
16
|
+
* and supplying the label is a real fix only the consumer can make.
|
|
17
|
+
*/
|
|
18
|
+
export declare function warnHelpWithoutLabel(component: string, label: React.ReactNode, help: React.ReactNode): void;
|
|
19
|
+
/**
|
|
20
|
+
* Internal. The label row every Pire field draws, in one place.
|
|
21
|
+
*
|
|
22
|
+
* It exists because this markup was copied nine times, and the ButtonContext reset below had to
|
|
23
|
+
* land in all nine: React Aria hands every descendant Button the field's own slotted context, so
|
|
24
|
+
* a button a consumer puts in a label either throws (NumberField) or is silently adopted as the
|
|
25
|
+
* field's trigger (DatePicker, DateRangePicker, ComboBox). Resetting the context here makes any
|
|
26
|
+
* button in any field's label behave like a button — not just the help icon.
|
|
27
|
+
*
|
|
28
|
+
* That does not make every shape a good one. `help` renders `FieldHelp` as a **sibling** of
|
|
29
|
+
* `<Label>`, which is the supported shape and the only one this component produces on its own.
|
|
30
|
+
* A consumer-supplied button placed *inside* `label` — now possible instead of throwing or being
|
|
31
|
+
* silently adopted — still sits inside the `<Label>` React Aria points the stepper and
|
|
32
|
+
* calendar-trigger `aria-labelledby` at, so its text is absorbed into every sibling control's
|
|
33
|
+
* accessible name (a `NumberField` stepper reads "Increase Cantidad Ayuda"). Lossy, not broken —
|
|
34
|
+
* prefer `help` unless the label truly needs its own button.
|
|
35
|
+
*/
|
|
36
|
+
export declare function FieldLabel({ label, isRequired, help }: FieldLabelProps): React.JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface FieldLabelProps {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
isRequired?: boolean;
|
|
5
|
+
/** Contextual explanation, rendered as a help icon beside the label. */
|
|
6
|
+
help?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Internal, dev-only. `help` draws its icon beside the label, so a field named only by
|
|
10
|
+
* `aria-label` has nowhere to put it: the explanation still reaches a screen reader through the
|
|
11
|
+
* field's `description`, but the visual affordance is silently missing — the same shape of defect
|
|
12
|
+
* as an icon name that resolves to a blank square. Every field calls this before deciding whether
|
|
13
|
+
* to render a label row.
|
|
14
|
+
*
|
|
15
|
+
* A warning rather than a bare icon: an icon with no label to sit beside is an unanchored control,
|
|
16
|
+
* and supplying the label is a real fix only the consumer can make.
|
|
17
|
+
*/
|
|
18
|
+
export declare function warnHelpWithoutLabel(component: string, label: React.ReactNode, help: React.ReactNode): void;
|
|
19
|
+
/**
|
|
20
|
+
* Internal. The label row every Pire field draws, in one place.
|
|
21
|
+
*
|
|
22
|
+
* It exists because this markup was copied nine times, and the ButtonContext reset below had to
|
|
23
|
+
* land in all nine: React Aria hands every descendant Button the field's own slotted context, so
|
|
24
|
+
* a button a consumer puts in a label either throws (NumberField) or is silently adopted as the
|
|
25
|
+
* field's trigger (DatePicker, DateRangePicker, ComboBox). Resetting the context here makes any
|
|
26
|
+
* button in any field's label behave like a button — not just the help icon.
|
|
27
|
+
*
|
|
28
|
+
* That does not make every shape a good one. `help` renders `FieldHelp` as a **sibling** of
|
|
29
|
+
* `<Label>`, which is the supported shape and the only one this component produces on its own.
|
|
30
|
+
* A consumer-supplied button placed *inside* `label` — now possible instead of throwing or being
|
|
31
|
+
* silently adopted — still sits inside the `<Label>` React Aria points the stepper and
|
|
32
|
+
* calendar-trigger `aria-labelledby` at, so its text is absorbed into every sibling control's
|
|
33
|
+
* accessible name (a `NumberField` stepper reads "Increase Cantidad Ayuda"). Lossy, not broken —
|
|
34
|
+
* prefer `help` unless the label truly needs its own button.
|
|
35
|
+
*/
|
|
36
|
+
export declare function FieldLabel({ label, isRequired, help }: FieldLabelProps): React.JSX.Element;
|
|
37
|
+
//# sourceMappingURL=FieldLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FieldLabel.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAMpC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wEAAwE;IACxE,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,QAMpG;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,eAAe,qBA2CtE"}
|
|
@@ -10,8 +10,17 @@ export interface FormFieldProps extends Omit<React.HTMLAttributes<HTMLDivElement
|
|
|
10
10
|
error?: React.ReactNode;
|
|
11
11
|
/** horizontal = right-aligned 160px label column, the ERP detail-form default. */
|
|
12
12
|
layout?: 'stacked' | 'horizontal';
|
|
13
|
+
/**
|
|
14
|
+
* Contextual explanation, shown as a help icon beside the label.
|
|
15
|
+
*
|
|
16
|
+
* Unlike the fields that render their own control, `FormField` cannot add this to the control's
|
|
17
|
+
* `aria-describedby` — it does not own that control. The explanation reaches a screen reader
|
|
18
|
+
* through the trigger's own tooltip instead. When the text must be announced with the field,
|
|
19
|
+
* pass it as `hint`, or use the control's own `help` prop.
|
|
20
|
+
*/
|
|
21
|
+
help?: React.ReactNode;
|
|
13
22
|
children?: React.ReactNode;
|
|
14
23
|
}
|
|
15
24
|
/** Label + control + hint/error wrapper for controls that do not manage their own label
|
|
16
25
|
* (most Pire controls do — use their `label` prop first). */
|
|
17
|
-
export declare function FormField({ label, htmlFor, isRequired, hint, error, layout, children, className, ...rest }: FormFieldProps): React.JSX.Element;
|
|
26
|
+
export declare function FormField({ label, htmlFor, isRequired, hint, error, layout, help, children, className, ...rest }: FormFieldProps): React.JSX.Element;
|
|
@@ -10,9 +10,18 @@ export interface FormFieldProps extends Omit<React.HTMLAttributes<HTMLDivElement
|
|
|
10
10
|
error?: React.ReactNode;
|
|
11
11
|
/** horizontal = right-aligned 160px label column, the ERP detail-form default. */
|
|
12
12
|
layout?: 'stacked' | 'horizontal';
|
|
13
|
+
/**
|
|
14
|
+
* Contextual explanation, shown as a help icon beside the label.
|
|
15
|
+
*
|
|
16
|
+
* Unlike the fields that render their own control, `FormField` cannot add this to the control's
|
|
17
|
+
* `aria-describedby` — it does not own that control. The explanation reaches a screen reader
|
|
18
|
+
* through the trigger's own tooltip instead. When the text must be announced with the field,
|
|
19
|
+
* pass it as `hint`, or use the control's own `help` prop.
|
|
20
|
+
*/
|
|
21
|
+
help?: React.ReactNode;
|
|
13
22
|
children?: React.ReactNode;
|
|
14
23
|
}
|
|
15
24
|
/** Label + control + hint/error wrapper for controls that do not manage their own label
|
|
16
25
|
* (most Pire controls do — use their `label` prop first). */
|
|
17
|
-
export declare function FormField({ label, htmlFor, isRequired, hint, error, layout, children, className, ...rest }: FormFieldProps): React.JSX.Element;
|
|
26
|
+
export declare function FormField({ label, htmlFor, isRequired, hint, error, layout, help, children, className, ...rest }: FormFieldProps): React.JSX.Element;
|
|
18
27
|
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/forms/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAKpC,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5F,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,kFAAkF;IAClF,MAAM,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IAClC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;8DAC8D;AAC9D,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,OAAO,EACP,UAAU,EACV,IAAI,EACJ,KAAK,EACL,MAAkB,EAClB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,EAAE,cAAc,qBAgChB"}
|
|
@@ -36,6 +36,16 @@ export interface InputProps {
|
|
|
36
36
|
clearLabel?: string;
|
|
37
37
|
/** Help text below the field. Replaced by errorMessage when invalid. */
|
|
38
38
|
description?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
41
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
42
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
43
|
+
*
|
|
44
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
45
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
46
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
47
|
+
*/
|
|
48
|
+
help?: React.ReactNode;
|
|
39
49
|
errorMessage?: React.ReactNode;
|
|
40
50
|
isInvalid?: boolean;
|
|
41
51
|
isDisabled?: boolean;
|
|
@@ -53,4 +63,4 @@ export interface InputProps {
|
|
|
53
63
|
}
|
|
54
64
|
/** Single-line text entry. Labels, descriptions and errors are wired to the input by React Aria,
|
|
55
65
|
* so no manual aria-describedby is ever needed. */
|
|
56
|
-
export declare function Input({ label, icon, suffix, description, errorMessage, size, numeric, isClearable, clearLabel, fullWidth, className, style, inputRef, onChange, ...rest }: InputProps): React.JSX.Element;
|
|
66
|
+
export declare function Input({ label, icon, suffix, description, help, errorMessage, size, numeric, isClearable, clearLabel, fullWidth, className, style, inputRef, onChange, ...rest }: InputProps): React.JSX.Element;
|
|
@@ -36,6 +36,16 @@ export interface InputProps {
|
|
|
36
36
|
clearLabel?: string;
|
|
37
37
|
/** Help text below the field. Replaced by errorMessage when invalid. */
|
|
38
38
|
description?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
41
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
42
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
43
|
+
*
|
|
44
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
45
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
46
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
47
|
+
*/
|
|
48
|
+
help?: React.ReactNode;
|
|
39
49
|
errorMessage?: React.ReactNode;
|
|
40
50
|
isInvalid?: boolean;
|
|
41
51
|
isDisabled?: boolean;
|
|
@@ -53,5 +63,5 @@ export interface InputProps {
|
|
|
53
63
|
}
|
|
54
64
|
/** Single-line text entry. Labels, descriptions and errors are wired to the input by React Aria,
|
|
55
65
|
* so no manual aria-describedby is ever needed. */
|
|
56
|
-
export declare function Input({ label, icon, suffix, description, errorMessage, size, numeric, isClearable, clearLabel, fullWidth, className, style, inputRef, onChange, ...rest }: InputProps): React.JSX.Element;
|
|
66
|
+
export declare function Input({ label, icon, suffix, description, help, errorMessage, size, numeric, isClearable, clearLabel, fullWidth, className, style, inputRef, onChange, ...rest }: InputProps): React.JSX.Element;
|
|
57
67
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/forms/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAe/B,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ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E;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;CACxC;AAED;oDACoD;AACpD,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,IAAI,EACJ,MAAM,EACN,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,IAAW,EACX,OAAO,EACP,WAAW,EACX,UAAU,EACV,SAAgB,EAChB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,UAAU,qBA2DZ"}
|
|
@@ -30,6 +30,16 @@ export interface MultiComboBoxProps {
|
|
|
30
30
|
onLoadMore?: () => void;
|
|
31
31
|
placeholder?: string;
|
|
32
32
|
description?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
35
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
36
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
37
|
+
*
|
|
38
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
39
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
40
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
41
|
+
*/
|
|
42
|
+
help?: React.ReactNode;
|
|
33
43
|
errorMessage?: React.ReactNode;
|
|
34
44
|
isInvalid?: boolean;
|
|
35
45
|
isDisabled?: boolean;
|
|
@@ -64,4 +74,4 @@ export interface MultiComboBoxProps {
|
|
|
64
74
|
* component nested inside it — a TagGroup there registers its tags as listbox items and then
|
|
65
75
|
* crashes looking for grid state. Each chip's remove button is an ordinary Tab stop instead,
|
|
66
76
|
* and removals are announced through the live region below. */
|
|
67
|
-
export declare function MultiComboBox({ label, value, defaultValue, onChange, onInputChange, options, description, errorMessage, allowsCustomValue, size, isFilteredExternally, isLoading, loadingLabel, emptyLabel, onLoadMore, fullWidth, className, style, ...rest }: MultiComboBoxProps): React.JSX.Element;
|
|
77
|
+
export declare function MultiComboBox({ label, value, defaultValue, onChange, onInputChange, options, description, help, errorMessage, allowsCustomValue, size, isFilteredExternally, isLoading, loadingLabel, emptyLabel, onLoadMore, fullWidth, className, style, ...rest }: MultiComboBoxProps): React.JSX.Element;
|
|
@@ -30,6 +30,16 @@ export interface MultiComboBoxProps {
|
|
|
30
30
|
onLoadMore?: () => void;
|
|
31
31
|
placeholder?: string;
|
|
32
32
|
description?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
35
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
36
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
37
|
+
*
|
|
38
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
39
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
40
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
41
|
+
*/
|
|
42
|
+
help?: React.ReactNode;
|
|
33
43
|
errorMessage?: React.ReactNode;
|
|
34
44
|
isInvalid?: boolean;
|
|
35
45
|
isDisabled?: boolean;
|
|
@@ -64,5 +74,5 @@ export interface MultiComboBoxProps {
|
|
|
64
74
|
* component nested inside it — a TagGroup there registers its tags as listbox items and then
|
|
65
75
|
* crashes looking for grid state. Each chip's remove button is an ordinary Tab stop instead,
|
|
66
76
|
* and removals are announced through the live region below. */
|
|
67
|
-
export declare function MultiComboBox({ label, value, defaultValue, onChange, onInputChange, options, description, errorMessage, allowsCustomValue, size, isFilteredExternally, isLoading, loadingLabel, emptyLabel, onLoadMore, fullWidth, className, style, ...rest }: MultiComboBoxProps): React.JSX.Element;
|
|
77
|
+
export declare function MultiComboBox({ label, value, defaultValue, onChange, onInputChange, options, description, help, errorMessage, allowsCustomValue, size, isFilteredExternally, isLoading, loadingLabel, emptyLabel, onLoadMore, fullWidth, className, style, ...rest }: MultiComboBoxProps): React.JSX.Element;
|
|
68
78
|
//# sourceMappingURL=MultiComboBox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiComboBox.d.ts","sourceRoot":"","sources":["../../../src/components/forms/MultiComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MultiComboBox.d.ts","sourceRoot":"","sources":["../../../src/components/forms/MultiComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACtC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;IACzC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,0FAA0F;IAC1F,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qGAAqG;IACrG,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oFAAoF;IACpF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAKD;;;;;;;;;;;;;;;;;;;;kEAoBkE;AAClE,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,OAAY,EACZ,WAAW,EACX,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,IAAW,EACX,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,EACV,SAAgB,EAChB,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,kBAAkB,qBA4KpB"}
|
|
@@ -30,6 +30,16 @@ export interface NumberFieldProps<TEmpty extends '' | null = never> {
|
|
|
30
30
|
/** Trailing unit shown after the figure: EA, KG, %. */
|
|
31
31
|
suffix?: React.ReactNode;
|
|
32
32
|
description?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Contextual explanation, shown as a help icon beside the label and announced as part of the
|
|
35
|
+
* field's description. For the sentence a user needs *occasionally* — `description` is for the
|
|
36
|
+
* one they need every time, and it costs a line of vertical space in every row.
|
|
37
|
+
*
|
|
38
|
+
* Needs a visible `label`: the icon is drawn beside one, so on a field named only by
|
|
39
|
+
* `aria-label` the text still reaches a screen reader through the description but no icon
|
|
40
|
+
* appears. Pire warns in development rather than drawing an icon with nothing to anchor it to.
|
|
41
|
+
*/
|
|
42
|
+
help?: React.ReactNode;
|
|
33
43
|
errorMessage?: React.ReactNode;
|
|
34
44
|
isInvalid?: boolean;
|
|
35
45
|
isDisabled?: boolean;
|
|
@@ -86,4 +96,4 @@ export interface NumberFieldProps<TEmpty extends '' | null = never> {
|
|
|
86
96
|
* Enable the action and validate when it is pressed, surfacing the reason. A disabled control that
|
|
87
97
|
* does not say why is a worse affordance regardless, so the fix costs nothing.
|
|
88
98
|
*/
|
|
89
|
-
export declare function NumberField<TEmpty extends '' | null = never>({ label, suffix, description, errorMessage, hideStepper, stepperLayout, incrementLabel, decrementLabel, size, fullWidth, className, style, value, defaultValue, onChange, emptyValue, isClearable, clearLabel, ...rest }: NumberFieldProps<TEmpty>): React.JSX.Element;
|
|
99
|
+
export declare function NumberField<TEmpty extends '' | null = never>({ label, suffix, description, help, errorMessage, hideStepper, stepperLayout, incrementLabel, decrementLabel, size, fullWidth, className, style, value, defaultValue, onChange, emptyValue, isClearable, clearLabel, ...rest }: NumberFieldProps<TEmpty>): React.JSX.Element;
|