formica-ui-lib 1.0.318 → 1.0.320

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.
@@ -16,6 +16,7 @@ export interface DropdownProps {
16
16
  required?: boolean;
17
17
  hasError?: boolean;
18
18
  variant?: "field" | "filter" | "toolbar";
19
+ pickerVariant?: "native" | "rounded";
19
20
  onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void;
20
21
  onBlur?: (event: React.FocusEvent<HTMLSelectElement>) => void;
21
22
  }
@@ -0,0 +1,34 @@
1
+ export interface VendorImportFilePayload {
2
+ file: File;
3
+ }
4
+ export type VendorImportMode = "add" | "replace";
5
+ export interface VendorImportModePayload {
6
+ mode: VendorImportMode;
7
+ }
8
+ export interface VendorImportModeLabels {
9
+ label?: string;
10
+ description?: string;
11
+ uploadLabel?: string;
12
+ }
13
+ export interface VendorImportSectionProps {
14
+ /** Optional UI copy overrides. The API mode remains add or replace. */
15
+ modeLabels?: Partial<Record<VendorImportMode, VendorImportModeLabels>>;
16
+ mode: VendorImportMode;
17
+ /** Names the exact set of vendor listings affected, for example Europe. */
18
+ targetLabel: string;
19
+ onModeChange: (payload: VendorImportModePayload) => void;
20
+ scopeDescription: string;
21
+ importDescription: string;
22
+ acceptedExtensions: string[];
23
+ maxFileSizeBytes: number;
24
+ fileName?: string;
25
+ state: "idle" | "selected" | "processing" | "importing" | "success" | "error";
26
+ message?: string;
27
+ errors?: string[];
28
+ disabled?: boolean;
29
+ onFileSelect: (payload: VendorImportFilePayload) => void;
30
+ onFileRemove: () => void;
31
+ /** Starts the complete upload/import operation with the selected mode. */
32
+ onImportClick: (payload: VendorImportModePayload) => void;
33
+ onTemplateDownloadClick?: () => void;
34
+ }
@@ -1,4 +1,5 @@
1
1
  import type { AdminSideNavProps } from "../../../organisms/navigation/AdminSideNavProps";
2
+ import type { VendorImportSectionProps } from "../../../organisms/sections/vendorimportsection/VendorImportSectionProps";
2
3
  import type { AdminRegionSelectorProps } from "../../../molecules/selectors/adminregionselector/AdminRegionSelectorProps";
3
4
  import type { AdminTemplateStatus } from "../shared/AdminTemplateStatus";
4
5
  import type { DynamicFormFieldChangePayload } from "../../../organisms/forms/dynamicform/DynamicFormProps";
@@ -61,6 +62,7 @@ export interface WhereToBuyAddressLookupProps {
61
62
  results: WhereToBuyAddressSuggestion[];
62
63
  }
63
64
  export interface WhereToBuyLandingPageProps {
65
+ importProps?: VendorImportSectionProps;
64
66
  sideNavProps: AdminSideNavProps;
65
67
  regionSelectorProps: AdminRegionSelectorProps;
66
68
  localities: WhereToBuyLocality[];
@@ -0,0 +1,11 @@
1
+ import { DocumentInfoCollectionProps } from "../../organisms/collections/documentinfocollection/DocumentInfoCollectionProps";
2
+ import { SearchBarProps } from "../../molecules/searchbar/SearchBarProps";
3
+ import { DropdownProps } from "../../atoms/dropdown/DropdownProps";
4
+ import { TextCardProps } from "../../molecules/cards/textcard/TextCardProps";
5
+ export type DocumentResultsTemplateProps = {
6
+ documentInfoCollectionProps: DocumentInfoCollectionProps;
7
+ textCard: Pick<TextCardProps, "heading" | "subheading" | "body">;
8
+ documentDropdownFilters: DropdownProps[];
9
+ searchBarProps: SearchBarProps;
10
+ mobileFilterLabel?: string;
11
+ };