@popgrids/ui 0.0.31 → 0.0.33
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 +173 -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 +166 -0
- package/dist/avatar.js.map +1 -0
- package/dist/index.cjs +161 -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 +157 -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,173 @@
|
|
|
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
|
+
xs: "size-6",
|
|
75
|
+
// 24px
|
|
76
|
+
sm: "size-8",
|
|
77
|
+
// 32px
|
|
78
|
+
md: "size-14",
|
|
79
|
+
// 56px
|
|
80
|
+
lg: "size-20",
|
|
81
|
+
// 80px
|
|
82
|
+
xl: "size-[120px]",
|
|
83
|
+
xxl: "size-[140px]"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
defaultVariants: {
|
|
87
|
+
size: "md"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
function Avatar({ className = "", size = "md", ...props }) {
|
|
92
|
+
return /* @__PURE__ */ jsx(
|
|
93
|
+
Avatar$1.Root,
|
|
94
|
+
{
|
|
95
|
+
"data-slot": "avatar",
|
|
96
|
+
"data-size": size,
|
|
97
|
+
className: cn(avatarVariants({ size }), className),
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
function AvatarImage({ className = "", ...props }) {
|
|
103
|
+
return /* @__PURE__ */ jsx(
|
|
104
|
+
Avatar$1.Image,
|
|
105
|
+
{
|
|
106
|
+
"data-slot": "avatar-image",
|
|
107
|
+
className: cn("aspect-square size-full mask mask-squircle object-cover", className),
|
|
108
|
+
...props
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
function AvatarFallback({ className = "", ...props }) {
|
|
113
|
+
return /* @__PURE__ */ jsx(
|
|
114
|
+
Avatar$1.Fallback,
|
|
115
|
+
{
|
|
116
|
+
"data-slot": "avatar-fallback",
|
|
117
|
+
className: cn(
|
|
118
|
+
"mask mask-squircle flex size-full items-center justify-center bg-muted text-muted-foreground text-sm group-data-[size=sm]/avatar:text-xs",
|
|
119
|
+
className
|
|
120
|
+
),
|
|
121
|
+
...props
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
function AvatarBadge({ className = "", ...props }) {
|
|
126
|
+
return /* @__PURE__ */ jsx(
|
|
127
|
+
NotificationBadge,
|
|
128
|
+
{
|
|
129
|
+
"data-slot": "avatar-badge",
|
|
130
|
+
className: cn(
|
|
131
|
+
"absolute h-[18px] min-w-[18px] z-10 select-none",
|
|
132
|
+
"leading-none",
|
|
133
|
+
"group-data-[size=xs]/avatar:right-[-4px] group-data-[size=xs]/avatar:bottom-[-4px]",
|
|
134
|
+
"group-data-[size=sm]/avatar:right-[-4px] group-data-[size=sm]/avatar:bottom-[-4px]",
|
|
135
|
+
"group-data-[size=md]/avatar:right-[-4px] group-data-[size=md]/avatar:bottom-[-4px]",
|
|
136
|
+
"group-data-[size=lg]/avatar:right-[-2px] group-data-[size=lg]/avatar:bottom-[-2px]",
|
|
137
|
+
"group-data-[size=xl]/avatar:right-[3px] group-data-[size=xl]/avatar:bottom-[3px]",
|
|
138
|
+
"group-data-[size=xxl]/avatar:right-[11px] group-data-[size=xxl]/avatar:bottom-px",
|
|
139
|
+
className
|
|
140
|
+
),
|
|
141
|
+
...props
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function AvatarGroup({ className = "", ...props }) {
|
|
146
|
+
return /* @__PURE__ */ jsx(
|
|
147
|
+
"div",
|
|
148
|
+
{
|
|
149
|
+
"data-slot": "avatar-group",
|
|
150
|
+
className: cn(
|
|
151
|
+
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
152
|
+
className
|
|
153
|
+
),
|
|
154
|
+
...props
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
function AvatarGroupCount({ className = "", ...props }) {
|
|
159
|
+
return /* @__PURE__ */ jsx(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
"data-slot": "avatar-group-count",
|
|
163
|
+
className: cn(
|
|
164
|
+
"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",
|
|
165
|
+
className
|
|
166
|
+
),
|
|
167
|
+
...props
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
19
171
|
var bannerNotificationVariants = cva(
|
|
20
172
|
"flex items-start gap-3 rounded-[6px] px-4 py-3 w-full w-[360px] border-border border",
|
|
21
173
|
{
|
|
@@ -1558,55 +1710,6 @@ function Logo({
|
|
|
1558
1710
|
}
|
|
1559
1711
|
);
|
|
1560
1712
|
}
|
|
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
1713
|
var SectionFlourish = () => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center self-stretch py-8 text-xl", children: "\u2726" });
|
|
1611
1714
|
function TooltipProvider({ delay = 0, ...props }) {
|
|
1612
1715
|
return /* @__PURE__ */ jsx(Tooltip$1.Provider, { "data-slot": "tooltip-provider", delay, ...props });
|
|
@@ -1873,6 +1976,6 @@ function TemplateHeader({ className, image }) {
|
|
|
1873
1976
|
);
|
|
1874
1977
|
}
|
|
1875
1978
|
|
|
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 };
|
|
1979
|
+
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
1980
|
//# sourceMappingURL=index.js.map
|
|
1878
1981
|
//# sourceMappingURL=index.js.map
|