trepur_components 2.3.41 → 2.3.42

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.
@@ -4,9 +4,11 @@ import { StoryObj } from '@storybook/react';
4
4
  declare const meta: {
5
5
  title: string;
6
6
  component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLUListElement> & import('.').BreadcrumbsContextProps & import('react').RefAttributes<HTMLUListElement>> & {
7
- Item: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLLIElement> & import('react').RefAttributes<HTMLLIElement>>;
7
+ Item: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLLIElement> & {
8
+ children?: any;
9
+ } & import('react').RefAttributes<HTMLLIElement>>;
8
10
  Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLAnchorElement> & {
9
- href: string;
11
+ href?: string | undefined;
10
12
  } & import('react').RefAttributes<HTMLAnchorElement>>;
11
13
  };
12
14
  args: {
@@ -7,9 +7,11 @@ export interface BreadcrumbsItemContextProps {
7
7
  isLast?: boolean;
8
8
  }
9
9
  declare const Breadcrumbs: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & BreadcrumbsContextProps & import('react').RefAttributes<HTMLUListElement>> & {
10
- Item: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLLIElement> & import('react').RefAttributes<HTMLLIElement>>;
10
+ Item: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLLIElement> & {
11
+ children?: any;
12
+ } & import('react').RefAttributes<HTMLLIElement>>;
11
13
  Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLAnchorElement> & {
12
- href: string;
14
+ href?: string | undefined;
13
15
  } & import('react').RefAttributes<HTMLAnchorElement>>;
14
16
  };
15
17
  export { Breadcrumbs };
@@ -1,27 +1,28 @@
1
- import { jsx as s, jsxs as B } from "react/jsx-runtime";
2
- import { createContext as l, forwardRef as n, useMemo as m, useContext as d, Children as N } from "react";
3
- const u = l(null), i = l(null), p = n(({ children: e, ...r }, t) => {
4
- const a = m(
1
+ import { jsx as s, jsxs as L } from "react/jsx-runtime";
2
+ import { createContext as u, forwardRef as n, useMemo as d, useContext as i, Children as C } from "react";
3
+ const b = u(null), x = u(null), f = n(({ children: e, ...r }, t) => {
4
+ const a = d(
5
5
  () => ({
6
6
  allLinks: e
7
7
  }),
8
8
  [e]
9
9
  );
10
- return /* @__PURE__ */ s(u.Provider, { value: a, children: /* @__PURE__ */ s("ul", { ref: t, className: "flex gap-2", ...r, children: e }) });
11
- }), b = n(({ children: e, ...r }, t) => {
12
- const { allLinks: a } = d(u) || {}, c = 0 === N.toArray(a).length - 1, f = m(
10
+ return /* @__PURE__ */ s(b.Provider, { value: a, children: /* @__PURE__ */ s("ul", { ref: t, className: "flex gap-2", ...r, children: e }) });
11
+ }), B = n(({ children: e, ...r }, t) => {
12
+ var c, m, p;
13
+ const { allLinks: a } = i(b) || {}, o = C.toArray(a), l = ((c = e == null ? void 0 : e.props) == null ? void 0 : c.children) === ((p = (m = o[o.length - 1]) == null ? void 0 : m.props) == null ? void 0 : p.children.props.children), y = d(
13
14
  () => ({
14
- isLast: c
15
+ isLast: l
15
16
  }),
16
17
  [e]
17
18
  );
18
- return /* @__PURE__ */ s(i.Provider, { value: f, children: /* @__PURE__ */ B("li", { ref: t, className: "flex items-center gap-2", ...r, children: [
19
+ return /* @__PURE__ */ s(x.Provider, { value: y, children: /* @__PURE__ */ L("li", { ref: t, className: "flex items-center gap-2", ...r, children: [
19
20
  e,
20
- !c && /* @__PURE__ */ s("p", { children: "/" })
21
+ !l && /* @__PURE__ */ s("p", { children: "/" })
21
22
  ] }) });
22
- }), x = n(({ children: e, href: r, ...t }, a) => {
23
- const { isLast: o } = d(i) || {};
24
- return o ? /* @__PURE__ */ s("p", { className: "px-1 py-1 font-bold underline underline-offset-4", children: e }) : /* @__PURE__ */ s("p", { className: "px-1 py-1", children: /* @__PURE__ */ s(
23
+ }), N = n(({ children: e, href: r, ...t }, a) => {
24
+ const { isLast: o } = i(x) || {};
25
+ return o ? /* @__PURE__ */ s("p", { className: "px-1 py-1 font-bold underline underline-offset-4", children: e }) : r ? /* @__PURE__ */ s("p", { className: "px-1 py-1", children: /* @__PURE__ */ s(
25
26
  "a",
26
27
  {
27
28
  ref: a,
@@ -30,15 +31,15 @@ const u = l(null), i = l(null), p = n(({ children: e, ...r }, t) => {
30
31
  ...t,
31
32
  children: e
32
33
  }
33
- ) });
34
+ ) }) : /* @__PURE__ */ s("p", { className: "px-1 py-1", children: e });
34
35
  });
35
- p.displayName = "Breadcrumbs";
36
- b.displayName = "Breadcrumbs.Item";
37
- x.displayName = "Breadcrumbs.Label";
38
- const v = Object.assign(p, {
39
- Item: b,
40
- Label: x
36
+ f.displayName = "Breadcrumbs";
37
+ B.displayName = "Breadcrumbs.Item";
38
+ N.displayName = "Breadcrumbs.Label";
39
+ const I = Object.assign(f, {
40
+ Item: B,
41
+ Label: N
41
42
  });
42
43
  export {
43
- v as Breadcrumbs
44
+ I as Breadcrumbs
44
45
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trepur_components",
3
- "version": "2.3.41",
3
+ "version": "2.3.42",
4
4
  "description": "component lib",
5
5
  "author": "trepur_ttenneb",
6
6
  "private": false,