@caseparts-org/caseblocks 0.0.89 → 0.0.91
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/Cart.module-9txlotpz.js +18 -0
- package/dist/assets/Cart.css +1 -1
- package/dist/assets/Icon.css +1 -1
- package/dist/assets/Popover.css +1 -0
- package/dist/assets/SlideInPanel.css +1 -0
- package/dist/assets/Tooltip.css +1 -1
- package/dist/assets/buttonClassName.css +1 -1
- package/dist/atoms/Button/buttonClassName.js +25 -25
- package/dist/atoms/Icon/Icon.d.ts +3 -1
- package/dist/atoms/Icon/Icon.js +48 -32
- package/dist/atoms/Input/Input.js +4 -4
- package/dist/atoms/Popover/Popover.d.ts +14 -0
- package/dist/atoms/Popover/Popover.js +110 -0
- package/dist/atoms/Popover/Popover.stories.d.ts +66 -0
- package/dist/atoms/Popover/Popover.stories.js +207 -0
- package/dist/atoms/SlideInPanel/SlideInPanel.d.ts +18 -0
- package/dist/atoms/SlideInPanel/SlideInPanel.js +99 -0
- package/dist/atoms/SlideInPanel/SlideInPanel.stories.d.ts +10 -0
- package/dist/atoms/SlideInPanel/SlideInPanel.stories.js +117 -0
- package/dist/atoms/Tooltip/Tooltip.d.ts +16 -0
- package/dist/atoms/Tooltip/Tooltip.js +126 -0
- package/dist/{molecules → atoms}/Tooltip/Tooltip.stories.d.ts +8 -26
- package/dist/atoms/Tooltip/Tooltip.stories.js +209 -0
- package/dist/index-B4KbmMH3.js +383 -0
- package/dist/main-client.d.ts +3 -1
- package/dist/main-client.js +40 -38
- package/dist/molecules/AddToCart/AddToCart.js +18 -18
- package/dist/molecules/CardLink/CardLink.js +5 -5
- package/dist/molecules/Cart/Cart.d.ts +10 -6
- package/dist/molecules/Cart/Cart.js +42 -93
- package/dist/molecules/Cart/Cart.stories.js +61 -28
- package/dist/molecules/Cart/CartSlideInPanel.d.ts +15 -0
- package/dist/molecules/Cart/CartSlideInPanel.js +97 -0
- package/dist/molecules/CategoryNav/CategoryNav.js +2 -2
- package/dist/molecules/StatefulButton/StatefulButton.stories.js +4 -4
- package/dist/molecules/ToggleView/ToggleView.js +6 -6
- package/dist/organisms/Carousel/Carousel.js +44 -44
- package/dist/organisms/Footer/Footer.js +1 -1
- package/dist/organisms/MainNav/MainNav.d.ts +13 -11
- package/dist/organisms/MainNav/MainNav.js +86 -82
- package/dist/organisms/MainNav/MainNav.stories.d.ts +1 -2
- package/dist/organisms/MainNav/MainNav.stories.js +85 -58
- package/package.json +28 -7
- package/dist/molecules/Cart/Cart.stories.d.ts +0 -15
- package/dist/molecules/Tooltip/Tooltip.d.ts +0 -12
- package/dist/molecules/Tooltip/Tooltip.js +0 -2321
- package/dist/molecules/Tooltip/Tooltip.stories.js +0 -202
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { jsxs as u, Fragment as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import { MainNav as c } from "./MainNav.js";
|
|
4
|
+
import { CartSlideInPanel as b } from "../../molecules/Cart/CartSlideInPanel.js";
|
|
5
|
+
const C = {
|
|
3
6
|
title: "Case Parts/Organisms/MainNav",
|
|
4
|
-
component:
|
|
7
|
+
component: c,
|
|
5
8
|
parameters: {
|
|
6
9
|
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
7
10
|
layout: "fullscreen"
|
|
8
11
|
}
|
|
9
12
|
// tags: ["autodocs"],
|
|
10
|
-
},
|
|
13
|
+
}, a = [
|
|
11
14
|
{
|
|
12
15
|
id: 0,
|
|
13
16
|
label: "Shop by Brands",
|
|
@@ -80,28 +83,51 @@ const r = {
|
|
|
80
83
|
route: "#",
|
|
81
84
|
children: []
|
|
82
85
|
}
|
|
83
|
-
],
|
|
86
|
+
], t = "https://m.media-amazon.com/images/I/216+JEttsYL._UF1000,1000_QL80_.jpg", i = {
|
|
84
87
|
items: [
|
|
85
|
-
{ id: 1, itemId: "1094-01", description: "Kason Door Closer - Flush", price: "$99.99", quantity: 1, imageUrl:
|
|
86
|
-
{ id: 2, itemId: "810810", description: "True Door Gasket", price: "$99.99", quantity: 1, imageUrl:
|
|
87
|
-
{ id: 3, itemId: "MG064", description: '36" x 79" 3-Sided Dart-to-Dart Gasket', price: "$99.99", quantity: 1, imageUrl:
|
|
88
|
-
{ id: 4, itemId: "MG064-B", description: '36" x 79" 3-Sided Dart-to-Dart Gasket', price: "$99.99", quantity: 1, imageUrl:
|
|
89
|
-
{ id: 5, itemId: "Warmer Wire", description: '228" 7.0 OHMS 115V', price: "$99.99", quantity: 1, imageUrl:
|
|
90
|
-
{ id: 6, itemId: "810803", description: "True Door Gasket", price: "$99.99", quantity: 1, imageUrl:
|
|
91
|
-
{ id: 7, itemId: "ABG-12114-PF", description: "Adhesive Sponge Gasket 1/4", price: "$99.99", quantity: 10, imageUrl:
|
|
92
|
-
{ id: 8, itemId: "ABG-12138-PF", description: "Adhesive Sponge Gasket 3/8", price: "$99.99", quantity: 10, imageUrl:
|
|
93
|
-
{ id: 9, itemId: "1094-C1", description: "Kason Door Closer - Flush", price: "$99.99", quantity: 1, imageUrl:
|
|
94
|
-
{ id: 10, itemId: "1094-02", description: "Kason Door Closer - Offset", price: "$99.99", quantity: 1, imageUrl:
|
|
95
|
-
{ id: 11, itemId: "1092-01", description: "Kason Door Closer - Flush", price: "$99.99", quantity: 1, imageUrl:
|
|
96
|
-
{ id: 12, itemId: "1092-02", description: "Kason Door Closer - Offset", price: "$99.99", quantity: 1, imageUrl:
|
|
88
|
+
{ id: 1, itemId: "1094-01", description: "Kason Door Closer - Flush", price: "$99.99", quantity: 1, imageUrl: t, availability: "In Stock", availabilityId: "available" },
|
|
89
|
+
{ id: 2, itemId: "810810", description: "True Door Gasket", price: "$99.99", quantity: 1, imageUrl: t, availability: "In Stock", availabilityId: "available" },
|
|
90
|
+
{ id: 3, itemId: "MG064", description: '36" x 79" 3-Sided Dart-to-Dart Gasket', price: "$99.99", quantity: 1, imageUrl: t, availability: "In Stock", availabilityId: "available" },
|
|
91
|
+
{ id: 4, itemId: "MG064-B", description: '36" x 79" 3-Sided Dart-to-Dart Gasket', price: "$99.99", quantity: 1, imageUrl: t, availability: "In Stock", availabilityId: "available" },
|
|
92
|
+
{ id: 5, itemId: "Warmer Wire", description: '228" 7.0 OHMS 115V', price: "$99.99", quantity: 1, imageUrl: t, availability: "", availabilityId: "available" },
|
|
93
|
+
{ id: 6, itemId: "810803", description: "True Door Gasket", price: "$99.99", quantity: 1, imageUrl: t, availability: "In Stock", availabilityId: "available" },
|
|
94
|
+
{ id: 7, itemId: "ABG-12114-PF", description: "Adhesive Sponge Gasket 1/4", price: "$99.99", quantity: 10, imageUrl: t, availability: "In Stock", availabilityId: "available" },
|
|
95
|
+
{ id: 8, itemId: "ABG-12138-PF", description: "Adhesive Sponge Gasket 3/8", price: "$99.99", quantity: 10, imageUrl: t, availability: "In Stock", availabilityId: "available" },
|
|
96
|
+
{ id: 9, itemId: "1094-C1", description: "Kason Door Closer - Flush", price: "$99.99", quantity: 1, imageUrl: t, availability: "In Stock", availabilityId: "available" },
|
|
97
|
+
{ id: 10, itemId: "1094-02", description: "Kason Door Closer - Offset", price: "$99.99", quantity: 1, imageUrl: t, availability: "In Stock", availabilityId: "available" },
|
|
98
|
+
{ id: 11, itemId: "1092-01", description: "Kason Door Closer - Flush", price: "$99.99", quantity: 1, imageUrl: t, availability: "In Stock", availabilityId: "available" },
|
|
99
|
+
{ id: 12, itemId: "1092-02", description: "Kason Door Closer - Offset", price: "$99.99", quantity: 1, imageUrl: t, availability: "In Stock", availabilityId: "available" }
|
|
97
100
|
]
|
|
98
|
-
},
|
|
101
|
+
}, o = (e) => {
|
|
102
|
+
const [l, n] = m(!1);
|
|
103
|
+
return /* @__PURE__ */ u(s, { children: [
|
|
104
|
+
/* @__PURE__ */ r(
|
|
105
|
+
c,
|
|
106
|
+
{
|
|
107
|
+
...e,
|
|
108
|
+
open: l,
|
|
109
|
+
onCartClick: () => n((d) => !d)
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ r(
|
|
113
|
+
b,
|
|
114
|
+
{
|
|
115
|
+
open: l,
|
|
116
|
+
onClose: () => n(!1),
|
|
117
|
+
cart: e.cart,
|
|
118
|
+
subtotal: e.cartSubtotal,
|
|
119
|
+
itemPriceLabel: e.cartItemPriceLabel,
|
|
120
|
+
contactHref: e.contactRoute,
|
|
121
|
+
contactLinkBehavior: e.cartContactLinkBehavior,
|
|
122
|
+
onItemQtyChange: e.onItemQtyChange,
|
|
123
|
+
onItemDelete: e.onItemDelete,
|
|
124
|
+
onCheckout: e.onCheckout
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] });
|
|
128
|
+
}, p = {
|
|
99
129
|
args: {
|
|
100
|
-
account: {
|
|
101
|
-
name: "Ringo",
|
|
102
|
-
initials: "RS",
|
|
103
|
-
number: "123456789012"
|
|
104
|
-
},
|
|
130
|
+
account: { name: "Ringo", initials: "RS", number: "123456789012" },
|
|
105
131
|
cart: i,
|
|
106
132
|
homeRoute: "/",
|
|
107
133
|
customPartsRoute: "/custom",
|
|
@@ -110,6 +136,7 @@ const r = {
|
|
|
110
136
|
faqRoute: "/faq",
|
|
111
137
|
aboutUsRoute: "/about",
|
|
112
138
|
contactRoute: "/contact",
|
|
139
|
+
cartSubtotal: "$1200.34",
|
|
113
140
|
onLoginClick: () => {
|
|
114
141
|
alert("Login ");
|
|
115
142
|
},
|
|
@@ -119,24 +146,21 @@ const r = {
|
|
|
119
146
|
onItemDelete: () => {
|
|
120
147
|
alert("Delete");
|
|
121
148
|
},
|
|
122
|
-
onItemEdit: () => {
|
|
123
|
-
alert("Delete");
|
|
124
|
-
},
|
|
125
149
|
onItemQtyChange: () => {
|
|
126
|
-
alert("
|
|
150
|
+
alert("Qty Change");
|
|
127
151
|
},
|
|
128
|
-
onSearch: (
|
|
129
|
-
alert(`Search ${
|
|
152
|
+
onSearch: (e) => {
|
|
153
|
+
alert(`Search ${e}`);
|
|
130
154
|
},
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
}, c = {
|
|
134
|
-
args: {
|
|
135
|
-
account: {
|
|
136
|
-
name: "Ringo",
|
|
137
|
-
initials: "RS",
|
|
138
|
-
number: "123456789012"
|
|
155
|
+
onCartClick: () => {
|
|
139
156
|
},
|
|
157
|
+
// required prop placeholder (overridden in render)
|
|
158
|
+
categories: a
|
|
159
|
+
},
|
|
160
|
+
render: o
|
|
161
|
+
}, k = {
|
|
162
|
+
args: {
|
|
163
|
+
account: { name: "Ringo", initials: "RS", number: "123456789012" },
|
|
140
164
|
cart: i,
|
|
141
165
|
homeRoute: "/",
|
|
142
166
|
customPartsRoute: "/custom",
|
|
@@ -145,6 +169,7 @@ const r = {
|
|
|
145
169
|
faqRoute: "/faq",
|
|
146
170
|
aboutUsRoute: "/about",
|
|
147
171
|
contactRoute: "/contact",
|
|
172
|
+
cartSubtotal: "$1200.34",
|
|
148
173
|
onLoginClick: () => {
|
|
149
174
|
alert("Login ");
|
|
150
175
|
},
|
|
@@ -154,18 +179,19 @@ const r = {
|
|
|
154
179
|
onItemDelete: () => {
|
|
155
180
|
alert("Delete");
|
|
156
181
|
},
|
|
157
|
-
onItemEdit: () => {
|
|
158
|
-
alert("Delete");
|
|
159
|
-
},
|
|
160
182
|
onItemQtyChange: () => {
|
|
161
|
-
alert("
|
|
183
|
+
alert("Qty Change");
|
|
162
184
|
},
|
|
163
|
-
onSearch: (
|
|
164
|
-
alert(`Search ${
|
|
185
|
+
onSearch: (e) => {
|
|
186
|
+
alert(`Search ${e}`);
|
|
165
187
|
},
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
188
|
+
onCartClick: () => {
|
|
189
|
+
},
|
|
190
|
+
// required
|
|
191
|
+
categories: a
|
|
192
|
+
},
|
|
193
|
+
render: o
|
|
194
|
+
}, g = {
|
|
169
195
|
args: {
|
|
170
196
|
cart: i,
|
|
171
197
|
homeRoute: "/",
|
|
@@ -184,21 +210,22 @@ const r = {
|
|
|
184
210
|
onItemDelete: () => {
|
|
185
211
|
alert("Delete");
|
|
186
212
|
},
|
|
187
|
-
onItemEdit: () => {
|
|
188
|
-
alert("Delete");
|
|
189
|
-
},
|
|
190
213
|
onItemQtyChange: () => {
|
|
191
|
-
alert("
|
|
214
|
+
alert("Qty Change");
|
|
192
215
|
},
|
|
193
|
-
onSearch: (
|
|
194
|
-
alert(`Search ${
|
|
216
|
+
onSearch: (e) => {
|
|
217
|
+
alert(`Search ${e}`);
|
|
195
218
|
},
|
|
196
|
-
|
|
197
|
-
|
|
219
|
+
onCartClick: () => {
|
|
220
|
+
},
|
|
221
|
+
// required
|
|
222
|
+
categories: a
|
|
223
|
+
},
|
|
224
|
+
render: o
|
|
198
225
|
};
|
|
199
226
|
export {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
227
|
+
p as Authenticated,
|
|
228
|
+
g as Unauthenticated,
|
|
229
|
+
k as WithCartItems,
|
|
230
|
+
C as default
|
|
204
231
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caseparts-org/caseblocks",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.91",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/main.js",
|
|
7
7
|
"types": "dist/main.d.ts",
|
|
@@ -29,15 +29,14 @@
|
|
|
29
29
|
"preview": "vite preview",
|
|
30
30
|
"storybook": "storybook dev -p 6006",
|
|
31
31
|
"build-storybook": "storybook build",
|
|
32
|
-
"prepare": "husky"
|
|
32
|
+
"prepare": "husky",
|
|
33
|
+
"size:components": "size-limit"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@fontsource-variable/roboto-condensed": "^5.1.1",
|
|
36
37
|
"@fontsource/roboto": "^5.1.0",
|
|
37
|
-
"@tippyjs/react": "^4.2.6",
|
|
38
38
|
"clsx": "^2.1.1",
|
|
39
|
-
"csstype": "^3.1.3"
|
|
40
|
-
"reactjs-popup": "^2.0.6"
|
|
39
|
+
"csstype": "^3.1.3"
|
|
41
40
|
},
|
|
42
41
|
"peerDependencies": {
|
|
43
42
|
"embla-carousel-autoplay": "^8.0.0",
|
|
@@ -75,7 +74,9 @@
|
|
|
75
74
|
"vite": "^5.4.10",
|
|
76
75
|
"vite-plugin-dts": "^4.3.0",
|
|
77
76
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
78
|
-
"vite-plugin-static-copy": "^2.3.1"
|
|
77
|
+
"vite-plugin-static-copy": "^2.3.1",
|
|
78
|
+
"size-limit": "^11.0.0",
|
|
79
|
+
"@size-limit/preset-small-lib": "^11.0.0"
|
|
79
80
|
},
|
|
80
81
|
"eslintConfig": {
|
|
81
82
|
"extends": [
|
|
@@ -84,5 +85,25 @@
|
|
|
84
85
|
},
|
|
85
86
|
"lint-staged": {
|
|
86
87
|
"**/*": "prettier --write --ignore-unknown"
|
|
87
|
-
}
|
|
88
|
+
},
|
|
89
|
+
"size-limit": [
|
|
90
|
+
{
|
|
91
|
+
"name": "Tooltip",
|
|
92
|
+
"path": "lib/atoms/Tooltip/Tooltip.tsx",
|
|
93
|
+
"import": "{ Tooltip }",
|
|
94
|
+
"limit": "3 KB"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "Popover",
|
|
98
|
+
"path": "lib/atoms/Popover/Popover.tsx",
|
|
99
|
+
"import": "{ Popover }",
|
|
100
|
+
"limit": "4 KB"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "SlideInPanel",
|
|
104
|
+
"path": "lib/atoms/SlideInPanel/SlideInPanel.tsx",
|
|
105
|
+
"import": "{ SlideInPanel }",
|
|
106
|
+
"limit": "5 KB"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
88
109
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { ShoppingCart } from './Cart';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof ShoppingCart;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
tags: string[];
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const EmptyCart: Story;
|
|
14
|
-
export declare const LargeCart: Story;
|
|
15
|
-
export declare const SmallCart: Story;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { TippyProps } from '@tippyjs/react';
|
|
3
|
-
export type TooltipProps = Omit<TippyProps, "content" | "children" | "trigger"> & {
|
|
4
|
-
tooltipClassName?: string;
|
|
5
|
-
contentClassName?: string;
|
|
6
|
-
trigger: React.ReactElement;
|
|
7
|
-
on?: "click" | "mouseenter focus";
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
mouseEnterDelay?: number;
|
|
10
|
-
mouseLeaveDelay?: number;
|
|
11
|
-
};
|
|
12
|
-
export declare function Tooltip({ tooltipClassName, contentClassName, trigger, children, on, mouseEnterDelay, mouseLeaveDelay, ...tippyProps }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|