@pibit.ai/cure-design-system 0.6.17 → 0.6.19

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.
Files changed (38) hide show
  1. package/dist/index.d.ts +9 -4
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +236 -226
  4. package/dist/patterns/alert/alert.d.ts +39 -0
  5. package/dist/patterns/alert/alert.d.ts.map +1 -0
  6. package/dist/patterns/alert/alert.js +80 -0
  7. package/dist/patterns/alert/index.d.ts +2 -0
  8. package/dist/patterns/alert/index.d.ts.map +1 -0
  9. package/dist/patterns/breadcrumbs/breadcrumb-item.d.ts +16 -0
  10. package/dist/patterns/breadcrumbs/breadcrumb-item.d.ts.map +1 -0
  11. package/dist/patterns/breadcrumbs/breadcrumb-item.js +120 -0
  12. package/dist/patterns/breadcrumbs/breadcrumbs.d.ts +20 -0
  13. package/dist/patterns/breadcrumbs/breadcrumbs.d.ts.map +1 -0
  14. package/dist/patterns/breadcrumbs/breadcrumbs.js +41 -0
  15. package/dist/patterns/breadcrumbs/context.d.ts +6 -0
  16. package/dist/patterns/breadcrumbs/context.d.ts.map +1 -0
  17. package/dist/patterns/breadcrumbs/context.js +8 -0
  18. package/dist/patterns/breadcrumbs/index.d.ts +4 -0
  19. package/dist/patterns/breadcrumbs/index.d.ts.map +1 -0
  20. package/dist/patterns/page-header/index.d.ts +2 -0
  21. package/dist/patterns/page-header/index.d.ts.map +1 -0
  22. package/dist/patterns/page-header/page-header.d.ts +18 -0
  23. package/dist/patterns/page-header/page-header.d.ts.map +1 -0
  24. package/dist/patterns/page-header/page-header.js +52 -0
  25. package/dist/patterns/sub-sidebar/index.d.ts +3 -0
  26. package/dist/patterns/sub-sidebar/index.d.ts.map +1 -0
  27. package/dist/patterns/sub-sidebar/sub-sidebar.d.ts +16 -0
  28. package/dist/patterns/sub-sidebar/sub-sidebar.d.ts.map +1 -0
  29. package/dist/patterns/sub-sidebar/sub-sidebar.js +283 -0
  30. package/dist/patterns/sub-sidebar/types.d.ts +47 -0
  31. package/dist/patterns/sub-sidebar/types.d.ts.map +1 -0
  32. package/dist/primitives/close-button/close-button.d.ts +8 -0
  33. package/dist/primitives/close-button/close-button.d.ts.map +1 -0
  34. package/dist/primitives/close-button/close-button.js +29 -0
  35. package/dist/primitives/close-button/index.d.ts +2 -0
  36. package/dist/primitives/close-button/index.d.ts.map +1 -0
  37. package/dist/styles/components.css +1 -1
  38. package/package.json +1 -1
