@drawbridge/components 0.0.39 → 0.0.42
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/advertisement.js +1303 -0
- package/dist/advertisement.mjs +98 -0
- package/dist/card-advertisement.mjs +3 -354
- package/dist/chunk-2ZYGRSSA.mjs +45 -0
- package/dist/chunk-7ZLMDYBR.mjs +113 -0
- package/dist/chunk-BD3TDNJE.mjs +98 -0
- package/dist/chunk-FJXG3REN.mjs +93 -0
- package/dist/chunk-FYA7EAMR.mjs +29 -0
- package/dist/chunk-GFDZ7ER6.mjs +29 -0
- package/dist/chunk-GUSVATKJ.mjs +335 -0
- package/dist/chunk-HH7WF5BT.mjs +29 -0
- package/dist/chunk-Q3UIVGPQ.mjs +29 -0
- package/dist/chunk-T5QQBFM3.mjs +29 -0
- package/dist/chunk-TJNIR4PF.mjs +358 -0
- package/dist/chunk-XWELEL6Z.mjs +208 -0
- package/dist/embla.js +41 -0
- package/dist/embla.mjs +6 -0
- package/dist/icons/arrow-down-tray.js +48 -0
- package/dist/icons/arrow-down-tray.mjs +28 -0
- package/dist/icons/arrow-left.js +48 -0
- package/dist/icons/arrow-left.mjs +28 -0
- package/dist/icons/arrow-right.js +48 -0
- package/dist/icons/arrow-right.mjs +28 -0
- package/dist/icons/arrow-up-tray.js +48 -0
- package/dist/icons/arrow-up-tray.mjs +28 -0
- package/dist/icons/bars-arrow-down.js +48 -0
- package/dist/icons/bars-arrow-down.mjs +28 -0
- package/dist/icons/bars-arrow-up.js +48 -0
- package/dist/icons/bars-arrow-up.mjs +28 -0
- package/dist/icons/bold.js +47 -0
- package/dist/icons/bold.mjs +27 -0
- package/dist/icons/bolt.js +48 -0
- package/dist/icons/bolt.mjs +28 -0
- package/dist/icons/calendar.js +48 -0
- package/dist/icons/calendar.mjs +28 -0
- package/dist/icons/cancel.js +48 -0
- package/dist/icons/cancel.mjs +28 -0
- package/dist/icons/card.js +48 -0
- package/dist/icons/card.mjs +28 -0
- package/dist/icons/chart.js +48 -0
- package/dist/icons/chart.mjs +28 -0
- package/dist/icons/check.js +48 -0
- package/dist/icons/check.mjs +6 -0
- package/dist/icons/chevron-down.js +48 -0
- package/dist/icons/chevron-down.mjs +6 -0
- package/dist/icons/chevron-left.js +48 -0
- package/dist/icons/chevron-left.mjs +28 -0
- package/dist/icons/chevron-right.js +48 -0
- package/dist/icons/chevron-right.mjs +28 -0
- package/dist/icons/chevron-up-down.js +48 -0
- package/dist/icons/chevron-up-down.mjs +28 -0
- package/dist/icons/chevron-up.js +48 -0
- package/dist/icons/chevron-up.mjs +28 -0
- package/dist/icons/clock.js +48 -0
- package/dist/icons/clock.mjs +28 -0
- package/dist/icons/code-bracket.js +48 -0
- package/dist/icons/code-bracket.mjs +28 -0
- package/dist/icons/cog.js +60 -0
- package/dist/icons/cog.mjs +40 -0
- package/dist/icons/copy.js +48 -0
- package/dist/icons/copy.mjs +28 -0
- package/dist/icons/document.js +48 -0
- package/dist/icons/document.mjs +28 -0
- package/dist/icons/download.js +48 -0
- package/dist/icons/download.mjs +28 -0
- package/dist/icons/drag.js +51 -0
- package/dist/icons/drag.mjs +31 -0
- package/dist/icons/ellipsis.js +48 -0
- package/dist/icons/ellipsis.mjs +28 -0
- package/dist/icons/email.js +48 -0
- package/dist/icons/email.mjs +28 -0
- package/dist/icons/external.js +48 -0
- package/dist/icons/external.mjs +28 -0
- package/dist/icons/filter.js +48 -0
- package/dist/icons/filter.mjs +28 -0
- package/dist/icons/flag.js +48 -0
- package/dist/icons/flag.mjs +28 -0
- package/dist/icons/google.js +74 -0
- package/dist/icons/google.mjs +54 -0
- package/dist/icons/home.js +48 -0
- package/dist/icons/home.mjs +28 -0
- package/dist/icons/image.js +48 -0
- package/dist/icons/image.mjs +28 -0
- package/dist/icons/italic.js +48 -0
- package/dist/icons/italic.mjs +28 -0
- package/dist/icons/link.js +48 -0
- package/dist/icons/link.mjs +28 -0
- package/dist/icons/loader.js +64 -0
- package/dist/icons/loader.mjs +6 -0
- package/dist/icons/lock.js +48 -0
- package/dist/icons/lock.mjs +28 -0
- package/dist/icons/logo-mark.js +55 -0
- package/dist/icons/logo-mark.mjs +35 -0
- package/dist/icons/logo-tagline.js +137 -0
- package/dist/icons/logo-tagline.mjs +117 -0
- package/dist/icons/map-pin.js +60 -0
- package/dist/icons/map-pin.mjs +40 -0
- package/dist/icons/menu.js +48 -0
- package/dist/icons/menu.mjs +28 -0
- package/dist/icons/minus.js +48 -0
- package/dist/icons/minus.mjs +6 -0
- package/dist/icons/muted.js +48 -0
- package/dist/icons/muted.mjs +28 -0
- package/dist/icons/pause.js +48 -0
- package/dist/icons/pause.mjs +28 -0
- package/dist/icons/pencil.js +48 -0
- package/dist/icons/pencil.mjs +28 -0
- package/dist/icons/play.js +48 -0
- package/dist/icons/play.mjs +28 -0
- package/dist/icons/plus.js +48 -0
- package/dist/icons/plus.mjs +6 -0
- package/dist/icons/powered-by.js +45 -0
- package/dist/icons/powered-by.mjs +25 -0
- package/dist/icons/qr-code.js +60 -0
- package/dist/icons/qr-code.mjs +40 -0
- package/dist/icons/queue.js +48 -0
- package/dist/icons/queue.mjs +28 -0
- package/dist/icons/refresh.js +48 -0
- package/dist/icons/refresh.mjs +28 -0
- package/dist/icons/refund.js +48 -0
- package/dist/icons/refund.mjs +28 -0
- package/dist/icons/rocket.js +48 -0
- package/dist/icons/rocket.mjs +28 -0
- package/dist/icons/search.js +48 -0
- package/dist/icons/search.mjs +28 -0
- package/dist/icons/share.js +48 -0
- package/dist/icons/share.mjs +28 -0
- package/dist/icons/shop.js +46 -0
- package/dist/icons/shop.mjs +26 -0
- package/dist/icons/sparkles.js +48 -0
- package/dist/icons/sparkles.mjs +28 -0
- package/dist/icons/star.js +48 -0
- package/dist/icons/star.mjs +28 -0
- package/dist/icons/switch.js +48 -0
- package/dist/icons/switch.mjs +28 -0
- package/dist/icons/times.js +48 -0
- package/dist/icons/times.mjs +28 -0
- package/dist/icons/trash.js +48 -0
- package/dist/icons/trash.mjs +28 -0
- package/dist/icons/underline.js +48 -0
- package/dist/icons/underline.mjs +28 -0
- package/dist/icons/upload.js +48 -0
- package/dist/icons/upload.mjs +28 -0
- package/dist/icons/volume.js +48 -0
- package/dist/icons/volume.mjs +28 -0
- package/dist/icons/warning.js +48 -0
- package/dist/icons/warning.mjs +6 -0
- package/dist/input-checkbox.js +130 -0
- package/dist/input-checkbox.mjs +71 -0
- package/dist/input-group.js +156 -0
- package/dist/input-group.mjs +7 -0
- package/dist/input-number.js +211 -0
- package/dist/input-number.mjs +136 -0
- package/dist/input-select.js +150 -0
- package/dist/input-select.mjs +9 -0
- package/dist/input-text.js +65 -0
- package/dist/input-text.mjs +36 -0
- package/dist/input-textarea.js +69 -0
- package/dist/input-textarea.mjs +40 -0
- package/dist/product.js +865 -0
- package/dist/product.mjs +14 -0
- package/dist/provider-font.js +94 -0
- package/dist/provider-font.mjs +74 -0
- package/dist/styles.js +127 -0
- package/dist/styles.mjs +28 -0
- package/dist/video.js +195 -0
- package/dist/video.mjs +125 -0
- package/dist/wrapper-gradient.js +232 -0
- package/dist/wrapper-gradient.mjs +9 -0
- package/package.json +316 -2
- package/types/advertisement.d.ts +36 -0
- package/types/embla.d.ts +2 -0
- package/types/icons/arrow-down-tray.d.ts +5 -0
- package/types/icons/arrow-left.d.ts +5 -0
- package/types/icons/arrow-right.d.ts +5 -0
- package/types/icons/arrow-up-tray.d.ts +5 -0
- package/types/icons/bars-arrow-down.d.ts +5 -0
- package/types/icons/bars-arrow-up.d.ts +5 -0
- package/types/icons/bold.d.ts +5 -0
- package/types/icons/bolt.d.ts +5 -0
- package/types/icons/calendar.d.ts +5 -0
- package/types/icons/cancel.d.ts +5 -0
- package/types/icons/card.d.ts +5 -0
- package/types/icons/chart.d.ts +5 -0
- package/types/icons/check.d.ts +5 -0
- package/types/icons/chevron-down.d.ts +5 -0
- package/types/icons/chevron-left.d.ts +5 -0
- package/types/icons/chevron-right.d.ts +5 -0
- package/types/icons/chevron-up-down.d.ts +5 -0
- package/types/icons/chevron-up.d.ts +5 -0
- package/types/icons/clock.d.ts +5 -0
- package/types/icons/code-bracket.d.ts +5 -0
- package/types/icons/cog.d.ts +5 -0
- package/types/icons/copy.d.ts +5 -0
- package/types/icons/document.d.ts +5 -0
- package/types/icons/download.d.ts +5 -0
- package/types/icons/drag.d.ts +5 -0
- package/types/icons/ellipsis.d.ts +5 -0
- package/types/icons/email.d.ts +5 -0
- package/types/icons/external.d.ts +5 -0
- package/types/icons/filter.d.ts +5 -0
- package/types/icons/flag.d.ts +5 -0
- package/types/icons/google.d.ts +5 -0
- package/types/icons/home.d.ts +5 -0
- package/types/icons/image.d.ts +5 -0
- package/types/icons/italic.d.ts +5 -0
- package/types/icons/link.d.ts +5 -0
- package/types/icons/loader.d.ts +5 -0
- package/types/icons/lock.d.ts +5 -0
- package/types/icons/logo-mark.d.ts +5 -0
- package/types/icons/logo-tagline.d.ts +5 -0
- package/types/icons/map-pin.d.ts +5 -0
- package/types/icons/menu.d.ts +5 -0
- package/types/icons/minus.d.ts +5 -0
- package/types/icons/muted.d.ts +5 -0
- package/types/icons/pause.d.ts +5 -0
- package/types/icons/pencil.d.ts +5 -0
- package/types/icons/play.d.ts +5 -0
- package/types/icons/plus.d.ts +5 -0
- package/types/icons/powered-by.d.ts +5 -0
- package/types/icons/qr-code.d.ts +5 -0
- package/types/icons/queue.d.ts +5 -0
- package/types/icons/refresh.d.ts +5 -0
- package/types/icons/refund.d.ts +5 -0
- package/types/icons/rocket.d.ts +5 -0
- package/types/icons/search.d.ts +5 -0
- package/types/icons/share.d.ts +5 -0
- package/types/icons/shop.d.ts +5 -0
- package/types/icons/sparkles.d.ts +5 -0
- package/types/icons/star.d.ts +5 -0
- package/types/icons/switch.d.ts +5 -0
- package/types/icons/times.d.ts +5 -0
- package/types/icons/trash.d.ts +5 -0
- package/types/icons/underline.d.ts +5 -0
- package/types/icons/upload.d.ts +5 -0
- package/types/icons/volume.d.ts +5 -0
- package/types/icons/warning.d.ts +5 -0
- package/types/input-checkbox.d.ts +14 -0
- package/types/input-group.d.ts +15 -0
- package/types/input-number.d.ts +17 -0
- package/types/input-select.d.ts +19 -0
- package/types/input-text.d.ts +12 -0
- package/types/input-textarea.d.ts +13 -0
- package/types/product.d.ts +21 -0
- package/types/provider-font.d.ts +23 -0
- package/types/styles.d.ts +37 -0
- package/types/video.d.ts +22 -0
- package/types/wrapper-gradient.d.ts +17 -0
package/dist/product.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
product_default
|
|
4
|
+
} from "./chunk-GUSVATKJ.mjs";
|
|
5
|
+
import "./chunk-2ZYGRSSA.mjs";
|
|
6
|
+
import "./chunk-XWELEL6Z.mjs";
|
|
7
|
+
import "./chunk-7ZLMDYBR.mjs";
|
|
8
|
+
import "./chunk-Q3UIVGPQ.mjs";
|
|
9
|
+
import "./chunk-BD3TDNJE.mjs";
|
|
10
|
+
import "./chunk-FYA7EAMR.mjs";
|
|
11
|
+
import "./chunk-FJXG3REN.mjs";
|
|
12
|
+
export {
|
|
13
|
+
product_default as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// components/provider-font.js
|
|
20
|
+
var provider_font_exports = {};
|
|
21
|
+
__export(provider_font_exports, {
|
|
22
|
+
default: () => provider_font_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(provider_font_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
var defaults = {
|
|
28
|
+
family: "Roboto Flex",
|
|
29
|
+
transform: "none"
|
|
30
|
+
};
|
|
31
|
+
var toWeight = (value) => {
|
|
32
|
+
var _a;
|
|
33
|
+
if (value.includes("italic")) return (_a = value.match(/^\d+/)) == null ? void 0 : _a[0];
|
|
34
|
+
if (value.includes("regular")) return "normal";
|
|
35
|
+
return value;
|
|
36
|
+
};
|
|
37
|
+
var ProviderFont = (0, import_react.memo)(({
|
|
38
|
+
body,
|
|
39
|
+
children,
|
|
40
|
+
heading,
|
|
41
|
+
onError
|
|
42
|
+
}) => {
|
|
43
|
+
const { url, fonts } = (0, import_react.useMemo)(
|
|
44
|
+
() => {
|
|
45
|
+
const bodyFamily = (body == null ? void 0 : body.family) || defaults.family;
|
|
46
|
+
const headingFamily = (heading == null ? void 0 : heading.family) || defaults.family;
|
|
47
|
+
const same = headingFamily === bodyFamily;
|
|
48
|
+
const url2 = [
|
|
49
|
+
"https://fonts.googleapis.com/css?family=" + bodyFamily.replace(/ /g, "+")
|
|
50
|
+
];
|
|
51
|
+
const fonts2 = {
|
|
52
|
+
body: {
|
|
53
|
+
fontFamily: '"' + bodyFamily + '"',
|
|
54
|
+
textTransform: (body == null ? void 0 : body.transform) || defaults.transform
|
|
55
|
+
},
|
|
56
|
+
heading: {
|
|
57
|
+
fontFamily: '"' + headingFamily + '"',
|
|
58
|
+
textTransform: (heading == null ? void 0 : heading.transform) || defaults.transform
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
if (body == null ? void 0 : body.weight) {
|
|
62
|
+
url2.push(":" + body.weight);
|
|
63
|
+
fonts2.body.fontWeight = toWeight(body.weight);
|
|
64
|
+
}
|
|
65
|
+
if (!same) {
|
|
66
|
+
url2.push("%7C" + headingFamily.replace(/ /g, "+"));
|
|
67
|
+
}
|
|
68
|
+
if (heading == null ? void 0 : heading.weight) {
|
|
69
|
+
url2.push((same ? "," : ":") + heading.weight);
|
|
70
|
+
fonts2.heading.fontWeight = toWeight(heading.weight);
|
|
71
|
+
}
|
|
72
|
+
url2.push("&display=swap");
|
|
73
|
+
return { url: url2, fonts: fonts2 };
|
|
74
|
+
},
|
|
75
|
+
[body, heading]
|
|
76
|
+
);
|
|
77
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
|
+
"link",
|
|
80
|
+
{
|
|
81
|
+
...{
|
|
82
|
+
href: url.join(""),
|
|
83
|
+
rel: "stylesheet",
|
|
84
|
+
...onError && {
|
|
85
|
+
onError
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
children(fonts)
|
|
91
|
+
] });
|
|
92
|
+
});
|
|
93
|
+
ProviderFont.displayName = "ProviderFont";
|
|
94
|
+
var provider_font_default = ProviderFont;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// components/provider-font.js
|
|
2
|
+
import { Fragment, memo, useMemo } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
var defaults = {
|
|
5
|
+
family: "Roboto Flex",
|
|
6
|
+
transform: "none"
|
|
7
|
+
};
|
|
8
|
+
var toWeight = (value) => {
|
|
9
|
+
var _a;
|
|
10
|
+
if (value.includes("italic")) return (_a = value.match(/^\d+/)) == null ? void 0 : _a[0];
|
|
11
|
+
if (value.includes("regular")) return "normal";
|
|
12
|
+
return value;
|
|
13
|
+
};
|
|
14
|
+
var ProviderFont = memo(({
|
|
15
|
+
body,
|
|
16
|
+
children,
|
|
17
|
+
heading,
|
|
18
|
+
onError
|
|
19
|
+
}) => {
|
|
20
|
+
const { url, fonts } = useMemo(
|
|
21
|
+
() => {
|
|
22
|
+
const bodyFamily = (body == null ? void 0 : body.family) || defaults.family;
|
|
23
|
+
const headingFamily = (heading == null ? void 0 : heading.family) || defaults.family;
|
|
24
|
+
const same = headingFamily === bodyFamily;
|
|
25
|
+
const url2 = [
|
|
26
|
+
"https://fonts.googleapis.com/css?family=" + bodyFamily.replace(/ /g, "+")
|
|
27
|
+
];
|
|
28
|
+
const fonts2 = {
|
|
29
|
+
body: {
|
|
30
|
+
fontFamily: '"' + bodyFamily + '"',
|
|
31
|
+
textTransform: (body == null ? void 0 : body.transform) || defaults.transform
|
|
32
|
+
},
|
|
33
|
+
heading: {
|
|
34
|
+
fontFamily: '"' + headingFamily + '"',
|
|
35
|
+
textTransform: (heading == null ? void 0 : heading.transform) || defaults.transform
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
if (body == null ? void 0 : body.weight) {
|
|
39
|
+
url2.push(":" + body.weight);
|
|
40
|
+
fonts2.body.fontWeight = toWeight(body.weight);
|
|
41
|
+
}
|
|
42
|
+
if (!same) {
|
|
43
|
+
url2.push("%7C" + headingFamily.replace(/ /g, "+"));
|
|
44
|
+
}
|
|
45
|
+
if (heading == null ? void 0 : heading.weight) {
|
|
46
|
+
url2.push((same ? "," : ":") + heading.weight);
|
|
47
|
+
fonts2.heading.fontWeight = toWeight(heading.weight);
|
|
48
|
+
}
|
|
49
|
+
url2.push("&display=swap");
|
|
50
|
+
return { url: url2, fonts: fonts2 };
|
|
51
|
+
},
|
|
52
|
+
[body, heading]
|
|
53
|
+
);
|
|
54
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
"link",
|
|
57
|
+
{
|
|
58
|
+
...{
|
|
59
|
+
href: url.join(""),
|
|
60
|
+
rel: "stylesheet",
|
|
61
|
+
...onError && {
|
|
62
|
+
onError
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
children(fonts)
|
|
68
|
+
] });
|
|
69
|
+
});
|
|
70
|
+
ProviderFont.displayName = "ProviderFont";
|
|
71
|
+
var provider_font_default = ProviderFont;
|
|
72
|
+
export {
|
|
73
|
+
provider_font_default as default
|
|
74
|
+
};
|
package/dist/styles.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// components/styles.js
|
|
20
|
+
var styles_exports = {};
|
|
21
|
+
__export(styles_exports, {
|
|
22
|
+
backgroundStyle: () => backgroundStyle,
|
|
23
|
+
borderStyle: () => borderStyle,
|
|
24
|
+
buttonStyle: () => buttonStyle,
|
|
25
|
+
closeStyle: () => closeStyle,
|
|
26
|
+
headerStyle: () => headerStyle,
|
|
27
|
+
inputCheckboxStyle: () => inputCheckboxStyle,
|
|
28
|
+
inputNameStyle: () => inputNameStyle,
|
|
29
|
+
inputPhoneStyle: () => inputPhoneStyle,
|
|
30
|
+
inputStyle: () => inputStyle,
|
|
31
|
+
menuStyle: () => menuStyle,
|
|
32
|
+
selectStyle: () => selectStyle,
|
|
33
|
+
textStyle: () => textStyle
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(styles_exports);
|
|
36
|
+
var backgroundStyle = (style) => {
|
|
37
|
+
var _a, _b, _c, _d;
|
|
38
|
+
return {
|
|
39
|
+
backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
|
|
40
|
+
color: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
var borderStyle = (style) => {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
return {
|
|
46
|
+
borderColor: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
var buttonStyle = (style) => {
|
|
50
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
51
|
+
return {
|
|
52
|
+
backgroundColor: ((_c = (_b = (_a = style == null ? void 0 : style.button) == null ? void 0 : _a.background) == null ? void 0 : _b.color) == null ? void 0 : _c.rgb) || ((_e = (_d = style == null ? void 0 : style.text) == null ? void 0 : _d.color) == null ? void 0 : _e.rgb),
|
|
53
|
+
borderColor: ((_h = (_g = (_f = style == null ? void 0 : style.button) == null ? void 0 : _f.background) == null ? void 0 : _g.color) == null ? void 0 : _h.rgb) || ((_j = (_i = style == null ? void 0 : style.text) == null ? void 0 : _i.color) == null ? void 0 : _j.rgb),
|
|
54
|
+
borderRadius: ((_k = style == null ? void 0 : style.button) == null ? void 0 : _k.radius) != null ? style.button.radius / 4 + "px" : void 0,
|
|
55
|
+
color: ((_n = (_m = (_l = style == null ? void 0 : style.button) == null ? void 0 : _l.text) == null ? void 0 : _m.color) == null ? void 0 : _n.rgb) || ((_p = (_o = style == null ? void 0 : style.background) == null ? void 0 : _o.color) == null ? void 0 : _p.rgb)
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
var closeStyle = (style) => {
|
|
59
|
+
var _a, _b, _c, _d;
|
|
60
|
+
return {
|
|
61
|
+
backgroundColor: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
|
|
62
|
+
color: (_d = (_c = style == null ? void 0 : style.background) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
var headerStyle = (style) => {
|
|
66
|
+
var _a, _b, _c;
|
|
67
|
+
return {
|
|
68
|
+
fontFamily: (_a = style == null ? void 0 : style.heading) == null ? void 0 : _a.family,
|
|
69
|
+
fontWeight: (_b = style == null ? void 0 : style.heading) == null ? void 0 : _b.weight,
|
|
70
|
+
textTransform: (_c = style == null ? void 0 : style.heading) == null ? void 0 : _c.transform
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
var inputStyle = (style) => {
|
|
74
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
75
|
+
return {
|
|
76
|
+
backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
|
|
77
|
+
borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
|
|
78
|
+
borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
|
|
79
|
+
color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
var inputCheckboxStyle = (style) => {
|
|
83
|
+
var _a;
|
|
84
|
+
return {
|
|
85
|
+
...inputStyle(style),
|
|
86
|
+
borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? Math.min(style.input.radius / 4, 6) + "px" : void 0
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
var inputNameStyle = (style) => inputStyle(style);
|
|
90
|
+
var inputPhoneStyle = (style) => inputStyle(style);
|
|
91
|
+
var menuStyle = (style) => {
|
|
92
|
+
var _a, _b, _c, _d, _e, _f;
|
|
93
|
+
return {
|
|
94
|
+
backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
|
|
95
|
+
borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
|
|
96
|
+
color: (_f = (_e = style == null ? void 0 : style.text) == null ? void 0 : _e.color) == null ? void 0 : _f.rgb
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
var selectStyle = (style) => {
|
|
100
|
+
var _a, _b, _c, _d, _e, _f;
|
|
101
|
+
return {
|
|
102
|
+
borderColor: (_c = (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) == null ? void 0 : _c.replace(")", ", 0.3)"),
|
|
103
|
+
borderRadius: ((_d = style == null ? void 0 : style.input) == null ? void 0 : _d.radius) != null ? style.input.radius / 4 + "px" : void 0,
|
|
104
|
+
color: (_f = (_e = style == null ? void 0 : style.text) == null ? void 0 : _e.color) == null ? void 0 : _f.rgb
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
var textStyle = (style) => {
|
|
108
|
+
var _a, _b;
|
|
109
|
+
return {
|
|
110
|
+
color: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
114
|
+
0 && (module.exports = {
|
|
115
|
+
backgroundStyle,
|
|
116
|
+
borderStyle,
|
|
117
|
+
buttonStyle,
|
|
118
|
+
closeStyle,
|
|
119
|
+
headerStyle,
|
|
120
|
+
inputCheckboxStyle,
|
|
121
|
+
inputNameStyle,
|
|
122
|
+
inputPhoneStyle,
|
|
123
|
+
inputStyle,
|
|
124
|
+
menuStyle,
|
|
125
|
+
selectStyle,
|
|
126
|
+
textStyle
|
|
127
|
+
});
|
package/dist/styles.mjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
backgroundStyle,
|
|
3
|
+
borderStyle,
|
|
4
|
+
buttonStyle,
|
|
5
|
+
closeStyle,
|
|
6
|
+
headerStyle,
|
|
7
|
+
inputCheckboxStyle,
|
|
8
|
+
inputNameStyle,
|
|
9
|
+
inputPhoneStyle,
|
|
10
|
+
inputStyle,
|
|
11
|
+
menuStyle,
|
|
12
|
+
selectStyle,
|
|
13
|
+
textStyle
|
|
14
|
+
} from "./chunk-FJXG3REN.mjs";
|
|
15
|
+
export {
|
|
16
|
+
backgroundStyle,
|
|
17
|
+
borderStyle,
|
|
18
|
+
buttonStyle,
|
|
19
|
+
closeStyle,
|
|
20
|
+
headerStyle,
|
|
21
|
+
inputCheckboxStyle,
|
|
22
|
+
inputNameStyle,
|
|
23
|
+
inputPhoneStyle,
|
|
24
|
+
inputStyle,
|
|
25
|
+
menuStyle,
|
|
26
|
+
selectStyle,
|
|
27
|
+
textStyle
|
|
28
|
+
};
|
package/dist/video.js
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// components/video.js
|
|
31
|
+
var video_exports = {};
|
|
32
|
+
__export(video_exports, {
|
|
33
|
+
default: () => video_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(video_exports);
|
|
36
|
+
var import_dynamic = __toESM(require("next/dynamic"));
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
|
|
39
|
+
// components/icons/loader.js
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
+
var Loader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
42
|
+
"svg",
|
|
43
|
+
{
|
|
44
|
+
...{
|
|
45
|
+
fill: "none",
|
|
46
|
+
stroke: "none",
|
|
47
|
+
strokeWidth: 0,
|
|
48
|
+
viewBox: "0 0 24 24",
|
|
49
|
+
className: ["animate-spin", className].filter(Boolean).join(" "),
|
|
50
|
+
...props
|
|
51
|
+
},
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
"circle",
|
|
55
|
+
{
|
|
56
|
+
...{
|
|
57
|
+
className: "opacity-25",
|
|
58
|
+
cx: 12,
|
|
59
|
+
cy: 12,
|
|
60
|
+
r: 10,
|
|
61
|
+
stroke: "currentColor",
|
|
62
|
+
strokeWidth: 4
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
67
|
+
"path",
|
|
68
|
+
{
|
|
69
|
+
...{
|
|
70
|
+
className: "opacity-75",
|
|
71
|
+
fill: "currentColor",
|
|
72
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
var loader_default = Loader;
|
|
80
|
+
|
|
81
|
+
// components/video.js
|
|
82
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
83
|
+
var ReactPlayer = (0, import_dynamic.default)(
|
|
84
|
+
() => import("react-player/lazy"),
|
|
85
|
+
{
|
|
86
|
+
ssr: false
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
var Video = ({
|
|
90
|
+
className,
|
|
91
|
+
controls = false,
|
|
92
|
+
loop = false,
|
|
93
|
+
onEnded = () => {
|
|
94
|
+
},
|
|
95
|
+
onDuration = () => {
|
|
96
|
+
},
|
|
97
|
+
onTime,
|
|
98
|
+
muted = true,
|
|
99
|
+
onPlay,
|
|
100
|
+
playing = false,
|
|
101
|
+
poster,
|
|
102
|
+
reset = false,
|
|
103
|
+
style = {},
|
|
104
|
+
hls,
|
|
105
|
+
mp4
|
|
106
|
+
}) => {
|
|
107
|
+
var _a, _b;
|
|
108
|
+
const durationFired = (0, import_react.useRef)(false);
|
|
109
|
+
const [player, setPlayer] = (0, import_react.useState)();
|
|
110
|
+
const [videoUrl, setVideoUrl] = (0, import_react.useState)(hls ? hls : mp4);
|
|
111
|
+
(0, import_react.useEffect)(
|
|
112
|
+
() => {
|
|
113
|
+
if (player && reset) {
|
|
114
|
+
player.seekTo(0, "seconds");
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
[player, reset]
|
|
118
|
+
);
|
|
119
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
|
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
121
|
+
ReactPlayer,
|
|
122
|
+
{
|
|
123
|
+
...{
|
|
124
|
+
className: "relative react-video",
|
|
125
|
+
controls,
|
|
126
|
+
config: {
|
|
127
|
+
file: {
|
|
128
|
+
attributes: {
|
|
129
|
+
"aria-label": "Decorative Video",
|
|
130
|
+
poster
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
height: "100%",
|
|
135
|
+
loop,
|
|
136
|
+
muted,
|
|
137
|
+
onPlay,
|
|
138
|
+
onEnded,
|
|
139
|
+
onDuration: (value) => {
|
|
140
|
+
if (!durationFired.current) {
|
|
141
|
+
durationFired.current = true;
|
|
142
|
+
onDuration(value);
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
onProgress: ({ playedSeconds }) => {
|
|
146
|
+
onTime == null ? void 0 : onTime(playedSeconds);
|
|
147
|
+
},
|
|
148
|
+
onSeek: (seconds) => {
|
|
149
|
+
onTime == null ? void 0 : onTime(seconds);
|
|
150
|
+
},
|
|
151
|
+
progressInterval: 100,
|
|
152
|
+
onError: () => {
|
|
153
|
+
setVideoUrl(mp4);
|
|
154
|
+
},
|
|
155
|
+
onReady: (instance) => {
|
|
156
|
+
setPlayer(instance.player);
|
|
157
|
+
},
|
|
158
|
+
playing: Boolean(playing),
|
|
159
|
+
playsinline: true,
|
|
160
|
+
url: videoUrl,
|
|
161
|
+
width: "100%"
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
),
|
|
165
|
+
!player && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
...{
|
|
169
|
+
className: "w-full h-full flex justify-center items-center"
|
|
170
|
+
},
|
|
171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
172
|
+
loader_default,
|
|
173
|
+
{
|
|
174
|
+
...{
|
|
175
|
+
className: "w-10 h-10 animate-spin",
|
|
176
|
+
style: {
|
|
177
|
+
color: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.hex
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
] });
|
|
185
|
+
return className ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
186
|
+
"div",
|
|
187
|
+
{
|
|
188
|
+
...{
|
|
189
|
+
className
|
|
190
|
+
},
|
|
191
|
+
children: inner
|
|
192
|
+
}
|
|
193
|
+
) : inner;
|
|
194
|
+
};
|
|
195
|
+
var video_default = Video;
|
package/dist/video.mjs
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
loader_default
|
|
4
|
+
} from "./chunk-2ZYGRSSA.mjs";
|
|
5
|
+
|
|
6
|
+
// components/video.js
|
|
7
|
+
import dynamic from "next/dynamic";
|
|
8
|
+
import { Fragment, useEffect, useRef, useState } from "react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var ReactPlayer = dynamic(
|
|
11
|
+
() => import("react-player/lazy"),
|
|
12
|
+
{
|
|
13
|
+
ssr: false
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
var Video = ({
|
|
17
|
+
className,
|
|
18
|
+
controls = false,
|
|
19
|
+
loop = false,
|
|
20
|
+
onEnded = () => {
|
|
21
|
+
},
|
|
22
|
+
onDuration = () => {
|
|
23
|
+
},
|
|
24
|
+
onTime,
|
|
25
|
+
muted = true,
|
|
26
|
+
onPlay,
|
|
27
|
+
playing = false,
|
|
28
|
+
poster,
|
|
29
|
+
reset = false,
|
|
30
|
+
style = {},
|
|
31
|
+
hls,
|
|
32
|
+
mp4
|
|
33
|
+
}) => {
|
|
34
|
+
var _a, _b;
|
|
35
|
+
const durationFired = useRef(false);
|
|
36
|
+
const [player, setPlayer] = useState();
|
|
37
|
+
const [videoUrl, setVideoUrl] = useState(hls ? hls : mp4);
|
|
38
|
+
useEffect(
|
|
39
|
+
() => {
|
|
40
|
+
if (player && reset) {
|
|
41
|
+
player.seekTo(0, "seconds");
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
[player, reset]
|
|
45
|
+
);
|
|
46
|
+
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
ReactPlayer,
|
|
49
|
+
{
|
|
50
|
+
...{
|
|
51
|
+
className: "relative react-video",
|
|
52
|
+
controls,
|
|
53
|
+
config: {
|
|
54
|
+
file: {
|
|
55
|
+
attributes: {
|
|
56
|
+
"aria-label": "Decorative Video",
|
|
57
|
+
poster
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
height: "100%",
|
|
62
|
+
loop,
|
|
63
|
+
muted,
|
|
64
|
+
onPlay,
|
|
65
|
+
onEnded,
|
|
66
|
+
onDuration: (value) => {
|
|
67
|
+
if (!durationFired.current) {
|
|
68
|
+
durationFired.current = true;
|
|
69
|
+
onDuration(value);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
onProgress: ({ playedSeconds }) => {
|
|
73
|
+
onTime == null ? void 0 : onTime(playedSeconds);
|
|
74
|
+
},
|
|
75
|
+
onSeek: (seconds) => {
|
|
76
|
+
onTime == null ? void 0 : onTime(seconds);
|
|
77
|
+
},
|
|
78
|
+
progressInterval: 100,
|
|
79
|
+
onError: () => {
|
|
80
|
+
setVideoUrl(mp4);
|
|
81
|
+
},
|
|
82
|
+
onReady: (instance) => {
|
|
83
|
+
setPlayer(instance.player);
|
|
84
|
+
},
|
|
85
|
+
playing: Boolean(playing),
|
|
86
|
+
playsinline: true,
|
|
87
|
+
url: videoUrl,
|
|
88
|
+
width: "100%"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
!player && /* @__PURE__ */ jsx(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
...{
|
|
96
|
+
className: "w-full h-full flex justify-center items-center"
|
|
97
|
+
},
|
|
98
|
+
children: /* @__PURE__ */ jsx(
|
|
99
|
+
loader_default,
|
|
100
|
+
{
|
|
101
|
+
...{
|
|
102
|
+
className: "w-10 h-10 animate-spin",
|
|
103
|
+
style: {
|
|
104
|
+
color: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.hex
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] });
|
|
112
|
+
return className ? /* @__PURE__ */ jsx(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
...{
|
|
116
|
+
className
|
|
117
|
+
},
|
|
118
|
+
children: inner
|
|
119
|
+
}
|
|
120
|
+
) : inner;
|
|
121
|
+
};
|
|
122
|
+
var video_default = Video;
|
|
123
|
+
export {
|
|
124
|
+
video_default as default
|
|
125
|
+
};
|