formica-ui-lib 1.0.347 → 1.0.349
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/componentProps/atoms/dropdown/DropdownProps.d.ts +1 -0
- package/dist/componentProps/atoms/input/inputProps.d.ts +5 -0
- package/dist/componentProps/molecules/cart/cartactions/CartActionsProps.d.ts +9 -1
- package/dist/componentProps/molecules/searchcombobox/SearchComboboxProps.d.ts +11 -0
- package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelLeftPanelProps.d.ts +3 -0
- package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelProps.d.ts +4 -1
- package/dist/componentProps/organisms/cart/shippingaddressform/ShippingAddressFormProps.d.ts +15 -0
- package/dist/componentProps/organisms/navigation/PromoBannerProps.d.ts +8 -0
- package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts +4 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1562 -1445
- package/dist/stories/organisms/navigation/PromoBanner/PromoBanner.d.ts +4 -0
- package/dist/tailwind.css +1 -1
- package/package.json +1 -1
|
@@ -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,13 @@
|
|
|
1
|
+
/** Availability of the current SKU and purchase tab, supplied by the app. */
|
|
2
|
+
export type ProductPurchaseAvailability = {
|
|
3
|
+
status: "available";
|
|
4
|
+
} | {
|
|
5
|
+
status: "outOfStock";
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
1
8
|
export type CartActionsProps = {
|
|
2
|
-
|
|
9
|
+
availability?: ProductPurchaseAvailability;
|
|
10
|
+
/** App-provided validation or availability message displayed above the purchase controls. */
|
|
3
11
|
errorMessage?: string;
|
|
4
12
|
initialQuantity?: number;
|
|
5
13
|
minQuantity?: number;
|
|
@@ -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,3 +1,4 @@
|
|
|
1
|
+
import type { ProductPurchaseAvailability } from "../../../molecules/cart/cartactions/CartActionsProps";
|
|
1
2
|
import type { ButtonGridItem } from "../../../molecules/buttons/buttongrid/ButtonGridProps";
|
|
2
3
|
import type { ReactNode } from "react";
|
|
3
4
|
import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
|
|
@@ -56,6 +57,8 @@ export type PurchasePanelLeftPanelProps = {
|
|
|
56
57
|
showCartActions?: boolean;
|
|
57
58
|
showFavorites?: boolean;
|
|
58
59
|
actionMode?: PurchasePanelActionMode;
|
|
60
|
+
/** Availability of the current selection and tab; omitted means available. */
|
|
61
|
+
availability?: ProductPurchaseAvailability;
|
|
59
62
|
contactActions?: [ProductContactAction, ProductContactAction];
|
|
60
63
|
onQuantityChange?: (quantity: number) => void;
|
|
61
64
|
onAddToWishlist?: () => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ProductPurchaseAvailability } from "../../../molecules/cart/cartactions/CartActionsProps";
|
|
1
2
|
import type { SwatchPurchasePanelCarousel } from "./PurchasePanelRightPanelProps";
|
|
2
3
|
import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
|
|
3
4
|
import type { ProductContactAction, ProductContactActionClickPayload } from "../../../molecules/cart/productcontactactions/ProductContactActionsProps";
|
|
@@ -108,13 +109,15 @@ export type PurchasePanelProps = {
|
|
|
108
109
|
priceLabel?: string;
|
|
109
110
|
priceValue?: number;
|
|
110
111
|
currency?: string;
|
|
111
|
-
/** App-provided validation
|
|
112
|
+
/** App-provided validation or availability message displayed above the purchase controls. */
|
|
112
113
|
errorMessage?: string;
|
|
113
114
|
initialQuantity?: number;
|
|
114
115
|
minQuantity?: number;
|
|
115
116
|
maxQuantity?: number;
|
|
116
117
|
showFavorites?: boolean;
|
|
117
118
|
actionMode?: PurchasePanelActionMode;
|
|
119
|
+
/** Availability of the current selection and tab; omitted means available. */
|
|
120
|
+
availability?: ProductPurchaseAvailability;
|
|
118
121
|
contactActions?: [ProductContactAction, ProductContactAction];
|
|
119
122
|
onAddToWishlist?: (payload: AddToFavoritesPayloadProps) => void;
|
|
120
123
|
onAddToCart?: (order: CartOrderProps) => void;
|
package/dist/componentProps/organisms/cart/shippingaddressform/ShippingAddressFormProps.d.ts
CHANGED
|
@@ -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;
|
package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ProductPurchaseAvailability } from "../../molecules/cart/cartactions/CartActionsProps";
|
|
1
2
|
import { BreadcrumbsProps } from "../../molecules/selectors/breadcrumb/BreadcrumbsProps";
|
|
2
3
|
import { ProductInformationTabLabels, ProductInformationTabKey, SizeAndGradeDefinition } from "../../organisms/sections/productinformationsection/ProductInformationSectionProps";
|
|
3
4
|
import { CartFlyoutProps } from "../../organisms/cart/cartflyout/CartFlyoutProps";
|
|
@@ -248,11 +249,13 @@ export type ProductDetailCartFlyoutProps = CartFlyoutProps;
|
|
|
248
249
|
export type ProductDetailPageTemplateProps = {
|
|
249
250
|
breadcrumbsProps?: BreadcrumbsProps;
|
|
250
251
|
productData: ProductDetailData;
|
|
251
|
-
/** App-provided validation
|
|
252
|
+
/** App-provided validation or availability message displayed above the purchase controls. */
|
|
252
253
|
errorMessage?: string;
|
|
253
254
|
/** Reports initial selection and subsequent quantity, tab, or option changes. */
|
|
254
255
|
onSelectionChange?: (selection: ProductDetailOrder) => void;
|
|
255
256
|
showFavorites?: boolean;
|
|
257
|
+
/** Availability of the current selection and tab; omitted means available. */
|
|
258
|
+
availability?: ProductPurchaseAvailability;
|
|
256
259
|
onDownloadSwatch?: (productData: ProductDetailData) => void;
|
|
257
260
|
onDownloadFullSheet?: (productData: ProductDetailData) => void;
|
|
258
261
|
onAddToWishlist?: (payload: ProductDetailWishlistPayload, productData: ProductDetailData) => void;
|