quirk-ui 0.0.181 → 0.0.182

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.
@@ -1,21 +1,21 @@
1
- import { jsx as e, jsxs as v } from "react/jsx-runtime";
2
- import '../../assets/index14.css';const I = "_callToAction_zqf7g_1", g = "_blurred_zqf7g_26", y = "_primary_zqf7g_27", p = "_secondary_zqf7g_28", m = "_primaryInverted_zqf7g_29", q = "_secondaryInverted_zqf7g_30", z = "_blurredInverted_zqf7g_32", b = "_link_zqf7g_39", h = "_linkInverted_zqf7g_40", k = "_underline_zqf7g_41", $ = "_underlineInverted_zqf7g_42", A = "_content_zqf7g_52", T = "_icon_zqf7g_177", x = "_iconLeft_zqf7g_193", R = "_iconRight_zqf7g_197", n = {
3
- callToAction: I,
4
- blurred: g,
5
- primary: y,
6
- secondary: p,
7
- primaryInverted: m,
8
- secondaryInverted: q,
9
- blurredInverted: z,
10
- link: b,
11
- linkInverted: h,
12
- underline: k,
13
- underlineInverted: $,
14
- content: A,
15
- icon: T,
16
- iconLeft: x,
17
- iconRight: R
18
- }, l = {
1
+ import { jsx as e, jsxs as y } from "react/jsx-runtime";
2
+ import '../../assets/index14.css';const m = "_callToAction_zqf7g_1", p = "_blurred_zqf7g_26", q = "_primary_zqf7g_27", z = "_secondary_zqf7g_28", b = "_primaryInverted_zqf7g_29", h = "_secondaryInverted_zqf7g_30", k = "_blurredInverted_zqf7g_32", $ = "_link_zqf7g_39", A = "_linkInverted_zqf7g_40", x = "_underline_zqf7g_41", T = "_underlineInverted_zqf7g_42", R = "_content_zqf7g_52", L = "_icon_zqf7g_177", N = "_iconLeft_zqf7g_193", C = "_iconRight_zqf7g_197", n = {
3
+ callToAction: m,
4
+ blurred: p,
5
+ primary: q,
6
+ secondary: z,
7
+ primaryInverted: b,
8
+ secondaryInverted: h,
9
+ blurredInverted: k,
10
+ link: $,
11
+ linkInverted: A,
12
+ underline: x,
13
+ underlineInverted: T,
14
+ content: R,
15
+ icon: L,
16
+ iconLeft: N,
17
+ iconRight: C
18
+ }, s = {
19
19
  primary: n.primary,
20
20
  primaryInverted: n.primaryInverted,
21
21
  secondary: n.secondary,
@@ -26,48 +26,51 @@ import '../../assets/index14.css';const I = "_callToAction_zqf7g_1", g = "_blurr
26
26
  underlineInverted: n.underlineInverted,
27
27
  blurred: n.blurred,
28
28
  blurredInverted: n.blurredInverted
29
- }, L = {
29
+ }, j = {
30
30
  left: n.iconLeft,
31
31
  right: n.iconRight
32
32
  };
33
- function E({
33
+ function B({
34
34
  variant: t = "primary",
35
- icon: o,
36
- iconAlignemnt: s = "right",
37
- useRouter: C = !1,
38
- className: c,
39
- children: a,
40
- disabled: _ = !1,
35
+ displayType: a = "text",
36
+ imageSrc: o,
37
+ imageAlt: _ = "",
38
+ icon: c,
39
+ iconAlignemnt: f = "right",
40
+ useRouter: E = !1,
41
+ className: i,
42
+ children: u,
43
+ disabled: v = !1,
41
44
  ...r
42
45
  }) {
43
- const i = /* @__PURE__ */ v("span", { className: `${n.content} ${L[s]}`, children: [
44
- /* @__PURE__ */ e("span", { children: a }),
45
- o && /* @__PURE__ */ e("span", { className: n.icon, children: o })
46
+ const l = a === "image" && o ? /* @__PURE__ */ e("img", { src: o, alt: _, className: n.image }) : /* @__PURE__ */ y("span", { className: `${n.content} ${j[f]}`, children: [
47
+ /* @__PURE__ */ e("span", { children: u }),
48
+ c && /* @__PURE__ */ e("span", { className: n.icon, children: c })
46
49
  ] });
47
50
  if (r.as == "a") {
48
- const { href: f, target: d, ...u } = r;
51
+ const { href: g, target: d, ...I } = r;
49
52
  return /* @__PURE__ */ e(
50
53
  "a",
51
54
  {
52
- href: f,
55
+ href: g,
53
56
  target: d,
54
57
  rel: d === "_blank" ? "noopener noreferrer" : void 0,
55
- className: `${c ?? ""} ${n.callToAction} ${l[t]}`,
56
- ...u,
57
- children: i
58
+ className: `${i ?? ""} ${n.callToAction} ${s[t]}`,
59
+ ...I,
60
+ children: l
58
61
  }
59
62
  );
60
63
  }
61
64
  return /* @__PURE__ */ e(
62
65
  "button",
63
66
  {
64
- className: `${c ?? ""} ${n.callToAction} ${l[t]}`,
65
- disabled: _,
67
+ className: `${i ?? ""} ${n.callToAction} ${s[t]}`,
68
+ disabled: v,
66
69
  ...r,
67
- children: i
70
+ children: l
68
71
  }
69
72
  );
70
73
  }
71
74
  export {
72
- E as CallToAction
75
+ B as CallToAction
73
76
  };
@@ -19,6 +19,9 @@ declare const iconAlignClassMap: {
19
19
  type IconAlignment = keyof typeof iconAlignClassMap;
20
20
  type BaseProps = {
21
21
  variant: Variant;
22
+ displayType?: "text" | "image";
23
+ imageSrc?: string;
24
+ imageAlt?: string;
22
25
  icon?: React.ReactNode;
23
26
  iconAlignemnt?: IconAlignment;
24
27
  useRouter?: boolean;
@@ -35,5 +38,5 @@ type ButtonProps = {
35
38
  as: "button";
36
39
  } & React.ButtonHTMLAttributes<HTMLButtonElement>;
37
40
  export type CallToActionProps = BaseProps & (AnchorProps | ButtonProps);
38
- export declare function CallToAction({ variant, icon, iconAlignemnt, useRouter, className, children, disabled, ...restProps }: CallToActionProps): import("react/jsx-runtime").JSX.Element;
41
+ export declare function CallToAction({ variant, displayType, imageSrc, imageAlt, icon, iconAlignemnt, useRouter, className, children, disabled, ...restProps }: CallToActionProps): import("react/jsx-runtime").JSX.Element;
39
42
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.181",
4
+ "version": "0.0.182",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {