@dloizides/ui-forms 1.30.0 → 1.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -877,9 +877,11 @@ interface DateRangeControlProps {
877
877
  fromLabel: string;
878
878
  /** PRE-LOCALIZED sub-label for the TO input (e.g. "To"). Also its accessible name. */
879
879
  toLabel: string;
880
+ /** @deprecated Ignored: a date input shows no typed format hint (DATE-INPUT-1). */
880
881
  fromPlaceholder?: string;
882
+ /** @deprecated Ignored: a date input shows no typed format hint (DATE-INPUT-1). */
881
883
  toPlaceholder?: string;
882
- /** PRE-LOCALIZED hint applied to BOTH inputs. */
884
+ /** PRE-LOCALIZED hint applied to BOTH inputs; defaults to `<fromLabel> – <toLabel>`. */
883
885
  accessibilityHint?: string;
884
886
  /** Merged LAST onto the row wrapper. */
885
887
  style?: StyleProp<ViewStyle>;
@@ -887,7 +889,7 @@ interface DateRangeControlProps {
887
889
  testID: string;
888
890
  }
889
891
  /** An inclusive from/to date pair of two shared `DateField`s; each edit patches only its own side. */
890
- declare function DateRangeControl({ value, onChange, onSubmit, fromLabel, toLabel, fromPlaceholder, toPlaceholder, accessibilityHint, style, testID, }: DateRangeControlProps): React.ReactElement;
892
+ declare function DateRangeControl({ value, onChange, onSubmit, fromLabel, toLabel, accessibilityHint, style, testID, }: DateRangeControlProps): React.ReactElement;
891
893
 
892
894
  interface DateFieldProps {
893
895
  /** PRE-LOCALIZED label; also the accessible name. */
@@ -905,7 +907,6 @@ interface DateFieldProps {
905
907
  disabled?: boolean;
906
908
  min?: string;
907
909
  max?: string;
908
- placeholder?: string;
909
910
  }
910
911
  type DateTimeFieldProps = DateFieldProps;
911
912
 
package/dist/index.d.ts CHANGED
@@ -877,9 +877,11 @@ interface DateRangeControlProps {
877
877
  fromLabel: string;
878
878
  /** PRE-LOCALIZED sub-label for the TO input (e.g. "To"). Also its accessible name. */
879
879
  toLabel: string;
880
+ /** @deprecated Ignored: a date input shows no typed format hint (DATE-INPUT-1). */
880
881
  fromPlaceholder?: string;
882
+ /** @deprecated Ignored: a date input shows no typed format hint (DATE-INPUT-1). */
881
883
  toPlaceholder?: string;
882
- /** PRE-LOCALIZED hint applied to BOTH inputs. */
884
+ /** PRE-LOCALIZED hint applied to BOTH inputs; defaults to `<fromLabel> – <toLabel>`. */
883
885
  accessibilityHint?: string;
884
886
  /** Merged LAST onto the row wrapper. */
885
887
  style?: StyleProp<ViewStyle>;
@@ -887,7 +889,7 @@ interface DateRangeControlProps {
887
889
  testID: string;
888
890
  }
889
891
  /** An inclusive from/to date pair of two shared `DateField`s; each edit patches only its own side. */
890
- declare function DateRangeControl({ value, onChange, onSubmit, fromLabel, toLabel, fromPlaceholder, toPlaceholder, accessibilityHint, style, testID, }: DateRangeControlProps): React.ReactElement;
892
+ declare function DateRangeControl({ value, onChange, onSubmit, fromLabel, toLabel, accessibilityHint, style, testID, }: DateRangeControlProps): React.ReactElement;
891
893
 
892
894
  interface DateFieldProps {
893
895
  /** PRE-LOCALIZED label; also the accessible name. */
@@ -905,7 +907,6 @@ interface DateFieldProps {
905
907
  disabled?: boolean;
906
908
  min?: string;
907
909
  max?: string;
908
- placeholder?: string;
909
910
  }
910
911
  type DateTimeFieldProps = DateFieldProps;
911
912
 
package/dist/index.js CHANGED
@@ -2182,7 +2182,6 @@ function renderNativeInput(fieldProps, context) {
2182
2182
  editable: fieldProps.disabled !== true,
2183
2183
  hasError: context.hasError,
2184
2184
  id: context.controlId,
2185
- placeholder: fieldProps.placeholder,
2186
2185
  requiredField: fieldProps.required,
2187
2186
  testID: fieldProps.testID,
2188
2187
  value: fieldProps.value,
@@ -2204,20 +2203,17 @@ function DateRangeControl({
2204
2203
  onSubmit,
2205
2204
  fromLabel,
2206
2205
  toLabel,
2207
- fromPlaceholder,
2208
- toPlaceholder,
2209
2206
  accessibilityHint,
2210
2207
  style,
2211
2208
  testID
2212
2209
  }) {
2213
- const hint = accessibilityHint ?? "";
2210
+ const hint = accessibilityHint ?? `${fromLabel} \u2013 ${toLabel}`;
2214
2211
  return /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [controlStyles.dateRow, style], testID: `${testID}-range`, children: [
2215
2212
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: controlStyles.dateCol, children: /* @__PURE__ */ jsxRuntime.jsx(
2216
2213
  DateField,
2217
2214
  {
2218
2215
  accessibilityHint: hint,
2219
2216
  label: fromLabel,
2220
- placeholder: fromPlaceholder,
2221
2217
  testID: `${testID}-from`,
2222
2218
  value: value.from,
2223
2219
  onChange: (from) => onChange({ from, to: value.to }),
@@ -2229,7 +2225,6 @@ function DateRangeControl({
2229
2225
  {
2230
2226
  accessibilityHint: hint,
2231
2227
  label: toLabel,
2232
- placeholder: toPlaceholder,
2233
2228
  testID: `${testID}-to`,
2234
2229
  value: value.to,
2235
2230
  onChange: (to) => onChange({ from: value.from, to }),