@cardano-slips/flow 0.2.0 → 0.3.1
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 +53 -9
- package/dist/address.d.ts +12 -0
- package/dist/address.d.ts.map +1 -1
- package/dist/address.js +43 -0
- package/dist/address.js.map +1 -1
- package/dist/card.css +492 -0
- package/dist/card.d.ts +41 -0
- package/dist/card.d.ts.map +1 -0
- package/dist/card.js +69 -0
- package/dist/card.js.map +1 -0
- package/dist/complete-error.d.ts +8 -1
- package/dist/complete-error.d.ts.map +1 -1
- package/dist/complete-error.js +6 -1
- package/dist/complete-error.js.map +1 -1
- package/dist/complete.d.ts +29 -10
- package/dist/complete.d.ts.map +1 -1
- package/dist/complete.js +83 -9
- package/dist/complete.js.map +1 -1
- package/dist/derived.d.ts +8 -0
- package/dist/derived.d.ts.map +1 -0
- package/dist/derived.js +2 -0
- package/dist/derived.js.map +1 -0
- package/dist/effects-panel.d.ts +37 -0
- package/dist/effects-panel.d.ts.map +1 -0
- package/dist/effects-panel.js +64 -0
- package/dist/effects-panel.js.map +1 -0
- package/dist/effects.css +629 -0
- package/dist/exchange.d.ts +54 -0
- package/dist/exchange.d.ts.map +1 -0
- package/dist/exchange.js +136 -0
- package/dist/exchange.js.map +1 -0
- package/dist/explain.d.ts +39 -0
- package/dist/explain.d.ts.map +1 -0
- package/dist/explain.js +172 -0
- package/dist/explain.js.map +1 -0
- package/dist/index.d.ts +19 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/ledger.d.ts +74 -0
- package/dist/ledger.d.ts.map +1 -0
- package/dist/ledger.js +402 -0
- package/dist/ledger.js.map +1 -0
- package/dist/outcome-panel.d.ts +63 -0
- package/dist/outcome-panel.d.ts.map +1 -0
- package/dist/outcome-panel.js +40 -0
- package/dist/outcome-panel.js.map +1 -0
- package/dist/parameter-form.d.ts +26 -0
- package/dist/parameter-form.d.ts.map +1 -0
- package/dist/parameter-form.js +42 -0
- package/dist/parameter-form.js.map +1 -0
- package/dist/slip-card.d.ts +55 -0
- package/dist/slip-card.d.ts.map +1 -0
- package/dist/slip-card.js +89 -0
- package/dist/slip-card.js.map +1 -0
- package/dist/tokens.css +57 -32
- package/package.json +11 -7
- package/src/address.ts +53 -0
- package/src/card.css +492 -0
- package/src/card.ts +86 -0
- package/src/complete-error.ts +14 -2
- package/src/complete.ts +128 -19
- package/src/derived.ts +8 -0
- package/src/effects-panel.tsx +386 -0
- package/src/effects.css +629 -0
- package/src/exchange.ts +212 -0
- package/src/explain.ts +211 -0
- package/src/index.ts +39 -3
- package/src/ledger.ts +503 -0
- package/src/outcome-panel.tsx +263 -0
- package/src/parameter-form.tsx +138 -0
- package/src/slip-card.tsx +244 -0
- package/src/tokens.css +57 -32
package/src/tokens.css
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* already called `--ink`. Put `slip-root` on the element that wraps the Slip.
|
|
11
11
|
*
|
|
12
12
|
* There is no reset here and no rule that selects an element. Nothing sets a
|
|
13
|
-
* font-family on anything — a component reads
|
|
13
|
+
* font-family on anything — a component reads a `--type-*` role — so a host
|
|
14
14
|
* page's own stack stays where it is until something of ours asks for a token.
|
|
15
15
|
*
|
|
16
16
|
* One theme. The sheet collapsed an earlier light/dark pair into a single
|
|
@@ -47,21 +47,26 @@
|
|
|
47
47
|
* for and not about the ratio it happens to reach.
|
|
48
48
|
*/
|
|
49
49
|
--accent-fill: #728ef3;
|
|
50
|
-
--accent-text: #
|
|
51
|
-
--accent-action: #
|
|
52
|
-
--accent-hover: #
|
|
50
|
+
--accent-text: #123cd3; /* links */
|
|
51
|
+
--accent-action: #123cd3; /* the outline and the label of a button */
|
|
52
|
+
--accent-hover: #0e2fa6;
|
|
53
53
|
--accent-deep: #0c288d; /* headings */
|
|
54
|
-
--on-accent: #ffffff; /* anything drawn on
|
|
55
|
-
--focus: #
|
|
54
|
+
--on-accent: #ffffff; /* anything drawn on a filled accent */
|
|
55
|
+
--focus: #123cd3;
|
|
56
|
+
|
|
57
|
+
/* The accent lightened for slate, where #123cd3 disappears into the ground. */
|
|
58
|
+
--accent-on-slate: #8fa9ff;
|
|
56
59
|
|
|
57
60
|
/* Semantic, and rare. A page that colours everything says nothing. */
|
|
58
|
-
--pos: #
|
|
59
|
-
--warn: #
|
|
60
|
-
--bad: #
|
|
61
|
-
--bad-tint: rgba(
|
|
62
|
-
--bad-line: rgba(
|
|
63
|
-
--warn-tint: rgba(
|
|
64
|
-
--warn-line: rgba(
|
|
61
|
+
--pos: #065708; /* value arriving */
|
|
62
|
+
--warn: #7a5200; /* held, taken, caution */
|
|
63
|
+
--bad: #d20a19; /* problem, blocked */
|
|
64
|
+
--bad-tint: rgba(210, 10, 25, 0.06);
|
|
65
|
+
--bad-line: rgba(210, 10, 25, 0.24);
|
|
66
|
+
--warn-tint: rgba(254, 206, 82, 0.22);
|
|
67
|
+
--warn-line: rgba(254, 206, 82, 0.85);
|
|
68
|
+
--warn-fill: #fece52; /* the warning as a fill, never as a word on a light ground */
|
|
69
|
+
--on-warn: #3a2600; /* words on the warning fill: the testnet bar */
|
|
65
70
|
|
|
66
71
|
/* The alternating rows of the effects list, on and off. */
|
|
67
72
|
--stripe-a: rgba(90, 110, 205, 0.16);
|
|
@@ -82,14 +87,19 @@
|
|
|
82
87
|
--vault-border: rgba(255, 255, 255, 0.16);
|
|
83
88
|
--vault-chip: rgba(168, 188, 255, 0.22);
|
|
84
89
|
--vault-rule: rgba(168, 188, 255, 0.7);
|
|
85
|
-
--vault-pos: #
|
|
86
|
-
--vault-warn: #
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
--vault-
|
|
90
|
+
--vault-pos: #6fcb72;
|
|
91
|
+
--vault-warn: #fece52;
|
|
92
|
+
/*
|
|
93
|
+
* #ff5247 on the sheet, lightened here: that value measures 4.42:1 on the
|
|
94
|
+
* vault and the sheet's own row calls it a pass. This is the colour the
|
|
95
|
+
* mismatch block is written in, so it clears AA or it does not ship.
|
|
96
|
+
*/
|
|
97
|
+
--vault-bad: #ff5a50;
|
|
98
|
+
--vault-bad-tint: rgba(210, 10, 25, 0.16);
|
|
99
|
+
--vault-bad-line: rgba(255, 82, 71, 0.55);
|
|
100
|
+
--vault-bad-chip: rgba(210, 10, 25, 0.28);
|
|
101
|
+
--vault-warn-tint: rgba(254, 206, 82, 0.14);
|
|
102
|
+
--vault-warn-line: rgba(254, 206, 82, 0.55);
|
|
93
103
|
|
|
94
104
|
/*
|
|
95
105
|
* Code blocks in the docs and the Open Graph card. Both land on a ground we
|
|
@@ -101,21 +111,36 @@
|
|
|
101
111
|
--dark-text: #ffffff;
|
|
102
112
|
--dark-muted: #ccd6ff;
|
|
103
113
|
|
|
104
|
-
/*
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
114
|
+
/*
|
|
115
|
+
* One family, for everything. The sheet's earlier display/text/mono trio is
|
|
116
|
+
* gone: weight and size separate a heading from a label perfectly well, and
|
|
117
|
+
* three names for one face is three chances to drift apart. The stack ends in
|
|
118
|
+
* a generic family, so a missing webfont degrades rather than disappears.
|
|
119
|
+
*/
|
|
120
|
+
--font: Poppins, system-ui, sans-serif;
|
|
108
121
|
|
|
109
122
|
/* Whole roles, so half a role cannot be applied without the other half. */
|
|
110
|
-
--type-h1: 700 44px/48px var(--font
|
|
123
|
+
--type-h1: 700 44px/48px var(--font);
|
|
111
124
|
--type-h1-tracking: -0.01em;
|
|
112
|
-
--type-card-title: 700 18px/24px var(--font
|
|
113
|
-
--type-numeral: 700 26px/32px var(--font
|
|
114
|
-
--type-body:
|
|
115
|
-
--type-button: 500 14px/20px var(--font
|
|
125
|
+
--type-card-title: 700 18px/24px var(--font);
|
|
126
|
+
--type-numeral: 700 26px/32px var(--font); /* a figure is always 700 */
|
|
127
|
+
--type-body: 400 16px/24px var(--font);
|
|
128
|
+
--type-button: 500 14px/20px var(--font);
|
|
116
129
|
--type-button-tracking: 0.1px;
|
|
117
|
-
--type-label: 500 13px var(--font
|
|
118
|
-
|
|
130
|
+
--type-label: 500 13px var(--font);
|
|
131
|
+
/* Addresses, hashes, error codes, the tx block — text meant for a machine. */
|
|
132
|
+
--type-technical: 400 12px/20px var(--font);
|
|
133
|
+
|
|
134
|
+
/* The transaction preview's own scale, from `4 · Anatomy` and `6 · Preview states`. */
|
|
135
|
+
--type-headline: 700 32px/38px var(--font); /* the one figure the person is deciding on */
|
|
136
|
+
--type-preview-title: 700 20px/26px var(--font);
|
|
137
|
+
--type-amount: 700 20px/26px var(--font); /* a row's figure, one size so the column scans */
|
|
138
|
+
--type-countdown: 700 16px/20px var(--font);
|
|
139
|
+
--type-row: 400 14px/20px var(--font);
|
|
140
|
+
--type-note: 400 13px/19px var(--font);
|
|
141
|
+
--type-kicker: 400 11px/16px var(--font);
|
|
142
|
+
--type-kicker-tracking: 0.12em;
|
|
143
|
+
--type-chip: 600 11px/20px var(--font);
|
|
119
144
|
|
|
120
145
|
/* Spacing, on a 4px base. */
|
|
121
146
|
--space-4: 4px;
|