@godxjp/ui 18.4.0 → 18.5.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.
Files changed (131) hide show
  1. package/README.md +16 -1
  2. package/dist/app/theme-axes.d.ts +11 -3
  3. package/dist/app/theme-axes.js +2 -1
  4. package/dist/components/charts/chart-frame.d.ts +17 -3
  5. package/dist/components/charts/chart-frame.js +7 -1
  6. package/dist/components/charts/chart-summary.d.ts +21 -0
  7. package/dist/components/charts/chart-summary.js +32 -5
  8. package/dist/components/charts/compact-bar-trend.d.ts +29 -0
  9. package/dist/components/charts/compact-bar-trend.js +74 -0
  10. package/dist/components/charts/index.d.ts +3 -0
  11. package/dist/components/charts/index.js +2 -0
  12. package/dist/components/data-display/badge.d.ts +8 -0
  13. package/dist/components/data-display/badge.js +7 -1
  14. package/dist/components/data-display/data-table.d.ts +16 -1
  15. package/dist/components/data-display/data-table.js +56 -0
  16. package/dist/components/data-display/index.d.ts +3 -1
  17. package/dist/components/data-display/index.js +10 -1
  18. package/dist/components/data-display/list-row.d.ts +22 -4
  19. package/dist/components/data-display/list-row.js +21 -3
  20. package/dist/components/data-display/service-launcher-card.d.ts +40 -0
  21. package/dist/components/data-display/service-launcher-card.js +97 -0
  22. package/dist/components/data-entry/command-palette.d.ts +37 -0
  23. package/dist/components/data-entry/command-palette.js +125 -0
  24. package/dist/components/data-entry/index.d.ts +2 -0
  25. package/dist/components/data-entry/index.js +2 -0
  26. package/dist/components/feedback/dialog.d.ts +2 -0
  27. package/dist/components/feedback/dialog.js +42 -33
  28. package/dist/components/feedback/index.d.ts +4 -1
  29. package/dist/components/feedback/index.js +6 -2
  30. package/dist/components/feedback/sheet.d.ts +26 -4
  31. package/dist/components/feedback/sheet.js +54 -7
  32. package/dist/components/feedback/two-factor-setup.d.ts +31 -0
  33. package/dist/components/feedback/two-factor-setup.js +97 -0
  34. package/dist/components/general/index.d.ts +1 -1
  35. package/dist/components/general/logo.d.ts +42 -8
  36. package/dist/components/general/logo.js +67 -14
  37. package/dist/components/layout/app-shell.js +21 -5
  38. package/dist/components/layout/auth-divider.d.ts +7 -0
  39. package/dist/components/layout/auth-divider.js +21 -0
  40. package/dist/components/layout/auth-footer.d.ts +5 -0
  41. package/dist/components/layout/auth-footer.js +24 -0
  42. package/dist/components/layout/auth-identity.d.ts +5 -0
  43. package/dist/components/layout/auth-identity.js +17 -0
  44. package/dist/components/layout/auth-shell.d.ts +8 -1
  45. package/dist/components/layout/auth-shell.js +25 -6
  46. package/dist/components/layout/auth-stack.d.ts +4 -0
  47. package/dist/components/layout/auth-stack.js +8 -0
  48. package/dist/components/layout/centered-shell.d.ts +5 -2
  49. package/dist/components/layout/centered-shell.js +2 -1
  50. package/dist/components/layout/index.d.ts +18 -3
  51. package/dist/components/layout/index.js +17 -2
  52. package/dist/components/layout/legal-document-shell.d.ts +34 -0
  53. package/dist/components/layout/legal-document-shell.js +186 -0
  54. package/dist/components/layout/master-detail.d.ts +24 -0
  55. package/dist/components/layout/master-detail.js +48 -0
  56. package/dist/components/layout/org-switcher.d.ts +9 -0
  57. package/dist/components/layout/org-switcher.js +218 -0
  58. package/dist/components/layout/page-container.d.ts +1 -1
  59. package/dist/components/layout/page-container.js +3 -2
  60. package/dist/components/layout/sidebar-link.d.ts +43 -0
  61. package/dist/components/layout/sidebar-link.js +13 -0
  62. package/dist/components/layout/sidebar.d.ts +42 -5
  63. package/dist/components/layout/sidebar.js +170 -85
  64. package/dist/components/navigation/app-setting-picker.js +17 -6
  65. package/dist/components/navigation/filter-bar.d.ts +12 -3
  66. package/dist/components/navigation/filter-bar.js +8 -2
  67. package/dist/components/navigation/index.d.ts +2 -2
  68. package/dist/components/navigation/index.js +3 -1
  69. package/dist/components/navigation/tabs-scroll.d.ts +70 -0
  70. package/dist/components/navigation/tabs-scroll.js +76 -0
  71. package/dist/components/navigation/tabs.js +35 -20
  72. package/dist/email/brand-mark.d.ts +92 -0
  73. package/dist/email/brand-mark.js +83 -0
  74. package/dist/email/color.d.ts +52 -0
  75. package/dist/email/color.js +37 -0
  76. package/dist/email/geometry.d.ts +112 -0
  77. package/dist/email/geometry.js +89 -0
  78. package/dist/email/index.d.ts +78 -0
  79. package/dist/email/index.js +76 -0
  80. package/dist/email/inline-style.d.ts +25 -0
  81. package/dist/email/inline-style.js +21 -0
  82. package/dist/email/tokens.generated.d.ts +147 -0
  83. package/dist/email/tokens.generated.js +142 -0
  84. package/dist/i18n/messages/en.json +21 -2
  85. package/dist/i18n/messages/ja.json +21 -2
  86. package/dist/i18n/messages/vi.json +21 -2
  87. package/dist/inertia/index.d.ts +50 -0
  88. package/dist/inertia/index.js +5 -0
  89. package/dist/props/components/app.prop.d.ts +11 -1
  90. package/dist/props/components/charts.prop.d.ts +40 -1
  91. package/dist/props/components/data-display.prop.d.ts +13 -1
  92. package/dist/props/components/feedback.prop.d.ts +10 -0
  93. package/dist/props/components/index.d.ts +2 -2
  94. package/dist/props/components/layout.prop.d.ts +373 -10
  95. package/dist/props/components/layout.prop.js +1 -0
  96. package/dist/props/components/navigation.prop.d.ts +19 -1
  97. package/dist/props/registry.d.ts +291 -7
  98. package/dist/props/registry.js +341 -7
  99. package/dist/props/vocabulary/index.d.ts +1 -1
  100. package/dist/props/vocabulary/interaction.prop.d.ts +1 -1
  101. package/dist/props/vocabulary/layout.prop.d.ts +18 -0
  102. package/dist/styles/base.css +8 -2
  103. package/dist/styles/card-layout.css +161 -7
  104. package/dist/styles/chart-layout.css +97 -0
  105. package/dist/styles/control.css +48 -2
  106. package/dist/styles/data-display-layout.css +52 -6
  107. package/dist/styles/dialog-layout.css +105 -4
  108. package/dist/styles/fonts.css +15 -4
  109. package/dist/styles/index.css +11 -3
  110. package/dist/styles/layout.css +367 -1
  111. package/dist/styles/logo-layout.css +62 -0
  112. package/dist/styles/navigation-layout.css +43 -0
  113. package/dist/styles/shell-layout.css +488 -40
  114. package/dist/theme/dxs.canonical.css +76 -0
  115. package/dist/tokens/axes.css +39 -0
  116. package/dist/tokens/base.css +5 -0
  117. package/dist/tokens/components/card.css +48 -0
  118. package/dist/tokens/components/chart.css +47 -0
  119. package/dist/tokens/components/control.css +16 -0
  120. package/dist/tokens/components/email.css +66 -0
  121. package/dist/tokens/components/feedback.css +17 -0
  122. package/dist/tokens/components/legal-document.css +67 -0
  123. package/dist/tokens/components/list-row.css +23 -2
  124. package/dist/tokens/components/logo.css +32 -0
  125. package/dist/tokens/components/navigation.css +13 -0
  126. package/dist/tokens/components/sheet.css +19 -0
  127. package/dist/tokens/components/shell.css +138 -0
  128. package/dist/tokens/components/sidebar.css +33 -0
  129. package/dist/tokens/foundation.css +5 -2
  130. package/dist/tokens/semantic/layout.css +44 -2
  131. package/package.json +16 -5
