@motiadev/ui 0.13.0-beta.162-125657 → 0.13.0-beta.162-380543

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 (142) hide show
  1. package/LICENSE +21 -93
  2. package/dist/components/ui/background-effect.d.ts +7 -4
  3. package/dist/components/ui/background-effect.d.ts.map +1 -1
  4. package/dist/components/ui/background-effect.js +31 -0
  5. package/dist/components/ui/background-effect.js.map +1 -0
  6. package/dist/components/ui/badge.d.ts +11 -8
  7. package/dist/components/ui/badge.d.ts.map +1 -1
  8. package/dist/components/ui/badge.js +57 -0
  9. package/dist/components/ui/badge.js.map +1 -0
  10. package/dist/components/ui/breadcrumb.d.ts +24 -20
  11. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  12. package/dist/components/ui/breadcrumb.js +168 -0
  13. package/dist/components/ui/breadcrumb.js.map +1 -0
  14. package/dist/components/ui/button.d.ts +14 -9
  15. package/dist/components/ui/button.d.ts.map +1 -1
  16. package/dist/components/ui/button.js +88 -0
  17. package/dist/components/ui/button.js.map +1 -0
  18. package/dist/components/ui/checkbox.d.ts +7 -3
  19. package/dist/components/ui/checkbox.d.ts.map +1 -1
  20. package/dist/components/ui/checkbox.js +53 -0
  21. package/dist/components/ui/checkbox.js.map +1 -0
  22. package/dist/components/ui/collapsible-panel.d.ts +17 -13
  23. package/dist/components/ui/collapsible-panel.d.ts.map +1 -1
  24. package/dist/components/ui/collapsible-panel.js +252 -0
  25. package/dist/components/ui/collapsible-panel.js.map +1 -0
  26. package/dist/components/ui/container.d.ts +17 -13
  27. package/dist/components/ui/container.d.ts.map +1 -1
  28. package/dist/components/ui/container.js +143 -0
  29. package/dist/components/ui/container.js.map +1 -0
  30. package/dist/components/ui/dropdown-menu.d.ts +23 -21
  31. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  32. package/dist/components/ui/dropdown-menu.js +430 -0
  33. package/dist/components/ui/dropdown-menu.js.map +1 -0
  34. package/dist/components/ui/empty.d.ts +34 -10
  35. package/dist/components/ui/empty.d.ts.map +1 -1
  36. package/dist/components/ui/empty.js +219 -0
  37. package/dist/components/ui/empty.js.map +1 -0
  38. package/dist/components/ui/input.d.ts +12 -8
  39. package/dist/components/ui/input.d.ts.map +1 -1
  40. package/dist/components/ui/input.js +66 -0
  41. package/dist/components/ui/input.js.map +1 -0
  42. package/dist/components/ui/label.d.ts +7 -3
  43. package/dist/components/ui/label.d.ts.map +1 -1
  44. package/dist/components/ui/label.js +43 -0
  45. package/dist/components/ui/label.js.map +1 -0
  46. package/dist/components/ui/level-dot.d.ts +7 -3
  47. package/dist/components/ui/level-dot.d.ts.map +1 -1
  48. package/dist/components/ui/level-dot.js +35 -0
  49. package/dist/components/ui/level-dot.js.map +1 -0
  50. package/dist/components/ui/panel.d.ts +32 -28
  51. package/dist/components/ui/panel.d.ts.map +1 -1
  52. package/dist/components/ui/panel.js +284 -0
  53. package/dist/components/ui/panel.js.map +1 -0
  54. package/dist/components/ui/select.d.ts +11 -13
  55. package/dist/components/ui/select.d.ts.map +1 -1
  56. package/dist/components/ui/select.js +341 -0
  57. package/dist/components/ui/select.js.map +1 -0
  58. package/dist/components/ui/side-panel-detail.d.ts +8 -5
  59. package/dist/components/ui/side-panel-detail.d.ts.map +1 -1
  60. package/dist/components/ui/side-panel-detail.js +54 -0
  61. package/dist/components/ui/side-panel-detail.js.map +1 -0
  62. package/dist/components/ui/side-panel.d.ts +18 -18
  63. package/dist/components/ui/side-panel.d.ts.map +1 -1
  64. package/dist/components/ui/side-panel.js +138 -0
  65. package/dist/components/ui/side-panel.js.map +1 -0
  66. package/dist/components/ui/sidebar.d.ts +12 -8
  67. package/dist/components/ui/sidebar.d.ts.map +1 -1
  68. package/dist/components/ui/sidebar.js +153 -0
  69. package/dist/components/ui/sidebar.js.map +1 -0
  70. package/dist/components/ui/table.d.ts +5 -4
  71. package/dist/components/ui/table.d.ts.map +1 -1
  72. package/dist/components/ui/table.js +285 -0
  73. package/dist/components/ui/table.js.map +1 -0
  74. package/dist/components/ui/tabs.d.ts +10 -6
  75. package/dist/components/ui/tabs.d.ts.map +1 -1
  76. package/dist/components/ui/tabs.js +142 -0
  77. package/dist/components/ui/tabs.js.map +1 -0
  78. package/dist/components/ui/textarea.d.ts +6 -2
  79. package/dist/components/ui/textarea.d.ts.map +1 -1
  80. package/dist/components/ui/textarea.js +42 -0
  81. package/dist/components/ui/textarea.js.map +1 -0
  82. package/dist/components/ui/tooltip.d.ts +10 -5
  83. package/dist/components/ui/tooltip.d.ts.map +1 -1
  84. package/dist/components/ui/tooltip.js +54 -0
  85. package/dist/components/ui/tooltip.js.map +1 -0
  86. package/dist/index.d.ts +24 -24
  87. package/dist/index.js +25 -11031
  88. package/dist/lib/utils.d.ts +6 -2
  89. package/dist/lib/utils.d.ts.map +1 -1
  90. package/dist/lib/utils.js +11 -0
  91. package/dist/lib/utils.js.map +1 -0
  92. package/dist/stores/use-theme-store.d.ts +22 -17
  93. package/dist/stores/use-theme-store.d.ts.map +1 -1
  94. package/dist/stores/use-theme-store.js +30 -0
  95. package/dist/stores/use-theme-store.js.map +1 -0
  96. package/dist/styles.css +2647 -0
  97. package/dist/styles.css.map +1 -0
  98. package/dist/styles.js +0 -0
  99. package/package.json +13 -15
  100. package/dist/components/ui/background-effect.stories.d.ts +0 -12
  101. package/dist/components/ui/background-effect.stories.d.ts.map +0 -1
  102. package/dist/components/ui/badge.stories.d.ts +0 -19
  103. package/dist/components/ui/badge.stories.d.ts.map +0 -1
  104. package/dist/components/ui/breadcrumb.stories.d.ts +0 -21
  105. package/dist/components/ui/breadcrumb.stories.d.ts.map +0 -1
  106. package/dist/components/ui/button.stories.d.ts +0 -25
  107. package/dist/components/ui/button.stories.d.ts.map +0 -1
  108. package/dist/components/ui/checkbox.stories.d.ts +0 -25
  109. package/dist/components/ui/checkbox.stories.d.ts.map +0 -1
  110. package/dist/components/ui/collapsible-panel.stories.d.ts +0 -12
  111. package/dist/components/ui/collapsible-panel.stories.d.ts.map +0 -1
  112. package/dist/components/ui/container.stories.d.ts +0 -10
  113. package/dist/components/ui/container.stories.d.ts.map +0 -1
  114. package/dist/components/ui/dropdown-menu.stories.d.ts +0 -18
  115. package/dist/components/ui/dropdown-menu.stories.d.ts.map +0 -1
  116. package/dist/components/ui/input.stories.d.ts +0 -23
  117. package/dist/components/ui/input.stories.d.ts.map +0 -1
  118. package/dist/components/ui/label.stories.d.ts +0 -17
  119. package/dist/components/ui/label.stories.d.ts.map +0 -1
  120. package/dist/components/ui/level-dot.stories.d.ts +0 -19
  121. package/dist/components/ui/level-dot.stories.d.ts.map +0 -1
  122. package/dist/components/ui/panel.stories.d.ts +0 -24
  123. package/dist/components/ui/panel.stories.d.ts.map +0 -1
  124. package/dist/components/ui/select.stories.d.ts +0 -18
  125. package/dist/components/ui/select.stories.d.ts.map +0 -1
  126. package/dist/components/ui/side-panel-detail.stories.d.ts +0 -12
  127. package/dist/components/ui/side-panel-detail.stories.d.ts.map +0 -1
  128. package/dist/components/ui/side-panel.stories.d.ts +0 -13
  129. package/dist/components/ui/side-panel.stories.d.ts.map +0 -1
  130. package/dist/components/ui/sidebar.stories.d.ts +0 -14
  131. package/dist/components/ui/sidebar.stories.d.ts.map +0 -1
  132. package/dist/components/ui/table.stories.d.ts +0 -18
  133. package/dist/components/ui/table.stories.d.ts.map +0 -1
  134. package/dist/components/ui/tabs.stories.d.ts +0 -16
  135. package/dist/components/ui/tabs.stories.d.ts.map +0 -1
  136. package/dist/components/ui/textarea.stories.d.ts +0 -21
  137. package/dist/components/ui/textarea.stories.d.ts.map +0 -1
  138. package/dist/components/ui/tooltip.stories.d.ts +0 -21
  139. package/dist/components/ui/tooltip.stories.d.ts.map +0 -1
  140. package/dist/index.cjs +0 -122
  141. package/dist/index.d.ts.map +0 -1
  142. package/dist/ui.css +0 -1
