ivt 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/index.mjs +14 -14
- package/dist/alert/index.mjs +2 -2
- package/dist/alert-dialog/index.mjs +16 -16
- package/dist/avatar/index.mjs +7 -7
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.d.ts +21 -10
- package/dist/base/index.mjs +150 -55
- 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/checkbox/index.mjs +13 -13
- package/dist/chunks/{_commonjsHelpers-DKISyIRi.mjs → _commonjsHelpers-BofMKl1o.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-BofMKl1o.mjs.map +1 -0
- package/dist/chunks/{accordion-DISpV98f.mjs → accordion-D4jYKlrs.mjs} +12 -12
- package/dist/chunks/{accordion-DISpV98f.mjs.map → accordion-D4jYKlrs.mjs.map} +1 -1
- package/dist/chunks/{badge-CT_hmjd2.mjs → badge-CTyBP2up.mjs} +2 -2
- package/dist/chunks/{badge-CT_hmjd2.mjs.map → badge-CTyBP2up.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-CS-QKnOm.mjs → bundle-mjs-CUZdzyWH.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-CS-QKnOm.mjs.map → bundle-mjs-CUZdzyWH.mjs.map} +1 -1
- package/dist/chunks/{button-BHeYV17S.mjs → button-ITSALNG-.mjs} +2 -2
- package/dist/chunks/{button-BHeYV17S.mjs.map → button-ITSALNG-.mjs.map} +1 -1
- package/dist/chunks/{calendar-CU6HdJET.mjs → calendar-te6J8SSV.mjs} +6 -6
- package/dist/chunks/{calendar-CU6HdJET.mjs.map → calendar-te6J8SSV.mjs.map} +1 -1
- package/dist/chunks/{check-B3pXhibW.mjs → check-CdNBvGBU.mjs} +2 -2
- package/dist/chunks/{check-B3pXhibW.mjs.map → check-CdNBvGBU.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-BV5gvmUW.mjs → chevron-down-BpAcffl9.mjs} +2 -2
- package/dist/chunks/{chevron-down-BV5gvmUW.mjs.map → chevron-down-BpAcffl9.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-BjGcH2KQ.mjs → chevron-left-0PeYgPel.mjs} +2 -2
- package/dist/chunks/{chevron-left-BjGcH2KQ.mjs.map → chevron-left-0PeYgPel.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-DmZu0xvo.mjs → chevron-right-D8wrRolZ.mjs} +2 -2
- package/dist/chunks/{chevron-right-DmZu0xvo.mjs.map → chevron-right-D8wrRolZ.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-COuCmfU7.mjs → chevrons-up-down-DI24o-Kr.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-COuCmfU7.mjs.map → chevrons-up-down-DI24o-Kr.mjs.map} +1 -1
- package/dist/chunks/{circle-BKsPjIbw.mjs → circle-CWl_-B5R.mjs} +2 -2
- package/dist/chunks/{circle-BKsPjIbw.mjs.map → circle-CWl_-B5R.mjs.map} +1 -1
- package/dist/chunks/{command-CUWr3X1X.mjs → command-DBroTbBI.mjs} +8 -8
- package/dist/chunks/{command-CUWr3X1X.mjs.map → command-DBroTbBI.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-BSP_Jxu-.mjs → createLucideIcon-DaWLnx8c.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-BSP_Jxu-.mjs.map → createLucideIcon-DaWLnx8c.mjs.map} +1 -1
- package/dist/chunks/{dialog-zZCazow7.mjs → dialog-BPTAvhJ7.mjs} +4 -4
- package/dist/chunks/{dialog-zZCazow7.mjs.map → dialog-BPTAvhJ7.mjs.map} +1 -1
- package/dist/chunks/{hover-card-ssfyy6SY.mjs → hover-card-D2QRCyS5.mjs} +10 -10
- package/dist/chunks/{hover-card-ssfyy6SY.mjs.map → hover-card-D2QRCyS5.mjs.map} +1 -1
- package/dist/chunks/{index-DrnQ43fz.mjs → index-2QyQcI1p.mjs} +2 -2
- package/dist/chunks/{index-DrnQ43fz.mjs.map → index-2QyQcI1p.mjs.map} +1 -1
- package/dist/chunks/{index-Bl6nVRXe.mjs → index-BAVBAIxD.mjs} +1 -1
- package/dist/chunks/{index-Bl6nVRXe.mjs.map → index-BAVBAIxD.mjs.map} +1 -1
- package/dist/chunks/{index-BwQDLVf8.mjs → index-BG6Lp2cj.mjs} +1 -1
- package/dist/chunks/{index-BwQDLVf8.mjs.map → index-BG6Lp2cj.mjs.map} +1 -1
- package/dist/chunks/{index-DIBl7n6R.mjs → index-BSypXZId.mjs} +3 -3
- package/dist/chunks/{index-DIBl7n6R.mjs.map → index-BSypXZId.mjs.map} +1 -1
- package/dist/chunks/{index-B1VVz0MP.mjs → index-BVN6aKci.mjs} +6 -6
- package/dist/chunks/{index-B1VVz0MP.mjs.map → index-BVN6aKci.mjs.map} +1 -1
- package/dist/chunks/{index-Dulm0stf.mjs → index-BYi44B54.mjs} +1 -1
- package/dist/chunks/{index-Dulm0stf.mjs.map → index-BYi44B54.mjs.map} +1 -1
- package/dist/chunks/{index-CZ7Wntp7.mjs → index-Bf8RwfEV.mjs} +1 -1
- package/dist/chunks/{index-CZ7Wntp7.mjs.map → index-Bf8RwfEV.mjs.map} +1 -1
- package/dist/chunks/{index-DRk0bB4A.mjs → index-C5AVHM9_.mjs} +9 -9
- package/dist/chunks/{index-DRk0bB4A.mjs.map → index-C5AVHM9_.mjs.map} +1 -1
- package/dist/chunks/{index-BZyzz9k8.mjs → index-Cm4bfE9_.mjs} +1 -1
- package/dist/chunks/{index-BZyzz9k8.mjs.map → index-Cm4bfE9_.mjs.map} +1 -1
- package/dist/chunks/{index-fWnSEyU5.mjs → index-Ct-DPULS.mjs} +1 -1
- package/dist/chunks/{index-fWnSEyU5.mjs.map → index-Ct-DPULS.mjs.map} +1 -1
- package/dist/chunks/{index-tNc5GmLL.mjs → index-CuzH07Qd.mjs} +2 -2
- package/dist/chunks/{index-tNc5GmLL.mjs.map → index-CuzH07Qd.mjs.map} +1 -1
- package/dist/chunks/{index-BOOPeiVs.mjs → index-D06B5rqh.mjs} +2 -2
- package/dist/chunks/{index-BOOPeiVs.mjs.map → index-D06B5rqh.mjs.map} +1 -1
- package/dist/chunks/{index-Bgiaprdv.mjs → index-DAFIXHvj.mjs} +1 -1
- package/dist/chunks/{index-Bgiaprdv.mjs.map → index-DAFIXHvj.mjs.map} +1 -1
- package/dist/chunks/{index-BFDafXar.mjs → index-DIiHm1mS.mjs} +7 -7
- package/dist/chunks/{index-BFDafXar.mjs.map → index-DIiHm1mS.mjs.map} +1 -1
- package/dist/chunks/{index-3XcV7C7l.mjs → index-DM8LSsqF.mjs} +10 -10
- package/dist/chunks/{index-3XcV7C7l.mjs.map → index-DM8LSsqF.mjs.map} +1 -1
- package/dist/chunks/{index-DUFr75Kc.mjs → index-DOjBg0lm.mjs} +2 -2
- package/dist/chunks/{index-DUFr75Kc.mjs.map → index-DOjBg0lm.mjs.map} +1 -1
- package/dist/chunks/{index-D1yPZAOL.mjs → index-DzefHZGo.mjs} +1 -1
- package/dist/chunks/{index-D1yPZAOL.mjs.map → index-DzefHZGo.mjs.map} +1 -1
- package/dist/chunks/{index-CHyZo-Tj.mjs → index-E3p9x3ha.mjs} +5 -5
- package/dist/chunks/{index-CHyZo-Tj.mjs.map → index-E3p9x3ha.mjs.map} +1 -1
- package/dist/chunks/{index-BF_TaONY.mjs → index-K8qCMx0M.mjs} +13 -13
- package/dist/chunks/{index-BF_TaONY.mjs.map → index-K8qCMx0M.mjs.map} +1 -1
- package/dist/chunks/{index-BYijxgZz.mjs → index-gjSvM_n5.mjs} +1 -1
- package/dist/chunks/{index-BYijxgZz.mjs.map → index-gjSvM_n5.mjs.map} +1 -1
- package/dist/chunks/{input-D9-FhnGc.mjs → input-60H675-j.mjs} +2 -2
- package/dist/chunks/{input-D9-FhnGc.mjs.map → input-60H675-j.mjs.map} +1 -1
- package/dist/chunks/{label-CiJcd2F9.mjs → label-7JVgKXB9.mjs} +3 -3
- package/dist/chunks/{label-CiJcd2F9.mjs.map → label-7JVgKXB9.mjs.map} +1 -1
- package/dist/chunks/{pagination-SOhqOW7I.mjs → pagination-BJ-DX4sN.mjs} +6 -6
- package/dist/chunks/{pagination-SOhqOW7I.mjs.map → pagination-BJ-DX4sN.mjs.map} +1 -1
- package/dist/chunks/{popover-CtxxPI-t.mjs → popover-olTzpq2V.mjs} +12 -12
- package/dist/chunks/{popover-CtxxPI-t.mjs.map → popover-olTzpq2V.mjs.map} +1 -1
- package/dist/chunks/{progress-WrZK6klx.mjs → progress-BECdNMG6.mjs} +4 -4
- package/dist/chunks/{progress-WrZK6klx.mjs.map → progress-BECdNMG6.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-BVyyR0Km.mjs → scroll-area-D7Zqmap9.mjs} +10 -10
- package/dist/chunks/{scroll-area-BVyyR0Km.mjs.map → scroll-area-D7Zqmap9.mjs.map} +1 -1
- package/dist/chunks/{select-COGYOg3A.mjs → select-DfXpJK4z.mjs} +5 -5
- package/dist/chunks/{select-COGYOg3A.mjs.map → select-DfXpJK4z.mjs.map} +1 -1
- package/dist/chunks/{separator-D6Y96f4g.mjs → separator-CZMiBPx2.mjs} +3 -3
- package/dist/chunks/{separator-D6Y96f4g.mjs.map → separator-CZMiBPx2.mjs.map} +1 -1
- package/dist/chunks/{skeleton-CRfBAk8U.mjs → skeleton-B0qUp0Fk.mjs} +2 -2
- package/dist/chunks/{skeleton-CRfBAk8U.mjs.map → skeleton-B0qUp0Fk.mjs.map} +1 -1
- package/dist/chunks/{sortable-tiuZWf3S.mjs → sortable-CoyZorqY.mjs} +3 -3
- package/dist/chunks/{sortable-tiuZWf3S.mjs.map → sortable-CoyZorqY.mjs.map} +1 -1
- package/dist/chunks/{table-BlTF56Yn.mjs → table-qksvbWHh.mjs} +2 -2
- package/dist/chunks/{table-BlTF56Yn.mjs.map → table-qksvbWHh.mjs.map} +1 -1
- package/dist/chunks/{toggle-D5tCYA7L.mjs → toggle-CnZtg7xI.mjs} +5 -5
- package/dist/chunks/{toggle-D5tCYA7L.mjs.map → toggle-CnZtg7xI.mjs.map} +1 -1
- package/dist/chunks/{tooltip-DgNjTTxv.mjs → tooltip-VUTOmzzi.mjs} +12 -12
- package/dist/chunks/{tooltip-DgNjTTxv.mjs.map → tooltip-VUTOmzzi.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-O3UsmxNe.mjs → tslib.es6-CkprbAX-.mjs} +1 -1
- package/dist/chunks/{tslib.es6-O3UsmxNe.mjs.map → tslib.es6-CkprbAX-.mjs.map} +1 -1
- package/dist/chunks/{utils-tbIgc9YG.mjs → utils-DclPBFuL.mjs} +2 -2
- package/dist/chunks/{utils-tbIgc9YG.mjs.map → utils-DclPBFuL.mjs.map} +1 -1
- package/dist/chunks/{x-5oL4uC6I.mjs → x-B3TwCgfa.mjs} +2 -2
- package/dist/chunks/{x-5oL4uC6I.mjs.map → x-B3TwCgfa.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 +23 -23
- 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.d.ts +1 -0
- package/dist/icon/index.mjs +25 -2
- package/dist/icon/index.mjs.map +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.d.ts +36 -0
- package/dist/layout/index.mjs +85 -0
- package/dist/layout/index.mjs.map +1 -0
- package/dist/menubar/index.mjs +23 -23
- 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 +17 -17
- 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 +13 -13
- package/dist/textarea/index.mjs +2 -2
- package/dist/toast/index.mjs +14 -14
- package/dist/toggle/index.mjs +7 -7
- package/dist/toggle-group/index.mjs +13 -13
- package/dist/tooltip/index.mjs +16 -16
- package/package.json +5 -1
- package/dist/chunks/_commonjsHelpers-DKISyIRi.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-D4jYKlrs.mjs';
|
2
|
+
import '../chunks/utils-DclPBFuL.mjs';
|
3
|
+
import '../chunks/bundle-mjs-CUZdzyWH.mjs';
|
4
4
|
import 'react';
|
5
|
-
import '../chunks/index-
|
5
|
+
import '../chunks/index-BAVBAIxD.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-Cm4bfE9_.mjs';
|
9
|
+
import '../chunks/index-gjSvM_n5.mjs';
|
10
|
+
import '../chunks/index-DOjBg0lm.mjs';
|
11
|
+
import '../chunks/index-DAFIXHvj.mjs';
|
12
|
+
import '../chunks/index-Ct-DPULS.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-BSypXZId.mjs';
|
16
|
+
import '../chunks/index-2QyQcI1p.mjs';
|
17
|
+
import '../chunks/index-BYi44B54.mjs';
|
18
|
+
import '../chunks/chevron-down-BpAcffl9.mjs';
|
19
|
+
import '../chunks/createLucideIcon-DaWLnx8c.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-DclPBFuL.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-CUZdzyWH.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-BAVBAIxD.mjs';
|
3
|
+
import { u as useComposedRefs } from '../chunks/index-Cm4bfE9_.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-DM8LSsqF.mjs';
|
5
|
+
import { c as composeEventHandlers } from '../chunks/index-gjSvM_n5.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-DclPBFuL.mjs';
|
9
|
+
import { b as buttonVariants } from '../chunks/button-ITSALNG-.mjs';
|
10
|
+
import '../chunks/index-2QyQcI1p.mjs';
|
11
|
+
import '../chunks/index-DAFIXHvj.mjs';
|
12
|
+
import '../chunks/index-DOjBg0lm.mjs';
|
13
|
+
import '../chunks/index-BVN6aKci.mjs';
|
14
|
+
import '../chunks/index-Ct-DPULS.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-DzefHZGo.mjs';
|
17
|
+
import '../chunks/index-E3p9x3ha.mjs';
|
18
|
+
import '../chunks/tslib.es6-CkprbAX-.mjs';
|
19
|
+
import '../chunks/index-BSypXZId.mjs';
|
20
|
+
import '../chunks/bundle-mjs-CUZdzyWH.mjs';
|
21
21
|
import 'class-variance-authority';
|
22
22
|
|
23
23
|
var ROOT_NAME = "AlertDialog";
|
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-BAVBAIxD.mjs';
|
3
|
+
import { u as useCallbackRef } from '../chunks/index-DzefHZGo.mjs';
|
4
|
+
import { u as useLayoutEffect2 } from '../chunks/index-DAFIXHvj.mjs';
|
5
|
+
import { P as Primitive } from '../chunks/index-Ct-DPULS.mjs';
|
6
|
+
import { r as requireShim } from '../chunks/index-BG6Lp2cj.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-DclPBFuL.mjs';
|
9
9
|
import 'react-dom';
|
10
10
|
import '@radix-ui/react-slot';
|
11
|
-
import '../chunks/bundle-mjs-
|
11
|
+
import '../chunks/bundle-mjs-CUZdzyWH.mjs';
|
12
12
|
|
13
13
|
var shimExports = requireShim();
|
14
14
|
|
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-CTyBP2up.mjs';
|
2
|
+
import '../chunks/utils-DclPBFuL.mjs';
|
3
|
+
import '../chunks/bundle-mjs-CUZdzyWH.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,21 +67,32 @@ 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
|
-
interface
|
71
|
-
|
72
|
-
|
73
|
-
}
|
74
|
-
interface AutoCompleteProps {
|
75
|
-
value: string;
|
76
|
-
onChange: (value: string) => void;
|
70
|
+
interface AutoCompleteProps<T> {
|
71
|
+
value: T | null;
|
72
|
+
onChange: (value: T | null) => void;
|
77
73
|
placeholder?: string;
|
78
74
|
searchPlaceholder?: string;
|
79
75
|
open: boolean;
|
80
76
|
onOpenChange: (open: boolean) => void;
|
81
77
|
disabled?: boolean;
|
82
78
|
messageEmpty?: string;
|
83
|
-
fetchOptions: (term: string) => Promise<
|
79
|
+
fetchOptions: (term: string) => Promise<T[]>;
|
80
|
+
getOptionLabel: (option: T) => string;
|
81
|
+
getOptionKey: (option: T) => string | number;
|
82
|
+
onSelect?: (option: T) => void;
|
83
|
+
className?: string;
|
84
|
+
}
|
85
|
+
declare function AutoComplete<T>({ value, onChange, placeholder, searchPlaceholder, open, onOpenChange, disabled, messageEmpty, fetchOptions, getOptionLabel, getOptionKey, onSelect, className, }: AutoCompleteProps<T>): react_jsx_runtime.JSX.Element;
|
86
|
+
|
87
|
+
interface DeleteConfirmationModalProps {
|
88
|
+
onConfirm: () => Promise<void> | void;
|
89
|
+
title?: string;
|
90
|
+
description?: string;
|
91
|
+
confirmText?: string;
|
92
|
+
cancelText?: string;
|
93
|
+
disabled?: boolean;
|
94
|
+
children?: React__default.ReactNode;
|
84
95
|
}
|
85
|
-
declare function
|
96
|
+
declare function DeleteConfirmationModal({ onConfirm, title, description, confirmText, cancelText, disabled, children, }: DeleteConfirmationModalProps): react_jsx_runtime.JSX.Element;
|
86
97
|
|
87
|
-
export { AutoComplete, CalendarPopover, CalendarRange, Header, HoverBadge, TextWrap, normalizeDate };
|
98
|
+
export { AutoComplete, CalendarPopover, CalendarRange, DeleteConfirmationModal, Header, HoverBadge, TextWrap, normalizeDate };
|
package/dist/base/index.mjs
CHANGED
@@ -1,45 +1,45 @@
|
|
1
|
-
import { c as cn } from '../chunks/utils-
|
1
|
+
import { c as cn } from '../chunks/utils-DclPBFuL.mjs';
|
2
2
|
import * as React from 'react';
|
3
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-
|
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 { C as ChevronsUpDown } from '../chunks/chevrons-up-down-
|
13
|
-
import { C as Command, b as CommandInput, d as CommandEmpty, c as CommandList, e as CommandGroup, f as CommandItem } from '../chunks/command-
|
14
|
-
import { C as Check } from '../chunks/check-
|
15
|
-
import '../chunks/
|
4
|
+
import { A as Accordion, a as AccordionItem, b as AccordionTrigger, c as AccordionContent } from '../chunks/accordion-D4jYKlrs.mjs';
|
5
|
+
import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-olTzpq2V.mjs';
|
6
|
+
import { c as createLucideIcon } from '../chunks/createLucideIcon-DaWLnx8c.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-te6J8SSV.mjs';
|
8
|
+
import { B as Button } from '../chunks/button-ITSALNG-.mjs';
|
9
|
+
import { t as twMerge } from '../chunks/bundle-mjs-CUZdzyWH.mjs';
|
10
|
+
import { H as HoverCard, a as HoverCardTrigger, b as HoverCardContent } from '../chunks/hover-card-D2QRCyS5.mjs';
|
11
|
+
import { B as Badge } from '../chunks/badge-CTyBP2up.mjs';
|
12
|
+
import { C as ChevronsUpDown } from '../chunks/chevrons-up-down-DI24o-Kr.mjs';
|
13
|
+
import { C as Command, b as CommandInput, d as CommandEmpty, c as CommandList, e as CommandGroup, f as CommandItem } from '../chunks/command-DBroTbBI.mjs';
|
14
|
+
import { C as Check } from '../chunks/check-CdNBvGBU.mjs';
|
15
|
+
import { D as Dialog, i as DialogTrigger, b as DialogContent, e as DialogHeader, h as DialogTitle, c as DialogDescription, d as DialogFooter, a as DialogClose } from '../chunks/dialog-BPTAvhJ7.mjs';
|
16
|
+
import '../chunks/index-BAVBAIxD.mjs';
|
16
17
|
import 'react/jsx-runtime';
|
17
18
|
import '@radix-ui/react-collection';
|
18
|
-
import '../chunks/index-
|
19
|
-
import '../chunks/index-
|
20
|
-
import '../chunks/index-
|
21
|
-
import '../chunks/index-
|
22
|
-
import '../chunks/index-
|
19
|
+
import '../chunks/index-Cm4bfE9_.mjs';
|
20
|
+
import '../chunks/index-gjSvM_n5.mjs';
|
21
|
+
import '../chunks/index-DOjBg0lm.mjs';
|
22
|
+
import '../chunks/index-DAFIXHvj.mjs';
|
23
|
+
import '../chunks/index-Ct-DPULS.mjs';
|
23
24
|
import 'react-dom';
|
24
25
|
import '@radix-ui/react-slot';
|
25
|
-
import '../chunks/index-
|
26
|
-
import '../chunks/index-
|
27
|
-
import '../chunks/index-
|
28
|
-
import '../chunks/chevron-down-
|
29
|
-
import '../chunks/index-
|
30
|
-
import '../chunks/index-
|
31
|
-
import '../chunks/index-
|
32
|
-
import '../chunks/tslib.es6-
|
33
|
-
import '../chunks/index-
|
34
|
-
import '../chunks/index-
|
35
|
-
import '../chunks/chevron-left-
|
36
|
-
import '../chunks/chevron-right-
|
26
|
+
import '../chunks/index-BSypXZId.mjs';
|
27
|
+
import '../chunks/index-2QyQcI1p.mjs';
|
28
|
+
import '../chunks/index-BYi44B54.mjs';
|
29
|
+
import '../chunks/chevron-down-BpAcffl9.mjs';
|
30
|
+
import '../chunks/index-BVN6aKci.mjs';
|
31
|
+
import '../chunks/index-DzefHZGo.mjs';
|
32
|
+
import '../chunks/index-E3p9x3ha.mjs';
|
33
|
+
import '../chunks/tslib.es6-CkprbAX-.mjs';
|
34
|
+
import '../chunks/index-DIiHm1mS.mjs';
|
35
|
+
import '../chunks/index-CuzH07Qd.mjs';
|
36
|
+
import '../chunks/chevron-left-0PeYgPel.mjs';
|
37
|
+
import '../chunks/chevron-right-D8wrRolZ.mjs';
|
37
38
|
import 'class-variance-authority';
|
38
|
-
import '../chunks/index-
|
39
|
-
import '../chunks/
|
40
|
-
import '../chunks/x-5oL4uC6I.mjs';
|
39
|
+
import '../chunks/index-DM8LSsqF.mjs';
|
40
|
+
import '../chunks/x-B3TwCgfa.mjs';
|
41
41
|
|
42
|
-
const __iconNode$
|
42
|
+
const __iconNode$2 = [
|
43
43
|
[
|
44
44
|
"path",
|
45
45
|
{
|
@@ -73,9 +73,9 @@ const __iconNode$1 = [
|
|
73
73
|
}
|
74
74
|
]
|
75
75
|
];
|
76
|
-
const Calendar = createLucideIcon("Calendar", __iconNode$
|
76
|
+
const Calendar = createLucideIcon("Calendar", __iconNode$2);
|
77
77
|
|
78
|
-
const __iconNode = [
|
78
|
+
const __iconNode$1 = [
|
79
79
|
[
|
80
80
|
"path",
|
81
81
|
{
|
@@ -84,7 +84,52 @@ const __iconNode = [
|
|
84
84
|
}
|
85
85
|
]
|
86
86
|
];
|
87
|
-
const LoaderCircle = createLucideIcon("LoaderCircle", __iconNode);
|
87
|
+
const LoaderCircle = createLucideIcon("LoaderCircle", __iconNode$1);
|
88
|
+
|
89
|
+
const __iconNode = [
|
90
|
+
[
|
91
|
+
"path",
|
92
|
+
{
|
93
|
+
d: "M3 6h18",
|
94
|
+
key: "d0wm0j"
|
95
|
+
}
|
96
|
+
],
|
97
|
+
[
|
98
|
+
"path",
|
99
|
+
{
|
100
|
+
d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",
|
101
|
+
key: "4alrt4"
|
102
|
+
}
|
103
|
+
],
|
104
|
+
[
|
105
|
+
"path",
|
106
|
+
{
|
107
|
+
d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",
|
108
|
+
key: "v07s0e"
|
109
|
+
}
|
110
|
+
],
|
111
|
+
[
|
112
|
+
"line",
|
113
|
+
{
|
114
|
+
x1: "10",
|
115
|
+
x2: "10",
|
116
|
+
y1: "11",
|
117
|
+
y2: "17",
|
118
|
+
key: "1uufr5"
|
119
|
+
}
|
120
|
+
],
|
121
|
+
[
|
122
|
+
"line",
|
123
|
+
{
|
124
|
+
x1: "14",
|
125
|
+
x2: "14",
|
126
|
+
y1: "11",
|
127
|
+
y2: "17",
|
128
|
+
key: "xtxkd"
|
129
|
+
}
|
130
|
+
]
|
131
|
+
];
|
132
|
+
const Trash2 = createLucideIcon("Trash2", __iconNode);
|
88
133
|
|
89
134
|
const TextWrap = ({ children, className, ...props })=>{
|
90
135
|
return /*#__PURE__*/ React__default.createElement("div", {
|
@@ -827,17 +872,24 @@ function c(e, u, c, i) {
|
|
827
872
|
return T;
|
828
873
|
}
|
829
874
|
|
830
|
-
function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, onOpenChange, disabled, messageEmpty = "Nenhum item encontrado.", fetchOptions }) {
|
875
|
+
function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, onOpenChange, disabled, messageEmpty = "Nenhum item encontrado.", fetchOptions, getOptionLabel, getOptionKey, onSelect, className }) {
|
831
876
|
const [options, setOptions] = React__default.useState([]);
|
832
877
|
const [loading, setLoading] = React__default.useState(false);
|
833
878
|
const [searchTerm, setSearchTerm] = React__default.useState("");
|
834
|
-
const sortedOptions =
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
879
|
+
const sortedOptions = React__default.useMemo(()=>{
|
880
|
+
if (!value) return options;
|
881
|
+
return [
|
882
|
+
...options
|
883
|
+
].sort((a, b)=>{
|
884
|
+
if (getOptionLabel(a) === getOptionLabel(value)) return -1;
|
885
|
+
if (getOptionLabel(b) === getOptionLabel(value)) return 1;
|
886
|
+
return getOptionLabel(a).localeCompare(getOptionLabel(b));
|
887
|
+
});
|
888
|
+
}, [
|
889
|
+
options,
|
890
|
+
value,
|
891
|
+
getOptionLabel
|
892
|
+
]);
|
841
893
|
const debouncedFetch = c(async (term)=>{
|
842
894
|
try {
|
843
895
|
const result = await fetchOptions(term);
|
@@ -860,8 +912,12 @@ function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, o
|
|
860
912
|
debouncedFetch(val);
|
861
913
|
};
|
862
914
|
const handleSelect = (option)=>{
|
863
|
-
|
864
|
-
|
915
|
+
if (onSelect) {
|
916
|
+
onSelect(option);
|
917
|
+
} else {
|
918
|
+
onChange(option);
|
919
|
+
onOpenChange(false);
|
920
|
+
}
|
865
921
|
};
|
866
922
|
return /*#__PURE__*/ React__default.createElement(Popover, {
|
867
923
|
open: open,
|
@@ -870,12 +926,12 @@ function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, o
|
|
870
926
|
asChild: true
|
871
927
|
}, /*#__PURE__*/ React__default.createElement(Button, {
|
872
928
|
variant: "outline",
|
873
|
-
className: "flex h-10 w-full items-center justify-between truncate",
|
929
|
+
className: cn("flex h-10 w-full items-center justify-between truncate", className),
|
874
930
|
"aria-expanded": open,
|
875
931
|
disabled: disabled
|
876
932
|
}, /*#__PURE__*/ React__default.createElement("span", {
|
877
933
|
className: cn("text-muted-foreground", value && "text-foreground")
|
878
|
-
}, value
|
934
|
+
}, value ? getOptionLabel(value) : placeholder), /*#__PURE__*/ React__default.createElement(ChevronsUpDown, {
|
879
935
|
className: "ml-2 h-4 w-4 shrink-0 opacity-50"
|
880
936
|
}))), /*#__PURE__*/ React__default.createElement(PopoverContent, {
|
881
937
|
className: "max-h-[300px] w-[--radix-popover-trigger-width] overflow-auto p-0",
|
@@ -887,14 +943,53 @@ function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, o
|
|
887
943
|
onValueChange: handleInputChange
|
888
944
|
}), /*#__PURE__*/ React__default.createElement(CommandEmpty, null, loading ? "Carregando..." : searchTerm.trim() === "" ? "Digite algo para buscar..." : messageEmpty), /*#__PURE__*/ React__default.createElement(CommandList, {
|
889
945
|
className: "max-h-60 overflow-y-auto"
|
890
|
-
}, /*#__PURE__*/ React__default.createElement(CommandGroup, null, sortedOptions.map((item)
|
891
|
-
|
892
|
-
|
946
|
+
}, /*#__PURE__*/ React__default.createElement(CommandGroup, null, sortedOptions.map((item)=>{
|
947
|
+
const label = getOptionLabel(item);
|
948
|
+
const key = getOptionKey(item);
|
949
|
+
return /*#__PURE__*/ React__default.createElement(CommandItem, {
|
950
|
+
key: key,
|
951
|
+
value: label,
|
893
952
|
onSelect: ()=>handleSelect(item)
|
894
|
-
}, value ===
|
953
|
+
}, value && getOptionLabel(value) === label && /*#__PURE__*/ React__default.createElement(Check, {
|
895
954
|
className: "h-4 w-4 opacity-100"
|
896
|
-
}), /*#__PURE__*/ React__default.createElement("span", null,
|
955
|
+
}), /*#__PURE__*/ React__default.createElement("span", null, label));
|
956
|
+
}))))));
|
957
|
+
}
|
958
|
+
|
959
|
+
function DeleteConfirmationModal({ onConfirm, title = "Tem certeza que deseja apagar?", description = "Essa ação não pode ser desfeita.", confirmText = "Apagar", cancelText = "Cancelar", disabled = false, children }) {
|
960
|
+
const [isPending, startTransition] = React__default.useTransition();
|
961
|
+
const handleConfirm = ()=>{
|
962
|
+
startTransition(async ()=>{
|
963
|
+
await onConfirm();
|
964
|
+
});
|
965
|
+
};
|
966
|
+
return /*#__PURE__*/ React__default.createElement(Dialog, null, /*#__PURE__*/ React__default.createElement(DialogTrigger, {
|
967
|
+
asChild: true
|
968
|
+
}, children ? children : /*#__PURE__*/ React__default.createElement(Button, {
|
969
|
+
variant: "ghost",
|
970
|
+
className: "text-destructive hover:text-destructive w-full items-start justify-start px-2",
|
971
|
+
disabled: disabled
|
972
|
+
}, confirmText)), /*#__PURE__*/ React__default.createElement(DialogContent, {
|
973
|
+
className: "max-w-[425px]"
|
974
|
+
}, /*#__PURE__*/ React__default.createElement(DialogHeader, {
|
975
|
+
className: "text-left"
|
976
|
+
}, /*#__PURE__*/ React__default.createElement(DialogTitle, null, title), /*#__PURE__*/ React__default.createElement(DialogDescription, null, description)), /*#__PURE__*/ React__default.createElement(DialogFooter, {
|
977
|
+
className: "flex flex-row flex-wrap items-start justify-between sm:justify-between"
|
978
|
+
}, /*#__PURE__*/ React__default.createElement(DialogClose, {
|
979
|
+
asChild: true
|
980
|
+
}, /*#__PURE__*/ React__default.createElement(Button, {
|
981
|
+
variant: "outline",
|
982
|
+
disabled: isPending
|
983
|
+
}, cancelText)), /*#__PURE__*/ React__default.createElement(DialogClose, {
|
984
|
+
asChild: true
|
985
|
+
}, /*#__PURE__*/ React__default.createElement(Button, {
|
986
|
+
variant: "destructive",
|
987
|
+
onClick: handleConfirm,
|
988
|
+
disabled: disabled || isPending
|
989
|
+
}, /*#__PURE__*/ React__default.createElement(Trash2, {
|
990
|
+
className: "h-4 w-4"
|
991
|
+
}), confirmText)))));
|
897
992
|
}
|
898
993
|
|
899
|
-
export { AutoComplete, CalendarPopover, CalendarRange, Header, HoverBadge, TextWrap, normalizeDate };
|
994
|
+
export { AutoComplete, CalendarPopover, CalendarRange, DeleteConfirmationModal, Header, HoverBadge, TextWrap, normalizeDate };
|
900
995
|
//# sourceMappingURL=index.mjs.map
|