@danxbot/ui 3.9.0 → 3.9.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
@@ -6812,6 +6812,33 @@ const uw = vt({
6812
6812
  The size never moves either: the label stays in the layout at opacity 0
6813
6813
  with the spinner absolutely positioned over it. */
6814
6814
  "disabled:not-data-loading:opacity-45",
6815
+ /* THE SOFT FORM OF OFF HAS TO DIM TOO, and until now only the native one
6816
+ did. `aria-disabled` is this library's stance for a control that must
6817
+ stay hoverable so it can explain itself (`IconButton.disabledReason`) —
6818
+ and it is ALSO what a control becomes when it is not asking to: Base UI
6819
+ deletes the native `disabled` attribute off a composite item that renders
6820
+ another button (`useButton`: "the `disabled` prop needs to pass through 2
6821
+ `useButton`s then finally delete the `disabled` attribute from DOM").
6822
+
6823
+ MEASURED, because the form matters and the obvious reading of it is
6824
+ wrong. `<ToolbarButton render={<Button disabled/>}/>` — disabled on the
6825
+ INNER button — keeps `disabled=true` and dims as it always did. It is
6826
+ `disabled` on the TOOLBAR ITEM that gets deleted: both
6827
+ `<ToolbarButton disabled render={<Button/>}/>` and a plain
6828
+ `<ToolbarButton disabled>` come out `disabled=false`,
6829
+ `aria-disabled="true"`, `data-disabled=""` — full opacity, pointer
6830
+ cursor, no-op click. A control that looks armed and does nothing is the
6831
+ worst of the three states, and it was reported by a consumer who kept a
6832
+ hand-rolled action bar rather than accept it.
6833
+
6834
+ So the look is keyed to BOTH forms. Not `pointer-events-none` though:
6835
+ that is exactly what makes a natively-disabled control unhoverable and
6836
+ its tooltip unreachable, and reaching it is the entire reason the soft
6837
+ form exists. The click is already inert — `Button` treats `aria-disabled`
6838
+ as disabled for the ripple, Base UI no-ops the handler — so what was
6839
+ missing was only the two lines that SAY so. */
6840
+ "aria-disabled:not-data-loading:opacity-45",
6841
+ "aria-disabled:cursor-not-allowed aria-disabled:active:translate-y-0",
6815
6842
  "data-loading:pointer-events-none data-loading:cursor-wait"
6816
6843
  ],
6817
6844
  variants: {
@@ -28844,6 +28871,7 @@ function n_({
28844
28871
  {
28845
28872
  type: "button",
28846
28873
  onClick: d ? void 0 : () => n(u.value),
28874
+ "aria-label": u.label,
28847
28875
  "aria-disabled": d || void 0,
28848
28876
  "aria-describedby": d ? p : void 0,
28849
28877
  className: j(
@@ -30807,8 +30835,8 @@ function i6({ className: e }) {
30807
30835
  );
30808
30836
  }
30809
30837
  function a6({
30810
- variant: e = "ghost",
30811
- size: t = "sm",
30838
+ variant: e,
30839
+ size: t,
30812
30840
  iconOnly: n,
30813
30841
  className: r,
30814
30842
  children: o,
@@ -30819,7 +30847,10 @@ function a6({
30819
30847
  JS,
30820
30848
  {
30821
30849
  ref: s,
30822
- className: j(uw({ variant: e, size: t, iconOnly: n }), r),
30850
+ className: i.render === void 0 ? j(
30851
+ uw({ variant: e ?? "ghost", size: t ?? "sm", iconOnly: n }),
30852
+ r
30853
+ ) : r,
30823
30854
  ...i,
30824
30855
  children: o
30825
30856
  }
@@ -47222,6 +47253,7 @@ export {
47222
47253
  Yy as AmbiguousTimeError,
47223
47254
  _H as AppShell,
47224
47255
  LE as Attachment,
47256
+ By as AttachmentAction,
47225
47257
  zE as AttachmentList,
47226
47258
  u3 as AttachmentPreview,
47227
47259
  tc as Avatar,