@happyvertical/smrt-timesheets 0.55.16 → 0.55.18

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/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { a as validateDurationHours, i as ServiceTimeEntryCollection, n as SERVICE_TIME_ENTRY_FROZEN_FIELDS, r as ServiceTimeEntry, t as SERVICE_DURATION_HOURS_EVIDENCE } from "./chunks/service-time-entry-DTDiMeLe.js";
2
- import { a as AttendanceReplay, i as AttendancePunchCollection, n as AttendanceBreakCollection, o as AttendanceReplayCollection, r as AttendancePunch, t as AttendanceBreak } from "./chunks/models-Bw3v5Dmt.js";
1
+ import { a as validateDurationHours, i as ServiceTimeEntryCollection, n as SERVICE_TIME_ENTRY_FROZEN_FIELDS, r as ServiceTimeEntry, t as SERVICE_DURATION_HOURS_EVIDENCE } from "./chunks/service-time-entry-BHDu-hgG.js";
2
+ import { a as AttendanceReplay, i as AttendancePunchCollection, n as AttendanceBreakCollection, o as AttendanceReplayCollection, r as AttendancePunch, t as AttendanceBreak } from "./chunks/models-DAKEJPWR.js";
3
3
  import { SERVICE_TIME_ENTRY_STATUS_TRANSITIONS } from "./types.js";
4
4
  import { AttendanceConflict, AttendanceService } from "./attendance.js";
5
- import { a as PeriodTimecard, c as TimecardAdjustmentCollection, o as PeriodTimecardCollection, s as TimecardAdjustment, t as PeriodRollupService } from "./chunks/rollup-Bi9C3i6o.js";
5
+ import { a as PeriodTimecard, c as TimecardAdjustmentCollection, o as PeriodTimecardCollection, s as TimecardAdjustment, t as PeriodRollupService } from "./chunks/rollup-B2p7D7EO.js";
6
6
  import { TIMESHEETS_MODULE_META, TIMESHEETS_UI_SLOTS } from "./ui.js";
7
7
  import { SmrtCollection, SmrtObject, ValidationError, field, foreignKey, smrt } from "@happyvertical/smrt-core";
8
8
  import { TenantScoped, tenantId } from "@happyvertical/smrt-tenancy";
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-timesheets",
5
- "packageVersion": "0.55.16",
5
+ "packageVersion": "0.55.18",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-timesheets:AttendancePunch": {
8
8
  "name": "attendancepunch",
package/dist/rollup.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as PeriodTimecard, c as TimecardAdjustmentCollection, o as PeriodTimecardCollection, s as TimecardAdjustment, t as PeriodRollupService } from "./chunks/rollup-Bi9C3i6o.js";
1
+ import { a as PeriodTimecard, c as TimecardAdjustmentCollection, o as PeriodTimecardCollection, s as TimecardAdjustment, t as PeriodRollupService } from "./chunks/rollup-B2p7D7EO.js";
2
2
  export { PeriodRollupService, PeriodTimecard, PeriodTimecardCollection, TimecardAdjustment, TimecardAdjustmentCollection };
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-timesheets",
6
- "packageVersion": "0.55.16",
6
+ "packageVersion": "0.55.18",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "69cf04c22e92dad1db1ca3d9c3a5bd540159b0e9c9aee6a2abff82c35553dbbc",
11
- "packageJson": "e30ee7a792ccdeafbe1f268cbe7546117a827ccd4f27c8a6f8d66b209e6cf3b9",
10
+ "manifest": "60d7f429a28e2a9e8caccc9ce6623971d6fa6e5c15a6c5e95972c0c56c8ccaa6",
11
+ "packageJson": "b986e4538da2e0d2783a2293512f2fbd8bc73c5268891e467683e1d88d05b67c",
12
12
  "agents": "46a4e8437424b494645e90ce4a4869be04956c5da6a42f89697cbd3ab2199a7e",
13
13
  "moduleDoc:agents/period-rollup.md": "5fb741659d81dbef2e4850c10c2d65f09e3f5a83e8a88e2e0f19585f25158a6a"
14
14
  },