@@ -0,0 +1,89 @@
1
+ import { EMAIL_GEOMETRY_SOURCE } from "./tokens.generated.js";
2
+ const raw = (name) => EMAIL_GEOMETRY_SOURCE[name];
3
+ const num = (name) => {
4
+ const value = EMAIL_GEOMETRY_SOURCE[name];
5
+ const parsed = Number.parseFloat(value);
6
+ if (Number.isNaN(parsed)) {
7
+ throw new TypeError(`Email token ${name} ("${value}") has no numeric value.`);
8
+ }
9
+ return parsed;
10
+ };
11
+ const EMAIL_SHELL = Object.freeze({
12
+ width: raw("--email-shell-width"),
13
+ widthPx: num("--email-shell-width"),
14
+ contentWidth: `${num("--email-shell-width") - 2 * num("--email-shell-padding")}px`,
15
+ contentWidthPx: num("--email-shell-width") - 2 * num("--email-shell-padding"),
16
+ padding: raw("--email-shell-padding"),
17
+ paddingPx: num("--email-shell-padding"),
18
+ pagePadding: raw("--email-shell-page-padding"),
19
+ pagePaddingPx: num("--email-shell-page-padding"),
20
+ borderWidth: raw("--email-shell-border-width"),
21
+ borderWidthPx: num("--email-shell-border-width"),
22
+ radius: raw("--email-card-radius"),
23
+ radiusPx: num("--email-card-radius"),
24
+ gap: raw("--email-stack-gap"),
25
+ gapPx: num("--email-stack-gap"),
26
+ gapSm: raw("--email-stack-gap-sm"),
27
+ gapSmPx: num("--email-stack-gap-sm"),
28
+ referenceHeight: raw("--email-card-reference-height"),
29
+ referenceHeightPx: num("--email-card-reference-height")
30
+ });
31
+ const EMAIL_TYPOGRAPHY = Object.freeze({
32
+ fontFamily: raw("--email-font-family-sans"),
33
+ bodyFontSize: raw("--email-body-font-size"),
34
+ bodyFontSizePx: num("--email-body-font-size"),
35
+ bodyLineHeight: num("--email-body-line-height"),
36
+ bodyFontWeight: num("--email-body-font-weight"),
37
+ headingFontSize: raw("--email-heading-font-size"),
38
+ headingFontSizePx: num("--email-heading-font-size"),
39
+ headingLineHeight: num("--email-heading-line-height"),
40
+ headingFontWeight: num("--email-heading-font-weight")
41
+ });
42
+ const EMAIL_CTA = Object.freeze({
43
+ height: raw("--email-cta-height"),
44
+ heightPx: num("--email-cta-height"),
45
+ lineHeight: raw("--email-cta-line-height"),
46
+ lineHeightPx: num("--email-cta-line-height"),
47
+ paddingX: raw("--email-cta-padding-x"),
48
+ paddingXPx: num("--email-cta-padding-x"),
49
+ radius: raw("--email-cta-radius"),
50
+ radiusPx: num("--email-cta-radius"),
51
+ fontSize: raw("--email-cta-font-size"),
52
+ fontSizePx: num("--email-cta-font-size"),
53
+ fontWeight: num("--email-cta-font-weight")
54
+ });
55
+ const EMAIL_FOOTER = Object.freeze({
56
+ fontSize: raw("--email-footer-font-size"),
57
+ fontSizePx: num("--email-footer-font-size"),
58
+ lineHeight: num("--email-footer-line-height"),
59
+ linkGap: raw("--email-footer-link-gap"),
60
+ linkGapPx: num("--email-footer-link-gap"),
61
+ paddingTop: raw("--email-footer-padding-top"),
62
+ paddingTopPx: num("--email-footer-padding-top"),
63
+ borderWidth: raw("--email-footer-border-width"),
64
+ borderWidthPx: num("--email-footer-border-width")
65
+ });
66
+ const EMAIL_FOCUS = Object.freeze({
67
+ borderWidth: raw("--email-focus-border-width"),
68
+ borderWidthPx: num("--email-focus-border-width")
69
+ });
70
+ const EMAIL_MOBILE = Object.freeze({
71
+ maxWidth: raw("--email-mobile-max-width"),
72
+ maxWidthPx: num("--email-mobile-max-width"),
73
+ width: raw("--email-mobile-width"),
74
+ padding: raw("--email-mobile-padding"),
75
+ paddingPx: num("--email-mobile-padding"),
76
+ pagePadding: raw("--email-mobile-page-padding"),
77
+ pagePaddingPx: num("--email-mobile-page-padding"),
78
+ headingFontSize: raw("--email-mobile-heading-font-size"),
79
+ headingFontSizePx: num("--email-mobile-heading-font-size"),
80
+ ctaWidth: raw("--email-mobile-cta-width")
81
+ });
82
+ export {
83
+ EMAIL_CTA,
84
+ EMAIL_FOCUS,
85
+ EMAIL_FOOTER,
86
+ EMAIL_MOBILE,
87
+ EMAIL_SHELL,
88
+ EMAIL_TYPOGRAPHY
89
+ };
@@ -0,0 +1,78 @@
1
+ /**
2
+ * `@godxjp/ui/email` — the email-safe design-token contract for transactional templates (issue #227).
3
+ *
4
+ * ## Why this exists
5
+ *
6
+ * A transactional email is rendered by Blade/Twig/MJML, not React, and by clients that strip
7
+ * `<style>`, ignore CSS custom properties, refuse relative units and block remote images. So the
8
+ * two things a template usually reaches for — the component library and the CSS token file — are
9
+ * both unavailable, and templates end up hand-copying hex and hand-drawing the logo. That is
10
+ * exactly the drift this module removes: it is a FRAMEWORK-NEUTRAL, zero-dependency, React-free
11
+ * data export of literal `#rrggbb` / `px` values plus the canonical brand-mark markup.
12
+ *
13
+ * ## The no-drift guarantee
14
+ *
15
+ * Nothing here is hand-typed. `src/tokens/foundation.css` (colour roles) and
16
+ * `src/tokens/components/email.css` (geometry/typography) are read by
17
+ * `scripts/gen-email-tokens.mjs` into `tokens.generated.ts`, and the HSL→hex conversion runs at
18
+ * module load. There is no hex literal anywhere in `src/email/`, so an email palette that diverges
19
+ * from the web palette is not something a maintainer can accidentally write.
20
+ * `src/email/__tests__/email-tokens.test.ts` re-derives every value straight from the CSS and
21
+ * asserts equality, and `pnpm check:email-token-sync` fails CI if the generated file goes stale.
22
+ *
23
+ * ## Usage
24
+ *
25
+ * ```ts
26
+ * import { EMAIL_COLORS, EMAIL_SHELL, EMAIL_CTA, EMAIL_BRAND_MARK, emailInlineStyle } from "@godxjp/ui/email";
27
+ *
28
+ * const card = emailInlineStyle({
29
+ * width: EMAIL_SHELL.width,
30
+ * padding: EMAIL_SHELL.padding,
31
+ * backgroundColor: EMAIL_COLORS.surface,
32
+ * border: `${EMAIL_SHELL.borderWidth} solid ${EMAIL_COLORS.border}`,
33
+ * borderRadius: EMAIL_SHELL.radius,
34
+ * });
35
+ * ```
36
+ *
37
+ * A non-JS template engine (Blade, Twig, Liquid) consumes the same values through
38
+ * `EMAIL_TOKENS_JSON` — dump it once in the build step and read the JSON from PHP:
39
+ *
40
+ * ```sh
41
+ * node --input-type=module -e \
42
+ * 'import("@godxjp/ui/email").then(m => process.stdout.write(m.EMAIL_TOKENS_JSON))' \
43
+ * > resources/design/email-tokens.json
44
+ * ```
45
+ *
46
+ * ## Scope
47
+ *
48
+ * Tokens, geometry and brand markup only. Copy, recipients, links, locale, triggers and queue
49
+ * behaviour belong to the sending application — this module knows nothing about them.
50
+ */
51
+ export { hslToHex, EMAIL_COLORS, EMAIL_COLORS_DARK, type EmailColorToken, type EmailHex, } from "./color.js";
52
+ export { EMAIL_SHELL, EMAIL_TYPOGRAPHY, EMAIL_CTA, EMAIL_FOOTER, EMAIL_FOCUS, EMAIL_MOBILE, type EmailTokenName, type EmailShellTokens, type EmailTypographyTokens, type EmailCtaTokens, type EmailFooterTokens, type EmailFocusTokens, type EmailMobileTokens, } from "./geometry.js";
53
+ export { EMAIL_BRAND_MARK, EMAIL_BRAND_MARK_VIEWBOX, EMAIL_BRAND_MARK_CAPSULE, EMAIL_BRAND_MARK_GLYPH, emailBrandMarkSvg, emailBrandMarkDataUri, emailBrandMarkTableHtml, roundedRectPath, type EmailBrandMark, type EmailBrandMarkOptions, type EmailBrandMarkRect, } from "./brand-mark.js";
54
+ export { emailInlineStyle, type EmailStyleDeclarations } from "./inline-style.js";
55
+ export { EMAIL_COLOR_SOURCE, EMAIL_COLOR_SOURCE_DARK, EMAIL_GEOMETRY_SOURCE, type EmailColorSource, } from "./tokens.generated.js";
56
+ import { EMAIL_COLORS, EMAIL_COLORS_DARK } from "./color.js";
57
+ import { EMAIL_SHELL, EMAIL_TYPOGRAPHY, EMAIL_CTA, EMAIL_FOOTER, EMAIL_FOCUS, EMAIL_MOBILE } from "./geometry.js";
58
+ import { EMAIL_BRAND_MARK } from "./brand-mark.js";
59
+ /** The whole contract in one object — the shape `EMAIL_TOKENS_JSON` serialises. */
60
+ export interface EmailTokens {
61
+ readonly colors: typeof EMAIL_COLORS;
62
+ readonly colorsDark: typeof EMAIL_COLORS_DARK;
63
+ readonly shell: typeof EMAIL_SHELL;
64
+ readonly typography: typeof EMAIL_TYPOGRAPHY;
65
+ readonly cta: typeof EMAIL_CTA;
66
+ readonly footer: typeof EMAIL_FOOTER;
67
+ readonly focus: typeof EMAIL_FOCUS;
68
+ readonly mobile: typeof EMAIL_MOBILE;
69
+ readonly brandMark: typeof EMAIL_BRAND_MARK;
70
+ }
71
+ /** Every email token, grouped. Import a single group when you only need one. */
72
+ export declare const EMAIL_TOKENS: EmailTokens;
73
+ /**
74
+ * `EMAIL_TOKENS` as pretty-printed JSON — the framework-neutral bridge for template engines that
75
+ * cannot import ES modules (Blade, Twig, Liquid, Handlebars on another runtime). Write it to a
76
+ * file in the build step and read it from the template layer.
77
+ */
78
+ export declare const EMAIL_TOKENS_JSON: string;
@@ -0,0 +1,76 @@
1
+ import {
2
+ hslToHex,
3
+ EMAIL_COLORS,
4
+ EMAIL_COLORS_DARK
5
+ } from "./color.js";
6
+ import {
7
+ EMAIL_SHELL,
8
+ EMAIL_TYPOGRAPHY,
9
+ EMAIL_CTA,
10
+ EMAIL_FOOTER,
11
+ EMAIL_FOCUS,
12
+ EMAIL_MOBILE
13
+ } from "./geometry.js";
14
+ import {
15
+ EMAIL_BRAND_MARK,
16
+ EMAIL_BRAND_MARK_VIEWBOX,
17
+ EMAIL_BRAND_MARK_CAPSULE,
18
+ EMAIL_BRAND_MARK_GLYPH,
19
+ emailBrandMarkSvg,
20
+ emailBrandMarkDataUri,
21
+ emailBrandMarkTableHtml,
22
+ roundedRectPath
23
+ } from "./brand-mark.js";
24
+ import { emailInlineStyle } from "./inline-style.js";
25
+ import {
26
+ EMAIL_COLOR_SOURCE,
27
+ EMAIL_COLOR_SOURCE_DARK,
28
+ EMAIL_GEOMETRY_SOURCE
29
+ } from "./tokens.generated.js";
30
+ import { EMAIL_COLORS as EMAIL_COLORS2, EMAIL_COLORS_DARK as EMAIL_COLORS_DARK2 } from "./color.js";
31
+ import {
32
+ EMAIL_SHELL as EMAIL_SHELL2,
33
+ EMAIL_TYPOGRAPHY as EMAIL_TYPOGRAPHY2,
34
+ EMAIL_CTA as EMAIL_CTA2,
35
+ EMAIL_FOOTER as EMAIL_FOOTER2,
36
+ EMAIL_FOCUS as EMAIL_FOCUS2,
37
+ EMAIL_MOBILE as EMAIL_MOBILE2
38
+ } from "./geometry.js";
39
+ import { EMAIL_BRAND_MARK as EMAIL_BRAND_MARK2 } from "./brand-mark.js";
40
+ const EMAIL_TOKENS = Object.freeze({
41
+ colors: EMAIL_COLORS2,
42
+ colorsDark: EMAIL_COLORS_DARK2,
43
+ shell: EMAIL_SHELL2,
44
+ typography: EMAIL_TYPOGRAPHY2,
45
+ cta: EMAIL_CTA2,
46
+ footer: EMAIL_FOOTER2,
47
+ focus: EMAIL_FOCUS2,
48
+ mobile: EMAIL_MOBILE2,
49
+ brandMark: EMAIL_BRAND_MARK2
50
+ });
51
+ const EMAIL_TOKENS_JSON = JSON.stringify(EMAIL_TOKENS, null, 2);
52
+ export {
53
+ EMAIL_BRAND_MARK,
54
+ EMAIL_BRAND_MARK_CAPSULE,
55
+ EMAIL_BRAND_MARK_GLYPH,
56
+ EMAIL_BRAND_MARK_VIEWBOX,
57
+ EMAIL_COLORS,
58
+ EMAIL_COLORS_DARK,
59
+ EMAIL_COLOR_SOURCE,
60
+ EMAIL_COLOR_SOURCE_DARK,
61
+ EMAIL_CTA,
62
+ EMAIL_FOCUS,
63
+ EMAIL_FOOTER,
64
+ EMAIL_GEOMETRY_SOURCE,
65
+ EMAIL_MOBILE,
66
+ EMAIL_SHELL,
67
+ EMAIL_TOKENS,
68
+ EMAIL_TOKENS_JSON,
69
+ EMAIL_TYPOGRAPHY,
70
+ emailBrandMarkDataUri,
71
+ emailBrandMarkSvg,
72
+ emailBrandMarkTableHtml,
73
+ emailInlineStyle,
74
+ hslToHex,
75
+ roundedRectPath
76
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Inline-style serialisation for HTML email.
3
+ *
4
+ * Email clients do not run the cascade: Gmail strips `<style>`, Outlook resolves no custom
5
+ * property, and only the `style=""` attribute on the painting element is universally honoured.
6
+ * `emailInlineStyle` turns a declaration map into that attribute value AND enforces the two rules
7
+ * that silently break templates — no `var()` (nothing resolves it) and no `calc()` (Outlook's Word
8
+ * renderer drops the whole declaration). Failing loudly at template-build time beats a broken
9
+ * layout discovered in Mailpit.
10
+ */
11
+ /** A declaration map. Numbers are emitted verbatim (already-unitless values like `font-weight`). */
12
+ export type EmailStyleDeclarations = Record<string, string | number | null | undefined>;
13
+ /**
14
+ * Serialise declarations into an inline `style` attribute value.
15
+ *
16
+ * ```ts
17
+ * emailInlineStyle({ width: EMAIL_SHELL.width, backgroundColor: EMAIL_COLORS.surface })
18
+ * // "width:480px;background-color:#fdfdfb"
19
+ * ```
20
+ *
21
+ * `null` / `undefined` values are dropped, so a conditional declaration needs no branch.
22
+ *
23
+ * @throws if a value contains `var()` or `calc()` — neither survives an email client.
24
+ */
25
+ export declare function emailInlineStyle(declarations: EmailStyleDeclarations): string;
@@ -0,0 +1,21 @@
1
+ const UNRESOLVABLE = /\bvar\(|\bcalc\(/;
2
+ function emailInlineStyle(declarations) {
3
+ const parts = [];
4
+ for (const [property, value] of Object.entries(declarations)) {
5
+ if (value === null || value === void 0 || value === "") continue;
6
+ const serialised = String(value);
7
+ if (UNRESOLVABLE.test(serialised)) {
8
+ throw new TypeError(
9
+ `emailInlineStyle: "${property}: ${serialised}" uses var()/calc(), which no email client resolves. Pass the literal value from the @godxjp/ui/email token export instead.`
10
+ );
11
+ }
12
+ parts.push(`${kebab(property)}:${serialised}`);
13
+ }
14
+ return parts.join(";");
15
+ }
16
+ function kebab(property) {
17
+ return property.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`);
18
+ }
19
+ export {
20
+ emailInlineStyle
21
+ };
@@ -0,0 +1,147 @@
1
+ /** One email colour slot and the web role it is derived from. `hsl` is the raw channel triplet. */
2
+ export interface EmailColorSource {
3
+ /** The semantic role in src/tokens/foundation.css this slot mirrors. */
4
+ readonly cssVar: string;
5
+ /** The role's HSL channel triplet, verbatim (`H S% L%`). Converted to hex at module load. */
6
+ readonly hsl: string;
7
+ }
8
+ /** Light-scheme colour sources — the canonical transactional-email palette. */
9
+ export declare const EMAIL_COLOR_SOURCE: {
10
+ readonly background: {
11
+ readonly cssVar: "--background";
12
+ readonly hsl: "60 33% 99%";
13
+ };
14
+ readonly foreground: {
15
+ readonly cssVar: "--foreground";
16
+ readonly hsl: "48 8% 13%";
17
+ };
18
+ readonly surface: {
19
+ readonly cssVar: "--card";
20
+ readonly hsl: "60 33% 99%";
21
+ };
22
+ readonly surfaceForeground: {
23
+ readonly cssVar: "--card-foreground";
24
+ readonly hsl: "48 8% 13%";
25
+ };
26
+ readonly muted: {
27
+ readonly cssVar: "--muted";
28
+ readonly hsl: "45 15% 95%";
29
+ };
30
+ readonly mutedForeground: {
31
+ readonly cssVar: "--muted-foreground";
32
+ readonly hsl: "44 5% 42%";
33
+ };
34
+ readonly border: {
35
+ readonly cssVar: "--border";
36
+ readonly hsl: "30 7% 83%";
37
+ };
38
+ readonly primary: {
39
+ readonly cssVar: "--primary";
40
+ readonly hsl: "204 100% 39%";
41
+ };
42
+ readonly primaryForeground: {
43
+ readonly cssVar: "--primary-foreground";
44
+ readonly hsl: "60 33% 99%";
45
+ };
46
+ readonly focus: {
47
+ readonly cssVar: "--ring";
48
+ readonly hsl: "204 100% 39%";
49
+ };
50
+ readonly brand: {
51
+ readonly cssVar: "--success";
52
+ readonly hsl: "146 40% 58%";
53
+ };
54
+ readonly brandForeground: {
55
+ readonly cssVar: "--success-foreground";
56
+ readonly hsl: "60 33% 99%";
57
+ };
58
+ };
59
+ /** Dark-scheme colour sources, for `@media (prefers-color-scheme: dark)` overrides. */
60
+ export declare const EMAIL_COLOR_SOURCE_DARK: {
61
+ readonly background: {
62
+ readonly cssVar: "--background";
63
+ readonly hsl: "48 9% 9%";
64
+ };
65
+ readonly foreground: {
66
+ readonly cssVar: "--foreground";
67
+ readonly hsl: "60 20% 96%";
68
+ };
69
+ readonly surface: {
70
+ readonly cssVar: "--card";
71
+ readonly hsl: "48 8% 12%";
72
+ };
73
+ readonly surfaceForeground: {
74
+ readonly cssVar: "--card-foreground";
75
+ readonly hsl: "60 20% 96%";
76
+ };
77
+ readonly muted: {
78
+ readonly cssVar: "--muted";
79
+ readonly hsl: "45 6% 18%";
80
+ };
81
+ readonly mutedForeground: {
82
+ readonly cssVar: "--muted-foreground";
83
+ readonly hsl: "44 6% 64%";
84
+ };
85
+ readonly border: {
86
+ readonly cssVar: "--border";
87
+ readonly hsl: "45 6% 22%";
88
+ };
89
+ readonly primary: {
90
+ readonly cssVar: "--primary";
91
+ readonly hsl: "204 90% 60%";
92
+ };
93
+ readonly primaryForeground: {
94
+ readonly cssVar: "--primary-foreground";
95
+ readonly hsl: "48 9% 9%";
96
+ };
97
+ readonly focus: {
98
+ readonly cssVar: "--ring";
99
+ readonly hsl: "204 90% 60%";
100
+ };
101
+ readonly brand: {
102
+ readonly cssVar: "--success";
103
+ readonly hsl: "146 45% 55%";
104
+ };
105
+ readonly brandForeground: {
106
+ readonly cssVar: "--success-foreground";
107
+ readonly hsl: "48 9% 9%";
108
+ };
109
+ };
110
+ /** Raw `--email-*` declarations from the component token tier, verbatim. */
111
+ export declare const EMAIL_GEOMETRY_SOURCE: {
112
+ readonly "--email-shell-width": "480px";
113
+ readonly "--email-shell-padding": "32px";
114
+ readonly "--email-shell-page-padding": "24px";
115
+ readonly "--email-shell-border-width": "1px";
116
+ readonly "--email-card-radius": "10px";
117
+ readonly "--email-card-reference-height": "407px";
118
+ readonly "--email-stack-gap": "24px";
119
+ readonly "--email-stack-gap-sm": "12px";
120
+ readonly "--email-mark-width": "32px";
121
+ readonly "--email-mark-height": "32px";
122
+ readonly "--email-font-family-sans": "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif";
123
+ readonly "--email-body-font-size": "14px";
124
+ readonly "--email-body-line-height": "1.7";
125
+ readonly "--email-body-font-weight": "400";
126
+ readonly "--email-heading-font-size": "20px";
127
+ readonly "--email-heading-line-height": "1.25";
128
+ readonly "--email-heading-font-weight": "700";
129
+ readonly "--email-cta-height": "44px";
130
+ readonly "--email-cta-line-height": "44px";
131
+ readonly "--email-cta-padding-x": "24px";
132
+ readonly "--email-cta-radius": "6px";
133
+ readonly "--email-cta-font-size": "14px";
134
+ readonly "--email-cta-font-weight": "700";
135
+ readonly "--email-footer-font-size": "12px";
136
+ readonly "--email-footer-line-height": "1.5";
137
+ readonly "--email-footer-link-gap": "12px";
138
+ readonly "--email-footer-padding-top": "20px";
139
+ readonly "--email-footer-border-width": "1px";
140
+ readonly "--email-focus-border-width": "2px";
141
+ readonly "--email-mobile-max-width": "520px";
142
+ readonly "--email-mobile-width": "100%";
143
+ readonly "--email-mobile-padding": "20px";
144
+ readonly "--email-mobile-page-padding": "12px";
145
+ readonly "--email-mobile-heading-font-size": "18px";
146
+ readonly "--email-mobile-cta-width": "100%";
147
+ };
@@ -0,0 +1,142 @@
1
+ const EMAIL_COLOR_SOURCE = {
2
+ "background": {
3
+ "cssVar": "--background",
4
+ "hsl": "60 33% 99%"
5
+ },
6
+ "foreground": {
7
+ "cssVar": "--foreground",
8
+ "hsl": "48 8% 13%"
9
+ },
10
+ "surface": {
11
+ "cssVar": "--card",
12
+ "hsl": "60 33% 99%"
13
+ },
14
+ "surfaceForeground": {
15
+ "cssVar": "--card-foreground",
16
+ "hsl": "48 8% 13%"
17
+ },
18
+ "muted": {
19
+ "cssVar": "--muted",
20
+ "hsl": "45 15% 95%"
21
+ },
22
+ "mutedForeground": {
23
+ "cssVar": "--muted-foreground",
24
+ "hsl": "44 5% 42%"
25
+ },
26
+ "border": {
27
+ "cssVar": "--border",
28
+ "hsl": "30 7% 83%"
29
+ },
30
+ "primary": {
31
+ "cssVar": "--primary",
32
+ "hsl": "204 100% 39%"
33
+ },
34
+ "primaryForeground": {
35
+ "cssVar": "--primary-foreground",
36
+ "hsl": "60 33% 99%"
37
+ },
38
+ "focus": {
39
+ "cssVar": "--ring",
40
+ "hsl": "204 100% 39%"
41
+ },
42
+ "brand": {
43
+ "cssVar": "--success",
44
+ "hsl": "146 40% 58%"
45
+ },
46
+ "brandForeground": {
47
+ "cssVar": "--success-foreground",
48
+ "hsl": "60 33% 99%"
49
+ }
50
+ };
51
+ const EMAIL_COLOR_SOURCE_DARK = {
52
+ "background": {
53
+ "cssVar": "--background",
54
+ "hsl": "48 9% 9%"
55
+ },
56
+ "foreground": {
57
+ "cssVar": "--foreground",
58
+ "hsl": "60 20% 96%"
59
+ },
60
+ "surface": {
61
+ "cssVar": "--card",
62
+ "hsl": "48 8% 12%"
63
+ },
64
+ "surfaceForeground": {
65
+ "cssVar": "--card-foreground",
66
+ "hsl": "60 20% 96%"
67
+ },
68
+ "muted": {
69
+ "cssVar": "--muted",
70
+ "hsl": "45 6% 18%"
71
+ },
72
+ "mutedForeground": {
73
+ "cssVar": "--muted-foreground",
74
+ "hsl": "44 6% 64%"
75
+ },
76
+ "border": {
77
+ "cssVar": "--border",
78
+ "hsl": "45 6% 22%"
79
+ },
80
+ "primary": {
81
+ "cssVar": "--primary",
82
+ "hsl": "204 90% 60%"
83
+ },
84
+ "primaryForeground": {
85
+ "cssVar": "--primary-foreground",
86
+ "hsl": "48 9% 9%"
87
+ },
88
+ "focus": {
89
+ "cssVar": "--ring",
90
+ "hsl": "204 90% 60%"
91
+ },
92
+ "brand": {
93
+ "cssVar": "--success",
94
+ "hsl": "146 45% 55%"
95
+ },
96
+ "brandForeground": {
97
+ "cssVar": "--success-foreground",
98
+ "hsl": "48 9% 9%"
99
+ }
100
+ };
101
+ const EMAIL_GEOMETRY_SOURCE = {
102
+ "--email-shell-width": "480px",
103
+ "--email-shell-padding": "32px",
104
+ "--email-shell-page-padding": "24px",
105
+ "--email-shell-border-width": "1px",
106
+ "--email-card-radius": "10px",
107
+ "--email-card-reference-height": "407px",
108
+ "--email-stack-gap": "24px",
109
+ "--email-stack-gap-sm": "12px",
110
+ "--email-mark-width": "32px",
111
+ "--email-mark-height": "32px",
112
+ "--email-font-family-sans": "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif",
113
+ "--email-body-font-size": "14px",
114
+ "--email-body-line-height": "1.7",
115
+ "--email-body-font-weight": "400",
116
+ "--email-heading-font-size": "20px",
117
+ "--email-heading-line-height": "1.25",
118
+ "--email-heading-font-weight": "700",
119
+ "--email-cta-height": "44px",
120
+ "--email-cta-line-height": "44px",
121
+ "--email-cta-padding-x": "24px",
122
+ "--email-cta-radius": "6px",
123
+ "--email-cta-font-size": "14px",
124
+ "--email-cta-font-weight": "700",
125
+ "--email-footer-font-size": "12px",
126
+ "--email-footer-line-height": "1.5",
127
+ "--email-footer-link-gap": "12px",
128
+ "--email-footer-padding-top": "20px",
129
+ "--email-footer-border-width": "1px",
130
+ "--email-focus-border-width": "2px",
131
+ "--email-mobile-max-width": "520px",
132
+ "--email-mobile-width": "100%",
133
+ "--email-mobile-padding": "20px",
134
+ "--email-mobile-page-padding": "12px",
135
+ "--email-mobile-heading-font-size": "18px",
136
+ "--email-mobile-cta-width": "100%"
137
+ };
138
+ export {
139
+ EMAIL_COLOR_SOURCE,
140
+ EMAIL_COLOR_SOURCE_DARK,
141
+ EMAIL_GEOMETRY_SOURCE
142
+ };
@@ -145,6 +145,11 @@
145
145
  "mainLabel": "Main content",
146
146
  "footerLabel": "Footer"
147
147
  },
148
+ "legalDocumentShell": {
149
+ "contents": "Contents",
150
+ "version": "Version {version}",
151
+ "effectiveDate": "Effective {date}"
152
+ },
148
153
  "topbar": {
149
154
  "toggleSidebar": "Toggle sidebar",
150
155
  "search": "Search",
@@ -162,6 +167,10 @@
162
167
  "next": "Next",
163
168
  "dotsLabel": "Choose slide",
164
169
  "goToSlide": "Go to slide {index}"
170
+ },
171
+ "listRow": {
172
+ "unread": "Unread",
173
+ "read": "Read"
165
174
  }
166
175
  },
167
176
  "ui": {
@@ -292,7 +301,11 @@
292
301
  "densitySwitch": "Switch to {density} density",
293
302
  "rowActions": "Row actions",
294
303
  "empty": "No data",
295
- "loading": "Loading…"
304
+ "loading": "Loading…",
305
+ "error": "Couldn't load this list",
306
+ "errorDescription": "The data could not be retrieved. Try again in a moment.",
307
+ "denied": "You don't have access to this list",
308
+ "deniedDescription": "Ask an administrator to grant you permission to view these records."
296
309
  },
297
310
  "dataGrid": {
298
311
  "search": "Search",
@@ -304,6 +317,10 @@
304
317
  },
305
318
  "status": {
306
319
  "active": "Active",
320
+ "trialing": "Trialing",
321
+ "past_due": "Past due",
322
+ "incomplete": "Incomplete",
323
+ "canceled": "Canceled",
307
324
  "completed": "Completed",
308
325
  "delivered": "Delivered",
309
326
  "done": "Done",
@@ -353,6 +370,8 @@
353
370
  "chart": {
354
371
  "empty": "No data to display",
355
372
  "summaryCartesian": "Chart with {series} series across {points} data points",
356
- "summaryPie": "Pie chart with {slices} slices"
373
+ "summaryPie": "Pie chart with {slices} slices",
374
+ "summaryTrend": "Bar trend with {points} data points",
375
+ "trendCurrent": "current"
357
376
  }
358
377
  }