ivt 0.4.5 → 0.4.7
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.mjs +15 -14
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/alert/index.mjs +2 -2
- package/dist/alert-dialog/index.mjs +17 -16
- package/dist/alert-dialog/index.mjs.map +1 -1
- package/dist/aspect-ratio/index.d.ts +7 -0
- package/dist/aspect-ratio/index.mjs +46 -0
- package/dist/aspect-ratio/index.mjs.map +1 -0
- package/dist/avatar/index.mjs +7 -7
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.mjs +38 -36
- package/dist/base/index.mjs.map +1 -1
- package/dist/breadcrumb/index.d.ts +14 -0
- package/dist/breadcrumb/index.mjs +71 -0
- package/dist/breadcrumb/index.mjs.map +1 -0
- package/dist/button/index.mjs +3 -3
- package/dist/calendar/index.mjs +8 -8
- package/dist/card/index.mjs +2 -2
- package/dist/carousel/index.d.ts +25 -0
- package/dist/carousel/index.mjs +1793 -0
- package/dist/carousel/index.mjs.map +1 -0
- package/dist/chart/index.mjs +65 -5
- package/dist/chart/index.mjs.map +1 -1
- package/dist/checkbox/index.mjs +13 -13
- package/dist/chunks/{Container-DVypwIQb.mjs → Container-Bk36x55h.mjs} +2 -2
- package/dist/chunks/{Container-DVypwIQb.mjs.map → Container-Bk36x55h.mjs.map} +1 -1
- package/dist/chunks/{_commonjsHelpers-DxUjvHAf.mjs → _commonjsHelpers-B6NPw-gB.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-B6NPw-gB.mjs.map +1 -0
- package/dist/chunks/{accordion-C-7WU65v.mjs → accordion-DkQil9br.mjs} +11 -133
- package/dist/chunks/accordion-DkQil9br.mjs.map +1 -0
- package/dist/chunks/{badge-FyqsRWpb.mjs → badge-DDmxqVIu.mjs} +2 -2
- package/dist/chunks/{badge-FyqsRWpb.mjs.map → badge-DDmxqVIu.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs--Uc0zBMR.mjs → bundle-mjs-Bj6M7Bh5.mjs} +1 -1
- package/dist/chunks/{bundle-mjs--Uc0zBMR.mjs.map → bundle-mjs-Bj6M7Bh5.mjs.map} +1 -1
- package/dist/chunks/{button-CkvbfoBC.mjs → button-DUnGULhS.mjs} +2 -2
- package/dist/chunks/{button-CkvbfoBC.mjs.map → button-DUnGULhS.mjs.map} +1 -1
- package/dist/chunks/{calendar-DthuUOQB.mjs → calendar-Cgi4uVPL.mjs} +188 -38
- package/dist/chunks/calendar-Cgi4uVPL.mjs.map +1 -0
- package/dist/chunks/{check-CEEnU7uo.mjs → check-D7XegcNq.mjs} +2 -2
- package/dist/chunks/{check-CEEnU7uo.mjs.map → check-D7XegcNq.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-CdtWWCvB.mjs → chevron-down-B7w8j1qi.mjs} +2 -2
- package/dist/chunks/{chevron-down-CdtWWCvB.mjs.map → chevron-down-B7w8j1qi.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-dKr4sXaL.mjs → chevron-left-P-VgJSoP.mjs} +2 -2
- package/dist/chunks/{chevron-left-dKr4sXaL.mjs.map → chevron-left-P-VgJSoP.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-BJERqiST.mjs → chevron-right-D8I8B3al.mjs} +2 -2
- package/dist/chunks/{chevron-right-BJERqiST.mjs.map → chevron-right-D8I8B3al.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-CvLRAoM4.mjs → chevrons-up-down-BJzgHrFv.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-CvLRAoM4.mjs.map → chevrons-up-down-BJzgHrFv.mjs.map} +1 -1
- package/dist/chunks/{command-BT07aIMk.mjs → command-B2Q7vPrV.mjs} +8 -8
- package/dist/chunks/{command-BT07aIMk.mjs.map → command-B2Q7vPrV.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-C-36jtLf.mjs → createLucideIcon-BnuYhciy.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-C-36jtLf.mjs.map → createLucideIcon-BnuYhciy.mjs.map} +1 -1
- package/dist/chunks/{dialog-E_tuNVVP.mjs → dialog-5R8jYrH2.mjs} +4 -4
- package/dist/chunks/{dialog-E_tuNVVP.mjs.map → dialog-5R8jYrH2.mjs.map} +1 -1
- package/dist/chunks/ellipsis-rAfolw0i.mjs +35 -0
- package/dist/chunks/ellipsis-rAfolw0i.mjs.map +1 -0
- package/dist/chunks/{hover-card-BnkDAKKp.mjs → hover-card-IMC6GmGl.mjs} +11 -10
- package/dist/chunks/{hover-card-BnkDAKKp.mjs.map → hover-card-IMC6GmGl.mjs.map} +1 -1
- package/dist/chunks/{index-hd6oiDyZ.mjs → index-AD2ohxjm.mjs} +1 -1
- package/dist/chunks/{index-hd6oiDyZ.mjs.map → index-AD2ohxjm.mjs.map} +1 -1
- package/dist/chunks/{index-VGFs-gvq.mjs → index-BL6I2O8I.mjs} +1 -1
- package/dist/chunks/{index-VGFs-gvq.mjs.map → index-BL6I2O8I.mjs.map} +1 -1
- package/dist/chunks/{index-ZiahhVWN.mjs → index-Bfqp6L57.mjs} +1 -1
- package/dist/chunks/{index-ZiahhVWN.mjs.map → index-Bfqp6L57.mjs.map} +1 -1
- package/dist/chunks/{index-Cf5nP8Sx.mjs → index-Bhy5-l7L.mjs} +2 -2
- package/dist/chunks/{index-Cf5nP8Sx.mjs.map → index-Bhy5-l7L.mjs.map} +1 -1
- package/dist/chunks/{index-D1toVD_V.mjs → index-BtzrdXXu.mjs} +1 -1
- package/dist/chunks/{index-D1toVD_V.mjs.map → index-BtzrdXXu.mjs.map} +1 -1
- package/dist/chunks/{index-Bv_h_hMx.mjs → index-C-eBEzsd.mjs} +11 -10
- package/dist/chunks/{index-Bv_h_hMx.mjs.map → index-C-eBEzsd.mjs.map} +1 -1
- package/dist/chunks/{index-oRHhKb2z.mjs → index-CI7Tnqaf.mjs} +1 -1
- package/dist/chunks/{index-oRHhKb2z.mjs.map → index-CI7Tnqaf.mjs.map} +1 -1
- package/dist/chunks/{index-0tMmOuv1.mjs → index-CIlaxeML.mjs} +3 -3
- package/dist/chunks/{index-0tMmOuv1.mjs.map → index-CIlaxeML.mjs.map} +1 -1
- package/dist/chunks/{index-Cn5ihFPu.mjs → index-CUUcgAWS.mjs} +1 -1
- package/dist/chunks/{index-Cn5ihFPu.mjs.map → index-CUUcgAWS.mjs.map} +1 -1
- package/dist/chunks/{index-BIfMxNBh.mjs → index-CiJHmWph.mjs} +2 -2
- package/dist/chunks/{index-BIfMxNBh.mjs.map → index-CiJHmWph.mjs.map} +1 -1
- package/dist/chunks/{index-n6Vlh2qs.mjs → index-CsVkG_9K.mjs} +9 -9
- package/dist/chunks/{index-n6Vlh2qs.mjs.map → index-CsVkG_9K.mjs.map} +1 -1
- package/dist/chunks/{index-DujcHJqa.mjs → index-Cx4XlYKf.mjs} +1 -1
- package/dist/chunks/{index-DujcHJqa.mjs.map → index-Cx4XlYKf.mjs.map} +1 -1
- package/dist/chunks/{index-D7MXDvLR.mjs → index-CxpHOtv2.mjs} +7 -7
- package/dist/chunks/{index-D7MXDvLR.mjs.map → index-CxpHOtv2.mjs.map} +1 -1
- package/dist/chunks/{index-B63fbqEU.mjs → index-D02u4jwi.mjs} +1 -1
- package/dist/chunks/{index-B63fbqEU.mjs.map → index-D02u4jwi.mjs.map} +1 -1
- package/dist/chunks/{index-ypP8ZSEh.mjs → index-DGB6xduL.mjs} +6 -21
- package/dist/chunks/index-DGB6xduL.mjs.map +1 -0
- package/dist/chunks/index-DKuVLbq1.mjs +7 -0
- package/dist/chunks/index-DKuVLbq1.mjs.map +1 -0
- package/dist/chunks/{index-CiQJ7wod.mjs → index-Dj2mKKII.mjs} +2 -2
- package/dist/chunks/{index-CiQJ7wod.mjs.map → index-Dj2mKKII.mjs.map} +1 -1
- package/dist/chunks/{index-OeC6d8TA.mjs → index-KCHKKCqw.mjs} +2 -2
- package/dist/chunks/{index-OeC6d8TA.mjs.map → index-KCHKKCqw.mjs.map} +1 -1
- package/dist/chunks/{index-mnhyF3Xs.mjs → index-gB-FKFqi.mjs} +16 -15
- package/dist/chunks/{index-mnhyF3Xs.mjs.map → index-gB-FKFqi.mjs.map} +1 -1
- package/dist/chunks/index-j8BDMqXg.mjs +133 -0
- package/dist/chunks/index-j8BDMqXg.mjs.map +1 -0
- package/dist/chunks/index-plymPSgY.mjs +21 -0
- package/dist/chunks/index-plymPSgY.mjs.map +1 -0
- package/dist/chunks/{index-DfGdJ6wp.mjs → index-x0TwBXvJ.mjs} +1 -1
- package/dist/chunks/{index-DfGdJ6wp.mjs.map → index-x0TwBXvJ.mjs.map} +1 -1
- package/dist/chunks/{index-Bzi8Hpka.mjs → index-xgPrRc3G.mjs} +5 -5
- package/dist/chunks/{index-Bzi8Hpka.mjs.map → index-xgPrRc3G.mjs.map} +1 -1
- package/dist/chunks/{input-f9f7o4dl.mjs → input-TuCGqI_P.mjs} +2 -2
- package/dist/chunks/{input-f9f7o4dl.mjs.map → input-TuCGqI_P.mjs.map} +1 -1
- package/dist/chunks/{label-ClnI7CPw.mjs → label-C3diPSrP.mjs} +3 -3
- package/dist/chunks/{label-ClnI7CPw.mjs.map → label-C3diPSrP.mjs.map} +1 -1
- package/dist/chunks/{pagination-ByGWAyDY.mjs → pagination-CFPUC8_E.mjs} +6 -37
- package/dist/chunks/pagination-CFPUC8_E.mjs.map +1 -0
- package/dist/chunks/{popover-BP0h5od9.mjs → popover-BLkBJEBi.mjs} +13 -12
- package/dist/chunks/{popover-BP0h5od9.mjs.map → popover-BLkBJEBi.mjs.map} +1 -1
- package/dist/chunks/{progress-C36nV_EJ.mjs → progress-BCXpEea-.mjs} +4 -4
- package/dist/chunks/{progress-C36nV_EJ.mjs.map → progress-BCXpEea-.mjs.map} +1 -1
- package/dist/chunks/{pt-BR-B365hYCq.mjs → pt-BR-dv9Ki026.mjs} +3 -3
- package/dist/chunks/{pt-BR-B365hYCq.mjs.map → pt-BR-dv9Ki026.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-BCPovfc9.mjs → scroll-area-DfDHXrMl.mjs} +11 -15
- package/dist/chunks/scroll-area-DfDHXrMl.mjs.map +1 -0
- package/dist/chunks/{select-DsHm4Ncw.mjs → select-Dm61g3Di.mjs} +5 -5
- package/dist/chunks/{select-DsHm4Ncw.mjs.map → select-Dm61g3Di.mjs.map} +1 -1
- package/dist/chunks/{separator-D5jBoFYi.mjs → separator-D9zU7ztA.mjs} +3 -3
- package/dist/chunks/{separator-D5jBoFYi.mjs.map → separator-D9zU7ztA.mjs.map} +1 -1
- package/dist/chunks/sheet-CG9T6jEm.mjs +80 -0
- package/dist/chunks/sheet-CG9T6jEm.mjs.map +1 -0
- package/dist/chunks/{skeleton-BW9vlu4U.mjs → skeleton-BBrPlJZ6.mjs} +2 -2
- package/dist/chunks/{skeleton-BW9vlu4U.mjs.map → skeleton-BBrPlJZ6.mjs.map} +1 -1
- package/dist/chunks/{sortable-DbjP8Kx8.mjs → sortable-C5sg2z09.mjs} +3 -3
- package/dist/chunks/{sortable-DbjP8Kx8.mjs.map → sortable-C5sg2z09.mjs.map} +1 -1
- package/dist/chunks/{table-BrJ_iN3j.mjs → table-D8dawH6l.mjs} +2 -2
- package/dist/chunks/{table-BrJ_iN3j.mjs.map → table-D8dawH6l.mjs.map} +1 -1
- package/dist/chunks/{toggle-BYDRoIw7.mjs → toggle-BNDwy3fI.mjs} +5 -5
- package/dist/chunks/{toggle-BYDRoIw7.mjs.map → toggle-BNDwy3fI.mjs.map} +1 -1
- package/dist/chunks/{tooltip-DnGcpocO.mjs → tooltip-SoLw7T22.mjs} +13 -12
- package/dist/chunks/{tooltip-DnGcpocO.mjs.map → tooltip-SoLw7T22.mjs.map} +1 -1
- package/dist/chunks/{trash-2-Ccqlx7cY.mjs → trash-2-C_bzpesE.mjs} +2 -2
- package/dist/chunks/{trash-2-Ccqlx7cY.mjs.map → trash-2-C_bzpesE.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-CZ32kgxs.mjs → tslib.es6-dgoTq-4a.mjs} +1 -1
- package/dist/chunks/{tslib.es6-CZ32kgxs.mjs.map → tslib.es6-dgoTq-4a.mjs.map} +1 -1
- package/dist/chunks/{utils-SWF3jXjy.mjs → utils-DiIQyE9g.mjs} +2 -2
- package/dist/chunks/{utils-SWF3jXjy.mjs.map → utils-DiIQyE9g.mjs.map} +1 -1
- package/dist/chunks/{x-B9_z9ee1.mjs → x-BCPCYl4o.mjs} +2 -2
- package/dist/chunks/{x-B9_z9ee1.mjs.map → x-BCPCYl4o.mjs.map} +1 -1
- package/dist/collapsible/index.d.ts +9 -0
- package/dist/collapsible/index.mjs +35 -0
- package/dist/collapsible/index.mjs.map +1 -0
- package/dist/combobox/index.mjs +26 -25
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.mjs +20 -19
- package/dist/command/index.mjs.map +1 -1
- package/dist/context-menu/index.d.ts +28 -0
- package/dist/context-menu/index.mjs +460 -0
- package/dist/context-menu/index.mjs.map +1 -0
- package/dist/data-table/index.mjs +35 -33
- package/dist/data-table/index.mjs.map +1 -1
- package/dist/date-picker/index.mjs +25 -24
- package/dist/date-picker/index.mjs.map +1 -1
- package/dist/dialog/index.mjs +19 -18
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/drawer/index.d.ts +16 -0
- package/dist/drawer/index.mjs +1704 -0
- package/dist/drawer/index.mjs.map +1 -0
- package/dist/dropdown-menu/index.mjs +23 -22
- package/dist/dropdown-menu/index.mjs.map +1 -1
- package/dist/dropzone/index.mjs +18 -17
- package/dist/dropzone/index.mjs.map +1 -1
- package/dist/form/index.mjs +11 -5
- package/dist/form/index.mjs.map +1 -1
- package/dist/hover-card/index.mjs +15 -14
- package/dist/hover-card/index.mjs.map +1 -1
- package/dist/icon/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.mjs +3 -3
- package/dist/input-otp/index.d.ts +14 -0
- package/dist/input-otp/index.mjs +456 -0
- package/dist/input-otp/index.mjs.map +1 -0
- package/dist/ivt.css +1 -1
- package/dist/label/index.mjs +4 -4
- package/dist/layout/index.mjs +5 -5
- package/dist/menubar/index.mjs +23 -22
- package/dist/menubar/index.mjs.map +1 -1
- package/dist/multi-select/index.mjs +30 -29
- package/dist/multi-select/index.mjs.map +1 -1
- package/dist/navigation-menu/index.d.ts +18 -0
- package/dist/navigation-menu/index.mjs +868 -0
- package/dist/navigation-menu/index.mjs.map +1 -0
- package/dist/pagination/index.mjs +8 -7
- package/dist/pagination/index.mjs.map +1 -1
- package/dist/popover/index.mjs +18 -17
- package/dist/popover/index.mjs.map +1 -1
- package/dist/progress/index.mjs +5 -5
- package/dist/radio-group/index.mjs +17 -17
- package/dist/resizable/index.d.ts +11 -0
- package/dist/resizable/index.mjs +2166 -0
- package/dist/resizable/index.mjs.map +1 -0
- package/dist/scroll-area/index.mjs +12 -11
- package/dist/scroll-area/index.mjs.map +1 -1
- package/dist/select/index.mjs +6 -6
- package/dist/separator/index.mjs +4 -4
- package/dist/shared/index.mjs +5 -5
- package/dist/sheet/index.mjs +20 -93
- package/dist/sheet/index.mjs.map +1 -1
- package/dist/sidebar/index.d.ts +75 -0
- package/dist/sidebar/index.mjs +457 -0
- package/dist/sidebar/index.mjs.map +1 -0
- package/dist/skeleton/index.mjs +3 -3
- package/dist/skeleton-component/index.mjs +4 -4
- package/dist/slider/index.d.ts +7 -0
- package/dist/slider/index.mjs +594 -0
- package/dist/slider/index.mjs.map +1 -0
- package/dist/sortable/index.mjs +4 -4
- package/dist/switch/index.mjs +10 -10
- package/dist/table/index.mjs +3 -3
- package/dist/tabs/index.mjs +13 -13
- package/dist/textarea/index.mjs +2 -2
- package/dist/toast/index.mjs +15 -14
- package/dist/toast/index.mjs.map +1 -1
- package/dist/toggle/index.mjs +7 -7
- package/dist/toggle-group/index.mjs +13 -13
- package/dist/tooltip/index.mjs +17 -16
- package/dist/tooltip/index.mjs.map +1 -1
- package/package.json +60 -6
- package/dist/chunks/_commonjsHelpers-DxUjvHAf.mjs.map +0 -1
- package/dist/chunks/accordion-C-7WU65v.mjs.map +0 -1
- package/dist/chunks/calendar-DthuUOQB.mjs.map +0 -1
- package/dist/chunks/index-ypP8ZSEh.mjs.map +0 -1
- package/dist/chunks/pagination-ByGWAyDY.mjs.map +0 -1
- package/dist/chunks/scroll-area-BCPovfc9.mjs.map +0 -1
package/dist/combobox/index.mjs
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { c as cn } from '../chunks/utils-
|
|
3
|
-
import { C as ChevronsUpDown } from '../chunks/chevrons-up-down-
|
|
4
|
-
import { C as Check } from '../chunks/check-
|
|
5
|
-
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-
|
|
6
|
-
import { B as Button } from '../chunks/button-
|
|
7
|
-
import { C as Command, b as CommandInput, c as CommandList, d as CommandEmpty, e as CommandGroup, f as CommandItem } from '../chunks/command-
|
|
8
|
-
import '../chunks/bundle-mjs
|
|
9
|
-
import '../chunks/createLucideIcon-
|
|
10
|
-
import '../chunks/index-
|
|
11
|
-
import '../chunks/index-
|
|
12
|
-
import '../chunks/index-
|
|
2
|
+
import { c as cn } from '../chunks/utils-DiIQyE9g.mjs';
|
|
3
|
+
import { C as ChevronsUpDown } from '../chunks/chevrons-up-down-BJzgHrFv.mjs';
|
|
4
|
+
import { C as Check } from '../chunks/check-D7XegcNq.mjs';
|
|
5
|
+
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-BLkBJEBi.mjs';
|
|
6
|
+
import { B as Button } from '../chunks/button-DUnGULhS.mjs';
|
|
7
|
+
import { C as Command, b as CommandInput, c as CommandList, d as CommandEmpty, e as CommandGroup, f as CommandItem } from '../chunks/command-B2Q7vPrV.mjs';
|
|
8
|
+
import '../chunks/bundle-mjs-Bj6M7Bh5.mjs';
|
|
9
|
+
import '../chunks/createLucideIcon-BnuYhciy.mjs';
|
|
10
|
+
import '../chunks/index-BL6I2O8I.mjs';
|
|
11
|
+
import '../chunks/index-x0TwBXvJ.mjs';
|
|
12
|
+
import '../chunks/index-Bfqp6L57.mjs';
|
|
13
13
|
import 'react/jsx-runtime';
|
|
14
|
-
import '../chunks/index-
|
|
15
|
-
import '../chunks/index-
|
|
14
|
+
import '../chunks/index-DGB6xduL.mjs';
|
|
15
|
+
import '../chunks/index-Cx4XlYKf.mjs';
|
|
16
16
|
import 'react-dom';
|
|
17
17
|
import '@radix-ui/react-slot';
|
|
18
|
-
import '../chunks/index-
|
|
19
|
-
import '../chunks/index-
|
|
20
|
-
import '../chunks/
|
|
21
|
-
import '../chunks/
|
|
22
|
-
import '../chunks/index-
|
|
23
|
-
import '../chunks/index-
|
|
24
|
-
import '../chunks/index-
|
|
25
|
-
import '../chunks/index-
|
|
26
|
-
import '../chunks/index-
|
|
18
|
+
import '../chunks/index-BtzrdXXu.mjs';
|
|
19
|
+
import '../chunks/index-xgPrRc3G.mjs';
|
|
20
|
+
import '../chunks/tslib.es6-dgoTq-4a.mjs';
|
|
21
|
+
import '../chunks/index-CiJHmWph.mjs';
|
|
22
|
+
import '../chunks/index-AD2ohxjm.mjs';
|
|
23
|
+
import '../chunks/index-CxpHOtv2.mjs';
|
|
24
|
+
import '../chunks/index-Bhy5-l7L.mjs';
|
|
25
|
+
import '../chunks/index-plymPSgY.mjs';
|
|
26
|
+
import '../chunks/index-CIlaxeML.mjs';
|
|
27
|
+
import '../chunks/index-Dj2mKKII.mjs';
|
|
27
28
|
import 'class-variance-authority';
|
|
28
|
-
import '../chunks/index-
|
|
29
|
-
import '../chunks/dialog-
|
|
30
|
-
import '../chunks/x-
|
|
29
|
+
import '../chunks/index-C-eBEzsd.mjs';
|
|
30
|
+
import '../chunks/dialog-5R8jYrH2.mjs';
|
|
31
|
+
import '../chunks/x-BCPCYl4o.mjs';
|
|
31
32
|
|
|
32
33
|
function Combobox({ items, value, onValueChange, placeholder = "Select item...", searchPlaceholder = "Search item...", emptyMessage = "No item found.", widthClassName = "w-fit", className, groupHeading }) {
|
|
33
34
|
const [open, setOpen] = React.useState(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport { Check, ChevronsUpDown } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\nimport { cn } from \"@/lib/utils\";\n\ninterface ComboboxItem {\n\tvalue: string;\n\tlabel: string;\n\t// Você pode adicionar outras propriedades se precisar, ex: icon, disabled\n\t// icon?: React.ReactNode;\n\t// disabled?: boolean;\n}\n\ninterface ComboboxProps {\n\t/**\n\t * A lista de itens a serem exibidos no combobox.\n\t * Cada item deve ter 'value' e 'label'.\n\t */\n\titems: ComboboxItem[];\n\t/**\n\t * O valor atualmente selecionado no combobox.\n\t */\n\tvalue: string;\n\t/**\n\t * Função de callback para quando um item é selecionado.\n\t * Recebe o novo valor selecionado.\n\t */\n\tonValueChange: (newValue: string) => void;\n\t/**\n\t * Placeholder para o botão do combobox quando nenhum item está selecionado.\n\t * @default \"Select item...\"\n\t */\n\tplaceholder?: string;\n\t/**\n\t * Placeholder para o campo de busca dentro do combobox.\n\t * @default \"Search item...\"\n\t */\n\tsearchPlaceholder?: string;\n\t/**\n\t * Mensagem exibida quando nenhum item é encontrado na busca.\n\t * @default \"No item found.\"\n\t */\n\temptyMessage?: string;\n\t/**\n\t * Largura do combobox (e do popover).\n\t * @default \"w-[200px]\"\n\t */\n\twidthClassName?: string;\n\t/**\n\t * Classes CSS adicionais para o combobox principal.\n\t */\n\tclassName?: string;\n\t/**\n\t * Título do grupo de comandos.\n\t */\n\tgroupHeading?: string;\n}\n\nexport function Combobox({\n\titems,\n\tvalue,\n\tonValueChange,\n\tplaceholder = \"Select item...\",\n\tsearchPlaceholder = \"Search item...\",\n\temptyMessage = \"No item found.\",\n\twidthClassName = \"w-fit\",\n\tclassName,\n\tgroupHeading,\n}: ComboboxProps) {\n\tconst [open, setOpen] = React.useState(false);\n\n\tconst handleSelect = (currentValue: string) => {\n\t\tonValueChange(currentValue === value ? \"\" : currentValue);\n\t\tsetOpen(false);\n\t};\n\n\treturn (\n\t\t<Popover open={open} onOpenChange={setOpen}>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\taria-expanded={open}\n\t\t\t\t\tclassName={cn(widthClassName, \"justify-between\", className)}\n\t\t\t\t>\n\t\t\t\t\t{value ? items.find((item) => item.value === value)?.label : placeholder}\n\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent className={cn(widthClassName, \"p-0\")}>\n\t\t\t\t<Command>\n\t\t\t\t\t<CommandInput placeholder={searchPlaceholder} className=\"h-9\" />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>{emptyMessage}</CommandEmpty>\n\t\t\t\t\t\t<CommandGroup heading={groupHeading}>\n\t\t\t\t\t\t\t{items.map((item) => (\n\t\t\t\t\t\t\t\t<CommandItem key={item.value} value={item.value} onSelect={handleSelect}>\n\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t\t<Check\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\tvalue === item.value ? \"opacity-100\" : \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n"],"names":["Combobox","items","value","onValueChange","placeholder","searchPlaceholder","emptyMessage","widthClassName","className","groupHeading","open","setOpen","React","useState","handleSelect","currentValue","Popover","onOpenChange","PopoverTrigger","asChild","Button","variant","aria-expanded","cn","find","item","label","ChevronsUpDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","heading","map","CommandItem","key","onSelect","Check"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport { Check, ChevronsUpDown } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\nimport { cn } from \"@/lib/utils\";\n\ninterface ComboboxItem {\n\tvalue: string;\n\tlabel: string;\n\t// Você pode adicionar outras propriedades se precisar, ex: icon, disabled\n\t// icon?: React.ReactNode;\n\t// disabled?: boolean;\n}\n\ninterface ComboboxProps {\n\t/**\n\t * A lista de itens a serem exibidos no combobox.\n\t * Cada item deve ter 'value' e 'label'.\n\t */\n\titems: ComboboxItem[];\n\t/**\n\t * O valor atualmente selecionado no combobox.\n\t */\n\tvalue: string;\n\t/**\n\t * Função de callback para quando um item é selecionado.\n\t * Recebe o novo valor selecionado.\n\t */\n\tonValueChange: (newValue: string) => void;\n\t/**\n\t * Placeholder para o botão do combobox quando nenhum item está selecionado.\n\t * @default \"Select item...\"\n\t */\n\tplaceholder?: string;\n\t/**\n\t * Placeholder para o campo de busca dentro do combobox.\n\t * @default \"Search item...\"\n\t */\n\tsearchPlaceholder?: string;\n\t/**\n\t * Mensagem exibida quando nenhum item é encontrado na busca.\n\t * @default \"No item found.\"\n\t */\n\temptyMessage?: string;\n\t/**\n\t * Largura do combobox (e do popover).\n\t * @default \"w-[200px]\"\n\t */\n\twidthClassName?: string;\n\t/**\n\t * Classes CSS adicionais para o combobox principal.\n\t */\n\tclassName?: string;\n\t/**\n\t * Título do grupo de comandos.\n\t */\n\tgroupHeading?: string;\n}\n\nexport function Combobox({\n\titems,\n\tvalue,\n\tonValueChange,\n\tplaceholder = \"Select item...\",\n\tsearchPlaceholder = \"Search item...\",\n\temptyMessage = \"No item found.\",\n\twidthClassName = \"w-fit\",\n\tclassName,\n\tgroupHeading,\n}: ComboboxProps) {\n\tconst [open, setOpen] = React.useState(false);\n\n\tconst handleSelect = (currentValue: string) => {\n\t\tonValueChange(currentValue === value ? \"\" : currentValue);\n\t\tsetOpen(false);\n\t};\n\n\treturn (\n\t\t<Popover open={open} onOpenChange={setOpen}>\n\t\t\t<PopoverTrigger asChild>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\taria-expanded={open}\n\t\t\t\t\tclassName={cn(widthClassName, \"justify-between\", className)}\n\t\t\t\t>\n\t\t\t\t\t{value ? items.find((item) => item.value === value)?.label : placeholder}\n\t\t\t\t\t<ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t\t\t</Button>\n\t\t\t</PopoverTrigger>\n\t\t\t<PopoverContent className={cn(widthClassName, \"p-0\")}>\n\t\t\t\t<Command>\n\t\t\t\t\t<CommandInput placeholder={searchPlaceholder} className=\"h-9\" />\n\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t<CommandEmpty>{emptyMessage}</CommandEmpty>\n\t\t\t\t\t\t<CommandGroup heading={groupHeading}>\n\t\t\t\t\t\t\t{items.map((item) => (\n\t\t\t\t\t\t\t\t<CommandItem key={item.value} value={item.value} onSelect={handleSelect}>\n\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t\t<Check\n\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\"ml-auto h-4 w-4\",\n\t\t\t\t\t\t\t\t\t\t\tvalue === item.value ? \"opacity-100\" : \"opacity-0\",\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t</CommandList>\n\t\t\t\t</Command>\n\t\t\t</PopoverContent>\n\t\t</Popover>\n\t);\n}\n"],"names":["Combobox","items","value","onValueChange","placeholder","searchPlaceholder","emptyMessage","widthClassName","className","groupHeading","open","setOpen","React","useState","handleSelect","currentValue","Popover","onOpenChange","PopoverTrigger","asChild","Button","variant","aria-expanded","cn","find","item","label","ChevronsUpDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","heading","map","CommandItem","key","onSelect","Check"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEO,SAASA,QAAAA,CAAS,EACxBC,KAAK,EACLC,KAAK,EACLC,aAAa,EACbC,WAAAA,GAAc,gBAAgB,EAC9BC,oBAAoB,gBAAgB,EACpCC,YAAAA,GAAe,gBAAgB,EAC/BC,cAAAA,GAAiB,OAAO,EACxBC,SAAS,EACTC,YAAY,EACG,EAAA;AACf,IAAA,MAAM,CAACC,IAAAA,EAAMC,OAAAA,CAAQ,GAAGC,KAAAA,CAAMC,QAAQ,CAAC,KAAA,CAAA;AAEvC,IAAA,MAAMC,eAAe,CAACC,YAAAA,GAAAA;QACrBZ,aAAAA,CAAcY,YAAAA,KAAiBb,QAAQ,EAAA,GAAKa,YAAAA,CAAAA;QAC5CJ,OAAAA,CAAQ,KAAA,CAAA;AACT,IAAA,CAAA;AAEA,IAAA,qBACC,KAAA,CAAA,aAAA,CAACK,OAAAA,EAAAA;QAAQN,IAAAA,EAAMA,IAAAA;QAAMO,YAAAA,EAAcN;qBAClC,KAAA,CAAA,aAAA,CAACO,cAAAA,EAAAA;QAAeC,OAAAA,EAAAA;qBACf,KAAA,CAAA,aAAA,CAACC,MAAAA,EAAAA;QACAC,OAAAA,EAAQ,SAAA;QACRC,eAAAA,EAAeZ,IAAAA;QACfF,SAAAA,EAAWe,EAAAA,CAAGhB,gBAAgB,iBAAA,EAAmBC,SAAAA;OAEhDN,KAAAA,GAAQD,KAAAA,CAAMuB,IAAI,CAAC,CAACC,IAAAA,GAASA,IAAAA,CAAKvB,KAAK,KAAKA,KAAAA,CAAAA,EAAQwB,KAAAA,GAAQtB,WAAAA,gBAC7D,KAAA,CAAA,aAAA,CAACuB,cAAAA,EAAAA;QAAenB,SAAAA,EAAU;wBAG5B,KAAA,CAAA,aAAA,CAACoB,cAAAA,EAAAA;AAAepB,QAAAA,SAAAA,EAAWe,GAAGhB,cAAAA,EAAgB,KAAA;AAC7C,KAAA,gBAAA,KAAA,CAAA,aAAA,CAACsB,6BACA,KAAA,CAAA,aAAA,CAACC,YAAAA,EAAAA;QAAa1B,WAAAA,EAAaC,iBAAAA;QAAmBG,SAAAA,EAAU;AACxD,KAAA,CAAA,gBAAA,KAAA,CAAA,aAAA,CAACuB,WAAAA,EAAAA,IAAAA,gBACA,KAAA,CAAA,aAAA,CAACC,YAAAA,EAAAA,IAAAA,EAAc1B,YAAAA,CAAAA,gBACf,KAAA,CAAA,aAAA,CAAC2B,YAAAA,EAAAA;QAAaC,OAAAA,EAASzB;AACrBR,KAAAA,EAAAA,KAAAA,CAAMkC,GAAG,CAAC,CAACV,IAAAA,iBACX,KAAA,CAAA,aAAA,CAACW,WAAAA,EAAAA;AAAYC,YAAAA,GAAAA,EAAKZ,KAAKvB,KAAK;AAAEA,YAAAA,KAAAA,EAAOuB,KAAKvB,KAAK;YAAEoC,QAAAA,EAAUxB;WACzDW,IAAAA,CAAKC,KAAK,gBACX,KAAA,CAAA,aAAA,CAACa,KAAAA,EAAAA;AACA/B,YAAAA,SAAAA,EAAWe,GACV,iBAAA,EACArB,KAAAA,KAAUuB,IAAAA,CAAKvB,KAAK,GAAG,aAAA,GAAgB,WAAA;;AAWlD;;;;"}
|
package/dist/command/index.mjs
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
export { C as Command, a as CommandDialog, d as CommandEmpty, e as CommandGroup, b as CommandInput, f as CommandItem, c as CommandList, h as CommandSeparator, g as CommandShortcut } from '../chunks/command-
|
|
2
|
-
import '../chunks/utils-
|
|
3
|
-
import '../chunks/bundle-mjs
|
|
4
|
-
import '../chunks/index-
|
|
1
|
+
export { C as Command, a as CommandDialog, d as CommandEmpty, e as CommandGroup, b as CommandInput, f as CommandItem, c as CommandList, h as CommandSeparator, g as CommandShortcut } from '../chunks/command-B2Q7vPrV.mjs';
|
|
2
|
+
import '../chunks/utils-DiIQyE9g.mjs';
|
|
3
|
+
import '../chunks/bundle-mjs-Bj6M7Bh5.mjs';
|
|
4
|
+
import '../chunks/index-C-eBEzsd.mjs';
|
|
5
5
|
import 'react';
|
|
6
|
-
import '../chunks/index-
|
|
7
|
-
import '../chunks/index-
|
|
8
|
-
import '../chunks/index-
|
|
6
|
+
import '../chunks/index-BL6I2O8I.mjs';
|
|
7
|
+
import '../chunks/index-x0TwBXvJ.mjs';
|
|
8
|
+
import '../chunks/index-Bfqp6L57.mjs';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
|
-
import '../chunks/index-
|
|
11
|
-
import '../chunks/index-
|
|
12
|
-
import '../chunks/index-
|
|
13
|
-
import '../chunks/index-
|
|
14
|
-
import '../chunks/index-
|
|
10
|
+
import '../chunks/index-CiJHmWph.mjs';
|
|
11
|
+
import '../chunks/index-AD2ohxjm.mjs';
|
|
12
|
+
import '../chunks/index-Dj2mKKII.mjs';
|
|
13
|
+
import '../chunks/index-DGB6xduL.mjs';
|
|
14
|
+
import '../chunks/index-Cx4XlYKf.mjs';
|
|
15
15
|
import 'react-dom';
|
|
16
16
|
import '@radix-ui/react-slot';
|
|
17
|
-
import '../chunks/index-
|
|
18
|
-
import '../chunks/index-
|
|
19
|
-
import '../chunks/tslib.es6-
|
|
20
|
-
import '../chunks/index-
|
|
21
|
-
import '../chunks/
|
|
22
|
-
import '../chunks/
|
|
23
|
-
import '../chunks/
|
|
17
|
+
import '../chunks/index-BtzrdXXu.mjs';
|
|
18
|
+
import '../chunks/index-xgPrRc3G.mjs';
|
|
19
|
+
import '../chunks/tslib.es6-dgoTq-4a.mjs';
|
|
20
|
+
import '../chunks/index-plymPSgY.mjs';
|
|
21
|
+
import '../chunks/index-CIlaxeML.mjs';
|
|
22
|
+
import '../chunks/dialog-5R8jYrH2.mjs';
|
|
23
|
+
import '../chunks/x-BCPCYl4o.mjs';
|
|
24
|
+
import '../chunks/createLucideIcon-BnuYhciy.mjs';
|
|
24
25
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
declare function ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function ContextMenuTrigger({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare function ContextMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
12
|
+
inset?: boolean;
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function ContextMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
17
|
+
inset?: boolean;
|
|
18
|
+
variant?: "default" | "destructive";
|
|
19
|
+
}): react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare function ContextMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function ContextMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function ContextMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
}): react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { c as composeEventHandlers } from '../chunks/index-BL6I2O8I.mjs';
|
|
3
|
+
import { c as createContextScope } from '../chunks/index-Bfqp6L57.mjs';
|
|
4
|
+
import { P as Primitive } from '../chunks/index-Cx4XlYKf.mjs';
|
|
5
|
+
import { c as createMenuScope, R as Root3, A as Anchor2, P as Portal, C as Content2$1, I as Item2$1, a as CheckboxItem, b as ItemIndicator, d as RadioItem, L as Label, S as Separator, G as Group, e as Sub, f as SubContent, g as SubTrigger, h as RadioGroup, i as Arrow2, j as Circle } from '../chunks/index-gB-FKFqi.mjs';
|
|
6
|
+
import { u as useCallbackRef } from '../chunks/index-BtzrdXXu.mjs';
|
|
7
|
+
import { u as useControllableState } from '../chunks/index-Dj2mKKII.mjs';
|
|
8
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
|
+
import { c as cn } from '../chunks/utils-DiIQyE9g.mjs';
|
|
10
|
+
import { C as Check } from '../chunks/check-D7XegcNq.mjs';
|
|
11
|
+
import { C as ChevronRight } from '../chunks/chevron-right-D8I8B3al.mjs';
|
|
12
|
+
import 'react-dom';
|
|
13
|
+
import '@radix-ui/react-slot';
|
|
14
|
+
import '../chunks/createLucideIcon-BnuYhciy.mjs';
|
|
15
|
+
import '@radix-ui/react-collection';
|
|
16
|
+
import '../chunks/index-x0TwBXvJ.mjs';
|
|
17
|
+
import '../chunks/index-CI7Tnqaf.mjs';
|
|
18
|
+
import '../chunks/index-DGB6xduL.mjs';
|
|
19
|
+
import '../chunks/index-xgPrRc3G.mjs';
|
|
20
|
+
import '../chunks/tslib.es6-dgoTq-4a.mjs';
|
|
21
|
+
import '../chunks/index-CiJHmWph.mjs';
|
|
22
|
+
import '../chunks/index-AD2ohxjm.mjs';
|
|
23
|
+
import '../chunks/index-CxpHOtv2.mjs';
|
|
24
|
+
import '../chunks/index-Bhy5-l7L.mjs';
|
|
25
|
+
import '../chunks/index-plymPSgY.mjs';
|
|
26
|
+
import '../chunks/index-CIlaxeML.mjs';
|
|
27
|
+
import '../chunks/index-CsVkG_9K.mjs';
|
|
28
|
+
import '../chunks/bundle-mjs-Bj6M7Bh5.mjs';
|
|
29
|
+
|
|
30
|
+
var CONTEXT_MENU_NAME = "ContextMenu";
|
|
31
|
+
var [createContextMenuContext] = createContextScope(CONTEXT_MENU_NAME, [
|
|
32
|
+
createMenuScope
|
|
33
|
+
]);
|
|
34
|
+
var useMenuScope = createMenuScope();
|
|
35
|
+
var [ContextMenuProvider, useContextMenuContext] = createContextMenuContext(CONTEXT_MENU_NAME);
|
|
36
|
+
var ContextMenu$1 = (props)=>{
|
|
37
|
+
const { __scopeContextMenu, children, onOpenChange, dir, modal = true } = props;
|
|
38
|
+
const [open, setOpen] = React.useState(false);
|
|
39
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
40
|
+
const handleOpenChangeProp = useCallbackRef(onOpenChange);
|
|
41
|
+
const handleOpenChange = React.useCallback((open2)=>{
|
|
42
|
+
setOpen(open2);
|
|
43
|
+
handleOpenChangeProp(open2);
|
|
44
|
+
}, [
|
|
45
|
+
handleOpenChangeProp
|
|
46
|
+
]);
|
|
47
|
+
return /* @__PURE__ */ jsx(ContextMenuProvider, {
|
|
48
|
+
scope: __scopeContextMenu,
|
|
49
|
+
open,
|
|
50
|
+
onOpenChange: handleOpenChange,
|
|
51
|
+
modal,
|
|
52
|
+
children: /* @__PURE__ */ jsx(Root3, {
|
|
53
|
+
...menuScope,
|
|
54
|
+
dir,
|
|
55
|
+
open,
|
|
56
|
+
onOpenChange: handleOpenChange,
|
|
57
|
+
modal,
|
|
58
|
+
children
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
ContextMenu$1.displayName = CONTEXT_MENU_NAME;
|
|
63
|
+
var TRIGGER_NAME = "ContextMenuTrigger";
|
|
64
|
+
var ContextMenuTrigger$1 = React.forwardRef((props, forwardedRef)=>{
|
|
65
|
+
const { __scopeContextMenu, disabled = false, ...triggerProps } = props;
|
|
66
|
+
const context = useContextMenuContext(TRIGGER_NAME, __scopeContextMenu);
|
|
67
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
68
|
+
const pointRef = React.useRef({
|
|
69
|
+
x: 0,
|
|
70
|
+
y: 0
|
|
71
|
+
});
|
|
72
|
+
const virtualRef = React.useRef({
|
|
73
|
+
getBoundingClientRect: ()=>DOMRect.fromRect({
|
|
74
|
+
width: 0,
|
|
75
|
+
height: 0,
|
|
76
|
+
...pointRef.current
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
const longPressTimerRef = React.useRef(0);
|
|
80
|
+
const clearLongPress = React.useCallback(()=>window.clearTimeout(longPressTimerRef.current), []);
|
|
81
|
+
const handleOpen = (event)=>{
|
|
82
|
+
pointRef.current = {
|
|
83
|
+
x: event.clientX,
|
|
84
|
+
y: event.clientY
|
|
85
|
+
};
|
|
86
|
+
context.onOpenChange(true);
|
|
87
|
+
};
|
|
88
|
+
React.useEffect(()=>clearLongPress, [
|
|
89
|
+
clearLongPress
|
|
90
|
+
]);
|
|
91
|
+
React.useEffect(()=>void (disabled && clearLongPress()), [
|
|
92
|
+
disabled,
|
|
93
|
+
clearLongPress
|
|
94
|
+
]);
|
|
95
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsx(Anchor2, {
|
|
98
|
+
...menuScope,
|
|
99
|
+
virtualRef
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ jsx(Primitive.span, {
|
|
102
|
+
"data-state": context.open ? "open" : "closed",
|
|
103
|
+
"data-disabled": disabled ? "" : void 0,
|
|
104
|
+
...triggerProps,
|
|
105
|
+
ref: forwardedRef,
|
|
106
|
+
style: {
|
|
107
|
+
WebkitTouchCallout: "none",
|
|
108
|
+
...props.style
|
|
109
|
+
},
|
|
110
|
+
onContextMenu: disabled ? props.onContextMenu : composeEventHandlers(props.onContextMenu, (event)=>{
|
|
111
|
+
clearLongPress();
|
|
112
|
+
handleOpen(event);
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
}),
|
|
115
|
+
onPointerDown: disabled ? props.onPointerDown : composeEventHandlers(props.onPointerDown, whenTouchOrPen((event)=>{
|
|
116
|
+
clearLongPress();
|
|
117
|
+
longPressTimerRef.current = window.setTimeout(()=>handleOpen(event), 700);
|
|
118
|
+
})),
|
|
119
|
+
onPointerMove: disabled ? props.onPointerMove : composeEventHandlers(props.onPointerMove, whenTouchOrPen(clearLongPress)),
|
|
120
|
+
onPointerCancel: disabled ? props.onPointerCancel : composeEventHandlers(props.onPointerCancel, whenTouchOrPen(clearLongPress)),
|
|
121
|
+
onPointerUp: disabled ? props.onPointerUp : composeEventHandlers(props.onPointerUp, whenTouchOrPen(clearLongPress))
|
|
122
|
+
})
|
|
123
|
+
]
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
ContextMenuTrigger$1.displayName = TRIGGER_NAME;
|
|
127
|
+
var PORTAL_NAME = "ContextMenuPortal";
|
|
128
|
+
var ContextMenuPortal$1 = (props)=>{
|
|
129
|
+
const { __scopeContextMenu, ...portalProps } = props;
|
|
130
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
131
|
+
return /* @__PURE__ */ jsx(Portal, {
|
|
132
|
+
...menuScope,
|
|
133
|
+
...portalProps
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
ContextMenuPortal$1.displayName = PORTAL_NAME;
|
|
137
|
+
var CONTENT_NAME = "ContextMenuContent";
|
|
138
|
+
var ContextMenuContent$1 = React.forwardRef((props, forwardedRef)=>{
|
|
139
|
+
const { __scopeContextMenu, ...contentProps } = props;
|
|
140
|
+
const context = useContextMenuContext(CONTENT_NAME, __scopeContextMenu);
|
|
141
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
142
|
+
const hasInteractedOutsideRef = React.useRef(false);
|
|
143
|
+
return /* @__PURE__ */ jsx(Content2$1, {
|
|
144
|
+
...menuScope,
|
|
145
|
+
...contentProps,
|
|
146
|
+
ref: forwardedRef,
|
|
147
|
+
side: "right",
|
|
148
|
+
sideOffset: 2,
|
|
149
|
+
align: "start",
|
|
150
|
+
onCloseAutoFocus: (event)=>{
|
|
151
|
+
props.onCloseAutoFocus?.(event);
|
|
152
|
+
if (!event.defaultPrevented && hasInteractedOutsideRef.current) {
|
|
153
|
+
event.preventDefault();
|
|
154
|
+
}
|
|
155
|
+
hasInteractedOutsideRef.current = false;
|
|
156
|
+
},
|
|
157
|
+
onInteractOutside: (event)=>{
|
|
158
|
+
props.onInteractOutside?.(event);
|
|
159
|
+
if (!event.defaultPrevented && !context.modal) hasInteractedOutsideRef.current = true;
|
|
160
|
+
},
|
|
161
|
+
style: {
|
|
162
|
+
...props.style,
|
|
163
|
+
// re-namespace exposed content custom properties
|
|
164
|
+
...{
|
|
165
|
+
"--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
166
|
+
"--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
167
|
+
"--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
168
|
+
"--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
169
|
+
"--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
ContextMenuContent$1.displayName = CONTENT_NAME;
|
|
175
|
+
var GROUP_NAME = "ContextMenuGroup";
|
|
176
|
+
var ContextMenuGroup$1 = React.forwardRef((props, forwardedRef)=>{
|
|
177
|
+
const { __scopeContextMenu, ...groupProps } = props;
|
|
178
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
179
|
+
return /* @__PURE__ */ jsx(Group, {
|
|
180
|
+
...menuScope,
|
|
181
|
+
...groupProps,
|
|
182
|
+
ref: forwardedRef
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
ContextMenuGroup$1.displayName = GROUP_NAME;
|
|
186
|
+
var LABEL_NAME = "ContextMenuLabel";
|
|
187
|
+
var ContextMenuLabel$1 = React.forwardRef((props, forwardedRef)=>{
|
|
188
|
+
const { __scopeContextMenu, ...labelProps } = props;
|
|
189
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
190
|
+
return /* @__PURE__ */ jsx(Label, {
|
|
191
|
+
...menuScope,
|
|
192
|
+
...labelProps,
|
|
193
|
+
ref: forwardedRef
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
ContextMenuLabel$1.displayName = LABEL_NAME;
|
|
197
|
+
var ITEM_NAME = "ContextMenuItem";
|
|
198
|
+
var ContextMenuItem$1 = React.forwardRef((props, forwardedRef)=>{
|
|
199
|
+
const { __scopeContextMenu, ...itemProps } = props;
|
|
200
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
201
|
+
return /* @__PURE__ */ jsx(Item2$1, {
|
|
202
|
+
...menuScope,
|
|
203
|
+
...itemProps,
|
|
204
|
+
ref: forwardedRef
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
ContextMenuItem$1.displayName = ITEM_NAME;
|
|
208
|
+
var CHECKBOX_ITEM_NAME = "ContextMenuCheckboxItem";
|
|
209
|
+
var ContextMenuCheckboxItem$1 = React.forwardRef((props, forwardedRef)=>{
|
|
210
|
+
const { __scopeContextMenu, ...checkboxItemProps } = props;
|
|
211
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
212
|
+
return /* @__PURE__ */ jsx(CheckboxItem, {
|
|
213
|
+
...menuScope,
|
|
214
|
+
...checkboxItemProps,
|
|
215
|
+
ref: forwardedRef
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
ContextMenuCheckboxItem$1.displayName = CHECKBOX_ITEM_NAME;
|
|
219
|
+
var RADIO_GROUP_NAME = "ContextMenuRadioGroup";
|
|
220
|
+
var ContextMenuRadioGroup$1 = React.forwardRef((props, forwardedRef)=>{
|
|
221
|
+
const { __scopeContextMenu, ...radioGroupProps } = props;
|
|
222
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
223
|
+
return /* @__PURE__ */ jsx(RadioGroup, {
|
|
224
|
+
...menuScope,
|
|
225
|
+
...radioGroupProps,
|
|
226
|
+
ref: forwardedRef
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
ContextMenuRadioGroup$1.displayName = RADIO_GROUP_NAME;
|
|
230
|
+
var RADIO_ITEM_NAME = "ContextMenuRadioItem";
|
|
231
|
+
var ContextMenuRadioItem$1 = React.forwardRef((props, forwardedRef)=>{
|
|
232
|
+
const { __scopeContextMenu, ...radioItemProps } = props;
|
|
233
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
234
|
+
return /* @__PURE__ */ jsx(RadioItem, {
|
|
235
|
+
...menuScope,
|
|
236
|
+
...radioItemProps,
|
|
237
|
+
ref: forwardedRef
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
ContextMenuRadioItem$1.displayName = RADIO_ITEM_NAME;
|
|
241
|
+
var INDICATOR_NAME = "ContextMenuItemIndicator";
|
|
242
|
+
var ContextMenuItemIndicator = React.forwardRef((props, forwardedRef)=>{
|
|
243
|
+
const { __scopeContextMenu, ...itemIndicatorProps } = props;
|
|
244
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
245
|
+
return /* @__PURE__ */ jsx(ItemIndicator, {
|
|
246
|
+
...menuScope,
|
|
247
|
+
...itemIndicatorProps,
|
|
248
|
+
ref: forwardedRef
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
ContextMenuItemIndicator.displayName = INDICATOR_NAME;
|
|
252
|
+
var SEPARATOR_NAME = "ContextMenuSeparator";
|
|
253
|
+
var ContextMenuSeparator$1 = React.forwardRef((props, forwardedRef)=>{
|
|
254
|
+
const { __scopeContextMenu, ...separatorProps } = props;
|
|
255
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
256
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
257
|
+
...menuScope,
|
|
258
|
+
...separatorProps,
|
|
259
|
+
ref: forwardedRef
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
ContextMenuSeparator$1.displayName = SEPARATOR_NAME;
|
|
263
|
+
var ARROW_NAME = "ContextMenuArrow";
|
|
264
|
+
var ContextMenuArrow = React.forwardRef((props, forwardedRef)=>{
|
|
265
|
+
const { __scopeContextMenu, ...arrowProps } = props;
|
|
266
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
267
|
+
return /* @__PURE__ */ jsx(Arrow2, {
|
|
268
|
+
...menuScope,
|
|
269
|
+
...arrowProps,
|
|
270
|
+
ref: forwardedRef
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
ContextMenuArrow.displayName = ARROW_NAME;
|
|
274
|
+
var SUB_NAME = "ContextMenuSub";
|
|
275
|
+
var ContextMenuSub$1 = (props)=>{
|
|
276
|
+
const { __scopeContextMenu, children, onOpenChange, open: openProp, defaultOpen } = props;
|
|
277
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
278
|
+
const [open, setOpen] = useControllableState({
|
|
279
|
+
prop: openProp,
|
|
280
|
+
defaultProp: defaultOpen ?? false,
|
|
281
|
+
onChange: onOpenChange,
|
|
282
|
+
caller: SUB_NAME
|
|
283
|
+
});
|
|
284
|
+
return /* @__PURE__ */ jsx(Sub, {
|
|
285
|
+
...menuScope,
|
|
286
|
+
open,
|
|
287
|
+
onOpenChange: setOpen,
|
|
288
|
+
children
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
ContextMenuSub$1.displayName = SUB_NAME;
|
|
292
|
+
var SUB_TRIGGER_NAME = "ContextMenuSubTrigger";
|
|
293
|
+
var ContextMenuSubTrigger$1 = React.forwardRef((props, forwardedRef)=>{
|
|
294
|
+
const { __scopeContextMenu, ...triggerItemProps } = props;
|
|
295
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
296
|
+
return /* @__PURE__ */ jsx(SubTrigger, {
|
|
297
|
+
...menuScope,
|
|
298
|
+
...triggerItemProps,
|
|
299
|
+
ref: forwardedRef
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
ContextMenuSubTrigger$1.displayName = SUB_TRIGGER_NAME;
|
|
303
|
+
var SUB_CONTENT_NAME = "ContextMenuSubContent";
|
|
304
|
+
var ContextMenuSubContent$1 = React.forwardRef((props, forwardedRef)=>{
|
|
305
|
+
const { __scopeContextMenu, ...subContentProps } = props;
|
|
306
|
+
const menuScope = useMenuScope(__scopeContextMenu);
|
|
307
|
+
return /* @__PURE__ */ jsx(SubContent, {
|
|
308
|
+
...menuScope,
|
|
309
|
+
...subContentProps,
|
|
310
|
+
ref: forwardedRef,
|
|
311
|
+
style: {
|
|
312
|
+
...props.style,
|
|
313
|
+
// re-namespace exposed content custom properties
|
|
314
|
+
...{
|
|
315
|
+
"--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
316
|
+
"--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
317
|
+
"--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
318
|
+
"--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
319
|
+
"--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
ContextMenuSubContent$1.displayName = SUB_CONTENT_NAME;
|
|
325
|
+
function whenTouchOrPen(handler) {
|
|
326
|
+
return (event)=>event.pointerType !== "mouse" ? handler(event) : void 0;
|
|
327
|
+
}
|
|
328
|
+
var Root2 = ContextMenu$1;
|
|
329
|
+
var Trigger = ContextMenuTrigger$1;
|
|
330
|
+
var Portal2 = ContextMenuPortal$1;
|
|
331
|
+
var Content2 = ContextMenuContent$1;
|
|
332
|
+
var Group2 = ContextMenuGroup$1;
|
|
333
|
+
var Label2 = ContextMenuLabel$1;
|
|
334
|
+
var Item2 = ContextMenuItem$1;
|
|
335
|
+
var CheckboxItem2 = ContextMenuCheckboxItem$1;
|
|
336
|
+
var RadioGroup2 = ContextMenuRadioGroup$1;
|
|
337
|
+
var RadioItem2 = ContextMenuRadioItem$1;
|
|
338
|
+
var ItemIndicator2 = ContextMenuItemIndicator;
|
|
339
|
+
var Separator2 = ContextMenuSeparator$1;
|
|
340
|
+
var Sub2 = ContextMenuSub$1;
|
|
341
|
+
var SubTrigger2 = ContextMenuSubTrigger$1;
|
|
342
|
+
var SubContent2 = ContextMenuSubContent$1;
|
|
343
|
+
|
|
344
|
+
function ContextMenu({ ...props }) {
|
|
345
|
+
return /*#__PURE__*/ React.createElement(Root2, {
|
|
346
|
+
"data-slot": "context-menu",
|
|
347
|
+
...props
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
function ContextMenuTrigger({ ...props }) {
|
|
351
|
+
return /*#__PURE__*/ React.createElement(Trigger, {
|
|
352
|
+
"data-slot": "context-menu-trigger",
|
|
353
|
+
...props
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
function ContextMenuGroup({ ...props }) {
|
|
357
|
+
return /*#__PURE__*/ React.createElement(Group2, {
|
|
358
|
+
"data-slot": "context-menu-group",
|
|
359
|
+
...props
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
function ContextMenuPortal({ ...props }) {
|
|
363
|
+
return /*#__PURE__*/ React.createElement(Portal2, {
|
|
364
|
+
"data-slot": "context-menu-portal",
|
|
365
|
+
...props
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
function ContextMenuSub({ ...props }) {
|
|
369
|
+
return /*#__PURE__*/ React.createElement(Sub2, {
|
|
370
|
+
"data-slot": "context-menu-sub",
|
|
371
|
+
...props
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
function ContextMenuRadioGroup({ ...props }) {
|
|
375
|
+
return /*#__PURE__*/ React.createElement(RadioGroup2, {
|
|
376
|
+
"data-slot": "context-menu-radio-group",
|
|
377
|
+
...props
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
function ContextMenuSubTrigger({ className, inset, children, ...props }) {
|
|
381
|
+
return /*#__PURE__*/ React.createElement(SubTrigger2, {
|
|
382
|
+
"data-slot": "context-menu-sub-trigger",
|
|
383
|
+
"data-inset": inset,
|
|
384
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
385
|
+
...props
|
|
386
|
+
}, children, /*#__PURE__*/ React.createElement(ChevronRight, {
|
|
387
|
+
className: "ml-auto"
|
|
388
|
+
}));
|
|
389
|
+
}
|
|
390
|
+
function ContextMenuSubContent({ className, ...props }) {
|
|
391
|
+
return /*#__PURE__*/ React.createElement(SubContent2, {
|
|
392
|
+
"data-slot": "context-menu-sub-content",
|
|
393
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
|
|
394
|
+
...props
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
function ContextMenuContent({ className, ...props }) {
|
|
398
|
+
return /*#__PURE__*/ React.createElement(Portal2, null, /*#__PURE__*/ React.createElement(Content2, {
|
|
399
|
+
"data-slot": "context-menu-content",
|
|
400
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className),
|
|
401
|
+
...props
|
|
402
|
+
}));
|
|
403
|
+
}
|
|
404
|
+
function ContextMenuItem({ className, inset, variant = "default", ...props }) {
|
|
405
|
+
return /*#__PURE__*/ React.createElement(Item2, {
|
|
406
|
+
"data-slot": "context-menu-item",
|
|
407
|
+
"data-inset": inset,
|
|
408
|
+
"data-variant": variant,
|
|
409
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
410
|
+
...props
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
function ContextMenuCheckboxItem({ className, children, checked, ...props }) {
|
|
414
|
+
return /*#__PURE__*/ React.createElement(CheckboxItem2, {
|
|
415
|
+
"data-slot": "context-menu-checkbox-item",
|
|
416
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
417
|
+
checked: checked,
|
|
418
|
+
...props
|
|
419
|
+
}, /*#__PURE__*/ React.createElement("span", {
|
|
420
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
421
|
+
}, /*#__PURE__*/ React.createElement(ItemIndicator2, null, /*#__PURE__*/ React.createElement(Check, {
|
|
422
|
+
className: "size-4"
|
|
423
|
+
}))), children);
|
|
424
|
+
}
|
|
425
|
+
function ContextMenuRadioItem({ className, children, ...props }) {
|
|
426
|
+
return /*#__PURE__*/ React.createElement(RadioItem2, {
|
|
427
|
+
"data-slot": "context-menu-radio-item",
|
|
428
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
429
|
+
...props
|
|
430
|
+
}, /*#__PURE__*/ React.createElement("span", {
|
|
431
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"
|
|
432
|
+
}, /*#__PURE__*/ React.createElement(ItemIndicator2, null, /*#__PURE__*/ React.createElement(Circle, {
|
|
433
|
+
className: "size-2 fill-current"
|
|
434
|
+
}))), children);
|
|
435
|
+
}
|
|
436
|
+
function ContextMenuLabel({ className, inset, ...props }) {
|
|
437
|
+
return /*#__PURE__*/ React.createElement(Label2, {
|
|
438
|
+
"data-slot": "context-menu-label",
|
|
439
|
+
"data-inset": inset,
|
|
440
|
+
className: cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
441
|
+
...props
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
function ContextMenuSeparator({ className, ...props }) {
|
|
445
|
+
return /*#__PURE__*/ React.createElement(Separator2, {
|
|
446
|
+
"data-slot": "context-menu-separator",
|
|
447
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
448
|
+
...props
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
function ContextMenuShortcut({ className, ...props }) {
|
|
452
|
+
return /*#__PURE__*/ React.createElement("span", {
|
|
453
|
+
"data-slot": "context-menu-shortcut",
|
|
454
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
455
|
+
...props
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger };
|
|
460
|
+
//# sourceMappingURL=index.mjs.map
|