@fanvue/ui 1.20.0 → 1.21.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/cjs/components/Banner/Banner.cjs +71 -0
- package/dist/cjs/components/Banner/Banner.cjs.map +1 -0
- package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs +111 -0
- package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs.map +1 -0
- package/dist/cjs/components/OnlineBlinkingIcon/OnlineBlinkingIcon.cjs +45 -0
- package/dist/cjs/components/OnlineBlinkingIcon/OnlineBlinkingIcon.cjs.map +1 -0
- package/dist/cjs/components/Tabs/TabsTrigger.cjs +1 -10
- package/dist/cjs/components/Tabs/TabsTrigger.cjs.map +1 -1
- package/dist/cjs/index.cjs +12 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/Banner/Banner.mjs +54 -0
- package/dist/components/Banner/Banner.mjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.mjs +93 -0
- package/dist/components/DropdownMenu/DropdownMenu.mjs.map +1 -0
- package/dist/components/OnlineBlinkingIcon/OnlineBlinkingIcon.mjs +28 -0
- package/dist/components/OnlineBlinkingIcon/OnlineBlinkingIcon.mjs.map +1 -0
- package/dist/components/Tabs/TabsTrigger.mjs +1 -10
- package/dist/components/Tabs/TabsTrigger.mjs.map +1 -1
- package/dist/index.d.ts +152 -0
- package/dist/index.mjs +12 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const cn = require("../../utils/cn.cjs");
|
|
7
|
+
const Badge = require("../Badge/Badge.cjs");
|
|
8
|
+
const Button = require("../Button/Button.cjs");
|
|
9
|
+
const ArrowRightIcon = require("../Icons/ArrowRightIcon.cjs");
|
|
10
|
+
function _interopNamespaceDefault(e) {
|
|
11
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
12
|
+
if (e) {
|
|
13
|
+
for (const k in e) {
|
|
14
|
+
if (k !== "default") {
|
|
15
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: () => e[k]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
27
|
+
const VARIANT_GRADIENTS = {
|
|
28
|
+
primary: "from-[var(--primitives-color-green-50)] to-[var(--primitives-color-purple-50)]",
|
|
29
|
+
secondary: "from-[var(--primitives-color-purple-50)] to-[var(--primitives-color-pink-50)]",
|
|
30
|
+
tertiary: "from-[var(--primitives-color-pink-50)] to-[var(--primitives-color-info-50)]"
|
|
31
|
+
};
|
|
32
|
+
const LIGHT_MODE_OVERRIDES = {
|
|
33
|
+
"--color-foreground-default": "#151515ff",
|
|
34
|
+
"--color-foreground-secondary": "#404040ff",
|
|
35
|
+
"--color-neutral-100": "#1515150a"
|
|
36
|
+
};
|
|
37
|
+
const Banner = React__namespace.forwardRef(
|
|
38
|
+
({ className, variant = "primary", badgeLabel, heading, description, cta, style, ...props }, ref) => {
|
|
39
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
className: cn.cn(
|
|
44
|
+
"flex flex-col items-start gap-2 rounded-2xl bg-gradient-to-br p-3 text-foreground-default",
|
|
45
|
+
VARIANT_GRADIENTS[variant],
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
style: { ...LIGHT_MODE_OVERRIDES, ...style },
|
|
49
|
+
...props,
|
|
50
|
+
children: [
|
|
51
|
+
badgeLabel && /* @__PURE__ */ jsxRuntime.jsx(Badge.Badge, { children: badgeLabel }),
|
|
52
|
+
heading && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "typography-semibold-body-md", children: heading }),
|
|
53
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "typography-regular-body-sm", children: description }),
|
|
54
|
+
cta && /* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
+
Button.Button,
|
|
56
|
+
{
|
|
57
|
+
variant: "text",
|
|
58
|
+
onClick: cta.onClick,
|
|
59
|
+
size: "24",
|
|
60
|
+
rightIcon: cta.icon ?? /* @__PURE__ */ jsxRuntime.jsx(ArrowRightIcon.ArrowRightIcon, {}),
|
|
61
|
+
children: cta.label
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
Banner.displayName = "Banner";
|
|
70
|
+
exports.Banner = Banner;
|
|
71
|
+
//# sourceMappingURL=Banner.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.cjs","sources":["../../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Badge } from \"../Badge/Badge\";\nimport { Button } from \"../Button/Button\";\nimport { ArrowRightIcon } from \"../Icons/ArrowRightIcon\";\n\n/** Gradient variant of the banner. */\nexport type BannerVariant = \"primary\" | \"secondary\" | \"tertiary\";\n\nconst VARIANT_GRADIENTS: Record<BannerVariant, string> = {\n primary: \"from-[var(--primitives-color-green-50)] to-[var(--primitives-color-purple-50)]\",\n secondary: \"from-[var(--primitives-color-purple-50)] to-[var(--primitives-color-pink-50)]\",\n tertiary: \"from-[var(--primitives-color-pink-50)] to-[var(--primitives-color-info-50)]\",\n};\n\nexport interface BannerProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Gradient variant controlling the background colours. @default \"primary\" */\n variant?: BannerVariant;\n /** Text rendered inside a `Badge` at the top of the banner. */\n badgeLabel?: string;\n /** Primary heading displayed below the badge. Rendered as an `<h3>`. */\n heading?: React.ReactNode;\n /** Supporting copy displayed below the heading. */\n description?: React.ReactNode;\n /**\n * Call-to-action button config. Renders a text-style `Button` with an arrow icon.\n * Pass `icon` to override the default `ArrowRightIcon`.\n */\n cta?: { label: string; onClick: () => void; icon?: React.ReactNode };\n}\n\n/**\n * Force light-mode semantic tokens on the Banner since its gradient\n * backgrounds are always light regardless of the current colour scheme.\n */\nconst LIGHT_MODE_OVERRIDES: React.CSSProperties = {\n \"--color-foreground-default\": \"#151515ff\",\n \"--color-foreground-secondary\": \"#404040ff\",\n \"--color-neutral-100\": \"#1515150a\",\n} as React.CSSProperties;\n\n/**\n * A promotional banner card with gradient backgrounds, optional badge,\n * heading, description, and call-to-action button.\n *\n * @example\n * ```tsx\n * <Banner\n * variant=\"primary\"\n * badgeLabel=\"New\"\n * heading=\"Boost your earnings\"\n * description=\"Try our latest feature to grow faster.\"\n * cta={{ label: \"Learn more\", onClick: handleClick }}\n * />\n * ```\n */\nexport const Banner = React.forwardRef<HTMLDivElement, BannerProps>(\n (\n { className, variant = \"primary\", badgeLabel, heading, description, cta, style, ...props },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col items-start gap-2 rounded-2xl bg-gradient-to-br p-3 text-foreground-default\",\n VARIANT_GRADIENTS[variant],\n className,\n )}\n style={{ ...LIGHT_MODE_OVERRIDES, ...style }}\n {...props}\n >\n {badgeLabel && <Badge>{badgeLabel}</Badge>}\n {heading && <h3 className=\"typography-semibold-body-md\">{heading}</h3>}\n {description && <p className=\"typography-regular-body-sm\">{description}</p>}\n {cta && (\n <Button\n variant=\"text\"\n onClick={cta.onClick}\n size=\"24\"\n rightIcon={cta.icon ?? <ArrowRightIcon />}\n >\n {cta.label}\n </Button>\n )}\n </div>\n );\n },\n);\n\nBanner.displayName = \"Banner\";\n"],"names":["React","jsxs","cn","jsx","Badge","Button","ArrowRightIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM,oBAAmD;AAAA,EACvD,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AACZ;AAsBA,MAAM,uBAA4C;AAAA,EAChD,8BAA8B;AAAA,EAC9B,gCAAgC;AAAA,EAChC,uBAAuB;AACzB;AAiBO,MAAM,SAASA,iBAAM;AAAA,EAC1B,CACE,EAAE,WAAW,UAAU,WAAW,YAAY,SAAS,aAAa,KAAK,OAAO,GAAG,MAAA,GACnF,QACG;AACH,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAWC,GAAAA;AAAAA,UACT;AAAA,UACA,kBAAkB,OAAO;AAAA,UACzB;AAAA,QAAA;AAAA,QAEF,OAAO,EAAE,GAAG,sBAAsB,GAAG,MAAA;AAAA,QACpC,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,cAAcC,2BAAAA,IAACC,MAAAA,SAAO,UAAA,WAAA,CAAW;AAAA,UACjC,WAAWD,2BAAAA,IAAC,MAAA,EAAG,WAAU,+BAA+B,UAAA,SAAQ;AAAA,UAChE,eAAeA,2BAAAA,IAAC,KAAA,EAAE,WAAU,8BAA8B,UAAA,aAAY;AAAA,UACtE,OACCA,2BAAAA;AAAAA,YAACE,OAAAA;AAAAA,YAAA;AAAA,cACC,SAAQ;AAAA,cACR,SAAS,IAAI;AAAA,cACb,MAAK;AAAA,cACL,WAAW,IAAI,QAAQF,2BAAAA,IAACG,eAAAA,gBAAA,CAAA,CAAe;AAAA,cAEtC,UAAA,IAAI;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,OAAO,cAAc;;"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const DropdownMenuPrimitive = require("@radix-ui/react-dropdown-menu");
|
|
6
|
+
const React = require("react");
|
|
7
|
+
const cn = require("../../utils/cn.cjs");
|
|
8
|
+
function _interopNamespaceDefault(e) {
|
|
9
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
10
|
+
if (e) {
|
|
11
|
+
for (const k in e) {
|
|
12
|
+
if (k !== "default") {
|
|
13
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: () => e[k]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
const DropdownMenuPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DropdownMenuPrimitive);
|
|
25
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
26
|
+
const DropdownMenu = DropdownMenuPrimitive__namespace.Root;
|
|
27
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive__namespace.Trigger;
|
|
28
|
+
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
29
|
+
const DropdownMenuContent = React__namespace.forwardRef(({ className, style, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30
|
+
DropdownMenuPrimitive__namespace.Content,
|
|
31
|
+
{
|
|
32
|
+
ref,
|
|
33
|
+
sideOffset,
|
|
34
|
+
className: cn.cn(
|
|
35
|
+
"min-w-[180px] overflow-y-auto rounded-lg border border-neutral-200 bg-surface-page p-1 shadow-lg",
|
|
36
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
37
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
38
|
+
"data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2",
|
|
39
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
40
|
+
className
|
|
41
|
+
),
|
|
42
|
+
style: {
|
|
43
|
+
zIndex: "var(--fanvue-ui-portal-z-index, 50)",
|
|
44
|
+
maxHeight: "var(--radix-dropdown-menu-content-available-height)",
|
|
45
|
+
...style
|
|
46
|
+
},
|
|
47
|
+
...props
|
|
48
|
+
}
|
|
49
|
+
) }));
|
|
50
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
51
|
+
const DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
52
|
+
DropdownMenuGroup.displayName = "DropdownMenuGroup";
|
|
53
|
+
const DropdownMenuLabel = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
54
|
+
DropdownMenuPrimitive__namespace.Label,
|
|
55
|
+
{
|
|
56
|
+
ref,
|
|
57
|
+
className: cn.cn("typography-medium-body-xs px-2 py-1.5 text-foreground-secondary", className),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
));
|
|
61
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
62
|
+
const DropdownMenuItem = React__namespace.forwardRef(
|
|
63
|
+
({
|
|
64
|
+
size = "sm",
|
|
65
|
+
destructive,
|
|
66
|
+
leadingIcon,
|
|
67
|
+
trailingIcon,
|
|
68
|
+
selected,
|
|
69
|
+
className,
|
|
70
|
+
children,
|
|
71
|
+
asChild,
|
|
72
|
+
...props
|
|
73
|
+
}, ref) => {
|
|
74
|
+
const itemClassName = cn.cn(
|
|
75
|
+
"flex w-full cursor-pointer items-center gap-1 rounded px-2 outline-none",
|
|
76
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
77
|
+
"data-[highlighted]:bg-neutral-100",
|
|
78
|
+
size === "sm" ? "min-h-[34px] py-1" : "min-h-[40px] py-1.5",
|
|
79
|
+
size === "sm" ? "typography-medium-body-sm" : "typography-medium-body-md",
|
|
80
|
+
destructive && "text-error-default",
|
|
81
|
+
selected && "bg-success-background",
|
|
82
|
+
className
|
|
83
|
+
);
|
|
84
|
+
if (asChild) {
|
|
85
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Item, { ref, asChild: true, className: itemClassName, ...props, children });
|
|
86
|
+
}
|
|
87
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuPrimitive__namespace.Item, { ref, className: itemClassName, ...props, children: [
|
|
88
|
+
leadingIcon,
|
|
89
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1", children }),
|
|
90
|
+
trailingIcon
|
|
91
|
+
] });
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
95
|
+
const DropdownMenuSeparator = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
96
|
+
DropdownMenuPrimitive__namespace.Separator,
|
|
97
|
+
{
|
|
98
|
+
ref,
|
|
99
|
+
className: cn.cn("my-1 h-px bg-neutral-200", className),
|
|
100
|
+
...props
|
|
101
|
+
}
|
|
102
|
+
));
|
|
103
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
104
|
+
exports.DropdownMenu = DropdownMenu;
|
|
105
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
106
|
+
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
107
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
108
|
+
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
109
|
+
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
110
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
111
|
+
//# sourceMappingURL=DropdownMenu.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.cjs","sources":["../../../../src/components/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Props for the {@link DropdownMenu} root component. */\nexport interface DropdownMenuProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\n\n/** Root component that manages open/close state for a dropdown menu. */\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\n\n/** Props for the {@link DropdownMenuTrigger} component. */\nexport type DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Trigger\n>;\n\n/** The element that toggles the dropdown menu when clicked. */\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nDropdownMenuTrigger.displayName = \"DropdownMenuTrigger\";\n\n/** Props for the {@link DropdownMenuContent} component. */\nexport interface DropdownMenuContentProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {}\n\n/**\n * The positioned content panel rendered inside a portal.\n *\n * Override the portal z-index per-instance via `style={{ zIndex: 1500 }}` or\n * globally with the `--fanvue-ui-portal-z-index` CSS custom property.\n *\n * @example\n * ```tsx\n * <DropdownMenu>\n * <DropdownMenuTrigger asChild>\n * <Button>Open</Button>\n * </DropdownMenuTrigger>\n * <DropdownMenuContent>\n * <DropdownMenuItem>Option 1</DropdownMenuItem>\n * <DropdownMenuItem>Option 2</DropdownMenuItem>\n * </DropdownMenuContent>\n * </DropdownMenu>\n * ```\n */\nexport const DropdownMenuContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Content>,\n DropdownMenuContentProps\n>(({ className, style, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"min-w-[180px] overflow-y-auto rounded-lg border border-neutral-200 bg-surface-page p-1 shadow-lg\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n \"data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2\",\n \"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n className,\n )}\n style={{\n zIndex: \"var(--fanvue-ui-portal-z-index, 50)\",\n maxHeight: \"var(--radix-dropdown-menu-content-available-height)\",\n ...style,\n }}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\n/** Props for the {@link DropdownMenuGroup} component. */\nexport type DropdownMenuGroupProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Group\n>;\n\n/** Groups related menu items. Accepts an optional `DropdownMenuLabel`. */\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nDropdownMenuGroup.displayName = \"DropdownMenuGroup\";\n\n/** Props for the {@link DropdownMenuLabel} component. */\nexport interface DropdownMenuLabelProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {}\n\n/** A label for a group of items. Not focusable or selectable. */\nexport const DropdownMenuLabel = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Label>,\n DropdownMenuLabelProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"typography-medium-body-xs px-2 py-1.5 text-foreground-secondary\", className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\n/** Available sizes for a dropdown menu item. */\nexport type DropdownMenuItemSize = \"sm\" | \"md\";\n\nexport interface DropdownMenuItemProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n /** Height of the menu item row. @default \"sm\" */\n size?: DropdownMenuItemSize;\n /** Whether the item uses destructive (error) styling. */\n destructive?: boolean;\n /** Icon rendered before the label. */\n leadingIcon?: React.ReactNode;\n /** Icon rendered after the label. */\n trailingIcon?: React.ReactNode;\n /** Whether the item is in a selected state. */\n selected?: boolean;\n}\n\n/**\n * An individual item within a {@link DropdownMenuContent}.\n *\n * @example\n * ```tsx\n * <DropdownMenuItem>Edit profile</DropdownMenuItem>\n * <DropdownMenuItem destructive>Delete</DropdownMenuItem>\n * <DropdownMenuItem leadingIcon={<EditIcon />}>Edit</DropdownMenuItem>\n *\n * // As a link\n * <DropdownMenuItem asChild>\n * <a href=\"/settings\">Settings</a>\n * </DropdownMenuItem>\n * ```\n */\nexport const DropdownMenuItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Item>,\n DropdownMenuItemProps\n>(\n (\n {\n size = \"sm\",\n destructive,\n leadingIcon,\n trailingIcon,\n selected,\n className,\n children,\n asChild,\n ...props\n },\n ref,\n ) => {\n const itemClassName = cn(\n \"flex w-full cursor-pointer items-center gap-1 rounded px-2 outline-none\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"data-[highlighted]:bg-neutral-100\",\n size === \"sm\" ? \"min-h-[34px] py-1\" : \"min-h-[40px] py-1.5\",\n size === \"sm\" ? \"typography-medium-body-sm\" : \"typography-medium-body-md\",\n destructive && \"text-error-default\",\n selected && \"bg-success-background\",\n className,\n );\n\n if (asChild) {\n return (\n <DropdownMenuPrimitive.Item ref={ref} asChild className={itemClassName} {...props}>\n {children}\n </DropdownMenuPrimitive.Item>\n );\n }\n\n return (\n <DropdownMenuPrimitive.Item ref={ref} className={itemClassName} {...props}>\n {leadingIcon}\n <span className=\"flex-1\">{children}</span>\n {trailingIcon}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\n/** Props for the {@link DropdownMenuSeparator} component. */\nexport interface DropdownMenuSeparatorProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> {}\n\n/** Visual separator between groups of items. */\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"my-1 h-px bg-neutral-200\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n"],"names":["DropdownMenuPrimitive","React","jsx","cn","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AASO,MAAM,eAAeA,iCAAsB;AAQ3C,MAAM,sBAAsBA,iCAAsB;AACzD,oBAAoB,cAAc;AAyB3B,MAAM,sBAAsBC,iBAAM,WAGvC,CAAC,EAAE,WAAW,OAAO,aAAa,GAAG,GAAG,SAAS,QACjDC,2BAAAA,IAACF,iCAAsB,QAAtB,EACC,UAAAE,2BAAAA;AAAAA,EAACF,iCAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAWG,GAAAA;AAAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,GAAG;AAAA,IAAA;AAAA,IAEJ,GAAG;AAAA,EAAA;AACN,GACF,CACD;AACD,oBAAoB,cAAc;AAQ3B,MAAM,oBAAoBH,iCAAsB;AACvD,kBAAkB,cAAc;AAOzB,MAAM,oBAAoBC,iBAAM,WAGrC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1BC,2BAAAA;AAAAA,EAACF,iCAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAWG,GAAAA,GAAG,mEAAmE,SAAS;AAAA,IACzF,GAAG;AAAA,EAAA;AACN,CACD;AACD,kBAAkB,cAAc;AAkCzB,MAAM,mBAAmBF,iBAAM;AAAA,EAIpC,CACE;AAAA,IACE,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,gBAAgBE,GAAAA;AAAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,OAAO,sBAAsB;AAAA,MACtC,SAAS,OAAO,8BAA8B;AAAA,MAC9C,eAAe;AAAA,MACf,YAAY;AAAA,MACZ;AAAA,IAAA;AAGF,QAAI,SAAS;AACX,aACED,+BAACF,iCAAsB,MAAtB,EAA2B,KAAU,SAAO,MAAC,WAAW,eAAgB,GAAG,OACzE,SAAA,CACH;AAAA,IAEJ;AAEA,WACEI,2BAAAA,KAACJ,iCAAsB,MAAtB,EAA2B,KAAU,WAAW,eAAgB,GAAG,OACjE,UAAA;AAAA,MAAA;AAAA,MACDE,2BAAAA,IAAC,QAAA,EAAK,WAAU,UAAU,SAAA,CAAS;AAAA,MAClC;AAAA,IAAA,GACH;AAAA,EAEJ;AACF;AACA,iBAAiB,cAAc;AAOxB,MAAM,wBAAwBD,iBAAM,WAGzC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1BC,2BAAAA;AAAAA,EAACF,iCAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAWG,GAAAA,GAAG,4BAA4B,SAAS;AAAA,IAClD,GAAG;AAAA,EAAA;AACN,CACD;AACD,sBAAsB,cAAc;;;;;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const cn = require("../../utils/cn.cjs");
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
if (k !== "default") {
|
|
12
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
24
|
+
const sizeClasses = {
|
|
25
|
+
sm: "h-2 w-2",
|
|
26
|
+
md: "h-3 w-3"
|
|
27
|
+
};
|
|
28
|
+
const OnlineBlinkingIcon = React__namespace.forwardRef(
|
|
29
|
+
({ className, size = "sm", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30
|
+
"span",
|
|
31
|
+
{
|
|
32
|
+
ref,
|
|
33
|
+
className: cn.cn("relative inline-block rounded-full", sizeClasses[size], className),
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
...props,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 animate-ping rounded-full bg-success-default opacity-75" }),
|
|
38
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 rounded-full bg-success-default" })
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
OnlineBlinkingIcon.displayName = "OnlineBlinkingIcon";
|
|
44
|
+
exports.OnlineBlinkingIcon = OnlineBlinkingIcon;
|
|
45
|
+
//# sourceMappingURL=OnlineBlinkingIcon.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnlineBlinkingIcon.cjs","sources":["../../../../src/components/OnlineBlinkingIcon/OnlineBlinkingIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nexport type OnlineBlinkingIconSize = \"sm\" | \"md\";\n\nexport interface OnlineBlinkingIconProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** @default \"sm\" */\n size?: OnlineBlinkingIconSize;\n}\n\nconst sizeClasses: Record<OnlineBlinkingIconSize, string> = {\n sm: \"h-2 w-2\",\n md: \"h-3 w-3\",\n};\n\n/**\n * A small pulsing green dot indicator used to show online status.\n * Decorative only — pair with a visually-hidden label at the usage site\n * to convey status to screen readers.\n *\n * @example\n * ```tsx\n * <OnlineBlinkingIcon />\n * <OnlineBlinkingIcon size=\"md\" />\n * ```\n */\nexport const OnlineBlinkingIcon = React.forwardRef<HTMLSpanElement, OnlineBlinkingIconProps>(\n ({ className, size = \"sm\", ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\"relative inline-block rounded-full\", sizeClasses[size], className)}\n aria-hidden=\"true\"\n {...props}\n >\n <span className=\"absolute inset-0 animate-ping rounded-full bg-success-default opacity-75\" />\n <span className=\"absolute inset-0 rounded-full bg-success-default\" />\n </span>\n ),\n);\n\nOnlineBlinkingIcon.displayName = \"OnlineBlinkingIcon\";\n"],"names":["React","jsxs","cn","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,cAAsD;AAAA,EAC1D,IAAI;AAAA,EACJ,IAAI;AACN;AAaO,MAAM,qBAAqBA,iBAAM;AAAA,EACtC,CAAC,EAAE,WAAW,OAAO,MAAM,GAAG,MAAA,GAAS,QACrCC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAWC,GAAAA,GAAG,sCAAsC,YAAY,IAAI,GAAG,SAAS;AAAA,MAChF,eAAY;AAAA,MACX,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAAC,2BAAAA,IAAC,QAAA,EAAK,WAAU,2EAAA,CAA2E;AAAA,QAC3FA,2BAAAA,IAAC,QAAA,EAAK,WAAU,mDAAA,CAAmD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGzE;AAEA,mBAAmB,cAAc;;"}
|
|
@@ -23,19 +23,10 @@ function _interopNamespaceDefault(e) {
|
|
|
23
23
|
}
|
|
24
24
|
const TabsPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TabsPrimitive);
|
|
25
25
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
26
|
-
const TabsTrigger = React__namespace.forwardRef(({ className, children,
|
|
26
|
+
const TabsTrigger = React__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
27
27
|
TabsPrimitive__namespace.Trigger,
|
|
28
28
|
{
|
|
29
29
|
ref,
|
|
30
|
-
onMouseDown: (e) => {
|
|
31
|
-
if (e.button !== 0) {
|
|
32
|
-
onMouseDown?.(e);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
e.preventDefault();
|
|
36
|
-
if (!props.disabled) e.currentTarget.focus();
|
|
37
|
-
onMouseDown?.(e);
|
|
38
|
-
},
|
|
39
30
|
className: cn.cn(
|
|
40
31
|
"inline-flex min-w-0 items-center justify-center",
|
|
41
32
|
"rounded-xs",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsTrigger.cjs","sources":["../../../../src/components/Tabs/TabsTrigger.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Props for the {@link TabsTrigger} button component. */\nexport type TabsTriggerProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>;\n\n/** An interactive tab button that activates its associated {@link TabsContent} panel when clicked. */\nexport const TabsTrigger = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Trigger>,\n TabsTriggerProps\n>(({ className, children,
|
|
1
|
+
{"version":3,"file":"TabsTrigger.cjs","sources":["../../../../src/components/Tabs/TabsTrigger.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Props for the {@link TabsTrigger} button component. */\nexport type TabsTriggerProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>;\n\n/** An interactive tab button that activates its associated {@link TabsContent} panel when clicked. */\nexport const TabsTrigger = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Trigger>,\n TabsTriggerProps\n>(({ className, children, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex min-w-0 items-center justify-center\",\n \"rounded-xs\",\n \"typography-semibold-body-lg cursor-pointer text-foreground-default\",\n \"motion-safe:transition-colors motion-safe:duration-150 motion-safe:ease-in-out\",\n \"data-[orientation=horizontal]:px-4 data-[orientation=horizontal]:py-3\",\n \"data-[orientation=vertical]:justify-start data-[orientation=vertical]:px-4 data-[orientation=vertical]:py-3\",\n \"data-[state=active]:hover:text-neutral-350\",\n \"data-[state=inactive]:hover:text-neutral-300\",\n \"data-[state=active]:active:text-neutral-350\",\n \"data-[state=inactive]:active:text-neutral-300\",\n \"data-disabled:pointer-events-none\",\n \"data-disabled:data-[state=active]:text-neutral-250\",\n \"data-disabled:data-[state=inactive]:text-neutral-300\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-page\",\n className,\n )}\n {...props}\n >\n <span className=\"min-w-0 truncate\">{children}</span>\n </TabsPrimitive.Trigger>\n));\n\nTabsTrigger.displayName = \"TabsTrigger\";\n"],"names":["React","jsx","TabsPrimitive","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAQO,MAAM,cAAcA,iBAAM,WAG/B,CAAC,EAAE,WAAW,UAAU,GAAG,SAAS,QACpCC,2BAAAA;AAAAA,EAACC,yBAAc;AAAA,EAAd;AAAA,IACC;AAAA,IACA,WAAWC,GAAAA;AAAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,IAEJ,UAAAF,2BAAAA,IAAC,QAAA,EAAK,WAAU,oBAAoB,SAAA,CAAS;AAAA,EAAA;AAC/C,CACD;AAED,YAAY,cAAc;;"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -11,6 +11,7 @@ const useAudioRecorder = require("./components/AudioUpload/useAudioRecorder.cjs"
|
|
|
11
11
|
const Autocomplete = require("./components/Autocomplete/Autocomplete.cjs");
|
|
12
12
|
const Avatar = require("./components/Avatar/Avatar.cjs");
|
|
13
13
|
const Badge = require("./components/Badge/Badge.cjs");
|
|
14
|
+
const Banner = require("./components/Banner/Banner.cjs");
|
|
14
15
|
const BottomNavigation = require("./components/BottomNavigation/BottomNavigation.cjs");
|
|
15
16
|
const BottomNavigationAction = require("./components/BottomNavigation/BottomNavigationAction.cjs");
|
|
16
17
|
const Breadcrumb = require("./components/Breadcrumb/Breadcrumb.cjs");
|
|
@@ -22,6 +23,7 @@ const Count = require("./components/Count/Count.cjs");
|
|
|
22
23
|
const Dialog = require("./components/Dialog/Dialog.cjs");
|
|
23
24
|
const Divider = require("./components/Divider/Divider.cjs");
|
|
24
25
|
const Drawer = require("./components/Drawer/Drawer.cjs");
|
|
26
|
+
const DropdownMenu = require("./components/DropdownMenu/DropdownMenu.cjs");
|
|
25
27
|
const IconButton = require("./components/IconButton/IconButton.cjs");
|
|
26
28
|
const AddIcon = require("./components/Icons/AddIcon.cjs");
|
|
27
29
|
const AIIcon = require("./components/Icons/AIIcon.cjs");
|
|
@@ -145,6 +147,7 @@ const InfoBox = require("./components/InfoBox/InfoBox.cjs");
|
|
|
145
147
|
const Loader = require("./components/Loader/Loader.cjs");
|
|
146
148
|
const Logo = require("./components/Logo/Logo.cjs");
|
|
147
149
|
const MobileStepper = require("./components/MobileStepper/MobileStepper.cjs");
|
|
150
|
+
const OnlineBlinkingIcon = require("./components/OnlineBlinkingIcon/OnlineBlinkingIcon.cjs");
|
|
148
151
|
const Pagination = require("./components/Pagination/Pagination.cjs");
|
|
149
152
|
const PasswordField = require("./components/PasswordField/PasswordField.cjs");
|
|
150
153
|
const Pill = require("./components/Pill/Pill.cjs");
|
|
@@ -181,6 +184,7 @@ exports.AvatarFallback = Avatar.AvatarFallback;
|
|
|
181
184
|
exports.AvatarImage = Avatar.AvatarImage;
|
|
182
185
|
exports.AvatarRoot = Avatar.AvatarRoot;
|
|
183
186
|
exports.Badge = Badge.Badge;
|
|
187
|
+
exports.Banner = Banner.Banner;
|
|
184
188
|
exports.BottomNavigation = BottomNavigation.BottomNavigation;
|
|
185
189
|
exports.BottomNavigationAction = BottomNavigationAction.BottomNavigationAction;
|
|
186
190
|
exports.Breadcrumb = Breadcrumb.Breadcrumb;
|
|
@@ -219,6 +223,13 @@ exports.DrawerHeader = Drawer.DrawerHeader;
|
|
|
219
223
|
exports.DrawerOverlay = Drawer.DrawerOverlay;
|
|
220
224
|
exports.DrawerTitle = Drawer.DrawerTitle;
|
|
221
225
|
exports.DrawerTrigger = Drawer.DrawerTrigger;
|
|
226
|
+
exports.DropdownMenu = DropdownMenu.DropdownMenu;
|
|
227
|
+
exports.DropdownMenuContent = DropdownMenu.DropdownMenuContent;
|
|
228
|
+
exports.DropdownMenuGroup = DropdownMenu.DropdownMenuGroup;
|
|
229
|
+
exports.DropdownMenuItem = DropdownMenu.DropdownMenuItem;
|
|
230
|
+
exports.DropdownMenuLabel = DropdownMenu.DropdownMenuLabel;
|
|
231
|
+
exports.DropdownMenuSeparator = DropdownMenu.DropdownMenuSeparator;
|
|
232
|
+
exports.DropdownMenuTrigger = DropdownMenu.DropdownMenuTrigger;
|
|
222
233
|
exports.IconButton = IconButton.IconButton;
|
|
223
234
|
exports.AddIcon = AddIcon.AddIcon;
|
|
224
235
|
exports.AIIcon = AIIcon.AIIcon;
|
|
@@ -344,6 +355,7 @@ exports.InfoBoxTrigger = InfoBox.InfoBoxTrigger;
|
|
|
344
355
|
exports.Loader = Loader.Loader;
|
|
345
356
|
exports.Logo = Logo.Logo;
|
|
346
357
|
exports.MobileStepper = MobileStepper.MobileStepper;
|
|
358
|
+
exports.OnlineBlinkingIcon = OnlineBlinkingIcon.OnlineBlinkingIcon;
|
|
347
359
|
exports.Pagination = Pagination.Pagination;
|
|
348
360
|
exports.PasswordField = PasswordField.PasswordField;
|
|
349
361
|
exports.Pill = Pill.Pill;
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
import { Badge } from "../Badge/Badge.mjs";
|
|
6
|
+
import { Button } from "../Button/Button.mjs";
|
|
7
|
+
import { ArrowRightIcon } from "../Icons/ArrowRightIcon.mjs";
|
|
8
|
+
const VARIANT_GRADIENTS = {
|
|
9
|
+
primary: "from-[var(--primitives-color-green-50)] to-[var(--primitives-color-purple-50)]",
|
|
10
|
+
secondary: "from-[var(--primitives-color-purple-50)] to-[var(--primitives-color-pink-50)]",
|
|
11
|
+
tertiary: "from-[var(--primitives-color-pink-50)] to-[var(--primitives-color-info-50)]"
|
|
12
|
+
};
|
|
13
|
+
const LIGHT_MODE_OVERRIDES = {
|
|
14
|
+
"--color-foreground-default": "#151515ff",
|
|
15
|
+
"--color-foreground-secondary": "#404040ff",
|
|
16
|
+
"--color-neutral-100": "#1515150a"
|
|
17
|
+
};
|
|
18
|
+
const Banner = React.forwardRef(
|
|
19
|
+
({ className, variant = "primary", badgeLabel, heading, description, cta, style, ...props }, ref) => {
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
className: cn(
|
|
25
|
+
"flex flex-col items-start gap-2 rounded-2xl bg-gradient-to-br p-3 text-foreground-default",
|
|
26
|
+
VARIANT_GRADIENTS[variant],
|
|
27
|
+
className
|
|
28
|
+
),
|
|
29
|
+
style: { ...LIGHT_MODE_OVERRIDES, ...style },
|
|
30
|
+
...props,
|
|
31
|
+
children: [
|
|
32
|
+
badgeLabel && /* @__PURE__ */ jsx(Badge, { children: badgeLabel }),
|
|
33
|
+
heading && /* @__PURE__ */ jsx("h3", { className: "typography-semibold-body-md", children: heading }),
|
|
34
|
+
description && /* @__PURE__ */ jsx("p", { className: "typography-regular-body-sm", children: description }),
|
|
35
|
+
cta && /* @__PURE__ */ jsx(
|
|
36
|
+
Button,
|
|
37
|
+
{
|
|
38
|
+
variant: "text",
|
|
39
|
+
onClick: cta.onClick,
|
|
40
|
+
size: "24",
|
|
41
|
+
rightIcon: cta.icon ?? /* @__PURE__ */ jsx(ArrowRightIcon, {}),
|
|
42
|
+
children: cta.label
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
Banner.displayName = "Banner";
|
|
51
|
+
export {
|
|
52
|
+
Banner
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=Banner.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.mjs","sources":["../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Badge } from \"../Badge/Badge\";\nimport { Button } from \"../Button/Button\";\nimport { ArrowRightIcon } from \"../Icons/ArrowRightIcon\";\n\n/** Gradient variant of the banner. */\nexport type BannerVariant = \"primary\" | \"secondary\" | \"tertiary\";\n\nconst VARIANT_GRADIENTS: Record<BannerVariant, string> = {\n primary: \"from-[var(--primitives-color-green-50)] to-[var(--primitives-color-purple-50)]\",\n secondary: \"from-[var(--primitives-color-purple-50)] to-[var(--primitives-color-pink-50)]\",\n tertiary: \"from-[var(--primitives-color-pink-50)] to-[var(--primitives-color-info-50)]\",\n};\n\nexport interface BannerProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Gradient variant controlling the background colours. @default \"primary\" */\n variant?: BannerVariant;\n /** Text rendered inside a `Badge` at the top of the banner. */\n badgeLabel?: string;\n /** Primary heading displayed below the badge. Rendered as an `<h3>`. */\n heading?: React.ReactNode;\n /** Supporting copy displayed below the heading. */\n description?: React.ReactNode;\n /**\n * Call-to-action button config. Renders a text-style `Button` with an arrow icon.\n * Pass `icon` to override the default `ArrowRightIcon`.\n */\n cta?: { label: string; onClick: () => void; icon?: React.ReactNode };\n}\n\n/**\n * Force light-mode semantic tokens on the Banner since its gradient\n * backgrounds are always light regardless of the current colour scheme.\n */\nconst LIGHT_MODE_OVERRIDES: React.CSSProperties = {\n \"--color-foreground-default\": \"#151515ff\",\n \"--color-foreground-secondary\": \"#404040ff\",\n \"--color-neutral-100\": \"#1515150a\",\n} as React.CSSProperties;\n\n/**\n * A promotional banner card with gradient backgrounds, optional badge,\n * heading, description, and call-to-action button.\n *\n * @example\n * ```tsx\n * <Banner\n * variant=\"primary\"\n * badgeLabel=\"New\"\n * heading=\"Boost your earnings\"\n * description=\"Try our latest feature to grow faster.\"\n * cta={{ label: \"Learn more\", onClick: handleClick }}\n * />\n * ```\n */\nexport const Banner = React.forwardRef<HTMLDivElement, BannerProps>(\n (\n { className, variant = \"primary\", badgeLabel, heading, description, cta, style, ...props },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col items-start gap-2 rounded-2xl bg-gradient-to-br p-3 text-foreground-default\",\n VARIANT_GRADIENTS[variant],\n className,\n )}\n style={{ ...LIGHT_MODE_OVERRIDES, ...style }}\n {...props}\n >\n {badgeLabel && <Badge>{badgeLabel}</Badge>}\n {heading && <h3 className=\"typography-semibold-body-md\">{heading}</h3>}\n {description && <p className=\"typography-regular-body-sm\">{description}</p>}\n {cta && (\n <Button\n variant=\"text\"\n onClick={cta.onClick}\n size=\"24\"\n rightIcon={cta.icon ?? <ArrowRightIcon />}\n >\n {cta.label}\n </Button>\n )}\n </div>\n );\n },\n);\n\nBanner.displayName = \"Banner\";\n"],"names":[],"mappings":";;;;;;;AASA,MAAM,oBAAmD;AAAA,EACvD,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AACZ;AAsBA,MAAM,uBAA4C;AAAA,EAChD,8BAA8B;AAAA,EAC9B,gCAAgC;AAAA,EAChC,uBAAuB;AACzB;AAiBO,MAAM,SAAS,MAAM;AAAA,EAC1B,CACE,EAAE,WAAW,UAAU,WAAW,YAAY,SAAS,aAAa,KAAK,OAAO,GAAG,MAAA,GACnF,QACG;AACH,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA,kBAAkB,OAAO;AAAA,UACzB;AAAA,QAAA;AAAA,QAEF,OAAO,EAAE,GAAG,sBAAsB,GAAG,MAAA;AAAA,QACpC,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,cAAc,oBAAC,SAAO,UAAA,WAAA,CAAW;AAAA,UACjC,WAAW,oBAAC,MAAA,EAAG,WAAU,+BAA+B,UAAA,SAAQ;AAAA,UAChE,eAAe,oBAAC,KAAA,EAAE,WAAU,8BAA8B,UAAA,aAAY;AAAA,UACtE,OACC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,SAAQ;AAAA,cACR,SAAS,IAAI;AAAA,cACb,MAAK;AAAA,cACL,WAAW,IAAI,QAAQ,oBAAC,gBAAA,CAAA,CAAe;AAAA,cAEtC,UAAA,IAAI;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,OAAO,cAAc;"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "../../utils/cn.mjs";
|
|
6
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
7
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
8
|
+
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
9
|
+
const DropdownMenuContent = React.forwardRef(({ className, style, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
10
|
+
DropdownMenuPrimitive.Content,
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
sideOffset,
|
|
14
|
+
className: cn(
|
|
15
|
+
"min-w-[180px] overflow-y-auto rounded-lg border border-neutral-200 bg-surface-page p-1 shadow-lg",
|
|
16
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
17
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
18
|
+
"data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2",
|
|
19
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
20
|
+
className
|
|
21
|
+
),
|
|
22
|
+
style: {
|
|
23
|
+
zIndex: "var(--fanvue-ui-portal-z-index, 50)",
|
|
24
|
+
maxHeight: "var(--radix-dropdown-menu-content-available-height)",
|
|
25
|
+
...style
|
|
26
|
+
},
|
|
27
|
+
...props
|
|
28
|
+
}
|
|
29
|
+
) }));
|
|
30
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
31
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
32
|
+
DropdownMenuGroup.displayName = "DropdownMenuGroup";
|
|
33
|
+
const DropdownMenuLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
34
|
+
DropdownMenuPrimitive.Label,
|
|
35
|
+
{
|
|
36
|
+
ref,
|
|
37
|
+
className: cn("typography-medium-body-xs px-2 py-1.5 text-foreground-secondary", className),
|
|
38
|
+
...props
|
|
39
|
+
}
|
|
40
|
+
));
|
|
41
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
42
|
+
const DropdownMenuItem = React.forwardRef(
|
|
43
|
+
({
|
|
44
|
+
size = "sm",
|
|
45
|
+
destructive,
|
|
46
|
+
leadingIcon,
|
|
47
|
+
trailingIcon,
|
|
48
|
+
selected,
|
|
49
|
+
className,
|
|
50
|
+
children,
|
|
51
|
+
asChild,
|
|
52
|
+
...props
|
|
53
|
+
}, ref) => {
|
|
54
|
+
const itemClassName = cn(
|
|
55
|
+
"flex w-full cursor-pointer items-center gap-1 rounded px-2 outline-none",
|
|
56
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
57
|
+
"data-[highlighted]:bg-neutral-100",
|
|
58
|
+
size === "sm" ? "min-h-[34px] py-1" : "min-h-[40px] py-1.5",
|
|
59
|
+
size === "sm" ? "typography-medium-body-sm" : "typography-medium-body-md",
|
|
60
|
+
destructive && "text-error-default",
|
|
61
|
+
selected && "bg-success-background",
|
|
62
|
+
className
|
|
63
|
+
);
|
|
64
|
+
if (asChild) {
|
|
65
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, { ref, asChild: true, className: itemClassName, ...props, children });
|
|
66
|
+
}
|
|
67
|
+
return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.Item, { ref, className: itemClassName, ...props, children: [
|
|
68
|
+
leadingIcon,
|
|
69
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1", children }),
|
|
70
|
+
trailingIcon
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
75
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
76
|
+
DropdownMenuPrimitive.Separator,
|
|
77
|
+
{
|
|
78
|
+
ref,
|
|
79
|
+
className: cn("my-1 h-px bg-neutral-200", className),
|
|
80
|
+
...props
|
|
81
|
+
}
|
|
82
|
+
));
|
|
83
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
84
|
+
export {
|
|
85
|
+
DropdownMenu,
|
|
86
|
+
DropdownMenuContent,
|
|
87
|
+
DropdownMenuGroup,
|
|
88
|
+
DropdownMenuItem,
|
|
89
|
+
DropdownMenuLabel,
|
|
90
|
+
DropdownMenuSeparator,
|
|
91
|
+
DropdownMenuTrigger
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=DropdownMenu.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownMenu.mjs","sources":["../../../src/components/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Props for the {@link DropdownMenu} root component. */\nexport interface DropdownMenuProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {}\n\n/** Root component that manages open/close state for a dropdown menu. */\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\n\n/** Props for the {@link DropdownMenuTrigger} component. */\nexport type DropdownMenuTriggerProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Trigger\n>;\n\n/** The element that toggles the dropdown menu when clicked. */\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nDropdownMenuTrigger.displayName = \"DropdownMenuTrigger\";\n\n/** Props for the {@link DropdownMenuContent} component. */\nexport interface DropdownMenuContentProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {}\n\n/**\n * The positioned content panel rendered inside a portal.\n *\n * Override the portal z-index per-instance via `style={{ zIndex: 1500 }}` or\n * globally with the `--fanvue-ui-portal-z-index` CSS custom property.\n *\n * @example\n * ```tsx\n * <DropdownMenu>\n * <DropdownMenuTrigger asChild>\n * <Button>Open</Button>\n * </DropdownMenuTrigger>\n * <DropdownMenuContent>\n * <DropdownMenuItem>Option 1</DropdownMenuItem>\n * <DropdownMenuItem>Option 2</DropdownMenuItem>\n * </DropdownMenuContent>\n * </DropdownMenu>\n * ```\n */\nexport const DropdownMenuContent = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Content>,\n DropdownMenuContentProps\n>(({ className, style, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"min-w-[180px] overflow-y-auto rounded-lg border border-neutral-200 bg-surface-page p-1 shadow-lg\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n \"data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2\",\n \"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2\",\n className,\n )}\n style={{\n zIndex: \"var(--fanvue-ui-portal-z-index, 50)\",\n maxHeight: \"var(--radix-dropdown-menu-content-available-height)\",\n ...style,\n }}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\n/** Props for the {@link DropdownMenuGroup} component. */\nexport type DropdownMenuGroupProps = React.ComponentPropsWithoutRef<\n typeof DropdownMenuPrimitive.Group\n>;\n\n/** Groups related menu items. Accepts an optional `DropdownMenuLabel`. */\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nDropdownMenuGroup.displayName = \"DropdownMenuGroup\";\n\n/** Props for the {@link DropdownMenuLabel} component. */\nexport interface DropdownMenuLabelProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {}\n\n/** A label for a group of items. Not focusable or selectable. */\nexport const DropdownMenuLabel = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Label>,\n DropdownMenuLabelProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"typography-medium-body-xs px-2 py-1.5 text-foreground-secondary\", className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\n/** Available sizes for a dropdown menu item. */\nexport type DropdownMenuItemSize = \"sm\" | \"md\";\n\nexport interface DropdownMenuItemProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {\n /** Height of the menu item row. @default \"sm\" */\n size?: DropdownMenuItemSize;\n /** Whether the item uses destructive (error) styling. */\n destructive?: boolean;\n /** Icon rendered before the label. */\n leadingIcon?: React.ReactNode;\n /** Icon rendered after the label. */\n trailingIcon?: React.ReactNode;\n /** Whether the item is in a selected state. */\n selected?: boolean;\n}\n\n/**\n * An individual item within a {@link DropdownMenuContent}.\n *\n * @example\n * ```tsx\n * <DropdownMenuItem>Edit profile</DropdownMenuItem>\n * <DropdownMenuItem destructive>Delete</DropdownMenuItem>\n * <DropdownMenuItem leadingIcon={<EditIcon />}>Edit</DropdownMenuItem>\n *\n * // As a link\n * <DropdownMenuItem asChild>\n * <a href=\"/settings\">Settings</a>\n * </DropdownMenuItem>\n * ```\n */\nexport const DropdownMenuItem = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Item>,\n DropdownMenuItemProps\n>(\n (\n {\n size = \"sm\",\n destructive,\n leadingIcon,\n trailingIcon,\n selected,\n className,\n children,\n asChild,\n ...props\n },\n ref,\n ) => {\n const itemClassName = cn(\n \"flex w-full cursor-pointer items-center gap-1 rounded px-2 outline-none\",\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50\",\n \"data-[highlighted]:bg-neutral-100\",\n size === \"sm\" ? \"min-h-[34px] py-1\" : \"min-h-[40px] py-1.5\",\n size === \"sm\" ? \"typography-medium-body-sm\" : \"typography-medium-body-md\",\n destructive && \"text-error-default\",\n selected && \"bg-success-background\",\n className,\n );\n\n if (asChild) {\n return (\n <DropdownMenuPrimitive.Item ref={ref} asChild className={itemClassName} {...props}>\n {children}\n </DropdownMenuPrimitive.Item>\n );\n }\n\n return (\n <DropdownMenuPrimitive.Item ref={ref} className={itemClassName} {...props}>\n {leadingIcon}\n <span className=\"flex-1\">{children}</span>\n {trailingIcon}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\n/** Props for the {@link DropdownMenuSeparator} component. */\nexport interface DropdownMenuSeparatorProps\n extends React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> {}\n\n/** Visual separator between groups of items. */\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof DropdownMenuPrimitive.Separator>,\n DropdownMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"my-1 h-px bg-neutral-200\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n"],"names":[],"mappings":";;;;;AASO,MAAM,eAAe,sBAAsB;AAQ3C,MAAM,sBAAsB,sBAAsB;AACzD,oBAAoB,cAAc;AAyB3B,MAAM,sBAAsB,MAAM,WAGvC,CAAC,EAAE,WAAW,OAAO,aAAa,GAAG,GAAG,SAAS,QACjD,oBAAC,sBAAsB,QAAtB,EACC,UAAA;AAAA,EAAC,sBAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,GAAG;AAAA,IAAA;AAAA,IAEJ,GAAG;AAAA,EAAA;AACN,GACF,CACD;AACD,oBAAoB,cAAc;AAQ3B,MAAM,oBAAoB,sBAAsB;AACvD,kBAAkB,cAAc;AAOzB,MAAM,oBAAoB,MAAM,WAGrC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,sBAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,mEAAmE,SAAS;AAAA,IACzF,GAAG;AAAA,EAAA;AACN,CACD;AACD,kBAAkB,cAAc;AAkCzB,MAAM,mBAAmB,MAAM;AAAA,EAIpC,CACE;AAAA,IACE,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,gBAAgB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,OAAO,sBAAsB;AAAA,MACtC,SAAS,OAAO,8BAA8B;AAAA,MAC9C,eAAe;AAAA,MACf,YAAY;AAAA,MACZ;AAAA,IAAA;AAGF,QAAI,SAAS;AACX,aACE,oBAAC,sBAAsB,MAAtB,EAA2B,KAAU,SAAO,MAAC,WAAW,eAAgB,GAAG,OACzE,SAAA,CACH;AAAA,IAEJ;AAEA,WACE,qBAAC,sBAAsB,MAAtB,EAA2B,KAAU,WAAW,eAAgB,GAAG,OACjE,UAAA;AAAA,MAAA;AAAA,MACD,oBAAC,QAAA,EAAK,WAAU,UAAU,SAAA,CAAS;AAAA,MAClC;AAAA,IAAA,GACH;AAAA,EAEJ;AACF;AACA,iBAAiB,cAAc;AAOxB,MAAM,wBAAwB,MAAM,WAGzC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,sBAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,4BAA4B,SAAS;AAAA,IAClD,GAAG;AAAA,EAAA;AACN,CACD;AACD,sBAAsB,cAAc;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const sizeClasses = {
|
|
6
|
+
sm: "h-2 w-2",
|
|
7
|
+
md: "h-3 w-3"
|
|
8
|
+
};
|
|
9
|
+
const OnlineBlinkingIcon = React.forwardRef(
|
|
10
|
+
({ className, size = "sm", ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
11
|
+
"span",
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
className: cn("relative inline-block rounded-full", sizeClasses[size], className),
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
...props,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-0 animate-ping rounded-full bg-success-default opacity-75" }),
|
|
19
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-full bg-success-default" })
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
OnlineBlinkingIcon.displayName = "OnlineBlinkingIcon";
|
|
25
|
+
export {
|
|
26
|
+
OnlineBlinkingIcon
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=OnlineBlinkingIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnlineBlinkingIcon.mjs","sources":["../../../src/components/OnlineBlinkingIcon/OnlineBlinkingIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nexport type OnlineBlinkingIconSize = \"sm\" | \"md\";\n\nexport interface OnlineBlinkingIconProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** @default \"sm\" */\n size?: OnlineBlinkingIconSize;\n}\n\nconst sizeClasses: Record<OnlineBlinkingIconSize, string> = {\n sm: \"h-2 w-2\",\n md: \"h-3 w-3\",\n};\n\n/**\n * A small pulsing green dot indicator used to show online status.\n * Decorative only — pair with a visually-hidden label at the usage site\n * to convey status to screen readers.\n *\n * @example\n * ```tsx\n * <OnlineBlinkingIcon />\n * <OnlineBlinkingIcon size=\"md\" />\n * ```\n */\nexport const OnlineBlinkingIcon = React.forwardRef<HTMLSpanElement, OnlineBlinkingIconProps>(\n ({ className, size = \"sm\", ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\"relative inline-block rounded-full\", sizeClasses[size], className)}\n aria-hidden=\"true\"\n {...props}\n >\n <span className=\"absolute inset-0 animate-ping rounded-full bg-success-default opacity-75\" />\n <span className=\"absolute inset-0 rounded-full bg-success-default\" />\n </span>\n ),\n);\n\nOnlineBlinkingIcon.displayName = \"OnlineBlinkingIcon\";\n"],"names":[],"mappings":";;;;AAUA,MAAM,cAAsD;AAAA,EAC1D,IAAI;AAAA,EACJ,IAAI;AACN;AAaO,MAAM,qBAAqB,MAAM;AAAA,EACtC,CAAC,EAAE,WAAW,OAAO,MAAM,GAAG,MAAA,GAAS,QACrC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,sCAAsC,YAAY,IAAI,GAAG,SAAS;AAAA,MAChF,eAAY;AAAA,MACX,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA,oBAAC,QAAA,EAAK,WAAU,2EAAA,CAA2E;AAAA,QAC3F,oBAAC,QAAA,EAAK,WAAU,mDAAA,CAAmD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGzE;AAEA,mBAAmB,cAAc;"}
|
|
@@ -3,19 +3,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { cn } from "../../utils/cn.mjs";
|
|
6
|
-
const TabsTrigger = React.forwardRef(({ className, children,
|
|
6
|
+
const TabsTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
7
|
TabsPrimitive.Trigger,
|
|
8
8
|
{
|
|
9
9
|
ref,
|
|
10
|
-
onMouseDown: (e) => {
|
|
11
|
-
if (e.button !== 0) {
|
|
12
|
-
onMouseDown?.(e);
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
e.preventDefault();
|
|
16
|
-
if (!props.disabled) e.currentTarget.focus();
|
|
17
|
-
onMouseDown?.(e);
|
|
18
|
-
},
|
|
19
10
|
className: cn(
|
|
20
11
|
"inline-flex min-w-0 items-center justify-center",
|
|
21
12
|
"rounded-xs",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsTrigger.mjs","sources":["../../../src/components/Tabs/TabsTrigger.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Props for the {@link TabsTrigger} button component. */\nexport type TabsTriggerProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>;\n\n/** An interactive tab button that activates its associated {@link TabsContent} panel when clicked. */\nexport const TabsTrigger = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Trigger>,\n TabsTriggerProps\n>(({ className, children,
|
|
1
|
+
{"version":3,"file":"TabsTrigger.mjs","sources":["../../../src/components/Tabs/TabsTrigger.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\n/** Props for the {@link TabsTrigger} button component. */\nexport type TabsTriggerProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>;\n\n/** An interactive tab button that activates its associated {@link TabsContent} panel when clicked. */\nexport const TabsTrigger = React.forwardRef<\n React.ComponentRef<typeof TabsPrimitive.Trigger>,\n TabsTriggerProps\n>(({ className, children, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex min-w-0 items-center justify-center\",\n \"rounded-xs\",\n \"typography-semibold-body-lg cursor-pointer text-foreground-default\",\n \"motion-safe:transition-colors motion-safe:duration-150 motion-safe:ease-in-out\",\n \"data-[orientation=horizontal]:px-4 data-[orientation=horizontal]:py-3\",\n \"data-[orientation=vertical]:justify-start data-[orientation=vertical]:px-4 data-[orientation=vertical]:py-3\",\n \"data-[state=active]:hover:text-neutral-350\",\n \"data-[state=inactive]:hover:text-neutral-300\",\n \"data-[state=active]:active:text-neutral-350\",\n \"data-[state=inactive]:active:text-neutral-300\",\n \"data-disabled:pointer-events-none\",\n \"data-disabled:data-[state=active]:text-neutral-250\",\n \"data-disabled:data-[state=inactive]:text-neutral-300\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-page\",\n className,\n )}\n {...props}\n >\n <span className=\"min-w-0 truncate\">{children}</span>\n </TabsPrimitive.Trigger>\n));\n\nTabsTrigger.displayName = \"TabsTrigger\";\n"],"names":[],"mappings":";;;;;AAQO,MAAM,cAAc,MAAM,WAG/B,CAAC,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC;AAAA,EAAC,cAAc;AAAA,EAAd;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,IAEJ,UAAA,oBAAC,QAAA,EAAK,WAAU,oBAAoB,SAAA,CAAS;AAAA,EAAA;AAC/C,CACD;AAED,YAAY,cAAc;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
4
4
|
import { ClassValue } from 'clsx';
|
|
5
5
|
import { default as default_2 } from 'react';
|
|
6
6
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
7
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
7
8
|
import { JSX } from 'react/jsx-runtime';
|
|
8
9
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
9
10
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
@@ -370,6 +371,46 @@ export declare const BankIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttr
|
|
|
370
371
|
className?: string;
|
|
371
372
|
} & React_2.RefAttributes<SVGSVGElement>>;
|
|
372
373
|
|
|
374
|
+
/**
|
|
375
|
+
* A promotional banner card with gradient backgrounds, optional badge,
|
|
376
|
+
* heading, description, and call-to-action button.
|
|
377
|
+
*
|
|
378
|
+
* @example
|
|
379
|
+
* ```tsx
|
|
380
|
+
* <Banner
|
|
381
|
+
* variant="primary"
|
|
382
|
+
* badgeLabel="New"
|
|
383
|
+
* heading="Boost your earnings"
|
|
384
|
+
* description="Try our latest feature to grow faster."
|
|
385
|
+
* cta={{ label: "Learn more", onClick: handleClick }}
|
|
386
|
+
* />
|
|
387
|
+
* ```
|
|
388
|
+
*/
|
|
389
|
+
export declare const Banner: React_2.ForwardRefExoticComponent<BannerProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
390
|
+
|
|
391
|
+
export declare interface BannerProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
392
|
+
/** Gradient variant controlling the background colours. @default "primary" */
|
|
393
|
+
variant?: BannerVariant;
|
|
394
|
+
/** Text rendered inside a `Badge` at the top of the banner. */
|
|
395
|
+
badgeLabel?: string;
|
|
396
|
+
/** Primary heading displayed below the badge. Rendered as an `<h3>`. */
|
|
397
|
+
heading?: React_2.ReactNode;
|
|
398
|
+
/** Supporting copy displayed below the heading. */
|
|
399
|
+
description?: React_2.ReactNode;
|
|
400
|
+
/**
|
|
401
|
+
* Call-to-action button config. Renders a text-style `Button` with an arrow icon.
|
|
402
|
+
* Pass `icon` to override the default `ArrowRightIcon`.
|
|
403
|
+
*/
|
|
404
|
+
cta?: {
|
|
405
|
+
label: string;
|
|
406
|
+
onClick: () => void;
|
|
407
|
+
icon?: React_2.ReactNode;
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/** Gradient variant of the banner. */
|
|
412
|
+
export declare type BannerVariant = "primary" | "secondary" | "tertiary";
|
|
413
|
+
|
|
373
414
|
export declare const BellIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
|
|
374
415
|
className?: string;
|
|
375
416
|
} & React_2.RefAttributes<SVGSVGElement>>;
|
|
@@ -1104,6 +1145,97 @@ export declare const DrawerTrigger: React_2.ForwardRefExoticComponent<DialogPrim
|
|
|
1104
1145
|
/** Props for the {@link DrawerTrigger} component. */
|
|
1105
1146
|
export declare type DrawerTriggerProps = React_2.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
|
|
1106
1147
|
|
|
1148
|
+
/** Root component that manages open/close state for a dropdown menu. */
|
|
1149
|
+
export declare const DropdownMenu: React_2.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* The positioned content panel rendered inside a portal.
|
|
1153
|
+
*
|
|
1154
|
+
* Override the portal z-index per-instance via `style={{ zIndex: 1500 }}` or
|
|
1155
|
+
* globally with the `--fanvue-ui-portal-z-index` CSS custom property.
|
|
1156
|
+
*
|
|
1157
|
+
* @example
|
|
1158
|
+
* ```tsx
|
|
1159
|
+
* <DropdownMenu>
|
|
1160
|
+
* <DropdownMenuTrigger asChild>
|
|
1161
|
+
* <Button>Open</Button>
|
|
1162
|
+
* </DropdownMenuTrigger>
|
|
1163
|
+
* <DropdownMenuContent>
|
|
1164
|
+
* <DropdownMenuItem>Option 1</DropdownMenuItem>
|
|
1165
|
+
* <DropdownMenuItem>Option 2</DropdownMenuItem>
|
|
1166
|
+
* </DropdownMenuContent>
|
|
1167
|
+
* </DropdownMenu>
|
|
1168
|
+
* ```
|
|
1169
|
+
*/
|
|
1170
|
+
export declare const DropdownMenuContent: React_2.ForwardRefExoticComponent<DropdownMenuContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1171
|
+
|
|
1172
|
+
/** Props for the {@link DropdownMenuContent} component. */
|
|
1173
|
+
export declare interface DropdownMenuContentProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> {
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
/** Groups related menu items. Accepts an optional `DropdownMenuLabel`. */
|
|
1177
|
+
export declare const DropdownMenuGroup: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1178
|
+
|
|
1179
|
+
/** Props for the {@link DropdownMenuGroup} component. */
|
|
1180
|
+
export declare type DropdownMenuGroupProps = React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>;
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* An individual item within a {@link DropdownMenuContent}.
|
|
1184
|
+
*
|
|
1185
|
+
* @example
|
|
1186
|
+
* ```tsx
|
|
1187
|
+
* <DropdownMenuItem>Edit profile</DropdownMenuItem>
|
|
1188
|
+
* <DropdownMenuItem destructive>Delete</DropdownMenuItem>
|
|
1189
|
+
* <DropdownMenuItem leadingIcon={<EditIcon />}>Edit</DropdownMenuItem>
|
|
1190
|
+
*
|
|
1191
|
+
* // As a link
|
|
1192
|
+
* <DropdownMenuItem asChild>
|
|
1193
|
+
* <a href="/settings">Settings</a>
|
|
1194
|
+
* </DropdownMenuItem>
|
|
1195
|
+
* ```
|
|
1196
|
+
*/
|
|
1197
|
+
export declare const DropdownMenuItem: React_2.ForwardRefExoticComponent<DropdownMenuItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1198
|
+
|
|
1199
|
+
export declare interface DropdownMenuItemProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> {
|
|
1200
|
+
/** Height of the menu item row. @default "sm" */
|
|
1201
|
+
size?: DropdownMenuItemSize;
|
|
1202
|
+
/** Whether the item uses destructive (error) styling. */
|
|
1203
|
+
destructive?: boolean;
|
|
1204
|
+
/** Icon rendered before the label. */
|
|
1205
|
+
leadingIcon?: React_2.ReactNode;
|
|
1206
|
+
/** Icon rendered after the label. */
|
|
1207
|
+
trailingIcon?: React_2.ReactNode;
|
|
1208
|
+
/** Whether the item is in a selected state. */
|
|
1209
|
+
selected?: boolean;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/** Available sizes for a dropdown menu item. */
|
|
1213
|
+
export declare type DropdownMenuItemSize = "sm" | "md";
|
|
1214
|
+
|
|
1215
|
+
/** A label for a group of items. Not focusable or selectable. */
|
|
1216
|
+
export declare const DropdownMenuLabel: React_2.ForwardRefExoticComponent<DropdownMenuLabelProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1217
|
+
|
|
1218
|
+
/** Props for the {@link DropdownMenuLabel} component. */
|
|
1219
|
+
export declare interface DropdownMenuLabelProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> {
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
/** Props for the {@link DropdownMenu} root component. */
|
|
1223
|
+
export declare interface DropdownMenuProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root> {
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/** Visual separator between groups of items. */
|
|
1227
|
+
export declare const DropdownMenuSeparator: React_2.ForwardRefExoticComponent<DropdownMenuSeparatorProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1228
|
+
|
|
1229
|
+
/** Props for the {@link DropdownMenuSeparator} component. */
|
|
1230
|
+
export declare interface DropdownMenuSeparatorProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> {
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
/** The element that toggles the dropdown menu when clicked. */
|
|
1234
|
+
export declare const DropdownMenuTrigger: React_2.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
1235
|
+
|
|
1236
|
+
/** Props for the {@link DropdownMenuTrigger} component. */
|
|
1237
|
+
export declare type DropdownMenuTriggerProps = React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Trigger>;
|
|
1238
|
+
|
|
1107
1239
|
export declare const EditIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
|
|
1108
1240
|
className?: string;
|
|
1109
1241
|
} & React_2.RefAttributes<SVGSVGElement>>;
|
|
@@ -1475,6 +1607,26 @@ export declare const MoreVerticalIcon: React_2.ForwardRefExoticComponent<React_2
|
|
|
1475
1607
|
*/
|
|
1476
1608
|
export declare type OmitDistributed<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
1477
1609
|
|
|
1610
|
+
/**
|
|
1611
|
+
* A small pulsing green dot indicator used to show online status.
|
|
1612
|
+
* Decorative only — pair with a visually-hidden label at the usage site
|
|
1613
|
+
* to convey status to screen readers.
|
|
1614
|
+
*
|
|
1615
|
+
* @example
|
|
1616
|
+
* ```tsx
|
|
1617
|
+
* <OnlineBlinkingIcon />
|
|
1618
|
+
* <OnlineBlinkingIcon size="md" />
|
|
1619
|
+
* ```
|
|
1620
|
+
*/
|
|
1621
|
+
export declare const OnlineBlinkingIcon: React_2.ForwardRefExoticComponent<OnlineBlinkingIconProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
1622
|
+
|
|
1623
|
+
export declare interface OnlineBlinkingIconProps extends React_2.HTMLAttributes<HTMLSpanElement> {
|
|
1624
|
+
/** @default "sm" */
|
|
1625
|
+
size?: OnlineBlinkingIconSize;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
export declare type OnlineBlinkingIconSize = "sm" | "md";
|
|
1629
|
+
|
|
1478
1630
|
/**
|
|
1479
1631
|
* Page navigation control with previous/next buttons and numbered page
|
|
1480
1632
|
* indicators. Supports a numbered-buttons layout (`"default"`) and a compact
|
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { useAudioRecorder } from "./components/AudioUpload/useAudioRecorder.mjs"
|
|
|
9
9
|
import { Autocomplete } from "./components/Autocomplete/Autocomplete.mjs";
|
|
10
10
|
import { Avatar, AvatarFallback, AvatarImage, AvatarRoot } from "./components/Avatar/Avatar.mjs";
|
|
11
11
|
import { Badge } from "./components/Badge/Badge.mjs";
|
|
12
|
+
import { Banner } from "./components/Banner/Banner.mjs";
|
|
12
13
|
import { BottomNavigation } from "./components/BottomNavigation/BottomNavigation.mjs";
|
|
13
14
|
import { BottomNavigationAction } from "./components/BottomNavigation/BottomNavigationAction.mjs";
|
|
14
15
|
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./components/Breadcrumb/Breadcrumb.mjs";
|
|
@@ -20,6 +21,7 @@ import { Count } from "./components/Count/Count.mjs";
|
|
|
20
21
|
import { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger } from "./components/Dialog/Dialog.mjs";
|
|
21
22
|
import { Divider } from "./components/Divider/Divider.mjs";
|
|
22
23
|
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerTitle, DrawerTrigger } from "./components/Drawer/Drawer.mjs";
|
|
24
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "./components/DropdownMenu/DropdownMenu.mjs";
|
|
23
25
|
import { IconButton } from "./components/IconButton/IconButton.mjs";
|
|
24
26
|
import { AddIcon } from "./components/Icons/AddIcon.mjs";
|
|
25
27
|
import { AIIcon } from "./components/Icons/AIIcon.mjs";
|
|
@@ -143,6 +145,7 @@ import { InfoBox, InfoBoxContent, InfoBoxTrigger } from "./components/InfoBox/In
|
|
|
143
145
|
import { Loader } from "./components/Loader/Loader.mjs";
|
|
144
146
|
import { Logo } from "./components/Logo/Logo.mjs";
|
|
145
147
|
import { MobileStepper } from "./components/MobileStepper/MobileStepper.mjs";
|
|
148
|
+
import { OnlineBlinkingIcon } from "./components/OnlineBlinkingIcon/OnlineBlinkingIcon.mjs";
|
|
146
149
|
import { Pagination } from "./components/Pagination/Pagination.mjs";
|
|
147
150
|
import { PasswordField } from "./components/PasswordField/PasswordField.mjs";
|
|
148
151
|
import { Pill } from "./components/Pill/Pill.mjs";
|
|
@@ -188,6 +191,7 @@ export {
|
|
|
188
191
|
AvatarRoot,
|
|
189
192
|
Badge,
|
|
190
193
|
BankIcon,
|
|
194
|
+
Banner,
|
|
191
195
|
BellIcon,
|
|
192
196
|
BellOffIcon,
|
|
193
197
|
BoltIcon,
|
|
@@ -254,6 +258,13 @@ export {
|
|
|
254
258
|
DrawerOverlay,
|
|
255
259
|
DrawerTitle,
|
|
256
260
|
DrawerTrigger,
|
|
261
|
+
DropdownMenu,
|
|
262
|
+
DropdownMenuContent,
|
|
263
|
+
DropdownMenuGroup,
|
|
264
|
+
DropdownMenuItem,
|
|
265
|
+
DropdownMenuLabel,
|
|
266
|
+
DropdownMenuSeparator,
|
|
267
|
+
DropdownMenuTrigger,
|
|
257
268
|
EditIcon,
|
|
258
269
|
EmojiIcon,
|
|
259
270
|
ErrorCircleIcon,
|
|
@@ -299,6 +310,7 @@ export {
|
|
|
299
310
|
MoonIcon,
|
|
300
311
|
MoreIcon,
|
|
301
312
|
MoreVerticalIcon,
|
|
313
|
+
OnlineBlinkingIcon,
|
|
302
314
|
Pagination,
|
|
303
315
|
PasswordField,
|
|
304
316
|
PauseIcon,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fanvue/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
4
4
|
"description": "React component library built with Tailwind CSS for Fanvue ecosystem",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org",
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"@radix-ui/react-avatar": "1.1.11",
|
|
92
92
|
"@radix-ui/react-checkbox": "1.3.3",
|
|
93
93
|
"@radix-ui/react-dialog": "1.1.15",
|
|
94
|
+
"@radix-ui/react-dropdown-menu": "2.1.16",
|
|
94
95
|
"@radix-ui/react-popover": "1.1.15",
|
|
95
96
|
"@radix-ui/react-radio-group": "1.3.8",
|
|
96
97
|
"@radix-ui/react-select": "2.2.6",
|