@admin-layout/gluestack-ui-mobile 10.0.9-alpha.9 → 10.1.1-alpha.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 (170) hide show
  1. package/CHANGELOG.md +1 -9
  2. package/lib/components/ui/accordion/index.web.d.ts +209 -0
  3. package/lib/components/ui/accordion/index.web.js +156 -0
  4. package/lib/components/ui/accordion/index.web.js.map +1 -0
  5. package/lib/components/ui/actionsheet/index.web.d.ts +872 -0
  6. package/lib/components/ui/actionsheet/index.web.js +286 -0
  7. package/lib/components/ui/actionsheet/index.web.js.map +1 -0
  8. package/lib/components/ui/alert/index.web.d.ts +135 -0
  9. package/lib/components/ui/alert/index.web.js +38 -0
  10. package/lib/components/ui/alert/index.web.js.map +1 -0
  11. package/lib/components/ui/alert-dialog/index.web.d.ts +64 -0
  12. package/lib/components/ui/alert-dialog/index.web.js +139 -0
  13. package/lib/components/ui/alert-dialog/index.web.js.map +1 -0
  14. package/lib/components/ui/avatar/index.web.d.ts +21 -0
  15. package/lib/components/ui/avatar/index.web.js +92 -0
  16. package/lib/components/ui/avatar/index.web.js.map +1 -0
  17. package/lib/components/ui/badge/index.web.d.ts +382 -0
  18. package/lib/components/ui/badge/index.web.js +138 -0
  19. package/lib/components/ui/badge/index.web.js.map +1 -0
  20. package/lib/components/ui/button/index.web.d.ts +247 -0
  21. package/lib/components/ui/button/index.web.js +57 -0
  22. package/lib/components/ui/button/index.web.js.map +1 -0
  23. package/lib/components/ui/checkbox/index.web.d.ts +265 -0
  24. package/lib/components/ui/checkbox/index.web.js +77 -0
  25. package/lib/components/ui/checkbox/index.web.js.map +1 -0
  26. package/lib/components/ui/divider/index.web.d.ts +53 -0
  27. package/lib/components/ui/divider/index.web.js +21 -0
  28. package/lib/components/ui/divider/index.web.js.map +1 -0
  29. package/lib/components/ui/drawer/index.web.d.ts +174 -0
  30. package/lib/components/ui/drawer/index.web.js +65 -0
  31. package/lib/components/ui/drawer/index.web.js.map +1 -0
  32. package/lib/components/ui/fab/index.web.d.ts +520 -0
  33. package/lib/components/ui/fab/index.web.js +146 -0
  34. package/lib/components/ui/fab/index.web.js.map +1 -0
  35. package/lib/components/ui/flat-list/index.web.d.ts +21 -0
  36. package/lib/components/ui/flat-list/index.web.js +41 -0
  37. package/lib/components/ui/flat-list/index.web.js.map +1 -0
  38. package/lib/components/ui/form-control/index.web.d.ts +2071 -0
  39. package/lib/components/ui/form-control/index.web.js +290 -0
  40. package/lib/components/ui/form-control/index.web.js.map +1 -0
  41. package/lib/components/ui/image/index.web.d.ts +142 -0
  42. package/lib/components/ui/image/index.web.js +29 -0
  43. package/lib/components/ui/image/index.web.js.map +1 -0
  44. package/lib/components/ui/image-background/index.web.d.ts +8 -0
  45. package/lib/components/ui/image-background/index.web.js +23 -0
  46. package/lib/components/ui/image-background/index.web.js.map +1 -0
  47. package/lib/components/ui/input/index.web.d.ts +163 -0
  48. package/lib/components/ui/input/index.web.js +50 -0
  49. package/lib/components/ui/input/index.web.js.map +1 -0
  50. package/lib/components/ui/input-accessory-view/index.web.d.ts +9 -0
  51. package/lib/components/ui/input-accessory-view/index.web.js +16 -0
  52. package/lib/components/ui/input-accessory-view/index.web.js.map +1 -0
  53. package/lib/components/ui/keyboard-avoiding-view/index.web.d.ts +9 -0
  54. package/lib/components/ui/keyboard-avoiding-view/index.web.js +8 -0
  55. package/lib/components/ui/keyboard-avoiding-view/index.web.js.map +1 -0
  56. package/lib/components/ui/link/index.web.d.ts +365 -0
  57. package/lib/components/ui/link/index.web.js +70 -0
  58. package/lib/components/ui/link/index.web.js.map +1 -0
  59. package/lib/components/ui/menu/index.web.d.ts +142 -0
  60. package/lib/components/ui/menu/index.web.js +83 -0
  61. package/lib/components/ui/menu/index.web.js.map +1 -0
  62. package/lib/components/ui/modal/index.web.d.ts +111 -0
  63. package/lib/components/ui/modal/index.web.js +58 -0
  64. package/lib/components/ui/modal/index.web.js.map +1 -0
  65. package/lib/components/ui/popover/index.web.d.ts +309 -0
  66. package/lib/components/ui/popover/index.web.js +184 -0
  67. package/lib/components/ui/popover/index.web.js.map +1 -0
  68. package/lib/components/ui/portal/index.web.d.ts +9 -0
  69. package/lib/components/ui/portal/index.web.js +16 -0
  70. package/lib/components/ui/portal/index.web.js.map +1 -0
  71. package/lib/components/ui/pressable/index.web.d.ts +8 -0
  72. package/lib/components/ui/pressable/index.web.js +44 -0
  73. package/lib/components/ui/pressable/index.web.js.map +1 -0
  74. package/lib/components/ui/progress/index.web.d.ts +237 -0
  75. package/lib/components/ui/progress/index.web.js +73 -0
  76. package/lib/components/ui/progress/index.web.js.map +1 -0
  77. package/lib/components/ui/radio/index.web.d.ts +224 -0
  78. package/lib/components/ui/radio/index.web.js +69 -0
  79. package/lib/components/ui/radio/index.web.js.map +1 -0
  80. package/lib/components/ui/refresh-control/index.web.d.ts +14 -0
  81. package/lib/components/ui/refresh-control/index.web.js +69 -0
  82. package/lib/components/ui/refresh-control/index.web.js.map +1 -0
  83. package/lib/components/ui/safe-area-view/index.web.d.ts +6 -0
  84. package/lib/components/ui/safe-area-view/index.web.js +10 -0
  85. package/lib/components/ui/safe-area-view/index.web.js.map +1 -0
  86. package/lib/components/ui/scroll-view/index.web.d.ts +44 -0
  87. package/lib/components/ui/scroll-view/index.web.js +41 -0
  88. package/lib/components/ui/scroll-view/index.web.js.map +1 -0
  89. package/lib/components/ui/section-list/index.web.d.ts +26 -0
  90. package/lib/components/ui/section-list/index.web.js +35 -0
  91. package/lib/components/ui/section-list/index.web.js.map +1 -0
  92. package/lib/components/ui/select/index.web.d.ts +162 -0
  93. package/lib/components/ui/select/index.web.js +51 -0
  94. package/lib/components/ui/select/index.web.js.map +1 -0
  95. package/lib/components/ui/slider/index.web.d.ts +223 -0
  96. package/lib/components/ui/slider/index.web.js +189 -0
  97. package/lib/components/ui/slider/index.web.js.map +1 -0
  98. package/lib/components/ui/spinner/index.web.d.ts +176 -0
  99. package/lib/components/ui/spinner/index.web.js +55 -0
  100. package/lib/components/ui/spinner/index.web.js.map +1 -0
  101. package/lib/components/ui/status-bar/index.web.d.ts +14 -0
  102. package/lib/components/ui/status-bar/index.web.js +7 -0
  103. package/lib/components/ui/status-bar/index.web.js.map +1 -0
  104. package/lib/components/ui/switch/index.web.d.ts +71 -0
  105. package/lib/components/ui/switch/index.web.js +27 -0
  106. package/lib/components/ui/switch/index.web.js.map +1 -0
  107. package/lib/components/ui/tabs/index.web.d.ts +351 -0
  108. package/lib/components/ui/tabs/index.web.js +120 -0
  109. package/lib/components/ui/tabs/index.web.js.map +1 -0
  110. package/lib/components/ui/textarea/index.web.d.ts +162 -0
  111. package/lib/components/ui/textarea/index.web.js +50 -0
  112. package/lib/components/ui/textarea/index.web.js.map +1 -0
  113. package/lib/components/ui/toast/index.web.d.ts +225 -0
  114. package/lib/components/ui/toast/index.web.js +80 -0
  115. package/lib/components/ui/toast/index.web.js.map +1 -0
  116. package/lib/components/ui/tooltip/index.web.d.ts +86 -0
  117. package/lib/components/ui/tooltip/index.web.js +110 -0
  118. package/lib/components/ui/tooltip/index.web.js.map +1 -0
  119. package/lib/components/ui/view/index.web.d.ts +2 -0
  120. package/lib/components/ui/view/index.web.js +7 -0
  121. package/lib/components/ui/view/index.web.js.map +1 -0
  122. package/lib/components/ui/virtualized-list/index.web.d.ts +19 -0
  123. package/lib/components/ui/virtualized-list/index.web.js +30 -0
  124. package/lib/components/ui/virtualized-list/index.web.js.map +1 -0
  125. package/lib/components/usePermissionAutoFetch.d.ts +7 -19
  126. package/lib/containers/layout/DrawerBottomNavigationConfig.d.ts +47 -47
  127. package/lib/containers/layout/DrawerConfig.d.ts +31 -31
  128. package/lib/redux/settings.d.ts +3 -9
  129. package/package.json +9 -5
  130. package/src/components/ui/accordion/index.web.tsx +294 -0
  131. package/src/components/ui/actionsheet/index.web.tsx +555 -0
  132. package/src/components/ui/alert/index.web.tsx +71 -0
  133. package/src/components/ui/alert-dialog/index.web.tsx +241 -0
  134. package/src/components/ui/avatar/index.web.tsx +150 -0
  135. package/src/components/ui/badge/index.web.tsx +188 -0
  136. package/src/components/ui/button/index.web.tsx +86 -0
  137. package/src/components/ui/checkbox/index.web.tsx +151 -0
  138. package/src/components/ui/divider/index.web.tsx +37 -0
  139. package/src/components/ui/drawer/index.web.tsx +144 -0
  140. package/src/components/ui/fab/index.web.tsx +201 -0
  141. package/src/components/ui/flat-list/index.web.tsx +89 -0
  142. package/src/components/ui/form-control/index.web.tsx +451 -0
  143. package/src/components/ui/image/index.web.tsx +43 -0
  144. package/src/components/ui/image-background/index.web.tsx +43 -0
  145. package/src/components/ui/input/index.web.tsx +80 -0
  146. package/src/components/ui/input-accessory-view/index.web.tsx +31 -0
  147. package/src/components/ui/keyboard-avoiding-view/index.web.tsx +23 -0
  148. package/src/components/ui/link/index.web.tsx +103 -0
  149. package/src/components/ui/menu/index.web.tsx +159 -0
  150. package/src/components/ui/modal/index.web.tsx +135 -0
  151. package/src/components/ui/popover/index.web.tsx +326 -0
  152. package/src/components/ui/portal/index.web.tsx +34 -0
  153. package/src/components/ui/pressable/index.web.tsx +73 -0
  154. package/src/components/ui/progress/index.web.tsx +123 -0
  155. package/src/components/ui/radio/index.web.tsx +130 -0
  156. package/src/components/ui/refresh-control/index.web.tsx +104 -0
  157. package/src/components/ui/safe-area-view/index.web.tsx +24 -0
  158. package/src/components/ui/scroll-view/index.web.tsx +142 -0
  159. package/src/components/ui/section-list/index.web.tsx +93 -0
  160. package/src/components/ui/select/index.web.tsx +83 -0
  161. package/src/components/ui/slider/index.web.tsx +283 -0
  162. package/src/components/ui/spinner/index.web.tsx +81 -0
  163. package/src/components/ui/status-bar/index.web.tsx +20 -0
  164. package/src/components/ui/switch/index.web.tsx +44 -0
  165. package/src/components/ui/tabs/index.web.tsx +205 -0
  166. package/src/components/ui/textarea/index.web.tsx +86 -0
  167. package/src/components/ui/toast/index.web.tsx +132 -0
  168. package/src/components/ui/tooltip/index.web.tsx +155 -0
  169. package/src/components/ui/view/index.web.tsx +15 -0
  170. package/src/components/ui/virtualized-list/index.web.tsx +84 -0
