ag-common 0.0.767 → 0.0.770

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.
Files changed (53) hide show
  1. package/dist/api/helpers/cosmos/get.d.ts +2 -2
  2. package/dist/api/helpers/cosmos/get.js +12 -3
  3. package/dist/api/helpers/cosmos/index.d.ts +2 -2
  4. package/dist/api/helpers/index.d.ts +1 -1
  5. package/dist/api/helpers/index.js +1 -1
  6. package/dist/ui/components/index.d.ts +1 -2
  7. package/dist/ui/components/index.js +1 -2
  8. package/dist/ui/components/shadcn/accordion.d.ts +16 -0
  9. package/dist/ui/components/shadcn/accordion.js +83 -0
  10. package/dist/ui/components/shadcn/alert.d.ts +8 -0
  11. package/dist/ui/components/shadcn/alert.js +79 -0
  12. package/dist/ui/components/shadcn/avatar.d.ts +6 -0
  13. package/dist/ui/components/shadcn/avatar.js +69 -0
  14. package/dist/ui/components/shadcn/button.d.ts +11 -0
  15. package/dist/ui/components/shadcn/button.js +81 -0
  16. package/dist/ui/components/shadcn/card.d.ts +8 -0
  17. package/dist/ui/components/shadcn/card.js +85 -0
  18. package/dist/ui/components/shadcn/checkbox.d.ts +4 -0
  19. package/dist/ui/components/shadcn/checkbox.js +60 -0
  20. package/dist/ui/components/shadcn/dialog.d.ts +19 -0
  21. package/dist/ui/components/shadcn/dialog.js +106 -0
  22. package/dist/ui/components/shadcn/divider.d.ts +8 -0
  23. package/dist/ui/components/shadcn/divider.js +14 -0
  24. package/dist/ui/components/shadcn/dropdown-menu.d.ts +27 -0
  25. package/dist/ui/components/shadcn/dropdown-menu.js +132 -0
  26. package/dist/ui/components/shadcn/index.d.ts +17 -0
  27. package/dist/ui/components/shadcn/index.js +33 -0
  28. package/dist/ui/components/shadcn/input-selector.d.ts +17 -0
  29. package/dist/ui/components/shadcn/input-selector.js +99 -0
  30. package/dist/ui/components/shadcn/input.d.ts +3 -0
  31. package/dist/ui/components/shadcn/input.js +55 -0
  32. package/dist/ui/components/shadcn/label.d.ts +5 -0
  33. package/dist/ui/components/{Accordion/index.js → shadcn/label.js} +22 -32
  34. package/dist/ui/components/shadcn/popover.d.ts +7 -0
  35. package/dist/ui/components/shadcn/popover.js +64 -0
  36. package/dist/ui/components/shadcn/scroll-area.d.ts +5 -0
  37. package/dist/ui/components/shadcn/scroll-area.js +69 -0
  38. package/dist/ui/components/shadcn/select.d.ts +13 -0
  39. package/dist/ui/components/shadcn/select.js +116 -0
  40. package/dist/ui/components/shadcn/sheet.d.ts +25 -0
  41. package/dist/ui/components/shadcn/sheet.js +116 -0
  42. package/dist/ui/components/shadcn/textarea.d.ts +3 -0
  43. package/dist/ui/components/shadcn/textarea.js +55 -0
  44. package/dist/ui/helpers/index.d.ts +2 -0
  45. package/dist/ui/helpers/index.js +2 -0
  46. package/dist/ui/helpers/openDialog.d.ts +23 -0
  47. package/dist/ui/helpers/openDialog.js +95 -0
  48. package/dist/ui/helpers/utils.d.ts +2 -0
  49. package/dist/ui/helpers/utils.js +8 -0
  50. package/dist/ui/index.d.ts +0 -1
  51. package/dist/ui/index.js +0 -1
  52. package/package.json +23 -3
  53. package/dist/ui/components/Accordion/index.d.ts +0 -12
