@ambasada/ui 0.0.0-stage → 0.7.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/LICENSE +21 -0
- package/README.md +107 -2
- package/dist/ambasada-ui.css +615 -0
- package/dist/components.css +452 -0
- package/dist/fonts/OFL-inter.txt +93 -0
- package/dist/fonts/OFL-jetbrains-mono.txt +93 -0
- package/dist/fonts/inter-variable-latin-ext.woff2 +0 -0
- package/dist/fonts/inter-variable-latin.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-variable-latin-ext.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-variable-latin.woff2 +0 -0
- package/dist/fonts.css +39 -0
- package/dist/react.d.ts +70 -0
- package/dist/react.js +114 -0
- package/dist/tokens.css +121 -0
- package/package.json +66 -3
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from "react";
|
|
2
|
+
/** The mini-app column: clear of the host bar and the safe areas. */
|
|
3
|
+
export declare function Page({ children, className }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function Card({ title, children, className }: {
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
13
|
+
variant?: "primary" | "secondary";
|
|
14
|
+
block?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/** Primary (brand red, one per screen) or secondary. `type` defaults to "button". */
|
|
17
|
+
export declare function Button({ variant, block, className, type, ...rest }: ButtonProps): import("react").JSX.Element;
|
|
18
|
+
export type RowProps = {
|
|
19
|
+
icon?: ReactNode;
|
|
20
|
+
title: ReactNode;
|
|
21
|
+
sub?: ReactNode;
|
|
22
|
+
right?: ReactNode;
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
href?: string;
|
|
25
|
+
target?: string;
|
|
26
|
+
tone?: "danger" | "muted";
|
|
27
|
+
};
|
|
28
|
+
/** Big tappable row: icon on the left, text, value or chevron on the right. A link with `href`, a button with `onClick`. */
|
|
29
|
+
export declare function Row({ icon, title, sub, right, onClick, href, target, tone }: RowProps): import("react").JSX.Element;
|
|
30
|
+
/** A list: rows in one bordered block, with an optional title and action above it. */
|
|
31
|
+
export declare function Group({ children, title, action }: {
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
title?: ReactNode;
|
|
34
|
+
action?: ReactNode;
|
|
35
|
+
}): import("react").JSX.Element;
|
|
36
|
+
export declare function Pill({ tone, children, pulse }: {
|
|
37
|
+
tone?: "good" | "bad" | "warn" | "muted" | "accent";
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
pulse?: boolean;
|
|
40
|
+
}): import("react").JSX.Element;
|
|
41
|
+
/** Bottom sheet (a centred dialog on wide screens). Closes on backdrop tap and Escape; the page behind does not scroll. */
|
|
42
|
+
export declare function Sheet({ open, onClose, title, children, footer }: {
|
|
43
|
+
open: boolean;
|
|
44
|
+
onClose: () => void;
|
|
45
|
+
title?: ReactNode;
|
|
46
|
+
children: ReactNode;
|
|
47
|
+
footer?: ReactNode;
|
|
48
|
+
}): import("react").JSX.Element | null;
|
|
49
|
+
export type StepperProps = {
|
|
50
|
+
value: number;
|
|
51
|
+
onChange: (v: number) => void;
|
|
52
|
+
min?: number;
|
|
53
|
+
max?: number;
|
|
54
|
+
step?: number;
|
|
55
|
+
unit?: string;
|
|
56
|
+
presets?: number[];
|
|
57
|
+
format?: (v: number) => string;
|
|
58
|
+
};
|
|
59
|
+
/** − value + for amounts, rounded to cents and kept within min..max, with optional preset chips. */
|
|
60
|
+
export declare function Stepper({ value, onChange, min, max, step, unit, presets, format }: StepperProps): import("react").JSX.Element;
|
|
61
|
+
export declare function Empty({ icon, title, hint, action }: {
|
|
62
|
+
icon?: ReactNode;
|
|
63
|
+
title: string;
|
|
64
|
+
hint?: string;
|
|
65
|
+
action?: ReactNode;
|
|
66
|
+
}): import("react").JSX.Element;
|
|
67
|
+
/** Grey bars where the content will be: use it instead of a spinner. */
|
|
68
|
+
export declare function Skeleton({ lines }: {
|
|
69
|
+
lines?: number;
|
|
70
|
+
}): import("react").JSX.Element;
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// ../ui/src/react.tsx
|
|
4
|
+
import { useEffect, useId } from "react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...names) => names.filter(Boolean).join(" ");
|
|
7
|
+
var fmt = (v) => v.toLocaleString("en-US", { maximumFractionDigits: 2 });
|
|
8
|
+
function Icon({ d, size = 22, ...p }) {
|
|
9
|
+
return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.8, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...p, children: /* @__PURE__ */ jsx("path", { d }) });
|
|
10
|
+
}
|
|
11
|
+
function Page({ children, className }) {
|
|
12
|
+
return /* @__PURE__ */ jsx("main", { className: cx("ui-page", className), children });
|
|
13
|
+
}
|
|
14
|
+
function Card({ title, children, className }) {
|
|
15
|
+
return /* @__PURE__ */ jsxs("section", { className: cx("ui-card", className), children: [
|
|
16
|
+
title && /* @__PURE__ */ jsx("h2", { className: "ui-card-title", children: title }),
|
|
17
|
+
children
|
|
18
|
+
] });
|
|
19
|
+
}
|
|
20
|
+
function Button({ variant = "primary", block, className, type = "button", ...rest }) {
|
|
21
|
+
return /* @__PURE__ */ jsx("button", { type, className: cx("ui-button", variant === "secondary" && "secondary", block && "block", className), ...rest });
|
|
22
|
+
}
|
|
23
|
+
function Row({ icon, title, sub, right, onClick, href, target, tone }) {
|
|
24
|
+
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25
|
+
icon && /* @__PURE__ */ jsx("span", { className: "row-icon", children: icon }),
|
|
26
|
+
/* @__PURE__ */ jsxs("span", { className: "row-text", children: [
|
|
27
|
+
/* @__PURE__ */ jsx("span", { className: "row-title", children: title }),
|
|
28
|
+
sub && /* @__PURE__ */ jsx("span", { className: "row-sub", children: sub })
|
|
29
|
+
] }),
|
|
30
|
+
right !== void 0 ? /* @__PURE__ */ jsx("span", { className: "row-right", children: right }) : (onClick || href) && /* @__PURE__ */ jsx(Icon, { d: "m9 6 6 6-6 6", className: "row-chev" })
|
|
31
|
+
] });
|
|
32
|
+
const cls = cx("ui-row", (onClick || href) && "tappable", tone);
|
|
33
|
+
if (href) return /* @__PURE__ */ jsx("a", { className: cls, href, target, rel: target === "_blank" ? "noopener" : void 0, children: body });
|
|
34
|
+
if (onClick) return /* @__PURE__ */ jsx("button", { type: "button", className: cls, onClick, children: body });
|
|
35
|
+
return /* @__PURE__ */ jsx("div", { className: cls, children: body });
|
|
36
|
+
}
|
|
37
|
+
function Group({ children, title, action }) {
|
|
38
|
+
return /* @__PURE__ */ jsxs("section", { className: "ui-group", children: [
|
|
39
|
+
(title || action) && /* @__PURE__ */ jsxs("div", { className: "ui-group-head", children: [
|
|
40
|
+
/* @__PURE__ */ jsx("h2", { children: title }),
|
|
41
|
+
action
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ jsx("div", { className: "ui-group-body", children })
|
|
44
|
+
] });
|
|
45
|
+
}
|
|
46
|
+
function Pill({ tone = "muted", children, pulse }) {
|
|
47
|
+
return /* @__PURE__ */ jsxs("span", { className: cx("ui-pill", tone, pulse && "pulse"), children: [
|
|
48
|
+
/* @__PURE__ */ jsx("i", {}),
|
|
49
|
+
children
|
|
50
|
+
] });
|
|
51
|
+
}
|
|
52
|
+
function Sheet({ open, onClose, title, children, footer }) {
|
|
53
|
+
const id = useId();
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (!open) return;
|
|
56
|
+
const onKey = (e) => e.key === "Escape" && onClose();
|
|
57
|
+
document.addEventListener("keydown", onKey);
|
|
58
|
+
document.body.classList.add("ui-sheet-open");
|
|
59
|
+
return () => {
|
|
60
|
+
document.removeEventListener("keydown", onKey);
|
|
61
|
+
document.body.classList.remove("ui-sheet-open");
|
|
62
|
+
};
|
|
63
|
+
}, [open, onClose]);
|
|
64
|
+
if (!open) return null;
|
|
65
|
+
return /* @__PURE__ */ jsx("div", { className: "ui-sheet-backdrop", onClick: onClose, children: /* @__PURE__ */ jsxs("div", { className: "ui-sheet", role: "dialog", "aria-modal": "true", "aria-labelledby": title ? id : void 0, onClick: (e) => e.stopPropagation(), children: [
|
|
66
|
+
/* @__PURE__ */ jsx("div", { className: "ui-sheet-grip" }),
|
|
67
|
+
title && /* @__PURE__ */ jsxs("div", { className: "ui-sheet-head", children: [
|
|
68
|
+
/* @__PURE__ */ jsx("h2", { id, children: title }),
|
|
69
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "ui-icon-btn", "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsx(Icon, { d: "M6 6l12 12M18 6 6 18" }) })
|
|
70
|
+
] }),
|
|
71
|
+
/* @__PURE__ */ jsx("div", { className: "ui-sheet-body", children }),
|
|
72
|
+
footer && /* @__PURE__ */ jsx("div", { className: "ui-sheet-foot", children: footer })
|
|
73
|
+
] }) });
|
|
74
|
+
}
|
|
75
|
+
function Stepper({ value, onChange, min = 0, max = 1e5, step = 1, unit, presets, format = fmt }) {
|
|
76
|
+
const clamp = (v) => Math.min(max, Math.max(min, Math.round(v * 100) / 100));
|
|
77
|
+
return /* @__PURE__ */ jsxs("div", { className: "ui-stepper-wrap", children: [
|
|
78
|
+
/* @__PURE__ */ jsxs("div", { className: "ui-stepper", children: [
|
|
79
|
+
/* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Less", onClick: () => onChange(clamp(value - step)), disabled: value <= min, children: /* @__PURE__ */ jsx(Icon, { d: "M5 12h14" }) }),
|
|
80
|
+
/* @__PURE__ */ jsxs("span", { className: "ui-stepper-value", children: [
|
|
81
|
+
format(value),
|
|
82
|
+
unit && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
83
|
+
" ",
|
|
84
|
+
/* @__PURE__ */ jsx("small", { children: unit })
|
|
85
|
+
] })
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ jsx("button", { type: "button", "aria-label": "More", onClick: () => onChange(clamp(value + step)), disabled: value >= max, children: /* @__PURE__ */ jsx(Icon, { d: "M12 5v14M5 12h14" }) })
|
|
88
|
+
] }),
|
|
89
|
+
presets && /* @__PURE__ */ jsx("div", { className: "ui-presets", children: presets.map((p) => /* @__PURE__ */ jsx("button", { type: "button", className: p === value ? "on" : "", onClick: () => onChange(p), children: format(p) }, p)) })
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
function Empty({ icon, title, hint, action }) {
|
|
93
|
+
return /* @__PURE__ */ jsxs("div", { className: "ui-empty", children: [
|
|
94
|
+
icon && /* @__PURE__ */ jsx("span", { className: "ui-empty-icon", children: icon }),
|
|
95
|
+
/* @__PURE__ */ jsx("strong", { children: title }),
|
|
96
|
+
hint && /* @__PURE__ */ jsx("span", { children: hint }),
|
|
97
|
+
action
|
|
98
|
+
] });
|
|
99
|
+
}
|
|
100
|
+
function Skeleton({ lines = 3 }) {
|
|
101
|
+
return /* @__PURE__ */ jsx("div", { className: "ui-skeleton", "aria-busy": "true", children: Array.from({ length: lines }).map((_, i) => /* @__PURE__ */ jsx("span", { style: { width: `${90 - i % 3 * 18}%` } }, i)) });
|
|
102
|
+
}
|
|
103
|
+
export {
|
|
104
|
+
Button,
|
|
105
|
+
Card,
|
|
106
|
+
Empty,
|
|
107
|
+
Group,
|
|
108
|
+
Page,
|
|
109
|
+
Pill,
|
|
110
|
+
Row,
|
|
111
|
+
Sheet,
|
|
112
|
+
Skeleton,
|
|
113
|
+
Stepper
|
|
114
|
+
};
|
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @ambasada/ui design tokens: the Ambasada look as CSS custom properties.
|
|
3
|
+
*
|
|
4
|
+
* Source of truth is the Ambasada hub (repo ambasada-landing, hub.ambasada.id / ambasada.pro):
|
|
5
|
+
* - src/app/globals.css the @theme block ("V5 light + brand red")
|
|
6
|
+
* - src/app/layout.tsx Inter + JetBrains Mono via next/font
|
|
7
|
+
* - src/lib/member/card-style.ts wallet pass palettes (Apple / Google Wallet)
|
|
8
|
+
* - src/app/card/frames.tsx WalletCard, the on-screen copy of the pass
|
|
9
|
+
* Light only: the Ambasada app is light, and so are its mini apps (docs/MINI-APPS.md §9).
|
|
10
|
+
* Usage and rules: docs/DESIGN-SYSTEM.md. The fonts themselves are in fonts.css.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
:root {
|
|
14
|
+
color-scheme: light;
|
|
15
|
+
|
|
16
|
+
/* Brand */
|
|
17
|
+
--color-accent: #ff002e; /* hub --color-accent, the logo red; "Ambasada red" pass palette rgb(255,0,46) */
|
|
18
|
+
--color-accent-hover: #e5002a; /* hub .prose-ambasada a:hover */
|
|
19
|
+
--color-accent-text: #e5002a; /* red for small text on light: #ff002e is 3.8:1 on bg, this is 4.6:1 (AA) */
|
|
20
|
+
--color-accent-press: #b30020; /* hub tier-theme "Active" gradient end */
|
|
21
|
+
--color-accent-2: #ff6b00; /* hub --color-accent-2, used sparingly (warm highlights) */
|
|
22
|
+
--color-accent-soft: #ffe9ec; /* hub --color-accent-soft, tinted backgrounds */
|
|
23
|
+
--color-accent-ring: rgba(255, 0, 46, 0.45); /* hub .card-hover:hover border */
|
|
24
|
+
--color-on-accent: #ffffff; /* hub primary button text, pass foreground */
|
|
25
|
+
|
|
26
|
+
/* Neutrals */
|
|
27
|
+
--color-bg: #fafaf9; /* hub --color-bg (stone-50) */
|
|
28
|
+
--color-surface: #ffffff; /* hub --color-surface */
|
|
29
|
+
--color-surface-2: #f5f5f4; /* stone-100, hub Clerk card footer and row hover */
|
|
30
|
+
--color-ink: #0c0a09; /* hub --color-ink (stone-950) */
|
|
31
|
+
--color-ink-2: #57534e; /* hub --color-ink-2 (stone-600), secondary text */
|
|
32
|
+
--color-ink-3: #78716c; /* hub --color-ink-3 (stone-500), labels, WCAG AA on bg */
|
|
33
|
+
--color-line: #e7e5e4; /* hub --color-line (stone-200), borders and dividers */
|
|
34
|
+
--color-line-strong: #d6d3d1; /* stone-300, input borders on hover */
|
|
35
|
+
--color-backdrop: rgba(12, 10, 9, 0.5); /* behind bottom sheets: ink at 50% */
|
|
36
|
+
|
|
37
|
+
/* Status */
|
|
38
|
+
--color-success: #16a34a; /* hub --color-success */
|
|
39
|
+
--color-warn: #f59e0b; /* hub --color-warn */
|
|
40
|
+
--color-danger: #dc2626; /* red-600: distinct from the brand red so errors never read as branding */
|
|
41
|
+
--color-info: #2563eb; /* hub --color-info */
|
|
42
|
+
--color-success-soft: #ecfdf3; /* tint of success for notices */
|
|
43
|
+
--color-warn-soft: #fff8eb; /* tint of warn for notices */
|
|
44
|
+
--color-danger-soft: #fef2f2; /* tint of danger for notices */
|
|
45
|
+
--color-warn-line: #fcd9a0;
|
|
46
|
+
--color-danger-line: #fecaca;
|
|
47
|
+
--color-success-line: #bbf7d0;
|
|
48
|
+
|
|
49
|
+
/* The member card (wallet pass, "Ambasada red" palette, src/lib/member/card-style.ts) */
|
|
50
|
+
--card-bg: #ff002e; /* pass backgroundColor rgb(255,0,46) */
|
|
51
|
+
--card-fg: #ffffff; /* pass foregroundColor rgb(255,255,255) */
|
|
52
|
+
--card-label: #ffc8d2; /* pass labelColor rgb(255,200,210) */
|
|
53
|
+
--card-divider: rgba(255, 255, 255, 0.28);
|
|
54
|
+
/* The dark card ("Midnight" palette, also the hub's .card-dark / terminal surface) */
|
|
55
|
+
--card-dark-bg: #0c0a09; /* pass Midnight rgb(12,10,9), hub --color-terminal-bg */
|
|
56
|
+
--card-dark-fg: #ffffff;
|
|
57
|
+
--card-dark-label: #a5a09b; /* pass Midnight labelColor rgb(165,160,155) */
|
|
58
|
+
|
|
59
|
+
/* Typography */
|
|
60
|
+
--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; /* hub layout.tsx Inter */
|
|
61
|
+
--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; /* hub layout.tsx JetBrains_Mono 400/500/700 */
|
|
62
|
+
--font-native: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; /* hub .native-shell body */
|
|
63
|
+
|
|
64
|
+
--text-label: 0.6875rem; /* 11px, hub .section-label (mono, uppercase, 0.1em): the mono label, .ui-label */
|
|
65
|
+
--text-micro: 0.625rem; /* 10px, hub card labels ("membership", business card rows) */
|
|
66
|
+
--text-xs: 0.75rem; /* 12px, hub nav links */
|
|
67
|
+
--text-sm: 0.875rem; /* 14px, hub body small / buttons */
|
|
68
|
+
--text-base: 1rem; /* 16px */
|
|
69
|
+
--text-lg: 1.0625rem; /* 17px, pass "Name" value */
|
|
70
|
+
--text-xl: 1.375rem; /* 22px, business card name */
|
|
71
|
+
--text-2xl: 1.75rem; /* 28px, page titles on mobile */
|
|
72
|
+
--text-display: 2.75rem; /* 44px, wallet balance (hub card numbers, text-3xl and up) */
|
|
73
|
+
--tracking-label: 0.1em; /* hub .section-label */
|
|
74
|
+
--tracking-tight: -0.02em; /* hub headings, tracking-tight */
|
|
75
|
+
--weight-regular: 400;
|
|
76
|
+
--weight-medium: 500; /* hub headings are font-medium */
|
|
77
|
+
--weight-semibold: 600; /* hub card names */
|
|
78
|
+
--weight-bold: 700; /* hub numbers (events count) */
|
|
79
|
+
|
|
80
|
+
/* Radii */
|
|
81
|
+
--radius-xs: 4px; /* hub QR plate on the wallet card */
|
|
82
|
+
--radius-sm: 8px; /* hub --radius-sm, Clerk borderRadius 0.5rem: buttons and inputs */
|
|
83
|
+
--radius-md: 12px; /* hub article images, notices */
|
|
84
|
+
--radius-card: 16px; /* hub --radius-card, WalletCard rounded-2xl */
|
|
85
|
+
--radius-hero: 28px; /* hub MemberCard and BusinessCard rounded-[28px], bottom sheets */
|
|
86
|
+
--radius-pill: 9999px; /* hub --radius-pill */
|
|
87
|
+
|
|
88
|
+
/* Shadows */
|
|
89
|
+
--shadow-card: 0 1px 2px rgba(12, 10, 9, 0.04); /* hub cards are flat: border first, barely any shadow */
|
|
90
|
+
--shadow-raised: 0 12px 40px -20px rgba(0, 0, 0, 0.35); /* hub BusinessCard */
|
|
91
|
+
--shadow-pass: 0 30px 60px -30px rgba(0, 0, 0, 0.55); /* hub WalletCard */
|
|
92
|
+
--shadow-glow: 0 0 0 1px rgba(255, 0, 46, 0.25), 0 12px 40px -8px rgba(255, 0, 46, 0.18); /* hub .glow-red */
|
|
93
|
+
--focus-ring: 0 0 0 2px var(--color-bg), 0 0 0 4px var(--color-accent); /* hub: 2px accent outline, offset 2px */
|
|
94
|
+
|
|
95
|
+
/* Spacing (4px grid, as Tailwind in the hub) */
|
|
96
|
+
--space-1: 4px;
|
|
97
|
+
--space-2: 8px;
|
|
98
|
+
--space-3: 12px;
|
|
99
|
+
--space-4: 16px;
|
|
100
|
+
--space-5: 20px; /* hub WalletCard horizontal padding (px-5) */
|
|
101
|
+
--space-6: 24px; /* hub MemberCard padding (p-6), page gutter (px-6) */
|
|
102
|
+
--space-8: 32px;
|
|
103
|
+
--space-10: 40px;
|
|
104
|
+
--page-max: 480px; /* the mini-app column; the hub's member pages use max-w-md..lg */
|
|
105
|
+
--tap: 44px; /* minimum touch target */
|
|
106
|
+
|
|
107
|
+
/* Motion */
|
|
108
|
+
--ease: cubic-bezier(0.2, 0, 0, 1);
|
|
109
|
+
--duration: 200ms; /* hub .card transitions */
|
|
110
|
+
|
|
111
|
+
/*
|
|
112
|
+
* The Ambasada app's shell (docs/MINI-APPS.md §6). Inside the app, @ambasada/miniapp (applyCssVars, run by
|
|
113
|
+
* ready()) sets these on <html> from the shell context, which wins over :root. On the web the safe areas
|
|
114
|
+
* fall back to the browser's own insets (non-zero only with viewport-fit=cover) and there is no host bar.
|
|
115
|
+
*/
|
|
116
|
+
--ambasada-safe-area-top: env(safe-area-inset-top, 0px);
|
|
117
|
+
--ambasada-safe-area-bottom: env(safe-area-inset-bottom, 0px);
|
|
118
|
+
--ambasada-safe-area-left: env(safe-area-inset-left, 0px);
|
|
119
|
+
--ambasada-safe-area-right: env(safe-area-inset-right, 0px);
|
|
120
|
+
--ambasada-host-bar: 0px; /* height of the shell's top bar (back, app name, "…" menu) */
|
|
121
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ambasada/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.7.0",
|
|
4
|
+
"description": "The Ambasada look for mini apps: design tokens (colours, Inter + JetBrains Mono, radii, spacing, safe areas) and a small component set in plain CSS, with optional React wrappers. One stylesheet to <link>.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"*.css"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./dist/ambasada-ui.css",
|
|
12
|
+
"./ambasada-ui.css": "./dist/ambasada-ui.css",
|
|
13
|
+
"./tokens.css": "./dist/tokens.css",
|
|
14
|
+
"./components.css": "./dist/components.css",
|
|
15
|
+
"./fonts.css": "./dist/fonts.css",
|
|
16
|
+
"./react": {
|
|
17
|
+
"types": "./dist/react.d.ts",
|
|
18
|
+
"default": "./dist/react.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE"
|
|
28
|
+
],
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"react": ">=18"
|
|
31
|
+
},
|
|
32
|
+
"peerDependenciesMeta": {
|
|
33
|
+
"react": {
|
|
34
|
+
"optional": true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^22.20.5",
|
|
39
|
+
"@types/react": "^19.3.0",
|
|
40
|
+
"@types/react-dom": "^19.3.0",
|
|
41
|
+
"esbuild": "^0.28.2",
|
|
42
|
+
"react": "~19.3.1",
|
|
43
|
+
"react-dom": "~19.3.1",
|
|
44
|
+
"typescript": "~5.9.3",
|
|
45
|
+
"vitest": "^4.1.12"
|
|
46
|
+
},
|
|
47
|
+
"author": "CENTYSO (https://centyso.com)",
|
|
48
|
+
"homepage": "https://ambasada.id",
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/ambasada/cli.git",
|
|
52
|
+
"directory": "packages/ui"
|
|
53
|
+
},
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/ambasada/cli/issues"
|
|
56
|
+
},
|
|
57
|
+
"keywords": [
|
|
58
|
+
"ambasada",
|
|
59
|
+
"mini-app",
|
|
60
|
+
"design-tokens",
|
|
61
|
+
"css",
|
|
62
|
+
"react"
|
|
63
|
+
],
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "node scripts/build.mjs",
|
|
66
|
+
"typecheck": "tsc -p .",
|
|
67
|
+
"test": "vitest run"
|
|
68
|
+
}
|
|
6
69
|
}
|