@drawbridge/components 0.1.36 → 0.1.37
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/components/styles.css +355 -68
- package/dist/advertisement.js +20 -15
- package/dist/advertisement.mjs +20 -15
- package/dist/bridge/advertisements.js +2 -4
- package/dist/bridge/advertisements.mjs +3 -5
- package/dist/bridge/fields.js +6 -89
- package/dist/bridge/fields.mjs +7 -89
- package/dist/bridge/form-subdomain-embed.js +1 -5
- package/dist/bridge/form-subdomain-embed.mjs +1 -5
- package/dist/bridge/form-subdomain-header.js +14 -21
- package/dist/bridge/form-subdomain-header.mjs +14 -20
- package/dist/bridge/form-subdomain-issue.js +8 -17
- package/dist/bridge/form-subdomain-issue.mjs +8 -17
- package/dist/bridge/form-subdomain-missions.js +52 -58
- package/dist/bridge/form-subdomain-missions.mjs +54 -60
- package/dist/bridge/form-subdomain.js +94 -223
- package/dist/bridge/form-subdomain.mjs +96 -222
- package/dist/bridge/lib/entry.js +6 -61
- package/dist/bridge/lib/entry.mjs +5 -51
- package/dist/bridge/lib/order.js +0 -23
- package/dist/bridge/lib/order.mjs +0 -20
- package/dist/bridge/template-layout.js +2 -5
- package/dist/bridge/template-layout.mjs +3 -6
- package/dist/bridge/template-modal.js +15 -82
- package/dist/bridge/template-modal.mjs +16 -83
- package/dist/bridge/template-preview.js +208 -0
- package/dist/bridge/template-preview.mjs +173 -0
- package/dist/bridge/template-subdomain-gallery.js +75 -126
- package/dist/bridge/template-subdomain-gallery.mjs +75 -122
- package/dist/bridge/template-subdomain.js +14 -16
- package/dist/bridge/template-subdomain.mjs +15 -17
- package/dist/dashboard/avatar.js +0 -5
- package/dist/dashboard/avatar.mjs +0 -5
- package/dist/dashboard/card-affiliate.js +2 -3
- package/dist/dashboard/card-affiliate.mjs +2 -3
- package/dist/dashboard/card-campaign-switch.js +9 -34
- package/dist/dashboard/card-campaign-switch.mjs +8 -32
- package/dist/dashboard/card-connection.js +91 -51
- package/dist/dashboard/card-connection.mjs +89 -50
- package/dist/dashboard/card-order.js +14 -6
- package/dist/dashboard/card-order.mjs +14 -6
- package/dist/dashboard/card-section.js +26 -69
- package/dist/dashboard/card-section.mjs +26 -65
- package/dist/dashboard/card-tile.js +35 -3
- package/dist/dashboard/card-tile.mjs +34 -3
- package/dist/dashboard/device.js +95 -0
- package/dist/dashboard/device.mjs +72 -0
- package/dist/dashboard/drawer-subscription.js +14 -52
- package/dist/dashboard/drawer-subscription.mjs +14 -52
- package/dist/dashboard/drawer.js +3 -20
- package/dist/dashboard/drawer.mjs +4 -21
- package/dist/dashboard/dropdown.js +2 -6
- package/dist/dashboard/dropdown.mjs +2 -6
- package/dist/dashboard/form-admin-subscription-custom.js +8 -72
- package/dist/dashboard/form-admin-subscription-custom.mjs +8 -72
- package/dist/dashboard/form-ai.js +148 -0
- package/dist/dashboard/form-ai.mjs +148 -1
- package/dist/dashboard/form-filters-analytics.js +62 -85
- package/dist/dashboard/form-filters-analytics.mjs +61 -85
- package/dist/dashboard/form-organization-brand.js +13 -30
- package/dist/dashboard/form-organization-brand.mjs +13 -30
- package/dist/dashboard/form-organization-campaign-advertisement.js +112 -38
- package/dist/dashboard/form-organization-campaign-advertisement.mjs +112 -38
- package/dist/dashboard/form-organization-campaign-agreement.js +210 -402
- package/dist/dashboard/form-organization-campaign-agreement.mjs +211 -398
- package/dist/dashboard/form-organization-campaign-field-list.js +425 -0
- package/dist/dashboard/form-organization-campaign-field-list.mjs +396 -0
- package/dist/dashboard/form-organization-campaign-field-number.js +7 -48
- package/dist/dashboard/form-organization-campaign-field-number.mjs +7 -48
- package/dist/dashboard/form-organization-campaign-field-select.js +4 -15
- package/dist/dashboard/form-organization-campaign-field-select.mjs +4 -15
- package/dist/dashboard/form-organization-campaign-field-text.js +6 -46
- package/dist/dashboard/form-organization-campaign-field-text.mjs +6 -46
- package/dist/dashboard/form-organization-campaign-field-textarea.js +13 -22
- package/dist/dashboard/form-organization-campaign-field-textarea.mjs +13 -22
- package/dist/dashboard/form-organization-campaign-integration-age.js +35 -2
- package/dist/dashboard/form-organization-campaign-integration-age.mjs +35 -2
- package/dist/dashboard/form-organization-campaign-integration-geocode.js +1 -4
- package/dist/dashboard/form-organization-campaign-integration-geocode.mjs +1 -4
- package/dist/dashboard/form-organization-campaign-page-embed.js +1 -1
- package/dist/dashboard/form-organization-campaign-page-embed.mjs +1 -1
- package/dist/dashboard/form-organization-campaign-page-preview.js +2 -1
- package/dist/dashboard/form-organization-campaign-page-preview.mjs +2 -1
- package/dist/dashboard/form-organization-campaign-page-qr.js +2 -2
- package/dist/dashboard/form-organization-campaign-page-qr.mjs +2 -2
- package/dist/dashboard/form-organization-campaign-page-share.js +5 -5
- package/dist/dashboard/form-organization-campaign-page-share.mjs +5 -5
- package/dist/dashboard/form-organization-campaign-page-slug.js +3 -2
- package/dist/dashboard/form-organization-campaign-page-slug.mjs +3 -2
- package/dist/dashboard/form-organization-campaign-page.js +265 -168
- package/dist/dashboard/form-organization-campaign-page.mjs +266 -170
- package/dist/dashboard/form-organization-campaign-section.js +107 -125
- package/dist/dashboard/form-organization-campaign-section.mjs +107 -121
- package/dist/dashboard/form-organization-campaign.js +9 -119
- package/dist/dashboard/form-organization-campaign.mjs +9 -118
- package/dist/dashboard/form-organization-file-frame.js +1 -7
- package/dist/dashboard/form-organization-file-frame.mjs +1 -7
- package/dist/dashboard/form-organization-workflow.js +545 -589
- package/dist/dashboard/form-organization-workflow.mjs +545 -590
- package/dist/dashboard/form-organization.js +0 -22
- package/dist/dashboard/form-organization.mjs +0 -22
- package/dist/dashboard/form-verify-prize.js +34 -114
- package/dist/dashboard/form-verify-prize.mjs +34 -111
- package/dist/dashboard/google.js +1 -8
- package/dist/dashboard/google.mjs +1 -8
- package/dist/dashboard/input-array.js +0 -2
- package/dist/dashboard/input-array.mjs +0 -2
- package/dist/dashboard/input-combobox.js +9 -0
- package/dist/dashboard/input-combobox.mjs +9 -0
- package/dist/dashboard/input-date.js +8 -3
- package/dist/dashboard/input-date.mjs +8 -3
- package/dist/dashboard/input-editor.js +6 -17
- package/dist/dashboard/input-editor.mjs +6 -17
- package/dist/dashboard/input-fields.js +437 -287
- package/dist/dashboard/input-fields.mjs +436 -287
- package/dist/dashboard/input-file.js +2 -70
- package/dist/dashboard/input-file.mjs +2 -70
- package/dist/dashboard/input-font.js +55 -64
- package/dist/dashboard/input-font.mjs +55 -64
- package/dist/dashboard/input-resource.js +1 -4
- package/dist/dashboard/input-resource.mjs +1 -4
- package/dist/dashboard/item-row.js +92 -0
- package/dist/dashboard/item-row.mjs +63 -0
- package/dist/dashboard/lib/features.js +1 -1
- package/dist/dashboard/lib/features.mjs +1 -1
- package/dist/dashboard/lib/item-list.js +15 -0
- package/dist/dashboard/lib/item-list.mjs +14 -0
- package/dist/dashboard/lib/rail.js +17 -16
- package/dist/dashboard/lib/rail.mjs +16 -15
- package/dist/dashboard/lib/sms.js +2 -8
- package/dist/dashboard/lib/sms.mjs +1 -6
- package/dist/dashboard/list-resource.js +0 -2
- package/dist/dashboard/list-resource.mjs +0 -2
- package/dist/dashboard/menu.js +5 -54
- package/dist/dashboard/menu.mjs +5 -53
- package/dist/dashboard/modal.js +4 -19
- package/dist/dashboard/modal.mjs +5 -20
- package/dist/dashboard/order-sections.js +0 -4
- package/dist/dashboard/order-sections.mjs +0 -4
- package/dist/dashboard/preview.js +324 -838
- package/dist/dashboard/preview.mjs +324 -826
- package/dist/dashboard/provider-ui.js +12 -20
- package/dist/dashboard/provider-ui.mjs +13 -21
- package/dist/dashboard/recharts.js +28 -53
- package/dist/dashboard/recharts.mjs +28 -53
- package/dist/dashboard/swatch.js +0 -35
- package/dist/dashboard/swatch.mjs +0 -31
- package/dist/dashboard/table-contacts.js +10 -6
- package/dist/dashboard/table-contacts.mjs +10 -6
- package/dist/dashboard/table.js +3 -10
- package/dist/dashboard/table.mjs +3 -9
- package/dist/dashboard/template-dashboard.js +21 -13
- package/dist/dashboard/template-dashboard.mjs +21 -12
- package/dist/dashboard/template-rail.js +126 -198
- package/dist/dashboard/template-rail.mjs +125 -196
- package/dist/dashboard/template-socket.js +12 -0
- package/dist/dashboard/template-socket.mjs +12 -0
- package/dist/dashboard/template-ui.js +11 -20
- package/dist/dashboard/template-ui.mjs +13 -22
- package/dist/input-checkbox.js +1 -7
- package/dist/input-checkbox.mjs +1 -7
- package/dist/input-name.js +3 -3
- package/dist/input-name.mjs +3 -3
- package/dist/input-select.js +1 -3
- package/dist/input-select.mjs +1 -3
- package/dist/provider-font.js +3 -4
- package/dist/provider-font.mjs +3 -4
- package/dist/shared/badge.js +0 -15
- package/dist/shared/badge.mjs +0 -11
- package/dist/shared/carousel.js +7 -11
- package/dist/shared/carousel.mjs +7 -11
- package/dist/shared/lib/campaign.js +9 -3
- package/dist/shared/lib/campaign.mjs +9 -3
- package/dist/shared/lib/helpers.js +0 -24
- package/dist/shared/lib/helpers.mjs +0 -22
- package/dist/shared/lib/video.js +0 -6
- package/dist/shared/lib/video.mjs +0 -5
- package/dist/shared/sortable.js +10 -27
- package/dist/shared/sortable.mjs +10 -27
- package/dist/shared/tabs.js +1 -1
- package/dist/shared/tabs.mjs +1 -1
- package/dist/video.js +9 -127
- package/dist/video.mjs +11 -125
- package/package.json +20 -176
- package/types/bridge/fields.d.ts +1 -6
- package/types/bridge/form-subdomain-missions.d.ts +0 -2
- package/types/bridge/form-subdomain.d.ts +3 -62
- package/types/bridge/lib/entry.d.ts +7 -44
- package/types/bridge/lib/order.d.ts +2 -13
- package/types/bridge/subdomain-content.d.ts +0 -1
- package/types/bridge/template-preview.d.ts +10 -0
- package/types/bridge/template-subdomain-gallery.d.ts +1 -13
- package/types/dashboard/card-campaign-switch.d.ts +1 -20
- package/types/dashboard/card-connection.d.ts +8 -0
- package/types/dashboard/card-order.d.ts +2 -2
- package/types/dashboard/card-section.d.ts +1 -9
- package/types/dashboard/card-tile.d.ts +9 -4
- package/types/dashboard/device.d.ts +12 -0
- package/types/dashboard/drawer.d.ts +0 -3
- package/types/dashboard/form-ai.d.ts +17 -0
- package/types/dashboard/form-filters-analytics.d.ts +14 -0
- package/types/dashboard/form-organization-brand.d.ts +0 -3
- package/types/dashboard/form-organization-campaign-agreement.d.ts +10 -53
- package/types/dashboard/form-organization-campaign-field-list.d.ts +36 -0
- package/types/dashboard/form-organization-campaign-field-number.d.ts +1 -4
- package/types/dashboard/form-organization-campaign-field-select.d.ts +1 -6
- package/types/dashboard/form-organization-campaign-field-text.d.ts +1 -5
- package/types/dashboard/form-organization-campaign-field-textarea.d.ts +1 -4
- package/types/dashboard/form-organization-campaign-integration-age.d.ts +1 -2
- package/types/dashboard/form-organization-campaign-integration-geocode.d.ts +0 -2
- package/types/dashboard/form-organization-campaign-page.d.ts +15 -9
- package/types/dashboard/form-organization-campaign-section.d.ts +8 -24
- package/types/dashboard/form-organization-campaign.d.ts +0 -3
- package/types/dashboard/form-organization-workflow.d.ts +4 -3
- package/types/dashboard/form-organization.d.ts +2 -2
- package/types/dashboard/form-verify-prize.d.ts +3 -30
- package/types/dashboard/input-combobox.d.ts +2 -0
- package/types/dashboard/input-date.d.ts +2 -0
- package/types/dashboard/input-editor.d.ts +0 -9
- package/types/dashboard/input-fields.d.ts +5 -8
- package/types/dashboard/input-file.d.ts +0 -4
- package/types/dashboard/input-resource.d.ts +0 -1
- package/types/dashboard/item-row.d.ts +25 -0
- package/types/dashboard/lib/item-list.d.ts +5 -10
- package/types/dashboard/lib/rail.d.ts +1 -0
- package/types/dashboard/lib/sms.d.ts +0 -7
- package/types/dashboard/modal.d.ts +1 -3
- package/types/dashboard/preview.d.ts +10 -65
- package/types/dashboard/recharts.d.ts +0 -3
- package/types/dashboard/swatch.d.ts +0 -4
- package/types/dashboard/template-dashboard.d.ts +2 -3
- package/types/input-select.d.ts +0 -2
- package/types/shared/button.d.ts +1 -1
- package/types/shared/lib/helpers.d.ts +1 -22
- package/types/shared/lib/video.d.ts +0 -3
- package/types/shared/sortable.d.ts +0 -6
- package/types/video.d.ts +2 -18
- package/dist/bridge/form-subdomain-agreement.js +0 -165
- package/dist/bridge/form-subdomain-agreement.mjs +0 -132
- package/dist/dashboard/campaign-form.js +0 -1798
- package/dist/dashboard/campaign-form.mjs +0 -1769
- package/dist/dashboard/card-campaign-agreement.js +0 -172
- package/dist/dashboard/card-campaign-agreement.mjs +0 -139
- package/dist/dashboard/card-shortcut.js +0 -181
- package/dist/dashboard/card-shortcut.mjs +0 -152
- package/dist/dashboard/document-blocks.js +0 -305
- package/dist/dashboard/document-blocks.mjs +0 -270
- package/dist/dashboard/form-organization-campaign-advertisements.js +0 -374
- package/dist/dashboard/form-organization-campaign-advertisements.mjs +0 -345
- package/dist/dashboard/form-organization-campaign-design.js +0 -258
- package/dist/dashboard/form-organization-campaign-design.mjs +0 -223
- package/dist/dashboard/form-organization-campaign-field-item.js +0 -585
- package/dist/dashboard/form-organization-campaign-field-item.mjs +0 -552
- package/dist/dashboard/form-organization-campaign-field-skill.js +0 -359
- package/dist/dashboard/form-organization-campaign-field-skill.mjs +0 -330
- package/dist/dashboard/form-organization-campaign-footer.js +0 -178
- package/dist/dashboard/form-organization-campaign-footer.mjs +0 -149
- package/dist/dashboard/form-reposition.js +0 -396
- package/dist/dashboard/form-reposition.mjs +0 -359
- package/dist/dashboard/form-support.js +0 -189
- package/dist/dashboard/form-support.mjs +0 -160
- package/dist/dashboard/form-tests.js +0 -683
- package/dist/dashboard/form-tests.mjs +0 -646
- package/dist/dashboard/lib/ab-tests.js +0 -130
- package/dist/dashboard/lib/ab-tests.mjs +0 -94
- package/dist/dashboard/lib/focus.js +0 -93
- package/dist/dashboard/lib/focus.mjs +0 -69
- package/dist/dashboard/lib/form-page.js +0 -203
- package/dist/dashboard/lib/form-page.mjs +0 -155
- package/dist/dashboard/template-design.js +0 -564
- package/dist/dashboard/template-design.mjs +0 -531
- package/dist/dashboard/template-test-page.js +0 -436
- package/dist/dashboard/template-test-page.mjs +0 -407
- package/dist/dashboard/template-tests.js +0 -141
- package/dist/dashboard/template-tests.mjs +0 -112
- package/dist/dashboard/template-variant.js +0 -185
- package/dist/dashboard/template-variant.mjs +0 -156
- package/dist/icons/arrow-down-long.js +0 -47
- package/dist/icons/arrow-down-long.mjs +0 -28
- package/dist/icons/arrows-pointing-out.js +0 -46
- package/dist/icons/arrows-pointing-out.mjs +0 -27
- package/dist/icons/beaker.js +0 -46
- package/dist/icons/beaker.mjs +0 -27
- package/dist/icons/identification.js +0 -46
- package/dist/icons/identification.mjs +0 -27
- package/dist/icons/lifebuoy.js +0 -46
- package/dist/icons/lifebuoy.mjs +0 -27
- package/dist/icons/rectangle-group.js +0 -46
- package/dist/icons/rectangle-group.mjs +0 -27
- package/dist/icons/rectangle-stack.js +0 -46
- package/dist/icons/rectangle-stack.mjs +0 -27
- package/dist/icons/shopping-bag.js +0 -46
- package/dist/icons/shopping-bag.mjs +0 -27
- package/dist/icons/swatch.js +0 -46
- package/dist/icons/swatch.mjs +0 -27
- package/dist/icons/window.js +0 -46
- package/dist/icons/window.mjs +0 -27
- package/dist/icons/zoom-in.js +0 -46
- package/dist/icons/zoom-in.mjs +0 -27
- package/dist/input-answer.js +0 -60
- package/dist/input-answer.mjs +0 -27
- package/dist/shared/document-pieces.js +0 -295
- package/dist/shared/document-pieces.mjs +0 -260
- package/types/bridge/form-subdomain-agreement.d.ts +0 -27
- package/types/dashboard/campaign-form.d.ts +0 -42
- package/types/dashboard/card-campaign-agreement.d.ts +0 -26
- package/types/dashboard/card-shortcut.d.ts +0 -38
- package/types/dashboard/document-blocks.d.ts +0 -14
- package/types/dashboard/form-organization-campaign-advertisements.d.ts +0 -15
- package/types/dashboard/form-organization-campaign-design.d.ts +0 -46
- package/types/dashboard/form-organization-campaign-field-item.d.ts +0 -36
- package/types/dashboard/form-organization-campaign-field-skill.d.ts +0 -36
- package/types/dashboard/form-organization-campaign-footer.d.ts +0 -23
- package/types/dashboard/form-reposition.d.ts +0 -29
- package/types/dashboard/form-support.d.ts +0 -14
- package/types/dashboard/form-tests.d.ts +0 -78
- package/types/dashboard/lib/ab-tests.d.ts +0 -50
- package/types/dashboard/lib/escape.d.ts +0 -4
- package/types/dashboard/lib/focus.d.ts +0 -16
- package/types/dashboard/lib/form-page.d.ts +0 -25
- package/types/dashboard/template-design.d.ts +0 -30
- package/types/dashboard/template-test-page.d.ts +0 -69
- package/types/dashboard/template-tests.d.ts +0 -30
- package/types/dashboard/template-variant.d.ts +0 -18
- package/types/icons/arrow-down-long.d.ts +0 -5
- package/types/icons/arrows-pointing-out.d.ts +0 -5
- package/types/icons/beaker.d.ts +0 -5
- package/types/icons/identification.d.ts +0 -5
- package/types/icons/lifebuoy.d.ts +0 -5
- package/types/icons/rectangle-group.d.ts +0 -5
- package/types/icons/rectangle-stack.d.ts +0 -5
- package/types/icons/shopping-bag.d.ts +0 -5
- package/types/icons/swatch.d.ts +0 -5
- package/types/icons/window.d.ts +0 -5
- package/types/icons/zoom-in.d.ts +0 -5
- package/types/input-answer.d.ts +0 -15
- package/types/shared/document-pieces.d.ts +0 -34
- package/types/shared/lib/motion.d.ts +0 -2
|
@@ -1,81 +1,24 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Children } from "react";
|
|
3
|
-
const Beside = ({
|
|
4
|
-
children,
|
|
5
|
-
preview
|
|
6
|
-
}) => /* @__PURE__ */ jsxs(
|
|
7
|
-
"div",
|
|
8
|
-
{
|
|
9
|
-
...{
|
|
10
|
-
// Never shrunk in the page's column, so the page scrolls.
|
|
11
|
-
className: "grid grid-cols-1 gap-6 items-start shrink-0 xl:grid-cols-2"
|
|
12
|
-
},
|
|
13
|
-
children: [
|
|
14
|
-
/* @__PURE__ */ jsx(
|
|
15
|
-
"div",
|
|
16
|
-
{
|
|
17
|
-
...{
|
|
18
|
-
className: "min-w-0 space-y-6"
|
|
19
|
-
},
|
|
20
|
-
children
|
|
21
|
-
}
|
|
22
|
-
),
|
|
23
|
-
/* @__PURE__ */ jsx(
|
|
24
|
-
"div",
|
|
25
|
-
{
|
|
26
|
-
...{
|
|
27
|
-
className: "min-w-0 order-first xl:order-none xl:sticky xl:top-0"
|
|
28
|
-
},
|
|
29
|
-
children: preview
|
|
30
|
-
}
|
|
31
|
-
)
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
3
|
const CardSection = ({
|
|
36
4
|
children,
|
|
37
5
|
className,
|
|
38
6
|
columns = 1,
|
|
39
7
|
cta,
|
|
40
8
|
title,
|
|
41
|
-
variant = "white",
|
|
42
9
|
...rest
|
|
43
10
|
}) => {
|
|
44
11
|
const classes = [
|
|
45
|
-
"flex flex-col w-full rounded border border-gray
|
|
12
|
+
"flex flex-col w-full bg-white rounded border border-gray",
|
|
13
|
+
// In columns the card does not clip, so a column can stay in view as the
|
|
14
|
+
// page scrolls; and it never shrinks in the page's column.
|
|
15
|
+
columns > 1 ? "shrink-0" : "overflow-hidden"
|
|
46
16
|
];
|
|
47
17
|
const hasHeader = Boolean(title || cta);
|
|
48
|
-
const hasBody = children !== null && children !== void 0 && children !== false;
|
|
49
|
-
const Title = typeof title === "string" ? "p" : "div";
|
|
50
18
|
if (className) {
|
|
51
19
|
classes.push(className);
|
|
52
20
|
}
|
|
53
21
|
;
|
|
54
|
-
if (columns > 1) {
|
|
55
|
-
const [first, ...others] = Children.toArray(children);
|
|
56
|
-
return /* @__PURE__ */ jsx(
|
|
57
|
-
Beside,
|
|
58
|
-
{
|
|
59
|
-
...{
|
|
60
|
-
preview: others
|
|
61
|
-
},
|
|
62
|
-
children: /* @__PURE__ */ jsx(
|
|
63
|
-
CardSection,
|
|
64
|
-
{
|
|
65
|
-
...{
|
|
66
|
-
className,
|
|
67
|
-
cta,
|
|
68
|
-
title,
|
|
69
|
-
variant,
|
|
70
|
-
...rest
|
|
71
|
-
},
|
|
72
|
-
children: first
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
;
|
|
79
22
|
return /* @__PURE__ */ jsxs(
|
|
80
23
|
"div",
|
|
81
24
|
{
|
|
@@ -92,7 +35,7 @@ const CardSection = ({
|
|
|
92
35
|
},
|
|
93
36
|
children: [
|
|
94
37
|
title && /* @__PURE__ */ jsx(
|
|
95
|
-
|
|
38
|
+
"p",
|
|
96
39
|
{
|
|
97
40
|
...{
|
|
98
41
|
className: "text-gray-dark shrink-0"
|
|
@@ -104,7 +47,7 @@ const CardSection = ({
|
|
|
104
47
|
]
|
|
105
48
|
}
|
|
106
49
|
),
|
|
107
|
-
|
|
50
|
+
/* @__PURE__ */ jsx(
|
|
108
51
|
"div",
|
|
109
52
|
{
|
|
110
53
|
...{
|
|
@@ -112,7 +55,26 @@ const CardSection = ({
|
|
|
112
55
|
// overlay) anchors to the content area, not a distant ancestor.
|
|
113
56
|
className: "relative flex-1 min-h-0 p-6" + (hasHeader ? " pt-0" : "")
|
|
114
57
|
},
|
|
115
|
-
children
|
|
58
|
+
children: columns > 1 ? /* @__PURE__ */ jsx(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
...{
|
|
62
|
+
className: "grid grid-cols-1 gap-6 items-start @[976px]:grid-cols-2"
|
|
63
|
+
},
|
|
64
|
+
children: Children.toArray(children).map((child, index) => /* @__PURE__ */ jsx(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
...{
|
|
68
|
+
// The first column ( the form ) runs with the page; the others
|
|
69
|
+
// stay in view beside it while it scrolls.
|
|
70
|
+
className: "min-w-0" + (index ? " @[976px]:sticky @[976px]:top-6" : "")
|
|
71
|
+
},
|
|
72
|
+
children: child
|
|
73
|
+
},
|
|
74
|
+
index
|
|
75
|
+
))
|
|
76
|
+
}
|
|
77
|
+
) : children
|
|
116
78
|
}
|
|
117
79
|
)
|
|
118
80
|
]
|
|
@@ -121,6 +83,5 @@ const CardSection = ({
|
|
|
121
83
|
};
|
|
122
84
|
var card_section_default = CardSection;
|
|
123
85
|
export {
|
|
124
|
-
Beside,
|
|
125
86
|
card_section_default as default
|
|
126
87
|
};
|
|
@@ -28,6 +28,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
28
28
|
var card_tile_exports = {};
|
|
29
29
|
__export(card_tile_exports, {
|
|
30
30
|
TileCampaign: () => TileCampaign,
|
|
31
|
+
TilePage: () => TilePage,
|
|
31
32
|
default: () => card_tile_default
|
|
32
33
|
});
|
|
33
34
|
module.exports = __toCommonJS(card_tile_exports);
|
|
@@ -42,7 +43,6 @@ var import_button = __toESM(require("../shared/button"));
|
|
|
42
43
|
var import_drawbridge_utils = require("@drawbridge/drawbridge-utils");
|
|
43
44
|
var import_cdn = require("@drawbridge/drawbridge-utils/cdn");
|
|
44
45
|
var import_campaign = require("../shared/lib/campaign");
|
|
45
|
-
var import_helpers = require("../shared/lib/helpers");
|
|
46
46
|
const classes = {
|
|
47
47
|
container: [
|
|
48
48
|
"group relative flex w-full h-full p-6 space-x-6 transition duration-200 ease-in @[976px]:aspect-video @[1180px]:space-x-12"
|
|
@@ -187,7 +187,7 @@ const CardTile = ({
|
|
|
187
187
|
var card_tile_default = CardTile;
|
|
188
188
|
const tileImage = (page) => {
|
|
189
189
|
var _a;
|
|
190
|
-
const hero = (
|
|
190
|
+
const hero = ((page == null ? void 0 : page.gallery) || []).find((file) => {
|
|
191
191
|
var _a2;
|
|
192
192
|
return (_a2 = file == null ? void 0 : file.sizes) == null ? void 0 : _a2["1080x1920"];
|
|
193
193
|
});
|
|
@@ -420,7 +420,39 @@ const TileCampaign = ({
|
|
|
420
420
|
}
|
|
421
421
|
);
|
|
422
422
|
};
|
|
423
|
+
const TilePage = ({
|
|
424
|
+
campaign,
|
|
425
|
+
organization,
|
|
426
|
+
page
|
|
427
|
+
}) => {
|
|
428
|
+
var _a, _b, _c, _d, _e, _f;
|
|
429
|
+
const generating = ((_b = (_a = page == null ? void 0 : page.process) == null ? void 0 : _a.ai) == null ? void 0 : _b.status) === "pending";
|
|
430
|
+
const status = (page == null ? void 0 : page.status) || "drafted";
|
|
431
|
+
const description = [
|
|
432
|
+
(0, import_drawbridge_utils.capitalize)(status),
|
|
433
|
+
tileDate(page == null ? void 0 : page.updatedAt)
|
|
434
|
+
].filter(Boolean).join(" \xB7 ");
|
|
435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
436
|
+
TileRecord,
|
|
437
|
+
{
|
|
438
|
+
...{
|
|
439
|
+
description,
|
|
440
|
+
eyebrow: generating ? "Generating page from" : "Most recently updated",
|
|
441
|
+
generating,
|
|
442
|
+
image: tileImage(page),
|
|
443
|
+
manage: "/organizations/" + organization + "/campaigns/" + campaign + "/pages/" + (page == null ? void 0 : page.id),
|
|
444
|
+
percentage: tilePercentage((_d = (_c = page == null ? void 0 : page.process) == null ? void 0 : _c.ai) == null ? void 0 : _d.progress),
|
|
445
|
+
placeholder: process.env.NEXT_PUBLIC_API_URI + "/images/pages.svg",
|
|
446
|
+
// A generating page has no title of its own yet — the pages list
|
|
447
|
+
// falls back to the scraped url the same way.
|
|
448
|
+
title: generating ? (_e = page == null ? void 0 : page.source) == null ? void 0 : _e.url : page == null ? void 0 : page.title,
|
|
449
|
+
view: (_f = page == null ? void 0 : page.share) == null ? void 0 : _f.url
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
);
|
|
453
|
+
};
|
|
423
454
|
// Annotate the CommonJS export names for ESM import in node:
|
|
424
455
|
0 && (module.exports = {
|
|
425
|
-
TileCampaign
|
|
456
|
+
TileCampaign,
|
|
457
|
+
TilePage
|
|
426
458
|
});
|
|
@@ -6,10 +6,9 @@ import External from "../icons/external.mjs";
|
|
|
6
6
|
import Lock from "../icons/lock.mjs";
|
|
7
7
|
import Link from "./link.mjs";
|
|
8
8
|
import Button from "../shared/button.mjs";
|
|
9
|
-
import { formatDateString } from "@drawbridge/drawbridge-utils";
|
|
9
|
+
import { capitalize, formatDateString } from "@drawbridge/drawbridge-utils";
|
|
10
10
|
import { cdnSrc } from "@drawbridge/drawbridge-utils/cdn";
|
|
11
11
|
import { leadCapture } from "../shared/lib/campaign.mjs";
|
|
12
|
-
import { galleryItems } from "../shared/lib/helpers.mjs";
|
|
13
12
|
const classes = {
|
|
14
13
|
container: [
|
|
15
14
|
"group relative flex w-full h-full p-6 space-x-6 transition duration-200 ease-in @[976px]:aspect-video @[1180px]:space-x-12"
|
|
@@ -154,7 +153,7 @@ const CardTile = ({
|
|
|
154
153
|
var card_tile_default = CardTile;
|
|
155
154
|
const tileImage = (page) => {
|
|
156
155
|
var _a;
|
|
157
|
-
const hero =
|
|
156
|
+
const hero = ((page == null ? void 0 : page.gallery) || []).find((file) => {
|
|
158
157
|
var _a2;
|
|
159
158
|
return (_a2 = file == null ? void 0 : file.sizes) == null ? void 0 : _a2["1080x1920"];
|
|
160
159
|
});
|
|
@@ -387,7 +386,39 @@ const TileCampaign = ({
|
|
|
387
386
|
}
|
|
388
387
|
);
|
|
389
388
|
};
|
|
389
|
+
const TilePage = ({
|
|
390
|
+
campaign,
|
|
391
|
+
organization,
|
|
392
|
+
page
|
|
393
|
+
}) => {
|
|
394
|
+
var _a, _b, _c, _d, _e, _f;
|
|
395
|
+
const generating = ((_b = (_a = page == null ? void 0 : page.process) == null ? void 0 : _a.ai) == null ? void 0 : _b.status) === "pending";
|
|
396
|
+
const status = (page == null ? void 0 : page.status) || "drafted";
|
|
397
|
+
const description = [
|
|
398
|
+
capitalize(status),
|
|
399
|
+
tileDate(page == null ? void 0 : page.updatedAt)
|
|
400
|
+
].filter(Boolean).join(" \xB7 ");
|
|
401
|
+
return /* @__PURE__ */ jsx(
|
|
402
|
+
TileRecord,
|
|
403
|
+
{
|
|
404
|
+
...{
|
|
405
|
+
description,
|
|
406
|
+
eyebrow: generating ? "Generating page from" : "Most recently updated",
|
|
407
|
+
generating,
|
|
408
|
+
image: tileImage(page),
|
|
409
|
+
manage: "/organizations/" + organization + "/campaigns/" + campaign + "/pages/" + (page == null ? void 0 : page.id),
|
|
410
|
+
percentage: tilePercentage((_d = (_c = page == null ? void 0 : page.process) == null ? void 0 : _c.ai) == null ? void 0 : _d.progress),
|
|
411
|
+
placeholder: process.env.NEXT_PUBLIC_API_URI + "/images/pages.svg",
|
|
412
|
+
// A generating page has no title of its own yet — the pages list
|
|
413
|
+
// falls back to the scraped url the same way.
|
|
414
|
+
title: generating ? (_e = page == null ? void 0 : page.source) == null ? void 0 : _e.url : page == null ? void 0 : page.title,
|
|
415
|
+
view: (_f = page == null ? void 0 : page.share) == null ? void 0 : _f.url
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
);
|
|
419
|
+
};
|
|
390
420
|
export {
|
|
391
421
|
TileCampaign,
|
|
422
|
+
TilePage,
|
|
392
423
|
card_tile_default as default
|
|
393
424
|
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var device_exports = {};
|
|
20
|
+
__export(device_exports, {
|
|
21
|
+
DEVICE_TYPES: () => DEVICE_TYPES,
|
|
22
|
+
default: () => device_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(device_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
const DEVICE_TYPES = {
|
|
27
|
+
// The phone's page starts below its status bar and island, as it does in Safari.
|
|
28
|
+
phone: { model: "iphone-14-pro", safe: 50, screen: { height: 830, width: 390 }, viewport: 390 },
|
|
29
|
+
tablet: { model: "ipad-pro", screen: { height: 724, width: 506 }, viewport: 768 },
|
|
30
|
+
desktop: { model: "macbook-pro", screen: { height: 375, width: 600 }, viewport: 1440 }
|
|
31
|
+
};
|
|
32
|
+
const PARTS = ["stripe", "header", "sensors", "btns", "power", "home"];
|
|
33
|
+
const Device = ({
|
|
34
|
+
children,
|
|
35
|
+
type = "phone"
|
|
36
|
+
}) => {
|
|
37
|
+
const { model, safe = 0, screen, viewport } = DEVICE_TYPES[type];
|
|
38
|
+
const scale = screen.width / viewport;
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
...{
|
|
43
|
+
className: "device device-" + model
|
|
44
|
+
},
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
...{
|
|
50
|
+
className: "device-frame"
|
|
51
|
+
},
|
|
52
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
...{
|
|
56
|
+
className: "device-screen overflow-hidden bg-white"
|
|
57
|
+
},
|
|
58
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
...{
|
|
62
|
+
// The device's own viewport, scaled into the screen.
|
|
63
|
+
className: "absolute left-0 origin-top-left",
|
|
64
|
+
style: {
|
|
65
|
+
height: (screen.height - safe) / scale,
|
|
66
|
+
top: safe,
|
|
67
|
+
transform: "scale(" + scale + ")",
|
|
68
|
+
width: viewport
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
children
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
PARTS.map((part) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
...{
|
|
82
|
+
className: "device-" + part
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
part
|
|
86
|
+
))
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
var device_default = Device;
|
|
92
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
+
0 && (module.exports = {
|
|
94
|
+
DEVICE_TYPES
|
|
95
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
const DEVICE_TYPES = {
|
|
4
|
+
// The phone's page starts below its status bar and island, as it does in Safari.
|
|
5
|
+
phone: { model: "iphone-14-pro", safe: 50, screen: { height: 830, width: 390 }, viewport: 390 },
|
|
6
|
+
tablet: { model: "ipad-pro", screen: { height: 724, width: 506 }, viewport: 768 },
|
|
7
|
+
desktop: { model: "macbook-pro", screen: { height: 375, width: 600 }, viewport: 1440 }
|
|
8
|
+
};
|
|
9
|
+
const PARTS = ["stripe", "header", "sensors", "btns", "power", "home"];
|
|
10
|
+
const Device = ({
|
|
11
|
+
children,
|
|
12
|
+
type = "phone"
|
|
13
|
+
}) => {
|
|
14
|
+
const { model, safe = 0, screen, viewport } = DEVICE_TYPES[type];
|
|
15
|
+
const scale = screen.width / viewport;
|
|
16
|
+
return /* @__PURE__ */ jsxs(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
...{
|
|
20
|
+
className: "device device-" + model
|
|
21
|
+
},
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
...{
|
|
27
|
+
className: "device-frame"
|
|
28
|
+
},
|
|
29
|
+
children: /* @__PURE__ */ jsx(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
...{
|
|
33
|
+
className: "device-screen overflow-hidden bg-white"
|
|
34
|
+
},
|
|
35
|
+
children: /* @__PURE__ */ jsx(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
...{
|
|
39
|
+
// The device's own viewport, scaled into the screen.
|
|
40
|
+
className: "absolute left-0 origin-top-left",
|
|
41
|
+
style: {
|
|
42
|
+
height: (screen.height - safe) / scale,
|
|
43
|
+
top: safe,
|
|
44
|
+
transform: "scale(" + scale + ")",
|
|
45
|
+
width: viewport
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
children
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
PARTS.map((part) => /* @__PURE__ */ jsx(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
...{
|
|
59
|
+
className: "device-" + part
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
part
|
|
63
|
+
))
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
var device_default = Device;
|
|
69
|
+
export {
|
|
70
|
+
DEVICE_TYPES,
|
|
71
|
+
device_default as default
|
|
72
|
+
};
|
|
@@ -271,10 +271,6 @@ const DrawerSubscriptionSummary = ({
|
|
|
271
271
|
const invoice = (data == null ? void 0 : data.invoice) || {};
|
|
272
272
|
const first = invoice.first || invoice;
|
|
273
273
|
const renews = Boolean(invoice.first) && invoice.first.total !== invoice.total;
|
|
274
|
-
const money = (cents) => "$" + (0, import_drawbridge_utils.formatNumber)((cents || 0) / 100, 2);
|
|
275
|
-
const per = (plan == null ? void 0 : plan.interval) || "month";
|
|
276
|
-
const fee = first.setup > 0;
|
|
277
|
-
const group = "space-y-1.5 mt-3 pt-3 border-t border-gray";
|
|
278
274
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
279
275
|
"div",
|
|
280
276
|
{
|
|
@@ -290,63 +286,29 @@ const DrawerSubscriptionSummary = ({
|
|
|
290
286
|
className: "space-y-1.5"
|
|
291
287
|
},
|
|
292
288
|
children: [
|
|
293
|
-
(plan == null ? void 0 : plan.title) &&
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
)
|
|
298
|
-
]
|
|
299
|
-
}
|
|
300
|
-
),
|
|
301
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
302
|
-
"div",
|
|
303
|
-
{
|
|
304
|
-
...{
|
|
305
|
-
className: group
|
|
306
|
-
},
|
|
307
|
-
children: [
|
|
289
|
+
(plan == null ? void 0 : plan.title) && renderLine(
|
|
290
|
+
"Plan",
|
|
291
|
+
plan.title
|
|
292
|
+
),
|
|
308
293
|
renderLine(
|
|
309
294
|
"Subtotal",
|
|
310
|
-
|
|
295
|
+
"$" + (0, import_drawbridge_utils.formatNumber)((first.subtotal || 0) / 100, 2)
|
|
311
296
|
),
|
|
312
297
|
first.discount > 0 && renderLine(
|
|
313
298
|
"Discount",
|
|
314
|
-
"
|
|
299
|
+
"-$" + (0, import_drawbridge_utils.formatNumber)(first.discount / 100, 2)
|
|
315
300
|
),
|
|
316
301
|
renderLine(
|
|
317
302
|
"Tax",
|
|
318
|
-
|
|
319
|
-
)
|
|
320
|
-
]
|
|
321
|
-
}
|
|
322
|
-
),
|
|
323
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
324
|
-
"div",
|
|
325
|
-
{
|
|
326
|
-
...{
|
|
327
|
-
className: group
|
|
328
|
-
},
|
|
329
|
-
children: [
|
|
330
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
331
|
-
"div",
|
|
332
|
-
{
|
|
333
|
-
...{
|
|
334
|
-
className: "flex items-center justify-between font-medium"
|
|
335
|
-
},
|
|
336
|
-
children: [
|
|
337
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Total" }),
|
|
338
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: money(first.total) })
|
|
339
|
-
]
|
|
340
|
-
}
|
|
303
|
+
"$" + (0, import_drawbridge_utils.formatNumber)((first.tax || 0) / 100, 2)
|
|
341
304
|
),
|
|
342
|
-
|
|
343
|
-
"
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
305
|
+
renderLine(
|
|
306
|
+
"Total",
|
|
307
|
+
"$" + (0, import_drawbridge_utils.formatNumber)((first.total || 0) / 100, 2)
|
|
308
|
+
),
|
|
309
|
+
renews && renderLine(
|
|
310
|
+
"Renews at",
|
|
311
|
+
"$" + (0, import_drawbridge_utils.formatNumber)((invoice.total || 0) / 100, 2)
|
|
350
312
|
)
|
|
351
313
|
]
|
|
352
314
|
}
|
|
@@ -239,10 +239,6 @@ const DrawerSubscriptionSummary = ({
|
|
|
239
239
|
const invoice = (data == null ? void 0 : data.invoice) || {};
|
|
240
240
|
const first = invoice.first || invoice;
|
|
241
241
|
const renews = Boolean(invoice.first) && invoice.first.total !== invoice.total;
|
|
242
|
-
const money = (cents) => "$" + formatNumber((cents || 0) / 100, 2);
|
|
243
|
-
const per = (plan == null ? void 0 : plan.interval) || "month";
|
|
244
|
-
const fee = first.setup > 0;
|
|
245
|
-
const group = "space-y-1.5 mt-3 pt-3 border-t border-gray";
|
|
246
242
|
return /* @__PURE__ */ jsxs(
|
|
247
243
|
"div",
|
|
248
244
|
{
|
|
@@ -258,63 +254,29 @@ const DrawerSubscriptionSummary = ({
|
|
|
258
254
|
className: "space-y-1.5"
|
|
259
255
|
},
|
|
260
256
|
children: [
|
|
261
|
-
(plan == null ? void 0 : plan.title) &&
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
)
|
|
266
|
-
]
|
|
267
|
-
}
|
|
268
|
-
),
|
|
269
|
-
/* @__PURE__ */ jsxs(
|
|
270
|
-
"div",
|
|
271
|
-
{
|
|
272
|
-
...{
|
|
273
|
-
className: group
|
|
274
|
-
},
|
|
275
|
-
children: [
|
|
257
|
+
(plan == null ? void 0 : plan.title) && renderLine(
|
|
258
|
+
"Plan",
|
|
259
|
+
plan.title
|
|
260
|
+
),
|
|
276
261
|
renderLine(
|
|
277
262
|
"Subtotal",
|
|
278
|
-
|
|
263
|
+
"$" + formatNumber((first.subtotal || 0) / 100, 2)
|
|
279
264
|
),
|
|
280
265
|
first.discount > 0 && renderLine(
|
|
281
266
|
"Discount",
|
|
282
|
-
"
|
|
267
|
+
"-$" + formatNumber(first.discount / 100, 2)
|
|
283
268
|
),
|
|
284
269
|
renderLine(
|
|
285
270
|
"Tax",
|
|
286
|
-
|
|
287
|
-
)
|
|
288
|
-
]
|
|
289
|
-
}
|
|
290
|
-
),
|
|
291
|
-
/* @__PURE__ */ jsxs(
|
|
292
|
-
"div",
|
|
293
|
-
{
|
|
294
|
-
...{
|
|
295
|
-
className: group
|
|
296
|
-
},
|
|
297
|
-
children: [
|
|
298
|
-
/* @__PURE__ */ jsxs(
|
|
299
|
-
"div",
|
|
300
|
-
{
|
|
301
|
-
...{
|
|
302
|
-
className: "flex items-center justify-between font-medium"
|
|
303
|
-
},
|
|
304
|
-
children: [
|
|
305
|
-
/* @__PURE__ */ jsx("p", { children: "Total" }),
|
|
306
|
-
/* @__PURE__ */ jsx("p", { children: money(first.total) })
|
|
307
|
-
]
|
|
308
|
-
}
|
|
271
|
+
"$" + formatNumber((first.tax || 0) / 100, 2)
|
|
309
272
|
),
|
|
310
|
-
|
|
311
|
-
"
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}
|
|
273
|
+
renderLine(
|
|
274
|
+
"Total",
|
|
275
|
+
"$" + formatNumber((first.total || 0) / 100, 2)
|
|
276
|
+
),
|
|
277
|
+
renews && renderLine(
|
|
278
|
+
"Renews at",
|
|
279
|
+
"$" + formatNumber((invoice.total || 0) / 100, 2)
|
|
318
280
|
)
|
|
319
281
|
]
|
|
320
282
|
}
|
package/dist/dashboard/drawer.js
CHANGED
|
@@ -34,7 +34,6 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
34
34
|
var import_react = require("react");
|
|
35
35
|
var import_react2 = require("@headlessui/react");
|
|
36
36
|
var import_escape = require("./lib/escape");
|
|
37
|
-
var import_focus = require("./lib/focus");
|
|
38
37
|
var import_motion = require("../shared/lib/motion");
|
|
39
38
|
var import_times = __toESM(require("../icons/times"));
|
|
40
39
|
var import_button = __toESM(require("../shared/button"));
|
|
@@ -50,14 +49,11 @@ const Drawer = ({
|
|
|
50
49
|
title
|
|
51
50
|
}) => {
|
|
52
51
|
const close = (0, import_react.useRef)(null);
|
|
53
|
-
const heading = (0, import_react.useId)();
|
|
54
|
-
const [panel, setPanel] = (0, import_react.useState)(null);
|
|
55
52
|
(0, import_escape.useEscape)(active, close);
|
|
56
|
-
(0, import_focus.useTrap)(Boolean(active) && overlay, panel);
|
|
57
53
|
const classes = {
|
|
58
54
|
drawer: [
|
|
59
55
|
className,
|
|
60
|
-
"block fixed top-0 right-0 w-full h-full bg-white overflow-y-scroll
|
|
56
|
+
"block fixed top-0 right-0 w-full h-full bg-white overflow-y-scroll",
|
|
61
57
|
"md:w-1/2 lg:w-1/3",
|
|
62
58
|
// Enter slides in immediately (no delay): the panel used to wait
|
|
63
59
|
// 300ms at translate-x-full, so a reopen before the previous leave
|
|
@@ -90,14 +86,9 @@ const Drawer = ({
|
|
|
90
86
|
import_react2.Transition,
|
|
91
87
|
{
|
|
92
88
|
...{
|
|
93
|
-
"aria-labelledby": heading,
|
|
94
|
-
"aria-modal": overlay,
|
|
95
89
|
as: "div",
|
|
96
90
|
className: classes.drawer.join(" "),
|
|
97
|
-
|
|
98
|
-
role: "dialog",
|
|
99
|
-
show: Boolean(active),
|
|
100
|
-
tabIndex: -1
|
|
91
|
+
show: Boolean(active)
|
|
101
92
|
},
|
|
102
93
|
children: [
|
|
103
94
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
@@ -107,15 +98,7 @@ const Drawer = ({
|
|
|
107
98
|
className: classes.header.join(" ")
|
|
108
99
|
},
|
|
109
100
|
children: [
|
|
110
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
111
|
-
"div",
|
|
112
|
-
{
|
|
113
|
-
...{
|
|
114
|
-
id: heading
|
|
115
|
-
},
|
|
116
|
-
children: title
|
|
117
|
-
}
|
|
118
|
-
),
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: title }),
|
|
119
102
|
onClose instanceof Function && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
103
|
import_button.default,
|
|
121
104
|
{
|