@open-dy/vibecoding-sdk-taro 0.0.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/dist/adapters/interest-card/eslint/eslint-plugin-custom-navigation.mjs +290 -0
  2. package/dist/adapters/interest-card/eslint/taro.mjs +55 -0
  3. package/dist/adapters/interest-card/runtime/microapp.d.ts +7 -0
  4. package/dist/adapters/interest-card/runtime/microapp.js +8 -0
  5. package/dist/adapters/interest-card/runtime/microapp.js.map +1 -0
  6. package/dist/adapters/interest-card/types/taro.d.ts +28 -0
  7. package/dist/build/config-overrides.d.ts +19 -0
  8. package/dist/build/config-overrides.js +35 -0
  9. package/dist/build/config-overrides.js.map +1 -0
  10. package/dist/build/index.d.ts +1 -0
  11. package/dist/build/index.js +2 -0
  12. package/dist/build/index.js.map +1 -0
  13. package/dist/build/plugins/app-config.cjs +43 -0
  14. package/dist/build/plugins/vite-depend-card.d.ts +29 -0
  15. package/dist/build/plugins/vite-depend-card.js +250 -0
  16. package/dist/build/plugins/vite-depend-card.js.map +1 -0
  17. package/dist/build/plugins/vite-image-asset-import.d.ts +10 -0
  18. package/dist/build/plugins/vite-image-asset-import.js +150 -0
  19. package/dist/build/plugins/vite-image-asset-import.js.map +1 -0
  20. package/dist/build/plugins/vite-inline-json.d.ts +4 -0
  21. package/dist/build/plugins/vite-inline-json.js +129 -0
  22. package/dist/build/plugins/vite-inline-json.js.map +1 -0
  23. package/dist/build/plugins/vite-taro-source-location.d.ts +13 -0
  24. package/dist/build/plugins/vite-taro-source-location.js +159 -0
  25. package/dist/build/plugins/vite-taro-source-location.js.map +1 -0
  26. package/dist/build/taro.d.ts +53 -0
  27. package/dist/build/taro.js +729 -0
  28. package/dist/build/taro.js.map +1 -0
  29. package/dist/components/miniapp-open-card.d.ts +19 -0
  30. package/dist/components/miniapp-open-card.js +3 -0
  31. package/dist/components/miniapp-open-card.js.map +1 -0
  32. package/dist/eslint/eslint-plugin-microapp-pages.mjs +659 -0
  33. package/dist/eslint/server.mjs +69 -0
  34. package/dist/eslint/taro.mjs +553 -0
  35. package/dist/index.d.ts +2 -0
  36. package/dist/index.js +3 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/internal/runtime/douyin-open-button.d.ts +29 -0
  39. package/dist/internal/runtime/iframe-auth/identity.d.ts +20 -0
  40. package/dist/internal/runtime/iframe-auth/identity.js +156 -0
  41. package/dist/internal/runtime/iframe-auth/identity.js.map +1 -0
  42. package/dist/internal/runtime/iframe-auth/index.d.ts +2 -0
  43. package/dist/internal/runtime/iframe-auth/index.js +3 -0
  44. package/dist/internal/runtime/iframe-auth/index.js.map +1 -0
  45. package/dist/internal/runtime/iframe-auth/sync.d.ts +2 -0
  46. package/dist/internal/runtime/iframe-auth/sync.js +23 -0
  47. package/dist/internal/runtime/iframe-auth/sync.js.map +1 -0
  48. package/dist/lib/measure.d.ts +21 -0
  49. package/dist/lib/measure.js +101 -0
  50. package/dist/lib/measure.js.map +1 -0
  51. package/dist/lib/platform.d.ts +2 -0
  52. package/dist/lib/platform.js +11 -0
  53. package/dist/lib/platform.js.map +1 -0
  54. package/dist/lib/utils.d.ts +2 -0
  55. package/dist/lib/utils.js +6 -0
  56. package/dist/lib/utils.js.map +1 -0
  57. package/dist/reference/llms.txt +36 -0
  58. package/dist/reference/sdk-api/build/taro/BuildContext.md +53 -0
  59. package/dist/reference/sdk-api/build/taro/CreateMicroappTaroConfigOptions.md +62 -0
  60. package/dist/reference/sdk-api/build/taro/createMicroappTaroConfig.md +66 -0
  61. package/dist/reference/sdk-api/build/taro/index.md +11 -0
  62. package/dist/reference/sdk-api/runtime/CreateMicroappClientOptions.md +47 -0
  63. package/dist/reference/sdk-api/runtime/createMicroappClient.md +378 -0
  64. package/dist/reference/sdk-api/runtime/index.md +10 -0
  65. package/dist/reference/sdk-api.json +1534 -0
  66. package/dist/reference/sdk-api.md +43 -0
  67. package/dist/runtime/client.d.ts +63 -0
  68. package/dist/runtime/client.js +194 -0
  69. package/dist/runtime/client.js.map +1 -0
  70. package/dist/runtime/closed-domain-request-header.d.ts +4 -0
  71. package/dist/runtime/closed-domain-request-header.js +8 -0
  72. package/dist/runtime/closed-domain-request-header.js.map +1 -0
  73. package/dist/runtime/default-client.d.ts +57 -0
  74. package/dist/runtime/default-client.js +21 -0
  75. package/dist/runtime/default-client.js.map +1 -0
  76. package/dist/runtime/default-iframe-auth.d.ts +8 -0
  77. package/dist/runtime/default-iframe-auth.js +10 -0
  78. package/dist/runtime/default-iframe-auth.js.map +1 -0
  79. package/dist/runtime/douyin-container-request.d.ts +11 -0
  80. package/dist/runtime/douyin-container-request.js +301 -0
  81. package/dist/runtime/douyin-container-request.js.map +1 -0
  82. package/dist/runtime/douyin-login-request.d.ts +32 -0
  83. package/dist/runtime/douyin-login-request.js +400 -0
  84. package/dist/runtime/douyin-login-request.js.map +1 -0
  85. package/dist/runtime/globals.d.ts +342 -0
  86. package/dist/runtime/index.d.ts +4 -0
  87. package/dist/runtime/index.js +4 -0
  88. package/dist/runtime/index.js.map +1 -0
  89. package/dist/runtime/network-url.d.ts +3 -0
  90. package/dist/runtime/network-url.js +53 -0
  91. package/dist/runtime/network-url.js.map +1 -0
  92. package/dist/types/taro.d.ts +1 -0
  93. package/dist/ui/accordion.d.ts +17 -0
  94. package/dist/ui/accordion.js +60 -0
  95. package/dist/ui/accordion.js.map +1 -0
  96. package/dist/ui/alert-dialog.d.ts +33 -0
  97. package/dist/ui/alert-dialog.js +96 -0
  98. package/dist/ui/alert-dialog.js.map +1 -0
  99. package/dist/ui/alert.d.ts +11 -0
  100. package/dist/ui/alert.js +49 -0
  101. package/dist/ui/alert.js.map +1 -0
  102. package/dist/ui/aspect-ratio.d.ts +5 -0
  103. package/dist/ui/aspect-ratio.js +10 -0
  104. package/dist/ui/aspect-ratio.js.map +1 -0
  105. package/dist/ui/avatar.d.ts +14 -0
  106. package/dist/ui/avatar.js +50 -0
  107. package/dist/ui/avatar.js.map +1 -0
  108. package/dist/ui/badge.d.ts +8 -0
  109. package/dist/ui/badge.js +27 -0
  110. package/dist/ui/badge.js.map +1 -0
  111. package/dist/ui/button-group.d.ts +14 -0
  112. package/dist/ui/button-group.js +52 -0
  113. package/dist/ui/button-group.js.map +1 -0
  114. package/dist/ui/button.d.ts +30 -0
  115. package/dist/ui/button.js +75 -0
  116. package/dist/ui/button.js.map +1 -0
  117. package/dist/ui/calendar.d.ts +29 -0
  118. package/dist/ui/calendar.js +141 -0
  119. package/dist/ui/calendar.js.map +1 -0
  120. package/dist/ui/card.d.ts +12 -0
  121. package/dist/ui/card.js +38 -0
  122. package/dist/ui/card.js.map +1 -0
  123. package/dist/ui/carousel.d.ts +30 -0
  124. package/dist/ui/carousel.js +60 -0
  125. package/dist/ui/carousel.js.map +1 -0
  126. package/dist/ui/checkbox.d.ts +9 -0
  127. package/dist/ui/checkbox.js +20 -0
  128. package/dist/ui/checkbox.js.map +1 -0
  129. package/dist/ui/collapsible.d.ts +18 -0
  130. package/dist/ui/collapsible.js +53 -0
  131. package/dist/ui/collapsible.js.map +1 -0
  132. package/dist/ui/combobox.d.ts +55 -0
  133. package/dist/ui/combobox.js +165 -0
  134. package/dist/ui/combobox.js.map +1 -0
  135. package/dist/ui/dialog.d.ts +26 -0
  136. package/dist/ui/dialog.js +54 -0
  137. package/dist/ui/dialog.js.map +1 -0
  138. package/dist/ui/drawer.d.ts +21 -0
  139. package/dist/ui/drawer.js +57 -0
  140. package/dist/ui/drawer.js.map +1 -0
  141. package/dist/ui/dropdown-menu.d.ts +52 -0
  142. package/dist/ui/dropdown-menu.js +112 -0
  143. package/dist/ui/dropdown-menu.js.map +1 -0
  144. package/dist/ui/empty.d.ts +12 -0
  145. package/dist/ui/empty.js +35 -0
  146. package/dist/ui/empty.js.map +1 -0
  147. package/dist/ui/field.d.ts +26 -0
  148. package/dist/ui/field.js +117 -0
  149. package/dist/ui/field.js.map +1 -0
  150. package/dist/ui/helpers.d.ts +6 -0
  151. package/dist/ui/helpers.js +23 -0
  152. package/dist/ui/helpers.js.map +1 -0
  153. package/dist/ui/index.d.ts +47 -0
  154. package/dist/ui/index.js +48 -0
  155. package/dist/ui/index.js.map +1 -0
  156. package/dist/ui/input-group.d.ts +17 -0
  157. package/dist/ui/input-group.js +122 -0
  158. package/dist/ui/input-group.js.map +1 -0
  159. package/dist/ui/input-otp.d.ts +18 -0
  160. package/dist/ui/input-otp.js +48 -0
  161. package/dist/ui/input-otp.js.map +1 -0
  162. package/dist/ui/input.d.ts +5 -0
  163. package/dist/ui/input.js +8 -0
  164. package/dist/ui/input.js.map +1 -0
  165. package/dist/ui/item.d.ts +22 -0
  166. package/dist/ui/item.js +83 -0
  167. package/dist/ui/item.js.map +1 -0
  168. package/dist/ui/label.d.ts +3 -0
  169. package/dist/ui/label.js +8 -0
  170. package/dist/ui/label.js.map +1 -0
  171. package/dist/ui/menubar.d.ts +65 -0
  172. package/dist/ui/menubar.js +244 -0
  173. package/dist/ui/menubar.js.map +1 -0
  174. package/dist/ui/navigation-menu.d.ts +27 -0
  175. package/dist/ui/navigation-menu.js +72 -0
  176. package/dist/ui/navigation-menu.js.map +1 -0
  177. package/dist/ui/pagination.d.ts +17 -0
  178. package/dist/ui/pagination.js +28 -0
  179. package/dist/ui/pagination.js.map +1 -0
  180. package/dist/ui/popover.d.ts +27 -0
  181. package/dist/ui/popover.js +139 -0
  182. package/dist/ui/popover.js.map +1 -0
  183. package/dist/ui/portal.d.ts +5 -0
  184. package/dist/ui/portal.js +18 -0
  185. package/dist/ui/portal.js.map +1 -0
  186. package/dist/ui/progress.d.ts +45 -0
  187. package/dist/ui/progress.js +67 -0
  188. package/dist/ui/progress.js.map +1 -0
  189. package/dist/ui/radio-group.d.ts +12 -0
  190. package/dist/ui/radio-group.js +29 -0
  191. package/dist/ui/radio-group.js.map +1 -0
  192. package/dist/ui/resizable.d.ts +20 -0
  193. package/dist/ui/resizable.js +244 -0
  194. package/dist/ui/resizable.js.map +1 -0
  195. package/dist/ui/scroll-area.d.ts +8 -0
  196. package/dist/ui/scroll-area.js +34 -0
  197. package/dist/ui/scroll-area.js.map +1 -0
  198. package/dist/ui/select.d.ts +35 -0
  199. package/dist/ui/select.js +136 -0
  200. package/dist/ui/select.js.map +1 -0
  201. package/dist/ui/separator.d.ts +5 -0
  202. package/dist/ui/separator.js +8 -0
  203. package/dist/ui/separator.js.map +1 -0
  204. package/dist/ui/sheet.d.ts +26 -0
  205. package/dist/ui/sheet.js +67 -0
  206. package/dist/ui/sheet.js.map +1 -0
  207. package/dist/ui/skeleton.d.ts +3 -0
  208. package/dist/ui/skeleton.js +8 -0
  209. package/dist/ui/skeleton.js.map +1 -0
  210. package/dist/ui/slider.d.ts +12 -0
  211. package/dist/ui/slider.js +94 -0
  212. package/dist/ui/slider.js.map +1 -0
  213. package/dist/ui/sonner.d.ts +6 -0
  214. package/dist/ui/sonner.js +13 -0
  215. package/dist/ui/sonner.js.map +1 -0
  216. package/dist/ui/spinner.d.ts +3 -0
  217. package/dist/ui/spinner.js +9 -0
  218. package/dist/ui/spinner.js.map +1 -0
  219. package/dist/ui/switch.d.ts +11 -0
  220. package/dist/ui/switch.js +33 -0
  221. package/dist/ui/switch.js.map +1 -0
  222. package/dist/ui/table.d.ts +13 -0
  223. package/dist/ui/table.js +54 -0
  224. package/dist/ui/table.js.map +1 -0
  225. package/dist/ui/tabs.d.ts +23 -0
  226. package/dist/ui/tabs.js +61 -0
  227. package/dist/ui/tabs.js.map +1 -0
  228. package/dist/ui/tailwind.css +2 -0
  229. package/dist/ui/textarea.d.ts +3 -0
  230. package/dist/ui/textarea.js +13 -0
  231. package/dist/ui/textarea.js.map +1 -0
  232. package/dist/ui/theme.css +234 -0
  233. package/dist/ui/toggle-group.d.ts +19 -0
  234. package/dist/ui/toggle-group.js +73 -0
  235. package/dist/ui/toggle-group.js.map +1 -0
  236. package/dist/ui/toggle.d.ts +14 -0
  237. package/dist/ui/toggle.js +41 -0
  238. package/dist/ui/toggle.js.map +1 -0
  239. package/package.json +97 -0
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { type ViewProps } from "@tarojs/components";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const alertVariants: (props?: ({
5
+ variant?: "default" | "destructive" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Alert({ className, variant, children, ...props }: ViewProps & VariantProps<typeof alertVariants>): React.JSX.Element;
8
+ declare function AlertTitle({ className, ...props }: ViewProps): React.JSX.Element;
9
+ declare function AlertDescription({ className, ...props }: ViewProps): React.JSX.Element;
10
+ declare function AlertAction({ className, ...props }: ViewProps): React.JSX.Element;
11
+ export { Alert, AlertTitle, AlertDescription, AlertAction };
@@ -0,0 +1,49 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { View } from "@tarojs/components";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../lib/utils.js";
6
+ const AlertContext = React.createContext({
7
+ hasAction: false,
8
+ hasMedia: false,
9
+ variant: "default",
10
+ });
11
+ const alertVariants = cva(
12
+ // Taro doesn't render `svg` icons in most cases. Only switch to the icon+content
13
+ // two-column layout when the first child is an Image-like element.
14
+ "group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-[>image]:grid-cols-[auto_1fr] has-[>image]:gap-x-2 has-[>taro-image-core]:grid-cols-[auto_1fr] has-[>taro-image-core]:gap-x-2 has-[>img]:grid-cols-[auto_1fr] has-[>img]:gap-x-2 [&>image]:row-span-2 [&>image]:translate-y-0.5 [&>taro-image-core]:row-span-2 [&>taro-image-core]:translate-y-0.5 [&>img]:row-span-2 [&>img]:translate-y-0.5", {
15
+ variants: {
16
+ variant: {
17
+ default: "bg-card text-card-foreground",
18
+ destructive: "bg-card text-destructive",
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ variant: "default",
23
+ },
24
+ });
25
+ function Alert({ className, variant, children, ...props }) {
26
+ const resolvedVariant = variant ?? "default";
27
+ const childArray = React.Children.toArray(children);
28
+ const hasAction = childArray.some((child) => React.isValidElement(child) && child.type === AlertAction);
29
+ const hasMedia = childArray.some((child) => {
30
+ if (!React.isValidElement(child))
31
+ return false;
32
+ const childType = typeof child.type === "string" ? child.type : "";
33
+ return childType === "image" || childType === "img" || childType === "taro-image-core";
34
+ });
35
+ return (_jsx(AlertContext.Provider, { value: { hasAction, hasMedia, variant: resolvedVariant }, children: _jsx(View, { "data-slot": "alert", className: cn(alertVariants({ variant: resolvedVariant }), hasAction && "relative pr-18", hasMedia && "grid-cols-[auto_1fr] gap-x-2", className), ...props, children: children }) }));
36
+ }
37
+ function AlertTitle({ className, ...props }) {
38
+ const { hasMedia } = React.useContext(AlertContext);
39
+ return (_jsx(View, { "data-slot": "alert-title", className: cn("font-medium [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", hasMedia && "col-start-2", className), ...props }));
40
+ }
41
+ function AlertDescription({ className, ...props }) {
42
+ const { variant } = React.useContext(AlertContext);
43
+ return (_jsx(View, { "data-slot": "alert-description", className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", variant === "destructive" && "text-destructive/90", className), ...props }));
44
+ }
45
+ function AlertAction({ className, ...props }) {
46
+ return (_jsx(View, { "data-slot": "alert-action", className: cn("absolute top-2 right-2", className), ...props }));
47
+ }
48
+ export { Alert, AlertTitle, AlertDescription, AlertAction };
49
+ //# sourceMappingURL=alert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/ui/alert.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAkB,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CA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,EAAE,OAAO,EAAE,eAAe,EAAE,YAC7E,KAAC,IAAI,iBACO,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,aAAa,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,EAC3C,SAAS,IAAI,gBAAgB,EAC7B,QAAQ,IAAI,8BAA8B,EAC1C,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACJ,GACe,CACzB,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAa;IACpD,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;IACnD,OAAO,CACL,KAAC,IAAI,iBACO,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,kFAAkF,EAClF,QAAQ,IAAI,aAAa,EACzB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACE;IACV,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;IAClD,OAAO,CACL,KAAC,IAAI,iBACO,mBAAmB,EAC7B,SAAS,EAAE,EAAE,CACX,4JAA4J,EAC5J,OAAO,KAAK,aAAa,IAAI,qBAAqB,EAClD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAa;IACrD,OAAO,CACL,KAAC,IAAI,iBACO,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC,KAC9C,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { type ViewProps } from "@tarojs/components";
2
+ declare function AspectRatio({ ratio, className, style, ...props }: ViewProps & {
3
+ ratio: number;
4
+ }): import("react").JSX.Element;
5
+ export { AspectRatio };
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { View } from "@tarojs/components";
3
+ import { cn } from "../lib/utils.js";
4
+ function AspectRatio({ ratio, className, style, ...props }) {
5
+ return (_jsx(View, { "data-slot": "aspect-ratio", style: {
6
+ "--ratio": ratio,
7
+ }, className: cn("relative aspect-(--ratio)", className), ...props }));
8
+ }
9
+ export { AspectRatio };
10
+ //# sourceMappingURL=aspect-ratio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aspect-ratio.js","sourceRoot":"","sources":["../../src/ui/aspect-ratio.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,oBAAoB,CAAA;AAEzD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,SAAS,WAAW,CAAC,EACnB,KAAK,EACL,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACsB;IAC9B,OAAO,CACL,KAAC,IAAI,iBACO,cAAc,EACxB,KAAK,EACH;YACE,SAAS,EAAE,KAAK;SACM,EAE1B,SAAS,EAAE,EAAE,CAAC,2BAA2B,EAAE,SAAS,CAAC,KACjD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import { Image, type ViewProps } from "@tarojs/components";
3
+ type AvatarImageProps = React.ComponentPropsWithoutRef<typeof Image> & {
4
+ alt?: string;
5
+ };
6
+ declare function Avatar({ className, size, ...props }: ViewProps & {
7
+ size?: "default" | "sm" | "lg";
8
+ }): React.JSX.Element;
9
+ declare function AvatarImage({ className, src, alt, onLoad, onError, ...props }: AvatarImageProps): React.JSX.Element;
10
+ declare function AvatarFallback({ className, ...props }: ViewProps): React.JSX.Element | null;
11
+ declare function AvatarBadge({ className, ...props }: ViewProps): React.JSX.Element;
12
+ declare function AvatarGroup({ className, ...props }: ViewProps): React.JSX.Element;
13
+ declare function AvatarGroupCount({ className, ...props }: ViewProps): React.JSX.Element;
14
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge, };
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { View, Image } from "@tarojs/components";
4
+ import { cn } from "../lib/utils.js";
5
+ const AvatarContext = React.createContext(null);
6
+ const AvatarGroupContext = React.createContext({
7
+ size: "default",
8
+ });
9
+ function Avatar({ className, size = "default", ...props }) {
10
+ const [status, setStatus] = React.useState("loading");
11
+ return (_jsx(AvatarContext.Provider, { value: { size, status, setStatus }, children: _jsx(View, { "data-slot": "avatar", "data-size": size, className: cn("group/avatar relative flex shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken dark:after:mix-blend-lighten", size === "lg" && "size-10", size === "sm" && "size-6", size === "default" && "size-8", className), ...props }) }));
12
+ }
13
+ function AvatarImage({ className, src, alt, onLoad, onError, ...props }) {
14
+ const context = React.useContext(AvatarContext);
15
+ const setStatus = context?.setStatus;
16
+ React.useEffect(() => {
17
+ setStatus?.(src ? "loading" : "error");
18
+ }, [setStatus, src]);
19
+ return (_jsx(Image, { "data-slot": "avatar-image", src: src ?? "", "aria-label": alt, className: cn("aspect-square size-full rounded-full object-cover", context?.status !== "loaded" && "absolute opacity-0", className), onLoad: (event) => {
20
+ setStatus?.("loaded");
21
+ onLoad?.(event);
22
+ }, onError: (event) => {
23
+ setStatus?.("error");
24
+ onError?.(event);
25
+ }, ...props }));
26
+ }
27
+ function AvatarFallback({ className, ...props }) {
28
+ const context = React.useContext(AvatarContext);
29
+ if (context?.status === "loaded")
30
+ return null;
31
+ return (_jsx(View, { "data-slot": "avatar-fallback", className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground", context?.size === "sm" && "text-xs", className), ...props }));
32
+ }
33
+ function AvatarBadge({ className, ...props }) {
34
+ const context = React.useContext(AvatarContext);
35
+ return (_jsx(View, { "data-slot": "avatar-badge", className: cn("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none", context?.size === "sm" && "size-2 [&>view]:hidden", context?.size === "default" && "size-2.5 [&>view]:size-2", context?.size === "lg" && "size-3 [&>view]:size-2", className), ...props }));
36
+ }
37
+ function AvatarGroup({ className, ...props }) {
38
+ const size = React.useMemo(() => {
39
+ const childArray = React.Children.toArray(props.children);
40
+ const avatarChild = childArray.find((child) => React.isValidElement(child) && child.type === Avatar);
41
+ return avatarChild?.props.size ?? "default";
42
+ }, [props.children]);
43
+ return (_jsx(AvatarGroupContext.Provider, { value: { size }, children: _jsx(View, { "data-slot": "avatar-group", className: cn("group/avatar-group flex -space-x-2 [&>*]:ring-2 [&>*]:ring-background", className), ...props }) }));
44
+ }
45
+ function AvatarGroupCount({ className, ...props }) {
46
+ const { size } = React.useContext(AvatarGroupContext);
47
+ return (_jsx(View, { "data-slot": "avatar-group-count", className: cn("relative flex shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background", size === "lg" && "size-10 [&>view]:size-5", size === "sm" && "size-6 [&>view]:size-3", size === "default" && "size-8 [&>view]:size-4", className), ...props }));
48
+ }
49
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge, };
50
+ //# sourceMappingURL=avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../src/ui/avatar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAkB,MAAM,oBAAoB,CAAA;AAEhE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAI/B,IAA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B,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;QACzD,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CACjC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,CACM,CAAA;QAEvE,OAAO,WAAW,EAAE,KAAK,CAAC,IAAI,IAAI,SAAS,CAAA;IAC7C,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEpB,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,IAAI,EAAE,YAC1C,KAAC,IAAI,iBACO,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,uEAAuE,EACvE,SAAS,CACV,KACG,KAAK,GACT,GAC0B,CAC/B,CAAA;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAa;IAC1D,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAA;IACrD,OAAO,CACL,KAAC,IAAI,iBACO,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CACX,+HAA+H,EAC/H,IAAI,KAAK,IAAI,IAAI,yBAAyB,EAC1C,IAAI,KAAK,IAAI,IAAI,wBAAwB,EACzC,IAAI,KAAK,SAAS,IAAI,wBAAwB,EAC9C,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,WAAW,GACZ,CAAA"}
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { type ViewProps } from "@tarojs/components";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const badgeVariants: (props?: ({
5
+ variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Badge({ className, variant, ...props }: ViewProps & VariantProps<typeof badgeVariants>): React.JSX.Element;
8
+ export { Badge, badgeVariants };
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { View } from "@tarojs/components";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../lib/utils.js";
6
+ import { collectDataIconState } from "./helpers.js";
7
+ const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
11
+ secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
12
+ destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
13
+ outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
14
+ ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
15
+ link: "text-primary underline-offset-4 hover:underline",
16
+ },
17
+ },
18
+ defaultVariants: {
19
+ variant: "default",
20
+ },
21
+ });
22
+ function Badge({ className, variant = "default", ...props }) {
23
+ const { hasInlineStartIcon, hasInlineEndIcon } = React.useMemo(() => collectDataIconState(props.children), [props.children]);
24
+ return (_jsx(View, { "data-slot": "badge", className: cn(badgeVariants({ variant }), hasInlineStartIcon && "pl-1.5", hasInlineEndIcon && "pr-1.5", className), ...props }));
25
+ }
26
+ export { Badge, badgeVariants };
27
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAkB,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAEhD,MAAM,aAAa,GAAG,GAAG,CACvB,saAAsa,EACta;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,4DAA4D;YACrE,SAAS,EACP,kEAAkE;YACpE,WAAW,EACT,gKAAgK;YAClK,OAAO,EACL,kFAAkF;YACpF,KAAK,EACH,mEAAmE;YACrE,IAAI,EAAE,iDAAiD;SACxD;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAA;AAED,SAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,GAAG,KAAK,EACuC;IAC/C,MAAM,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC,OAAO,CAC5D,GAAG,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,QAAQ,CAAC,EAC1C,CAAC,KAAK,CAAC,QAAQ,CAAC,CACjB,CAAA;IAED,OAAO,CACL,KAAC,IAAI,iBACO,OAAO,EACjB,SAAS,EAAE,EAAE,CACX,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAC1B,kBAAkB,IAAI,QAAQ,EAC9B,gBAAgB,IAAI,QAAQ,EAC5B,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import { type ViewProps } from "@tarojs/components";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ import { Separator } from "./separator.js";
5
+ declare const buttonGroupVariants: (props?: ({
6
+ orientation?: "horizontal" | "vertical" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ declare function ButtonGroup({ className, orientation, children, ...props }: ViewProps & VariantProps<typeof buttonGroupVariants>): React.JSX.Element;
9
+ declare function ButtonGroupText({ asChild, className, children, ...props }: Omit<ViewProps, "children"> & {
10
+ children?: React.ReactNode;
11
+ asChild?: boolean;
12
+ }): React.JSX.Element;
13
+ declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
14
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { View } from "@tarojs/components";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../lib/utils.js";
6
+ import { Separator } from "./separator.js";
7
+ const buttonGroupVariants = cva("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 [&>input]:flex-1", {
8
+ variants: {
9
+ orientation: {
10
+ horizontal: "",
11
+ vertical: "flex-col",
12
+ },
13
+ },
14
+ defaultVariants: {
15
+ orientation: "horizontal",
16
+ },
17
+ });
18
+ function ButtonGroup({ className, orientation, children, ...props }) {
19
+ const resolvedOrientation = orientation ?? "horizontal";
20
+ const validChildren = React.Children.toArray(children).filter(React.isValidElement);
21
+ const lastIndex = validChildren.length - 1;
22
+ return (_jsx(View, { "data-slot": "button-group", "data-orientation": orientation, className: cn(buttonGroupVariants({ orientation }), className), ...props, children: React.Children.map(children, (child) => {
23
+ if (!React.isValidElement(child))
24
+ return child;
25
+ const index = validChildren.findIndex((item) => item === child);
26
+ if (index === -1)
27
+ return child;
28
+ const positionClassName = resolvedOrientation === "vertical"
29
+ ? cn(index < lastIndex && "rounded-b-none", index > 0 && "rounded-t-none border-t-0")
30
+ : cn(index < lastIndex && "rounded-r-none", index > 0 && "rounded-l-none border-l-0");
31
+ return React.cloneElement(child, {
32
+ className: cn(child.props.className, positionClassName),
33
+ });
34
+ }) }));
35
+ }
36
+ function ButtonGroupText({ asChild = false, className, children, ...props }) {
37
+ const textClassName = cn("flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className);
38
+ if (asChild && React.isValidElement(children)) {
39
+ const child = children;
40
+ return React.cloneElement(child, {
41
+ ...props,
42
+ "data-slot": "button-group-text",
43
+ className: cn(textClassName, child.props.className),
44
+ });
45
+ }
46
+ return (_jsx(View, { "data-slot": "button-group-text", className: textClassName, ...props, children: children }));
47
+ }
48
+ function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
49
+ return (_jsx(Separator, { "data-slot": "button-group-separator", orientation: orientation, className: cn("relative self-stretch bg-input", orientation === "horizontal" && "mx-px w-auto", orientation === "vertical" && "my-px h-auto", className), ...props }));
50
+ }
51
+ export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
52
+ //# sourceMappingURL=button-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-group.js","sourceRoot":"","sources":["../../src/ui/button-group.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAkB,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,MAAM,mBAAmB,GAAG,GAAG,CAC7B,yFAAyF,EACzF;IACE,QAAQ,EAAE;QACR,WAAW,EAAE;YACX,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,UAAU;SACrB;KACF;IACD,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AAS,EAAE,iBAAiB,CAAC;aACpF,CACF,CAAA;QACH,CAAC,CAAC,GACG,CACR,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EACvB,OAAO,GAAG,KAAK,EACf,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAIT;IACC,MAAM,aAAa,GAAG,EAAE,CACtB,gJAAgJ,EAChJ,SAAS,CACV,CAAA;IAED,IAAI,OAAO,IAAI,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,QAAmD,CAAA;QAEjE,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,EAAE;YAC/B,GAAG,KAAK;YACR,WAAW,EAAE,mBAAmB;YAChC,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC;SACpD,CAAC,CAAA;IACJ,CAAC;IAED,OAAO,CACL,KAAC,IAAI,iBACO,mBAAmB,EAC7B,SAAS,EAAE,aAAa,KACpB,KAAK,YAER,QAAQ,GACJ,CACR,CAAA;AACH,CAAC;AAED,SAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,WAAW,GAAG,UAAU,EACxB,GAAG,KAAK,EAC+B;IACvC,OAAO,CACL,KAAC,SAAS,iBACE,wBAAwB,EAClC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,CACX,gCAAgC,EAChC,WAAW,KAAK,YAAY,IAAI,cAAc,EAC9C,WAAW,KAAK,UAAU,IAAI,cAAc,EAC5C,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,mBAAmB,GACpB,CAAA"}
@@ -0,0 +1,30 @@
1
+ import * as React from "react";
2
+ import { Button as TaroButton, type ViewProps } from "@tarojs/components";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ type TaroButtonProps = React.ComponentProps<typeof TaroButton>;
5
+ type OpenTypeDetailEvent = {
6
+ detail?: {
7
+ errMsg?: string;
8
+ errNo?: number;
9
+ };
10
+ };
11
+ type DouyinButtonExtras = {
12
+ openType?: TaroButtonProps["openType"] | (string & {});
13
+ dataVideoId?: string;
14
+ dataVideoType?: string;
15
+ dataChannel?: string;
16
+ "data-video-id"?: string;
17
+ "data-video-type"?: string;
18
+ "data-channel"?: string;
19
+ onNavigateToVideoView?: (event: OpenTypeDetailEvent) => void;
20
+ onAddShortcut?: (event: OpenTypeDetailEvent) => void;
21
+ };
22
+ /** Taro Button `size`/`type` 与 CVA variant 同名,必须 Omit,否则 size 会收成只剩 `"default"`。 */
23
+ type TaroButtonNativeKeys = keyof ViewProps | "className" | "style" | "children" | "size" | "type";
24
+ export type ButtonProps = ViewProps & VariantProps<typeof buttonVariants> & Omit<TaroButtonProps, TaroButtonNativeKeys> & DouyinButtonExtras;
25
+ declare const buttonVariants: (props?: ({
26
+ variant?: "default" | "link" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
27
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
28
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
29
+ declare function Button({ className, variant, size, openType, dataVideoId, dataVideoType, dataChannel, "data-video-id": dataVideoIdAttr, "data-video-type": dataVideoTypeAttr, "data-channel": dataChannelAttr, style, ...props }: ButtonProps): React.JSX.Element;
30
+ export { Button, buttonVariants };
@@ -0,0 +1,75 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Button as TaroButton, View } from "@tarojs/components";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../lib/utils.js";
6
+ import { collectDataIconState } from "./helpers.js";
7
+ const NativeButton = TaroButton;
8
+ const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-[transform,opacity,background-color,color,box-shadow] duration-150 ease-out outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:scale-[0.98] active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
12
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
13
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
14
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
15
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
16
+ link: "text-primary underline-offset-4 hover:underline",
17
+ },
18
+ size: {
19
+ default: "h-8 gap-1.5 px-2.5",
20
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs [&_svg:not([class*='size-'])]:size-3",
21
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] [&_svg:not([class*='size-'])]:size-3.5",
22
+ lg: "h-9 gap-1.5 px-2.5",
23
+ icon: "size-8",
24
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] [&_svg:not([class*='size-'])]:size-3",
25
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)]",
26
+ "icon-lg": "size-9",
27
+ },
28
+ },
29
+ defaultVariants: {
30
+ variant: "default",
31
+ size: "default",
32
+ },
33
+ });
34
+ function getButtonHoverClass(variant) {
35
+ switch (variant) {
36
+ case "outline":
37
+ return "scale-[0.98] bg-muted/90 text-foreground";
38
+ case "secondary":
39
+ return "scale-[0.98] opacity-85";
40
+ case "ghost":
41
+ return "scale-[0.98] bg-muted/80 text-foreground";
42
+ case "destructive":
43
+ return "scale-[0.98] bg-destructive/20 text-destructive dark:bg-destructive/30";
44
+ case "link":
45
+ return "opacity-70";
46
+ case "default":
47
+ default:
48
+ return "scale-[0.98] opacity-88";
49
+ }
50
+ }
51
+ function Button({ className, variant = "default", size = "default", openType, dataVideoId, dataVideoType, dataChannel, "data-video-id": dataVideoIdAttr, "data-video-type": dataVideoTypeAttr, "data-channel": dataChannelAttr, style, ...props }) {
52
+ const { hasInlineStartIcon, hasInlineEndIcon } = React.useMemo(() => collectDataIconState(props.children), [props.children]);
53
+ const sharedClassName = cn(buttonVariants({ variant, size }), hasInlineStartIcon && (size === "xs" || size === "sm" ? "pl-1.5" : "pl-2"), hasInlineEndIcon && (size === "xs" || size === "sm" ? "pr-1.5" : "pr-2"), className);
54
+ const visualProps = {
55
+ "data-slot": "button",
56
+ className: sharedClassName,
57
+ hoverClass: getButtonHoverClass(variant),
58
+ hoverStartTime: 20,
59
+ hoverStayTime: 90,
60
+ };
61
+ if (openType) {
62
+ const videoId = dataVideoId ?? dataVideoIdAttr;
63
+ const videoType = dataVideoType ??
64
+ dataVideoTypeAttr ??
65
+ (openType === "navigateToVideoView" ? "raw" : undefined);
66
+ const channel = dataChannel ?? dataChannelAttr;
67
+ // 不要 plain / 内联 transparent:会盖掉 Tailwind bg-primary(TT 编译已有 #9333ea 兜底)
68
+ return (_jsx(NativeButton, { ...props, ...visualProps, openType: openType, ...(videoId ? { dataVideoId: videoId, "data-video-id": videoId } : {}), ...(videoType
69
+ ? { dataVideoType: videoType, "data-video-type": videoType }
70
+ : {}), ...(channel ? { dataChannel: channel, "data-channel": channel } : {}), style: style }));
71
+ }
72
+ return _jsx(View, { ...props, ...visualProps, style: style });
73
+ }
74
+ export { Button, buttonVariants };
75
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,IAAI,EAAkB,MAAM,oBAAoB,CAAA;AAC/E,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAyBhD,MAAM,YAAY,GAAG,UAAoD,CAAA;AAkBzE,MAAM,cAAc,GAAG,GAAG,CACxB,4sBAA4sB,EAC5sB;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,4DAA4D;YACrE,OAAO,EACL,iLAAiL;YACnL,SAAS,EACP,iIAAiI;YACnI,KAAK,EACH,kHAAkH;YACpH,WAAW,EACT,6NAA6N;YAC/N,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,oBAAoB;YAC7B,EAAE,EAAE,kGAAkG;YACtG,EAAE,EAAE,4GAA4G;YAChH,EAAE,EAAE,oBAAoB;YACxB,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,kFAAkF;YAC7F,SAAS,EAAE,6CAA6C;YACxD,SAAS,EAAE,QAAQ;SACpB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAA;AAED,SAAS,mBAAmB,CAAC,OAAsB;IACjD,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,SAAS;YACZ,OAAO,0CAA0C,CAAA;QACnD,KAAK,WAAW;YACd,OAAO,yBAAyB,CAAA;QAClC,KAAK,OAAO;YACV,OAAO,0CAA0C,CAAA;QACnD,KAAK,aAAa;Y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QAAQ,KAAK,qBAAqB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;QAC1D,MAAM,OAAO,GAAG,WAAW,IAAI,eAAe,CAAA;QAE9C,wEAAwE;QACxE,OAAO,CACL,KAAC,YAAY,OACP,KAAK,KACL,WAAW,EACf,QAAQ,EAAE,QAAQ,KACd,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KACnE,CAAC,SAAS;gBACZ,CAAC,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE;gBAC5D,CAAC,CAAC,EAAE,CAAC,KACH,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACtE,KAAK,EAAE,KAAK,GACZ,CACH,CAAA;IACH,CAAC;IAED,OAAO,KAAC,IAAI,OAAK,KAAK,KAAM,WAAW,EAAE,KAAK,EAAE,KAAK,GAAI,CAAA;AAC3D,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,29 @@
1
+ import * as React from "react";
2
+ import { type ViewProps } from "@tarojs/components";
3
+ type DateRange = {
4
+ from?: Date;
5
+ to?: Date;
6
+ };
7
+ type CalendarBaseProps = ViewProps & {
8
+ month?: Date;
9
+ onMonthChange?: (month: Date) => void;
10
+ showOutsideDays?: boolean;
11
+ disabled?: (date: Date) => boolean;
12
+ captionLayout?: "label" | "dropdown";
13
+ fromYear?: number;
14
+ toYear?: number;
15
+ className?: string;
16
+ };
17
+ type SingleCalendarProps = CalendarBaseProps & {
18
+ mode?: "single";
19
+ selected?: Date;
20
+ onSelect?: (date: Date | undefined) => void;
21
+ };
22
+ type RangeCalendarProps = CalendarBaseProps & {
23
+ mode: "range";
24
+ selected?: DateRange;
25
+ onSelect?: (range: DateRange | undefined) => void;
26
+ };
27
+ type CalendarProps = SingleCalendarProps | RangeCalendarProps;
28
+ declare function Calendar(calendarProps: CalendarProps): React.JSX.Element;
29
+ export { Calendar, type CalendarProps };
@@ -0,0 +1,141 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Picker, Text, View } from "@tarojs/components";
4
+ import { cn } from "../lib/utils.js";
5
+ import { Button } from "./button.js";
6
+ import { ChevronLeft, ChevronRight } from "@open-dy/lucide-taro";
7
+ function isRangeCalendarProps(props) {
8
+ return props.mode === "range";
9
+ }
10
+ function getDaysInMonth(year, month) {
11
+ return new Date(year, month + 1, 0).getDate();
12
+ }
13
+ function getFirstDayOfMonth(year, month) {
14
+ return new Date(year, month, 1).getDay();
15
+ }
16
+ function isSameDay(a, b) {
17
+ return (a.getFullYear() === b.getFullYear() &&
18
+ a.getMonth() === b.getMonth() &&
19
+ a.getDate() === b.getDate());
20
+ }
21
+ function Calendar(calendarProps) {
22
+ const { className, month: monthProp, onMonthChange, showOutsideDays = true, disabled, captionLayout = "label", fromYear, toYear, mode = "single", selected: _selected, onSelect: _onSelect, ...viewProps } = calendarProps;
23
+ const selectedSingle = isRangeCalendarProps(calendarProps)
24
+ ? undefined
25
+ : calendarProps.selected;
26
+ const selectedRange = isRangeCalendarProps(calendarProps)
27
+ ? calendarProps.selected
28
+ : undefined;
29
+ const today = new Date();
30
+ const [internalMonth, setInternalMonth] = React.useState(monthProp ?? selectedSingle ?? selectedRange?.from ?? today);
31
+ const currentMonth = monthProp ?? internalMonth;
32
+ const year = currentMonth.getFullYear();
33
+ const month = currentMonth.getMonth();
34
+ const daysInMonth = getDaysInMonth(year, month);
35
+ const firstDay = getFirstDayOfMonth(year, month);
36
+ const daysInPrevMonth = getDaysInMonth(year, month - 1);
37
+ const weekdays = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
38
+ const monthNames = [
39
+ "January", "February", "March", "April", "May", "June",
40
+ "July", "August", "September", "October", "November", "December",
41
+ ];
42
+ const yearOptions = React.useMemo(() => {
43
+ const baseYear = new Date().getFullYear();
44
+ const minYear = fromYear ?? baseYear - 100;
45
+ const maxYear = toYear ?? baseYear + 20;
46
+ const start = Math.min(minYear, year);
47
+ const end = Math.max(maxYear, year);
48
+ return Array.from({ length: end - start + 1 }, (_, index) => start + index);
49
+ }, [fromYear, toYear, year]);
50
+ const monthOptions = React.useMemo(() => Array.from({ length: 12 }, (_, index) => index + 1), []);
51
+ const yearIndex = Math.max(yearOptions.indexOf(year), 0);
52
+ const monthIndex = month;
53
+ const goToPrevMonth = () => {
54
+ const prev = new Date(year, month - 1, 1);
55
+ setInternalMonth(prev);
56
+ onMonthChange?.(prev);
57
+ };
58
+ const goToNextMonth = () => {
59
+ const next = new Date(year, month + 1, 1);
60
+ setInternalMonth(next);
61
+ onMonthChange?.(next);
62
+ };
63
+ const setYear = (nextYear) => {
64
+ const next = new Date(nextYear, month, 1);
65
+ setInternalMonth(next);
66
+ onMonthChange?.(next);
67
+ };
68
+ const setMonthOfYear = (nextMonth) => {
69
+ const next = new Date(year, nextMonth - 1, 1);
70
+ setInternalMonth(next);
71
+ onMonthChange?.(next);
72
+ };
73
+ const handleDayClick = (date) => {
74
+ if (disabled?.(date))
75
+ return;
76
+ if (isRangeCalendarProps(calendarProps)) {
77
+ const range = calendarProps.selected;
78
+ if (!range?.from || (range.from && range.to)) {
79
+ calendarProps.onSelect?.({ from: date, to: undefined });
80
+ }
81
+ else {
82
+ if (date < range.from) {
83
+ calendarProps.onSelect?.({ from: date, to: range.from });
84
+ }
85
+ else {
86
+ calendarProps.onSelect?.({ from: range.from, to: date });
87
+ }
88
+ }
89
+ }
90
+ else {
91
+ calendarProps.onSelect?.(date);
92
+ }
93
+ };
94
+ const isSelected = (date) => {
95
+ if (selectedSingle) {
96
+ return isSameDay(date, selectedSingle);
97
+ }
98
+ if (selectedRange) {
99
+ if (selectedRange.from && isSameDay(date, selectedRange.from))
100
+ return true;
101
+ if (selectedRange.to && isSameDay(date, selectedRange.to))
102
+ return true;
103
+ }
104
+ return false;
105
+ };
106
+ const isInRange = (date) => {
107
+ if (!selectedRange?.from || !selectedRange.to)
108
+ return false;
109
+ return date > selectedRange.from && date < selectedRange.to;
110
+ };
111
+ const days = [];
112
+ for (let i = firstDay - 1; i >= 0; i--) {
113
+ days.push({
114
+ date: new Date(year, month - 1, daysInPrevMonth - i),
115
+ isOutside: true,
116
+ });
117
+ }
118
+ for (let i = 1; i <= daysInMonth; i++) {
119
+ days.push({ date: new Date(year, month, i), isOutside: false });
120
+ }
121
+ const remaining = 42 - days.length;
122
+ for (let i = 1; i <= remaining; i++) {
123
+ days.push({ date: new Date(year, month + 1, i), isOutside: true });
124
+ }
125
+ const weeks = [];
126
+ for (let i = 0; i < days.length; i += 7) {
127
+ weeks.push(days.slice(i, i + 7));
128
+ }
129
+ return (_jsxs(View, { "data-slot": "calendar", className: cn("bg-background p-2", className), ...viewProps, children: [_jsxs(View, { className: "flex items-center justify-between", children: [_jsx(Button, { variant: "ghost", size: "icon", onClick: goToPrevMonth, onTap: goToPrevMonth, children: _jsx(ChevronLeft, { className: "size-4" }) }), captionLayout === "dropdown" ? (_jsxs(View, { className: "flex items-center gap-2", children: [_jsx(Picker, { mode: "selector", range: yearOptions, value: yearIndex, onChange: (event) => setYear(yearOptions[Number(event.detail.value)] ?? year), children: _jsx(Button, { variant: "ghost", className: "h-8 px-2", children: _jsx(Text, { className: "text-sm font-medium", children: year }) }) }), _jsx(Picker, { mode: "selector", range: monthOptions, value: monthIndex, onChange: (event) => setMonthOfYear(monthOptions[Number(event.detail.value)] ?? month + 1), children: _jsx(Button, { variant: "ghost", className: "h-8 px-2", children: _jsxs(Text, { className: "text-sm font-medium", children: [String(month + 1).padStart(2, "0"), "\u6708"] }) }) })] })) : (_jsxs(View, { className: "text-sm font-medium", children: [monthNames[month], " ", year] })), _jsx(Button, { variant: "ghost", size: "icon", onClick: goToNextMonth, onTap: goToNextMonth, children: _jsx(ChevronRight, { className: "size-4" }) })] }), _jsx(View, { className: "mt-2 flex", children: weekdays.map((day) => (_jsx(View, { className: "flex-1 text-center text-xs font-normal text-muted-foreground", children: day }, day))) }), weeks.map((week, wi) => (_jsx(View, { className: "mt-1 flex", children: week.map((day, di) => {
130
+ if (day.isOutside && !showOutsideDays) {
131
+ return _jsx(View, { className: "flex-1" }, di);
132
+ }
133
+ const isDisabled = disabled?.(day.date);
134
+ const sel = isSelected(day.date);
135
+ const inRange = isInRange(day.date);
136
+ const isToday = isSameDay(day.date, today);
137
+ return (_jsx(View, { className: cn("flex flex-1 items-center justify-center", inRange && "bg-muted"), children: _jsx(View, { className: cn("flex size-7 items-center justify-center rounded-md text-sm", day.isOutside && "text-muted-foreground opacity-50", isDisabled && "opacity-50", isToday && !sel && "bg-muted font-medium", sel && "bg-primary text-primary-foreground", !sel && !isDisabled && !day.isOutside && "active:bg-accent"), onClick: () => !isDisabled && handleDayClick(day.date), onTap: () => !isDisabled && handleDayClick(day.date), children: day.date.getDate() }) }, di));
138
+ }) }, wi)))] }));
139
+ }
140
+ export { Calendar };
141
+ //# sourceMappingURL=calendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../src/ui/calendar.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAkB,MAAM,oBAAoB,CAAA;AAEvE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AA6BhE,SAAS,oBAAoB,CAC3B,KAAoB;IAEpB,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,CAAA;AAC/B,CAAC;AAED,SAAS,cAAc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EAAC,QAAQ,IAAtB,EAAE,CAAuB,CAAA;oBAC7C,CAAC;oBAED,MAAM,UAAU,GAAG,QAAQ,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;oBACvC,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;oBAChC,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;oBACnC,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;oBAE1C,OAAO,CACL,KAAC,IAAI,IAEH,SAAS,EAAE,EAAE,CACX,yCAAyC,EACzC,OAAO,IAAI,UAAU,CACtB,YAED,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,4DAA4D,EAC5D,GAAG,CAAC,SAAS,IAAI,kCAAkC,EACnD,UAAU,IAAI,YAAY,EAC1B,OAAO,IAAI,CAAC,GAAG,IAAI,sBAAsB,EACzC,GAAG,IAAI,oCAAoC,EAC3C,CAAC,GAAG,IAAI,CAAC,UAAU,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,kBAAkB,CAC5D,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EACtD,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,YAEnD,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,GACd,IAnBF,EAAE,CAoBF,CACR,CAAA;gBACH,CAAC,CAAC,IAnCO,EAAE,CAoCN,CACR,CAAC,IACG,CACR,CAAA;AACH,CAAC;AAED,OAAO,EAAE,QAAQ,EAAsB,CAAA"}
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { type ViewProps } from "@tarojs/components";
3
+ declare function Card({ className, size, children, ...props }: ViewProps & {
4
+ size?: "default" | "sm";
5
+ }): React.JSX.Element;
6
+ declare function CardHeader({ className, children, ...props }: ViewProps): React.JSX.Element;
7
+ declare function CardTitle({ className, ...props }: ViewProps): React.JSX.Element;
8
+ declare function CardDescription({ className, ...props }: ViewProps): React.JSX.Element;
9
+ declare function CardAction({ className, ...props }: ViewProps): React.JSX.Element;
10
+ declare function CardContent({ className, ...props }: ViewProps): React.JSX.Element;
11
+ declare function CardFooter({ className, ...props }: ViewProps): React.JSX.Element;
12
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };