@signature.digital/catalog 1.5.1 → 1.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signature.digital/catalog",
3
- "version": "1.5.1",
3
+ "version": "1.6.1",
4
4
  "private": false,
5
5
  "description": "A comprehensive catalog of customizable web components designed for building and managing e-signature applications.",
6
6
  "exports": {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@signature.digital/catalog',
6
- version: '1.5.1',
6
+ version: '1.6.1',
7
7
  description: 'A comprehensive catalog of customizable web components designed for building and managing e-signature applications.'
8
8
  }
@@ -1,5 +1,5 @@
1
- import { DeesElement, html, customElement, type TemplateResult, css } from '@design.estate/dees-element';
2
- import { actionButton, demoRecipients, icon, pill, topBar, workspaceBaseStyles, workspaceDemoFrame } from './sdig-workspace.shared.js';
1
+ import { DeesElement, property, html, customElement, type TemplateResult, css } from '@design.estate/dees-element';
2
+ import { actionButton, demoDocuments, demoRecipients, icon, pill, topBar, workspaceBaseStyles, workspaceDemoFrame, type IDocumentRow } from './sdig-workspace.shared.js';
3
3
 
4
4
  declare global {
5
5
  interface HTMLElementTagNameMap {
@@ -12,6 +12,8 @@ export class SdigWorkspaceAudit extends DeesElement {
12
12
  public static demo = () => workspaceDemoFrame(html`<sdig-workspace-audit></sdig-workspace-audit>`);
13
13
  public static demoGroups = ['Signature Digital Workspace'];
14
14
 
15
+ @property({ attribute: false }) public accessor document: IDocumentRow = demoDocuments[1];
16
+
15
17
  public static styles = [workspaceBaseStyles, css`
16
18
  .audit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
17
19
  .event-row { display: grid; grid-template-columns: 24px 180px 1fr 200px; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); align-items: center; }
@@ -19,6 +21,7 @@ export class SdigWorkspaceAudit extends DeesElement {
19
21
  `];
20
22
 
21
23
  public render(): TemplateResult {
24
+ const document = this.document || demoDocuments[1];
22
25
  const events = [
23
26
  ['2026-05-02 14:32:18 UTC', 'Sarah Chen', 'Document signed', '81.221.4.18 · Brussels, BE', '0x4a7b…f29c', 'success'],
24
27
  ['2026-05-02 14:31:54 UTC', 'Sarah Chen', 'Signature adopted (typed)', '81.221.4.18 · Brussels, BE', '0x4a7b…f29c', 'info'],
@@ -27,7 +30,7 @@ export class SdigWorkspaceAudit extends DeesElement {
27
30
  ['2026-05-02 10:54:22 UTC', 'Philipp K.', 'Document created', '92.42.114.7 · Berlin, DE', '0x1c8a…3b6f', 'default'],
28
31
  ];
29
32
  return html`
30
- ${topBar({ breadcrumb: ['signature.digital', 'Inbox', 'doc_8mK3pL', 'Audit Trail'], title: 'Audit Trail', subtitle: pill('completed · cryptographically sealed', 'success', true), actions: html`${actionButton('Certificate (PDF)', 'outline', 'download')}${actionButton('Verify on chain', 'outline', 'hash')}` })}
33
+ ${topBar({ breadcrumb: ['signature.digital', 'Inbox', document.id, 'Audit Trail'], title: `Audit Trail · ${document.title}`, subtitle: pill(`${document.status} · cryptographically sealed`, document.status === 'declined' ? 'error' : document.status === 'signed' ? 'success' : 'info', true), actions: html`${actionButton('Certificate (PDF)', 'outline', 'download')}${actionButton('Verify on chain', 'outline', 'hash')}` })}
31
34
  <div class="content-scroll audit-grid">
32
35
  <div class="card"><div style="height: 36px; padding: 0 16px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between;"><span style="font-size: 12px; font-weight: 600;">Event log</span><span class="mono" style="font-size: 10px; color: var(--text-muted);">${events.length} events · immutable</span></div>${events.map((event) => html`<div class="event-row"><div><span style="display: block; width: 8px; height: 8px; border-radius: 50%; background: ${event[5] === 'success' ? 'var(--success)' : event[5] === 'info' ? 'var(--accent)' : 'var(--text-dim)'};"></span></div><div class="mono hide-mobile" style="font-size: 11px; color: var(--text-muted);">${event[0]}</div><div><div style="font-size: 12px; font-weight: 500;">${event[2]}</div><div style="font-size: 10px; color: var(--text-muted); margin-top: 2px;">by ${event[1]} ${event[4] ? html`<span class="mono" style="color: var(--accent); margin-left: 8px;">${event[4]}</span>` : ''}</div></div><div class="mono hide-mobile" style="font-size: 10px; color: var(--text-muted); text-align: right;">${event[3]}</div></div>`)}</div>
33
36
  <div style="display: flex; flex-direction: column; gap: 16px;"><div class="card" style="padding: 16px;"><div class="label-upper">Document hash</div><div class="mono" style="font-size: 11px; color: var(--accent); word-break: break-all; line-height: 1.5; padding: 10px; background: var(--bg-el); border-radius: 4px; border: 1px solid var(--border-subtle);">0x4a7b8f29c91e3d2a5b6c8e0f1d3c5a7b9d2e4f6a8c1e3d5f7b9c1e3a5b7d9f0e</div></div><div class="card" style="padding: 16px;"><div class="label-upper">Signers</div>${demoRecipients.map((recipient) => html`<div class="recipient-line"><span class="avatar" style="background: ${recipient.color};">${recipient.name.split(' ').map((part) => part[0]).slice(0, 2).join('')}</span><div style="flex: 1;"><div style="font-size: 12px;">${recipient.name}</div><div class="mono" style="font-size: 10px; color: var(--text-muted);">${recipient.email}</div></div>${icon('check', 12)}</div>`)}</div><div class="card" style="padding: 16px; border-color: rgba(34,197,94,0.2);"><div style="display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--success); margin-bottom: 6px;">${icon('shield', 13)} eIDAS Qualified · ESIGN Act compliant</div><div style="font-size: 11px; color: var(--text-muted); line-height: 1.55;">Open-source verifier available. Anyone can independently validate this signature against the public ledger.</div></div></div>
@@ -14,6 +14,7 @@ export class SdigWorkspaceInbox extends DeesElement {
14
14
  public static demoGroups = ['Signature Digital Workspace'];
15
15
 
16
16
  @property({ type: String }) public accessor density: TDensity = 'comfortable';
17
+ @property({ attribute: false }) public accessor documents: IDocumentRow[] = demoDocuments;
17
18
  @state() private accessor filter: string = 'all';
18
19
  @state() private accessor search: string = '';
19
20
 
@@ -45,7 +46,7 @@ export class SdigWorkspaceInbox extends DeesElement {
45
46
  `];
46
47
 
47
48
  private get filteredDocuments(): IDocumentRow[] {
48
- return demoDocuments
49
+ return this.documents
49
50
  .filter((doc) => this.filter === 'all' || doc.status === this.filter)
50
51
  .filter((doc) => !this.search || doc.title.toLowerCase().includes(this.search.toLowerCase()));
51
52
  }
@@ -62,23 +63,30 @@ export class SdigWorkspaceInbox extends DeesElement {
62
63
  }
63
64
 
64
65
  private openDocument(doc: IDocumentRow) {
66
+ this.dispatchEvent(new CustomEvent('document-open', {
67
+ detail: { document: doc },
68
+ bubbles: true,
69
+ composed: true,
70
+ }));
65
71
  requestWorkspaceView(this, doc.status === 'signed' ? 'audit' : 'sign');
66
72
  }
67
73
 
68
74
  public render(): TemplateResult {
75
+ const documents = this.documents;
69
76
  const filters = [
70
- { id: 'all', label: 'All', count: demoDocuments.length },
71
- { id: 'awaiting', label: 'Awaiting', count: demoDocuments.filter((doc) => doc.status === 'awaiting').length },
72
- { id: 'signed', label: 'Completed', count: demoDocuments.filter((doc) => doc.status === 'signed').length },
73
- { id: 'draft', label: 'Drafts', count: demoDocuments.filter((doc) => doc.status === 'draft').length },
74
- { id: 'declined', label: 'Declined', count: demoDocuments.filter((doc) => doc.status === 'declined').length },
77
+ { id: 'all', label: 'All', count: documents.length },
78
+ { id: 'awaiting', label: 'Awaiting', count: documents.filter((doc) => doc.status === 'awaiting').length },
79
+ { id: 'signed', label: 'Completed', count: documents.filter((doc) => doc.status === 'signed').length },
80
+ { id: 'draft', label: 'Drafts', count: documents.filter((doc) => doc.status === 'draft').length },
81
+ { id: 'declined', label: 'Declined', count: documents.filter((doc) => doc.status === 'declined').length },
75
82
  ];
83
+ const attentionCount = documents.filter((doc) => doc.status === 'awaiting').length;
76
84
 
77
85
  return html`
78
86
  ${topBar({
79
87
  breadcrumb: ['signature.digital', 'Lossless GmbH', 'Inbox'],
80
88
  title: 'Inbox',
81
- subtitle: pill(`${demoDocuments.filter((doc) => doc.status === 'awaiting').length} need attention`, 'info'),
89
+ subtitle: pill(`${attentionCount} need attention`, 'info'),
82
90
  actions: html`${actionButton('Import', 'outline', 'upload')}${actionButton('New document', 'primary', 'plus', () => requestWorkspaceView(this, 'compose'))}`,
83
91
  })}
84
92
  <div class="filterbar">
@@ -1,5 +1,5 @@
1
- import { DeesElement, state, html, customElement, type TemplateResult, css } from '@design.estate/dees-element';
2
- import { actionButton, demoFields, fakeDocument, icon, pill, workspaceBaseStyles, workspaceDemoFrame, type IFieldPlacement } from './sdig-workspace.shared.js';
1
+ import { DeesElement, property, state, html, customElement, type TemplateResult, css } from '@design.estate/dees-element';
2
+ import { actionButton, demoDocuments, demoFields, fakeDocument, icon, pill, workspaceBaseStyles, workspaceDemoFrame, type IDocumentRow, type IFieldPlacement } from './sdig-workspace.shared.js';
3
3
 
4
4
  declare global {
5
5
  interface HTMLElementTagNameMap {
@@ -12,6 +12,7 @@ export class SdigWorkspaceSign extends DeesElement {
12
12
  public static demo = () => workspaceDemoFrame(html`<sdig-workspace-sign></sdig-workspace-sign>`);
13
13
  public static demoGroups = ['Signature Digital Workspace'];
14
14
 
15
+ @property({ attribute: false }) public accessor document: IDocumentRow = demoDocuments[0];
15
16
  @state() private accessor activeFieldId: string = 'f1';
16
17
  @state() private accessor signedFieldIds: string[] = [];
17
18
 
@@ -51,13 +52,14 @@ export class SdigWorkspaceSign extends DeesElement {
51
52
  }
52
53
 
53
54
  public render(): TemplateResult {
55
+ const document = this.document || demoDocuments[0];
54
56
  const completed = this.signedFieldIds.length;
55
57
  const progress = Math.round((completed / this.signFields.length) * 100);
56
58
  const activeField = this.signFields.find((field) => field.id === this.activeFieldId) || this.signFields[0];
57
59
 
58
60
  return html`
59
61
  <div class="recipient-header">
60
- <div style="display: flex; align-items: center; gap: 12px;"><span class="logomark">s</span><div><div style="font-size: 12px; font-weight: 600;">Master Services Agreement</div><div class="mono" style="font-size: 10px; color: var(--text-muted);">From Lossless GmbH · doc_8mK3pL · 14 pages</div></div></div>
62
+ <div style="display: flex; align-items: center; gap: 12px;"><span class="logomark">s</span><div><div style="font-size: 12px; font-weight: 600;">${document.title}</div><div class="mono" style="font-size: 10px; color: var(--text-muted);">From ${document.sender} · ${document.id} · ${document.pages} pages</div></div></div>
61
63
  <div class="actions"><span class="pill success">${icon('shield', 12)} Verified sender · DKIM ✓</span>${actionButton('Decline', 'outline')}${actionButton('PDF', 'outline', 'download')}</div>
62
64
  </div>
63
65
  <div class="progress-track"><div class="progress-fill" style="width: ${progress}%"></div></div>
@@ -70,7 +72,7 @@ export class SdigWorkspaceSign extends DeesElement {
70
72
  const active = this.activeFieldId === field.id && !filled;
71
73
  return html`<div class="field-box ${active ? 'selected' : ''}" style="--x: ${field.x}px; --y: ${field.y}px; --w: ${field.w}px; --h: ${field.h}px; --field-color: ${filled ? 'transparent' : 'var(--accent)'}; color: ${filled ? 'hsl(220 50% 30%)' : 'var(--accent)'}; background: ${filled ? 'transparent' : 'color-mix(in srgb, var(--accent) 12%, transparent)'};" @click=${() => !filled ? this.signField(field.id) : undefined}>${filled ? this.renderSignedValue(field) : html`${icon(this.fieldIcon(field.type), 12)}<span>${active ? html`<span style="display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite;"></span>` : ''}${field.label}</span>`}</div>`;
72
74
  })}
73
- <div class="mono" style="position: absolute; bottom: 14px; right: 18px; font-size: 9px; color: hsl(0 0% 60%);">Page 1 of 14</div>
75
+ <div class="mono" style="position: absolute; bottom: 14px; right: 18px; font-size: 9px; color: hsl(0 0% 60%);">Page 1 of ${document.pages}</div>
74
76
  </div>
75
77
  </div>
76
78
  <div class="sign-panel">
@@ -1,5 +1,5 @@
1
1
  import { DeesElement, property, html, customElement, type TemplateResult, css } from '@design.estate/dees-element';
2
- import { icon, type TDensity, type TWorkspaceTheme, type TWorkspaceView } from './sdig-workspace.shared.js';
2
+ import { demoDocuments, icon, type IDocumentRow, type TDensity, type TWorkspaceTheme, type TWorkspaceView } from './sdig-workspace.shared.js';
3
3
  import './sdig-workspace-inbox.js';
4
4
  import './sdig-workspace-compose.js';
5
5
  import './sdig-workspace-sign.js';
@@ -23,6 +23,8 @@ export class SdigWorkspace extends DeesElement {
23
23
  @property({ type: String, reflect: true }) public accessor theme: TWorkspaceTheme = 'dark';
24
24
  @property({ type: String }) public accessor initialView: TWorkspaceView = 'inbox';
25
25
  @property({ type: String, reflect: true }) public accessor view: TWorkspaceView = 'inbox';
26
+ @property({ attribute: false }) public accessor documents: IDocumentRow[] = demoDocuments;
27
+ @property({ type: String }) public accessor activeDocumentId: string = '';
26
28
 
27
29
  public connectedCallback = async () => {
28
30
  await super.connectedCallback();
@@ -133,7 +135,7 @@ export class SdigWorkspace extends DeesElement {
133
135
 
134
136
  private renderSidebar(): TemplateResult {
135
137
  const navItems = [
136
- { id: 'inbox', label: 'Inbox', icon: 'inbox', count: 4 },
138
+ { id: 'inbox', label: 'Inbox', icon: 'inbox', count: this.documents.length },
137
139
  { id: 'compose', label: 'Compose', icon: 'plus' },
138
140
  { id: 'templates', label: 'Templates', icon: 'folder', count: 12 },
139
141
  { id: 'audit', label: 'Audit Trail', icon: 'shield' },
@@ -158,16 +160,17 @@ export class SdigWorkspace extends DeesElement {
158
160
  }
159
161
 
160
162
  private renderView(): TemplateResult {
163
+ const activeDocument = this.documents.find((document) => document.id === this.activeDocumentId) || this.documents[0] || demoDocuments[0];
161
164
  switch (this.view) {
162
- case 'inbox': return html`<sdig-workspace-inbox class="view-host" .density=${this.density}></sdig-workspace-inbox>`;
165
+ case 'inbox': return html`<sdig-workspace-inbox class="view-host" .density=${this.density} .documents=${this.documents}></sdig-workspace-inbox>`;
163
166
  case 'compose': return html`<sdig-workspace-compose class="view-host"></sdig-workspace-compose>`;
164
- case 'sign': return html`<sdig-workspace-sign class="view-host"></sdig-workspace-sign>`;
165
- case 'audit': return html`<sdig-workspace-audit class="view-host"></sdig-workspace-audit>`;
167
+ case 'sign': return html`<sdig-workspace-sign class="view-host" .document=${activeDocument}></sdig-workspace-sign>`;
168
+ case 'audit': return html`<sdig-workspace-audit class="view-host" .document=${activeDocument}></sdig-workspace-audit>`;
166
169
  case 'developers': return html`<sdig-workspace-developers class="view-host"></sdig-workspace-developers>`;
167
170
  case 'templates': return html`<sdig-workspace-placeholder class="view-host" label="Templates" subtitle="Reusable agreement templates"></sdig-workspace-placeholder>`;
168
171
  case 'team': return html`<sdig-workspace-placeholder class="view-host" label="Team" subtitle="Workspace members & roles"></sdig-workspace-placeholder>`;
169
172
  case 'settings': return html`<sdig-workspace-placeholder class="view-host" label="Settings" subtitle="Workspace, billing, security"></sdig-workspace-placeholder>`;
170
- default: return html`<sdig-workspace-inbox class="view-host" .density=${this.density}></sdig-workspace-inbox>`;
173
+ default: return html`<sdig-workspace-inbox class="view-host" .density=${this.density} .documents=${this.documents}></sdig-workspace-inbox>`;
171
174
  }
172
175
  }
173
176