Initial commit: Voiced invoice desktop app
Offline-first invoicing app for Test Vendor, built by Bongbetic. - Tauri v2 (Rust) + React/TypeScript + IBM Carbon Design System UI - SQLite (rusqlite) storage with a persistent invoice-number series - Guided first-run setup, pre-filled vendor/bank details - Fixed-amount or rate x quantity line items (per sec/min/hour/session/unit) - GST as CGST+SGST or IGST, Indian amount-in-words - Optional signature, with a computer-generated note as fallback - Print-ready PDF export via @react-pdf/renderer - Windows cross-compile via cargo-xwin (NSIS installer) Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This commit is contained in:
@@ -0,0 +1,392 @@
|
||||
// Voiced — Carbon Design System, compiled with self-hosted IBM Plex for offline use.
|
||||
// Font-face emission from Carbon is disabled so we can serve the fonts ourselves
|
||||
// instead of pulling them from IBM's CDN (the app must work with no network).
|
||||
@use '@carbon/react' with (
|
||||
$css--font-face: false,
|
||||
$use-akamai-cdn: false
|
||||
);
|
||||
|
||||
/* ---------- IBM Plex (bundled in /public/fonts) ---------- */
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Sans';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexSans-Light.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Sans';
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexSans-LightItalic.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexSans-Regular.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Sans';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexSans-Italic.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Sans';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexSans-Medium.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Sans';
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexSans-MediumItalic.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Sans';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Sans';
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexSans-SemiBoldItalic.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexSans-Bold.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Sans';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexSans-BoldItalic.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexMono-Regular.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Mono';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexMono-Medium.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'IBM Plex Mono';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url('/fonts/IBMPlexMono-SemiBold.woff2') format('woff2');
|
||||
}
|
||||
|
||||
/* ---------- App shell ---------- */
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background-color: var(--cds-background);
|
||||
color: var(--cds-text-primary);
|
||||
}
|
||||
|
||||
.voiced-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.voiced-brand__logo {
|
||||
height: 1.25rem;
|
||||
width: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.voiced-brand__divider {
|
||||
width: 1px;
|
||||
height: 1.25rem;
|
||||
background: var(--cds-border-subtle-01);
|
||||
}
|
||||
|
||||
.voiced-brand__product {
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.02em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.voiced-header-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.voiced-page {
|
||||
padding: 2rem;
|
||||
max-width: 1600px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.voiced-page__title {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.voiced-page__subtitle {
|
||||
color: var(--cds-text-secondary);
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.voiced-stack > * + * {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.voiced-row-gap {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.voiced-muted {
|
||||
color: var(--cds-text-secondary);
|
||||
}
|
||||
|
||||
.voiced-empty {
|
||||
padding: 3rem 1rem;
|
||||
text-align: center;
|
||||
color: var(--cds-text-secondary);
|
||||
}
|
||||
|
||||
/* ---------- Invoice preview ("paper") ---------- */
|
||||
.inv-preview-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.inv-paper {
|
||||
background: #ffffff;
|
||||
color: #161616;
|
||||
width: 100%;
|
||||
max-width: 820px;
|
||||
padding: 40px 44px;
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||
font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.inv-top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.inv-vendor {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
align-items: flex-start;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.inv-vendor__logo {
|
||||
max-height: 56px;
|
||||
max-width: 220px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.inv-vendor__name {
|
||||
font-size: 22px;
|
||||
font-weight: 600;
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
|
||||
.inv-vendor__line {
|
||||
margin: 0;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.inv-meta {
|
||||
text-align: right;
|
||||
min-width: 220px;
|
||||
}
|
||||
|
||||
.inv-meta__title {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
margin: 0 0 8px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.inv-meta__row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.inv-meta__label {
|
||||
color: #525252;
|
||||
}
|
||||
|
||||
.inv-meta__value {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.inv-split {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
margin-top: 28px;
|
||||
}
|
||||
|
||||
.inv-block {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.inv-block__label {
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: #525252;
|
||||
margin: 0 0 4px;
|
||||
}
|
||||
|
||||
.inv-block__strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.inv-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 28px;
|
||||
}
|
||||
|
||||
.inv-table th {
|
||||
text-align: left;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
color: #525252;
|
||||
border-bottom: 1.5px solid #161616;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
.inv-table td {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.inv-table .num {
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.inv-totals {
|
||||
margin-top: 16px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.inv-totals__table {
|
||||
width: 320px;
|
||||
}
|
||||
|
||||
.inv-totals__row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.inv-totals__row--grand {
|
||||
border-top: 1.5px solid #161616;
|
||||
margin-top: 4px;
|
||||
padding-top: 8px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.inv-words {
|
||||
margin-top: 16px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.inv-bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
margin-top: 32px;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.inv-signature {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.inv-signature__img {
|
||||
max-height: 64px;
|
||||
max-width: 220px;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.inv-signature__name {
|
||||
margin-top: 6px;
|
||||
font-weight: 600;
|
||||
border-top: 1px solid #8d8d8d;
|
||||
padding-top: 4px;
|
||||
display: inline-block;
|
||||
min-width: 160px;
|
||||
}
|
||||
|
||||
.inv-fineprint {
|
||||
margin-top: 8px;
|
||||
font-size: 10px;
|
||||
color: #6f6f6f;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.inv-footer {
|
||||
margin-top: 28px;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid #e0e0e0;
|
||||
font-size: 10px;
|
||||
color: #6f6f6f;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.inv-paper {
|
||||
box-shadow: none;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user