package/LICENSE CHANGED
@@ -1,93 +1,21 @@
1
- Elastic License 2.0
2
-
3
- URL: https://www.elastic.co/licensing/elastic-license
4
-
5
- ## Acceptance
6
-
7
- By using the software, you agree to all of the terms and conditions below.
8
-
9
- ## Copyright License
10
-
11
- The licensor grants you a non-exclusive, royalty-free, worldwide,
12
- non-sublicensable, non-transferable license to use, copy, distribute, make
13
- available, and prepare derivative works of the software, in each case subject
14
- to the limitations and conditions below.
15
-
16
- ## Limitations
17
-
18
- You may not provide the software to third parties as a hosted or managed
19
- service, where the service provides users with access to any substantial set of
20
- the features or functionality of the software.
21
-
22
- You may not move, change, disable, or circumvent the license key functionality
23
- in the software, and you may not remove or obscure any functionality in the
24
- software that is protected by the license key.
25
-
26
- You may not alter, remove, or obscure any licensing, copyright, or other notices
27
- of the licensor in the software. Any use of the licensor's trademarks is subject
28
- to applicable law.
29
-
30
- ## Patents
31
-
32
- The licensor grants you a license, under any patent claims the licensor can
33
- license, or becomes able to license, to make, have made, use, sell, offer for
34
- sale, import and have imported the software, in each case subject to the
35
- limitations and conditions in this license. This license does not cover any
36
- patent claims that you cause to be infringed by modifications or additions to
37
- the software. If you or your company make any written claim that the software
38
- infringes or contributes to infringement of any patent, your patent license for
39
- the software granted under these terms ends immediately. If your company makes
40
- such a claim, your patent license ends immediately for work on behalf of your
41
- company.
42
-
43
- ## Notices
44
-
45
- You must ensure that anyone who gets a copy of any part of the software from you
46
- also gets a copy of these terms.
47
-
48
- If you modify the software, you must include in any modified copies of the
49
- software prominent notices stating that you have modified the software.
50
-
51
- ## No Other Rights
52
-
53
- These terms do not imply any licenses other than those expressly granted in
54
- these terms.
55
-
56
- ## Termination
57
-
58
- If you use the software in violation of these terms, such use is not licensed,
59
- and your licenses will automatically terminate. If the licensor provides you
60
- with a notice of your violation, and you cease all violation of this license no
61
- later than 30 days after you receive that notice, your licenses will be
62
- reinstated retroactively. However, if you violate these terms after such
63
- reinstatement, any additional violation of these terms will cause your licenses
64
- to terminate automatically and permanently.
65
-
66
- ## No Liability
67
-
68
- *As far as the law allows, the software comes as is, without any warranty or
69
- condition, and the licensor will not be liable to you for any damages arising
70
- out of these terms or the use or nature of the software, under any kind of
71
- legal claim.*
72
-
73
- ## Definitions
74
-
75
- The **licensor** is the entity offering these terms, and the **software** is the
76
- software the licensor makes available under these terms, including any portion
77
- of it.
78
-
79
- **you** refers to the individual or entity agreeing to these terms.
80
-
81
- **your company** is any legal entity, sole proprietorship, or other kind of
82
- organization that you work for, plus all organizations that have control over,
83
- are under the control of, or are under common control with that organization.
84
- **control** means ownership of substantially all the assets of an entity, or the
85
- power to direct its management and policies by vote, contract, or otherwise.
86
- Control can be direct or indirect.
87
-
88
- **your licenses** are all the licenses granted to you for the software under
89
- these terms.
90
-
91
- **use** means anything you do with the software requiring one of your licenses.
92
-
93
- **trademark** means trademarks, service marks, and similar rights.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Motia
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,8 +1,11 @@
1
- import { default as React } from 'react';
1
+ import React from "react";
2
+
3
+ //#region src/components/ui/background-effect.d.ts
2
4
  type PatternType = 'subtle';
