orbital-ds 0.44.1 → 0.48.0
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/AGENTS.md +29 -6
- package/CHANGELOG.md +458 -0
- package/README.md +2 -2
- package/components.manifest.json +209 -48
- package/dist/hooks/use-esc-close-stack.js +38 -0
- package/dist/hooks/use-simulated-progress.js +30 -0
- package/dist/lib/brand-allowlist.js +703 -0
- package/dist/lib/brand-runtime.js +85 -0
- package/dist/lib/echarts-presets.js +152 -1
- package/dist/lib/echarts-setup.js +2 -0
- package/dist/lib/i18n.js +3 -0
- package/dist/lib/locales/de.js +1 -0
- package/dist/lib/locales/fr.js +1 -0
- package/dist/lib/locales/he.js +1 -0
- package/dist/lib/locales/it.js +1 -0
- package/dist/ui/context-menu.js +2 -2
- package/dist/ui/cta-banner.js +63 -0
- package/dist/ui/detail-panel.js +2 -2
- package/dist/ui/faq.js +25 -0
- package/dist/ui/feature-grid.js +40 -0
- package/dist/ui/landing-section.js +59 -0
- package/dist/ui/pricing-table.js +86 -0
- package/dist/ui/sheet.js +1 -1
- package/dist/ui/testimonial.js +61 -0
- package/docs/designer/patrones.md +7 -2
- package/manifest/actions.json +1 -1
- package/manifest/agents.json +1 -1
- package/manifest/ai.json +1 -1
- package/manifest/auth.json +1 -1
- package/manifest/chat.json +1 -1
- package/manifest/content.json +496 -1
- package/manifest/data.json +1 -103
- package/manifest/feedback.json +6 -6
- package/manifest/forms.json +1 -1
- package/manifest/motion.json +3 -3
- package/manifest/navigation.json +3 -3
- package/manifest/overlays.json +14 -11
- package/package.json +6 -8
- package/scripts/cli.mjs +19 -0
- package/scripts/doctor.mjs +28 -2
- package/scripts/eslint-plugin.mjs +32 -0
- package/scripts/manifest.mjs +20 -0
- package/scripts/upgrade.mjs +126 -0
- package/dist/auth-form-B1hgbXkI.d.ts +0 -144
- package/dist/hooks/use-ds-messages.d.ts +0 -544
- package/dist/hooks/use-ds-motion.d.ts +0 -17
- package/dist/hooks/use-in-view.d.ts +0 -9
- package/dist/hooks/use-mobile.d.ts +0 -3
- package/dist/lib/a2ui-catalog.d.ts +0 -42
- package/dist/lib/a2ui.d.ts +0 -289
- package/dist/lib/ai-events.d.ts +0 -15
- package/dist/lib/auth-better-auth.d.ts +0 -29
- package/dist/lib/auth-flow.d.ts +0 -85
- package/dist/lib/auth-providers.d.ts +0 -194
- package/dist/lib/auth.d.ts +0 -68
- package/dist/lib/echarts-presets.d.ts +0 -227
- package/dist/lib/echarts-server.d.ts +0 -15
- package/dist/lib/echarts-setup.d.ts +0 -8
- package/dist/lib/echarts-theme.d.ts +0 -36
- package/dist/lib/format.d.ts +0 -57
- package/dist/lib/header-control.d.ts +0 -4
- package/dist/lib/i18n.d.ts +0 -557
- package/dist/lib/image-upload.d.ts +0 -41
- package/dist/lib/locales/de.d.ts +0 -7
- package/dist/lib/locales/fr.d.ts +0 -7
- package/dist/lib/locales/he.d.ts +0 -7
- package/dist/lib/locales/it.d.ts +0 -7
- package/dist/lib/motion.d.ts +0 -74
- package/dist/lib/presets.d.ts +0 -8
- package/dist/lib/template-syntax.d.ts +0 -22
- package/dist/lib/utils.d.ts +0 -5
- package/dist/motion.css +0 -146
- package/dist/styles.css +0 -1775
- package/dist/themes/chocolate.css +0 -259
- package/dist/themes/chocolate.fonts.css +0 -2
- package/dist/themes/chocolate.guide.md +0 -30
- package/dist/themes/chocolate.meta.json +0 -61
- package/dist/themes/chocolate.scoped.css +0 -259
- package/dist/themes/chocolate.tokens.json +0 -49
- package/dist/themes/fractalia.css +0 -556
- package/dist/themes/fractalia.fonts.css +0 -3
- package/dist/themes/fractalia.guide.md +0 -86
- package/dist/themes/fractalia.meta.json +0 -112
- package/dist/themes/fractalia.scoped.css +0 -556
- package/dist/themes/fractalia.tokens.json +0 -39
- package/dist/themes/friendly.css +0 -375
- package/dist/themes/friendly.fonts.css +0 -2
- package/dist/themes/friendly.guide.md +0 -38
- package/dist/themes/friendly.meta.json +0 -82
- package/dist/themes/friendly.scoped.css +0 -375
- package/dist/themes/friendly.tokens.json +0 -45
- package/dist/themes/lagoon.css +0 -362
- package/dist/themes/lagoon.fonts.css +0 -2
- package/dist/themes/lagoon.guide.md +0 -47
- package/dist/themes/lagoon.meta.json +0 -85
- package/dist/themes/lagoon.scoped.css +0 -362
- package/dist/themes/lagoon.tokens.json +0 -49
- package/dist/themes/liquid.css +0 -510
- package/dist/themes/liquid.fonts.css +0 -7
- package/dist/themes/liquid.guide.md +0 -82
- package/dist/themes/liquid.meta.json +0 -134
- package/dist/themes/liquid.scoped.css +0 -510
- package/dist/themes/liquid.tokens.json +0 -47
- package/dist/themes/matcha.css +0 -259
- package/dist/themes/matcha.fonts.css +0 -2
- package/dist/themes/matcha.guide.md +0 -30
- package/dist/themes/matcha.meta.json +0 -61
- package/dist/themes/matcha.scoped.css +0 -259
- package/dist/themes/matcha.tokens.json +0 -49
- package/dist/themes/qratia.css +0 -264
- package/dist/themes/qratia.fonts.css +0 -2
- package/dist/themes/qratia.guide.md +0 -34
- package/dist/themes/qratia.meta.json +0 -49
- package/dist/themes/qratia.scoped.css +0 -264
- package/dist/themes/qratia.tokens.json +0 -49
- package/dist/themes/stone.css +0 -263
- package/dist/themes/stone.fonts.css +0 -2
- package/dist/themes/stone.guide.md +0 -30
- package/dist/themes/stone.meta.json +0 -47
- package/dist/themes/stone.scoped.css +0 -263
- package/dist/themes/stone.tokens.json +0 -49
- package/dist/themes/tactile.css +0 -596
- package/dist/themes/tactile.fonts.css +0 -3
- package/dist/themes/tactile.guide.md +0 -82
- package/dist/themes/tactile.meta.json +0 -182
- package/dist/themes/tactile.scoped.css +0 -596
- package/dist/themes/tactile.tokens.json +0 -42
- package/dist/themes/twitter.css +0 -364
- package/dist/themes/twitter.fonts.css +0 -6
- package/dist/themes/twitter.guide.md +0 -35
- package/dist/themes/twitter.meta.json +0 -90
- package/dist/themes/twitter.scoped.css +0 -364
- package/dist/themes/twitter.tokens.json +0 -45
- package/dist/themes/y2k.css +0 -259
- package/dist/themes/y2k.fonts.css +0 -2
- package/dist/themes/y2k.guide.md +0 -30
- package/dist/themes/y2k.meta.json +0 -59
- package/dist/themes/y2k.scoped.css +0 -259
- package/dist/themes/y2k.tokens.json +0 -49
- package/dist/themes/zyro.css +0 -442
- package/dist/themes/zyro.fonts.css +0 -2
- package/dist/themes/zyro.guide.md +0 -33
- package/dist/themes/zyro.meta.json +0 -74
- package/dist/themes/zyro.scoped.css +0 -442
- package/dist/themes/zyro.tokens.json +0 -46
- package/dist/ui/a2ui-renderer.d.ts +0 -44
- package/dist/ui/accordion.d.ts +0 -9
- package/dist/ui/agent-events.d.ts +0 -49
- package/dist/ui/ai-tag.d.ts +0 -24
- package/dist/ui/alert-dialog.d.ts +0 -60
- package/dist/ui/alert.d.ts +0 -13
- package/dist/ui/animated-number.d.ts +0 -20
- package/dist/ui/app-bar.d.ts +0 -32
- package/dist/ui/aspect-ratio.d.ts +0 -7
- package/dist/ui/attachment.d.ts +0 -26
- package/dist/ui/auth-backdrop.d.ts +0 -37
- package/dist/ui/auth-form.d.ts +0 -4
- package/dist/ui/auth-layout.d.ts +0 -110
- package/dist/ui/auth-parts.d.ts +0 -43
- package/dist/ui/auth-status.d.ts +0 -23
- package/dist/ui/avatar.d.ts +0 -43
- package/dist/ui/ayuda.d.ts +0 -22
- package/dist/ui/badge.d.ts +0 -15
- package/dist/ui/banner.d.ts +0 -14
- package/dist/ui/bottom-nav.d.ts +0 -37
- package/dist/ui/breadcrumb.d.ts +0 -34
- package/dist/ui/bubble.d.ts +0 -19
- package/dist/ui/button-group.d.ts +0 -15
- package/dist/ui/button.d.ts +0 -14
- package/dist/ui/calendar.d.ts +0 -28
- package/dist/ui/card-stack.d.ts +0 -36
- package/dist/ui/card.d.ts +0 -61
- package/dist/ui/carousel.d.ts +0 -68
- package/dist/ui/chain-of-thought.d.ts +0 -34
- package/dist/ui/chart-card.d.ts +0 -47
- package/dist/ui/chart.d.ts +0 -65
- package/dist/ui/chart.js +0 -254
- package/dist/ui/chat-composer.d.ts +0 -58
- package/dist/ui/checkbox.d.ts +0 -6
- package/dist/ui/choice-card.d.ts +0 -49
- package/dist/ui/code-block.d.ts +0 -29
- package/dist/ui/collapsible.d.ts +0 -8
- package/dist/ui/combobox.d.ts +0 -74
- package/dist/ui/command-palette.d.ts +0 -54
- package/dist/ui/command.d.ts +0 -56
- package/dist/ui/confirm-action.d.ts +0 -48
- package/dist/ui/confirm-dialog.d.ts +0 -44
- package/dist/ui/connected-accounts.d.ts +0 -25
- package/dist/ui/content-card.d.ts +0 -66
- package/dist/ui/context-menu.d.ts +0 -66
- package/dist/ui/conversation-list.d.ts +0 -44
- package/dist/ui/copy-button.d.ts +0 -25
- package/dist/ui/data-table.d.ts +0 -198
- package/dist/ui/date-picker.d.ts +0 -65
- package/dist/ui/date-time.d.ts +0 -40
- package/dist/ui/description-list.d.ts +0 -49
- package/dist/ui/detail-panel.d.ts +0 -38
- package/dist/ui/dialog.d.ts +0 -54
- package/dist/ui/direction.d.ts +0 -1
- package/dist/ui/dock.d.ts +0 -30
- package/dist/ui/drawer.d.ts +0 -59
- package/dist/ui/dropdown-menu.d.ts +0 -63
- package/dist/ui/dropzone.d.ts +0 -44
- package/dist/ui/echart.d.ts +0 -46
- package/dist/ui/empty-state.d.ts +0 -26
- package/dist/ui/empty.d.ts +0 -15
- package/dist/ui/entity-list.d.ts +0 -57
- package/dist/ui/error-page.d.ts +0 -28
- package/dist/ui/error-state.d.ts +0 -16
- package/dist/ui/eyebrow.d.ts +0 -7
- package/dist/ui/field.d.ts +0 -28
- package/dist/ui/file-upload.d.ts +0 -42
- package/dist/ui/filter-bar.d.ts +0 -38
- package/dist/ui/form-layout.d.ts +0 -43
- package/dist/ui/gauge.d.ts +0 -66
- package/dist/ui/generated-image.d.ts +0 -33
- package/dist/ui/generated-table.d.ts +0 -29
- package/dist/ui/heatmap-grid.d.ts +0 -59
- package/dist/ui/hero.d.ts +0 -58
- package/dist/ui/hover-card.d.ts +0 -8
- package/dist/ui/i18n-provider.d.ts +0 -27
- package/dist/ui/icon-tile.d.ts +0 -11
- package/dist/ui/input-group.d.ts +0 -22
- package/dist/ui/input-otp.d.ts +0 -36
- package/dist/ui/input.d.ts +0 -21
- package/dist/ui/instruction-editor.d.ts +0 -81
- package/dist/ui/item.d.ts +0 -26
- package/dist/ui/kbd.d.ts +0 -6
- package/dist/ui/label.d.ts +0 -22
- package/dist/ui/legend.d.ts +0 -57
- package/dist/ui/level-meter.d.ts +0 -28
- package/dist/ui/load-more.d.ts +0 -36
- package/dist/ui/loading-state.d.ts +0 -26
- package/dist/ui/locale-switcher.d.ts +0 -19
- package/dist/ui/markdown.d.ts +0 -29
- package/dist/ui/marker.d.ts +0 -13
- package/dist/ui/media-card.d.ts +0 -29
- package/dist/ui/menubar.d.ts +0 -70
- package/dist/ui/message-actions.d.ts +0 -21
- package/dist/ui/message-scroller.d.ts +0 -46
- package/dist/ui/message.d.ts +0 -45
- package/dist/ui/mfa-challenge.d.ts +0 -4
- package/dist/ui/mfa-setup.d.ts +0 -29
- package/dist/ui/mosaic.d.ts +0 -38
- package/dist/ui/motion-provider.d.ts +0 -28
- package/dist/ui/native-select.d.ts +0 -32
- package/dist/ui/navigation-menu.d.ts +0 -15
- package/dist/ui/next-step-card.d.ts +0 -55
- package/dist/ui/notice-review.d.ts +0 -64
- package/dist/ui/notifications.d.ts +0 -81
- package/dist/ui/oauth-consent.d.ts +0 -54
- package/dist/ui/page-header.d.ts +0 -64
- package/dist/ui/page-loader.d.ts +0 -40
- package/dist/ui/page-shell.d.ts +0 -25
- package/dist/ui/pagination.d.ts +0 -42
- package/dist/ui/panel.d.ts +0 -12
- package/dist/ui/passkey-list.d.ts +0 -17
- package/dist/ui/password-input.d.ts +0 -5
- package/dist/ui/password-strength.d.ts +0 -28
- package/dist/ui/popover.d.ts +0 -44
- package/dist/ui/progress.d.ts +0 -9
- package/dist/ui/proportion-bar.d.ts +0 -52
- package/dist/ui/quantity.d.ts +0 -25
- package/dist/ui/questionnaire.d.ts +0 -62
- package/dist/ui/radio-group.d.ts +0 -8
- package/dist/ui/reasoning.d.ts +0 -24
- package/dist/ui/resizable.d.ts +0 -10
- package/dist/ui/reveal.d.ts +0 -28
- package/dist/ui/scroll-area.d.ts +0 -7
- package/dist/ui/search-box.d.ts +0 -32
- package/dist/ui/select.d.ts +0 -19
- package/dist/ui/separator.d.ts +0 -6
- package/dist/ui/session-list.d.ts +0 -19
- package/dist/ui/session-timeout.d.ts +0 -13
- package/dist/ui/sheet.d.ts +0 -53
- package/dist/ui/shield.d.ts +0 -35
- package/dist/ui/show-more.d.ts +0 -26
- package/dist/ui/sidebar.d.ts +0 -92
- package/dist/ui/sign-out-dialog.d.ts +0 -17
- package/dist/ui/skeleton.d.ts +0 -10
- package/dist/ui/slider.d.ts +0 -23
- package/dist/ui/sonner.d.ts +0 -6
- package/dist/ui/sparkline.d.ts +0 -26
- package/dist/ui/spinner.d.ts +0 -5
- package/dist/ui/stat-group.d.ts +0 -40
- package/dist/ui/stat.d.ts +0 -90
- package/dist/ui/status-badge.d.ts +0 -39
- package/dist/ui/status-hero.d.ts +0 -30
- package/dist/ui/step-dots.d.ts +0 -22
- package/dist/ui/step-flow.d.ts +0 -48
- package/dist/ui/step-ring.d.ts +0 -26
- package/dist/ui/stepper.d.ts +0 -20
- package/dist/ui/suggestions.d.ts +0 -17
- package/dist/ui/switch.d.ts +0 -8
- package/dist/ui/table.d.ts +0 -38
- package/dist/ui/tabs.d.ts +0 -14
- package/dist/ui/tag-input.d.ts +0 -21
- package/dist/ui/task-loader.d.ts +0 -29
- package/dist/ui/task-progress.d.ts +0 -32
- package/dist/ui/textarea.d.ts +0 -32
- package/dist/ui/theme-toggle.d.ts +0 -14
- package/dist/ui/timeline.d.ts +0 -55
- package/dist/ui/toast.d.ts +0 -19
- package/dist/ui/toggle-group.d.ts +0 -38
- package/dist/ui/toggle.d.ts +0 -12
- package/dist/ui/tool-call.d.ts +0 -27
- package/dist/ui/tooltip.d.ts +0 -9
- package/dist/ui/usage-meter.d.ts +0 -42
- package/dist/ui/week-strip.d.ts +0 -23
- package/dist/ui/workflow-run.d.ts +0 -51
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { contrastRatio, parseColor } from "../../scripts/brand-core.mjs";
|
|
2
|
+
import { BRAND_PUBLIC_TOKENS } from "./brand-allowlist.js";
|
|
3
|
+
const BRAND_CONTRAST_PAIRS = [
|
|
4
|
+
["foreground", "background", 4.5],
|
|
5
|
+
["card-foreground", "card", 4.5],
|
|
6
|
+
["popover-foreground", "popover", 4.5],
|
|
7
|
+
["primary-foreground", "primary", 4.5],
|
|
8
|
+
["secondary-foreground", "secondary", 4.5],
|
|
9
|
+
["accent-foreground", "accent", 4.5],
|
|
10
|
+
["sidebar-foreground", "sidebar", 4.5],
|
|
11
|
+
["sidebar-primary-foreground", "sidebar-primary", 4.5],
|
|
12
|
+
["link", "background", 4.5],
|
|
13
|
+
["link-hover", "background", 4.5],
|
|
14
|
+
["ring", "background", 3]
|
|
15
|
+
];
|
|
16
|
+
const UNSAFE = /[;{}<>\\]|\/\*|\*\/|@|!|url\s*\(|expression\s*\(|javascript:|[\u0000-\u001f\u007f]/i;
|
|
17
|
+
function normalizeName(raw) {
|
|
18
|
+
return raw.trim().replace(/^--/, "");
|
|
19
|
+
}
|
|
20
|
+
function isSkins(input) {
|
|
21
|
+
const keys = Object.keys(input);
|
|
22
|
+
return keys.length > 0 && keys.every((k) => k === "light" || k === "dark") && keys.every((k) => typeof input[k] === "object");
|
|
23
|
+
}
|
|
24
|
+
function validateBrandTokens(input, options = {}) {
|
|
25
|
+
const { base = {}, maxValueLength = 256 } = options;
|
|
26
|
+
const skins = input == null ? {} : isSkins(input) ? input : { light: input };
|
|
27
|
+
const result = { ok: true, light: {}, dark: {}, errors: [], warnings: [] };
|
|
28
|
+
for (const skin of ["light", "dark"]) {
|
|
29
|
+
const raw = skins[skin] ?? {};
|
|
30
|
+
const clean = {};
|
|
31
|
+
for (const [key, value] of Object.entries(raw)) {
|
|
32
|
+
const token = normalizeName(key);
|
|
33
|
+
const v = typeof value === "string" ? value.trim() : "";
|
|
34
|
+
if (!BRAND_PUBLIC_TOKENS.has(token)) {
|
|
35
|
+
result.errors.push({ skin, token, code: "unknown-token", message: `--${token} is not a public orbital-ds token` });
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (v === "") {
|
|
39
|
+
result.errors.push({ skin, token, code: "empty-value", message: `--${token} has an empty value` });
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (v.length > maxValueLength || UNSAFE.test(v)) {
|
|
43
|
+
result.errors.push({ skin, token, code: "unsafe-value", message: `--${token} has a value that is not a single safe CSS value` });
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
clean[token] = v;
|
|
47
|
+
}
|
|
48
|
+
const themeBase = base[skin] ?? {};
|
|
49
|
+
const lookup = (name) => clean[name] ?? themeBase[name] ?? themeBase[`--${name}`];
|
|
50
|
+
for (const [fg, bg, min] of BRAND_CONTRAST_PAIRS) {
|
|
51
|
+
if (!(fg in clean) && !(bg in clean)) continue;
|
|
52
|
+
const fgValue = lookup(fg);
|
|
53
|
+
const bgValue = lookup(bg);
|
|
54
|
+
if (fgValue == null || bgValue == null) continue;
|
|
55
|
+
const a = parseColor(fgValue);
|
|
56
|
+
const b = parseColor(bgValue);
|
|
57
|
+
if (a == null || b == null) {
|
|
58
|
+
result.warnings.push({ skin, token: fg, code: "contrast-unchecked", message: `--${fg} on --${bg} could not be measured (use resolved colors)` });
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
const ratio = Math.round(contrastRatio(a, b) * 100) / 100;
|
|
62
|
+
if (ratio < min) {
|
|
63
|
+
result.errors.push({ skin, token: fg, code: "contrast", ratio, min, message: `--${fg} on --${bg} is ${ratio}:1 (WCAG AA needs ${min}:1)` });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const prefixed = {};
|
|
67
|
+
for (const [k, v] of Object.entries(clean)) prefixed[`--${k}`] = v;
|
|
68
|
+
result[skin] = prefixed;
|
|
69
|
+
}
|
|
70
|
+
result.ok = result.errors.length === 0;
|
|
71
|
+
return result;
|
|
72
|
+
}
|
|
73
|
+
function brandTokensToCss(brand, { selector = ":root:root", darkSelector = ":root.dark, :root .dark" } = {}) {
|
|
74
|
+
if (!brand.ok) throw new Error(`orbital-ds: refusing to render a brand with ${brand.errors.length} error(s); check validateBrandTokens().errors`);
|
|
75
|
+
const block = (sel, tokens) => {
|
|
76
|
+
const body = Object.entries(tokens).filter(([k, v]) => BRAND_PUBLIC_TOKENS.has(k.replace(/^--/, "")) && !UNSAFE.test(v)).map(([k, v]) => `${k}:${v};`).join("");
|
|
77
|
+
return body ? `${sel}{${body}}` : "";
|
|
78
|
+
};
|
|
79
|
+
return [block(selector, brand.light), block(darkSelector, brand.dark)].filter(Boolean).join("\n");
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
BRAND_CONTRAST_PAIRS,
|
|
83
|
+
brandTokensToCss,
|
|
84
|
+
validateBrandTokens
|
|
85
|
+
};
|
|
@@ -427,14 +427,164 @@ function boxplotOption(input) {
|
|
|
427
427
|
input.extend
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
|
+
function waterfallOption(input) {
|
|
431
|
+
const categories = [];
|
|
432
|
+
const base = [];
|
|
433
|
+
const inc = [];
|
|
434
|
+
const dec = [];
|
|
435
|
+
const total = [];
|
|
436
|
+
let running = 0;
|
|
437
|
+
const push = (name, b, i, d, t) => {
|
|
438
|
+
categories.push(name);
|
|
439
|
+
base.push(b);
|
|
440
|
+
inc.push(i);
|
|
441
|
+
dec.push(d);
|
|
442
|
+
total.push(t);
|
|
443
|
+
};
|
|
444
|
+
if (input.start) {
|
|
445
|
+
running = input.start.value;
|
|
446
|
+
push(input.start.name, "-", "-", "-", running);
|
|
447
|
+
}
|
|
448
|
+
for (const s of input.steps) {
|
|
449
|
+
if (s.value >= 0) {
|
|
450
|
+
push(s.name, running, s.value, "-", "-");
|
|
451
|
+
running += s.value;
|
|
452
|
+
} else {
|
|
453
|
+
running += s.value;
|
|
454
|
+
push(s.name, running, "-", -s.value, "-");
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
if (input.end !== false) push(input.end ?? input.totalLabel, "-", "-", "-", running);
|
|
458
|
+
const fmt = input.valueFormatter;
|
|
459
|
+
const label = (sign) => input.showLabels ? {
|
|
460
|
+
label: {
|
|
461
|
+
show: true,
|
|
462
|
+
position: "top",
|
|
463
|
+
formatter: (p) => typeof p.value === "number" ? `${sign}${fmt ? fmt(p.value) : p.value}` : ""
|
|
464
|
+
}
|
|
465
|
+
} : {};
|
|
466
|
+
const bar = (name, data, sign) => ({ type: "bar", name, stack: "waterfall", data, emphasis: { focus: "series" }, ...label(sign) });
|
|
467
|
+
return finish(
|
|
468
|
+
{
|
|
469
|
+
tooltip: tooltip("item", fmt),
|
|
470
|
+
legend: { ...legend(input.legend, 3), data: [input.increaseLabel, input.decreaseLabel, input.totalLabel] },
|
|
471
|
+
xAxis: { type: "category", data: categories },
|
|
472
|
+
yAxis: valueAxis(fmt),
|
|
473
|
+
series: [
|
|
474
|
+
// Base invisible que eleva cada tramo hasta el acumulado anterior.
|
|
475
|
+
{ type: "bar", name: "base", stack: "waterfall", data: base, silent: true, itemStyle: { color: "transparent", borderColor: "transparent" }, emphasis: { disabled: true }, tooltip: { show: false } },
|
|
476
|
+
bar(input.increaseLabel, inc, "+"),
|
|
477
|
+
bar(input.decreaseLabel, dec, "\u2212"),
|
|
478
|
+
bar(input.totalLabel, total, "")
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
input.extend
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
function cohortOption(input) {
|
|
485
|
+
return heatmapOption({
|
|
486
|
+
xCategories: input.periods,
|
|
487
|
+
yCategories: input.cohorts,
|
|
488
|
+
values: input.values,
|
|
489
|
+
min: input.min ?? 0,
|
|
490
|
+
max: input.max ?? 100,
|
|
491
|
+
showLabels: input.showLabels ?? true,
|
|
492
|
+
showScale: input.showScale ?? false,
|
|
493
|
+
valueFormatter: input.valueFormatter,
|
|
494
|
+
extend: input.extend
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
function calendarOption(input) {
|
|
498
|
+
const locale = input.locale ?? "en";
|
|
499
|
+
const day = new Intl.DateTimeFormat(locale, { weekday: "narrow", timeZone: "UTC" });
|
|
500
|
+
const month = new Intl.DateTimeFormat(locale, { month: "short", timeZone: "UTC" });
|
|
501
|
+
const days = Array.from({ length: 7 }, (_, i) => day.format(Date.UTC(2023, 0, 1 + i)));
|
|
502
|
+
const months = Array.from({ length: 12 }, (_, i) => month.format(Date.UTC(2023, i, 1)));
|
|
503
|
+
const nums = input.data.map(([, v]) => v).filter((v) => v != null);
|
|
504
|
+
const showScale = input.showScale ?? true;
|
|
505
|
+
const fmt = input.valueFormatter;
|
|
506
|
+
return finish(
|
|
507
|
+
{
|
|
508
|
+
tooltip: tooltip("item", void 0, {
|
|
509
|
+
formatter: (p) => {
|
|
510
|
+
const [date, v] = p.value;
|
|
511
|
+
return `${escapeHtml(date)}: ${escapeHtml(typeof v === "number" ? fmt ? fmt(v) : v : "\u2013")}`;
|
|
512
|
+
}
|
|
513
|
+
}),
|
|
514
|
+
visualMap: {
|
|
515
|
+
show: showScale,
|
|
516
|
+
min: input.min ?? 0,
|
|
517
|
+
max: input.max ?? (nums.length ? Math.max(...nums) : 1),
|
|
518
|
+
calculable: false,
|
|
519
|
+
orient: "horizontal",
|
|
520
|
+
left: "center",
|
|
521
|
+
bottom: 0,
|
|
522
|
+
...fmt ? { formatter: (v) => fmt(v) } : {}
|
|
523
|
+
},
|
|
524
|
+
calendar: {
|
|
525
|
+
range: input.range,
|
|
526
|
+
top: 24,
|
|
527
|
+
left: 32,
|
|
528
|
+
right: 8,
|
|
529
|
+
bottom: showScale ? 48 : 8,
|
|
530
|
+
cellSize: ["auto", "auto"],
|
|
531
|
+
splitLine: { show: false },
|
|
532
|
+
yearLabel: { show: false },
|
|
533
|
+
dayLabel: { firstDay: input.firstDay ?? 1, nameMap: days },
|
|
534
|
+
monthLabel: { nameMap: months }
|
|
535
|
+
},
|
|
536
|
+
series: [{ type: "heatmap", coordinateSystem: "calendar", data: input.data.map(([d, v]) => [d, v ?? "-"]) }]
|
|
537
|
+
},
|
|
538
|
+
input.extend
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
function graphOption(input) {
|
|
542
|
+
const cats = input.categories ?? [];
|
|
543
|
+
const values = input.nodes.map((n) => n.value).filter((v) => v != null);
|
|
544
|
+
const maxV = values.length ? Math.max(...values) : 0;
|
|
545
|
+
const size = (v) => v == null || !maxV ? 16 : 10 + 24 * Math.sqrt(v / maxV);
|
|
546
|
+
return finish(
|
|
547
|
+
{
|
|
548
|
+
tooltip: tooltip("item", input.valueFormatter),
|
|
549
|
+
legend: { ...legend(input.legend, cats.length), data: cats },
|
|
550
|
+
series: [
|
|
551
|
+
{
|
|
552
|
+
type: "graph",
|
|
553
|
+
layout: input.layout ?? "force",
|
|
554
|
+
roam: true,
|
|
555
|
+
draggable: (input.layout ?? "force") === "force",
|
|
556
|
+
label: { show: input.showLabels ?? true, position: "right" },
|
|
557
|
+
...input.directed ? { edgeSymbol: ["none", "arrow"], edgeSymbolSize: 8 } : {},
|
|
558
|
+
data: input.nodes.map((n) => ({
|
|
559
|
+
id: n.id,
|
|
560
|
+
name: n.name ?? n.id,
|
|
561
|
+
value: n.value,
|
|
562
|
+
symbolSize: size(n.value),
|
|
563
|
+
...n.category && cats.includes(n.category) ? { category: cats.indexOf(n.category) } : {}
|
|
564
|
+
})),
|
|
565
|
+
links: input.links,
|
|
566
|
+
categories: cats.map((name) => ({ name })),
|
|
567
|
+
force: { repulsion: 160, edgeLength: [48, 120] },
|
|
568
|
+
circular: { rotateLabel: true },
|
|
569
|
+
lineStyle: { curveness: input.layout === "circular" ? 0.2 : 0 },
|
|
570
|
+
emphasis: { focus: "adjacency" }
|
|
571
|
+
}
|
|
572
|
+
]
|
|
573
|
+
},
|
|
574
|
+
input.extend
|
|
575
|
+
);
|
|
576
|
+
}
|
|
430
577
|
export {
|
|
431
578
|
barOption,
|
|
432
579
|
boxplotOption,
|
|
580
|
+
calendarOption,
|
|
433
581
|
candlestickOption,
|
|
582
|
+
cohortOption,
|
|
434
583
|
comboOption,
|
|
435
584
|
escapeHtml,
|
|
436
585
|
funnelOption,
|
|
437
586
|
gaugeOption,
|
|
587
|
+
graphOption,
|
|
438
588
|
heatmapOption,
|
|
439
589
|
lineOption,
|
|
440
590
|
pieOption,
|
|
@@ -444,5 +594,6 @@ export {
|
|
|
444
594
|
sankeyOption,
|
|
445
595
|
scatterOption,
|
|
446
596
|
sunburstOption,
|
|
447
|
-
treemapOption
|
|
597
|
+
treemapOption,
|
|
598
|
+
waterfallOption
|
|
448
599
|
};
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
} from "echarts/charts";
|
|
22
22
|
import {
|
|
23
23
|
AriaComponent,
|
|
24
|
+
CalendarComponent,
|
|
24
25
|
DatasetComponent,
|
|
25
26
|
DataZoomComponent,
|
|
26
27
|
GraphicComponent,
|
|
@@ -64,6 +65,7 @@ function dsEcharts() {
|
|
|
64
65
|
SankeyChart,
|
|
65
66
|
ScatterChart,
|
|
66
67
|
AriaComponent,
|
|
68
|
+
CalendarComponent,
|
|
67
69
|
DatasetComponent,
|
|
68
70
|
DataZoomComponent,
|
|
69
71
|
GraphicComponent,
|
package/dist/lib/i18n.js
CHANGED
|
@@ -160,6 +160,7 @@ const en = {
|
|
|
160
160
|
composerRemoveFile: "Remove {name}",
|
|
161
161
|
tagRemove: "Remove {name}",
|
|
162
162
|
tagAdd: "Add a tag",
|
|
163
|
+
planNotIncluded: "Not included",
|
|
163
164
|
composerCounter: "{count} of {max}",
|
|
164
165
|
composerDrop: "Drop files to attach",
|
|
165
166
|
composerUploading: "Uploading\u2026",
|
|
@@ -694,6 +695,7 @@ const es = {
|
|
|
694
695
|
composerRemoveFile: "Quitar {name}",
|
|
695
696
|
tagRemove: "Quitar {name}",
|
|
696
697
|
tagAdd: "A\xF1adir etiqueta",
|
|
698
|
+
planNotIncluded: "No incluido",
|
|
697
699
|
composerCounter: "{count} de {max}",
|
|
698
700
|
composerDrop: "Suelta los archivos para adjuntarlos",
|
|
699
701
|
composerUploading: "Subiendo\u2026",
|
|
@@ -1228,6 +1230,7 @@ const ptBR = {
|
|
|
1228
1230
|
composerRemoveFile: "Remover {name}",
|
|
1229
1231
|
tagRemove: "Remover {name}",
|
|
1230
1232
|
tagAdd: "Adicionar etiqueta",
|
|
1233
|
+
planNotIncluded: "N\xE3o inclu\xEDdo",
|
|
1231
1234
|
composerCounter: "{count} de {max}",
|
|
1232
1235
|
composerDrop: "Solte os arquivos para anexar",
|
|
1233
1236
|
composerUploading: "Enviando\u2026",
|
package/dist/lib/locales/de.js
CHANGED
|
@@ -154,6 +154,7 @@ const de = {
|
|
|
154
154
|
composerRemoveFile: "{name} entfernen",
|
|
155
155
|
tagRemove: "{name} entfernen",
|
|
156
156
|
tagAdd: "Etikett hinzuf\xFCgen",
|
|
157
|
+
planNotIncluded: "Nicht enthalten",
|
|
157
158
|
composerCounter: "{count} von {max}",
|
|
158
159
|
composerDrop: "Dateien zum Anh\xE4ngen hier ablegen",
|
|
159
160
|
composerUploading: "Wird hochgeladen\u2026",
|
package/dist/lib/locales/fr.js
CHANGED
|
@@ -154,6 +154,7 @@ const fr = {
|
|
|
154
154
|
composerRemoveFile: "Supprimer {name}",
|
|
155
155
|
tagRemove: "Retirer {name}",
|
|
156
156
|
tagAdd: "Ajouter une \xE9tiquette",
|
|
157
|
+
planNotIncluded: "Non inclus",
|
|
157
158
|
composerCounter: "{count} sur {max}",
|
|
158
159
|
composerDrop: "D\xE9posez des fichiers pour les joindre",
|
|
159
160
|
composerUploading: "Envoi en cours\u2026",
|
package/dist/lib/locales/he.js
CHANGED
|
@@ -154,6 +154,7 @@ const he = {
|
|
|
154
154
|
composerRemoveFile: "\u05D4\u05E1\u05E8\u05EA {name}",
|
|
155
155
|
tagRemove: "\u05D4\u05E1\u05E8\u05EA {name}",
|
|
156
156
|
tagAdd: "\u05D4\u05D5\u05E1\u05E4\u05EA \u05EA\u05D2\u05D9\u05EA",
|
|
157
|
+
planNotIncluded: "\u05DC\u05D0 \u05DB\u05DC\u05D5\u05DC",
|
|
157
158
|
composerCounter: "{count} \u05DE\u05EA\u05D5\u05DA {max}",
|
|
158
159
|
composerDrop: "\u05E9\u05D7\u05E8\u05E8\u05D5 \u05E7\u05D1\u05E6\u05D9\u05DD \u05DB\u05D3\u05D9 \u05DC\u05E6\u05E8\u05E3 \u05D0\u05D5\u05EA\u05DD",
|
|
159
160
|
composerUploading: "\u05DE\u05E2\u05DC\u05D4\u2026",
|
package/dist/lib/locales/it.js
CHANGED
|
@@ -154,6 +154,7 @@ const it = {
|
|
|
154
154
|
composerRemoveFile: "Rimuovi {name}",
|
|
155
155
|
tagRemove: "Rimuovi {name}",
|
|
156
156
|
tagAdd: "Aggiungi etichetta",
|
|
157
|
+
planNotIncluded: "Non incluso",
|
|
157
158
|
composerCounter: "{count} di {max}",
|
|
158
159
|
composerDrop: "Trascina i file da allegare",
|
|
159
160
|
composerUploading: "Caricamento\u2026",
|
package/dist/ui/context-menu.js
CHANGED
|
@@ -26,7 +26,7 @@ function ContextMenuContent({
|
|
|
26
26
|
className,
|
|
27
27
|
align = "start",
|
|
28
28
|
alignOffset = 4,
|
|
29
|
-
side = "
|
|
29
|
+
side = "inline-end",
|
|
30
30
|
sideOffset = 0,
|
|
31
31
|
...props
|
|
32
32
|
}) {
|
|
@@ -124,7 +124,7 @@ function ContextMenuSubContent({
|
|
|
124
124
|
{
|
|
125
125
|
"data-slot": "context-menu-sub-content",
|
|
126
126
|
className: "shadow-popover",
|
|
127
|
-
side: "
|
|
127
|
+
side: "inline-end",
|
|
128
128
|
...props
|
|
129
129
|
}
|
|
130
130
|
);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
import { AuthBackdrop } from "./auth-backdrop.js";
|
|
5
|
+
function CtaBanner({
|
|
6
|
+
title,
|
|
7
|
+
description,
|
|
8
|
+
actions,
|
|
9
|
+
layout = "centered",
|
|
10
|
+
backdrop = "none",
|
|
11
|
+
backdropMedia,
|
|
12
|
+
backdropGlass = false,
|
|
13
|
+
titleAs: Title = "h2",
|
|
14
|
+
className,
|
|
15
|
+
children,
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
const withFx = backdrop !== "none" || backdropGlass;
|
|
19
|
+
const inline = layout === "inline";
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
"section",
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "cta-banner",
|
|
24
|
+
"data-layout": layout,
|
|
25
|
+
"data-backdrop": withFx ? backdrop : void 0,
|
|
26
|
+
className: cn(
|
|
27
|
+
"@container/cta relative isolate w-full overflow-hidden rounded-(--ds-cta-radius) bg-(--ds-cta-bg) p-(--ds-cta-p) text-(--ds-cta-fg) @3xl/cta:p-(--ds-cta-p-wide)",
|
|
28
|
+
className
|
|
29
|
+
),
|
|
30
|
+
...props,
|
|
31
|
+
children: [
|
|
32
|
+
withFx ? /* @__PURE__ */ jsx(AuthBackdrop, { variant: backdrop, media: backdropMedia, glass: backdropGlass, className: "-z-10" }) : null,
|
|
33
|
+
/* @__PURE__ */ jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: cn(
|
|
37
|
+
"relative flex flex-col gap-(--ds-hero-content-gap)",
|
|
38
|
+
inline ? "items-start text-start @3xl/cta:flex-row @3xl/cta:items-center @3xl/cta:justify-between" : "items-center text-center"
|
|
39
|
+
),
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsxs("div", { className: cn("flex min-w-0 flex-col gap-(--ds-landing-header-gap)", !inline && "max-w-(--ds-landing-measure) items-center"), children: [
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
Title,
|
|
44
|
+
{
|
|
45
|
+
"data-slot": "cta-banner-title",
|
|
46
|
+
className: "text-(length:--ds-landing-title-size) leading-(--ds-hero-title-leading) font-(--ds-heading-weight) tracking-(--ds-heading-tracking) text-balance",
|
|
47
|
+
children: title
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
description != null ? /* @__PURE__ */ jsx("p", { "data-slot": "cta-banner-description", className: "text-(length:--ds-hero-description-size) text-pretty text-(--ds-cta-description-fg)", children: description }) : null
|
|
51
|
+
] }),
|
|
52
|
+
actions != null ? /* @__PURE__ */ jsx("div", { "data-slot": "cta-banner-actions", className: cn("flex shrink-0 flex-wrap items-center gap-3", !inline && "justify-center"), children: actions }) : null
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
children
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
CtaBanner
|
|
63
|
+
};
|
package/dist/ui/detail-panel.js
CHANGED
package/dist/ui/faq.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./accordion.js";
|
|
5
|
+
function Faq({ items, structuredData = false, className, ...props }) {
|
|
6
|
+
const ld = structuredData ? items.filter((it) => typeof it.question === "string" && typeof it.answer === "string").map((it) => ({ "@type": "Question", name: it.question, acceptedAnswer: { "@type": "Answer", text: it.answer } })) : [];
|
|
7
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8
|
+
/* @__PURE__ */ jsx(Accordion, { "data-slot": "faq", className: cn("bg-card text-card-foreground", className), ...props, children: items.map((it, i) => /* @__PURE__ */ jsxs(AccordionItem, { value: it.value ?? String(i), children: [
|
|
9
|
+
/* @__PURE__ */ jsx(AccordionTrigger, { className: "text-base", children: it.question }),
|
|
10
|
+
/* @__PURE__ */ jsx(AccordionContent, { className: "text-pretty text-muted-foreground", children: it.answer })
|
|
11
|
+
] }, it.value ?? i)) }),
|
|
12
|
+
ld.length > 0 ? /* @__PURE__ */ jsx(
|
|
13
|
+
"script",
|
|
14
|
+
{
|
|
15
|
+
type: "application/ld+json",
|
|
16
|
+
dangerouslySetInnerHTML: {
|
|
17
|
+
__html: JSON.stringify({ "@context": "https://schema.org", "@type": "FAQPage", mainEntity: ld }).replace(/</g, "\\u003c")
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
) : null
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
Faq
|
|
25
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { IconTile } from "./icon-tile.js";
|
|
4
|
+
const COLS = { 2: "@4xl/features:grid-cols-2", 3: "@4xl/features:grid-cols-3", 4: "@4xl/features:grid-cols-4" };
|
|
5
|
+
function FeatureGrid({ columns = 3, variant = "plain", align = "start", className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", { className: "@container/features w-full", children: /* @__PURE__ */ jsx(
|
|
7
|
+
"ul",
|
|
8
|
+
{
|
|
9
|
+
"data-slot": "feature-grid",
|
|
10
|
+
"data-variant": variant,
|
|
11
|
+
"data-align": align,
|
|
12
|
+
className: cn("group/features grid grid-cols-1 gap-(--ds-landing-grid-gap) @xl/features:grid-cols-2", COLS[columns], className),
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
) });
|
|
16
|
+
}
|
|
17
|
+
function Feature({ icon, iconTone = "primary", title, description, className, children, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsxs(
|
|
19
|
+
"li",
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "feature",
|
|
22
|
+
className: cn(
|
|
23
|
+
"flex min-w-0 flex-col gap-(--ds-feature-gap) group-data-[align=center]/features:items-center group-data-[align=center]/features:text-center",
|
|
24
|
+
"group-data-[variant=card]/features:rounded-card group-data-[variant=card]/features:border group-data-[variant=card]/features:bg-card group-data-[variant=card]/features:p-(--ds-card-spacing) group-data-[variant=card]/features:text-card-foreground group-data-[variant=card]/features:shadow-card",
|
|
25
|
+
className
|
|
26
|
+
),
|
|
27
|
+
...props,
|
|
28
|
+
children: [
|
|
29
|
+
icon != null ? /* @__PURE__ */ jsx(IconTile, { "data-slot": "feature-icon", tone: iconTone, children: icon }) : null,
|
|
30
|
+
/* @__PURE__ */ jsx("h3", { "data-slot": "feature-title", className: "font-(--ds-heading-weight) text-base", children: title }),
|
|
31
|
+
description != null ? /* @__PURE__ */ jsx("p", { "data-slot": "feature-description", className: "text-sm text-pretty text-muted-foreground", children: description }) : null,
|
|
32
|
+
children
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
Feature,
|
|
39
|
+
FeatureGrid
|
|
40
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
function LandingSection({
|
|
6
|
+
title,
|
|
7
|
+
description,
|
|
8
|
+
eyebrow,
|
|
9
|
+
actions,
|
|
10
|
+
align = "center",
|
|
11
|
+
titleAs: Title = "h2",
|
|
12
|
+
className,
|
|
13
|
+
children,
|
|
14
|
+
...props
|
|
15
|
+
}) {
|
|
16
|
+
const id = React.useId();
|
|
17
|
+
const center = align === "center";
|
|
18
|
+
const hasHeader = title != null || description != null || eyebrow != null || actions != null;
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
"section",
|
|
21
|
+
{
|
|
22
|
+
"data-slot": "landing-section",
|
|
23
|
+
"data-align": align,
|
|
24
|
+
"aria-labelledby": title != null ? id : void 0,
|
|
25
|
+
className: cn("@container/landing w-full px-(--ds-hero-px) py-(--ds-landing-py) @3xl/landing:py-(--ds-landing-py-wide)", className),
|
|
26
|
+
...props,
|
|
27
|
+
children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-(--ds-page-max-w) flex-col gap-(--ds-landing-body-gap)", children: [
|
|
28
|
+
hasHeader ? /* @__PURE__ */ jsxs(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
"data-slot": "landing-section-header",
|
|
32
|
+
className: cn(
|
|
33
|
+
"flex max-w-(--ds-landing-measure) flex-col gap-(--ds-landing-header-gap)",
|
|
34
|
+
center ? "mx-auto items-center text-center" : "items-start text-start"
|
|
35
|
+
),
|
|
36
|
+
children: [
|
|
37
|
+
eyebrow != null ? /* @__PURE__ */ jsx("div", { "data-slot": "landing-section-eyebrow", className: "text-sm font-(--ds-medium-weight) text-primary", children: eyebrow }) : null,
|
|
38
|
+
title != null ? /* @__PURE__ */ jsx(
|
|
39
|
+
Title,
|
|
40
|
+
{
|
|
41
|
+
id,
|
|
42
|
+
"data-slot": "landing-section-title",
|
|
43
|
+
className: "text-(length:--ds-landing-title-size) leading-(--ds-hero-title-leading) font-(--ds-heading-weight) tracking-(--ds-heading-tracking) text-balance @3xl/landing:text-(length:--ds-landing-title-size-wide)",
|
|
44
|
+
children: title
|
|
45
|
+
}
|
|
46
|
+
) : null,
|
|
47
|
+
description != null ? /* @__PURE__ */ jsx("p", { "data-slot": "landing-section-description", className: "text-(length:--ds-hero-description-size) text-pretty text-muted-foreground", children: description }) : null,
|
|
48
|
+
actions != null ? /* @__PURE__ */ jsx("div", { "data-slot": "landing-section-actions", className: cn("flex flex-wrap items-center gap-3", center && "justify-center"), children: actions }) : null
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
) : null,
|
|
52
|
+
children != null ? /* @__PURE__ */ jsx("div", { "data-slot": "landing-section-body", className: "min-w-0", children }) : null
|
|
53
|
+
] })
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
LandingSection
|
|
59
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, MinusIcon } from "lucide-react";
|
|
4
|
+
import { useDsMessages } from "../hooks/use-ds-messages.js";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
function PricingTable({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { className: "@container/pricing w-full", children: /* @__PURE__ */ jsx(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
"data-slot": "pricing-table",
|
|
11
|
+
className: cn(
|
|
12
|
+
"grid grid-cols-1 items-stretch gap-(--ds-landing-grid-gap) @2xl/pricing:grid-cols-2 @5xl/pricing:auto-cols-fr @5xl/pricing:grid-flow-col @5xl/pricing:grid-cols-none",
|
|
13
|
+
className
|
|
14
|
+
),
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
) });
|
|
18
|
+
}
|
|
19
|
+
function PricingPlan({ name, price, period, description, badge, featured = false, action, footnote, className, children, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "pricing-plan",
|
|
24
|
+
"data-featured": featured || void 0,
|
|
25
|
+
className: cn(
|
|
26
|
+
"flex min-w-0 flex-col gap-(--ds-card-spacing) rounded-card border bg-card p-(--ds-card-spacing) text-sm text-card-foreground shadow-card",
|
|
27
|
+
"data-featured:border-(--ds-pricing-featured-ring) data-featured:ring-(length:--ds-pricing-featured-ring-w) data-featured:ring-(--ds-pricing-featured-ring)",
|
|
28
|
+
className
|
|
29
|
+
),
|
|
30
|
+
...props,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("div", { "data-slot": "pricing-plan-header", className: "flex flex-col gap-2", children: [
|
|
33
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
34
|
+
/* @__PURE__ */ jsx("h3", { "data-slot": "pricing-plan-name", className: "text-base font-(--ds-heading-weight)", children: name }),
|
|
35
|
+
badge
|
|
36
|
+
] }),
|
|
37
|
+
description != null ? /* @__PURE__ */ jsx("p", { className: "text-pretty text-muted-foreground", children: description }) : null,
|
|
38
|
+
/* @__PURE__ */ jsxs("p", { className: "flex flex-wrap items-baseline gap-1", children: [
|
|
39
|
+
/* @__PURE__ */ jsx(
|
|
40
|
+
"span",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "pricing-plan-price",
|
|
43
|
+
className: "text-(length:--ds-pricing-price-size) leading-none font-(--ds-heading-weight) tracking-(--ds-heading-tracking) tabular-nums",
|
|
44
|
+
children: price
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
period != null ? /* @__PURE__ */ jsx("span", { "data-slot": "pricing-plan-period", className: "text-muted-foreground", children: period }) : null
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
action != null ? /* @__PURE__ */ jsxs("div", { "data-slot": "pricing-plan-action", className: "flex flex-col gap-2", children: [
|
|
51
|
+
action,
|
|
52
|
+
footnote != null ? /* @__PURE__ */ jsx("p", { className: "text-center text-xs text-muted-foreground", children: footnote }) : null
|
|
53
|
+
] }) : null,
|
|
54
|
+
children != null ? /* @__PURE__ */ jsx("ul", { "data-slot": "pricing-plan-features", className: "flex flex-col gap-2 border-t border-border pt-(--ds-card-spacing)", children }) : null
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function PricingFeature({ included = true, className, children, ...props }) {
|
|
60
|
+
const t = useDsMessages();
|
|
61
|
+
return /* @__PURE__ */ jsxs(
|
|
62
|
+
"li",
|
|
63
|
+
{
|
|
64
|
+
"data-slot": "pricing-feature",
|
|
65
|
+
"data-included": included,
|
|
66
|
+
className: cn("flex items-start gap-2 data-[included=false]:text-muted-foreground", className),
|
|
67
|
+
...props,
|
|
68
|
+
children: [
|
|
69
|
+
included ? /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": true, className: "mt-0.5 size-4 shrink-0 text-primary" }) : /* @__PURE__ */ jsx(MinusIcon, { "aria-hidden": true, className: "mt-0.5 size-4 shrink-0" }),
|
|
70
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
71
|
+
children,
|
|
72
|
+
included ? null : /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
73
|
+
" (",
|
|
74
|
+
t.planNotIncluded,
|
|
75
|
+
")"
|
|
76
|
+
] })
|
|
77
|
+
] })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
PricingFeature,
|
|
84
|
+
PricingPlan,
|
|
85
|
+
PricingTable
|
|
86
|
+
};
|