@dloizides/ui-forms 1.61.0 → 1.62.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/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1061,6 +1061,8 @@ interface DateRangeControlProps {
|
|
|
1061
1061
|
fromPlaceholder?: string;
|
|
1062
1062
|
/** @deprecated Ignored: a date input shows no typed format hint (DATE-INPUT-1). */
|
|
1063
1063
|
toPlaceholder?: string;
|
|
1064
|
+
/** Draw the web `<from> – <to>` label; false when the caller already labels the field (default true). */
|
|
1065
|
+
showLabel?: boolean;
|
|
1064
1066
|
/** PRE-LOCALIZED hint applied to BOTH inputs; defaults to `<fromLabel> – <toLabel>`. */
|
|
1065
1067
|
accessibilityHint?: string;
|
|
1066
1068
|
/** Merged LAST onto the row wrapper. */
|
|
@@ -1069,7 +1071,7 @@ interface DateRangeControlProps {
|
|
|
1069
1071
|
testID: string;
|
|
1070
1072
|
}
|
|
1071
1073
|
/** An inclusive from/to date range: one field with a range calendar on web, two `DateField`s on native. */
|
|
1072
|
-
declare function DateRangeControl({ value, onChange, onSubmit, fromLabel, toLabel, accessibilityHint, style, testID, }: DateRangeControlProps): React.ReactElement;
|
|
1074
|
+
declare function DateRangeControl({ value, onChange, onSubmit, fromLabel, toLabel, accessibilityHint, showLabel, style, testID, }: DateRangeControlProps): React.ReactElement;
|
|
1073
1075
|
|
|
1074
1076
|
interface DateFieldProps {
|
|
1075
1077
|
/** PRE-LOCALIZED label; also the accessible name. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1061,6 +1061,8 @@ interface DateRangeControlProps {
|
|
|
1061
1061
|
fromPlaceholder?: string;
|
|
1062
1062
|
/** @deprecated Ignored: a date input shows no typed format hint (DATE-INPUT-1). */
|
|
1063
1063
|
toPlaceholder?: string;
|
|
1064
|
+
/** Draw the web `<from> – <to>` label; false when the caller already labels the field (default true). */
|
|
1065
|
+
showLabel?: boolean;
|
|
1064
1066
|
/** PRE-LOCALIZED hint applied to BOTH inputs; defaults to `<fromLabel> – <toLabel>`. */
|
|
1065
1067
|
accessibilityHint?: string;
|
|
1066
1068
|
/** Merged LAST onto the row wrapper. */
|
|
@@ -1069,7 +1071,7 @@ interface DateRangeControlProps {
|
|
|
1069
1071
|
testID: string;
|
|
1070
1072
|
}
|
|
1071
1073
|
/** An inclusive from/to date range: one field with a range calendar on web, two `DateField`s on native. */
|
|
1072
|
-
declare function DateRangeControl({ value, onChange, onSubmit, fromLabel, toLabel, accessibilityHint, style, testID, }: DateRangeControlProps): React.ReactElement;
|
|
1074
|
+
declare function DateRangeControl({ value, onChange, onSubmit, fromLabel, toLabel, accessibilityHint, showLabel, style, testID, }: DateRangeControlProps): React.ReactElement;
|
|
1073
1075
|
|
|
1074
1076
|
interface DateFieldProps {
|
|
1075
1077
|
/** PRE-LOCALIZED label; also the accessible name. */
|
package/dist/index.js
CHANGED
|
@@ -4110,6 +4110,7 @@ function DateRangeControl({
|
|
|
4110
4110
|
fromLabel,
|
|
4111
4111
|
toLabel,
|
|
4112
4112
|
accessibilityHint,
|
|
4113
|
+
showLabel = true,
|
|
4113
4114
|
style,
|
|
4114
4115
|
testID
|
|
4115
4116
|
}) {
|
|
@@ -4119,7 +4120,7 @@ function DateRangeControl({
|
|
|
4119
4120
|
if (!IS_WEB9) {
|
|
4120
4121
|
return /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(NativeDateRange, { fromLabel, hint, style, testID, toLabel, value, onChange, onSubmit }) });
|
|
4121
4122
|
}
|
|
4122
|
-
return /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style, testID: `${testID}-range`, children: /* @__PURE__ */ jsxRuntime.jsx(Field, { error: typedError, label: `${fromLabel}${labels.rangeSeparator}${toLabel}
|
|
4123
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style, testID: `${testID}-range`, children: /* @__PURE__ */ jsxRuntime.jsx(Field, { error: typedError, label: showLabel ? `${fromLabel}${labels.rangeSeparator}${toLabel}` : void 0, children: (context) => /* @__PURE__ */ jsxRuntime.jsx(WebDateRange, { context, fromLabel, hint, testID, toLabel, value, onChange, onSubmit, onTypedError: setTypedError }) }) }) });
|
|
4123
4124
|
}
|
|
4124
4125
|
function DateTimeField(props) {
|
|
4125
4126
|
return /* @__PURE__ */ jsxRuntime.jsx(TemporalField, { fieldProps: props, webInputType: "datetime-local" });
|