@korso/shepherd-ui 0.5.0 → 0.6.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-C48qY8R2.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 {
@@ -264,10 +264,12 @@
264
264
  /* No-workspace Config prompt (create/join now live in the switcher). */
265
265
  .config-none { color:var(--ink2); font-size:13.5px; max-width:520px; }
266
266
 
267
- /* Read-only workspace facts (name / role) in General. */
268
- .shepherd-config .readonly-value { margin:0; font-size:14px; color:var(--ink);
269
- padding:9px 12px; border-radius:8px; border:1px solid var(--line2); background:var(--bg); }
267
+ /* Read-only workspace facts (name / role) in General. Deliberately plain
268
+ text no border/background so they don't read as editable inputs. */
269
+ .shepherd-config .readonly-value { margin:0; font-size:15px; color:var(--ink);
270
+ padding:1px 0; font-weight:500; }
270
271
  .shepherd-general .leave { padding-top:4px; }
272
+ .shepherd-general .delete { padding-top:4px; }
271
273
  .shepherd-config button.danger { border-color:var(--drop); background:transparent; color:var(--drop);
272
274
  align-self:flex-start; }
273
275
  .shepherd-config button.danger:hover:not(:disabled) { background:var(--drop); color:var(--bg); }
@@ -416,3 +418,33 @@
416
418
  background:var(--ink); color:var(--bg); font-weight:600; cursor:pointer; font:inherit; }
417
419
  .shepherd-feedback__panel > button:hover:not(:disabled) { background:#413a2a; }
418
420
  .shepherd-feedback__panel > button:disabled { opacity:.55; cursor:default; }
421
+
422
+ /* Modal — a centered card over a dimmed backdrop. Used by the type-to-confirm
423
+ Delete workspace dialog. The first true modal in the app (the feedback
424
+ widget is an inline popover), so its chrome lives here rather than being
425
+ shared with .shepherd-feedback__panel. */
426
+ .shepherd-modal__backdrop {
427
+ position:fixed; inset:0; z-index:50; display:flex; align-items:center;
428
+ justify-content:center; padding:20px; background:rgba(30,24,12,.45); }
429
+ .shepherd-modal {
430
+ width:100%; max-width:440px; display:flex; flex-direction:column; gap:12px;
431
+ padding:22px; background:var(--card); border:1px solid var(--line);
432
+ border-radius:12px; box-shadow:0 16px 48px rgba(50,40,20,.28); }
433
+ .shepherd-modal h3 {
434
+ margin:0; font-size:13px; font-weight:600; letter-spacing:.04em;
435
+ text-transform:uppercase; color:var(--ink2); }
436
+ .shepherd-modal__body { margin:0; font-size:13.5px; line-height:1.5; color:var(--ink); }
437
+ .shepherd-modal__label { font-size:12.5px; color:var(--ink2); }
438
+ .shepherd-modal input {
439
+ width:100%; padding:9px 12px; border-radius:8px; border:1px solid var(--line);
440
+ background:var(--bg); color:var(--ink); font:inherit;
441
+ transition:border-color .12s ease, box-shadow .12s ease; }
442
+ .shepherd-modal input:focus {
443
+ outline:none; border-color:var(--terr); box-shadow:0 0 0 3px rgba(122,106,72,.14); }
444
+ .shepherd-modal [role="alert"] { margin:0; font-size:13px; color:var(--drop); }
445
+ .shepherd-modal__actions { display:flex; justify-content:flex-end; gap:10px; margin-top:4px; }
446
+ .shepherd-modal__actions button.danger {
447
+ border-color:var(--drop); background:transparent; color:var(--drop); }
448
+ .shepherd-modal__actions button.danger:hover:not(:disabled) {
449
+ background:var(--drop); color:var(--bg); }
450
+ .shepherd-modal__actions button:disabled { opacity:.55; cursor:default; }
package/dist/preview.js CHANGED
@@ -19,9 +19,9 @@ const EMPTY_LANDSCAPE = {
19
19
  };
20
20
  const EMPTY_ANNOUNCE = { ok: true, announcementIds: [] };
21
21
  let members = [
22
- { accountId: "acc_admin", displayName: "Korso Admin", githubLogin: "korso-admin", avatarUrl: null, role: "admin" },
23
- { accountId: "acc_1", displayName: "Alex Rivera", githubLogin: "arivera", avatarUrl: null, role: "member" },
24
- { accountId: "acc_2", displayName: "Sam Okafor", githubLogin: "sokafor", avatarUrl: null, role: "member" },
22
+ { accountId: "acc_admin", displayName: "Korso Admin", githubLogin: "korso-admin", email: null, avatarUrl: null, role: "admin" },
23
+ { accountId: "acc_1", displayName: "Alex Rivera", githubLogin: "arivera", email: null, avatarUrl: null, role: "member" },
24
+ { accountId: "acc_2", displayName: "Sam Okafor", githubLogin: "sokafor", email: null, avatarUrl: null, role: "member" },
25
25
  ];
26
26
  let tokens = [
27
27
  {
@@ -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 = [