@@ -0,0 +1,225 @@
1
+ import React from 'react';
2
+ import type { VariantProps } from '@gluestack-ui/nativewind-utils';
3
+ declare const toastStyle: import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
4
+ variant: {
5
+ solid: string;
6
+ outline: string;
7
+ accent: string;
8
+ };
9
+ position: {
10
+ top: string;
11
+ 'top-right': string;
12
+ 'top-left': string;
13
+ bottom: string;
14
+ 'bottom-right': string;
15
+ 'bottom-left': string;
16
+ };
17
+ status: {
18
+ info: string;
19
+ success: string;
20
+ warning: string;
21
+ error: string;
22
+ };
23
+ } | ({
24
+ variant: {
25
+ solid: string;
26
+ outline: string;
27
+ accent: string;
28
+ };
29
+ position: {
30
+ top: string;
31
+ 'top-right': string;
32
+ 'top-left': string;
33
+ bottom: string;
34
+ 'bottom-right': string;
35
+ 'bottom-left': string;
36
+ };
37
+ status: {
38
+ info: string;
39
+ success: string;
40
+ warning: string;
41
+ error: string;
42
+ };
43
+ } & {
44
+ variant: {
45
+ solid: import("tailwind-merge").ClassNameValue | {
46
+ base?: import("tailwind-merge").ClassNameValue;
47
+ };
48
+ outline: import("tailwind-merge").ClassNameValue | {
49
+ base?: import("tailwind-merge").ClassNameValue;
50
+ };
51
+ accent: import("tailwind-merge").ClassNameValue | {
52
+ base?: import("tailwind-merge").ClassNameValue;
53
+ };
54
+ };
55
+ position: {
56
+ top: import("tailwind-merge").ClassNameValue | {
57
+ base?: import("tailwind-merge").ClassNameValue;
58
+ };
59
+ 'top-right': import("tailwind-merge").ClassNameValue | {
60
+ base?: import("tailwind-merge").ClassNameValue;
61
+ };
62
+ 'top-left': import("tailwind-merge").ClassNameValue | {
63
+ base?: import("tailwind-merge").ClassNameValue;
64
+ };
65
+ bottom: import("tailwind-merge").ClassNameValue | {
66
+ base?: import("tailwind-merge").ClassNameValue;
67
+ };
68
+ 'bottom-right': import("tailwind-merge").ClassNameValue | {
69
+ base?: import("tailwind-merge").ClassNameValue;
70
+ };
71
+ 'bottom-left': import("tailwind-merge").ClassNameValue | {
72
+ base?: import("tailwind-merge").ClassNameValue;
73
+ };
74
+ };
75
+ status: {
76
+ info: import("tailwind-merge").ClassNameValue | {
77
+ base?: import("tailwind-merge").ClassNameValue;
78
+ };
79
+ success: import("tailwind-merge").ClassNameValue | {
80
+ base?: import("tailwind-merge").ClassNameValue;
81
+ };
82
+ warning: import("tailwind-merge").ClassNameValue | {
83
+ base?: import("tailwind-merge").ClassNameValue;
84
+ };
85
+ error: import("tailwind-merge").ClassNameValue | {
86
+ base?: import("tailwind-merge").ClassNameValue;
87
+ };
88
+ };
89
+ }), undefined, "fixed flex items-center p-4 mb-4 rounded-lg shadow-lg transition-all duration-300 ease-in-out", import("tailwind-variants/dist/config").TVConfig<{
90
+ variant: {
91
+ solid: string;
92
+ outline: string;
93
+ accent: string;
94
+ };
95
+ position: {
96
+ top: string;
97
+ 'top-right': string;
98
+ 'top-left': string;
99
+ bottom: string;
100
+ 'bottom-right': string;
101
+ 'bottom-left': string;
102
+ };
103
+ status: {
104
+ info: string;
105
+ success: string;
106
+ warning: string;
107
+ error: string;
108
+ };
109
+ }, {
110
+ variant: {
111
+ solid: string;
112
+ outline: string;
113
+ accent: string;
114
+ };
115
+ position: {
116
+ top: string;
117
+ 'top-right': string;
118
+ 'top-left': string;
119
+ bottom: string;
120
+ 'bottom-right': string;
121
+ 'bottom-left': string;
122
+ };
123
+ status: {
124
+ info: string;
125
+ success: string;
126
+ warning: string;
127
+ error: string;
128
+ };
129
+ }>, {
130
+ variant: {
131
+ solid: string;
132
+ outline: string;
133
+ accent: string;
134
+ };
135
+ position: {
136
+ top: string;
137
+ 'top-right': string;
138
+ 'top-left': string;
139
+ bottom: string;
140
+ 'bottom-right': string;
141
+ 'bottom-left': string;
142
+ };
143
+ status: {
144
+ info: string;
145
+ success: string;
146
+ warning: string;
147
+ error: string;
148
+ };
149
+ }, undefined, import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
150
+ variant: {
151
+ solid: string;
152
+ outline: string;
153
+ accent: string;
154
+ };
155
+ position: {
156
+ top: string;
157
+ 'top-right': string;
158
+ 'top-left': string;
159
+ bottom: string;
160
+ 'bottom-right': string;
161
+ 'bottom-left': string;
162
+ };
163
+ status: {
164
+ info: string;
165
+ success: string;
166
+ warning: string;
167
+ error: string;
168
+ };
169
+ }, undefined, "fixed flex items-center p-4 mb-4 rounded-lg shadow-lg transition-all duration-300 ease-in-out", import("tailwind-variants/dist/config").TVConfig<{
170
+ variant: {
171
+ solid: string;
172
+ outline: string;
173
+ accent: string;
174
+ };
175
+ position: {
176
+ top: string;
177
+ 'top-right': string;
178
+ 'top-left': string;
179
+ bottom: string;
180
+ 'bottom-right': string;
181
+ 'bottom-left': string;
182
+ };
183
+ status: {
184
+ info: string;
185
+ success: string;
186
+ warning: string;
187
+ error: string;
188
+ };
189
+ }, {
190
+ variant: {
191
+ solid: string;
192
+ outline: string;
193
+ accent: string;
194
+ };
195
+ position: {
196
+ top: string;
197
+ 'top-right': string;
198
+ 'top-left': string;
199
+ bottom: string;
200
+ 'bottom-right': string;
201
+ 'bottom-left': string;
202
+ };
203
+ status: {
204
+ info: string;
205
+ success: string;
206
+ warning: string;
207
+ error: string;
208
+ };
209
+ }>, unknown, unknown, undefined>>;
210
+ export declare const ToastTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
211
+ export declare const ToastDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
212
+ type IToastProps = {
213
+ id?: string;
214
+ title?: string;
215
+ description?: string;
216
+ duration?: number;
217
+ onClose?: () => void;
218
+ isOpen?: boolean;
219
+ className?: string;
220
+ variant?: VariantProps<typeof toastStyle>['variant'];
221
+ position?: VariantProps<typeof toastStyle>['position'];
222
+ status?: VariantProps<typeof toastStyle>['status'];
223
+ };
224
+ declare const Toast: React.ForwardRefExoticComponent<IToastProps & React.RefAttributes<HTMLDivElement>>;
225
+ export { Toast };
@@ -0,0 +1,80 @@
1
+ 'use client';
2
+ import React, { forwardRef, useEffect, useState } from 'react';
3
+ import { tva } from '@gluestack-ui/nativewind-utils/tva';
4
+ import { createPortal } from 'react-dom';
5
+ const SCOPE = 'TOAST';
6
+ const toastStyle = tva({
7
+ base: 'fixed flex items-center p-4 mb-4 rounded-lg shadow-lg transition-all duration-300 ease-in-out',
8
+ variants: {
9
+ variant: {
10
+ solid: 'bg-gray-800 text-white',
11
+ outline: 'bg-white border border-gray-300',
12
+ accent: 'border-l-4 border-blue-500 bg-white',
13
+ },
14
+ position: {
15
+ top: 'top-4 left-1/2 -translate-x-1/2',
16
+ 'top-right': 'top-4 right-4',
17
+ 'top-left': 'top-4 left-4',
18
+ bottom: 'bottom-4 left-1/2 -translate-x-1/2',
19
+ 'bottom-right': 'bottom-4 right-4',
20
+ 'bottom-left': 'bottom-4 left-4',
21
+ },
22
+ status: {
23
+ info: 'bg-blue-500 text-white',
24
+ success: 'bg-green-500 text-white',
25
+ warning: 'bg-yellow-500 text-white',
26
+ error: 'bg-red-500 text-white',
27
+ },
28
+ },
29
+ defaultVariants: {
30
+ variant: 'solid',
31
+ position: 'bottom',
32
+ status: 'info',
33
+ },
34
+ });
35
+ export const ToastTitle = forwardRef(({ className, ...props }, ref) => (React.createElement("div", { ref: ref, className: `font-semibold ${className || ''}`, ...props })));
36
+ ToastTitle.displayName = 'ToastTitle';
37
+ export const ToastDescription = forwardRef(({ className, ...props }, ref) => React.createElement("div", { ref: ref, className: `mt-1 ${className || ''}`, ...props }));
38
+ ToastDescription.displayName = 'ToastDescription';
39
+ const Toast = forwardRef(({ id, title, description, duration = 5000, onClose, isOpen, className, variant, position, status, ...props }, ref) => {
40
+ const [isVisible, setIsVisible] = useState(isOpen);
41
+ const [isExiting, setIsExiting] = useState(false);
42
+ useEffect(() => {
43
+ setIsVisible(isOpen);
44
+ if (isOpen) {
45
+ const timer = setTimeout(() => {
46
+ setIsExiting(true);
47
+ setTimeout(() => {
48
+ setIsVisible(false);
49
+ setIsExiting(false);
50
+ if (onClose)
51
+ onClose();
52
+ }, 300);
53
+ }, duration);
54
+ return () => clearTimeout(timer);
55
+ }
56
+ }, [isOpen, duration, onClose]);
57
+ if (!isVisible)
58
+ return null;
59
+ return createPortal(React.createElement("div", { ref: ref, role: "alert", "aria-live": "polite", className: toastStyle({
60
+ variant,
61
+ position,
62
+ status,
63
+ class: `${className || ''} ${isExiting ? 'opacity-0' : 'opacity-100'}`,
64
+ }), ...props },
65
+ React.createElement("div", null,
66
+ title && React.createElement(ToastTitle, null, title),
67
+ description && React.createElement(ToastDescription, null, description)),
68
+ React.createElement("button", { onClick: () => {
69
+ setIsExiting(true);
70
+ setTimeout(() => {
71
+ setIsVisible(false);
72
+ setIsExiting(false);
73
+ if (onClose)
74
+ onClose();
75
+ }, 300);
76
+ }, className: "ml-4 text-current opacity-70 hover:opacity-100", "aria-label": "Close toast" }, "\u00D7")), document.body);
77
+ });
78
+ Toast.displayName = 'Toast';
79
+ export { Toast };
80
+ //# sourceMappingURL=index.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../../../src/components/ui/toast/index.web.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAIzD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,KAAK,GAAG,OAAO,CAAC;AAEtB,MAAM,UAAU,GAAG,GAAG,CAAC;IACnB,IAAI,EAAE,+FAA+F;IACrG,QAAQ,EAAE;QACN,OAAO,EAAE;YACL,KAAK,EAAE,wBAAwB;YAC/B,OAA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IAAI,CAAC,CAAC;gBACnB,UAAU,CAAC,GAAG,EAAE;oBACZ,YAAY,CAAC,KAAK,CAAC,CAAC;oBACpB,YAAY,CAAC,KAAK,CAAC,CAAC;oBACpB,IAAI,OAAO;wBAAE,OAAO,EAAE,CAAC;gBAC3B,CAAC,EAAE,GAAG,CAAC,CAAC;YACZ,CAAC,EACD,SAAS,EAAC,gDAAgD,gBAC/C,aAAa,aAGnB,CACP,EACN,QAAQ,CAAC,IAAI,CAChB,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,86 @@
1
+ import React from 'react';
2
+ import type { VariantProps } from '@gluestack-ui/nativewind-utils';
3
+ declare const tooltipStyle: import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
4
+ placement: {
5
+ top: string;
6
+ bottom: string;
7
+ left: string;
8
+ right: string;
9
+ };
10
+ } | ({
11
+ placement: {
12
+ top: string;
13
+ bottom: string;
14
+ left: string;
15
+ right: string;
16
+ };
17
+ } & {
18
+ placement: {
19
+ top: import("tailwind-merge").ClassNameValue | {
20
+ base?: import("tailwind-merge").ClassNameValue;
21
+ };
22
+ bottom: import("tailwind-merge").ClassNameValue | {
23
+ base?: import("tailwind-merge").ClassNameValue;
24
+ };
25
+ left: import("tailwind-merge").ClassNameValue | {
26
+ base?: import("tailwind-merge").ClassNameValue;
27
+ };
28
+ right: import("tailwind-merge").ClassNameValue | {
29
+ base?: import("tailwind-merge").ClassNameValue;
30
+ };
31
+ };
32
+ }), undefined, "absolute z-50 px-3 py-2 text-sm text-white bg-gray-900 rounded-md shadow-sm max-w-xs", import("tailwind-variants/dist/config").TVConfig<{
33
+ placement: {
34
+ top: string;
35
+ bottom: string;
36
+ left: string;
37
+ right: string;
38
+ };
39
+ }, {
40
+ placement: {
41
+ top: string;
42
+ bottom: string;
43
+ left: string;
44
+ right: string;
45
+ };
46
+ }>, {
47
+ placement: {
48
+ top: string;
49
+ bottom: string;
50
+ left: string;
51
+ right: string;
52
+ };
53
+ }, undefined, import("@gluestack-ui/nativewind-utils/types").TVReturnType<{
54
+ placement: {
55
+ top: string;
56
+ bottom: string;
57
+ left: string;
58
+ right: string;
59
+ };
60
+ }, undefined, "absolute z-50 px-3 py-2 text-sm text-white bg-gray-900 rounded-md shadow-sm max-w-xs", import("tailwind-variants/dist/config").TVConfig<{
61
+ placement: {
62
+ top: string;
63
+ bottom: string;
64
+ left: string;
65
+ right: string;
66
+ };
67
+ }, {
68
+ placement: {
69
+ top: string;
70
+ bottom: string;
71
+ left: string;
72
+ right: string;
73
+ };
74
+ }>, unknown, unknown, undefined>>;
75
+ type ITooltipProps = {
76
+ label: string;
77
+ children: React.ReactElement;
78
+ placement?: VariantProps<typeof tooltipStyle>['placement'];
79
+ className?: string;
80
+ delay?: number;
81
+ isOpen?: boolean;
82
+ onOpen?: () => void;
83
+ onClose?: () => void;
84
+ };
85
+ declare const Tooltip: React.ForwardRefExoticComponent<ITooltipProps & React.RefAttributes<HTMLDivElement>>;
86
+ export { Tooltip };
@@ -0,0 +1,110 @@
1
+ 'use client';
2
+ import React, { forwardRef, useEffect, useRef, useState } from 'react';
3
+ import { tva } from '@gluestack-ui/nativewind-utils/tva';
4
+ import { createPortal } from 'react-dom';
5
+ const SCOPE = 'TOOLTIP';
6
+ const tooltipStyle = tva({
7
+ base: 'absolute z-50 px-3 py-2 text-sm text-white bg-gray-900 rounded-md shadow-sm max-w-xs',
8
+ variants: {
9
+ placement: {
10
+ top: 'bottom-full mb-2',
11
+ bottom: 'top-full mt-2',
12
+ left: 'right-full mr-2',
13
+ right: 'left-full ml-2',
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ placement: 'top',
18
+ },
19
+ });
20
+ const Tooltip = forwardRef(({ label, children, placement, className, delay = 0, isOpen: controlledIsOpen, onOpen, onClose, ...props }, ref) => {
21
+ const [isOpen, setIsOpen] = useState(controlledIsOpen || false);
22
+ const [position, setPosition] = useState({ top: 0, left: 0 });
23
+ const triggerRef = useRef(null);
24
+ const tooltipRef = useRef(null);
25
+ const timeoutRef = useRef();
26
+ const updatePosition = () => {
27
+ if (triggerRef.current && tooltipRef.current) {
28
+ const triggerRect = triggerRef.current.getBoundingClientRect();
29
+ const tooltipRect = tooltipRef.current.getBoundingClientRect();
30
+ let top = 0;
31
+ let left = 0;
32
+ switch (placement) {
33
+ case 'top':
34
+ top = triggerRect.top - tooltipRect.height - 8;
35
+ left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
36
+ break;
37
+ case 'bottom':
38
+ top = triggerRect.bottom + 8;
39
+ left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
40
+ break;
41
+ case 'left':
42
+ top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2;
43
+ left = triggerRect.left - tooltipRect.width - 8;
44
+ break;
45
+ case 'right':
46
+ top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2;
47
+ left = triggerRect.right + 8;
48
+ break;
49
+ }
50
+ setPosition({ top, left });
51
+ }
52
+ };
53
+ const handleOpen = () => {
54
+ if (delay) {
55
+ timeoutRef.current = setTimeout(() => {
56
+ setIsOpen(true);
57
+ if (onOpen)
58
+ onOpen();
59
+ }, delay);
60
+ }
61
+ else {
62
+ setIsOpen(true);
63
+ if (onOpen)
64
+ onOpen();
65
+ }
66
+ };
67
+ const handleClose = () => {
68
+ if (timeoutRef.current) {
69
+ clearTimeout(timeoutRef.current);
70
+ }
71
+ setIsOpen(false);
72
+ if (onClose)
73
+ onClose();
74
+ };
75
+ useEffect(() => {
76
+ if (controlledIsOpen !== undefined) {
77
+ setIsOpen(controlledIsOpen);
78
+ }
79
+ }, [controlledIsOpen]);
80
+ useEffect(() => {
81
+ if (isOpen) {
82
+ updatePosition();
83
+ window.addEventListener('scroll', updatePosition);
84
+ window.addEventListener('resize', updatePosition);
85
+ }
86
+ return () => {
87
+ window.removeEventListener('scroll', updatePosition);
88
+ window.removeEventListener('resize', updatePosition);
89
+ };
90
+ }, [isOpen]);
91
+ const trigger = React.cloneElement(children, {
92
+ ref: triggerRef,
93
+ onMouseEnter: handleOpen,
94
+ onMouseLeave: handleClose,
95
+ onFocus: handleOpen,
96
+ onBlur: handleClose,
97
+ 'aria-describedby': isOpen ? 'tooltip' : undefined,
98
+ });
99
+ return (React.createElement(React.Fragment, null,
100
+ trigger,
101
+ isOpen &&
102
+ createPortal(React.createElement("div", { ref: tooltipRef, id: "tooltip", role: "tooltip", className: tooltipStyle({ placement, class: className }), style: {
103
+ position: 'fixed',
104
+ top: `${position.top}px`,
105
+ left: `${position.left}px`,
106
+ }, ...props }, label), document.body)));
107
+ });
108
+ Tooltip.displayName = 'Tooltip';
109
+ export { Tooltip };
110
+ //# sourceMappingURL=index.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/index.web.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAIzD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,KAAK,GAAG,SAAS,CAAC;AAExB,MAAM,YAAY,GAAG,GAAG,CAAC;IACrB,IAAI,EAAE,sFAAsF;IAC5F,QAAQ,EAAE;QACN,SAAS,EAAE;YACP,GAAG,EAAE,kBAAkB;YACvB,MAAM,EAAE,eAAe;YACvB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,gBAAgB;SAC1B;KACJ;IACD,eAAe,EAAE;QACb,SAAS,EAAE,KAAK;KACnB;CACJ,CAAC,CAAC;AAaH,MAAM,OAAO,GAAG,UAAU,CACtB,CACI,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK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CACN,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const View: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,7 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ export const View = React.forwardRef(({ children, style, ...props }, ref) => {
4
+ return (React.createElement("div", { ref: ref, style: style, ...props }, children));
5
+ });
6
+ View.displayName = 'View';
7
+ //# sourceMappingURL=index.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../../../src/components/ui/view/index.web.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAChC,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACnC,OAAO,CACH,6BAAK,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK,IACjC,QAAQ,CACP,CACT,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { FixedSizeList } from 'react-window';
3
+ interface VirtualizedListProps<T> {
4
+ data: ReadonlyArray<T>;
5
+ renderItem: ({ item, index }: {
6
+ item: T;
7
+ index: number;
8
+ }) => React.ReactElement;
9
+ itemSize: number;
10
+ horizontal?: boolean;
11
+ className?: string;
12
+ height: number;
13
+ width: number;
14
+ overscanCount?: number;
15
+ }
16
+ declare const VirtualizedList: <T>(props: VirtualizedListProps<T> & {
17
+ ref?: React.Ref<FixedSizeList>;
18
+ }) => React.ReactElement;
19
+ export { VirtualizedList };
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ import { FixedSizeList } from 'react-window';
4
+ import { tva } from '@gluestack-ui/nativewind-utils/tva';
5
+ const virtualizedListStyle = tva({
6
+ base: 'overflow-auto',
7
+ variants: {
8
+ horizontal: {
9
+ true: 'flex-row',
10
+ false: 'flex-col',
11
+ },
12
+ },
13
+ defaultVariants: {
14
+ horizontal: false,
15
+ },
16
+ });
17
+ function VirtualizedListComponent({ data, renderItem, itemSize, horizontal = false, className, height, width, overscanCount = 2, ...props }, ref) {
18
+ const itemData = {
19
+ data,
20
+ renderItem,
21
+ };
22
+ const Row = ({ index, style }) => {
23
+ const item = data[index];
24
+ return React.createElement("div", { style: style }, renderItem({ item, index }));
25
+ };
26
+ return (React.createElement(FixedSizeList, { outerRef: ref, className: virtualizedListStyle({ horizontal, class: className }), height: height, width: width, itemCount: data.length, itemSize: itemSize, layout: horizontal ? 'horizontal' : 'vertical', overscanCount: overscanCount, itemData: itemData, ...props }, Row));
27
+ }
28
+ const VirtualizedList = React.forwardRef(VirtualizedListComponent);
29
+ export { VirtualizedList };
30
+ //# sourceMappingURL=index.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../../../src/components/ui/virtualized-list/index.web.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,aAAa,EAA2B,MAAM,cAAc,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAKzD,MAAM,oBAAoB,GAAG,GAAG,CAAC;IAC7B,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE;QACN,UAAU,EAAE;YACR,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,UAAU;SACpB;KACJ;IACD,eAAe,EAAE;QACb,UAAU,EAAE,KAAK;KACpB;CACJ,CAAC,CAAC;AAkBH,SAAS,wBAAwB,CAC7B,EACI,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,SAAS,EACT,MAAM,EACN,KAAK,EACL,aAAa,GAAG,CAAC,EACjB,GAAG,KAAK,EACc,EAC1B,GAA6B;IAE7B,MAAM,QAAQ,GAAgB;QAC1B,IAAI;QACJ,UAAU;KACb,CAAC;IAEF,MAAM,GAAG,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAA2B,EAAE,EAAE;QACtD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,OAAO,6BAAK,KAAK,EAAE,KAAK,IAAG,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAO,CAAC;IAClE,CAAC,CAAC;IAEF,OAAO,CACH,oBAAC,aAAa,IACV,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,oBAAoB,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EACjE,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAI,CAAC,MAAM,EACtB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,EAC9C,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,KACd,KAAK,IAER,GAAG,CACQ,CACnB,CAAC;AACN,CAAC;AAED,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAC,wBAAwB,CAE1C,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -24,22 +24,16 @@ export declare const usePermissionAutoFetch: (options?: userPermissionAutoFetchP
24
24
  called: boolean;
