@danxbot/ui 20.7.0 → 20.8.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.
package/dist/index.js CHANGED
@@ -50203,9 +50203,13 @@ const h7 = [
50203
50203
  { value: "simulated", label: "Simulated" },
50204
50204
  { value: "live", label: "Live" }
50205
50205
  ];
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(
50206
+ function fJ({
50207
+ onOpenUseCaseLedger: e,
50208
+ showSimControls: t = !0,
50209
+ iconOnly: n = !1
50210
+ } = {}) {
50211
+ 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);
50212
+ return r ? /* @__PURE__ */ u(
50209
50213
  mn,
50210
50214
  {
50211
50215
  align: "end",
@@ -50214,11 +50218,12 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50214
50218
  Je,
50215
50219
  {
50216
50220
  size: "sm",
50217
- variant: a ? "subtle" : "outline",
50221
+ variant: c ? "subtle" : "outline",
50222
+ iconOnly: n,
50218
50223
  "aria-label": "Developer tools",
50219
50224
  children: [
50220
- /* @__PURE__ */ u(ae, { name: "eye", size: "sm" }),
50221
- /* @__PURE__ */ u("span", { className: "hidden sm:inline", children: "Dev tools" })
50225
+ /* @__PURE__ */ u(ae, { name: "wrench", size: "sm" }),
50226
+ !n && /* @__PURE__ */ u("span", { className: "hidden sm:inline", children: "Dev tools" })
50222
50227
  ]
50223
50228
  }
50224
50229
  ),
@@ -50230,13 +50235,13 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50230
50235
  {
50231
50236
  "aria-label": "View the app as a role",
50232
50237
  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))
50238
+ value: s,
50239
+ onValueChange: (g) => i(g ?? null),
50240
+ children: o.map((g) => /* @__PURE__ */ u(Hn, { value: g.id, children: g.label }, g.id))
50236
50241
  }
50237
50242
  )
50238
50243
  ] }),
50239
- a && /* @__PURE__ */ R(
50244
+ c && /* @__PURE__ */ R(
50240
50245
  "div",
50241
50246
  {
50242
50247
  role: "status",
@@ -50246,7 +50251,7 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50246
50251
  /* @__PURE__ */ R("p", { className: "text-xs text-warning-text", children: [
50247
50252
  "Viewing as",
50248
50253
  " ",
50249
- /* @__PURE__ */ u("strong", { className: "font-semibold", children: i?.label ?? "an unknown role" }),
50254
+ /* @__PURE__ */ u("strong", { className: "font-semibold", children: a?.label ?? "an unknown role" }),
50250
50255
  ". Screens and permissions reflect that role, not your own."
50251
50256
  ] })
50252
50257
  ]
@@ -50257,8 +50262,8 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50257
50262
  {
50258
50263
  variant: "outline",
50259
50264
  size: "sm",
50260
- disabled: !a,
50261
- onClick: () => s(null),
50265
+ disabled: !c,
50266
+ onClick: () => i(null),
50262
50267
  children: [
50263
50268
  /* @__PURE__ */ u(ae, { name: "rotate-ccw", size: "sm" }),
50264
50269
  "Reset to actual"
@@ -50272,12 +50277,12 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50272
50277
  pr,
50273
50278
  {
50274
50279
  "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))
50280
+ value: d,
50281
+ onValueChange: (g) => Z0({ dataSource: g }),
50282
+ children: m7.map((g) => /* @__PURE__ */ u(Hn, { value: g.value, children: g.label }, g.value))
50278
50283
  }
50279
50284
  ),
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." })
50285
+ 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
50286
  ] }),
50282
50287
  /* @__PURE__ */ R("div", { className: "flex flex-col gap-2 border-t border-border-subtle pt-4", children: [
50283
50288
  /* @__PURE__ */ u("span", { className: "text-2xs font-semibold tracking-widest text-tertiary uppercase", children: "Network speed" }),
@@ -50285,9 +50290,9 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50285
50290
  pr,
50286
50291
  {
50287
50292
  "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))
50293
+ value: l,
50294
+ onValueChange: (g) => Z0({ networkSpeed: g }),
50295
+ children: h7.map((g) => /* @__PURE__ */ u(Hn, { value: g.value, children: g.label }, g.value))
50291
50296
  }
50292
50297
  )
50293
50298
  ] }),
@@ -50298,15 +50303,15 @@ function fJ({ onOpenUseCaseLedger: e, showSimControls: t = !0 } = {}) {
50298
50303
  /* @__PURE__ */ u(ae, { name: "refresh-cw", size: "sm" }),
50299
50304
  "Regenerate demo data"
50300
50305
  ] }),
50301
- open: d,
50302
- onOpenChange: p,
50306
+ open: p,
50307
+ onOpenChange: f,
50303
50308
  title: "Regenerate demo data?",
50304
50309
  description: "Every user, team, role and permission reverts to its seed. The use-case ledger is untouched — this never erases product history.",
50305
50310
  confirmLabel: "Regenerate",
50306
- loading: f,
50311
+ loading: h,
50307
50312
  onConfirm: () => {
50308
- h(!0), i7("demo").finally(() => {
50309
- h(!1), p(!1);
50313
+ m(!0), i7("demo").finally(() => {
50314
+ m(!1), f(!1);
50310
50315
  });
50311
50316
  }
50312
50317
  }