@boxcustodia/library 2.0.0-alpha.22 → 2.0.0-alpha.24
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/components/calendar/calendar.cjs.js +1 -1
- package/dist/components/calendar/calendar.es.js +43 -44
- package/dist/components/date-picker/date-input.cjs.js +1 -1
- package/dist/components/date-picker/date-input.es.js +160 -140
- package/dist/components/pagination/pagination.cjs.js +1 -1
- package/dist/components/pagination/pagination.es.js +37 -35
- package/dist/components/popover/popover.cjs.js +1 -1
- package/dist/components/popover/popover.es.js +1 -1
- package/dist/components/scroll-area/scroll-area.cjs.js +1 -1
- package/dist/components/scroll-area/scroll-area.es.js +4 -4
- package/dist/components/select/select.cjs.js +1 -1
- package/dist/components/select/select.es.js +94 -90
- package/dist/components/tag/tag.cjs.js +1 -1
- package/dist/components/tag/tag.es.js +37 -18
- package/dist/hooks/use-action/use-action.cjs.js +1 -0
- package/dist/hooks/use-action/use-action.es.js +41 -0
- package/dist/hooks/use-pagination/use-pagination.cjs.js +1 -1
- package/dist/hooks/use-pagination/use-pagination.es.js +77 -32
- package/dist/hooks/use-range-pagination/use-range-pagination.cjs.js +1 -1
- package/dist/hooks/use-range-pagination/use-range-pagination.es.js +8 -5
- package/dist/hooks/use-selection/use-selection.cjs.js +1 -1
- package/dist/hooks/use-selection/use-selection.es.js +95 -33
- package/dist/hooks/use-session-storage/use-session-storage.cjs.js +1 -0
- package/dist/hooks/use-session-storage/use-session-storage.es.js +57 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +61 -63
- package/dist/src/components/select/select.d.ts +9 -2
- package/dist/src/components/tag/tag.d.ts +2 -1
- package/dist/src/hooks/index.d.ts +2 -3
- package/dist/src/hooks/internal/index.d.ts +1 -0
- package/dist/src/hooks/internal/serializer.d.ts +4 -0
- package/dist/src/hooks/use-action/index.d.ts +1 -0
- package/dist/src/hooks/use-action/use-action.d.ts +22 -0
- package/dist/src/hooks/use-local-storage/use-local-storage.d.ts +2 -4
- package/dist/src/hooks/use-pagination/use-pagination.d.ts +47 -32
- package/dist/src/hooks/use-range-pagination/use-range-pagination.d.ts +16 -10
- package/dist/src/hooks/use-selection/use-selection.d.ts +39 -45
- package/dist/src/hooks/use-session-storage/index.d.ts +1 -0
- package/dist/src/hooks/use-session-storage/use-session-storage.d.ts +11 -0
- package/package.json +1 -1
- package/src/components/calendar/calendar.tsx +10 -8
- package/src/components/combobox/combobox.stories.tsx +16 -0
- package/src/components/date-picker/date-input.tsx +23 -2
- package/src/components/form/form.tsx +3 -2
- package/src/components/pagination/pagination.tsx +5 -3
- package/src/components/popover/popover.tsx +1 -1
- package/src/components/scroll-area/scroll-area.tsx +2 -2
- package/src/components/select/select.tsx +14 -3
- package/src/components/tag/tag.stories.tsx +47 -2
- package/src/components/tag/tag.tsx +28 -6
- package/src/hooks/index.ts +2 -3
- package/src/hooks/internal/index.ts +1 -0
- package/src/hooks/internal/serializer.ts +4 -0
- package/src/hooks/use-action/index.ts +1 -0
- package/src/hooks/{use-mutation/use-mutation.stories.tsx → use-action/use-action.stories.tsx} +34 -34
- package/src/hooks/{use-mutation/use-mutation.test.ts → use-action/use-action.test.ts} +53 -53
- package/src/hooks/{use-mutation/use-mutation.ts → use-action/use-action.ts} +20 -20
- package/src/hooks/use-click-outside/use-click-outside.stories.tsx +0 -1
- package/src/hooks/use-clipboard/use-clipboard.stories.tsx +0 -1
- package/src/hooks/use-document-title/use-document-title.stories.tsx +0 -1
- package/src/hooks/use-is-visible/use-is-visible.test.tsx +1 -1
- package/src/hooks/use-local-storage/use-local-storage.stories.tsx +0 -1
- package/src/hooks/use-local-storage/use-local-storage.ts +2 -5
- package/src/hooks/use-media-query/use-media-query.stories.tsx +0 -1
- package/src/hooks/use-pagination/use-pagination.stories.tsx +720 -57
- package/src/hooks/use-pagination/use-pagination.test.tsx +560 -48
- package/src/hooks/use-pagination/use-pagination.ts +266 -0
- package/src/hooks/use-prevent-page-close/use-prevent-page-close.stories.tsx +0 -1
- package/src/hooks/use-range-pagination/use-range-pagination.test.tsx +2 -2
- package/src/hooks/use-range-pagination/use-range-pagination.tsx +24 -21
- package/src/hooks/use-selection/use-selection.stories.tsx +339 -84
- package/src/hooks/use-selection/use-selection.test.tsx +417 -2
- package/src/hooks/use-selection/use-selection.ts +212 -102
- package/src/hooks/use-session-storage/index.ts +1 -0
- package/src/hooks/use-session-storage/use-session-storage.stories.tsx +122 -0
- package/src/hooks/use-session-storage/use-session-storage.test.ts +164 -0
- package/src/hooks/use-session-storage/use-session-storage.ts +115 -0
- package/dist/hooks/use-async/use-async.cjs.js +0 -1
- package/dist/hooks/use-async/use-async.es.js +0 -57
- package/dist/hooks/use-focus-trap/scope-tab.cjs.js +0 -1
- package/dist/hooks/use-focus-trap/scope-tab.es.js +0 -21
- package/dist/hooks/use-focus-trap/tabbable.cjs.js +0 -1
- package/dist/hooks/use-focus-trap/tabbable.es.js +0 -38
- package/dist/hooks/use-focus-trap/use-focus-trap.cjs.js +0 -1
- package/dist/hooks/use-focus-trap/use-focus-trap.es.js +0 -34
- package/dist/hooks/use-mutation/use-mutation.cjs.js +0 -1
- package/dist/hooks/use-mutation/use-mutation.es.js +0 -41
- package/dist/src/hooks/use-async/index.d.ts +0 -1
- package/dist/src/hooks/use-async/use-async.d.ts +0 -21
- package/dist/src/hooks/use-focus-trap/index.d.ts +0 -1
- package/dist/src/hooks/use-focus-trap/scope-tab.d.ts +0 -1
- package/dist/src/hooks/use-focus-trap/tabbable.d.ts +0 -4
- package/dist/src/hooks/use-focus-trap/use-focus-trap.d.ts +0 -1
- package/dist/src/hooks/use-mutation/index.d.ts +0 -1
- package/dist/src/hooks/use-mutation/use-mutation.d.ts +0 -22
- package/dist/src/hooks/use-mutation/use-mutation.test.d.ts +0 -1
- package/src/hooks/use-async/index.ts +0 -1
- package/src/hooks/use-async/use-async.stories.tsx +0 -272
- package/src/hooks/use-async/use-async.test.ts +0 -397
- package/src/hooks/use-async/use-async.ts +0 -135
- package/src/hooks/use-focus-trap/index.ts +0 -1
- package/src/hooks/use-focus-trap/scope-tab.ts +0 -38
- package/src/hooks/use-focus-trap/tabbable.ts +0 -70
- package/src/hooks/use-focus-trap/use-focus-trap.stories.tsx +0 -37
- package/src/hooks/use-focus-trap/use-focus-trap.test.ts +0 -355
- package/src/hooks/use-focus-trap/use-focus-trap.ts +0 -78
- package/src/hooks/use-mutation/index.ts +0 -1
- package/src/hooks/use-pagination/use-pagination.tsx +0 -84
- /package/dist/src/hooks/{use-async/use-async.test.d.ts → use-action/use-action.test.d.ts} +0 -0
- /package/dist/src/hooks/{use-focus-trap/use-focus-trap.test.d.ts → use-session-storage/use-session-storage.test.d.ts} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),w=require("date-fns/locale"),d=require("lucide-react"),C=require("react-day-picker"),f=require("../select/select.cjs.js"),o=require("../../lib/cn.cjs.js"),b=new Date().getFullYear(),N=new Date(b-100,0),j=new Date(b+100,11);function D({options:l=[],value:c,onChange:r}){const i=l.map(e=>({label:e.label??"",value:e.value??0})),u=i.find(e=>e.value===Number(c))??null;return s.jsx(f.Select,{items:i,value:u,icon:s.jsx(d.ChevronDownIcon,{className:f.selectTriggerIconClassName}),"aria-invalid":!1,className:"py-1 h-7 border-none font-medium! w-fit! [&>span]:capitalize",getLabel:e=>e.label,getId:e=>String(e.value),onValueChange:e=>{!r||e===null||r({target:{value:String(e.value)}})}})}const m="relative flex size-(--cell-size) text-base sm:text-sm items-center justify-center rounded-lg text-foreground not-in-data-selected:hover:bg-accent disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0";function k({className:l,classNames:c,showOutsideDays:r=!0,components:i,mode:u="single",captionLayout:e="dropdown",startMonth:x=N,endMonth:v=j,...h}){const g={button_next:m,button_previous:m,caption_label:"text-base sm:text-sm font-medium flex items-center gap-2 h-full",day:"size-(--cell-size) text-sm py-px",day_button:o.cn(m,"in-data-disabled:pointer-events-none in-[.range-middle]:rounded-none in-[.range-end:not(.range-start)]:rounded-s-none in-[.range-start:not(.range-end)]:rounded-e-none in-[.range-middle]:in-data-selected:bg-accent in-data-selected:bg-primary in-[.range-middle]:in-data-selected:text-foreground in-data-disabled:text-muted-foreground/72 in-data-outside:text-muted-foreground/72 in-data-selected:in-data-outside:text-primary-foreground in-data-selected:text-primary-foreground in-data-disabled:line-through outline-none in-[[data-selected]:not(.range-middle)]:transition-[color,background-color,border-radius,box-shadow] focus-visible:z-1 focus-visible:ring-[3px] focus-visible:ring-ring/50"),dropdown:"absolute bg-popover inset-0 opacity-0",dropdown_root:"relative has-focus:border-ring has-focus:ring-ring/50 has-focus:ring-[3px] border border-input shadow-xs/5 rounded-lg px-[calc(--spacing(3)-1px)] h-9 sm:h-8 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-me-1",dropdowns:"w-full flex items-center text-base sm:text-sm justify-center h-(--cell-size) gap-1.5 *:[span]:font-medium",hidden:"invisible",month:"w-full",month_caption:"relative mx-(--cell-size) px-1 mb-1 flex h-(--cell-size) items-center justify-center z-2",months:"relative flex flex-col sm:flex-row gap-2",nav:"absolute top-0 flex w-full justify-between z-1",outside:"text-muted-foreground data-selected:bg-accent/50 data-selected:text-muted-foreground",range_end:"range-end",range_middle:"range-middle",range_start:"range-start",today:"*:after:pointer-events-none *:after:absolute *:after:bottom-1 *:after:start-1/2 *:after:z-1 *:after:size-[3px] *:after:-translate-x-1/2 *:after:rounded-full *:after:bg-primary [&[data-selected]:not(.range-middle)>*]:after:bg-background [&[data-disabled]>*]:after:bg-foreground/30 *:after:transition-colors",week_number:"size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72",weekday:"size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72"},z=Object.keys(g).reduce((t,n)=>{const a=c?.[n],p=g[n];return t[n]=a?o.cn(p,a):p,t},{...g}),y={...{Dropdown:D,Chevron:({className:t,orientation:n,...a})=>n==="left"?s.jsx(d.ChevronLeftIcon,{className:o.cn(t,"rtl:rotate-180"),...a,"aria-hidden":"true"}):n==="right"?s.jsx(d.ChevronRightIcon,{className:o.cn(t,"rtl:rotate-180"),...a,"aria-hidden":"true"}):s.jsx(d.ChevronDownIcon,{className:t,...a,"aria-hidden":"true"})},...i},_={className:o.cn("w-fit [--cell-size:--spacing(10)] sm:[--cell-size:--spacing(9)]","rounded-xl border bg-background","in-data-[slot=popover-popup]:rounded-none in-data-[slot=popover-popup]:border-0 in-data-[slot=popover-popup]:bg-transparent in-data-[slot=popover-popup]:p-0",l),classNames:z,components:y,"data-slot":"calendar",formatters:{formatMonthDropdown:t=>t.toLocaleString("es",{month:"short"})},locale:w.es,weekStartsOn:1,captionLayout:e,startMonth:x,endMonth:v,mode:u,showOutsideDays:r,...h};return s.jsx(C.DayPicker,{..._})}exports.Calendar=k;
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { es as
|
|
4
|
-
import { ChevronLeftIcon as
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { es as w } from "date-fns/locale";
|
|
4
|
+
import { ChevronLeftIcon as y, ChevronRightIcon as C, ChevronDownIcon as g } from "lucide-react";
|
|
5
5
|
import { DayPicker as N } from "react-day-picker";
|
|
6
|
-
import { Select as D } from "../select/select.es.js";
|
|
7
|
-
import { cn as
|
|
8
|
-
const f = (/* @__PURE__ */ new Date()).getFullYear(),
|
|
6
|
+
import { Select as D, selectTriggerIconClassName as k } from "../select/select.es.js";
|
|
7
|
+
import { cn as r } from "../../lib/cn.es.js";
|
|
8
|
+
const f = (/* @__PURE__ */ new Date()).getFullYear(), T = new Date(f - 100, 0), j = new Date(f + 100, 11);
|
|
9
9
|
function S({
|
|
10
10
|
options: d = [],
|
|
11
11
|
value: l,
|
|
12
|
-
onChange:
|
|
12
|
+
onChange: s
|
|
13
13
|
}) {
|
|
14
14
|
const i = d.map((e) => ({
|
|
15
15
|
label: e.label ?? "",
|
|
16
16
|
value: e.value ?? 0
|
|
17
17
|
})), c = i.find((e) => e.value === Number(l)) ?? null;
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ o(
|
|
19
19
|
D,
|
|
20
20
|
{
|
|
21
21
|
items: i,
|
|
22
22
|
value: c,
|
|
23
|
+
icon: /* @__PURE__ */ o(g, { className: k }),
|
|
23
24
|
"aria-invalid": !1,
|
|
24
|
-
className: "py-1 h-7",
|
|
25
|
+
className: "py-1 h-7 border-none font-medium! w-fit! [&>span]:capitalize",
|
|
25
26
|
getLabel: (e) => e.label,
|
|
26
27
|
getId: (e) => String(e.value),
|
|
27
28
|
onValueChange: (e) => {
|
|
28
|
-
!
|
|
29
|
+
!s || e === null || s({
|
|
29
30
|
target: { value: String(e.value) }
|
|
30
31
|
});
|
|
31
32
|
}
|
|
@@ -33,23 +34,23 @@ function S({
|
|
|
33
34
|
);
|
|
34
35
|
}
|
|
35
36
|
const m = "relative flex size-(--cell-size) text-base sm:text-sm items-center justify-center rounded-lg text-foreground not-in-data-selected:hover:bg-accent disabled:pointer-events-none disabled:opacity-64 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0";
|
|
36
|
-
function
|
|
37
|
+
function P({
|
|
37
38
|
className: d,
|
|
38
39
|
classNames: l,
|
|
39
|
-
showOutsideDays:
|
|
40
|
+
showOutsideDays: s = !0,
|
|
40
41
|
components: i,
|
|
41
42
|
mode: c = "single",
|
|
42
43
|
captionLayout: e = "dropdown",
|
|
43
|
-
startMonth:
|
|
44
|
-
endMonth:
|
|
45
|
-
...
|
|
44
|
+
startMonth: b = T,
|
|
45
|
+
endMonth: x = j,
|
|
46
|
+
...v
|
|
46
47
|
}) {
|
|
47
48
|
const u = {
|
|
48
49
|
button_next: m,
|
|
49
50
|
button_previous: m,
|
|
50
51
|
caption_label: "text-base sm:text-sm font-medium flex items-center gap-2 h-full",
|
|
51
52
|
day: "size-(--cell-size) text-sm py-px",
|
|
52
|
-
day_button:
|
|
53
|
+
day_button: r(
|
|
53
54
|
m,
|
|
54
55
|
"in-data-disabled:pointer-events-none in-[.range-middle]:rounded-none in-[.range-end:not(.range-start)]:rounded-s-none in-[.range-start:not(.range-end)]:rounded-e-none in-[.range-middle]:in-data-selected:bg-accent in-data-selected:bg-primary in-[.range-middle]:in-data-selected:text-foreground in-data-disabled:text-muted-foreground/72 in-data-outside:text-muted-foreground/72 in-data-selected:in-data-outside:text-primary-foreground in-data-selected:text-primary-foreground in-data-disabled:line-through outline-none in-[[data-selected]:not(.range-middle)]:transition-[color,background-color,border-radius,box-shadow] focus-visible:z-1 focus-visible:ring-[3px] focus-visible:ring-ring/50"
|
|
55
56
|
),
|
|
@@ -68,72 +69,70 @@ function M({
|
|
|
68
69
|
today: "*:after:pointer-events-none *:after:absolute *:after:bottom-1 *:after:start-1/2 *:after:z-1 *:after:size-[3px] *:after:-translate-x-1/2 *:after:rounded-full *:after:bg-primary [&[data-selected]:not(.range-middle)>*]:after:bg-background [&[data-disabled]>*]:after:bg-foreground/30 *:after:transition-colors",
|
|
69
70
|
week_number: "size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72",
|
|
70
71
|
weekday: "size-(--cell-size) p-0 text-xs font-medium text-muted-foreground/72"
|
|
71
|
-
},
|
|
72
|
+
}, h = Object.keys(
|
|
72
73
|
u
|
|
73
74
|
).reduce(
|
|
74
75
|
(t, n) => {
|
|
75
|
-
const a = l?.[n],
|
|
76
|
-
return t[n] = a ?
|
|
76
|
+
const a = l?.[n], p = u[n];
|
|
77
|
+
return t[n] = a ? r(p, a) : p, t;
|
|
77
78
|
},
|
|
78
79
|
{ ...u }
|
|
79
|
-
),
|
|
80
|
+
), z = {
|
|
80
81
|
...{
|
|
81
82
|
Dropdown: S,
|
|
82
83
|
Chevron: ({
|
|
83
84
|
className: t,
|
|
84
85
|
orientation: n,
|
|
85
86
|
...a
|
|
86
|
-
}) => n === "left" ? /* @__PURE__ */
|
|
87
|
-
w,
|
|
88
|
-
{
|
|
89
|
-
className: s(t, "rtl:rotate-180"),
|
|
90
|
-
...a,
|
|
91
|
-
"aria-hidden": "true"
|
|
92
|
-
}
|
|
93
|
-
) : n === "right" ? /* @__PURE__ */ r(
|
|
87
|
+
}) => n === "left" ? /* @__PURE__ */ o(
|
|
94
88
|
y,
|
|
95
89
|
{
|
|
96
|
-
className:
|
|
90
|
+
className: r(t, "rtl:rotate-180"),
|
|
97
91
|
...a,
|
|
98
92
|
"aria-hidden": "true"
|
|
99
93
|
}
|
|
100
|
-
) : /* @__PURE__ */
|
|
94
|
+
) : n === "right" ? /* @__PURE__ */ o(
|
|
101
95
|
C,
|
|
102
96
|
{
|
|
103
|
-
className: t,
|
|
97
|
+
className: r(t, "rtl:rotate-180"),
|
|
104
98
|
...a,
|
|
105
99
|
"aria-hidden": "true"
|
|
106
100
|
}
|
|
107
|
-
)
|
|
101
|
+
) : /* @__PURE__ */ o(g, { className: t, ...a, "aria-hidden": "true" })
|
|
108
102
|
},
|
|
109
103
|
...i
|
|
110
|
-
},
|
|
111
|
-
className:
|
|
104
|
+
}, _ = {
|
|
105
|
+
className: r(
|
|
112
106
|
"w-fit [--cell-size:--spacing(10)] sm:[--cell-size:--spacing(9)]",
|
|
107
|
+
// Standalone container surface. Inside a popover (DatePicker) the
|
|
108
|
+
// popup already paints border + background + padding, so strip ours
|
|
109
|
+
// to avoid a double border.
|
|
110
|
+
"rounded-xl border bg-background",
|
|
111
|
+
"in-data-[slot=popover-popup]:rounded-none in-data-[slot=popover-popup]:border-0 in-data-[slot=popover-popup]:bg-transparent in-data-[slot=popover-popup]:p-0",
|
|
113
112
|
d
|
|
114
113
|
),
|
|
115
|
-
classNames:
|
|
116
|
-
components:
|
|
114
|
+
classNames: h,
|
|
115
|
+
components: z,
|
|
117
116
|
"data-slot": "calendar",
|
|
118
117
|
formatters: {
|
|
119
118
|
formatMonthDropdown: (t) => t.toLocaleString("es", { month: "short" })
|
|
120
119
|
},
|
|
121
|
-
locale:
|
|
120
|
+
locale: w,
|
|
122
121
|
weekStartsOn: 1,
|
|
123
122
|
captionLayout: e,
|
|
124
|
-
startMonth:
|
|
125
|
-
endMonth:
|
|
123
|
+
startMonth: b,
|
|
124
|
+
endMonth: x,
|
|
126
125
|
mode: c,
|
|
127
|
-
showOutsideDays:
|
|
128
|
-
...
|
|
126
|
+
showOutsideDays: s,
|
|
127
|
+
...v
|
|
129
128
|
};
|
|
130
|
-
return /* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ o(
|
|
131
130
|
N,
|
|
132
131
|
{
|
|
133
|
-
...
|
|
132
|
+
..._
|
|
134
133
|
}
|
|
135
134
|
);
|
|
136
135
|
}
|
|
137
136
|
export {
|
|
138
|
-
|
|
137
|
+
P as Calendar
|
|
139
138
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),k=require("@radix-ui/react-use-controllable-state"),i=require("date-fns"),H=require("lucide-react"),E=require("react"),U=require("./date-picker.utils.cjs.js"),_=require("./use-date-input.cjs.js"),z=require("./use-date-input-popover.cjs.js"),A=require("./use-hidden-field-value.cjs.js"),d=require("../popover/popover.cjs.js"),v=require("../field/field.cjs.js"),G=require("../calendar/calendar.cjs.js"),J=require("../../lib/cn.cjs.js"),L=require("../input/input.cjs.js"),Q=m=>{const{placeholder:u,value:y,onValueChange:b,defaultValue:C,autoComplete:D,className:x,disabledDate:r,renderFooter:j,disabled:o,onBlur:q,required:I,...P}=m,[a,c]=k.useControllableState({prop:y,onChange:e=>b?.(e??null),defaultProp:C??null}),w=a?i.format(a,"yyyy-MM-dd"):"",N=A.useHiddenFieldValue(w),{inputValue:p,handleChange:S,handleBlur:F,handleKeyDown:R,clear:T,setFromExternalDate:n}=_.useDateInput({date:a??null,onDateChange:e=>c(e),disabledDate:r}),{open:K,setOpen:h,handleInputKeyDown:M,inputRef:l}=z.useDateInputPopover({disabled:o}),[V,f]=E.useState(void 0),B=e=>{if(e){const s=U.parseInputToDate(p);f(s??a??void 0)}h(e)},O=e=>{R(e),M(e)},g=j?.({value:a??null,clear:()=>{n(null),T()},selectToday:()=>{const e=new Date;r?.(e)||n(e)},setValue:e=>{const s=e&&i.isDate(e)?e:null;c(s),n(s)}});return t.jsxs(d.PopoverRoot,{"data-slot":"date-input",open:K,onOpenChange:B,children:[t.jsxs("div",{className:J.cn(L.inputBaseClasses,"relative flex items-center gap-2 h-8","has-[:focus-visible]:border-ring","aria-invalid:border-error has-[:focus-visible]:aria-invalid:ring-error/20","has-aria-invalid:border-error has-[:focus-visible]:has-aria-invalid:border-error has-[:focus-visible]:has-aria-invalid:ring-error/20","has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50",!a&&"text-muted-foreground",x,"field-error"),"data-slot":"date-input-trigger",onClick:e=>{e.target===e.currentTarget&&l.current?.focus()},children:[t.jsx(v.FieldControl,{render:t.jsx("input",{ref:N,type:"text",className:"sr-only",tabIndex:-1,"aria-hidden":"true",required:I,disabled:o,onFocus:()=>l.current?.focus()})}),t.jsx("input",{type:"text",value:p,onChange:S,onBlur:e=>{F(),q?.(e)},onKeyDown:O,placeholder:u??"dd/mm/aaaa",autoComplete:D??"off",disabled:o,className:"flex-1 min-w-0 bg-transparent outline-none text-start truncate pt-px","aria-label":u,ref:l,...P}),t.jsxs(d.PopoverTrigger,{type:"button",disabled:o,"data-slot":"date-input-calendar-trigger",className:"flex shrink-0 items-center justify-center text-muted-foreground hover:text-foreground",children:[t.jsx(H.CalendarIcon,{"data-slot":"date-input-icon"}),t.jsx("span",{className:"sr-only",children:"Seleccionar fecha"})]})]}),t.jsx(d.PopoverPopup,{className:"w-auto p-0",align:"start","data-slot":"date-input-content",children:t.jsxs(v.FieldRoot,{className:"contents",children:[t.jsx(G.Calendar,{className:"border-none",mode:"single",month:V,onMonthChange:f,selected:a??void 0,onSelect:e=>{if(!e||!i.isDate(e)){n(null);return}r?.(e)||(n(e),h(!1))},disabled:r}),g&&t.jsx("div",{className:"p-2","data-slot":"date-input-footer",children:g})]})})]})};exports.DateInput=Q;
|
|
@@ -1,168 +1,188 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useControllableState as
|
|
4
|
-
import { format as
|
|
5
|
-
import { CalendarIcon as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
2
|
+
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { useControllableState as k } from "@radix-ui/react-use-controllable-state";
|
|
4
|
+
import { format as q, isDate as h } from "date-fns";
|
|
5
|
+
import { CalendarIcon as E } from "lucide-react";
|
|
6
|
+
import { useState as H } from "react";
|
|
7
|
+
import { parseInputToDate as z } from "./date-picker.utils.es.js";
|
|
8
|
+
import { useDateInput as A } from "./use-date-input.es.js";
|
|
9
|
+
import { useDateInputPopover as G } from "./use-date-input-popover.es.js";
|
|
10
|
+
import { useHiddenFieldValue as J } from "./use-hidden-field-value.es.js";
|
|
11
|
+
import { PopoverRoot as L, PopoverTrigger as Q, PopoverPopup as U } from "../popover/popover.es.js";
|
|
12
|
+
import { FieldControl as W, FieldRoot as X } from "../field/field.es.js";
|
|
13
|
+
import { Calendar as Y } from "../calendar/calendar.es.js";
|
|
14
|
+
import { cn as Z } from "../../lib/cn.es.js";
|
|
15
|
+
import { inputBaseClasses as _ } from "../input/input.es.js";
|
|
16
|
+
const he = (g) => {
|
|
15
17
|
const {
|
|
16
|
-
placeholder:
|
|
17
|
-
value:
|
|
18
|
-
onValueChange:
|
|
19
|
-
defaultValue:
|
|
20
|
-
autoComplete:
|
|
21
|
-
className:
|
|
22
|
-
disabledDate:
|
|
23
|
-
renderFooter:
|
|
18
|
+
placeholder: d,
|
|
19
|
+
value: v,
|
|
20
|
+
onValueChange: y,
|
|
21
|
+
defaultValue: C,
|
|
22
|
+
autoComplete: b,
|
|
23
|
+
className: D,
|
|
24
|
+
disabledDate: r,
|
|
25
|
+
renderFooter: w,
|
|
24
26
|
disabled: n,
|
|
25
|
-
onBlur:
|
|
26
|
-
required:
|
|
27
|
-
...
|
|
28
|
-
} =
|
|
29
|
-
prop:
|
|
30
|
-
onChange: (e) =>
|
|
31
|
-
defaultProp:
|
|
32
|
-
}),
|
|
33
|
-
inputValue:
|
|
27
|
+
onBlur: x,
|
|
28
|
+
required: I,
|
|
29
|
+
...N
|
|
30
|
+
} = g, [o, u] = k({
|
|
31
|
+
prop: v,
|
|
32
|
+
onChange: (e) => y?.(e ?? null),
|
|
33
|
+
defaultProp: C ?? null
|
|
34
|
+
}), P = o ? q(o, "yyyy-MM-dd") : "", S = J(P), {
|
|
35
|
+
inputValue: c,
|
|
34
36
|
handleChange: F,
|
|
35
37
|
handleBlur: K,
|
|
36
|
-
handleKeyDown:
|
|
38
|
+
handleKeyDown: T,
|
|
37
39
|
clear: B,
|
|
38
40
|
setFromExternalDate: a
|
|
39
|
-
} =
|
|
40
|
-
date:
|
|
41
|
-
onDateChange: (e) =>
|
|
42
|
-
disabledDate:
|
|
41
|
+
} = A({
|
|
42
|
+
date: o ?? null,
|
|
43
|
+
onDateChange: (e) => u(e),
|
|
44
|
+
disabledDate: r
|
|
43
45
|
}), {
|
|
44
|
-
open:
|
|
45
|
-
setOpen:
|
|
46
|
+
open: M,
|
|
47
|
+
setOpen: p,
|
|
46
48
|
handleInputKeyDown: V,
|
|
47
|
-
inputRef:
|
|
48
|
-
} =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
inputRef: i
|
|
50
|
+
} = G({ disabled: n }), [R, m] = H(
|
|
51
|
+
void 0
|
|
52
|
+
), j = (e) => {
|
|
53
|
+
if (e) {
|
|
54
|
+
const l = z(c);
|
|
55
|
+
m(l ?? o ?? void 0);
|
|
56
|
+
}
|
|
57
|
+
p(e);
|
|
58
|
+
}, O = (e) => {
|
|
59
|
+
T(e), V(e);
|
|
60
|
+
}, f = w?.({
|
|
61
|
+
value: o ?? null,
|
|
52
62
|
clear: () => {
|
|
53
63
|
a(null), B();
|
|
54
64
|
},
|
|
55
65
|
selectToday: () => {
|
|
56
66
|
const e = /* @__PURE__ */ new Date();
|
|
57
|
-
|
|
67
|
+
r?.(e) || a(e);
|
|
58
68
|
},
|
|
59
69
|
setValue: (e) => {
|
|
60
|
-
const
|
|
61
|
-
|
|
70
|
+
const l = e && h(e) ? e : null;
|
|
71
|
+
u(l), a(l);
|
|
62
72
|
}
|
|
63
73
|
});
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{
|
|
87
|
-
|
|
74
|
+
return /* @__PURE__ */ s(
|
|
75
|
+
L,
|
|
76
|
+
{
|
|
77
|
+
"data-slot": "date-input",
|
|
78
|
+
open: M,
|
|
79
|
+
onOpenChange: j,
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ s(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
className: Z(
|
|
85
|
+
_,
|
|
86
|
+
"relative flex items-center gap-2 h-8",
|
|
87
|
+
"has-[:focus-visible]:border-ring",
|
|
88
|
+
"aria-invalid:border-error has-[:focus-visible]:aria-invalid:ring-error/20",
|
|
89
|
+
"has-aria-invalid:border-error has-[:focus-visible]:has-aria-invalid:border-error has-[:focus-visible]:has-aria-invalid:ring-error/20",
|
|
90
|
+
"has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50",
|
|
91
|
+
!o && "text-muted-foreground",
|
|
92
|
+
D,
|
|
93
|
+
"field-error"
|
|
94
|
+
),
|
|
95
|
+
"data-slot": "date-input-trigger",
|
|
96
|
+
onClick: (e) => {
|
|
97
|
+
e.target === e.currentTarget && i.current?.focus();
|
|
98
|
+
},
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ t(
|
|
101
|
+
W,
|
|
102
|
+
{
|
|
103
|
+
render: /* @__PURE__ */ t(
|
|
104
|
+
"input",
|
|
105
|
+
{
|
|
106
|
+
ref: S,
|
|
107
|
+
type: "text",
|
|
108
|
+
className: "sr-only",
|
|
109
|
+
tabIndex: -1,
|
|
110
|
+
"aria-hidden": "true",
|
|
111
|
+
required: I,
|
|
112
|
+
disabled: n,
|
|
113
|
+
onFocus: () => i.current?.focus()
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
),
|
|
118
|
+
/* @__PURE__ */ t(
|
|
88
119
|
"input",
|
|
89
120
|
{
|
|
90
|
-
ref: P,
|
|
91
121
|
type: "text",
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
122
|
+
value: c,
|
|
123
|
+
onChange: F,
|
|
124
|
+
onBlur: (e) => {
|
|
125
|
+
K(), x?.(e);
|
|
126
|
+
},
|
|
127
|
+
onKeyDown: O,
|
|
128
|
+
placeholder: d ?? "dd/mm/aaaa",
|
|
129
|
+
autoComplete: b ?? "off",
|
|
130
|
+
disabled: n,
|
|
131
|
+
className: "flex-1 min-w-0 bg-transparent outline-none text-start truncate pt-px",
|
|
132
|
+
"aria-label": d,
|
|
133
|
+
ref: i,
|
|
134
|
+
...N
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
/* @__PURE__ */ s(
|
|
138
|
+
Q,
|
|
139
|
+
{
|
|
140
|
+
type: "button",
|
|
96
141
|
disabled: n,
|
|
97
|
-
|
|
142
|
+
"data-slot": "date-input-calendar-trigger",
|
|
143
|
+
className: "flex shrink-0 items-center justify-center text-muted-foreground hover:text-foreground",
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ t(E, { "data-slot": "date-input-icon" }),
|
|
146
|
+
/* @__PURE__ */ t("span", { className: "sr-only", children: "Seleccionar fecha" })
|
|
147
|
+
]
|
|
98
148
|
}
|
|
99
149
|
)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"data-slot": "date-input-calendar-trigger",
|
|
127
|
-
className: "flex shrink-0 items-center justify-center text-muted-foreground hover:text-foreground",
|
|
128
|
-
children: [
|
|
129
|
-
/* @__PURE__ */ t(M, { "data-slot": "date-input-icon" }),
|
|
130
|
-
/* @__PURE__ */ t("span", { className: "sr-only", children: "Seleccionar fecha" })
|
|
131
|
-
]
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
),
|
|
137
|
-
/* @__PURE__ */ t(
|
|
138
|
-
A,
|
|
139
|
-
{
|
|
140
|
-
className: "w-auto p-0",
|
|
141
|
-
align: "start",
|
|
142
|
-
"data-slot": "date-input-content",
|
|
143
|
-
children: /* @__PURE__ */ l(J, { className: "contents", children: [
|
|
144
|
-
/* @__PURE__ */ t(
|
|
145
|
-
L,
|
|
146
|
-
{
|
|
147
|
-
className: "border-none",
|
|
148
|
-
mode: "single",
|
|
149
|
-
selected: r ?? void 0,
|
|
150
|
-
onSelect: (e) => {
|
|
151
|
-
if (!e || !m(e)) {
|
|
152
|
-
a(null);
|
|
153
|
-
return;
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
/* @__PURE__ */ t(
|
|
154
|
+
U,
|
|
155
|
+
{
|
|
156
|
+
className: "w-auto p-0",
|
|
157
|
+
align: "start",
|
|
158
|
+
"data-slot": "date-input-content",
|
|
159
|
+
children: /* @__PURE__ */ s(X, { className: "contents", children: [
|
|
160
|
+
/* @__PURE__ */ t(
|
|
161
|
+
Y,
|
|
162
|
+
{
|
|
163
|
+
className: "border-none",
|
|
164
|
+
mode: "single",
|
|
165
|
+
month: R,
|
|
166
|
+
onMonthChange: m,
|
|
167
|
+
selected: o ?? void 0,
|
|
168
|
+
onSelect: (e) => {
|
|
169
|
+
if (!e || !h(e)) {
|
|
170
|
+
a(null);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
r?.(e) || (a(e), p(!1));
|
|
174
|
+
},
|
|
175
|
+
disabled: r
|
|
154
176
|
}
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
)
|
|
164
|
-
] });
|
|
177
|
+
),
|
|
178
|
+
f && /* @__PURE__ */ t("div", { className: "p-2", "data-slot": "date-input-footer", children: f })
|
|
179
|
+
] })
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
);
|
|
165
185
|
};
|
|
166
186
|
export {
|
|
167
|
-
|
|
187
|
+
he as DateInput
|
|
168
188
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),M=require("@radix-ui/react-use-controllable-state"),f=require("lucide-react"),h=require("react"),S=require("./pagination.model.cjs.js"),
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),M=require("@radix-ui/react-use-controllable-state"),f=require("lucide-react"),h=require("react"),S=require("./pagination.model.cjs.js"),I=require("../../hooks/use-range-pagination/use-range-pagination.cjs.js"),l=require("../../lib/cn.cjs.js"),C=require("../button/button.cjs.js"),A={goToFirst:"Ir a primera página",goToPrevious:"Ir a página anterior",goToNext:"Ir a próxima página",goToLast:"Ir a última página",goToPage:a=>`Ir a la página ${a}`,total:a=>`${a} resultados`,pageInfo:(a,n)=>`Página ${a} de ${n}`,range:(a,n,t)=>`${a} - ${n} de ${t}`,morePages:"Más páginas"},L=h.createContext(null);function c(){const a=h.useContext(L);if(!a)throw new Error("Pagination primitives must be used inside <PaginationRoot>");return a}function z({totalItems:a,pageSize:n,defaultPageSize:t=S.PAGINATION_SIZES[0],onPageSizeChange:i,currentPage:o,defaultCurrentPage:s=1,onCurrentPageChange:r,siblingCount:g=1,getPageHref:p,linkComponent:j="a",texts:v,className:N,children:b,...x}){const[P=t,d]=M.useControllableState({prop:n,defaultProp:t,onChange:i}),u=I.useRangePagination({totalItems:a,pageSize:P,page:o,defaultPage:s,onPageChange:r,siblingCount:g}),T=h.useMemo(()=>({...A,...v}),[v]),F=h.useMemo(()=>({...u,currentPage:u.page,maxPage:u.pageCount,pageSize:P,totalItems:a,setPageSize:d,getPageHref:p,linkComponent:j,texts:T}),[u,P,a,d,p,j,T]);return e.jsx(L.Provider,{value:F,children:e.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:l.cn("flex items-center gap-x-4",N),...x,children:b})})}function m({page:a,isActive:n,disabled:t,ariaLabel:i,dataSlot:o,children:s,className:r,buttonProps:g}){const{goTo:p,getPageHref:j,pageSize:v,linkComponent:N}=c(),b=N,x=j?.({page:a,pageSize:Number(v)}),P=!!x&&!t,d=()=>{t||p(a)},u={"data-slot":o,"data-active":n?"true":"false","aria-current":n?"page":void 0,"aria-label":i,className:l.cn("hover:bg-accent hover:text-accent-foreground",r)};return P&&x?e.jsx(C.Button,{variant:n?"outline":"ghost",size:"icon",nativeButton:!1,render:e.jsx(b,{href:x,onClick:d,children:s}),...u,...g}):e.jsx(C.Button,{variant:n?"outline":"ghost",size:"icon",disabled:t,onClick:d,...u,...g,children:s})}function R({page:a,isActive:n,className:t,children:i,buttonProps:o}){const{currentPage:s,texts:r}=c(),g=n??a===s;return e.jsx(m,{page:a,isActive:g,ariaLabel:r.goToPage(a),dataSlot:"pagination-link",className:t,buttonProps:o,children:i??a})}function _({className:a,buttonProps:n,children:t}){const{isFirstPage:i,texts:o}=c();return e.jsx(m,{page:1,disabled:i,ariaLabel:o.goToFirst,dataSlot:"pagination-first",className:a,buttonProps:n,children:t??e.jsx(f.ChevronsLeft,{"data-slot":"pagination-icon"})})}function k({className:a,buttonProps:n,children:t}){const{currentPage:i,isFirstPage:o,texts:s}=c();return e.jsx(m,{page:Math.max(1,i-1),disabled:o,ariaLabel:s.goToPrevious,dataSlot:"pagination-previous",className:a,buttonProps:n,children:t??e.jsx(f.ChevronLeft,{"data-slot":"pagination-icon"})})}function q({className:a,buttonProps:n,children:t}){const{currentPage:i,maxPage:o,isLastPage:s,texts:r}=c();return e.jsx(m,{page:Math.min(o,i+1),disabled:s,ariaLabel:r.goToNext,dataSlot:"pagination-next",className:a,buttonProps:n,children:t??e.jsx(f.ChevronRight,{"data-slot":"pagination-icon"})})}function B({className:a,buttonProps:n,children:t}){const{maxPage:i,isLastPage:o,texts:s}=c();return e.jsx(m,{page:i,disabled:o,ariaLabel:s.goToLast,dataSlot:"pagination-last",className:a,buttonProps:n,children:t??e.jsx(f.ChevronsRight,{"data-slot":"pagination-icon"})})}function E({className:a,...n}){const{texts:t}=c();return e.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis","data-dots":"true",className:l.cn("flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",a),...n,children:[e.jsx(f.MoreHorizontal,{}),e.jsx("span",{className:"sr-only",children:t.morePages})]})}function O({className:a,linkClassName:n,ellipsisClassName:t}){const{paginationRange:i}=c();return e.jsx("div",{role:"list","data-slot":"pagination-pages",className:l.cn("flex items-center gap-1",a),children:i.map((o,s)=>o===I.DOTS?e.jsx(E,{className:t},`dots-${s}`):e.jsx(R,{page:o,className:n},o))})}function w({children:a,className:n,...t}){const{totalItems:i,texts:o}=c(),s=typeof a=="function"?a(i):a??o.total(i);return e.jsx("span",{"data-slot":"pagination-total",className:l.cn("text-sm",n),...t,children:s})}function G({children:a,className:n,...t}){const{currentPage:i,maxPage:o,texts:s}=c(),r=typeof a=="function"?a({page:i,max:o}):a??s.pageInfo(i,o);return e.jsx("span",{"data-slot":"pagination-page-info",className:l.cn("text-sm",n),...t,children:r})}function $({children:a,className:n,...t}){const{range:i,totalItems:o,texts:s}=c(),r=typeof a=="function"?a({...i,total:o}):a??s.range(i.start,i.end,o);return e.jsx("span",{"data-slot":"pagination-range",className:l.cn("text-sm",n),...t,children:r})}function y({sizes:a=S.PAGINATION_SIZES,className:n,...t}){const{pageSize:i,setPageSize:o,goTo:s}=c(),r=g=>{const p=Number(g.target.value);o(p),s(1)};return e.jsx("select",{"data-slot":"pagination-size-select",value:i,onChange:r,className:l.cn("border border-input rounded-md w-fit min-w-[3rem] bg-background p-2 ring-offset-background","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n),...t,children:a.map(g=>e.jsx("option",{value:g,"data-slot":"pagination-size-option",children:g},g))})}function Z({sizes:a=S.PAGINATION_SIZES,selectClassName:n,rangeClassName:t,previousClassName:i,nextClassName:o,className:s,...r}){return e.jsxs(z,{className:s,...r,children:[a&&e.jsx(y,{sizes:a,className:n}),e.jsx($,{className:t}),e.jsx(k,{className:i}),e.jsx(q,{className:o})]})}exports.Pagination=Z;exports.PaginationEllipsis=E;exports.PaginationFirst=_;exports.PaginationLast=B;exports.PaginationLink=R;exports.PaginationNext=q;exports.PaginationPageInfo=G;exports.PaginationPages=O;exports.PaginationPrevious=k;exports.PaginationRange=$;exports.PaginationRoot=z;exports.PaginationSizeSelect=y;exports.PaginationTotal=w;
|