@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
package/dist/input-checkbox.mjs
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useId } from "react";
|
|
3
2
|
import Check from "./icons/check.mjs";
|
|
4
3
|
import Button from "./shared/button.mjs";
|
|
5
4
|
import { inputCheckboxStyle, textStyle } from "./styles.mjs";
|
|
6
5
|
const InputCheckbox = ({
|
|
7
6
|
className,
|
|
8
|
-
id,
|
|
9
7
|
label,
|
|
10
8
|
labelId,
|
|
11
9
|
onChange,
|
|
@@ -13,8 +11,6 @@ const InputCheckbox = ({
|
|
|
13
11
|
value,
|
|
14
12
|
...rest
|
|
15
13
|
}) => {
|
|
16
|
-
const generated = useId();
|
|
17
|
-
const boxId = id || "checkbox-" + generated.replace(/:/g, "");
|
|
18
14
|
const classes = [
|
|
19
15
|
"inline-flex items-start space-x-2 w-full"
|
|
20
16
|
];
|
|
@@ -34,7 +30,6 @@ const InputCheckbox = ({
|
|
|
34
30
|
...{
|
|
35
31
|
"aria-checked": value ? true : false,
|
|
36
32
|
"aria-labelledby": labelId,
|
|
37
|
-
id: boxId,
|
|
38
33
|
inline: true,
|
|
39
34
|
onClick: () => onChange(value ? false : true),
|
|
40
35
|
role: "checkbox",
|
|
@@ -61,11 +56,10 @@ const InputCheckbox = ({
|
|
|
61
56
|
}
|
|
62
57
|
),
|
|
63
58
|
label && /* @__PURE__ */ jsx(
|
|
64
|
-
"
|
|
59
|
+
"span",
|
|
65
60
|
{
|
|
66
61
|
...{
|
|
67
62
|
className: "leading-tight",
|
|
68
|
-
htmlFor: boxId,
|
|
69
63
|
id: labelId,
|
|
70
64
|
// A brand's text colour reaches the label with no page around it; unbranded it inherits.
|
|
71
65
|
...style && { style: textStyle(style) }
|
package/dist/input-name.js
CHANGED
|
@@ -61,7 +61,7 @@ const InputName = ({
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
),
|
|
64
|
-
label: "First name
|
|
64
|
+
label: "First name",
|
|
65
65
|
style
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -85,7 +85,7 @@ const InputName = ({
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
|
-
label: "Last name
|
|
88
|
+
label: "Last name",
|
|
89
89
|
style
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -108,7 +108,7 @@ const InputName = ({
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
),
|
|
111
|
-
label: "Full name
|
|
111
|
+
label: "Full name",
|
|
112
112
|
style
|
|
113
113
|
}
|
|
114
114
|
}
|
package/dist/input-name.mjs
CHANGED
|
@@ -29,7 +29,7 @@ const InputName = ({
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
),
|
|
32
|
-
label: "First name
|
|
32
|
+
label: "First name",
|
|
33
33
|
style
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -53,7 +53,7 @@ const InputName = ({
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
),
|
|
56
|
-
label: "Last name
|
|
56
|
+
label: "Last name",
|
|
57
57
|
style
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -76,7 +76,7 @@ const InputName = ({
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
label: "Full name
|
|
79
|
+
label: "Full name",
|
|
80
80
|
style
|
|
81
81
|
}
|
|
82
82
|
}
|
package/dist/input-select.js
CHANGED
|
@@ -38,8 +38,6 @@ var import_styles = require("./styles");
|
|
|
38
38
|
const InputSelect = ({
|
|
39
39
|
onChange,
|
|
40
40
|
options = [],
|
|
41
|
-
// The disabled first option, read while nothing is chosen.
|
|
42
|
-
placeholder = "Select",
|
|
43
41
|
style,
|
|
44
42
|
value,
|
|
45
43
|
...rest
|
|
@@ -84,7 +82,7 @@ const InputSelect = ({
|
|
|
84
82
|
"aria-label": "Select option",
|
|
85
83
|
value: ""
|
|
86
84
|
},
|
|
87
|
-
children:
|
|
85
|
+
children: "Select"
|
|
88
86
|
}
|
|
89
87
|
),
|
|
90
88
|
options.map(({ label, option, value: optValue }, key) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
package/dist/input-select.mjs
CHANGED
|
@@ -6,8 +6,6 @@ import { inputStyle, textStyle } from "./styles.mjs";
|
|
|
6
6
|
const InputSelect = ({
|
|
7
7
|
onChange,
|
|
8
8
|
options = [],
|
|
9
|
-
// The disabled first option, read while nothing is chosen.
|
|
10
|
-
placeholder = "Select",
|
|
11
9
|
style,
|
|
12
10
|
value,
|
|
13
11
|
...rest
|
|
@@ -52,7 +50,7 @@ const InputSelect = ({
|
|
|
52
50
|
"aria-label": "Select option",
|
|
53
51
|
value: ""
|
|
54
52
|
},
|
|
55
|
-
children:
|
|
53
|
+
children: "Select"
|
|
56
54
|
}
|
|
57
55
|
),
|
|
58
56
|
options.map(({ label, option, value: optValue }, key) => /* @__PURE__ */ jsx(
|
package/dist/provider-font.js
CHANGED
|
@@ -22,7 +22,6 @@ __export(provider_font_exports, {
|
|
|
22
22
|
module.exports = __toCommonJS(provider_font_exports);
|
|
23
23
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
24
24
|
var import_react = require("react");
|
|
25
|
-
var import_drawbridge_utils = require("@drawbridge/drawbridge-utils");
|
|
26
25
|
var import_styles = require("./styles");
|
|
27
26
|
const defaults = {
|
|
28
27
|
family: "Roboto Flex",
|
|
@@ -40,7 +39,7 @@ const ProviderFont = (0, import_react.memo)(({
|
|
|
40
39
|
const headingFamily = (heading == null ? void 0 : heading.family) || defaults.family;
|
|
41
40
|
const same = headingFamily === bodyFamily;
|
|
42
41
|
const url2 = [
|
|
43
|
-
"https://fonts.googleapis.com/css?family=" + (
|
|
42
|
+
"https://fonts.googleapis.com/css?family=" + bodyFamily.replace(/ /g, "+")
|
|
44
43
|
];
|
|
45
44
|
const fonts2 = {
|
|
46
45
|
body: {
|
|
@@ -53,12 +52,12 @@ const ProviderFont = (0, import_react.memo)(({
|
|
|
53
52
|
}
|
|
54
53
|
};
|
|
55
54
|
if (body == null ? void 0 : body.weight) {
|
|
55
|
+
url2.push(":" + body.weight);
|
|
56
56
|
fonts2.body.fontWeight = (0, import_styles.toFontWeight)(body.weight);
|
|
57
57
|
fonts2.body.fontStyle = (0, import_styles.toFontStyle)(body.weight);
|
|
58
58
|
}
|
|
59
|
-
url2.push(":" + ((body == null ? void 0 : body.weight) || "regular") + (/^700/.test((body == null ? void 0 : body.weight) || "") ? "" : ",700"));
|
|
60
59
|
if (!same) {
|
|
61
|
-
url2.push("%7C" + (
|
|
60
|
+
url2.push("%7C" + headingFamily.replace(/ /g, "+"));
|
|
62
61
|
}
|
|
63
62
|
if (heading == null ? void 0 : heading.weight) {
|
|
64
63
|
url2.push((same ? "," : ":") + heading.weight);
|
package/dist/provider-font.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment, memo, useMemo } from "react";
|
|
3
|
-
import { googleFamily } from "@drawbridge/drawbridge-utils";
|
|
4
3
|
import { toFontFamily, toFontStyle, toFontWeight } from "./styles.mjs";
|
|
5
4
|
const defaults = {
|
|
6
5
|
family: "Roboto Flex",
|
|
@@ -18,7 +17,7 @@ const ProviderFont = memo(({
|
|
|
18
17
|
const headingFamily = (heading == null ? void 0 : heading.family) || defaults.family;
|
|
19
18
|
const same = headingFamily === bodyFamily;
|
|
20
19
|
const url2 = [
|
|
21
|
-
"https://fonts.googleapis.com/css?family=" +
|
|
20
|
+
"https://fonts.googleapis.com/css?family=" + bodyFamily.replace(/ /g, "+")
|
|
22
21
|
];
|
|
23
22
|
const fonts2 = {
|
|
24
23
|
body: {
|
|
@@ -31,12 +30,12 @@ const ProviderFont = memo(({
|
|
|
31
30
|
}
|
|
32
31
|
};
|
|
33
32
|
if (body == null ? void 0 : body.weight) {
|
|
33
|
+
url2.push(":" + body.weight);
|
|
34
34
|
fonts2.body.fontWeight = toFontWeight(body.weight);
|
|
35
35
|
fonts2.body.fontStyle = toFontStyle(body.weight);
|
|
36
36
|
}
|
|
37
|
-
url2.push(":" + ((body == null ? void 0 : body.weight) || "regular") + (/^700/.test((body == null ? void 0 : body.weight) || "") ? "" : ",700"));
|
|
38
37
|
if (!same) {
|
|
39
|
-
url2.push("%7C" +
|
|
38
|
+
url2.push("%7C" + headingFamily.replace(/ /g, "+"));
|
|
40
39
|
}
|
|
41
40
|
if (heading == null ? void 0 : heading.weight) {
|
|
42
41
|
url2.push((same ? "," : ":") + heading.weight);
|
package/dist/shared/badge.js
CHANGED
|
@@ -27,7 +27,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
var badge_exports = {};
|
|
29
29
|
__export(badge_exports, {
|
|
30
|
-
Disabled: () => Disabled,
|
|
31
30
|
default: () => badge_default
|
|
32
31
|
});
|
|
33
32
|
module.exports = __toCommonJS(badge_exports);
|
|
@@ -86,18 +85,4 @@ const Badge = ({
|
|
|
86
85
|
}
|
|
87
86
|
);
|
|
88
87
|
};
|
|
89
|
-
const Disabled = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
|
-
Badge,
|
|
91
|
-
{
|
|
92
|
-
...{
|
|
93
|
-
size: "small",
|
|
94
|
-
type: "secondary"
|
|
95
|
-
},
|
|
96
|
-
children: "Disabled"
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
88
|
var badge_default = Badge;
|
|
100
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
101
|
-
0 && (module.exports = {
|
|
102
|
-
Disabled
|
|
103
|
-
});
|
package/dist/shared/badge.mjs
CHANGED
|
@@ -53,18 +53,7 @@ const Badge = ({
|
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
};
|
|
56
|
-
const Disabled = () => /* @__PURE__ */ jsx(
|
|
57
|
-
Badge,
|
|
58
|
-
{
|
|
59
|
-
...{
|
|
60
|
-
size: "small",
|
|
61
|
-
type: "secondary"
|
|
62
|
-
},
|
|
63
|
-
children: "Disabled"
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
56
|
var badge_default = Badge;
|
|
67
57
|
export {
|
|
68
|
-
Disabled,
|
|
69
58
|
badge_default as default
|
|
70
59
|
};
|
package/dist/shared/carousel.js
CHANGED
|
@@ -87,7 +87,7 @@ const Carousel = ({
|
|
|
87
87
|
[api, slides.length]
|
|
88
88
|
);
|
|
89
89
|
if (slides.length === 0) return null;
|
|
90
|
-
|
|
90
|
+
if (slides.length === 1) return slides[0];
|
|
91
91
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
92
92
|
"div",
|
|
93
93
|
{
|
|
@@ -100,9 +100,7 @@ const Carousel = ({
|
|
|
100
100
|
{
|
|
101
101
|
...{
|
|
102
102
|
className: "overflow-hidden" + (autoHeight ? " transition-[height] duration-300" : ""),
|
|
103
|
-
|
|
104
|
-
ref
|
|
105
|
-
},
|
|
103
|
+
ref,
|
|
106
104
|
...autoHeight && height && {
|
|
107
105
|
style: { height }
|
|
108
106
|
}
|
|
@@ -118,14 +116,12 @@ const Carousel = ({
|
|
|
118
116
|
"div",
|
|
119
117
|
{
|
|
120
118
|
...{
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"aria-roledescription": "slide",
|
|
124
|
-
role: "group"
|
|
125
|
-
},
|
|
119
|
+
"aria-label": label + " " + (key + 1) + " of " + slides.length,
|
|
120
|
+
"aria-roledescription": "slide",
|
|
126
121
|
// A column, so a slide that draws its own flex-[0_0_100%]
|
|
127
122
|
// wrapper (the dashboard tiles) still fills the slide.
|
|
128
|
-
className: "flex min-w-0 flex-[0_0_100%] flex-col"
|
|
123
|
+
className: "flex min-w-0 flex-[0_0_100%] flex-col",
|
|
124
|
+
role: "group"
|
|
129
125
|
},
|
|
130
126
|
children: slide
|
|
131
127
|
},
|
|
@@ -135,7 +131,7 @@ const Carousel = ({
|
|
|
135
131
|
)
|
|
136
132
|
}
|
|
137
133
|
),
|
|
138
|
-
dots &&
|
|
134
|
+
dots && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
139
135
|
"div",
|
|
140
136
|
{
|
|
141
137
|
...{
|
package/dist/shared/carousel.mjs
CHANGED
|
@@ -55,7 +55,7 @@ const Carousel = ({
|
|
|
55
55
|
[api, slides.length]
|
|
56
56
|
);
|
|
57
57
|
if (slides.length === 0) return null;
|
|
58
|
-
|
|
58
|
+
if (slides.length === 1) return slides[0];
|
|
59
59
|
return /* @__PURE__ */ jsxs(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
@@ -68,9 +68,7 @@ const Carousel = ({
|
|
|
68
68
|
{
|
|
69
69
|
...{
|
|
70
70
|
className: "overflow-hidden" + (autoHeight ? " transition-[height] duration-300" : ""),
|
|
71
|
-
|
|
72
|
-
ref
|
|
73
|
-
},
|
|
71
|
+
ref,
|
|
74
72
|
...autoHeight && height && {
|
|
75
73
|
style: { height }
|
|
76
74
|
}
|
|
@@ -86,14 +84,12 @@ const Carousel = ({
|
|
|
86
84
|
"div",
|
|
87
85
|
{
|
|
88
86
|
...{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"aria-roledescription": "slide",
|
|
92
|
-
role: "group"
|
|
93
|
-
},
|
|
87
|
+
"aria-label": label + " " + (key + 1) + " of " + slides.length,
|
|
88
|
+
"aria-roledescription": "slide",
|
|
94
89
|
// A column, so a slide that draws its own flex-[0_0_100%]
|
|
95
90
|
// wrapper (the dashboard tiles) still fills the slide.
|
|
96
|
-
className: "flex min-w-0 flex-[0_0_100%] flex-col"
|
|
91
|
+
className: "flex min-w-0 flex-[0_0_100%] flex-col",
|
|
92
|
+
role: "group"
|
|
97
93
|
},
|
|
98
94
|
children: slide
|
|
99
95
|
},
|
|
@@ -103,7 +99,7 @@ const Carousel = ({
|
|
|
103
99
|
)
|
|
104
100
|
}
|
|
105
101
|
),
|
|
106
|
-
dots &&
|
|
102
|
+
dots && /* @__PURE__ */ jsx(
|
|
107
103
|
"div",
|
|
108
104
|
{
|
|
109
105
|
...{
|
|
@@ -48,7 +48,10 @@ const campaignSwitch = (campaign, key, on) => {
|
|
|
48
48
|
],
|
|
49
49
|
giveaway: on ? [
|
|
50
50
|
"Turn on the giveaway?",
|
|
51
|
-
|
|
51
|
+
// @story campaigns/giveaway-module
|
|
52
|
+
// The giveaway wins over an order form ( the api's `ordering` ), and
|
|
53
|
+
// says so (Darren, 2026-11-03).
|
|
54
|
+
"Entries are awarded while a range in your schedule is running." + (form ? "" : " The form turns on too, because entries come from the form.") + ((campaign == null ? void 0 : campaign.ordering) ? " Giveaways can't run with an order form, so the form stops taking orders. Your order and its fields are kept." : "")
|
|
52
55
|
] : [
|
|
53
56
|
"Turn off the giveaway?",
|
|
54
57
|
"Entries stop being awarded. Prizes, schedule, missions and draws are kept, and come back when you turn it on."
|
|
@@ -71,6 +74,10 @@ const leadCapture = (campaign) => {
|
|
|
71
74
|
return ((_b = campaign == null ? void 0 : campaign.giveaway) == null ? void 0 : _b.enabled) ? "Form and Giveaway" : "Form";
|
|
72
75
|
};
|
|
73
76
|
const reasons = {
|
|
77
|
+
"No range is running": {
|
|
78
|
+
giveaway: ["No range is running", "Add a range to your schedule to start awarding entries"],
|
|
79
|
+
overview: "No range is running, so no entries are awarded"
|
|
80
|
+
},
|
|
74
81
|
"No prizes are published": {
|
|
75
82
|
giveaway: ["No prizes are published", "Publish a prize to start awarding entries"],
|
|
76
83
|
overview: "No prizes are published"
|
|
@@ -95,8 +102,7 @@ const awardingCard = (campaign, page = "overview") => {
|
|
|
95
102
|
type: "success"
|
|
96
103
|
};
|
|
97
104
|
}
|
|
98
|
-
const first = ((campaign == null ? void 0 : campaign.awardingErrors) || []).
|
|
99
|
-
if (!first) return null;
|
|
105
|
+
const first = ((campaign == null ? void 0 : campaign.awardingErrors) || []).map((error) => reasons[error == null ? void 0 : error.message]).find(Boolean) || reasons["No range is running"];
|
|
100
106
|
return page === "giveaway" ? {
|
|
101
107
|
message: first.giveaway[1],
|
|
102
108
|
title: first.giveaway[0],
|
|
@@ -22,7 +22,10 @@ const campaignSwitch = (campaign, key, on) => {
|
|
|
22
22
|
],
|
|
23
23
|
giveaway: on ? [
|
|
24
24
|
"Turn on the giveaway?",
|
|
25
|
-
|
|
25
|
+
// @story campaigns/giveaway-module
|
|
26
|
+
// The giveaway wins over an order form ( the api's `ordering` ), and
|
|
27
|
+
// says so (Darren, 2026-11-03).
|
|
28
|
+
"Entries are awarded while a range in your schedule is running." + (form ? "" : " The form turns on too, because entries come from the form.") + ((campaign == null ? void 0 : campaign.ordering) ? " Giveaways can't run with an order form, so the form stops taking orders. Your order and its fields are kept." : "")
|
|
26
29
|
] : [
|
|
27
30
|
"Turn off the giveaway?",
|
|
28
31
|
"Entries stop being awarded. Prizes, schedule, missions and draws are kept, and come back when you turn it on."
|
|
@@ -45,6 +48,10 @@ const leadCapture = (campaign) => {
|
|
|
45
48
|
return ((_b = campaign == null ? void 0 : campaign.giveaway) == null ? void 0 : _b.enabled) ? "Form and Giveaway" : "Form";
|
|
46
49
|
};
|
|
47
50
|
const reasons = {
|
|
51
|
+
"No range is running": {
|
|
52
|
+
giveaway: ["No range is running", "Add a range to your schedule to start awarding entries"],
|
|
53
|
+
overview: "No range is running, so no entries are awarded"
|
|
54
|
+
},
|
|
48
55
|
"No prizes are published": {
|
|
49
56
|
giveaway: ["No prizes are published", "Publish a prize to start awarding entries"],
|
|
50
57
|
overview: "No prizes are published"
|
|
@@ -69,8 +76,7 @@ const awardingCard = (campaign, page = "overview") => {
|
|
|
69
76
|
type: "success"
|
|
70
77
|
};
|
|
71
78
|
}
|
|
72
|
-
const first = ((campaign == null ? void 0 : campaign.awardingErrors) || []).
|
|
73
|
-
if (!first) return null;
|
|
79
|
+
const first = ((campaign == null ? void 0 : campaign.awardingErrors) || []).map((error) => reasons[error == null ? void 0 : error.message]).find(Boolean) || reasons["No range is running"];
|
|
74
80
|
return page === "giveaway" ? {
|
|
75
81
|
message: first.giveaway[1],
|
|
76
82
|
title: first.giveaway[0],
|
|
@@ -41,8 +41,6 @@ __export(helpers_exports, {
|
|
|
41
41
|
formatDateTime: () => formatDateTime,
|
|
42
42
|
formatLast4: () => formatLast4,
|
|
43
43
|
formatUserName: () => formatUserName,
|
|
44
|
-
galleryItems: () => galleryItems,
|
|
45
|
-
galleryValue: () => galleryValue,
|
|
46
44
|
grid: () => grid,
|
|
47
45
|
hasCapability: () => hasCapability,
|
|
48
46
|
hasConnection: () => hasConnection,
|
|
@@ -72,15 +70,6 @@ const advertisementPreview = (values, options) => {
|
|
|
72
70
|
};
|
|
73
71
|
};
|
|
74
72
|
const imageAlt = (file, description) => typeof description === "string" && description.trim() || (file == null ? void 0 : file.filename) || "";
|
|
75
|
-
const galleryItems = (gallery, described) => (gallery || []).filter(Boolean).map((item) => item.file && typeof item.file === "object" ? item : {
|
|
76
|
-
description: described == null ? void 0 : described[item.id],
|
|
77
|
-
file: item
|
|
78
|
-
});
|
|
79
|
-
const galleryValue = ({ description, file, position }) => ({
|
|
80
|
-
file: file == null ? void 0 : file.id,
|
|
81
|
-
...typeof description === "string" && description.trim() && { description },
|
|
82
|
-
...position && { position }
|
|
83
|
-
});
|
|
84
73
|
const bust = (href, version) => href ? href + (href.includes("?") ? "&" : "?") + "query=" + encodeURIComponent(version) : null;
|
|
85
74
|
const clickSummary = (click) => {
|
|
86
75
|
const parts = Object.entries(click || {}).map(([key, value]) => key + ": " + value);
|
|
@@ -352,17 +341,6 @@ const statuses = {
|
|
|
352
341
|
range: {
|
|
353
342
|
active: { text: "Active", type: "success" }
|
|
354
343
|
},
|
|
355
|
-
// @story ab-tests/list
|
|
356
|
-
// A test's status, which the api derives from its dates and its pause: Running
|
|
357
|
-
// green, Scheduled yellow, the rest gray. A deleted test is kept, and reads Deleted.
|
|
358
|
-
test: {
|
|
359
|
-
deleted: { text: "Deleted", type: "secondary" },
|
|
360
|
-
drafted: { text: "Drafted", type: "secondary" },
|
|
361
|
-
ended: { text: "Ended", type: "secondary" },
|
|
362
|
-
paused: { text: "Paused", type: "secondary" },
|
|
363
|
-
running: { text: "Running", type: "success" },
|
|
364
|
-
scheduled: { text: "Scheduled", type: "warning" }
|
|
365
|
-
},
|
|
366
344
|
subscription: {
|
|
367
345
|
active: { text: "Active", type: "success" },
|
|
368
346
|
canceled: { text: "Canceled", type: "error" },
|
|
@@ -438,8 +416,6 @@ const years = ({
|
|
|
438
416
|
formatDateTime,
|
|
439
417
|
formatLast4,
|
|
440
418
|
formatUserName,
|
|
441
|
-
galleryItems,
|
|
442
|
-
galleryValue,
|
|
443
419
|
grid,
|
|
444
420
|
hasCapability,
|
|
445
421
|
hasConnection,
|
|
@@ -10,15 +10,6 @@ const advertisementPreview = (values, options) => {
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
const imageAlt = (file, description) => typeof description === "string" && description.trim() || (file == null ? void 0 : file.filename) || "";
|
|
13
|
-
const galleryItems = (gallery, described) => (gallery || []).filter(Boolean).map((item) => item.file && typeof item.file === "object" ? item : {
|
|
14
|
-
description: described == null ? void 0 : described[item.id],
|
|
15
|
-
file: item
|
|
16
|
-
});
|
|
17
|
-
const galleryValue = ({ description, file, position }) => ({
|
|
18
|
-
file: file == null ? void 0 : file.id,
|
|
19
|
-
...typeof description === "string" && description.trim() && { description },
|
|
20
|
-
...position && { position }
|
|
21
|
-
});
|
|
22
13
|
const bust = (href, version) => href ? href + (href.includes("?") ? "&" : "?") + "query=" + encodeURIComponent(version) : null;
|
|
23
14
|
const clickSummary = (click) => {
|
|
24
15
|
const parts = Object.entries(click || {}).map(([key, value]) => key + ": " + value);
|
|
@@ -290,17 +281,6 @@ const statuses = {
|
|
|
290
281
|
range: {
|
|
291
282
|
active: { text: "Active", type: "success" }
|
|
292
283
|
},
|
|
293
|
-
// @story ab-tests/list
|
|
294
|
-
// A test's status, which the api derives from its dates and its pause: Running
|
|
295
|
-
// green, Scheduled yellow, the rest gray. A deleted test is kept, and reads Deleted.
|
|
296
|
-
test: {
|
|
297
|
-
deleted: { text: "Deleted", type: "secondary" },
|
|
298
|
-
drafted: { text: "Drafted", type: "secondary" },
|
|
299
|
-
ended: { text: "Ended", type: "secondary" },
|
|
300
|
-
paused: { text: "Paused", type: "secondary" },
|
|
301
|
-
running: { text: "Running", type: "success" },
|
|
302
|
-
scheduled: { text: "Scheduled", type: "warning" }
|
|
303
|
-
},
|
|
304
284
|
subscription: {
|
|
305
285
|
active: { text: "Active", type: "success" },
|
|
306
286
|
canceled: { text: "Canceled", type: "error" },
|
|
@@ -375,8 +355,6 @@ export {
|
|
|
375
355
|
formatDateTime,
|
|
376
356
|
formatLast4,
|
|
377
357
|
formatUserName,
|
|
378
|
-
galleryItems,
|
|
379
|
-
galleryValue,
|
|
380
358
|
grid,
|
|
381
359
|
hasCapability,
|
|
382
360
|
hasConnection,
|
package/dist/shared/lib/video.js
CHANGED
|
@@ -19,7 +19,6 @@ var video_exports = {};
|
|
|
19
19
|
__export(video_exports, {
|
|
20
20
|
provideHls: () => provideHls,
|
|
21
21
|
startSeek: () => startSeek,
|
|
22
|
-
videoClock: () => videoClock,
|
|
23
22
|
videoErrorAction: () => videoErrorAction,
|
|
24
23
|
videoOverlay: () => videoOverlay
|
|
25
24
|
});
|
|
@@ -55,15 +54,10 @@ const startSeek = ({
|
|
|
55
54
|
if (reset) return 0;
|
|
56
55
|
return wasReset ? SHOWN_START : null;
|
|
57
56
|
};
|
|
58
|
-
const videoClock = (seconds) => {
|
|
59
|
-
const value = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;
|
|
60
|
-
return Math.floor(value / 60) + ":" + String(value % 60).padStart(2, "0");
|
|
61
|
-
};
|
|
62
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
63
58
|
0 && (module.exports = {
|
|
64
59
|
provideHls,
|
|
65
60
|
startSeek,
|
|
66
|
-
videoClock,
|
|
67
61
|
videoErrorAction,
|
|
68
62
|
videoOverlay
|
|
69
63
|
});
|
|
@@ -29,14 +29,9 @@ const startSeek = ({
|
|
|
29
29
|
if (reset) return 0;
|
|
30
30
|
return wasReset ? SHOWN_START : null;
|
|
31
31
|
};
|
|
32
|
-
const videoClock = (seconds) => {
|
|
33
|
-
const value = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;
|
|
34
|
-
return Math.floor(value / 60) + ":" + String(value % 60).padStart(2, "0");
|
|
35
|
-
};
|
|
36
32
|
export {
|
|
37
33
|
provideHls,
|
|
38
34
|
startSeek,
|
|
39
|
-
videoClock,
|
|
40
35
|
videoErrorAction,
|
|
41
36
|
videoOverlay
|
|
42
37
|
};
|
package/dist/shared/sortable.js
CHANGED
|
@@ -118,15 +118,9 @@ const SortableItem = ({
|
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
};
|
|
121
|
-
const toId = (index) => index + 1;
|
|
122
|
-
const toIndex = (id) => id - 1;
|
|
123
121
|
const Sortable = ({
|
|
124
122
|
classNameSortableItem,
|
|
125
123
|
disabled = false,
|
|
126
|
-
handleClassName = "flex items-center justify-center shrink-0 w-4 h-6 rounded cursor-move touch-none",
|
|
127
|
-
handleLabel,
|
|
128
|
-
onDragging = () => {
|
|
129
|
-
},
|
|
130
124
|
onSort = () => {
|
|
131
125
|
},
|
|
132
126
|
renderItem,
|
|
@@ -146,15 +140,12 @@ const Sortable = ({
|
|
|
146
140
|
}
|
|
147
141
|
)
|
|
148
142
|
);
|
|
149
|
-
const makeHandle = (props
|
|
143
|
+
const makeHandle = (props) => showHandle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
150
144
|
"div",
|
|
151
145
|
{
|
|
152
146
|
...{
|
|
153
147
|
...props,
|
|
154
|
-
|
|
155
|
-
"aria-label": handleLabel(item)
|
|
156
|
-
},
|
|
157
|
-
className: handleClassName
|
|
148
|
+
className: "flex items-center justify-center shrink-0 w-6 h-6 rounded cursor-move touch-none"
|
|
158
149
|
},
|
|
159
150
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
160
151
|
import_drag.default,
|
|
@@ -175,22 +166,14 @@ const Sortable = ({
|
|
|
175
166
|
} : void 0,
|
|
176
167
|
collisionDetection: import_core.closestCenter,
|
|
177
168
|
onDragStart: ({ active }) => {
|
|
178
|
-
setActiveId(
|
|
179
|
-
onDragging(true);
|
|
180
|
-
},
|
|
181
|
-
onDragCancel: () => {
|
|
182
|
-
setActiveId(null);
|
|
183
|
-
onDragging(false);
|
|
169
|
+
setActiveId(active.id);
|
|
184
170
|
},
|
|
185
171
|
onDragEnd: ({ active, over }) => {
|
|
186
172
|
if (over && active.id !== over.id) {
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
const sorted = (0, import_sortable.arrayMove)(items, from, to);
|
|
190
|
-
onSort(sorted, { from, to });
|
|
173
|
+
const sorted = (0, import_sortable.arrayMove)(items, active.id, over.id);
|
|
174
|
+
onSort(sorted, { from: active.id, to: over.id });
|
|
191
175
|
}
|
|
192
176
|
setActiveId(null);
|
|
193
|
-
onDragging(false);
|
|
194
177
|
},
|
|
195
178
|
sensors
|
|
196
179
|
},
|
|
@@ -198,7 +181,7 @@ const Sortable = ({
|
|
|
198
181
|
import_sortable.SortableContext,
|
|
199
182
|
{
|
|
200
183
|
...{
|
|
201
|
-
items: items.map((_, i) =>
|
|
184
|
+
items: items.map((_, i) => i),
|
|
202
185
|
strategy: import_sortable.verticalListSortingStrategy
|
|
203
186
|
},
|
|
204
187
|
children: [
|
|
@@ -208,9 +191,9 @@ const Sortable = ({
|
|
|
208
191
|
...{
|
|
209
192
|
as: sortableElement,
|
|
210
193
|
className: classNameSortableItem,
|
|
211
|
-
id:
|
|
194
|
+
id: index
|
|
212
195
|
},
|
|
213
|
-
children: (dragHandleProps) => sortableElement ? renderItem(item, index, makeHandle(dragHandleProps
|
|
196
|
+
children: (dragHandleProps) => sortableElement ? renderItem(item, index, makeHandle(dragHandleProps)) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
214
197
|
SortableItem,
|
|
215
198
|
{
|
|
216
199
|
...{
|
|
@@ -218,7 +201,7 @@ const Sortable = ({
|
|
|
218
201
|
className: classNameSortableItem
|
|
219
202
|
}
|
|
220
203
|
},
|
|
221
|
-
children: renderItem(item, index, makeHandle(dragHandleProps
|
|
204
|
+
children: renderItem(item, index, makeHandle(dragHandleProps))
|
|
222
205
|
}
|
|
223
206
|
)
|
|
224
207
|
},
|
|
@@ -232,7 +215,7 @@ const Sortable = ({
|
|
|
232
215
|
className: classNameSortableItem
|
|
233
216
|
}
|
|
234
217
|
},
|
|
235
|
-
children: renderItem(items[activeId], activeId, makeHandle({}
|
|
218
|
+
children: renderItem(items[activeId], activeId, makeHandle({}))
|
|
236
219
|
}
|
|
237
220
|
) : null })
|
|
238
221
|
]
|