@kya-os/consent 0.4.0 → 0.4.2
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/README.md +186 -22
- package/dist/bundle/index.d.ts +9 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/index.js +13 -0
- package/dist/bundle/index.js.map +1 -1
- package/dist/bundle/inline.d.ts.map +1 -1
- package/dist/bundle/inline.js +4 -4
- package/dist/bundle/inline.js.map +1 -1
- package/dist/cjs/bundle/index.js +36 -1
- package/dist/cjs/bundle/index.js.map +1 -1
- package/dist/cjs/bundle/inline.js +4 -4
- package/dist/cjs/bundle/inline.js.map +1 -1
- package/dist/cjs/components/consent-action-bar.js +97 -25
- package/dist/cjs/components/consent-action-bar.js.map +1 -1
- package/dist/cjs/components/consent-agent-header.js +7 -105
- package/dist/cjs/components/consent-agent-header.js.map +1 -1
- package/dist/cjs/components/consent-button.js +6 -1
- package/dist/cjs/components/consent-button.js.map +1 -1
- package/dist/cjs/components/consent-capabilities-screen.js +456 -117
- package/dist/cjs/components/consent-capabilities-screen.js.map +1 -1
- package/dist/cjs/components/consent-capability-card.js +159 -32
- package/dist/cjs/components/consent-capability-card.js.map +1 -1
- package/dist/cjs/components/consent-checkbox.js +7 -0
- package/dist/cjs/components/consent-checkbox.js.map +1 -1
- package/dist/cjs/components/consent-connector-header.js +262 -45
- package/dist/cjs/components/consent-connector-header.js.map +1 -1
- package/dist/cjs/components/consent-duration.js +1 -1
- package/dist/cjs/components/consent-flow-timeline.js +177 -0
- package/dist/cjs/components/consent-flow-timeline.js.map +1 -0
- package/dist/cjs/components/consent-flow.js +540 -0
- package/dist/cjs/components/consent-flow.js.map +1 -0
- package/dist/cjs/components/consent-footer.js +22 -14
- package/dist/cjs/components/consent-footer.js.map +1 -1
- package/dist/cjs/components/consent-headline.js +353 -33
- package/dist/cjs/components/consent-headline.js.map +1 -1
- package/dist/cjs/components/consent-oauth-button.js +68 -138
- package/dist/cjs/components/consent-oauth-button.js.map +1 -1
- package/dist/cjs/components/consent-otp-input.js +5 -0
- package/dist/cjs/components/consent-otp-input.js.map +1 -1
- package/dist/cjs/components/consent-phone-handoff.js +3 -3
- package/dist/cjs/components/consent-request-expiry.js +1 -1
- package/dist/cjs/components/consent-revocation-notice.js +29 -18
- package/dist/cjs/components/consent-revocation-notice.js.map +1 -1
- package/dist/cjs/components/consent-revoke.js +9 -4
- package/dist/cjs/components/consent-revoke.js.map +1 -1
- package/dist/cjs/components/consent-secured-by.js +106 -0
- package/dist/cjs/components/consent-secured-by.js.map +1 -0
- package/dist/cjs/components/consent-shell.js +1 -1
- package/dist/cjs/components/consent-terms.js +7 -0
- package/dist/cjs/components/consent-terms.js.map +1 -1
- package/dist/cjs/components/consent-wallet-check.js +26 -2
- package/dist/cjs/components/consent-wallet-check.js.map +1 -1
- package/dist/cjs/components/consent-wallet-notice.js +1 -1
- package/dist/cjs/components/consent-wallet-orb.js +1 -1
- package/dist/cjs/components/consent-wallet-signature.js +1 -1
- package/dist/cjs/components/decision-icons.js +37 -0
- package/dist/cjs/components/decision-icons.js.map +1 -0
- package/dist/cjs/components/edit-region.js +309 -0
- package/dist/cjs/components/edit-region.js.map +1 -0
- package/dist/cjs/components/flow-blocks.js +762 -0
- package/dist/cjs/components/flow-blocks.js.map +1 -0
- package/dist/cjs/components/flow-motion.js +177 -0
- package/dist/cjs/components/flow-motion.js.map +1 -0
- package/dist/cjs/components/grant-details.js +143 -0
- package/dist/cjs/components/grant-details.js.map +1 -0
- package/dist/cjs/components/grant-field-styles.js +2 -2
- package/dist/cjs/components/index.js +13 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/mcp-consent.js +93 -36
- package/dist/cjs/components/mcp-consent.js.map +1 -1
- package/dist/cjs/components/preview.js +67 -0
- package/dist/cjs/components/preview.js.map +1 -0
- package/dist/cjs/components/provider-icons.js +92 -0
- package/dist/cjs/components/provider-icons.js.map +1 -0
- package/dist/cjs/constants/capabilities.js +17 -2
- package/dist/cjs/constants/capabilities.js.map +1 -1
- package/dist/cjs/copy/tokens.js +67 -24
- package/dist/cjs/copy/tokens.js.map +1 -1
- package/dist/cjs/flow/copy.js +146 -0
- package/dist/cjs/flow/copy.js.map +1 -0
- package/dist/cjs/flow/index.js +31 -0
- package/dist/cjs/flow/index.js.map +1 -0
- package/dist/cjs/flow/model.js +107 -0
- package/dist/cjs/flow/model.js.map +1 -0
- package/dist/cjs/flow/presets.js +157 -0
- package/dist/cjs/flow/presets.js.map +1 -0
- package/dist/cjs/flow/schema.js +76 -0
- package/dist/cjs/flow/schema.js.map +1 -0
- package/dist/cjs/identity/agent-identity.js +3 -2
- package/dist/cjs/identity/agent-identity.js.map +1 -1
- package/dist/cjs/mcp-app/inline.js +2 -2
- package/dist/cjs/mcp-app/inline.js.map +1 -1
- package/dist/cjs/react/index.js +40 -2
- package/dist/cjs/react/index.js.map +1 -1
- package/dist/cjs/styles/brand.js +385 -0
- package/dist/cjs/styles/brand.js.map +1 -0
- package/dist/cjs/styles/index.js +1 -0
- package/dist/cjs/styles/index.js.map +1 -1
- package/dist/cjs/styles/theme.js +102 -30
- package/dist/cjs/styles/theme.js.map +1 -1
- package/dist/cjs/types/capabilities.types.js +1 -2
- package/dist/cjs/types/capabilities.types.js.map +1 -1
- package/dist/cjs/types/decision.types.js +13 -0
- package/dist/cjs/types/decision.types.js.map +1 -0
- package/dist/cjs/types/edit.types.js +80 -0
- package/dist/cjs/types/edit.types.js.map +1 -0
- package/dist/cjs/types/index.js +2 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/components/consent-action-bar.d.ts +20 -1
- package/dist/components/consent-action-bar.d.ts.map +1 -1
- package/dist/components/consent-action-bar.js +97 -25
- package/dist/components/consent-action-bar.js.map +1 -1
- package/dist/components/consent-agent-header.d.ts +4 -17
- package/dist/components/consent-agent-header.d.ts.map +1 -1
- package/dist/components/consent-agent-header.js +7 -105
- package/dist/components/consent-agent-header.js.map +1 -1
- package/dist/components/consent-button.d.ts +2 -0
- package/dist/components/consent-button.d.ts.map +1 -1
- package/dist/components/consent-button.js +6 -1
- package/dist/components/consent-button.js.map +1 -1
- package/dist/components/consent-capabilities-screen.d.ts +101 -17
- package/dist/components/consent-capabilities-screen.d.ts.map +1 -1
- package/dist/components/consent-capabilities-screen.js +457 -118
- package/dist/components/consent-capabilities-screen.js.map +1 -1
- package/dist/components/consent-capability-card.d.ts +32 -3
- package/dist/components/consent-capability-card.d.ts.map +1 -1
- package/dist/components/consent-capability-card.js +159 -32
- package/dist/components/consent-capability-card.js.map +1 -1
- package/dist/components/consent-checkbox.d.ts +2 -0
- package/dist/components/consent-checkbox.d.ts.map +1 -1
- package/dist/components/consent-checkbox.js +7 -0
- package/dist/components/consent-checkbox.js.map +1 -1
- package/dist/components/consent-connector-header.d.ts +52 -7
- package/dist/components/consent-connector-header.d.ts.map +1 -1
- package/dist/components/consent-connector-header.js +262 -45
- package/dist/components/consent-connector-header.js.map +1 -1
- package/dist/components/consent-duration.js +1 -1
- package/dist/components/consent-flow-timeline.d.ts +49 -0
- package/dist/components/consent-flow-timeline.d.ts.map +1 -0
- package/dist/components/consent-flow-timeline.js +174 -0
- package/dist/components/consent-flow-timeline.js.map +1 -0
- package/dist/components/consent-flow.d.ts +101 -0
- package/dist/components/consent-flow.d.ts.map +1 -0
- package/dist/components/consent-flow.js +504 -0
- package/dist/components/consent-flow.js.map +1 -0
- package/dist/components/consent-footer.d.ts +6 -4
- package/dist/components/consent-footer.d.ts.map +1 -1
- package/dist/components/consent-footer.js +22 -14
- package/dist/components/consent-footer.js.map +1 -1
- package/dist/components/consent-headline.d.ts +62 -16
- package/dist/components/consent-headline.d.ts.map +1 -1
- package/dist/components/consent-headline.js +352 -34
- package/dist/components/consent-headline.js.map +1 -1
- package/dist/components/consent-oauth-button.d.ts +9 -6
- package/dist/components/consent-oauth-button.d.ts.map +1 -1
- package/dist/components/consent-oauth-button.js +71 -141
- package/dist/components/consent-oauth-button.js.map +1 -1
- package/dist/components/consent-otp-input.d.ts.map +1 -1
- package/dist/components/consent-otp-input.js +5 -0
- package/dist/components/consent-otp-input.js.map +1 -1
- package/dist/components/consent-passkey.d.ts +6 -0
- package/dist/components/consent-passkey.d.ts.map +1 -1
- package/dist/components/consent-passkey.js +67 -9
- package/dist/components/consent-passkey.js.map +1 -1
- package/dist/components/consent-phone-handoff.js +3 -3
- package/dist/components/consent-request-expiry.js +1 -1
- package/dist/components/consent-revocation-notice.d.ts.map +1 -1
- package/dist/components/consent-revocation-notice.js +29 -18
- package/dist/components/consent-revocation-notice.js.map +1 -1
- package/dist/components/consent-revoke.d.ts +2 -0
- package/dist/components/consent-revoke.d.ts.map +1 -1
- package/dist/components/consent-revoke.js +9 -4
- package/dist/components/consent-revoke.js.map +1 -1
- package/dist/components/consent-secured-by.d.ts +25 -0
- package/dist/components/consent-secured-by.d.ts.map +1 -0
- package/dist/components/consent-secured-by.js +103 -0
- package/dist/components/consent-secured-by.js.map +1 -0
- package/dist/components/consent-shell.js +1 -1
- package/dist/components/consent-terms.d.ts +2 -0
- package/dist/components/consent-terms.d.ts.map +1 -1
- package/dist/components/consent-terms.js +7 -0
- package/dist/components/consent-terms.js.map +1 -1
- package/dist/components/consent-wallet-check.d.ts +8 -0
- package/dist/components/consent-wallet-check.d.ts.map +1 -1
- package/dist/components/consent-wallet-check.js +27 -3
- package/dist/components/consent-wallet-check.js.map +1 -1
- package/dist/components/consent-wallet-notice.js +1 -1
- package/dist/components/consent-wallet-orb.js +1 -1
- package/dist/components/consent-wallet-signature.js +1 -1
- package/dist/components/decision-icons.d.ts +26 -0
- package/dist/components/decision-icons.d.ts.map +1 -0
- package/dist/components/decision-icons.js +34 -0
- package/dist/components/decision-icons.js.map +1 -0
- package/dist/components/edit-region.d.ts +50 -0
- package/dist/components/edit-region.d.ts.map +1 -0
- package/dist/components/edit-region.js +305 -0
- package/dist/components/edit-region.js.map +1 -0
- package/dist/components/flow-blocks.d.ts +45 -0
- package/dist/components/flow-blocks.d.ts.map +1 -0
- package/dist/components/flow-blocks.js +755 -0
- package/dist/components/flow-blocks.js.map +1 -0
- package/dist/components/flow-motion.d.ts +41 -0
- package/dist/components/flow-motion.d.ts.map +1 -0
- package/dist/components/flow-motion.js +164 -0
- package/dist/components/flow-motion.js.map +1 -0
- package/dist/components/grant-details.d.ts +28 -0
- package/dist/components/grant-details.d.ts.map +1 -0
- package/dist/components/grant-details.js +138 -0
- package/dist/components/grant-details.js.map +1 -0
- package/dist/components/grant-field-styles.js +2 -2
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/mcp-consent.d.ts +19 -0
- package/dist/components/mcp-consent.d.ts.map +1 -1
- package/dist/components/mcp-consent.js +93 -36
- package/dist/components/mcp-consent.js.map +1 -1
- package/dist/components/preview.d.ts +38 -0
- package/dist/components/preview.d.ts.map +1 -0
- package/dist/components/preview.js +61 -0
- package/dist/components/preview.js.map +1 -0
- package/dist/components/provider-icons.d.ts +16 -0
- package/dist/components/provider-icons.d.ts.map +1 -0
- package/dist/components/provider-icons.js +88 -0
- package/dist/components/provider-icons.js.map +1 -0
- package/dist/consent.js +4875 -1178
- package/dist/consent.min.js +2367 -814
- package/dist/constants/capabilities.d.ts +16 -3
- package/dist/constants/capabilities.d.ts.map +1 -1
- package/dist/constants/capabilities.js +17 -2
- package/dist/constants/capabilities.js.map +1 -1
- package/dist/copy/tokens.d.ts +67 -24
- package/dist/copy/tokens.d.ts.map +1 -1
- package/dist/copy/tokens.js +67 -24
- package/dist/copy/tokens.js.map +1 -1
- package/dist/flow/copy.d.ts +31 -0
- package/dist/flow/copy.d.ts.map +1 -0
- package/dist/flow/copy.js +137 -0
- package/dist/flow/copy.js.map +1 -0
- package/dist/flow/index.d.ts +15 -0
- package/dist/flow/index.d.ts.map +1 -0
- package/dist/flow/index.js +15 -0
- package/dist/flow/index.js.map +1 -0
- package/dist/flow/model.d.ts +209 -0
- package/dist/flow/model.d.ts.map +1 -0
- package/dist/flow/model.js +103 -0
- package/dist/flow/model.js.map +1 -0
- package/dist/flow/presets.d.ts +29 -0
- package/dist/flow/presets.d.ts.map +1 -0
- package/dist/flow/presets.js +153 -0
- package/dist/flow/presets.js.map +1 -0
- package/dist/flow/schema.d.ts +127 -0
- package/dist/flow/schema.d.ts.map +1 -0
- package/dist/flow/schema.js +72 -0
- package/dist/flow/schema.js.map +1 -0
- package/dist/identity/agent-identity.d.ts +3 -2
- package/dist/identity/agent-identity.d.ts.map +1 -1
- package/dist/identity/agent-identity.js +3 -2
- package/dist/identity/agent-identity.js.map +1 -1
- package/dist/mcp-app/inline.d.ts.map +1 -1
- package/dist/mcp-app/inline.js +2 -2
- package/dist/mcp-app/inline.js.map +1 -1
- package/dist/react/index.d.ts +27 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +39 -1
- package/dist/react/index.js.map +1 -1
- package/dist/styles/brand.d.ts +184 -0
- package/dist/styles/brand.d.ts.map +1 -0
- package/dist/styles/brand.js +372 -0
- package/dist/styles/brand.js.map +1 -0
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/styles/index.js +1 -0
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/theme.d.ts +76 -13
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/styles/theme.js +98 -29
- package/dist/styles/theme.js.map +1 -1
- package/dist/types/capabilities.types.d.ts +12 -14
- package/dist/types/capabilities.types.d.ts.map +1 -1
- package/dist/types/capabilities.types.js +1 -2
- package/dist/types/capabilities.types.js.map +1 -1
- package/dist/types/decision.types.d.ts +57 -0
- package/dist/types/decision.types.d.ts.map +1 -0
- package/dist/types/decision.types.js +12 -0
- package/dist/types/decision.types.js.map +1 -0
- package/dist/types/edit.types.d.ts +73 -0
- package/dist/types/edit.types.d.ts.map +1 -0
- package/dist/types/edit.types.js +76 -0
- package/dist/types/edit.types.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +10 -5
package/dist/cjs/styles/theme.js
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* primary button can adopt operator brand color while the rest of the
|
|
15
15
|
* surface stays in the chosen theme.
|
|
16
16
|
*
|
|
17
|
-
* The
|
|
18
|
-
*
|
|
17
|
+
* The `HIGHER RISK` chip is amber in both themes, whatever the org's brand:
|
|
18
|
+
* a soft warning amber on the light card, and a solid amber on the dark one.
|
|
19
19
|
*
|
|
20
20
|
* The agent logo tile tokens are fixed across themes too: agent artwork is
|
|
21
21
|
* drawn on a white tile with a light border in both themes, so a logo never
|
|
@@ -27,14 +27,32 @@
|
|
|
27
27
|
* @module @kya-os/consent/styles/theme
|
|
28
28
|
*/
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.darkTheme = exports.lightTheme = void 0;
|
|
30
|
+
exports.darkTheme = exports.lightTheme = exports.TINT_LINE_PERCENT = exports.TINT_PERCENT = void 0;
|
|
31
31
|
exports.getConsentTheme = getConsentTheme;
|
|
32
32
|
exports.themeToCssVariables = themeToCssVariables;
|
|
33
|
+
exports.resolveThemeTokens = resolveThemeTokens;
|
|
34
|
+
exports.themeScopeStyle = themeScopeStyle;
|
|
35
|
+
exports.themeTokenProperty = themeTokenProperty;
|
|
33
36
|
const FIXED_RISK_CHIP_BG = "#FCE7B6";
|
|
34
37
|
const FIXED_RISK_CHIP_TEXT = "#7A4F00";
|
|
38
|
+
/** The light theme's risk chip: warning amber at 10% over the card, 5.8:1. */
|
|
39
|
+
const LIGHT_RISK_CHIP_BG = "rgba(140, 74, 0, 0.10)";
|
|
40
|
+
const LIGHT_RISK_CHIP_TEXT = "#8C4A00";
|
|
35
41
|
const FIXED_AGENT_TILE_BG = "#FFFFFF";
|
|
36
42
|
const FIXED_AGENT_TILE_BORDER = "rgba(15, 23, 42, 0.08)";
|
|
37
43
|
const FIXED_AGENT_TILE_TEXT = "#0F172A";
|
|
44
|
+
/**
|
|
45
|
+
* The share of the brand (or the text, with no brand) in a tinted box: light
|
|
46
|
+
* enough that a box reads as a panel, not as something disabled.
|
|
47
|
+
*/
|
|
48
|
+
exports.TINT_PERCENT = 4;
|
|
49
|
+
/** The share of the brand (or the text) in a tinted box's edge, which carries the box. */
|
|
50
|
+
exports.TINT_LINE_PERCENT = 11;
|
|
51
|
+
/**
|
|
52
|
+
* The light theme. Its quietest text reaches 4.5:1 on the cream inset panel
|
|
53
|
+
* (4.54:1) as well as on the card, and its focus ring 3:1 on both, the
|
|
54
|
+
* ratios WCAG 1.4.3 and 1.4.11 ask for.
|
|
55
|
+
*/
|
|
38
56
|
exports.lightTheme = {
|
|
39
57
|
surfaceBg: "#F4F1EA",
|
|
40
58
|
surfaceCard: "#FFFFFF",
|
|
@@ -42,20 +60,17 @@ exports.lightTheme = {
|
|
|
42
60
|
surfaceInset: "#F1ECE2",
|
|
43
61
|
textPrimary: "#0F172A",
|
|
44
62
|
textSecondary: "#334155",
|
|
45
|
-
textTertiary: "#
|
|
63
|
+
textTertiary: "#5D6C82",
|
|
46
64
|
surfaceAccent: "#0F172A",
|
|
47
65
|
surfaceAccentText: "#FFFFFF",
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
chipRiskBg: FIXED_RISK_CHIP_BG,
|
|
53
|
-
chipRiskText: FIXED_RISK_CHIP_TEXT,
|
|
54
|
-
focusRing: "rgba(15, 23, 42, 0.35)",
|
|
55
|
-
cardShadow: "0 30px 80px -40px rgba(15, 23, 42, 0.40)",
|
|
66
|
+
chipRiskBg: LIGHT_RISK_CHIP_BG,
|
|
67
|
+
chipRiskText: LIGHT_RISK_CHIP_TEXT,
|
|
68
|
+
focusRing: "#0F172A",
|
|
69
|
+
cardShadow: "0 6px 20px -6px rgba(15, 23, 42, 0.10)",
|
|
56
70
|
agentTileBg: FIXED_AGENT_TILE_BG,
|
|
57
71
|
agentTileBorder: FIXED_AGENT_TILE_BORDER,
|
|
58
72
|
agentTileText: FIXED_AGENT_TILE_TEXT,
|
|
73
|
+
lockup: "#0810FE",
|
|
59
74
|
};
|
|
60
75
|
exports.darkTheme = {
|
|
61
76
|
surfaceBg: "#0B0808",
|
|
@@ -67,10 +82,6 @@ exports.darkTheme = {
|
|
|
67
82
|
textTertiary: "#94A3B8",
|
|
68
83
|
surfaceAccent: "#F8FAFC",
|
|
69
84
|
surfaceAccentText: "#0F172A",
|
|
70
|
-
pillVerifiedBg: "rgba(34, 197, 94, 0.16)",
|
|
71
|
-
pillVerifiedText: "#86EFAC",
|
|
72
|
-
pillUnverifiedBg: "rgba(148, 163, 184, 0.18)",
|
|
73
|
-
pillUnverifiedText: "#CBD5E1",
|
|
74
85
|
chipRiskBg: FIXED_RISK_CHIP_BG,
|
|
75
86
|
chipRiskText: FIXED_RISK_CHIP_TEXT,
|
|
76
87
|
focusRing: "rgba(248, 250, 252, 0.55)",
|
|
@@ -88,27 +99,88 @@ function getConsentTheme(theme) {
|
|
|
88
99
|
/**
|
|
89
100
|
* Render a theme as a CSS string suitable for injecting into a `<style>` block
|
|
90
101
|
* or `:host { ... }` rule. Each token becomes a `--cs-{kebab}` custom property.
|
|
91
|
-
*
|
|
92
|
-
*
|
|
102
|
+
* Tokens a theme omits (or sets to undefined) are emitted with their fixed or
|
|
103
|
+
* derived values ({@link resolveThemeTokens}), so the output never contains
|
|
104
|
+
* "undefined".
|
|
93
105
|
*
|
|
94
106
|
* @example
|
|
95
107
|
* themeToCssVariables(lightTheme);
|
|
96
108
|
* // " --cs-surface-bg: #F4F1EA;\n ... \n --cs-agent-tile-bg: #FFFFFF;\n ..."
|
|
97
109
|
*/
|
|
98
110
|
function themeToCssVariables(tokens) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
return Object.entries(resolveThemeTokens(tokens))
|
|
112
|
+
.map(([key, value]) => ` ${themeTokenProperty(key)}: ${value};`)
|
|
113
|
+
.join("\n");
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Every token of `tokens`, with the optional ones a theme omits filled in:
|
|
117
|
+
* the fixed agent tile, and a tint, mark and action color made from the
|
|
118
|
+
* theme's own text and card.
|
|
119
|
+
*/
|
|
120
|
+
function resolveThemeTokens(tokens) {
|
|
121
|
+
const resolved = { ...tokens };
|
|
122
|
+
for (const key of FIXED_KEYS) {
|
|
123
|
+
resolved[key] = tokens[key] ?? FIXED_TOKENS[key];
|
|
108
124
|
}
|
|
109
|
-
|
|
125
|
+
for (const key of DERIVED_KEYS) {
|
|
126
|
+
resolved[key] = tokens[key] ?? DERIVED_TOKENS[key]((base) => tokens[base]);
|
|
127
|
+
}
|
|
128
|
+
return resolved;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The CSS that themes an element's shadow tree while letting the page win: a
|
|
132
|
+
* `--cs-*` property the page sets, on the element or on any ancestor, is used
|
|
133
|
+
* as it is, and every other one comes from `tokens`.
|
|
134
|
+
*
|
|
135
|
+
* The element resolves each token once on `:host`, under a private name
|
|
136
|
+
* (`--_cs-*`), then publishes it under its public name on `scope`, the top
|
|
137
|
+
* elements of its shadow tree, so everything inside reads the public name as
|
|
138
|
+
* before. (The private step is what lets the public name take the page's
|
|
139
|
+
* value: a property cannot refer to itself.) A derived token the page does
|
|
140
|
+
* not set, such as the tint, is made from the resolved tokens, so a page that
|
|
141
|
+
* sets only its text and card colors gets a tint of those.
|
|
142
|
+
*
|
|
143
|
+
* @param tokens - The theme the element draws where the page sets nothing.
|
|
144
|
+
* @param scope - A selector list for the top elements of the shadow tree.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* themeScopeStyle(lightTheme, ".card");
|
|
148
|
+
* // ":host {\n --_cs-surface-bg: var(--cs-surface-bg, #F4F1EA);\n ... }
|
|
149
|
+
* // .card {\n --cs-surface-bg: var(--_cs-surface-bg);\n ... }"
|
|
150
|
+
*/
|
|
151
|
+
function themeScopeStyle(tokens, scope) {
|
|
152
|
+
const resolved = resolveThemeTokens(tokens);
|
|
153
|
+
const keys = Object.keys(resolved);
|
|
154
|
+
const resolvedName = (key) => `--_${themeTokenProperty(key).slice(2)}`;
|
|
155
|
+
const isDerived = (key) => DERIVED_KEYS.includes(key);
|
|
156
|
+
const fallback = (key) => isDerived(key) && tokens[key] === undefined
|
|
157
|
+
? DERIVED_TOKENS[key]((base) => `var(${resolvedName(base)})`)
|
|
158
|
+
: resolved[key];
|
|
159
|
+
const resolve = keys.map((key) => ` ${resolvedName(key)}: var(${themeTokenProperty(key)}, ${fallback(key)});`);
|
|
160
|
+
const publish = keys.map((key) => ` ${themeTokenProperty(key)}: var(${resolvedName(key)});`);
|
|
161
|
+
return `:host {\n${resolve.join("\n")}\n}\n${scope} {\n${publish.join("\n")}\n}`;
|
|
110
162
|
}
|
|
111
|
-
|
|
112
|
-
|
|
163
|
+
const FIXED_TOKENS = {
|
|
164
|
+
agentTileBg: FIXED_AGENT_TILE_BG,
|
|
165
|
+
agentTileBorder: FIXED_AGENT_TILE_BORDER,
|
|
166
|
+
agentTileText: FIXED_AGENT_TILE_TEXT,
|
|
167
|
+
};
|
|
168
|
+
const FIXED_KEYS = Object.keys(FIXED_TOKENS);
|
|
169
|
+
/**
|
|
170
|
+
* How each derived token is made, given how to name a base token: its value
|
|
171
|
+
* in a theme object, or the property it resolves to in a shadow tree.
|
|
172
|
+
*/
|
|
173
|
+
const DERIVED_TOKENS = {
|
|
174
|
+
tint: (token) => `color-mix(in srgb, ${token("textPrimary")} ${exports.TINT_PERCENT}%, ${token("surfaceCard")})`,
|
|
175
|
+
tintLine: (token) => `color-mix(in srgb, ${token("textPrimary")} ${exports.TINT_LINE_PERCENT}%, ${token("surfaceCard")})`,
|
|
176
|
+
mark: (token) => token("textPrimary"),
|
|
177
|
+
action: (token) => token("textPrimary"),
|
|
178
|
+
lockup: (token) => token("textPrimary"),
|
|
179
|
+
warningText: (token) => token("textPrimary"),
|
|
180
|
+
};
|
|
181
|
+
const DERIVED_KEYS = Object.keys(DERIVED_TOKENS);
|
|
182
|
+
/** The custom property a theme key is published as: `tintLine` is `--cs-tint-line`. */
|
|
183
|
+
function themeTokenProperty(key) {
|
|
184
|
+
return `--cs-${key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`;
|
|
113
185
|
}
|
|
114
186
|
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/styles/theme.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;;
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../src/styles/theme.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;;AAmLH,0CAIC;AAaD,kDAIC;AAOD,gDAWC;AAuBD,0CAsBC;AA+BD,gDAEC;AArLD,MAAM,kBAAkB,GAAG,SAAS,CAAC;AACrC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AACvC,8EAA8E;AAC9E,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AACpD,MAAM,oBAAoB,GAAG,SAAS,CAAC;AACvC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AACzD,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAExC;;;GAGG;AACU,QAAA,YAAY,GAAG,CAAC,CAAC;AAC9B,0FAA0F;AAC7E,QAAA,iBAAiB,GAAG,EAAE,CAAC;AAEpC;;;;GAIG;AACU,QAAA,UAAU,GAAuB;IAC5C,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,SAAS;IACtB,aAAa,EAAE,wBAAwB;IACvC,YAAY,EAAE,SAAS;IACvB,WAAW,EAAE,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EAAE,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;CAC7C,CAAC;AACF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAsB,CAAC;AAEtE,uFAAuF;AACvF,SAAgB,kBAAkB,CAAC,GAAW;IAC5C,OAAO,QAAQ,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC;AACvE,CAAC"}
|
|
@@ -46,8 +46,7 @@ const AGENT_VERIFICATIONS = [
|
|
|
46
46
|
*
|
|
47
47
|
* `verification` wins when it is one of the three states; otherwise the
|
|
48
48
|
* deprecated `verified` boolean reads as `verified` or `unverified`. A
|
|
49
|
-
* `domain` state with no domain to name reads as `unverified
|
|
50
|
-
* never shows an empty pill.
|
|
49
|
+
* `domain` state with no domain to name reads as `unverified`.
|
|
51
50
|
*/
|
|
52
51
|
function agentVerification(agent) {
|
|
53
52
|
const stated = agent.verification;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.types.js","sourceRoot":"","sources":["../../../src/types/capabilities.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAiDH,0CAEC;
|
|
1
|
+
{"version":3,"file":"capabilities.types.js","sourceRoot":"","sources":["../../../src/types/capabilities.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAiDH,0CAEC;AA0BD,8CAQC;AA6BD,0CAUC;AAhGD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,eAAe,CAAC,SAAoB;IAClD,OAAO,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,QAAQ,CAAC;AACvD,CAAC;AAaD,MAAM,mBAAmB,GAAiC;IACxD,UAAU;IACV,QAAQ;IACR,YAAY;CACb,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAC/B,KAAkE;IAElE,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAClC,IAAI,MAAM,KAAK,SAAS,IAAI,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACjE,OAAO,MAAM,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC;IAC9E,CAAC;IACD,OAAO,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC;AAC7D,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,oBAAoB,CAAC,KAAa;IACzC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjC,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;AACzD,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,SAAgB,eAAe,CAC7B,KAAsC;IAEtC,OAAO,CACL,CAAC,KAAK;QACN,iBAAiB,CAAC,KAAK,CAAC,KAAK,UAAU;QACvC,KAAK,CAAC,QAAQ,KAAK,KAAK;QACxB,CAAC,KAAK,CAAC,WAAW;QAClB,CAAC,oBAAoB,CAAC,KAAK,CAAC,WAAW,CAAC,CACzC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* What the capabilities screen shows beside the permissions: who is signing
|
|
4
|
+
* in, and what the grant connects to and how it is bounded.
|
|
5
|
+
*
|
|
6
|
+
* The host words every value. The screen lays them out and never formats a
|
|
7
|
+
* time, an amount or a duration itself, so the host keeps its own locale,
|
|
8
|
+
* time zone and rules (such as leaving out a budget beside a per-call limit).
|
|
9
|
+
*
|
|
10
|
+
* @module types/decision
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
//# sourceMappingURL=decision.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decision.types.js","sourceRoot":"","sources":["../../../src/types/decision.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Edit Mode Types
|
|
4
|
+
*
|
|
5
|
+
* The words a person can edit in place on a screen in edit mode (`preview`
|
|
6
|
+
* and `editable` together), each named by a key. A region sends
|
|
7
|
+
* `consent-edit` with `{ key, value }` on every keystroke and
|
|
8
|
+
* `consent-edit-end` when it is left; the host writes the value to its own
|
|
9
|
+
* data and passes the result back, as it would for any other change.
|
|
10
|
+
*
|
|
11
|
+
* @module types/edit
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.CONSENT_EDIT_EVENTS = exports.CONSENT_EDIT_KEYS = void 0;
|
|
15
|
+
exports.parseConsentEditKey = parseConsentEditKey;
|
|
16
|
+
/** The fixed keys, and builders for the keys that name a row. */
|
|
17
|
+
exports.CONSENT_EDIT_KEYS = {
|
|
18
|
+
/** The subhead under the headline. */
|
|
19
|
+
description: "description",
|
|
20
|
+
/** The organization's name in the headline. */
|
|
21
|
+
orgName: "org-name",
|
|
22
|
+
/** The Allow button's label. */
|
|
23
|
+
submitLabel: "submit-label",
|
|
24
|
+
/** The Deny button's label. */
|
|
25
|
+
cancelLabel: "cancel-label",
|
|
26
|
+
/** A headline a host words itself, in the `headline` slot. */
|
|
27
|
+
headline: "headline",
|
|
28
|
+
/** The title of a page a host draws after the decision. */
|
|
29
|
+
terminalTitle: "terminal:title",
|
|
30
|
+
/** The body of a page a host draws after the decision. */
|
|
31
|
+
terminalBody: "terminal:body",
|
|
32
|
+
/** A capability row's label, by the capability's id. */
|
|
33
|
+
capabilityLabel: (id) => `capability:${id}:label`,
|
|
34
|
+
/** A capability row's description, by the capability's id. */
|
|
35
|
+
capabilityDescription: (id) => `capability:${id}:description`,
|
|
36
|
+
};
|
|
37
|
+
/** The events a region sends. Both bubble and cross shadow roots. */
|
|
38
|
+
exports.CONSENT_EDIT_EVENTS = {
|
|
39
|
+
/** On every change to a region's text. */
|
|
40
|
+
edit: "consent-edit",
|
|
41
|
+
/** When a person leaves a region they changed, for hosts that group undo. */
|
|
42
|
+
end: "consent-edit-end",
|
|
43
|
+
};
|
|
44
|
+
const FIXED_KEYS = new Set([
|
|
45
|
+
exports.CONSENT_EDIT_KEYS.description,
|
|
46
|
+
exports.CONSENT_EDIT_KEYS.orgName,
|
|
47
|
+
exports.CONSENT_EDIT_KEYS.submitLabel,
|
|
48
|
+
exports.CONSENT_EDIT_KEYS.cancelLabel,
|
|
49
|
+
exports.CONSENT_EDIT_KEYS.headline,
|
|
50
|
+
exports.CONSENT_EDIT_KEYS.terminalTitle,
|
|
51
|
+
exports.CONSENT_EDIT_KEYS.terminalBody,
|
|
52
|
+
]);
|
|
53
|
+
const CAPABILITY_PREFIX = "capability:";
|
|
54
|
+
const CAPABILITY_SUFFIXES = [
|
|
55
|
+
[":label", "capability-label"],
|
|
56
|
+
[":description", "capability-description"],
|
|
57
|
+
];
|
|
58
|
+
/**
|
|
59
|
+
* What a key names, or null for a string that is not a key. A capability id
|
|
60
|
+
* may itself hold colons: everything between the prefix and the last part
|
|
61
|
+
* (`:label` or `:description`) is the id.
|
|
62
|
+
*/
|
|
63
|
+
function parseConsentEditKey(key) {
|
|
64
|
+
if (FIXED_KEYS.has(key)) {
|
|
65
|
+
return { kind: key };
|
|
66
|
+
}
|
|
67
|
+
if (!key.startsWith(CAPABILITY_PREFIX))
|
|
68
|
+
return null;
|
|
69
|
+
for (const [suffix, kind] of CAPABILITY_SUFFIXES) {
|
|
70
|
+
if (key.endsWith(suffix) &&
|
|
71
|
+
key.length > CAPABILITY_PREFIX.length + suffix.length) {
|
|
72
|
+
return {
|
|
73
|
+
kind,
|
|
74
|
+
capabilityId: key.slice(CAPABILITY_PREFIX.length, -suffix.length),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=edit.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edit.types.js","sourceRoot":"","sources":["../../../src/types/edit.types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAqGH,kDAiBC;AApHD,iEAAiE;AACpD,QAAA,iBAAiB,GAAG;IAC/B,sCAAsC;IACtC,WAAW,EAAE,aAAa;IAC1B,+CAA+C;IAC/C,OAAO,EAAE,UAAU;IACnB,gCAAgC;IAChC,WAAW,EAAE,cAAc;IAC3B,+BAA+B;IAC/B,WAAW,EAAE,cAAc;IAC3B,8DAA8D;IAC9D,QAAQ,EAAE,UAAU;IACpB,2DAA2D;IAC3D,aAAa,EAAE,gBAAgB;IAC/B,0DAA0D;IAC1D,YAAY,EAAE,eAAe;IAC7B,wDAAwD;IACxD,eAAe,EAAE,CAAC,EAAU,EAA0B,EAAE,CACtD,cAAc,EAAE,QAAQ;IAC1B,8DAA8D;IAC9D,qBAAqB,EAAE,CAAC,EAAU,EAAgC,EAAE,CAClE,cAAc,EAAE,cAAc;CACxB,CAAC;AAsCX,qEAAqE;AACxD,QAAA,mBAAmB,GAAG;IACjC,0CAA0C;IAC1C,IAAI,EAAE,cAAc;IACpB,6EAA6E;IAC7E,GAAG,EAAE,kBAAkB;CACf,CAAC;AAYX,MAAM,UAAU,GAAwB,IAAI,GAAG,CAAC;IAC9C,yBAAiB,CAAC,WAAW;IAC7B,yBAAiB,CAAC,OAAO;IACzB,yBAAiB,CAAC,WAAW;IAC7B,yBAAiB,CAAC,WAAW;IAC7B,yBAAiB,CAAC,QAAQ;IAC1B,yBAAiB,CAAC,aAAa;IAC/B,yBAAiB,CAAC,YAAY;CAC/B,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,aAAa,CAAC;AACxC,MAAM,mBAAmB,GAAG;IAC1B,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IAC9B,CAAC,cAAc,EAAE,wBAAwB,CAAC;CAClC,CAAC;AAEX;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,GAAW;IAC7C,IAAI,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,EAAE,IAAI,EAAE,GAAiD,EAAE,CAAC;IACrE,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,iBAAiB,CAAC;QAAE,OAAO,IAAI,CAAC;IACpD,KAAK,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,mBAAmB,EAAE,CAAC;QACjD,IACE,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC;YACpB,GAAG,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EACrD,CAAC;YACD,OAAO;gBACL,IAAI;gBACJ,YAAY,EAAE,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;aAClE,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/cjs/types/index.js
CHANGED
|
@@ -29,4 +29,6 @@ __exportStar(require("./modes.types.js"), exports);
|
|
|
29
29
|
__exportStar(require("./page.types.js"), exports);
|
|
30
30
|
__exportStar(require("./api.types.js"), exports);
|
|
31
31
|
__exportStar(require("./capabilities.types.js"), exports);
|
|
32
|
+
__exportStar(require("./edit.types.js"), exports);
|
|
33
|
+
__exportStar(require("./decision.types.js"), exports);
|
|
32
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAEH,oDAAkC;AAClC,sDAAoC;AACpC,kDAAgC;AAChC,mDAAiC;AACjC,kDAAgC;AAChC,iDAA+B;AAC/B,0DAAwC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAEH,oDAAkC;AAClC,sDAAoC;AACpC,kDAAgC;AAChC,mDAAiC;AACjC,kDAAgC;AAChC,iDAA+B;AAC/B,0DAAwC;AACxC,kDAAgC;AAChC,sDAAoC"}
|
|
@@ -14,16 +14,22 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Parts: `submit`, `submit-icon`, `cancel`.
|
|
16
16
|
*
|
|
17
|
+
* With `preview` the buttons send no event. In edit mode (`preview` and
|
|
18
|
+
* `editable`) they draw as boxes of the same size with the same parts, and
|
|
19
|
+
* each label is a region a person types into, keyed `submit-label` and
|
|
20
|
+
* `cancel-label`: a region never sits inside a button.
|
|
21
|
+
*
|
|
17
22
|
* @module components/consent-action-bar
|
|
18
23
|
*/
|
|
19
24
|
import { LitElement } from "lit";
|
|
20
25
|
import type { ConsentTheme } from "../types/capabilities.types.js";
|
|
26
|
+
import { type ConsentEditSource } from "../types/edit.types.js";
|
|
21
27
|
/** A mark before the submit label. */
|
|
22
28
|
export type ActionBarSubmitIcon = "" | "passkey";
|
|
23
29
|
/**
|
|
24
30
|
* @fires consent-allow - The person allowed.
|
|
25
31
|
* @fires consent-deny - The person denied.
|
|
26
|
-
* @cssprop --cs-action-radius - The buttons' corners (default:
|
|
32
|
+
* @cssprop --cs-action-radius - The buttons' corners (default: 6px).
|
|
27
33
|
*/
|
|
28
34
|
export declare class ConsentActionBar extends LitElement {
|
|
29
35
|
agentName: string;
|
|
@@ -36,10 +42,23 @@ export declare class ConsentActionBar extends LitElement {
|
|
|
36
42
|
submitIcon: ActionBarSubmitIcon;
|
|
37
43
|
/** The submit label while `loading`, e.g. "Signing…". */
|
|
38
44
|
loadingLabel: string;
|
|
45
|
+
/** Draws as it would live, and sends no `consent-allow` or `consent-deny`. */
|
|
46
|
+
preview: boolean;
|
|
47
|
+
/** With `preview`: the labels can be edited in place. */
|
|
48
|
+
editable: boolean;
|
|
49
|
+
/** The raw text each region edits, by key. See `ConsentEditSource`. */
|
|
50
|
+
editSource: ConsentEditSource | undefined;
|
|
39
51
|
static styles: import("lit").CSSResult;
|
|
52
|
+
willUpdate(): void;
|
|
40
53
|
private emitAllow;
|
|
41
54
|
private emitDeny;
|
|
42
55
|
render(): import("lit").TemplateResult<1>;
|
|
56
|
+
/**
|
|
57
|
+
* Edit mode: the buttons as boxes with the same classes and parts, each
|
|
58
|
+
* label a region. A disabled Allow looks disabled, as it would live.
|
|
59
|
+
*/
|
|
60
|
+
private renderBoxes;
|
|
61
|
+
private renderSubmitIcon;
|
|
43
62
|
}
|
|
44
63
|
declare global {
|
|
45
64
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-action-bar.d.ts","sourceRoot":"","sources":["../../src/components/consent-action-bar.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consent-action-bar.d.ts","sourceRoot":"","sources":["../../src/components/consent-action-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAIrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,wBAAwB,CAAC;AAKhC,sCAAsC;AACtC,MAAM,MAAM,mBAAmB,GAAG,EAAE,GAAG,SAAS,CAAC;AAEjD;;;;GAIG;AACH,qBACa,gBAAiB,SAAQ,UAAU;IAClB,SAAS,SAAM;IACf,KAAK,EAAE,YAAY,CAAW;IAC7B,QAAQ,UAAS;IACjB,OAAO,UAAS;IACU,WAAW,SAAM;IACjB,WAAW,SAAM;IACxE,wDAAwD;IAExD,UAAU,EAAE,mBAAmB,CAAM;IACrC,yDAAyD;IACD,YAAY,SAAM;IAC1E,8EAA8E;IAClC,OAAO,UAAS;IAC5D,yDAAyD;IACb,QAAQ,UAAS;IAC7D,uEAAuE;IACvC,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAE1E,OAAgB,MAAM,0BAkFpB;IAEO,UAAU,IAAI,IAAI;IAI3B,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,QAAQ;IAOP,MAAM;IAwCf;;;OAGG;IACH,OAAO,CAAC,WAAW;IA8BnB,OAAO,CAAC,gBAAgB;CAgBzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,oBAAoB,EAAE,gBAAgB,CAAC;KACxC;CACF"}
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
*
|
|
15
15
|
* Parts: `submit`, `submit-icon`, `cancel`.
|
|
16
16
|
*
|
|
17
|
+
* With `preview` the buttons send no event. In edit mode (`preview` and
|
|
18
|
+
* `editable`) they draw as boxes of the same size with the same parts, and
|
|
19
|
+
* each label is a region a person types into, keyed `submit-label` and
|
|
20
|
+
* `cancel-label`: a region never sits inside a button.
|
|
21
|
+
*
|
|
17
22
|
* @module components/consent-action-bar
|
|
18
23
|
*/
|
|
19
24
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -25,11 +30,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
25
30
|
import { LitElement, html, css, nothing } from "lit";
|
|
26
31
|
import { customElement, property } from "lit/decorators.js";
|
|
27
32
|
import { CONSENT_COPY_TOKENS, formatToken } from "../copy/tokens.js";
|
|
33
|
+
import { CONSENT_EDIT_KEYS, } from "../types/edit.types.js";
|
|
34
|
+
import { editRegion, editRegionStyles } from "./edit-region.js";
|
|
35
|
+
import { isEditing, warnIfEditableWithoutPreview } from "./preview.js";
|
|
28
36
|
import { fingerprintIcon } from "./wallet-icons.js";
|
|
29
37
|
/**
|
|
30
38
|
* @fires consent-allow - The person allowed.
|
|
31
39
|
* @fires consent-deny - The person denied.
|
|
32
|
-
* @cssprop --cs-action-radius - The buttons' corners (default:
|
|
40
|
+
* @cssprop --cs-action-radius - The buttons' corners (default: 6px).
|
|
33
41
|
*/
|
|
34
42
|
let ConsentActionBar = class ConsentActionBar extends LitElement {
|
|
35
43
|
constructor() {
|
|
@@ -44,14 +52,21 @@ let ConsentActionBar = class ConsentActionBar extends LitElement {
|
|
|
44
52
|
this.submitIcon = "";
|
|
45
53
|
/** The submit label while `loading`, e.g. "Signing…". */
|
|
46
54
|
this.loadingLabel = "";
|
|
55
|
+
/** Draws as it would live, and sends no `consent-allow` or `consent-deny`. */
|
|
56
|
+
this.preview = false;
|
|
57
|
+
/** With `preview`: the labels can be edited in place. */
|
|
58
|
+
this.editable = false;
|
|
59
|
+
}
|
|
60
|
+
willUpdate() {
|
|
61
|
+
warnIfEditableWithoutPreview(this);
|
|
47
62
|
}
|
|
48
63
|
emitAllow() {
|
|
49
|
-
if (this.disabled || this.loading)
|
|
64
|
+
if (this.disabled || this.loading || this.preview)
|
|
50
65
|
return;
|
|
51
66
|
this.dispatchEvent(new CustomEvent("consent-allow", { bubbles: true, composed: true }));
|
|
52
67
|
}
|
|
53
68
|
emitDeny() {
|
|
54
|
-
if (this.loading)
|
|
69
|
+
if (this.loading || this.preview)
|
|
55
70
|
return;
|
|
56
71
|
this.dispatchEvent(new CustomEvent("consent-deny", { bubbles: true, composed: true }));
|
|
57
72
|
}
|
|
@@ -67,32 +82,20 @@ let ConsentActionBar = class ConsentActionBar extends LitElement {
|
|
|
67
82
|
(this.theme === "dark"
|
|
68
83
|
? CONSENT_COPY_TOKENS.actions.deny
|
|
69
84
|
: CONSENT_COPY_TOKENS.actions.notNow);
|
|
85
|
+
if (isEditing(this))
|
|
86
|
+
return this.renderBoxes(allowLabel, denyLabel);
|
|
70
87
|
return html `
|
|
71
88
|
<button
|
|
72
|
-
class="primary"
|
|
89
|
+
class="action primary"
|
|
73
90
|
part="submit"
|
|
74
91
|
type="button"
|
|
75
92
|
?disabled=${this.disabled || this.loading}
|
|
76
93
|
@click=${this.emitAllow}
|
|
77
94
|
>
|
|
78
|
-
${this.
|
|
79
|
-
? html `<svg
|
|
80
|
-
part="submit-icon"
|
|
81
|
-
class="submit-icon"
|
|
82
|
-
viewBox="0 0 24 24"
|
|
83
|
-
fill="none"
|
|
84
|
-
stroke="currentColor"
|
|
85
|
-
stroke-width="2"
|
|
86
|
-
stroke-linecap="round"
|
|
87
|
-
stroke-linejoin="round"
|
|
88
|
-
aria-hidden="true"
|
|
89
|
-
>
|
|
90
|
-
${fingerprintIcon}
|
|
91
|
-
</svg>`
|
|
92
|
-
: nothing}${submitLabel}
|
|
95
|
+
${this.renderSubmitIcon()}${submitLabel}
|
|
93
96
|
</button>
|
|
94
97
|
<button
|
|
95
|
-
class="secondary"
|
|
98
|
+
class="action secondary"
|
|
96
99
|
part="cancel"
|
|
97
100
|
type="button"
|
|
98
101
|
?disabled=${this.loading}
|
|
@@ -102,8 +105,50 @@ let ConsentActionBar = class ConsentActionBar extends LitElement {
|
|
|
102
105
|
</button>
|
|
103
106
|
`;
|
|
104
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Edit mode: the buttons as boxes with the same classes and parts, each
|
|
110
|
+
* label a region. A disabled Allow looks disabled, as it would live.
|
|
111
|
+
*/
|
|
112
|
+
renderBoxes(allowLabel, denyLabel) {
|
|
113
|
+
const tokens = CONSENT_COPY_TOKENS.editRegions;
|
|
114
|
+
return html `
|
|
115
|
+
<div
|
|
116
|
+
class="action primary${this.disabled || this.loading
|
|
117
|
+
? " disabled"
|
|
118
|
+
: ""}"
|
|
119
|
+
part="submit"
|
|
120
|
+
>
|
|
121
|
+
${this.renderSubmitIcon()}${editRegion(CONSENT_EDIT_KEYS.submitLabel, tokens.submitLabel, allowLabel, this.editSource)}
|
|
122
|
+
</div>
|
|
123
|
+
<div
|
|
124
|
+
class="action secondary${this.loading ? " disabled" : ""}"
|
|
125
|
+
part="cancel"
|
|
126
|
+
>
|
|
127
|
+
${editRegion(CONSENT_EDIT_KEYS.cancelLabel, tokens.cancelLabel, denyLabel, this.editSource)}
|
|
128
|
+
</div>
|
|
129
|
+
`;
|
|
130
|
+
}
|
|
131
|
+
renderSubmitIcon() {
|
|
132
|
+
if (this.submitIcon !== "passkey")
|
|
133
|
+
return nothing;
|
|
134
|
+
return html `<svg
|
|
135
|
+
part="submit-icon"
|
|
136
|
+
class="submit-icon"
|
|
137
|
+
viewBox="0 0 24 24"
|
|
138
|
+
fill="none"
|
|
139
|
+
stroke="currentColor"
|
|
140
|
+
stroke-width="2"
|
|
141
|
+
stroke-linecap="round"
|
|
142
|
+
stroke-linejoin="round"
|
|
143
|
+
aria-hidden="true"
|
|
144
|
+
>
|
|
145
|
+
${fingerprintIcon}
|
|
146
|
+
</svg>`;
|
|
147
|
+
}
|
|
105
148
|
};
|
|
106
149
|
ConsentActionBar.styles = css `
|
|
150
|
+
${editRegionStyles}
|
|
151
|
+
|
|
107
152
|
:host {
|
|
108
153
|
display: flex;
|
|
109
154
|
flex-direction: column;
|
|
@@ -111,13 +156,25 @@ ConsentActionBar.styles = css `
|
|
|
111
156
|
width: 100%;
|
|
112
157
|
}
|
|
113
158
|
|
|
114
|
-
button
|
|
159
|
+
/* A button, or in edit mode a box, set out in full so both draw alike. */
|
|
160
|
+
.action {
|
|
161
|
+
box-sizing: border-box;
|
|
162
|
+
display: block;
|
|
115
163
|
width: 100%;
|
|
164
|
+
margin: 0;
|
|
116
165
|
padding: 14px 18px;
|
|
117
|
-
border-radius: var(--cs-action-radius,
|
|
166
|
+
border-radius: var(--cs-action-radius, 6px);
|
|
118
167
|
font-size: var(--cs-action-font-size, 15px);
|
|
119
168
|
font-weight: 500;
|
|
120
169
|
font-family: inherit;
|
|
170
|
+
font-style: normal;
|
|
171
|
+
line-height: normal;
|
|
172
|
+
letter-spacing: normal;
|
|
173
|
+
word-spacing: normal;
|
|
174
|
+
text-align: center;
|
|
175
|
+
text-indent: 0;
|
|
176
|
+
text-transform: none;
|
|
177
|
+
text-shadow: none;
|
|
121
178
|
cursor: pointer;
|
|
122
179
|
transition:
|
|
123
180
|
opacity 0.15s ease,
|
|
@@ -125,11 +182,17 @@ ConsentActionBar.styles = css `
|
|
|
125
182
|
border: none;
|
|
126
183
|
}
|
|
127
184
|
|
|
128
|
-
|
|
185
|
+
.action:disabled,
|
|
186
|
+
.action.disabled {
|
|
129
187
|
opacity: 0.5;
|
|
130
188
|
cursor: not-allowed;
|
|
131
189
|
}
|
|
132
190
|
|
|
191
|
+
div.action,
|
|
192
|
+
div.action.disabled {
|
|
193
|
+
cursor: default;
|
|
194
|
+
}
|
|
195
|
+
|
|
133
196
|
button:focus-visible {
|
|
134
197
|
outline: 2px solid var(--cs-focus-ring, #0f172a);
|
|
135
198
|
outline-offset: 3px;
|
|
@@ -145,7 +208,7 @@ ConsentActionBar.styles = css `
|
|
|
145
208
|
color: var(--cs-surface-accent-text, #ffffff);
|
|
146
209
|
}
|
|
147
210
|
|
|
148
|
-
.primary:hover:not(:disabled) {
|
|
211
|
+
button.primary:hover:not(:disabled) {
|
|
149
212
|
opacity: 0.92;
|
|
150
213
|
}
|
|
151
214
|
|
|
@@ -162,7 +225,7 @@ ConsentActionBar.styles = css `
|
|
|
162
225
|
font-weight: 500;
|
|
163
226
|
}
|
|
164
227
|
|
|
165
|
-
.secondary:hover:not(:disabled) {
|
|
228
|
+
button.secondary:hover:not(:disabled) {
|
|
166
229
|
color: var(--cs-text-primary, #0f172a);
|
|
167
230
|
}
|
|
168
231
|
`;
|
|
@@ -190,6 +253,15 @@ __decorate([
|
|
|
190
253
|
__decorate([
|
|
191
254
|
property({ type: String, attribute: "loading-label" })
|
|
192
255
|
], ConsentActionBar.prototype, "loadingLabel", void 0);
|
|
256
|
+
__decorate([
|
|
257
|
+
property({ type: Boolean, reflect: true })
|
|
258
|
+
], ConsentActionBar.prototype, "preview", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
property({ type: Boolean, reflect: true })
|
|
261
|
+
], ConsentActionBar.prototype, "editable", void 0);
|
|
262
|
+
__decorate([
|
|
263
|
+
property({ attribute: false })
|
|
264
|
+
], ConsentActionBar.prototype, "editSource", void 0);
|
|
193
265
|
ConsentActionBar = __decorate([
|
|
194
266
|
customElement("consent-action-bar")
|
|
195
267
|
], ConsentActionBar);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-action-bar.js","sourceRoot":"","sources":["../../src/components/consent-action-bar.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"consent-action-bar.js","sourceRoot":"","sources":["../../src/components/consent-action-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;;;;;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,EACL,iBAAiB,GAElB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKpD;;;;GAIG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QACuB,cAAS,GAAG,EAAE,CAAC;QACf,UAAK,GAAiB,OAAO,CAAC;QAC7B,aAAQ,GAAG,KAAK,CAAC;QACjB,YAAO,GAAG,KAAK,CAAC;QACU,gBAAW,GAAG,EAAE,CAAC;QACjB,gBAAW,GAAG,EAAE,CAAC;QACxE,wDAAwD;QAExD,eAAU,GAAwB,EAAE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