formica-ui-lib 1.0.264 → 1.0.267

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.
Files changed (30) hide show
  1. package/dist/componentProps/molecules/cards/customeraddresscard/CustomerAddressCardProps.d.ts +19 -0
  2. package/dist/componentProps/molecules/cards/decorsummarycard/DecorSummaryCardProps.d.ts +18 -0
  3. package/dist/componentProps/molecules/selectors/adminregionselector/AdminRegionSelectorProps.d.ts +19 -0
  4. package/dist/componentProps/molecules/selectors/marketreadinessrangeselector/MarketReadinessRangeSelectorProps.d.ts +15 -0
  5. package/dist/componentProps/organisms/account/customeraccountshell/CustomerAccountShellProps.d.ts +18 -0
  6. package/dist/componentProps/organisms/collections/decorsummarycollection/DecorSummaryCollectionProps.d.ts +15 -0
  7. package/dist/componentProps/templates/admin/marketreadinessbrowse/MarketReadinessBrowseTemplateProps.d.ts +48 -0
  8. package/dist/componentProps/templates/admin/marketreadinesslanding/MarketReadinessLandingTemplateProps.d.ts +3 -9
  9. package/dist/componentProps/templates/admin/shared/AdminRegionOption.d.ts +2 -6
  10. package/dist/componentProps/templates/cart/ecommerce/summary/EcommCartSummaryTemplateProps.d.ts +16 -6
  11. package/dist/componentProps/templates/customeraccount/favorites/CustomerAccountFavoritesTemplateProps.d.ts +17 -0
  12. package/dist/componentProps/templates/customeraccount/orderhistory/CustomerAccountOrderHistoryTemplateProps.d.ts +28 -0
  13. package/dist/componentProps/templates/customeraccount/settings/CustomerAccountSettingsTemplateProps.d.ts +56 -0
  14. package/dist/index.cjs +8 -8
  15. package/dist/index.d.ts +20 -0
  16. package/dist/index.js +2441 -1695
  17. package/dist/stories/molecules/cards/customeraddresscard/CustomerAddressCard.d.ts +4 -0
  18. package/dist/stories/molecules/cards/decorsummarycard/DecorSummaryCard.d.ts +4 -0
  19. package/dist/stories/molecules/selectors/adminregionselector/AdminRegionSelector.d.ts +4 -0
  20. package/dist/stories/molecules/selectors/marketreadinessrangeselector/MarketReadinessRangeSelector.d.ts +4 -0
  21. package/dist/stories/organisms/account/customeraccountshell/CustomerAccountShell.d.ts +4 -0
  22. package/dist/stories/organisms/collections/decorsummarycollection/DecorSummaryCollection.d.ts +4 -0
  23. package/dist/stories/templates/admin/marketreadinessbrowse/MarketReadinessBrowseTemplate.d.ts +4 -0
  24. package/dist/stories/templates/cart/ecommerce/summary/EcommCartSummaryTemplate.d.ts +1 -1
  25. package/dist/stories/templates/customeraccount/favorites/CustomerAccountFavoritesTemplate.d.ts +4 -0
  26. package/dist/stories/templates/customeraccount/orderhistory/CustomerAccountOrderHistoryTemplate.d.ts +4 -0
  27. package/dist/stories/templates/customeraccount/settings/CustomerAccountSettingsTemplate.d.ts +4 -0
  28. package/dist/tailwind.css +1 -1
  29. package/package.json +1 -1
  30. package/dist/componentProps/organisms/cart/ordersummarysection/OrderSummarySectionLeftPanelProps.d.ts +0 -8
