@facturion/invoice-renderer 0.1.1 → 0.2.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.
@@ -1,227 +0,0 @@
1
- /* ── Utilities ─────────────────────────────────────────────────────────────── */
2
-
3
- /* Data table */
4
- .data-table {
5
- width: 100%;
6
- border-collapse: collapse;
7
- font-size: var(--text-sm);
8
- }
9
-
10
- .data-table th,
11
- .data-table td {
12
- text-align: left;
13
- padding: var(--space-2) var(--space-3);
14
- border-bottom: 1px solid var(--border);
15
- }
16
-
17
- .data-table th {
18
- color: var(--text-secondary);
19
- font-weight: 500;
20
- font-size: var(--text-xs);
21
- text-transform: uppercase;
22
- letter-spacing: 0.04em;
23
- }
24
-
25
- .data-table td {
26
- color: var(--text-secondary);
27
- }
28
-
29
- .data-table code {
30
- font-size: var(--text-xs);
31
- color: var(--primary-light);
32
- }
33
-
34
- /* Alert */
35
- .alert {
36
- padding: var(--space-3) var(--space-4);
37
- border-radius: var(--radius-md);
38
- margin-bottom: var(--space-4);
39
- font-size: var(--text-sm);
40
- }
41
-
42
- .alert-info {
43
- background: var(--info-dim);
44
- color: var(--info);
45
- border: 1px solid rgba(59, 130, 246, 0.2);
46
- }
47
-
48
- .alert-error {
49
- background: var(--error-dim);
50
- color: var(--error);
51
- border: 1px solid rgba(239, 68, 68, 0.2);
52
- }
53
-
54
- .alert code {
55
- display: block;
56
- margin-top: var(--space-2);
57
- word-break: break-all;
58
- font-size: var(--text-xs);
59
- }
60
-
61
- /* Transitions for interactive elements */
62
- .card {
63
- transition: border-color var(--duration) var(--ease-out);
64
- }
65
-
66
- .btn {
67
- transition: background var(--duration) var(--ease-out),
68
- border-color var(--duration) var(--ease-out),
69
- opacity var(--duration) var(--ease-out),
70
- transform 80ms var(--ease-out);
71
- }
72
-
73
- .btn:active:not(:disabled) {
74
- transform: scale(0.98);
75
- }
76
-
77
- /* Inline spinner (for buttons) */
78
- @keyframes spin { to { transform: rotate(360deg); } }
79
-
80
- .spinner {
81
- display: inline-block;
82
- width: 16px;
83
- height: 16px;
84
- border: 2px solid currentColor;
85
- border-right-color: transparent;
86
- border-radius: 50%;
87
- animation: spin 0.6s linear infinite;
88
- vertical-align: middle;
89
- }
90
-
91
- /* ── Info tooltip ─────────────────────────────────────────────────────────
92
- Shared component for inline help affordances. Markup pattern:
93
-
94
- <span class="info-tip" tabindex="0" role="button" aria-label="More info">
95
- <span class="info-tip-icon" aria-hidden="true">i</span>
96
- <span class="info-tip-popover" role="tooltip">…content…</span>
97
- </span>
98
-
99
- Hover or focus on the wrapper reveals the popover. The popover sits flush
100
- against the icon's bottom edge so the cursor doesn't cross a non-hovered
101
- gap on its way from the icon down into the popover (which would close it
102
- prematurely). Content can be plain text or include rich children
103
- (links, source notes, etc.). */
104
- .info-tip {
105
- position: relative;
106
- display: inline-flex;
107
- align-items: center;
108
- flex-shrink: 0;
109
- cursor: help;
110
- outline: none;
111
- vertical-align: middle;
112
- }
113
-
114
- .info-tip-icon {
115
- display: inline-flex;
116
- align-items: center;
117
- justify-content: center;
118
- width: 14px;
119
- height: 14px;
120
- border-radius: var(--radius-full);
121
- background: var(--bg-elevated);
122
- color: var(--text-muted);
123
- font-size: 10px;
124
- font-style: italic;
125
- font-weight: 700;
126
- /* Pin line-height to font-size so the character sits at the geometric
127
- center of the circle. Without this, the line-box inherits the parent's
128
- line-height (~1.5) and the "i" rides high inside the icon, looking
129
- misaligned with adjacent text. */
130
- line-height: 1;
131
- user-select: none;
132
- }
133
-
134
- .info-tip:hover .info-tip-icon,
135
- .info-tip:focus-visible .info-tip-icon {
136
- background: var(--border);
137
- color: var(--text);
138
- }
139
-
140
- /* Popover is `position: fixed` so it escapes any parent overflow/clip
141
- context (cards, scroll containers, etc.) and can be JS-positioned in
142
- viewport coordinates. `installInfoTipPositioning` in `$lib/info-tip.ts`
143
- computes top/left/max-width on mouseover/focusin and on scroll/resize.
144
- Hidden state uses opacity + visibility (not display:none) so the
145
- popover always has measurable dimensions for the positioning math. */
146
- .info-tip-popover {
147
- position: fixed;
148
- top: 0;
149
- left: 0;
150
- z-index: 10;
151
- display: flex;
152
- flex-direction: column;
153
- gap: var(--space-2);
154
- min-width: 240px;
155
- max-width: 340px;
156
- padding: var(--space-3);
157
- background: var(--bg-card);
158
- border: 1px solid var(--border);
159
- border-radius: var(--radius-md);
160
- box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
161
- font-family: var(--font-sans);
162
- font-size: var(--text-xs);
163
- font-style: normal;
164
- font-weight: 400;
165
- line-height: 1.5;
166
- color: var(--text);
167
- text-align: left;
168
- white-space: normal;
169
- cursor: default;
170
- opacity: 0;
171
- visibility: hidden;
172
- pointer-events: none;
173
- transition: opacity 0.1s ease;
174
- }
175
-
176
- .info-tip:hover .info-tip-popover,
177
- .info-tip:focus-within .info-tip-popover {
178
- opacity: 1;
179
- visibility: visible;
180
- pointer-events: auto;
181
- }
182
-
183
- /* Subdued source line + KB link inside an info-tip popover (used by the
184
- step-annotation tooltips). Optional. */
185
- .info-tip-source {
186
- color: var(--text-secondary);
187
- }
188
-
189
- .info-tip-link {
190
- color: var(--primary-light);
191
- text-decoration: none;
192
- }
193
-
194
- .info-tip-link:hover {
195
- text-decoration: underline;
196
- }
197
-
198
- /* Site footer */
199
- .site-footer {
200
- display: flex;
201
- justify-content: center;
202
- gap: var(--space-6);
203
- padding: var(--space-6) var(--space-4);
204
- border-top: 1px solid var(--border);
205
- font-size: var(--text-xs);
206
- }
207
-
208
- .site-footer a {
209
- color: var(--text-secondary);
210
- text-decoration: none;
211
- }
212
-
213
- .site-footer a:hover {
214
- color: var(--text-secondary);
215
- }
216
-
217
- .site-footer-note {
218
- color: var(--text-secondary);
219
- font-style: italic;
220
- }
221
-
222
- /* Responsive helpers */
223
- @media (max-width: 640px) {
224
- #app {
225
- padding: var(--space-4) var(--space-4);
226
- }
227
- }
@@ -1,89 +0,0 @@
1
- /* ── Design tokens ─────────────────────────────────────────────────────────── */
2
-
3
- :root {
4
- /* Primary */
5
- --primary: #5a7fbf;
6
- --primary-light: #7fa0d8;
7
- --primary-dim: #47659c;
8
- --primary-ghost: rgba(90, 127, 191, 0.13);
9
-
10
- /* Surfaces (calm product-slate — luminance-only depth steps) */
11
- --bg-base: #0d1422;
12
- --bg-2: #111a2c;
13
- --bg-card: #18223a;
14
- --bg-elevated: #1d2742;
15
- --bg-input: #131c2e;
16
- --bg-hover: rgba(255, 255, 255, 0.04);
17
-
18
- /* Borders — translucent-white hairlines (calm) */
19
- --border: rgba(255, 255, 255, 0.08);
20
- --border-light: rgba(255, 255, 255, 0.14);
21
- --border-focus: var(--primary);
22
-
23
- /* Text */
24
- --text: #e7ecf6;
25
- --text-secondary: #99a6bf;
26
- --text-muted: #647190;
27
- --text-inverse: #0d1422;
28
-
29
- /* Semantic — calm muted (green = valid only; blue = info/action) */
30
- --success: #36c08b;
31
- --success-dim: rgba(54, 192, 139, 0.13);
32
- --warning: #e0a73c;
33
- --warning-dim: rgba(224, 167, 60, 0.13);
34
- --error: #e0606e;
35
- --error-dim: rgba(224, 96, 110, 0.13);
36
- --info: #7fa0d8;
37
- --info-dim: rgba(127, 160, 216, 0.13);
38
-
39
- /* Typography — calm direction: Geist (display) / Hanken Grotesk (body) / JetBrains Mono (code) */
40
- --font-display: 'Geist', 'Hanken Grotesk', system-ui, sans-serif;
41
- --font-sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
42
- --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'Fira Mono', 'Consolas', monospace;
43
-
44
- --text-xs: 0.8125rem;
45
- --text-sm: 0.875rem;
46
- --text-base: 1rem;
47
- --text-lg: 1.1875rem;
48
- --text-xl: 1.3rem;
49
- --text-2xl: 1.75rem;
50
- --text-3xl: 2.25rem;
51
-
52
- /* Spacing */
53
- --space-1: 0.25rem;
54
- --space-2: 0.5rem;
55
- --space-3: 0.75rem;
56
- --space-4: 1rem;
57
- --space-5: 1.25rem;
58
- --space-6: 1.5rem;
59
- --space-8: 2rem;
60
- --space-10: 2.5rem;
61
- --space-12: 3rem;
62
- --space-16: 4rem;
63
-
64
- /* Radii */
65
- --radius-sm: 4px;
66
- --radius-md: 8px;
67
- --radius-lg: 12px;
68
- --radius-xl: 16px;
69
- --radius-full: 9999px;
70
-
71
- /* Shadows */
72
- --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
73
- --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.3);
74
- --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
75
-
76
- /* Transitions */
77
- --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
78
- --duration: 180ms;
79
-
80
- /* Layout */
81
- --nav-height: 3.5rem;
82
- --max-width: 1600px;
83
-
84
- /* Shared dropdown caret — reused by both native <select> and the custom
85
- listbox button so the closed trigger looks identical across them. The
86
- stroke colour is hard-coded to --text-muted (#647190); changing one
87
- means changing both. */
88
- --caret-svg: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23647190' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1l4 4 4-4'/></svg>");
89
- }