@sth87/shadcn-design-system 0.2.12 → 0.3.1
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/README.md +2 -3
- package/dist/AI_CONTEXT.md +4 -4
- package/dist/cjs/components/Calendar/Calendar.cjs +1 -1
- package/dist/cjs/components/Calendar/index.cjs +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/cjs/components/Checkbox/Confetti.cjs +1 -0
- package/dist/cjs/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/cjs/components/DatePicker/RangePicker.cjs +1 -1
- package/dist/cjs/components/DatePicker/TimePicker.cjs +1 -1
- package/dist/cjs/components/Slider/Slider.cjs +1 -1
- package/dist/cjs/components/Slider/SpecSliderLabel.cjs +1 -0
- package/dist/cjs/components/Table/TableFilter/data-table-filter-popover.cjs +1 -1
- package/dist/cjs/components/Tabs/Tabs.cjs +1 -1
- package/dist/cjs/components/Tooltip/SpecTooltip.cjs +1 -0
- package/dist/cjs/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/packages/ui/src/components/calendar-logic.cjs +1 -0
- package/dist/cjs/packages/ui/src/components/calendar.cjs +1 -1
- package/dist/cjs/styles/index.css +1 -1
- package/dist/cjs/utils/animations.cjs +1 -1
- package/dist/cjs/utils/date-format.cjs +1 -0
- package/dist/esm/components/Calendar/Calendar.js +23 -19
- package/dist/esm/components/Calendar/index.js +7 -3
- package/dist/esm/components/Checkbox/Checkbox.js +46 -44
- package/dist/esm/components/Checkbox/Confetti.js +28 -0
- package/dist/esm/components/DatePicker/DatePicker.js +78 -81
- package/dist/esm/components/DatePicker/RangePicker.js +121 -124
- package/dist/esm/components/DatePicker/TimePicker.js +122 -124
- package/dist/esm/components/Slider/Slider.js +140 -199
- package/dist/esm/components/Slider/SpecSliderLabel.js +60 -0
- package/dist/esm/components/Table/TableFilter/data-table-filter-popover.js +30 -26
- package/dist/esm/components/Tabs/Tabs.js +80 -91
- package/dist/esm/components/Tooltip/SpecTooltip.js +69 -0
- package/dist/esm/components/Tooltip/Tooltip.js +42 -85
- package/dist/esm/index.js +162 -158
- package/dist/esm/packages/ui/src/components/calendar-logic.js +83 -0
- package/dist/esm/packages/ui/src/components/calendar.js +459 -184
- package/dist/esm/styles/index.css +1 -1
- package/dist/esm/utils/animations.js +36 -44
- package/dist/esm/utils/date-format.js +162 -0
- package/dist/types/components/Calendar/Calendar.d.ts +5 -5
- package/dist/types/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/types/components/Calendar/index.d.ts +1 -1
- package/dist/types/components/Calendar/index.d.ts.map +1 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/types/components/Checkbox/Confetti.d.ts +2 -0
- package/dist/types/components/Checkbox/Confetti.d.ts.map +1 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/types/components/DatePicker/RangePicker.d.ts.map +1 -1
- package/dist/types/components/DatePicker/TimePicker.d.ts.map +1 -1
- package/dist/types/components/Marquee/Marquee.d.ts +1 -1
- package/dist/types/components/Slider/Slider.d.ts +1 -1
- package/dist/types/components/Slider/Slider.d.ts.map +1 -1
- package/dist/types/components/Slider/SpecSliderLabel.d.ts +14 -0
- package/dist/types/components/Slider/SpecSliderLabel.d.ts.map +1 -0
- package/dist/types/components/Table/TableFilter/data-table-filter-popover.d.ts.map +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/types/components/Tooltip/SpecTooltip.d.ts +11 -0
- package/dist/types/components/Tooltip/SpecTooltip.d.ts.map +1 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/components/Upload/Upload.d.ts +1 -1
- package/dist/types/packages/ui/src/components/badge.d.ts +2 -2
- package/dist/types/packages/ui/src/components/button.d.ts +1 -1
- package/dist/types/packages/ui/src/components/calendar-logic.d.ts +72 -0
- package/dist/types/packages/ui/src/components/calendar-logic.d.ts.map +1 -0
- package/dist/types/packages/ui/src/components/calendar.d.ts +95 -6
- package/dist/types/packages/ui/src/components/calendar.d.ts.map +1 -1
- package/dist/types/utils/animations.d.ts +0 -19
- package/dist/types/utils/animations.d.ts.map +1 -1
- package/dist/types/utils/date-format.d.ts +24 -0
- package/dist/types/utils/date-format.d.ts.map +1 -0
- package/package.json +2 -3
- package/dist/cjs/utils/css.cjs +0 -1
- package/dist/esm/utils/css.js +0 -24
- package/dist/types/utils/css.d.ts +0 -4
- package/dist/types/utils/css.d.ts.map +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -6,20 +6,20 @@ import { Stepper as i } from "./components/Stepper/index.js";
|
|
|
6
6
|
import { Pagination as d } from "./components/Pagination/index.js";
|
|
7
7
|
import { DropdownMenu as b } from "./components/DropdownMenu/index.js";
|
|
8
8
|
import { ContextMenu as T } from "./components/ContextMenu/index.js";
|
|
9
|
-
import { FloatingLabel as
|
|
9
|
+
import { FloatingLabel as C } from "./components/FloatLabel.js";
|
|
10
10
|
import { TimeGridView as I } from "./components/TimeGridView.js";
|
|
11
11
|
import { TimeColumnwheel as M } from "./components/WheelColumn.js";
|
|
12
12
|
import { Marquee as P } from "./components/Marquee/index.js";
|
|
13
13
|
import { cn as w } from "./packages/ui/src/lib/utils.js";
|
|
14
14
|
import { useCallbackRef as A } from "./hooks/use-callback-ref.js";
|
|
15
|
-
import { useDebouncedCallback as
|
|
16
|
-
import { useDebounceValue as
|
|
17
|
-
import { useIntersectionObserver as
|
|
18
|
-
import { useScript as
|
|
15
|
+
import { useDebouncedCallback as v } from "./hooks/use-debounced-callback.js";
|
|
16
|
+
import { useDebounceValue as L } from "./hooks/use-debounced-value.js";
|
|
17
|
+
import { useIntersectionObserver as y } from "./hooks/use-intersection-observer.js";
|
|
18
|
+
import { useScript as z } from "./hooks/use-script.js";
|
|
19
19
|
import { useScrollLock as O } from "./hooks/use-scroll-lock.js";
|
|
20
20
|
import { useOnClickOutside as Q } from "./hooks/use-on-click-outside.js";
|
|
21
|
-
import { useEventListener as
|
|
22
|
-
import { useIsomorphicLayoutEffect as
|
|
21
|
+
import { useEventListener as U } from "./hooks/use-event-listener.js";
|
|
22
|
+
import { useIsomorphicLayoutEffect as q } from "./hooks/use-isomorphic-layout-effect.js";
|
|
23
23
|
import { useMousePosition as j } from "./hooks/use-mouse-position.js";
|
|
24
24
|
import { useMediaQuery as K } from "./hooks/use-media-query.js";
|
|
25
25
|
import { useDataTable as Y } from "./hooks/use-data-table.js";
|
|
@@ -33,19 +33,19 @@ import { default as ie } from "./components/Dialog/Dialog.js";
|
|
|
33
33
|
import { default as de } from "./components/Glass/Glass.js";
|
|
34
34
|
import { default as be } from "./components/Input/Input.js";
|
|
35
35
|
import { default as Te } from "./components/InputOTP/InputOTP.js";
|
|
36
|
-
import { default as
|
|
36
|
+
import { default as Ce } from "./components/Radio/Radio.js";
|
|
37
37
|
import { ScrollArea as Ie } from "./components/ScrollArea/ScrollArea.js";
|
|
38
38
|
import { default as Me } from "./components/Select/Select.js";
|
|
39
39
|
import { default as Pe } from "./components/Separator/Separator.js";
|
|
40
40
|
import { default as we } from "./components/Sheet/Sheet.js";
|
|
41
41
|
import { default as Ae } from "./components/Skeleton/Skeleton.js";
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
42
|
+
import { default as ve } from "./components/Slider/Slider.js";
|
|
43
|
+
import { default as Le } from "./components/Switch/Switch.js";
|
|
44
|
+
import { default as ye } from "./components/Tabs/Tabs.js";
|
|
45
|
+
import { default as ze } from "./components/Textarea/Textarea.js";
|
|
46
46
|
import { default as Oe } from "./components/Toggle/Toggle.js";
|
|
47
47
|
import { default as Qe } from "./components/Rate/Rate.js";
|
|
48
|
-
import { Handle as
|
|
48
|
+
import { Handle as Ue, Panel as Ne, default as qe, ResizableWrapper as _e } from "./components/Resizable/Resizable.js";
|
|
49
49
|
import { default as Je } from "./components/Accordion/Accordion.js";
|
|
50
50
|
import { default as Xe } from "./lib/TextAnimation/BlurText.js";
|
|
51
51
|
import { default as Ze } from "./lib/TextAnimation/CircularText.js";
|
|
@@ -54,51 +54,52 @@ import { default as or } from "./lib/TextAnimation/TypingText.js";
|
|
|
54
54
|
import { Avatar as ar } from "./components/Avatar/Avatar.js";
|
|
55
55
|
import { ButtonGroupSeparator as fr, ButtonGroupText as mr } from "./packages/ui/src/components/button-group.js";
|
|
56
56
|
import { Calendar as lr, CalendarDayButton as ur } from "./components/Calendar/Calendar.js";
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
57
|
+
import { createCalendarLocale as sr, enUS as dr, vi as nr } from "./packages/ui/src/components/calendar-logic.js";
|
|
58
|
+
import { DatePicker as Sr } from "./components/DatePicker/DatePicker.js";
|
|
59
|
+
import { RangePicker as cr } from "./components/DatePicker/RangePicker.js";
|
|
60
|
+
import { TimePicker as gr } from "./components/DatePicker/TimePicker.js";
|
|
61
|
+
import { Label as Rr } from "./packages/ui/src/components/label.js";
|
|
62
|
+
import { useSidebar as Dr } from "./packages/ui/src/components/sidebar.js";
|
|
63
|
+
import { Sidebar as Gr, SidebarContent as wr, SidebarFooter as Br, SidebarGroup as Ar, SidebarGroupAction as kr, SidebarGroupContent as vr, SidebarGroupLabel as Fr, SidebarHeader as Lr, SidebarInput as Vr, SidebarInset as yr, SidebarMenu as hr, SidebarMenuAction as zr, SidebarMenuBadge as Er, SidebarMenuButton as Or, SidebarMenuItem as Hr, SidebarMenuSkeleton as Qr, SidebarMenuSub as Wr, SidebarMenuSubButton as Ur, SidebarMenuSubItem as Nr, SidebarProvider as qr, SidebarRail as _r, SidebarSeparator as jr, SidebarTrigger as Jr } from "./components/Sidebar/Sidebar.js";
|
|
64
|
+
import { toast as Xr, Toaster as Yr, toast as Zr } from "./components/Toast/Toast.js";
|
|
65
|
+
import { Tooltip as eo } from "./components/Tooltip/Tooltip.js";
|
|
66
|
+
import { Upload as oo } from "./components/Upload/Upload.js";
|
|
67
|
+
import { useQRCode as ao } from "./components/QrCode/QrCode.js";
|
|
68
|
+
import { useStepper as fo } from "./components/Stepper/Stepper.js";
|
|
69
|
+
import { DataTable as xo } from "./components/Table/data-table.js";
|
|
70
|
+
import { DataTableColumnHeader as uo } from "./components/Table/data-table-column-header.js";
|
|
71
|
+
import { DataTablePagination as so } from "./components/Table/data-table-pagination.js";
|
|
72
|
+
import { DataTableToolbar as bo } from "./components/Table/data-table-toolbar.js";
|
|
73
|
+
import { DataTableViewOptions as To } from "./components/Table/data-table-view-options.js";
|
|
74
|
+
import { selectColumn as Co } from "./components/Table/select-column.js";
|
|
75
|
+
import { DataTableDateFilter as Io } from "./components/Table/TableFilter/data-table-date-filter.js";
|
|
76
|
+
import { DataTableFilterPopover as Mo } from "./components/Table/TableFilter/data-table-filter-popover.js";
|
|
77
|
+
import { DataTableSliderFilter as Po } from "./components/Table/TableFilter/data-table-slider-filter.js";
|
|
78
|
+
import { TreeSelect as wo, TreeView as Bo } from "./components/TreeSelect/TreeSelect.js";
|
|
79
|
+
import { ResizableHandle as ko, ResizablePanel as vo, ResizablePanelGroup as Fo } from "./packages/ui/src/components/resizable.js";
|
|
80
|
+
import { AccordionContent as Vo, AccordionItem as yo, AccordionTrigger as ho } from "./packages/ui/src/components/accordion.js";
|
|
81
|
+
import { ImageViewer as Eo, ImageViewerGroup as Oo, ImageViewerImage as Ho } from "./components/ImageViewer/ImageViewer.js";
|
|
82
|
+
import { Carousel as Wo, CarouselSlide as Uo } from "./components/Carousel/Carousel.js";
|
|
83
|
+
import { Root as qo, Area as _o, Image as jo, Video as Jo, useCropper as Ko } from "./components/Cropper/Cropper.js";
|
|
84
|
+
import { CropperTool as Yo, useCropperTool as Zo } from "./components/Cropper/CropperTool.js";
|
|
85
|
+
import { base64ToBlob as et, base64ToFile as rt, downloadImage as ot, getCroppedImg as tt, rotateSize as at } from "./components/Cropper/utils.js";
|
|
86
|
+
import { Cursor as ft, CursorFollow as mt, CursorProvider as xt, TRANSITION_PRESETS as lt, useCursor as ut, useCursorFollow as it } from "./components/Interactive/CursorFollow.js";
|
|
87
|
+
import { Item as dt, MasonryItem as nt, MasonryRoot as bt, Root as St } from "./components/Masonry/Masonry.js";
|
|
88
|
+
import { Masonry as ct, MasonryComponent as Ct } from "./components/Masonry/MasonryWrapper.js";
|
|
89
|
+
import { RotatingText as It } from "./lib/TextAnimation/RotatingText.js";
|
|
90
|
+
import { FlipWords as Mt } from "./lib/TextAnimation/FlipWords.js";
|
|
91
|
+
import { GradientText as Pt } from "./lib/TextAnimation/GradientText.js";
|
|
92
|
+
import { RollingText as wt } from "./lib/TextAnimation/RollingText.js";
|
|
93
|
+
import { ShimmeringText as At } from "./lib/TextAnimation/ShimmeringText.js";
|
|
94
|
+
import { SplittingText as vt } from "./lib/TextAnimation/SplittingText.js";
|
|
95
|
+
import { TextGenerateEffect as Lt } from "./lib/TextAnimation/TextGenerateEffect.js";
|
|
96
|
+
import { TextHoverEffect as yt } from "./lib/TextAnimation/TextHoverEffect.js";
|
|
97
|
+
import { WritingText as zt } from "./lib/TextAnimation/WritingText.js";
|
|
97
98
|
export {
|
|
98
99
|
Je as Accordion,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
Vo as AccordionContent,
|
|
101
|
+
yo as AccordionItem,
|
|
102
|
+
ho as AccordionTrigger,
|
|
102
103
|
ar as Avatar,
|
|
103
104
|
$ as Badge,
|
|
104
105
|
Xe as BlurText,
|
|
@@ -109,142 +110,145 @@ export {
|
|
|
109
110
|
mr as ButtonGroupText,
|
|
110
111
|
lr as Calendar,
|
|
111
112
|
ur as CalendarDayButton,
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
Wo as Carousel,
|
|
114
|
+
Uo as CarouselSlide,
|
|
114
115
|
me as Checkbox,
|
|
115
116
|
Ze as CircularText,
|
|
116
117
|
le as Collapsible,
|
|
117
118
|
o as Command,
|
|
118
119
|
T as ContextMenu,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
120
|
+
qo as Cropper,
|
|
121
|
+
_o as CropperArea,
|
|
122
|
+
jo as CropperImage,
|
|
123
|
+
Yo as CropperTool,
|
|
124
|
+
Jo as CropperVideo,
|
|
125
|
+
ft as Cursor,
|
|
126
|
+
mt as CursorFollow,
|
|
127
|
+
xt as CursorProvider,
|
|
128
|
+
xo as DataTable,
|
|
129
|
+
uo as DataTableColumnHeader,
|
|
130
|
+
Io as DataTableDateFilter,
|
|
131
|
+
Mo as DataTableFilterPopover,
|
|
132
|
+
so as DataTablePagination,
|
|
133
|
+
Po as DataTableSliderFilter,
|
|
134
|
+
bo as DataTableToolbar,
|
|
135
|
+
To as DataTableViewOptions,
|
|
136
|
+
Sr as DatePicker,
|
|
136
137
|
ie as Dialog,
|
|
137
138
|
b as DropdownMenu,
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
Mt as FlipWords,
|
|
140
|
+
C as FloatingLabel,
|
|
140
141
|
de as Glass,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
Pt as GradientText,
|
|
143
|
+
Ue as Handle,
|
|
144
|
+
Eo as ImageViewer,
|
|
145
|
+
Oo as ImageViewerGroup,
|
|
146
|
+
Ho as ImageViewerImage,
|
|
146
147
|
be as Input,
|
|
147
148
|
Te as InputOTP,
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
dt as Item,
|
|
150
|
+
Rr as Label,
|
|
150
151
|
P as Marquee,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
ct as Masonry,
|
|
153
|
+
Ct as MasonryComponent,
|
|
154
|
+
nt as MasonryItem,
|
|
155
|
+
bt as MasonryRoot,
|
|
155
156
|
d as Pagination,
|
|
156
|
-
|
|
157
|
+
Ne as Panel,
|
|
157
158
|
a as Popover,
|
|
158
159
|
x as QRCode,
|
|
159
160
|
l as QrCode,
|
|
160
|
-
|
|
161
|
-
|
|
161
|
+
Ce as Radio,
|
|
162
|
+
cr as RangePicker,
|
|
162
163
|
Qe as Rate,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
qe as Resizable,
|
|
165
|
+
ko as ResizableHandle,
|
|
166
|
+
vo as ResizablePanel,
|
|
167
|
+
Fo as ResizablePanelGroup,
|
|
167
168
|
_e as ResizableWrapper,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
wt as RollingText,
|
|
170
|
+
St as Root,
|
|
171
|
+
It as RotatingText,
|
|
171
172
|
Ie as ScrollArea,
|
|
172
173
|
Me as Select,
|
|
173
174
|
Pe as Separator,
|
|
174
175
|
we as Sheet,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
176
|
+
At as ShimmeringText,
|
|
177
|
+
Gr as Sidebar,
|
|
178
|
+
wr as SidebarContent,
|
|
179
|
+
Br as SidebarFooter,
|
|
180
|
+
Ar as SidebarGroup,
|
|
181
|
+
kr as SidebarGroupAction,
|
|
182
|
+
vr as SidebarGroupContent,
|
|
183
|
+
Fr as SidebarGroupLabel,
|
|
184
|
+
Lr as SidebarHeader,
|
|
185
|
+
Vr as SidebarInput,
|
|
186
|
+
yr as SidebarInset,
|
|
187
|
+
hr as SidebarMenu,
|
|
188
|
+
zr as SidebarMenuAction,
|
|
189
|
+
Er as SidebarMenuBadge,
|
|
190
|
+
Or as SidebarMenuButton,
|
|
191
|
+
Hr as SidebarMenuItem,
|
|
192
|
+
Qr as SidebarMenuSkeleton,
|
|
193
|
+
Wr as SidebarMenuSub,
|
|
194
|
+
Ur as SidebarMenuSubButton,
|
|
195
|
+
Nr as SidebarMenuSubItem,
|
|
196
|
+
qr as SidebarProvider,
|
|
197
|
+
_r as SidebarRail,
|
|
198
|
+
jr as SidebarSeparator,
|
|
199
|
+
Jr as SidebarTrigger,
|
|
199
200
|
Ae as Skeleton,
|
|
200
|
-
|
|
201
|
-
|
|
201
|
+
ve as Slider,
|
|
202
|
+
vt as SplittingText,
|
|
202
203
|
i as Stepper,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
204
|
+
Le as Switch,
|
|
205
|
+
lt as TRANSITION_PRESETS,
|
|
206
|
+
ye as Tabs,
|
|
207
|
+
Lt as TextGenerateEffect,
|
|
208
|
+
yt as TextHoverEffect,
|
|
208
209
|
er as TextPressure,
|
|
209
|
-
|
|
210
|
+
ze as Textarea,
|
|
210
211
|
I as TimeGridView,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
gr as TimePicker,
|
|
213
|
+
Xr as Toast,
|
|
214
|
+
Yr as Toaster,
|
|
214
215
|
Oe as Toggle,
|
|
215
|
-
|
|
216
|
+
eo as Tooltip,
|
|
216
217
|
f as Tour,
|
|
217
|
-
|
|
218
|
-
|
|
218
|
+
wo as TreeSelect,
|
|
219
|
+
Bo as TreeView,
|
|
219
220
|
or as TypingText,
|
|
220
|
-
|
|
221
|
+
oo as Upload,
|
|
221
222
|
M as WheelColumn,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
zt as WritingText,
|
|
224
|
+
et as base64ToBlob,
|
|
225
|
+
rt as base64ToFile,
|
|
225
226
|
w as cn,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
227
|
+
sr as createCalendarLocale,
|
|
228
|
+
ot as downloadImage,
|
|
229
|
+
dr as enUSLocale,
|
|
230
|
+
tt as getCroppedImg,
|
|
231
|
+
at as rotateSize,
|
|
232
|
+
Co as selectColumn,
|
|
233
|
+
Zr as toast,
|
|
231
234
|
A as useCallbackRef,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
Ko as useCropper,
|
|
236
|
+
Zo as useCropperTool,
|
|
237
|
+
ut as useCursor,
|
|
238
|
+
it as useCursorFollow,
|
|
236
239
|
Y as useDataTable,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
L as useDebounceValue,
|
|
241
|
+
v as useDebouncedCallback,
|
|
242
|
+
U as useEventListener,
|
|
243
|
+
y as useIntersectionObserver,
|
|
244
|
+
q as useIsomorphicLayoutEffect,
|
|
242
245
|
K as useMediaQuery,
|
|
243
246
|
j as useMousePosition,
|
|
244
247
|
Q as useOnClickOutside,
|
|
245
|
-
|
|
246
|
-
|
|
248
|
+
ao as useQRCode,
|
|
249
|
+
z as useScript,
|
|
247
250
|
O as useScrollLock,
|
|
248
|
-
|
|
249
|
-
|
|
251
|
+
Dr as useSidebar,
|
|
252
|
+
fo as useStepper,
|
|
253
|
+
nr as viLocale
|
|
250
254
|
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import i from "dayjs";
|
|
2
|
+
const m = {
|
|
3
|
+
previousMonth: "Go to the previous month",
|
|
4
|
+
nextMonth: "Go to the next month",
|
|
5
|
+
selectMonth: "Select month",
|
|
6
|
+
selectYear: "Select year"
|
|
7
|
+
}, M = {
|
|
8
|
+
previousMonth: "Tháng trước",
|
|
9
|
+
nextMonth: "Tháng sau",
|
|
10
|
+
selectMonth: "Chọn tháng",
|
|
11
|
+
selectYear: "Chọn năm"
|
|
12
|
+
}, w = (t) => new Date(2021, t, 15), g = (t) => new Date(2021, 7, 1 + t);
|
|
13
|
+
function l(t, n, e = t.toLowerCase().startsWith("vi") ? M : m) {
|
|
14
|
+
return {
|
|
15
|
+
code: t,
|
|
16
|
+
weekStartsOn: n,
|
|
17
|
+
labels: e,
|
|
18
|
+
localize: {
|
|
19
|
+
month: (r, { width: o, context: s }) => {
|
|
20
|
+
const f = o === "wide" ? "long" : "short";
|
|
21
|
+
return new Intl.DateTimeFormat(t, { month: f }).format(w(r));
|
|
22
|
+
},
|
|
23
|
+
day: (r, { width: o }) => new Intl.DateTimeFormat(t, { weekday: o === "wide" ? "long" : "short" }).format(
|
|
24
|
+
g(r)
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const A = l("vi", 1), B = l("en-US", 0), a = (t, n) => i(t).isSame(n, "day");
|
|
30
|
+
function D(t, n) {
|
|
31
|
+
if (n === void 0 || n === !1) return !1;
|
|
32
|
+
if (n === !0) return !0;
|
|
33
|
+
if (Array.isArray(n))
|
|
34
|
+
return n.some((s) => D(t, s));
|
|
35
|
+
if (typeof n == "function") return n(t);
|
|
36
|
+
if (n instanceof Date) return a(t, n);
|
|
37
|
+
if ("dayOfWeek" in n) return n.dayOfWeek.includes(t.getDay());
|
|
38
|
+
const e = i(t);
|
|
39
|
+
if ("before" in n || "after" in n) {
|
|
40
|
+
const { before: s, after: f } = n;
|
|
41
|
+
return s && f ? i(f).isBefore(s, "day") ? e.isAfter(f, "day") && e.isBefore(s, "day") : e.isBefore(s, "day") || e.isAfter(f, "day") : s ? e.isBefore(s, "day") : f ? e.isAfter(f, "day") : !1;
|
|
42
|
+
}
|
|
43
|
+
const { from: r, to: o } = n;
|
|
44
|
+
return r && o ? !e.isBefore(r, "day") && !e.isAfter(o, "day") : r ? a(t, r) : !1;
|
|
45
|
+
}
|
|
46
|
+
function p(t, n) {
|
|
47
|
+
const { from: e, to: r } = n ?? {}, o = i(t);
|
|
48
|
+
return !e && !r ? { from: t, to: t } : e && !r ? a(e, t) ? { from: e, to: t } : o.isBefore(e, "day") ? { from: t, to: e } : { from: e, to: t } : e && r ? a(e, t) && a(r, t) ? void 0 : a(e, t) ? { from: e, to: t } : a(r, t) ? { from: t, to: t } : o.isBefore(e, "day") ? { from: t, to: r } : { from: e, to: t } : { from: t, to: t };
|
|
49
|
+
}
|
|
50
|
+
function v(t, { weekStartsOn: n, fixedWeeks: e }) {
|
|
51
|
+
const r = i(t).startOf("month"), o = (r.day() - n + 7) % 7, s = r.subtract(o, "day"), f = r.daysInMonth();
|
|
52
|
+
let c = Math.ceil((o + f) / 7);
|
|
53
|
+
e && (c = 6);
|
|
54
|
+
const d = [];
|
|
55
|
+
for (let u = 0; u < c; u++) {
|
|
56
|
+
const h = [];
|
|
57
|
+
for (let y = 0; y < 7; y++) h.push(s.add(u * 7 + y, "day").toDate());
|
|
58
|
+
d.push(h);
|
|
59
|
+
}
|
|
60
|
+
return d;
|
|
61
|
+
}
|
|
62
|
+
function S(t) {
|
|
63
|
+
const n = i(t).startOf("day"), e = n.add(3 - (n.day() + 6) % 7, "day"), r = i(new Date(e.year(), 0, 4)), o = r.add(3 - (r.day() + 6) % 7, "day");
|
|
64
|
+
return 1 + Math.round(e.diff(o, "day") / 7);
|
|
65
|
+
}
|
|
66
|
+
function O(t) {
|
|
67
|
+
return Array.from({ length: 7 }, (n, e) => (t + e) % 7);
|
|
68
|
+
}
|
|
69
|
+
const T = (t) => i(t).startOf("month").toDate(), L = (t, n) => i(t).add(n, "month").toDate(), W = (t, n) => (t.getFullYear() - n.getFullYear()) * 12 + (t.getMonth() - n.getMonth());
|
|
70
|
+
export {
|
|
71
|
+
L as addMonths,
|
|
72
|
+
p as addToRange,
|
|
73
|
+
v as buildMonthGrid,
|
|
74
|
+
l as createCalendarLocale,
|
|
75
|
+
B as enUS,
|
|
76
|
+
a as isSameDay,
|
|
77
|
+
S as isoWeekNumber,
|
|
78
|
+
D as matchesMatcher,
|
|
79
|
+
W as monthDiff,
|
|
80
|
+
T as startOfMonth,
|
|
81
|
+
A as vi,
|
|
82
|
+
O as weekdayOrder
|
|
83
|
+
};
|