@middag-io/react 0.44.0 → 0.44.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.
@@ -5,7 +5,7 @@ import { setAppearance as x } from "../theme/appearance.js";
5
5
  import { Toaster as S } from "../../primitives/reui/sonner.js";
6
6
  import { renderLabel as C } from "../../i18n/render-label.js";
7
7
  import { useTranslation as w } from "../../i18n/useTranslation.js";
8
- import { t as T } from "../../chunks/subpath-D0ykpYEG.js";
8
+ import { t as T } from "../../chunks/subpath-q4Q2zg_p.js";
9
9
  import { useSyncExternalStore as E } from "react";
10
10
  import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
11
11
  import { Link as A, usePage as j } from "@inertiajs/react";
@@ -1 +1 @@
1
- {"version":3,"file":"PageActionButton.d.ts","sourceRoot":"","sources":["../../../../src/base/shell/partials/PageActionButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAKjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAgB5D,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GAAG,YAAY,CAkJjF"}
1
+ {"version":3,"file":"PageActionButton.d.ts","sourceRoot":"","sources":["../../../../src/base/shell/partials/PageActionButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAKjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAgB5D,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GAAG,YAAY,CA8IjF"}
@@ -1,4 +1,4 @@
1
1
  import "../../../i18n/render-label.js";
2
2
  import "../../../i18n/useTranslation.js";
3
- import { t as e } from "../../../chunks/subpath-D0ykpYEG.js";
3
+ import { t as e } from "../../../chunks/subpath-q4Q2zg_p.js";
4
4
  export { e as PageActionButton };
@@ -101,13 +101,11 @@ function S({ action: t }) {
101
101
  }, [t, E]), A = f(() => {
102
102
  o(!1), y(!1), r || i(!1);
103
103
  }, [r]), j = s(t.label, n);
104
- return w && S.url && !D && !t.loading ? /* @__PURE__ */ h(e, {
104
+ return w && S.url && !D && !t.loading && !t.disabled ? /* @__PURE__ */ h(e, {
105
105
  "data-testid": u(t.id),
106
106
  variant: C,
107
107
  size: "sm",
108
108
  asChild: !0,
109
- disabled: t.disabled,
110
- "aria-disabled": t.disabled,
111
109
  children: /* @__PURE__ */ h(_, {
112
110
  href: S.url,
113
111
  children: j
@@ -117,6 +115,7 @@ function S({ action: t }) {
117
115
  variant: C,
118
116
  size: "sm",
119
117
  onClick: O,
118
+ "data-locked": t.disabled ? "true" : void 0,
120
119
  disabled: t.disabled || T,
121
120
  "aria-disabled": t.disabled || T,
122
121
  children: [T && /* @__PURE__ */ g("svg", {
@@ -25300,13 +25300,11 @@ function tY({ action: e }) {
25300
25300
  }, [e, f]), _ = H(() => {
25301
25301
  a(!1), s(!1), n || r(!1);
25302
25302
  }, [n]), v = L(e.label, t);
25303
- return u && c.url && !p && !e.loading ? /* @__PURE__ */ K(vt, {
25303
+ return u && c.url && !p && !e.loading && !e.disabled ? /* @__PURE__ */ K(vt, {
25304
25304
  "data-testid": m(e.id),
25305
25305
  variant: l,
25306
25306
  size: "sm",
25307
25307
  asChild: !0,
25308
- disabled: e.disabled,
25309
- "aria-disabled": e.disabled,
25310
25308
  children: /* @__PURE__ */ K(Zr, {
25311
25309
  href: c.url,
25312
25310
  children: v
@@ -25316,6 +25314,7 @@ function tY({ action: e }) {
25316
25314
  variant: l,
25317
25315
  size: "sm",
25318
25316
  onClick: h,
25317
+ "data-locked": e.disabled ? "true" : void 0,
25319
25318
  disabled: e.disabled || d,
25320
25319
  "aria-disabled": e.disabled || d,
25321
25320
  children: [d && /* @__PURE__ */ q("svg", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middag-io/react",
3
- "version": "0.44.0",
3
+ "version": "0.44.1",
4
4
  "type": "module",
5
5
  "description": "MIDDAG shared React UI library for Moodle, WordPress and other Inertia hosts",
6
6
  "license": "Apache-2.0",