@almanaclabs/blaze-ui 0.13.0 → 0.15.0
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.
- package/dist/components/approval-card/approval-card.d.ts +8 -1
- package/dist/components/approval-card/approval-card.d.ts.map +1 -1
- package/dist/components/approval-card/approval-card.js +47 -34
- package/dist/components/button/button.d.ts +3 -2
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +17 -9
- package/dist/components/detail-list/detail-list.d.ts +25 -0
- package/dist/components/detail-list/detail-list.d.ts.map +1 -0
- package/dist/components/detail-list/detail-list.js +38 -0
- package/dist/components/detail-list/index.d.ts +2 -0
- package/dist/components/detail-list/index.d.ts.map +1 -0
- package/dist/components/filter-chips/filter-chips.d.ts +2 -0
- package/dist/components/filter-chips/filter-chips.d.ts.map +1 -1
- package/dist/components/filter-chips/filter-chips.js +10 -6
- package/dist/components/item/item.d.ts +1 -1
- package/dist/components/marker/marker.d.ts +1 -1
- package/dist/components/metric-tile/metric-tile.d.ts +4 -2
- package/dist/components/metric-tile/metric-tile.d.ts.map +1 -1
- package/dist/components/metric-tile/metric-tile.js +34 -32
- package/dist/components/platform-icon/index.d.ts +1 -0
- package/dist/components/platform-icon/index.d.ts.map +1 -1
- package/dist/components/platform-icon/letter-mark.d.ts +20 -0
- package/dist/components/platform-icon/letter-mark.d.ts.map +1 -0
- package/dist/components/platform-icon/letter-mark.js +34 -0
- package/dist/components/platform-icon/platform-icon.d.ts +8 -2
- package/dist/components/platform-icon/platform-icon.d.ts.map +1 -1
- package/dist/components/platform-icon/platform-icon.js +69 -45
- package/dist/components/rating/index.d.ts +2 -0
- package/dist/components/rating/index.d.ts.map +1 -0
- package/dist/components/rating/rating.d.ts +15 -0
- package/dist/components/rating/rating.d.ts.map +1 -0
- package/dist/components/rating/rating.js +27 -0
- package/dist/components/section-header/index.d.ts +2 -0
- package/dist/components/section-header/index.d.ts.map +1 -0
- package/dist/components/section-header/section-header.d.ts +20 -0
- package/dist/components/section-header/section-header.d.ts.map +1 -0
- package/dist/components/section-header/section-header.js +32 -0
- package/dist/components/sparkline/index.d.ts +2 -0
- package/dist/components/sparkline/index.d.ts.map +1 -0
- package/dist/components/sparkline/sparkline.d.ts +26 -0
- package/dist/components/sparkline/sparkline.d.ts.map +1 -0
- package/dist/components/sparkline/sparkline.js +74 -0
- package/dist/components/stacked-bar-chart/stacked-bar-chart.d.ts +6 -0
- package/dist/components/stacked-bar-chart/stacked-bar-chart.d.ts.map +1 -1
- package/dist/components/stacked-bar-chart/stacked-bar-chart.js +81 -54
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tag/index.d.ts +2 -0
- package/dist/components/tag/index.d.ts.map +1 -0
- package/dist/components/tag/tag.d.ts +25 -0
- package/dist/components/tag/tag.d.ts.map +1 -0
- package/dist/components/tag/tag.js +60 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47 -41
- package/package.json +1 -1
- package/src/styles/globals.css +11 -0
|
@@ -8,12 +8,19 @@ type ApprovalCardProps = Omit<React.ComponentProps<'article'>, 'title'> & {
|
|
|
8
8
|
description?: React.ReactNode;
|
|
9
9
|
/** The primary action at the right, usually a `Button`. */
|
|
10
10
|
action?: React.ReactNode;
|
|
11
|
+
/** A menu trigger after the action, such as a ⋯ `DropdownMenu` (ADR 0027). */
|
|
12
|
+
menu?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Full-width content under the header, such as the quoted draft being
|
|
15
|
+
* approved. With a body, the action sits at the top right.
|
|
16
|
+
*/
|
|
17
|
+
body?: React.ReactNode;
|
|
11
18
|
};
|
|
12
19
|
/**
|
|
13
20
|
* A request waiting for the owner, as in a "For your approval" list: an
|
|
14
21
|
* eyebrow, a title, one muted line, and the action at the right. `children`
|
|
15
22
|
* sit under the description, for a preview or extra detail.
|
|
16
23
|
*/
|
|
17
|
-
declare function ApprovalCard({ eyebrow, title, description, action, className, children, ...props }: ApprovalCardProps): React.JSX.Element;
|
|
24
|
+
declare function ApprovalCard({ eyebrow, title, description, action, menu, body, className, children, ...props }: ApprovalCardProps): React.JSX.Element;
|
|
18
25
|
export { ApprovalCard, type ApprovalCardProps };
|
|
19
26
|
//# sourceMappingURL=approval-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval-card.d.ts","sourceRoot":"","sources":["../../../src/components/approval-card/approval-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IACxE,wEAAwE;IACxE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,qCAAqC;IACrC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,iCAAiC;IACjC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,2DAA2D;IAC3D,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"approval-card.d.ts","sourceRoot":"","sources":["../../../src/components/approval-card/approval-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IACxE,wEAAwE;IACxE,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,qCAAqC;IACrC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,iCAAiC;IACjC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,2DAA2D;IAC3D,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB,CAAA;AAED;;;;GAIG;AACH,iBAAS,YAAY,CAAC,EACpB,OAAO,EACP,KAAK,EACL,WAAW,EACX,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAgFnB;AAED,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,42 +1,55 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
2
|
import * as t from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/approval-card/approval-card.tsx
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
|
|
5
|
+
function a({ eyebrow: a, title: o, description: s, action: c, menu: l, body: u, className: d, children: f, ...p }) {
|
|
6
|
+
let m = t.useId(), h = /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ i("div", {
|
|
7
|
+
"data-slot": "approval-card-content",
|
|
8
|
+
className: "min-w-0 flex-1",
|
|
9
|
+
children: [
|
|
10
|
+
a ? /* @__PURE__ */ r("p", {
|
|
11
|
+
"data-slot": "approval-card-eyebrow",
|
|
12
|
+
className: "type-meta text-muted-foreground",
|
|
13
|
+
children: a
|
|
14
|
+
}) : null,
|
|
15
|
+
/* @__PURE__ */ r("h3", {
|
|
16
|
+
id: m,
|
|
17
|
+
"data-slot": "approval-card-title",
|
|
18
|
+
className: "type-item-title font-medium",
|
|
19
|
+
children: o
|
|
20
|
+
}),
|
|
21
|
+
s ? /* @__PURE__ */ r("p", {
|
|
22
|
+
"data-slot": "approval-card-description",
|
|
23
|
+
className: "type-body mt-1 text-muted-foreground",
|
|
24
|
+
children: s
|
|
25
|
+
}) : null,
|
|
26
|
+
f
|
|
27
|
+
]
|
|
28
|
+
}), c || l ? /* @__PURE__ */ i("div", {
|
|
29
|
+
"data-slot": "approval-card-action",
|
|
30
|
+
className: e("flex flex-none items-center gap-2", u && "self-start"),
|
|
31
|
+
children: [c, l]
|
|
32
|
+
}) : null] });
|
|
33
|
+
return u ? /* @__PURE__ */ i("article", {
|
|
8
34
|
"data-slot": "approval-card",
|
|
9
|
-
"aria-labelledby":
|
|
10
|
-
className: e("flex flex-col gap-
|
|
11
|
-
...
|
|
35
|
+
"aria-labelledby": m,
|
|
36
|
+
className: e("flex flex-col gap-3 rounded-xl border border-border-subtle bg-card p-4 text-card-foreground", d),
|
|
37
|
+
...p,
|
|
12
38
|
children: [/* @__PURE__ */ r("div", {
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
o ? /* @__PURE__ */ n("p", {
|
|
28
|
-
"data-slot": "approval-card-description",
|
|
29
|
-
className: "type-body mt-1 text-muted-foreground",
|
|
30
|
-
children: o
|
|
31
|
-
}) : null,
|
|
32
|
-
l
|
|
33
|
-
]
|
|
34
|
-
}), s ? /* @__PURE__ */ n("div", {
|
|
35
|
-
"data-slot": "approval-card-action",
|
|
36
|
-
className: "flex flex-none items-center gap-2",
|
|
37
|
-
children: s
|
|
38
|
-
}) : null]
|
|
39
|
+
className: "flex flex-col gap-4 sm:flex-row sm:gap-6",
|
|
40
|
+
children: h
|
|
41
|
+
}), /* @__PURE__ */ r("div", {
|
|
42
|
+
"data-slot": "approval-card-body",
|
|
43
|
+
className: "type-body rounded-lg bg-surface-subtle px-3 py-2.5 text-muted-foreground",
|
|
44
|
+
children: u
|
|
45
|
+
})]
|
|
46
|
+
}) : /* @__PURE__ */ r("article", {
|
|
47
|
+
"data-slot": "approval-card",
|
|
48
|
+
"aria-labelledby": m,
|
|
49
|
+
className: e("flex flex-col gap-4 rounded-xl border border-border-subtle bg-card p-4 text-card-foreground sm:flex-row sm:items-center sm:gap-6", d),
|
|
50
|
+
...p,
|
|
51
|
+
children: h
|
|
39
52
|
});
|
|
40
53
|
}
|
|
41
54
|
//#endregion
|
|
42
|
-
export {
|
|
55
|
+
export { a as ApprovalCard };
|
|
@@ -2,11 +2,12 @@ import { Button as ButtonPrimitive } from '@base-ui/react/button';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const buttonVariants: (props?: ({
|
|
5
|
-
variant?: "primary" | "secondary" | "tertiary" | "subtle" | "destructive" | "link" | null | undefined;
|
|
5
|
+
variant?: "primary" | "secondary" | "tertiary" | "subtle" | "destructive" | "link" | "soft" | null | undefined;
|
|
6
6
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "icon-xs" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl" | null | undefined;
|
|
7
|
+
shape?: "default" | "pill" | null | undefined;
|
|
7
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
9
|
export type ButtonProps = ButtonPrimitive.Props & VariantProps<typeof buttonVariants>;
|
|
9
10
|
export declare function ButtonLabel({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
10
|
-
export declare function Button({ className, variant, size, children, ...props }: ButtonProps): React.JSX.Element;
|
|
11
|
+
export declare function Button({ className, variant, size, shape, children, ...props }: ButtonProps): React.JSX.Element;
|
|
11
12
|
export { buttonVariants };
|
|
12
13
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAiBjE,QAAA,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAiBjE,QAAA,MAAM,cAAc;;;;8EA+CnB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,GAC7C,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA;AAErC,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW9B;AAeD,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,OAAmB,EACnB,IAAW,EACX,KAAiB,EACjB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,qBAmBb;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -13,7 +13,8 @@ var o = "bg-primary text-primary-foreground hover:bg-[var(--primary-hover)] aria
|
|
|
13
13
|
tertiary: c,
|
|
14
14
|
subtle: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
15
15
|
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/15 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/10 dark:hover:bg-destructive/15 dark:focus-visible:ring-destructive/40",
|
|
16
|
-
link: "text-link underline-offset-4 hover:underline"
|
|
16
|
+
link: "text-link underline-offset-4 hover:underline",
|
|
17
|
+
soft: "bg-primary/10 [color:color-mix(in_srgb,var(--link)_80%,var(--foreground))] hover:bg-primary/15 aria-expanded:bg-primary/15"
|
|
17
18
|
},
|
|
18
19
|
size: {
|
|
19
20
|
xs: l,
|
|
@@ -26,11 +27,16 @@ var o = "bg-primary text-primary-foreground hover:bg-[var(--primary-hover)] aria
|
|
|
26
27
|
"icon-md": "size-8 rounded-[8px] [--icon-stroke-width:var(--icon-stroke-15)] [&_svg:not([class*='size-'])]:size-[15px]",
|
|
27
28
|
"icon-lg": "size-10 rounded-[8px] [--icon-stroke-width:var(--icon-stroke-18)] [&_svg:not([class*='size-'])]:size-[18px]",
|
|
28
29
|
"icon-xl": "size-12 rounded-[10px] [--icon-stroke-width:var(--icon-stroke-24)] [&_svg:not([class*='size-'])]:size-6"
|
|
30
|
+
},
|
|
31
|
+
shape: {
|
|
32
|
+
default: "",
|
|
33
|
+
pill: "rounded-full"
|
|
29
34
|
}
|
|
30
35
|
},
|
|
31
36
|
defaultVariants: {
|
|
32
37
|
variant: "primary",
|
|
33
|
-
size: "xl"
|
|
38
|
+
size: "xl",
|
|
39
|
+
shape: "default"
|
|
34
40
|
}
|
|
35
41
|
});
|
|
36
42
|
function h({ className: e, ...n }) {
|
|
@@ -47,18 +53,20 @@ function g(e) {
|
|
|
47
53
|
}
|
|
48
54
|
return typeof e == "number" ? /* @__PURE__ */ a(h, { children: e }) : e;
|
|
49
55
|
}
|
|
50
|
-
function _({ className: e, variant: i = "primary", size: o = "xl",
|
|
51
|
-
let
|
|
56
|
+
function _({ className: e, variant: i = "primary", size: o = "xl", shape: s = "default", children: c, ...l }) {
|
|
57
|
+
let u = t(m({
|
|
52
58
|
variant: i,
|
|
53
|
-
size: o
|
|
54
|
-
|
|
59
|
+
size: o,
|
|
60
|
+
shape: s
|
|
61
|
+
}));
|
|
55
62
|
return /* @__PURE__ */ a(r, {
|
|
56
63
|
"data-slot": "button",
|
|
57
64
|
"data-variant": i,
|
|
58
65
|
"data-size": o,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
"data-shape": s,
|
|
67
|
+
className: typeof e == "function" ? (n) => t(u, e(n)) : t(u, e),
|
|
68
|
+
...l,
|
|
69
|
+
children: n.Children.map(c, g)
|
|
62
70
|
});
|
|
63
71
|
}
|
|
64
72
|
//#endregion
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type DetailListProps = React.ComponentProps<'dl'> & {
|
|
3
|
+
/** `default` rows are divided by hairlines; `compact` rows are tighter and undivided, for a side card. */
|
|
4
|
+
density?: 'default' | 'compact';
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Settings and facts read as label and value, such as a receptionist's name
|
|
8
|
+
* and greeting, each with an optional status and action. Holds
|
|
9
|
+
* `DetailListItem`s.
|
|
10
|
+
*/
|
|
11
|
+
declare function DetailList({ density, className, ...props }: DetailListProps): React.JSX.Element;
|
|
12
|
+
type DetailListItemProps = Omit<React.ComponentProps<'div'>, 'children'> & {
|
|
13
|
+
/** What the value is. */
|
|
14
|
+
label: React.ReactNode;
|
|
15
|
+
/** The value itself. */
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
/** A state at the right, usually a `StatusIndicator`. */
|
|
18
|
+
status?: React.ReactNode;
|
|
19
|
+
/** An action at the far right, such as a "Change" button. */
|
|
20
|
+
action?: React.ReactNode;
|
|
21
|
+
};
|
|
22
|
+
/** One label and value row in a `DetailList`. */
|
|
23
|
+
declare function DetailListItem({ label, children, status, action, className, ...props }: DetailListItemProps): React.JSX.Element;
|
|
24
|
+
export { DetailList, DetailListItem, type DetailListItemProps, type DetailListProps, };
|
|
25
|
+
//# sourceMappingURL=detail-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detail-list.d.ts","sourceRoot":"","sources":["../../../src/components/detail-list/detail-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IAClD,0GAA0G;IAC1G,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAChC,CAAA;AAED;;;;GAIG;AACH,iBAAS,UAAU,CAAC,EAClB,OAAmB,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,qBASjB;AAED,KAAK,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACzE,yBAAyB;IACzB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,wBAAwB;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,yDAAyD;IACzD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACzB,CAAA;AAED,iDAAiD;AACjD,iBAAS,cAAc,CAAC,EACtB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,qBAiCrB;AAED,OAAO,EACL,UAAU,EACV,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,eAAe,GACrB,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/detail-list/detail-list.tsx
|
|
5
|
+
function r({ density: n = "default", className: r, ...i }) {
|
|
6
|
+
return /* @__PURE__ */ t("dl", {
|
|
7
|
+
"data-slot": "detail-list",
|
|
8
|
+
"data-density": n,
|
|
9
|
+
className: e("group/detail-list flex flex-col", r),
|
|
10
|
+
...i
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function i({ label: r, children: i, status: a, action: o, className: s, ...c }) {
|
|
14
|
+
return /* @__PURE__ */ n("div", {
|
|
15
|
+
"data-slot": "detail-list-item",
|
|
16
|
+
className: e("grid grid-cols-[minmax(7rem,30%)_minmax(0,1fr)_auto] items-baseline gap-x-4 border-b border-border-subtle py-3 last:border-b-0 group-data-[density=compact]/detail-list:grid-cols-[minmax(0,1fr)_auto] group-data-[density=compact]/detail-list:border-b-0 group-data-[density=compact]/detail-list:py-1.5", s),
|
|
17
|
+
...c,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ t("dt", {
|
|
20
|
+
"data-slot": "detail-list-label",
|
|
21
|
+
className: "type-body font-medium group-data-[density=compact]/detail-list:font-normal group-data-[density=compact]/detail-list:text-muted-foreground",
|
|
22
|
+
children: r
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ t("dd", {
|
|
25
|
+
"data-slot": "detail-list-value",
|
|
26
|
+
className: "type-body min-w-0 text-muted-foreground group-data-[density=compact]/detail-list:col-start-2 group-data-[density=compact]/detail-list:row-start-1 group-data-[density=compact]/detail-list:text-right group-data-[density=compact]/detail-list:text-foreground group-data-[density=compact]/detail-list:tabular-nums",
|
|
27
|
+
children: i
|
|
28
|
+
}),
|
|
29
|
+
a || o ? /* @__PURE__ */ n("dd", {
|
|
30
|
+
"data-slot": "detail-list-end",
|
|
31
|
+
className: "flex items-center justify-end gap-3 group-data-[density=compact]/detail-list:col-span-2",
|
|
32
|
+
children: [a, o]
|
|
33
|
+
}) : null
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { r as DetailList, i as DetailListItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/detail-list/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
|
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
type FilterChipOption = {
|
|
3
3
|
value: string;
|
|
4
4
|
label: React.ReactNode;
|
|
5
|
+
/** A small mark before the label, such as an area's icon. */
|
|
6
|
+
icon?: React.ReactNode;
|
|
5
7
|
/** Shown after the label, such as how many rows the filter keeps. */
|
|
6
8
|
count?: number;
|
|
7
9
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-chips.d.ts","sourceRoot":"","sources":["../../../src/components/filter-chips/filter-chips.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,KAAK,gBAAgB,GAAG,IAAI,CAC1B,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,UAAU,GAAG,cAAc,CAC5B,GAAG;IACF,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACpC,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAAC,EACnB,OAAO,EACP,KAAK,EACL,aAAa,EACb,QAAQ,EACR,SAAS,EACT,YAAY,EAAE,SAAoB,EAClC,GAAG,KAAK,EACT,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"filter-chips.d.ts","sourceRoot":"","sources":["../../../src/components/filter-chips/filter-chips.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,KAAK,gBAAgB,GAAG,IAAI,CAC1B,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,UAAU,GAAG,cAAc,CAC5B,GAAG;IACF,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACpC,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAAC,EACnB,OAAO,EACP,KAAK,EACL,aAAa,EACb,QAAQ,EACR,SAAS,EACT,YAAY,EAAE,SAAoB,EAClC,GAAG,KAAK,EACT,EAAE,gBAAgB,qBAiClB;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,CAAA"}
|
|
@@ -21,12 +21,16 @@ function a({ options: a, value: o, onValueChange: s, disabled: c, className: l,
|
|
|
21
21
|
value: e.value,
|
|
22
22
|
disabled: e.disabled,
|
|
23
23
|
"data-slot": "filter-chip",
|
|
24
|
-
className: "type-body inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-full border border-border bg-card px-3.5 whitespace-nowrap text-muted-foreground transition-colors outline-none hover:bg-surface-subtle hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-pressed:border-foreground data-pressed:bg-foreground data-pressed:text-background",
|
|
25
|
-
children: [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
className: "type-body inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-full border border-border bg-card px-3.5 whitespace-nowrap text-muted-foreground transition-colors outline-none hover:bg-surface-subtle hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-pressed:border-foreground [&_svg]:pointer-events-none [&_svg]:size-[15px] [&_svg]:flex-none [--icon-stroke-width:var(--icon-stroke-15)] data-pressed:bg-foreground data-pressed:text-background",
|
|
25
|
+
children: [
|
|
26
|
+
e.icon,
|
|
27
|
+
e.label,
|
|
28
|
+
e.count === void 0 ? null : /* @__PURE__ */ t("span", {
|
|
29
|
+
"data-slot": "filter-chip-count",
|
|
30
|
+
className: "opacity-70",
|
|
31
|
+
children: e.count
|
|
32
|
+
})
|
|
33
|
+
]
|
|
30
34
|
}, e.value))
|
|
31
35
|
});
|
|
32
36
|
}
|
|
@@ -10,7 +10,7 @@ declare const itemVariants: (props?: ({
|
|
|
10
10
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
11
|
declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<'div'> & VariantProps<typeof itemVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
12
12
|
declare const itemMediaVariants: (props?: ({
|
|
13
|
-
variant?: "
|
|
13
|
+
variant?: "default" | "image" | "icon" | "photo" | "tile" | null | undefined;
|
|
14
14
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
15
15
|
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
|
|
16
16
|
declare function ItemContent({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { useRender } from '@base-ui/react/use-render';
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const markerVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
5
|
+
variant?: "default" | "separator" | "border" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
declare function Marker({ className, variant, render, ...props }: useRender.ComponentProps<'div'> & VariantProps<typeof markerVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
8
8
|
declare function MarkerIcon({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const metricTileVariants: (props?: ({
|
|
4
|
-
variant?: "subtle" | "plain" | null | undefined;
|
|
4
|
+
variant?: "subtle" | "card" | "plain" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
declare const metricTileValueVariants: (props?: ({
|
|
7
7
|
size?: "md" | "lg" | null | undefined;
|
|
@@ -27,8 +27,10 @@ export interface MetricTileProps extends Omit<React.ComponentProps<'div'>, 'chil
|
|
|
27
27
|
delta?: MetricTileDelta;
|
|
28
28
|
/** A closing line, such as "so far" or "120 a day". */
|
|
29
29
|
note?: React.ReactNode;
|
|
30
|
+
/** A small chart at the bottom right, usually a `Sparkline`. */
|
|
31
|
+
chart?: React.ReactNode;
|
|
30
32
|
}
|
|
31
33
|
/** One number with its label, an optional change against before, and a note. */
|
|
32
|
-
declare function MetricTile({ label, icon, value, unit, delta, note, variant, size, className, ...props }: MetricTileProps): React.JSX.Element;
|
|
34
|
+
declare function MetricTile({ label, icon, value, unit, delta, note, chart, variant, size, className, ...props }: MetricTileProps): React.JSX.Element;
|
|
33
35
|
export { MetricTile, metricTileVariants };
|
|
34
36
|
//# sourceMappingURL=metric-tile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metric-tile.d.ts","sourceRoot":"","sources":["../../../src/components/metric-tile/metric-tile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,kBAAkB;;
|
|
1
|
+
{"version":3,"file":"metric-tile.d.ts","sourceRoot":"","sources":["../../../src/components/metric-tile/metric-tile.tsx"],"names":[],"mappings":"A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AA"}
|
|
@@ -7,7 +7,8 @@ import { IconArrowDownRight as i, IconArrowUpRight as a } from "@tabler/icons-re
|
|
|
7
7
|
var o = t("flex min-w-0 flex-col", {
|
|
8
8
|
variants: { variant: {
|
|
9
9
|
subtle: "rounded-xl bg-surface-subtle px-4 py-3",
|
|
10
|
-
plain: ""
|
|
10
|
+
plain: "",
|
|
11
|
+
card: "@container/metric-tile relative gap-1 rounded-lg border border-border-subtle bg-card px-[18px] pt-4 pb-3.5"
|
|
11
12
|
} },
|
|
12
13
|
defaultVariants: { variant: "subtle" }
|
|
13
14
|
}), s = t("tabular-nums", {
|
|
@@ -17,13 +18,32 @@ var o = t("flex min-w-0 flex-col", {
|
|
|
17
18
|
} },
|
|
18
19
|
defaultVariants: { size: "lg" }
|
|
19
20
|
});
|
|
20
|
-
function c({ label: t, icon: c, value: l, unit: u, delta: d, note: f,
|
|
21
|
-
let
|
|
21
|
+
function c({ label: t, icon: c, value: l, unit: u, delta: d, note: f, chart: p, variant: m, size: h, className: g, ..._ }) {
|
|
22
|
+
let v = m === "card", y = d?.tone ?? (d?.trend === "down" ? "negative" : "positive"), b = d?.trend === "down" ? i : a, x = d ? /* @__PURE__ */ r("p", {
|
|
23
|
+
"data-slot": "metric-tile-delta",
|
|
24
|
+
"data-trend": d.trend,
|
|
25
|
+
className: e("type-meta flex items-center gap-1", v ? e("mt-0.5 w-fit gap-0.5 self-start rounded-[6px] px-[7px] py-px font-medium whitespace-nowrap tabular-nums", y === "positive" ? "bg-success-soft text-success" : "bg-destructive-soft text-destructive") : "mt-0.5 text-muted-foreground"),
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ n(b, {
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
className: e("shrink-0", v ? "icon-optical-12 text-current" : y === "positive" ? "icon-optical-14 text-success" : "icon-optical-14 text-warning")
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ r("span", {
|
|
32
|
+
className: "sr-only",
|
|
33
|
+
children: [d.trend === "up" ? "Up" : "Down", ", "]
|
|
34
|
+
}),
|
|
35
|
+
d.label
|
|
36
|
+
]
|
|
37
|
+
}) : null, S = f ? /* @__PURE__ */ n("div", {
|
|
38
|
+
"data-slot": "metric-tile-note",
|
|
39
|
+
className: e(v ? "type-label min-w-0 truncate font-normal text-muted-foreground" : "type-meta text-muted-foreground", v && p && "@min-[11rem]/metric-tile:pr-24"),
|
|
40
|
+
children: f
|
|
41
|
+
}) : null;
|
|
22
42
|
return /* @__PURE__ */ r("div", {
|
|
23
43
|
"data-slot": "metric-tile",
|
|
24
|
-
"data-variant":
|
|
25
|
-
className: e(o({ variant:
|
|
26
|
-
...
|
|
44
|
+
"data-variant": m ?? "subtle",
|
|
45
|
+
className: e(o({ variant: m }), g),
|
|
46
|
+
..._,
|
|
27
47
|
children: [
|
|
28
48
|
c ? /* @__PURE__ */ r("p", {
|
|
29
49
|
"data-slot": "metric-tile-label",
|
|
@@ -31,42 +51,24 @@ function c({ label: t, icon: c, value: l, unit: u, delta: d, note: f, variant: p
|
|
|
31
51
|
children: [c, t]
|
|
32
52
|
}) : /* @__PURE__ */ n("p", {
|
|
33
53
|
"data-slot": "metric-tile-label",
|
|
34
|
-
className: "type-meta text-muted-foreground",
|
|
54
|
+
className: e(v ? "type-label font-normal" : "type-meta", "text-muted-foreground"),
|
|
35
55
|
children: t
|
|
36
56
|
}),
|
|
37
57
|
/* @__PURE__ */ n("p", {
|
|
38
58
|
"data-slot": "metric-tile-value",
|
|
39
|
-
className: e(s({ size:
|
|
59
|
+
className: e(v ? "type-stat tabular-nums" : s({ size: h }), c ? "mt-5" : !v && h === "md" && "mt-0.5"),
|
|
40
60
|
children: l
|
|
41
61
|
}),
|
|
42
62
|
u ? /* @__PURE__ */ n("div", {
|
|
43
63
|
className: "type-meta text-muted-foreground",
|
|
44
64
|
children: u
|
|
45
65
|
}) : null,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"aria-hidden": "true",
|
|
53
|
-
className: e("icon-optical-14 shrink-0", _ === "positive" ? "text-success" : "text-warning")
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ r("span", {
|
|
56
|
-
className: "sr-only",
|
|
57
|
-
children: [
|
|
58
|
-
d.trend === "up" ? "Up" : "Down",
|
|
59
|
-
",",
|
|
60
|
-
" "
|
|
61
|
-
]
|
|
62
|
-
}),
|
|
63
|
-
d.label
|
|
64
|
-
]
|
|
65
|
-
}) : null,
|
|
66
|
-
f ? /* @__PURE__ */ n("div", {
|
|
67
|
-
"data-slot": "metric-tile-note",
|
|
68
|
-
className: "type-meta text-muted-foreground",
|
|
69
|
-
children: f
|
|
66
|
+
x,
|
|
67
|
+
S,
|
|
68
|
+
p ? /* @__PURE__ */ n("div", {
|
|
69
|
+
"data-slot": "metric-tile-chart",
|
|
70
|
+
className: e("self-end", v && "mt-1 @min-[11rem]/metric-tile:absolute @min-[11rem]/metric-tile:right-4 @min-[11rem]/metric-tile:bottom-3.5 @min-[11rem]/metric-tile:mt-0"),
|
|
71
|
+
children: p
|
|
70
72
|
}) : null
|
|
71
73
|
]
|
|
72
74
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/platform-icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/platform-icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type LetterMarkProps = Omit<React.ComponentProps<'span'>, 'children'> & {
|
|
3
|
+
/** The service's name. Its first letter (or first two words' initials) fills the tile. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** The tile's color, such as the service's brand color. Defaults to the muted surface. */
|
|
6
|
+
color?: string;
|
|
7
|
+
/** The letter's color on `color`. Defaults to white on a color, foreground on the default tile. */
|
|
8
|
+
foreground?: string;
|
|
9
|
+
/** Rendered width and height in pixels. */
|
|
10
|
+
size?: number;
|
|
11
|
+
/** Names the mark for assistive tech; omit when a visible label says the name. */
|
|
12
|
+
title?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A lettered tile standing in for a service without a `PlatformIcon` mark,
|
|
16
|
+
* such as Yelp or Shopify. It takes the same size as a mark.
|
|
17
|
+
*/
|
|
18
|
+
declare function LetterMark({ name, color, foreground, size, title, className, style, ...props }: LetterMarkProps): React.JSX.Element;
|
|
19
|
+
export { LetterMark, type LetterMarkProps };
|
|
20
|
+
//# sourceMappingURL=letter-mark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"letter-mark.d.ts","sourceRoot":"","sources":["../../../src/components/platform-icon/letter-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,KAAK,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACtE,0FAA0F;IAC1F,IAAI,EAAE,MAAM,CAAA;IACZ,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mGAAmG;IACnG,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAQD;;;GAGG;AACH,iBAAS,UAAU,CAAC,EAClB,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAS,EACT,KAAK,EACL,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,eAAe,qBA0BjB;AAED,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/platform-icon/letter-mark.tsx
|
|
5
|
+
function n(e) {
|
|
6
|
+
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
7
|
+
return t.length > 1 ? `${t[0][0]}${t[1][0]}`.toUpperCase() : (t[0]?.[0] ?? "?").toUpperCase();
|
|
8
|
+
}
|
|
9
|
+
function r({ name: r, color: i, foreground: a, size: o = 16, title: s, className: c, style: l, ...u }) {
|
|
10
|
+
let d = n(r);
|
|
11
|
+
return /* @__PURE__ */ t("span", {
|
|
12
|
+
"data-slot": "letter-mark",
|
|
13
|
+
...s ? {
|
|
14
|
+
role: "img",
|
|
15
|
+
"aria-label": s
|
|
16
|
+
} : { "aria-hidden": !0 },
|
|
17
|
+
className: e("inline-flex flex-none items-center justify-center rounded-[25%] leading-none font-semibold select-none", !i && "bg-muted text-foreground", c),
|
|
18
|
+
style: {
|
|
19
|
+
width: o,
|
|
20
|
+
height: o,
|
|
21
|
+
fontSize: Math.round(o * (d.length > 1 ? .42 : .56)),
|
|
22
|
+
...i ? {
|
|
23
|
+
background: i,
|
|
24
|
+
color: a ?? "#FFFFFF"
|
|
25
|
+
} : {},
|
|
26
|
+
...a && !i ? { color: a } : {},
|
|
27
|
+
...l
|
|
28
|
+
},
|
|
29
|
+
...u,
|
|
30
|
+
children: d
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { r as LetterMark };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
type Platform = 'x' | 'threads' | 'instagram' | 'facebook' | 'bluesky' | 'linkedin' | 'tiktok' | 'youtube' | 'google' | 'beehiiv' | 'reddit' | 'gmail' | 'outlook' | 'microsoft' | 'email' | 'phone';
|
|
2
|
+
type Platform = 'x' | 'threads' | 'instagram' | 'facebook' | 'bluesky' | 'linkedin' | 'tiktok' | 'youtube' | 'google' | 'beehiiv' | 'reddit' | 'gmail' | 'outlook' | 'microsoft' | 'email' | 'phone' | 'meta' | 'wordpress' | 'zapier' | 'apple' | 'bing' | 'chatgpt';
|
|
3
3
|
declare const PLATFORMS: readonly Platform[];
|
|
4
4
|
declare const PLATFORM_COLOR: Record<Platform, string>;
|
|
5
5
|
declare const PLATFORM_LABEL: Record<Platform, string>;
|
|
@@ -25,6 +25,12 @@ declare const BrandOutlook: BrandIcon;
|
|
|
25
25
|
declare const BrandMicrosoft: BrandIcon;
|
|
26
26
|
declare const BrandEmail: BrandIcon;
|
|
27
27
|
declare const BrandPhone: BrandIcon;
|
|
28
|
+
declare const BrandMeta: BrandIcon;
|
|
29
|
+
declare const BrandWordpress: BrandIcon;
|
|
30
|
+
declare const BrandZapier: BrandIcon;
|
|
31
|
+
declare const BrandApple: BrandIcon;
|
|
32
|
+
declare const BrandBing: BrandIcon;
|
|
33
|
+
declare const BrandChatgpt: BrandIcon;
|
|
28
34
|
declare const PLATFORM_ICON: Record<Platform, BrandIcon>;
|
|
29
35
|
type PlatformIconProps = Omit<BrandIconProps, 'size'> & {
|
|
30
36
|
platform: Platform;
|
|
@@ -34,5 +40,5 @@ type PlatformIconProps = Omit<BrandIconProps, 'size'> & {
|
|
|
34
40
|
title?: string;
|
|
35
41
|
};
|
|
36
42
|
declare function PlatformIcon({ platform, size, className, style, ...props }: PlatformIconProps): React.JSX.Element;
|
|
37
|
-
export { PlatformIcon, PLATFORMS, PLATFORM_COLOR, PLATFORM_ICON, PLATFORM_LABEL, BrandX, BrandThreads, BrandInstagram, BrandFacebook, BrandBluesky, BrandLinkedin, BrandTiktok, BrandYoutube, BrandGoogle, BrandBeehiiv, BrandReddit, BrandGmail, BrandOutlook, BrandMicrosoft, BrandEmail, BrandPhone, type BrandIcon, type BrandIconProps, type Platform, type PlatformIconProps, };
|
|
43
|
+
export { PlatformIcon, PLATFORMS, PLATFORM_COLOR, PLATFORM_ICON, PLATFORM_LABEL, BrandX, BrandThreads, BrandInstagram, BrandFacebook, BrandBluesky, BrandLinkedin, BrandTiktok, BrandYoutube, BrandGoogle, BrandBeehiiv, BrandReddit, BrandGmail, BrandOutlook, BrandMicrosoft, BrandEmail, BrandPhone, BrandMeta, BrandWordpress, BrandZapier, BrandApple, BrandBing, BrandChatgpt, type BrandIcon, type BrandIconProps, type Platform, type PlatformIconProps, };
|
|
38
44
|
//# sourceMappingURL=platform-icon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-icon.d.ts","sourceRoot":"","sources":["../../../src/components/platform-icon/platform-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"platform-icon.d.ts","sourceRoot":"","sources":["../../../src/components/platform-icon/platform-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA+B9B,KAAK,QAAQ,GACT,GAAG,GACH,SAAS,GACT,WAAW,GACX,UAAU,GACV,SAAS,GACT,UAAU,GACV,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,SAAS,GACT,WAAW,GACX,OAAO,GACP,OAAO,GACP,MAAM,GACN,WAAW,GACX,QAAQ,GACR,OAAO,GACP,MAAM,GACN,SAAS,CAAA;AAEb,QAAA,MAAM,SAAS,EAAE,SAAS,QAAQ,EAuBjC,CAAA;AAID,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAuB5C,CAAA;AAED,QAAA,MAAM,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAuB5C,CAAA;AAMD,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,GAAG,Q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