@classytic/fluid 0.4.1 → 0.5.0

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 (51) hide show
  1. package/README.md +21 -1
  2. package/dist/client/calendar.d.mts +1 -2
  3. package/dist/client/calendar.mjs +4 -4
  4. package/dist/client/color-picker.d.mts +94 -0
  5. package/dist/client/color-picker.mjs +392 -0
  6. package/dist/client/core.d.mts +243 -557
  7. package/dist/client/core.mjs +351 -1462
  8. package/dist/client/error.d.mts +41 -41
  9. package/dist/client/error.mjs +35 -35
  10. package/dist/client/gallery.d.mts +175 -0
  11. package/dist/client/gallery.mjs +546 -0
  12. package/dist/client/hooks.d.mts +57 -39
  13. package/dist/client/hooks.mjs +29 -7
  14. package/dist/client/spreadsheet.d.mts +30 -27
  15. package/dist/client/spreadsheet.mjs +80 -80
  16. package/dist/client/table.d.mts +66 -33
  17. package/dist/client/table.mjs +87 -54
  18. package/dist/client/theme.mjs +1 -1
  19. package/dist/command.d.mts +6 -4
  20. package/dist/command.mjs +3 -3
  21. package/dist/compact.d.mts +97 -95
  22. package/dist/compact.mjs +336 -322
  23. package/dist/dashboard.d.mts +614 -422
  24. package/dist/dashboard.mjs +1051 -762
  25. package/dist/{dropdown-wrapper-B86u9Fri.mjs → dropdown-wrapper-B9nRDUlz.mjs} +25 -35
  26. package/dist/forms.d.mts +1037 -972
  27. package/dist/forms.mjs +2849 -2721
  28. package/dist/index.d.mts +218 -152
  29. package/dist/index.mjs +357 -264
  30. package/dist/layouts.d.mts +94 -94
  31. package/dist/layouts.mjs +115 -110
  32. package/dist/phone-input-B9_XPNvv.mjs +429 -0
  33. package/dist/phone-input-CLH_UjQZ.d.mts +31 -0
  34. package/dist/{search-context-DR7DBs7S.mjs → search-context-1g3ZmOvx.mjs} +1 -1
  35. package/dist/search.d.mts +168 -164
  36. package/dist/search.mjs +305 -301
  37. package/dist/{sheet-wrapper-C13Y-Q6w.mjs → sheet-wrapper-B2uxookb.mjs} +1 -1
  38. package/dist/timeline-Bgu1mIe9.d.mts +373 -0
  39. package/dist/timeline-HJtWf4Op.mjs +804 -0
  40. package/dist/{use-base-search-BGgWnWaF.d.mts → use-base-search-DFC4QKYU.d.mts} +1 -1
  41. package/dist/{use-media-query-BnVNIKT4.mjs → use-media-query-ChLfFChU.mjs} +6 -7
  42. package/package.json +10 -2
  43. /package/dist/{api-pagination-CJ0vR_w6.d.mts → api-pagination-C30ser2L.d.mts} +0 -0
  44. /package/dist/{filter-utils-DqMmy_v-.mjs → filter-utils-BGIvtq1R.mjs} +0 -0
  45. /package/dist/{filter-utils-IZ0GtuPo.d.mts → filter-utils-DOFTBWm1.d.mts} +0 -0
  46. /package/dist/{use-debounce-xmZucz5e.mjs → use-debounce-BNoNiEon.mjs} +0 -0
  47. /package/dist/{use-keyboard-shortcut-Bl6YM5Q7.mjs → use-keyboard-shortcut-C_Vk-36P.mjs} +0 -0
  48. /package/dist/{use-keyboard-shortcut-_mRCh3QO.d.mts → use-keyboard-shortcut-Q4CSPzSI.d.mts} +0 -0
  49. /package/dist/{use-mobile-BX3SQVo2.mjs → use-mobile-CnEmFiQx.mjs} +0 -0
  50. /package/dist/{use-scroll-detection-CsgsQYvy.mjs → use-scroll-detection-BKfqkmEC.mjs} +0 -0
  51. /package/dist/{utils-CDue7cEt.d.mts → utils-rqvYP1by.d.mts} +0 -0
