rockin 0.0.34 → 0.0.36

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 (91) hide show
  1. package/dist/chunk-3CZ2LLUN.js +198 -0
  2. package/dist/{chunk-7ZCRGTLA.js → chunk-54ZJAEO5.js} +5 -5
  3. package/dist/chunk-5GM3YR42.js +228 -0
  4. package/dist/chunk-6XUTSMTJ.js +183 -0
  5. package/dist/chunk-7JJBATB2.js +35 -0
  6. package/dist/chunk-BITCJZQZ.js +31 -0
  7. package/dist/chunk-COPQJFDI.js +158 -0
  8. package/dist/chunk-D6TULSM6.js +785 -0
  9. package/dist/chunk-DVNTJNDP.js +55 -0
  10. package/dist/chunk-EKDBYSMI.js +87 -0
  11. package/dist/chunk-FGWWRPMR.js +71 -0
  12. package/dist/chunk-G233W3IR.js +17 -0
  13. package/dist/chunk-G4NDAZTB.js +13 -0
  14. package/dist/chunk-GY2BX5SK.js +26 -0
  15. package/dist/chunk-MZBLIA6C.js +20 -0
  16. package/dist/chunk-OSVLAX37.js +101 -0
  17. package/dist/chunk-PRGKTXJU.js +20 -0
  18. package/dist/chunk-RUKQ532H.js +253 -0
  19. package/dist/chunk-S4H2HENE.js +113 -0
  20. package/dist/chunk-UHZTEDHK.js +61 -0
  21. package/dist/chunk-VFDNWPOI.js +293 -0
  22. package/dist/chunk-W4EIJWHF.js +150 -0
  23. package/dist/hooks/index.js +18 -9
  24. package/dist/index.js +4 -4
  25. package/dist/provider.js +3 -3
  26. package/dist/styles.css +2 -2
  27. package/dist/ui/accordion.js +95 -0
  28. package/dist/ui/alert-dialog.js +178 -0
  29. package/dist/ui/apple/english.js +7 -0
  30. package/dist/ui/apple/hindi.js +7 -0
  31. package/dist/ui/apple/index.js +52 -0
  32. package/dist/ui/apple/spanish.js +7 -0
  33. package/dist/ui/ariakit.js +7 -0
  34. package/dist/ui/autocomplete.js +296 -0
  35. package/dist/ui/avatar.js +106 -0
  36. package/dist/ui/badge.js +50 -0
  37. package/dist/ui/bridge.js +109 -0
  38. package/dist/ui/bubble.js +118 -0
  39. package/dist/ui/button-group.js +14 -0
  40. package/dist/ui/button.js +9 -0
  41. package/dist/ui/card.js +102 -0
  42. package/dist/ui/carousel.js +205 -0
  43. package/dist/ui/chart.js +253 -0
  44. package/dist/ui/checkbox.js +34 -0
  45. package/dist/ui/code-block.js +128 -0
  46. package/dist/ui/combobox.js +41 -0
  47. package/dist/ui/command.js +199 -0
  48. package/dist/ui/dashed.js +57 -0
  49. package/dist/ui/data-table/index.js +233 -0
  50. package/dist/ui/dialog.js +26 -0
  51. package/dist/ui/dock.js +86 -0
  52. package/dist/ui/drawer.js +216 -0
  53. package/dist/ui/dropdown-menu.js +35 -0
  54. package/dist/ui/empty.js +17 -0
  55. package/dist/ui/farmer/div.js +38 -0
  56. package/dist/ui/farmer/variants.js +314 -0
  57. package/dist/ui/field.js +224 -0
  58. package/dist/ui/filters.js +1524 -0
  59. package/dist/ui/image.js +88 -0
  60. package/dist/ui/index.d.ts +1 -1
  61. package/dist/ui/index.js +57 -8502
  62. package/dist/ui/input-group.js +20 -0
  63. package/dist/ui/input-otp.js +83 -0
  64. package/dist/ui/input.js +7 -0
  65. package/dist/ui/item.js +200 -0
  66. package/dist/ui/jelly.js +30 -0
  67. package/dist/ui/kbd.js +9 -0
  68. package/dist/ui/label.js +7 -0
  69. package/dist/ui/message-scroller.js +122 -0
  70. package/dist/ui/message.js +93 -0
  71. package/dist/ui/numberstepper.js +416 -0
  72. package/dist/ui/otp.js +403 -0
  73. package/dist/ui/popover.js +83 -0
  74. package/dist/ui/qr-code.js +124 -0
  75. package/dist/ui/quantity.js +48 -0
  76. package/dist/ui/radio-group.js +42 -0
  77. package/dist/ui/resizable.js +52 -0
  78. package/dist/ui/scroll-area.js +9 -0
  79. package/dist/ui/select.js +194 -0
  80. package/dist/ui/separator.js +7 -0
  81. package/dist/ui/skeleton.js +25 -0
  82. package/dist/ui/sonner.js +22 -0
  83. package/dist/ui/sortable.js +503 -0
  84. package/dist/ui/swipe-actions.js +45 -0
  85. package/dist/ui/switch.js +34 -0
  86. package/dist/ui/textarea.js +7 -0
  87. package/dist/ui/theme-toggle.js +141 -0
  88. package/dist/ui/tooltip.js +13 -0
  89. package/package.json +1 -1
  90. package/dist/chunk-4KFB6AJH.js +0 -1330
  91. /package/dist/{chunk-FYFBWCMJ.js → chunk-GBVAFFZR.js} +0 -0
@@ -0,0 +1,88 @@
1
+ "use client";
2
+ import {
3
+ JellyMini
4
+ } from "../chunk-5GM3YR42.js";
5
+ import {
6
+ Skeleton
7
+ } from "../chunk-3CZ2LLUN.js";
8
+ import "../chunk-OSVLAX37.js";
9
+ import "../chunk-G4NDAZTB.js";
10
+ import "../chunk-DVNTJNDP.js";
11
+
12
+ // src/ui/image.tsx
13
+ import NextImage from "next/image";
14
+ import { useCallback, useState } from "react";
15
+ import { cn } from "cn";
16
+ import { jsx, jsxs } from "react/jsx-runtime";
17
+ function srcValue(src) {
18
+ if (!src) return null;
19
+ if (typeof src === "string") return src;
20
+ if ("src" in src) return src.src;
21
+ return src.default.src;
22
+ }
23
+ function Image({
24
+ wrapper,
25
+ showSkeleton = true,
26
+ className,
27
+ loading = "lazy",
28
+ fetchPriority,
29
+ preload,
30
+ quality = 90,
31
+ src,
32
+ alt,
33
+ onLoad,
34
+ onError,
35
+ children,
36
+ fallback = /* @__PURE__ */ jsx(JellyMini, { mood: "curious", className: "size-full p-[12%]" }),
37
+ ...props
38
+ }) {
39
+ const currentSrc = srcValue(src);
40
+ const [loadedSrc, setLoadedSrc] = useState(null);
41
+ const [failedSrc, setFailedSrc] = useState(null);
42
+ const hasSource = Boolean(currentSrc);
43
+ const failed = hasSource && failedSrc === currentSrc;
44
+ const loaded = hasSource && loadedSrc === currentSrc && !failed;
45
+ const shouldPreload = preload ?? loading === "eager";
46
+ const imageLoading = shouldPreload ? "eager" : loading;
47
+ const markLoaded = useCallback(() => {
48
+ if (!currentSrc) return;
49
+ setFailedSrc(null);
50
+ setLoadedSrc(currentSrc);
51
+ }, [currentSrc]);
52
+ const markFailed = useCallback(() => {
53
+ if (!currentSrc) return;
54
+ setFailedSrc(currentSrc);
55
+ }, [currentSrc]);
56
+ return /* @__PURE__ */ jsxs("section", { className: cn("relative block overflow-hidden", wrapper), children: [
57
+ showSkeleton && !loaded && !failed && hasSource && /* @__PURE__ */ jsx(Skeleton, { className: "absolute inset-0 size-full" }),
58
+ hasSource && !failed ? /* @__PURE__ */ jsx(
59
+ NextImage,
60
+ {
61
+ ...props,
62
+ src: src ?? "",
63
+ alt,
64
+ quality,
65
+ loading: imageLoading,
66
+ preload: shouldPreload,
67
+ fetchPriority: fetchPriority ?? (imageLoading === "eager" ? "high" : void 0),
68
+ className: cn(
69
+ "transition-opacity duration-200",
70
+ loaded ? "opacity-100" : "opacity-0",
71
+ className
72
+ ),
73
+ onLoad: (event) => {
74
+ markLoaded();
75
+ onLoad?.(event);
76
+ },
77
+ onError: (event) => {
78
+ markFailed();
79
+ onError?.(event);
80
+ }
81
+ }
82
+ ) : fallback,
83
+ children
84
+ ] });
85
+ }
86
+ export {
87
+ Image
88
+ };
@@ -672,7 +672,7 @@ declare function Input({ className, type, inputMode, onWheel, ...props }: React$
672
672
 
673
673
  declare function InputGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
674
674
  declare const inputGroupAddonVariants: (props?: ({
675
- align?: "inline-end" | "inline-start" | "block-end" | "block-start" | null | undefined;
675
+ align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
676
676
  } & class_variance_authority_types.ClassProp) | undefined) => string;
677
677
  declare function InputGroupAddon({ className, align, focusInput, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants> & {
678
678
  focusInput?: boolean;