rockin 0.0.34 → 0.0.35

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 (90) 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/ui/accordion.js +95 -0
  27. package/dist/ui/alert-dialog.js +178 -0
  28. package/dist/ui/apple/english.js +7 -0
  29. package/dist/ui/apple/hindi.js +7 -0
  30. package/dist/ui/apple/index.js +52 -0
  31. package/dist/ui/apple/spanish.js +7 -0
  32. package/dist/ui/ariakit.js +7 -0
  33. package/dist/ui/autocomplete.js +296 -0
  34. package/dist/ui/avatar.js +106 -0
  35. package/dist/ui/badge.js +50 -0
  36. package/dist/ui/bridge.js +109 -0
  37. package/dist/ui/bubble.js +118 -0
  38. package/dist/ui/button-group.js +14 -0
  39. package/dist/ui/button.js +9 -0
  40. package/dist/ui/card.js +102 -0
  41. package/dist/ui/carousel.js +205 -0
  42. package/dist/ui/chart.js +253 -0
  43. package/dist/ui/checkbox.js +34 -0
  44. package/dist/ui/code-block.js +128 -0
  45. package/dist/ui/combobox.js +41 -0
  46. package/dist/ui/command.js +199 -0
  47. package/dist/ui/dashed.js +57 -0
  48. package/dist/ui/data-table/index.js +233 -0
  49. package/dist/ui/dialog.js +26 -0
  50. package/dist/ui/dock.js +86 -0
  51. package/dist/ui/drawer.js +216 -0
  52. package/dist/ui/dropdown-menu.js +35 -0
  53. package/dist/ui/empty.js +17 -0
  54. package/dist/ui/farmer/div.js +38 -0
  55. package/dist/ui/farmer/variants.js +314 -0
  56. package/dist/ui/field.js +224 -0
  57. package/dist/ui/filters.js +1524 -0
  58. package/dist/ui/image.js +88 -0
  59. package/dist/ui/index.d.ts +1 -1
  60. package/dist/ui/index.js +57 -8502
  61. package/dist/ui/input-group.js +20 -0
  62. package/dist/ui/input-otp.js +83 -0
  63. package/dist/ui/input.js +7 -0
  64. package/dist/ui/item.js +200 -0
  65. package/dist/ui/jelly.js +30 -0
  66. package/dist/ui/kbd.js +9 -0
  67. package/dist/ui/label.js +7 -0
  68. package/dist/ui/message-scroller.js +122 -0
  69. package/dist/ui/message.js +93 -0
  70. package/dist/ui/numberstepper.js +416 -0
  71. package/dist/ui/otp.js +403 -0
  72. package/dist/ui/popover.js +83 -0
  73. package/dist/ui/qr-code.js +124 -0
  74. package/dist/ui/quantity.js +48 -0
  75. package/dist/ui/radio-group.js +42 -0
  76. package/dist/ui/resizable.js +52 -0
  77. package/dist/ui/scroll-area.js +9 -0
  78. package/dist/ui/select.js +194 -0
  79. package/dist/ui/separator.js +7 -0
  80. package/dist/ui/skeleton.js +25 -0
  81. package/dist/ui/sonner.js +22 -0
  82. package/dist/ui/sortable.js +503 -0
  83. package/dist/ui/swipe-actions.js +45 -0
  84. package/dist/ui/switch.js +34 -0
  85. package/dist/ui/textarea.js +7 -0
  86. package/dist/ui/theme-toggle.js +141 -0
  87. package/dist/ui/tooltip.js +13 -0
  88. package/package.json +1 -1
  89. package/dist/chunk-4KFB6AJH.js +0 -1330
  90. /package/dist/{chunk-FYFBWCMJ.js → chunk-GBVAFFZR.js} +0 -0
