@danxbot/ui 20.2.0 → 20.3.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
@@ -26950,7 +26950,7 @@ function iu({ term: e, children: t, mono: n, className: r }) {
26950
26950
  ),
26951
26951
  children: [
26952
26952
  /* @__PURE__ */ u("dt", { className: "truncate text-xs font-medium text-tertiary", children: e }),
26953
- /* @__PURE__ */ u("dd", { className: B("min-w-0 text-sm text-primary", n && "break-words font-mono text-2xs"), children: t })
26953
+ /* @__PURE__ */ u("dd", { className: B("min-w-0 break-words text-sm text-primary", n && "font-mono text-2xs"), children: t })
26954
26954
  ]
26955
26955
  }
26956
26956
  );
@@ -50877,19 +50877,19 @@ function U9({
50877
50877
  }) {
50878
50878
  if (n === void 0 || e.roleId === void 0)
50879
50879
  return /* @__PURE__ */ u(dt, { tone: "neutral", children: e.roleLabel });
50880
- const r = new Set(n.ownPermissionKeys), o = n.roles.map((s) => {
50881
- const i = NT(s, r, n.permissions);
50882
- return { value: s.id, label: s.label, tone: "neutral", ...i === null ? {} : { refusal: i } };
50880
+ const r = new Set(n.ownPermissionKeys), s = (typeof n.roles == "function" ? n.roles(e) : n.roles).map((i) => {
50881
+ const a = NT(i, r, n.permissions);
50882
+ return { value: i.id, label: i.label, tone: "neutral", ...a === null ? {} : { refusal: a } };
50883
50883
  });
50884
- return o.some((s) => s.value === e.roleId) || o.unshift({ value: e.roleId, label: e.roleLabel, tone: "neutral", refusal: "This role is not one you can assign here." }), /* @__PURE__ */ u(
50884
+ return s.some((i) => i.value === e.roleId) || s.unshift({ value: e.roleId, label: e.roleLabel, tone: "neutral", refusal: "This role is not one you can assign here." }), /* @__PURE__ */ u(
50885
50885
  zI,
50886
50886
  {
50887
50887
  value: e.roleId,
50888
- options: o,
50888
+ options: s,
50889
50889
  "aria-label": `Role of ${e.name}`,
50890
50890
  disabled: t,
50891
- onValueChange: (s) => {
50892
- s !== e.roleId && n.onChange(e.id, s);
50891
+ onValueChange: (i) => {
50892
+ i !== e.roleId && n.onChange(e.id, i);
50893
50893
  }
50894
50894
  }
50895
50895
  );