@@ -2,9 +2,9 @@ import type { Container } from '@azure/cosmos';
2
2
  export declare function getItemCosmos<T>(container: Container, partitionValue: string): Promise<T | null>;
3
3
  export declare function getItemsByCosmos<T>(container: Container, partitionValues: string[]): Promise<T[]>;
4
4
  export declare function queryItemsByText<T>(container: Container, searchFields: {
5
- fieldName: string;
5
+ fieldName: keyof T & string;
6
6
  fieldValue: string;
7
- type: 'contains' | 'equals';
7
+ type: 'contains' | 'equals' | 'not_equals';
8
8
  }[], operator?: 'AND' | 'OR'): Promise<T[] | {
9
9
  error: string;
10
10
  }>;
@@ -114,9 +114,18 @@ function queryItemsCosmos(container, query, parameters) {
114
114
  function queryItemsByText(container_1, searchFields_1) {
115
115
  return __awaiter(this, arguments, void 0, function* (container, searchFields, operator = 'AND') {
116
116
  try {
117
- const conditions = searchFields.map((field, index) => field.type === 'contains' //true to ignore case
118
- ? `CONTAINS(c.${field.fieldName}, @value${index}, true)`
119
- : `c.${field.fieldName} = @value${index}`);
117
+ const conditions = searchFields.map((field, index) => {
118
+ switch (field.type) {
119
+ case 'contains':
120
+ return `CONTAINS(c.${field.fieldName}, @value${index}, true)`; //true to ignore case
121
+ case 'equals':
122
+ return `c.${field.fieldName} = @value${index}`;
123
+ case 'not_equals':
124
+ return `c.${field.fieldName} != @value${index}`;
125
+ default:
126
+ throw new Error(`Unsupported field type: ${field.type}`);
127
+ }
128
+ });
120
129
  const query = `SELECT * FROM c WHERE ${conditions.join(` ${operator} `)}`;
121
130
  const parameters = searchFields.reduce((acc, field, index) => {
122
131
  acc[`value${index}`] = escapeSqlString(field.fieldValue);
@@ -5,9 +5,9 @@ export declare class Cosmos {
5
5
  getItem<T>(partitionValue: string): Promise<T | null>;
6
6
  getItemsBy<T>(partitionValues: string[]): Promise<T[]>;
7
7
  queryItemsByText<T>(searchFields: {
8
- fieldName: string;
8
+ fieldName: keyof T & string;
9
9
  fieldValue: string;
10
- type: 'contains' | 'equals';
10
+ type: 'contains' | 'equals' | 'not_equals';
11
11
  }[], operator?: 'AND' | 'OR'): Promise<T[] | {
12
12
  error: string;
13
13
  }>;
@@ -1,6 +1,7 @@
1
1
  export * from './api';
2
2
  export * from './apigw';
3
3
  export * from './aws';
4
+ export * from './cosmos';
4
5
  export * from './dynamo';
5
6
  export * from './enforceDynamoProvisionCap';
6
7
  export * from './s3';
@@ -10,4 +11,3 @@ export * from './ssm';
10
11
  export * from './ssmInfra';
11
12
  export * from './sts';
12
13
  export * from './validations';
13
- export * from './cosmos';
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./api"), exports);
18
18
  __exportStar(require("./apigw"), exports);
19
19
  __exportStar(require("./aws"), exports);
20
+ __exportStar(require("./cosmos"), exports);
20
21
  __exportStar(require("./dynamo"), exports);
21
22
  __exportStar(require("./enforceDynamoProvisionCap"), exports);
22
23
  __exportStar(require("./s3"), exports);
@@ -26,4 +27,3 @@ __exportStar(require("./ssm"), exports);
26
27
  __exportStar(require("./ssmInfra"), exports);
27
28
  __exportStar(require("./sts"), exports);
28
29
  __exportStar(require("./validations"), exports);
29
- __exportStar(require("./cosmos"), exports);
@@ -1,7 +1,5 @@
1
- export * from './Accordion';
2
1
  export * from './BarChart';
3
2
  export * from './BorderGradient';
4
- export * from './Button';
5
3
  export * from './Chevron';
6
4
  export * from './Close';
7
5
  export * from './Confirm';
@@ -27,6 +25,7 @@ export * from './PulseRing';
27
25
  export * from './RadioGroup';
28
26
  export * from './RowOrColumn';
29
27
  export * from './Search';
28
+ export * from './shadcn';
30
29
  export * from './Sidebar';
31
30
  export * from './SparkLine';
32
31
  export * from './TabBar';
@@ -14,10 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Accordion"), exports);
18
17
  __exportStar(require("./BarChart"), exports);
19
18
  __exportStar(require("./BorderGradient"), exports);
20
- __exportStar(require("./Button"), exports);
21
19
  __exportStar(require("./Chevron"), exports);
22
20
  __exportStar(require("./Close"), exports);
23
21
  __exportStar(require("./Confirm"), exports);
@@ -43,6 +41,7 @@ __exportStar(require("./PulseRing"), exports);
43
41
  __exportStar(require("./RadioGroup"), exports);
44
42
  __exportStar(require("./RowOrColumn"), exports);
45
43
  __exportStar(require("./Search"), exports);
44
+ __exportStar(require("./shadcn"), exports);
46
45
  __exportStar(require("./Sidebar"), exports);
47
46
  __exportStar(require("./SparkLine"), exports);
48
47
  __exportStar(require("./TabBar"), exports);
@@ -0,0 +1,16 @@
1
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
+ import * as React from 'react';
3
+ declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const AccordionHeader: React.ForwardRefExoticComponent<AccordionPrimitive.AccordionHeaderProps & React.RefAttributes<HTMLHeadingElement>>;
5
+ declare const AccordionItem: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>) => React.JSX.Element;
6
+ declare const AccordionTrigger: ({ className, children, chevronColour, ...props }: React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> & {
7
+ chevronColour?: string;
8
+ }) => React.JSX.Element;
9
+ declare const AccordionContent: ({ className, children, ...props }: React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>) => React.JSX.Element;
10
+ declare const AccordionSimple: ({ title, chevronColour, children, className, ...props }: {
11
+ title: string;
12
+ chevronColour?: string;
13
+ children: React.ReactNode;
14
+ className?: string;
15
+ }) => React.JSX.Element;
16
+ export { Accordion, AccordionContent, AccordionItem, AccordionSimple, AccordionTrigger, };
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ 'use client';
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __rest = (this && this.__rest) || function (s, e) {
37
+ var t = {};
38
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
39
+ t[p] = s[p];
40
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
41
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
42
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
43
+ t[p[i]] = s[p[i]];
44
+ }
45
+ return t;
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.AccordionTrigger = exports.AccordionSimple = exports.AccordionItem = exports.AccordionContent = exports.Accordion = exports.AccordionHeader = void 0;
49
+ const AccordionPrimitive = __importStar(require("@radix-ui/react-accordion"));
50
+ const react_icons_1 = require("@radix-ui/react-icons");
51
+ const React = __importStar(require("react"));
52
+ const utils_1 = require("../../helpers/utils");
53
+ const Accordion = AccordionPrimitive.Root;
54
+ exports.Accordion = Accordion;
55
+ exports.AccordionHeader = AccordionPrimitive.AccordionHeader;
56
+ const AccordionItem = (_a) => {
57
+ var { className } = _a, props = __rest(_a, ["className"]);
58
+ return (React.createElement(AccordionPrimitive.Item, Object.assign({ className: (0, utils_1.cn)('border-b', className) }, props)));
59
+ };
60
+ exports.AccordionItem = AccordionItem;
61
+ const AccordionTrigger = (_a) => {
62
+ var { className, children, chevronColour = 'currentColor' } = _a, props = __rest(_a, ["className", "children", "chevronColour"]);
63
+ return (React.createElement(AccordionPrimitive.Header, { asChild: true },
64
+ React.createElement("div", { className: "flex" },
65
+ React.createElement(AccordionPrimitive.Trigger, Object.assign({ className: (0, utils_1.cn)('flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180', className) }, props),
66
+ children,
67
+ React.createElement(react_icons_1.ChevronDownIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200", style: { color: chevronColour } })))));
68
+ };
69
+ exports.AccordionTrigger = AccordionTrigger;
70
+ const AccordionContent = (_a) => {
71
+ var { className, children } = _a, props = __rest(_a, ["className", "children"]);
72
+ return (React.createElement(AccordionPrimitive.Content, Object.assign({ className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down" }, props),
73
+ React.createElement("div", { className: (0, utils_1.cn)('pb-4 pt-0', className) }, children)));
74
+ };
75
+ exports.AccordionContent = AccordionContent;
76
+ const AccordionSimple = (_a) => {
77
+ var { title, chevronColour = 'currentColor', children, className } = _a, props = __rest(_a, ["title", "chevronColour", "children", "className"]);
78
+ return (React.createElement(Accordion, Object.assign({ type: "single", collapsible: true, className: (0, utils_1.cn)('w-full', className) }, props),
79
+ React.createElement(AccordionItem, { value: "item-1" },
80
+ React.createElement(AccordionTrigger, { chevronColour: chevronColour }, title),
81
+ React.createElement(AccordionContent, null, children))));
82
+ };
83
+ exports.AccordionSimple = AccordionSimple;
@@ -0,0 +1,8 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
7
+ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
8
+ export { Alert, AlertDescription, AlertTitle };
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __rest = (this && this.__rest) || function (s, e) {
36
+ var t = {};
37
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
38
+ t[p] = s[p];
39
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
40
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
41
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
42
+ t[p[i]] = s[p[i]];
43
+ }
44
+ return t;
45
+ };
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.AlertTitle = exports.AlertDescription = exports.Alert = void 0;
48
+ const class_variance_authority_1 = require("class-variance-authority");
49
+ const React = __importStar(require("react"));
50
+ const utils_1 = require("../../helpers/utils");
51
+ const alertVariants = (0, class_variance_authority_1.cva)('relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7', {
52
+ variants: {
53
+ variant: {
54
+ default: 'bg-background text-foreground',
55
+ destructive: 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
56
+ },
57
+ },
58
+ defaultVariants: {
59
+ variant: 'default',
60
+ },
61
+ });
62
+ const Alert = React.forwardRef((_a, ref) => {
63
+ var { className, variant } = _a, props = __rest(_a, ["className", "variant"]);
64
+ return (React.createElement("div", Object.assign({ ref: ref, role: "alert", className: (0, utils_1.cn)(alertVariants({ variant }), className) }, props)));
65
+ });
66
+ exports.Alert = Alert;
67
+ Alert.displayName = 'Alert';
68
+ const AlertTitle = React.forwardRef((_a, ref) => {
69
+ var { className } = _a, props = __rest(_a, ["className"]);
70
+ return (React.createElement("h5", Object.assign({ ref: ref, className: (0, utils_1.cn)('mb-1 font-medium leading-none tracking-tight', className) }, props)));
71
+ });
72
+ exports.AlertTitle = AlertTitle;
73
+ AlertTitle.displayName = 'AlertTitle';
74
+ const AlertDescription = React.forwardRef((_a, ref) => {
75
+ var { className } = _a, props = __rest(_a, ["className"]);
76
+ return (React.createElement("div", Object.assign({ ref: ref, className: (0, utils_1.cn)('text-sm [&_p]:leading-relaxed', className) }, props)));
77
+ });
78
+ exports.AlertDescription = AlertDescription;
79
+ AlertDescription.displayName = 'AlertDescription';
@@ -0,0 +1,6 @@
1
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
2
+ import * as React from 'react';
3
+ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
5
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
+ export { Avatar, AvatarFallback, AvatarImage };
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ 'use client';
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __rest = (this && this.__rest) || function (s, e) {
37
+ var t = {};
38
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
39
+ t[p] = s[p];
40
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
41
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
42
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
43
+ t[p[i]] = s[p[i]];
44
+ }
45
+ return t;
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.AvatarImage = exports.AvatarFallback = exports.Avatar = void 0;
49
+ const AvatarPrimitive = __importStar(require("@radix-ui/react-avatar"));
50
+ const React = __importStar(require("react"));
51
+ const utils_1 = require("../../helpers/utils");
52
+ const Avatar = React.forwardRef((_a, ref) => {
53
+ var { className } = _a, props = __rest(_a, ["className"]);
54
+ return (React.createElement(AvatarPrimitive.Root, Object.assign({ ref: ref, className: (0, utils_1.cn)('relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full', className) }, props)));
55
+ });
56
+ exports.Avatar = Avatar;
57
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
58
+ const AvatarImage = React.forwardRef((_a, ref) => {
59
+ var { className } = _a, props = __rest(_a, ["className"]);
60
+ return (React.createElement(AvatarPrimitive.Image, Object.assign({ ref: ref, className: (0, utils_1.cn)('aspect-square h-full w-full', className) }, props)));
61
+ });
62
+ exports.AvatarImage = AvatarImage;
63
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
64
+ const AvatarFallback = React.forwardRef((_a, ref) => {
65
+ var { className } = _a, props = __rest(_a, ["className"]);
66
+ return (React.createElement(AvatarPrimitive.Fallback, Object.assign({ ref: ref, className: (0, utils_1.cn)('flex h-full w-full items-center justify-center rounded-full bg-muted', className) }, props)));
67
+ });
68
+ exports.AvatarFallback = AvatarFallback;
69
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
@@ -0,0 +1,11 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "link" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "icon" | "sm" | "lg" | null | undefined;
6
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __rest = (this && this.__rest) || function (s, e) {
36
+ var t = {};
37
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
38
+ t[p] = s[p];
39
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
40
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
41
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
42
+ t[p[i]] = s[p[i]];
43
+ }
44
+ return t;
45
+ };
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.buttonVariants = exports.Button = void 0;
48
+ const react_slot_1 = require("@radix-ui/react-slot");
49
+ const class_variance_authority_1 = require("class-variance-authority");
50
+ const React = __importStar(require("react"));
51
+ const utils_1 = require("../../helpers/utils");
52
+ const buttonVariants = (0, class_variance_authority_1.cva)('!cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', {
53
+ variants: {
54
+ variant: {
55
+ default: 'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90',
56
+ destructive: 'bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90',
57
+ outline: 'border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground',
58
+ secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
59
+ ghost: 'hover:bg-accent hover:text-accent-foreground',
60
+ link: 'text-primary underline-offset-4 hover:underline',
61
+ },
62
+ size: {
63
+ default: 'h-9 px-4 py-2',
64
+ sm: 'h-8 rounded-md px-3 text-xs',
65
+ lg: 'h-10 rounded-md px-8',
66
+ icon: 'h-9 w-9',
67
+ },
68
+ },
69
+ defaultVariants: {
70
+ variant: 'default',
71
+ size: 'default',
72
+ },
73
+ });
74
+ exports.buttonVariants = buttonVariants;
75
+ const Button = React.forwardRef((_a, ref) => {
76
+ var { className, variant, size, asChild = false } = _a, props = __rest(_a, ["className", "variant", "size", "asChild"]);
77
+ const Comp = asChild ? react_slot_1.Slot : 'button';
78
+ return (React.createElement(Comp, Object.assign({ className: (0, utils_1.cn)(buttonVariants({ variant, size, className })), ref: ref }, props)));
79
+ });
80
+ exports.Button = Button;
81
+ Button.displayName = 'Button';
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
8
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, };
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __rest = (this && this.__rest) || function (s, e) {
36
+ var t = {};
37
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
38
+ t[p] = s[p];
39
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
40
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
41
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
42
+ t[p[i]] = s[p[i]];
43
+ }
44
+ return t;
45
+ };
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.CardTitle = exports.CardHeader = exports.CardFooter = exports.CardDescription = exports.CardContent = exports.Card = void 0;
48
+ const React = __importStar(require("react"));
49
+ const utils_1 = require("../../helpers/utils");
50
+ const Card = React.forwardRef((_a, ref) => {
51
+ var { className } = _a, props = __rest(_a, ["className"]);
52
+ return (React.createElement("div", Object.assign({ ref: ref, className: (0, utils_1.cn)('rounded-xl border bg-card text-card-foreground shadow-sm max-w-full', className) }, props)));
53
+ });
54
+ exports.Card = Card;
55
+ Card.displayName = 'Card';
56
+ const CardHeader = React.forwardRef((_a, ref) => {
57
+ var { className } = _a, props = __rest(_a, ["className"]);
58
+ return (React.createElement("div", Object.assign({ ref: ref, className: (0, utils_1.cn)('flex flex-col space-y-1.5 p-2 pb-0', className) }, props)));
59
+ });
60
+ exports.CardHeader = CardHeader;
61
+ CardHeader.displayName = 'CardHeader';
62
+ const CardTitle = React.forwardRef((_a, ref) => {
63
+ var { className } = _a, props = __rest(_a, ["className"]);
64
+ return (React.createElement("div", Object.assign({ ref: ref, className: (0, utils_1.cn)('font-semibold leading-none tracking-tight', className) }, props)));
65
+ });
66
+ exports.CardTitle = CardTitle;
67
+ CardTitle.displayName = 'CardTitle';
68
+ const CardDescription = React.forwardRef((_a, ref) => {
69
+ var { className } = _a, props = __rest(_a, ["className"]);
70
+ return (React.createElement("div", Object.assign({ ref: ref, className: (0, utils_1.cn)('text-sm text-muted-foreground', className) }, props)));
71
+ });
72
+ exports.CardDescription = CardDescription;
73
+ CardDescription.displayName = 'CardDescription';
74
+ const CardContent = React.forwardRef((_a, ref) => {
75
+ var { className } = _a, props = __rest(_a, ["className"]);
76
+ return (React.createElement("div", Object.assign({ ref: ref, className: (0, utils_1.cn)('p-2 pt-0', className) }, props)));
77
+ });
78
+ exports.CardContent = CardContent;
79
+ CardContent.displayName = 'CardContent';
80
+ const CardFooter = React.forwardRef((_a, ref) => {
81
+ var { className } = _a, props = __rest(_a, ["className"]);
82
+ return (React.createElement("div", Object.assign({ ref: ref, className: (0, utils_1.cn)('flex items-center p-2 pt-0', className) }, props)));
83
+ });
84
+ exports.CardFooter = CardFooter;
85
+ CardFooter.displayName = 'CardFooter';
@@ -0,0 +1,4 @@
1
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
2
+ import * as React from 'react';
3
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Checkbox };
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ 'use client';
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __rest = (this && this.__rest) || function (s, e) {
37
+ var t = {};
38
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
39
+ t[p] = s[p];
40
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
41
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
42
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
43
+ t[p[i]] = s[p[i]];
44
+ }
45
+ return t;
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.Checkbox = void 0;
49
+ const CheckboxPrimitive = __importStar(require("@radix-ui/react-checkbox"));
50
+ const react_icons_1 = require("@radix-ui/react-icons");
51
+ const React = __importStar(require("react"));
52
+ const utils_1 = require("../../helpers/utils");
53
+ const Checkbox = React.forwardRef((_a, ref) => {
54
+ var { className } = _a, props = __rest(_a, ["className"]);
55
+ return (React.createElement(CheckboxPrimitive.Root, Object.assign({ ref: ref, 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) }, props),
56
+ React.createElement(CheckboxPrimitive.Indicator, { className: (0, utils_1.cn)('flex items-center justify-center text-current') },
57
+ React.createElement(react_icons_1.CheckIcon, { className: "h-4 w-4" }))));
58
+ });
59
+ exports.Checkbox = Checkbox;
60
+ Checkbox.displayName = CheckboxPrimitive.Root.displayName;