quirk-ui 0.0.183 → 0.0.185

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,37 +1,37 @@
1
- import { jsx as a, jsxs as r } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
2
  import { CallToAction as $ } from "../CallToAction/index.js";
3
- import { ButtonGroup as x } from "../ButtonGroup/index.js";
4
- import '../../assets/index35.css';const T = "_footer_5udop_1", k = "_container_5udop_8", j = "_primaryNav_5udop_17", E = "_secondaryNav_5udop_26", I = "_details_5udop_44", L = "_nav_5udop_51", w = "_logo_5udop_59", z = "_socialItems_5udop_65", A = "_group_5udop_72", B = "_groups_5udop_80", C = "_groupTitle_5udop_90", F = "_sublinks_5udop_95", G = "_link_5udop_99", P = "_bottom_5udop_119", o = {
5
- footer: T,
3
+ import { ButtonGroup as T } from "../ButtonGroup/index.js";
4
+ import '../../assets/index35.css';const x = "_footer_5udop_1", k = "_container_5udop_8", A = "_primaryNav_5udop_17", L = "_secondaryNav_5udop_26", S = "_details_5udop_44", j = "_nav_5udop_51", E = "_logo_5udop_59", I = "_socialItems_5udop_65", w = "_group_5udop_72", z = "_groups_5udop_80", B = "_groupTitle_5udop_90", C = "_sublinks_5udop_95", F = "_link_5udop_99", G = "_bottom_5udop_119", a = {
5
+ footer: x,
6
6
  container: k,
7
- primaryNav: j,
8
- secondaryNav: E,
9
- details: I,
10
- nav: L,
11
- logo: w,
12
- socialItems: z,
13
- group: A,
14
- groups: B,
15
- groupTitle: C,
16
- sublinks: F,
17
- link: G,
18
- bottom: P
7
+ primaryNav: A,
8
+ secondaryNav: L,
9
+ details: S,
10
+ nav: j,
11
+ logo: E,
12
+ socialItems: I,
13
+ group: w,
14
+ groups: z,
15
+ groupTitle: B,
16
+ sublinks: C,
17
+ link: F,
18
+ bottom: G
19
19
  };
20
20
  function D({
21
21
  // title,
22
22
  logo: c,
23
- items: N,
24
- primaryInfo: i,
23
+ items: b,
24
+ primaryInfo: t,
25
25
  secondaryInfo: d,
26
- utilityItems: u,
27
- socialItems: _,
26
+ utilityItems: p,
27
+ socialItems: u,
28
28
  // alignment = "right",
29
- copyright: p,
30
- className: b
29
+ copyright: _,
30
+ className: N
31
31
  }) {
32
- const n = (s, l = "", f = !1) => s.map((e) => {
32
+ const l = (o, n = "", g = !1) => o.map((e) => {
33
33
  var h;
34
- const m = `${l}/${e.label}`, v = (h = e.sublinks) == null ? void 0 : h.length, t = !!e.href, g = t ? "a" : "div", y = t ? {
34
+ const m = `${n}/${e.label}`, v = (h = e.sublinks) == null ? void 0 : h.length, i = !!e.href, f = i ? "a" : "div", y = i ? {
35
35
  href: e.href,
36
36
  target: e.isExternal ? "_blank" : "_self",
37
37
  rel: e.isExternal ? "noopener noreferrer" : void 0,
@@ -41,53 +41,57 @@ function D({
41
41
  role: "menuitem",
42
42
  "aria-label": e.label
43
43
  };
44
- return /* @__PURE__ */ r("div", { className: `${o.group}`, children: [
45
- /* @__PURE__ */ r(
46
- g,
44
+ return /* @__PURE__ */ s("div", { className: `${a.group}`, children: [
45
+ /* @__PURE__ */ s(
46
+ f,
47
47
  {
48
- className: `${t ? o.link : ""} ${v ? o.groupTitle : ""}`,
48
+ className: `${i ? a.link : ""} ${v ? a.groupTitle : ""}`,
49
49
  ...y,
50
50
  children: [
51
- !f && e.label,
51
+ !g && e.label,
52
52
  e.icon && e.icon
53
53
  ]
54
54
  }
55
55
  ),
56
- v && /* @__PURE__ */ a(
56
+ v && /* @__PURE__ */ r(
57
57
  "div",
58
58
  {
59
- className: `${o.sublinks}`,
59
+ className: `${a.sublinks}`,
60
60
  role: "menu",
61
61
  "aria-label": `${e.label} submenu`,
62
- children: n(e.sublinks, m)
62
+ children: l(e.sublinks, m)
63
63
  }
64
64
  )
65
65
  ] }, m);
66
66
  });
67
- return /* @__PURE__ */ a("footer", { className: `${b ?? ""} ${o.footer}`, children: /* @__PURE__ */ r("div", { className: o.container, children: [
68
- /* @__PURE__ */ r("div", { className: o.primaryNav, children: [
69
- /* @__PURE__ */ r("div", { className: o.details, children: [
70
- c && /* @__PURE__ */ r("div", { className: o.logo, children: [
67
+ return /* @__PURE__ */ r("footer", { className: `${N ?? ""} ${a.footer}`, children: /* @__PURE__ */ s("div", { className: a.container, children: [
68
+ /* @__PURE__ */ s("div", { className: a.primaryNav, children: [
69
+ /* @__PURE__ */ s("div", { className: a.details, children: [
70
+ c && /* @__PURE__ */ s("div", { className: a.logo, children: [
71
71
  " ",
72
72
  c
73
73
  ] }),
74
- _ && /* @__PURE__ */ a("div", { className: o.socialItems, children: n(_, "", !0) }),
75
- i && /* @__PURE__ */ a("div", { className: o.primaryInfo, children: i }),
76
- d && /* @__PURE__ */ a("div", { className: o.secondaryInfo, children: d })
74
+ u && /* @__PURE__ */ r("div", { className: a.socialItems, children: l(u, "", !0) }),
75
+ t && /* @__PURE__ */ r("div", { className: a.primaryInfo, children: t }),
76
+ d && /* @__PURE__ */ r("div", { className: a.secondaryInfo, children: d })
77
77
  ] }),
78
- /* @__PURE__ */ a("nav", { className: o.nav, id: "footer-menu", role: "menubar", children: /* @__PURE__ */ a("div", { className: o.groups, children: n(N, "", !1) }) })
78
+ /* @__PURE__ */ r("nav", { className: a.nav, id: "footer-menu", role: "menubar", children: /* @__PURE__ */ r("div", { className: a.groups, children: l(b, "", !1) }) })
79
79
  ] }),
80
- /* @__PURE__ */ r("div", { className: o.secondaryNav, children: [
81
- p && /* @__PURE__ */ a("div", { className: o.bottom, children: /* @__PURE__ */ a("span", { children: p }) }),
82
- u && /* @__PURE__ */ a("nav", { className: o.utility, children: /* @__PURE__ */ a(x, { orientation: "horizontal", children: u.map((s, l) => /* @__PURE__ */ a(
80
+ /* @__PURE__ */ s("div", { className: a.secondaryNav, children: [
81
+ _ && /* @__PURE__ */ r("div", { className: a.bottom, children: /* @__PURE__ */ r("span", { children: _ }) }),
82
+ p && /* @__PURE__ */ r("nav", { className: a.utility, children: /* @__PURE__ */ r(T, { orientation: "horizontal", children: p.map((o, n) => /* @__PURE__ */ r(
83
83
  $,
84
84
  {
85
85
  as: "a",
86
- href: s.href ?? "/",
87
- variant: s.variant,
88
- children: s.label
86
+ href: o.href ?? "/",
87
+ variant: o.variant ?? "primary",
88
+ displayType: o.displayType ?? "text",
89
+ imageSrc: o.imageSrc,
90
+ imageAlt: o.imageAlt,
91
+ "aria-label": o.ariaLabel ?? o.label,
92
+ children: o.displayType === "image" ? null : o.label
89
93
  },
90
- s._key || l
94
+ o._key || n
91
95
  )) }) })
92
96
  ] })
93
97
  ] }) });
@@ -9,8 +9,12 @@ type Alignment = keyof typeof alignmentClassMap;
9
9
  export type UtilityItem = {
10
10
  _key?: string;
11
11
  label: string;
12
+ ariaLabel: string;
12
13
  href?: string;
13
- variant: ButtonVariant;
14
+ variant?: ButtonVariant;
15
+ displayType?: "text" | "image";
16
+ imageSrc?: string;
17
+ imageAlt?: string;
14
18
  };
15
19
  export type NavItem = {
16
20
  _key?: string;
@@ -28,6 +28,7 @@ export type NavItem = {
28
28
  sublinks?: NavItem[];
29
29
  isExternal?: boolean;
30
30
  onClick?: () => void;
31
+ icon?: React.ReactNode;
31
32
  };
32
33
  type NavbarProps = {
33
34
  title?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.183",
4
+ "version": "0.0.185",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {