@dloizides/ui-forms 1.29.0 → 1.30.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 +9 -0
- package/dist/index.d.mts +24 -14
- package/dist/index.d.ts +24 -14
- package/dist/index.js +111 -115
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +108 -116
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.30.0
|
|
4
|
+
|
|
5
|
+
FINREG-DATE-2 "Every FinReg date field uses the shared input".
|
|
6
|
+
|
|
7
|
+
- `DateRangeControl` renders the shared `DateField` for From and To (DATE-INPUT-1): on web each side is a real `type="date"` input. Props and testIDs unchanged.
|
|
8
|
+
- `DateField` / `DateTimeField` accept an optional `placeholder` (native text input only).
|
|
9
|
+
- New `FormStack`: a vertical form column whose `gap` owns the rhythm, so nested `Field`s drop their bottom margin.
|
|
10
|
+
- New `ResponsiveFormLayout` (`narrow` / `wide` / `breakpoint`, default 768) and `isWideFormLayout`.
|
|
11
|
+
|
|
3
12
|
## 1.29.0
|
|
4
13
|
|
|
5
14
|
FINREG-BRAND-1 "Logo without its background and one palette from the logo": error and status TEXT reads `semanticText` when the theme provides it, readable in dark mode. Unchanged without it.
|
package/dist/index.d.mts
CHANGED
|
@@ -300,6 +300,27 @@ interface InlineFieldRowLayout {
|
|
|
300
300
|
/** Field and action share one row only at `inlineMinWidth` and wider; below it they stack. */
|
|
301
301
|
declare function inlineFieldRowLayout(windowWidth: number, fieldMaxWidth: number, inlineMinWidth?: number): InlineFieldRowLayout;
|
|
302
302
|
|
|
303
|
+
interface FormStackProps {
|
|
304
|
+
children: React.ReactNode;
|
|
305
|
+
gap?: number;
|
|
306
|
+
style?: StyleProp<ViewStyle>;
|
|
307
|
+
testID?: string;
|
|
308
|
+
}
|
|
309
|
+
/** A vertical form column whose `gap` owns the rhythm, so the `Field`s inside drop their own bottom margin. */
|
|
310
|
+
declare const FormStack: ({ children, gap, style, testID, }: FormStackProps) => React.ReactElement;
|
|
311
|
+
|
|
312
|
+
interface ResponsiveFormLayoutProps {
|
|
313
|
+
narrow: React.ReactNode;
|
|
314
|
+
wide: React.ReactNode;
|
|
315
|
+
breakpoint?: number;
|
|
316
|
+
}
|
|
317
|
+
/** Renders `wide` when the window reaches `breakpoint`, else `narrow`, so a form switches layout by width. */
|
|
318
|
+
declare function ResponsiveFormLayout({ narrow, wide, breakpoint, }: ResponsiveFormLayoutProps): React.ReactElement;
|
|
319
|
+
|
|
320
|
+
declare const RESPONSIVE_FORM_DEFAULT_BREAKPOINT = 768;
|
|
321
|
+
/** True when `width` reaches `breakpoint`, so the wide layout applies. */
|
|
322
|
+
declare function isWideFormLayout(width: number, breakpoint?: number): boolean;
|
|
323
|
+
|
|
303
324
|
/**
|
|
304
325
|
* `FormSection` — a titled group of fields. The React answer to v1's `<fieldset>` / `<legend>`.
|
|
305
326
|
*
|
|
@@ -847,19 +868,6 @@ interface TypeaheadSearchProps extends TypeaheadCommonProps {
|
|
|
847
868
|
}
|
|
848
869
|
declare const TypeaheadControl: React.ForwardRefExoticComponent<((TypeaheadControlProps | TypeaheadSearchProps) & FieldControlWiring) & React.RefAttributes<TextInput>>;
|
|
849
870
|
|
|
850
|
-
/**
|
|
851
|
-
* `DateRangeControl` — an inclusive from/to pair (aml cases `from`/`to`, kefi audit `from`/`to`).
|
|
852
|
-
* Each side is a `YYYY-MM-DD` text input; on web the browser's native date UI is offered via
|
|
853
|
-
* `type="date"` (a react-native-web `TextInput` passes unknown props to the DOM input). Editing
|
|
854
|
-
* either side patches ONLY that side, so the other survives the edit.
|
|
855
|
-
*
|
|
856
|
-
* Promoted out of `@dloizides/ui-tables`' private `Filters/fields/DateRangeField`, which is why
|
|
857
|
-
* the fleet grew FIVE independent date fields.
|
|
858
|
-
*
|
|
859
|
-
* Label-free by design — the From/To sub-labels name the two HALVES; wrap in a `Field` for the
|
|
860
|
-
* range's own label.
|
|
861
|
-
*/
|
|
862
|
-
|
|
863
871
|
interface DateRangeControlProps {
|
|
864
872
|
value: DateRangeValue;
|
|
865
873
|
onChange: (value: DateRangeValue) => void;
|
|
@@ -878,6 +886,7 @@ interface DateRangeControlProps {
|
|
|
878
886
|
/** Row is `${testID}-range`, inputs `${testID}-from` / `${testID}-to`. */
|
|
879
887
|
testID: string;
|
|
880
888
|
}
|
|
889
|
+
/** An inclusive from/to date pair of two shared `DateField`s; each edit patches only its own side. */
|
|
881
890
|
declare function DateRangeControl({ value, onChange, onSubmit, fromLabel, toLabel, fromPlaceholder, toPlaceholder, accessibilityHint, style, testID, }: DateRangeControlProps): React.ReactElement;
|
|
882
891
|
|
|
883
892
|
interface DateFieldProps {
|
|
@@ -896,6 +905,7 @@ interface DateFieldProps {
|
|
|
896
905
|
disabled?: boolean;
|
|
897
906
|
min?: string;
|
|
898
907
|
max?: string;
|
|
908
|
+
placeholder?: string;
|
|
899
909
|
}
|
|
900
910
|
type DateTimeFieldProps = DateFieldProps;
|
|
901
911
|
|
|
@@ -1224,4 +1234,4 @@ interface UploadWithLinkFieldProps {
|
|
|
1224
1234
|
/** An image field: preview, an upload control, and a link input revealed on request. */
|
|
1225
1235
|
declare const UploadWithLinkField: ({ value, onChange, labels, uploadControl, testID, disabled, previewSize, }: UploadWithLinkFieldProps) => React.ReactElement;
|
|
1226
1236
|
|
|
1227
|
-
export { AlignToControl, type AlignToControlProps, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type ChipOption, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipVariant, type ControlOption, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, type DateFieldProps, DateRangeControl, type DateRangeControlProps, type DateRangeValue, DateTimeField, type DateTimeFieldProps, Field, type FieldChildContext, type FieldChildren, type FieldLabelVariant, type FieldMarker, type FieldProps, type FieldSpacing, type Focusable, type FocusableRefs, FormActions, type FormActionsProps, FormCell, type FormCellProps, FormCheckbox, type FormCheckboxProps, FormField, type FormFieldProps, FormGrid, type FormGridProps, FormSection, type FormSectionProps, FormStatusLine, type FormStatusLineProps, FormSwitch, type FormSwitchProps, type GroupSelection, INLINE_FIELD_ROW_MIN_WIDTH, InlineFieldRow, type InlineFieldRowLayout, type InlineFieldRowProps, type RecentValues, SelectControl, type SelectControlProps, SelectField, type SelectFieldProps, type SelectMenuAnchor, type StepNeighbours, StepperNav, type StepperNavLabels, type StepperNavProps, type StepperStep, StepperTabs, type StepperTabsProps, type ThemedInput, ThemedTextInput, type ThemedTextInputProps, TypeaheadControl, type TypeaheadControlProps, type TypeaheadSearch, type TypeaheadSearchProps, UploadWithLinkField, type UploadWithLinkFieldProps, type UploadWithLinkLabels, type UseThemedInputOptions, controlStyles, groupAriaChecked, inlineFieldRowLayout, isUnmatched, nextHighlight, resolveGroupSelection, resolveStepNeighbours, suggestOptions, toggleGroupSelection, useFocusFirstInvalid, useKeepInView, useRecentValues, useThemedInput };
|
|
1237
|
+
export { AlignToControl, type AlignToControlProps, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type ChipOption, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipVariant, type ControlOption, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, type DateFieldProps, DateRangeControl, type DateRangeControlProps, type DateRangeValue, DateTimeField, type DateTimeFieldProps, Field, type FieldChildContext, type FieldChildren, type FieldLabelVariant, type FieldMarker, type FieldProps, type FieldSpacing, type Focusable, type FocusableRefs, FormActions, type FormActionsProps, FormCell, type FormCellProps, FormCheckbox, type FormCheckboxProps, FormField, type FormFieldProps, FormGrid, type FormGridProps, FormSection, type FormSectionProps, FormStack, type FormStackProps, FormStatusLine, type FormStatusLineProps, FormSwitch, type FormSwitchProps, type GroupSelection, INLINE_FIELD_ROW_MIN_WIDTH, InlineFieldRow, type InlineFieldRowLayout, type InlineFieldRowProps, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, SelectControl, type SelectControlProps, SelectField, type SelectFieldProps, type SelectMenuAnchor, type StepNeighbours, StepperNav, type StepperNavLabels, type StepperNavProps, type StepperStep, StepperTabs, type StepperTabsProps, type ThemedInput, ThemedTextInput, type ThemedTextInputProps, TypeaheadControl, type TypeaheadControlProps, type TypeaheadSearch, type TypeaheadSearchProps, UploadWithLinkField, type UploadWithLinkFieldProps, type UploadWithLinkLabels, type UseThemedInputOptions, controlStyles, groupAriaChecked, inlineFieldRowLayout, isUnmatched, isWideFormLayout, nextHighlight, resolveGroupSelection, resolveStepNeighbours, suggestOptions, toggleGroupSelection, useFocusFirstInvalid, useKeepInView, useRecentValues, useThemedInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -300,6 +300,27 @@ interface InlineFieldRowLayout {
|
|
|
300
300
|
/** Field and action share one row only at `inlineMinWidth` and wider; below it they stack. */
|
|
301
301
|
declare function inlineFieldRowLayout(windowWidth: number, fieldMaxWidth: number, inlineMinWidth?: number): InlineFieldRowLayout;
|
|
302
302
|
|
|
303
|
+
interface FormStackProps {
|
|
304
|
+
children: React.ReactNode;
|
|
305
|
+
gap?: number;
|
|
306
|
+
style?: StyleProp<ViewStyle>;
|
|
307
|
+
testID?: string;
|
|
308
|
+
}
|
|
309
|
+
/** A vertical form column whose `gap` owns the rhythm, so the `Field`s inside drop their own bottom margin. */
|
|
310
|
+
declare const FormStack: ({ children, gap, style, testID, }: FormStackProps) => React.ReactElement;
|
|
311
|
+
|
|
312
|
+
interface ResponsiveFormLayoutProps {
|
|
313
|
+
narrow: React.ReactNode;
|
|
314
|
+
wide: React.ReactNode;
|
|
315
|
+
breakpoint?: number;
|
|
316
|
+
}
|
|
317
|
+
/** Renders `wide` when the window reaches `breakpoint`, else `narrow`, so a form switches layout by width. */
|
|
318
|
+
declare function ResponsiveFormLayout({ narrow, wide, breakpoint, }: ResponsiveFormLayoutProps): React.ReactElement;
|
|
319
|
+
|
|
320
|
+
declare const RESPONSIVE_FORM_DEFAULT_BREAKPOINT = 768;
|
|
321
|
+
/** True when `width` reaches `breakpoint`, so the wide layout applies. */
|
|
322
|
+
declare function isWideFormLayout(width: number, breakpoint?: number): boolean;
|
|
323
|
+
|
|
303
324
|
/**
|
|
304
325
|
* `FormSection` — a titled group of fields. The React answer to v1's `<fieldset>` / `<legend>`.
|
|
305
326
|
*
|
|
@@ -847,19 +868,6 @@ interface TypeaheadSearchProps extends TypeaheadCommonProps {
|
|
|
847
868
|
}
|
|
848
869
|
declare const TypeaheadControl: React.ForwardRefExoticComponent<((TypeaheadControlProps | TypeaheadSearchProps) & FieldControlWiring) & React.RefAttributes<TextInput>>;
|
|
849
870
|
|
|
850
|
-
/**
|
|
851
|
-
* `DateRangeControl` — an inclusive from/to pair (aml cases `from`/`to`, kefi audit `from`/`to`).
|
|
852
|
-
* Each side is a `YYYY-MM-DD` text input; on web the browser's native date UI is offered via
|
|
853
|
-
* `type="date"` (a react-native-web `TextInput` passes unknown props to the DOM input). Editing
|
|
854
|
-
* either side patches ONLY that side, so the other survives the edit.
|
|
855
|
-
*
|
|
856
|
-
* Promoted out of `@dloizides/ui-tables`' private `Filters/fields/DateRangeField`, which is why
|
|
857
|
-
* the fleet grew FIVE independent date fields.
|
|
858
|
-
*
|
|
859
|
-
* Label-free by design — the From/To sub-labels name the two HALVES; wrap in a `Field` for the
|
|
860
|
-
* range's own label.
|
|
861
|
-
*/
|
|
862
|
-
|
|
863
871
|
interface DateRangeControlProps {
|
|
864
872
|
value: DateRangeValue;
|
|
865
873
|
onChange: (value: DateRangeValue) => void;
|
|
@@ -878,6 +886,7 @@ interface DateRangeControlProps {
|
|
|
878
886
|
/** Row is `${testID}-range`, inputs `${testID}-from` / `${testID}-to`. */
|
|
879
887
|
testID: string;
|
|
880
888
|
}
|
|
889
|
+
/** An inclusive from/to date pair of two shared `DateField`s; each edit patches only its own side. */
|
|
881
890
|
declare function DateRangeControl({ value, onChange, onSubmit, fromLabel, toLabel, fromPlaceholder, toPlaceholder, accessibilityHint, style, testID, }: DateRangeControlProps): React.ReactElement;
|
|
882
891
|
|
|
883
892
|
interface DateFieldProps {
|
|
@@ -896,6 +905,7 @@ interface DateFieldProps {
|
|
|
896
905
|
disabled?: boolean;
|
|
897
906
|
min?: string;
|
|
898
907
|
max?: string;
|
|
908
|
+
placeholder?: string;
|
|
899
909
|
}
|
|
900
910
|
type DateTimeFieldProps = DateFieldProps;
|
|
901
911
|
|
|
@@ -1224,4 +1234,4 @@ interface UploadWithLinkFieldProps {
|
|
|
1224
1234
|
/** An image field: preview, an upload control, and a link input revealed on request. */
|
|
1225
1235
|
declare const UploadWithLinkField: ({ value, onChange, labels, uploadControl, testID, disabled, previewSize, }: UploadWithLinkFieldProps) => React.ReactElement;
|
|
1226
1236
|
|
|
1227
|
-
export { AlignToControl, type AlignToControlProps, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type ChipOption, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipVariant, type ControlOption, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, type DateFieldProps, DateRangeControl, type DateRangeControlProps, type DateRangeValue, DateTimeField, type DateTimeFieldProps, Field, type FieldChildContext, type FieldChildren, type FieldLabelVariant, type FieldMarker, type FieldProps, type FieldSpacing, type Focusable, type FocusableRefs, FormActions, type FormActionsProps, FormCell, type FormCellProps, FormCheckbox, type FormCheckboxProps, FormField, type FormFieldProps, FormGrid, type FormGridProps, FormSection, type FormSectionProps, FormStatusLine, type FormStatusLineProps, FormSwitch, type FormSwitchProps, type GroupSelection, INLINE_FIELD_ROW_MIN_WIDTH, InlineFieldRow, type InlineFieldRowLayout, type InlineFieldRowProps, type RecentValues, SelectControl, type SelectControlProps, SelectField, type SelectFieldProps, type SelectMenuAnchor, type StepNeighbours, StepperNav, type StepperNavLabels, type StepperNavProps, type StepperStep, StepperTabs, type StepperTabsProps, type ThemedInput, ThemedTextInput, type ThemedTextInputProps, TypeaheadControl, type TypeaheadControlProps, type TypeaheadSearch, type TypeaheadSearchProps, UploadWithLinkField, type UploadWithLinkFieldProps, type UploadWithLinkLabels, type UseThemedInputOptions, controlStyles, groupAriaChecked, inlineFieldRowLayout, isUnmatched, nextHighlight, resolveGroupSelection, resolveStepNeighbours, suggestOptions, toggleGroupSelection, useFocusFirstInvalid, useKeepInView, useRecentValues, useThemedInput };
|
|
1237
|
+
export { AlignToControl, type AlignToControlProps, AnchoredMenu, type AnchoredMenuColors, type AnchoredMenuListbox, type AnchoredMenuPlacement, type AnchoredMenuProps, type ChipOption, ChipSelector, type ChipSelectorProps, type ChipSingleSelectRole, type ChipVariant, type ControlOption, DEFAULT_MAX_RECENTS, DEFAULT_OPTIONAL_LABEL, DEFAULT_TYPEAHEAD_MAX_SUGGESTIONS, DEFAULT_TYPEAHEAD_MIN_CHARS, DateField, type DateFieldProps, DateRangeControl, type DateRangeControlProps, type DateRangeValue, DateTimeField, type DateTimeFieldProps, Field, type FieldChildContext, type FieldChildren, type FieldLabelVariant, type FieldMarker, type FieldProps, type FieldSpacing, type Focusable, type FocusableRefs, FormActions, type FormActionsProps, FormCell, type FormCellProps, FormCheckbox, type FormCheckboxProps, FormField, type FormFieldProps, FormGrid, type FormGridProps, FormSection, type FormSectionProps, FormStack, type FormStackProps, FormStatusLine, type FormStatusLineProps, FormSwitch, type FormSwitchProps, type GroupSelection, INLINE_FIELD_ROW_MIN_WIDTH, InlineFieldRow, type InlineFieldRowLayout, type InlineFieldRowProps, RESPONSIVE_FORM_DEFAULT_BREAKPOINT, type RecentValues, ResponsiveFormLayout, type ResponsiveFormLayoutProps, SelectControl, type SelectControlProps, SelectField, type SelectFieldProps, type SelectMenuAnchor, type StepNeighbours, StepperNav, type StepperNavLabels, type StepperNavProps, type StepperStep, StepperTabs, type StepperTabsProps, type ThemedInput, ThemedTextInput, type ThemedTextInputProps, TypeaheadControl, type TypeaheadControlProps, type TypeaheadSearch, type TypeaheadSearchProps, UploadWithLinkField, type UploadWithLinkFieldProps, type UploadWithLinkLabels, type UseThemedInputOptions, controlStyles, groupAriaChecked, inlineFieldRowLayout, isUnmatched, isWideFormLayout, nextHighlight, resolveGroupSelection, resolveStepNeighbours, suggestOptions, toggleGroupSelection, useFocusFirstInvalid, useKeepInView, useRecentValues, useThemedInput };
|
package/dist/index.js
CHANGED
|
@@ -363,9 +363,32 @@ var InlineFieldRow = ({
|
|
|
363
363
|
/* @__PURE__ */ jsxRuntime.jsx(AlignToControl, { style: styles4.action, children: action })
|
|
364
364
|
] });
|
|
365
365
|
};
|
|
366
|
+
var styles5 = reactNative.StyleSheet.create({
|
|
367
|
+
stack: { flexDirection: "column" }
|
|
368
|
+
});
|
|
369
|
+
var FormStack = ({
|
|
370
|
+
children,
|
|
371
|
+
gap = FORM_GRID_DEFAULT_GAP,
|
|
372
|
+
style,
|
|
373
|
+
testID
|
|
374
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles5.stack, { gap }, style], testID, children }) });
|
|
375
|
+
|
|
376
|
+
// src/ResponsiveFormLayout/isWideFormLayout.ts
|
|
377
|
+
var RESPONSIVE_FORM_DEFAULT_BREAKPOINT = 768;
|
|
378
|
+
function isWideFormLayout(width, breakpoint = RESPONSIVE_FORM_DEFAULT_BREAKPOINT) {
|
|
379
|
+
return width >= breakpoint;
|
|
380
|
+
}
|
|
381
|
+
function ResponsiveFormLayout({
|
|
382
|
+
narrow,
|
|
383
|
+
wide,
|
|
384
|
+
breakpoint = RESPONSIVE_FORM_DEFAULT_BREAKPOINT
|
|
385
|
+
}) {
|
|
386
|
+
const { width } = reactNative.useWindowDimensions();
|
|
387
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: isWideFormLayout(width, breakpoint) ? wide : narrow });
|
|
388
|
+
}
|
|
366
389
|
var SECTION_GAP = 10;
|
|
367
390
|
var DESCRIPTION_FONT_SIZE = 12;
|
|
368
|
-
var
|
|
391
|
+
var styles6 = reactNative.StyleSheet.create({
|
|
369
392
|
section: {
|
|
370
393
|
gap: SECTION_GAP
|
|
371
394
|
},
|
|
@@ -400,7 +423,7 @@ var FormSection = ({
|
|
|
400
423
|
// The section spaces its children with `gap`, so it owns their vertical rhythm exactly as a
|
|
401
424
|
// `FormGrid` owns a row's — without this a `Field` placed directly in a section would stack its
|
|
402
425
|
// 16px margin on the section's gap and recreate the F3 bug one level up.
|
|
403
|
-
/* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { role: "group", style: [
|
|
426
|
+
/* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { role: "group", style: [styles6.section, style], testID, ...a11y, children: [
|
|
404
427
|
hasTitle ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
405
428
|
reactNative.Text,
|
|
406
429
|
{
|
|
@@ -409,13 +432,13 @@ var FormSection = ({
|
|
|
409
432
|
children: title
|
|
410
433
|
}
|
|
411
434
|
) : null,
|
|
412
|
-
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
435
|
+
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.description, { color: colors.textSecondary }], children: description }) : null,
|
|
413
436
|
children
|
|
414
437
|
] }) })
|
|
415
438
|
);
|
|
416
439
|
};
|
|
417
440
|
var ACTIONS_GAP = 12;
|
|
418
|
-
var
|
|
441
|
+
var styles7 = reactNative.StyleSheet.create({
|
|
419
442
|
container: {
|
|
420
443
|
flexDirection: "row",
|
|
421
444
|
justifyContent: "flex-end",
|
|
@@ -435,7 +458,7 @@ var FormActions = ({
|
|
|
435
458
|
saveTestID = "save-button",
|
|
436
459
|
cancelTestID = "cancel-button",
|
|
437
460
|
testID
|
|
438
|
-
}) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
461
|
+
}) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles7.container, containerStyle], testID, children: [
|
|
439
462
|
typeof onCancel === "function" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
440
463
|
uiButtons.Button,
|
|
441
464
|
{
|
|
@@ -556,7 +579,7 @@ var DETAIL_FONT = 12;
|
|
|
556
579
|
var DETAIL_GAP = 12;
|
|
557
580
|
var STACK_GAP = 2;
|
|
558
581
|
var DETAIL_BESIDE_MIN_MENU_WIDTH = 400;
|
|
559
|
-
var
|
|
582
|
+
var styles8 = reactNative.StyleSheet.create({
|
|
560
583
|
beside: { alignItems: "baseline", flexDirection: "row", gap: DETAIL_GAP, justifyContent: "space-between" },
|
|
561
584
|
stacked: { gap: STACK_GAP },
|
|
562
585
|
shrink: { flexShrink: 1 },
|
|
@@ -591,9 +614,9 @@ function OptionRow({ option, isActive, isHighlighted, isListboxRow, menuWidth, h
|
|
|
591
614
|
onPress: () => onSelect(option.value),
|
|
592
615
|
style: [controlStyles.option, isHighlighted ? { backgroundColor: colors.text } : null],
|
|
593
616
|
testID: `${testID}-option-${option.value}`,
|
|
594
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: isDetailBesideTitle(menuWidth) ?
|
|
595
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [controlStyles.optionText,
|
|
596
|
-
hasDetail ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
617
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: isDetailBesideTitle(menuWidth) ? styles8.beside : styles8.stacked, children: [
|
|
618
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [controlStyles.optionText, styles8.shrink, { color: ink.title, fontWeight: isBold ? ACTIVE_WEIGHT : IDLE_WEIGHT }], children: option.label }),
|
|
619
|
+
hasDetail ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.detail, { color: ink.detail }], children: option.detail }) : null
|
|
597
620
|
] })
|
|
598
621
|
}
|
|
599
622
|
);
|
|
@@ -1383,7 +1406,7 @@ function chipIdentity(option, selected, config) {
|
|
|
1383
1406
|
ariaChecked: isRadio ? selected : void 0
|
|
1384
1407
|
};
|
|
1385
1408
|
}
|
|
1386
|
-
var
|
|
1409
|
+
var styles9 = reactNative.StyleSheet.create({
|
|
1387
1410
|
chipContainer: {
|
|
1388
1411
|
flexDirection: "row",
|
|
1389
1412
|
flexWrap: "wrap",
|
|
@@ -1469,7 +1492,7 @@ var ChipSelector = ({
|
|
|
1469
1492
|
reactNative.View,
|
|
1470
1493
|
{
|
|
1471
1494
|
accessibilityRole: isRadioGroup ? "radiogroup" : void 0,
|
|
1472
|
-
style:
|
|
1495
|
+
style: styles9.chipContainer,
|
|
1473
1496
|
...webFieldA11y({ describedById, hasError }),
|
|
1474
1497
|
...radio.groupProps,
|
|
1475
1498
|
children: options.map(renderChip)
|
|
@@ -1479,7 +1502,7 @@ var ChipSelector = ({
|
|
|
1479
1502
|
);
|
|
1480
1503
|
};
|
|
1481
1504
|
var DESCRIPTION_FONT_SIZE2 = 12;
|
|
1482
|
-
var
|
|
1505
|
+
var styles10 = reactNative.StyleSheet.create({
|
|
1483
1506
|
container: {
|
|
1484
1507
|
flexDirection: "row",
|
|
1485
1508
|
justifyContent: "space-between",
|
|
@@ -1540,15 +1563,15 @@ var FormSwitch = ({
|
|
|
1540
1563
|
accessible: false,
|
|
1541
1564
|
disabled,
|
|
1542
1565
|
onPress: toggle,
|
|
1543
|
-
style: [
|
|
1566
|
+
style: [styles10.container, containerStyle],
|
|
1544
1567
|
tabIndex: -1,
|
|
1545
1568
|
testID: `${testID}-row`,
|
|
1546
1569
|
children: [
|
|
1547
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1548
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1549
|
-
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1570
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles10.textColumn, children: [
|
|
1571
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.label, themeStyles.label], children: label }),
|
|
1572
|
+
hasDescription ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.description, themeStyles.description], children: description }) : null
|
|
1550
1573
|
] }),
|
|
1551
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style:
|
|
1574
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: styles10.switchSlot, testID: `${testID}-hitbox`, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1552
1575
|
reactNative.Switch,
|
|
1553
1576
|
{
|
|
1554
1577
|
accessibilityHint: accessibilityHint ?? label,
|
|
@@ -1577,7 +1600,7 @@ var DISABLED_OPACITY = 0.5;
|
|
|
1577
1600
|
var FOCUS_RING_WIDTH = 2;
|
|
1578
1601
|
var WEB_NO_DEFAULT_OUTLINE = { outlineStyle: "none" };
|
|
1579
1602
|
var FOCUS_RING_INSET = -6;
|
|
1580
|
-
var
|
|
1603
|
+
var styles11 = reactNative.StyleSheet.create({
|
|
1581
1604
|
container: {
|
|
1582
1605
|
flexDirection: "row",
|
|
1583
1606
|
alignItems: "flex-start",
|
|
@@ -1682,8 +1705,8 @@ var FormCheckbox = ({
|
|
|
1682
1705
|
onPress: toggle,
|
|
1683
1706
|
role: "checkbox",
|
|
1684
1707
|
style: [
|
|
1685
|
-
|
|
1686
|
-
hasHint ? null :
|
|
1708
|
+
styles11.container,
|
|
1709
|
+
hasHint ? null : styles11.centered,
|
|
1687
1710
|
containerStyle,
|
|
1688
1711
|
disabled ? { opacity: DISABLED_OPACITY } : null,
|
|
1689
1712
|
reactNative.Platform.OS === "web" ? WEB_NO_DEFAULT_OUTLINE : null
|
|
@@ -1691,13 +1714,13 @@ var FormCheckbox = ({
|
|
|
1691
1714
|
testID,
|
|
1692
1715
|
...keyboardProps,
|
|
1693
1716
|
children: [
|
|
1694
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
1695
|
-
focused ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: [
|
|
1696
|
-
value ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1717
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles11.box, value ? themeStyles.boxOn : themeStyles.boxOff], testID: `${testID}-box`, children: [
|
|
1718
|
+
focused ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { pointerEvents: "none", style: [styles11.focusRing, themeStyles.ring], testID: `${testID}-focus-ring` }) : null,
|
|
1719
|
+
value ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.check, { color: colors.surface }], accessibilityElementsHidden: true, children: "\u2713" }) : null
|
|
1697
1720
|
] }),
|
|
1698
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
1699
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
1700
|
-
hasHint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: hintId, style: [
|
|
1721
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.textColumn, children: [
|
|
1722
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.label, themeStyles.label], children: label }),
|
|
1723
|
+
hasHint ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { nativeID: hintId, style: [styles11.hint, themeStyles.hint], children: hintText }) : null
|
|
1701
1724
|
] })
|
|
1702
1725
|
]
|
|
1703
1726
|
}
|
|
@@ -2097,78 +2120,6 @@ function TypeaheadControlImpl(props, ref) {
|
|
|
2097
2120
|
] });
|
|
2098
2121
|
}
|
|
2099
2122
|
var TypeaheadControl = React2.forwardRef(TypeaheadControlImpl);
|
|
2100
|
-
var WEB_DATE_PROPS = typeof document !== "undefined" ? { type: "date" } : {};
|
|
2101
|
-
function DateInput(p) {
|
|
2102
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: controlStyles.dateCol, children: [
|
|
2103
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [controlStyles.subLabel, { color: p.muted }], children: p.label }),
|
|
2104
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2105
|
-
reactNative.TextInput,
|
|
2106
|
-
{
|
|
2107
|
-
accessibilityLabel: p.label,
|
|
2108
|
-
accessibilityHint: p.hint,
|
|
2109
|
-
placeholder: p.placeholder,
|
|
2110
|
-
placeholderTextColor: p.muted,
|
|
2111
|
-
value: p.value,
|
|
2112
|
-
onChangeText: p.onChangeText,
|
|
2113
|
-
onSubmitEditing: p.onSubmit,
|
|
2114
|
-
style: [controlStyles.input, { borderColor: p.border, backgroundColor: p.surface, color: p.color }],
|
|
2115
|
-
testID: `${p.testID}-${p.side}`,
|
|
2116
|
-
...WEB_DATE_PROPS
|
|
2117
|
-
}
|
|
2118
|
-
)
|
|
2119
|
-
] });
|
|
2120
|
-
}
|
|
2121
|
-
function DateRangeControl({
|
|
2122
|
-
value,
|
|
2123
|
-
onChange,
|
|
2124
|
-
onSubmit,
|
|
2125
|
-
fromLabel,
|
|
2126
|
-
toLabel,
|
|
2127
|
-
fromPlaceholder,
|
|
2128
|
-
toPlaceholder,
|
|
2129
|
-
accessibilityHint,
|
|
2130
|
-
style,
|
|
2131
|
-
testID
|
|
2132
|
-
}) {
|
|
2133
|
-
const { theme } = uiFeedback.useUi();
|
|
2134
|
-
const { colors } = theme;
|
|
2135
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [controlStyles.dateRow, style], testID: `${testID}-range`, children: [
|
|
2136
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2137
|
-
DateInput,
|
|
2138
|
-
{
|
|
2139
|
-
side: "from",
|
|
2140
|
-
label: fromLabel,
|
|
2141
|
-
placeholder: fromPlaceholder,
|
|
2142
|
-
value: value.from,
|
|
2143
|
-
color: colors.text,
|
|
2144
|
-
border: colors.border,
|
|
2145
|
-
surface: colors.surface,
|
|
2146
|
-
muted: colors.textSecondary,
|
|
2147
|
-
hint: accessibilityHint,
|
|
2148
|
-
testID,
|
|
2149
|
-
onChangeText: (from) => onChange({ from, to: value.to }),
|
|
2150
|
-
onSubmit
|
|
2151
|
-
}
|
|
2152
|
-
),
|
|
2153
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2154
|
-
DateInput,
|
|
2155
|
-
{
|
|
2156
|
-
side: "to",
|
|
2157
|
-
label: toLabel,
|
|
2158
|
-
placeholder: toPlaceholder,
|
|
2159
|
-
value: value.to,
|
|
2160
|
-
color: colors.text,
|
|
2161
|
-
border: colors.border,
|
|
2162
|
-
surface: colors.surface,
|
|
2163
|
-
muted: colors.textSecondary,
|
|
2164
|
-
hint: accessibilityHint,
|
|
2165
|
-
testID,
|
|
2166
|
-
onChangeText: (to) => onChange({ from: value.from, to }),
|
|
2167
|
-
onSubmit
|
|
2168
|
-
}
|
|
2169
|
-
)
|
|
2170
|
-
] });
|
|
2171
|
-
}
|
|
2172
2123
|
var NATIVE_INPUT_BOX = {
|
|
2173
2124
|
borderStyle: "solid",
|
|
2174
2125
|
boxSizing: "border-box",
|
|
@@ -2231,6 +2182,7 @@ function renderNativeInput(fieldProps, context) {
|
|
|
2231
2182
|
editable: fieldProps.disabled !== true,
|
|
2232
2183
|
hasError: context.hasError,
|
|
2233
2184
|
id: context.controlId,
|
|
2185
|
+
placeholder: fieldProps.placeholder,
|
|
2234
2186
|
requiredField: fieldProps.required,
|
|
2235
2187
|
testID: fieldProps.testID,
|
|
2236
2188
|
value: fieldProps.value,
|
|
@@ -2246,6 +2198,46 @@ function TemporalField({ fieldProps, webInputType }) {
|
|
|
2246
2198
|
function DateField(props) {
|
|
2247
2199
|
return /* @__PURE__ */ jsxRuntime.jsx(TemporalField, { fieldProps: props, webInputType: "date" });
|
|
2248
2200
|
}
|
|
2201
|
+
function DateRangeControl({
|
|
2202
|
+
value,
|
|
2203
|
+
onChange,
|
|
2204
|
+
onSubmit,
|
|
2205
|
+
fromLabel,
|
|
2206
|
+
toLabel,
|
|
2207
|
+
fromPlaceholder,
|
|
2208
|
+
toPlaceholder,
|
|
2209
|
+
accessibilityHint,
|
|
2210
|
+
style,
|
|
2211
|
+
testID
|
|
2212
|
+
}) {
|
|
2213
|
+
const hint = accessibilityHint ?? "";
|
|
2214
|
+
return /* @__PURE__ */ jsxRuntime.jsx(GapOwnedProvider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [controlStyles.dateRow, style], testID: `${testID}-range`, children: [
|
|
2215
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: controlStyles.dateCol, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2216
|
+
DateField,
|
|
2217
|
+
{
|
|
2218
|
+
accessibilityHint: hint,
|
|
2219
|
+
label: fromLabel,
|
|
2220
|
+
placeholder: fromPlaceholder,
|
|
2221
|
+
testID: `${testID}-from`,
|
|
2222
|
+
value: value.from,
|
|
2223
|
+
onChange: (from) => onChange({ from, to: value.to }),
|
|
2224
|
+
onSubmit
|
|
2225
|
+
}
|
|
2226
|
+
) }),
|
|
2227
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: controlStyles.dateCol, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2228
|
+
DateField,
|
|
2229
|
+
{
|
|
2230
|
+
accessibilityHint: hint,
|
|
2231
|
+
label: toLabel,
|
|
2232
|
+
placeholder: toPlaceholder,
|
|
2233
|
+
testID: `${testID}-to`,
|
|
2234
|
+
value: value.to,
|
|
2235
|
+
onChange: (to) => onChange({ from: value.from, to }),
|
|
2236
|
+
onSubmit
|
|
2237
|
+
}
|
|
2238
|
+
) })
|
|
2239
|
+
] }) });
|
|
2240
|
+
}
|
|
2249
2241
|
function DateTimeField(props) {
|
|
2250
2242
|
return /* @__PURE__ */ jsxRuntime.jsx(TemporalField, { fieldProps: props, webInputType: "datetime-local" });
|
|
2251
2243
|
}
|
|
@@ -2277,7 +2269,7 @@ var ROW_GAP = 4;
|
|
|
2277
2269
|
var TAB_PADDING = 4;
|
|
2278
2270
|
var INDICATOR_WIDTH = 2;
|
|
2279
2271
|
var TAB_FONT_SIZE = 12;
|
|
2280
|
-
var
|
|
2272
|
+
var styles12 = reactNative.StyleSheet.create({
|
|
2281
2273
|
row: { flexDirection: "row", flexWrap: "nowrap", gap: ROW_GAP },
|
|
2282
2274
|
tab: {
|
|
2283
2275
|
borderBottomWidth: INDICATOR_WIDTH,
|
|
@@ -2317,13 +2309,13 @@ var StepperTab = ({
|
|
|
2317
2309
|
accessibilityRole: "tab",
|
|
2318
2310
|
accessibilityState: { selected },
|
|
2319
2311
|
"aria-selected": selected,
|
|
2320
|
-
style: [
|
|
2312
|
+
style: [styles12.tab, { borderBottomColor: indicator }, ring.ringStyle],
|
|
2321
2313
|
testID,
|
|
2322
2314
|
onBlur: ring.onBlur,
|
|
2323
2315
|
onFocus: ring.onFocus,
|
|
2324
2316
|
onPress: () => onStep(step.key),
|
|
2325
2317
|
...webKeyProps,
|
|
2326
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2318
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.text, { color: theme.colors.text }, selected ? styles12.textSelected : void 0], children: step.label })
|
|
2327
2319
|
}
|
|
2328
2320
|
);
|
|
2329
2321
|
};
|
|
@@ -2333,7 +2325,7 @@ var StepperTabs = ({
|
|
|
2333
2325
|
onStep,
|
|
2334
2326
|
stepHint,
|
|
2335
2327
|
testID
|
|
2336
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", style:
|
|
2328
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityRole: "tablist", style: styles12.row, testID, children: steps.map((step) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2337
2329
|
StepperTab,
|
|
2338
2330
|
{
|
|
2339
2331
|
hint: stepHint,
|
|
@@ -2352,7 +2344,7 @@ function resolveStepNeighbours(steps, current) {
|
|
|
2352
2344
|
return { previous: steps[index - 1] ?? null, next: steps[index + 1] ?? null };
|
|
2353
2345
|
}
|
|
2354
2346
|
var ROW_GAP2 = 8;
|
|
2355
|
-
var
|
|
2347
|
+
var styles13 = reactNative.StyleSheet.create({
|
|
2356
2348
|
cell: { flex: 1, minWidth: 0 },
|
|
2357
2349
|
row: { flexDirection: "row", gap: ROW_GAP2 }
|
|
2358
2350
|
});
|
|
@@ -2364,8 +2356,8 @@ var StepperNav = ({
|
|
|
2364
2356
|
testID
|
|
2365
2357
|
}) => {
|
|
2366
2358
|
const { previous, next } = resolveStepNeighbours(steps, current);
|
|
2367
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2368
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2359
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles13.row, testID, children: [
|
|
2360
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles13.cell, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2369
2361
|
uiButtons.Button,
|
|
2370
2362
|
{
|
|
2371
2363
|
fullWidth: true,
|
|
@@ -2381,7 +2373,7 @@ var StepperNav = ({
|
|
|
2381
2373
|
}
|
|
2382
2374
|
}
|
|
2383
2375
|
) }),
|
|
2384
|
-
next === null ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2376
|
+
next === null ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles13.cell, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2385
2377
|
uiButtons.Button,
|
|
2386
2378
|
{
|
|
2387
2379
|
fullWidth: true,
|
|
@@ -2396,13 +2388,13 @@ var StepperNav = ({
|
|
|
2396
2388
|
] });
|
|
2397
2389
|
};
|
|
2398
2390
|
var STATUS_FONT = 16;
|
|
2399
|
-
var
|
|
2391
|
+
var styles14 = reactNative.StyleSheet.create({
|
|
2400
2392
|
line: { fontSize: STATUS_FONT }
|
|
2401
2393
|
});
|
|
2402
2394
|
function FormStatusLine({ message, testID, style }) {
|
|
2403
2395
|
const { theme } = uiFeedback.useUi();
|
|
2404
2396
|
if (message === null || message === void 0 || message === "") return null;
|
|
2405
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [
|
|
2397
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { role: "alert", style: [styles14.line, { color: theme.colors.text }, style], testID, children: message });
|
|
2406
2398
|
}
|
|
2407
2399
|
function useFocusFirstInvalid(refs) {
|
|
2408
2400
|
const latest = React2.useRef(refs);
|
|
@@ -2429,7 +2421,7 @@ var PREVIEW_RADIUS = 8;
|
|
|
2429
2421
|
var GAP = 8;
|
|
2430
2422
|
var TITLE_FONT_SIZE = 14;
|
|
2431
2423
|
var HELP_FONT_SIZE = 13;
|
|
2432
|
-
var
|
|
2424
|
+
var styles15 = reactNative.StyleSheet.create({
|
|
2433
2425
|
help: { flex: 1, fontSize: HELP_FONT_SIZE },
|
|
2434
2426
|
root: { gap: GAP },
|
|
2435
2427
|
tile: { alignItems: "center", flexDirection: "row", gap: GAP },
|
|
@@ -2451,11 +2443,11 @@ var UploadWithLinkField = ({
|
|
|
2451
2443
|
const url = value ?? "";
|
|
2452
2444
|
const [pasting, setPasting] = React2.useState(url !== "");
|
|
2453
2445
|
const previewBox = { borderRadius: PREVIEW_RADIUS, height: previewSize, width: previewSize };
|
|
2454
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2455
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2456
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2446
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.root, children: [
|
|
2447
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.title, { color: theme.colors.text }], children: labels.title }),
|
|
2448
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.tile, children: [
|
|
2457
2449
|
url === "" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [previewBox, { backgroundColor: theme.colors.border }] }) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { accessible: false, source: { uri: url }, style: previewBox, testID: `${testID}-preview` }),
|
|
2458
|
-
labels.help === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2450
|
+
labels.help === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.help, { color: theme.colors.text }], children: labels.help })
|
|
2459
2451
|
] }),
|
|
2460
2452
|
uploadControl,
|
|
2461
2453
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2466,12 +2458,12 @@ var UploadWithLinkField = ({
|
|
|
2466
2458
|
accessibilityRole: "button",
|
|
2467
2459
|
accessibilityState: { expanded: pasting },
|
|
2468
2460
|
"aria-expanded": pasting,
|
|
2469
|
-
style: [
|
|
2461
|
+
style: [styles15.toggle, ring.ringStyle],
|
|
2470
2462
|
testID: `${testID}-paste`,
|
|
2471
2463
|
onBlur: ring.onBlur,
|
|
2472
2464
|
onFocus: ring.onFocus,
|
|
2473
2465
|
onPress: () => setPasting(!pasting),
|
|
2474
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2466
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.toggleText, { color: theme.colors.text }], children: labels.pasteToggle })
|
|
2475
2467
|
}
|
|
2476
2468
|
),
|
|
2477
2469
|
pasting ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2506,10 +2498,13 @@ exports.FormCheckbox = FormCheckbox;
|
|
|
2506
2498
|
exports.FormField = FormField;
|
|
2507
2499
|
exports.FormGrid = FormGrid;
|
|
2508
2500
|
exports.FormSection = FormSection;
|
|
2501
|
+
exports.FormStack = FormStack;
|
|
2509
2502
|
exports.FormStatusLine = FormStatusLine;
|
|
2510
2503
|
exports.FormSwitch = FormSwitch;
|
|
2511
2504
|
exports.INLINE_FIELD_ROW_MIN_WIDTH = INLINE_FIELD_ROW_MIN_WIDTH;
|
|
2512
2505
|
exports.InlineFieldRow = InlineFieldRow;
|
|
2506
|
+
exports.RESPONSIVE_FORM_DEFAULT_BREAKPOINT = RESPONSIVE_FORM_DEFAULT_BREAKPOINT;
|
|
2507
|
+
exports.ResponsiveFormLayout = ResponsiveFormLayout;
|
|
2513
2508
|
exports.SelectControl = SelectControl;
|
|
2514
2509
|
exports.SelectField = SelectField;
|
|
2515
2510
|
exports.StepperNav = StepperNav;
|
|
@@ -2521,6 +2516,7 @@ exports.controlStyles = controlStyles;
|
|
|
2521
2516
|
exports.groupAriaChecked = groupAriaChecked;
|
|
2522
2517
|
exports.inlineFieldRowLayout = inlineFieldRowLayout;
|
|
2523
2518
|
exports.isUnmatched = isUnmatched;
|
|
2519
|
+
exports.isWideFormLayout = isWideFormLayout;
|
|
2524
2520
|
exports.nextHighlight = nextHighlight;
|
|
2525
2521
|
exports.resolveGroupSelection = resolveGroupSelection;
|
|
2526
2522
|
exports.resolveStepNeighbours = resolveStepNeighbours;
|