untitledui 0.1.2 → 0.1.3
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/index.mjs +19 -0
- package/package.json +10 -8
- package/templates/default/package.json +20 -21
- package/templates/default/src/app/home-screen.tsx +2 -3
- package/templates/default/src/app/layout.tsx +5 -13
- package/templates/default/src/components/marketing/header-navigation/dropdown-header-navigation.tsx +1 -1
- package/templates/default/src/components/shared/buttons/button.tsx +2 -1
- package/templates/default/src/components/shared/dropdown/dropdown.tsx +27 -18
- package/templates/default/src/components/shared/form/hook-form.tsx +75 -0
- package/templates/default/src/components/shared/{inputs/input → input}/index.tsx +3 -3
- package/templates/default/src/components/shared/{inputs/input → input}/input-payment.tsx +4 -4
- package/templates/default/src/components/shared/{inputs/input → input}/input-with-button.tsx +4 -4
- package/templates/default/src/components/shared/{inputs/input → input}/input-with-dropdown.tsx +4 -4
- package/templates/default/src/components/shared/{inputs/input → input}/input-with-prefix.tsx +4 -4
- package/templates/default/src/components/shared/progress-indicators/progress-indicators.tsx +2 -2
- package/templates/default/src/components/shared/{input-dropdown → select}/combobox.tsx +9 -9
- package/templates/default/src/components/shared/{input-dropdown → select}/multi-select.tsx +166 -166
- package/templates/default/src/components/shared/{input-dropdown → select}/popover.tsx +2 -2
- package/templates/default/src/components/shared/select/select-item.tsx +70 -0
- package/templates/default/src/components/shared/{input-dropdown/select.tsx → select/select-native.tsx} +2 -2
- package/templates/default/src/components/shared/select/select.tsx +143 -0
- package/templates/default/src/components/shared/slider/slider.tsx +2 -2
- package/templates/default/src/components/shared/{inputs/textarea → textarea}/textarea.tsx +2 -2
- package/templates/default/src/providers/theme.tsx +1 -1
- package/templates/default/src/styles/globals.css +3 -1
- package/templates/default/src/styles/theme.css +392 -380
- package/templates/default/src/styles/typography.css +20 -20
- package/dist/commands/add.js +0 -339
- package/dist/commands/init.js +0 -436
- package/dist/helper/download-tar-api.js +0 -129
- package/dist/helper/download-tar.js +0 -81
- package/dist/helper/find-css-file.js +0 -19
- package/dist/helper/formatText.js +0 -37
- package/dist/helper/get-components-api.js +0 -47
- package/dist/helper/get-components-list.js +0 -62
- package/dist/helper/get-components.js +0 -19
- package/dist/helper/get-config.js +0 -163
- package/dist/helper/get-package-info.js +0 -99
- package/dist/helper/get-pkg-manager.js +0 -16
- package/dist/helper/get-project.js +0 -176
- package/dist/helper/install-template.js +0 -29
- package/dist/helper/match-color-css.js +0 -82
- package/dist/helper/update-color-css.js +0 -134
- package/dist/index.js +0 -25
- package/dist/package.json +0 -50
- package/dist/res/components.json +0 -520
- package/dist/res/config.json +0 -3
- package/templates/default/src/components/shared/input-dropdown/dropdown-item.tsx +0 -98
- package/templates/default/src/components/shared/input-dropdown/input-dropdown.tsx +0 -172
- package/templates/default/src/fonts/GeistMonoVF.woff +0 -0
- package/templates/default/src/fonts/GeistVF.woff +0 -0
- package/templates/default/src/styles/colors.css +0 -805
- /package/templates/default/src/components/shared/{inputs → file-upload-trigger}/file-upload-trigger.tsx +0 -0
- /package/templates/default/src/components/shared/{inputs/form → form}/form.tsx +0 -0
- /package/templates/default/src/components/shared/{inputs → input}/hint-text.tsx +0 -0
- /package/templates/default/src/components/shared/{inputs → input}/label.tsx +0 -0
package/dist/res/components.json
DELETED
|
@@ -1,520 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"shared": [
|
|
3
|
-
{
|
|
4
|
-
"name": "avatar-label-group",
|
|
5
|
-
"dependencies": [
|
|
6
|
-
"react",
|
|
7
|
-
"@a-peak-works/untitledui-icons",
|
|
8
|
-
"tailwind-merge",
|
|
9
|
-
"react-aria",
|
|
10
|
-
"react-aria-components"
|
|
11
|
-
],
|
|
12
|
-
"devDependencies": [],
|
|
13
|
-
"files": [
|
|
14
|
-
"components/utils/index.ts",
|
|
15
|
-
"components/shared/avatar/avatar.tsx",
|
|
16
|
-
"components/shared/avatar/base-components/index.ts",
|
|
17
|
-
"components/shared/avatar/base-components/avatar-add-button.tsx",
|
|
18
|
-
"components/shared/avatar/base-components/avatar-company-icon.tsx",
|
|
19
|
-
"components/shared/avatar/base-components/avatar-online-indicator.tsx",
|
|
20
|
-
"components/shared/avatar/base-components/verified-tick.tsx",
|
|
21
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
22
|
-
"components/shared/avatar/avatar-label-group.tsx"
|
|
23
|
-
],
|
|
24
|
-
"type": "components:shared"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "avatar-profile-photo",
|
|
28
|
-
"dependencies": [
|
|
29
|
-
"react",
|
|
30
|
-
"@a-peak-works/untitledui-icons",
|
|
31
|
-
"tailwind-merge",
|
|
32
|
-
"react-aria",
|
|
33
|
-
"react-aria-components"
|
|
34
|
-
],
|
|
35
|
-
"devDependencies": [],
|
|
36
|
-
"files": [
|
|
37
|
-
"components/utils/index.ts",
|
|
38
|
-
"components/shared/avatar/avatar.tsx",
|
|
39
|
-
"components/shared/avatar/base-components/index.ts",
|
|
40
|
-
"components/shared/avatar/base-components/avatar-add-button.tsx",
|
|
41
|
-
"components/shared/avatar/base-components/avatar-company-icon.tsx",
|
|
42
|
-
"components/shared/avatar/base-components/avatar-online-indicator.tsx",
|
|
43
|
-
"components/shared/avatar/base-components/verified-tick.tsx",
|
|
44
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
45
|
-
"components/shared/avatar/avatar-profile-photo.tsx"
|
|
46
|
-
],
|
|
47
|
-
"type": "components:shared"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"name": "avatar",
|
|
51
|
-
"dependencies": [
|
|
52
|
-
"tailwind-merge",
|
|
53
|
-
"@a-peak-works/untitledui-icons",
|
|
54
|
-
"react",
|
|
55
|
-
"react-aria",
|
|
56
|
-
"react-aria-components"
|
|
57
|
-
],
|
|
58
|
-
"devDependencies": [],
|
|
59
|
-
"files": [
|
|
60
|
-
"components/utils/index.ts",
|
|
61
|
-
"components/shared/avatar/base-components/index.ts",
|
|
62
|
-
"components/shared/avatar/base-components/avatar-add-button.tsx",
|
|
63
|
-
"components/shared/avatar/base-components/avatar-company-icon.tsx",
|
|
64
|
-
"components/shared/avatar/base-components/avatar-online-indicator.tsx",
|
|
65
|
-
"components/shared/avatar/base-components/verified-tick.tsx",
|
|
66
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
67
|
-
"components/shared/avatar/avatar.tsx"
|
|
68
|
-
],
|
|
69
|
-
"type": "components:shared"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"name": "badge-groups",
|
|
73
|
-
"dependencies": [
|
|
74
|
-
"react",
|
|
75
|
-
"tailwind-merge",
|
|
76
|
-
"@a-peak-works/untitledui-icons"
|
|
77
|
-
],
|
|
78
|
-
"devDependencies": [],
|
|
79
|
-
"files": [
|
|
80
|
-
"components/utils/index.ts",
|
|
81
|
-
"components/utils/isReactComponent.ts",
|
|
82
|
-
"components/shared/badges/badge-groups.tsx"
|
|
83
|
-
],
|
|
84
|
-
"type": "components:shared"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"name": "badges",
|
|
88
|
-
"dependencies": [
|
|
89
|
-
"react",
|
|
90
|
-
"tailwind-merge",
|
|
91
|
-
"@a-peak-works/untitledui-icons"
|
|
92
|
-
],
|
|
93
|
-
"devDependencies": [],
|
|
94
|
-
"files": [
|
|
95
|
-
"components/foundations/dot-icon.tsx",
|
|
96
|
-
"components/utils/index.ts",
|
|
97
|
-
"components/shared/badges/badge-types.ts",
|
|
98
|
-
"components/shared/badges/badges.tsx"
|
|
99
|
-
],
|
|
100
|
-
"type": "components:shared"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"name": "button-group",
|
|
104
|
-
"dependencies": [
|
|
105
|
-
"react",
|
|
106
|
-
"tailwind-merge",
|
|
107
|
-
"react-aria-components"
|
|
108
|
-
],
|
|
109
|
-
"devDependencies": [],
|
|
110
|
-
"files": [
|
|
111
|
-
"components/utils/index.ts",
|
|
112
|
-
"components/utils/isReactComponent.ts",
|
|
113
|
-
"components/shared/button-group/button-group.tsx"
|
|
114
|
-
],
|
|
115
|
-
"type": "components:shared"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"name": "button-utility",
|
|
119
|
-
"dependencies": [
|
|
120
|
-
"react",
|
|
121
|
-
"react-aria",
|
|
122
|
-
"react-aria-components",
|
|
123
|
-
"tailwind-merge"
|
|
124
|
-
],
|
|
125
|
-
"devDependencies": [],
|
|
126
|
-
"files": [
|
|
127
|
-
"components/utils/index.ts",
|
|
128
|
-
"components/utils/isReactComponent.ts",
|
|
129
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
130
|
-
"components/shared/buttons/button-utility.tsx"
|
|
131
|
-
],
|
|
132
|
-
"type": "components:shared"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"name": "social-button",
|
|
136
|
-
"dependencies": [
|
|
137
|
-
"react",
|
|
138
|
-
"tailwind-merge",
|
|
139
|
-
"react-aria-components"
|
|
140
|
-
],
|
|
141
|
-
"devDependencies": [],
|
|
142
|
-
"files": [
|
|
143
|
-
"components/utils/index.ts",
|
|
144
|
-
"components/shared/buttons/social-logos.tsx",
|
|
145
|
-
"components/shared/buttons/social-button.tsx"
|
|
146
|
-
],
|
|
147
|
-
"type": "components:shared"
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"name": "close-button",
|
|
151
|
-
"dependencies": [
|
|
152
|
-
"tailwind-merge",
|
|
153
|
-
"react",
|
|
154
|
-
"@a-peak-works/untitledui-icons"
|
|
155
|
-
],
|
|
156
|
-
"devDependencies": [],
|
|
157
|
-
"files": [
|
|
158
|
-
"components/utils/index.ts",
|
|
159
|
-
"components/shared/buttons/close-button.tsx"
|
|
160
|
-
],
|
|
161
|
-
"type": "components:shared"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"name": "social-logos",
|
|
165
|
-
"dependencies": [
|
|
166
|
-
"react"
|
|
167
|
-
],
|
|
168
|
-
"devDependencies": [],
|
|
169
|
-
"files": [
|
|
170
|
-
"components/shared/buttons/social-logos.tsx"
|
|
171
|
-
],
|
|
172
|
-
"type": "components:shared"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"name": "app-store-buttons",
|
|
176
|
-
"dependencies": [
|
|
177
|
-
"tailwind-merge",
|
|
178
|
-
"react"
|
|
179
|
-
],
|
|
180
|
-
"devDependencies": [],
|
|
181
|
-
"files": [
|
|
182
|
-
"components/utils/index.ts",
|
|
183
|
-
"components/shared/buttons/app-store-buttons.tsx"
|
|
184
|
-
],
|
|
185
|
-
"type": "components:shared"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"name": "button",
|
|
189
|
-
"dependencies": [
|
|
190
|
-
"react",
|
|
191
|
-
"tailwind-merge",
|
|
192
|
-
"next",
|
|
193
|
-
"react-aria-components"
|
|
194
|
-
],
|
|
195
|
-
"files": [
|
|
196
|
-
"components/utils/index.ts",
|
|
197
|
-
"components/utils/isReactComponent.ts",
|
|
198
|
-
"components/shared/buttons/button.tsx"
|
|
199
|
-
],
|
|
200
|
-
"type": "components:shared"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"name": "app-store-buttons-outline",
|
|
204
|
-
"dependencies": [
|
|
205
|
-
"tailwind-merge",
|
|
206
|
-
"react"
|
|
207
|
-
],
|
|
208
|
-
"devDependencies": [],
|
|
209
|
-
"files": [
|
|
210
|
-
"components/utils/index.ts",
|
|
211
|
-
"components/shared/buttons/app-store-buttons-outline.tsx"
|
|
212
|
-
],
|
|
213
|
-
"type": "components:shared"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"name": "checkbox",
|
|
217
|
-
"dependencies": [
|
|
218
|
-
"tailwind-merge",
|
|
219
|
-
"react",
|
|
220
|
-
"react-aria-components"
|
|
221
|
-
],
|
|
222
|
-
"devDependencies": [],
|
|
223
|
-
"files": [
|
|
224
|
-
"components/utils/index.ts",
|
|
225
|
-
"components/shared/checkbox/checkbox.tsx"
|
|
226
|
-
],
|
|
227
|
-
"type": "components:shared"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"name": "dropdown",
|
|
231
|
-
"dependencies": [
|
|
232
|
-
"tailwind-merge",
|
|
233
|
-
"react",
|
|
234
|
-
"@a-peak-works/untitledui-icons",
|
|
235
|
-
"react-aria-components"
|
|
236
|
-
],
|
|
237
|
-
"devDependencies": [],
|
|
238
|
-
"files": [
|
|
239
|
-
"components/utils/index.ts",
|
|
240
|
-
"components/shared/dropdown/dropdown.tsx"
|
|
241
|
-
],
|
|
242
|
-
"type": "components:shared"
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
"name": "select",
|
|
246
|
-
"dependencies": [
|
|
247
|
-
"react",
|
|
248
|
-
"react-aria-components",
|
|
249
|
-
"@a-peak-works/untitledui-icons",
|
|
250
|
-
"react-aria",
|
|
251
|
-
"tailwind-merge"
|
|
252
|
-
],
|
|
253
|
-
"devDependencies": [],
|
|
254
|
-
"files": [
|
|
255
|
-
"components/shared/inputs/hint-text.tsx",
|
|
256
|
-
"components/shared/inputs/label.tsx",
|
|
257
|
-
"components/utils/index.ts",
|
|
258
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
259
|
-
"components/shared/input-dropdown/select.tsx"
|
|
260
|
-
],
|
|
261
|
-
"type": "components:shared"
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"name": "input-dropdown",
|
|
265
|
-
"dependencies": [
|
|
266
|
-
"react",
|
|
267
|
-
"@a-peak-works/untitledui-icons",
|
|
268
|
-
"react-aria-components",
|
|
269
|
-
"react-hotkeys-hook",
|
|
270
|
-
"tailwind-merge",
|
|
271
|
-
"react-aria"
|
|
272
|
-
],
|
|
273
|
-
"devDependencies": [],
|
|
274
|
-
"files": [
|
|
275
|
-
"components/foundations/dot-icon.tsx",
|
|
276
|
-
"components/utils/index.ts",
|
|
277
|
-
"components/shared/avatar/avatar.tsx",
|
|
278
|
-
"components/shared/badges/badge-types.ts",
|
|
279
|
-
"components/shared/inputs/hint-text.tsx",
|
|
280
|
-
"components/shared/inputs/label.tsx",
|
|
281
|
-
"components/shared/input-dropdown/combobox.tsx",
|
|
282
|
-
"components/shared/input-dropdown/dropdown-item.tsx",
|
|
283
|
-
"components/shared/input-dropdown/popover.tsx",
|
|
284
|
-
"components/shared/avatar/base-components/index.ts",
|
|
285
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
286
|
-
"hooks/use-resize-observer.tsx",
|
|
287
|
-
"components/shared/input-dropdown/input-dropdown.tsx",
|
|
288
|
-
"components/shared/input-dropdown/multi-select.tsx",
|
|
289
|
-
"components/shared/avatar/base-components/avatar-add-button.tsx",
|
|
290
|
-
"components/shared/avatar/base-components/avatar-company-icon.tsx",
|
|
291
|
-
"components/shared/avatar/base-components/avatar-online-indicator.tsx",
|
|
292
|
-
"components/shared/avatar/base-components/verified-tick.tsx",
|
|
293
|
-
"components/shared/tags/base-components/tag-close-x.tsx",
|
|
294
|
-
"components/shared/input-dropdown/input-dropdown.tsx"
|
|
295
|
-
],
|
|
296
|
-
"type": "components:shared"
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
"name": "multi-select",
|
|
300
|
-
"dependencies": [
|
|
301
|
-
"react",
|
|
302
|
-
"@a-peak-works/untitledui-icons",
|
|
303
|
-
"react-aria-components",
|
|
304
|
-
"tailwind-merge",
|
|
305
|
-
"react-aria",
|
|
306
|
-
"react-hotkeys-hook"
|
|
307
|
-
],
|
|
308
|
-
"devDependencies": [],
|
|
309
|
-
"files": [
|
|
310
|
-
"components/utils/index.ts",
|
|
311
|
-
"hooks/use-resize-observer.tsx",
|
|
312
|
-
"components/shared/avatar/avatar.tsx",
|
|
313
|
-
"components/shared/badges/badge-types.ts",
|
|
314
|
-
"components/shared/inputs/hint-text.tsx",
|
|
315
|
-
"components/shared/inputs/label.tsx",
|
|
316
|
-
"components/shared/tags/base-components/tag-close-x.tsx",
|
|
317
|
-
"components/shared/input-dropdown/dropdown-item.tsx",
|
|
318
|
-
"components/shared/input-dropdown/input-dropdown.tsx",
|
|
319
|
-
"components/shared/input-dropdown/popover.tsx",
|
|
320
|
-
"components/shared/avatar/base-components/index.ts",
|
|
321
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
322
|
-
"components/foundations/dot-icon.tsx",
|
|
323
|
-
"components/shared/input-dropdown/combobox.tsx",
|
|
324
|
-
"components/shared/avatar/base-components/avatar-add-button.tsx",
|
|
325
|
-
"components/shared/avatar/base-components/avatar-company-icon.tsx",
|
|
326
|
-
"components/shared/avatar/base-components/avatar-online-indicator.tsx",
|
|
327
|
-
"components/shared/avatar/base-components/verified-tick.tsx",
|
|
328
|
-
"components/shared/input-dropdown/multi-select.tsx"
|
|
329
|
-
],
|
|
330
|
-
"type": "components:shared"
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
"name": "form",
|
|
334
|
-
"dependencies": [
|
|
335
|
-
"react",
|
|
336
|
-
"react-aria-components",
|
|
337
|
-
"@a-peak-works/untitledui-icons",
|
|
338
|
-
"react-aria",
|
|
339
|
-
"tailwind-merge"
|
|
340
|
-
],
|
|
341
|
-
"devDependencies": [],
|
|
342
|
-
"files": [
|
|
343
|
-
"components/shared/inputs/hint-text.tsx",
|
|
344
|
-
"components/shared/inputs/label.tsx",
|
|
345
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
346
|
-
"components/shared/inputs/input/index.tsx",
|
|
347
|
-
"components/utils/index.ts",
|
|
348
|
-
"components/shared/inputs/form/form.tsx"
|
|
349
|
-
],
|
|
350
|
-
"type": "components:shared"
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
"name": "react-hook-form",
|
|
354
|
-
"dependencies": [
|
|
355
|
-
"react",
|
|
356
|
-
"react-aria-components",
|
|
357
|
-
"react-hook-form",
|
|
358
|
-
"@a-peak-works/untitledui-icons",
|
|
359
|
-
"react-aria",
|
|
360
|
-
"tailwind-merge"
|
|
361
|
-
],
|
|
362
|
-
"devDependencies": [],
|
|
363
|
-
"files": [
|
|
364
|
-
"components/shared/inputs/hint-text.tsx",
|
|
365
|
-
"components/shared/inputs/label.tsx",
|
|
366
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
367
|
-
"components/shared/inputs/input/index.tsx",
|
|
368
|
-
"components/utils/index.ts",
|
|
369
|
-
"components/shared/inputs/form/hook-form.tsx"
|
|
370
|
-
],
|
|
371
|
-
"type": "components:shared"
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
"name": "progress-circles",
|
|
375
|
-
"dependencies": [
|
|
376
|
-
"tailwind-merge"
|
|
377
|
-
],
|
|
378
|
-
"devDependencies": [],
|
|
379
|
-
"files": [
|
|
380
|
-
"components/utils/index.ts",
|
|
381
|
-
"components/shared/progress-indicators/progress-circles.tsx"
|
|
382
|
-
],
|
|
383
|
-
"type": "components:shared"
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
"name": "progress-indicators",
|
|
387
|
-
"dependencies": [
|
|
388
|
-
"tailwind-merge"
|
|
389
|
-
],
|
|
390
|
-
"devDependencies": [],
|
|
391
|
-
"files": [
|
|
392
|
-
"components/utils/index.ts",
|
|
393
|
-
"components/shared/progress-indicators/progress-indicators.tsx"
|
|
394
|
-
],
|
|
395
|
-
"type": "components:shared"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
"name": "radio-buttons",
|
|
399
|
-
"dependencies": [
|
|
400
|
-
"tailwind-merge",
|
|
401
|
-
"react",
|
|
402
|
-
"react-aria-components"
|
|
403
|
-
],
|
|
404
|
-
"devDependencies": [],
|
|
405
|
-
"files": [
|
|
406
|
-
"components/utils/index.ts",
|
|
407
|
-
"components/shared/radio-buttons/radio-buttons.tsx"
|
|
408
|
-
],
|
|
409
|
-
"type": "components:shared"
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
"name": "radio-groups",
|
|
413
|
-
"dependencies": [
|
|
414
|
-
"react",
|
|
415
|
-
"react-aria-components",
|
|
416
|
-
"@a-peak-works/untitledui-icons",
|
|
417
|
-
"next",
|
|
418
|
-
"tailwind-merge",
|
|
419
|
-
"react-aria"
|
|
420
|
-
],
|
|
421
|
-
"devDependencies": [
|
|
422
|
-
"@next/mdx"
|
|
423
|
-
],
|
|
424
|
-
"files": [
|
|
425
|
-
"components/shared/radio-groups/radio-group-icon-simple.tsx",
|
|
426
|
-
"components/shared/radio-groups/radio-groups.tsx",
|
|
427
|
-
"components/shared/radio-groups/radio-group-icon-card.tsx",
|
|
428
|
-
"components/shared/radio-groups/radio-group-avatar.tsx",
|
|
429
|
-
"components/shared/radio-groups/radio-group-payment-icon.tsx",
|
|
430
|
-
"components/shared/radio-groups/radio-group-radio-button.tsx",
|
|
431
|
-
"components/shared/radio-groups/radio-group-checkbox.tsx",
|
|
432
|
-
"components/foundations/featured-icon/featured-icons.tsx",
|
|
433
|
-
"components/shared/checkbox/checkbox.tsx",
|
|
434
|
-
"components/utils/index.ts",
|
|
435
|
-
"components/shared/badges/badges.tsx",
|
|
436
|
-
"components/shared/avatar/avatar.tsx",
|
|
437
|
-
"components/shared/buttons/button.tsx",
|
|
438
|
-
"components/utils/isReactComponent.ts",
|
|
439
|
-
"components/foundations/dot-icon.tsx",
|
|
440
|
-
"components/shared/badges/badge-types.ts",
|
|
441
|
-
"components/shared/avatar/base-components/index.ts",
|
|
442
|
-
"components/shared/avatar/base-components/avatar-add-button.tsx",
|
|
443
|
-
"components/shared/avatar/base-components/avatar-company-icon.tsx",
|
|
444
|
-
"components/shared/avatar/base-components/avatar-online-indicator.tsx",
|
|
445
|
-
"components/shared/avatar/base-components/verified-tick.tsx",
|
|
446
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
447
|
-
"components/shared/radio-groups/radio-groups.tsx"
|
|
448
|
-
],
|
|
449
|
-
"type": "components:shared"
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
"name": "slider",
|
|
453
|
-
"dependencies": [
|
|
454
|
-
"tailwind-merge",
|
|
455
|
-
"react-aria-components"
|
|
456
|
-
],
|
|
457
|
-
"devDependencies": [],
|
|
458
|
-
"files": [
|
|
459
|
-
"components/utils/index.ts",
|
|
460
|
-
"components/shared/slider/slider.tsx"
|
|
461
|
-
],
|
|
462
|
-
"type": "components:shared"
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
"name": "tags",
|
|
466
|
-
"dependencies": [
|
|
467
|
-
"react",
|
|
468
|
-
"@a-peak-works/untitledui-icons",
|
|
469
|
-
"react-aria-components",
|
|
470
|
-
"tailwind-merge",
|
|
471
|
-
"react-aria"
|
|
472
|
-
],
|
|
473
|
-
"devDependencies": [],
|
|
474
|
-
"files": [
|
|
475
|
-
"components/foundations/dot-icon.tsx",
|
|
476
|
-
"components/utils/index.ts",
|
|
477
|
-
"components/shared/avatar/avatar.tsx",
|
|
478
|
-
"components/shared/tags/base-components/tag-checkbox.tsx",
|
|
479
|
-
"components/shared/tags/base-components/tag-close-x.tsx",
|
|
480
|
-
"components/shared/avatar/base-components/index.ts",
|
|
481
|
-
"components/shared/avatar/base-components/avatar-add-button.tsx",
|
|
482
|
-
"components/shared/avatar/base-components/avatar-company-icon.tsx",
|
|
483
|
-
"components/shared/avatar/base-components/avatar-online-indicator.tsx",
|
|
484
|
-
"components/shared/avatar/base-components/verified-tick.tsx",
|
|
485
|
-
"components/shared/tooltips/tooltips.tsx",
|
|
486
|
-
"components/shared/tags/tags.tsx"
|
|
487
|
-
],
|
|
488
|
-
"type": "components:shared"
|
|
489
|
-
},
|
|
490
|
-
{
|
|
491
|
-
"name": "toggle",
|
|
492
|
-
"dependencies": [
|
|
493
|
-
"tailwind-merge",
|
|
494
|
-
"react",
|
|
495
|
-
"react-aria-components"
|
|
496
|
-
],
|
|
497
|
-
"devDependencies": [],
|
|
498
|
-
"files": [
|
|
499
|
-
"components/utils/index.ts",
|
|
500
|
-
"components/shared/toggle/toggle.tsx"
|
|
501
|
-
],
|
|
502
|
-
"type": "components:shared"
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
"name": "tooltips",
|
|
506
|
-
"dependencies": [
|
|
507
|
-
"tailwind-merge",
|
|
508
|
-
"react",
|
|
509
|
-
"react-aria",
|
|
510
|
-
"react-aria-components"
|
|
511
|
-
],
|
|
512
|
-
"devDependencies": [],
|
|
513
|
-
"files": [
|
|
514
|
-
"components/utils/index.ts",
|
|
515
|
-
"components/shared/tooltips/tooltips.tsx"
|
|
516
|
-
],
|
|
517
|
-
"type": "components:shared"
|
|
518
|
-
}
|
|
519
|
-
]
|
|
520
|
-
}
|
package/dist/res/config.json
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useContext } from "react";
|
|
4
|
-
import { Check, User01 } from "@untitledui/icons";
|
|
5
|
-
import type { ListBoxItemProps as AriaListBoxItemProps } from "react-aria-components";
|
|
6
|
-
import { ListBoxItem as AriaListBoxItem, Text } from "react-aria-components";
|
|
7
|
-
import Dot from "@/components/foundations/dot-icon";
|
|
8
|
-
import { cx } from "@/components/utils";
|
|
9
|
-
import Avatar from "../avatar/avatar";
|
|
10
|
-
import type { IconComponentType } from "../badges/badge-types";
|
|
11
|
-
import type { SelectValueType } from "./input-dropdown";
|
|
12
|
-
import { SelectContext } from "./input-dropdown";
|
|
13
|
-
|
|
14
|
-
export interface ListBoxItemIconProps {
|
|
15
|
-
size?: "sm" | "md";
|
|
16
|
-
isDisabled?: boolean;
|
|
17
|
-
icon?: IconComponentType;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const icons = {
|
|
21
|
-
default: () => <></>,
|
|
22
|
-
search: () => <></>,
|
|
23
|
-
tags: ({ isDisabled }: ListBoxItemIconProps) => (
|
|
24
|
-
<User01 aria-hidden="true" className={cx("size-5 shrink-0 text-fg-quaternary", isDisabled && "text-fg-disabled")} />
|
|
25
|
-
),
|
|
26
|
-
avatarLeading: ({ isDisabled }: ListBoxItemIconProps) => (
|
|
27
|
-
<User01 aria-hidden="true" className={cx("size-5 shrink-0 text-fg-quaternary", isDisabled && "text-fg-disabled")} />
|
|
28
|
-
),
|
|
29
|
-
iconLeading: ({ icon: Icon = User01, isDisabled }: ListBoxItemIconProps) => (
|
|
30
|
-
<Icon aria-hidden="true" className={cx("size-5 shrink-0 text-fg-quaternary", isDisabled && "text-fg-disabled")} />
|
|
31
|
-
),
|
|
32
|
-
dotLeading: ({ icon: Icon, isDisabled }: ListBoxItemIconProps) =>
|
|
33
|
-
Icon ? (
|
|
34
|
-
<Icon aria-hidden="true" className={cx("shrink-0 text-fg-success-secondary", isDisabled && "text-fg-disabled_subtle")} />
|
|
35
|
-
) : (
|
|
36
|
-
<Dot size="md" className={cx("shrink-0 text-fg-success-secondary", isDisabled && "text-fg-disabled_subtle")} />
|
|
37
|
-
),
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
interface DropdownItemProps extends AriaListBoxItemProps<SelectValueType> {
|
|
41
|
-
item: SelectValueType;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export const DropdownItem = ({ item, className, ...props }: DropdownItemProps) => {
|
|
45
|
-
const { type, size } = useContext(SelectContext);
|
|
46
|
-
const listItem = { ...item, icon: item?.icon };
|
|
47
|
-
|
|
48
|
-
const sizes = {
|
|
49
|
-
sm: "p-2 pr-2.5",
|
|
50
|
-
md: "p-2.5 pl-2",
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const Icon = icons[type];
|
|
54
|
-
|
|
55
|
-
const textValue = listItem?.supportingText ? listItem.label + " " + listItem.supportingText : listItem.label;
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<AriaListBoxItem
|
|
59
|
-
value={listItem}
|
|
60
|
-
id={listItem.value}
|
|
61
|
-
key={listItem.value}
|
|
62
|
-
textValue={textValue}
|
|
63
|
-
isDisabled={listItem.isDisabled}
|
|
64
|
-
{...props}
|
|
65
|
-
className={(states) => cx("w-full px-1.5 py-px outline-hidden", typeof className === "function" ? className(states) : className)}
|
|
66
|
-
>
|
|
67
|
-
{({ isSelected, isFocused, isFocusVisible, isHovered, isDisabled }) => (
|
|
68
|
-
<div
|
|
69
|
-
className={cx(
|
|
70
|
-
"flex cursor-pointer items-center gap-2 rounded-md outline-hidden select-none",
|
|
71
|
-
(isSelected || isHovered) && "bg-active",
|
|
72
|
-
isDisabled && "cursor-not-allowed",
|
|
73
|
-
isFocused && "bg-primary_hover",
|
|
74
|
-
isFocusVisible && "ring-2 ring-focus-ring ring-inset",
|
|
75
|
-
sizes[size],
|
|
76
|
-
)}
|
|
77
|
-
>
|
|
78
|
-
{"avatarUrl" in listItem ? <Avatar aria-hidden="true" size="xs" src={listItem.avatarUrl} alt={listItem.label} /> : <Icon {...listItem} />}
|
|
79
|
-
|
|
80
|
-
<section className="flex w-full min-w-0 flex-1 flex-wrap gap-x-2">
|
|
81
|
-
<Text slot="label" className={cx("truncate tt-md-md whitespace-nowrap text-primary", isDisabled && "text-disabled")}>
|
|
82
|
-
{listItem.label}
|
|
83
|
-
</Text>
|
|
84
|
-
|
|
85
|
-
{listItem?.supportingText && (
|
|
86
|
-
<Text slot="description" className={cx("tt-md whitespace-nowrap text-tertiary", isDisabled && "text-disabled")}>
|
|
87
|
-
{listItem.supportingText}
|
|
88
|
-
</Text>
|
|
89
|
-
)}
|
|
90
|
-
</section>
|
|
91
|
-
{isSelected && <Check className={cx("ml-auto size-5 text-fg-brand-primary", isDisabled && "text-fg-disabled")} aria-hidden="true" />}
|
|
92
|
-
</div>
|
|
93
|
-
)}
|
|
94
|
-
</AriaListBoxItem>
|
|
95
|
-
);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export default DropdownItem;
|