@@ -0,0 +1,224 @@
1
+ "use client";
2
+ import {
3
+ Label
4
+ } from "../chunk-PRGKTXJU.js";
5
+ import {
6
+ Separator
7
+ } from "../chunk-GY2BX5SK.js";
8
+
9
+ // src/ui/field.tsx
10
+ import { cva } from "class-variance-authority";
11
+ import { useMemo } from "react";
12
+ import { cn } from "cn";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
+ function FieldSet({ className, ...props }) {
15
+ return /* @__PURE__ */ jsx(
16
+ "fieldset",
17
+ {
18
+ "data-slot": "field-set",
19
+ className: cn(
20
+ "flex flex-col gap-1 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
21
+ className
22
+ ),
23
+ ...props
24
+ }
25
+ );
26
+ }
27
+ function FieldLegend({
28
+ className,
29
+ variant = "legend",
30
+ ...props
31
+ }) {
32
+ return /* @__PURE__ */ jsx(
33
+ "legend",
34
+ {
35
+ "data-slot": "field-legend",
36
+ "data-variant": variant,
37
+ className: cn(
38
+ "mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
39
+ className
40
+ ),
41
+ ...props
42
+ }
43
+ );
44
+ }
45
+ function FieldGroup({ className, ...props }) {
46
+ return /* @__PURE__ */ jsx(
47
+ "div",
48
+ {
49
+ "data-slot": "field-group",
50
+ className: cn(
51
+ "group/field-group @container/field-group flex w-full flex-col gap-2 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
52
+ className
53
+ ),
54
+ ...props
55
+ }
56
+ );
57
+ }
58
+ var fieldVariants = cva(
59
+ "group/field flex w-full gap-2 data-[invalid=true]:text-destructive",
60
+ {
61
+ variants: {
62
+ orientation: {
63
+ vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
64
+ horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
65
+ responsive: "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
66
+ }
67
+ },
68
+ defaultVariants: {
69
+ orientation: "vertical"
70
+ }
71
+ }
72
+ );
73
+ function Field({
74
+ className,
75
+ orientation = "vertical",
76
+ ...props
77
+ }) {
78
+ return /* @__PURE__ */ jsx(
79
+ "div",
80
+ {
81
+ role: "group",
82
+ "data-slot": "field",
83
+ "data-orientation": orientation,
84
+ className: cn(fieldVariants({ orientation }), className),
85
+ ...props
86
+ }
87
+ );
88
+ }
89
+ function FieldContent({ className, ...props }) {
90
+ return /* @__PURE__ */ jsx(
91
+ "div",
92
+ {
93
+ "data-slot": "field-content",
94
+ className: cn(
95
+ "group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
96
+ className
97
+ ),
98
+ ...props
99
+ }
100
+ );
101
+ }
102
+ function FieldLabel({
103
+ className,
104
+ ...props
105
+ }) {
106
+ return /* @__PURE__ */ jsx(
107
+ Label,
108
+ {
109
+ "data-slot": "field-label",
110
+ className: cn(
111
+ "group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
112
+ "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
113
+ className
114
+ ),
115
+ ...props
116
+ }
117
+ );
118
+ }
119
+ function FieldTitle({ className, ...props }) {
120
+ return /* @__PURE__ */ jsx(
121
+ "div",
122
+ {
123
+ "data-slot": "field-label",
124
+ className: cn(
125
+ "flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
126
+ className
127
+ ),
128
+ ...props
129
+ }
130
+ );
131
+ }
132
+ function FieldDescription({ className, ...props }) {
133
+ return /* @__PURE__ */ jsx(
134
+ "p",
135
+ {
136
+ "data-slot": "field-description",
137
+ className: cn(
138
+ "text-left text-[10px] leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
139
+ "last:mt-0 nth-last-2:-mt-1",
140
+ "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
141
+ className
142
+ ),
143
+ ...props
144
+ }
145
+ );
146
+ }
147
+ function FieldSeparator({
148
+ children,
149
+ className,
150
+ ...props
151
+ }) {
152
+ return /* @__PURE__ */ jsxs(
153
+ "div",
154
+ {
155
+ "data-slot": "field-separator",
156
+ "data-content": !!children,
157
+ className: cn(
158
+ "relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
159
+ className
160
+ ),
161
+ ...props,
162
+ children: [
163
+ /* @__PURE__ */ jsx(Separator, { className: "absolute inset-0 top-1/2" }),
164
+ children && /* @__PURE__ */ jsx(
165
+ "span",
166
+ {
167
+ className: "relative mx-auto block w-fit px-2 text-muted-foreground",
168
+ "data-slot": "field-separator-content",
169
+ children
170
+ }
171
+ )
172
+ ]
173
+ }
174
+ );
175
+ }
176
+ function FieldError({
177
+ className,
178
+ children,
179
+ errors,
180
+ ...props
181
+ }) {
182
+ const content = useMemo(() => {
183
+ if (children) {
184
+ return children;
185
+ }
186
+ if (!errors?.length) {
187
+ return null;
188
+ }
189
+ const uniqueErrors = [
190
+ ...new Map(errors.map((error) => [error?.message, error])).values()
191
+ ];
192
+ if (uniqueErrors?.length == 1) {
193
+ return uniqueErrors[0]?.message;
194
+ }
195
+ return /* @__PURE__ */ jsx("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
196
+ (error, index) => error?.message && /* @__PURE__ */ jsx("li", { children: error.message }, index)
197
+ ) });
198
+ }, [children, errors]);
199
+ if (!content) {
200
+ return null;
201
+ }
202
+ return /* @__PURE__ */ jsx(
203
+ "div",
204
+ {
205
+ role: "alert",
206
+ "data-slot": "field-error",
207
+ className: cn("text-sm font-normal text-destructive", className),
208
+ ...props,
209
+ children: content
210
+ }
211
+ );
212
+ }
213
+ export {
214
+ Field,
215
+ FieldContent,
216
+ FieldDescription,
217
+ FieldError,
218
+ FieldGroup,
219
+ FieldLabel,
220
+ FieldLegend,
221
+ FieldSeparator,
222
+ FieldSet,
223
+ FieldTitle
224
+ };