@korso/shepherd-ui 0.5.1 → 0.7.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,6 +1,6 @@
1
1
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import { useState as s, useMemo as h } from "react";
3
- import { c as d, a as m, D as u } from "./Dashboard-qipRa5MO.js";
3
+ import { c as d, a as m, D as u } from "./Dashboard-D7tbhMwK.js";
4
4
  const i = "shepherd.token";
5
5
  function p() {
6
6
  try {
@@ -269,6 +269,7 @@
269
269
  .shepherd-config .readonly-value { margin:0; font-size:15px; color:var(--ink);
270
270
  padding:1px 0; font-weight:500; }
271
271
  .shepherd-general .leave { padding-top:4px; }
272
+ .shepherd-general .delete { padding-top:4px; }
272
273
  .shepherd-config button.danger { border-color:var(--drop); background:transparent; color:var(--drop);
273
274
  align-self:flex-start; }
274
275
  .shepherd-config button.danger:hover:not(:disabled) { background:var(--drop); color:var(--bg); }
@@ -288,10 +289,6 @@
288
289
  font-size:11px; font-weight:600; letter-spacing:.05em; text-transform:uppercase; color:var(--ink3); }
289
290
  .shepherd-config .helper { margin:0; font-size:12.5px; color:var(--ink2); }
290
291
  .shepherd-config .field > select { width:100%; }
291
- .shepherd-config select {
292
- appearance:none; -webkit-appearance:none; -moz-appearance:none;
293
- background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239c917a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
294
- background-repeat:no-repeat; background-position:right 28px center; padding-right:44px; }
295
292
  .shepherd-config .field__row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
296
293
  .shepherd-config .field__row > input { flex:1; min-width:200px; }
297
294
 
@@ -302,11 +299,22 @@
302
299
 
303
300
  .shepherd-config input, .shepherd-config select {
304
301
  padding:9px 12px; border-radius:8px; border:1px solid var(--line);
305
- background:var(--bg); color:var(--ink); font:inherit;
302
+ /* background-COLOR, not the `background` shorthand — the shorthand
303
+ resets background-image and erases the select's chevron above. */
304
+ background-color:var(--bg); color:var(--ink); font:inherit;
306
305
  transition:border-color .12s ease, box-shadow .12s ease; }
307
306
  .shepherd-config input::placeholder { color:var(--ink3); }
308
307
  .shepherd-config input:focus, .shepherd-config select:focus {
309
308
  outline:none; border-color:var(--terr); box-shadow:0 0 0 3px rgba(122,106,72,.14); }
309
+ /* Select dropdown affordance. AFTER the shared input/select rule on
310
+ purpose: `padding` there is a shorthand and would reset the wider
311
+ padding-right reserved for the chevron. */
312
+ .shepherd-config select {
313
+ appearance:none; -webkit-appearance:none; -moz-appearance:none;
314
+ cursor:pointer;
315
+ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236f6450' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
316
+ background-repeat:no-repeat; background-position:right 14px center; padding-right:40px; }
317
+ .shepherd-config select:hover:not(:disabled) { border-color:var(--terr); }
310
318
  .shepherd-config button {
311
319
  padding:9px 16px; border-radius:8px; border:1px solid var(--ink);
312
320
  background:var(--ink); color:var(--bg); font-weight:600; cursor:pointer; font:inherit;
@@ -417,3 +425,33 @@
417
425
  background:var(--ink); color:var(--bg); font-weight:600; cursor:pointer; font:inherit; }
418
426
  .shepherd-feedback__panel > button:hover:not(:disabled) { background:#413a2a; }
419
427
  .shepherd-feedback__panel > button:disabled { opacity:.55; cursor:default; }
428
+
429
+ /* Modal — a centered card over a dimmed backdrop. Used by the type-to-confirm
430
+ Delete workspace dialog. The first true modal in the app (the feedback
431
+ widget is an inline popover), so its chrome lives here rather than being
432
+ shared with .shepherd-feedback__panel. */
433
+ .shepherd-modal__backdrop {
434
+ position:fixed; inset:0; z-index:50; display:flex; align-items:center;
435
+ justify-content:center; padding:20px; background:rgba(30,24,12,.45); }
436
+ .shepherd-modal {
437
+ width:100%; max-width:440px; display:flex; flex-direction:column; gap:12px;
438
+ padding:22px; background:var(--card); border:1px solid var(--line);
439
+ border-radius:12px; box-shadow:0 16px 48px rgba(50,40,20,.28); }
440
+ .shepherd-modal h3 {
441
+ margin:0; font-size:13px; font-weight:600; letter-spacing:.04em;
442
+ text-transform:uppercase; color:var(--ink2); }
443
+ .shepherd-modal__body { margin:0; font-size:13.5px; line-height:1.5; color:var(--ink); }
444
+ .shepherd-modal__label { font-size:12.5px; color:var(--ink2); }
445
+ .shepherd-modal input {
446
+ width:100%; padding:9px 12px; border-radius:8px; border:1px solid var(--line);
447
+ background:var(--bg); color:var(--ink); font:inherit;
448
+ transition:border-color .12s ease, box-shadow .12s ease; }
449
+ .shepherd-modal input:focus {
450
+ outline:none; border-color:var(--terr); box-shadow:0 0 0 3px rgba(122,106,72,.14); }
451
+ .shepherd-modal [role="alert"] { margin:0; font-size:13px; color:var(--drop); }
452
+ .shepherd-modal__actions { display:flex; justify-content:flex-end; gap:10px; margin-top:4px; }
453
+ .shepherd-modal__actions button.danger {
454
+ border-color:var(--drop); background:transparent; color:var(--drop); }
455
+ .shepherd-modal__actions button.danger:hover:not(:disabled) {
456
+ background:var(--drop); color:var(--bg); }
457
+ .shepherd-modal__actions button:disabled { opacity:.55; cursor:default; }
package/dist/preview.js CHANGED
@@ -61,6 +61,10 @@ const previewClient = {
61
61
  workspaces = [...workspaces, ws];
62
62
  return ws;
63
63
  },
64
+ deleteWorkspace: async (workspaceId) => {
65
+ workspaces = workspaces.filter((w) => w.id !== workspaceId);
66
+ return { deleted: true };
67
+ },
64
68
  mintToken: async (_workspaceId, body) => {
65
69
  const id = `tok_${nextTokenId++}`;
66
70
  tokens = [