@happyvertical/smrt-timesheets 0.60.16 → 0.60.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.
Files changed (23) hide show
  1. package/dist/attendance.js +2 -2
  2. package/dist/chunks/{attendance-B3EVkwgb.js → attendance-2pFkYYxP.js} +3 -3
  3. package/dist/chunks/{attendance-B3EVkwgb.js.map → attendance-2pFkYYxP.js.map} +1 -1
  4. package/dist/chunks/{attendance-CrFsAHop.js → attendance-C8c4mVMi.js} +3 -3
  5. package/dist/chunks/{attendance-CrFsAHop.js.map → attendance-C8c4mVMi.js.map} +1 -1
  6. package/dist/chunks/{models-mQ41xrzU.js → models-Rm_XrBQR.js} +2 -2
  7. package/dist/chunks/{models-mQ41xrzU.js.map → models-Rm_XrBQR.js.map} +1 -1
  8. package/dist/chunks/{rollup-DPaFzATp.js → rollup-CV7BooPf.js} +3 -3
  9. package/dist/chunks/{rollup-DPaFzATp.js.map → rollup-CV7BooPf.js.map} +1 -1
  10. package/dist/chunks/{service-time-entry-B4aDDXFM.js → service-time-entry-BxWOyH9p.js} +5 -5
  11. package/dist/chunks/{service-time-entry-B4aDDXFM.js.map → service-time-entry-BxWOyH9p.js.map} +1 -1
  12. package/dist/chunks/{time-entry-actions-B66cBwDe.js → time-entry-actions-iKXcmTIU.js} +2 -2
  13. package/dist/chunks/{time-entry-actions-B66cBwDe.js.map → time-entry-actions-iKXcmTIU.js.map} +1 -1
  14. package/dist/index.js +5 -5
  15. package/dist/manifest.json +1 -1
  16. package/dist/rollup.js +1 -1
  17. package/dist/smrt-knowledge.json +3 -3
  18. package/dist/svelte/components/DurationDisplay.svelte +16 -15
  19. package/dist/svelte/components/TimeEntryApprovalQueue.svelte +55 -53
  20. package/dist/svelte/components/TimeEntryCard.svelte +103 -102
  21. package/dist/svelte/components/TimeEntryList.svelte +133 -124
  22. package/dist/svelte/components/TimeSummary.svelte +46 -56
  23. package/package.json +8 -8
