@fayz-ai/ui 0.8.0 → 0.8.2
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.
- package/dist/{chunk-7PTRAWHO.cjs → chunk-IEYCOJTY.cjs} +213 -2
- package/dist/chunk-IEYCOJTY.cjs.map +1 -0
- package/dist/{chunk-OTUH4K4B.js → chunk-J3IUFUNR.js} +213 -3
- package/dist/chunk-J3IUFUNR.js.map +1 -0
- package/dist/{chunk-COC5DDFG.js → chunk-MZZMZYSE.js} +5 -4
- package/dist/chunk-MZZMZYSE.js.map +1 -0
- package/dist/{chunk-HG5RH3B3.cjs → chunk-XAOGMWLC.cjs} +4 -3
- package/dist/chunk-XAOGMWLC.cjs.map +1 -0
- package/dist/index.cjs +76 -72
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/layout/Topbar.d.ts.map +1 -1
- package/dist/layout/index.cjs +19 -19
- package/dist/layout/index.js +1 -1
- package/dist/primitives/SearchCombobox.d.ts +38 -0
- package/dist/primitives/SearchCombobox.d.ts.map +1 -0
- package/dist/primitives/index.cjs +56 -52
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +1 -1
- package/package.json +3 -3
- package/src/index.ts +2 -0
- package/src/layout/Topbar.tsx +2 -1
- package/src/primitives/SearchCombobox.tsx +216 -0
- package/src/primitives/index.ts +1 -0
- package/dist/chunk-7PTRAWHO.cjs.map +0 -1
- package/dist/chunk-COC5DDFG.js.map +0 -1
- package/dist/chunk-HG5RH3B3.cjs.map +0 -1
- package/dist/chunk-OTUH4K4B.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkIEYCOJTY_cjs = require('../chunk-IEYCOJTY.cjs');
|
|
4
4
|
var chunkOW73RZOU_cjs = require('../chunk-OW73RZOU.cjs');
|
|
5
5
|
var chunkODY3GZ3Y_cjs = require('../chunk-ODY3GZ3Y.cjs');
|
|
6
6
|
var chunkH6OULCHF_cjs = require('../chunk-H6OULCHF.cjs');
|
|
@@ -9,207 +9,211 @@ var chunkH6OULCHF_cjs = require('../chunk-H6OULCHF.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "Badge", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkIEYCOJTY_cjs.Badge; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "Breadcrumb", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkIEYCOJTY_cjs.Breadcrumb; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "Checkbox", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkIEYCOJTY_cjs.Checkbox; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "ConfirmDialog", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkIEYCOJTY_cjs.ConfirmDialog; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "CurrencyInput", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkIEYCOJTY_cjs.CurrencyInput; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "DatePicker", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkIEYCOJTY_cjs.DatePicker; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "Input", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkIEYCOJTY_cjs.Input; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "ListView", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkIEYCOJTY_cjs.ListView; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "Markdown", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkIEYCOJTY_cjs.Markdown; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "MarkdownEditor", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkIEYCOJTY_cjs.MarkdownEditor; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "Modal", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkIEYCOJTY_cjs.Modal; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "ModalBody", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkIEYCOJTY_cjs.ModalBody; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "ModalClose", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkIEYCOJTY_cjs.ModalClose; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "ModalContent", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkIEYCOJTY_cjs.ModalContent; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "ModalDescription", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkIEYCOJTY_cjs.ModalDescription; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "ModalFooter", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkIEYCOJTY_cjs.ModalFooter; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "ModalHeader", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkIEYCOJTY_cjs.ModalHeader; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "ModalOverlay", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkIEYCOJTY_cjs.ModalOverlay; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "ModalPortal", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkIEYCOJTY_cjs.ModalPortal; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "ModalTitle", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkIEYCOJTY_cjs.ModalTitle; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "ModalTrigger", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkIEYCOJTY_cjs.ModalTrigger; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "Popover", {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkIEYCOJTY_cjs.Popover; }
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(exports, "PopoverContent", {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkIEYCOJTY_cjs.PopoverContent; }
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "PopoverTrigger", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkIEYCOJTY_cjs.PopoverTrigger; }
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "SearchCombobox", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function () { return chunkIEYCOJTY_cjs.SearchCombobox; }
|
|
105
109
|
});
|
|
106
110
|
Object.defineProperty(exports, "SearchSelect", {
|
|
107
111
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkIEYCOJTY_cjs.SearchSelect; }
|
|
109
113
|
});
|
|
110
114
|
Object.defineProperty(exports, "Select", {
|
|
111
115
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkIEYCOJTY_cjs.Select; }
|
|
113
117
|
});
|
|
114
118
|
Object.defineProperty(exports, "SelectContent", {
|
|
115
119
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkIEYCOJTY_cjs.SelectContent; }
|
|
117
121
|
});
|
|
118
122
|
Object.defineProperty(exports, "SelectGroup", {
|
|
119
123
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkIEYCOJTY_cjs.SelectGroup; }
|
|
121
125
|
});
|
|
122
126
|
Object.defineProperty(exports, "SelectItem", {
|
|
123
127
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkIEYCOJTY_cjs.SelectItem; }
|
|
125
129
|
});
|
|
126
130
|
Object.defineProperty(exports, "SelectLabel", {
|
|
127
131
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkIEYCOJTY_cjs.SelectLabel; }
|
|
129
133
|
});
|
|
130
134
|
Object.defineProperty(exports, "SelectScrollDownButton", {
|
|
131
135
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkIEYCOJTY_cjs.SelectScrollDownButton; }
|
|
133
137
|
});
|
|
134
138
|
Object.defineProperty(exports, "SelectScrollUpButton", {
|
|
135
139
|
enumerable: true,
|
|
136
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkIEYCOJTY_cjs.SelectScrollUpButton; }
|
|
137
141
|
});
|
|
138
142
|
Object.defineProperty(exports, "SelectSeparator", {
|
|
139
143
|
enumerable: true,
|
|
140
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkIEYCOJTY_cjs.SelectSeparator; }
|
|
141
145
|
});
|
|
142
146
|
Object.defineProperty(exports, "SelectTrigger", {
|
|
143
147
|
enumerable: true,
|
|
144
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkIEYCOJTY_cjs.SelectTrigger; }
|
|
145
149
|
});
|
|
146
150
|
Object.defineProperty(exports, "SelectValue", {
|
|
147
151
|
enumerable: true,
|
|
148
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkIEYCOJTY_cjs.SelectValue; }
|
|
149
153
|
});
|
|
150
154
|
Object.defineProperty(exports, "Separator", {
|
|
151
155
|
enumerable: true,
|
|
152
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkIEYCOJTY_cjs.Separator; }
|
|
153
157
|
});
|
|
154
158
|
Object.defineProperty(exports, "Skeleton", {
|
|
155
159
|
enumerable: true,
|
|
156
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkIEYCOJTY_cjs.Skeleton; }
|
|
157
161
|
});
|
|
158
162
|
Object.defineProperty(exports, "TableSkeleton", {
|
|
159
163
|
enumerable: true,
|
|
160
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkIEYCOJTY_cjs.TableSkeleton; }
|
|
161
165
|
});
|
|
162
166
|
Object.defineProperty(exports, "Tabs", {
|
|
163
167
|
enumerable: true,
|
|
164
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkIEYCOJTY_cjs.Tabs; }
|
|
165
169
|
});
|
|
166
170
|
Object.defineProperty(exports, "TabsContent", {
|
|
167
171
|
enumerable: true,
|
|
168
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkIEYCOJTY_cjs.TabsContent; }
|
|
169
173
|
});
|
|
170
174
|
Object.defineProperty(exports, "TabsList", {
|
|
171
175
|
enumerable: true,
|
|
172
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkIEYCOJTY_cjs.TabsList; }
|
|
173
177
|
});
|
|
174
178
|
Object.defineProperty(exports, "TabsTrigger", {
|
|
175
179
|
enumerable: true,
|
|
176
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkIEYCOJTY_cjs.TabsTrigger; }
|
|
177
181
|
});
|
|
178
182
|
Object.defineProperty(exports, "TimePicker", {
|
|
179
183
|
enumerable: true,
|
|
180
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkIEYCOJTY_cjs.TimePicker; }
|
|
181
185
|
});
|
|
182
186
|
Object.defineProperty(exports, "ToastProvider", {
|
|
183
187
|
enumerable: true,
|
|
184
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkIEYCOJTY_cjs.ToastProvider; }
|
|
185
189
|
});
|
|
186
190
|
Object.defineProperty(exports, "Tooltip", {
|
|
187
191
|
enumerable: true,
|
|
188
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkIEYCOJTY_cjs.Tooltip; }
|
|
189
193
|
});
|
|
190
194
|
Object.defineProperty(exports, "TooltipContent", {
|
|
191
195
|
enumerable: true,
|
|
192
|
-
get: function () { return
|
|
196
|
+
get: function () { return chunkIEYCOJTY_cjs.TooltipContent; }
|
|
193
197
|
});
|
|
194
198
|
Object.defineProperty(exports, "TooltipProvider", {
|
|
195
199
|
enumerable: true,
|
|
196
|
-
get: function () { return
|
|
200
|
+
get: function () { return chunkIEYCOJTY_cjs.TooltipProvider; }
|
|
197
201
|
});
|
|
198
202
|
Object.defineProperty(exports, "TooltipTrigger", {
|
|
199
203
|
enumerable: true,
|
|
200
|
-
get: function () { return
|
|
204
|
+
get: function () { return chunkIEYCOJTY_cjs.TooltipTrigger; }
|
|
201
205
|
});
|
|
202
206
|
Object.defineProperty(exports, "badgeVariants", {
|
|
203
207
|
enumerable: true,
|
|
204
|
-
get: function () { return
|
|
208
|
+
get: function () { return chunkIEYCOJTY_cjs.badgeVariants; }
|
|
205
209
|
});
|
|
206
210
|
Object.defineProperty(exports, "renderMarkdown", {
|
|
207
211
|
enumerable: true,
|
|
208
|
-
get: function () { return
|
|
212
|
+
get: function () { return chunkIEYCOJTY_cjs.renderMarkdown; }
|
|
209
213
|
});
|
|
210
214
|
Object.defineProperty(exports, "toast", {
|
|
211
215
|
enumerable: true,
|
|
212
|
-
get: function () { return
|
|
216
|
+
get: function () { return chunkIEYCOJTY_cjs.toast; }
|
|
213
217
|
});
|
|
214
218
|
Object.defineProperty(exports, "Sheet", {
|
|
215
219
|
enumerable: true,
|
|
@@ -24,4 +24,5 @@ export { Popover, PopoverTrigger, PopoverContent } from './popover';
|
|
|
24
24
|
export { SegmentedControl, type SegmentedControlProps, type SegmentedOption } from './segmented-control';
|
|
25
25
|
export { Markdown, renderMarkdown, type MarkdownProps } from './markdown';
|
|
26
26
|
export { MarkdownEditor, type MarkdownEditorProps } from './markdown-editor';
|
|
27
|
+
export { SearchCombobox, type ComboboxOption } from './SearchCombobox';
|
|
27
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACnE,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAC/D,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,GACZ,MAAM,QAAQ,CAAA;AACf,OAAO,EACL,KAAK,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,KAAK,SAAS,GACf,MAAM,SAAS,CAAA;AAChB,OAAO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AE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AACnE,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACxG,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzE,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/primitives/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Badge, Breadcrumb, Checkbox, ConfirmDialog, CurrencyInput, DatePicker, Input, ListView, Markdown, MarkdownEditor, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, Popover, PopoverContent, PopoverTrigger, SearchSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TimePicker, ToastProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, renderMarkdown, toast } from '../chunk-
|
|
1
|
+
export { Badge, Breadcrumb, Checkbox, ConfirmDialog, CurrencyInput, DatePicker, Input, ListView, Markdown, MarkdownEditor, Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalOverlay, ModalPortal, ModalTitle, ModalTrigger, Popover, PopoverContent, PopoverTrigger, SearchCombobox, SearchSelect, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Skeleton, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TimePicker, ToastProvider, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, renderMarkdown, toast } from '../chunk-J3IUFUNR.js';
|
|
2
2
|
export { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger } from '../chunk-75EFDLST.js';
|
|
3
3
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, DataTable, Dropdown, DropdownCheckboxItem, DropdownContent, DropdownGroup, DropdownItem, DropdownLabel, DropdownPortal, DropdownRadioGroup, DropdownRadioItem, DropdownSeparator, DropdownShortcut, DropdownSub, DropdownSubContent, DropdownSubTrigger, DropdownTrigger, SegmentedControl } from '../chunk-FY7OZNKU.js';
|
|
4
4
|
export { Button, buttonVariants } from '../chunk-YRVE4FOD.js';
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"fayz": {
|
|
4
4
|
"status": "beta"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.8.
|
|
6
|
+
"version": "0.8.2",
|
|
7
7
|
"description": "Fayz SDK UI — Radix + Tailwind component library with CRUD engine and layout shells",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./dist/index.cjs",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"sonner": "^1.5.0",
|
|
85
85
|
"tailwind-merge": "^2.4.0",
|
|
86
86
|
"zustand": "^4.5.0",
|
|
87
|
-
"@fayz-ai/core": "^0.8.
|
|
88
|
-
"@fayz-ai/auth": "^0.8.
|
|
87
|
+
"@fayz-ai/core": "^0.8.1",
|
|
88
|
+
"@fayz-ai/auth": "^0.8.1"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@types/react": "^18.3.0",
|
package/src/index.ts
CHANGED
package/src/layout/Topbar.tsx
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
Activity,
|
|
17
17
|
BarChart3,
|
|
18
18
|
Clapperboard,
|
|
19
|
+
Newspaper,
|
|
19
20
|
FileText,
|
|
20
21
|
Mail,
|
|
21
22
|
DollarSign,
|
|
@@ -207,7 +208,7 @@ export const ICON_MAP: Record<string, LucideIcon> = {
|
|
|
207
208
|
Contact, Building2, ChevronDown, Filter, Plus, Shield, List, ListChecks, FolderOpen, Dog, Cat, PawPrint, Heart, LayoutTemplate, LeafyGreen, Apple, Egg, Wheat,
|
|
208
209
|
ArrowDownCircle, ArrowUpCircle, ArrowLeftRight, Plug, SlidersHorizontal, TableProperties, Landmark, Receipt, TrendingUp, CircleDollarSign, Clock, AlertTriangle, Sparkles, Wallet, Warehouse, Ruler, ArrowUpRight, ArrowDownRight, UserPlus, UserX, TreePalm,
|
|
209
210
|
Boxes, Box, FileCheck2, PartyPopper, Radio, CalendarDays, BadgeDollarSign, Banknote, Layers, Music, Eye, ListMusic, Disc3, UsersRound, Mic,
|
|
210
|
-
CalendarCheck2, CalendarX, ListPlus, Map, Ban, Clock3, Inbox, UserCheck, Star, Zap, Clapperboard,
|
|
211
|
+
CalendarCheck2, CalendarX, ListPlus, Map, Ban, Clock3, Inbox, UserCheck, Star, Zap, Clapperboard, Newspaper,
|
|
211
212
|
}
|
|
212
213
|
|
|
213
214
|
function getIcon(name: string): LucideIcon {
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef, useCallback } from 'react'
|
|
2
|
+
import { createPortal } from 'react-dom'
|
|
3
|
+
import { Search, Plus } from 'lucide-react'
|
|
4
|
+
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Reusable search combobox with keyboard navigation + optional create
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
export interface ComboboxOption {
|
|
10
|
+
id: string
|
|
11
|
+
label: string
|
|
12
|
+
subtitle?: string
|
|
13
|
+
price?: number
|
|
14
|
+
data?: Record<string, unknown>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface SearchComboboxProps {
|
|
18
|
+
value: string
|
|
19
|
+
onChange: (value: string) => void
|
|
20
|
+
onSelect: (option: ComboboxOption) => void
|
|
21
|
+
options: ComboboxOption[]
|
|
22
|
+
placeholder?: string
|
|
23
|
+
autoFocus?: boolean
|
|
24
|
+
onBlurEmpty?: () => void
|
|
25
|
+
renderRight?: (option: ComboboxOption) => React.ReactNode
|
|
26
|
+
/** Show a "+ Create ..." option when search has no exact match */
|
|
27
|
+
allowCreate?: boolean
|
|
28
|
+
/** Called when user clicks the create option. Receives the current search text. */
|
|
29
|
+
onCreateNew?: (searchText: string) => void
|
|
30
|
+
/** Label for the create option (default: 'Create') */
|
|
31
|
+
createLabel?: string
|
|
32
|
+
className?: string
|
|
33
|
+
/** Minimal style — no border/bg, just underline on focus. For inline use. */
|
|
34
|
+
minimal?: boolean
|
|
35
|
+
/** Inline label shown when collapsed. Click reveals the search input. */
|
|
36
|
+
inlineLabel?: string
|
|
37
|
+
/** Icon for the inline label: 'search' (default) or 'plus' (for "add" actions) */
|
|
38
|
+
inlineIcon?: 'search' | 'plus'
|
|
39
|
+
/** Show a loading skeleton in the dropdown while results are being fetched */
|
|
40
|
+
loading?: boolean
|
|
41
|
+
/** Called when the input gains focus */
|
|
42
|
+
onFocus?: () => void
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function SearchCombobox({
|
|
46
|
+
value, onChange, onSelect, options, placeholder, autoFocus, onBlurEmpty,
|
|
47
|
+
renderRight, allowCreate, onCreateNew, createLabel = 'Create', className, minimal, inlineLabel, inlineIcon = 'search',
|
|
48
|
+
loading, onFocus: onFocusProp,
|
|
49
|
+
}: SearchComboboxProps) {
|
|
50
|
+
const [open, setOpen] = useState(false)
|
|
51
|
+
const [activeIndex, setActiveIndex] = useState(-1)
|
|
52
|
+
const [expanded, setExpanded] = useState(!inlineLabel)
|
|
53
|
+
const [dropRect, setDropRect] = useState<DOMRect | null>(null)
|
|
54
|
+
const inputRef = useRef<HTMLInputElement>(null)
|
|
55
|
+
const wrapperRef = useRef<HTMLDivElement>(null)
|
|
56
|
+
const listRef = useRef<HTMLDivElement>(null)
|
|
57
|
+
|
|
58
|
+
// When value is set externally (e.g. edit mode), auto-expand; collapse when cleared
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (value && inlineLabel) setExpanded(true)
|
|
61
|
+
if (!value && inlineLabel && !open) setExpanded(false)
|
|
62
|
+
}, [value, open])
|
|
63
|
+
|
|
64
|
+
function updateRect() {
|
|
65
|
+
if (wrapperRef.current) setDropRect(wrapperRef.current.getBoundingClientRect())
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Show create option only when dropdown is open, has text, and no exact match
|
|
69
|
+
const showCreate = open && allowCreate && onCreateNew && value.trim().length > 0 &&
|
|
70
|
+
!options.some((o) => o.label.toLowerCase() === value.trim().toLowerCase())
|
|
71
|
+
|
|
72
|
+
const totalItems = options.length + (showCreate ? 1 : 0)
|
|
73
|
+
|
|
74
|
+
useEffect(() => { setActiveIndex(-1) }, [options])
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
if ((options.length > 0 || showCreate || loading) && document.activeElement === inputRef.current) setOpen(true)
|
|
77
|
+
}, [options, showCreate, loading])
|
|
78
|
+
|
|
79
|
+
const handleKeyDown = useCallback((e: React.KeyboardEvent) => {
|
|
80
|
+
if (!open || totalItems === 0) {
|
|
81
|
+
if (e.key === 'ArrowDown' && totalItems > 0) {
|
|
82
|
+
e.preventDefault()
|
|
83
|
+
setOpen(true)
|
|
84
|
+
setActiveIndex(0)
|
|
85
|
+
}
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
switch (e.key) {
|
|
90
|
+
case 'ArrowDown':
|
|
91
|
+
e.preventDefault()
|
|
92
|
+
setActiveIndex((prev) => (prev + 1) % totalItems)
|
|
93
|
+
break
|
|
94
|
+
case 'ArrowUp':
|
|
95
|
+
e.preventDefault()
|
|
96
|
+
setActiveIndex((prev) => (prev <= 0 ? totalItems - 1 : prev - 1))
|
|
97
|
+
break
|
|
98
|
+
case 'Enter':
|
|
99
|
+
e.preventDefault()
|
|
100
|
+
if (activeIndex >= 0 && activeIndex < options.length) {
|
|
101
|
+
onSelect(options[activeIndex])
|
|
102
|
+
setOpen(false)
|
|
103
|
+
setActiveIndex(-1)
|
|
104
|
+
} else if (showCreate && activeIndex === options.length) {
|
|
105
|
+
onCreateNew?.(value.trim())
|
|
106
|
+
setOpen(false)
|
|
107
|
+
setActiveIndex(-1)
|
|
108
|
+
}
|
|
109
|
+
break
|
|
110
|
+
case 'Escape':
|
|
111
|
+
e.preventDefault()
|
|
112
|
+
setOpen(false)
|
|
113
|
+
setActiveIndex(-1)
|
|
114
|
+
break
|
|
115
|
+
}
|
|
116
|
+
}, [open, options, totalItems, activeIndex, onSelect, showCreate, onCreateNew, value])
|
|
117
|
+
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
if (activeIndex < 0 || !listRef.current) return
|
|
120
|
+
const items = listRef.current.children
|
|
121
|
+
if (items[activeIndex]) (items[activeIndex] as HTMLElement).scrollIntoView({ block: 'nearest' })
|
|
122
|
+
}, [activeIndex])
|
|
123
|
+
|
|
124
|
+
function handleBlur() {
|
|
125
|
+
setTimeout(() => {
|
|
126
|
+
setOpen(false)
|
|
127
|
+
setActiveIndex(-1)
|
|
128
|
+
if (!value && onBlurEmpty) onBlurEmpty()
|
|
129
|
+
if (!value && inlineLabel) setExpanded(false)
|
|
130
|
+
}, 200)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const hasDropdown = open && (options.length > 0 || showCreate || loading)
|
|
134
|
+
|
|
135
|
+
// Collapsed inline label — click to expand
|
|
136
|
+
if (!expanded && inlineLabel) {
|
|
137
|
+
const isPlus = inlineIcon === 'plus'
|
|
138
|
+
return (
|
|
139
|
+
<button type="button" onClick={() => { setExpanded(true); setTimeout(() => inputRef.current?.focus(), 50) }}
|
|
140
|
+
className={`flex items-center gap-1.5 w-full text-left text-sm py-1.5 pl-2 transition-colors ${
|
|
141
|
+
isPlus ? 'text-primary hover:text-primary/80' : 'text-muted-foreground hover:text-foreground'
|
|
142
|
+
} ${className ?? ''}`}>
|
|
143
|
+
{isPlus && <Plus className="h-3.5 w-3.5 shrink-0" />}
|
|
144
|
+
{inlineLabel}
|
|
145
|
+
</button>
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return (
|
|
150
|
+
<div ref={wrapperRef} className={`relative ${className ?? ''}`}>
|
|
151
|
+
{!minimal && (
|
|
152
|
+
<Search className="absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground pointer-events-none" />
|
|
153
|
+
)}
|
|
154
|
+
<input
|
|
155
|
+
ref={inputRef}
|
|
156
|
+
type="text"
|
|
157
|
+
value={value}
|
|
158
|
+
onChange={(e) => { onChange(e.target.value); updateRect(); setOpen(true) }}
|
|
159
|
+
onFocus={() => { updateRect(); onFocusProp?.(); if (options.length > 0 || showCreate || loading) setOpen(true) }}
|
|
160
|
+
onBlur={handleBlur}
|
|
161
|
+
onKeyDown={handleKeyDown}
|
|
162
|
+
placeholder={placeholder}
|
|
163
|
+
autoFocus={autoFocus}
|
|
164
|
+
className={minimal
|
|
165
|
+
? 'w-full bg-transparent pl-2 pr-3 py-1.5 text-sm placeholder:text-muted-foreground focus:outline-none border-b border-transparent hover:border-border focus:border-foreground transition-colors'
|
|
166
|
+
: 'w-full rounded-lg border bg-background pl-8 pr-3 py-2 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring'
|
|
167
|
+
}
|
|
168
|
+
role="combobox"
|
|
169
|
+
aria-expanded={hasDropdown}
|
|
170
|
+
aria-autocomplete="list"
|
|
171
|
+
aria-activedescendant={activeIndex >= 0 ? `combobox-opt-${activeIndex}` : undefined}
|
|
172
|
+
/>
|
|
173
|
+
{hasDropdown && dropRect && createPortal(
|
|
174
|
+
<div ref={listRef} role="listbox" data-modal-passthrough
|
|
175
|
+
style={{ position: 'fixed', left: dropRect.left, top: dropRect.bottom + 4, width: dropRect.width, zIndex: 9999, pointerEvents: 'auto' }}
|
|
176
|
+
className="fayz-glass-surface max-h-52 overflow-y-auto rounded-lg border bg-popover shadow-lg py-0.5 animate-in fade-in zoom-in-95 duration-100">
|
|
177
|
+
{loading && options.length === 0 && (
|
|
178
|
+
<div className="flex items-center gap-2 px-3 py-2 text-sm text-muted-foreground">
|
|
179
|
+
<svg className="h-3.5 w-3.5 animate-spin shrink-0" viewBox="0 0 16 16" fill="none">
|
|
180
|
+
<circle cx="8" cy="8" r="6.5" stroke="currentColor" strokeWidth="1.5" opacity="0.25" />
|
|
181
|
+
<path d="M14.5 8a6.5 6.5 0 00-6.5-6.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
|
|
182
|
+
</svg>
|
|
183
|
+
<span>Buscando…</span>
|
|
184
|
+
</div>
|
|
185
|
+
)}
|
|
186
|
+
{options.map((opt, i) => (
|
|
187
|
+
<div key={opt.id} id={`combobox-opt-${i}`} role="option" aria-selected={i === activeIndex}
|
|
188
|
+
onMouseDown={(e) => { e.preventDefault(); onSelect(opt); setOpen(false) }}
|
|
189
|
+
onMouseEnter={() => setActiveIndex(i)}
|
|
190
|
+
className={`flex w-full items-center gap-2 px-3 py-2 text-sm cursor-pointer transition-colors ${
|
|
191
|
+
i === activeIndex ? 'bg-primary/10 text-primary' : 'hover:bg-muted/50'
|
|
192
|
+
}`}>
|
|
193
|
+
<div className="flex-1 min-w-0">
|
|
194
|
+
<p className="truncate font-medium">{opt.label}</p>
|
|
195
|
+
{opt.subtitle && <p className="truncate text-[11px] text-muted-foreground">{opt.subtitle}</p>}
|
|
196
|
+
</div>
|
|
197
|
+
{renderRight && <div className="shrink-0">{renderRight(opt)}</div>}
|
|
198
|
+
</div>
|
|
199
|
+
))}
|
|
200
|
+
{showCreate && (
|
|
201
|
+
<div id={`combobox-opt-${options.length}`} role="option" aria-selected={activeIndex === options.length}
|
|
202
|
+
onMouseDown={(e) => { e.preventDefault(); onCreateNew?.(value.trim()); setOpen(false) }}
|
|
203
|
+
onMouseEnter={() => setActiveIndex(options.length)}
|
|
204
|
+
className={`flex w-full items-center gap-2 px-3 py-2 text-sm cursor-pointer transition-colors border-t ${
|
|
205
|
+
activeIndex === options.length ? 'bg-primary/10 text-primary' : 'hover:bg-muted/50'
|
|
206
|
+
}`}>
|
|
207
|
+
<Plus className="h-3.5 w-3.5 shrink-0" />
|
|
208
|
+
<span>{createLabel} “<span className="font-medium">{value.trim()}</span>”</span>
|
|
209
|
+
</div>
|
|
210
|
+
)}
|
|
211
|
+
</div>,
|
|
212
|
+
document.body,
|
|
213
|
+
)}
|
|
214
|
+
</div>
|
|
215
|
+
)
|
|
216
|
+
}
|
package/src/primitives/index.ts
CHANGED
|
@@ -83,3 +83,4 @@ export { Popover, PopoverTrigger, PopoverContent } from './popover'
|
|
|
83
83
|
export { SegmentedControl, type SegmentedControlProps, type SegmentedOption } from './segmented-control'
|
|
84
84
|
export { Markdown, renderMarkdown, type MarkdownProps } from './markdown'
|
|
85
85
|
export { MarkdownEditor, type MarkdownEditorProps } from './markdown-editor'
|
|
86
|
+
export { SearchCombobox, type ComboboxOption } from './SearchCombobox'
|