@caseparts-org/caseblocks 0.0.86 → 0.0.87
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/assets/Icon.css +1 -1
- package/dist/assets/Root.css +1 -1
- package/dist/assets/Tooltip.css +1 -1
- package/dist/atoms/Icon/Icon.js +22 -22
- package/dist/atoms/Root/Root.js +1 -1
- package/dist/molecules/Cart/Cart.js +18 -20
- package/dist/molecules/CategoryNav/CategoryNav.js +1 -1
- package/dist/molecules/Tooltip/Tooltip.d.ts +8 -7
- package/dist/molecules/Tooltip/Tooltip.js +2183 -598
- package/dist/molecules/Tooltip/Tooltip.stories.d.ts +7 -15
- package/dist/molecules/Tooltip/Tooltip.stories.js +48 -59
- package/package.json +5 -4
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react-vite';
|
|
|
2
2
|
import { Tooltip } from './Tooltip';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component:
|
|
5
|
+
component: typeof Tooltip;
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: string;
|
|
8
8
|
controls: {
|
|
@@ -16,8 +16,8 @@ declare const meta: {
|
|
|
16
16
|
};
|
|
17
17
|
tags: string[];
|
|
18
18
|
args: {
|
|
19
|
-
on: "
|
|
20
|
-
|
|
19
|
+
on: "mouseenter focus";
|
|
20
|
+
placement: "top";
|
|
21
21
|
mouseEnterDelay: number;
|
|
22
22
|
mouseLeaveDelay: number;
|
|
23
23
|
arrow: true;
|
|
@@ -28,7 +28,7 @@ declare const meta: {
|
|
|
28
28
|
options: string[];
|
|
29
29
|
description: string;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
placement: {
|
|
32
32
|
control: "select";
|
|
33
33
|
options: string[];
|
|
34
34
|
description: string;
|
|
@@ -41,22 +41,14 @@ declare const meta: {
|
|
|
41
41
|
control: "number";
|
|
42
42
|
description: string;
|
|
43
43
|
};
|
|
44
|
-
|
|
45
|
-
control:
|
|
46
|
-
description: string;
|
|
47
|
-
};
|
|
48
|
-
open: {
|
|
49
|
-
control: "boolean";
|
|
50
|
-
description: string;
|
|
44
|
+
delay: {
|
|
45
|
+
control: false;
|
|
51
46
|
table: {
|
|
52
47
|
category: string;
|
|
53
48
|
};
|
|
54
|
-
};
|
|
55
|
-
closeOnDocumentClick: {
|
|
56
|
-
control: "boolean";
|
|
57
49
|
description: string;
|
|
58
50
|
};
|
|
59
|
-
|
|
51
|
+
arrow: {
|
|
60
52
|
control: "boolean";
|
|
61
53
|
description: string;
|
|
62
54
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip as t } from "./Tooltip.js";
|
|
3
3
|
import { Button as o } from "../../atoms/Button/Button.js";
|
|
4
|
-
const
|
|
4
|
+
const s = {
|
|
5
5
|
title: "Case Parts/Molecules/Tooltip",
|
|
6
6
|
component: t,
|
|
7
7
|
parameters: {
|
|
@@ -9,14 +9,14 @@ const l = {
|
|
|
9
9
|
controls: { sort: "requiredFirst" },
|
|
10
10
|
docs: {
|
|
11
11
|
description: {
|
|
12
|
-
component: "Wrapper around
|
|
12
|
+
component: "Wrapper around @tippyjs/react. Use mouseEnterDelay/mouseLeaveDelay or pass `delay` directly. `on` maps to Tippy trigger."
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
tags: ["autodocs"],
|
|
17
17
|
args: {
|
|
18
|
-
on: "
|
|
19
|
-
|
|
18
|
+
on: "mouseenter focus",
|
|
19
|
+
placement: "top",
|
|
20
20
|
mouseEnterDelay: 100,
|
|
21
21
|
mouseLeaveDelay: 80,
|
|
22
22
|
arrow: !0
|
|
@@ -24,52 +24,43 @@ const l = {
|
|
|
24
24
|
argTypes: {
|
|
25
25
|
on: {
|
|
26
26
|
control: "select",
|
|
27
|
-
options: ["
|
|
28
|
-
description: "
|
|
27
|
+
options: ["mouseenter focus", "click"],
|
|
28
|
+
description: "Trigger events passed to Tippy `trigger`."
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
placement: {
|
|
31
31
|
control: "select",
|
|
32
32
|
options: [
|
|
33
|
-
"top
|
|
34
|
-
"top
|
|
35
|
-
"top
|
|
36
|
-
"right
|
|
37
|
-
"right
|
|
38
|
-
"right
|
|
39
|
-
"bottom
|
|
40
|
-
"bottom
|
|
41
|
-
"bottom
|
|
42
|
-
"left
|
|
43
|
-
"left
|
|
44
|
-
"left
|
|
45
|
-
"center center"
|
|
33
|
+
"top",
|
|
34
|
+
"top-start",
|
|
35
|
+
"top-end",
|
|
36
|
+
"right",
|
|
37
|
+
"right-start",
|
|
38
|
+
"right-end",
|
|
39
|
+
"bottom",
|
|
40
|
+
"bottom-start",
|
|
41
|
+
"bottom-end",
|
|
42
|
+
"left",
|
|
43
|
+
"left-start",
|
|
44
|
+
"left-end"
|
|
46
45
|
],
|
|
47
|
-
description: "
|
|
46
|
+
description: "Popper placement used by Tippy."
|
|
48
47
|
},
|
|
49
48
|
mouseEnterDelay: {
|
|
50
49
|
control: "number",
|
|
51
|
-
description: "
|
|
50
|
+
description: "Show delay (ms) mapped to delay[0]."
|
|
52
51
|
},
|
|
53
52
|
mouseLeaveDelay: {
|
|
54
53
|
control: "number",
|
|
55
|
-
description: "
|
|
54
|
+
description: "Hide delay (ms) mapped to delay[1]."
|
|
56
55
|
},
|
|
57
|
-
|
|
58
|
-
control:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
open: {
|
|
62
|
-
control: "boolean",
|
|
63
|
-
description: "Controlled open state (overrides triggers). Leave undefined for uncontrolled.",
|
|
64
|
-
table: { category: "Advanced" }
|
|
56
|
+
delay: {
|
|
57
|
+
control: !1,
|
|
58
|
+
table: { category: "Advanced" },
|
|
59
|
+
description: "Override both delays (number or [show, hide])."
|
|
65
60
|
},
|
|
66
|
-
|
|
67
|
-
control: "boolean",
|
|
68
|
-
description: "Close when clicking outside (uncontrolled modes)."
|
|
69
|
-
},
|
|
70
|
-
closeOnEscape: {
|
|
61
|
+
arrow: {
|
|
71
62
|
control: "boolean",
|
|
72
|
-
description: "
|
|
63
|
+
description: "Show tooltip arrow."
|
|
73
64
|
},
|
|
74
65
|
contentClassName: { table: { disable: !0 } },
|
|
75
66
|
tooltipClassName: { table: { disable: !0 } },
|
|
@@ -81,9 +72,9 @@ const l = {
|
|
|
81
72
|
description: "Tooltip content."
|
|
82
73
|
}
|
|
83
74
|
}
|
|
84
|
-
},
|
|
75
|
+
}, a = {
|
|
85
76
|
args: {
|
|
86
|
-
|
|
77
|
+
placement: "top",
|
|
87
78
|
mouseEnterDelay: 0,
|
|
88
79
|
mouseLeaveDelay: 0
|
|
89
80
|
},
|
|
@@ -103,13 +94,12 @@ const l = {
|
|
|
103
94
|
{
|
|
104
95
|
...r,
|
|
105
96
|
trigger: /* @__PURE__ */ e("div", { className: "tooltip-story", children: /* @__PURE__ */ e(o, { size: "md", variant: "primary", children: "Hover me" }) }),
|
|
106
|
-
|
|
107
|
-
children: "This tooltip appears on hover (top center)."
|
|
97
|
+
children: "This tooltip appears on hover (top)."
|
|
108
98
|
}
|
|
109
99
|
)
|
|
110
100
|
}
|
|
111
101
|
)
|
|
112
|
-
},
|
|
102
|
+
}, c = {
|
|
113
103
|
render: () => /* @__PURE__ */ e(
|
|
114
104
|
"div",
|
|
115
105
|
{
|
|
@@ -126,13 +116,15 @@ const l = {
|
|
|
126
116
|
{
|
|
127
117
|
trigger: /* @__PURE__ */ e("div", { className: "tooltip-story", children: /* @__PURE__ */ e(o, { size: "md", variant: "secondary", children: "Click me" }) }),
|
|
128
118
|
on: "click",
|
|
129
|
-
|
|
130
|
-
|
|
119
|
+
placement: "bottom",
|
|
120
|
+
mouseEnterDelay: 0,
|
|
121
|
+
mouseLeaveDelay: 0,
|
|
122
|
+
children: "This tooltip appears on click (bottom)."
|
|
131
123
|
}
|
|
132
124
|
)
|
|
133
125
|
}
|
|
134
126
|
)
|
|
135
|
-
},
|
|
127
|
+
}, d = {
|
|
136
128
|
render: () => /* @__PURE__ */ e(
|
|
137
129
|
"div",
|
|
138
130
|
{
|
|
@@ -148,14 +140,13 @@ const l = {
|
|
|
148
140
|
t,
|
|
149
141
|
{
|
|
150
142
|
trigger: /* @__PURE__ */ e("div", { className: "tooltip-story", children: /* @__PURE__ */ e(o, { size: "md", variant: "cta-primary", children: "Hover right" }) }),
|
|
151
|
-
|
|
152
|
-
position: "right center",
|
|
143
|
+
placement: "right",
|
|
153
144
|
children: "Tooltip on the right."
|
|
154
145
|
}
|
|
155
146
|
)
|
|
156
147
|
}
|
|
157
148
|
)
|
|
158
|
-
},
|
|
149
|
+
}, p = {
|
|
159
150
|
render: () => /* @__PURE__ */ e(
|
|
160
151
|
"div",
|
|
161
152
|
{
|
|
@@ -171,14 +162,13 @@ const l = {
|
|
|
171
162
|
t,
|
|
172
163
|
{
|
|
173
164
|
trigger: /* @__PURE__ */ e("div", { className: "tooltip-story", children: /* @__PURE__ */ e(o, { size: "md", variant: "tertiary", children: "Hover left" }) }),
|
|
174
|
-
|
|
175
|
-
position: "left center",
|
|
165
|
+
placement: "left",
|
|
176
166
|
children: "Tooltip on the left."
|
|
177
167
|
}
|
|
178
168
|
)
|
|
179
169
|
}
|
|
180
170
|
)
|
|
181
|
-
},
|
|
171
|
+
}, m = {
|
|
182
172
|
render: () => /* @__PURE__ */ e(
|
|
183
173
|
"div",
|
|
184
174
|
{
|
|
@@ -195,8 +185,7 @@ const l = {
|
|
|
195
185
|
t,
|
|
196
186
|
{
|
|
197
187
|
trigger: /* @__PURE__ */ e("div", { className: "tooltip-story", children: /* @__PURE__ */ e(o, { size: "md", variant: "cta-primary", children: "Hover right" }) }),
|
|
198
|
-
|
|
199
|
-
position: "right center",
|
|
188
|
+
placement: "right",
|
|
200
189
|
children: "Tooltip on the right."
|
|
201
190
|
}
|
|
202
191
|
)
|
|
@@ -204,10 +193,10 @@ const l = {
|
|
|
204
193
|
)
|
|
205
194
|
};
|
|
206
195
|
export {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
196
|
+
m as AbsolutelyPositioned,
|
|
197
|
+
c as OnClick,
|
|
198
|
+
a as OnHover,
|
|
199
|
+
p as PositionLeft,
|
|
200
|
+
d as PositionRight,
|
|
201
|
+
s as default
|
|
213
202
|
};
|
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.87",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/main.js",
|
|
7
7
|
"types": "dist/main.d.ts",
|
|
@@ -34,15 +34,16 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@fontsource-variable/roboto-condensed": "^5.1.1",
|
|
36
36
|
"@fontsource/roboto": "^5.1.0",
|
|
37
|
+
"@tippyjs/react": "^4.2.6",
|
|
37
38
|
"clsx": "^2.1.1",
|
|
38
39
|
"csstype": "^3.1.3",
|
|
39
40
|
"reactjs-popup": "^2.0.6"
|
|
40
41
|
},
|
|
41
42
|
"peerDependencies": {
|
|
42
|
-
"react": ">=18.3.1 <20.0.0",
|
|
43
|
-
"react-dom": ">=18.3.1 <20.0.0",
|
|
44
43
|
"embla-carousel-autoplay": "^8.0.0",
|
|
45
|
-
"embla-carousel-react": "^8.0.0"
|
|
44
|
+
"embla-carousel-react": "^8.0.0",
|
|
45
|
+
"react": ">=18.3.1 <20.0.0",
|
|
46
|
+
"react-dom": ">=18.3.1 <20.0.0"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
49
|
"@chromatic-com/storybook": "^4.0.1",
|