@@ -0,0 +1,19 @@
1
+ export interface CustomerAddress {
2
+ id: string;
3
+ fullName: string;
4
+ company?: string;
5
+ addressLines: string[];
6
+ phoneNumber?: string;
7
+ isDefault?: boolean;
8
+ }
9
+ export interface CustomerAddressActionPayload {
10
+ address: CustomerAddress;
11
+ }
12
+ export interface CustomerAddressCardProps {
13
+ address: CustomerAddress;
14
+ defaultLabel?: string;
15
+ editLabel?: string;
16
+ removeLabel?: string;
17
+ onEditClick: (payload: CustomerAddressActionPayload) => void;
18
+ onRemoveClick: (payload: CustomerAddressActionPayload) => void;
19
+ }
@@ -0,0 +1,18 @@
1
+ export interface DecorSummaryCardClickPayload {
2
+ decorId: string;
3
+ decorCode: string;
4
+ }
5
+ export interface DecorSummaryCardProps {
6
+ decorId: string;
7
+ decorCode: string;
8
+ name: string;
9
+ imageUrl?: string;
10
+ imageAlt?: string;
11
+ sheetCount: number;
12
+ sampleCount: number;
13
+ sheetLabel?: string;
14
+ sampleLabel?: string;
15
+ openLabel?: string;
16
+ disabled?: boolean;
17
+ onDecorClick?: (payload: DecorSummaryCardClickPayload) => void;
18
+ }
@@ -0,0 +1,19 @@
1
+ export interface AdminRegionSelectorOption {
2
+ label: string;
3
+ value: string;
4
+ shortLabel?: string;
5
+ iconName?: string;
6
+ }
7
+ export interface AdminRegionSelectorChangePayload {
8
+ region: string;
9
+ }
10
+ export interface AdminRegionSelectorProps {
11
+ options: AdminRegionSelectorOption[];
12
+ value: string;
13
+ label?: string;
14
+ placeholder?: string;
15
+ helpText?: string;
16
+ disabled?: boolean;
17
+ name?: string;
18
+ onChange: (payload: AdminRegionSelectorChangePayload) => void;
19
+ }
@@ -0,0 +1,15 @@
1
+ export interface MarketReadinessRangeOption {
2
+ id: string;
3
+ label: string;
4
+ decorCount: number;
5
+ }
6
+ export interface MarketReadinessRangeSelectPayload {
7
+ rangeId: string;
8
+ }
9
+ export interface MarketReadinessRangeSelectorProps {
10
+ ranges: MarketReadinessRangeOption[];
11
+ selectedRangeId?: string;
12
+ disabled?: boolean;
13
+ ariaLabel?: string;
14
+ onRangeSelect: (payload: MarketReadinessRangeSelectPayload) => void;
15
+ }
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from "react";
2
+ export interface CustomerAccountTabItem {
3
+ id: string;
4
+ label: string;
5
+ }
6
+ export interface CustomerAccountTabClickPayload {
7
+ item: CustomerAccountTabItem;
8
+ }
9
+ export interface CustomerAccountShellProps {
10
+ customerName: string;
11
+ children: ReactNode;
12
+ tabs: CustomerAccountTabItem[];
13
+ activeTabId: string;
14
+ greeting?: string;
15
+ logoutLabel?: string;
16
+ onTabClick: (payload: CustomerAccountTabClickPayload) => void;
17
+ onLogoutClick: () => void;
18
+ }
@@ -0,0 +1,15 @@
1
+ import type { DecorSummaryCardClickPayload, DecorSummaryCardProps } from "../../../molecules/cards/decorsummarycard/DecorSummaryCardProps";
2
+ export type DecorSummaryCollectionItem = Omit<DecorSummaryCardProps, "onDecorClick">;
3
+ export interface DecorSummaryCollectionGroup {
4
+ id: string;
5
+ label: string;
6
+ totalCount: number;
7
+ items: DecorSummaryCollectionItem[];
8
+ }
9
+ export interface DecorSummaryCollectionProps {
10
+ groups: DecorSummaryCollectionGroup[];
11
+ itemLabel?: string;
12
+ emptyMessage?: string;
13
+ showGroupHeaders?: boolean;
14
+ onDecorClick?: (payload: DecorSummaryCardClickPayload) => void;
15
+ }
@@ -0,0 +1,48 @@
1
+ import type { DecorSummaryCardClickPayload } from "../../../molecules/cards/decorsummarycard/DecorSummaryCardProps";
2
+ import type { MarketReadinessRangeOption, MarketReadinessRangeSelectPayload } from "../../../molecules/selectors/marketreadinessrangeselector/MarketReadinessRangeSelectorProps";
3
+ import type { AdminSideNavProps } from "../../../organisms/navigation/AdminSideNavProps";
4
+ import type { DecorSummaryCollectionGroup } from "../../../organisms/collections/decorsummarycollection/DecorSummaryCollectionProps";
5
+ import type { AdminRegionOption } from "../shared/AdminRegionOption";
6
+ import type { AdminTemplateStatus } from "../shared/AdminTemplateStatus";
7
+ export interface MarketReadinessBrowseSearchPayload {
8
+ value: string;
9
+ }
10
+ export interface MarketReadinessBrowseRegionChangePayload {
11
+ region: string;
12
+ }
13
+ export interface MarketReadinessBrowseTemplateProps {
14
+ pageTitle: string;
15
+ pageDescription?: string;
16
+ sideNavProps: AdminSideNavProps;
17
+ regionOptions: AdminRegionOption[];
18
+ regionValue: string;
19
+ regionLabel?: string;
20
+ regionPlaceholder?: string;
21
+ regionHelpText?: string;
22
+ regionDisabled?: boolean;
23
+ findDecorLabel?: string;
24
+ createDecorLabel?: string;
25
+ searchValue: string;
26
+ searchLabel?: string;
27
+ searchPlaceholder?: string;
28
+ searchDisabled?: boolean;
29
+ rangeOptions: MarketReadinessRangeOption[];
30
+ selectedRangeId?: string;
31
+ rangePromptTitle?: string;
32
+ rangePromptMessage?: string;
33
+ resultCount: number;
34
+ resultLabel?: string;
35
+ groups: DecorSummaryCollectionGroup[];
36
+ status?: AdminTemplateStatus;
37
+ hasMore?: boolean;
38
+ loadingMore?: boolean;
39
+ loadMoreLabel?: string;
40
+ onRegionChange: (payload: MarketReadinessBrowseRegionChangePayload) => void;
41
+ onCreateDecorClick?: () => void;
42
+ onSearchChange: (payload: MarketReadinessBrowseSearchPayload) => void;
43
+ onSearchSubmit?: (payload: MarketReadinessBrowseSearchPayload) => void;
44
+ onRangeSelect: (payload: MarketReadinessRangeSelectPayload) => void;
45
+ onDecorClick?: (payload: DecorSummaryCardClickPayload) => void;
46
+ onLoadMore?: () => void;
47
+ onRetryClick?: () => void;
48
+ }
@@ -32,18 +32,13 @@ export interface MarketReadinessLandingTemplateProps {
32
32
  regionPlaceholder?: string;
33
33
  regionHelpText?: string;
34
34
  regionDisabled?: boolean;
35
- getStartedTitle?: string;
36
- getStartedDescription?: string;
35
+ findDecorLabel?: string;
36
+ createDecorViewLabel?: string;
37
37
  decorCodeValue: string;
38
- decorCodeOptions?: SearchComboboxOption[];
39
38
  decorCodeLabel?: string;
40
39
  decorCodePlaceholder?: string;
41
- decorCodeEmptyMessage?: string;
42
- decorCodeHelpText?: string;
43
40
  status: MarketReadinessLandingStatus;
44
41
  statusMessage?: string;
45
- openExistingLabel?: string;
46
- openExistingDisabled?: boolean;
47
42
  createNewPrompt?: string;
48
43
  createNewDescription?: string;
49
44
  createNewLabel?: string;
@@ -65,8 +60,7 @@ export interface MarketReadinessLandingTemplateProps {
65
60
  retryLabel?: string;
66
61
  onDecorCodeChange: (payload: MarketReadinessLandingDecorCodeChangePayload) => void;
67
62
  onRegionChange: (payload: MarketReadinessLandingRegionChangePayload) => void;
68
- onDecorCodeOptionSelect?: (payload: SearchComboboxSelectPayload) => void;
69
- onOpenExistingClick: (payload: MarketReadinessLandingDecorActionPayload) => void;
63
+ onFindDecorClick?: () => void;
70
64
  onCreateNewClick: (payload: MarketReadinessLandingDecorActionPayload) => void;
71
65
  onSourceDecorCodeChange: (payload: MarketReadinessLandingDecorCodeChangePayload) => void;
72
66
  onSourceDecorCodeOptionSelect?: (payload: SearchComboboxSelectPayload) => void;
@@ -1,6 +1,2 @@
1
- export interface AdminRegionOption {
2
- label: string;
3
- value: string;
4
- shortLabel?: string;
5
- iconName?: string;
6
- }
1
+ import type { AdminRegionSelectorOption } from "../../../molecules/selectors/adminregionselector/AdminRegionSelectorProps";
2
+ export type AdminRegionOption = AdminRegionSelectorOption;
@@ -1,7 +1,17 @@
1
- import { CheckoutAccountStepProps } from "../../../../organisms/cart/checkoutsteppanel/CheckoutAccountStepProps";
2
- import { OrderSummarySectionLeftPanelProps } from "../../../../organisms/cart/ordersummarysection/OrderSummarySectionLeftPanelProps";
3
- export interface EcommCartSummaryTemplateProps {
4
- cartSummaryProps: OrderSummarySectionLeftPanelProps;
5
- checkoutAccountStepProps: CheckoutAccountStepProps;
6
- className?: string;
1
+ import type { CheckoutProgressIndicatorProps } from "../../../../molecules/selectors/progressindicator/CheckoutProgressIndicatorProps";
2
+ import type { CheckoutAccountStepProps } from "../../../../organisms/cart/checkoutsteppanel/CheckoutAccountStepProps";
3
+ import type { CartSummaryProps } from "../../../../organisms/cart/cartsummary/CartSummaryProps";
4
+ interface EcommCartSummaryTemplateCommonProps {
5
+ cartSummaryProps: CartSummaryProps;
7
6
  }
7
+ export type EcommCartSummaryTemplateProps = (EcommCartSummaryTemplateCommonProps & {
8
+ customerState: "anonymous";
9
+ checkoutAccountStepProps: CheckoutAccountStepProps;
10
+ }) | (EcommCartSummaryTemplateCommonProps & {
11
+ customerState: "authenticated";
12
+ checkoutProgressIndicatorProps: CheckoutProgressIndicatorProps;
13
+ continueLabel?: string;
14
+ continueDisabled?: boolean;
15
+ onContinueClick: () => void;
16
+ });
17
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { SwatchCardProps } from "../../../molecules/cards/swatchcard/SwatchCardProps";
2
+ import type { CustomerAccountShellProps } from "../../../organisms/account/customeraccountshell/CustomerAccountShellProps";
3
+ export interface CustomerAccountFavoriteItem extends Omit<SwatchCardProps, "onSwatchClick"> {
4
+ id: string;
5
+ }
6
+ export interface CustomerAccountFavoriteClickPayload {
7
+ item: CustomerAccountFavoriteItem;
8
+ }
9
+ export interface CustomerAccountFavoritesTemplateProps {
10
+ shellProps: Omit<CustomerAccountShellProps, "children" | "activeTabId">;
11
+ items: CustomerAccountFavoriteItem[];
12
+ emptyTitle?: string;
13
+ emptyMessage?: string;
14
+ browseLabel?: string;
15
+ onFavoriteClick: (payload: CustomerAccountFavoriteClickPayload) => void;
16
+ onBrowseClick: () => void;
17
+ }
@@ -0,0 +1,28 @@
1
+ import type { ChangeEvent } from "react";
2
+ import type { DropdownOption } from "../../../atoms/dropdown/DropdownProps";
3
+ import type { CustomerAccountShellProps } from "../../../organisms/account/customeraccountshell/CustomerAccountShellProps";
4
+ export interface CustomerAccountOrder {
5
+ id: string;
6
+ orderNumber: string;
7
+ date: string;
8
+ status: string;
9
+ total: string;
10
+ trackingNumber?: string;
11
+ }
12
+ export interface CustomerAccountOrderClickPayload {
13
+ order: CustomerAccountOrder;
14
+ }
15
+ export interface CustomerAccountOrderHistoryTemplateProps {
16
+ shellProps: Omit<CustomerAccountShellProps, "children" | "activeTabId">;
17
+ status: string;
18
+ period: string;
19
+ statusOptions: DropdownOption[];
20
+ periodOptions: DropdownOption[];
21
+ orders: CustomerAccountOrder[];
22
+ searchDisabled?: boolean;
23
+ emptyMessage?: string;
24
+ onStatusChange: (event: ChangeEvent<HTMLSelectElement>) => void;
25
+ onPeriodChange: (event: ChangeEvent<HTMLSelectElement>) => void;
26
+ onSearchClick: () => void;
27
+ onOrderClick: (payload: CustomerAccountOrderClickPayload) => void;
28
+ }
@@ -0,0 +1,56 @@
1
+ import type { ChangeEvent } from "react";
2
+ import type { CustomerAddress, CustomerAddressActionPayload } from "../../../molecules/cards/customeraddresscard/CustomerAddressCardProps";
3
+ import type { CustomerAccountShellProps } from "../../../organisms/account/customeraccountshell/CustomerAccountShellProps";
4
+ export interface CustomerAccountPersonalInformationErrors {
5
+ firstName?: string;
6
+ lastName?: string;
7
+ email?: string;
8
+ phoneNumber?: string;
9
+ }
10
+ export interface CustomerAccountPersonalInformationSettings {
11
+ firstName: string;
12
+ lastName: string;
13
+ email: string;
14
+ phoneNumber?: string;
15
+ errors?: CustomerAccountPersonalInformationErrors;
16
+ saveDisabled?: boolean;
17
+ onFirstNameChange: (event: ChangeEvent<HTMLInputElement>) => void;
18
+ onLastNameChange: (event: ChangeEvent<HTMLInputElement>) => void;
19
+ onEmailChange: (event: ChangeEvent<HTMLInputElement>) => void;
20
+ onPhoneNumberChange: (event: ChangeEvent<HTMLInputElement>) => void;
21
+ onSaveClick: () => void;
22
+ }
23
+ export interface CustomerAccountPasswordErrors {
24
+ currentPassword?: string;
25
+ newPassword?: string;
26
+ confirmPassword?: string;
27
+ }
28
+ export interface CustomerAccountPasswordSettings {
29
+ currentPassword: string;
30
+ newPassword: string;
31
+ confirmPassword: string;
32
+ passwordRequirements?: string;
33
+ errors?: CustomerAccountPasswordErrors;
34
+ submitDisabled?: boolean;
35
+ onCurrentPasswordChange: (event: ChangeEvent<HTMLInputElement>) => void;
36
+ onNewPasswordChange: (event: ChangeEvent<HTMLInputElement>) => void;
37
+ onConfirmPasswordChange: (event: ChangeEvent<HTMLInputElement>) => void;
38
+ onSubmitClick: () => void;
39
+ }
40
+ export type CustomerAccountAddressType = "shipping" | "billing";
41
+ export interface CustomerAccountAddAddressPayload {
42
+ addressType: CustomerAccountAddressType;
43
+ }
44
+ export interface CustomerAccountSettingsAddressActionPayload extends CustomerAddressActionPayload {
45
+ addressType: CustomerAccountAddressType;
46
+ }
47
+ export interface CustomerAccountSettingsTemplateProps {
48
+ shellProps: Omit<CustomerAccountShellProps, "children" | "activeTabId">;
49
+ personalInformation: CustomerAccountPersonalInformationSettings;
50
+ password: CustomerAccountPasswordSettings;
51
+ shippingAddresses: CustomerAddress[];
52
+ billingAddresses: CustomerAddress[];
53
+ onAddAddressClick: (payload: CustomerAccountAddAddressPayload) => void;
54
+ onEditAddressClick: (payload: CustomerAccountSettingsAddressActionPayload) => void;
55
+ onRemoveAddressClick: (payload: CustomerAccountSettingsAddressActionPayload) => void;
56
+ }