@mdigital_ui/ui 0.2.5 → 0.2.6
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/accordion/index.js +3 -3
- package/dist/badge/index.js +3 -3
- package/dist/breadcrumbs/index.js +5 -5
- package/dist/button/index.js +4 -4
- package/dist/button-group/index.js +2 -2
- package/dist/card/index.js +2 -2
- package/dist/carousel/index.js +2 -1
- package/dist/cascader/index.js +2 -2
- package/dist/chart/index.js +2 -2
- package/dist/checkbox/index.js +3 -3
- package/dist/checkbox-group/index.js +2 -2
- package/dist/chunk-22FIGRGO.js +312 -0
- package/dist/chunk-22FIGRGO.js.map +1 -0
- package/dist/{chunk-GEWR5ROK.js → chunk-23BPDLT4.js} +9 -16
- package/dist/chunk-23BPDLT4.js.map +1 -0
- package/dist/{chunk-YNNAOXU5.js → chunk-2OGZENFC.js} +3 -4
- package/dist/chunk-2OGZENFC.js.map +1 -0
- package/dist/{chunk-SOV4PE3P.js → chunk-35K7N4JT.js} +11 -4
- package/dist/chunk-35K7N4JT.js.map +1 -0
- package/dist/chunk-3QKPSJTV.js +120 -0
- package/dist/chunk-3QKPSJTV.js.map +1 -0
- package/dist/chunk-3WVJE5MF.js +735 -0
- package/dist/chunk-3WVJE5MF.js.map +1 -0
- package/dist/chunk-555KXZRK.js +73 -0
- package/dist/chunk-555KXZRK.js.map +1 -0
- package/dist/{chunk-FYHQDFKE.js → chunk-6IPISGTP.js} +31 -9
- package/dist/chunk-6IPISGTP.js.map +1 -0
- package/dist/chunk-6MYKJE6A.js +312 -0
- package/dist/chunk-6MYKJE6A.js.map +1 -0
- package/dist/{chunk-6V5I5HJ2.js → chunk-6PFBSVLK.js} +4 -4
- package/dist/{chunk-6V5I5HJ2.js.map → chunk-6PFBSVLK.js.map} +1 -1
- package/dist/{chunk-267WNY3E.js → chunk-77YTCM7G.js} +53 -60
- package/dist/chunk-77YTCM7G.js.map +1 -0
- package/dist/{chunk-XMAH5PDW.js → chunk-7BUNJYZO.js} +11 -10
- package/dist/chunk-7BUNJYZO.js.map +1 -0
- package/dist/chunk-7ODPSHIQ.js +78 -0
- package/dist/chunk-7ODPSHIQ.js.map +1 -0
- package/dist/{chunk-ZNJ7M5QK.js → chunk-7TN4PGYF.js} +29 -22
- package/dist/chunk-7TN4PGYF.js.map +1 -0
- package/dist/{chunk-RPAQAZTI.js → chunk-7YPX6NJK.js} +3 -3
- package/dist/{chunk-RPAQAZTI.js.map → chunk-7YPX6NJK.js.map} +1 -1
- package/dist/{chunk-LEKLQR4I.js → chunk-ARK3EROZ.js} +55 -38
- package/dist/chunk-ARK3EROZ.js.map +1 -0
- package/dist/chunk-AVPPV5OM.js +203 -0
- package/dist/chunk-AVPPV5OM.js.map +1 -0
- package/dist/{chunk-NNSS366W.js → chunk-BYWYC7RC.js} +38 -5
- package/dist/chunk-BYWYC7RC.js.map +1 -0
- package/dist/{chunk-R225A5II.js → chunk-C2MZL644.js} +3 -3
- package/dist/{chunk-R225A5II.js.map → chunk-C2MZL644.js.map} +1 -1
- package/dist/{chunk-7PKVBUGL.js → chunk-CPPFXCNB.js} +3 -3
- package/dist/{chunk-7PKVBUGL.js.map → chunk-CPPFXCNB.js.map} +1 -1
- package/dist/chunk-DP6AWUH5.js +93 -0
- package/dist/chunk-DP6AWUH5.js.map +1 -0
- package/dist/{chunk-D3JWPGCA.js → chunk-DV5J5NLI.js} +6 -55
- package/dist/chunk-DV5J5NLI.js.map +1 -0
- package/dist/chunk-EFMKUCGX.js +104 -0
- package/dist/chunk-EFMKUCGX.js.map +1 -0
- package/dist/chunk-GFQXGLFD.js +256 -0
- package/dist/chunk-GFQXGLFD.js.map +1 -0
- package/dist/{chunk-SK5ECBBK.js → chunk-GGREAJO5.js} +8 -4
- package/dist/chunk-GGREAJO5.js.map +1 -0
- package/dist/{chunk-S5XJXU52.js → chunk-GH3CNX5N.js} +3 -3
- package/dist/{chunk-S5XJXU52.js.map → chunk-GH3CNX5N.js.map} +1 -1
- package/dist/{chunk-FCMVKFVV.js → chunk-HBEJ4S2Y.js} +11 -11
- package/dist/chunk-HBEJ4S2Y.js.map +1 -0
- package/dist/{chunk-SAVE5ACL.js → chunk-HWSLJGT7.js} +3 -3
- package/dist/{chunk-SAVE5ACL.js.map → chunk-HWSLJGT7.js.map} +1 -1
- package/dist/{chunk-BNILRB4T.js → chunk-IHKPZOE5.js} +10 -7
- package/dist/chunk-IHKPZOE5.js.map +1 -0
- package/dist/{chunk-I5ANSIDK.js → chunk-INH7KYCK.js} +17 -17
- package/dist/chunk-INH7KYCK.js.map +1 -0
- package/dist/{chunk-Y5A26EGR.js → chunk-IRNJZ754.js} +9 -9
- package/dist/{chunk-Y5A26EGR.js.map → chunk-IRNJZ754.js.map} +1 -1
- package/dist/{chunk-MLDX3Z67.js → chunk-IUUEYOMN.js} +3 -3
- package/dist/{chunk-MLDX3Z67.js.map → chunk-IUUEYOMN.js.map} +1 -1
- package/dist/chunk-JFGLDCAK.js +225 -0
- package/dist/chunk-JFGLDCAK.js.map +1 -0
- package/dist/{chunk-C7SXY3ZV.js → chunk-JGQOEAWL.js} +3 -3
- package/dist/{chunk-C7SXY3ZV.js.map → chunk-JGQOEAWL.js.map} +1 -1
- package/dist/{chunk-75XESYGN.js → chunk-L6EVOPWH.js} +5 -13
- package/dist/chunk-L6EVOPWH.js.map +1 -0
- package/dist/{chunk-XMKNYG7I.js → chunk-LSQLUYTD.js} +35 -24
- package/dist/chunk-LSQLUYTD.js.map +1 -0
- package/dist/{chunk-QPJL66S7.js → chunk-MDY3HCRC.js} +80 -41
- package/dist/chunk-MDY3HCRC.js.map +1 -0
- package/dist/chunk-MLNIKNLI.js +150 -0
- package/dist/chunk-MLNIKNLI.js.map +1 -0
- package/dist/{chunk-J3G5WWGR.js → chunk-NQB4V5P7.js} +6 -14
- package/dist/chunk-NQB4V5P7.js.map +1 -0
- package/dist/chunk-NZA526GC.js +106 -0
- package/dist/chunk-NZA526GC.js.map +1 -0
- package/dist/{chunk-FGWSUPVW.js → chunk-O2VJ6KP4.js} +8 -3
- package/dist/chunk-O2VJ6KP4.js.map +1 -0
- package/dist/{chunk-OALOWWO7.js → chunk-PQZB43VJ.js} +32 -36
- package/dist/chunk-PQZB43VJ.js.map +1 -0
- package/dist/{chunk-UAMFKX6L.js → chunk-QVCGNOBE.js} +34 -20
- package/dist/chunk-QVCGNOBE.js.map +1 -0
- package/dist/{chunk-ASW7TEAN.js → chunk-R2FZO7AM.js} +14 -14
- package/dist/chunk-R2FZO7AM.js.map +1 -0
- package/dist/{chunk-HUVXKOJC.js → chunk-SGMIDNPI.js} +13 -9
- package/dist/chunk-SGMIDNPI.js.map +1 -0
- package/dist/{chunk-DOKTHDG3.js → chunk-SMVVCZNM.js} +3 -3
- package/dist/{chunk-DOKTHDG3.js.map → chunk-SMVVCZNM.js.map} +1 -1
- package/dist/{chunk-FPOXTCYV.js → chunk-SOIF4SHB.js} +8 -8
- package/dist/chunk-SOIF4SHB.js.map +1 -0
- package/dist/{chunk-RMGIO27V.js → chunk-SYDNDYZJ.js} +20 -4
- package/dist/chunk-SYDNDYZJ.js.map +1 -0
- package/dist/chunk-TG2AECIN.js +446 -0
- package/dist/chunk-TG2AECIN.js.map +1 -0
- package/dist/{chunk-JLTDJ3VZ.js → chunk-TIMRHEKH.js} +4 -4
- package/dist/{chunk-JLTDJ3VZ.js.map → chunk-TIMRHEKH.js.map} +1 -1
- package/dist/chunk-TUTOU4X6.js +574 -0
- package/dist/chunk-TUTOU4X6.js.map +1 -0
- package/dist/chunk-TWZ5LXLL.js +254 -0
- package/dist/chunk-TWZ5LXLL.js.map +1 -0
- package/dist/{chunk-DPOSWW22.js → chunk-XG3KLPPS.js} +5 -3
- package/dist/chunk-XG3KLPPS.js.map +1 -0
- package/dist/{chunk-BP434VYV.js → chunk-Y2CXG3PT.js} +12 -12
- package/dist/chunk-Y2CXG3PT.js.map +1 -0
- package/dist/{chunk-ROR4E6IE.js → chunk-YII4K64U.js} +5 -5
- package/dist/{chunk-ROR4E6IE.js.map → chunk-YII4K64U.js.map} +1 -1
- package/dist/clipboard/index.js +2 -2
- package/dist/collapse/index.js +2 -2
- package/dist/command/index.js +3 -3
- package/dist/date-picker/index.js +4 -3
- package/dist/descriptions/index.js +2 -2
- package/dist/drawer/index.js +2 -2
- package/dist/dropdown/index.js +4 -3
- package/dist/empty/index.js +2 -2
- package/dist/fetching-overlay/index.js +4 -3
- package/dist/grid/index.js +2 -2
- package/dist/image/index.js +2 -2
- package/dist/index.d.ts +1358 -156
- package/dist/index.js +762 -65
- package/dist/index.js.map +1 -1
- package/dist/input/index.js +4 -3
- package/dist/input-group/index.js +2 -2
- package/dist/input-otp/index.js +2 -2
- package/dist/input-password/index.js +5 -4
- package/dist/kbd/index.js +3 -2
- package/dist/modal/index.js +2 -2
- package/dist/multi-select/index.js +4 -3
- package/dist/notification/index.js +3 -2
- package/dist/pagination/index.js +2 -2
- package/dist/popover/index.js +3 -2
- package/dist/progress/index.js +2 -2
- package/dist/radio/index.js +3 -2
- package/dist/radio-group/index.js +2 -2
- package/dist/rating/index.js +2 -2
- package/dist/ribbon/index.js +2 -2
- package/dist/select/index.js +5 -4
- package/dist/skeleton/index.js +3 -2
- package/dist/slider/index.js +2 -2
- package/dist/spinner/index.js +3 -2
- package/dist/stepper/index.js +2 -2
- package/dist/styles/base.css +2033 -1313
- package/dist/styles/global.css +1242 -459
- package/dist/switch/index.js +3 -2
- package/dist/table/index.js +10 -10
- package/dist/tabs/index.js +3 -3
- package/dist/textarea/index.js +2 -2
- package/dist/toggle/index.js +2 -2
- package/dist/toggle-group/index.js +2 -2
- package/dist/tooltip/index.js +3 -2
- package/dist/transfer/index.js +4 -4
- package/dist/tree/index.js +2 -2
- package/dist/tree-select/index.js +5 -4
- package/dist/upload/index.js +2 -2
- package/package.json +3 -1
- package/dist/chunk-267WNY3E.js.map +0 -1
- package/dist/chunk-2EKAF6EJ.js +0 -128
- package/dist/chunk-2EKAF6EJ.js.map +0 -1
- package/dist/chunk-3PFA3YG6.js +0 -228
- package/dist/chunk-3PFA3YG6.js.map +0 -1
- package/dist/chunk-56IXGP5C.js +0 -56
- package/dist/chunk-56IXGP5C.js.map +0 -1
- package/dist/chunk-5UEWVFF6.js +0 -212
- package/dist/chunk-5UEWVFF6.js.map +0 -1
- package/dist/chunk-75XESYGN.js.map +0 -1
- package/dist/chunk-ASW7TEAN.js.map +0 -1
- package/dist/chunk-AWPKZYHT.js +0 -152
- package/dist/chunk-AWPKZYHT.js.map +0 -1
- package/dist/chunk-BFO3ARVJ.js +0 -104
- package/dist/chunk-BFO3ARVJ.js.map +0 -1
- package/dist/chunk-BNILRB4T.js.map +0 -1
- package/dist/chunk-BP434VYV.js.map +0 -1
- package/dist/chunk-C3MX5EXL.js +0 -95
- package/dist/chunk-C3MX5EXL.js.map +0 -1
- package/dist/chunk-D3JWPGCA.js.map +0 -1
- package/dist/chunk-DPOSWW22.js.map +0 -1
- package/dist/chunk-FCMVKFVV.js.map +0 -1
- package/dist/chunk-FGWSUPVW.js.map +0 -1
- package/dist/chunk-FPOXTCYV.js.map +0 -1
- package/dist/chunk-FYHQDFKE.js.map +0 -1
- package/dist/chunk-G6TAVRTJ.js +0 -640
- package/dist/chunk-G6TAVRTJ.js.map +0 -1
- package/dist/chunk-GEWR5ROK.js.map +0 -1
- package/dist/chunk-HUVXKOJC.js.map +0 -1
- package/dist/chunk-I5ANSIDK.js.map +0 -1
- package/dist/chunk-J3G5WWGR.js.map +0 -1
- package/dist/chunk-KBCBVH7B.js +0 -51
- package/dist/chunk-KBCBVH7B.js.map +0 -1
- package/dist/chunk-KNQ7UQ2W.js +0 -143
- package/dist/chunk-KNQ7UQ2W.js.map +0 -1
- package/dist/chunk-KTAIRCOL.js +0 -100
- package/dist/chunk-KTAIRCOL.js.map +0 -1
- package/dist/chunk-LEKLQR4I.js.map +0 -1
- package/dist/chunk-NNSS366W.js.map +0 -1
- package/dist/chunk-OALOWWO7.js.map +0 -1
- package/dist/chunk-OOS3B7YZ.js +0 -94
- package/dist/chunk-OOS3B7YZ.js.map +0 -1
- package/dist/chunk-OQANRZPV.js +0 -197
- package/dist/chunk-OQANRZPV.js.map +0 -1
- package/dist/chunk-OW5A5IIF.js +0 -175
- package/dist/chunk-OW5A5IIF.js.map +0 -1
- package/dist/chunk-QPJL66S7.js.map +0 -1
- package/dist/chunk-RMGIO27V.js.map +0 -1
- package/dist/chunk-SK5ECBBK.js.map +0 -1
- package/dist/chunk-SOV4PE3P.js.map +0 -1
- package/dist/chunk-UAMFKX6L.js.map +0 -1
- package/dist/chunk-XMAH5PDW.js.map +0 -1
- package/dist/chunk-XMKNYG7I.js.map +0 -1
- package/dist/chunk-YNNAOXU5.js.map +0 -1
- package/dist/chunk-YZ6V6BQ7.js +0 -134
- package/dist/chunk-YZ6V6BQ7.js.map +0 -1
- package/dist/chunk-YZVSDRJD.js +0 -253
- package/dist/chunk-YZVSDRJD.js.map +0 -1
- package/dist/chunk-ZNJ7M5QK.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,63 +1,642 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export { textarea_default as Textarea } from './chunk-
|
|
13
|
-
export {
|
|
14
|
-
export { progress_default as Progress } from './chunk-
|
|
15
|
-
export { radio_default as Radio } from './chunk-
|
|
16
|
-
export { radio_group_default as RadioGroup } from './chunk-
|
|
17
|
-
export { rating_default as Rating } from './chunk-
|
|
18
|
-
export { ribbon_default as Ribbon } from './chunk-
|
|
19
|
-
export { select_default as Select } from './chunk-
|
|
20
|
-
export { skeleton_default as Skeleton } from './chunk-
|
|
21
|
-
export { input_group_default as InputGroup } from './chunk-
|
|
22
|
-
export { input_otp_default as InputOTP } from './chunk-
|
|
23
|
-
export { input_password_default as InputPassword } from './chunk-
|
|
24
|
-
export { kbd_default as Kbd } from './chunk-
|
|
25
|
-
export { multi_select_default as MultiSelect } from './chunk-
|
|
26
|
-
export { notification_default as Notification } from './chunk-
|
|
27
|
-
export { pagination_default as Pagination } from './chunk-
|
|
28
|
-
export { descriptions_default as Descriptions } from './chunk-
|
|
29
|
-
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from './chunk-
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export { input_default as Input } from './chunk-
|
|
35
|
-
export { cascader_default as Cascader } from './chunk-
|
|
36
|
-
export { AreaChart, BarChart, ComposedChart, LineChart, PieChart } from './chunk-
|
|
37
|
-
export { checkbox_default as Checkbox } from './chunk-
|
|
38
|
-
export { checkbox_group_default as CheckboxGroup } from './chunk-
|
|
39
|
-
export { clipboard_default as Clipboard } from './chunk-
|
|
40
|
-
export { collapse_default as Collapse } from './chunk-
|
|
41
|
-
export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandModal, CommandSeparator, CommandShortcut } from './chunk-
|
|
42
|
-
export { modal_default as Modal } from './chunk-
|
|
43
|
-
export { DatePicker, RangePickerComponent as RangePicker, TimePickerComponent as TimePicker } from './chunk-
|
|
44
|
-
export { accordion_default as Accordion } from './chunk-
|
|
45
|
-
export { badge_default as Badge } from './chunk-
|
|
46
|
-
export { breadcrumbs_default as Breadcrumbs } from './chunk-
|
|
47
|
-
export { dropdown_default as Dropdown } from './chunk-
|
|
48
|
-
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './chunk-
|
|
49
|
-
export { button_default as Button } from './chunk-
|
|
50
|
-
export { spinner_default as Spinner } from './chunk-
|
|
51
|
-
|
|
52
|
-
export {
|
|
53
|
-
export {
|
|
54
|
-
|
|
55
|
-
export {
|
|
56
|
-
|
|
1
|
+
export { toggle_default as Toggle } from './chunk-XG3KLPPS.js';
|
|
2
|
+
export { tooltip_default as Tooltip } from './chunk-DV5J5NLI.js';
|
|
3
|
+
export { Transfer } from './chunk-HBEJ4S2Y.js';
|
|
4
|
+
export { tree_select_default as TreeSelect } from './chunk-R2FZO7AM.js';
|
|
5
|
+
export { tree_default as Tree } from './chunk-HWSLJGT7.js';
|
|
6
|
+
export { upload_default as Upload } from './chunk-INH7KYCK.js';
|
|
7
|
+
export { slider_default as Slider } from './chunk-BYWYC7RC.js';
|
|
8
|
+
export { stepper_default as Stepper } from './chunk-IUUEYOMN.js';
|
|
9
|
+
export { switch_default as Switch } from './chunk-JFGLDCAK.js';
|
|
10
|
+
export { tabs_default as Tabs } from './chunk-GFQXGLFD.js';
|
|
11
|
+
export { table_default as Table } from './chunk-7TN4PGYF.js';
|
|
12
|
+
export { textarea_default as Textarea } from './chunk-SOIF4SHB.js';
|
|
13
|
+
export { toggle_group_default as ToggleGroup } from './chunk-GGREAJO5.js';
|
|
14
|
+
export { progress_default as Progress } from './chunk-TIMRHEKH.js';
|
|
15
|
+
export { radio_default as Radio } from './chunk-23BPDLT4.js';
|
|
16
|
+
export { radio_group_default as RadioGroup } from './chunk-SMVVCZNM.js';
|
|
17
|
+
export { rating_default as Rating } from './chunk-6IPISGTP.js';
|
|
18
|
+
export { ribbon_default as Ribbon } from './chunk-JGQOEAWL.js';
|
|
19
|
+
export { select_default as Select } from './chunk-QVCGNOBE.js';
|
|
20
|
+
export { skeleton_default as Skeleton } from './chunk-L6EVOPWH.js';
|
|
21
|
+
export { input_group_default as InputGroup } from './chunk-DP6AWUH5.js';
|
|
22
|
+
export { input_otp_default as InputOTP } from './chunk-C2MZL644.js';
|
|
23
|
+
export { input_password_default as InputPassword } from './chunk-6PFBSVLK.js';
|
|
24
|
+
export { kbd_default as Kbd } from './chunk-555KXZRK.js';
|
|
25
|
+
export { multi_select_default as MultiSelect } from './chunk-77YTCM7G.js';
|
|
26
|
+
export { notification_default as Notification } from './chunk-NZA526GC.js';
|
|
27
|
+
export { pagination_default as Pagination } from './chunk-O2VJ6KP4.js';
|
|
28
|
+
export { descriptions_default as Descriptions } from './chunk-GH3CNX5N.js';
|
|
29
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from './chunk-6MYKJE6A.js';
|
|
30
|
+
export { empty_default as Empty } from './chunk-YII4K64U.js';
|
|
31
|
+
export { fetching_overlay_default as FetchingOverlay } from './chunk-IHKPZOE5.js';
|
|
32
|
+
export { grid_default as Grid } from './chunk-CPPFXCNB.js';
|
|
33
|
+
export { image_default as Image } from './chunk-7BUNJYZO.js';
|
|
34
|
+
export { input_default as Input } from './chunk-LSQLUYTD.js';
|
|
35
|
+
export { cascader_default as Cascader } from './chunk-3WVJE5MF.js';
|
|
36
|
+
export { AreaChart, BarChart, ComposedChart, LineChart, PieChart } from './chunk-Y2CXG3PT.js';
|
|
37
|
+
export { checkbox_default as Checkbox } from './chunk-PQZB43VJ.js';
|
|
38
|
+
export { checkbox_group_default as CheckboxGroup } from './chunk-7YPX6NJK.js';
|
|
39
|
+
export { clipboard_default as Clipboard } from './chunk-SYDNDYZJ.js';
|
|
40
|
+
export { collapse_default as Collapse } from './chunk-35K7N4JT.js';
|
|
41
|
+
export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandModal, CommandSeparator, CommandShortcut } from './chunk-ARK3EROZ.js';
|
|
42
|
+
export { modal_default as Modal } from './chunk-IRNJZ754.js';
|
|
43
|
+
export { DatePicker, RangePickerComponent as RangePicker, TimePickerComponent as TimePicker } from './chunk-MDY3HCRC.js';
|
|
44
|
+
export { accordion_default as Accordion } from './chunk-22FIGRGO.js';
|
|
45
|
+
export { badge_default as Badge } from './chunk-AVPPV5OM.js';
|
|
46
|
+
export { breadcrumbs_default as Breadcrumbs } from './chunk-SGMIDNPI.js';
|
|
47
|
+
export { dropdown_default as Dropdown } from './chunk-TWZ5LXLL.js';
|
|
48
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from './chunk-EFMKUCGX.js';
|
|
49
|
+
export { button_default as Button } from './chunk-MLNIKNLI.js';
|
|
50
|
+
export { spinner_default as Spinner } from './chunk-NQB4V5P7.js';
|
|
51
|
+
import { createAllColorVariants, componentColors } from './chunk-TUTOU4X6.js';
|
|
52
|
+
export { bgColorClasses, bgSkeletonColorClasses, bgSoftColorClasses, borderColorClasses, buttonColors, checkboxBorderColorClasses, checkedColorClasses, commonSpacing, componentColors, componentSizeVariants, createAllColorVariants, createDashedColorVariants, createDefaultColorVariants, createGhostColorVariants, createKbdColorVariants, createKbdOutlineColorVariants, createKbdSoftColorVariants, createKbdSolidColorVariants, createLinkColorVariants, createNotificationColorVariants, createNotificationOutlinedColorVariants, createNotificationSoftColorVariants, createNotificationSolidColorVariants, createOutlineColorVariants, createPopoverColorVariants, createPopoverDefaultColorVariants, createPopoverSoftColorVariants, createPopoverSolidColorVariants, createSoftColorVariants, createSolidColorVariants, createTooltipSoftColorVariants, focusRingColorClasses, getAccordionColorClass, getCheckboxColorClass, getIconColorClass, iconColorClasses, radioCheckedColorClasses, switchTrackColorClasses, textColorClasses, textColorVariants, textForegroundColorClasses, tooltipSolidColorClasses } from './chunk-TUTOU4X6.js';
|
|
53
|
+
export { button_group_default as ButtonGroup } from './chunk-7ODPSHIQ.js';
|
|
54
|
+
export { card_default as Card } from './chunk-TG2AECIN.js';
|
|
55
|
+
export { carousel_default as Carousel } from './chunk-3QKPSJTV.js';
|
|
56
|
+
import { cn } from './chunk-2OGZENFC.js';
|
|
57
|
+
export { cn, getValidationStatus, iconSizes } from './chunk-2OGZENFC.js';
|
|
57
58
|
import { cva } from 'class-variance-authority';
|
|
58
|
-
import React from 'react';
|
|
59
|
+
import React, { useState, useEffect, useCallback, useRef } from 'react';
|
|
59
60
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
61
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
62
|
+
import { X, ChevronRight } from 'lucide-react';
|
|
60
63
|
|
|
64
|
+
var avatarVariants = cva(
|
|
65
|
+
"relative inline-flex items-center justify-center font-medium select-none shrink-0",
|
|
66
|
+
{
|
|
67
|
+
variants: {
|
|
68
|
+
size: {
|
|
69
|
+
xs: "size-6 text-xs",
|
|
70
|
+
sm: "size-8 text-sm",
|
|
71
|
+
md: "size-10 text-base",
|
|
72
|
+
lg: "size-12 text-lg"
|
|
73
|
+
},
|
|
74
|
+
shape: {
|
|
75
|
+
circle: "rounded-full",
|
|
76
|
+
square: "rounded-lg"
|
|
77
|
+
},
|
|
78
|
+
color: {
|
|
79
|
+
default: "bg-surface text-text-primary",
|
|
80
|
+
primary: "bg-primary/10 text-primary",
|
|
81
|
+
secondary: "bg-secondary/10 text-secondary",
|
|
82
|
+
accent: "bg-accent/10 text-accent",
|
|
83
|
+
success: "bg-success/10 text-success",
|
|
84
|
+
error: "bg-error/10 text-error",
|
|
85
|
+
warning: "bg-warning/10 text-warning",
|
|
86
|
+
info: "bg-info/10 text-info"
|
|
87
|
+
},
|
|
88
|
+
bordered: {
|
|
89
|
+
true: "ring-2 ring-background",
|
|
90
|
+
false: ""
|
|
91
|
+
},
|
|
92
|
+
disabled: {
|
|
93
|
+
true: "opacity-50 cursor-not-allowed",
|
|
94
|
+
false: ""
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
defaultVariants: {
|
|
98
|
+
size: "md",
|
|
99
|
+
shape: "circle",
|
|
100
|
+
color: "default",
|
|
101
|
+
bordered: false,
|
|
102
|
+
disabled: false
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
var statusSizeClasses = {
|
|
107
|
+
xs: "size-1.5",
|
|
108
|
+
sm: "size-2",
|
|
109
|
+
md: "size-2.5",
|
|
110
|
+
lg: "size-3"
|
|
111
|
+
};
|
|
112
|
+
var statusColorClasses = {
|
|
113
|
+
online: "bg-success",
|
|
114
|
+
offline: "bg-border",
|
|
115
|
+
away: "bg-warning",
|
|
116
|
+
busy: "bg-error"
|
|
117
|
+
};
|
|
118
|
+
var badgeSizeClasses = {
|
|
119
|
+
xs: "min-w-3 h-3 text-[8px]",
|
|
120
|
+
sm: "min-w-4 h-4 text-[10px]",
|
|
121
|
+
md: "min-w-5 h-5 text-xs",
|
|
122
|
+
lg: "min-w-6 h-6 text-xs"
|
|
123
|
+
};
|
|
124
|
+
var overlapClasses = {
|
|
125
|
+
xs: "-space-x-1",
|
|
126
|
+
sm: "-space-x-1.5",
|
|
127
|
+
md: "-space-x-2",
|
|
128
|
+
lg: "-space-x-2.5"
|
|
129
|
+
};
|
|
130
|
+
function getInitialsFromName(name) {
|
|
131
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
132
|
+
if (words.length === 0) return "";
|
|
133
|
+
const firstWord = words[0];
|
|
134
|
+
if (words.length === 1 && firstWord) {
|
|
135
|
+
return firstWord.slice(0, 2).toUpperCase();
|
|
136
|
+
}
|
|
137
|
+
const lastWord = words[words.length - 1];
|
|
138
|
+
const firstInitial = firstWord?.[0] ?? "";
|
|
139
|
+
const lastInitial = lastWord?.[0] ?? "";
|
|
140
|
+
return (firstInitial + lastInitial).toUpperCase();
|
|
141
|
+
}
|
|
142
|
+
var DefaultUserIcon = () => /* @__PURE__ */ jsx(
|
|
143
|
+
"svg",
|
|
144
|
+
{
|
|
145
|
+
className: "size-[60%] text-text-secondary",
|
|
146
|
+
fill: "currentColor",
|
|
147
|
+
viewBox: "0 0 24 24",
|
|
148
|
+
role: "img",
|
|
149
|
+
"aria-hidden": "true",
|
|
150
|
+
children: /* @__PURE__ */ jsx("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" })
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
var Avatar = React.memo(
|
|
154
|
+
({
|
|
155
|
+
src,
|
|
156
|
+
alt = "",
|
|
157
|
+
fallback,
|
|
158
|
+
name,
|
|
159
|
+
size = "md",
|
|
160
|
+
shape = "circle",
|
|
161
|
+
status,
|
|
162
|
+
color = "default",
|
|
163
|
+
bordered = false,
|
|
164
|
+
icon,
|
|
165
|
+
badge,
|
|
166
|
+
disabled = false,
|
|
167
|
+
className,
|
|
168
|
+
onError,
|
|
169
|
+
ref,
|
|
170
|
+
...props
|
|
171
|
+
}) => {
|
|
172
|
+
const [imageError, setImageError] = useState(false);
|
|
173
|
+
useEffect(() => {
|
|
174
|
+
setImageError(false);
|
|
175
|
+
}, [src]);
|
|
176
|
+
const handleImageError = (e) => {
|
|
177
|
+
setImageError(true);
|
|
178
|
+
onError?.(e);
|
|
179
|
+
};
|
|
180
|
+
const getInitials = () => {
|
|
181
|
+
if (fallback) return fallback.slice(0, 2).toUpperCase();
|
|
182
|
+
if (name) return getInitialsFromName(name);
|
|
183
|
+
return "";
|
|
184
|
+
};
|
|
185
|
+
const showImage = src && !imageError;
|
|
186
|
+
const initials = getInitials();
|
|
187
|
+
const showFallback = !showImage && (initials || icon);
|
|
188
|
+
const showDefaultIcon = !showImage && !showFallback;
|
|
189
|
+
return /* @__PURE__ */ jsxs(
|
|
190
|
+
"div",
|
|
191
|
+
{
|
|
192
|
+
ref,
|
|
193
|
+
className: cn(
|
|
194
|
+
avatarVariants({
|
|
195
|
+
size,
|
|
196
|
+
shape,
|
|
197
|
+
color: showImage ? "default" : color,
|
|
198
|
+
bordered,
|
|
199
|
+
disabled
|
|
200
|
+
}),
|
|
201
|
+
// Apply overflow-hidden only when no badge/status to prevent clipping
|
|
202
|
+
!badge && !status && "overflow-hidden",
|
|
203
|
+
className
|
|
204
|
+
),
|
|
205
|
+
"aria-disabled": disabled || void 0,
|
|
206
|
+
...props,
|
|
207
|
+
children: [
|
|
208
|
+
showImage && /* @__PURE__ */ jsx(
|
|
209
|
+
"img",
|
|
210
|
+
{
|
|
211
|
+
src,
|
|
212
|
+
alt: alt || name || "User avatar",
|
|
213
|
+
onError: handleImageError,
|
|
214
|
+
className: cn(
|
|
215
|
+
"size-full object-cover",
|
|
216
|
+
shape === "circle" ? "rounded-full" : "rounded-lg"
|
|
217
|
+
),
|
|
218
|
+
loading: "lazy"
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
showFallback && (icon ? /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center size-[60%]", children: icon }) : /* @__PURE__ */ jsx("span", { "aria-label": `Avatar for ${name || initials}`, children: initials })),
|
|
222
|
+
showDefaultIcon && /* @__PURE__ */ jsx(DefaultUserIcon, {}),
|
|
223
|
+
status && /* @__PURE__ */ jsx(
|
|
224
|
+
"span",
|
|
225
|
+
{
|
|
226
|
+
className: cn(
|
|
227
|
+
"absolute bottom-0 right-0 rounded-full ring-2 ring-background",
|
|
228
|
+
statusSizeClasses[size],
|
|
229
|
+
statusColorClasses[status]
|
|
230
|
+
),
|
|
231
|
+
"aria-label": `Status: ${status}`
|
|
232
|
+
}
|
|
233
|
+
),
|
|
234
|
+
badge && /* @__PURE__ */ jsx(
|
|
235
|
+
"span",
|
|
236
|
+
{
|
|
237
|
+
className: cn(
|
|
238
|
+
"absolute -top-1 -right-1 flex items-center justify-center rounded-full bg-error text-white font-medium px-1",
|
|
239
|
+
badgeSizeClasses[size]
|
|
240
|
+
),
|
|
241
|
+
"aria-label": typeof badge === "number" ? `${badge} notifications` : void 0,
|
|
242
|
+
role: typeof badge === "number" ? "status" : void 0,
|
|
243
|
+
children: badge
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
);
|
|
251
|
+
Avatar.displayName = "Avatar";
|
|
252
|
+
var AvatarGroup = React.memo(
|
|
253
|
+
({
|
|
254
|
+
children,
|
|
255
|
+
max,
|
|
256
|
+
size = "md",
|
|
257
|
+
shape = "circle",
|
|
258
|
+
showTotal = false,
|
|
259
|
+
renderSurplus,
|
|
260
|
+
bordered = false,
|
|
261
|
+
className,
|
|
262
|
+
ref,
|
|
263
|
+
...props
|
|
264
|
+
}) => {
|
|
265
|
+
const childrenArray = React.Children.toArray(children);
|
|
266
|
+
const total = childrenArray.length;
|
|
267
|
+
const visibleChildren = max ? childrenArray.slice(0, max) : childrenArray;
|
|
268
|
+
const remainingCount = max && total > max ? total - max : 0;
|
|
269
|
+
const surplusDisplay = showTotal ? total : remainingCount;
|
|
270
|
+
return /* @__PURE__ */ jsxs(
|
|
271
|
+
"div",
|
|
272
|
+
{
|
|
273
|
+
ref,
|
|
274
|
+
className: cn("flex items-center", overlapClasses[size], className),
|
|
275
|
+
role: "group",
|
|
276
|
+
"aria-label": `Avatar group with ${total} members`,
|
|
277
|
+
...props,
|
|
278
|
+
children: [
|
|
279
|
+
visibleChildren.map((child, index) => {
|
|
280
|
+
if (React.isValidElement(child)) {
|
|
281
|
+
return React.cloneElement(child, {
|
|
282
|
+
key: index,
|
|
283
|
+
size: child.props.size ?? size,
|
|
284
|
+
shape: child.props.shape ?? shape,
|
|
285
|
+
bordered: child.props.bordered ?? bordered ?? true,
|
|
286
|
+
className: cn(child.props.className)
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
return child;
|
|
290
|
+
}),
|
|
291
|
+
remainingCount > 0 && (renderSurplus ? renderSurplus(surplusDisplay) : /* @__PURE__ */ jsx(
|
|
292
|
+
"div",
|
|
293
|
+
{
|
|
294
|
+
className: cn(
|
|
295
|
+
avatarVariants({
|
|
296
|
+
size,
|
|
297
|
+
shape,
|
|
298
|
+
color: "default",
|
|
299
|
+
bordered: true
|
|
300
|
+
}),
|
|
301
|
+
"bg-surface/80 backdrop-blur-sm overflow-hidden"
|
|
302
|
+
),
|
|
303
|
+
"aria-label": showTotal ? `${total} total members` : `${remainingCount} more members`,
|
|
304
|
+
children: /* @__PURE__ */ jsx("span", { className: "text-text-secondary font-medium", children: showTotal ? total : `+${remainingCount}` })
|
|
305
|
+
}
|
|
306
|
+
))
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
AvatarGroup.displayName = "AvatarGroup";
|
|
313
|
+
var ContextMenuSubMenu = ({ item, onClose, level }) => {
|
|
314
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
315
|
+
const hoverTimeoutRef = useRef(void 0);
|
|
316
|
+
const leaveTimeoutRef = useRef(void 0);
|
|
317
|
+
const handleMouseEnter = useCallback(() => {
|
|
318
|
+
if (item.disabled) return;
|
|
319
|
+
if (leaveTimeoutRef.current) {
|
|
320
|
+
clearTimeout(leaveTimeoutRef.current);
|
|
321
|
+
}
|
|
322
|
+
hoverTimeoutRef.current = setTimeout(() => {
|
|
323
|
+
setIsOpen(true);
|
|
324
|
+
}, 200);
|
|
325
|
+
}, [item.disabled]);
|
|
326
|
+
const handleMouseLeave = useCallback(() => {
|
|
327
|
+
if (hoverTimeoutRef.current) {
|
|
328
|
+
clearTimeout(hoverTimeoutRef.current);
|
|
329
|
+
}
|
|
330
|
+
leaveTimeoutRef.current = setTimeout(() => {
|
|
331
|
+
setIsOpen(false);
|
|
332
|
+
}, 300);
|
|
333
|
+
}, []);
|
|
334
|
+
const handleClick = useCallback(
|
|
335
|
+
(e) => {
|
|
336
|
+
if (!item.disabled && !item.children) {
|
|
337
|
+
e.stopPropagation();
|
|
338
|
+
item.onClick?.();
|
|
339
|
+
onClose();
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
[item, onClose]
|
|
343
|
+
);
|
|
344
|
+
useEffect(() => {
|
|
345
|
+
return () => {
|
|
346
|
+
if (hoverTimeoutRef.current) {
|
|
347
|
+
clearTimeout(hoverTimeoutRef.current);
|
|
348
|
+
}
|
|
349
|
+
if (leaveTimeoutRef.current) {
|
|
350
|
+
clearTimeout(leaveTimeoutRef.current);
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
}, []);
|
|
354
|
+
return /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isOpen, onOpenChange: setIsOpen, children: [
|
|
355
|
+
/* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
356
|
+
"div",
|
|
357
|
+
{
|
|
358
|
+
className: "relative",
|
|
359
|
+
onMouseEnter: handleMouseEnter,
|
|
360
|
+
onMouseLeave: handleMouseLeave,
|
|
361
|
+
role: "menuitem",
|
|
362
|
+
"aria-haspopup": "true",
|
|
363
|
+
"aria-expanded": isOpen,
|
|
364
|
+
"aria-disabled": item.disabled,
|
|
365
|
+
tabIndex: -1,
|
|
366
|
+
children: /* @__PURE__ */ jsxs(
|
|
367
|
+
"div",
|
|
368
|
+
{
|
|
369
|
+
className: cn(
|
|
370
|
+
"flex items-center justify-between gap-3 px-3 py-2 text-sm cursor-pointer rounded-sm transition-colors mx-1",
|
|
371
|
+
item.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface focus:bg-surface focus:outline-none"
|
|
372
|
+
),
|
|
373
|
+
onClick: handleClick,
|
|
374
|
+
children: [
|
|
375
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
376
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 w-4 h-4", children: item.icon }),
|
|
377
|
+
/* @__PURE__ */ jsx("span", { children: item.label })
|
|
378
|
+
] }),
|
|
379
|
+
item.children && /* @__PURE__ */ jsx(ChevronRight, { className: "w-4 h-4 text-text-secondary shrink-0" }),
|
|
380
|
+
item.shortcut && /* @__PURE__ */ jsx("span", { className: "text-xs text-text-secondary shrink-0", children: item.shortcut })
|
|
381
|
+
]
|
|
382
|
+
}
|
|
383
|
+
)
|
|
384
|
+
}
|
|
385
|
+
) }),
|
|
386
|
+
item.children && /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
387
|
+
PopoverPrimitive.Content,
|
|
388
|
+
{
|
|
389
|
+
side: "right",
|
|
390
|
+
align: "start",
|
|
391
|
+
sideOffset: 8,
|
|
392
|
+
alignOffset: -8,
|
|
393
|
+
onMouseEnter: handleMouseEnter,
|
|
394
|
+
onMouseLeave: handleMouseLeave,
|
|
395
|
+
className: cn(
|
|
396
|
+
"min-w-[180px] rounded-md border border-border bg-background shadow-lg py-1",
|
|
397
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
398
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
399
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
400
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
401
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
402
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
403
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
404
|
+
"z-[var(--z-popover)]"
|
|
405
|
+
),
|
|
406
|
+
children: /* @__PURE__ */ jsx(ContextMenuContent, { items: item.children, onClose, level: level + 1 })
|
|
407
|
+
}
|
|
408
|
+
) })
|
|
409
|
+
] });
|
|
410
|
+
};
|
|
411
|
+
ContextMenuSubMenu.displayName = "ContextMenuSubMenu";
|
|
412
|
+
var ContextMenuContent = ({
|
|
413
|
+
items,
|
|
414
|
+
onClose,
|
|
415
|
+
level = 0,
|
|
416
|
+
className,
|
|
417
|
+
style,
|
|
418
|
+
setKeyUpHandlers,
|
|
419
|
+
...props
|
|
420
|
+
}) => {
|
|
421
|
+
const menuRef = useRef(null);
|
|
422
|
+
const [focusedIndex, setFocusedIndex] = useState(0);
|
|
423
|
+
const validItems = items.filter((item) => !item.separator && !item.disabled);
|
|
424
|
+
const validItemsRef = useRef(validItems);
|
|
425
|
+
const onCloseRef = useRef(onClose);
|
|
426
|
+
validItemsRef.current = validItems;
|
|
427
|
+
onCloseRef.current = onClose;
|
|
428
|
+
const keyHandlers = useCallback(() => ({
|
|
429
|
+
ArrowDown: () => {
|
|
430
|
+
setFocusedIndex((prev) => {
|
|
431
|
+
const nextIndex = prev + 1;
|
|
432
|
+
return nextIndex >= validItemsRef.current.length ? 0 : nextIndex;
|
|
433
|
+
});
|
|
434
|
+
},
|
|
435
|
+
ArrowUp: () => {
|
|
436
|
+
setFocusedIndex((prev) => {
|
|
437
|
+
const nextIndex = prev - 1;
|
|
438
|
+
return nextIndex < 0 ? validItemsRef.current.length - 1 : nextIndex;
|
|
439
|
+
});
|
|
440
|
+
},
|
|
441
|
+
Enter: () => {
|
|
442
|
+
setFocusedIndex((currentIndex) => {
|
|
443
|
+
if (currentIndex >= 0 && currentIndex < validItemsRef.current.length) {
|
|
444
|
+
const item = validItemsRef.current[currentIndex];
|
|
445
|
+
if (!item?.disabled && !item?.children) {
|
|
446
|
+
item?.onClick?.();
|
|
447
|
+
onCloseRef.current();
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
return currentIndex;
|
|
451
|
+
});
|
|
452
|
+
},
|
|
453
|
+
" ": () => {
|
|
454
|
+
setFocusedIndex((currentIndex) => {
|
|
455
|
+
if (currentIndex >= 0 && currentIndex < validItemsRef.current.length) {
|
|
456
|
+
const item = validItemsRef.current[currentIndex];
|
|
457
|
+
if (!item?.disabled && !item?.children) {
|
|
458
|
+
item?.onClick?.();
|
|
459
|
+
onCloseRef.current();
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
return currentIndex;
|
|
463
|
+
});
|
|
464
|
+
},
|
|
465
|
+
Escape: () => {
|
|
466
|
+
onCloseRef.current();
|
|
467
|
+
},
|
|
468
|
+
ArrowLeft: () => {
|
|
469
|
+
if (level > 0) {
|
|
470
|
+
onCloseRef.current();
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}), [level]);
|
|
474
|
+
useEffect(() => {
|
|
475
|
+
if (setKeyUpHandlers) {
|
|
476
|
+
setKeyUpHandlers(keyHandlers());
|
|
477
|
+
}
|
|
478
|
+
}, [setKeyUpHandlers, keyHandlers]);
|
|
479
|
+
return /* @__PURE__ */ jsx(
|
|
480
|
+
"div",
|
|
481
|
+
{
|
|
482
|
+
ref: menuRef,
|
|
483
|
+
className: cn(
|
|
484
|
+
"min-w-[180px] rounded-md border border-border bg-background shadow-lg py-1",
|
|
485
|
+
level === 0 && "animate-in fade-in-0 zoom-in-95",
|
|
486
|
+
className
|
|
487
|
+
),
|
|
488
|
+
style,
|
|
489
|
+
role: "menu",
|
|
490
|
+
"aria-orientation": "vertical",
|
|
491
|
+
tabIndex: -1,
|
|
492
|
+
...props,
|
|
493
|
+
children: items.map((item, index) => {
|
|
494
|
+
if (item.separator) {
|
|
495
|
+
return /* @__PURE__ */ jsx(
|
|
496
|
+
"div",
|
|
497
|
+
{
|
|
498
|
+
className: "h-px bg-border my-1",
|
|
499
|
+
role: "separator",
|
|
500
|
+
"aria-orientation": "horizontal"
|
|
501
|
+
},
|
|
502
|
+
`separator-${index}`
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
if (item.children) {
|
|
506
|
+
return /* @__PURE__ */ jsx(ContextMenuSubMenu, { item, onClose, level }, item.key);
|
|
507
|
+
}
|
|
508
|
+
const validItemIndex = validItems.findIndex((vi) => vi.key === item.key);
|
|
509
|
+
const isFocused = validItemIndex === focusedIndex;
|
|
510
|
+
return /* @__PURE__ */ jsxs(
|
|
511
|
+
"div",
|
|
512
|
+
{
|
|
513
|
+
className: cn(
|
|
514
|
+
"flex items-center justify-between gap-3 px-3 py-2 text-sm cursor-pointer rounded-sm transition-colors mx-1",
|
|
515
|
+
item.disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-surface focus:bg-surface focus:outline-none",
|
|
516
|
+
isFocused && !item.disabled && "bg-surface"
|
|
517
|
+
),
|
|
518
|
+
onClick: () => {
|
|
519
|
+
if (!item.disabled) {
|
|
520
|
+
item.onClick?.();
|
|
521
|
+
onClose();
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
role: "menuitem",
|
|
525
|
+
tabIndex: -1,
|
|
526
|
+
"aria-disabled": item.disabled,
|
|
527
|
+
children: [
|
|
528
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
529
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 w-4 h-4", children: item.icon }),
|
|
530
|
+
/* @__PURE__ */ jsx("span", { children: item.label })
|
|
531
|
+
] }),
|
|
532
|
+
item.shortcut && /* @__PURE__ */ jsx("span", { className: "text-xs text-text-secondary shrink-0", children: item.shortcut })
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
item.key
|
|
536
|
+
);
|
|
537
|
+
})
|
|
538
|
+
}
|
|
539
|
+
);
|
|
540
|
+
};
|
|
541
|
+
ContextMenuContent.displayName = "ContextMenuContent";
|
|
542
|
+
var ContextMenu = ({
|
|
543
|
+
children,
|
|
544
|
+
items,
|
|
545
|
+
className,
|
|
546
|
+
disabled = false,
|
|
547
|
+
onOpenChange,
|
|
548
|
+
open: controlledOpen
|
|
549
|
+
}) => {
|
|
550
|
+
const [internalOpen, setInternalOpen] = useState(false);
|
|
551
|
+
const [keyUpHandlers, setKeyUpHandlers] = useState({});
|
|
552
|
+
const [position, setPosition] = useState(null);
|
|
553
|
+
const isControlled = controlledOpen !== void 0;
|
|
554
|
+
const isOpen = isControlled ? controlledOpen : internalOpen;
|
|
555
|
+
const setOpen = useCallback(
|
|
556
|
+
(open) => {
|
|
557
|
+
if (!isControlled) {
|
|
558
|
+
setInternalOpen(open);
|
|
559
|
+
}
|
|
560
|
+
onOpenChange?.(open);
|
|
561
|
+
},
|
|
562
|
+
[isControlled, onOpenChange]
|
|
563
|
+
);
|
|
564
|
+
const handleContextMenu = useCallback(
|
|
565
|
+
(e) => {
|
|
566
|
+
if (disabled) return;
|
|
567
|
+
e.preventDefault();
|
|
568
|
+
e.stopPropagation();
|
|
569
|
+
setPosition({
|
|
570
|
+
width: 0,
|
|
571
|
+
height: 0,
|
|
572
|
+
x: e.clientX,
|
|
573
|
+
y: e.clientY,
|
|
574
|
+
top: e.clientY,
|
|
575
|
+
left: e.clientX,
|
|
576
|
+
right: e.clientX,
|
|
577
|
+
bottom: e.clientY,
|
|
578
|
+
toJSON: () => {
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
setOpen(true);
|
|
582
|
+
},
|
|
583
|
+
[disabled, setOpen]
|
|
584
|
+
);
|
|
585
|
+
const handleClose = useCallback(() => {
|
|
586
|
+
setOpen(false);
|
|
587
|
+
}, [setOpen]);
|
|
588
|
+
useEffect(() => {
|
|
589
|
+
if (!isOpen) return;
|
|
590
|
+
const handleKeyDown = (e) => {
|
|
591
|
+
const handler = keyUpHandlers[e.key];
|
|
592
|
+
if (handler) {
|
|
593
|
+
e.preventDefault();
|
|
594
|
+
handler();
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
598
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
599
|
+
}, [isOpen, keyUpHandlers]);
|
|
600
|
+
return /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open: isOpen, onOpenChange: setOpen, children: [
|
|
601
|
+
position && /* @__PURE__ */ jsx(
|
|
602
|
+
PopoverPrimitive.Anchor,
|
|
603
|
+
{
|
|
604
|
+
virtualRef: {
|
|
605
|
+
current: {
|
|
606
|
+
getBoundingClientRect: () => position
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
),
|
|
611
|
+
/* @__PURE__ */ jsx(
|
|
612
|
+
"div",
|
|
613
|
+
{
|
|
614
|
+
onContextMenu: handleContextMenu,
|
|
615
|
+
className: cn("inline-block", className),
|
|
616
|
+
role: "presentation",
|
|
617
|
+
children
|
|
618
|
+
}
|
|
619
|
+
),
|
|
620
|
+
/* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
621
|
+
PopoverPrimitive.Content,
|
|
622
|
+
{
|
|
623
|
+
side: "bottom",
|
|
624
|
+
align: "start",
|
|
625
|
+
sideOffset: 0,
|
|
626
|
+
alignOffset: 0,
|
|
627
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
628
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
629
|
+
onEscapeKeyDown: handleClose,
|
|
630
|
+
onPointerDownOutside: handleClose,
|
|
631
|
+
onInteractOutside: handleClose,
|
|
632
|
+
className: "z-[var(--z-popover)]",
|
|
633
|
+
children: /* @__PURE__ */ jsx(ContextMenuContent, { setKeyUpHandlers, items, onClose: handleClose })
|
|
634
|
+
}
|
|
635
|
+
) })
|
|
636
|
+
] });
|
|
637
|
+
};
|
|
638
|
+
ContextMenu.displayName = "ContextMenu";
|
|
639
|
+
var context_menu_default = ContextMenu;
|
|
61
640
|
var dividerVariants = cva("", {
|
|
62
641
|
variants: {
|
|
63
642
|
orientation: {
|
|
@@ -88,16 +667,16 @@ var dividerVariants = cva("", {
|
|
|
88
667
|
});
|
|
89
668
|
var textAlignClasses = {
|
|
90
669
|
left: {
|
|
91
|
-
before: "w-
|
|
92
|
-
after: "w-
|
|
670
|
+
before: "w-(--divider-left-before-width)",
|
|
671
|
+
after: "w-(--divider-left-after-width)"
|
|
93
672
|
},
|
|
94
673
|
center: {
|
|
95
|
-
before: "w-
|
|
96
|
-
after: "w-
|
|
674
|
+
before: "w-(--divider-center-before-width)",
|
|
675
|
+
after: "w-(--divider-center-after-width)"
|
|
97
676
|
},
|
|
98
677
|
right: {
|
|
99
|
-
before: "w-
|
|
100
|
-
after: "w-
|
|
678
|
+
before: "w-(--divider-right-before-width)",
|
|
679
|
+
after: "w-(--divider-right-after-width)"
|
|
101
680
|
}
|
|
102
681
|
};
|
|
103
682
|
var Divider = React.memo(
|
|
@@ -120,7 +699,7 @@ var Divider = React.memo(
|
|
|
120
699
|
role: "separator",
|
|
121
700
|
"aria-orientation": "horizontal",
|
|
122
701
|
className: cn(
|
|
123
|
-
"flex items-center gap-
|
|
702
|
+
"flex items-center gap-(--divider-gap) text-sm text-text-secondary",
|
|
124
703
|
className
|
|
125
704
|
),
|
|
126
705
|
style: spacing ? { margin: spacing } : void 0,
|
|
@@ -184,7 +763,125 @@ var Divider = React.memo(
|
|
|
184
763
|
);
|
|
185
764
|
Divider.displayName = "Divider";
|
|
186
765
|
var divider_default = Divider;
|
|
766
|
+
var tagVariants = cva("inline-flex items-center gap-1.5 whitespace-nowrap rounded font-medium transition-colors", {
|
|
767
|
+
variants: {
|
|
768
|
+
variant: {
|
|
769
|
+
default: "border",
|
|
770
|
+
solid: "",
|
|
771
|
+
outline: "border",
|
|
772
|
+
soft: ""
|
|
773
|
+
},
|
|
774
|
+
color: {
|
|
775
|
+
default: "",
|
|
776
|
+
primary: "",
|
|
777
|
+
secondary: "",
|
|
778
|
+
accent: "",
|
|
779
|
+
success: "",
|
|
780
|
+
error: "",
|
|
781
|
+
warning: "",
|
|
782
|
+
info: ""
|
|
783
|
+
},
|
|
784
|
+
size: {
|
|
785
|
+
xs: "text-[10px] px-1.5 py-0.5",
|
|
786
|
+
sm: "text-xs px-2 py-1",
|
|
787
|
+
md: "text-sm px-2.5 py-1",
|
|
788
|
+
lg: "text-base px-3 py-1.5"
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
compoundVariants: createAllColorVariants(componentColors, ["default", "solid", "outline", "soft"]),
|
|
792
|
+
defaultVariants: {
|
|
793
|
+
variant: "solid",
|
|
794
|
+
color: "primary",
|
|
795
|
+
size: "sm"
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
var iconSizeClasses = {
|
|
799
|
+
xs: "size-2.5",
|
|
800
|
+
sm: "size-3",
|
|
801
|
+
md: "size-3.5",
|
|
802
|
+
lg: "size-4"
|
|
803
|
+
};
|
|
804
|
+
var Tag = React.memo(
|
|
805
|
+
({
|
|
806
|
+
children,
|
|
807
|
+
color = "primary",
|
|
808
|
+
variant = "solid",
|
|
809
|
+
size = "sm",
|
|
810
|
+
closable = false,
|
|
811
|
+
onClose,
|
|
812
|
+
icon,
|
|
813
|
+
className,
|
|
814
|
+
onClick,
|
|
815
|
+
disableKeyboardRemoval = false,
|
|
816
|
+
...props
|
|
817
|
+
}) => {
|
|
818
|
+
const handleClose = (e) => {
|
|
819
|
+
e.stopPropagation();
|
|
820
|
+
onClose?.(e);
|
|
821
|
+
};
|
|
822
|
+
const handleCloseKeyDown = (e) => {
|
|
823
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
824
|
+
e.preventDefault();
|
|
825
|
+
e.stopPropagation();
|
|
826
|
+
onClose?.(e);
|
|
827
|
+
}
|
|
828
|
+
};
|
|
829
|
+
const handleTagKeyDown = (e) => {
|
|
830
|
+
if (!disableKeyboardRemoval && closable && (e.key === "Delete" || e.key === "Backspace")) {
|
|
831
|
+
e.preventDefault();
|
|
832
|
+
e.stopPropagation();
|
|
833
|
+
onClose?.(e);
|
|
834
|
+
return;
|
|
835
|
+
}
|
|
836
|
+
if (onClick && (e.key === "Enter" || e.key === " ")) {
|
|
837
|
+
e.preventDefault();
|
|
838
|
+
e.stopPropagation();
|
|
839
|
+
onClick(e);
|
|
840
|
+
}
|
|
841
|
+
};
|
|
842
|
+
return /* @__PURE__ */ jsxs(
|
|
843
|
+
"span",
|
|
844
|
+
{
|
|
845
|
+
className: cn(
|
|
846
|
+
tagVariants({ variant, color, size }),
|
|
847
|
+
(onClick || closable) && "cursor-pointer",
|
|
848
|
+
(onClick || !disableKeyboardRemoval && closable) && "focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary",
|
|
849
|
+
className
|
|
850
|
+
),
|
|
851
|
+
onClick,
|
|
852
|
+
onKeyDown: onClick || !disableKeyboardRemoval && closable ? handleTagKeyDown : void 0,
|
|
853
|
+
role: onClick || !disableKeyboardRemoval && closable ? "button" : void 0,
|
|
854
|
+
tabIndex: onClick || !disableKeyboardRemoval && closable ? 0 : void 0,
|
|
855
|
+
"aria-label": (onClick || !disableKeyboardRemoval && closable) && typeof children === "string" ? children : void 0,
|
|
856
|
+
...props,
|
|
857
|
+
children: [
|
|
858
|
+
icon && /* @__PURE__ */ jsx("span", { className: cn("inline-flex items-center justify-center flex-shrink-0", iconSizeClasses[size]), children: React.isValidElement(icon) ? React.cloneElement(icon, {
|
|
859
|
+
className: cn("w-full h-full", icon.props.className)
|
|
860
|
+
}) : icon }),
|
|
861
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
862
|
+
closable && /* @__PURE__ */ jsx(
|
|
863
|
+
"button",
|
|
864
|
+
{
|
|
865
|
+
type: "button",
|
|
866
|
+
onClick: handleClose,
|
|
867
|
+
onKeyDown: handleCloseKeyDown,
|
|
868
|
+
className: cn(
|
|
869
|
+
"inline-flex items-center justify-center flex-shrink-0 cursor-pointer rounded-sm opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-current focus:ring-offset-1",
|
|
870
|
+
iconSizeClasses[size]
|
|
871
|
+
),
|
|
872
|
+
"aria-label": typeof children === "string" ? `Remove ${children}` : "Remove tag",
|
|
873
|
+
tabIndex: disableKeyboardRemoval ? 0 : -1,
|
|
874
|
+
children: /* @__PURE__ */ jsx(X, { className: "w-full h-full" })
|
|
875
|
+
}
|
|
876
|
+
)
|
|
877
|
+
]
|
|
878
|
+
}
|
|
879
|
+
);
|
|
880
|
+
}
|
|
881
|
+
);
|
|
882
|
+
Tag.displayName = "Tag";
|
|
883
|
+
var tag_default = Tag;
|
|
187
884
|
|
|
188
|
-
export { divider_default as Divider };
|
|
885
|
+
export { Avatar, AvatarGroup, context_menu_default as ContextMenu, divider_default as Divider, tag_default as Tag };
|
|
189
886
|
//# sourceMappingURL=index.js.map
|
|
190
887
|
//# sourceMappingURL=index.js.map
|