3
5
  type BackgroundEffectProps = {
4
- patternType?: PatternType;
6
+ patternType?: PatternType;
5
7
  };
6
- export declare const BackgroundEffect: React.FC<BackgroundEffectProps>;
7
- export {};
8
+ declare const BackgroundEffect: React.FC<BackgroundEffectProps>;
9
+ //#endregion
10
+ export { BackgroundEffect };
8
11
  //# sourceMappingURL=background-effect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"background-effect.d.ts","sourceRoot":"","sources":["../../../src/components/ui/background-effect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,WAAW,GAAG,QAAQ,CAAA;AAE3B,KAAK,qBAAqB,GAAG;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AASD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAc5D,CAAA"}
1
+ {"version":3,"file":"background-effect.d.ts","names":[],"sources":["../../../src/components/ui/background-effect.tsx"],"sourcesContent":[],"mappings":";;;KAGK,WAAA;KAEA,qBAAA;EAFA,WAAA,CAAA,EAGW,WAHA;AAAA,CAAA;AAaH,cAAA,gBAA2B,EAAT,KAAA,CAAM,EAAG,CAAA,qBAAD,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import { jsx } from "react/jsx-runtime";
3
+
4
+ //#region src/components/ui/background-effect.tsx
5
+ const types = { subtle: {
6
+ width: "100%",
7
+ height: "100%"
8
+ } };
9
+ const BackgroundEffect = (t0) => {
10
+ const $ = c(2);
11
+ const { patternType: t1 } = t0;
12
+ const style = types[t1 === void 0 ? "subtle" : t1];
13
+ let t2;
14
+ if ($[0] !== style) {
15
+ t2 = /* @__PURE__ */ jsx("div", {
16
+ "aria-hidden": "true",
17
+ className: "absolute top-0 h-full w-full inset-x-0 -z-10 transform-gpu overflow-hidden pointer-events-none",
18
+ children: /* @__PURE__ */ jsx("div", {
19
+ style,
20
+ className: "relative -z-10 aspect-1155/678 bg-linear-to-br from-white/60 to-[#050505] opacity-10 pointer-events-none"
21
+ })
22
+ });
23
+ $[0] = style;
24
+ $[1] = t2;
25
+ } else t2 = $[1];
26
+ return t2;
27
+ };
28
+
29
+ //#endregion
30
+ export { BackgroundEffect };
31
+ //# sourceMappingURL=background-effect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"background-effect.js","names":["React","CSSProperties","PatternType","BackgroundEffectProps","patternType","types","Record","subtle","width","height","BackgroundEffect","FC","t0","$","_c","t1","undefined","style","t2"],"sources":["../../../src/components/ui/background-effect.tsx"],"sourcesContent":["import type React from 'react'\nimport type { CSSProperties } from 'react'\n\ntype PatternType = 'subtle'\n\ntype BackgroundEffectProps = {\n patternType?: PatternType\n}\n\nconst types: Record<PatternType, CSSProperties> = {\n subtle: {\n width: '100%',\n height: '100%',\n },\n}\n\nexport const BackgroundEffect: React.FC<BackgroundEffectProps> = ({ patternType = 'subtle' }) => {\n const style = types[patternType]\n\n return (\n <div\n aria-hidden=\"true\"\n className=\"absolute top-0 h-full w-full inset-x-0 -z-10 transform-gpu overflow-hidden pointer-events-none\"\n >\n <div\n style={style}\n className=\"relative -z-10 aspect-1155/678 bg-linear-to-br from-white/60 to-[#050505] opacity-10 pointer-events-none\"\n ></div>\n </div>\n )\n}\n"],"mappings":";;;;AASA,MAAMK,QAA4C,EAChDE,QAAQ;CACNC,OAAO;CACPC,QAAQ;CACV,EACD;AAED,MAAaC,oBAAoDE,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAV,aAAAW,OAAAH;CAChE,MAAAK,QAAcZ,MADoDU,OAAAC,SAAA,WAAAD;CAClC,IAAAG;AAAA,KAAAL,EAAA,OAAAI,OAAA;AAG9BC,OAAA,oBAAA;GACc,eAAA;GACF,WAAA;aAEV,oBAAA;IACSD;IACG,WAAA;KAEd;IAAM;AAAAJ,IAAA,KAAAI;AAAAJ,IAAA,KAAAK;OAAAA,MAAAL,EAAA;AAAA,QARNK"}
@@ -1,10 +1,13 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import { FC, HTMLAttributes } from 'react';
1
+ import { VariantProps } from "class-variance-authority";
2
+ import { FC, HTMLAttributes } from "react";
3
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
4
+
5
+ //#region src/components/ui/badge.d.ts
3
6
  declare const badgeVariants: (props?: ({
4
- variant?: "info" | "success" | "error" | "default" | "outline" | "warning" | null | undefined;
5
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
- export interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
- }
8
- export declare const Badge: FC<BadgeProps>;
9
- export {};
7
+ variant?: "info" | "success" | "error" | "default" | "outline" | "warning" | null | undefined;
8
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
9
+ interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}
10
+ declare const Badge: FC<BadgeProps>;
11
+ //#endregion
12
+ export { Badge, BadgeProps };
10
13
  //# sourceMappingURL=badge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAG/C,QAAA,MAAM,aAAa;;8EAcjB,CAAA;AAEF,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzG,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAEhC,CAAA"}
1
+ {"version":3,"file":"badge.d.ts","names":[],"sources":["../../../src/components/ui/badge.tsx"],"sourcesContent":[],"mappings":";;;;;cAIM;;IAcJ,+BAAA,CAAA;AAdI,UAgBW,UAAA,SAAmB,cAFlC,CAEiD,cAFjD,CAAA,EAEkE,YAFlE,CAAA,OAEsF,aAFtF,CAAA,CAAA,CAEF;AAAmD,cAEtC,KAFsC,EAE/B,EAF+B,CAE5B,UAF4B,CAAA"}
@@ -0,0 +1,57 @@
1
+ import { cn } from "../../lib/utils.js";
2
+ import { c } from "react/compiler-runtime";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
+
6
+ //#region src/components/ui/badge.tsx
7
+ const badgeVariants = cva("inline-flex items-center rounded-full px-4 py-1 text-xs font-bold transition-colors", {
8
+ variants: { variant: {
9
+ info: "dark:bg-accent-100 dark:text-accent-1000 bg-accent-200 text-accent-900 capitalize",
10
+ success: "bg-accent-1000 text-white",
11
+ error: "bg-destructive/10 text-destructive capitalize",
12
+ default: "dark:bg-gray-800/30 dark:text-gray-500 bg-gray-100 text-gray-800",
13
+ outline: "border border-gray-200 dark:border-gray-700",
14
+ warning: "border-transparent bg-amber-300 text-amber-950 hover:bg-amber/80"
15
+ } },
16
+ defaultVariants: { variant: "default" }
17
+ });
18
+ const Badge = (t0) => {
19
+ const $ = c(10);
20
+ let className;
21
+ let props;
22
+ let variant;
23
+ if ($[0] !== t0) {
24
+ ({className, variant, ...props} = t0);
25
+ $[0] = t0;
26
+ $[1] = className;
27
+ $[2] = props;
28
+ $[3] = variant;
29
+ } else {
30
+ className = $[1];
31
+ props = $[2];
32
+ variant = $[3];
33
+ }
34
+ let t1;
35
+ if ($[4] !== className || $[5] !== variant) {
36
+ t1 = cn(badgeVariants({ variant }), className);
37
+ $[4] = className;
38
+ $[5] = variant;
39
+ $[6] = t1;
40
+ } else t1 = $[6];
41
+ let t2;
42
+ if ($[7] !== props || $[8] !== t1) {
43
+ t2 = /* @__PURE__ */ jsx("div", {
44
+ className: t1,
45
+ ...props
46
+ });
47
+ $[7] = props;
48
+ $[8] = t1;
49
+ $[9] = t2;
50
+ } else t2 = $[9];
51
+ return t2;
52
+ };
53
+ Badge.displayName = "Badge";
54
+
55
+ //#endregion
56
+ export { Badge };
57
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.js","names":["cva","VariantProps","FC","HTMLAttributes","cn","badgeVariants","variants","variant","info","success","error","default","outline","warning","defaultVariants","BadgeProps","HTMLDivElement","Badge","t0","$","_c","className","props","t1","t2","displayName"],"sources":["../../../src/components/ui/badge.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport type { FC, HTMLAttributes } from 'react'\nimport { cn } from '../../lib/utils'\n\nconst badgeVariants = cva('inline-flex items-center rounded-full px-4 py-1 text-xs font-bold transition-colors', {\n variants: {\n variant: {\n info: 'dark:bg-accent-100 dark:text-accent-1000 bg-accent-200 text-accent-900 capitalize',\n success: 'bg-accent-1000 text-white',\n error: 'bg-destructive/10 text-destructive capitalize',\n default: 'dark:bg-gray-800/30 dark:text-gray-500 bg-gray-100 text-gray-800',\n outline: 'border border-gray-200 dark:border-gray-700',\n warning: 'border-transparent bg-amber-300 text-amber-950 hover:bg-amber/80',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n})\n\nexport interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {}\n\nexport const Badge: FC<BadgeProps> = ({ className, variant, ...props }) => {\n return <div className={cn(badgeVariants({ variant }), className)} {...props} />\n}\n\nBadge.displayName = 'Badge'\n"],"mappings":";;;;;;AAIA,MAAMK,gBAAgBL,IAAI,uFAAuF;CAC/GM,UAAU,EACRC,SAAS;EACPC,MAAM;EACNC,SAAS;EACTC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,SAAS;EACX,EACD;CACDC,iBAAiB,EACfP,SAAS,WACX;CACD,CAAC;AAIF,MAAaU,SAAwBC,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAf;AAAA,KAAAY,EAAA,OAAAD,IAAA;AAAC,GAAA,CAAAG,WAAAd,YAAAe,SAAAJ;AAAgCC,IAAA,KAAAD;AAAAC,IAAA,KAAAE;AAAAF,IAAA,KAAAG;AAAAH,IAAA,KAAAZ;QAAA;AAAAc,cAAAF,EAAA;AAAAG,UAAAH,EAAA;AAAAZ,YAAAY,EAAA;;CAAA,IAAAI;AAAA,KAAAJ,EAAA,OAAAE,aAAAF,EAAA,OAAAZ,SAAA;AAC7CgB,OAAAnB,GAAGC,cAAc,EAAAE,SAAW,CAAC,EAAEc,UAAU;AAAAF,IAAA,KAAAE;AAAAF,IAAA,KAAAZ;AAAAY,IAAA,KAAAI;OAAAA,MAAAJ,EAAA;CAAA,IAAAK;AAAA,KAAAL,EAAA,OAAAG,SAAAH,EAAA,OAAAI,IAAA;AAAzDC,OAAA,oBAAA;GAAgB,WAAAD;GAAyC,GAAMD;IAAS;AAAAH,IAAA,KAAAG;AAAAH,IAAA,KAAAI;AAAAJ,IAAA,KAAAK;OAAAA,MAAAL,EAAA;AAAA,QAAxEK;;AAGTP,MAAMQ,cAAc"}
@@ -1,27 +1,31 @@
1
- import { ComponentProps, FC, ReactNode } from 'react';
2
- export interface BreadcrumbItemProps {
1
+ import { ComponentProps, FC, ReactNode } from "react";
2
+
3
+ //#region src/components/ui/breadcrumb.d.ts
4
+ interface BreadcrumbItemProps {
5
+ label: string | ReactNode;
6
+ icon?: ReactNode;
7
+ onClick?: () => void;
8
+ isLast: boolean;
9
+ dropdownItems?: {
3
10
  label: string | ReactNode;
4
11
  icon?: ReactNode;
5
12
  onClick?: () => void;
6
- isLast: boolean;
7
- dropdownItems?: {
8
- label: string | ReactNode;
9
- icon?: ReactNode;
10
- onClick?: () => void;
11
- }[];
13
+ }[];
12
14
  }
13
- export declare const BreadcrumbItem: FC<BreadcrumbItemProps>;
14
- export interface BreadcrumbProps extends ComponentProps<'div'> {
15
- items: {
16
- label: string | ReactNode;
17
- icon?: ReactNode;
18
- onClick?: () => void;
19
- dropdownItems?: {
20
- label: string | ReactNode;
21
- icon?: ReactNode;
22
- onClick?: () => void;
23
- }[];
15
+ declare const BreadcrumbItem: FC<BreadcrumbItemProps>;
16
+ interface BreadcrumbProps extends ComponentProps<'div'> {
17
+ items: {
18
+ label: string | ReactNode;
19
+ icon?: ReactNode;
20
+ onClick?: () => void;
21
+ dropdownItems?: {
22
+ label: string | ReactNode;
23
+ icon?: ReactNode;
24
+ onClick?: () => void;
24
25
  }[];
26
+ }[];
25
27
  }
26
- export declare const Breadcrumb: FC<BreadcrumbProps>;
28
+ declare const Breadcrumb: FC<BreadcrumbProps>;
29
+ //#endregion
30
+ export { Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps };
27
31
  //# sourceMappingURL=breadcrumb.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../../src/components/ui/breadcrumb.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAM1D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,aAAa,CAAC,EAAE;QACd,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;QACzB,IAAI,CAAC,EAAE,SAAS,CAAA;QAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KACrB,EAAE,CAAA;CACJ;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA4ClD,CAAA;AAID,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC5D,KAAK,EAAE;QACL,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;QACzB,IAAI,CAAC,EAAE,SAAS,CAAA;QAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;QACpB,aAAa,CAAC,EAAE;YACd,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;YACzB,IAAI,CAAC,EAAE,SAAS,CAAA;YAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;SACrB,EAAE,CAAA;KACJ,EAAE,CAAA;CACJ;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAsB1C,CAAA"}
1
+ {"version":3,"file":"breadcrumb.d.ts","names":[],"sources":["../../../src/components/ui/breadcrumb.tsx"],"sourcesContent":[],"mappings":";;;UAOiB,mBAAA;kBACC;EADD,IAAA,CAAA,EAER,SAFQ;EACC,OAAA,CAAA,EAAA,GAAA,GAAA,IAAA;EACT,MAAA,EAAA,OAAA;EAIW,aAAA,CAAA,EAAA;IACT,KAAA,EAAA,MAAA,GADS,SACT;IAAS,IAAA,CAAA,EAAT,SAAS;IAKP,OAAA,CAAA,EAAA,GA4CZ,GAAA,IAAA;EAIgB,CAAA,EAAA;;AAGN,cAnDE,cAmDF,EAnDkB,EAmDlB,CAnDqB,mBAmDrB,CAAA;AAGW,UANL,eAAA,SAAwB,cAMnB,CAAA,KAAA,CAAA,CAAA;EACT,KAAA,EAAA;IAP4B,KAAA,EAAA,MAAA,GAErB,SAFqB;IAAc,IAAA,CAAA,EAG5C,SAH4C;IAa1C,OAAA,CAAA,EAsBZ,GAAA,GAAA,IAAA;;sBA7BqB;aACT;;;;;cAMA,YAAY,GAAG"}
@@ -0,0 +1,168 @@
1
+ import { cn } from "../../lib/utils.js";
2
+ import { Button } from "./button.js";
3
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./dropdown-menu.js";
4
+ import { c } from "react/compiler-runtime";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { ChevronsUpDown } from "lucide-react";
7
+ import * as React$1 from "react";
8
+
9
+ //#region src/components/ui/breadcrumb.tsx
10
+ const BreadcrumbItem = (t0) => {
11
+ const $ = c(18);
12
+ const { label, onClick, isLast, dropdownItems, icon } = t0;
13
+ if (dropdownItems?.length) {
14
+ let t1$1;
15
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
16
+ t1$1 = /* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-4" });
17
+ $[0] = t1$1;
18
+ } else t1$1 = $[0];
19
+ let t2;
20
+ if ($[1] !== icon || $[2] !== label) {
21
+ t2 = /* @__PURE__ */ jsx(DropdownMenuTrigger, {
22
+ asChild: true,
23
+ children: /* @__PURE__ */ jsxs(Button, {
24
+ variant: "ghost",
25
+ size: "sm",
26
+ className: "p-1 gap-2",
27
+ children: [
28
+ icon,
29
+ label,
30
+ " ",
31
+ t1$1
32
+ ]
33
+ })
34
+ });
35
+ $[1] = icon;
36
+ $[2] = label;
37
+ $[3] = t2;
38
+ } else t2 = $[3];
39
+ let t3;
40
+ if ($[4] !== dropdownItems) {
41
+ t3 = dropdownItems.map(_temp);
42
+ $[4] = dropdownItems;
43
+ $[5] = t3;
44
+ } else t3 = $[5];
45
+ let t4;
46
+ if ($[6] !== t3) {
47
+ t4 = /* @__PURE__ */ jsx(DropdownMenuContent, {
48
+ className: "bg-background text-foreground",
49
+ children: t3
50
+ });
51
+ $[6] = t3;
52
+ $[7] = t4;
53
+ } else t4 = $[7];
54
+ let t5;
55
+ if ($[8] !== t2 || $[9] !== t4) {
56
+ t5 = /* @__PURE__ */ jsxs(DropdownMenu, { children: [t2, t4] });
57
+ $[8] = t2;
58
+ $[9] = t4;
59
+ $[10] = t5;
60
+ } else t5 = $[10];
61
+ return t5;
62
+ }
63
+ if (isLast) {
64
+ let t1$1;
65
+ if ($[11] !== icon || $[12] !== label) {
66
+ t1$1 = /* @__PURE__ */ jsx(Button, {
67
+ variant: "ghost",
68
+ size: "sm",
69
+ className: "cursor-default hover:bg-transparent hover:text-muted-transparent p-1",
70
+ asChild: true,
71
+ children: /* @__PURE__ */ jsxs("div", {
72
+ className: "flex items-center gap-2",
73
+ children: [icon, label]
74
+ })
75
+ });
76
+ $[11] = icon;
77
+ $[12] = label;
78
+ $[13] = t1$1;
79
+ } else t1$1 = $[13];
80
+ return t1$1;
81
+ }
82
+ let t1;
83
+ if ($[14] !== icon || $[15] !== label || $[16] !== onClick) {
84
+ t1 = /* @__PURE__ */ jsxs(Button, {
85
+ onClick,
86
+ variant: "ghost",
87
+ size: "sm",
88
+ className: "p-1 gap-2",
89
+ children: [icon, label]
90
+ });
91
+ $[14] = icon;
92
+ $[15] = label;
93
+ $[16] = onClick;
94
+ $[17] = t1;
95
+ } else t1 = $[17];
96
+ return t1;
97
+ };
98
+ BreadcrumbItem.displayName = "BreadcrumbItem";
99
+ const Breadcrumb = (t0) => {
100
+ const $ = c(15);
101
+ let className;
102
+ let items;
103
+ let props;
104
+ if ($[0] !== t0) {
105
+ ({className, items, ...props} = t0);
106
+ $[0] = t0;
107
+ $[1] = className;
108
+ $[2] = items;
109
+ $[3] = props;
110
+ } else {
111
+ className = $[1];
112
+ items = $[2];
113
+ props = $[3];
114
+ }
115
+ const lastIndex = items.length - 1;
116
+ let t1;
117
+ if ($[4] !== className) {
118
+ t1 = cn("flex items-center", className);
119
+ $[4] = className;
120
+ $[5] = t1;
121
+ } else t1 = $[5];
122
+ let t2;
123
+ if ($[6] !== items || $[7] !== lastIndex) {
124
+ let t3$1;
125
+ if ($[9] !== lastIndex) {
126
+ t3$1 = (item, index) => /* @__PURE__ */ jsxs(React$1.Fragment, { children: [index !== 0 && /* @__PURE__ */ jsx("span", {
127
+ className: "mx-1.5 text-muted-foreground",
128
+ children: "/"
129
+ }, `${item.label}-separator`), /* @__PURE__ */ jsx(BreadcrumbItem, {
130
+ label: item.label,
131
+ icon: item.icon,
132
+ isLast: index === lastIndex,
133
+ dropdownItems: item.dropdownItems
134
+ }, `${item.label}-item`)] }, `${item.label}-fragment`);
135
+ $[9] = lastIndex;
136
+ $[10] = t3$1;
137
+ } else t3$1 = $[10];
138
+ t2 = items.map(t3$1);
139
+ $[6] = items;
140
+ $[7] = lastIndex;
141
+ $[8] = t2;
142
+ } else t2 = $[8];
143
+ let t3;
144
+ if ($[11] !== props || $[12] !== t1 || $[13] !== t2) {
145
+ t3 = /* @__PURE__ */ jsx("div", {
146
+ className: t1,
147
+ ...props,
148
+ children: t2
149
+ });
150
+ $[11] = props;
151
+ $[12] = t1;
152
+ $[13] = t2;
153
+ $[14] = t3;
154
+ } else t3 = $[14];
155
+ return t3;
156
+ };
157
+ Breadcrumb.displayName = "Breadcrumb";
158
+ function _temp(item) {
159
+ return /* @__PURE__ */ jsxs(DropdownMenuItem, {
160
+ className: "cursor-pointer gap-2",
161
+ onClick: item.onClick,
162
+ children: [item.icon, item.label]
163
+ }, `dropdown-${item.label}`);
164
+ }
165
+
166
+ //#endregion
167
+ export { Breadcrumb, BreadcrumbItem };
168
+ //# sourceMappingURL=breadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breadcrumb.js","names":["ChevronsUpDown","ComponentProps","FC","ReactNode","React","cn","Button","DropdownMenu","DropdownMenuContent","DropdownMenuItem","DropdownMenuTrigger","BreadcrumbItemProps","label","icon","onClick","isLast","dropdownItems","BreadcrumbItem","t0","$","_c","length","t1","Symbol","for","t2","t3","map","_temp","t4","t5","displayName","BreadcrumbProps","items","Breadcrumb","className","props","lastIndex","item","index"],"sources":["../../../src/components/ui/breadcrumb.tsx"],"sourcesContent":["import { ChevronsUpDown } from 'lucide-react'\nimport type { ComponentProps, FC, ReactNode } from 'react'\nimport * as React from 'react'\nimport { cn } from '../../lib/utils'\nimport { Button } from './button'\nimport { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from './dropdown-menu'\n\nexport interface BreadcrumbItemProps {\n label: string | ReactNode\n icon?: ReactNode\n onClick?: () => void\n isLast: boolean\n dropdownItems?: {\n label: string | ReactNode\n icon?: ReactNode\n onClick?: () => void\n }[]\n}\n\nexport const BreadcrumbItem: FC<BreadcrumbItemProps> = ({ label, onClick, isLast, dropdownItems, icon }) => {\n if (dropdownItems?.length) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" size=\"sm\" className=\"p-1 gap-2\">\n {icon}\n {label} <ChevronsUpDown className=\"size-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent className={'bg-background text-foreground'}>\n {dropdownItems.map((item) => (\n <DropdownMenuItem key={`dropdown-${item.label}`} className=\"cursor-pointer gap-2\" onClick={item.onClick}>\n {item.icon}\n {item.label}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n }\n\n if (isLast) {\n return (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n className=\"cursor-default hover:bg-transparent hover:text-muted-transparent p-1\"\n asChild\n >\n <div className=\"flex items-center gap-2\">\n {icon}\n {label}\n </div>\n </Button>\n )\n }\n\n return (\n <Button onClick={onClick} variant=\"ghost\" size=\"sm\" className=\"p-1 gap-2\">\n {icon}\n {label}\n </Button>\n )\n}\n\nBreadcrumbItem.displayName = 'BreadcrumbItem'\n\nexport interface BreadcrumbProps extends ComponentProps<'div'> {\n items: {\n label: string | ReactNode\n icon?: ReactNode\n onClick?: () => void\n dropdownItems?: {\n label: string | ReactNode\n icon?: ReactNode\n onClick?: () => void\n }[]\n }[]\n}\n\nexport const Breadcrumb: FC<BreadcrumbProps> = ({ className, items, ...props }) => {\n const lastIndex = items.length - 1\n return (\n <div className={cn('flex items-center', className)} {...props}>\n {items.map((item, index) => (\n <React.Fragment key={`${item.label}-fragment`}>\n {index !== 0 && (\n <span key={`${item.label}-separator`} className=\"mx-1.5 text-muted-foreground\">\n /\n </span>\n )}\n <BreadcrumbItem\n key={`${item.label}-item`}\n label={item.label}\n icon={item.icon}\n isLast={index === lastIndex}\n dropdownItems={item.dropdownItems}\n />\n </React.Fragment>\n ))}\n </div>\n )\n}\nBreadcrumb.displayName = 'Breadcrumb'\n"],"mappings":";;;;;;;;;AAmBA,MAAaiB,kBAA0CC,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAC,MAAA,EAAA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,GAAGsB,KAAI1B,MAAM,OAMtB,KAbqB,GAAG0B,KAAI1B,MAAM,WAcnC;AAAAO,KAAA,KAAAkB;AAAAlB,KAAA,MAAAO;QAAAA,QAAAP,EAAA;AAfAM,OAAAQ,MAAKN,IAAKD,KAeT;AAAAP,IAAA,KAAAc;AAAAd,IAAA,KAAAkB;AAAAlB,IAAA,KAAAM;OAAAA,MAAAN,EAAA;CAAA,IAAAO;AAAA,KAAAP,EAAA,QAAAiB,SAAAjB,EAAA,QAAAG,MAAAH,EAAA,QAAAM,IAAA;AAhBJC,OAAA,oBAAA;GAAgB,WAAAJ;GAAkC,GAAMc;aACrDX;IAgBG;AAAAN,IAAA,MAAAiB;AAAAjB,IAAA,MAAAG;AAAAH,IAAA,MAAAM;AAAAN,IAAA,MAAAO;OAAAA,MAAAP,EAAA;AAAA,QAjBNO;;AAoBJQ,WAAWH,cAAc;AApF8B,SAAAH,MAAAU,MAAA;AAAA,QAY3C,qBAAC;EAA0D,WAAA;EAAgC,SAAAA,KAAIxB;aAC5FwB,KAAIzB,MACJyB,KAAI1B;IAFgB,YAAY0B,KAAI1B,QAGpB"}
@@ -1,12 +1,17 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import { ButtonHTMLAttributes } from 'react';
1
+ import { VariantProps } from "class-variance-authority";
2
+ import * as react0 from "react";
3
+ import { ButtonHTMLAttributes } from "react";
4
+ import * as class_variance_authority_types0 from "class-variance-authority/types";
5
+
6
+ //#region src/components/ui/button.d.ts
3
7
  declare const buttonVariants: (props?: ({
4
- variant?: "link" | "default" | "outline" | "accent" | "light" | "secondary" | "destructive" | "ghost" | "icon" | null | undefined;
5
- size?: "default" | "icon" | "sm" | "md" | "lg" | null | undefined;
6
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
- export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
- asChild?: boolean;
8
+ variant?: "link" | "default" | "outline" | "accent" | "light" | "secondary" | "destructive" | "ghost" | "icon" | null | undefined;
9
+ size?: "default" | "icon" | "sm" | "md" | "lg" | null | undefined;
10
+ } & class_variance_authority_types0.ClassProp) | undefined) => string;
11
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
12
+ asChild?: boolean;
9
13
  }
10
- export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
11
- export {};
14
+ declare const Button: react0.ForwardRefExoticComponent<ButtonProps & react0.RefAttributes<HTMLButtonElement>>;
15
+ //#endregion
16
+ export { Button, ButtonProps };
12
17
  //# sourceMappingURL=button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,KAAK,oBAAoB,EAAc,MAAM,OAAO,CAAA;AAI7D,QAAA,MAAM,cAAc;;;8EA4BnB,CAAA;AAED,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IAC/G,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,eAAO,MAAM,MAAM,2GAKlB,CAAA"}
1
+ {"version":3,"file":"button.d.ts","names":[],"sources":["../../../src/components/ui/button.tsx"],"sourcesContent":[],"mappings":";;;;;;cAMM;;;IA4BL,+BAAA,CAAA;AA5BK,UA8BW,WAAA,SAAoB,oBAFpC,CAEyD,iBAFzD,CAAA,EAE6E,YAF7E,CAAA,OAEiG,cAFjG,CAAA,CAAA;EAEgB,OAAA,CAAA,EAAA,OAAY;;AAAqE,cAIrF,MAJqF,EAI/E,MAAA,CAAA,yBAJ+E,CAI/E,WAJ+E,GAI/E,MAAA,CAAA,aAJ+E,CAI/E,iBAJ+E,CAAA,CAAA"}
@@ -0,0 +1,88 @@
1
+ import { cn } from "../../lib/utils.js";
2
+ import { c } from "react/compiler-runtime";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { cva } from "class-variance-authority";
5
+ import { forwardRef } from "react";
6
+ import { Slot } from "@radix-ui/react-slot";
7
+
8
+ //#region src/components/ui/button.tsx
9
+ const buttonVariants = cva("inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap rounded-md font-semibold transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
10
+ variants: {
11
+ variant: {
12
+ default: "bg-input text-foreground hover:bg-border active:bg-card",
13
+ accent: "bg-accent text-accent-foreground hover:bg-accent/90 active:bg-accent/80",
14
+ light: "bg-background text-foreground border border-border hover:bg-muted active:bg-muted/80",
15
+ secondary: "bg-secondary text-foreground shadow-sm hover:opacity-90 active:opacity-80",
16
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:opacity-90 active:opacity-80",
17
+ outline: "border border-border bg-transparent hover:bg-muted hover:text-muted-foreground text-foreground",
18
+ ghost: "hover:bg-muted-foreground/20 text-foreground",
19
+ link: "text-primary underline-offset-4 hover:underline text-primary-foreground",
20
+ icon: "hover:bg-muted-foreground/20 text-foreground rounded-full bg-muted-foreground/10"
21
+ },
22
+ size: {
23
+ sm: "h-6 px-3 text-xs [&_svg]:size-3",
24
+ default: "h-9 px-4 text-sm [&_svg]:size-4",
25
+ md: "h-9 px-4 text-sm [&_svg]:size-4",
26
+ lg: "h-11 px-6 text-base [&_svg]:size-5",
27
+ icon: "h-4 w-4 [&_svg]:size-4"
28
+ }
29
+ },
30
+ defaultVariants: {
31
+ variant: "default",
32
+ size: "default"
33
+ }
34
+ });
35
+ const Button = forwardRef((t0, ref) => {
36
+ const $ = c(15);
37
+ let className;
38
+ let props;
39
+ let size;
40
+ let t1;
41
+ let variant;
42
+ if ($[0] !== t0) {
43
+ ({className, variant, size, asChild: t1, ...props} = t0);
44
+ $[0] = t0;
45
+ $[1] = className;
46
+ $[2] = props;
47
+ $[3] = size;
48
+ $[4] = t1;
49
+ $[5] = variant;
50
+ } else {
51
+ className = $[1];
52
+ props = $[2];
53
+ size = $[3];
54
+ t1 = $[4];
55
+ variant = $[5];
56
+ }
57
+ const Comp = (t1 === void 0 ? false : t1) ? Slot : "button";
58
+ let t2;
59
+ if ($[6] !== className || $[7] !== size || $[8] !== variant) {
60
+ t2 = cn(buttonVariants({
61
+ variant,
62
+ size
63
+ }), className);
64
+ $[6] = className;
65
+ $[7] = size;
66
+ $[8] = variant;
67
+ $[9] = t2;
68
+ } else t2 = $[9];
69
+ let t3;
70
+ if ($[10] !== Comp || $[11] !== props || $[12] !== ref || $[13] !== t2) {
71
+ t3 = /* @__PURE__ */ jsx(Comp, {
72
+ className: t2,
73
+ ref,
74
+ ...props
75
+ });
76
+ $[10] = Comp;
77
+ $[11] = props;
78
+ $[12] = ref;
79
+ $[13] = t2;
80
+ $[14] = t3;
81
+ } else t3 = $[14];
82
+ return t3;
83
+ });
84
+ Button.displayName = "Button";
85
+
86
+ //#endregion
87
+ export { Button };
88
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","names":["Slot","cva","VariantProps","ButtonHTMLAttributes","forwardRef","cn","buttonVariants","variants","variant","default","accent","light","secondary","destructive","outline","ghost","link","icon","size","sm","md","lg","defaultVariants","ButtonProps","HTMLButtonElement","asChild","Button","t0","ref","$","_c","className","props","t1","undefined","Comp","t2","t3","displayName"],"sources":["../../../src/components/ui/button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { type ButtonHTMLAttributes, forwardRef } from 'react'\n\nimport { cn } from '../../lib/utils'\n\nconst buttonVariants = cva(\n 'inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap rounded-md font-semibold transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'bg-input text-foreground hover:bg-border active:bg-card',\n accent: 'bg-accent text-accent-foreground hover:bg-accent/90 active:bg-accent/80',\n light: 'bg-background text-foreground border border-border hover:bg-muted active:bg-muted/80',\n secondary: 'bg-secondary text-foreground shadow-sm hover:opacity-90 active:opacity-80',\n destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:opacity-90 active:opacity-80',\n outline: 'border border-border bg-transparent hover:bg-muted hover:text-muted-foreground text-foreground',\n ghost: 'hover:bg-muted-foreground/20 text-foreground',\n link: 'text-primary underline-offset-4 hover:underline text-primary-foreground',\n icon: 'hover:bg-muted-foreground/20 text-foreground rounded-full bg-muted-foreground/10',\n },\n size: {\n sm: 'h-6 px-3 text-xs [&_svg]:size-3',\n default: 'h-9 px-4 text-sm [&_svg]:size-4',\n md: 'h-9 px-4 text-sm [&_svg]:size-4',\n lg: 'h-11 px-6 text-base [&_svg]:size-5',\n icon: 'h-4 w-4 [&_svg]:size-4',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n)\n\nexport interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return <Comp className={cn(buttonVariants({ variant, size }), className)} ref={ref} {...props} />\n },\n)\nButton.displayName = 'Button'\n"],"mappings":";;;;;;;;AAMA,MAAMM,iBAAiBL,IACrB,6SACA;CACEM,UAAU;EACRC,SAAS;GACPC,SAAS;GACTC,QAAQ;GACRC,OAAO;GACPC,WAAW;GACXC,aAAa;GACbC,SAAS;GACTC,OAAO;GACPC,MAAM;GACNC,MAAM;GACP;EACDC,MAAM;GACJC,IAAI;GACJV,SAAS;GACTW,IAAI;GACJC,IAAI;GACJJ,MAAM;GAC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