formica-ui-lib 1.0.138 → 1.0.142

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.
@@ -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
- import React from "react";
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
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
13
+ checkboxColor?: CheckboxColor;
14
+ onChange?: (payload: CheckboxChangePayload) => void;
9
15
  }
@@ -6,6 +6,6 @@ export interface ArticleRecentCardProps {
6
6
  publishDate: string;
7
7
  body: string;
8
8
  buttonLabel: string;
9
+ href?: string;
9
10
  onViewClick?: () => void;
10
- className?: string;
11
11
  }
@@ -5,7 +5,7 @@ export interface SwatchCardProps {
5
5
  title: string;
6
6
  brand: string;
7
7
  product: string;
8
- decorNumber: string;
9
- onClick: () => void;
8
+ decorNumber: string | number;
9
+ onClick?: () => void;
10
10
  status?: SwatchStatus;
11
11
  }
@@ -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
+ }
@@ -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?: (event: React.ChangeEvent<HTMLInputElement>) => void;
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,4 +1,4 @@
1
1
  import { SwatchCardProps } from "../../molecules/card/swatchcard/SwatchCardProps";
2
2
  export interface DecorGridProps {
3
- Swatches: SwatchCardProps[];
3
+ swatches?: SwatchCardProps[];
4
4
  }
@@ -1,8 +1,8 @@
1
1
  import type { Country } from "../../molecules/selectors/countryselector/CountrySelectorProps";
2
- import type { Login, TopNavCartSummary } from "./TopNavBarProps";
2
+ import type { TopNavLogin, TopNavCartSummary } from "./TopNavBarProps";
3
3
  export type TopNavActionsProps = {
4
4
  Countries?: Country[];
5
- Login: 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 Login = {
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: 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
+ }