package/dist/command.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
 
3
3
  import { t as cn } from "./utils-DQ5SCVoW.mjs";
4
- import { t as useKeyboardShortcut } from "./use-keyboard-shortcut-Bl6YM5Q7.mjs";
4
+ import { t as useKeyboardShortcut } from "./use-keyboard-shortcut-C_Vk-36P.mjs";
5
+ import React, { createContext, useCallback, useContext, useState } from "react";
5
6
  import { jsx, jsxs } from "react/jsx-runtime";
6
- import { createContext, useCallback, useContext, useState } from "react";
7
7
  import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from "@/components/ui/command";
8
8
  import { Kbd } from "@/components/ui/kbd";
9
9
 
@@ -100,7 +100,7 @@ function CommandSearchItemComponent({ children, icon, shortcut: shortcutDisplay,
100
100
  children: [
101
101
  icon && /* @__PURE__ */ jsx("span", {
102
102
  className: "shrink-0",
103
- children: icon
103
+ children: typeof icon === "function" ? React.createElement(icon, { className: "h-4 w-4" }) : icon
104
104
  }),
105
105
  /* @__PURE__ */ jsx("span", {
106
106
  className: "flex-1",
@@ -1,5 +1,5 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
1
  import { ChangeEvent, InputHTMLAttributes, ReactNode, Ref, TextareaHTMLAttributes } from "react";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { Control, FieldValues, Path } from "react-hook-form";
4
4
 
5
5
  //#region src/components/compact/compact-input.d.ts
@@ -63,8 +63,8 @@ declare function CompactInput<T extends FieldValues = FieldValues>({
63
63
  ref?: Ref<HTMLInputElement>;
64
64
  }): react_jsx_runtime0.JSX.Element;
65
65
  //#endregion
66
- //#region src/components/compact/compact-textarea.d.ts
67
- interface CompactTextareaProps<T extends FieldValues = FieldValues> extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
66
+ //#region src/components/compact/compact-number-input.d.ts
67
+ interface CompactNumberInputProps<T extends FieldValues = FieldValues> {
68
68
  control?: Control<T>;
69
69
  name?: Path<T>;
70
70
  description?: string;
@@ -72,26 +72,35 @@ interface CompactTextareaProps<T extends FieldValues = FieldValues> extends Omit
72
72
  label?: string;
73
73
  placeholder?: string;
74
74
  disabled?: boolean;
75
- rows?: number;
76
- addonLeft?: ReactNode;
77
- addonRight?: ReactNode;
75
+ min?: number;
76
+ max?: number;
77
+ step?: number;
78
+ prefix?: ReactNode;
79
+ suffix?: ReactNode;
80
+ showButtons?: boolean;
81
+ buttonVariant?: "ghost" | "outline" | "default";
82
+ className?: string;
78
83
  inputClassName?: string;
79
- onValueChange?: (value: string) => void;
80
- value?: string;
81
- onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
84
+ labelClassName?: string;
85
+ containerClassName?: string;
86
+ onValueChange?: (value: number | string) => void;
87
+ value?: number | string;
88
+ defaultValue?: number | string;
89
+ onChange?: (value: number | string) => void;
82
90
  error?: string;
83
91
  }
84
92
  /**
85
- * CompactTextarea - Enhanced textarea with InputGroup support
93
+ * CompactNumberInput - A space-efficient number input with optional increment/decrement buttons
86
94
  *
87
95
  * Features:
88
96
  * - Floating label design
89
- * - InputGroup support with addons
90
- * - Character counter with maxLength
91
- * - Controller integration for react-hook-form
97
+ * - Optional increment/decrement buttons
98
+ * - Support for min/max/step values
99
+ * - Prefix/suffix support
100
+ * - Form integration via control prop
92
101
  * - Direct usage without form
93
102
  */
94
- declare function CompactTextarea<T extends FieldValues = FieldValues>({
103
+ declare function CompactNumberInput<T extends FieldValues = FieldValues>({
95
104
  control,
96
105
  name,
97
106
  description,
@@ -99,33 +108,33 @@ declare function CompactTextarea<T extends FieldValues = FieldValues>({
99
108
  label,
100
109
  placeholder,
101
110
  disabled,
102
- rows,
103
- addonLeft,
104
- addonRight,
111
+ min,
112
+ max,
113
+ step,
114
+ prefix,
115
+ suffix,
116
+ showButtons,
117
+ buttonVariant,
105
118
  className,
106
119
  inputClassName,
120
+ labelClassName,
121
+ containerClassName,
107
122
  onValueChange,
108
123
  value,
124
+ defaultValue,
109
125
  onChange,
110
126
  error,
111
- cols,
112
- wrap,
113
- autoComplete,
114
- autoFocus,
115
- maxLength,
116
- minLength,
117
- readOnly,
118
- spellCheck,
119
127
  ref,
120
128
  ...props
121
- }: CompactTextareaProps<T> & {
122
- ref?: Ref<HTMLTextAreaElement>;
129
+ }: CompactNumberInputProps<T> & {
130
+ ref?: Ref<HTMLInputElement>;
123
131
  }): react_jsx_runtime0.JSX.Element;
124
132
  //#endregion
125
133
  //#region src/components/compact/compact-select.d.ts
126
134
  interface SelectOption {
127
135
  value: string;
128
136
  label: string;
137
+ disabled?: boolean;
129
138
  }
130
139
  interface CompactSelectProps<T extends FieldValues = FieldValues> {
131
140
  control?: Control<T>;
@@ -136,13 +145,15 @@ interface CompactSelectProps<T extends FieldValues = FieldValues> {
136
145
  placeholder?: string;
137
146
  disabled?: boolean;
138
147
  items?: SelectOption[];
148
+ /** When true, auto-adds a clear option using the placeholder text as its label */
149
+ clearable?: boolean;
139
150
  className?: string;
140
151
  onValueChange?: (value: string) => void;
141
152
  value?: string;
142
153
  error?: string;
143
154
  }
144
155
  /**
145
- * CompactSelect - Simple, clean select dropdown
156
+ * CompactSelect - Floating-label select dropdown
146
157
  *
147
158
  * @example
148
159
  * <CompactSelect
@@ -151,6 +162,7 @@ interface CompactSelectProps<T extends FieldValues = FieldValues> {
151
162
  * { value: "active", label: "Active" },
152
163
  * { value: "inactive", label: "Inactive" }
153
164
  * ]}
165
+ * clearable
154
166
  * />
155
167
  */
156
168
  declare function CompactSelect<T extends FieldValues = FieldValues>({
@@ -162,6 +174,7 @@ declare function CompactSelect<T extends FieldValues = FieldValues>({
162
174
  placeholder,
163
175
  disabled,
164
176
  items,
177
+ clearable,
165
178
  className,
166
179
  onValueChange,
167
180
  value,
@@ -172,8 +185,12 @@ declare function CompactSelect<T extends FieldValues = FieldValues>({
172
185
  ref?: Ref<HTMLButtonElement>;
173
186
  }): react_jsx_runtime0.JSX.Element;
174
187
  //#endregion
175
- //#region src/components/compact/compact-number-input.d.ts
176
- interface CompactNumberInputProps<T extends FieldValues = FieldValues> {
188
+ //#region src/components/compact/compact-slug-field.d.ts
189
+ /**
190
+ * Generates a URL-friendly slug from a string
191
+ */
192
+ declare function generateSlug(text: string): string;
193
+ interface CompactSlugFieldProps<T extends FieldValues = FieldValues> {
177
194
  control?: Control<T>;
178
195
  name?: Path<T>;
179
196
  description?: string;
@@ -181,35 +198,31 @@ interface CompactNumberInputProps<T extends FieldValues = FieldValues> {
181
198
  label?: string;
182
199
  placeholder?: string;
183
200
  disabled?: boolean;
184
- min?: number;
185
- max?: number;
186
- step?: number;
187
- prefix?: ReactNode;
188
- suffix?: ReactNode;
189
- showButtons?: boolean;
190
- buttonVariant?: "ghost" | "outline" | "default";
201
+ icon?: ReactNode;
202
+ sourceValue?: string;
203
+ onGenerate?: (source: string) => string;
191
204
  className?: string;
192
205
  inputClassName?: string;
193
- labelClassName?: string;
194
- containerClassName?: string;
195
- onValueChange?: (value: number | string) => void;
196
- value?: number | string;
197
- defaultValue?: number | string;
198
- onChange?: (value: number | string) => void;
206
+ onValueChange?: (value: string) => void;
207
+ value?: string;
208
+ onChange?: (e: ChangeEvent<HTMLInputElement> | {
209
+ target: {
210
+ value: string;
211
+ };
212
+ }) => void;
199
213
  error?: string;
200
214
  }
201
215
  /**
202
- * CompactNumberInput - A space-efficient number input with optional increment/decrement buttons
216
+ * CompactSlugField - Compact slug input with auto-generation
203
217
  *
204
218
  * Features:
205
- * - Floating label design
206
- * - Optional increment/decrement buttons
207
- * - Support for min/max/step values
208
- * - Prefix/suffix support
219
+ * - Compact design with floating label
220
+ * - Auto-generate slug from source field
221
+ * - Manual editing support
222
+ * - InputGroup with generate button
209
223
  * - Form integration via control prop
210
- * - Direct usage without form
211
224
  */
212
- declare function CompactNumberInput<T extends FieldValues = FieldValues>({
225
+ declare function CompactSlugField<T extends FieldValues = FieldValues>({
213
226
  control,
214
227
  name,
215
228
  description,
@@ -217,25 +230,18 @@ declare function CompactNumberInput<T extends FieldValues = FieldValues>({
217
230
  label,
218
231
  placeholder,
219
232
  disabled,
220
- min,
221
- max,
222
- step,
223
- prefix,
224
- suffix,
225
- showButtons,
226
- buttonVariant,
233
+ icon,
234
+ sourceValue,
235
+ onGenerate,
227
236
  className,
228
237
  inputClassName,
229
- labelClassName,
230
- containerClassName,
231
238
  onValueChange,
232
239
  value,
233
- defaultValue,
234
240
  onChange,
235
241
  error,
236
242
  ref,
237
243
  ...props
238
- }: CompactNumberInputProps<T> & {
244
+ }: CompactSlugFieldProps<T> & {
239
245
  ref?: Ref<HTMLInputElement>;
240
246
  }): react_jsx_runtime0.JSX.Element;
241
247
  //#endregion
@@ -264,14 +270,11 @@ interface CompactTagChoiceProps<T extends FieldValues = FieldValues> {
264
270
  error?: string;
265
271
  }
266
272
  /**
267
- * CompactTagChoice - A compact tag selection input
273
+ * CompactTagChoice - A compact tag selection input with floating label
268
274
  *
269
- * Features:
270
- * - Multi-select tag interface
271
- * - Maximum selection limit
272
- * - Popover for selecting options
273
- * - Form integration via control prop
274
- * - Direct usage without form
275
+ * Uses a trigger button that shows selected count or placeholder,
276
+ * with a popover dropdown listing available choices.
277
+ * Selected items display as inline badges below the trigger.
275
278
  */
276
279
  declare function CompactTagChoice<T extends FieldValues = FieldValues>({
277
280
  control,
@@ -296,12 +299,8 @@ declare function CompactTagChoice<T extends FieldValues = FieldValues>({
296
299
  ref?: Ref<HTMLDivElement>;
297
300
  }): react_jsx_runtime0.JSX.Element;
298
301
  //#endregion
299
- //#region src/components/compact/compact-slug-field.d.ts
300
- /**
301
- * Generates a URL-friendly slug from a string
302
- */
303
- declare function generateSlug(text: string): string;
304
- interface CompactSlugFieldProps<T extends FieldValues = FieldValues> {
302
+ //#region src/components/compact/compact-textarea.d.ts
303
+ interface CompactTextareaProps<T extends FieldValues = FieldValues> extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange"> {
305
304
  control?: Control<T>;
306
305
  name?: Path<T>;
307
306
  description?: string;
@@ -309,31 +308,26 @@ interface CompactSlugFieldProps<T extends FieldValues = FieldValues> {
309
308
  label?: string;
310
309
  placeholder?: string;
311
310
  disabled?: boolean;
312
- icon?: ReactNode;
313
- sourceValue?: string;
314
- onGenerate?: (source: string) => string;
315
- className?: string;
311
+ rows?: number;
312
+ addonLeft?: ReactNode;
313
+ addonRight?: ReactNode;
316
314
  inputClassName?: string;
317
315
  onValueChange?: (value: string) => void;
318
316
  value?: string;
319
- onChange?: (e: ChangeEvent<HTMLInputElement> | {
320
- target: {
321
- value: string;
322
- };
323
- }) => void;
317
+ onChange?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
324
318
  error?: string;
325
319
  }
326
320
  /**
327
- * CompactSlugField - Compact slug input with auto-generation
321
+ * CompactTextarea - Enhanced textarea with InputGroup support
328
322
  *
329
323
  * Features:
330
- * - Compact design with floating label
331
- * - Auto-generate slug from source field
332
- * - Manual editing support
333
- * - InputGroup with generate button
334
- * - Form integration via control prop
324
+ * - Floating label design
325
+ * - InputGroup support with addons
326
+ * - Character counter with maxLength
327
+ * - Controller integration for react-hook-form
328
+ * - Direct usage without form
335
329
  */
336
- declare function CompactSlugField<T extends FieldValues = FieldValues>({
330
+ declare function CompactTextarea<T extends FieldValues = FieldValues>({
337
331
  control,
338
332
  name,
339
333
  description,
@@ -341,19 +335,27 @@ declare function CompactSlugField<T extends FieldValues = FieldValues>({
341
335
  label,
342
336
  placeholder,
343
337
  disabled,
344
- icon,
345
- sourceValue,
346
- onGenerate,
338
+ rows,
339
+ addonLeft,
340
+ addonRight,
347
341
  className,
348
342
  inputClassName,
349
343
  onValueChange,
350
344
  value,
351
345
  onChange,
352
346
  error,
347
+ cols,
348
+ wrap,
349
+ autoComplete,
350
+ autoFocus,
351
+ maxLength,
352
+ minLength,
353
+ readOnly,
354
+ spellCheck,
353
355
  ref,
354
356
  ...props
355
- }: CompactSlugFieldProps<T> & {
356
- ref?: Ref<HTMLInputElement>;
357
+ }: CompactTextareaProps<T> & {
358
+ ref?: Ref<HTMLTextAreaElement>;
357
359
  }): react_jsx_runtime0.JSX.Element;
358
360
  //#endregion
359
361
  export { CompactInput, type CompactInputProps, CompactNumberInput, type CompactNumberInputProps, CompactSelect, type CompactSelectProps, CompactSlugField, type CompactSlugFieldProps, CompactTagChoice, type CompactTagChoiceProps, CompactTextarea, type CompactTextareaProps, generateSlug };