@danxbot/ui 20.7.1 → 20.8.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/dist/index.js CHANGED
@@ -17967,6 +17967,8 @@ const zS = pt({
17967
17967
  or description never runs underneath it — see the close button's own
17968
17968
  comment below for why it sits OUTSIDE this row instead of inside it. */
17969
17969
  header: "flex items-start gap-4 px-6 pr-12 pt-6",
17970
+ /* Pinned to the popup's corner (see the close button's own comment). */
17971
+ close: "absolute top-4 right-4",
17970
17972
  title: "font-display text-lg font-semibold text-primary text-balance",
17971
17973
  description: "mt-1.5 text-sm text-secondary text-pretty",
17972
17974
  /* The body scrolls, not the panel, so the header and footer stay put on a
@@ -18003,7 +18005,11 @@ const zS = pt({
18003
18005
  title turned into a column of two-letter lines. */
18004
18006
  title: "text-base truncate",
18005
18007
  description: "truncate",
18006
- body: "flex flex-col overflow-hidden p-0"
18008
+ body: "flex flex-col overflow-hidden p-0",
18009
+ /* DX-4533 — the bar is `pt-3` and its controls are `xs` (DX-4398), so the
18010
+ close button takes the same `xs` size at the same `top-3`: it lines up
18011
+ with the bar instead of sitting 8px below it at the default corner. */
18012
+ close: "top-3"
18007
18013
  }
18008
18014
  }
18009
18015
  },
@@ -18070,8 +18076,9 @@ function vs({
18070
18076
  {
18071
18077
  label: "Close",
18072
18078
  hideTooltip: !0,
18073
- icon: /* @__PURE__ */ u(ae, { name: "x", size: "sm" }),
18074
- className: "absolute top-4 right-4"
18079
+ size: c === "full" ? "xs" : "sm",
18080
+ icon: /* @__PURE__ */ u(ae, { name: "x", size: c === "full" ? "xs" : "sm" }),
18081
+ className: f.close()
18075
18082
  }
18076
18083
  )
18077
18084
  }
@@ -50203,9 +50210,13 @@ const h7 = [
50203
50210
  { value: "simulated", label: "Simulated" },
50204
50211
  { value: "live", label: "Live" }
50205
50212
  ];
50206
- function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50207
- const { canAccessDevTools: n, roles: r, viewingAsRoleId: o, setViewingAsRoleId: s, effectiveRole: i, isImpersonating: a } = Ps(), { networkSpeed: c, dataSource: l } = f7(), [d, p] = ne(!1), [f, h] = ne(!1);
50208
- return n ? /* @__PURE__ */ u(
50213
+ function fJ({
50214
+ onOpenUseCaseLedger: e,
50215
+ showSimControls: t = !0,
50216
+ iconOnly: n = !1
50217
+ } = {}) {
50218
+ const { canAccessDevTools: r, roles: o, viewingAsRoleId: s, setViewingAsRoleId: i, effectiveRole: a, isImpersonating: c } = Ps(), { networkSpeed: l, dataSource: d } = f7(), [p, f] = ne(!1), [h, m] = ne(!1);
50219
+ return r ? /* @__PURE__ */ u(
50209
50220
  mn,
50210
50221
  {
50211
50222
  align: "end",
@@ -50214,11 +50225,12 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50214
50225
  Je,
50215
50226
  {
50216
50227
  size: "sm",
50217
- variant: a ? "subtle" : "outline",
50228
+ variant: c ? "subtle" : "outline",
50229
+ iconOnly: n,
50218
50230
  "aria-label": "Developer tools",
50219
50231
  children: [
50220
- /* @__PURE__ */ u(ae, { name: "eye", size: "sm" }),
50221
- /* @__PURE__ */ u("span", { className: "hidden sm:inline", children: "Dev tools" })
50232
+ /* @__PURE__ */ u(ae, { name: "wrench", size: "sm" }),
50233
+ !n && /* @__PURE__ */ u("span", { className: "hidden sm:inline", children: "Dev tools" })
50222
50234
  ]
50223
50235
  }
50224
50236
  ),
@@ -50230,13 +50242,13 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50230
50242
  {
50231
50243
  "aria-label": "View the app as a role",
50232
50244
  placeholder: "Your actual role",
50233
- value: o,
50234
- onValueChange: (m) => s(m ?? null),
50235
- children: r.map((m) => /* @__PURE__ */ u(Hn, { value: m.id, children: m.label }, m.id))
50245
+ value: s,
50246
+ onValueChange: (g) => i(g ?? null),
50247
+ children: o.map((g) => /* @__PURE__ */ u(Hn, { value: g.id, children: g.label }, g.id))
50236
50248
  }
50237
50249
  )
50238
50250
  ] }),
