dune-react 0.0.42 → 0.0.44
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/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/components/puck-base/media.d.ts +1 -0
- package/dist/components/puck-base/media.js +272 -129
- package/dist/components/puck-block/contact-sections/centered-form/centered-form.js +1 -1
- package/dist/components/puck-block/contact-sections/contact-modal/contact-modal.js +1 -1
- package/dist/components/puck-block/contact-sections/form-with-media/form-with-media.js +1 -1
- package/dist/components/puck-block/contact-sections/header-form-cards/header-form-cards.js +1 -1
- package/dist/components/puck-block/contact-sections/split-info-form/split-info-form.js +135 -50
- package/dist/components/puck-block/gallery-sections/static-grid/static-grid.js +14 -10
- package/dist/components/puck-block/testimonial-sections/bento-testimonial/component.js +7 -6
- package/dist/components/shadcn/slider.js +1 -1
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/algorithms/flipImageAlgorithm.js +44 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/algorithms/moveCoordinatesAlgorithm.js +8 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/algorithms/resizeCoordinatesAlgorithm.js +291 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/algorithms/rotateImageAlgorithm.js +38 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/algorithms/transformImageAlgorithm.js +84 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/animation/index.js +78 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/boundary/index.js +31 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/canvas/index.js +94 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/constants/index.js +8 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultAreaPositionRestrictions.js +51 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultAreaSizeRestrictions.js +30 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultBoundary.js +10 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultPosition.js +12 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultPositionRestrictions.js +17 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultSize.js +31 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultSizeRestrictions.js +16 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultStencilConstraints.js +13 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/defaultVisibleArea.js +49 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/defaults/index.js +84 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/extensions/stencil-size/index.js +107 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/image/index.js +350 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/instance/AbstractCropperInstance.js +494 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/approximateSize.js +30 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/fitCoordinates.js +30 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/fitVisibleArea.js +26 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/helpers.js +125 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/imageTransforms.js +83 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/interactions.js +19 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/normalize.js +83 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/sizeRestrictions.js +58 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/service/utils.js +313 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/copyState.js +7 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/createState.js +41 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/moveCoordinates.js +15 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/reconcileState.js +44 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/resizeCoordinates.js +22 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/setBoundary.js +31 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/setCoordinates.js +83 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/setVisibleArea.js +18 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/state/transformImage.js +18 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/types/index.js +16 -0
- package/dist/node_modules/.pnpm/advanced-cropper@0.17.1/node_modules/advanced-cropper/utils/index.js +268 -0
- package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +63 -0
- package/dist/node_modules/.pnpm/react-advanced-cropper@0.20.1_react@19.2.4/node_modules/react-advanced-cropper/dist/index.esm-bundler.js +1715 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +181 -0
- package/dist/style.css +406 -0
- package/package.json +2 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from "../../../shadcn/select.js";
|
|
5
4
|
import { Input } from "../../../shadcn/input.js";
|
|
6
5
|
import { Label } from "../../../shadcn/label.js";
|
|
7
6
|
import { Textarea } from "../../../shadcn/textarea.js";
|
|
@@ -11,11 +10,25 @@ import { BiEnvelope, BiPhone, BiMap } from "../../../../node_modules/.pnpm/react
|
|
|
11
10
|
import { cn } from "../../../../utils/css-utils.js";
|
|
12
11
|
import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
|
|
13
12
|
const SplitInfoForm = (props) => {
|
|
14
|
-
const {
|
|
13
|
+
const {
|
|
14
|
+
tagline,
|
|
15
|
+
heading,
|
|
16
|
+
description,
|
|
17
|
+
email,
|
|
18
|
+
phone,
|
|
19
|
+
address,
|
|
20
|
+
button,
|
|
21
|
+
styles
|
|
22
|
+
} = {
|
|
15
23
|
...SplitInfoFormDefaults,
|
|
16
24
|
...props
|
|
17
25
|
};
|
|
18
|
-
const {
|
|
26
|
+
const {
|
|
27
|
+
className: sectionClassName,
|
|
28
|
+
style: sectionStyle,
|
|
29
|
+
css,
|
|
30
|
+
formType = "simple"
|
|
31
|
+
} = styles ?? {};
|
|
19
32
|
const { createSubmitHandler, submitting } = useContactForm();
|
|
20
33
|
const [nameInput, setNameInput] = useState("");
|
|
21
34
|
const [firstName, setFirstName] = useState("");
|
|
@@ -23,13 +36,12 @@ const SplitInfoForm = (props) => {
|
|
|
23
36
|
const [emailInput, setEmailInput] = useState("");
|
|
24
37
|
const [phoneInput, setPhoneInput] = useState("");
|
|
25
38
|
const [messageInput, setMessageInput] = useState("");
|
|
26
|
-
const [topic, setTopic] = useState("");
|
|
27
39
|
const handleSubmit = createSubmitHandler(
|
|
28
40
|
() => ({
|
|
29
41
|
name: nameInput || `${firstName} ${lastName}`.trim() || "",
|
|
30
42
|
email: emailInput || "",
|
|
31
43
|
phone: phoneInput || "",
|
|
32
|
-
message:
|
|
44
|
+
message: messageInput || ""
|
|
33
45
|
}),
|
|
34
46
|
() => {
|
|
35
47
|
setNameInput("");
|
|
@@ -38,21 +50,44 @@ const SplitInfoForm = (props) => {
|
|
|
38
50
|
setEmailInput("");
|
|
39
51
|
setPhoneInput("");
|
|
40
52
|
setMessageInput("");
|
|
41
|
-
setTopic("");
|
|
42
53
|
}
|
|
43
54
|
);
|
|
44
55
|
const renderSimpleFields = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45
56
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
46
57
|
/* @__PURE__ */ jsx(Label, { htmlFor: "name", className: "mb-2", children: "Name" }),
|
|
47
|
-
/* @__PURE__ */ jsx(
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
Input,
|
|
60
|
+
{
|
|
61
|
+
type: "text",
|
|
62
|
+
id: "name",
|
|
63
|
+
value: nameInput,
|
|
64
|
+
onChange: (e) => setNameInput(e.target.value)
|
|
65
|
+
}
|
|
66
|
+
)
|
|
48
67
|
] }),
|
|
49
68
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
50
69
|
/* @__PURE__ */ jsx(Label, { htmlFor: "email", className: "mb-2", children: "Email" }),
|
|
51
|
-
/* @__PURE__ */ jsx(
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
Input,
|
|
72
|
+
{
|
|
73
|
+
type: "email",
|
|
74
|
+
id: "email",
|
|
75
|
+
value: emailInput,
|
|
76
|
+
onChange: (e) => setEmailInput(e.target.value)
|
|
77
|
+
}
|
|
78
|
+
)
|
|
52
79
|
] }),
|
|
53
80
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
54
81
|
/* @__PURE__ */ jsx(Label, { htmlFor: "phone", className: "mb-2", children: "Phone" }),
|
|
55
|
-
/* @__PURE__ */ jsx(
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
Input,
|
|
84
|
+
{
|
|
85
|
+
type: "tel",
|
|
86
|
+
id: "phone",
|
|
87
|
+
value: phoneInput,
|
|
88
|
+
onChange: (e) => setPhoneInput(e.target.value)
|
|
89
|
+
}
|
|
90
|
+
)
|
|
56
91
|
] }),
|
|
57
92
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
58
93
|
/* @__PURE__ */ jsx(Label, { htmlFor: "message", className: "mb-2", children: "Message" }),
|
|
@@ -72,30 +107,52 @@ const SplitInfoForm = (props) => {
|
|
|
72
107
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-6", children: [
|
|
73
108
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
74
109
|
/* @__PURE__ */ jsx(Label, { htmlFor: "firstName", className: "mb-2", children: "First name" }),
|
|
75
|
-
/* @__PURE__ */ jsx(
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
Input,
|
|
112
|
+
{
|
|
113
|
+
type: "text",
|
|
114
|
+
id: "firstName",
|
|
115
|
+
value: firstName,
|
|
116
|
+
onChange: (e) => setFirstName(e.target.value)
|
|
117
|
+
}
|
|
118
|
+
)
|
|
76
119
|
] }),
|
|
77
120
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
78
121
|
/* @__PURE__ */ jsx(Label, { htmlFor: "lastName", className: "mb-2", children: "Last name" }),
|
|
79
|
-
/* @__PURE__ */ jsx(
|
|
122
|
+
/* @__PURE__ */ jsx(
|
|
123
|
+
Input,
|
|
124
|
+
{
|
|
125
|
+
type: "text",
|
|
126
|
+
id: "lastName",
|
|
127
|
+
value: lastName,
|
|
128
|
+
onChange: (e) => setLastName(e.target.value)
|
|
129
|
+
}
|
|
130
|
+
)
|
|
80
131
|
] })
|
|
81
132
|
] }),
|
|
82
133
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
83
134
|
/* @__PURE__ */ jsx(Label, { htmlFor: "email", className: "mb-2", children: "Email" }),
|
|
84
|
-
/* @__PURE__ */ jsx(
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
Input,
|
|
137
|
+
{
|
|
138
|
+
type: "email",
|
|
139
|
+
id: "email",
|
|
140
|
+
value: emailInput,
|
|
141
|
+
onChange: (e) => setEmailInput(e.target.value)
|
|
142
|
+
}
|
|
143
|
+
)
|
|
85
144
|
] }),
|
|
86
145
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
87
146
|
/* @__PURE__ */ jsx(Label, { htmlFor: "phone", className: "mb-2", children: "Phone number" }),
|
|
88
|
-
/* @__PURE__ */ jsx(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
] })
|
|
98
|
-
] })
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
Input,
|
|
149
|
+
{
|
|
150
|
+
type: "tel",
|
|
151
|
+
id: "phone",
|
|
152
|
+
value: phoneInput,
|
|
153
|
+
onChange: (e) => setPhoneInput(e.target.value)
|
|
154
|
+
}
|
|
155
|
+
)
|
|
99
156
|
] }),
|
|
100
157
|
/* @__PURE__ */ jsxs("div", { className: "grid w-full items-center", children: [
|
|
101
158
|
/* @__PURE__ */ jsx(Label, { htmlFor: "message", className: "mb-2", children: "Message" }),
|
|
@@ -111,33 +168,58 @@ const SplitInfoForm = (props) => {
|
|
|
111
168
|
)
|
|
112
169
|
] })
|
|
113
170
|
] });
|
|
114
|
-
return /* @__PURE__ */ jsx(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
|
|
171
|
+
return /* @__PURE__ */ jsx(
|
|
172
|
+
SectionWrapper,
|
|
173
|
+
{
|
|
174
|
+
className: cn("px-[5%] py-8 md:py-12 lg:py-14", sectionClassName),
|
|
175
|
+
style: sectionStyle,
|
|
176
|
+
css,
|
|
177
|
+
children: /* @__PURE__ */ jsx("div", { className: "container", children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-start gap-y-12 md:grid-flow-row md:grid-cols-2 md:gap-x-12 lg:grid-flow-col lg:gap-x-20 lg:gap-y-16", children: [
|
|
178
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
179
|
+
/* @__PURE__ */ jsx("p", { className: "mb-3 font-semibold md:mb-4", children: tagline }),
|
|
180
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-6 md:mb-8", children: [
|
|
181
|
+
/* @__PURE__ */ jsx("h2", { className: "mb-5 text-5xl font-bold md:mb-6 md:text-7xl lg:text-8xl", children: heading }),
|
|
182
|
+
/* @__PURE__ */ jsx("p", { className: "md:text-md", children: description })
|
|
183
|
+
] }),
|
|
184
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4 py-2", children: [
|
|
185
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
186
|
+
/* @__PURE__ */ jsx(BiEnvelope, { className: "size-6 flex-none" }),
|
|
187
|
+
/* @__PURE__ */ jsx("p", { children: email })
|
|
188
|
+
] }),
|
|
189
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
190
|
+
/* @__PURE__ */ jsx(BiPhone, { className: "size-6 flex-none" }),
|
|
191
|
+
/* @__PURE__ */ jsx("p", { children: phone })
|
|
192
|
+
] }),
|
|
193
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
194
|
+
/* @__PURE__ */ jsx(BiMap, { className: "size-6 flex-none" }),
|
|
195
|
+
/* @__PURE__ */ jsx("p", { children: address })
|
|
196
|
+
] })
|
|
197
|
+
] })
|
|
129
198
|
] }),
|
|
130
|
-
/* @__PURE__ */ jsxs(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
199
|
+
/* @__PURE__ */ jsxs(
|
|
200
|
+
"form",
|
|
201
|
+
{
|
|
202
|
+
className: "grid grid-cols-1 grid-rows-[auto_auto] gap-6",
|
|
203
|
+
onSubmit: handleSubmit,
|
|
204
|
+
children: [
|
|
205
|
+
formType === "advanced" ? renderAdvancedFields() : renderSimpleFields(),
|
|
206
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
207
|
+
CompoundButton,
|
|
208
|
+
{
|
|
209
|
+
type: "submit",
|
|
210
|
+
label: submitting ? "Submitting..." : button.label,
|
|
211
|
+
variant: button.variant,
|
|
212
|
+
size: button.size,
|
|
213
|
+
icon: button.icon,
|
|
214
|
+
disabled: submitting
|
|
215
|
+
}
|
|
216
|
+
) })
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
] }) })
|
|
221
|
+
}
|
|
222
|
+
);
|
|
141
223
|
};
|
|
142
224
|
const SplitInfoFormDefaults = {
|
|
143
225
|
tagline: "Tagline",
|
|
@@ -145,7 +227,10 @@ const SplitInfoFormDefaults = {
|
|
|
145
227
|
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
|
|
146
228
|
button: { label: "Submit" },
|
|
147
229
|
buttons: [],
|
|
148
|
-
media: {
|
|
230
|
+
media: {
|
|
231
|
+
src: "https://picsum.photos/seed/contact-split/800/600",
|
|
232
|
+
alt: "Placeholder"
|
|
233
|
+
},
|
|
149
234
|
email: "hello@example.com",
|
|
150
235
|
phone: "+1 (555) 000-0000",
|
|
151
236
|
address: "123 Sample St, Sydney NSW 2000 AU",
|
|
@@ -3,11 +3,11 @@ import { cn } from "../../../../utils/css-utils.js";
|
|
|
3
3
|
import { SectionWrapper } from "../../../puck-core/section-wrapper.js";
|
|
4
4
|
import { CompoundMedia } from "../../../puck-base/media.js";
|
|
5
5
|
const columnsMap = {
|
|
6
|
-
"1": "grid-cols-1",
|
|
7
|
-
"2": "
|
|
8
|
-
"3": "
|
|
9
|
-
"2-lg3": "
|
|
10
|
-
"2-lg4": "
|
|
6
|
+
"1": "md:grid-cols-1",
|
|
7
|
+
"2": "md:grid-cols-2",
|
|
8
|
+
"3": "md:grid-cols-2 lg:grid-cols-3",
|
|
9
|
+
"2-lg3": "sm:grid-cols-2 lg:grid-cols-3",
|
|
10
|
+
"2-lg4": "sm:grid-cols-2 lg:grid-cols-4"
|
|
11
11
|
};
|
|
12
12
|
const StaticGrid = (props) => {
|
|
13
13
|
const { heading, description, medias, styles } = {
|
|
@@ -25,11 +25,15 @@ const StaticGrid = (props) => {
|
|
|
25
25
|
/* @__PURE__ */ jsx(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
|
-
className: cn(
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
className: cn(
|
|
29
|
+
"flex overflow-x-auto snap-x snap-mandatory scrollbar-hide md:grid md:auto-cols-fr md:overflow-visible",
|
|
30
|
+
gridCols,
|
|
31
|
+
{
|
|
32
|
+
"gap-4 md:gap-8": hasGap,
|
|
33
|
+
"gap-0": !hasGap
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
children: medias.map((media, index) => /* @__PURE__ */ jsx("a", { href: "#", className: "w-[75vw] flex-none snap-start md:w-auto md:flex-1", children: /* @__PURE__ */ jsx("div", { className: "w-full overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
33
37
|
CompoundMedia,
|
|
34
38
|
{
|
|
35
39
|
src: media.src,
|
|
@@ -35,6 +35,7 @@ const BentoTestimonial = (props) => {
|
|
|
35
35
|
{
|
|
36
36
|
className: `grid grid-cols-1 gap-6 sm:grid-rows-6 md:grid-cols-2 md:gap-8 lg:grid-cols-4 ${gridRowsClass}`,
|
|
37
37
|
children: testimonialCards.map((card, index) => {
|
|
38
|
+
var _a, _b, _c, _d, _e, _f;
|
|
38
39
|
if (card.component === "background" && hasBackgroundCards) {
|
|
39
40
|
backgroundImageCardCount++;
|
|
40
41
|
return /* @__PURE__ */ jsxs(
|
|
@@ -59,9 +60,9 @@ const BentoTestimonial = (props) => {
|
|
|
59
60
|
/* @__PURE__ */ jsx(
|
|
60
61
|
CompoundMedia,
|
|
61
62
|
{
|
|
62
|
-
src: card.props.media.src,
|
|
63
|
+
src: (_a = card.props.media) == null ? void 0 : _a.src,
|
|
63
64
|
className: "size-full object-cover",
|
|
64
|
-
alt: card.props.media.alt
|
|
65
|
+
alt: (_b = card.props.media) == null ? void 0 : _b.alt
|
|
65
66
|
}
|
|
66
67
|
),
|
|
67
68
|
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/50" })
|
|
@@ -84,8 +85,8 @@ const BentoTestimonial = (props) => {
|
|
|
84
85
|
children: /* @__PURE__ */ jsx(
|
|
85
86
|
CompoundMedia,
|
|
86
87
|
{
|
|
87
|
-
src: card.props.media.src,
|
|
88
|
-
alt: card.props.media.alt,
|
|
88
|
+
src: (_c = card.props.media) == null ? void 0 : _c.src,
|
|
89
|
+
alt: (_d = card.props.media) == null ? void 0 : _d.alt,
|
|
89
90
|
className: "max-h-16"
|
|
90
91
|
}
|
|
91
92
|
)
|
|
@@ -104,8 +105,8 @@ const BentoTestimonial = (props) => {
|
|
|
104
105
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
|
|
105
106
|
CompoundMedia,
|
|
106
107
|
{
|
|
107
|
-
src: card.props.media.src,
|
|
108
|
-
alt: card.props.media.alt,
|
|
108
|
+
src: (_e = card.props.media) == null ? void 0 : _e.src,
|
|
109
|
+
alt: (_f = card.props.media) == null ? void 0 : _f.alt,
|
|
109
110
|
className: "mb-4 size-12 min-h-12 min-w-12 rounded-full object-cover md:mb-0 md:mr-4"
|
|
110
111
|
}
|
|
111
112
|
) }),
|
|
@@ -34,7 +34,7 @@ function Slider({
|
|
|
34
34
|
Slider$1.Track,
|
|
35
35
|
{
|
|
36
36
|
"data-slot": "slider-track",
|
|
37
|
-
className: "relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
|
|
37
|
+
className: "relative grow overflow-hidden rounded-full bg-muted-foreground/20 select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
|
|
38
38
|
children: /* @__PURE__ */ jsx(
|
|
39
39
|
Slider$1.Indicator,
|
|
40
40
|
{
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { rotatePoint, getCenter, applyMove, diff, moveToPositionRestrictions } from "../service/utils.js";
|
|
2
|
+
import { isInitializedState, getTransformedImageSize, getAreaPositionRestrictions } from "../service/helpers.js";
|
|
3
|
+
import { copyState } from "../state/copyState.js";
|
|
4
|
+
function flipImageAlgorithm(state, settings, horizontal, vertical) {
|
|
5
|
+
if (isInitializedState(state)) {
|
|
6
|
+
var result = copyState(state);
|
|
7
|
+
var rotate = state.transforms.rotate;
|
|
8
|
+
var imageSize = getTransformedImageSize(state);
|
|
9
|
+
var changed = {
|
|
10
|
+
horizontal,
|
|
11
|
+
vertical
|
|
12
|
+
};
|
|
13
|
+
if (changed.horizontal || changed.vertical) {
|
|
14
|
+
var imageCenter = rotatePoint({
|
|
15
|
+
left: imageSize.width / 2,
|
|
16
|
+
top: imageSize.height / 2
|
|
17
|
+
}, -rotate);
|
|
18
|
+
var oldCenter = rotatePoint(getCenter(result.coordinates), -rotate);
|
|
19
|
+
var newCenter = rotatePoint({
|
|
20
|
+
left: changed.horizontal ? imageCenter.left - (oldCenter.left - imageCenter.left) : oldCenter.left,
|
|
21
|
+
top: changed.vertical ? imageCenter.top - (oldCenter.top - imageCenter.top) : oldCenter.top
|
|
22
|
+
}, rotate);
|
|
23
|
+
result.coordinates = applyMove(result.coordinates, diff(newCenter, getCenter(result.coordinates)));
|
|
24
|
+
oldCenter = rotatePoint(getCenter(result.visibleArea), -rotate);
|
|
25
|
+
newCenter = rotatePoint({
|
|
26
|
+
left: changed.horizontal ? imageCenter.left - (oldCenter.left - imageCenter.left) : oldCenter.left,
|
|
27
|
+
top: changed.vertical ? imageCenter.top - (oldCenter.top - imageCenter.top) : oldCenter.top
|
|
28
|
+
}, rotate);
|
|
29
|
+
result.visibleArea = applyMove(result.visibleArea, diff(newCenter, getCenter(result.visibleArea)));
|
|
30
|
+
result.visibleArea = moveToPositionRestrictions(result.visibleArea, getAreaPositionRestrictions(result, settings));
|
|
31
|
+
}
|
|
32
|
+
if (changed.horizontal) {
|
|
33
|
+
result.transforms.flip.horizontal = !state.transforms.flip.horizontal;
|
|
34
|
+
}
|
|
35
|
+
if (changed.vertical) {
|
|
36
|
+
result.transforms.flip.vertical = !state.transforms.flip.vertical;
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
return state;
|
|
41
|
+
}
|
|
42
|
+
export {
|
|
43
|
+
flipImageAlgorithm
|
|
44
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { applyMove, moveToPositionRestrictions } from "../service/utils.js";
|
|
2
|
+
function moveCoordinatesAlgorithm(coordinates, directions, positionRestrictions) {
|
|
3
|
+
var movedCoordinates = applyMove(coordinates, directions);
|
|
4
|
+
return positionRestrictions ? moveToPositionRestrictions(movedCoordinates, positionRestrictions) : movedCoordinates;
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
moveCoordinatesAlgorithm
|
|
8
|
+
};
|