formica-ui-lib 1.0.164 → 1.0.166
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/README.md +9 -0
- package/dist/componentProps/molecules/card/articlerecentcard/ArticleRecentCardProps.d.ts +2 -3
- package/dist/componentProps/organisms/articles/articlerecentsection/ArticleRecentSectionProps.d.ts +4 -0
- package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelLeftPanelProps.d.ts +1 -1
- package/dist/componentProps/organisms/navigation/TopNavBarProps.d.ts +2 -0
- package/dist/componentProps/organisms/navigation/TopNavMegaMenuProps.d.ts +3 -3
- package/dist/componentProps/scene/searchresults/SearchResultsSceneProps.d.ts +8 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +600 -593
- package/dist/stories/molecules/carousel/minicarousel/MiniCarousel.test.d.ts +1 -0
- package/dist/stories/organisms/articles/articlerecentsection/ArticleRecentSection.test.d.ts +1 -0
- package/dist/stories/organisms/carousels/featuredproductcarousel/FeaturedProductsCarousel.test.d.ts +1 -0
- package/dist/stories/organisms/carousels/imagecarousel/ImageCarousel.test.d.ts +1 -0
- package/dist/stories/organisms/cart/purchasepanel/LeftPanel/PurchasePanelLeftPanel.test.d.ts +1 -0
- package/dist/stories/organisms/cart/purchasepanel/PurchasePanel.test.d.ts +1 -0
- package/dist/stories/organisms/cart/purchasepanel/RightPanel/PurchasePanelRightPanel.test.d.ts +1 -0
- package/dist/stories/scenes/searchresults/SearchResultsScene.d.ts +4 -0
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -202,6 +202,15 @@ It is not the right tool when the component needs domain-specific rules.
|
|
|
202
202
|
- a grid deciding what happens when a card is clicked
|
|
203
203
|
- a layout wrapper deciding navigation or selection logic
|
|
204
204
|
|
|
205
|
+
## Responsive Layout Rule
|
|
206
|
+
|
|
207
|
+
Use one breakpoint for normal responsive work:
|
|
208
|
+
|
|
209
|
+
- unprefixed Tailwind classes are mobile below `md`
|
|
210
|
+
- `md:` classes are PC at `md` and above
|
|
211
|
+
|
|
212
|
+
Avoid `sm:`, `lg:`, `xl:`, and `2xl:` layout variants unless the design explicitly requires an exception. Most responsive changes should live in templates and organisms, with fewer changes in molecules and very few in atoms.
|
|
213
|
+
|
|
205
214
|
## When To Use `ClickableCard`
|
|
206
215
|
|
|
207
216
|
Use `ClickableCard` when a whole card or large visual surface acts as one click target.
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
export interface ArticleRecentCardProps {
|
|
2
2
|
imageSrc: string;
|
|
3
3
|
imageAlt?: string;
|
|
4
|
-
category
|
|
4
|
+
category?: string;
|
|
5
5
|
title: string;
|
|
6
|
-
publishDate
|
|
6
|
+
publishDate?: string;
|
|
7
7
|
body: string;
|
|
8
8
|
buttonLabel: string;
|
|
9
|
-
href?: string;
|
|
10
9
|
onViewClick?: () => void;
|
|
11
10
|
}
|
package/dist/componentProps/organisms/articles/articlerecentsection/ArticleRecentSectionProps.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { ArticleRecentCardProps } from "../../../molecules/card/articlerecentcard/ArticleRecentCardProps";
|
|
2
|
+
export type TitleVariant = "h1" | "h2" | "h3" | "standard" | "bold" | "nav" | "free";
|
|
2
3
|
export interface ArticleRecentSectionProps {
|
|
3
4
|
title?: string;
|
|
5
|
+
titleVariant?: TitleVariant;
|
|
6
|
+
titleClassName?: string;
|
|
4
7
|
items: ArticleRecentCardProps[];
|
|
5
8
|
className?: string;
|
|
9
|
+
separatorClassName?: string;
|
|
6
10
|
}
|
|
@@ -6,7 +6,7 @@ export type SwatchOption = ButtonGridItem & {
|
|
|
6
6
|
value: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
active?: boolean;
|
|
9
|
-
onOptionClick?: () => void;
|
|
9
|
+
onOptionClick?: (id: string) => void;
|
|
10
10
|
};
|
|
11
11
|
export type SwatchPurchasePanelLeftPanelNavigateMeta = {
|
|
12
12
|
kind: "availability" | "returnPolicy";
|
|
@@ -39,8 +39,10 @@ export type TopNavBarProps = {
|
|
|
39
39
|
Login?: TopNavLogin;
|
|
40
40
|
Cart?: TopNavCartSummary;
|
|
41
41
|
Logo?: TopNavLogo;
|
|
42
|
+
defaultOpenSubcategory?: NavSubcategory | null;
|
|
42
43
|
onLogoClick?: () => void;
|
|
43
44
|
onNavItemClick?: (item: NavItem) => void;
|
|
45
|
+
onOpenSubcategoryChange?: (subcategory: NavSubcategory | null, item: NavItem) => void;
|
|
44
46
|
onMegaMenuLinkClick?: (link: NavLinkItem) => void;
|
|
45
47
|
onPromoClick?: (promo: NavPromo) => void;
|
|
46
48
|
onSearchClick?: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { NavItem, NavLinkItem, NavPromo } from "./TopNavBarProps";
|
|
1
|
+
import type { NavItem, NavLinkItem, NavPromo, NavSubcategory } from "./TopNavBarProps";
|
|
2
2
|
export type TopNavMegaMenuProps = {
|
|
3
3
|
activeItem?: NavItem;
|
|
4
|
-
openSubcategory:
|
|
5
|
-
setOpenSubcategory: (
|
|
4
|
+
openSubcategory: NavSubcategory | null;
|
|
5
|
+
setOpenSubcategory: (subcategory: NavSubcategory | null) => void;
|
|
6
6
|
onMegaMenuLinkClick?: (link: NavLinkItem) => void;
|
|
7
7
|
onPromoClick?: (promo: NavPromo) => void;
|
|
8
8
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SearchHeaderProps } from "../../organisms/search/searchheader/SearchHeaderProps";
|
|
2
|
+
import { FeaturedProductsCarouselProps } from "../../organisms/carousels/featureproductcarousel/FeaturedProductsCarouselProps";
|
|
3
|
+
import { ArticleRecentSectionProps } from "../../organisms/articles/articlerecentsection/ArticleRecentSectionProps";
|
|
4
|
+
export type SearchResultsSceneProps = {
|
|
5
|
+
searchHeaderProps: SearchHeaderProps;
|
|
6
|
+
featuredProductsCarouselProps: FeaturedProductsCarouselProps;
|
|
7
|
+
articleRecentSectionProps: ArticleRecentSectionProps;
|
|
8
|
+
};
|