ivt 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/index.mjs +14 -14
- package/dist/alert/index.mjs +2 -2
- package/dist/alert-dialog/index.mjs +17 -17
- package/dist/alert-dialog/index.mjs.map +1 -1
- package/dist/avatar/index.mjs +8 -8
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.d.ts +18 -1
- package/dist/base/index.mjs +168 -29
- 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 +541 -831
- package/dist/chart/index.mjs.map +1 -1
- package/dist/checkbox/index.mjs +14 -14
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chunks/{_commonjsHelpers-DqEvkrE1.mjs → _commonjsHelpers-DKISyIRi.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-DKISyIRi.mjs.map +1 -0
- package/dist/chunks/{accordion-BMP2PSSC.mjs → accordion-DISpV98f.mjs} +13 -13
- package/dist/chunks/{accordion-BMP2PSSC.mjs.map → accordion-DISpV98f.mjs.map} +1 -1
- package/dist/chunks/{badge-DxuZhgBF.mjs → badge-CT_hmjd2.mjs} +2 -2
- package/dist/chunks/{badge-DxuZhgBF.mjs.map → badge-CT_hmjd2.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-tFg__FnT.mjs → bundle-mjs-CS-QKnOm.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-tFg__FnT.mjs.map → bundle-mjs-CS-QKnOm.mjs.map} +1 -1
- package/dist/chunks/{button-CX0htulo.mjs → button-BHeYV17S.mjs} +2 -2
- package/dist/chunks/{button-CX0htulo.mjs.map → button-BHeYV17S.mjs.map} +1 -1
- package/dist/chunks/{calendar-B4IV5RyM.mjs → calendar-CU6HdJET.mjs} +6 -6
- package/dist/chunks/{calendar-B4IV5RyM.mjs.map → calendar-CU6HdJET.mjs.map} +1 -1
- package/dist/chunks/{check-B7209s3e.mjs → check-B3pXhibW.mjs} +2 -2
- package/dist/chunks/{check-B7209s3e.mjs.map → check-B3pXhibW.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-D84DRJBv.mjs → chevron-down-BV5gvmUW.mjs} +2 -2
- package/dist/chunks/{chevron-down-D84DRJBv.mjs.map → chevron-down-BV5gvmUW.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-DtL1t1DJ.mjs → chevron-left-BjGcH2KQ.mjs} +2 -2
- package/dist/chunks/{chevron-left-DtL1t1DJ.mjs.map → chevron-left-BjGcH2KQ.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-Cdxg1JSQ.mjs → chevron-right-DmZu0xvo.mjs} +2 -2
- package/dist/chunks/{chevron-right-Cdxg1JSQ.mjs.map → chevron-right-DmZu0xvo.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-DtBUG1i8.mjs → chevrons-up-down-COuCmfU7.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-DtBUG1i8.mjs.map → chevrons-up-down-COuCmfU7.mjs.map} +1 -1
- package/dist/chunks/{circle-BLWMZ9yp.mjs → circle-BKsPjIbw.mjs} +2 -2
- package/dist/chunks/{circle-BLWMZ9yp.mjs.map → circle-BKsPjIbw.mjs.map} +1 -1
- package/dist/chunks/{command-C8cVzg-x.mjs → command-CUWr3X1X.mjs} +8 -8
- package/dist/chunks/{command-C8cVzg-x.mjs.map → command-CUWr3X1X.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-Ba0IWqsz.mjs → createLucideIcon-BSP_Jxu-.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-Ba0IWqsz.mjs.map → createLucideIcon-BSP_Jxu-.mjs.map} +1 -1
- package/dist/chunks/{dialog-D9vbxUuQ.mjs → dialog-zZCazow7.mjs} +4 -4
- package/dist/chunks/{dialog-D9vbxUuQ.mjs.map → dialog-zZCazow7.mjs.map} +1 -1
- package/dist/chunks/{hover-card-idvDPXrI.mjs → hover-card-ssfyy6SY.mjs} +11 -11
- package/dist/chunks/{hover-card-idvDPXrI.mjs.map → hover-card-ssfyy6SY.mjs.map} +1 -1
- package/dist/chunks/{index-CyMuypYR.mjs → index-3XcV7C7l.mjs} +10 -10
- package/dist/chunks/{index-CyMuypYR.mjs.map → index-3XcV7C7l.mjs.map} +1 -1
- package/dist/chunks/{index-BE-_q4IW.mjs → index-B1VVz0MP.mjs} +6 -6
- package/dist/chunks/{index-BE-_q4IW.mjs.map → index-B1VVz0MP.mjs.map} +1 -1
- package/dist/chunks/{index-kr6_v_F8.mjs → index-BFDafXar.mjs} +7 -7
- package/dist/chunks/{index-kr6_v_F8.mjs.map → index-BFDafXar.mjs.map} +1 -1
- package/dist/chunks/{index-D23BhVQG.mjs → index-BF_TaONY.mjs} +13 -13
- package/dist/chunks/{index-D23BhVQG.mjs.map → index-BF_TaONY.mjs.map} +1 -1
- package/dist/chunks/{index-DNvm9MP3.mjs → index-BOOPeiVs.mjs} +2 -2
- package/dist/chunks/{index-DNvm9MP3.mjs.map → index-BOOPeiVs.mjs.map} +1 -1
- package/dist/chunks/{index-Dm4_czlz.mjs → index-BYijxgZz.mjs} +1 -1
- package/dist/chunks/{index-Dm4_czlz.mjs.map → index-BYijxgZz.mjs.map} +1 -1
- package/dist/chunks/{index-B4VRyyD1.mjs → index-BZyzz9k8.mjs} +1 -1
- package/dist/chunks/{index-B4VRyyD1.mjs.map → index-BZyzz9k8.mjs.map} +1 -1
- package/dist/chunks/{index-BZUrHhU8.mjs → index-Bgiaprdv.mjs} +1 -1
- package/dist/chunks/{index-BZUrHhU8.mjs.map → index-Bgiaprdv.mjs.map} +1 -1
- package/dist/chunks/{index-B_FsTtnF.mjs → index-Bl6nVRXe.mjs} +1 -1
- package/dist/chunks/{index-B_FsTtnF.mjs.map → index-Bl6nVRXe.mjs.map} +1 -1
- package/dist/chunks/{index-PaJVyocC.mjs → index-BwQDLVf8.mjs} +1 -1
- package/dist/chunks/{index-PaJVyocC.mjs.map → index-BwQDLVf8.mjs.map} +1 -1
- package/dist/chunks/{index-sz_BcBbA.mjs → index-CHyZo-Tj.mjs} +5 -5
- package/dist/chunks/{index-sz_BcBbA.mjs.map → index-CHyZo-Tj.mjs.map} +1 -1
- package/dist/chunks/{index-CglX-DNW.mjs → index-CZ7Wntp7.mjs} +1 -1
- package/dist/chunks/{index-CglX-DNW.mjs.map → index-CZ7Wntp7.mjs.map} +1 -1
- package/dist/chunks/{index-CAg47KJ6.mjs → index-D1yPZAOL.mjs} +1 -1
- package/dist/chunks/{index-CAg47KJ6.mjs.map → index-D1yPZAOL.mjs.map} +1 -1
- package/dist/chunks/{index-D2wfJaZh.mjs → index-DIBl7n6R.mjs} +3 -3
- package/dist/chunks/{index-D2wfJaZh.mjs.map → index-DIBl7n6R.mjs.map} +1 -1
- package/dist/chunks/{index-BNxaLFA6.mjs → index-DRk0bB4A.mjs} +9 -9
- package/dist/chunks/{index-BNxaLFA6.mjs.map → index-DRk0bB4A.mjs.map} +1 -1
- package/dist/chunks/{index-C_jFwfR_.mjs → index-DUFr75Kc.mjs} +2 -2
- package/dist/chunks/{index-C_jFwfR_.mjs.map → index-DUFr75Kc.mjs.map} +1 -1
- package/dist/chunks/{index-6JUj2Tld.mjs → index-DrnQ43fz.mjs} +2 -2
- package/dist/chunks/{index-6JUj2Tld.mjs.map → index-DrnQ43fz.mjs.map} +1 -1
- package/dist/chunks/{index-CXuEm8w1.mjs → index-Dulm0stf.mjs} +1 -1
- package/dist/chunks/{index-CXuEm8w1.mjs.map → index-Dulm0stf.mjs.map} +1 -1
- package/dist/chunks/{index-D0S6rRRE.mjs → index-fWnSEyU5.mjs} +1 -1
- package/dist/chunks/{index-D0S6rRRE.mjs.map → index-fWnSEyU5.mjs.map} +1 -1
- package/dist/chunks/{index-B0IElWB4.mjs → index-tNc5GmLL.mjs} +2 -2
- package/dist/chunks/{index-B0IElWB4.mjs.map → index-tNc5GmLL.mjs.map} +1 -1
- package/dist/chunks/{input-DK1slFF1.mjs → input-D9-FhnGc.mjs} +2 -2
- package/dist/chunks/{input-DK1slFF1.mjs.map → input-D9-FhnGc.mjs.map} +1 -1
- package/dist/chunks/{label-D7ONQdHc.mjs → label-CiJcd2F9.mjs} +3 -3
- package/dist/chunks/{label-D7ONQdHc.mjs.map → label-CiJcd2F9.mjs.map} +1 -1
- package/dist/chunks/{pagination-BM_IQ6Qk.mjs → pagination-SOhqOW7I.mjs} +6 -6
- package/dist/chunks/{pagination-BM_IQ6Qk.mjs.map → pagination-SOhqOW7I.mjs.map} +1 -1
- package/dist/chunks/{popover-D3F326FR.mjs → popover-CtxxPI-t.mjs} +13 -13
- package/dist/chunks/{popover-D3F326FR.mjs.map → popover-CtxxPI-t.mjs.map} +1 -1
- package/dist/chunks/{progress-BCl5yD5Q.mjs → progress-WrZK6klx.mjs} +5 -5
- package/dist/chunks/{progress-BCl5yD5Q.mjs.map → progress-WrZK6klx.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-DB3eUx8V.mjs → scroll-area-BVyyR0Km.mjs} +11 -11
- package/dist/chunks/{scroll-area-DB3eUx8V.mjs.map → scroll-area-BVyyR0Km.mjs.map} +1 -1
- package/dist/chunks/{select-Cw81y8pT.mjs → select-COGYOg3A.mjs} +5 -5
- package/dist/chunks/{select-Cw81y8pT.mjs.map → select-COGYOg3A.mjs.map} +1 -1
- package/dist/chunks/{separator-2k1C7RSn.mjs → separator-D6Y96f4g.mjs} +3 -3
- package/dist/chunks/{separator-2k1C7RSn.mjs.map → separator-D6Y96f4g.mjs.map} +1 -1
- package/dist/chunks/{skeleton-qx8-vr62.mjs → skeleton-CRfBAk8U.mjs} +2 -2
- package/dist/chunks/{skeleton-qx8-vr62.mjs.map → skeleton-CRfBAk8U.mjs.map} +1 -1
- package/dist/chunks/{sortable-D8ayoe_b.mjs → sortable-tiuZWf3S.mjs} +3 -3
- package/dist/chunks/{sortable-D8ayoe_b.mjs.map → sortable-tiuZWf3S.mjs.map} +1 -1
- package/dist/chunks/{table-BDNUhtz-.mjs → table-BlTF56Yn.mjs} +2 -2
- package/dist/chunks/{table-BDNUhtz-.mjs.map → table-BlTF56Yn.mjs.map} +1 -1
- package/dist/chunks/{toggle-CE2ycSdL.mjs → toggle-D5tCYA7L.mjs} +5 -5
- package/dist/chunks/{toggle-CE2ycSdL.mjs.map → toggle-D5tCYA7L.mjs.map} +1 -1
- package/dist/chunks/{tooltip-DLD0ycR4.mjs → tooltip-DgNjTTxv.mjs} +13 -13
- package/dist/chunks/{tooltip-DLD0ycR4.mjs.map → tooltip-DgNjTTxv.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-BgHLrbno.mjs → tslib.es6-O3UsmxNe.mjs} +1 -1
- package/dist/chunks/{tslib.es6-BgHLrbno.mjs.map → tslib.es6-O3UsmxNe.mjs.map} +1 -1
- package/dist/chunks/{utils-BUelq9Ro.mjs → utils-tbIgc9YG.mjs} +2 -2
- package/dist/chunks/{utils-BUelq9Ro.mjs.map → utils-tbIgc9YG.mjs.map} +1 -1
- package/dist/chunks/{x-Bjz0Vo6R.mjs → x-5oL4uC6I.mjs} +2 -2
- package/dist/chunks/{x-Bjz0Vo6R.mjs.map → x-5oL4uC6I.mjs.map} +1 -1
- package/dist/combobox/index.mjs +25 -25
- package/dist/command/index.mjs +19 -19
- package/dist/data-table/index.mjs +33 -33
- package/dist/dialog/index.mjs +18 -18
- package/dist/dropdown-menu/index.mjs +24 -24
- package/dist/dropdown-menu/index.mjs.map +1 -1
- package/dist/dropzone/index.mjs +17 -17
- package/dist/form/index.mjs +4 -4
- 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/menubar/index.mjs +24 -24
- package/dist/menubar/index.mjs.map +1 -1
- package/dist/multi-select/index.mjs +29 -29
- 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 +18 -18
- 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/sheet/index.mjs +17 -17
- package/dist/skeleton/index.mjs +3 -3
- package/dist/sortable/index.mjs +4 -4
- package/dist/table/index.mjs +3 -3
- package/dist/tabs/index.mjs +14 -14
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.mjs +2 -2
- package/dist/toast/index.mjs +15 -15
- package/dist/toast/index.mjs.map +1 -1
- package/dist/toggle/index.mjs +7 -7
- package/dist/toggle-group/index.mjs +14 -14
- package/dist/toggle-group/index.mjs.map +1 -1
- package/dist/tooltip/index.mjs +16 -16
- package/package.json +5 -4
- package/dist/chunks/_commonjsHelpers-DqEvkrE1.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-DISpV98f.mjs';
|
2
|
+
import '../chunks/utils-tbIgc9YG.mjs';
|
3
|
+
import '../chunks/bundle-mjs-CS-QKnOm.mjs';
|
4
4
|
import 'react';
|
5
|
-
import '../chunks/index-
|
5
|
+
import '../chunks/index-Bl6nVRXe.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-BZyzz9k8.mjs';
|
9
|
+
import '../chunks/index-BYijxgZz.mjs';
|
10
|
+
import '../chunks/index-DUFr75Kc.mjs';
|
11
|
+
import '../chunks/index-Bgiaprdv.mjs';
|
12
|
+
import '../chunks/index-fWnSEyU5.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-DIBl7n6R.mjs';
|
16
|
+
import '../chunks/index-DrnQ43fz.mjs';
|
17
|
+
import '../chunks/index-Dulm0stf.mjs';
|
18
|
+
import '../chunks/chevron-down-BV5gvmUW.mjs';
|
19
|
+
import '../chunks/createLucideIcon-BSP_Jxu-.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-tbIgc9YG.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-CS-QKnOm.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,27 +1,27 @@
|
|
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-Bl6nVRXe.mjs';
|
3
|
+
import { u as useComposedRefs } from '../chunks/index-BZyzz9k8.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-3XcV7C7l.mjs';
|
5
|
+
import { c as composeEventHandlers } from '../chunks/index-BYijxgZz.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-tbIgc9YG.mjs';
|
9
|
+
import { b as buttonVariants } from '../chunks/button-BHeYV17S.mjs';
|
10
|
+
import '../chunks/index-DrnQ43fz.mjs';
|
11
|
+
import '../chunks/index-Bgiaprdv.mjs';
|
12
|
+
import '../chunks/index-DUFr75Kc.mjs';
|
13
|
+
import '../chunks/index-B1VVz0MP.mjs';
|
14
|
+
import '../chunks/index-fWnSEyU5.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-D1yPZAOL.mjs';
|
17
|
+
import '../chunks/index-CHyZo-Tj.mjs';
|
18
|
+
import '../chunks/tslib.es6-O3UsmxNe.mjs';
|
19
|
+
import '../chunks/index-DIBl7n6R.mjs';
|
20
|
+
import '../chunks/bundle-mjs-CS-QKnOm.mjs';
|
21
21
|
import 'class-variance-authority';
|
22
22
|
|
23
23
|
var ROOT_NAME = "AlertDialog";
|
24
|
-
var [createAlertDialogContext
|
24
|
+
var [createAlertDialogContext] = createContextScope(ROOT_NAME, [
|
25
25
|
createDialogScope
|
26
26
|
]);
|
27
27
|
var useDialogScope = createDialogScope();
|
@@ -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,wBAAA,EAA0B,sBAAsB,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,CAAA;AACnF,CAAA;AAEAD,aAAA,CAAY,WAAA,GAAc,SAAA;AAK1B,IAAM,YAAA,GAAe,oBAAA;AAMrB,IAAME,uBAA2B,KAAA,CAAA,UAAA,CAC/B,CAAC,OAA6C,YAAA,GAAA;AAC5C,IAAA,MAAM,EAAE,kBAAA,EAAoB,GAAG,YAAA,EAAa,GAAI,KAAA;IAChD,MAAM,WAAA,GAAc,eAAe,kBAAkB,CAAA;AACrD,IAAA,uBAAO,GAAA,CAAiBC,OAAA,EAAhB;AAAyB,QAAA,GAAG,WAAA;AAAc,QAAA,GAAG,YAAA;QAAc,GAAA,EAAK;KAAc,CAAA;AACxF,CAAA,CAAA;AAGFD,oBAAA,CAAmB,WAAA,GAAc,YAAA;AAMjC,IAAM,WAAA,GAAc,mBAAA;AAKpB,IAAME,mBAAA,GAAsD,CAC1D,KAAA,GAAA;AAEA,IAAA,MAAM,EAAE,kBAAA,EAAoB,GAAG,WAAA,EAAY,GAAI,KAAA;IAC/C,MAAM,WAA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C,QAAAA,SAAAA,EAAWC,GAAG,wDAAA,EAA0DD,SAAAA,CAAAA;AACvE,QAAA,GAAGH;;AAGP;AAEA,SAASd,gBAAAA,CAAiB,EACzBiB,SAAS,EACT,GAAGH,KAAAA,EACsD,EAAA;IACzD,qBACC,KAAA,CAAA,aAAA,CAACC,MAA0B,EAAA;QAC1BC,WAAAA,EAAU,oBAAA;AACVC,QAAAA,SAAAA,EAAWC,GAAG,uBAAA,EAAyBD,SAAAA,CAAAA;AACtC,QAAA,GAAGH;;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","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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QAAA,GAAGH;;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]}
|
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-Bl6nVRXe.mjs';
|
3
|
+
import { u as useCallbackRef } from '../chunks/index-D1yPZAOL.mjs';
|
4
|
+
import { u as useLayoutEffect2 } from '../chunks/index-Bgiaprdv.mjs';
|
5
|
+
import { P as Primitive } from '../chunks/index-fWnSEyU5.mjs';
|
6
|
+
import { r as requireShim } from '../chunks/index-BwQDLVf8.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-tbIgc9YG.mjs';
|
9
9
|
import 'react-dom';
|
10
10
|
import '@radix-ui/react-slot';
|
11
|
-
import '../chunks/bundle-mjs-
|
11
|
+
import '../chunks/bundle-mjs-CS-QKnOm.mjs';
|
12
12
|
|
13
13
|
var shimExports = requireShim();
|
14
14
|
|
@@ -21,7 +21,7 @@ function subscribe() {
|
|
21
21
|
}
|
22
22
|
|
23
23
|
var AVATAR_NAME = "Avatar";
|
24
|
-
var [createAvatarContext
|
24
|
+
var [createAvatarContext] = createContextScope(AVATAR_NAME);
|
25
25
|
var [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);
|
26
26
|
var Avatar$1 = React.forwardRef((props, forwardedRef)=>{
|
27
27
|
const { __scopeAvatar, ...avatarProps } = props;
|
@@ -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,mBAAA,EAAqB,iBAAiB,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,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,OAAO,IAAA;YACL,KAAA,CAAM,mBAAA,CAAoB,MAAA,EAAQ,UAAU,CAAA;YAC5C,KAAA,CAAM,mBAAA,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;;AClLjB,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]}
|
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,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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-CT_hmjd2.mjs';
|
2
|
+
import '../chunks/utils-tbIgc9YG.mjs';
|
3
|
+
import '../chunks/bundle-mjs-CS-QKnOm.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
@@ -67,4 +67,21 @@ type CalendarRangeProps = {
|
|
67
67
|
};
|
68
68
|
declare function CalendarRange({ value, onChange, placeholder, id, buttonProps, buttonClassName, popoverProps, popoverContentClassName, numberOfMonths, fromYear, toYear, toDate, className, disabled, }: CalendarRangeProps): react_jsx_runtime.JSX.Element;
|
69
69
|
|
70
|
-
|
70
|
+
interface Option {
|
71
|
+
id: number;
|
72
|
+
label: string;
|
73
|
+
}
|
74
|
+
interface AutoCompleteProps {
|
75
|
+
value: string;
|
76
|
+
onChange: (value: string) => void;
|
77
|
+
placeholder?: string;
|
78
|
+
searchPlaceholder?: string;
|
79
|
+
open: boolean;
|
80
|
+
onOpenChange: (open: boolean) => void;
|
81
|
+
disabled?: boolean;
|
82
|
+
messageEmpty?: string;
|
83
|
+
fetchOptions: (term: string) => Promise<Option[]>;
|
84
|
+
}
|
85
|
+
declare function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, onOpenChange, disabled, messageEmpty, fetchOptions, }: AutoCompleteProps): react_jsx_runtime.JSX.Element;
|
86
|
+
|
87
|
+
export { AutoComplete, CalendarPopover, CalendarRange, Header, HoverBadge, TextWrap, normalizeDate };
|
package/dist/base/index.mjs
CHANGED
@@ -1,37 +1,43 @@
|
|
1
|
-
import { c as cn } from '../chunks/utils-
|
1
|
+
import { c as cn } from '../chunks/utils-tbIgc9YG.mjs';
|
2
2
|
import * as React from 'react';
|
3
|
-
import React__default from 'react';
|
4
|
-
import { A as Accordion, a as AccordionItem, b as AccordionTrigger, c as AccordionContent } from '../chunks/accordion-
|
5
|
-
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-
|
6
|
-
import { c as createLucideIcon } from '../chunks/createLucideIcon-
|
7
|
-
import { t as toDate, b as buildFormatLongFn, c as buildLocalizeFn, d as buildMatchFn, e as buildMatchPatternFn, f as format, C as Calendar$1 } from '../chunks/calendar-
|
8
|
-
import { B as Button } from '../chunks/button-
|
9
|
-
import { t as twMerge } from '../chunks/bundle-mjs-
|
10
|
-
import { H as HoverCard, a as HoverCardTrigger, b as HoverCardContent } from '../chunks/hover-card-
|
11
|
-
import { B as Badge } from '../chunks/badge-
|
12
|
-
import '../chunks/
|
3
|
+
import React__default, { useRef, useEffect, useMemo } from 'react';
|
4
|
+
import { A as Accordion, a as AccordionItem, b as AccordionTrigger, c as AccordionContent } from '../chunks/accordion-DISpV98f.mjs';
|
5
|
+
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-CtxxPI-t.mjs';
|
6
|
+
import { c as createLucideIcon } from '../chunks/createLucideIcon-BSP_Jxu-.mjs';
|
7
|
+
import { t as toDate, b as buildFormatLongFn, c as buildLocalizeFn, d as buildMatchFn, e as buildMatchPatternFn, f as format, C as Calendar$1 } from '../chunks/calendar-CU6HdJET.mjs';
|
8
|
+
import { B as Button } from '../chunks/button-BHeYV17S.mjs';
|
9
|
+
import { t as twMerge } from '../chunks/bundle-mjs-CS-QKnOm.mjs';
|
10
|
+
import { H as HoverCard, a as HoverCardTrigger, b as HoverCardContent } from '../chunks/hover-card-ssfyy6SY.mjs';
|
11
|
+
import { B as Badge } from '../chunks/badge-CT_hmjd2.mjs';
|
12
|
+
import { C as ChevronsUpDown } from '../chunks/chevrons-up-down-COuCmfU7.mjs';
|
13
|
+
import { C as Command, b as CommandInput, d as CommandEmpty, c as CommandList, e as CommandGroup, f as CommandItem } from '../chunks/command-CUWr3X1X.mjs';
|
14
|
+
import { C as Check } from '../chunks/check-B3pXhibW.mjs';
|
15
|
+
import '../chunks/index-Bl6nVRXe.mjs';
|
13
16
|
import 'react/jsx-runtime';
|
14
17
|
import '@radix-ui/react-collection';
|
15
|
-
import '../chunks/index-
|
16
|
-
import '../chunks/index-
|
17
|
-
import '../chunks/index-
|
18
|
-
import '../chunks/index-
|
19
|
-
import '../chunks/index-
|
18
|
+
import '../chunks/index-BZyzz9k8.mjs';
|
19
|
+
import '../chunks/index-BYijxgZz.mjs';
|
20
|
+
import '../chunks/index-DUFr75Kc.mjs';
|
21
|
+
import '../chunks/index-Bgiaprdv.mjs';
|
22
|
+
import '../chunks/index-fWnSEyU5.mjs';
|
20
23
|
import 'react-dom';
|
21
24
|
import '@radix-ui/react-slot';
|
22
|
-
import '../chunks/index-
|
23
|
-
import '../chunks/index-
|
24
|
-
import '../chunks/index-
|
25
|
-
import '../chunks/chevron-down-
|
26
|
-
import '../chunks/index-
|
27
|
-
import '../chunks/index-
|
28
|
-
import '../chunks/index-
|
29
|
-
import '../chunks/tslib.es6-
|
30
|
-
import '../chunks/index-
|
31
|
-
import '../chunks/index-
|
32
|
-
import '../chunks/chevron-left-
|
33
|
-
import '../chunks/chevron-right-
|
25
|
+
import '../chunks/index-DIBl7n6R.mjs';
|
26
|
+
import '../chunks/index-DrnQ43fz.mjs';
|
27
|
+
import '../chunks/index-Dulm0stf.mjs';
|
28
|
+
import '../chunks/chevron-down-BV5gvmUW.mjs';
|
29
|
+
import '../chunks/index-B1VVz0MP.mjs';
|
30
|
+
import '../chunks/index-D1yPZAOL.mjs';
|
31
|
+
import '../chunks/index-CHyZo-Tj.mjs';
|
32
|
+
import '../chunks/tslib.es6-O3UsmxNe.mjs';
|
33
|
+
import '../chunks/index-BFDafXar.mjs';
|
34
|
+
import '../chunks/index-tNc5GmLL.mjs';
|
35
|
+
import '../chunks/chevron-left-BjGcH2KQ.mjs';
|
36
|
+
import '../chunks/chevron-right-DmZu0xvo.mjs';
|
34
37
|
import 'class-variance-authority';
|
38
|
+
import '../chunks/index-3XcV7C7l.mjs';
|
39
|
+
import '../chunks/dialog-zZCazow7.mjs';
|
40
|
+
import '../chunks/x-5oL4uC6I.mjs';
|
35
41
|
|
36
42
|
const __iconNode$1 = [
|
37
43
|
[
|
@@ -757,5 +763,138 @@ function CalendarRange({ value, onChange, placeholder = "Selecione uma data", id
|
|
757
763
|
}))));
|
758
764
|
}
|
759
765
|
|
760
|
-
|
766
|
+
function c(e, u, c, i) {
|
767
|
+
var a = this, o = useRef(null), f = useRef(0), l = useRef(0), v = useRef(null), m = useRef([]), d = useRef(), g = useRef(), p = useRef(e), w = useRef(true);
|
768
|
+
p.current = e;
|
769
|
+
var s = "undefined" != typeof window, x = !u && 0 !== u && s;
|
770
|
+
if ("function" != typeof e) throw new TypeError("Expected a function");
|
771
|
+
u = +u || 0;
|
772
|
+
var h = !!(c = c || {}).leading, y = !("trailing" in c) || !!c.trailing, F = "maxWait" in c, A = "debounceOnServer" in c && !!c.debounceOnServer, D = F ? Math.max(+c.maxWait || 0, u) : null;
|
773
|
+
useEffect(function() {
|
774
|
+
return w.current = true, function() {
|
775
|
+
w.current = false;
|
776
|
+
};
|
777
|
+
}, []);
|
778
|
+
var T = useMemo(function() {
|
779
|
+
var r = function(r) {
|
780
|
+
var n = m.current, t = d.current;
|
781
|
+
return m.current = d.current = null, f.current = r, l.current = l.current || r, g.current = p.current.apply(t, n);
|
782
|
+
}, n = function(r, n) {
|
783
|
+
x && cancelAnimationFrame(v.current), v.current = x ? requestAnimationFrame(r) : setTimeout(r, n);
|
784
|
+
}, t = function(r) {
|
785
|
+
if (!w.current) return false;
|
786
|
+
var n = r - o.current;
|
787
|
+
return !o.current || n >= u || n < 0 || F && r - f.current >= D;
|
788
|
+
}, e = function(n) {
|
789
|
+
return v.current = null, y && m.current ? r(n) : (m.current = d.current = null, g.current);
|
790
|
+
}, c = function r() {
|
791
|
+
var c = Date.now();
|
792
|
+
if (h && l.current === f.current && T(), t(c)) return e(c);
|
793
|
+
if (w.current) {
|
794
|
+
var i = u - (c - o.current), a = F ? Math.min(i, D - (c - f.current)) : i;
|
795
|
+
n(r, a);
|
796
|
+
}
|
797
|
+
}, T = function() {
|
798
|
+
}, W = function() {
|
799
|
+
if (s || A) {
|
800
|
+
var e = Date.now(), i = t(e);
|
801
|
+
if (m.current = [].slice.call(arguments), d.current = a, o.current = e, i) {
|
802
|
+
if (!v.current && w.current) return f.current = o.current, n(c, u), h ? r(o.current) : g.current;
|
803
|
+
if (F) return n(c, u), r(o.current);
|
804
|
+
}
|
805
|
+
return v.current || n(c, u), g.current;
|
806
|
+
}
|
807
|
+
};
|
808
|
+
return W.cancel = function() {
|
809
|
+
var r = v.current;
|
810
|
+
r && (x ? cancelAnimationFrame(v.current) : clearTimeout(v.current)), f.current = 0, m.current = o.current = d.current = v.current = null;
|
811
|
+
}, W.isPending = function() {
|
812
|
+
return !!v.current;
|
813
|
+
}, W.flush = function() {
|
814
|
+
return v.current ? e(Date.now()) : g.current;
|
815
|
+
}, W;
|
816
|
+
}, [
|
817
|
+
h,
|
818
|
+
F,
|
819
|
+
u,
|
820
|
+
D,
|
821
|
+
y,
|
822
|
+
x,
|
823
|
+
s,
|
824
|
+
A,
|
825
|
+
i
|
826
|
+
]);
|
827
|
+
return T;
|
828
|
+
}
|
829
|
+
|
830
|
+
function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, onOpenChange, disabled, messageEmpty = "Nenhum item encontrado.", fetchOptions }) {
|
831
|
+
const [options, setOptions] = React__default.useState([]);
|
832
|
+
const [loading, setLoading] = React__default.useState(false);
|
833
|
+
const [searchTerm, setSearchTerm] = React__default.useState("");
|
834
|
+
const sortedOptions = [
|
835
|
+
...options
|
836
|
+
].sort((a, b)=>{
|
837
|
+
if (a.label === value) return -1;
|
838
|
+
if (b.label === value) return 1;
|
839
|
+
return a.label.localeCompare(b.label);
|
840
|
+
});
|
841
|
+
const debouncedFetch = c(async (term)=>{
|
842
|
+
try {
|
843
|
+
const result = await fetchOptions(term);
|
844
|
+
setOptions(result);
|
845
|
+
} catch (err) {
|
846
|
+
console.error("Erro ao buscar opções:", err);
|
847
|
+
setOptions([]);
|
848
|
+
} finally{
|
849
|
+
setLoading(false);
|
850
|
+
}
|
851
|
+
}, 500);
|
852
|
+
const handleInputChange = (val)=>{
|
853
|
+
setSearchTerm(val);
|
854
|
+
if (val.trim() === "") {
|
855
|
+
setOptions([]);
|
856
|
+
setLoading(false);
|
857
|
+
return;
|
858
|
+
}
|
859
|
+
setLoading(true);
|
860
|
+
debouncedFetch(val);
|
861
|
+
};
|
862
|
+
const handleSelect = (option)=>{
|
863
|
+
onChange(option.label);
|
864
|
+
onOpenChange(false);
|
865
|
+
};
|
866
|
+
return /*#__PURE__*/ React__default.createElement(Popover, {
|
867
|
+
open: open,
|
868
|
+
onOpenChange: onOpenChange
|
869
|
+
}, /*#__PURE__*/ React__default.createElement(PopoverTrigger, {
|
870
|
+
asChild: true
|
871
|
+
}, /*#__PURE__*/ React__default.createElement(Button, {
|
872
|
+
variant: "outline",
|
873
|
+
className: "flex h-10 w-full items-center justify-between truncate",
|
874
|
+
"aria-expanded": open,
|
875
|
+
disabled: disabled
|
876
|
+
}, /*#__PURE__*/ React__default.createElement("span", {
|
877
|
+
className: cn("text-muted-foreground", value && "text-foreground")
|
878
|
+
}, value || placeholder), /*#__PURE__*/ React__default.createElement(ChevronsUpDown, {
|
879
|
+
className: "ml-2 h-4 w-4 shrink-0 opacity-50"
|
880
|
+
}))), /*#__PURE__*/ React__default.createElement(PopoverContent, {
|
881
|
+
className: "max-h-[300px] w-[--radix-popover-trigger-width] overflow-auto p-0",
|
882
|
+
side: "bottom",
|
883
|
+
align: "start"
|
884
|
+
}, /*#__PURE__*/ React__default.createElement(Command, null, /*#__PURE__*/ React__default.createElement(CommandInput, {
|
885
|
+
placeholder: searchPlaceholder,
|
886
|
+
className: "h-9",
|
887
|
+
onValueChange: handleInputChange
|
888
|
+
}), /*#__PURE__*/ React__default.createElement(CommandEmpty, null, loading ? "Carregando..." : searchTerm.trim() === "" ? "Digite algo para buscar..." : messageEmpty), /*#__PURE__*/ React__default.createElement(CommandList, {
|
889
|
+
className: "max-h-60 overflow-y-auto"
|
890
|
+
}, /*#__PURE__*/ React__default.createElement(CommandGroup, null, sortedOptions.map((item)=>/*#__PURE__*/ React__default.createElement(CommandItem, {
|
891
|
+
key: item.id,
|
892
|
+
value: item.label,
|
893
|
+
onSelect: ()=>handleSelect(item)
|
894
|
+
}, value === item.label && /*#__PURE__*/ React__default.createElement(Check, {
|
895
|
+
className: "h-4 w-4 opacity-100"
|
896
|
+
}), /*#__PURE__*/ React__default.createElement("span", null, item.label))))))));
|
897
|
+
}
|
898
|
+
|
899
|
+
export { AutoComplete, CalendarPopover, CalendarRange, Header, HoverBadge, TextWrap, normalizeDate };
|
761
900
|
//# sourceMappingURL=index.mjs.map
|