ag-common 0.0.775 → 0.0.777
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/ui/components/shadcn/avatar.d.ts +3 -4
- package/dist/ui/components/shadcn/avatar.js +10 -13
- package/dist/ui/components/shadcn/checkbox.d.ts +2 -2
- package/dist/ui/components/shadcn/checkbox.js +5 -5
- package/dist/ui/components/shadcn/select.d.ts +10 -8
- package/dist/ui/components/shadcn/select.js +26 -30
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
declare const Avatar:
|
|
4
|
-
declare const AvatarImage:
|
|
5
|
-
declare const AvatarFallback:
|
|
6
|
-
export { Avatar, AvatarFallback, AvatarImage };
|
|
3
|
+
export declare const Avatar: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>) => React.JSX.Element;
|
|
4
|
+
export declare const AvatarImage: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>) => React.JSX.Element;
|
|
5
|
+
export declare const AvatarFallback: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>) => React.JSX.Element;
|
|
@@ -45,25 +45,22 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
45
45
|
return t;
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.
|
|
48
|
+
exports.AvatarFallback = exports.AvatarImage = exports.Avatar = void 0;
|
|
49
49
|
const AvatarPrimitive = __importStar(require("@radix-ui/react-avatar"));
|
|
50
50
|
const React = __importStar(require("react"));
|
|
51
51
|
const utils_1 = require("../../helpers/utils");
|
|
52
|
-
const Avatar =
|
|
52
|
+
const Avatar = (_a) => {
|
|
53
53
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
54
|
-
return (React.createElement(AvatarPrimitive.Root, Object.assign({
|
|
55
|
-
}
|
|
54
|
+
return (React.createElement(AvatarPrimitive.Root, Object.assign({ className: (0, utils_1.cn)('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className) }, props)));
|
|
55
|
+
};
|
|
56
56
|
exports.Avatar = Avatar;
|
|
57
|
-
|
|
58
|
-
const AvatarImage = React.forwardRef((_a, ref) => {
|
|
57
|
+
const AvatarImage = (_a) => {
|
|
59
58
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
60
|
-
return (React.createElement(AvatarPrimitive.Image, Object.assign({
|
|
61
|
-
}
|
|
59
|
+
return (React.createElement(AvatarPrimitive.Image, Object.assign({ className: (0, utils_1.cn)('aspect-square h-full w-full', className) }, props)));
|
|
60
|
+
};
|
|
62
61
|
exports.AvatarImage = AvatarImage;
|
|
63
|
-
|
|
64
|
-
const AvatarFallback = React.forwardRef((_a, ref) => {
|
|
62
|
+
const AvatarFallback = (_a) => {
|
|
65
63
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
66
|
-
return (React.createElement(AvatarPrimitive.Fallback, Object.assign({
|
|
67
|
-
}
|
|
64
|
+
return (React.createElement(AvatarPrimitive.Fallback, Object.assign({ className: (0, utils_1.cn)('flex h-full w-full items-center justify-center rounded-full bg-muted', className) }, props)));
|
|
65
|
+
};
|
|
68
66
|
exports.AvatarFallback = AvatarFallback;
|
|
69
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
declare const Checkbox: React.
|
|
4
|
-
export
|
|
3
|
+
export declare const Checkbox: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> & {}) => React.JSX.Element;
|
|
4
|
+
export declare const CheckboxIndicator: React.ForwardRefExoticComponent<CheckboxPrimitive.CheckboxIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -45,16 +45,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
45
45
|
return t;
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.Checkbox = void 0;
|
|
48
|
+
exports.CheckboxIndicator = exports.Checkbox = void 0;
|
|
49
49
|
const CheckboxPrimitive = __importStar(require("@radix-ui/react-checkbox"));
|
|
50
50
|
const react_icons_1 = require("@radix-ui/react-icons");
|
|
51
51
|
const React = __importStar(require("react"));
|
|
52
52
|
const utils_1 = require("../../helpers/utils");
|
|
53
|
-
const Checkbox =
|
|
53
|
+
const Checkbox = (_a) => {
|
|
54
54
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
55
|
-
return (React.createElement(CheckboxPrimitive.Root, Object.assign({
|
|
55
|
+
return (React.createElement(CheckboxPrimitive.Root, Object.assign({}, props, { className: (0, utils_1.cn)('peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow-sm focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground', className) }),
|
|
56
56
|
React.createElement(CheckboxPrimitive.Indicator, { className: (0, utils_1.cn)('flex items-center justify-center text-current') },
|
|
57
57
|
React.createElement(react_icons_1.CheckIcon, { className: "h-4 w-4" }))));
|
|
58
|
-
}
|
|
58
|
+
};
|
|
59
59
|
exports.Checkbox = Checkbox;
|
|
60
|
-
|
|
60
|
+
exports.CheckboxIndicator = CheckboxPrimitive.Indicator;
|
|
@@ -2,12 +2,14 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
4
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const SelectIcon: React.ForwardRefExoticComponent<SelectPrimitive.SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
|
|
5
6
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
11
|
-
declare const
|
|
12
|
-
declare const
|
|
13
|
-
|
|
7
|
+
declare const SelectItemText: React.ForwardRefExoticComponent<SelectPrimitive.SelectItemTextProps & React.RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
declare const SelectTrigger: ({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>) => React.JSX.Element;
|
|
9
|
+
declare const SelectScrollUpButton: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>) => React.JSX.Element;
|
|
10
|
+
declare const SelectScrollDownButton: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>) => React.JSX.Element;
|
|
11
|
+
declare const SelectContent: ({ className, children, position, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>) => React.JSX.Element;
|
|
12
|
+
declare const SelectLabel: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>) => React.JSX.Element;
|
|
13
|
+
declare const SelectItem: ({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>) => React.JSX.Element;
|
|
14
|
+
declare const SelectSeparator: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>) => React.JSX.Element;
|
|
15
|
+
export { Select, SelectContent, SelectGroup, SelectIcon, SelectItem, SelectItemText, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -45,7 +45,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
45
45
|
return t;
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.SelectValue = exports.SelectTrigger = exports.SelectSeparator = exports.SelectScrollUpButton = exports.SelectScrollDownButton = exports.SelectLabel = exports.SelectItem = exports.SelectGroup = exports.SelectContent = exports.Select = void 0;
|
|
48
|
+
exports.SelectValue = exports.SelectTrigger = exports.SelectSeparator = exports.SelectScrollUpButton = exports.SelectScrollDownButton = exports.SelectLabel = exports.SelectItemText = exports.SelectItem = exports.SelectIcon = exports.SelectGroup = exports.SelectContent = exports.Select = void 0;
|
|
49
49
|
const react_icons_1 = require("@radix-ui/react-icons");
|
|
50
50
|
const SelectPrimitive = __importStar(require("@radix-ui/react-select"));
|
|
51
51
|
const React = __importStar(require("react"));
|
|
@@ -54,63 +54,59 @@ const Select = SelectPrimitive.Root;
|
|
|
54
54
|
exports.Select = Select;
|
|
55
55
|
const SelectGroup = SelectPrimitive.Group;
|
|
56
56
|
exports.SelectGroup = SelectGroup;
|
|
57
|
+
const SelectIcon = SelectPrimitive.Icon;
|
|
58
|
+
exports.SelectIcon = SelectIcon;
|
|
57
59
|
const SelectValue = SelectPrimitive.Value;
|
|
58
60
|
exports.SelectValue = SelectValue;
|
|
59
|
-
const
|
|
61
|
+
const SelectItemText = SelectPrimitive.SelectItemText;
|
|
62
|
+
exports.SelectItemText = SelectItemText;
|
|
63
|
+
const SelectTrigger = (_a) => {
|
|
60
64
|
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
61
|
-
return (React.createElement(SelectPrimitive.Trigger, Object.assign({
|
|
65
|
+
return (React.createElement(SelectPrimitive.Trigger, Object.assign({ className: (0, utils_1.cn)('flex w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent text-sm shadow-xs ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1', className) }, props),
|
|
62
66
|
children,
|
|
63
67
|
React.createElement(SelectPrimitive.Icon, { asChild: true },
|
|
64
68
|
React.createElement(react_icons_1.ChevronDownIcon, { className: "h-4 w-4 opacity-50" }))));
|
|
65
|
-
}
|
|
69
|
+
};
|
|
66
70
|
exports.SelectTrigger = SelectTrigger;
|
|
67
|
-
|
|
68
|
-
const SelectScrollUpButton = React.forwardRef((_a, ref) => {
|
|
71
|
+
const SelectScrollUpButton = (_a) => {
|
|
69
72
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
70
|
-
return (React.createElement(SelectPrimitive.ScrollUpButton, Object.assign({
|
|
73
|
+
return (React.createElement(SelectPrimitive.ScrollUpButton, Object.assign({ className: (0, utils_1.cn)('flex cursor-default items-center justify-center py-1', className) }, props),
|
|
71
74
|
React.createElement(react_icons_1.ChevronUpIcon, { className: "h-4 w-4" })));
|
|
72
|
-
}
|
|
75
|
+
};
|
|
73
76
|
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
74
|
-
|
|
75
|
-
const SelectScrollDownButton = React.forwardRef((_a, ref) => {
|
|
77
|
+
const SelectScrollDownButton = (_a) => {
|
|
76
78
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
77
|
-
return (React.createElement(SelectPrimitive.ScrollDownButton, Object.assign({
|
|
79
|
+
return (React.createElement(SelectPrimitive.ScrollDownButton, Object.assign({ className: (0, utils_1.cn)('flex cursor-default items-center justify-center py-1', className) }, props),
|
|
78
80
|
React.createElement(react_icons_1.ChevronDownIcon, { className: "h-4 w-4" })));
|
|
79
|
-
}
|
|
81
|
+
};
|
|
80
82
|
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
81
|
-
|
|
82
|
-
SelectPrimitive.ScrollDownButton.displayName;
|
|
83
|
-
const SelectContent = React.forwardRef((_a, ref) => {
|
|
83
|
+
const SelectContent = (_a) => {
|
|
84
84
|
var { className, children, position = 'popper' } = _a, props = __rest(_a, ["className", "children", "position"]);
|
|
85
85
|
return (React.createElement(SelectPrimitive.Portal, null,
|
|
86
|
-
React.createElement(SelectPrimitive.Content, Object.assign({
|
|
86
|
+
React.createElement(SelectPrimitive.Content, Object.assign({ className: (0, utils_1.cn)('relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', position === 'popper' &&
|
|
87
87
|
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), position: position }, props),
|
|
88
88
|
React.createElement(SelectScrollUpButton, null),
|
|
89
89
|
React.createElement(SelectPrimitive.Viewport, { className: (0, utils_1.cn)('p-1', position === 'popper' &&
|
|
90
90
|
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]') }, children),
|
|
91
91
|
React.createElement(SelectScrollDownButton, null))));
|
|
92
|
-
}
|
|
92
|
+
};
|
|
93
93
|
exports.SelectContent = SelectContent;
|
|
94
|
-
|
|
95
|
-
const SelectLabel = React.forwardRef((_a, ref) => {
|
|
94
|
+
const SelectLabel = (_a) => {
|
|
96
95
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
97
|
-
return (React.createElement(SelectPrimitive.Label, Object.assign({
|
|
98
|
-
}
|
|
96
|
+
return (React.createElement(SelectPrimitive.Label, Object.assign({ className: (0, utils_1.cn)('px-2 py-1.5 text-sm font-semibold', className) }, props)));
|
|
97
|
+
};
|
|
99
98
|
exports.SelectLabel = SelectLabel;
|
|
100
|
-
|
|
101
|
-
const SelectItem = React.forwardRef((_a, ref) => {
|
|
99
|
+
const SelectItem = (_a) => {
|
|
102
100
|
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
103
|
-
return (React.createElement(SelectPrimitive.Item, Object.assign({
|
|
101
|
+
return (React.createElement(SelectPrimitive.Item, Object.assign({ className: (0, utils_1.cn)('relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50', className) }, props),
|
|
104
102
|
React.createElement("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center" },
|
|
105
103
|
React.createElement(SelectPrimitive.ItemIndicator, null,
|
|
106
104
|
React.createElement(react_icons_1.CheckIcon, { className: "h-4 w-4" }))),
|
|
107
105
|
React.createElement(SelectPrimitive.ItemText, null, children)));
|
|
108
|
-
}
|
|
106
|
+
};
|
|
109
107
|
exports.SelectItem = SelectItem;
|
|
110
|
-
|
|
111
|
-
const SelectSeparator = React.forwardRef((_a, ref) => {
|
|
108
|
+
const SelectSeparator = (_a) => {
|
|
112
109
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
113
|
-
return (React.createElement(SelectPrimitive.Separator, Object.assign({
|
|
114
|
-
}
|
|
110
|
+
return (React.createElement(SelectPrimitive.Separator, Object.assign({ className: (0, utils_1.cn)('-mx-1 my-1 h-px bg-muted', className) }, props)));
|
|
111
|
+
};
|
|
115
112
|
exports.SelectSeparator = SelectSeparator;
|
|
116
|
-
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
package/package.json
CHANGED