@getgreenline/blaze-ui 1.0.3 → 1.0.5

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.
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
3
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
4
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
5
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
7
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
10
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWjE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAA"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Card = Card;
15
+ exports.CardHeader = CardHeader;
16
+ exports.CardFooter = CardFooter;
17
+ exports.CardTitle = CardTitle;
18
+ exports.CardAction = CardAction;
19
+ exports.CardDescription = CardDescription;
20
+ exports.CardContent = CardContent;
21
+ const jsx_runtime_1 = require("react/jsx-runtime");
22
+ const utils_1 = require("../lib/utils");
23
+ function Card(_a) {
24
+ var { className } = _a, props = __rest(_a, ["className"]);
25
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card", className: (0, utils_1.cn)("tw-bg-card tw-text-card-foreground tw-flex tw-flex-col tw-gap-6 tw-rounded-xl tw-border tw-py-6 tw-shadow-sm", className) }, props)));
26
+ }
27
+ function CardHeader(_a) {
28
+ var { className } = _a, props = __rest(_a, ["className"]);
29
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-header", className: (0, utils_1.cn)("tw-@container/card-header tw-grid tw-auto-rows-min tw-grid-rows-[auto_auto] tw-items-start tw-gap-1.5 tw-px-6 has-data-[slot=card-action]:tw-grid-cols-[1fr_auto] [.border-b]:tw-pb-6", className) }, props)));
30
+ }
31
+ function CardTitle(_a) {
32
+ var { className } = _a, props = __rest(_a, ["className"]);
33
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-title", className: (0, utils_1.cn)("tw-leading-none tw-font-semibold", className) }, props)));
34
+ }
35
+ function CardDescription(_a) {
36
+ var { className } = _a, props = __rest(_a, ["className"]);
37
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-description", className: (0, utils_1.cn)("tw-text-muted-foreground tw-text-sm", className) }, props)));
38
+ }
39
+ function CardAction(_a) {
40
+ var { className } = _a, props = __rest(_a, ["className"]);
41
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-action", className: (0, utils_1.cn)("tw-col-start-2 tw-row-span-2 tw-row-start-1 tw-self-start tw-justify-self-end", className) }, props)));
42
+ }
43
+ function CardContent(_a) {
44
+ var { className } = _a, props = __rest(_a, ["className"]);
45
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-content", className: (0, utils_1.cn)("tw-px-6", className) }, props)));
46
+ }
47
+ function CardFooter(_a) {
48
+ var { className } = _a, props = __rest(_a, ["className"]);
49
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ "data-slot": "card-footer", className: (0, utils_1.cn)("tw-flex tw-items-center tw-px-6 [.border-t]:tw-pt-6", className) }, props)));
50
+ }
51
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAoFE,oBAAI;AACJ,gCAAU;AACV,gCAAU;AACV,8BAAS;AACT,gCAAU;AACV,0CAAe;AACf,kCAAW;;AAxFb,wCAAiC;AAEjC,SAAS,IAAI,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACjC,OAAO,CACL,2DACY,MAAM,EAChB,SAAS,EAAE,IAAA,UAAE,EACX,mFAAmF,EACnF,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACvC,OAAO,CACL,2DACY,aAAa,EACvB,SAAS,EAAE,IAAA,UAAE,EACX,4JAA4J,EAC5J,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACtC,OAAO,CACL,2DACY,YAAY,EACtB,SAAS,EAAE,IAAA,UAAE,EAAC,4BAA4B,EAAE,SAAS,CAAC,IAClD,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IAC5C,OAAO,CACL,2DACY,kBAAkB,EAC5B,SAAS,EAAE,IAAA,UAAE,EAAC,+BAA+B,EAAE,SAAS,CAAC,IACrD,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACvC,OAAO,CACL,2DACY,aAAa,EACvB,SAAS,EAAE,IAAA,UAAE,EACX,gEAAgE,EAChE,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACxC,OAAO,CACL,2DACY,cAAc,EACxB,SAAS,EAAE,IAAA,UAAE,EAAC,MAAM,EAAE,SAAS,CAAC,IAC5B,KAAK,EACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAoD;QAApD,EAAE,SAAS,OAAyC,EAApC,KAAK,cAArB,aAAuB,CAAF;IACvC,OAAO,CACL,2DACY,aAAa,EACvB,SAAS,EAAE,IAAA,UAAE,EAAC,yCAAyC,EAAE,SAAS,CAAC,IAC/D,KAAK,EACT,CACH,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
3
+ export { Input };
4
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,KAAK,8KAgBT,CAAA;AAIF,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -0,0 +1,57 @@
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.Input = void 0;
48
+ const jsx_runtime_1 = require("react/jsx-runtime");
49
+ const React = __importStar(require("react"));
50
+ const utils_1 = require("../lib/utils");
51
+ const Input = React.forwardRef((_a, ref) => {
52
+ var { className, type } = _a, props = __rest(_a, ["className", "type"]);
53
+ return ((0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref, type: type, "data-slot": "input", className: (0, utils_1.cn)("file:tw-text-foreground placeholder:tw-text-muted-foreground selection:tw-bg-primary selection:tw-text-primary-foreground dark:tw-bg-input/30 tw-border-input tw-h-9 tw-w-full tw-min-w-0 tw-rounded-md tw-border tw-bg-transparent tw-px-3 tw-py-1 tw-text-base tw-shadow-xs transition-[color,box-shadow] tw-outline-none file:tw-inline-flex file:tw-h-7 file:tw-border-0 file:tw-bg-transparent file:tw-text-sm file:tw-font-medium disabled:tw-pointer-events-none disabled:tw-cursor-not-allowed disabled:tw-opacity-50 md:tw-text-sm", "focus-visible:tw-border-ring focus-visible:tw-ring-ring/50 focus-visible:tw-ring-[3px]", "aria-invalid:tw-ring-destructive/20 dark:aria-invalid:tw-ring-destructive/40 aria-invalid:tw-border-destructive", className) }, props)));
54
+ });
55
+ exports.Input = Input;
56
+ Input.displayName = "Input";
57
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA8B;AAE9B,wCAAiC;AAEjC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAA6B,EAAE,GAAG,EAAE,EAAE;QAAtC,EAAE,SAAS,EAAE,IAAI,OAAY,EAAP,KAAK,cAA3B,qBAA6B,CAAF;IAAY,OAAA,CACxC,gDACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,eACA,OAAO,EACjB,SAAS,EAAE,IAAA,UAAE,EACX,4bAA4b,EAC5b,+EAA+E,EAC/E,wGAAwG,EACxG,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;CAAA,CAAC,CAAA;AAIO,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA"}
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
4
+ export { Label };
5
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AAIvD,QAAA,MAAM,KAAK,yJAaT,CAAA;AAIF,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -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
+ var _a;
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.Label = void 0;
50
+ const jsx_runtime_1 = require("react/jsx-runtime");
51
+ const React = __importStar(require("react"));
52
+ const LabelPrimitive = __importStar(require("@radix-ui/react-label"));
53
+ const utils_1 = require("../lib/utils");
54
+ const Label = React.forwardRef((_a, ref) => {
55
+ var { className } = _a, props = __rest(_a, ["className"]);
56
+ return ((0, jsx_runtime_1.jsx)(LabelPrimitive.Root, Object.assign({ ref: ref, "data-slot": "label", className: (0, utils_1.cn)("tw-flex tw-items-center tw-gap-2 tw-text-sm tw-leading-none tw-font-medium tw-select-none group-data-disabled:tw-pointer-events-none group-data-disabled:tw-opacity-50 peer-disabled:tw-cursor-not-allowed peer-disabled:tw-opacity-50", className) }, props)));
57
+ });
58
+ exports.Label = Label;
59
+ Label.displayName = (_a = LabelPrimitive.Root.displayName) !== null && _a !== void 0 ? _a : "Label";
60
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.js","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,6CAA8B;AAC9B,sEAAuD;AAEvD,wCAAiC;AAEjC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAuB,EAAE,GAAG,EAAE,EAAE;QAAhC,EAAE,SAAS,OAAY,EAAP,KAAK,cAArB,aAAuB,CAAF;IAAY,OAAA,CAClC,uBAAC,cAAc,CAAC,IAAI,kBAClB,GAAG,EAAE,GAAG,eACE,OAAO,EACjB,SAAS,EAAE,IAAA,UAAE,EACX,uMAAuM,EACvM,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;CAAA,CAAC,CAAA;AAIO,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,MAAA,cAAc,CAAC,IAAI,CAAC,WAAW,mCAAI,OAAO,CAAA"}
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
3
+ declare function Popover(props: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
8
+ //# sourceMappingURL=popover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAEzE;AAED,QAAA,MAAM,cAAc,sKAKlB,CAAA;AAGF,QAAA,MAAM,cAAc,gKAiBlB,CAAA;AAGF,QAAA,MAAM,aAAa,+JAKjB,CAAA;AAGF,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,CAAA"}
@@ -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.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = void 0;
49
+ exports.Popover = Popover;
50
+ const jsx_runtime_1 = require("react/jsx-runtime");
51
+ const React = __importStar(require("react"));
52
+ const PopoverPrimitive = __importStar(require("@radix-ui/react-popover"));
53
+ const utils_1 = require("../lib/utils");
54
+ function Popover(props) {
55
+ return (0, jsx_runtime_1.jsx)(PopoverPrimitive.Root, Object.assign({ "data-slot": "popover" }, props));
56
+ }
57
+ const PopoverTrigger = React.forwardRef((props, ref) => ((0, jsx_runtime_1.jsx)(PopoverPrimitive.Trigger, Object.assign({ ref: ref, "data-slot": "popover-trigger" }, props))));
58
+ exports.PopoverTrigger = PopoverTrigger;
59
+ PopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;
60
+ const PopoverContent = React.forwardRef((_a, ref) => {
61
+ var { className, align = "center", sideOffset = 4 } = _a, props = __rest(_a, ["className", "align", "sideOffset"]);
62
+ return ((0, jsx_runtime_1.jsx)(PopoverPrimitive.Portal, { children: (0, jsx_runtime_1.jsx)(PopoverPrimitive.Content, Object.assign({ ref: ref, "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: (0, utils_1.cn)("tw-bg-popover tw-text-popover-foreground data-[state=open]:tw-animate-in data-[state=closed]:tw-animate-out data-[state=closed]:tw-fade-out-0 data-[state=open]:tw-fade-in-0 data-[state=closed]:tw-zoom-out-95 data-[state=open]:tw-zoom-in-95 data-[side=bottom]:tw-slide-in-from-top-2 data-[side=left]:tw-slide-in-from-right-2 data-[side=right]:tw-slide-in-from-left-2 data-[side=top]:tw-slide-in-from-bottom-2 tw-z-50 tw-w-72 tw-origin-[var(--radix-popover-content-transform-origin)] tw-rounded-md tw-border tw-p-4 tw-shadow-md tw-outline-hidden", className) }, props)) }));
63
+ });
64
+ exports.PopoverContent = PopoverContent;
65
+ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
66
+ const PopoverAnchor = React.forwardRef((props, ref) => ((0, jsx_runtime_1.jsx)(PopoverPrimitive.Anchor, Object.assign({ ref: ref, "data-slot": "popover-anchor" }, props))));
67
+ exports.PopoverAnchor = PopoverAnchor;
68
+ PopoverAnchor.displayName = PopoverPrimitive.Anchor.displayName;
69
+ //# sourceMappingURL=popover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CH,0BAAO;;AA7ChB,6CAA8B;AAC9B,0EAA2D;AAE3D,wCAAiC;AAEjC,SAAS,OAAO,CAAC,KAAyD;IACxE,OAAO,uBAAC,gBAAgB,CAAC,IAAI,+BAAW,SAAS,IAAK,KAAK,EAAI,CAAA;AACjE,CAAC;AAED,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAChB,uBAAC,gBAAgB,CAAC,OAAO,kBAAC,GAAG,EAAE,GAAG,eAAY,iBAAiB,IAAK,KAAK,EAAI,CAC9E,CAAC,CAAA;AA+BgB,wCAAc;AA9BhC,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAA;AAEjE,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAyD,EAAE,GAAG,EAAE,EAAE;QAAlE,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,OAAY,EAAP,KAAK,cAAvD,oCAAyD,CAAF;IAAY,OAAA,CACpE,uBAAC,gBAAgB,CAAC,MAAM,cACtB,uBAAC,gBAAgB,CAAC,OAAO,kBACvB,GAAG,EAAE,GAAG,eACE,iBAAiB,EAC3B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,IAAA,UAAE,EACX,qeAAqe,EACre,SAAS,CACV,IACG,KAAK,EACT,GACsB,CAC3B,CAAA;CAAA,CAAC,CAAA;AAWgC,wCAAc;AAVhD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAA;AAEjE,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAChB,uBAAC,gBAAgB,CAAC,MAAM,kBAAC,GAAG,EAAE,GAAG,eAAY,gBAAgB,IAAK,KAAK,EAAI,CAC5E,CAAC,CAAA;AAGgD,sCAAa;AAF/D,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ declare const segmentedControlVariants: (props?: ({
3
+ variant?: "default" | "destructive" | "tw-outline" | "secondary" | "ghost" | "link" | null | undefined;
4
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
5
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
+ declare const segmentedControlItemVariants: (props?: ({
7
+ variant?: "default" | "destructive" | "tw-outline" | "secondary" | "ghost" | "link" | null | undefined;
8
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
9
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
10
+ interface SegmentedControlOption {
11
+ value: string;
12
+ label: string;
13
+ }
14
+ interface SegmentedControlProps extends VariantProps<typeof segmentedControlVariants> {
15
+ options: SegmentedControlOption[];
16
+ value: string;
17
+ onValueChange: (value: string) => void;
18
+ className?: string;
19
+ ariaLabel?: string;
20
+ ariaLabelledBy?: string;
21
+ }
22
+ export declare function SegmentedControl({ options, value, onValueChange, className, ariaLabel, ariaLabelledBy, variant, size, }: SegmentedControlProps): import("react/jsx-runtime").JSX.Element;
23
+ export { segmentedControlItemVariants, segmentedControlVariants };
24
+ //# sourceMappingURL=segmented-control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmented-control.d.ts","sourceRoot":"","sources":["../../src/components/segmented-control.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAOjE,QAAA,MAAM,wBAAwB;;;mFAwB7B,CAAA;AAED,QAAA,MAAM,4BAA4B;;;mFA8BjC,CAAA;AAED,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,qBAAsB,SAAQ,YAAY,CAAC,OAAO,wBAAwB,CAAC;IACnF,OAAO,EAAE,sBAAsB,EAAE,CAAA;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,KAAK,EACL,aAAa,EACb,SAAS,EACT,SAAS,EACT,cAAc,EACd,OAAO,EACP,IAAI,GACL,EAAE,qBAAqB,2CAqEvB;AAED,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,CAAA"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.segmentedControlVariants = exports.segmentedControlItemVariants = void 0;
5
+ exports.SegmentedControl = SegmentedControl;
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const class_variance_authority_1 = require("class-variance-authority");
8
+ const react_1 = require("react");
9
+ const utils_1 = require("../lib/utils");
10
+ const segmentedControlVariants = (0, class_variance_authority_1.cva)("tw-inline-flex tw-items-center tw-rounded-lg tw-border tw-border-transparent", {
11
+ variants: {
12
+ variant: {
13
+ default: "tw-bg-muted",
14
+ destructive: "tw-bg-destructive/10 tw-border-destructive/20",
15
+ outline: "tw-bg-background tw-border-input",
16
+ secondary: "tw-bg-secondary/70",
17
+ ghost: "tw-bg-transparent",
18
+ link: "tw-bg-transparent tw-border-none",
19
+ },
20
+ size: {
21
+ default: "tw-p-1",
22
+ sm: "tw-p-0.5",
23
+ lg: "tw-p-1.5",
24
+ icon: "tw-p-1",
25
+ },
26
+ },
27
+ defaultVariants: {
28
+ variant: "default",
29
+ size: "default",
30
+ },
31
+ });
32
+ exports.segmentedControlVariants = segmentedControlVariants;
33
+ const segmentedControlItemVariants = (0, class_variance_authority_1.cva)("tw-relative tw-rounded-md tw-font-medium tw-transition-all tw-duration-200 focus-visible:tw-outline-none focus-visible:tw-ring-2 focus-visible:tw-ring-ring focus-visible:tw-ring-offset-2 focus:tw-z-10", {
34
+ variants: {
35
+ variant: {
36
+ default: "tw-text-muted-foreground hover:tw-text-foreground hover:tw-bg-background/50 data-[state=active]:tw-bg-background data-[state=active]:tw-text-foreground data-[state=active]:tw-shadow-sm",
37
+ destructive: "tw-text-destructive hover:tw-text-destructive hover:tw-bg-destructive/10 data-[state=active]:tw-bg-destructive data-[state=active]:tw-text-destructive-foreground data-[state=active]:tw-shadow-sm",
38
+ outline: "tw-text-muted-foreground hover:tw-text-foreground hover:tw-bg-muted/50 data-[state=active]:tw-bg-background data-[state=active]:tw-text-foreground data-[state=active]:tw-shadow-sm",
39
+ secondary: "tw-text-secondary-foreground hover:tw-text-secondary-foreground hover:tw-bg-secondary/60 data-[state=active]:tw-bg-secondary data-[state=active]:tw-text-secondary-foreground data-[state=active]:tw-shadow-sm",
40
+ ghost: "tw-text-foreground/80 hover:tw-text-foreground hover:tw-bg-muted/40 data-[state=active]:tw-bg-muted data-[state=active]:tw-text-foreground data-[state=active]:tw-shadow-sm",
41
+ link: "tw-text-primary hover:tw-text-primary hover:tw-underline data-[state=active]:tw-text-primary data-[state=active]:tw-underline data-[state=active]:tw-shadow-none",
42
+ },
43
+ size: {
44
+ default: "tw-px-4 tw-py-2 tw-text-sm",
45
+ sm: "tw-px-3 tw-py-1.5 tw-text-xs",
46
+ lg: "tw-px-5 tw-py-2.5 tw-text-base",
47
+ icon: "tw-px-2 tw-py-2 tw-text-sm",
48
+ },
49
+ },
50
+ defaultVariants: {
51
+ variant: "default",
52
+ size: "default",
53
+ },
54
+ });
55
+ exports.segmentedControlItemVariants = segmentedControlItemVariants;
56
+ function SegmentedControl({ options, value, onValueChange, className, ariaLabel, ariaLabelledBy, variant, size, }) {
57
+ const containerRef = (0, react_1.useRef)(null);
58
+ const handleKeyDown = (event, currentIndex) => {
59
+ var _a, _b, _c, _d;
60
+ let newIndex = currentIndex;
61
+ switch (event.key) {
62
+ case "ArrowLeft":
63
+ case "ArrowUp":
64
+ event.preventDefault();
65
+ newIndex = currentIndex > 0 ? currentIndex - 1 : options.length - 1;
66
+ break;
67
+ case "ArrowRight":
68
+ case "ArrowDown":
69
+ event.preventDefault();
70
+ newIndex = currentIndex < options.length - 1 ? currentIndex + 1 : 0;
71
+ break;
72
+ case "Home":
73
+ event.preventDefault();
74
+ newIndex = 0;
75
+ break;
76
+ case "End":
77
+ event.preventDefault();
78
+ newIndex = options.length - 1;
79
+ break;
80
+ default:
81
+ return;
82
+ }
83
+ onValueChange((_b = (_a = options[newIndex]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "");
84
+ const buttons = (_c = containerRef.current) === null || _c === void 0 ? void 0 : _c.querySelectorAll("button");
85
+ (_d = buttons === null || buttons === void 0 ? void 0 : buttons[newIndex]) === null || _d === void 0 ? void 0 : _d.focus();
86
+ };
87
+ return ((0, jsx_runtime_1.jsx)("div", { ref: containerRef, className: (0, utils_1.cn)(segmentedControlVariants({ variant, size }), className), role: "tablist", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-orientation": "horizontal", children: options.map((option, index) => {
88
+ const isSelected = value === option.value;
89
+ return ((0, jsx_runtime_1.jsxs)("button", { type: "button", role: "tab", "aria-selected": isSelected, "aria-controls": `panel-${option.value}`, id: `tab-${option.value}`, tabIndex: isSelected ? 0 : -1, onClick: () => onValueChange(option.value), onKeyDown: (e) => handleKeyDown(e, index), className: segmentedControlItemVariants({ variant, size }), "aria-describedby": isSelected ? `${option.value}-description` : undefined, "data-state": isSelected ? "active" : "inactive", children: [option.label, isSelected && (0, jsx_runtime_1.jsx)("span", { className: "tw-sr-only", children: ", currently selected" })] }, option.value));
90
+ }) }));
91
+ }
92
+ //# sourceMappingURL=segmented-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"segmented-control.js","sourceRoot":"","sources":["../../src/components/segmented-control.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;AAgFZ,4CA8EC;;AA7JD,uEAAiE;AAGjE,iCAA8B;AAE9B,wCAAiC;AAEjC,MAAM,wBAAwB,GAAG,IAAA,8BAAG,EAClC,+DAA+D,EAC/D;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,UAAU;YACnB,WAAW,EAAE,yCAAyC;YACtD,OAAO,EAAE,4BAA4B;YACrC,SAAS,EAAE,iBAAiB;YAC5B,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,4BAA4B;SACnC;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,KAAK;YACd,EAAE,EAAE,OAAO;YACX,EAAE,EAAE,OAAO;YACX,IAAI,EAAE,KAAK;SACZ;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAA;AAgIsC,4DAAwB;AA9H/D,MAAM,4BAA4B,GAAG,IAAA,8BAAG,EACtC,4KAA4K,EAC5K;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,wKAAwK;YAC1K,WAAW,EACT,kLAAkL;YACpL,OAAO,EACL,mKAAmK;YACrK,SAAS,EACP,8LAA8L;YAChM,KAAK,EACH,2JAA2J;YAC7J,IAAI,EACF,gJAAgJ;SACnJ;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,mBAAmB;YAC5B,EAAE,EAAE,qBAAqB;YACzB,EAAE,E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I,iCAAM,SAAS,EAAC,SAAS,qCAA4B,KAd/D,MAAM,CAAC,KAAK,CAeV,CACV,CAAA;QACH,CAAC,CAAC,GACE,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
3
+ import { Label } from "./label";
4
+ type SwitchBaseProps = Omit<React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, "aria-label" | "aria-labelledby">;
5
+ type SwitchPropsWithLabel = SwitchBaseProps & {
6
+ label: React.ReactNode;
7
+ labelProps?: React.ComponentPropsWithoutRef<typeof Label>;
8
+ "aria-label"?: never;
9
+ "aria-labelledby"?: never;
10
+ };
11
+ type SwitchPropsWithAriaLabel = SwitchBaseProps & {
12
+ label?: undefined;
13
+ labelProps?: never;
14
+ "aria-label": string;
15
+ "aria-labelledby"?: string;
16
+ };
17
+ type SwitchPropsWithAriaLabelledBy = SwitchBaseProps & {
18
+ label?: undefined;
19
+ labelProps?: never;
20
+ "aria-label"?: string;
21
+ "aria-labelledby": string;
22
+ };
23
+ type SwitchProps = SwitchPropsWithLabel | SwitchPropsWithAriaLabel | SwitchPropsWithAriaLabelledBy;
24
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
25
+ export { Switch };
26
+ export type { SwitchProps };
27
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAGzD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,KAAK,eAAe,GAAG,IAAI,CACzB,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,EAC3D,YAAY,GAAG,iBAAiB,CACjC,CAAA;AAED,KAAK,oBAAoB,GAAG,eAAe,GAAG;IAC5C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC,wBAAwB,CAAC,OAAO,KAAK,CAAC,CAAA;IACzD,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAC1B,CAAA;AAED,KAAK,wBAAwB,GAAG,eAAe,GAAG;IAChD,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED,KAAK,6BAA6B,GAAG,eAAe,GAAG;IACrD,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED,KAAK,WAAW,GACZ,oBAAoB,GACpB,wBAAwB,GACxB,6BAA6B,CAAA;AAEjC,QAAA,MAAM,MAAM,uFAgEV,CAAA;AAIF,OAAO,EAAE,MAAM,EAAE,CAAA;AACjB,YAAY,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,72 @@
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
+ var _a;
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.Switch = void 0;
50
+ const jsx_runtime_1 = require("react/jsx-runtime");
51
+ const React = __importStar(require("react"));
52
+ const SwitchPrimitive = __importStar(require("@radix-ui/react-switch"));
53
+ const utils_1 = require("../lib/utils");
54
+ const label_1 = require("./label");
55
+ const Switch = React.forwardRef((_a, ref) => {
56
+ var { className, id: idProp, label, labelProps, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby } = _a, props = __rest(_a, ["className", "id", "label", "labelProps", "aria-label", "aria-labelledby"]);
57
+ const generatedId = React.useId();
58
+ const switchId = idProp !== null && idProp !== void 0 ? idProp : generatedId;
59
+ const _b = labelProps !== null && labelProps !== void 0 ? labelProps : {}, { className: labelClassName, id: providedLabelId } = _b, restLabelProps = __rest(_b, ["className", "id"]);
60
+ const labelId = providedLabelId !== null && providedLabelId !== void 0 ? providedLabelId : `${switchId}-label`;
61
+ if (process.env.NODE_ENV !== "production" && !label && !ariaLabel && !ariaLabelledby) {
62
+ console.warn("Switch: provide either a tw-visible `label` prop or an accessible name via `aria-label` / `aria-labelledby`.");
63
+ }
64
+ const control = ((0, jsx_runtime_1.jsx)(SwitchPrimitive.Root, Object.assign({ ref: ref, id: switchId, "data-slot": "switch", "aria-label": label ? undefined : ariaLabel, "aria-labelledby": label ? labelId : ariaLabelledby, className: (0, utils_1.cn)("tw-border tw-border-red-500 peer data-state-checked:tw-bg-primary data-state-unchecked:tw-bg-input focus-visible:tw-border-ring focus-visible:tw-ring-ring/50 dark:data-state-unchecked:tw-bg-input/80 tw-inline-flex tw-h-[1.15rem] tw-w-8 tw-shrink-0 tw-items-center tw-rounded-full tw-border tw-border-transparent tw-shadow-xs tw-transition-all tw-outline-none focus-visible:tw-ring-[3px] disabled:tw-cursor-not-allowed disabled:tw-opacity-50", className) }, props, { children: (0, jsx_runtime_1.jsx)(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: (0, utils_1.cn)("tw-bg-background dark:data-state-unchecked:tw-bg-foreground dark:data-state-checked:tw-bg-primary-foreground tw-pointer-events-none tw-block tw-size-4 tw-rounded-full tw-ring-0 tw-transition-transform data-state-checked:tw-translate-x-[calc(100%-2px)] data-state-unchecked:tw-translate-x-0") }) })));
65
+ if (!label) {
66
+ return control;
67
+ }
68
+ return ((0, jsx_runtime_1.jsxs)(label_1.Label, Object.assign({}, restLabelProps, { id: labelId, htmlFor: switchId, className: labelClassName, children: [control, (0, jsx_runtime_1.jsx)("span", { children: label })] })));
69
+ });
70
+ exports.Switch = Switch;
71
+ Switch.displayName = (_a = SwitchPrimitive.Root.displayName) !== null && _a !== void 0 ? _a : "Switch";
72
+ //# sourceMappingURL=switch.js.map
@@ -0,0 +1 @@
1
+ {"version":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D,SAAS,EAAE,IAAA,UAAE,EACX,2XAA2X,EAC3X,SAAS,CACV,IACG,KAAK,cAET,uBAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,IAAA,UAAE,EACX,kQAAkQ,CACnQ,GACD,IACmB,CACxB,CAAA;IAED,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,OAAO,CACL,wBAAC,aAAK,oBACA,cAAc,IAClB,EAAE,EAAE,OAAO,EACX,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,cAAc,aAExB,OAAO,EACR,2CAAO,KAAK,GAAQ,KACd,CACT,CAAA;AACH,CAAC,CAAC,CAAA;AAIO,wBAAM;AAFf,MAAM,CAAC,WAAW,GAAG,MAAA,eAAe,CAAC,IAAI,CAAC,WAAW,mCAAI,QAAQ,CAAA"}
package/build/index.d.ts CHANGED
@@ -1,4 +1,10 @@
1
1
  export { Button, buttonVariants } from './components/button';
2
+ export { Input } from './components/input';
3
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, } from './components/card';
4
+ export { Label } from './components/label';
5
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from './components/popover';
6
+ export { Switch } from './components/switch';
7
+ export { SegmentedControl, segmentedControlVariants, segmentedControlItemVariants, } from './components/segmented-control';
2
8
  export { cn } from './lib/utils';
3
9
  export { styles } from './styles/styles';
4
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAC7F,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA"}
package/build/index.js CHANGED
@@ -1,9 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.styles = exports.cn = exports.buttonVariants = exports.Button = void 0;
3
+ exports.styles = exports.cn = exports.segmentedControlItemVariants = exports.segmentedControlVariants = exports.SegmentedControl = exports.Switch = exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = exports.Popover = exports.Label = exports.CardContent = exports.CardDescription = exports.CardAction = exports.CardTitle = exports.CardFooter = exports.CardHeader = exports.Card = exports.Input = exports.buttonVariants = exports.Button = void 0;
4
4
  var button_1 = require("./components/button");
5
5
  Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return button_1.Button; } });
6
6
  Object.defineProperty(exports, "buttonVariants", { enumerable: true, get: function () { return button_1.buttonVariants; } });
7
+ var input_1 = require("./components/input");
8
+ Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return input_1.Input; } });
9
+ var card_1 = require("./components/card");
10
+ Object.defineProperty(exports, "Card", { enumerable: true, get: function () { return card_1.Card; } });
11
+ Object.defineProperty(exports, "CardHeader", { enumerable: true, get: function () { return card_1.CardHeader; } });
12
+ Object.defineProperty(exports, "CardFooter", { enumerable: true, get: function () { return card_1.CardFooter; } });
13
+ Object.defineProperty(exports, "CardTitle", { enumerable: true, get: function () { return card_1.CardTitle; } });
14
+ Object.defineProperty(exports, "CardAction", { enumerable: true, get: function () { return card_1.CardAction; } });
15
+ Object.defineProperty(exports, "CardDescription", { enumerable: true, get: function () { return card_1.CardDescription; } });
16
+ Object.defineProperty(exports, "CardContent", { enumerable: true, get: function () { return card_1.CardContent; } });
17
+ var label_1 = require("./components/label");
18
+ Object.defineProperty(exports, "Label", { enumerable: true, get: function () { return label_1.Label; } });
19
+ var popover_1 = require("./components/popover");
20
+ Object.defineProperty(exports, "Popover", { enumerable: true, get: function () { return popover_1.Popover; } });
21
+ Object.defineProperty(exports, "PopoverTrigger", { enumerable: true, get: function () { return popover_1.PopoverTrigger; } });
22
+ Object.defineProperty(exports, "PopoverContent", { enumerable: true, get: function () { return popover_1.PopoverContent; } });
23
+ Object.defineProperty(exports, "PopoverAnchor", { enumerable: true, get: function () { return popover_1.PopoverAnchor; } });
24
+ var switch_1 = require("./components/switch");
25
+ Object.defineProperty(exports, "Switch", { enumerable: true, get: function () { return switch_1.Switch; } });
26
+ var segmented_control_1 = require("./components/segmented-control");
27
+ Object.defineProperty(exports, "SegmentedControl", { enumerable: true, get: function () { return segmented_control_1.SegmentedControl; } });
28
+ Object.defineProperty(exports, "segmentedControlVariants", { enumerable: true, get: function () { return segmented_control_1.segmentedControlVariants; } });
29
+ Object.defineProperty(exports, "segmentedControlItemVariants", { enumerable: true, get: function () { return segmented_control_1.segmentedControlItemVariants; } });
7
30
  var utils_1 = require("./lib/utils");
8
31
  Object.defineProperty(exports, "cn", { enumerable: true, get: function () { return utils_1.cn; } });
9
32
  var styles_1 = require("./styles/styles");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,8CAA4D;AAAnD,gGAAA,MAAM,OAAA;AAAE,wGAAA,cAAc,OAAA;AAC/B,qCAAgC;AAAvB,2FAAA,EAAE,OAAA;AACX,0CAAwC;AAA/B,gGAAA,MAAM,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,8CAA4D;AAAnD,gGAAA,MAAM,OAAA;AAAE,wGAAA,cAAc,OAAA;AAC/B,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,0CAQ0B;AAPxB,4FAAA,IAAI,OAAA;AACJ,kGAAA,UAAU,OAAA;AACV,kGAAA,UAAU,OAAA;AACV,iGAAA,SAAS,OAAA;AACT,kGAAA,UAAU,OAAA;AACV,uGAAA,eAAe,OAAA;AACf,mGAAA,WAAW,OAAA;AAEb,4CAA0C;AAAjC,8FAAA,KAAK,OAAA;AACd,gDAA6F;AAApF,kGAAA,OAAO,OAAA;AAAE,yGAAA,cAAc,OAAA;AAAE,yGAAA,cAAc,OAAA;AAAE,wGAAA,aAAa,OAAA;AAC/D,8CAA4C;AAAnC,gGAAA,MAAM,OAAA;AACf,oEAIuC;AAHrC,qHAAA,gBAAgB,OAAA;AAChB,6HAAA,wBAAwB,OAAA;AACxB,iIAAA,4BAA4B,OAAA;AAE9B,qCAAgC;AAAvB,2FAAA,EAAE,OAAA;AACX,0CAAwC;AAA/B,gGAAA,MAAM,OAAA"}