25
25
  startPolling: (pollInterval: number) => void;
26
26
  stopPolling: () => void;
27
- subscribeToMore: <TSubscriptionData = import("common").IResolveConfigurationQuery, TSubscriptionVariables extends import("@apollo/client").OperationVariables = import("common").Exact<{
27
+ subscribeToMore: import("@apollo/client").SubscribeToMoreFunction<import("common").IResolveConfigurationQuery, import("common").Exact<{
28
28
  input: import("common").IPreferencesInputInput;
29
29
  key?: import("common").InputMaybe<import("common").Scalars["String"]["input"]>;
30
30
  overrides?: import("common").InputMaybe<import("common").IConfigurationOverridesInput>;
31
- }>>(options: import("@apollo/client").SubscribeToMoreOptions<import("common").IResolveConfigurationQuery, TSubscriptionVariables, TSubscriptionData>) => () => void;
32
- updateQuery: <TVars extends import("@apollo/client").OperationVariables = import("common").Exact<{
31
+ }>>;
32
+ updateQuery: (mapFn: import("@apollo/client").UpdateQueryMapFn<import("common").IResolveConfigurationQuery, import("common").Exact<{
33
33
  input: import("common").IPreferencesInputInput;
34
34
  key?: import("common").InputMaybe<import("common").Scalars["String"]["input"]>;
35
35
  overrides?: import("common").InputMaybe<import("common").IConfigurationOverridesInput>;
36
- }>>(mapFn: (previousQueryResult: {
37
- __typename?: "Query";
38
- resolveConfiguration?: any | null;
39
- }, options: Pick<import("@apollo/client").WatchQueryOptions<TVars, import("common").IResolveConfigurationQuery>, "variables">) => {
40
- __typename?: "Query";
41
- resolveConfiguration?: any | null;
42
- }) => void;
36
+ }>>) => void;
43
37
  refetch: (variables?: Partial<import("common").Exact<{
44
38
  input: import("common").IPreferencesInputInput;
45
39
  key?: import("common").InputMaybe<import("common").Scalars["String"]["input"]>;
@@ -60,16 +54,10 @@ export declare const usePermissionAutoFetch: (options?: userPermissionAutoFetchP
60
54
  key?: import("common").InputMaybe<import("common").Scalars["String"]["input"]>;
61
55
  overrides?: import("common").InputMaybe<import("common").IConfigurationOverridesInput>;
62
56
  }>>(fetchMoreOptions: import("@apollo/client").FetchMoreQueryOptions<TFetchVars, TFetchData> & {
63
- updateQuery?: (previousQueryResult: {
64
- __typename?: "Query";
65
- resolveConfiguration?: any | null;
66
- }, options: {
57
+ updateQuery?: (previousQueryResult: import("common").IResolveConfigurationQuery, options: {
67
58
  fetchMoreResult: import("@apollo/client").Unmasked<TFetchData>;
68
59
  variables: TFetchVars;
69
- }) => {
70
- __typename?: "Query";
71
- resolveConfiguration?: any | null;
72
- };
73
- }) => Promise<import("@apollo/client").ApolloQueryResult<import("@apollo/client").MaybeMasked<TFetchData>>>;
60
+ }) => import("common").IResolveConfigurationQuery;
61
+ }) => Promise<import("@apollo/client").ApolloQueryResult<TFetchData>>;
74
62
  };
75
63
  export {};