formica-ui-lib 1.0.346 → 1.0.348

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.
@@ -7,6 +7,7 @@ export interface DropdownOption {
7
7
  export interface DropdownProps {
8
8
  id: string;
9
9
  name?: string;
10
+ autoComplete?: string;
10
11
  ariaLabel?: string;
11
12
  ariaDescribedBy?: string;
12
13
  options?: DropdownOption[];
@@ -5,6 +5,11 @@ export interface InputProps {
5
5
  type?: "text" | "email" | "password" | "tel" | "number" | "search" | "date";
6
6
  value?: string;
7
7
  placeholder?: string;
8
+ role?: React.AriaRole;
9
+ ariaExpanded?: boolean;
10
+ ariaControls?: string;
11
+ ariaActiveDescendant?: string;
12
+ ariaAutoComplete?: React.AriaAttributes["aria-autocomplete"];
8
13
  ariaLabel?: string;
9
14
  ariaDescribedBy?: string;
10
15
  disabled?: boolean;
@@ -1,5 +1,5 @@
1
1
  export type WhereToBuyLocationType = "distributor" | "sales-rep" | "retailer";
2
- export type WhereToBuyDealerType = WhereToBuyLocationType | "postformer-fabricator" | "trespa-toplab-fabricator";
2
+ export type WhereToBuyDealerType = WhereToBuyLocationType | "postformer-fabricator" | "trespa-toplab-fabricator" | "door-partner" | "showroom";
3
3
  export type WhereToBuyLocationAddress = {
4
4
  lines: string[];
5
5
  city: string;
@@ -19,6 +19,13 @@ export interface SearchComboboxClearPayload {
19
19
  }
20
20
  export type SearchComboboxValueStatus = "default" | "inactive";
21
21
  export interface SearchComboboxProps {
22
+ variant?: "search" | "address";
23
+ autoComplete?: string;
24
+ ariaDescribedBy?: string;
25
+ errorMessage?: string;
26
+ suggestionsFooter?: React.ReactNode;
27
+ onInputChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
28
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
22
29
  id?: string;
23
30
  name?: string;
24
31
  ariaLabel?: string;
@@ -26,6 +33,9 @@ export interface SearchComboboxProps {
26
33
  value?: string;
27
34
  options: SearchComboboxOption[];
28
35
  emptyMessage?: string;
36
+ /** App-owned request state. Clear options when the query changes and discard stale responses. */
37
+ isLoading?: boolean;
38
+ loadingMessage?: string;
29
39
  minQueryLength?: number;
30
40
  disabled?: boolean;
31
41
  readOnly?: boolean;
@@ -38,4 +48,5 @@ export interface SearchComboboxProps {
38
48
  onSearchSubmit?: (payload: SearchComboboxSubmitPayload) => void;
39
49
  onClear?: (payload: SearchComboboxClearPayload) => void;
40
50
  }
51
+ import type React from "react";
41
52
  import type { SearchBarControlSize } from "../searchbar/SearchBarProps";
@@ -1,6 +1,18 @@
1
1
  import React from "react";
2
+ import type { SearchComboboxOption, SearchComboboxSelectPayload } from "../../../molecules/searchcombobox/SearchComboboxProps";
2
3
  import { DropdownOption } from "../../../atoms/dropdown/DropdownProps";
3
4
  import type { UserTypeOption, UserTypeValue } from "../../../shared/UserTypeOptions";
5
+ export interface ShippingAddressAutocompleteProps {
6
+ options: SearchComboboxOption[];
7
+ /** The app must clear stale options and ignore responses for older queries. */
8
+ isLoading?: boolean;
9
+ loadingMessage?: string;
10
+ minQueryLength?: number;
11
+ emptyMessage?: string;
12
+ suggestionsFooter?: React.ReactNode;
13
+ onOptionSelect?: (payload: SearchComboboxSelectPayload) => void;
14
+ }
15
+ export type AddressPurpose = "shipping" | "billing";
4
16
  export type ShippingAddressRegionVariant = "default" | "ca" | "mx" | "uk";
5
17
  export type ShippingCountryDisplayMode = "select" | "readonly";
6
18
  export interface ShippingAddressFormErrors {
@@ -18,6 +30,9 @@ export interface ShippingAddressFormErrors {
18
30
  stateProvince?: string;
19
31
  }
20
32
  export interface ShippingAddressFormProps {
33
+ /** Separates browser autofill for shipping and billing details. */
34
+ addressPurpose?: AddressPurpose;
35
+ addressAutocomplete?: ShippingAddressAutocompleteProps;
21
36
  title?: string;
22
37
  idPrefix?: string;
23
38
  firstName?: string;
@@ -0,0 +1,8 @@
1
+ export type PromoBannerProps = {
2
+ open: boolean;
3
+ message: string;
4
+ onClose: () => void;
5
+ onButtonClick?: () => void;
6
+ buttonLabel?: string;
7
+ closeLabel?: string;
8
+ };
@@ -2,7 +2,7 @@ import type { AdminSideNavProps } from "../../../organisms/navigation/AdminSideN
2
2
  import type { VendorImportSectionProps } from "../../../organisms/sections/vendorimportsection/VendorImportSectionProps";
3
3
  import type { AdminRegionSelectorProps } from "../../../molecules/selectors/adminregionselector/AdminRegionSelectorProps";
4
4
  import type { AdminTemplateStatus } from "../shared/AdminTemplateStatus";
5
- import type { DynamicFormFieldChangePayload } from "../../../organisms/forms/dynamicform/DynamicFormProps";
5
+ import type { DynamicFormFieldChangePayload, DynamicFormFieldOption } from "../../../organisms/forms/dynamicform/DynamicFormProps";
6
6
  export interface WhereToBuyLocality {
7
7
  id: string;
8
8
  region: string;
@@ -27,6 +27,7 @@ export interface WhereToBuyVendor {
27
27
  websiteUrl: string;
28
28
  distributorTypes: string[];
29
29
  stockedRanges: string[];
30
+ companyName: string;
30
31
  }
31
32
  export interface WhereToBuyOption {
32
33
  id: string;
@@ -80,6 +81,7 @@ export interface WhereToBuyDetailPageProps {
80
81
  editor?: WhereToBuyVendor;
81
82
  isCreating?: boolean;
82
83
  searchValue: string;
84
+ companyNameOptions: DynamicFormFieldOption[];
83
85
  distributorTypeOptions: WhereToBuyOption[];
84
86
  stockedRangeOptions: WhereToBuyOption[];
85
87
  status?: AdminTemplateStatus;