@@ -82,13 +82,13 @@ function handleKeydown(event: KeyboardEvent) {
82
82
  </script>
83
83
 
84
84
  <div
85
- class="time-entry-card"
86
- class:selectable
87
- class:selected
88
- class:clickable={!!href || !!onclick} data-smrt-component="TimeEntryCard"
85
+ class="smrt-time-entry-card__root"
86
+ class:smrt-time-entry-card__selectable={selectable}
87
+ class:smrt-time-entry-card__selected={selected}
88
+ class:smrt-time-entry-card__clickable={!!href || !!onclick} data-smrt-component="TimeEntryCard"
89
89
  >
90
90
  {#if selectable}
91
- <div class="checkbox-wrapper">
91
+ <div class="smrt-time-entry-card__checkbox" data-smrt-part="control">
92
92
  <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive, kept native to match the indeterminate select-all in TimeEntryList -->
93
93
  <input
94
94
  type="checkbox"
@@ -102,7 +102,7 @@ function handleKeydown(event: KeyboardEvent) {
102
102
  {#if href}
103
103
  <a
104
104
  {href}
105
- class="card-content"
105
+ class="smrt-time-entry-card__content" data-smrt-part="body"
106
106
  onclick={handleCardClick}
107
107
  onkeydown={handleKeydown}
108
108
  >
@@ -112,53 +112,53 @@ function handleKeydown(event: KeyboardEvent) {
112
112
  <!-- raw-primitive-allow: pressable selection card wrapping rich content; structural, not a standard action button -->
113
113
  <button
114
114
  type="button"
115
- class="card-content"
115
+ class="smrt-time-entry-card__content" data-smrt-part="body"
116
116
  onclick={() => onclick?.()}
117
117
  >
118
118
  {@render cardBody()}
119
119
  </button>
120
120
  {:else}
121
- <div class="card-content">
121
+ <div class="smrt-time-entry-card__content" data-smrt-part="body">
122
122
  {@render cardBody()}
123
123
  </div>
124
124
  {/if}
125
125
 
126
126
  {#if actions}
127
- <div class="card-actions">
127
+ <div class="smrt-time-entry-card__actions" data-smrt-part="actions">
128
128
  {@render actions()}
129
129
  </div>
130
130
  {/if}
131
131
  </div>
132
132
 
133
133
  {#snippet cardBody()}
134
- <div class="entry-header">
135
- <span class="date">{formatDate(entry.date)}</span>
136
- <span class="status-badge" style="--smrt-time-entry-card-status-color: {statusColors[entry.status]}">
134
+ <div class="smrt-time-entry-card__header" data-smrt-part="header">
135
+ <span class="smrt-time-entry-card__date" data-smrt-part="meta">{formatDate(entry.date)}</span>
136
+ <span class="smrt-time-entry-card__status" data-smrt-part="badge" style="--smrt-time-entry-card-status-color: {statusColors[entry.status]}">
137
137
  {entry.status.toUpperCase()}
138
138
  </span>
139
139
  </div>
140
140
 
141
- <div class="entry-body">
142
- <p class="description">{entry.description}</p>
141
+ <div class="smrt-time-entry-card__body" data-smrt-part="body">
142
+ <p class="smrt-time-entry-card__description" data-smrt-part="description">{entry.description}</p>
143
143
  {#if entry.workerName}
144
- <p class="worker">{entry.workerName}</p>
144
+ <p class="smrt-time-entry-card__worker" data-smrt-part="meta">{entry.workerName}</p>
145
145
  {/if}
146
146
  </div>
147
147
 
148
- <div class="entry-footer">
149
- <div class="hours">
150
- <span class="hours-value">{hoursFormatter(entry.hours)}</span>
148
+ <div class="smrt-time-entry-card__footer" data-smrt-part="footer">
149
+ <div class="smrt-time-entry-card__hours" data-smrt-part="value">
150
+ <span class="smrt-time-entry-card__hours-value" data-smrt-part="value">{hoursFormatter(entry.hours)}</span>
151
151
  {#if entry.hourlyRate}
152
- <span class="rate">@ {formatCurrency(entry.hourlyRate, currency)}/hr</span>
152
+ <span class="smrt-time-entry-card__rate" data-smrt-part="meta">@ {formatCurrency(entry.hourlyRate, currency)}/hr</span>
153
153
  {/if}
154
154
  </div>
155
155
  {#if entry.amount !== undefined}
156
- <span class="amount">{formatCurrency(entry.amount, currency)}</span>
156
+ <span class="smrt-time-entry-card__amount" data-smrt-part="value">{formatCurrency(entry.amount, currency)}</span>
157
157
  {/if}
158
158
  </div>
159
159
 
160
160
  {#if entry.mileage && entry.mileage > 0}
161
- <div class="mileage">
161
+ <div class="smrt-time-entry-card__mileage" data-smrt-part="meta">
162
162
  {t(M['projects.time_entry_card.mileage'], { mileage: entry.mileage })}
163
163
  </div>
164
164
  {/if}
@@ -168,149 +168,150 @@ function handleKeydown(event: KeyboardEvent) {
168
168
 
169
169
  <style>
170
170
  @layer smrt.reset, smrt.structure, smrt.theme;
171
- @layer smrt.theme {
172
- .time-entry-card {
171
+ @layer smrt.structure {
172
+ .smrt-time-entry-card__root {
173
173
  display: flex;
174
174
  align-items: stretch;
175
+ overflow: hidden;
176
+ }
177
+ .smrt-time-entry-card__root.smrt-time-entry-card__clickable .smrt-time-entry-card__content {
178
+ cursor: pointer;
179
+ }
180
+ .smrt-time-entry-card__checkbox {
181
+ display: flex;
182
+ align-items: center;
183
+ padding: 1rem;
184
+ }
185
+ .smrt-time-entry-card__checkbox input[type='checkbox'] {
186
+ width: 1.25rem;
187
+ height: 1.25rem;
188
+ cursor: pointer;
189
+ }
190
+ .smrt-time-entry-card__content {
191
+ flex: 1;
192
+ padding: 1rem;
193
+ min-width: 0;
194
+ display: block;
195
+ width: 100%;
196
+ }
197
+ .smrt-time-entry-card__header {
198
+ display: flex;
199
+ justify-content: space-between;
200
+ align-items: center;
201
+ margin-bottom: 0.5rem;
202
+ }
203
+ .smrt-time-entry-card__status {
204
+ padding: 0.25rem 0.5rem;
205
+ }
206
+ .smrt-time-entry-card__body {
207
+ margin-bottom: 0.75rem;
208
+ }
209
+ .smrt-time-entry-card__description {
210
+ margin: 0;
211
+ }
212
+ .smrt-time-entry-card__worker {
213
+ margin: 0.25rem 0 0;
214
+ }
215
+ .smrt-time-entry-card__footer {
216
+ display: flex;
217
+ justify-content: space-between;
218
+ align-items: baseline;
219
+ }
220
+ .smrt-time-entry-card__hours {
221
+ display: flex;
222
+ align-items: baseline;
223
+ gap: 0.5rem;
224
+ }
225
+ .smrt-time-entry-card__mileage {
226
+ margin-top: 0.5rem;
227
+ }
228
+ .smrt-time-entry-card__actions {
229
+ display: flex;
230
+ align-items: center;
231
+ padding: 0.5rem;
232
+ }
233
+ }
234
+
235
+ @layer smrt.theme {
236
+ .smrt-time-entry-card__root {
175
237
  background: var(--smrt-color-surface);
176
238
  border: var(--smrt-hairline);
177
239
  border-radius: var(--smrt-radius-medium);
178
- overflow: hidden;
179
240
  transition: all 0.2s var(--smrt-easing-standard);
180
241
  }
181
-
182
- .time-entry-card:hover {
242
+ .smrt-time-entry-card__root:hover {
183
243
  border-color: var(--smrt-hairline-strong-color);
184
244
  }
185
-
186
- .time-entry-card.selected {
245
+ .smrt-time-entry-card__root.smrt-time-entry-card__selected {
187
246
  border-color: var(--smrt-color-primary);
188
247
  background: var(--smrt-color-primary-container);
189
248
  }
190
-
191
- .time-entry-card.clickable .card-content {
192
- cursor: pointer;
193
- }
194
-
195
- .time-entry-card.clickable:hover {
249
+ .smrt-time-entry-card__root.smrt-time-entry-card__clickable:hover {
196
250
  box-shadow: var(--smrt-elevation-1);
197
251
  }
198
-
199
- .checkbox-wrapper {
200
- display: flex;
201
- align-items: center;
202
- padding: 1rem;
252
+ .smrt-time-entry-card__checkbox {
203
253
  background: var(--smrt-color-surface-container-low);
204
254
  border-right: var(--smrt-hairline);
205
255
  }
206
-
207
- .checkbox-wrapper input[type='checkbox'] {
208
- width: 1.25rem;
209
- height: 1.25rem;
210
- cursor: pointer;
256
+ .smrt-time-entry-card__checkbox input[type='checkbox'] {
211
257
  accent-color: var(--smrt-color-primary);
212
258
  }
213
-
214
- .card-content {
215
- flex: 1;
216
- padding: 1rem;
217
- min-width: 0;
259
+ .smrt-time-entry-card__content {
218
260
  text-decoration: none;
219
261
  color: inherit;
220
262
  background: transparent;
221
263
  border: none;
222
264
  text-align: left;
223
265
  font: inherit;
224
- display: block;
225
- width: 100%;
226
266
  }
227
-
228
- a.card-content:focus,
229
- button.card-content:focus {
267
+ a.smrt-time-entry-card__content:focus,
268
+ button.smrt-time-entry-card__content:focus {
230
269
  outline: 2px solid var(--smrt-color-primary);
231
270
  outline-offset: -2px;
232
271
  border-radius: var(--smrt-radius-small);
233
272
  }
234
-
235
- .entry-header {
236
- display: flex;
237
- justify-content: space-between;
238
- align-items: center;
239
- margin-bottom: 0.5rem;
240
- }
241
-
242
- .date {
273
+ .smrt-time-entry-card__date {
243
274
  font-size: var(--smrt-typography-body-medium-size, 0.875rem);
244
275
  color: var(--smrt-color-on-surface-variant);
245
276
  }
246
-
247
- .status-badge {
277
+ .smrt-time-entry-card__status {
248
278
  font-size: var(--smrt-typography-label-small-size, 0.625rem);
249
279
  font-weight: var(--smrt-typography-label-small-weight, 500);
250
- padding: 0.25rem 0.5rem;
251
280
  border-radius: var(--smrt-radius-small);
252
281
  background: var(--smrt-time-entry-card-status-color);
253
282
  color: var(--smrt-color-on-primary);
254
283
  letter-spacing: var(--smrt-typography-label-small-tracking);
255
284
  }
256
-
257
- .entry-body {
258
- margin-bottom: 0.75rem;
259
- }
260
-
261
- .description {
262
- margin: 0;
285
+ .smrt-time-entry-card__description {
263
286
  font-size: var(--smrt-typography-body-large-size, 0.9375rem);
264
287
  color: var(--smrt-color-on-surface);
265
288
  line-height: var(--smrt-typography-body-large-line-height, 1.5);
266
289
  }
267
-
268
- .worker {
269
- margin: 0.25rem 0 0;
290
+ .smrt-time-entry-card__worker {
270
291
  font-size: var(--smrt-typography-body-small-size, 0.8125rem);
271
292
  color: var(--smrt-color-on-surface-variant);
272
293
  }
273
-
274
- .entry-footer {
275
- display: flex;
276
- justify-content: space-between;
277
- align-items: baseline;
278
- }
279
-
280
- .hours {
281
- display: flex;
282
- align-items: baseline;
283
- gap: 0.5rem;
284
- }
285
-
286
- .hours-value {
294
+ .smrt-time-entry-card__hours-value {
287
295
  font-size: var(--smrt-typography-body-large-size, 1rem);
288
296
  font-weight: var(--smrt-typography-title-medium-weight, 500);
289
297
  color: var(--smrt-color-primary);
290
298
  }
291
-
292
- .rate {
299
+ .smrt-time-entry-card__rate {
293
300
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
294
301
  color: var(--smrt-color-on-surface-variant);
295
302
  }
296
-
297
- .amount {
303
+ .smrt-time-entry-card__amount {
298
304
  font-size: var(--smrt-typography-body-large-size, 1rem);
299
305
  font-weight: var(--smrt-typography-title-medium-weight, 500);
300
306
  color: var(--smrt-color-on-surface);
301
307
  }
302
-
303
- .mileage {
304
- margin-top: 0.5rem;
308
+ .smrt-time-entry-card__mileage {
305
309
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
306
310
  color: var(--smrt-color-on-surface-variant);
307
311
  }
308
-
309
- .card-actions {
310
- display: flex;
311
- align-items: center;
312
- padding: 0.5rem;
312
+ .smrt-time-entry-card__actions {
313
313
  border-left: var(--smrt-hairline);
314
314
  }
315
315
  }
316
+
316
317
  </style>