@@ -0,0 +1,39 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface AlertFloatingProps {
3
+ /**
4
+ * The title of the alert.
5
+ */
6
+ title: string;
7
+ /**
8
+ * The description of the alert.
9
+ */
10
+ description?: ReactNode;
11
+ /**
12
+ * The label for the confirm button.
13
+ */
14
+ confirmLabel?: string;
15
+ /**
16
+ * The label for the dismiss button.
17
+ * @default "Dismiss"
18
+ */
19
+ dismissLabel?: string;
20
+ /**
21
+ * The color of the alert.
22
+ * @default "default"
23
+ */
24
+ color?: "default" | "brand" | "gray" | "error" | "warning" | "success" | "info" | "notice";
25
+ /**
26
+ * The function to call when the dismiss button is clicked.
27
+ */
28
+ onClose?: () => void;
29
+ /**
30
+ * The function to call when the confirm button is clicked.
31
+ */
32
+ onConfirm?: () => void;
33
+ icon?: FC<{
34
+ className?: string;
35
+ }> | ReactNode;
36
+ className?: string;
37
+ }
38
+ export declare const AlertFloating: ({ title, description, confirmLabel, onClose, onConfirm, color, dismissLabel, icon, className, }: AlertFloatingProps) => import("react/jsx-runtime").JSX.Element;
39
+ //# sourceMappingURL=alert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/patterns/alert/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA+C3C,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC3F;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,GAAI,iGAU3B,kBAAkB,4CA+CpB,CAAC"}
@@ -0,0 +1,80 @@
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import { isValidElement as g } from "react";
3
+ import { InfoCircle as l, CheckCircle as u, AlertCircle as o } from "@untitledui/icons";
4
+ import { cx as b } from "../../utils/cn.js";
5
+ import { FeaturedIcon as p } from "../../primitives/featured-icon/featured-icon.js";
6
+ import { Button as d } from "../../primitives/button/button.js";
7
+ import { CloseButton as y } from "../../primitives/close-button/close-button.js";
8
+ const h = {
9
+ default: l,
10
+ info: l,
11
+ brand: l,
12
+ gray: l,
13
+ error: o,
14
+ warning: o,
15
+ success: u,
16
+ notice: l
17
+ }, v = {
18
+ default: "bg-blue-50",
19
+ info: "bg-blue-50",
20
+ brand: "bg-indigo-50",
21
+ gray: "bg-gray-50",
22
+ error: "bg-red-50",
23
+ warning: "bg-yellow-50",
24
+ success: "bg-green-50",
25
+ notice: "bg-[var(--color-gray-950)]"
26
+ }, w = {
27
+ default: "text-blue-800",
28
+ info: "text-blue-800",
29
+ brand: "text-indigo-800",
30
+ gray: "text-gray-800",
31
+ error: "text-red-800",
32
+ warning: "text-yellow-800",
33
+ success: "text-green-800",
34
+ notice: "text-[#F7F7F7]"
35
+ }, A = ({
36
+ title: f,
37
+ description: s,
38
+ confirmLabel: m,
39
+ onClose: r,
40
+ onConfirm: n,
41
+ color: e = "default",
42
+ dismissLabel: c = "",
43
+ icon: a = null,
44
+ className: x = ""
45
+ }) => /* @__PURE__ */ i(
46
+ "div",
47
+ {
48
+ className: b(
49
+ `${e ? v[e] : "bg-blue-50"} flex flex-col justify-between items-center gap-4 rounded-xl border border-primary p-2.5 shadow-xs md:flex-row`,
50
+ x
51
+ ),
52
+ children: [
53
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-4", children: [
54
+ g(a) ? /* @__PURE__ */ t("div", { className: "flex items-center justify-center", children: a }) : /* @__PURE__ */ t(
55
+ p,
56
+ {
57
+ icon: a || h[e],
58
+ color: e === "default" || e === "info" ? "gray" : e === "notice" ? "brand" : e,
59
+ theme: e === "default" || e === "info" ? "modern" : "outline",
60
+ size: "sm"
61
+ }
62
+ ),
63
+ /* @__PURE__ */ t("div", { className: "flex justify-center items-center flex-1 flex-col", children: /* @__PURE__ */ i("div", { className: "flex items-center justify-center flex-col gap-1 overflow-auto", children: [
64
+ /* @__PURE__ */ t("p", { className: `${w[e]} pr-8 text-sm font-semibold md:pr-0`, children: f }),
65
+ s && /* @__PURE__ */ t("p", { className: "text-sm text-tertiary", children: s })
66
+ ] }) })
67
+ ] }),
68
+ /* @__PURE__ */ i("div", { className: "flex items-center justify-center gap-2", children: [
69
+ (n || r) && /* @__PURE__ */ i("div", { className: "flex gap-3", children: [
70
+ r && /* @__PURE__ */ t(d, { size: "xs", onClick: r, color: "link-gray", children: c }),
71
+ n && /* @__PURE__ */ t(d, { onClick: n, size: "xs", color: "link-color", children: m })
72
+ ] }),
73
+ r && /* @__PURE__ */ t(y, { onClick: r, size: "xs", label: c })
74
+ ] })
75
+ ]
76
+ }
77
+ );
78
+ export {
79
+ A as AlertFloating
80
+ };
@@ -0,0 +1,2 @@
1
+ export { AlertFloating, type AlertFloatingProps } from './alert';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { BreadcrumbProps as AriaBreadcrumbProps } from 'react-aria-components';
3
+ import { BreadcrumbType } from './context';
4
+ export interface BreadcrumbItemProps extends AriaBreadcrumbProps {
5
+ href?: string;
6
+ divider?: "chevron" | "slash";
7
+ type?: BreadcrumbType;
8
+ isEllipsis?: boolean;
9
+ children?: ReactNode;
10
+ icon?: FC<{
11
+ className?: string;
12
+ }> | ReactNode;
13
+ onClick?: () => void;
14
+ }
15
+ export declare const BreadcrumbItem: ({ href, icon, divider, type, isEllipsis, children, onClick, ...otherProps }: BreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=breadcrumb-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumb-item.d.ts","sourceRoot":"","sources":["../../../src/patterns/breadcrumbs/breadcrumb-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAA8B,MAAM,OAAO,CAAC;AAE5E,OAAO,EAEL,KAAK,eAAe,IAAI,mBAAmB,EAE5C,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,WAAW,CAAC;AAkFpE,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,GAAI,6EAS5B,mBAAmB,4CAqDrB,CAAC"}
@@ -0,0 +1,120 @@
1
+ import { jsx as e, jsxs as p, Fragment as f } from "react/jsx-runtime";
2
+ import { useContext as g, isValidElement as v } from "react";
3
+ import { SlashDivider as d, ChevronRight as b } from "@untitledui/icons";
4
+ import { Breadcrumb as y, Link as _ } from "react-aria-components";
5
+ import { cx as l } from "../../utils/cn.js";
6
+ import { isReactComponent as q } from "../../utils/is-react-component.js";
7
+ import { BreadcrumbsContext as N } from "./context.js";
8
+ const o = {
9
+ text: {
10
+ root: "",
11
+ icon: "text-fg-quaternary group-hover:text-fg-quaternary_hover",
12
+ label: "text-quaternary group-hover:text-tertiary_hover max-w-40",
13
+ current: {
14
+ root: "",
15
+ icon: "text-primary group-hover:text-primary_hover",
16
+ label: "text-primary group-hover:text-primary_hover"
17
+ }
18
+ },
19
+ button: {
20
+ root: "p-1 hover:bg-primary_hover",
21
+ icon: "text-fg-quaternary group-hover:text-fg-quaternary_hover",
22
+ label: "px-1 text-quaternary group-hover:text-tertiary_hover",
23
+ current: {
24
+ root: "bg-primary_hover",
25
+ icon: "text-fg-quaternary_hover",
26
+ label: "text-fg-tertiary_hover"
27
+ }
28
+ }
29
+ }, h = ({
30
+ href: a,
31
+ children: s,
32
+ icon: t,
33
+ type: r = "text",
34
+ current: i,
35
+ className: m,
36
+ ...n
37
+ }) => /* @__PURE__ */ p(
38
+ a ? _ : "button",
39
+ {
40
+ ...n,
41
+ href: a,
42
+ className: l(
43
+ "group inline-flex cursor-pointer items-center justify-center gap-1 rounded-md outline-focus-ring transition duration-100 ease-linear focus-visible:outline-2 focus-visible:outline-offset-2 in-current:max-w-full",
44
+ o[r].root,
45
+ i && o[r].current.root,
46
+ !a && !n.onClick && "cursor-default",
47
+ m
48
+ ),
49
+ children: [
50
+ q(t) && /* @__PURE__ */ e(
51
+ t,
52
+ {
53
+ className: l(
54
+ "size-5 transition-inherit-all",
55
+ o[r].icon,
56
+ i && o[r].current.icon
57
+ )
58
+ }
59
+ ),
60
+ v(t) && t,
61
+ s && /* @__PURE__ */ e(
62
+ "span",
63
+ {
64
+ className: l(
65
+ "text-sm font-medium whitespace-nowrap transition-inherit-all in-current:truncate",
66
+ o[r].label,
67
+ i && o[r].current.label
68
+ ),
69
+ children: s
70
+ }
71
+ )
72
+ ]
73
+ }
74
+ ), R = ({
75
+ href: a,
76
+ icon: s,
77
+ divider: t,
78
+ type: r,
79
+ isEllipsis: i,
80
+ children: m,
81
+ onClick: n,
82
+ ...c
83
+ }) => {
84
+ const u = g(N);
85
+ return r = u.type || "text", t = u.divider || "chevron", /* @__PURE__ */ e(
86
+ y,
87
+ {
88
+ ...c,
89
+ className: l(
90
+ "flex items-center current:overflow-hidden",
91
+ "gap-0.5 md:gap-0.5"
92
+ ),
93
+ children: ({ isCurrent: x }) => /* @__PURE__ */ p(f, { children: [
94
+ i ? /* @__PURE__ */ e(
95
+ h,
96
+ {
97
+ "aria-label": "See all breadcrumb items",
98
+ type: r === "text-line" ? "text" : r,
99
+ onClick: n,
100
+ children: "..."
101
+ }
102
+ ) : /* @__PURE__ */ e(
103
+ h,
104
+ {
105
+ href: a,
106
+ icon: s,
107
+ current: x,
108
+ type: r === "text-line" ? "text" : r,
109
+ onClick: n,
110
+ children: m
111
+ }
112
+ ),
113
+ !x && /* @__PURE__ */ e("div", { className: "shrink-0 text-fg-quaternary", children: t === "slash" ? /* @__PURE__ */ e(d, { className: "size-2.5 stroke-3" }) : /* @__PURE__ */ e(b, { className: "size-4" }) })
114
+ ] })
115
+ }
116
+ );
117
+ };
118
+ export {
119
+ R as BreadcrumbItem
120
+ };
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ import { BreadcrumbType } from './context';
3
+ export interface BreadcrumbsProps {
4
+ divider?: "chevron" | "slash";
5
+ children: ReactNode;
6
+ type?: BreadcrumbType;
7
+ className?: string;
8
+ /**
9
+ * The maximum number of visible items. If the number of items
10
+ * exceeds this value, the breadcrumbs will collapse into a single
11
+ * item with an ellipsis that can be expanded.
12
+ */
13
+ maxVisibleItems?: number;
14
+ }
15
+ declare const Breadcrumbs: {
16
+ ({ children, divider, type, className, maxVisibleItems, }: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
17
+ Item: ({ href, icon, divider, type, isEllipsis, children, onClick, ...otherProps }: import('./breadcrumb-item').BreadcrumbItemProps) => import("react/jsx-runtime").JSX.Element;
18
+ };
19
+ export { Breadcrumbs };
20
+ //# sourceMappingURL=breadcrumbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/patterns/breadcrumbs/breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAIxD,OAAO,EAAE,KAAK,cAAc,EAAsB,MAAM,WAAW,CAAC;AAQpE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AASD,QAAA,MAAM,WAAW;+DAMd,gBAAgB;;CAwClB,CAAC;AAIF,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import b, { useState as h } from "react";
3
+ import { Breadcrumbs as g } from "react-aria-components";
4
+ import { cx as o } from "../../utils/cn.js";
5
+ import { BreadcrumbItem as n } from "./breadcrumb-item.js";
6
+ import { BreadcrumbsContext as x } from "./context.js";
7
+ const B = {
8
+ text: "gap-0.5 md:gap-0.5",
9
+ "text-line": "pl-2 gap-1.25 md:gap-1.25 py-2 after:pointer-events-none after:absolute after:inset-0 after:border-b after:border-t after:border-secondary",
10
+ button: "gap-0.5 md:gap-0.5"
11
+ }, v = ({
12
+ children: l,
13
+ divider: a = "slash",
14
+ type: s = "text",
15
+ className: c,
16
+ maxVisibleItems: r = 4
17
+ }) => {
18
+ const [i, m] = h(!1), d = (() => {
19
+ const e = b.Children.toArray(l);
20
+ if (!r || e.length <= r || i)
21
+ return e;
22
+ const p = e.slice(0, Math.ceil(r / 2)), f = e.slice(
23
+ -Math.floor((r - 1) / 2)
24
+ ), u = /* @__PURE__ */ t(
25
+ n,
26
+ {
27
+ isEllipsis: !0,
28
+ divider: a,
29
+ type: s,
30
+ onClick: () => m(!0)
31
+ },
32
+ "ellipsis"
33
+ );
34
+ return [...p, u, ...f];
35
+ })();
36
+ return /* @__PURE__ */ t("nav", { "aria-label": "Breadcrumbs", className: o("min-w-0", c), children: /* @__PURE__ */ t(x.Provider, { value: { divider: a, type: s }, children: /* @__PURE__ */ t(g, { className: o("relative flex", B[s]), children: d }) }) });
37
+ };
38
+ v.Item = n;
39
+ export {
40
+ v as Breadcrumbs
41
+ };
@@ -0,0 +1,6 @@
1
+ export type BreadcrumbType = "text" | "text-line" | "button";
2
+ export declare const BreadcrumbsContext: import('react').Context<{
3
+ divider: "chevron" | "slash";
4
+ type: BreadcrumbType;
5
+ }>;
6
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/patterns/breadcrumbs/context.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE7D,eAAO,MAAM,kBAAkB;aACpB,SAAS,GAAG,OAAO;UACtB,cAAc;EAIpB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { createContext as t } from "react";
2
+ const r = t({
3
+ divider: "slash",
4
+ type: "text"
5
+ });
6
+ export {
7
+ r as BreadcrumbsContext
8
+ };
@@ -0,0 +1,4 @@
1
+ export { Breadcrumbs, type BreadcrumbsProps } from './breadcrumbs';
2
+ export type { BreadcrumbItemProps } from './breadcrumb-item';
3
+ export type { BreadcrumbType } from './context';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/breadcrumbs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { PageHeader, type PageHeaderProps, type PageHeaderBreadcrumb, } from './page-header';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B,MAAM,eAAe,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ export interface PageHeaderBreadcrumb {
3
+ label: ReactNode;
4
+ href?: string;
5
+ onClick?: () => void;
6
+ }
7
+ export interface PageHeaderProps {
8
+ /** The trail, root first. One crumb renders as the page title, in a taller header. */
9
+ breadcrumbs?: PageHeaderBreadcrumb[];
10
+ /** Shows a two-segment shimmer in place of the crumbs. */
11
+ breadcrumbsLoading?: boolean;
12
+ /** Right-hand side, e.g. a notifications button and the account menu. */
13
+ actions?: ReactNode;
14
+ className?: string;
15
+ children?: ReactNode;
16
+ }
17
+ export declare function PageHeader({ breadcrumbs, breadcrumbsLoading, actions, className, children, }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=page-header.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../../src/patterns/page-header/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYvC,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,sFAAsF;IACtF,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,0DAA0D;IAC1D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,yEAAyE;IACzE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,EACzB,WAAgB,EAChB,kBAAkB,EAClB,OAAO,EACP,SAAS,EACT,QAAQ,GACT,EAAE,eAAe,2CAmDjB"}
@@ -0,0 +1,52 @@
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
+ import { cx as s } from "../../utils/cn.js";
3
+ import { ShimmerLine as n } from "../../primitives/shimmer/shimmer.js";
4
+ import { Breadcrumbs as m } from "../breadcrumbs/breadcrumbs.js";
5
+ function w({
6
+ breadcrumbs: t = [],
7
+ breadcrumbsLoading: c,
8
+ actions: h,
9
+ className: x,
10
+ children: d
11
+ }) {
12
+ const i = t.length === 1;
13
+ return /* @__PURE__ */ a(
14
+ "header",
15
+ {
16
+ className: s(
17
+ "flex items-center justify-between mx-6 relative z-50",
18
+ i ? "mt-6 py-2" : "py-1.5",
19
+ x
20
+ ),
21
+ children: [
22
+ /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: c ? /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", "aria-hidden": !0, children: [
23
+ /* @__PURE__ */ e(n, { width: "56px", height: "14px", className: "rounded" }),
24
+ /* @__PURE__ */ e("span", { className: "text-tertiary text-xs", children: "/" }),
25
+ /* @__PURE__ */ e(n, { width: "120px", height: "14px", className: "rounded" })
26
+ ] }) : t.length > 0 ? /* @__PURE__ */ e(m, { children: t.map((l, r) => /* @__PURE__ */ e(
27
+ m.Item,
28
+ {
29
+ href: l.href,
30
+ onClick: l.onClick,
31
+ children: /* @__PURE__ */ e(
32
+ "span",
33
+ {
34
+ className: s(
35
+ "whitespace-nowrap overflow-hidden text-ellipsis w-full block",
36
+ r === t.length - 1 ? i ? "text-lg font-semibold text-primary" : "text-xs" : "text-tertiary text-xs"
37
+ ),
38
+ children: l.label
39
+ }
40
+ )
41
+ },
42
+ r
43
+ )) }) : null }),
44
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-3.5 ml-4", children: h }),
45
+ d
46
+ ]
47
+ }
48
+ );
49
+ }
50
+ export {
51
+ w as PageHeader
52
+ };
@@ -0,0 +1,3 @@
1
+ export { SubSidebar, type SubSidebarProps } from './sub-sidebar';
2
+ export type { SubSidebarConfig, SubSidebarSection, SubSidebarItem, SubSidebarChildItem, SubSidebarLinkProps, SubSidebarGuard, } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/patterns/sub-sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACjE,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ import { SubSidebarConfig, SubSidebarGuard, SubSidebarLinkProps } from './types';
3
+ export interface SubSidebarProps {
4
+ config: SubSidebarConfig;
5
+ /** The current location's path, e.g. `useLocation().pathname`. */
6
+ currentPath: string;
7
+ isCollapsed: boolean;
8
+ onCollapsedChange: (collapsed: boolean) => void;
9
+ /** Renders each link. Default: a plain `<a href>`. */
10
+ renderLink?: (props: SubSidebarLinkProps) => ReactNode;
11
+ /** Permission check for sections, items and child links. Default: everything renders. */
12
+ guard?: SubSidebarGuard;
13
+ className?: string;
14
+ }
15
+ export declare const SubSidebar: ({ config, currentPath, isCollapsed, onCollapsedChange, renderLink, guard, className, }: SubSidebarProps) => import("react/jsx-runtime").JSX.Element;
16
+ //# sourceMappingURL=sub-sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sub-sidebar.d.ts","sourceRoot":"","sources":["../../../src/patterns/sub-sidebar/sub-sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EAEf,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAajB,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,sDAAsD;IACtD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,SAAS,CAAC;IACvD,yFAAyF;IACzF,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAcD,eAAO,MAAM,UAAU,GAAI,wFAQxB,eAAe,4CA8YjB,CAAC"}