@dmsi/wedgekit-react 2.1.2 → 3.0.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.
@@ -7,11 +7,10 @@ export type LinkProps = AsProps & TextAttributes & TypographyProps & {
7
7
  disabled?: boolean;
8
8
  paddedY?: boolean;
9
9
  onClick?: (event: MouseEvent<HTMLElement>) => void;
10
- underline?: boolean;
11
10
  id?: string;
12
11
  testid?: string;
13
12
  block?: boolean;
14
13
  addOverflow?: boolean;
15
14
  };
16
- export declare function Link({ as, className, variant, typographyStyle, disabled, color, paddedY, align, underline, testid, active, block, addOverflow, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Link({ as, className, variant, typographyStyle, disabled, color, paddedY, align, testid, active, block, addOverflow, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
17
16
  //# sourceMappingURL=Link.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/components/Link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGpE,MAAM,MAAM,SAAS,GAAG,OAAO,GAC7B,cAAc,GACd,eAAe,GAAG;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC/C,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,YAAY,CAAC;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ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ACb,WAAW,EACX,GAAG,KAAK,EACT,EAAE,SAAS,2CAmFX"}
@@ -1,34 +1,33 @@
1
- import { jsx as C } from "react/jsx-runtime";
1
+ import { jsx as j } from "react/jsx-runtime";
2
2
  import { clsx as r } from "../node_modules/clsx/dist/clsx.js";
3
- import { baseTransition as D, typography as l, componentPaddingY as I } from "../classNames.js";
4
- function T({
5
- as: s = "a",
6
- className: x,
3
+ import { baseTransition as Y, typography as l, componentPaddingY as C } from "../classNames.js";
4
+ function N({
5
+ as: x = "a",
6
+ className: s,
7
7
  variant: i = "primary",
8
8
  typographyStyle: o = "paragraph",
9
9
  disabled: t = !1,
10
10
  color: n,
11
11
  paddedY: p,
12
12
  align: e,
13
- underline: d = !1,
14
- testid: f,
13
+ testid: m,
15
14
  active: c,
16
- block: m = !1,
17
- addOverflow: u,
15
+ block: d = !1,
16
+ addOverflow: f,
18
17
  ...a
19
18
  }) {
20
- const y = s, v = i === "primary" && !t && r(
19
+ const v = x, y = i === "primary" && !t && r(
21
20
  c ? "text-text-link-active" : "text-text-link-normal",
22
21
  "hover:text-text-link-hover active:text-text-link-active"
23
22
  ), h = i === "secondary" && !t && r(
24
23
  c ? "text-text-link-active" : "text-text-primary-normal",
25
24
  "hover:text-text-link-hover active:text-text-link-active"
26
- ), S = i === "critical" && !t && r(
25
+ ), u = i === "critical" && !t && r(
27
26
  c ? "text-text-action-critical-active" : "text-text-action-critical-normal",
28
27
  "hover:text-text-action-critical-hover active:text-text-action-critical-active"
29
- ), k = t && i === "critical" && r("text-text-action-critical-disabled"), w = t && ["primary", "secondary"].includes(i) && r("text-text-link-disabled"), g = t && r("pointer-events-none cursor-default"), j = d ? "decoration-current" : "decoration-decoration-underline", Y = p && I;
30
- return /* @__PURE__ */ C(
31
- y,
28
+ ), S = t && i === "critical" && r("text-text-action-critical-disabled"), k = t && ["primary", "secondary"].includes(i) && r("text-text-link-disabled"), w = t && r("pointer-events-none cursor-default"), g = p && C;
29
+ return /* @__PURE__ */ j(
30
+ v,
32
31
  {
33
32
  className: r(
34
33
  "inline",
@@ -40,23 +39,23 @@ function T({
40
39
  (!e || e === "center") && "items-center",
41
40
  e === "left" && "items-start",
42
41
  e === "right" && "items-end",
43
- D,
44
- v,
42
+ Y,
43
+ y,
45
44
  h,
45
+ u,
46
46
  S,
47
47
  k,
48
48
  w,
49
- g,
50
- j,
49
+ "decoration-decoration-underline",
51
50
  o === "caption" && l.caption,
52
51
  o === "paragraph" && l.paragraph,
53
52
  e === "left" && "text-left",
54
53
  e === "center" && "text-center",
55
54
  e === "right" && "text-right",
56
- Y,
57
- u && "whitespace-nowrap text-ellipsis overflow-hidden",
58
- x,
59
- m ? "w-full" : "w-fit"
55
+ g,
56
+ f && "whitespace-nowrap text-ellipsis overflow-hidden",
57
+ s,
58
+ d ? "w-full" : "w-fit"
60
59
  ),
61
60
  ...a,
62
61
  style: {
@@ -65,10 +64,10 @@ function T({
65
64
  },
66
65
  "aria-disabled": t,
67
66
  tabIndex: t ? -1 : void 0,
68
- "data-testid": f
67
+ "data-testid": m
69
68
  }
70
69
  );
71
70
  }
72
71
  export {
73
- T as Link
72
+ N as Link
74
73
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ModalButtons.d.ts","sourceRoot":"","sources":["../../src/components/ModalButtons.tsx"],"names":[],"mappings":"AAKA,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,UAAU,EACV,aAAa,EACb,EAAE,EACF,MAAM,EACN,iBAAyB,GAC1B,EAAE,iBAAiB,2CAwCnB"}
1
+ {"version":3,"file":"ModalButtons.d.ts","sourceRoot":"","sources":["../../src/components/ModalButtons.tsx"],"names":[],"mappings":"AAKA,KAAK,iBAAiB,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,UAAU,EACV,aAAa,EACb,EAAE,EACF,MAAM,EACN,iBAAyB,GAC1B,EAAE,iBAAiB,2CAyCnB"}
@@ -1,50 +1,51 @@
1
- import { jsx as e, jsxs as m, Fragment as s } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as m, Fragment as s } from "react/jsx-runtime";
2
2
  import { clsx as u } from "../node_modules/clsx/dist/clsx.js";
3
- import { Button as r } from "./Button.js";
4
- import { Icon as l } from "./Icon.js";
3
+ import { Button as e } from "./Button.js";
4
+ import { Icon as r } from "./Icon.js";
5
5
  import { layoutPaddding as d, layoutGroupGap as f } from "../classNames.js";
6
6
  function y({
7
- onClose: a,
8
- onContinue: i,
9
- customActions: t,
7
+ onClose: l,
8
+ onContinue: a,
9
+ customActions: i,
10
10
  id: o,
11
11
  testid: n,
12
12
  mobileButtonStack: c = !1
13
13
  }) {
14
- return /* @__PURE__ */ e(
14
+ return /* @__PURE__ */ t(
15
15
  "div",
16
16
  {
17
17
  id: o,
18
18
  "data-testid": n,
19
19
  className: u(
20
- "border-t border-neutral-300 flex",
21
- !t && "justify-end",
20
+ "border-t border-neutral-300 flex justify-end",
21
+ // Don't make this conditional on customActions — a w-full custom
22
+ // footer (see CustomFooterContent story) fills the row regardless.
22
23
  c && "flex-col",
23
24
  d,
24
25
  f
25
26
  ),
26
- children: t ?? /* @__PURE__ */ m(s, { children: [
27
- /* @__PURE__ */ e(
28
- r,
27
+ children: i ?? /* @__PURE__ */ m(s, { children: [
28
+ /* @__PURE__ */ t(
29
+ e,
29
30
  {
30
31
  id: o ? `${o}-close-button` : void 0,
31
32
  testid: n ? `${n}-close-button` : void 0,
32
33
  variant: "secondary",
33
- leftIcon: /* @__PURE__ */ e(l, { name: "close", size: 24 }),
34
- onClick: a,
34
+ leftIcon: /* @__PURE__ */ t(r, { name: "close", size: 24 }),
35
+ onClick: l,
35
36
  className: "max-sm:w-full",
36
37
  children: "Close"
37
38
  }
38
39
  ),
39
- /* @__PURE__ */ e(
40
- r,
40
+ /* @__PURE__ */ t(
41
+ e,
41
42
  {
42
43
  id: o ? `${o}-continue-button` : void 0,
43
44
  testid: n ? `${n}-continue-button` : void 0,
44
45
  variant: "primary",
45
- leftIcon: /* @__PURE__ */ e(l, { name: "check", size: 24 }),
46
+ leftIcon: /* @__PURE__ */ t(r, { name: "check", size: 24 }),
46
47
  className: "max-sm:w-full",
47
- onClick: i,
48
+ onClick: a,
48
49
  children: "Continue"
49
50
  }
50
51
  )
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { usePdf as p } from "../../node_modules/@mikecousins/react-pdf/dist/index.js";
2
+ import { usePdf as p } from "@mikecousins/react-pdf";
3
3
  import { useRef as c } from "react";
4
4
  import { Spinner as s } from "../Spinner.js";
5
5
  import { Stack as f } from "../Stack.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { usePdf as a } from "../../node_modules/@mikecousins/react-pdf/dist/index.js";
2
+ import { usePdf as a } from "@mikecousins/react-pdf";
3
3
  import { useRef as i } from "react";
4
4
  function p({
5
5
  file: t,