@@ -40,7 +40,7 @@ const formattedValue = $derived(
40
40
  const unit = $derived(format === 'hhmm' ? '' : 'h');
41
41
  </script>
42
42
 
43
- <span class="duration" class:sm={size === 'sm'} class:lg={size === 'lg'}>
43
+ <span class="duration" class:sm={size === 'sm'} class:lg={size === 'lg'} data-smrt-component="DurationDisplay">
44
44
  <span class="value">{formattedValue}</span>
45
45
  {#if showLabel && unit}
46
46
  <span class="unit">{unit}</span>
@@ -48,6 +48,8 @@ const unit = $derived(format === 'hhmm' ? '' : 'h');
48
48
  </span>
49
49
 
50
50
  <style>
51
+ @layer smrt.reset, smrt.structure, smrt.theme;
52
+ @layer smrt.theme {
51
53
  .duration {
52
54
  display: inline-flex;
53
55
  align-items: baseline;
@@ -78,4 +80,5 @@ const unit = $derived(format === 'hhmm' ? '' : 'h');
78
80
  .duration.lg {
79
81
  font-size: var(--smrt-typography-headline-small-size, 1.5rem);
80
82
  }
83
+ }
81
84
  </style>
@@ -93,11 +93,11 @@ function formatAmount(amount: number, currency = 'USD'): string {
93
93
  </script>
94
94
 
95
95
  {#if entries.length === 0}
96
- <p class="time-approval-empty">
96
+ <p class="time-approval-empty" data-smrt-component="TimeEntryApprovalQueue">
97
97
  {emptyMessage ?? t(M['timesheets.approval_queue.empty'])}
98
98
  </p>
99
99
  {:else}
100
- <ul class="time-approval-queue">
100
+ <ul class="time-approval-queue" data-smrt-component="TimeEntryApprovalQueue">
101
101
  {#each entries as entry (entry.id)}
102
102
  <li class="time-approval-row">
103
103
  <div class="time-approval-line">
@@ -176,6 +176,8 @@ function formatAmount(amount: number, currency = 'USD'): string {
176
176
  {/if}
177
177
 
178
178
  <style>
179
+ @layer smrt.reset, smrt.structure, smrt.theme;
180
+ @layer smrt.theme {
179
181
  .time-approval-queue {
180
182
  list-style: none;
181
183
  margin: 0;
@@ -260,4 +262,5 @@ function formatAmount(amount: number, currency = 'USD'): string {
260
262
  color: var(--smrt-color-on-surface-variant, inherit);
261
263
  padding: 1rem 0;
262
264
  }
265
+ }
263
266
  </style>
@@ -85,7 +85,7 @@ function handleKeydown(event: KeyboardEvent) {
85
85
  class="time-entry-card"
86
86
  class:selectable
87
87
  class:selected
88
- class:clickable={!!href || !!onclick}
88
+ class:clickable={!!href || !!onclick} data-smrt-component="TimeEntryCard"
89
89
  >
90
90
  {#if selectable}
91
91
  <div class="checkbox-wrapper">
@@ -133,7 +133,7 @@ function handleKeydown(event: KeyboardEvent) {
133
133
  {#snippet cardBody()}
134
134
  <div class="entry-header">
135
135
  <span class="date">{formatDate(entry.date)}</span>
136
- <span class="status-badge" style="--status-color: {statusColors[entry.status]}">
136
+ <span class="status-badge" style="--smrt-time-entry-card-status-color: {statusColors[entry.status]}">
137
137
  {entry.status.toUpperCase()}
138
138
  </span>
139
139
  </div>
@@ -167,12 +167,14 @@ function handleKeydown(event: KeyboardEvent) {
167
167
  {/snippet}
168
168
 
169
169
  <style>
170
+ @layer smrt.reset, smrt.structure, smrt.theme;
171
+ @layer smrt.theme {
170
172
  .time-entry-card {
171
173
  display: flex;
172
174
  align-items: stretch;
173
175
  background: var(--smrt-color-surface);
174
176
  border: 1px solid var(--smrt-color-outline-variant);
175
- border-radius: var(--smrt-radius-medium, 12px);
177
+ border-radius: var(--smrt-radius-medium);
176
178
  overflow: hidden;
177
179
  transition: all 0.2s var(--smrt-easing-standard);
178
180
  }
@@ -227,7 +229,7 @@ function handleKeydown(event: KeyboardEvent) {
227
229
  button.card-content:focus {
228
230
  outline: 2px solid var(--smrt-color-primary);
229
231
  outline-offset: -2px;
230
- border-radius: var(--smrt-radius-small, 8px);
232
+ border-radius: var(--smrt-radius-small);
231
233
  }
232
234
 
233
235
  .entry-header {
@@ -246,10 +248,10 @@ function handleKeydown(event: KeyboardEvent) {
246
248
  font-size: var(--smrt-typography-label-small-size, 0.625rem);
247
249
  font-weight: var(--smrt-typography-label-small-weight, 500);
248
250
  padding: 0.25rem 0.5rem;
249
- border-radius: var(--smrt-radius-small, 8px);
250
- background: var(--status-color);
251
+ border-radius: var(--smrt-radius-small);
252
+ background: var(--smrt-time-entry-card-status-color);
251
253
  color: var(--smrt-color-on-primary);
252
- letter-spacing: var(--smrt-typography-label-small-tracking, 0.5px);
254
+ letter-spacing: var(--smrt-typography-label-small-tracking);
253
255
  }
254
256
 
255
257
  .entry-body {
@@ -310,4 +312,5 @@ function handleKeydown(event: KeyboardEvent) {
310
312
  padding: 0.5rem;
311
313
  border-left: 1px solid var(--smrt-color-outline-variant);
312
314
  }
315
+ }
313
316
  </style>
@@ -92,11 +92,11 @@ function getEntryHref(entry: TimeEntry): string | undefined {
92
92
  </script>
93
93
 
94
94
  {#if entries.length === 0}
95
- <div class="empty-state">
95
+ <div class="empty-state" data-smrt-component="TimeEntryList">
96
96
  <p>{emptyMessage}</p>
97
97
  </div>
98
98
  {:else}
99
- <div class="time-entry-list">
99
+ <div class="time-entry-list" data-smrt-component="TimeEntryList">
100
100
  {#if selectable && selectableEntries.length > 0}
101
101
  <div class="list-header">
102
102
  <label class="select-all">
@@ -173,7 +173,7 @@ function getEntryHref(entry: TimeEntry): string | undefined {
173
173
  </div>
174
174
 
175
175
  <div class="status-cell">
176
- <span class="status-badge" style="--status-color: {statusColors[entry.status]}">
176
+ <span class="status-badge" style="--smrt-time-entry-list-status-color: {statusColors[entry.status]}">
177
177
  {entry.status}
178
178
  </span>
179
179
  </div>
@@ -188,6 +188,8 @@ function getEntryHref(entry: TimeEntry): string | undefined {
188
188
  {/snippet}
189
189
 
190
190
  <style>
191
+ @layer smrt.reset, smrt.structure, smrt.theme;
192
+ @layer smrt.theme {
191
193
  .empty-state {
192
194
  padding: 3rem 1rem;
193
195
  text-align: center;
@@ -196,7 +198,7 @@ function getEntryHref(entry: TimeEntry): string | undefined {
196
198
 
197
199
  .time-entry-list {
198
200
  background: var(--smrt-color-surface);
199
- border-radius: var(--smrt-radius-large, 16px);
201
+ border-radius: var(--smrt-radius-large);
200
202
  overflow: hidden;
201
203
  border: 1px solid var(--smrt-color-outline-variant);
202
204
  }
@@ -333,11 +335,11 @@ function getEntryHref(entry: TimeEntry): string | undefined {
333
335
  font-size: var(--smrt-typography-label-small-size, 0.625rem);
334
336
  font-weight: var(--smrt-typography-label-small-weight, 500);
335
337
  padding: 0.25rem 0.5rem;
336
- border-radius: var(--smrt-radius-small, 8px);
337
- background: var(--status-color);
338
+ border-radius: var(--smrt-radius-small);
339
+ background: var(--smrt-time-entry-list-status-color);
338
340
  color: var(--smrt-color-on-primary);
339
341
  text-transform: uppercase;
340
- letter-spacing: var(--smrt-typography-label-small-tracking, 0.5px);
342
+ letter-spacing: var(--smrt-typography-label-small-tracking);
341
343
  }
342
344
 
343
345
  .amount-cell {
@@ -367,4 +369,5 @@ function getEntryHref(entry: TimeEntry): string | undefined {
367
369
  flex: none;
368
370
  }
369
371
  }
372
+ }
370
373
  </style>
@@ -59,7 +59,7 @@ let {
59
59
  const { t } = useI18n();
60
60
  </script>
61
61
 
62
- <div class="time-summary" class:horizontal={layout === 'horizontal'}>
62
+ <div class="time-summary" class:horizontal={layout === 'horizontal'} data-smrt-component="TimeSummary">
63
63
  <div class="summary-card">
64
64
  <span class="label">{t(M['projects.time_summary.total_hours'])}</span>
65
65
  <span class="value">{hoursFormatter(totalHours)}</span>
@@ -91,6 +91,8 @@ const { t } = useI18n();
91
91
  </div>
92
92
 
93
93
  <style>
94
+ @layer smrt.reset, smrt.structure, smrt.theme;
95
+ @layer smrt.theme {
94
96
  .time-summary {
95
97
  display: grid;
96
98
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
@@ -111,7 +113,7 @@ const { t } = useI18n();
111
113
  .summary-card {
112
114
  background: var(--smrt-color-surface);
113
115
  border: 1px solid var(--smrt-color-outline-variant);
114
- border-radius: var(--smrt-radius-medium, 12px);
116
+ border-radius: var(--smrt-radius-medium);
115
117
  padding: 1rem;
116
118
  display: flex;
117
119
  flex-direction: column;
@@ -133,7 +135,7 @@ const { t } = useI18n();
133
135
  font-weight: var(--smrt-typography-label-small-weight, 500);
134
136
  color: var(--smrt-color-on-surface-variant);
135
137
  text-transform: uppercase;
136
- letter-spacing: var(--smrt-typography-label-small-tracking, 0.5px);
138
+ letter-spacing: var(--smrt-typography-label-small-tracking);
137
139
  }
138
140
 
139
141
  .value {
@@ -181,4 +183,5 @@ const { t } = useI18n();
181
183
  grid-template-columns: 1fr 1fr;
182
184
  }
183
185
  }
186
+ }
184
187
  </style>
@@ -5,10 +5,10 @@
5
5
  * Status color mapping using M3 design tokens
6
6
  */
7
7
  export const statusColors = {
8
- draft: 'var(--md-sys-color-outline)',
9
- submitted: 'var(--md-sys-color-tertiary)',
10
- approved: 'var(--md-sys-color-primary)',
11
- rejected: 'var(--md-sys-color-error)',
8
+ draft: 'var(--smrt-color-outline)',
9
+ submitted: 'var(--smrt-color-tertiary)',
10
+ approved: 'var(--smrt-color-primary)',
11
+ rejected: 'var(--smrt-color-error)',
12
12
  };
13
13
  /**
14
14
  * Format a date for display (e.g., "Jan 5")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-timesheets",
3
- "version": "0.55.16",
3
+ "version": "0.55.18",
4
4
  "smrtJsdoc": "strict",
5
5
  "description": "Shared time entries for the SMRT framework: who worked how long on what, approval and correction, with immutable charge and compensation snapshots",
6
6
  "type": "module",
@@ -39,10 +39,10 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
- "@happyvertical/smrt-core": "0.55.16",
43
- "@happyvertical/smrt-tenancy": "0.55.16",
44
- "@happyvertical/smrt-types": "0.55.16",
45
- "@happyvertical/smrt-ui": "0.55.16",
42
+ "@happyvertical/smrt-core": "0.55.18",
43
+ "@happyvertical/smrt-tenancy": "0.55.18",
44
+ "@happyvertical/smrt-types": "0.55.18",
45
+ "@happyvertical/smrt-ui": "0.55.18",
46
46
  "@happyvertical/sql": "^0.103.4"
47
47
  },
48
48
  "peerDependencies": {
@@ -54,7 +54,7 @@
54
54
  }
55
55
  },
56
56
  "devDependencies": {
57
- "@happyvertical/smrt-vitest": "0.55.16",
57
+ "@happyvertical/smrt-vitest": "0.55.18",
58
58
  "@sveltejs/package": "^2.5.8",
59
59
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
60
60
  "@types/node": "24.13.6",