@getgreenline/blaze-ui 1.0.7 → 1.0.10

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 (63) hide show
  1. package/{build → dist}/components/button.d.ts +2 -3
  2. package/dist/components/button.d.ts.map +1 -0
  3. package/dist/components/button.js +33 -0
  4. package/dist/components/card.js +26 -0
  5. package/dist/components/checkbox.d.ts +5 -0
  6. package/dist/components/checkbox.d.ts.map +1 -0
  7. package/dist/components/checkbox.js +10 -0
  8. package/dist/components/input.d.ts +4 -0
  9. package/dist/components/input.d.ts.map +1 -0
  10. package/dist/components/input.js +8 -0
  11. package/dist/components/label.d.ts +5 -0
  12. package/{build → dist}/components/label.d.ts.map +1 -1
  13. package/dist/components/label.js +9 -0
  14. package/dist/components/popover.d.ts +8 -0
  15. package/dist/components/popover.d.ts.map +1 -0
  16. package/dist/components/popover.js +18 -0
  17. package/dist/components/switch.d.ts +5 -0
  18. package/dist/components/switch.d.ts.map +1 -0
  19. package/dist/components/switch.js +9 -0
  20. package/dist/globals.css +127 -0
  21. package/dist/index.d.ts +9 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +8 -0
  24. package/dist/lib/utils.js +8 -0
  25. package/package.json +51 -33
  26. package/README.md +0 -69
  27. package/build/components/button.d.ts.map +0 -1
  28. package/build/components/button.js +0 -106
  29. package/build/components/button.js.map +0 -1
  30. package/build/components/card.js +0 -51
  31. package/build/components/card.js.map +0 -1
  32. package/build/components/input.d.ts +0 -4
  33. package/build/components/input.d.ts.map +0 -1
  34. package/build/components/input.js +0 -57
  35. package/build/components/input.js.map +0 -1
  36. package/build/components/label.d.ts +0 -5
  37. package/build/components/label.js +0 -60
  38. package/build/components/label.js.map +0 -1
  39. package/build/components/popover.d.ts +0 -8
  40. package/build/components/popover.d.ts.map +0 -1
  41. package/build/components/popover.js +0 -69
  42. package/build/components/popover.js.map +0 -1
  43. package/build/components/segmented-control.d.ts +0 -24
  44. package/build/components/segmented-control.d.ts.map +0 -1
  45. package/build/components/segmented-control.js +0 -94
  46. package/build/components/segmented-control.js.map +0 -1
  47. package/build/components/switch.d.ts +0 -27
  48. package/build/components/switch.d.ts.map +0 -1
  49. package/build/components/switch.js +0 -72
  50. package/build/components/switch.js.map +0 -1
  51. package/build/index.d.ts +0 -9
  52. package/build/index.d.ts.map +0 -1
  53. package/build/index.js +0 -32
  54. package/build/index.js.map +0 -1
  55. package/build/index.mjs +0 -22
  56. package/build/lib/utils.js +0 -9
  57. package/build/lib/utils.js.map +0 -1
  58. package/src/styles/blaze-ui.css +0 -320
  59. package/tailwind.config.js +0 -6
  60. /package/{build → dist}/components/card.d.ts +0 -0
  61. /package/{build → dist}/components/card.d.ts.map +0 -0
  62. /package/{build → dist}/lib/utils.d.ts +0 -0
  63. /package/{build → dist}/lib/utils.d.ts.map +0 -0
