@popgrids/ui 0.0.31 → 0.0.32
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/avatar.cjs +163 -0
- package/dist/avatar.cjs.map +1 -0
- package/dist/avatar.d.cts +41 -0
- package/dist/avatar.d.ts +41 -0
- package/dist/avatar.js +156 -0
- package/dist/avatar.js.map +1 -0
- package/dist/index.cjs +151 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +147 -54
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/notification-badge.cjs.map +1 -1
- package/dist/notification-badge.d.cts +4 -10
- package/dist/notification-badge.d.ts +4 -10
- package/dist/notification-badge.js.map +1 -1
- package/dist/types.d-DDkXskpi.d.cts +10 -0
- package/dist/types.d-DDkXskpi.d.ts +10 -0
- package/package.json +11 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { Avatar, AvatarBadge, AvatarBadgeProps, AvatarFallback, AvatarFallbackProps, AvatarGroup, AvatarGroupCount, AvatarGroupCountProps, AvatarGroupProps, AvatarImage, AvatarImageProps, AvatarProps, AvatarSize } from './avatar.cjs';
|
|
1
2
|
export { BannerNotification, BannerNotificationProps, BannerNotificationTheme, BannerNotificationVariant } from './banner-notification.cjs';
|
|
2
3
|
export { Button, ButtonProps } from './button.cjs';
|
|
3
4
|
export { ButtonLink, ButtonLinkProps } from './button-link.cjs';
|
|
@@ -20,12 +21,14 @@ export { Textarea, TextareaProps } from './textarea.cjs';
|
|
|
20
21
|
export { TemplateHeader, TemplateHeaderProps } from './template-header.cjs';
|
|
21
22
|
export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip.cjs';
|
|
22
23
|
import 'react/jsx-runtime';
|
|
24
|
+
import '@base-ui/react/avatar';
|
|
25
|
+
import 'react';
|
|
26
|
+
import './types.d-DDkXskpi.cjs';
|
|
27
|
+
import '@base-ui/react/use-render';
|
|
23
28
|
import 'class-variance-authority/types';
|
|
24
29
|
import 'class-variance-authority';
|
|
25
|
-
import 'react';
|
|
26
30
|
import '@base-ui/react/button';
|
|
27
31
|
import '@base-ui/react/checkbox';
|
|
28
32
|
import '@base-ui/react/dialog';
|
|
29
33
|
import '@base-ui/react/menu';
|
|
30
|
-
import '@base-ui/react/use-render';
|
|
31
34
|
import '@base-ui/react/tooltip';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { Avatar, AvatarBadge, AvatarBadgeProps, AvatarFallback, AvatarFallbackProps, AvatarGroup, AvatarGroupCount, AvatarGroupCountProps, AvatarGroupProps, AvatarImage, AvatarImageProps, AvatarProps, AvatarSize } from './avatar.js';
|
|
1
2
|
export { BannerNotification, BannerNotificationProps, BannerNotificationTheme, BannerNotificationVariant } from './banner-notification.js';
|
|
2
3
|
export { Button, ButtonProps } from './button.js';
|
|
3
4
|
export { ButtonLink, ButtonLinkProps } from './button-link.js';
|
|
@@ -20,12 +21,14 @@ export { Textarea, TextareaProps } from './textarea.js';
|
|
|
20
21
|
export { TemplateHeader, TemplateHeaderProps } from './template-header.js';
|
|
21
22
|
export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip.js';
|
|
22
23
|
import 'react/jsx-runtime';
|
|
24
|
+
import '@base-ui/react/avatar';
|
|
25
|
+
import 'react';
|
|
26
|
+
import './types.d-DDkXskpi.js';
|
|
27
|
+
import '@base-ui/react/use-render';
|
|
23
28
|
import 'class-variance-authority/types';
|
|
24
29
|
import 'class-variance-authority';
|
|
25
|
-
import 'react';
|
|
26
30
|
import '@base-ui/react/button';
|
|
27
31
|
import '@base-ui/react/checkbox';
|
|
28
32
|
import '@base-ui/react/dialog';
|
|
29
33
|
import '@base-ui/react/menu';
|
|
30
|
-
import '@base-ui/react/use-render';
|
|
31
34
|
import '@base-ui/react/tooltip';
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,163 @@
|
|
|
1
|
+
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
1
2
|
import { cva } from 'class-variance-authority';
|
|
2
3
|
import { clsx } from 'clsx';
|
|
3
4
|
import { twMerge } from 'tailwind-merge';
|
|
4
|
-
import {
|
|
5
|
+
import { mergeProps } from '@base-ui/react/merge-props';
|
|
6
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
8
|
import { Button as Button$1 } from '@base-ui/react/button';
|
|
6
9
|
import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
|
|
7
10
|
import { Check, XClose, ChevronRight, InfoCircle } from '@untitledui/icons';
|
|
8
11
|
import { Dialog } from '@base-ui/react/dialog';
|
|
9
12
|
import { Menu } from '@base-ui/react/menu';
|
|
10
13
|
import { Input as Input$1 } from '@base-ui/react/input';
|
|
11
|
-
import { mergeProps } from '@base-ui/react/merge-props';
|
|
12
|
-
import { useRender } from '@base-ui/react/use-render';
|
|
13
14
|
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
14
15
|
|
|
15
|
-
// src/components/
|
|
16
|
+
// src/components/avatar/avatar.tsx
|
|
16
17
|
function cn(...inputs) {
|
|
17
18
|
return twMerge(clsx(inputs));
|
|
18
19
|
}
|
|
20
|
+
var notificationBadgeVariants = cva(
|
|
21
|
+
"inline-flex items-center justify-center rounded-full box-border shrink-0 whitespace-nowrap text-xs font-medium leading-[18px] min-w-[18px] h-[18px] px-[5px] py-0 transition-[color,background-color,border-color]",
|
|
22
|
+
{
|
|
23
|
+
variants: {
|
|
24
|
+
variant: {
|
|
25
|
+
default: "bg-primary text-primary-foreground",
|
|
26
|
+
reversed: "bg-background text-foreground",
|
|
27
|
+
disabled: "bg-tint-950-reversed border border-black-alpha-600 text-black-alpha-600 backdrop-blur-lg",
|
|
28
|
+
white: "bg-white text-black",
|
|
29
|
+
black: "bg-brand-midnight-900 text-white"
|
|
30
|
+
},
|
|
31
|
+
pulse: {
|
|
32
|
+
true: "relative",
|
|
33
|
+
false: ""
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
compoundVariants: [
|
|
37
|
+
{
|
|
38
|
+
pulse: true,
|
|
39
|
+
class: "before:content-[''] before:absolute before:inset-[-4px] before:rounded-full before:border-4 before:border-solid before:border-(--notification-badge-pulse-color,var(--color-surface-alpha-alpha-brand-light-30)) before:pointer-events-none before:animate-notification-badge-ping motion-reduce:before:animate-none"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
defaultVariants: {
|
|
43
|
+
variant: "default",
|
|
44
|
+
pulse: false
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
function NotificationBadge({
|
|
49
|
+
className,
|
|
50
|
+
variant,
|
|
51
|
+
pulse = false,
|
|
52
|
+
count,
|
|
53
|
+
children,
|
|
54
|
+
render,
|
|
55
|
+
...props
|
|
56
|
+
}) {
|
|
57
|
+
const displayContent = count !== void 0 ? String(count) : children;
|
|
58
|
+
const defaultProps = {
|
|
59
|
+
"data-slot": "notification-badge",
|
|
60
|
+
className: cn(notificationBadgeVariants({ variant, pulse }), className),
|
|
61
|
+
children: /* @__PURE__ */ jsx("span", { className: "text-center", children: displayContent })
|
|
62
|
+
};
|
|
63
|
+
return useRender({
|
|
64
|
+
defaultTagName: "div",
|
|
65
|
+
render,
|
|
66
|
+
props: mergeProps(defaultProps, props)
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
var avatarVariants = cva(
|
|
70
|
+
"group/avatar relative flex shrink-0 select-none after:absolute after:inset-0 after:mix-blend-darken dark:after:mix-blend-lighten",
|
|
71
|
+
{
|
|
72
|
+
variants: {
|
|
73
|
+
size: {
|
|
74
|
+
default: "size-8",
|
|
75
|
+
sm: "size-6",
|
|
76
|
+
lg: "size-10"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
defaultVariants: {
|
|
80
|
+
size: "default"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
function Avatar({ className = "", size = "default", ...props }) {
|
|
85
|
+
return /* @__PURE__ */ jsx(
|
|
86
|
+
Avatar$1.Root,
|
|
87
|
+
{
|
|
88
|
+
"data-slot": "avatar",
|
|
89
|
+
"data-size": size,
|
|
90
|
+
className: cn(avatarVariants({ size }), className),
|
|
91
|
+
...props
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
function AvatarImage({ className = "", ...props }) {
|
|
96
|
+
return /* @__PURE__ */ jsx(
|
|
97
|
+
Avatar$1.Image,
|
|
98
|
+
{
|
|
99
|
+
"data-slot": "avatar-image",
|
|
100
|
+
className: cn("aspect-square size-full mask mask-squircle object-cover", className),
|
|
101
|
+
...props
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
function AvatarFallback({ className = "", ...props }) {
|
|
106
|
+
return /* @__PURE__ */ jsx(
|
|
107
|
+
Avatar$1.Fallback,
|
|
108
|
+
{
|
|
109
|
+
"data-slot": "avatar-fallback",
|
|
110
|
+
className: cn(
|
|
111
|
+
"mask mask-squircle flex size-full items-center justify-center bg-muted text-muted-foreground text-sm group-data-[size=sm]/avatar:text-xs",
|
|
112
|
+
className
|
|
113
|
+
),
|
|
114
|
+
...props
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
function AvatarBadge({ className = "", ...props }) {
|
|
119
|
+
return /* @__PURE__ */ jsx(
|
|
120
|
+
NotificationBadge,
|
|
121
|
+
{
|
|
122
|
+
"data-slot": "avatar-badge",
|
|
123
|
+
className: cn(
|
|
124
|
+
"absolute h-[18px] min-w-[18px] z-10 select-none",
|
|
125
|
+
"leading-none",
|
|
126
|
+
"group-data-[size=sm]/avatar:right-[-4px] group-data-[size=sm]/avatar:bottom-[-4px]",
|
|
127
|
+
"group-data-[size=default]/avatar:right-[-4px] group-data-[size=default]/avatar:bottom-[-4px]",
|
|
128
|
+
"group-data-[size=lg]/avatar:right-[-4px] group-data-[size=lg]/avatar:bottom-[-4px]",
|
|
129
|
+
className
|
|
130
|
+
),
|
|
131
|
+
...props
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
function AvatarGroup({ className = "", ...props }) {
|
|
136
|
+
return /* @__PURE__ */ jsx(
|
|
137
|
+
"div",
|
|
138
|
+
{
|
|
139
|
+
"data-slot": "avatar-group",
|
|
140
|
+
className: cn(
|
|
141
|
+
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
142
|
+
className
|
|
143
|
+
),
|
|
144
|
+
...props
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
function AvatarGroupCount({ className = "", ...props }) {
|
|
149
|
+
return /* @__PURE__ */ jsx(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
"data-slot": "avatar-group-count",
|
|
153
|
+
className: cn(
|
|
154
|
+
"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground text-sm ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
155
|
+
className
|
|
156
|
+
),
|
|
157
|
+
...props
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
}
|
|
19
161
|
var bannerNotificationVariants = cva(
|
|
20
162
|
"flex items-start gap-3 rounded-[6px] px-4 py-3 w-full w-[360px] border-border border",
|
|
21
163
|
{
|
|
@@ -1558,55 +1700,6 @@ function Logo({
|
|
|
1558
1700
|
}
|
|
1559
1701
|
);
|
|
1560
1702
|
}
|
|
1561
|
-
var notificationBadgeVariants = cva(
|
|
1562
|
-
"inline-flex items-center justify-center rounded-full box-border shrink-0 whitespace-nowrap text-xs font-medium leading-[18px] min-w-[18px] h-[18px] px-[5px] py-0 transition-[color,background-color,border-color]",
|
|
1563
|
-
{
|
|
1564
|
-
variants: {
|
|
1565
|
-
variant: {
|
|
1566
|
-
default: "bg-primary text-primary-foreground",
|
|
1567
|
-
reversed: "bg-background text-foreground",
|
|
1568
|
-
disabled: "bg-tint-950-reversed border border-black-alpha-600 text-black-alpha-600 backdrop-blur-lg",
|
|
1569
|
-
white: "bg-white text-black",
|
|
1570
|
-
black: "bg-brand-midnight-900 text-white"
|
|
1571
|
-
},
|
|
1572
|
-
pulse: {
|
|
1573
|
-
true: "relative",
|
|
1574
|
-
false: ""
|
|
1575
|
-
}
|
|
1576
|
-
},
|
|
1577
|
-
compoundVariants: [
|
|
1578
|
-
{
|
|
1579
|
-
pulse: true,
|
|
1580
|
-
class: "before:content-[''] before:absolute before:inset-[-4px] before:rounded-full before:border-4 before:border-solid before:border-(--notification-badge-pulse-color,var(--color-surface-alpha-alpha-brand-light-30)) before:pointer-events-none before:animate-notification-badge-ping motion-reduce:before:animate-none"
|
|
1581
|
-
}
|
|
1582
|
-
],
|
|
1583
|
-
defaultVariants: {
|
|
1584
|
-
variant: "default",
|
|
1585
|
-
pulse: false
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
);
|
|
1589
|
-
function NotificationBadge({
|
|
1590
|
-
className,
|
|
1591
|
-
variant,
|
|
1592
|
-
pulse = false,
|
|
1593
|
-
count,
|
|
1594
|
-
children,
|
|
1595
|
-
render,
|
|
1596
|
-
...props
|
|
1597
|
-
}) {
|
|
1598
|
-
const displayContent = count !== void 0 ? String(count) : children;
|
|
1599
|
-
const defaultProps = {
|
|
1600
|
-
"data-slot": "notification-badge",
|
|
1601
|
-
className: cn(notificationBadgeVariants({ variant, pulse }), className),
|
|
1602
|
-
children: /* @__PURE__ */ jsx("span", { className: "text-center", children: displayContent })
|
|
1603
|
-
};
|
|
1604
|
-
return useRender({
|
|
1605
|
-
defaultTagName: "div",
|
|
1606
|
-
render,
|
|
1607
|
-
props: mergeProps(defaultProps, props)
|
|
1608
|
-
});
|
|
1609
|
-
}
|
|
1610
1703
|
var SectionFlourish = () => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center self-stretch py-8 text-xl", children: "\u2726" });
|
|
1611
1704
|
function TooltipProvider({ delay = 0, ...props }) {
|
|
1612
1705
|
return /* @__PURE__ */ jsx(Tooltip$1.Provider, { "data-slot": "tooltip-provider", delay, ...props });
|
|
@@ -1873,6 +1966,6 @@ function TemplateHeader({ className, image }) {
|
|
|
1873
1966
|
);
|
|
1874
1967
|
}
|
|
1875
1968
|
|
|
1876
|
-
export { BannerNotification, Button, ButtonLink, Checkbox, ContentBlock, DefaultHeader, DialogRoot as Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Footer, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, Loader, Logo, NotificationBadge, SectionFlourish, SectionHeader, Tag, TemplateHeader, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
1969
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, BannerNotification, Button, ButtonLink, Checkbox, ContentBlock, DefaultHeader, DialogRoot as Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Footer, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, Label, Loader, Logo, NotificationBadge, SectionFlourish, SectionHeader, Tag, TemplateHeader, Textarea, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
1877
1970
|
//# sourceMappingURL=index.js.map
|
|
1878
1971
|
//# sourceMappingURL=index.js.map
|