50239
- a && /* @__PURE__ */ R(
50251
+ c && /* @__PURE__ */ R(
50240
50252
  "div",
50241
50253
  {
50242
50254
  role: "status",
@@ -50246,7 +50258,7 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50246
50258
  /* @__PURE__ */ R("p", { className: "text-xs text-warning-text", children: [
50247
50259
  "Viewing as",
50248
50260
  " ",
50249
- /* @__PURE__ */ u("strong", { className: "font-semibold", children: i?.label ?? "an unknown role" }),
50261
+ /* @__PURE__ */ u("strong", { className: "font-semibold", children: a?.label ?? "an unknown role" }),
50250
50262
  ". Screens and permissions reflect that role, not your own."
50251
50263
  ] })
50252
50264
  ]
@@ -50257,8 +50269,8 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50257
50269
  {
50258
50270
  variant: "outline",
50259
50271
  size: "sm",
50260
- disabled: !a,
50261
- onClick: () => s(null),
50272
+ disabled: !c,
50273
+ onClick: () => i(null),
50262
50274
  children: [
50263
50275
  /* @__PURE__ */ u(ae, { name: "rotate-ccw", size: "sm" }),
50264
50276
  "Reset to actual"
@@ -50272,12 +50284,12 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50272
50284
  pr,
50273
50285
  {
50274
50286
  "aria-label": "Data source",
50275
- value: l,
50276
- onValueChange: (m) => Z0({ dataSource: m }),
50277
- children: m7.map((m) => /* @__PURE__ */ u(Hn, { value: m.value, children: m.label }, m.value))
50287
+ value: d,
50288
+ onValueChange: (g) => Z0({ dataSource: g }),
50289
+ children: m7.map((g) => /* @__PURE__ */ u(Hn, { value: g.value, children: g.label }, g.value))
50278
50290
  }
50279
50291
  ),
50280
- l === "live" && /* @__PURE__ */ u("p", { className: "text-2xs text-tertiary", children: "No live backend is configured in this demo — stores keep answering with simulated data. A consuming app wires its own fetcher per store to make this real." })
50292
+ d === "live" && /* @__PURE__ */ u("p", { className: "text-2xs text-tertiary", children: "No live backend is configured in this demo — stores keep answering with simulated data. A consuming app wires its own fetcher per store to make this real." })
50281
50293
  ] }),
50282
50294
  /* @__PURE__ */ R("div", { className: "flex flex-col gap-2 border-t border-border-subtle pt-4", children: [
50283
50295
  /* @__PURE__ */ u("span", { className: "text-2xs font-semibold tracking-widest text-tertiary uppercase", children: "Network speed" }),
@@ -50285,9 +50297,9 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50285
50297
  pr,
50286
50298
  {
50287
50299
  "aria-label": "Network speed",
50288
- value: c,
50289
- onValueChange: (m) => Z0({ networkSpeed: m }),
50290
- children: h7.map((m) => /* @__PURE__ */ u(Hn, { value: m.value, children: m.label }, m.value))
50300
+ value: l,
50301
+ onValueChange: (g) => Z0({ networkSpeed: g }),
50302
+ children: h7.map((g) => /* @__PURE__ */ u(Hn, { value: g.value, children: g.label }, g.value))
50291
50303
  }
50292
50304
  )
50293
50305
  ] }),
@@ -50298,15 +50310,15 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50298
50310
  /* @__PURE__ */ u(ae, { name: "refresh-cw", size: "sm" }),
50299
50311
  "Regenerate demo data"
50300
50312
  ] }),
50301
- open: d,
50302
- onOpenChange: p,
50313
+ open: p,
50314
+ onOpenChange: f,
50303
50315
  title: "Regenerate demo data?",
50304
50316
  description: "Every user, team, role and permission reverts to its seed. The use-case ledger is untouched — this never erases product history.",
50305
50317
  confirmLabel: "Regenerate",
50306
- loading: f,
50318
+ loading: h,
50307
50319
  onConfirm: () => {
50308
- h(!0), i7("demo").finally(() => {
50309
- h(!1), p(!1);
50320
+ m(!0), i7("demo").finally(() => {
50321
+ m(!1), f(!1);
50310
50322
  });
50311
50323
  }
50312
50324
  }