@@ -1,106 +0,0 @@
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 = void 0;
48
- exports.Button = Button;
49
- const jsx_runtime_1 = require("react/jsx-runtime");
50
- const React = __importStar(require("react"));
51
- const react_slot_1 = require("@radix-ui/react-slot");
52
- const class_variance_authority_1 = require("class-variance-authority");
53
- const utils_1 = require("../lib/utils");
54
- const buttonVariants = (0, class_variance_authority_1.cva)("tw:inline-flex tw:items-center tw:justify-center tw:gap-2 tw:whitespace-nowrap tw:rounded-md tw:text-sm tw:font-medium tw:transition-all disabled:tw:pointer-events-none disabled:tw:opacity-50 [&_svg]:tw:pointer-events-none [&_svg:not([class*='size-'])]:tw:size-4 tw:shrink-0 [&_svg]:tw:shrink-0 tw:outline-none 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", {
55
- variants: {
56
- variant: {
57
- default: "tw:bg-primary tw:text-primary-foreground tw:shadow-xs hover:tw:bg-primary/90",
58
- destructive: "tw:bg-destructive tw:text-white tw:shadow-xs hover:tw:bg-destructive/90 focus-visible:tw:ring-destructive/20 dark:focus-visible:tw:ring-destructive/40 dark:tw:bg-destructive/60",
59
- outline: "tw:border tw:bg-background tw:shadow-xs hover:tw:bg-accent hover:tw:text-accent-foreground dark:tw:bg-input/30 dark:tw:border-input dark:hover:tw:bg-input/50",
60
- secondary: "tw:bg-secondary tw:text-secondary-foreground tw:shadow-xs hover:tw:bg-secondary/80",
61
- ghost: "hover:tw:bg-accent hover:tw:text-accent-foreground dark:hover:tw:bg-accent/50",
62
- link: "tw:text-primary tw:underline-offset-4 hover:tw:underline",
63
- },
64
- size: {
65
- default: "tw:h-9 tw:px-4 tw:py-2 has-[>svg]:tw:px-3",
66
- sm: "tw:h-8 tw:rounded-md tw:gap-1.5 tw:px-3 has-[>svg]:tw:px-2.5",
67
- lg: "tw:h-10 tw:rounded-md tw:px-6 has-[>svg]:tw:px-4",
68
- icon: "tw:size-9",
69
- },
70
- },
71
- defaultVariants: {
72
- variant: "default",
73
- size: "default",
74
- },
75
- });
76
- exports.buttonVariants = buttonVariants;
77
- function Button(_a) {
78
- var _b;
79
- var { className, variant, size, asChild = false, loading = false, children } = _a, props = __rest(_a, ["className", "variant", "size", "asChild", "loading", "children"]);
80
- const Comp = asChild ? react_slot_1.Slot : "button";
81
- // Wrap raw text nodes so we can hide them via opacity
82
- const wrapTextNodes = (node) => {
83
- var _a;
84
- if (typeof node === "string" || typeof node === "number") {
85
- return (0, jsx_runtime_1.jsx)("span", { "data-loading-text": true, children: node });
86
- }
87
- if (Array.isArray(node)) {
88
- return node.map((n, i) => (0, jsx_runtime_1.jsx)(React.Fragment, { children: wrapTextNodes(n) }, i));
89
- }
90
- if (React.isValidElement(node) && ((_a = node.props) === null || _a === void 0 ? void 0 : _a.children) != null) {
91
- return React.cloneElement(node, undefined, wrapTextNodes(node.props.children));
92
- }
93
- return node;
94
- };
95
- const renderedChildren = wrapTextNodes(children);
96
- const spinner = ((0, jsx_runtime_1.jsx)("span", { "data-loading-spinner": true, "aria-hidden": "true", className: "tw:absolute tw:inset-0 tw:flex tw:items-center tw:justify-center", children: (0, jsx_runtime_1.jsx)("span", { className: "tw:inline-block tw:size-4 tw:animate-spin tw:rounded-full tw:border-2 tw:border-current tw:border-t-transparent" }) }));
97
- if (asChild) {
98
- const onlyChild = React.Children.only(renderedChildren);
99
- const childWithSpinner = React.cloneElement(onlyChild, undefined, (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [loading && spinner, (_b = onlyChild.props) === null || _b === void 0 ? void 0 : _b.children] }));
100
- return ((0, jsx_runtime_1.jsx)(Comp, Object.assign({ "data-slot": "button", "aria-busy": loading || undefined, "aria-disabled": (props === null || props === void 0 ? void 0 : props.disabled) || loading || undefined, className: (0, utils_1.cn)(buttonVariants({ variant, size, className }), loading &&
101
- "tw:relative [&>*:not([data-loading-spinner])]:tw:opacity-0 [&>*:not([data-loading-spinner])]:tw:transition-opacity") }, props, { children: childWithSpinner })));
102
- }
103
- return ((0, jsx_runtime_1.jsxs)(Comp, Object.assign({ "data-slot": "button", "aria-busy": loading || undefined, "aria-disabled": (props === null || props === void 0 ? void 0 : props.disabled) || loading || undefined, disabled: (props === null || props === void 0 ? void 0 : props.disabled) || loading, className: (0, utils_1.cn)(buttonVariants({ variant, size, className }), loading &&
104
- "tw:relative [&>*:not([data-loading-spinner])]:tw:opacity-0 [&>*:not([data-loading-spinner])]:tw:transition-opacity") }, props, { children: [loading && spinner, renderedChildren] })));
105
- }
106
- //# sourceMappingURL=button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+HS,wBAAM;;AA/Hf,6CAA8B;AAC9B,qDAA2C;AAC3C,uEAAiE;AAEjE,wCAAiC;AAEjC,MAAM,cAAc,GAAG,IAAA,8BAAG,EACxB,+fAA+f,EAC/f;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,8EAA8E;YAChF,WAAW,EACT,kLAAkL;YACpL,OAAO,EACL,+JAA+J;YACjK,SAAS,EACP,oFAAo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gBAAgB,KACZ,CACR,CAAA;AACH,CAAC"}
@@ -1,51 +0,0 @@
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)("@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
@@ -1 +0,0 @@
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,8GAA8G,EAC9G,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,oLAAoL,EACpL,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,kCAAkC,EAAE,SAAS,CAAC,IACxD,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,qCAAqC,EAAE,SAAS,CAAC,IAC3D,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,+EAA+E,EAC/E,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,SAAS,EAAE,SAAS,CAAC,IAC/B,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,qDAAqD,EAAE,SAAS,CAAC,IAC3E,KAAK,EACT,CACH,CAAA;AACH,CAAC"}
@@ -1,4 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,57 +0,0 @@
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 tw: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
@@ -1 +0,0 @@
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,ghBAAghB,EAChhB,wFAAwF,EACxF,iHAAiH,EACjH,SAAS,CACV,IACG,KAAK,EACT,CACH,CAAA;CAAA,CAAC,CAAA;AAIO,sBAAK;AAFd,KAAK,CAAC,WAAW,GAAG,OAAO,CAAA"}
@@ -1,5 +0,0 @@
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
@@ -1,60 +0,0 @@
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
@@ -1 +0,0 @@
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,wOAAwO,EACxO,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"}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,69 +0,0 @@
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
@@ -1 +0,0 @@
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,iiBAAiiB,EACjiB,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"}
@@ -1,24 +0,0 @@
1
- import { type VariantProps } from "class-variance-authority";
2
- declare const segmentedControlVariants: (props?: ({
3
- variant?: "default" | "destructive" | "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" | "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
@@ -1 +0,0 @@
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,2CA4EvB;AAED,OAAO,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,CAAA"}
@@ -1,94 +0,0 @@
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)("inline-flex tw:inline-flex items-center tw:items-center rounded-lg tw:rounded-lg border tw:border border-transparent tw:border-transparent", {
11
- variants: {
12
- variant: {
13
- default: "bg-muted tw:bg-muted",
14
- destructive: "bg-destructive/10 tw:bg-destructive/10 border-destructive/20 tw:border-destructive/20",
15
- outline: "bg-background tw:bg-background border-input tw:border-input",
16
- secondary: "bg-secondary/70 tw:bg-secondary/70",
17
- ghost: "bg-transparent tw:bg-transparent",
18
- link: "bg-transparent tw:bg-transparent border-none tw:border-none",
19
- },
20
- size: {
21
- default: "p-1 tw:p-1",
22
- sm: "p-0.5 tw:p-0.5",
23
- lg: "p-1.5 tw:p-1.5",
24
- icon: "p-1 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)("relative tw:relative rounded-md tw:rounded-md font-medium tw:font-medium transition-all tw:transition-all duration-200 tw:duration-200 focus-visible:outline-none focus-visible:tw:outline-none focus-visible:ring-2 focus-visible:tw:ring-2 focus-visible:ring-ring focus-visible:tw:ring-ring focus-visible:ring-offset-2 focus-visible:tw:ring-offset-2 focus:z-10 focus:tw:z-10", {
34
- variants: {
35
- variant: {
36
- default: "text-muted-foreground tw:text-muted-foreground hover:text-foreground hover:tw:text-foreground hover:bg-background/50 hover:tw:bg-background/50 data-[state=active]:bg-background data-[state=active]:tw:bg-background data-[state=active]:text-foreground data-[state=active]:tw:text-foreground data-[state=active]:shadow-sm data-[state=active]:tw:shadow-sm",
37
- destructive: "text-destructive tw:text-destructive hover:text-destructive hover:tw:text-destructive hover:bg-destructive/10 hover:tw:bg-destructive/10 data-[state=active]:bg-destructive data-[state=active]:tw:bg-destructive data-[state=active]:text-destructive-foreground data-[state=active]:tw:text-destructive-foreground data-[state=active]:shadow-sm data-[state=active]:tw:shadow-sm",
38
- outline: "text-muted-foreground tw:text-muted-foreground hover:text-foreground hover:tw:text-foreground hover:bg-muted/50 hover:tw:bg-muted/50 data-[state=active]:bg-background data-[state=active]:tw:bg-background data-[state=active]:text-foreground data-[state=active]:tw:text-foreground data-[state=active]:shadow-sm data-[state=active]:tw:shadow-sm",
39
- secondary: "text-secondary-foreground tw:text-secondary-foreground hover:text-secondary-foreground hover:tw:text-secondary-foreground hover:bg-secondary/60 hover:tw:bg-secondary/60 data-[state=active]:bg-secondary data-[state=active]:tw:bg-secondary data-[state=active]:text-secondary-foreground data-[state=active]:tw:text-secondary-foreground data-[state=active]:shadow-sm data-[state=active]:tw:shadow-sm",
40
- ghost: "text-foreground/80 tw:text-foreground/80 hover:text-foreground hover:tw:text-foreground hover:bg-muted/40 hover:tw:bg-muted/40 data-[state=active]:bg-muted data-[state=active]:tw:bg-muted data-[state=active]:text-foreground data-[state=active]:tw:text-foreground data-[state=active]:shadow-sm data-[state=active]:tw:shadow-sm",
41
- link: "text-primary tw:text-primary hover:text-primary hover:tw:text-primary hover:underline hover:tw:underline data-[state=active]:text-primary data-[state=active]:tw:text-primary data-[state=active]:underline data-[state=active]:tw:underline data-[state=active]:shadow-none data-[state=active]:tw:shadow-none",
42
- },
43
- size: {
44
- default: "px-4 tw:px-4 py-2 tw:py-2 text-sm tw:text-sm",
45
- sm: "px-3 tw:px-3 py-1.5 tw:py-1.5 text-xs tw:text-xs",
46
- lg: "px-5 tw:px-5 py-2.5 tw:py-2.5 text-base tw:text-base",
47
- icon: "px-2 tw:px-2 py-2 tw:py-2 text-sm 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 resolvedVariant = variant !== null && variant !== void 0 ? variant : "default";
58
- const resolvedSize = size !== null && size !== void 0 ? size : "default";
59
- const containerRef = (0, react_1.useRef)(null);
60
- const handleKeyDown = (event, currentIndex) => {
61
- var _a, _b, _c, _d;
62
- let newIndex = currentIndex;
63
- switch (event.key) {
64
- case "ArrowLeft":
65
- case "ArrowUp":
66
- event.preventDefault();
67
- newIndex = currentIndex > 0 ? currentIndex - 1 : options.length - 1;
68
- break;
69
- case "ArrowRight":
70
- case "ArrowDown":
71
- event.preventDefault();
72
- newIndex = currentIndex < options.length - 1 ? currentIndex + 1 : 0;
73
- break;
74
- case "Home":
75
- event.preventDefault();
76
- newIndex = 0;
77
- break;
78
- case "End":
79
- event.preventDefault();
80
- newIndex = options.length - 1;
81
- break;
82
- default:
83
- return;
84
- }
85
- onValueChange((_b = (_a = options[newIndex]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : "");
86
- const buttons = (_c = containerRef.current) === null || _c === void 0 ? void 0 : _c.querySelectorAll("button");
87
- (_d = buttons === null || buttons === void 0 ? void 0 : buttons[newIndex]) === null || _d === void 0 ? void 0 : _d.focus();
88
- };
89
- 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", "data-slot": "segmented-control", "data-variant": resolvedVariant, "data-size": resolvedSize, children: options.map((option, index) => {
90
- const isSelected = value === option.value;
91
- 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", "data-variant": resolvedVariant, "data-slot": "segmented-control-item", children: [option.label, isSelected && (0, jsx_runtime_1.jsx)("span", { className: "sr-only tw:sr-only", children: ", currently selected" })] }, option.value));
92
- }) }));
93
- }
94
- //# sourceMappingURL=segmented-control.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"segmented-control.js","sourceRoot":"","sources":["../../src/components/segmented-control.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAA;;;AAgFZ,4CAqFC;;AApKD,uEAAiE;AAGjE,iCAA8B;AAE9B,wCAAiC;AAEjC,MAAM,wBAAwB,GAAG,IAAA,8BAAG,EAClC,4IAA4I,EAC5I;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,sBAAsB;YAC/B,WAAW,EAAE,uFAAuF;YACpG,OAAO,EAAE,6DAA6D;YACtE,SAAS,EAAE,oCAAoC;YAC/C,KAAK,EAAE,kCAAkC;YACzC,IAAI,EAAE,6DAA6D;SACpE;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,YAAY;YACrB,EAAE,EAAE,gBAAgB;YACpB,EAAE,EAAE,gBAAgB;YACpB,IAAI,EAAE,YAAY;SACnB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAA;AAuIsC,4DAAwB;AArI/D,MAAM,4BAA4B,GAAG,IAAA,8BAAG,EACtC,qXAAqX,EACrX;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,iWAAiW;YACnW,WAAW,EACT,qXAAqX;YACvX,OAAO,EACL,uVAAuV;YACzV,SAAS,EACP,6YAA6Y;YAC/Y,KAAK,EACH,uUAAuU;YACzU,IAAI,EACF,iTAAiT;SACpT;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,8CAA8C;YACvD,EAAE,EAAE,kDAAkD;YACtD,EAAE,EAAE,sDAAsD;YAC1D,IAAI,EAAE,8CAA8C;SACrD;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAA;AAuGQ,oEAA4B;AAvFrC,SAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,KAAK,EACL,aAAa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AAM,SAAS,EAAC,oBAAoB,qCAA4B,KAhB1E,MAAM,CAAC,KAAK,CAiBV,CACV,CAAA;QACH,CAAC,CAAC,GACE,CACP,CAAA;AACH,CAAC"}
@@ -1,27 +0,0 @@
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
@@ -1 +0,0 @@
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"}