@appcorp/shadcn 1.2.0 → 2.0.1
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/components/app-sidebar.js +1 -41
- package/components/audio.js +1 -21
- package/components/dashboard.js +1 -67
- package/components/drawer-generic.js +1 -47
- package/components/enhanced-checkbox.js +1 -86
- package/components/enhanced-combobox.js +1 -315
- package/components/enhanced-drawer-footer.js +1 -39
- package/components/enhanced-drawer-header.js +1 -15
- package/components/enhanced-dropzone-impl.d.ts +32 -0
- package/components/enhanced-dropzone-impl.js +1 -0
- package/components/enhanced-dropzone.d.ts +2 -63
- package/components/enhanced-dropzone.js +1 -296
- package/components/enhanced-input.js +1 -87
- package/components/enhanced-label.js +1 -68
- package/components/enhanced-radio.js +1 -23
- package/components/enhanced-select.js +1 -81
- package/components/enhanced-slider.js +1 -80
- package/components/enhanced-switch.js +1 -89
- package/components/enhanced-table-footer-action.js +1 -110
- package/components/enhanced-table-footer-page.js +1 -132
- package/components/enhanced-table-footer-pagination.js +1 -118
- package/components/enhanced-table-header-action.js +1 -40
- package/components/enhanced-table-header-search.js +1 -18
- package/components/enhanced-table.js +1 -329
- package/components/enhanced-textarea.js +1 -87
- package/components/field.d.ts +1 -1
- package/components/field.js +1 -153
- package/components/image-resize-dialog.js +1 -180
- package/components/nav-main.js +1 -86
- package/components/nav-projects.js +1 -50
- package/components/nav-user.js +1 -62
- package/components/show-toast.js +1 -11
- package/components/sidebar.d.ts +1 -1
- package/components/sidebar.js +1 -326
- package/components/team-switcher.js +1 -53
- package/components/theme-provider.js +1 -160
- package/components/timeline.js +1 -21
- package/components/tooltip.js +1 -85
- package/components/ui/accordion.js +1 -87
- package/components/ui/alert-dialog.js +1 -120
- package/components/ui/alert.d.ts +1 -1
- package/components/ui/alert.js +1 -90
- package/components/ui/area-chart-v1-impl.d.ts +19 -0
- package/components/ui/area-chart-v1-impl.js +1 -0
- package/components/ui/area-chart-v1.d.ts +2 -19
- package/components/ui/area-chart-v1.js +1 -114
- package/components/ui/aspect-ratio.js +1 -40
- package/components/ui/avatar.js +1 -80
- package/components/ui/badge.d.ts +2 -2
- package/components/ui/badge.js +1 -80
- package/components/ui/breadcrumb.js +1 -107
- package/components/ui/button.d.ts +2 -2
- package/components/ui/button.js +1 -92
- package/components/ui/calendar-impl.d.ts +8 -0
- package/components/ui/calendar-impl.js +1 -0
- package/components/ui/calendar.d.ts +2 -8
- package/components/ui/calendar.js +1 -109
- package/components/ui/card.js +1 -96
- package/components/ui/carousel-impl.d.ts +18 -0
- package/components/ui/carousel-impl.js +1 -0
- package/components/ui/carousel.d.ts +6 -18
- package/components/ui/carousel.js +1 -171
- package/components/ui/chart-impl.d.ts +62 -0
- package/components/ui/chart-impl.js +7 -0
- package/components/ui/chart.d.ts +7 -62
- package/components/ui/chart.js +1 -220
- package/components/ui/checkbox.js +1 -71
- package/components/ui/collapsible.js +1 -44
- package/components/ui/combobox.js +1 -88
- package/components/ui/command-impl.d.ts +80 -0
- package/components/ui/command-impl.js +1 -0
- package/components/ui/command.d.ts +9 -80
- package/components/ui/command.js +1 -118
- package/components/ui/context-menu.js +1 -141
- package/components/ui/dialog.js +1 -113
- package/components/ui/drawer-impl.d.ts +22 -0
- package/components/ui/drawer-impl.js +1 -0
- package/components/ui/drawer.d.ts +10 -22
- package/components/ui/drawer.js +1 -112
- package/components/ui/dropdown-menu.js +1 -143
- package/components/ui/form.d.ts +4 -2
- package/components/ui/form.js +1 -132
- package/components/ui/hover-card.js +1 -72
- package/components/ui/input-otp-impl.d.ts +34 -0
- package/components/ui/input-otp-impl.js +1 -0
- package/components/ui/input-otp.d.ts +4 -34
- package/components/ui/input-otp.js +1 -93
- package/components/ui/input.js +1 -66
- package/components/ui/label.d.ts +1 -1
- package/components/ui/label.js +1 -70
- package/components/ui/language-selector.js +1 -63
- package/components/ui/menubar.js +1 -165
- package/components/ui/navigation-menu.d.ts +1 -1
- package/components/ui/navigation-menu.js +1 -114
- package/components/ui/pagination.js +1 -113
- package/components/ui/popover.js +1 -75
- package/components/ui/progress.js +1 -69
- package/components/ui/radio-group.js +1 -77
- package/components/ui/resizable-impl.d.ts +24 -0
- package/components/ui/resizable-impl.js +1 -0
- package/components/ui/resizable.d.ts +3 -24
- package/components/ui/resizable.js +1 -79
- package/components/ui/scroll-area.js +1 -80
- package/components/ui/select.js +1 -127
- package/components/ui/separator.js +1 -68
- package/components/ui/sheet.d.ts +1 -1
- package/components/ui/sheet.js +1 -127
- package/components/ui/skeleton.js +1 -34
- package/components/ui/slider.js +1 -79
- package/components/ui/sonner.js +1 -45
- package/components/ui/switch.js +1 -69
- package/components/ui/table.js +1 -109
- package/components/ui/tabs.js +1 -82
- package/components/ui/textarea.js +1 -66
- package/components/ui/theme-switcher.js +1 -152
- package/components/ui/toggle.d.ts +2 -2
- package/components/ui/toggle.js +1 -87
- package/data/admin-dashboard.js +1 -304
- package/hooks/use-enhanced-combobox.js +1 -150
- package/hooks/use-mobile.js +1 -51
- package/hooks/use-outside-click.js +1 -23
- package/lib/themes.js +1 -150
- package/lib/toast-utils.js +1 -212
- package/lib/utils.js +1 -12
- package/package.json +9 -90
- package/utils/transform-breadcrumbs.js +1 -11
- package/utils/transform-navitems.js +1 -33
- package/components/aceternity-ui/apple-cards-carousel.d.ts +0 -35
- package/components/aceternity-ui/apple-cards-carousel.js +0 -263
- package/components/shadcn-example/ai-chat/chat-interface.d.ts +0 -11
- package/components/shadcn-example/ai-chat/chat-interface.js +0 -70
- package/components/shadcn-example/ai-chat/index.d.ts +0 -38
- package/components/shadcn-example/ai-chat/index.js +0 -66
- package/components/shadcn-example/ai-chat/sidebar.d.ts +0 -15
- package/components/shadcn-example/ai-chat/sidebar.js +0 -68
- package/components/shadcn-example/ai-chat/welcome-section.d.ts +0 -12
- package/components/shadcn-example/ai-chat/welcome-section.js +0 -26
- package/components/shadcn-example/authentication/index.d.ts +0 -24
- package/components/shadcn-example/authentication/index.js +0 -59
- package/components/shadcn-example/authentication/user-auth-form.d.ts +0 -11
- package/components/shadcn-example/authentication/user-auth-form.js +0 -54
- package/components/shadcn-example/blog-detail-page/comment-section.d.ts +0 -15
- package/components/shadcn-example/blog-detail-page/comment-section.js +0 -83
- package/components/shadcn-example/blog-detail-page/content.d.ts +0 -7
- package/components/shadcn-example/blog-detail-page/content.js +0 -15
- package/components/shadcn-example/blog-detail-page/header.d.ts +0 -11
- package/components/shadcn-example/blog-detail-page/header.js +0 -36
- package/components/shadcn-example/blog-detail-page/index.d.ts +0 -25
- package/components/shadcn-example/blog-detail-page/index.js +0 -74
- package/components/shadcn-example/blog-page/blog-post-card.d.ts +0 -13
- package/components/shadcn-example/blog-page/blog-post-card.js +0 -30
- package/components/shadcn-example/blog-page/featured-post-sidebar-item.d.ts +0 -10
- package/components/shadcn-example/blog-page/featured-post-sidebar-item.js +0 -19
- package/components/shadcn-example/blog-page/index.d.ts +0 -20
- package/components/shadcn-example/blog-page/index.js +0 -36
- package/components/shadcn-example/coming-soon/countdown.d.ts +0 -2
- package/components/shadcn-example/coming-soon/countdown.js +0 -82
- package/components/shadcn-example/coming-soon/index.d.ts +0 -10
- package/components/shadcn-example/coming-soon/index.js +0 -41
- package/components/shadcn-io/color-picker/index.d.ts +0 -43
- package/components/shadcn-io/color-picker/index.js +0 -304
- package/components/shadcn-io/copy-button/index.d.ts +0 -16
- package/components/shadcn-io/copy-button/index.js +0 -121
- package/components/shadcn-io/dropzone/index.d.ts +0 -19
- package/components/shadcn-io/dropzone/index.js +0 -131
- package/components/shadcn-io/gantt/index.d.ts +0 -145
- package/components/shadcn-io/gantt/index.js +0 -766
- package/components/shadcn-io/table/index.d.ts +0 -60
- package/components/shadcn-io/table/index.js +0 -138
- package/templates/appcorp-v1/footer/bottom-bar.d.ts +0 -6
- package/templates/appcorp-v1/footer/bottom-bar.js +0 -25
- package/templates/appcorp-v1/footer/cta.d.ts +0 -6
- package/templates/appcorp-v1/footer/cta.js +0 -21
- package/templates/appcorp-v1/footer/footer-grid.d.ts +0 -14
- package/templates/appcorp-v1/footer/footer-grid.js +0 -52
- package/templates/appcorp-v1/footer/index.d.ts +0 -3
- package/templates/appcorp-v1/footer/index.js +0 -28
- package/templates/appcorp-v1/footer/newsletter.d.ts +0 -11
- package/templates/appcorp-v1/footer/newsletter.js +0 -28
- package/templates/appcorp-v1/footer/stats.d.ts +0 -6
- package/templates/appcorp-v1/footer/stats.js +0 -15
- package/templates/appcorp-v1/header/announcement-bar.d.ts +0 -3
- package/templates/appcorp-v1/header/announcement-bar.js +0 -15
- package/templates/appcorp-v1/header/dropdown-panel.d.ts +0 -8
- package/templates/appcorp-v1/header/dropdown-panel.js +0 -72
- package/templates/appcorp-v1/header/index.d.ts +0 -12
- package/templates/appcorp-v1/header/index.js +0 -16
- package/templates/appcorp-v1/header/mobile-menu.d.ts +0 -14
- package/templates/appcorp-v1/header/mobile-menu.js +0 -101
- package/templates/appcorp-v1/header/navigation-bar.d.ts +0 -3
- package/templates/appcorp-v1/header/navigation-bar.js +0 -117
- package/templates/appcorp-v1/header/social-button.d.ts +0 -7
- package/templates/appcorp-v1/header/social-button.js +0 -48
- package/templates/appcorp-v1/home.d.ts +0 -3
- package/templates/appcorp-v1/home.js +0 -27
- package/templates/data/appcorp-v1.d.ts +0 -93
- package/templates/data/appcorp-v1.js +0 -348
- package/templates/data/edupilotpro-v1.d.ts +0 -33
- package/templates/data/edupilotpro-v1.js +0 -116
- package/templates/data/school-v1.d.ts +0 -328
- package/templates/data/school-v1.js +0 -1563
- package/templates/edupilotpro-v1/feature-card.d.ts +0 -13
- package/templates/edupilotpro-v1/feature-card.js +0 -28
- package/templates/edupilotpro-v1/mockups/dashboard-mockup.d.ts +0 -3
- package/templates/edupilotpro-v1/mockups/dashboard-mockup.js +0 -55
- package/templates/school-v1/footer.d.ts +0 -3
- package/templates/school-v1/footer.js +0 -75
- package/templates/school-v1/index.d.ts +0 -18
- package/templates/school-v1/index.js +0 -60
- package/templates/school-v1/navigation.d.ts +0 -3
- package/templates/school-v1/navigation.js +0 -123
- package/templates/school-v1/sections/about.d.ts +0 -3
- package/templates/school-v1/sections/about.js +0 -49
- package/templates/school-v1/sections/admissions.d.ts +0 -3
- package/templates/school-v1/sections/admissions.js +0 -77
- package/templates/school-v1/sections/contact.d.ts +0 -3
- package/templates/school-v1/sections/contact.js +0 -67
- package/templates/school-v1/sections/faqs.d.ts +0 -3
- package/templates/school-v1/sections/faqs.js +0 -50
- package/templates/school-v1/sections/hero.d.ts +0 -3
- package/templates/school-v1/sections/hero.js +0 -132
- package/templates/school-v1/sections/management.d.ts +0 -3
- package/templates/school-v1/sections/management.js +0 -34
- package/templates/school-v1/sections/policies.d.ts +0 -3
- package/templates/school-v1/sections/policies.js +0 -127
- package/templates/school-v1/sections/programs.d.ts +0 -3
- package/templates/school-v1/sections/programs.js +0 -107
- package/templates/school-v1/sections/testimonials.d.ts +0 -3
- package/templates/school-v1/sections/testimonials.js +0 -46
- package/templates/school-v1/sections/why-choose-us.d.ts +0 -3
- package/templates/school-v1/sections/why-choose-us.js +0 -57
|
@@ -1,143 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
-
}
|
|
20
|
-
Object.defineProperty(o, k2, desc);
|
|
21
|
-
}) : (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
o[k2] = m[k];
|
|
24
|
-
}));
|
|
25
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
-
}) : function(o, v) {
|
|
28
|
-
o["default"] = v;
|
|
29
|
-
});
|
|
30
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
-
var ownKeys = function(o) {
|
|
32
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
-
var ar = [];
|
|
34
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
return ownKeys(o);
|
|
38
|
-
};
|
|
39
|
-
return function (mod) {
|
|
40
|
-
if (mod && mod.__esModule) return mod;
|
|
41
|
-
var result = {};
|
|
42
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
-
__setModuleDefault(result, mod);
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
})();
|
|
47
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
};
|
|
58
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
-
exports.DropdownMenuRadioGroup = exports.DropdownMenuSubTrigger = exports.DropdownMenuSubContent = exports.DropdownMenuSub = exports.DropdownMenuPortal = exports.DropdownMenuGroup = exports.DropdownMenuShortcut = exports.DropdownMenuSeparator = exports.DropdownMenuLabel = exports.DropdownMenuRadioItem = exports.DropdownMenuCheckboxItem = exports.DropdownMenuItem = exports.DropdownMenuContent = exports.DropdownMenuTrigger = exports.DropdownMenu = void 0;
|
|
60
|
-
var React = __importStar(require("react"));
|
|
61
|
-
var DropdownMenuPrimitive = __importStar(require("@radix-ui/react-dropdown-menu"));
|
|
62
|
-
var utils_1 = require("../../lib/utils");
|
|
63
|
-
var react_icons_1 = require("@radix-ui/react-icons");
|
|
64
|
-
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
65
|
-
exports.DropdownMenu = DropdownMenu;
|
|
66
|
-
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
67
|
-
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
68
|
-
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
69
|
-
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
70
|
-
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
71
|
-
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
72
|
-
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
73
|
-
exports.DropdownMenuSub = DropdownMenuSub;
|
|
74
|
-
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
75
|
-
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
76
|
-
var DropdownMenuSubTrigger = React.forwardRef(function (_a, ref) {
|
|
77
|
-
var className = _a.className, inset = _a.inset, children = _a.children, props = __rest(_a, ["className", "inset", "children"]);
|
|
78
|
-
return (React.createElement(DropdownMenuPrimitive.SubTrigger, __assign({ ref: ref, className: (0, utils_1.cn)("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", inset && "pl-8", className) }, props),
|
|
79
|
-
children,
|
|
80
|
-
React.createElement(react_icons_1.ChevronRightIcon, { className: "ml-auto" })));
|
|
81
|
-
});
|
|
82
|
-
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
83
|
-
DropdownMenuSubTrigger.displayName =
|
|
84
|
-
DropdownMenuPrimitive.SubTrigger.displayName;
|
|
85
|
-
var DropdownMenuSubContent = React.forwardRef(function (_a, ref) {
|
|
86
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
87
|
-
return (React.createElement(DropdownMenuPrimitive.SubContent, __assign({ ref: ref, className: (0, utils_1.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]", className) }, props)));
|
|
88
|
-
});
|
|
89
|
-
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
90
|
-
DropdownMenuSubContent.displayName =
|
|
91
|
-
DropdownMenuPrimitive.SubContent.displayName;
|
|
92
|
-
var DropdownMenuContent = React.forwardRef(function (_a, ref) {
|
|
93
|
-
var className = _a.className, _b = _a.sideOffset, sideOffset = _b === void 0 ? 4 : _b, props = __rest(_a, ["className", "sideOffset"]);
|
|
94
|
-
return (React.createElement(DropdownMenuPrimitive.Portal, null,
|
|
95
|
-
React.createElement(DropdownMenuPrimitive.Content, __assign({ ref: ref, sideOffset: sideOffset, className: (0, utils_1.cn)("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 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 origin-[--radix-dropdown-menu-content-transform-origin]", className) }, props))));
|
|
96
|
-
});
|
|
97
|
-
exports.DropdownMenuContent = DropdownMenuContent;
|
|
98
|
-
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
99
|
-
var DropdownMenuItem = React.forwardRef(function (_a, ref) {
|
|
100
|
-
var className = _a.className, inset = _a.inset, props = __rest(_a, ["className", "inset"]);
|
|
101
|
-
return (React.createElement(DropdownMenuPrimitive.Item, __assign({ ref: ref, className: (0, utils_1.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0", inset && "pl-8", className) }, props)));
|
|
102
|
-
});
|
|
103
|
-
exports.DropdownMenuItem = DropdownMenuItem;
|
|
104
|
-
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
105
|
-
var DropdownMenuCheckboxItem = React.forwardRef(function (_a, ref) {
|
|
106
|
-
var className = _a.className, children = _a.children, checked = _a.checked, props = __rest(_a, ["className", "children", "checked"]);
|
|
107
|
-
return (React.createElement(DropdownMenuPrimitive.CheckboxItem, __assign({ ref: ref, className: (0, utils_1.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked }, props),
|
|
108
|
-
React.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" },
|
|
109
|
-
React.createElement(DropdownMenuPrimitive.ItemIndicator, null,
|
|
110
|
-
React.createElement(react_icons_1.CheckIcon, { className: "h-4 w-4" }))),
|
|
111
|
-
children));
|
|
112
|
-
});
|
|
113
|
-
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
114
|
-
DropdownMenuCheckboxItem.displayName =
|
|
115
|
-
DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
116
|
-
var DropdownMenuRadioItem = React.forwardRef(function (_a, ref) {
|
|
117
|
-
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
118
|
-
return (React.createElement(DropdownMenuPrimitive.RadioItem, __assign({ ref: ref, className: (0, utils_1.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className) }, props),
|
|
119
|
-
React.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" },
|
|
120
|
-
React.createElement(DropdownMenuPrimitive.ItemIndicator, null,
|
|
121
|
-
React.createElement(react_icons_1.DotFilledIcon, { className: "h-2 w-2 fill-current" }))),
|
|
122
|
-
children));
|
|
123
|
-
});
|
|
124
|
-
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
125
|
-
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
126
|
-
var DropdownMenuLabel = React.forwardRef(function (_a, ref) {
|
|
127
|
-
var className = _a.className, inset = _a.inset, props = __rest(_a, ["className", "inset"]);
|
|
128
|
-
return (React.createElement(DropdownMenuPrimitive.Label, __assign({ ref: ref, className: (0, utils_1.cn)("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className) }, props)));
|
|
129
|
-
});
|
|
130
|
-
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
131
|
-
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
132
|
-
var DropdownMenuSeparator = React.forwardRef(function (_a, ref) {
|
|
133
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
134
|
-
return (React.createElement(DropdownMenuPrimitive.Separator, __assign({ ref: ref, className: (0, utils_1.cn)("-mx-1 my-1 h-px bg-muted", className) }, props)));
|
|
135
|
-
});
|
|
136
|
-
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
137
|
-
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
138
|
-
var DropdownMenuShortcut = function (_a) {
|
|
139
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
140
|
-
return (React.createElement("span", __assign({ className: (0, utils_1.cn)("ml-auto text-xs tracking-widest opacity-60", className) }, props)));
|
|
141
|
-
};
|
|
142
|
-
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
143
|
-
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
1
|
+
"use strict";"use client";var d=function(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,t=Object.getOwnPropertySymbols(e);s<t.length;s++)r.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(e,t[s])&&(n[t[s]]=e[t[s]]);return n};import*as a from"react";import*as o from"@radix-ui/react-dropdown-menu";import{cn as i}from"../../lib/utils";import{CheckIcon as h,ChevronRightIcon as y,DotFilledIcon as v}from"@radix-ui/react-icons";const x=o.Root,O=o.Trigger,D=o.Group,E=o.Portal,I=o.Sub,M=o.RadioGroup,c=a.forwardRef((e,r)=>{var{className:n,inset:t,children:s}=e,l=d(e,["className","inset","children"]);return a.createElement(o.SubTrigger,Object.assign({ref:r,className:i("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",n)},l),s,a.createElement(y,{className:"ml-auto"}))});c.displayName=o.SubTrigger.displayName;const m=a.forwardRef((e,r)=>{var{className:n}=e,t=d(e,["className"]);return a.createElement(o.SubContent,Object.assign({ref:r,className:i("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",n)},t))});m.displayName=o.SubContent.displayName;const p=a.forwardRef((e,r)=>{var{className:n,sideOffset:t=4}=e,s=d(e,["className","sideOffset"]);return a.createElement(o.Portal,null,a.createElement(o.Content,Object.assign({ref:r,sideOffset:t,className:i("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 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 origin-[--radix-dropdown-menu-content-transform-origin]",n)},s)))});p.displayName=o.Content.displayName;const u=a.forwardRef((e,r)=>{var{className:n,inset:t}=e,s=d(e,["className","inset"]);return a.createElement(o.Item,Object.assign({ref:r,className:i("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",n)},s))});u.displayName=o.Item.displayName;const f=a.forwardRef((e,r)=>{var{className:n,children:t,checked:s}=e,l=d(e,["className","children","checked"]);return a.createElement(o.CheckboxItem,Object.assign({ref:r,className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),checked:s},l),a.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},a.createElement(o.ItemIndicator,null,a.createElement(h,{className:"h-4 w-4"}))),t)});f.displayName=o.CheckboxItem.displayName;const b=a.forwardRef((e,r)=>{var{className:n,children:t}=e,s=d(e,["className","children"]);return a.createElement(o.RadioItem,Object.assign({ref:r,className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n)},s),a.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},a.createElement(o.ItemIndicator,null,a.createElement(v,{className:"h-2 w-2 fill-current"}))),t)});b.displayName=o.RadioItem.displayName;const g=a.forwardRef((e,r)=>{var{className:n,inset:t}=e,s=d(e,["className","inset"]);return a.createElement(o.Label,Object.assign({ref:r,className:i("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",n)},s))});g.displayName=o.Label.displayName;const N=a.forwardRef((e,r)=>{var{className:n}=e,t=d(e,["className"]);return a.createElement(o.Separator,Object.assign({ref:r,className:i("-mx-1 my-1 h-px bg-muted",n)},t))});N.displayName=o.Separator.displayName;const w=e=>{var{className:r}=e,n=d(e,["className"]);return a.createElement("span",Object.assign({className:i("ml-auto text-xs tracking-widest opacity-60",r)},n))};w.displayName="DropdownMenuShortcut";export{x as DropdownMenu,O as DropdownMenuTrigger,p as DropdownMenuContent,u as DropdownMenuItem,f as DropdownMenuCheckboxItem,b as DropdownMenuRadioItem,g as DropdownMenuLabel,N as DropdownMenuSeparator,w as DropdownMenuShortcut,D as DropdownMenuGroup,E as DropdownMenuPortal,I as DropdownMenuSub,m as DropdownMenuSubContent,c as DropdownMenuSubTrigger,M as DropdownMenuRadioGroup};
|
package/components/ui/form.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
3
|
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
4
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(
|
|
4
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
5
5
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
|
|
6
6
|
declare const useFormField: () => {
|
|
7
7
|
invalid: boolean;
|
|
@@ -17,7 +17,9 @@ declare const useFormField: () => {
|
|
|
17
17
|
};
|
|
18
18
|
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
19
|
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
20
|
-
declare const FormControl: React.ForwardRefExoticComponent<Omit<
|
|
20
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement> & {
|
|
21
|
+
children?: React.ReactNode;
|
|
22
|
+
} & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
21
23
|
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
22
24
|
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
25
|
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
package/components/ui/form.js
CHANGED
|
@@ -1,132 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
-
}
|
|
20
|
-
Object.defineProperty(o, k2, desc);
|
|
21
|
-
}) : (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
o[k2] = m[k];
|
|
24
|
-
}));
|
|
25
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
-
}) : function(o, v) {
|
|
28
|
-
o["default"] = v;
|
|
29
|
-
});
|
|
30
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
-
var ownKeys = function(o) {
|
|
32
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
-
var ar = [];
|
|
34
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
return ownKeys(o);
|
|
38
|
-
};
|
|
39
|
-
return function (mod) {
|
|
40
|
-
if (mod && mod.__esModule) return mod;
|
|
41
|
-
var result = {};
|
|
42
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
-
__setModuleDefault(result, mod);
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
})();
|
|
47
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
};
|
|
58
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
-
exports.FormField = exports.FormMessage = exports.FormDescription = exports.FormControl = exports.FormLabel = exports.FormItem = exports.Form = exports.useFormField = void 0;
|
|
60
|
-
var React = __importStar(require("react"));
|
|
61
|
-
var react_slot_1 = require("@radix-ui/react-slot");
|
|
62
|
-
var react_hook_form_1 = require("react-hook-form");
|
|
63
|
-
var utils_1 = require("../../lib/utils");
|
|
64
|
-
var label_1 = require("../ui/label");
|
|
65
|
-
var Form = react_hook_form_1.FormProvider;
|
|
66
|
-
exports.Form = Form;
|
|
67
|
-
var FormFieldContext = React.createContext(null);
|
|
68
|
-
var FormField = function (_a) {
|
|
69
|
-
var props = __rest(_a, []);
|
|
70
|
-
return (React.createElement(FormFieldContext.Provider, { value: { name: props.name } },
|
|
71
|
-
React.createElement(react_hook_form_1.Controller, __assign({}, props))));
|
|
72
|
-
};
|
|
73
|
-
exports.FormField = FormField;
|
|
74
|
-
var useFormField = function () {
|
|
75
|
-
var fieldContext = React.useContext(FormFieldContext);
|
|
76
|
-
var itemContext = React.useContext(FormItemContext);
|
|
77
|
-
var _a = (0, react_hook_form_1.useFormContext)(), getFieldState = _a.getFieldState, formState = _a.formState;
|
|
78
|
-
if (!fieldContext) {
|
|
79
|
-
throw new Error("useFormField should be used within <FormField>");
|
|
80
|
-
}
|
|
81
|
-
if (!itemContext) {
|
|
82
|
-
throw new Error("useFormField should be used within <FormItem>");
|
|
83
|
-
}
|
|
84
|
-
var fieldState = getFieldState(fieldContext.name, formState);
|
|
85
|
-
var id = itemContext.id;
|
|
86
|
-
return __assign({ id: id, name: fieldContext.name, formItemId: "".concat(id, "-form-item"), formDescriptionId: "".concat(id, "-form-item-description"), formMessageId: "".concat(id, "-form-item-message") }, fieldState);
|
|
87
|
-
};
|
|
88
|
-
exports.useFormField = useFormField;
|
|
89
|
-
var FormItemContext = React.createContext(null);
|
|
90
|
-
var FormItem = React.forwardRef(function (_a, ref) {
|
|
91
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
92
|
-
var id = React.useId();
|
|
93
|
-
return (React.createElement(FormItemContext.Provider, { value: { id: id } },
|
|
94
|
-
React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("space-y-2", className) }, props))));
|
|
95
|
-
});
|
|
96
|
-
exports.FormItem = FormItem;
|
|
97
|
-
FormItem.displayName = "FormItem";
|
|
98
|
-
var FormLabel = React.forwardRef(function (_a, ref) {
|
|
99
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
100
|
-
var _b = useFormField(), error = _b.error, formItemId = _b.formItemId;
|
|
101
|
-
return (React.createElement(label_1.Label, __assign({ ref: ref, className: (0, utils_1.cn)(error && "text-destructive", className), htmlFor: formItemId }, props)));
|
|
102
|
-
});
|
|
103
|
-
exports.FormLabel = FormLabel;
|
|
104
|
-
FormLabel.displayName = "FormLabel";
|
|
105
|
-
var FormControl = React.forwardRef(function (_a, ref) {
|
|
106
|
-
var props = __rest(_a, []);
|
|
107
|
-
var _b = useFormField(), error = _b.error, formItemId = _b.formItemId, formDescriptionId = _b.formDescriptionId, formMessageId = _b.formMessageId;
|
|
108
|
-
return (React.createElement(react_slot_1.Slot, __assign({ ref: ref, id: formItemId, "aria-describedby": !error
|
|
109
|
-
? "".concat(formDescriptionId)
|
|
110
|
-
: "".concat(formDescriptionId, " ").concat(formMessageId), "aria-invalid": !!error }, props)));
|
|
111
|
-
});
|
|
112
|
-
exports.FormControl = FormControl;
|
|
113
|
-
FormControl.displayName = "FormControl";
|
|
114
|
-
var FormDescription = React.forwardRef(function (_a, ref) {
|
|
115
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
116
|
-
var formDescriptionId = useFormField().formDescriptionId;
|
|
117
|
-
return (React.createElement("p", __assign({ ref: ref, id: formDescriptionId, className: (0, utils_1.cn)("text-[0.8rem] text-muted-foreground", className) }, props)));
|
|
118
|
-
});
|
|
119
|
-
exports.FormDescription = FormDescription;
|
|
120
|
-
FormDescription.displayName = "FormDescription";
|
|
121
|
-
var FormMessage = React.forwardRef(function (_a, ref) {
|
|
122
|
-
var _b;
|
|
123
|
-
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
124
|
-
var _c = useFormField(), error = _c.error, formMessageId = _c.formMessageId;
|
|
125
|
-
var body = error ? String((_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : "") : children;
|
|
126
|
-
if (!body) {
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
return (React.createElement("p", __assign({ ref: ref, id: formMessageId, className: (0, utils_1.cn)("text-[0.8rem] font-medium text-destructive", className) }, props), body));
|
|
130
|
-
});
|
|
131
|
-
exports.FormMessage = FormMessage;
|
|
132
|
-
FormMessage.displayName = "FormMessage";
|
|
1
|
+
"use strict";"use client";var i=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};import*as s from"react";import{Slot as x}from"@radix-ui/react-slot";import{Controller as y,FormProvider as N,useFormContext as O}from"react-hook-form";import{cn as l}from"../../lib/utils";import{Label as w}from"../ui/label";const h=N,f=s.createContext(null),C=e=>{var t=i(e,[]);return s.createElement(f.Provider,{value:{name:t.name}},s.createElement(y,Object.assign({},t)))},c=()=>{const e=s.useContext(f),t=s.useContext(p),{getFieldState:n,formState:r}=O();if(!e)throw new Error("useFormField should be used within <FormField>");if(!t)throw new Error("useFormField should be used within <FormItem>");const o=n(e.name,r),{id:m}=t;return Object.assign({id:m,name:e.name,formItemId:`${m}-form-item`,formDescriptionId:`${m}-form-item-description`,formMessageId:`${m}-form-item-message`},o)},p=s.createContext(null),u=s.forwardRef((e,t)=>{var{className:n}=e,r=i(e,["className"]);const o=s.useId();return s.createElement(p.Provider,{value:{id:o}},s.createElement("div",Object.assign({ref:t,className:l("space-y-2",n)},r)))});u.displayName="FormItem";const F=s.forwardRef((e,t)=>{var{className:n}=e,r=i(e,["className"]);const{error:o,formItemId:m}=c();return s.createElement(w,Object.assign({ref:t,className:l(o&&"text-destructive",n),htmlFor:m},r))});F.displayName="FormLabel";const b=s.forwardRef((e,t)=>{var n=i(e,[]);const{error:r,formItemId:o,formDescriptionId:m,formMessageId:a}=c();return s.createElement(x,Object.assign({ref:t,id:o,"aria-describedby":r?`${m} ${a}`:`${m}`,"aria-invalid":!!r},n))});b.displayName="FormControl";const v=s.forwardRef((e,t)=>{var{className:n}=e,r=i(e,["className"]);const{formDescriptionId:o}=c();return s.createElement("p",Object.assign({ref:t,id:o,className:l("text-[0.8rem] text-muted-foreground",n)},r))});v.displayName="FormDescription";const g=s.forwardRef((e,t)=>{var n,{className:r,children:o}=e,m=i(e,["className","children"]);const{error:a,formMessageId:I}=c(),d=a?String((n=a?.message)!==null&&n!==void 0?n:""):o;return d?s.createElement("p",Object.assign({ref:t,id:I,className:l("text-[0.8rem] font-medium text-destructive",r)},m),d):null});g.displayName="FormMessage";export{c as useFormField,h as Form,u as FormItem,F as FormLabel,b as FormControl,v as FormDescription,g as FormMessage,C as FormField};
|
|
@@ -1,72 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
-
}
|
|
20
|
-
Object.defineProperty(o, k2, desc);
|
|
21
|
-
}) : (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
o[k2] = m[k];
|
|
24
|
-
}));
|
|
25
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
-
}) : function(o, v) {
|
|
28
|
-
o["default"] = v;
|
|
29
|
-
});
|
|
30
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
-
var ownKeys = function(o) {
|
|
32
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
-
var ar = [];
|
|
34
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
return ownKeys(o);
|
|
38
|
-
};
|
|
39
|
-
return function (mod) {
|
|
40
|
-
if (mod && mod.__esModule) return mod;
|
|
41
|
-
var result = {};
|
|
42
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
-
__setModuleDefault(result, mod);
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
})();
|
|
47
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
};
|
|
58
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
-
exports.HoverCardContent = exports.HoverCardTrigger = exports.HoverCard = void 0;
|
|
60
|
-
var React = __importStar(require("react"));
|
|
61
|
-
var HoverCardPrimitive = __importStar(require("@radix-ui/react-hover-card"));
|
|
62
|
-
var utils_1 = require("../../lib/utils");
|
|
63
|
-
var HoverCard = HoverCardPrimitive.Root;
|
|
64
|
-
exports.HoverCard = HoverCard;
|
|
65
|
-
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
66
|
-
exports.HoverCardTrigger = HoverCardTrigger;
|
|
67
|
-
var HoverCardContent = React.forwardRef(function (_a, ref) {
|
|
68
|
-
var className = _a.className, _b = _a.align, align = _b === void 0 ? "center" : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 4 : _c, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
69
|
-
return (React.createElement(HoverCardPrimitive.Content, __assign({ ref: ref, align: align, sideOffset: sideOffset, className: (0, utils_1.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-hover-card-content-transform-origin]", className) }, props)));
|
|
70
|
-
});
|
|
71
|
-
exports.HoverCardContent = HoverCardContent;
|
|
72
|
-
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
1
|
+
"use strict";"use client";var f=function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(e);o<t.length;o++)a.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]]);return r};import*as i from"react";import*as n from"@radix-ui/react-hover-card";import{cn as l}from"../../lib/utils";const m=n.Root,p=n.Trigger,d=i.forwardRef((e,a)=>{var{className:r,align:t="center",sideOffset:o=4}=e,s=f(e,["className","align","sideOffset"]);return i.createElement(n.Content,Object.assign({ref:a,align:t,sideOffset:o,className:l("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 origin-[--radix-hover-card-content-transform-origin]",r)},s))});d.displayName=n.Content.displayName;export{m as HoverCard,p as HoverCardTrigger,d as HoverCardContent};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (newValue: string) => unknown;
|
|
5
|
+
maxLength: number;
|
|
6
|
+
textAlign?: "left" | "center" | "right";
|
|
7
|
+
onComplete?: (...args: any[]) => unknown;
|
|
8
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
9
|
+
pasteTransformer?: (pasted: string) => string;
|
|
10
|
+
containerClassName?: string;
|
|
11
|
+
noScriptCSSFallback?: string | null;
|
|
12
|
+
} & {
|
|
13
|
+
render: (props: import("input-otp").RenderProps) => React.ReactNode;
|
|
14
|
+
children?: never;
|
|
15
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
16
|
+
value?: string;
|
|
17
|
+
onChange?: (newValue: string) => unknown;
|
|
18
|
+
maxLength: number;
|
|
19
|
+
textAlign?: "left" | "center" | "right";
|
|
20
|
+
onComplete?: (...args: any[]) => unknown;
|
|
21
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
22
|
+
pasteTransformer?: (pasted: string) => string;
|
|
23
|
+
containerClassName?: string;
|
|
24
|
+
noScriptCSSFallback?: string | null;
|
|
25
|
+
} & {
|
|
26
|
+
render?: never;
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
} & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
31
|
+
index: number;
|
|
32
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";"use client";var o=function(e,n){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(a[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,t=Object.getOwnPropertySymbols(e);s<t.length;s++)n.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(e,t[s])&&(a[t[s]]=e[t[s]]);return a};import*as r from"react";import{OTPInput as b,OTPInputContext as N}from"input-otp";import{cn as l}from"../../lib/utils";import{MinusIcon as y}from"@radix-ui/react-icons";const i=r.forwardRef((e,n)=>{var{className:a,containerClassName:t}=e,s=o(e,["className","containerClassName"]);return r.createElement(b,Object.assign({ref:n,containerClassName:l("flex items-center gap-2 has-[:disabled]:opacity-50",t),className:l("disabled:cursor-not-allowed",a)},s))});i.displayName="InputOTP";const c=r.forwardRef((e,n)=>{var{className:a}=e,t=o(e,["className"]);return r.createElement("div",Object.assign({ref:n,className:l("flex items-center",a)},t))});c.displayName="InputOTPGroup";const p=r.forwardRef((e,n)=>{var{index:a,className:t}=e,s=o(e,["index","className"]);const d=r.useContext(N),{char:f,hasFakeCaret:u,isActive:O}=d.slots[a];return r.createElement("div",Object.assign({ref:n,className:l("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",O&&"z-10 ring-1 ring-ring",t)},s),f,u&&r.createElement("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center"},r.createElement("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})))});p.displayName="InputOTPSlot";const m=r.forwardRef((e,n)=>{var a=o(e,[]);return r.createElement("div",Object.assign({ref:n,role:"separator"},a),r.createElement(y,null))});m.displayName="InputOTPSeparator";export{i as InputOTP,c as InputOTPGroup,p as InputOTPSlot,m as InputOTPSeparator};
|
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
maxLength: number;
|
|
6
|
-
textAlign?: "left" | "center" | "right";
|
|
7
|
-
onComplete?: (...args: any[]) => unknown;
|
|
8
|
-
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
9
|
-
pasteTransformer?: (pasted: string) => string;
|
|
10
|
-
containerClassName?: string;
|
|
11
|
-
noScriptCSSFallback?: string | null;
|
|
12
|
-
} & {
|
|
13
|
-
render: (props: import("input-otp").RenderProps) => React.ReactNode;
|
|
14
|
-
children?: never;
|
|
15
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
16
|
-
value?: string;
|
|
17
|
-
onChange?: (newValue: string) => unknown;
|
|
18
|
-
maxLength: number;
|
|
19
|
-
textAlign?: "left" | "center" | "right";
|
|
20
|
-
onComplete?: (...args: any[]) => unknown;
|
|
21
|
-
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
22
|
-
pasteTransformer?: (pasted: string) => string;
|
|
23
|
-
containerClassName?: string;
|
|
24
|
-
noScriptCSSFallback?: string | null;
|
|
25
|
-
} & {
|
|
26
|
-
render?: never;
|
|
27
|
-
children: React.ReactNode;
|
|
28
|
-
} & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
-
declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
31
|
-
index: number;
|
|
32
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
-
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
1
|
+
export declare const InputOTP: typeof import("./input-otp-impl")["InputOTP"];
|
|
2
|
+
export declare const InputOTPGroup: typeof import("./input-otp-impl")["InputOTPGroup"];
|
|
3
|
+
export declare const InputOTPSlot: typeof import("./input-otp-impl")["InputOTPSlot"];
|
|
4
|
+
export declare const InputOTPSeparator: typeof import("./input-otp-impl")["InputOTPSeparator"];
|
|
@@ -1,93 +1 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
-
if (k2 === undefined) k2 = k;
|
|
16
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
19
|
-
}
|
|
20
|
-
Object.defineProperty(o, k2, desc);
|
|
21
|
-
}) : (function(o, m, k, k2) {
|
|
22
|
-
if (k2 === undefined) k2 = k;
|
|
23
|
-
o[k2] = m[k];
|
|
24
|
-
}));
|
|
25
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
26
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
27
|
-
}) : function(o, v) {
|
|
28
|
-
o["default"] = v;
|
|
29
|
-
});
|
|
30
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
31
|
-
var ownKeys = function(o) {
|
|
32
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
33
|
-
var ar = [];
|
|
34
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
return ownKeys(o);
|
|
38
|
-
};
|
|
39
|
-
return function (mod) {
|
|
40
|
-
if (mod && mod.__esModule) return mod;
|
|
41
|
-
var result = {};
|
|
42
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
43
|
-
__setModuleDefault(result, mod);
|
|
44
|
-
return result;
|
|
45
|
-
};
|
|
46
|
-
})();
|
|
47
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
};
|
|
58
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
-
exports.InputOTPSeparator = exports.InputOTPSlot = exports.InputOTPGroup = exports.InputOTP = void 0;
|
|
60
|
-
var React = __importStar(require("react"));
|
|
61
|
-
var input_otp_1 = require("input-otp");
|
|
62
|
-
var utils_1 = require("../../lib/utils");
|
|
63
|
-
var react_icons_1 = require("@radix-ui/react-icons");
|
|
64
|
-
var InputOTP = React.forwardRef(function (_a, ref) {
|
|
65
|
-
var className = _a.className, containerClassName = _a.containerClassName, props = __rest(_a, ["className", "containerClassName"]);
|
|
66
|
-
return (React.createElement(input_otp_1.OTPInput, __assign({ ref: ref, containerClassName: (0, utils_1.cn)("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName), className: (0, utils_1.cn)("disabled:cursor-not-allowed", className) }, props)));
|
|
67
|
-
});
|
|
68
|
-
exports.InputOTP = InputOTP;
|
|
69
|
-
InputOTP.displayName = "InputOTP";
|
|
70
|
-
var InputOTPGroup = React.forwardRef(function (_a, ref) {
|
|
71
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
72
|
-
return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("flex items-center", className) }, props)));
|
|
73
|
-
});
|
|
74
|
-
exports.InputOTPGroup = InputOTPGroup;
|
|
75
|
-
InputOTPGroup.displayName = "InputOTPGroup";
|
|
76
|
-
var InputOTPSlot = React.forwardRef(function (_a, ref) {
|
|
77
|
-
var index = _a.index, className = _a.className, props = __rest(_a, ["index", "className"]);
|
|
78
|
-
var inputOTPContext = React.useContext(input_otp_1.OTPInputContext);
|
|
79
|
-
var _b = inputOTPContext.slots[index], char = _b.char, hasFakeCaret = _b.hasFakeCaret, isActive = _b.isActive;
|
|
80
|
-
return (React.createElement("div", __assign({ ref: ref, className: (0, utils_1.cn)("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md", isActive && "z-10 ring-1 ring-ring", className) }, props),
|
|
81
|
-
char,
|
|
82
|
-
hasFakeCaret && (React.createElement("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center" },
|
|
83
|
-
React.createElement("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })))));
|
|
84
|
-
});
|
|
85
|
-
exports.InputOTPSlot = InputOTPSlot;
|
|
86
|
-
InputOTPSlot.displayName = "InputOTPSlot";
|
|
87
|
-
var InputOTPSeparator = React.forwardRef(function (_a, ref) {
|
|
88
|
-
var props = __rest(_a, []);
|
|
89
|
-
return (React.createElement("div", __assign({ ref: ref, role: "separator" }, props),
|
|
90
|
-
React.createElement(react_icons_1.MinusIcon, null)));
|
|
91
|
-
});
|
|
92
|
-
exports.InputOTPSeparator = InputOTPSeparator;
|
|
93
|
-
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1
|
+
"use strict";"use client";import*as n from"react";const r=import("./input-otp-impl"),t=o=>n.lazy(()=>r.then(p=>({default:p[o]})));export const InputOTP=t("InputOTP"),InputOTPGroup=t("InputOTPGroup"),InputOTPSlot=t("InputOTPSlot"),InputOTPSeparator=t("InputOTPSeparator");
|
package/components/ui/input.js
CHANGED
|
@@ -1,66 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
-
}
|
|
19
|
-
Object.defineProperty(o, k2, desc);
|
|
20
|
-
}) : (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
o[k2] = m[k];
|
|
23
|
-
}));
|
|
24
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
-
}) : function(o, v) {
|
|
27
|
-
o["default"] = v;
|
|
28
|
-
});
|
|
29
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
-
var ownKeys = function(o) {
|
|
31
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
-
var ar = [];
|
|
33
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
-
return ar;
|
|
35
|
-
};
|
|
36
|
-
return ownKeys(o);
|
|
37
|
-
};
|
|
38
|
-
return function (mod) {
|
|
39
|
-
if (mod && mod.__esModule) return mod;
|
|
40
|
-
var result = {};
|
|
41
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
-
__setModuleDefault(result, mod);
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
})();
|
|
46
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
|
-
var t = {};
|
|
48
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
49
|
-
t[p] = s[p];
|
|
50
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
51
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
53
|
-
t[p[i]] = s[p[i]];
|
|
54
|
-
}
|
|
55
|
-
return t;
|
|
56
|
-
};
|
|
57
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
-
exports.Input = void 0;
|
|
59
|
-
var React = __importStar(require("react"));
|
|
60
|
-
var utils_1 = require("../../lib/utils");
|
|
61
|
-
var Input = React.forwardRef(function (_a, ref) {
|
|
62
|
-
var className = _a.className, type = _a.type, props = __rest(_a, ["className", "type"]);
|
|
63
|
-
return (React.createElement("input", __assign({ type: type, className: (0, utils_1.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className), ref: ref }, props)));
|
|
64
|
-
});
|
|
65
|
-
exports.Input = Input;
|
|
66
|
-
Input.displayName = "Input";
|
|
1
|
+
"use strict";var i=function(t,n){var o={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(o[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,e=Object.getOwnPropertySymbols(t);r<e.length;r++)n.indexOf(e[r])<0&&Object.prototype.propertyIsEnumerable.call(t,e[r])&&(o[e[r]]=t[e[r]]);return o};import*as l from"react";import{cn as s}from"../../lib/utils";const a=l.forwardRef((t,n)=>{var{className:o,type:e}=t,r=i(t,["className","type"]);return l.createElement("input",Object.assign({type:e,className:s("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",o),ref:n},r))});a.displayName="Input";export{a as Input};
|