@frontfriend/tailwind 2.1.0 → 2.1.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.
@@ -1,3 +1,5 @@
1
+ import type { Ref, ComputedRef } from 'vue';
2
+
1
3
  /**
2
4
  * Combines class names with tailwind-merge
3
5
  * @param inputs - Class names to combine
@@ -10,16 +12,16 @@ export function cn(...inputs: any[]): string;
10
12
  * @param query - Media query string
11
13
  * @returns Ref<boolean> indicating if query matches
12
14
  */
13
- export function useMediaQuery(query: string): import('vue').Ref<boolean>;
15
+ export function useMediaQuery(query: string): Ref<boolean>;
14
16
 
15
17
  /**
16
18
  * Vue composition API hook for responsive breakpoints
17
19
  * @returns Object with breakpoint states and active breakpoint
18
20
  */
19
21
  export function useBreakpoints(): {
20
- isXs: import('vue').Ref<boolean>;
21
- isSm: import('vue').Ref<boolean>;
22
- isMd: import('vue').Ref<boolean>;
23
- isLg: import('vue').Ref<boolean>;
24
- active: import('vue').ComputedRef<'xs' | 'sm' | 'md' | 'lg'>;
22
+ isXs: Ref<boolean>;
23
+ isSm: Ref<boolean>;
24
+ isMd: Ref<boolean>;
25
+ isLg: Ref<boolean>;
26
+ active: ComputedRef<'xs' | 'sm' | 'md' | 'lg'>;
25
27
  };
package/dist/runtime.d.ts CHANGED
@@ -1,8 +1,10 @@
1
+ import { IconSetStructure } from './types/index';
2
+
1
3
  export interface FrontFriend {
2
4
  /** Current configuration */
3
5
  config: Record<string, any> | null;
4
6
  /** Icon set */
5
- iconSet: Record<string, string> | null;
7
+ iconSet: IconSetStructure | null;
6
8
  /** Get an icon by name */
7
9
  getIcon(name: string): string | null;
8
10
  /** Refresh configuration from globals */
@@ -15,9 +15,63 @@ declare module '@frontfriend/tailwind' {
15
15
  content?: string[];
16
16
  }
17
17
 
18
+ // IconSet type definition with nested structure
19
+ export interface IconSetStructure {
20
+ accordion?: {
21
+ trigger?: string;
22
+ };
23
+ badge?: {
24
+ dismiss?: string;
25
+ };
26
+ checkbox?: {
27
+ indicator?: string;
28
+ indeterminate?: string;
29
+ };
30
+ navigation?: {
31
+ left?: string;
32
+ right?: string;
33
+ up?: string;
34
+ down?: string;
35
+ add?: string;
36
+ subtract?: string;
37
+ };
38
+ inputs?: {
39
+ inputSearch?: string;
40
+ clear?: string;
41
+ };
42
+ datepicker?: {
43
+ presets?: string;
44
+ calendar?: string;
45
+ };
46
+ dialog?: {
47
+ close?: string;
48
+ };
49
+ dropdown?: {
50
+ chevron?: string;
51
+ checkbox?: {
52
+ indicator?: string;
53
+ };
54
+ radio?: {
55
+ indicator?: string;
56
+ };
57
+ subTrigger?: string;
58
+ };
59
+ fileUpload?: {
60
+ check?: string;
61
+ x?: string;
62
+ };
63
+ sidebar?: {
64
+ trigger?: string;
65
+ };
66
+ [key: string]: any;
67
+ }
68
+
69
+ // Icon name type - this should match the icon names in your icon library
70
+ export type IconName = string;
71
+
18
72
  // Exported configuration and utilities
19
73
  export const config: Record<string, any> | null;
20
- export const iconSet: Record<string, string> | null;
74
+ export const iconSet: IconSetStructure | null;
21
75
  export function ffdc(config: Record<string, any> | null | undefined): Record<string, any>;
22
76
 
23
77
  export interface CacheData {
@@ -50,11 +104,13 @@ declare module '@frontfriend/tailwind' {
50
104
  }
51
105
 
52
106
  declare module '@frontfriend/tailwind/runtime' {
107
+ import { IconSetStructure } from '@frontfriend/tailwind';
108
+
53
109
  export interface FrontFriend {
54
110
  /** Current configuration */
55
111
  config: Record<string, any> | null;
56
112
  /** Icon set */
57
- iconSet: Record<string, string> | null;
113
+ iconSet: IconSetStructure | null;
58
114
  /** Get an icon by name */
59
115
  getIcon(name: string): string | null;
60
116
  /** Refresh configuration from globals */
@@ -138,21 +194,63 @@ declare module '@frontfriend/tailwind/lib/react/utils.mjs' {
138
194
  }
139
195
 
140
196
  declare module '@frontfriend/tailwind/lib/vue/utils' {
197
+ import type { Ref, ComputedRef } from 'vue';
198
+
141
199
  /**
142
200
  * Combines class names with tailwind-merge
143
201
  * @param inputs - Class names to combine
144
202
  * @returns Merged class string
145
203
  */
146
204
  export function cn(...inputs: any[]): string;
205
+
206
+ /**
207
+ * Vue composition API hook for media query
208
+ * @param query - Media query string
209
+ * @returns Ref<boolean> indicating if query matches
210
+ */
211
+ export function useMediaQuery(query: string): Ref<boolean>;
212
+
213
+ /**
214
+ * Vue composition API hook for responsive breakpoints
215
+ * @returns Object with breakpoint states and active breakpoint
216
+ */
217
+ export function useBreakpoints(): {
218
+ isXs: Ref<boolean>;
219
+ isSm: Ref<boolean>;
220
+ isMd: Ref<boolean>;
221
+ isLg: Ref<boolean>;
222
+ active: ComputedRef<'xs' | 'sm' | 'md' | 'lg'>;
223
+ };
147
224
  }
148
225
 
149
226
  declare module '@frontfriend/tailwind/lib/vue/utils.mjs' {
227
+ import type { Ref, ComputedRef } from 'vue';
228
+
150
229
  /**
151
230
  * Combines class names with tailwind-merge
152
231
  * @param inputs - Class names to combine
153
232
  * @returns Merged class string
154
233
  */
155
234
  export function cn(...inputs: any[]): string;
235
+
236
+ /**
237
+ * Vue composition API hook for media query
238
+ * @param query - Media query string
239
+ * @returns Ref<boolean> indicating if query matches
240
+ */
241
+ export function useMediaQuery(query: string): Ref<boolean>;
242
+
243
+ /**
244
+ * Vue composition API hook for responsive breakpoints
245
+ * @returns Object with breakpoint states and active breakpoint
246
+ */
247
+ export function useBreakpoints(): {
248
+ isXs: Ref<boolean>;
249
+ isSm: Ref<boolean>;
250
+ isMd: Ref<boolean>;
251
+ isLg: Ref<boolean>;
252
+ active: ComputedRef<'xs' | 'sm' | 'md' | 'lg'>;
253
+ };
156
254
  }
157
255
 
158
256
  // Internal modules (for advanced usage)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontfriend/tailwind",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Design token management for Tailwind CSS",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/types/index.d.ts",