formica-ui-lib 1.0.138 → 1.0.141
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/button/ButtonProps.d.ts +5 -1
- package/dist/componentProps/atoms/checkbox/CheckboxProps.d.ts +8 -2
- package/dist/componentProps/molecules/card/articlerecentcard/ArticleRecentCardProps.d.ts +1 -1
- package/dist/componentProps/molecules/card/swatchcard/SwatchCardProps.d.ts +2 -2
- package/dist/componentProps/molecules/selectors/appliedoptionslist/AppliedOptionsListProps.d.ts +14 -0
- package/dist/componentProps/molecules/selectors/verticalcheckboxlist/VerticalCheckboxListProps.d.ts +13 -0
- package/dist/componentProps/organisms/cart/cartpaymentpanel/CartPaymentPanelProps.d.ts +2 -1
- package/dist/componentProps/organisms/decorgrid/DecorGridProps.d.ts +1 -1
- package/dist/componentProps/organisms/navigation/TopNavActionsProps.d.ts +2 -2
- package/dist/componentProps/organisms/navigation/TopNavBarProps.d.ts +9 -2
- package/dist/componentProps/organisms/verticalcheckboxlistcollection/VerticalCheckboxListCollectionProps.d.ts +8 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +603 -575
- package/dist/stories/atoms/buttons/button/ButtonThemeStyles.d.ts +3 -2
- package/dist/stories/molecules/selectors/appliedoptionslist/AppliedOptionsList.d.ts +4 -0
- package/dist/stories/molecules/selectors/verticalcheckboxlist/VerticalCheckboxList.d.ts +4 -0
- package/dist/stories/organisms/verticalcheckboxlistcollection/VerticalCheckboxListCollection.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { FaTypeClass } from "../icon/IconProps";
|
|
3
|
-
export type ButtonVariant = "standard" | "nav" | "text" | "icon" | "segmented" | "small" | "grid";
|
|
3
|
+
export type ButtonVariant = "standard" | "nav" | "text" | "icon" | "segmented" | "small" | "grid" | "header";
|
|
4
4
|
export type ButtonType = "primary" | "secondary" | "accent" | "ghost" | "radio";
|
|
5
|
+
export type IconSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
5
6
|
export type IconPosition = "left" | "right";
|
|
6
7
|
export type SegmentPosition = "only" | "first" | "middle" | "last";
|
|
8
|
+
export type ButtonAlignment = "justify-start" | "justify-center" | "justify-end" | "justify-between" | "justify-around" | "justify-evenly";
|
|
7
9
|
export interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "children"> {
|
|
8
10
|
label?: string;
|
|
9
11
|
children?: React.ReactNode;
|
|
10
12
|
iconType?: FaTypeClass;
|
|
11
13
|
iconName?: string;
|
|
12
14
|
iconAlt?: string;
|
|
15
|
+
iconSize?: IconSize;
|
|
13
16
|
iconPosition?: IconPosition;
|
|
14
17
|
variant?: ButtonVariant;
|
|
15
18
|
buttonType?: ButtonType;
|
|
16
19
|
segmentPosition?: SegmentPosition;
|
|
20
|
+
buttonAlignment?: ButtonAlignment;
|
|
17
21
|
active?: boolean;
|
|
18
22
|
className?: string;
|
|
19
23
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
export type CheckboxColor = "accent-primary" | "accent-secondary" | "accent-tertiary" | "accent-accent";
|
|
2
|
+
export interface CheckboxChangePayload {
|
|
3
|
+
id: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
checked: boolean;
|
|
6
|
+
}
|
|
2
7
|
export interface CheckboxProps {
|
|
3
8
|
id: string;
|
|
4
9
|
name?: string;
|
|
5
10
|
label: string;
|
|
6
11
|
checked?: boolean;
|
|
7
12
|
disabled?: boolean;
|
|
8
|
-
|
|
13
|
+
checkboxColor?: CheckboxColor;
|
|
14
|
+
onChange?: (payload: CheckboxChangePayload) => void;
|
|
9
15
|
}
|
package/dist/componentProps/molecules/selectors/appliedoptionslist/AppliedOptionsListProps.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface AppliedOptionRemovePayload {
|
|
2
|
+
id: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
}
|
|
5
|
+
export type AppliedOptionItem = {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
export interface AppliedOptionsListProps {
|
|
10
|
+
header?: string;
|
|
11
|
+
optionsList: AppliedOptionItem[];
|
|
12
|
+
onRemoveOption: (payload: AppliedOptionRemovePayload) => void;
|
|
13
|
+
onRemoveAll: () => void;
|
|
14
|
+
}
|
package/dist/componentProps/molecules/selectors/verticalcheckboxlist/VerticalCheckboxListProps.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CheckboxChangePayload } from "../../../atoms/checkbox/CheckboxProps";
|
|
2
|
+
export interface VerticalCheckboxListOption {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onChange?: (payload: CheckboxChangePayload) => void;
|
|
9
|
+
}
|
|
10
|
+
export interface VerticalCheckboxListProps {
|
|
11
|
+
label: string;
|
|
12
|
+
options: VerticalCheckboxListOption[];
|
|
13
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { RadioOptionSelectorProps } from "../../selectors/radiooptionselector/RadioOptionSelectorProps";
|
|
3
3
|
import { DropdownOption } from "../../../atoms/dropdown/DropdownProps";
|
|
4
|
+
import { CheckboxChangePayload } from "../../../atoms/checkbox/CheckboxProps";
|
|
4
5
|
export interface CartPaymentPanelErrors {
|
|
5
6
|
cardNumber?: string;
|
|
6
7
|
expirationDate?: string;
|
|
@@ -49,7 +50,7 @@ export interface CartPaymentPanelProps {
|
|
|
49
50
|
onCardNumberChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
50
51
|
onExpirationDateChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
51
52
|
onSecurityCodeChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
52
|
-
onSameAsShippingChange?: (
|
|
53
|
+
onSameAsShippingChange?: (payload: CheckboxChangePayload) => void;
|
|
53
54
|
onEditBilling?: () => void;
|
|
54
55
|
onCardNumberBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
55
56
|
onExpirationDateBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Country } from "../../molecules/selectors/countryselector/CountrySelectorProps";
|
|
2
|
-
import type {
|
|
2
|
+
import type { TopNavLogin, TopNavCartSummary } from "./TopNavBarProps";
|
|
3
3
|
export type TopNavActionsProps = {
|
|
4
4
|
Countries?: Country[];
|
|
5
|
-
Login:
|
|
5
|
+
Login: TopNavLogin;
|
|
6
6
|
Cart?: TopNavCartSummary;
|
|
7
7
|
onSearchClick?: () => void;
|
|
8
8
|
onCartClick?: () => void;
|
|
@@ -23,15 +23,22 @@ export type TopNavCartSummary = {
|
|
|
23
23
|
hasCart: boolean;
|
|
24
24
|
itemCount: number;
|
|
25
25
|
};
|
|
26
|
-
export type
|
|
26
|
+
export type TopNavLogin = {
|
|
27
27
|
label: string;
|
|
28
28
|
href: string;
|
|
29
29
|
};
|
|
30
|
+
export type TopNavLogo = {
|
|
31
|
+
src: string;
|
|
32
|
+
alt?: string;
|
|
33
|
+
href?: string;
|
|
34
|
+
};
|
|
30
35
|
export type TopNavBarProps = {
|
|
31
36
|
NavMenuWithSubItems?: NavItem[];
|
|
32
37
|
Countries?: Country[];
|
|
33
|
-
Login
|
|
38
|
+
Login?: TopNavLogin;
|
|
34
39
|
Cart?: TopNavCartSummary;
|
|
40
|
+
Logo?: TopNavLogo;
|
|
41
|
+
onLogoClick?: () => void;
|
|
35
42
|
onNavItemClick?: (item: NavItem) => void;
|
|
36
43
|
onMegaMenuLinkClick?: (link: NavLinkItem) => void;
|
|
37
44
|
onPromoClick?: (promo: NavPromo) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VerticalCheckboxListProps } from "../../molecules/selectors/verticalcheckboxlist/VerticalCheckboxListProps";
|
|
2
|
+
import { AppliedOptionsListProps } from "../../molecules/selectors/appliedoptionslist/AppliedOptionsListProps";
|
|
3
|
+
export interface VerticalCheckboxListCollectionProps {
|
|
4
|
+
header?: string;
|
|
5
|
+
headerIcon?: string;
|
|
6
|
+
appliedOptions?: AppliedOptionsListProps;
|
|
7
|
+
sections: VerticalCheckboxListProps[];
|
|
8
|
+
}
|