ivt 0.4.3 → 0.4.5
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 +14 -14
- package/dist/alert/index.mjs +2 -2
- package/dist/alert-dialog/index.mjs +16 -16
- package/dist/alert-dialog/index.mjs.map +1 -1
- package/dist/avatar/index.mjs +7 -7
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.d.ts +34 -8
- package/dist/base/index.mjs +71 -639
- package/dist/base/index.mjs.map +1 -1
- package/dist/button/index.mjs +3 -3
- package/dist/calendar/index.mjs +8 -8
- package/dist/card/index.mjs +2 -2
- package/dist/chart/index.mjs +4 -4
- package/dist/chart/index.mjs.map +1 -1
- package/dist/checkbox/index.mjs +13 -13
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chunks/{Container-OkpmLImV.mjs → Container-DVypwIQb.mjs} +2 -2
- package/dist/chunks/{Container-OkpmLImV.mjs.map → Container-DVypwIQb.mjs.map} +1 -1
- package/dist/chunks/{_commonjsHelpers-DB0L5QuM.mjs → _commonjsHelpers-DxUjvHAf.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-DxUjvHAf.mjs.map +1 -0
- package/dist/chunks/{accordion-D8D50bOM.mjs → accordion-C-7WU65v.mjs} +12 -12
- package/dist/chunks/{accordion-D8D50bOM.mjs.map → accordion-C-7WU65v.mjs.map} +1 -1
- package/dist/chunks/{badge-D6WUAOGu.mjs → badge-FyqsRWpb.mjs} +2 -2
- package/dist/chunks/{badge-D6WUAOGu.mjs.map → badge-FyqsRWpb.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-CHV3NDgz.mjs → bundle-mjs--Uc0zBMR.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-CHV3NDgz.mjs.map → bundle-mjs--Uc0zBMR.mjs.map} +1 -1
- package/dist/chunks/{button-C4494Xwz.mjs → button-CkvbfoBC.mjs} +2 -2
- package/dist/chunks/{button-C4494Xwz.mjs.map → button-CkvbfoBC.mjs.map} +1 -1
- package/dist/chunks/{calendar-Bn7etJ7O.mjs → calendar-DthuUOQB.mjs} +6 -6
- package/dist/chunks/{calendar-Bn7etJ7O.mjs.map → calendar-DthuUOQB.mjs.map} +1 -1
- package/dist/chunks/{check-BufRfuJc.mjs → check-CEEnU7uo.mjs} +2 -2
- package/dist/chunks/{check-BufRfuJc.mjs.map → check-CEEnU7uo.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-B2x6HHdH.mjs → chevron-down-CdtWWCvB.mjs} +2 -2
- package/dist/chunks/{chevron-down-B2x6HHdH.mjs.map → chevron-down-CdtWWCvB.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-DII9rLXX.mjs → chevron-left-dKr4sXaL.mjs} +2 -2
- package/dist/chunks/{chevron-left-DII9rLXX.mjs.map → chevron-left-dKr4sXaL.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-lKnfXpjb.mjs → chevron-right-BJERqiST.mjs} +2 -2
- package/dist/chunks/{chevron-right-lKnfXpjb.mjs.map → chevron-right-BJERqiST.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-B_ep4nON.mjs → chevrons-up-down-CvLRAoM4.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-B_ep4nON.mjs.map → chevrons-up-down-CvLRAoM4.mjs.map} +1 -1
- package/dist/chunks/{command-CrYOqG25.mjs → command-BT07aIMk.mjs} +8 -8
- package/dist/chunks/command-BT07aIMk.mjs.map +1 -0
- package/dist/chunks/{createLucideIcon-BAOK8uBo.mjs → createLucideIcon-C-36jtLf.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-BAOK8uBo.mjs.map → createLucideIcon-C-36jtLf.mjs.map} +1 -1
- package/dist/chunks/{dialog-FO9bKZ6s.mjs → dialog-E_tuNVVP.mjs} +4 -4
- package/dist/chunks/dialog-E_tuNVVP.mjs.map +1 -0
- package/dist/chunks/{hover-card-CuN13oVM.mjs → hover-card-BnkDAKKp.mjs} +10 -10
- package/dist/chunks/{hover-card-CuN13oVM.mjs.map → hover-card-BnkDAKKp.mjs.map} +1 -1
- package/dist/chunks/{index--albQ_45.mjs → index-0tMmOuv1.mjs} +3 -3
- package/dist/chunks/{index--albQ_45.mjs.map → index-0tMmOuv1.mjs.map} +1 -1
- package/dist/chunks/{index-BzMhdUkg.mjs → index-B63fbqEU.mjs} +1 -1
- package/dist/chunks/{index-BzMhdUkg.mjs.map → index-B63fbqEU.mjs.map} +1 -1
- package/dist/chunks/{index-BNqOXbUm.mjs → index-BIfMxNBh.mjs} +2 -2
- package/dist/chunks/{index-BNqOXbUm.mjs.map → index-BIfMxNBh.mjs.map} +1 -1
- package/dist/chunks/{index-mYta_RI8.mjs → index-Bv_h_hMx.mjs} +10 -10
- package/dist/chunks/{index-mYta_RI8.mjs.map → index-Bv_h_hMx.mjs.map} +1 -1
- package/dist/chunks/{index-Df9Yxox9.mjs → index-Bzi8Hpka.mjs} +5 -5
- package/dist/chunks/{index-Df9Yxox9.mjs.map → index-Bzi8Hpka.mjs.map} +1 -1
- package/dist/chunks/{index-CXNCVcaz.mjs → index-Cf5nP8Sx.mjs} +2 -2
- package/dist/chunks/{index-CXNCVcaz.mjs.map → index-Cf5nP8Sx.mjs.map} +1 -1
- package/dist/chunks/{index-DfZ3GX4x.mjs → index-CiQJ7wod.mjs} +2 -2
- package/dist/chunks/{index-DfZ3GX4x.mjs.map → index-CiQJ7wod.mjs.map} +1 -1
- package/dist/chunks/{index-CUDW0ZQ_.mjs → index-Cn5ihFPu.mjs} +1 -1
- package/dist/chunks/{index-CUDW0ZQ_.mjs.map → index-Cn5ihFPu.mjs.map} +1 -1
- package/dist/chunks/{index-DzjTqHOw.mjs → index-D1toVD_V.mjs} +1 -1
- package/dist/chunks/{index-DzjTqHOw.mjs.map → index-D1toVD_V.mjs.map} +1 -1
- package/dist/chunks/{index-zNRN-G4N.mjs → index-D7MXDvLR.mjs} +7 -7
- package/dist/chunks/{index-zNRN-G4N.mjs.map → index-D7MXDvLR.mjs.map} +1 -1
- package/dist/chunks/{index-Dw8lQ-RR.mjs → index-DfGdJ6wp.mjs} +1 -1
- package/dist/chunks/{index-Dw8lQ-RR.mjs.map → index-DfGdJ6wp.mjs.map} +1 -1
- package/dist/chunks/{index-CbW8A2kC.mjs → index-DujcHJqa.mjs} +1 -1
- package/dist/chunks/{index-CbW8A2kC.mjs.map → index-DujcHJqa.mjs.map} +1 -1
- package/dist/chunks/{index-DT-ocbAI.mjs → index-OeC6d8TA.mjs} +2 -2
- package/dist/chunks/{index-DT-ocbAI.mjs.map → index-OeC6d8TA.mjs.map} +1 -1
- package/dist/chunks/{index-BbDRMUvK.mjs → index-VGFs-gvq.mjs} +1 -1
- package/dist/chunks/{index-BbDRMUvK.mjs.map → index-VGFs-gvq.mjs.map} +1 -1
- package/dist/chunks/{index-DzMHHCWk.mjs → index-ZiahhVWN.mjs} +1 -1
- package/dist/chunks/{index-DzMHHCWk.mjs.map → index-ZiahhVWN.mjs.map} +1 -1
- package/dist/chunks/{index-D_xzHl5d.mjs → index-hd6oiDyZ.mjs} +1 -1
- package/dist/chunks/{index-D_xzHl5d.mjs.map → index-hd6oiDyZ.mjs.map} +1 -1
- package/dist/chunks/{index-BASEfxEg.mjs → index-mnhyF3Xs.mjs} +28 -14
- package/dist/chunks/index-mnhyF3Xs.mjs.map +1 -0
- package/dist/chunks/{index-LseEEE-q.mjs → index-n6Vlh2qs.mjs} +9 -9
- package/dist/chunks/{index-LseEEE-q.mjs.map → index-n6Vlh2qs.mjs.map} +1 -1
- package/dist/chunks/{index-8gnkKZlE.mjs → index-oRHhKb2z.mjs} +1 -1
- package/dist/chunks/{index-8gnkKZlE.mjs.map → index-oRHhKb2z.mjs.map} +1 -1
- package/dist/chunks/{index-CX0Te_pb.mjs → index-ypP8ZSEh.mjs} +6 -6
- package/dist/chunks/{index-CX0Te_pb.mjs.map → index-ypP8ZSEh.mjs.map} +1 -1
- package/dist/chunks/{input-B2f0GlFq.mjs → input-f9f7o4dl.mjs} +2 -2
- package/dist/chunks/{input-B2f0GlFq.mjs.map → input-f9f7o4dl.mjs.map} +1 -1
- package/dist/chunks/{label-CTvusVhq.mjs → label-ClnI7CPw.mjs} +3 -3
- package/dist/chunks/label-ClnI7CPw.mjs.map +1 -0
- package/dist/chunks/{pagination-BLz66_yn.mjs → pagination-ByGWAyDY.mjs} +6 -6
- package/dist/chunks/{pagination-BLz66_yn.mjs.map → pagination-ByGWAyDY.mjs.map} +1 -1
- package/dist/chunks/{popover-CuyS8YJG.mjs → popover-BP0h5od9.mjs} +12 -12
- package/dist/chunks/{popover-CuyS8YJG.mjs.map → popover-BP0h5od9.mjs.map} +1 -1
- package/dist/chunks/{progress-Ck6wO1t2.mjs → progress-C36nV_EJ.mjs} +4 -4
- package/dist/chunks/progress-C36nV_EJ.mjs.map +1 -0
- package/dist/chunks/pt-BR-B365hYCq.mjs +608 -0
- package/dist/chunks/pt-BR-B365hYCq.mjs.map +1 -0
- package/dist/chunks/{scroll-area-CD6RlkcP.mjs → scroll-area-BCPovfc9.mjs} +10 -10
- package/dist/chunks/{scroll-area-CD6RlkcP.mjs.map → scroll-area-BCPovfc9.mjs.map} +1 -1
- package/dist/chunks/{select-WF2nid0z.mjs → select-DsHm4Ncw.mjs} +5 -5
- package/dist/chunks/select-DsHm4Ncw.mjs.map +1 -0
- package/dist/chunks/{separator-BK0Tvy4g.mjs → separator-D5jBoFYi.mjs} +3 -3
- package/dist/chunks/separator-D5jBoFYi.mjs.map +1 -0
- package/dist/chunks/{skeleton-Bl-MaKOs.mjs → skeleton-BW9vlu4U.mjs} +2 -2
- package/dist/chunks/{skeleton-Bl-MaKOs.mjs.map → skeleton-BW9vlu4U.mjs.map} +1 -1
- package/dist/chunks/{sortable-DRqX-gMK.mjs → sortable-DbjP8Kx8.mjs} +3 -3
- package/dist/chunks/{sortable-DRqX-gMK.mjs.map → sortable-DbjP8Kx8.mjs.map} +1 -1
- package/dist/chunks/{table-Dw1XMlWf.mjs → table-BrJ_iN3j.mjs} +2 -2
- package/dist/chunks/table-BrJ_iN3j.mjs.map +1 -0
- package/dist/chunks/{toggle-EOJD2uWa.mjs → toggle-BYDRoIw7.mjs} +5 -5
- package/dist/chunks/toggle-BYDRoIw7.mjs.map +1 -0
- package/dist/chunks/{tooltip-CyByO4MF.mjs → tooltip-DnGcpocO.mjs} +12 -12
- package/dist/chunks/tooltip-DnGcpocO.mjs.map +1 -0
- package/dist/chunks/{trash-2-Dnyls9bQ.mjs → trash-2-Ccqlx7cY.mjs} +2 -2
- package/dist/chunks/{trash-2-Dnyls9bQ.mjs.map → trash-2-Ccqlx7cY.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-CZnabdCM.mjs → tslib.es6-CZ32kgxs.mjs} +1 -1
- package/dist/chunks/{tslib.es6-CZnabdCM.mjs.map → tslib.es6-CZ32kgxs.mjs.map} +1 -1
- package/dist/chunks/{utils-Dizh2I4E.mjs → utils-SWF3jXjy.mjs} +2 -2
- package/dist/chunks/{utils-Dizh2I4E.mjs.map → utils-SWF3jXjy.mjs.map} +1 -1
- package/dist/chunks/{x-D0eS_uVN.mjs → x-B9_z9ee1.mjs} +2 -2
- package/dist/chunks/{x-D0eS_uVN.mjs.map → x-B9_z9ee1.mjs.map} +1 -1
- package/dist/combobox/index.mjs +25 -25
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.mjs +19 -19
- package/dist/data-table/index.mjs +41 -41
- package/dist/data-table/index.mjs.map +1 -1
- package/dist/date-picker/index.d.ts +38 -0
- package/dist/date-picker/index.mjs +63 -0
- package/dist/date-picker/index.mjs.map +1 -0
- package/dist/dialog/index.mjs +18 -18
- package/dist/dropdown-menu/index.mjs +22 -23
- package/dist/dropdown-menu/index.mjs.map +1 -1
- package/dist/dropzone/index.mjs +17 -17
- package/dist/dropzone/index.mjs.map +1 -1
- package/dist/form/index.mjs +4 -4
- package/dist/form/index.mjs.map +1 -1
- package/dist/hover-card/index.mjs +14 -14
- package/dist/icon/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.mjs +3 -3
- 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 +22 -23
- package/dist/menubar/index.mjs.map +1 -1
- package/dist/multi-select/index.mjs +29 -29
- package/dist/multi-select/index.mjs.map +1 -1
- package/dist/pagination/index.mjs +7 -7
- package/dist/popover/index.mjs +17 -17
- package/dist/progress/index.mjs +5 -5
- package/dist/radio-group/index.mjs +20 -20
- package/dist/radio-group/index.mjs.map +1 -1
- package/dist/scroll-area/index.mjs +11 -11
- 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 +17 -17
- package/dist/sheet/index.mjs.map +1 -1
- package/dist/skeleton/index.mjs +3 -3
- package/dist/skeleton-component/index.mjs +4 -4
- package/dist/sonner/index.mjs.map +1 -1
- 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/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.mjs +2 -2
- package/dist/toast/index.mjs +14 -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/toggle-group/index.mjs.map +1 -1
- package/dist/tooltip/index.mjs +16 -16
- package/package.json +5 -5
- package/dist/chunks/_commonjsHelpers-DB0L5QuM.mjs.map +0 -1
- package/dist/chunks/circle-B8A0IGvj.mjs +0 -17
- package/dist/chunks/circle-B8A0IGvj.mjs.map +0 -1
- package/dist/chunks/command-CrYOqG25.mjs.map +0 -1
- package/dist/chunks/dialog-FO9bKZ6s.mjs.map +0 -1
- package/dist/chunks/index-BASEfxEg.mjs.map +0 -1
- package/dist/chunks/label-CTvusVhq.mjs.map +0 -1
- package/dist/chunks/progress-Ck6wO1t2.mjs.map +0 -1
- package/dist/chunks/select-WF2nid0z.mjs.map +0 -1
- package/dist/chunks/separator-BK0Tvy4g.mjs.map +0 -1
- package/dist/chunks/table-Dw1XMlWf.mjs.map +0 -1
- package/dist/chunks/toggle-EOJD2uWa.mjs.map +0 -1
- package/dist/chunks/tooltip-CyByO4MF.mjs.map +0 -1
package/dist/accordion/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export { A as Accordion, c as AccordionContent, a as AccordionItem, b as AccordionTrigger } from '../chunks/accordion-
|
|
2
|
-
import '../chunks/utils-
|
|
3
|
-
import '../chunks/bundle-mjs
|
|
1
|
+
export { A as Accordion, c as AccordionContent, a as AccordionItem, b as AccordionTrigger } from '../chunks/accordion-C-7WU65v.mjs';
|
|
2
|
+
import '../chunks/utils-SWF3jXjy.mjs';
|
|
3
|
+
import '../chunks/bundle-mjs--Uc0zBMR.mjs';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../chunks/index-
|
|
5
|
+
import '../chunks/index-ZiahhVWN.mjs';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
import '@radix-ui/react-collection';
|
|
8
|
-
import '../chunks/index-
|
|
9
|
-
import '../chunks/index-
|
|
10
|
-
import '../chunks/index-
|
|
11
|
-
import '../chunks/index-
|
|
12
|
-
import '../chunks/index-
|
|
8
|
+
import '../chunks/index-DfGdJ6wp.mjs';
|
|
9
|
+
import '../chunks/index-VGFs-gvq.mjs';
|
|
10
|
+
import '../chunks/index-CiQJ7wod.mjs';
|
|
11
|
+
import '../chunks/index-hd6oiDyZ.mjs';
|
|
12
|
+
import '../chunks/index-DujcHJqa.mjs';
|
|
13
13
|
import 'react-dom';
|
|
14
14
|
import '@radix-ui/react-slot';
|
|
15
|
-
import '../chunks/index
|
|
16
|
-
import '../chunks/index-
|
|
17
|
-
import '../chunks/index-
|
|
18
|
-
import '../chunks/chevron-down-
|
|
19
|
-
import '../chunks/createLucideIcon-
|
|
15
|
+
import '../chunks/index-0tMmOuv1.mjs';
|
|
16
|
+
import '../chunks/index-BIfMxNBh.mjs';
|
|
17
|
+
import '../chunks/index-oRHhKb2z.mjs';
|
|
18
|
+
import '../chunks/chevron-down-CdtWWCvB.mjs';
|
|
19
|
+
import '../chunks/createLucideIcon-C-36jtLf.mjs';
|
|
20
20
|
//# sourceMappingURL=index.mjs.map
|
package/dist/alert/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as cn } from '../chunks/utils-
|
|
1
|
+
import { c as cn } from '../chunks/utils-SWF3jXjy.mjs';
|
|
2
2
|
import { cva } from 'class-variance-authority';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import '../chunks/bundle-mjs
|
|
4
|
+
import '../chunks/bundle-mjs--Uc0zBMR.mjs';
|
|
5
5
|
|
|
6
6
|
const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
|
|
7
7
|
variants: {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { c as createContextScope } from '../chunks/index-
|
|
3
|
-
import { u as useComposedRefs } from '../chunks/index-
|
|
4
|
-
import { c as createDialogScope, R as Root, P as Portal, O as Overlay, b as Trigger, W as WarningProvider, a as Content, T as Title, D as Description, C as Close } from '../chunks/index-
|
|
5
|
-
import { c as composeEventHandlers } from '../chunks/index-
|
|
2
|
+
import { c as createContextScope } from '../chunks/index-ZiahhVWN.mjs';
|
|
3
|
+
import { u as useComposedRefs } from '../chunks/index-DfGdJ6wp.mjs';
|
|
4
|
+
import { c as createDialogScope, R as Root, P as Portal, O as Overlay, b as Trigger, W as WarningProvider, a as Content, T as Title, D as Description, C as Close } from '../chunks/index-Bv_h_hMx.mjs';
|
|
5
|
+
import { c as composeEventHandlers } from '../chunks/index-VGFs-gvq.mjs';
|
|
6
6
|
import { createSlottable } from '@radix-ui/react-slot';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
-
import { c as cn } from '../chunks/utils-
|
|
9
|
-
import { b as buttonVariants } from '../chunks/button-
|
|
10
|
-
import '../chunks/index-
|
|
11
|
-
import '../chunks/index-
|
|
12
|
-
import '../chunks/index-
|
|
13
|
-
import '../chunks/index-
|
|
14
|
-
import '../chunks/index-
|
|
8
|
+
import { c as cn } from '../chunks/utils-SWF3jXjy.mjs';
|
|
9
|
+
import { b as buttonVariants } from '../chunks/button-CkvbfoBC.mjs';
|
|
10
|
+
import '../chunks/index-BIfMxNBh.mjs';
|
|
11
|
+
import '../chunks/index-hd6oiDyZ.mjs';
|
|
12
|
+
import '../chunks/index-CiQJ7wod.mjs';
|
|
13
|
+
import '../chunks/index-ypP8ZSEh.mjs';
|
|
14
|
+
import '../chunks/index-DujcHJqa.mjs';
|
|
15
15
|
import 'react-dom';
|
|
16
|
-
import '../chunks/index-
|
|
17
|
-
import '../chunks/index-
|
|
18
|
-
import '../chunks/tslib.es6-
|
|
19
|
-
import '../chunks/index
|
|
20
|
-
import '../chunks/bundle-mjs
|
|
16
|
+
import '../chunks/index-D1toVD_V.mjs';
|
|
17
|
+
import '../chunks/index-Bzi8Hpka.mjs';
|
|
18
|
+
import '../chunks/tslib.es6-CZ32kgxs.mjs';
|
|
19
|
+
import '../chunks/index-0tMmOuv1.mjs';
|
|
20
|
+
import '../chunks/bundle-mjs--Uc0zBMR.mjs';
|
|
21
21
|
import 'class-variance-authority';
|
|
22
22
|
|
|
23
23
|
var ROOT_NAME = "AlertDialog";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../node_modules/@radix-ui/react-alert-dialog/dist/index.mjs","../../src/components/ui/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\n// src/alert-dialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createSlottable } from \"@radix-ui/react-slot\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = (props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n};\nAlertDialog.displayName = ROOT_NAME;\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar AlertDialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }\n);\nAlertDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"AlertDialogPortal\";\nvar AlertDialogPortal = (props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n};\nAlertDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"AlertDialogOverlay\";\nvar AlertDialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }\n);\nAlertDialogOverlay.displayName = OVERLAY_NAME;\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar Slottable = createSlottable(\"AlertDialogContent\");\nvar AlertDialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(\n DialogPrimitive.WarningProvider,\n {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"alert-dialog\",\n children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })\n ]\n }\n ) })\n }\n );\n }\n);\nAlertDialogContent.displayName = CONTENT_NAME;\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }\n);\nAlertDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescription = React.forwardRef((props, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n});\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogAction = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }\n);\nAlertDialogAction.displayName = ACTION_NAME;\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }\n);\nAlertDialogCancel.displayName = CANCEL_NAME;\nvar DescriptionWarning = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute(\"aria-describedby\")\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n return null;\n};\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport * as React from \"react\";\n\nimport { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n\treturn <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n\treturn <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n\treturn <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Overlay\n\t\t\tdata-slot=\"alert-dialog-overlay\"\n\t\t\tclassName={cn(\n\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n\treturn (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<AlertDialogPrimitive.Content\n\t\t\t\tdata-slot=\"alert-dialog-content\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPortal>\n\t);\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-footer\"\n\t\t\tclassName={cn(\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogTitle({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Title\n\t\t\tdata-slot=\"alert-dialog-title\"\n\t\t\tclassName={cn(\"text-lg font-semibold\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Description\n\t\t\tdata-slot=\"alert-dialog-description\"\n\t\t\tclassName={cn(\"text-muted-foreground text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogAction({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n\treturn <AlertDialogPrimitive.Action className={cn(buttonVariants(), className)} {...props} />;\n}\n\nfunction AlertDialogCancel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Cancel\n\t\t\tclassName={cn(buttonVariants({ variant: \"outline\" }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tAlertDialog,\n\tAlertDialogPortal,\n\tAlertDialogOverlay,\n\tAlertDialogTrigger,\n\tAlertDialogContent,\n\tAlertDialogHeader,\n\tAlertDialogFooter,\n\tAlertDialogTitle,\n\tAlertDialogDescription,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n};\n"],"names":["AlertDialog","DialogPrimitive.Root","AlertDialogTrigger","DialogPrimitive.Trigger","AlertDialogPortal","DialogPrimitive.Portal","AlertDialogOverlay","DialogPrimitive.Overlay","AlertDialogContent","DialogPrimitive.WarningProvider","DialogPrimitive.Content","AlertDialogTitle","DialogPrimitive.Title","AlertDialogDescription","DialogPrimitive.Description","AlertDialogAction","DialogPrimitive.Close","AlertDialogCancel","Root","Trigger","Portal","Overlay","Content","Title","Description","props","AlertDialogPrimitive","data-slot","className","cn","AlertDialogHeader","div","AlertDialogFooter","buttonVariants","variant"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcA,IAAM,SAAA,GAAY,aAAA;AAGlB,IAAM,CAAC,wBAAgD,CAAA,GAAI,mBAAmB,SAAA,EAAW;AACvF,IAAA;AACD,CAAA,CAAA;AACD,IAAM,iBAAiB,iBAAA,EA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H;;AAGP;AAEA,SAASZ,sBAAAA,CAAuB,EAC/Be,SAAS,EACT,GAAGH,KAAAA,EAC4D,EAAA;IAC/D,qBACC,KAAA,CAAA,aAAA,CAACC,YAAgC,EAAA;QAChCC,WAAAA,EAAU,0BAAA;AACVC,QAAAA,SAAAA,EAAWC,GAAG,+BAAA,EAAiCD,SAAAA,CAAAA;AAC9C,QAAA,GAAGH;;AAGP;AAEA,SAASV,iBAAAA,CAAkB,EAC1Ba,SAAS,EACT,GAAGH,KAAAA,EACuD,EAAA;IAC1D,qBAAO,KAAA,CAAA,aAAA,CAACC,MAA2B,EAAA;AAACE,QAAAA,SAAAA,EAAWC,GAAGI,cAAAA,EAAAA,EAAkBL,SAAAA,CAAAA;AAAa,QAAA,GAAGH;;AACrF;AAEA,SAASR,iBAAAA,CAAkB,EAC1BW,SAAS,EACT,GAAGH,KAAAA,EACuD,EAAA;IAC1D,qBACC,KAAA,CAAA,aAAA,CAACC,MAA2B,EAAA;AAC3BE,QAAAA,SAAAA,EAAWC,GAAGI,cAAAA,CAAe;YAAEC,OAAAA,EAAS;SAAU,CAAA,EAAIN,SAAAA,CAAAA;AACrD,QAAA,GAAGH;;AAGP;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../node_modules/@radix-ui/react-alert-dialog/dist/index.mjs","../../src/components/ui/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\n// src/alert-dialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createSlottable } from \"@radix-ui/react-slot\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = (props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n};\nAlertDialog.displayName = ROOT_NAME;\nvar TRIGGER_NAME = \"AlertDialogTrigger\";\nvar AlertDialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }\n);\nAlertDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"AlertDialogPortal\";\nvar AlertDialogPortal = (props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n};\nAlertDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"AlertDialogOverlay\";\nvar AlertDialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }\n);\nAlertDialogOverlay.displayName = OVERLAY_NAME;\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar Slottable = createSlottable(\"AlertDialogContent\");\nvar AlertDialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(\n DialogPrimitive.WarningProvider,\n {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"alert-dialog\",\n children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children: [\n /* @__PURE__ */ jsx(Slottable, { children }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef })\n ]\n }\n ) })\n }\n );\n }\n);\nAlertDialogContent.displayName = CONTENT_NAME;\nvar TITLE_NAME = \"AlertDialogTitle\";\nvar AlertDialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }\n);\nAlertDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"AlertDialogDescription\";\nvar AlertDialogDescription = React.forwardRef((props, forwardedRef) => {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n});\nAlertDialogDescription.displayName = DESCRIPTION_NAME;\nvar ACTION_NAME = \"AlertDialogAction\";\nvar AlertDialogAction = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }\n);\nAlertDialogAction.displayName = ACTION_NAME;\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }\n);\nAlertDialogCancel.displayName = CANCEL_NAME;\nvar DescriptionWarning = ({ contentRef }) => {\n const MESSAGE = `\\`${CONTENT_NAME}\\` requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the \\`${CONTENT_NAME}\\` by passing a \\`${DESCRIPTION_NAME}\\` component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an \\`id\\` and passing the same value to the \\`aria-describedby\\` prop in \\`${CONTENT_NAME}\\`. If the description is confusing or duplicative for sighted users, you can use the \\`@radix-ui/react-visually-hidden\\` primitive as a wrapper around your description component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;\n React.useEffect(() => {\n const hasDescription = document.getElementById(\n contentRef.current?.getAttribute(\"aria-describedby\")\n );\n if (!hasDescription) console.warn(MESSAGE);\n }, [MESSAGE, contentRef]);\n return null;\n};\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport * as React from \"react\";\n\nimport { buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\n\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n\treturn <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n\treturn <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n\treturn <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Overlay\n\t\t\tdata-slot=\"alert-dialog-overlay\"\n\t\t\tclassName={cn(\n\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n\treturn (\n\t\t<AlertDialogPortal>\n\t\t\t<AlertDialogOverlay />\n\t\t\t<AlertDialogPrimitive.Content\n\t\t\t\tdata-slot=\"alert-dialog-content\"\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPortal>\n\t);\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-header\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot=\"alert-dialog-footer\"\n\t\t\tclassName={cn(\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogTitle({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Title\n\t\t\tdata-slot=\"alert-dialog-title\"\n\t\t\tclassName={cn(\"text-lg font-semibold\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Description\n\t\t\tdata-slot=\"alert-dialog-description\"\n\t\t\tclassName={cn(\"text-muted-foreground text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AlertDialogAction({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {\n\treturn <AlertDialogPrimitive.Action className={cn(buttonVariants(), className)} {...props} />;\n}\n\nfunction AlertDialogCancel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n\treturn (\n\t\t<AlertDialogPrimitive.Cancel\n\t\t\tclassName={cn(buttonVariants({ variant: \"outline\" }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tAlertDialog,\n\tAlertDialogPortal,\n\tAlertDialogOverlay,\n\tAlertDialogTrigger,\n\tAlertDialogContent,\n\tAlertDialogHeader,\n\tAlertDialogFooter,\n\tAlertDialogTitle,\n\tAlertDialogDescription,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n};\n"],"names":["AlertDialog","DialogPrimitive.Root","AlertDialogTrigger","DialogPrimitive.Trigger","AlertDialogPortal","DialogPrimitive.Portal","AlertDialogOverlay","DialogPrimitive.Overlay","AlertDialogContent","DialogPrimitive.WarningProvider","DialogPrimitive.Content","AlertDialogTitle","DialogPrimitive.Title","AlertDialogDescription","DialogPrimitive.Description","AlertDialogAction","DialogPrimitive.Close","AlertDialogCancel","Root","Trigger","Portal","Overlay","Content","Title","Description","props","AlertDialogPrimitive","data-slot","className","cn","AlertDialogHeader","div","AlertDialogFooter","buttonVariants","variant"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAcA,IAAM,SAAA,GAAY,aAAA;AAGlB,IAAM,CAAC,wBAAgD,CAAA,GAAI,mBAAmB,SAAA,EAAW;AACvF,IAAA;AACD,CAAA,CAAA;AACD,IAAM,iBAAiB,iBAAA,EAAkB;AAKzC,IAAMA,aAAA,GAA0C,CAAC,KAAA,GAAA;AAC/C,IAAA,MAAM,EAAE,kBAAA,EAAoB,GAAG,gBAAA,EAAiB,GAAI,KAAA;IACpD,MAAM,WAAA,GAAc,eAAe,kBAAkB,CAAA;AACrD,IAAA,uBAAO,GAAA,CAAiBC,IAAA,EAAhB;AAAsB,QAAA,GAAG,WAAA;AAAc,QAAA,GAAG,gBAAA;QAAkB,KAAA,EAAO;KAAM,CA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SAAS,EACT,GAAGH,KAAAA,EACuD,EAAA;IAC1D,qBAAO,KAAA,CAAA,aAAA,CAACC,MAA2B,EAAA;AAACE,QAAAA,SAAAA,EAAWC,GAAGI,cAAAA,EAAAA,EAAkBL,SAAAA,CAAAA;AAAa,QAAA,GAAGH;;AACrF;AAEA,SAASR,iBAAAA,CAAkB,EAC1BW,SAAS,EACT,GAAGH,KAAAA,EACuD,EAAA;IAC1D,qBACC,KAAA,CAAA,aAAA,CAACC,MAA2B,EAAA;AAC3BE,QAAAA,SAAAA,EAAWC,GAAGI,cAAAA,CAAe;YAAEC,OAAAA,EAAS;SAAU,CAAA,EAAIN,SAAAA,CAAAA;AACrD,QAAA,GAAGH;;AAGP;;;;","x_google_ignoreList":[0]}
|
package/dist/avatar/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { c as createContextScope } from '../chunks/index-
|
|
3
|
-
import { u as useCallbackRef } from '../chunks/index-
|
|
4
|
-
import { u as useLayoutEffect2 } from '../chunks/index-
|
|
5
|
-
import { P as Primitive } from '../chunks/index-
|
|
6
|
-
import { r as requireShim } from '../chunks/index-
|
|
2
|
+
import { c as createContextScope } from '../chunks/index-ZiahhVWN.mjs';
|
|
3
|
+
import { u as useCallbackRef } from '../chunks/index-D1toVD_V.mjs';
|
|
4
|
+
import { u as useLayoutEffect2 } from '../chunks/index-hd6oiDyZ.mjs';
|
|
5
|
+
import { P as Primitive } from '../chunks/index-DujcHJqa.mjs';
|
|
6
|
+
import { r as requireShim } from '../chunks/index-B63fbqEU.mjs';
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
|
-
import { c as cn } from '../chunks/utils-
|
|
8
|
+
import { c as cn } from '../chunks/utils-SWF3jXjy.mjs';
|
|
9
9
|
import 'react-dom';
|
|
10
10
|
import '@radix-ui/react-slot';
|
|
11
|
-
import '../chunks/bundle-mjs
|
|
11
|
+
import '../chunks/bundle-mjs--Uc0zBMR.mjs';
|
|
12
12
|
|
|
13
13
|
var shimExports = requireShim();
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs","../../node_modules/@radix-ui/react-avatar/dist/index.mjs","../../src/components/ui/avatar/avatar.tsx"],"sourcesContent":["// src/use-is-hydrated.tsx\nimport { useSyncExternalStore } from \"use-sync-external-store/shim\";\nfunction useIsHydrated() {\n return useSyncExternalStore(\n subscribe,\n () => true,\n () => false\n );\n}\nfunction subscribe() {\n return () => {\n };\n}\nexport {\n useIsHydrated\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/avatar.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useIsHydrated } from \"@radix-ui/react-use-is-hydrated\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AVATAR_NAME = \"Avatar\";\nvar [createAvatarContext, createAvatarScope] = createContextScope(AVATAR_NAME);\nvar [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);\nvar Avatar = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAvatar, ...avatarProps } = props;\n const [imageLoadingStatus, setImageLoadingStatus] = React.useState(\"idle\");\n return /* @__PURE__ */ jsx(\n AvatarProvider,\n {\n scope: __scopeAvatar,\n imageLoadingStatus,\n onImageLoadingStatusChange: setImageLoadingStatus,\n children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })\n }\n );\n }\n);\nAvatar.displayName = AVATAR_NAME;\nvar IMAGE_NAME = \"AvatarImage\";\nvar AvatarImage = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAvatar, src, onLoadingStatusChange = () => {\n }, ...imageProps } = props;\n const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);\n const imageLoadingStatus = useImageLoadingStatus(src, imageProps);\n const handleLoadingStatusChange = useCallbackRef((status) => {\n onLoadingStatusChange(status);\n context.onImageLoadingStatusChange(status);\n });\n useLayoutEffect(() => {\n if (imageLoadingStatus !== \"idle\") {\n handleLoadingStatusChange(imageLoadingStatus);\n }\n }, [imageLoadingStatus, handleLoadingStatusChange]);\n return imageLoadingStatus === \"loaded\" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;\n }\n);\nAvatarImage.displayName = IMAGE_NAME;\nvar FALLBACK_NAME = \"AvatarFallback\";\nvar AvatarFallback = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAvatar, delayMs, ...fallbackProps } = props;\n const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);\n const [canRender, setCanRender] = React.useState(delayMs === void 0);\n React.useEffect(() => {\n if (delayMs !== void 0) {\n const timerId = window.setTimeout(() => setCanRender(true), delayMs);\n return () => window.clearTimeout(timerId);\n }\n }, [delayMs]);\n return canRender && context.imageLoadingStatus !== \"loaded\" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;\n }\n);\nAvatarFallback.displayName = FALLBACK_NAME;\nfunction resolveLoadingStatus(image, src) {\n if (!image) {\n return \"idle\";\n }\n if (!src) {\n return \"error\";\n }\n if (image.src !== src) {\n image.src = src;\n }\n return image.complete && image.naturalWidth > 0 ? \"loaded\" : \"loading\";\n}\nfunction useImageLoadingStatus(src, { referrerPolicy, crossOrigin }) {\n const isHydrated = useIsHydrated();\n const imageRef = React.useRef(null);\n const image = (() => {\n if (!isHydrated) return null;\n if (!imageRef.current) {\n imageRef.current = new window.Image();\n }\n return imageRef.current;\n })();\n const [loadingStatus, setLoadingStatus] = React.useState(\n () => resolveLoadingStatus(image, src)\n );\n useLayoutEffect(() => {\n setLoadingStatus(resolveLoadingStatus(image, src));\n }, [image, src]);\n useLayoutEffect(() => {\n const updateStatus = (status) => () => {\n setLoadingStatus(status);\n };\n if (!image) return;\n const handleLoad = updateStatus(\"loaded\");\n const handleError = updateStatus(\"error\");\n image.addEventListener(\"load\", handleLoad);\n image.addEventListener(\"error\", handleError);\n if (referrerPolicy) {\n image.referrerPolicy = referrerPolicy;\n }\n if (typeof crossOrigin === \"string\") {\n image.crossOrigin = crossOrigin;\n }\n return () => {\n image.removeEventListener(\"load\", handleLoad);\n image.removeEventListener(\"error\", handleError);\n };\n }, [image, crossOrigin, referrerPolicy]);\n return loadingStatus;\n}\nvar Root = Avatar;\nvar Image = AvatarImage;\nvar Fallback = AvatarFallback;\nexport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n Fallback,\n Image,\n Root,\n createAvatarScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as AvatarPrimitive from \"@radix-ui/react-avatar\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n\treturn (\n\t\t<AvatarPrimitive.Root\n\t\t\tdata-slot=\"avatar\"\n\t\t\tclassName={cn(\"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n\treturn (\n\t\t<AvatarPrimitive.Image\n\t\t\tdata-slot=\"avatar-image\"\n\t\t\tclassName={cn(\"aspect-square h-full w-full\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarFallback({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n\treturn (\n\t\t<AvatarPrimitive.Fallback\n\t\t\tdata-slot=\"avatar-fallback\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-muted flex h-full w-full items-center justify-center rounded-full\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Avatar, AvatarImage, AvatarFallback };\n"],"names":["useSyncExternalStore","Avatar","AvatarImage","useLayoutEffect","AvatarFallback","className","props","AvatarPrimitive","data-slot","cn"],"mappings":";;;;;;;;;;;;;;;AAKO,SAAS,aAAA,GAAgB;AAC9B,IAAA,OAAOA,gCAAA,CACL,SAAA,EACA,IAAM,IAAA,EACN,IAAM,KAAA,CAAA;AAEV;AAEA,SAAS,SAAA,GAAY;AACnB,IAAA,OAAO,KAAO,CAAD;AACf;;ACFA,IAAM,WAAA,GAAc,QAAA;AAGpB,IAAM,CAAC,mBAAsC,CAAA,GAAI,mBAAmB,WAAW,CAAA;AAS/E,IAAM,CAAC,cAAA,EAAgB,gBAAgB,CAAA,GAAI,oBAAwC,WAAW,CAAA;AAM9F,IAAMC,WAAe,KAAA,CAAA,UAAA,CACnB,CAAC,OAAiC,YAAA,GAAA;AAChC,IAAA,MAAM,EAAE,aAAA,EAAe,GAAG,WAAA,EAAY,GAAI,KAAA;IAC1C,MAAM,CAAC,oBAAoB,qBAAqB,CAAA,GAAU,KAAA,CAAA,QAAA,CAA6B,MAAM,CAAA;IAC7F,uBACE,GAAA,CAAC,cAAA,EAAA;QACC,KAAA,EAAO,aAAA;AACP,QAAA,kBAAA;QACA,0BAAA,EAA4B,qBAAA;AAE5B,QAAA,QAAA,kBAAA,GAAA,CAAC,SAAA,CAAU,IAAA,EAAV;AAAgB,YAAA,GAAG,WAAA;YAAa,GAAA,EAAK;SAAc;AAAA,KAAA,CAAA;AAG1D,CAAA,CAAA;AAGFA,QAAA,CAAO,WAAA,GAAc,WAAA;AAMrB,IAAM,UAAA,GAAa,aAAA;AAQnB,IAAMC,gBAAoB,KAAA,CAAA,UAAA,CACxB,CAAC,OAAsC,YAAA,GAAA;AACrC,IAAA,MAAM,EAAE,aAAA,EAAe,GAAA,EAAK,qBAAA,GAAwB,IAAA,CAAO,CAAD,EAAI,GAAG,UAAA,EAAW,GAAI,KAAA;IAChF,MAAM,OAAA,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AAC9E,QAAA,GAAGC;;AAGP;AAEA,SAASJ,WAAAA,CAAY,EAAEG,SAAS,EAAE,GAAGC,KAAAA,EAA2D,EAAA;IAC/F,qBACC,KAAA,CAAA,aAAA,CAACC,KAAqB,EAAA;QACrBC,WAAAA,EAAU,cAAA;AACVH,QAAAA,SAAAA,EAAWI,GAAG,6BAAA,EAA+BJ,SAAAA,CAAAA;AAC5C,QAAA,GAAGC;;AAGP;AAEA,SAASF,cAAAA,CAAe,EACvBC,SAAS,EACT,GAAGC,KAAAA,EACoD,EAAA;IACvD,qBACC,KAAA,CAAA,aAAA,CAACC,QAAwB,EAAA;QACxBC,WAAAA,EAAU,iBAAA;AACVH,QAAAA,SAAAA,EAAWI,GACV,sEAAA,EACAJ,SAAAA,CAAAA;AAEA,QAAA,GAAGC;;AAGP;;;;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs","../../node_modules/@radix-ui/react-avatar/dist/index.mjs","../../src/components/ui/avatar/avatar.tsx"],"sourcesContent":["// src/use-is-hydrated.tsx\nimport { useSyncExternalStore } from \"use-sync-external-store/shim\";\nfunction useIsHydrated() {\n return useSyncExternalStore(\n subscribe,\n () => true,\n () => false\n );\n}\nfunction subscribe() {\n return () => {\n };\n}\nexport {\n useIsHydrated\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/avatar.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useIsHydrated } from \"@radix-ui/react-use-is-hydrated\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AVATAR_NAME = \"Avatar\";\nvar [createAvatarContext, createAvatarScope] = createContextScope(AVATAR_NAME);\nvar [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);\nvar Avatar = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAvatar, ...avatarProps } = props;\n const [imageLoadingStatus, setImageLoadingStatus] = React.useState(\"idle\");\n return /* @__PURE__ */ jsx(\n AvatarProvider,\n {\n scope: __scopeAvatar,\n imageLoadingStatus,\n onImageLoadingStatusChange: setImageLoadingStatus,\n children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })\n }\n );\n }\n);\nAvatar.displayName = AVATAR_NAME;\nvar IMAGE_NAME = \"AvatarImage\";\nvar AvatarImage = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAvatar, src, onLoadingStatusChange = () => {\n }, ...imageProps } = props;\n const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);\n const imageLoadingStatus = useImageLoadingStatus(src, imageProps);\n const handleLoadingStatusChange = useCallbackRef((status) => {\n onLoadingStatusChange(status);\n context.onImageLoadingStatusChange(status);\n });\n useLayoutEffect(() => {\n if (imageLoadingStatus !== \"idle\") {\n handleLoadingStatusChange(imageLoadingStatus);\n }\n }, [imageLoadingStatus, handleLoadingStatusChange]);\n return imageLoadingStatus === \"loaded\" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;\n }\n);\nAvatarImage.displayName = IMAGE_NAME;\nvar FALLBACK_NAME = \"AvatarFallback\";\nvar AvatarFallback = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeAvatar, delayMs, ...fallbackProps } = props;\n const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);\n const [canRender, setCanRender] = React.useState(delayMs === void 0);\n React.useEffect(() => {\n if (delayMs !== void 0) {\n const timerId = window.setTimeout(() => setCanRender(true), delayMs);\n return () => window.clearTimeout(timerId);\n }\n }, [delayMs]);\n return canRender && context.imageLoadingStatus !== \"loaded\" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;\n }\n);\nAvatarFallback.displayName = FALLBACK_NAME;\nfunction resolveLoadingStatus(image, src) {\n if (!image) {\n return \"idle\";\n }\n if (!src) {\n return \"error\";\n }\n if (image.src !== src) {\n image.src = src;\n }\n return image.complete && image.naturalWidth > 0 ? \"loaded\" : \"loading\";\n}\nfunction useImageLoadingStatus(src, { referrerPolicy, crossOrigin }) {\n const isHydrated = useIsHydrated();\n const imageRef = React.useRef(null);\n const image = (() => {\n if (!isHydrated) return null;\n if (!imageRef.current) {\n imageRef.current = new window.Image();\n }\n return imageRef.current;\n })();\n const [loadingStatus, setLoadingStatus] = React.useState(\n () => resolveLoadingStatus(image, src)\n );\n useLayoutEffect(() => {\n setLoadingStatus(resolveLoadingStatus(image, src));\n }, [image, src]);\n useLayoutEffect(() => {\n const updateStatus = (status) => () => {\n setLoadingStatus(status);\n };\n if (!image) return;\n const handleLoad = updateStatus(\"loaded\");\n const handleError = updateStatus(\"error\");\n image.addEventListener(\"load\", handleLoad);\n image.addEventListener(\"error\", handleError);\n if (referrerPolicy) {\n image.referrerPolicy = referrerPolicy;\n }\n if (typeof crossOrigin === \"string\") {\n image.crossOrigin = crossOrigin;\n }\n return () => {\n image.removeEventListener(\"load\", handleLoad);\n image.removeEventListener(\"error\", handleError);\n };\n }, [image, crossOrigin, referrerPolicy]);\n return loadingStatus;\n}\nvar Root = Avatar;\nvar Image = AvatarImage;\nvar Fallback = AvatarFallback;\nexport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n Fallback,\n Image,\n Root,\n createAvatarScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n\treturn (\n\t\t<AvatarPrimitive.Root\n\t\t\tdata-slot=\"avatar\"\n\t\t\tclassName={cn(\"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n\treturn (\n\t\t<AvatarPrimitive.Image\n\t\t\tdata-slot=\"avatar-image\"\n\t\t\tclassName={cn(\"aspect-square h-full w-full\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction AvatarFallback({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n\treturn (\n\t\t<AvatarPrimitive.Fallback\n\t\t\tdata-slot=\"avatar-fallback\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-muted flex h-full w-full items-center justify-center rounded-full\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Avatar, AvatarImage, AvatarFallback };\n"],"names":["useSyncExternalStore","Avatar","AvatarImage","useLayoutEffect","AvatarFallback","className","props","AvatarPrimitive","data-slot","cn"],"mappings":";;;;;;;;;;;;;;;AAKO,SAAS,aAAA,GAAgB;AAC9B,IAAA,OAAOA,gCAAA,CACL,SAAA,EACA,IAAM,IAAA,EACN,IAAM,KAAA,CAAA;AAEV;AAEA,SAAS,SAAA,GAAY;AACnB,IAAA,OAAO,KAAO,CAAD;AACf;;ACFA,IAAM,WAAA,GAAc,QAAA;AAGpB,IAAM,CAAC,mBAAsC,CAAA,GAAI,mBAAmB,WAAW,CAAA;AAS/E,IAAM,CAAC,cAAA,EAAgB,gBAAgB,CAAA,GAAI,oBAAwC,WAAW,CAAA;AAM9F,IAAMC,WAAe,KAAA,CAAA,UAAA,CACnB,CAAC,OAAiC,YAAA,GAAA;AAChC,IAAA,MAAM,EAAE,aAAA,EAAe,GAAG,WAAA,EAAY,GAAI,KAAA;IAC1C,MAAM,CAAC,oBAAoB,qBAAqB,CAAA,GAAU,KAAA,CAAA,QAAA,CAA6B,MAAM,CAAA;IAC7F,uBACE,GAAA,CAAC,cAAA,EAAA;QACC,KAAA,EAAO,aAAA;AACP,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BAAA,CAAoB,OAAA,EAAS,WAAW,CAAA;AAChD,QAAA,CAAA;IACF,CAAA,EAAG;AAAC,QAAA,KAAA;AAAO,QAAA,WAAA;QAAa;AAAe,KAAA,CAAA;IAEvC,OAAO,aAAA;AACT;AAEA,IAAM,IAAA,GAAOF,QAAA;AACb,IAAM,KAAA,GAAQC,aAAA;AACd,IAAM,QAAA,GAAWE,gBAAA;;AChLjB,SAASH,MAAAA,CAAO,EAAEI,SAAS,EAAE,GAAGC,KAAAA,EAA0D,EAAA;IACzF,qBACC,KAAA,CAAA,aAAA,CAACC,IAAoB,EAAA;QACpBC,WAAAA,EAAU,QAAA;AACVH,QAAAA,SAAAA,EAAWI,GAAG,+DAAA,EAAiEJ,SAAAA,CAAAA;AAC9E,QAAA,GAAGC;;AAGP;AAEA,SAASJ,WAAAA,CAAY,EAAEG,SAAS,EAAE,GAAGC,KAAAA,EAA2D,EAAA;IAC/F,qBACC,KAAA,CAAA,aAAA,CAACC,KAAqB,EAAA;QACrBC,WAAAA,EAAU,cAAA;AACVH,QAAAA,SAAAA,EAAWI,GAAG,6BAAA,EAA+BJ,SAAAA,CAAAA;AAC5C,QAAA,GAAGC;;AAGP;AAEA,SAASF,cAAAA,CAAe,EACvBC,SAAS,EACT,GAAGC,KAAAA,EACoD,EAAA;IACvD,qBACC,KAAA,CAAA,aAAA,CAACC,QAAwB,EAAA;QACxBC,WAAAA,EAAU,iBAAA;AACVH,QAAAA,SAAAA,EAAWI,GACV,sEAAA,EACAJ,SAAAA,CAAAA;AAEA,QAAA,GAAGC;;AAGP;;;;","x_google_ignoreList":[0,1]}
|
package/dist/badge/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { B as Badge, b as badgeVariants } from '../chunks/badge-
|
|
2
|
-
import '../chunks/utils-
|
|
3
|
-
import '../chunks/bundle-mjs
|
|
1
|
+
export { B as Badge, b as badgeVariants } from '../chunks/badge-FyqsRWpb.mjs';
|
|
2
|
+
import '../chunks/utils-SWF3jXjy.mjs';
|
|
3
|
+
import '../chunks/bundle-mjs--Uc0zBMR.mjs';
|
|
4
4
|
import '@radix-ui/react-slot';
|
|
5
5
|
import 'class-variance-authority';
|
|
6
6
|
import 'react';
|
package/dist/base/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { BadgeProps } from '../badge/index.js';
|
|
4
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
3
|
import { ButtonProps } from '../button/index.js';
|
|
6
4
|
import { Popover } from '../popover/index.js';
|
|
5
|
+
import { BadgeProps } from '../badge/index.js';
|
|
6
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
7
|
import { DateRange } from 'react-day-picker';
|
|
8
8
|
import 'class-variance-authority/types';
|
|
9
9
|
import 'class-variance-authority';
|
|
@@ -27,16 +27,42 @@ declare const Header: React__default.FC<HeaderProps>;
|
|
|
27
27
|
|
|
28
28
|
type CaptionLayout = "label" | "dropdown";
|
|
29
29
|
declare function normalizeDate(date: Date): string;
|
|
30
|
-
|
|
30
|
+
type CalendarPopoverProps = {
|
|
31
|
+
/** Data selecionada (controlada externamente, opcional) */
|
|
31
32
|
date: Date | undefined;
|
|
33
|
+
/** Callback chamado quando uma data é selecionada */
|
|
32
34
|
setDate: (newDate: Date | undefined) => void;
|
|
35
|
+
/** Texto exibido quando nenhuma data está selecionada */
|
|
36
|
+
placeholder?: string;
|
|
37
|
+
/** ID opcional para o botão */
|
|
38
|
+
id?: string;
|
|
39
|
+
/** Props adicionais para o botão */
|
|
40
|
+
buttonProps?: ButtonProps;
|
|
41
|
+
/** Classes extras aplicadas ao botão */
|
|
42
|
+
buttonClassName?: string;
|
|
43
|
+
/** Props adicionais para o popover */
|
|
44
|
+
popoverProps?: React__default.ComponentProps<typeof Popover>;
|
|
45
|
+
/** Classes extras aplicadas ao conteúdo do popover */
|
|
46
|
+
popoverContentClassName?: string;
|
|
47
|
+
/** Número de meses exibidos no calendário (default: 1) */
|
|
48
|
+
numberOfMonths?: number;
|
|
49
|
+
/** Ano inicial permitido */
|
|
50
|
+
fromYear?: number;
|
|
51
|
+
/** Ano final permitido */
|
|
52
|
+
toYear?: number;
|
|
53
|
+
/** Classes extras para o contêiner */
|
|
54
|
+
className?: string;
|
|
55
|
+
/** Desabilita o botão */
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
/** Define se está carregando */
|
|
33
58
|
isLoading?: boolean;
|
|
59
|
+
/** Define se está carregando dentro de calendar */
|
|
34
60
|
isLoadingTable?: boolean;
|
|
61
|
+
/** Deixa desabilitado datas específicas customizadas */
|
|
35
62
|
disabledDates?: Set<string>;
|
|
63
|
+
/** Deixa desabilitado datas específicas customizadas */
|
|
36
64
|
captionLayout?: CaptionLayout;
|
|
37
|
-
|
|
38
|
-
toYear?: number;
|
|
39
|
-
}
|
|
65
|
+
};
|
|
40
66
|
declare const CalendarPopover: React__default.FC<CalendarPopoverProps>;
|
|
41
67
|
|
|
42
68
|
interface HoverBadgeProps {
|
|
@@ -50,8 +76,8 @@ interface HoverBadgeProps {
|
|
|
50
76
|
declare const HoverBadge: React__default.FC<HoverBadgeProps>;
|
|
51
77
|
|
|
52
78
|
type CalendarRangeProps = {
|
|
53
|
-
value
|
|
54
|
-
onChange
|
|
79
|
+
value: DateRange | undefined;
|
|
80
|
+
onChange: (range: DateRange | undefined) => void;
|
|
55
81
|
placeholder?: string;
|
|
56
82
|
id?: string;
|
|
57
83
|
buttonProps?: ButtonProps;
|