@regardio/react 0.3.2 → 0.4.0
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/background-slideshow.d.ts +7 -5
- package/dist/components/background-slideshow.js +172 -74
- package/dist/components/blurry-gradient.d.ts +11 -4
- package/dist/components/blurry-gradient.js +121 -5
- package/dist/components/box.d.ts +12 -9
- package/dist/components/box.js +48 -23
- package/dist/components/carousel.d.ts +12 -10
- package/dist/components/carousel.js +146 -66
- package/dist/components/countdown.d.ts +5 -2
- package/dist/components/countdown.js +55 -21
- package/dist/components/definition-list.d.ts +19 -16
- package/dist/components/definition-list.js +83 -51
- package/dist/components/generic-error.d.ts +25 -5
- package/dist/components/generic-error.js +42 -34
- package/dist/components/heading.d.ts +13 -10
- package/dist/components/heading.js +114 -25
- package/dist/components/highlight.d.ts +11 -8
- package/dist/components/highlight.js +65 -17
- package/dist/components/icon-button.d.ts +7 -4
- package/dist/components/icon-button.js +16 -5
- package/dist/components/if.d.ts +6 -4
- package/dist/components/if.js +22 -14
- package/dist/components/iframe.d.ts +6 -4
- package/dist/components/iframe.js +26 -3
- package/dist/components/item.d.ts +17 -14
- package/dist/components/item.js +504 -301
- package/dist/components/leaflet-map.d.ts +5 -4
- package/dist/components/leaflet-map.js +192 -186
- package/dist/components/link.d.ts +24 -16
- package/dist/components/link.js +191 -102
- package/dist/components/list-item.d.ts +11 -8
- package/dist/components/list-item.js +35 -17
- package/dist/components/maptiler-map.d.ts +5 -4
- package/dist/components/maptiler-map.js +125 -112
- package/dist/components/markdown-container.d.ts +10 -8
- package/dist/components/markdown-container.js +181 -82
- package/dist/components/password-input.d.ts +7 -5
- package/dist/components/password-input.js +50 -8
- package/dist/components/picture.d.ts +19 -7
- package/dist/components/picture.js +75 -34
- package/dist/components/protected-email.d.ts +14 -3
- package/dist/components/protected-email.js +29 -15
- package/dist/components/text.d.ts +12 -9
- package/dist/components/text.js +42 -24
- package/dist/components/unordered-list.d.ts +11 -8
- package/dist/components/unordered-list.js +37 -19
- package/dist/hooks/use-current-route-data.d.ts +7 -2
- package/dist/hooks/use-current-route-data.js +13 -9
- package/dist/hooks/use-focus-search.d.ts +6 -3
- package/dist/hooks/use-focus-search.js +17 -13
- package/dist/hooks/use-matches-data.d.ts +9 -2
- package/dist/hooks/use-matches-data.js +12 -8
- package/dist/hooks/use-media-query.d.ts +8 -2
- package/dist/hooks/use-media-query.js +19 -15
- package/dist/hooks/use-mobile.d.ts +3 -2
- package/dist/hooks/use-mobile.js +18 -14
- package/dist/hooks/use-nonce.d.ts +12 -5
- package/dist/hooks/use-nonce.js +11 -7
- package/dist/hooks/use-orientation.d.ts +11 -3
- package/dist/hooks/use-orientation.js +28 -24
- package/dist/hooks/use-user.d.ts +43 -8
- package/dist/hooks/use-user.js +21 -13
- package/dist/utils/author.d.ts +4 -4
- package/dist/utils/author.js +49 -31
- package/dist/utils/cn.d.ts +8 -4
- package/dist/utils/cn.js +12 -8
- package/dist/utils/is-route-active.d.ts +19 -3
- package/dist/utils/is-route-active.js +45 -43
- package/dist/utils/locale.d.ts +66 -4
- package/dist/utils/locale.js +33 -22
- package/dist/utils/text.d.ts +24 -7
- package/dist/utils/text.js +114 -89
- package/package.json +4 -3
- package/src/stories/ListItem.stories.tsx +3 -2
- package/dist/components/background-slideshow.d.ts.map +0 -1
- package/dist/components/blurry-gradient.d.ts.map +0 -1
- package/dist/components/box.d.ts.map +0 -1
- package/dist/components/carousel.d.ts.map +0 -1
- package/dist/components/countdown.d.ts.map +0 -1
- package/dist/components/definition-list.d.ts.map +0 -1
- package/dist/components/generic-error.d.ts.map +0 -1
- package/dist/components/heading.d.ts.map +0 -1
- package/dist/components/highlight.d.ts.map +0 -1
- package/dist/components/icon-button.d.ts.map +0 -1
- package/dist/components/if.d.ts.map +0 -1
- package/dist/components/iframe.d.ts.map +0 -1
- package/dist/components/item.d.ts.map +0 -1
- package/dist/components/leaflet-map.d.ts.map +0 -1
- package/dist/components/link.d.ts.map +0 -1
- package/dist/components/link.test.d.ts +0 -2
- package/dist/components/link.test.d.ts.map +0 -1
- package/dist/components/link.test.js +0 -204
- package/dist/components/list-item.d.ts.map +0 -1
- package/dist/components/maptiler-map.d.ts.map +0 -1
- package/dist/components/markdown-container.d.ts.map +0 -1
- package/dist/components/password-input.d.ts.map +0 -1
- package/dist/components/picture.d.ts.map +0 -1
- package/dist/components/protected-email.d.ts.map +0 -1
- package/dist/components/text.d.ts.map +0 -1
- package/dist/components/unordered-list.d.ts.map +0 -1
- package/dist/hooks/use-current-route-data.d.ts.map +0 -1
- package/dist/hooks/use-focus-search.d.ts.map +0 -1
- package/dist/hooks/use-matches-data.d.ts.map +0 -1
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/hooks/use-nonce.d.ts.map +0 -1
- package/dist/hooks/use-nonce.test.d.ts +0 -2
- package/dist/hooks/use-nonce.test.d.ts.map +0 -1
- package/dist/hooks/use-nonce.test.js +0 -27
- package/dist/hooks/use-orientation.d.ts.map +0 -1
- package/dist/hooks/use-user.d.ts.map +0 -1
- package/dist/shadcn/accordion.d.ts +0 -25
- package/dist/shadcn/accordion.d.ts.map +0 -1
- package/dist/shadcn/accordion.js +0 -45
- package/dist/shadcn/alert-dialog.d.ts +0 -73
- package/dist/shadcn/alert-dialog.d.ts.map +0 -1
- package/dist/shadcn/alert-dialog.js +0 -93
- package/dist/shadcn/alert.d.ts +0 -34
- package/dist/shadcn/alert.d.ts.map +0 -1
- package/dist/shadcn/alert.js +0 -42
- package/dist/shadcn/aspect-ratio.d.ts +0 -6
- package/dist/shadcn/aspect-ratio.d.ts.map +0 -1
- package/dist/shadcn/aspect-ratio.js +0 -7
- package/dist/shadcn/avatar.d.ts +0 -16
- package/dist/shadcn/avatar.d.ts.map +0 -1
- package/dist/shadcn/avatar.js +0 -27
- package/dist/shadcn/badge.d.ts +0 -29
- package/dist/shadcn/badge.d.ts.map +0 -1
- package/dist/shadcn/badge.js +0 -29
- package/dist/shadcn/breadcrumb.d.ts +0 -42
- package/dist/shadcn/breadcrumb.d.ts.map +0 -1
- package/dist/shadcn/breadcrumb.js +0 -74
- package/dist/shadcn/button.d.ts +0 -38
- package/dist/shadcn/button.d.ts.map +0 -1
- package/dist/shadcn/button.js +0 -38
- package/dist/shadcn/calendar.d.ts +0 -23
- package/dist/shadcn/calendar.d.ts.map +0 -1
- package/dist/shadcn/calendar.js +0 -163
- package/dist/shadcn/card.d.ts +0 -31
- package/dist/shadcn/card.d.ts.map +0 -1
- package/dist/shadcn/card.js +0 -55
- package/dist/shadcn/carousel.d.ts +0 -51
- package/dist/shadcn/carousel.d.ts.map +0 -1
- package/dist/shadcn/carousel.js +0 -161
- package/dist/shadcn/chart.d.ts +0 -103
- package/dist/shadcn/chart.d.ts.map +0 -1
- package/dist/shadcn/chart.js +0 -248
- package/dist/shadcn/checkbox.d.ts +0 -8
- package/dist/shadcn/checkbox.d.ts.map +0 -1
- package/dist/shadcn/checkbox.js +0 -22
- package/dist/shadcn/collapsible.d.ts +0 -16
- package/dist/shadcn/collapsible.d.ts.map +0 -1
- package/dist/shadcn/collapsible.js +0 -19
- package/dist/shadcn/command.d.ts +0 -61
- package/dist/shadcn/command.d.ts.map +0 -1
- package/dist/shadcn/command.js +0 -123
- package/dist/shadcn/context-menu.d.ts +0 -107
- package/dist/shadcn/context-menu.d.ts.map +0 -1
- package/dist/shadcn/context-menu.js +0 -151
- package/dist/shadcn/dialog.d.ts +0 -57
- package/dist/shadcn/dialog.d.ts.map +0 -1
- package/dist/shadcn/dialog.js +0 -96
- package/dist/shadcn/drawer.d.ts +0 -54
- package/dist/shadcn/drawer.d.ts.map +0 -1
- package/dist/shadcn/drawer.js +0 -96
- package/dist/shadcn/dropdown-menu.d.ts +0 -110
- package/dist/shadcn/dropdown-menu.d.ts.map +0 -1
- package/dist/shadcn/dropdown-menu.js +0 -152
- package/dist/shadcn/form.d.ts +0 -59
- package/dist/shadcn/form.d.ts.map +0 -1
- package/dist/shadcn/form.js +0 -99
- package/dist/shadcn/hover-card.d.ts +0 -20
- package/dist/shadcn/hover-card.d.ts.map +0 -1
- package/dist/shadcn/hover-card.js +0 -26
- package/dist/shadcn/input-otp.d.ts +0 -25
- package/dist/shadcn/input-otp.d.ts.map +0 -1
- package/dist/shadcn/input-otp.js +0 -54
- package/dist/shadcn/input.d.ts +0 -14
- package/dist/shadcn/input.d.ts.map +0 -1
- package/dist/shadcn/input.js +0 -48
- package/dist/shadcn/label.d.ts +0 -8
- package/dist/shadcn/label.d.ts.map +0 -1
- package/dist/shadcn/label.js +0 -16
- package/dist/shadcn/menubar.d.ts +0 -108
- package/dist/shadcn/menubar.d.ts.map +0 -1
- package/dist/shadcn/menubar.js +0 -174
- package/dist/shadcn/navigation-menu.d.ts +0 -79
- package/dist/shadcn/navigation-menu.d.ts.map +0 -1
- package/dist/shadcn/navigation-menu.js +0 -108
- package/dist/shadcn/pagination.d.ts +0 -45
- package/dist/shadcn/pagination.d.ts.map +0 -1
- package/dist/shadcn/pagination.js +0 -83
- package/dist/shadcn/popover.d.ts +0 -19
- package/dist/shadcn/popover.d.ts.map +0 -1
- package/dist/shadcn/popover.js +0 -29
- package/dist/shadcn/progress.d.ts +0 -9
- package/dist/shadcn/progress.d.ts.map +0 -1
- package/dist/shadcn/progress.js +0 -17
- package/dist/shadcn/radio-group.d.ts +0 -12
- package/dist/shadcn/radio-group.d.ts.map +0 -1
- package/dist/shadcn/radio-group.js +0 -32
- package/dist/shadcn/resizable.d.ts +0 -20
- package/dist/shadcn/resizable.d.ts.map +0 -1
- package/dist/shadcn/resizable.js +0 -32
- package/dist/shadcn/scroll-area.d.ts +0 -16
- package/dist/shadcn/scroll-area.d.ts.map +0 -1
- package/dist/shadcn/scroll-area.js +0 -40
- package/dist/shadcn/select.d.ts +0 -63
- package/dist/shadcn/select.d.ts.map +0 -1
- package/dist/shadcn/select.js +0 -120
- package/dist/shadcn/separator.d.ts +0 -10
- package/dist/shadcn/separator.d.ts.map +0 -1
- package/dist/shadcn/separator.js +0 -18
- package/dist/shadcn/sheet.d.ts +0 -48
- package/dist/shadcn/sheet.d.ts.map +0 -1
- package/dist/shadcn/sheet.js +0 -99
- package/dist/shadcn/sidebar.d.ts +0 -200
- package/dist/shadcn/sidebar.d.ts.map +0 -1
- package/dist/shadcn/sidebar.js +0 -528
- package/dist/shadcn/skeleton.d.ts +0 -6
- package/dist/shadcn/skeleton.d.ts.map +0 -1
- package/dist/shadcn/skeleton.js +0 -11
- package/dist/shadcn/slider.d.ts +0 -12
- package/dist/shadcn/slider.d.ts.map +0 -1
- package/dist/shadcn/slider.js +0 -50
- package/dist/shadcn/sonner.d.ts +0 -7
- package/dist/shadcn/sonner.d.ts.map +0 -1
- package/dist/shadcn/sonner.js +0 -20
- package/dist/shadcn/switch.d.ts +0 -8
- package/dist/shadcn/switch.d.ts.map +0 -1
- package/dist/shadcn/switch.js +0 -22
- package/dist/shadcn/table.d.ts +0 -35
- package/dist/shadcn/table.d.ts.map +0 -1
- package/dist/shadcn/table.js +0 -73
- package/dist/shadcn/tabs.d.ts +0 -20
- package/dist/shadcn/tabs.d.ts.map +0 -1
- package/dist/shadcn/tabs.js +0 -40
- package/dist/shadcn/textarea.d.ts +0 -7
- package/dist/shadcn/textarea.d.ts.map +0 -1
- package/dist/shadcn/textarea.js +0 -14
- package/dist/shadcn/toggle-group.d.ts +0 -22
- package/dist/shadcn/toggle-group.d.ts.map +0 -1
- package/dist/shadcn/toggle-group.js +0 -43
- package/dist/shadcn/toggle.d.ts +0 -29
- package/dist/shadcn/toggle.d.ts.map +0 -1
- package/dist/shadcn/toggle.js +0 -31
- package/dist/shadcn/tooltip.d.ts +0 -20
- package/dist/shadcn/tooltip.d.ts.map +0 -1
- package/dist/shadcn/tooltip.js +0 -40
- package/dist/stories/BackgroundSlideshow.stories.d.ts +0 -9
- package/dist/stories/BackgroundSlideshow.stories.d.ts.map +0 -1
- package/dist/stories/BackgroundSlideshow.stories.js +0 -60
- package/dist/stories/BlurryGradient.stories.d.ts +0 -11
- package/dist/stories/BlurryGradient.stories.d.ts.map +0 -1
- package/dist/stories/BlurryGradient.stories.js +0 -53
- package/dist/stories/Box.stories.d.ts +0 -13
- package/dist/stories/Box.stories.d.ts.map +0 -1
- package/dist/stories/Box.stories.js +0 -50
- package/dist/stories/Carousel.stories.d.ts +0 -9
- package/dist/stories/Carousel.stories.d.ts.map +0 -1
- package/dist/stories/Carousel.stories.js +0 -30
- package/dist/stories/Countdown.stories.d.ts +0 -7
- package/dist/stories/Countdown.stories.d.ts.map +0 -1
- package/dist/stories/Countdown.stories.js +0 -11
- package/dist/stories/DefinitionList.stories.d.ts +0 -9
- package/dist/stories/DefinitionList.stories.d.ts.map +0 -1
- package/dist/stories/DefinitionList.stories.js +0 -20
- package/dist/stories/GenericError.stories.d.ts +0 -9
- package/dist/stories/GenericError.stories.d.ts.map +0 -1
- package/dist/stories/GenericError.stories.js +0 -39
- package/dist/stories/Heading.stories.d.ts +0 -15
- package/dist/stories/Heading.stories.d.ts.map +0 -1
- package/dist/stories/Heading.stories.js +0 -61
- package/dist/stories/Highlight.stories.d.ts +0 -8
- package/dist/stories/Highlight.stories.d.ts.map +0 -1
- package/dist/stories/Highlight.stories.js +0 -19
- package/dist/stories/IconButton.stories.d.ts +0 -10
- package/dist/stories/IconButton.stories.d.ts.map +0 -1
- package/dist/stories/IconButton.stories.js +0 -32
- package/dist/stories/If.stories.d.ts +0 -13
- package/dist/stories/If.stories.d.ts.map +0 -1
- package/dist/stories/If.stories.js +0 -54
- package/dist/stories/Iframe.stories.d.ts +0 -8
- package/dist/stories/Iframe.stories.d.ts.map +0 -1
- package/dist/stories/Iframe.stories.js +0 -23
- package/dist/stories/Item.stories.d.ts +0 -10
- package/dist/stories/Item.stories.d.ts.map +0 -1
- package/dist/stories/Item.stories.js +0 -32
- package/dist/stories/Link.stories.d.ts +0 -10
- package/dist/stories/Link.stories.d.ts.map +0 -1
- package/dist/stories/Link.stories.js +0 -36
- package/dist/stories/ListItem.stories.d.ts +0 -9
- package/dist/stories/ListItem.stories.d.ts.map +0 -1
- package/dist/stories/ListItem.stories.js +0 -25
- package/dist/stories/MarkdownContainer.stories.d.ts +0 -11
- package/dist/stories/MarkdownContainer.stories.d.ts.map +0 -1
- package/dist/stories/MarkdownContainer.stories.js +0 -66
- package/dist/stories/PasswordInput.stories.d.ts +0 -9
- package/dist/stories/PasswordInput.stories.d.ts.map +0 -1
- package/dist/stories/PasswordInput.stories.js +0 -27
- package/dist/stories/Picture.stories.d.ts +0 -10
- package/dist/stories/Picture.stories.d.ts.map +0 -1
- package/dist/stories/Picture.stories.js +0 -46
- package/dist/stories/ProtectedEmail.stories.d.ts +0 -10
- package/dist/stories/ProtectedEmail.stories.d.ts.map +0 -1
- package/dist/stories/ProtectedEmail.stories.js +0 -34
- package/dist/stories/Text.stories.d.ts +0 -10
- package/dist/stories/Text.stories.d.ts.map +0 -1
- package/dist/stories/Text.stories.js +0 -31
- package/dist/stories/UnorderedList.stories.d.ts +0 -10
- package/dist/stories/UnorderedList.stories.d.ts.map +0 -1
- package/dist/stories/UnorderedList.stories.js +0 -24
- package/dist/test-setup.d.ts +0 -2
- package/dist/test-setup.d.ts.map +0 -1
- package/dist/test-setup.js +0 -1
- package/dist/utils/author.d.ts.map +0 -1
- package/dist/utils/author.test.d.ts +0 -2
- package/dist/utils/author.test.d.ts.map +0 -1
- package/dist/utils/author.test.js +0 -46
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.test.d.ts +0 -2
- package/dist/utils/cn.test.d.ts.map +0 -1
- package/dist/utils/cn.test.js +0 -33
- package/dist/utils/is-route-active.d.ts.map +0 -1
- package/dist/utils/is-route-active.test.d.ts +0 -2
- package/dist/utils/is-route-active.test.d.ts.map +0 -1
- package/dist/utils/is-route-active.test.js +0 -61
- package/dist/utils/locale.d.ts.map +0 -1
- package/dist/utils/locale.test.d.ts +0 -2
- package/dist/utils/locale.test.d.ts.map +0 -1
- package/dist/utils/locale.test.js +0 -99
- package/dist/utils/text.d.ts.map +0 -1
- package/dist/utils/text.test.d.ts +0 -2
- package/dist/utils/text.test.d.ts.map +0 -1
- package/dist/utils/text.test.js +0 -122
package/dist/shadcn/button.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
2
|
-
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { cn, cva } from '../utils/cn';
|
|
4
|
-
|
|
5
|
-
const buttonVariants = cva({
|
|
6
|
-
base: 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
|
7
|
-
defaultVariants: {
|
|
8
|
-
size: 'default',
|
|
9
|
-
variant: 'default',
|
|
10
|
-
},
|
|
11
|
-
variants: {
|
|
12
|
-
size: {
|
|
13
|
-
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
14
|
-
icon: 'size-9',
|
|
15
|
-
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
|
16
|
-
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
17
|
-
},
|
|
18
|
-
variant: {
|
|
19
|
-
default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
20
|
-
destructive:
|
|
21
|
-
'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
22
|
-
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
|
23
|
-
link: 'text-primary underline-offset-4 hover:underline',
|
|
24
|
-
outline:
|
|
25
|
-
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
|
26
|
-
secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
function Button({ className, variant, size, asChild = false, ...props }) {
|
|
31
|
-
const Comp = asChild ? Slot : 'button';
|
|
32
|
-
return _jsx(Comp, {
|
|
33
|
-
className: cn(buttonVariants({ className, size, variant })),
|
|
34
|
-
'data-slot': 'button',
|
|
35
|
-
...props,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
export { Button, buttonVariants };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type DayButton, DayPicker } from 'react-day-picker';
|
|
3
|
-
import { Button } from './button';
|
|
4
|
-
declare function Calendar({
|
|
5
|
-
className,
|
|
6
|
-
classNames,
|
|
7
|
-
showOutsideDays,
|
|
8
|
-
captionLayout,
|
|
9
|
-
buttonVariant,
|
|
10
|
-
formatters,
|
|
11
|
-
components,
|
|
12
|
-
...props
|
|
13
|
-
}: React.ComponentProps<typeof DayPicker> & {
|
|
14
|
-
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
|
|
15
|
-
}): import('react/jsx-runtime').JSX.Element;
|
|
16
|
-
declare function CalendarDayButton({
|
|
17
|
-
className,
|
|
18
|
-
day,
|
|
19
|
-
modifiers,
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof DayButton>): import('react/jsx-runtime').JSX.Element;
|
|
22
|
-
export { Calendar, CalendarDayButton };
|
|
23
|
-
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/shadcn/calendar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAE,SAAS,EAAwB,MAAM,kBAAkB,CAAC;AAEnF,OAAO,EAAE,MAAM,EAAkB,MAAM,UAAU,CAAC;AA6ElD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,aAAuB,EACvB,aAAuB,EACvB,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAC1C,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;CAChE,2CAgGA;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CA+BxC;AAED,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/shadcn/calendar.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { DayPicker, getDefaultClassNames } from 'react-day-picker';
|
|
5
|
-
import { cn } from '../utils/cn';
|
|
6
|
-
import { Button, buttonVariants } from './button';
|
|
7
|
-
|
|
8
|
-
function CalendarChevron({ className, orientation, ...props }) {
|
|
9
|
-
if (orientation === 'left') {
|
|
10
|
-
return _jsx(ChevronLeftIcon, { className: cn('size-4', className), ...props });
|
|
11
|
-
}
|
|
12
|
-
if (orientation === 'right') {
|
|
13
|
-
return _jsx(ChevronRightIcon, { className: cn('size-4', className), ...props });
|
|
14
|
-
}
|
|
15
|
-
if (orientation === 'up') {
|
|
16
|
-
return _jsx(ChevronLeftIcon, { className: cn('size-4 rotate-90', className), ...props });
|
|
17
|
-
}
|
|
18
|
-
return _jsx(ChevronDownIcon, { className: cn('size-4', className), ...props });
|
|
19
|
-
}
|
|
20
|
-
function CalendarRoot({ rootRef, ...props }) {
|
|
21
|
-
const { className, ...rest } = props;
|
|
22
|
-
return _jsx('div', { className: cn(className), 'data-slot': 'calendar', ref: rootRef, ...rest });
|
|
23
|
-
}
|
|
24
|
-
function CalendarWeekNumber({ children, ...props }) {
|
|
25
|
-
return _jsx('td', {
|
|
26
|
-
...props,
|
|
27
|
-
children: _jsx('div', {
|
|
28
|
-
children: children,
|
|
29
|
-
className: 'flex size-(--cell-size) items-center justify-center text-center',
|
|
30
|
-
}),
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function Calendar({
|
|
34
|
-
className,
|
|
35
|
-
classNames,
|
|
36
|
-
showOutsideDays = true,
|
|
37
|
-
captionLayout = 'label',
|
|
38
|
-
buttonVariant = 'ghost',
|
|
39
|
-
formatters,
|
|
40
|
-
components,
|
|
41
|
-
...props
|
|
42
|
-
}) {
|
|
43
|
-
const defaultClassNames = getDefaultClassNames();
|
|
44
|
-
return _jsx(DayPicker, {
|
|
45
|
-
captionLayout: captionLayout,
|
|
46
|
-
className: cn(
|
|
47
|
-
'bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',
|
|
48
|
-
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
49
|
-
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
50
|
-
className,
|
|
51
|
-
),
|
|
52
|
-
classNames: {
|
|
53
|
-
button_next: cn(
|
|
54
|
-
buttonVariants({ variant: buttonVariant }),
|
|
55
|
-
'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',
|
|
56
|
-
defaultClassNames.button_next,
|
|
57
|
-
),
|
|
58
|
-
button_previous: cn(
|
|
59
|
-
buttonVariants({ variant: buttonVariant }),
|
|
60
|
-
'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none',
|
|
61
|
-
defaultClassNames.button_previous,
|
|
62
|
-
),
|
|
63
|
-
caption_label: cn(
|
|
64
|
-
'select-none font-medium',
|
|
65
|
-
captionLayout === 'label'
|
|
66
|
-
? 'text-sm'
|
|
67
|
-
: 'rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5',
|
|
68
|
-
defaultClassNames.caption_label,
|
|
69
|
-
),
|
|
70
|
-
day: cn(
|
|
71
|
-
'relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none',
|
|
72
|
-
defaultClassNames.day,
|
|
73
|
-
),
|
|
74
|
-
disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),
|
|
75
|
-
dropdown: cn('absolute bg-popover inset-0 opacity-0', defaultClassNames.dropdown),
|
|
76
|
-
dropdown_root: cn(
|
|
77
|
-
'relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md',
|
|
78
|
-
defaultClassNames.dropdown_root,
|
|
79
|
-
),
|
|
80
|
-
dropdowns: cn(
|
|
81
|
-
'w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5',
|
|
82
|
-
defaultClassNames.dropdowns,
|
|
83
|
-
),
|
|
84
|
-
hidden: cn('invisible', defaultClassNames.hidden),
|
|
85
|
-
month: cn('flex flex-col w-full gap-4', defaultClassNames.month),
|
|
86
|
-
month_caption: cn(
|
|
87
|
-
'flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)',
|
|
88
|
-
defaultClassNames.month_caption,
|
|
89
|
-
),
|
|
90
|
-
months: cn('flex gap-4 flex-col md:flex-row relative', defaultClassNames.months),
|
|
91
|
-
nav: cn(
|
|
92
|
-
'flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between',
|
|
93
|
-
defaultClassNames.nav,
|
|
94
|
-
),
|
|
95
|
-
outside: cn(
|
|
96
|
-
'text-muted-foreground aria-selected:text-muted-foreground',
|
|
97
|
-
defaultClassNames.outside,
|
|
98
|
-
),
|
|
99
|
-
range_end: cn('rounded-r-md bg-accent', defaultClassNames.range_end),
|
|
100
|
-
range_middle: cn('rounded-none', defaultClassNames.range_middle),
|
|
101
|
-
range_start: cn('rounded-l-md bg-accent', defaultClassNames.range_start),
|
|
102
|
-
root: cn('w-fit', defaultClassNames.root),
|
|
103
|
-
table: 'w-full border-collapse',
|
|
104
|
-
today: cn(
|
|
105
|
-
'bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none',
|
|
106
|
-
defaultClassNames.today,
|
|
107
|
-
),
|
|
108
|
-
week: cn('flex w-full mt-2', defaultClassNames.week),
|
|
109
|
-
week_number: cn(
|
|
110
|
-
'text-[0.8rem] select-none text-muted-foreground',
|
|
111
|
-
defaultClassNames.week_number,
|
|
112
|
-
),
|
|
113
|
-
week_number_header: cn('select-none w-(--cell-size)', defaultClassNames.week_number_header),
|
|
114
|
-
weekday: cn(
|
|
115
|
-
'text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none',
|
|
116
|
-
defaultClassNames.weekday,
|
|
117
|
-
),
|
|
118
|
-
weekdays: cn('flex', defaultClassNames.weekdays),
|
|
119
|
-
...classNames,
|
|
120
|
-
},
|
|
121
|
-
components: {
|
|
122
|
-
Chevron: CalendarChevron,
|
|
123
|
-
DayButton: CalendarDayButton,
|
|
124
|
-
Root: CalendarRoot,
|
|
125
|
-
WeekNumber: CalendarWeekNumber,
|
|
126
|
-
...components,
|
|
127
|
-
},
|
|
128
|
-
formatters: {
|
|
129
|
-
formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),
|
|
130
|
-
...formatters,
|
|
131
|
-
},
|
|
132
|
-
showOutsideDays: showOutsideDays,
|
|
133
|
-
...props,
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
137
|
-
const defaultClassNames = getDefaultClassNames();
|
|
138
|
-
const ref = React.useRef(null);
|
|
139
|
-
React.useEffect(() => {
|
|
140
|
-
if (modifiers.focused) ref.current?.focus();
|
|
141
|
-
}, [modifiers.focused]);
|
|
142
|
-
return _jsx(Button, {
|
|
143
|
-
className: cn(
|
|
144
|
-
'data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70',
|
|
145
|
-
defaultClassNames.day,
|
|
146
|
-
className,
|
|
147
|
-
),
|
|
148
|
-
'data-day': day.date.toLocaleDateString(),
|
|
149
|
-
'data-range-end': modifiers.range_end,
|
|
150
|
-
'data-range-middle': modifiers.range_middle,
|
|
151
|
-
'data-range-start': modifiers.range_start,
|
|
152
|
-
'data-selected-single':
|
|
153
|
-
modifiers.selected &&
|
|
154
|
-
!modifiers.range_start &&
|
|
155
|
-
!modifiers.range_end &&
|
|
156
|
-
!modifiers.range_middle,
|
|
157
|
-
ref: ref,
|
|
158
|
-
size: 'icon',
|
|
159
|
-
variant: 'ghost',
|
|
160
|
-
...props,
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
export { Calendar, CalendarDayButton };
|
package/dist/shadcn/card.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type * as React from 'react';
|
|
2
|
-
declare function Card({
|
|
3
|
-
className,
|
|
4
|
-
...props
|
|
5
|
-
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
6
|
-
declare function CardHeader({
|
|
7
|
-
className,
|
|
8
|
-
...props
|
|
9
|
-
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
10
|
-
declare function CardTitle({
|
|
11
|
-
className,
|
|
12
|
-
...props
|
|
13
|
-
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
14
|
-
declare function CardDescription({
|
|
15
|
-
className,
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
18
|
-
declare function CardAction({
|
|
19
|
-
className,
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
22
|
-
declare function CardContent({
|
|
23
|
-
className,
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
26
|
-
declare function CardFooter({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
30
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
|
|
31
|
-
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/shadcn/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWjE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQvE;AAED,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/shadcn/card.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { cn } from '../utils/cn';
|
|
3
|
-
|
|
4
|
-
function Card({ className, ...props }) {
|
|
5
|
-
return _jsx('div', {
|
|
6
|
-
className: cn(
|
|
7
|
-
'bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm',
|
|
8
|
-
className,
|
|
9
|
-
),
|
|
10
|
-
'data-slot': 'card',
|
|
11
|
-
...props,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function CardHeader({ className, ...props }) {
|
|
15
|
-
return _jsx('div', {
|
|
16
|
-
className: cn(
|
|
17
|
-
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
|
|
18
|
-
className,
|
|
19
|
-
),
|
|
20
|
-
'data-slot': 'card-header',
|
|
21
|
-
...props,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function CardTitle({ className, ...props }) {
|
|
25
|
-
return _jsx('div', {
|
|
26
|
-
className: cn('leading-none font-semibold', className),
|
|
27
|
-
'data-slot': 'card-title',
|
|
28
|
-
...props,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function CardDescription({ className, ...props }) {
|
|
32
|
-
return _jsx('div', {
|
|
33
|
-
className: cn('text-muted-foreground text-sm', className),
|
|
34
|
-
'data-slot': 'card-description',
|
|
35
|
-
...props,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
function CardAction({ className, ...props }) {
|
|
39
|
-
return _jsx('div', {
|
|
40
|
-
className: cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className),
|
|
41
|
-
'data-slot': 'card-action',
|
|
42
|
-
...props,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function CardContent({ className, ...props }) {
|
|
46
|
-
return _jsx('div', { className: cn('px-6', className), 'data-slot': 'card-content', ...props });
|
|
47
|
-
}
|
|
48
|
-
function CardFooter({ className, ...props }) {
|
|
49
|
-
return _jsx('div', {
|
|
50
|
-
className: cn('flex items-center px-6 [.border-t]:pt-6', className),
|
|
51
|
-
'data-slot': 'card-footer',
|
|
52
|
-
...props,
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Button } from './button';
|
|
4
|
-
type CarouselApi = UseEmblaCarouselType[1];
|
|
5
|
-
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
6
|
-
type CarouselOptions = UseCarouselParameters[0];
|
|
7
|
-
type CarouselPlugin = UseCarouselParameters[1];
|
|
8
|
-
type CarouselProps = {
|
|
9
|
-
opts?: CarouselOptions;
|
|
10
|
-
plugins?: CarouselPlugin;
|
|
11
|
-
orientation?: 'horizontal' | 'vertical';
|
|
12
|
-
setApi?: (api: CarouselApi) => void;
|
|
13
|
-
};
|
|
14
|
-
declare function Carousel({
|
|
15
|
-
orientation,
|
|
16
|
-
opts,
|
|
17
|
-
setApi,
|
|
18
|
-
plugins,
|
|
19
|
-
className,
|
|
20
|
-
children,
|
|
21
|
-
...props
|
|
22
|
-
}: React.ComponentProps<'div'> & CarouselProps): import('react/jsx-runtime').JSX.Element;
|
|
23
|
-
declare function CarouselContent({
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
27
|
-
declare function CarouselItem({
|
|
28
|
-
className,
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<'div'>): import('react/jsx-runtime').JSX.Element;
|
|
31
|
-
declare function CarouselPrevious({
|
|
32
|
-
className,
|
|
33
|
-
variant,
|
|
34
|
-
size,
|
|
35
|
-
...props
|
|
36
|
-
}: React.ComponentProps<typeof Button>): import('react/jsx-runtime').JSX.Element;
|
|
37
|
-
declare function CarouselNext({
|
|
38
|
-
className,
|
|
39
|
-
variant,
|
|
40
|
-
size,
|
|
41
|
-
...props
|
|
42
|
-
}: React.ComponentProps<typeof Button>): import('react/jsx-runtime').JSX.Element;
|
|
43
|
-
export {
|
|
44
|
-
type CarouselApi,
|
|
45
|
-
Carousel,
|
|
46
|
-
CarouselContent,
|
|
47
|
-
CarouselItem,
|
|
48
|
-
CarouselPrevious,
|
|
49
|
-
CarouselNext,
|
|
50
|
-
};
|
|
51
|
-
//# sourceMappingURL=carousel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/shadcn/carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,gBAAgB,EAAE,EAAE,KAAK,oBAAoB,EAAE,MAAM,sBA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M,CAAC,2CAuBrC;AAED,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,GACb,CAAC"}
|
package/dist/shadcn/carousel.js
DELETED
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import useEmblaCarousel, {} from 'embla-carousel-react';
|
|
3
|
-
import { ArrowLeft, ArrowRight } from 'lucide-react';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
6
|
-
import { cn } from '../utils/cn';
|
|
7
|
-
import { Button } from './button';
|
|
8
|
-
|
|
9
|
-
const CarouselContext = React.createContext(null);
|
|
10
|
-
function useCarousel() {
|
|
11
|
-
const context = React.useContext(CarouselContext);
|
|
12
|
-
if (!context) {
|
|
13
|
-
throw new Error('useCarousel must be used within a <Carousel />');
|
|
14
|
-
}
|
|
15
|
-
return context;
|
|
16
|
-
}
|
|
17
|
-
function Carousel({
|
|
18
|
-
orientation = 'horizontal',
|
|
19
|
-
opts,
|
|
20
|
-
setApi,
|
|
21
|
-
plugins,
|
|
22
|
-
className,
|
|
23
|
-
children,
|
|
24
|
-
...props
|
|
25
|
-
}) {
|
|
26
|
-
const [carouselRef, api] = useEmblaCarousel(
|
|
27
|
-
{
|
|
28
|
-
...opts,
|
|
29
|
-
axis: orientation === 'horizontal' ? 'x' : 'y',
|
|
30
|
-
},
|
|
31
|
-
plugins,
|
|
32
|
-
);
|
|
33
|
-
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
34
|
-
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
35
|
-
const onSelect = React.useCallback((api) => {
|
|
36
|
-
if (!api) return;
|
|
37
|
-
setCanScrollPrev(api.canScrollPrev());
|
|
38
|
-
setCanScrollNext(api.canScrollNext());
|
|
39
|
-
}, []);
|
|
40
|
-
const scrollPrev = React.useCallback(() => {
|
|
41
|
-
api?.scrollPrev();
|
|
42
|
-
}, [api]);
|
|
43
|
-
const scrollNext = React.useCallback(() => {
|
|
44
|
-
api?.scrollNext();
|
|
45
|
-
}, [api]);
|
|
46
|
-
const handleKeyDown = React.useCallback(
|
|
47
|
-
(event) => {
|
|
48
|
-
if (event.key === 'ArrowLeft') {
|
|
49
|
-
event.preventDefault();
|
|
50
|
-
scrollPrev();
|
|
51
|
-
} else if (event.key === 'ArrowRight') {
|
|
52
|
-
event.preventDefault();
|
|
53
|
-
scrollNext();
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
[scrollPrev, scrollNext],
|
|
57
|
-
);
|
|
58
|
-
React.useEffect(() => {
|
|
59
|
-
if (!api || !setApi) return;
|
|
60
|
-
setApi(api);
|
|
61
|
-
}, [api, setApi]);
|
|
62
|
-
React.useEffect(() => {
|
|
63
|
-
if (!api) return;
|
|
64
|
-
onSelect(api);
|
|
65
|
-
api.on('reInit', onSelect);
|
|
66
|
-
api.on('select', onSelect);
|
|
67
|
-
return () => {
|
|
68
|
-
api?.off('select', onSelect);
|
|
69
|
-
};
|
|
70
|
-
}, [api, onSelect]);
|
|
71
|
-
return _jsx(CarouselContext.Provider, {
|
|
72
|
-
children: _jsx('section', {
|
|
73
|
-
'aria-roledescription': 'carousel',
|
|
74
|
-
className: cn('relative', className),
|
|
75
|
-
'data-slot': 'carousel',
|
|
76
|
-
onKeyDownCapture: handleKeyDown,
|
|
77
|
-
role: 'region',
|
|
78
|
-
...props,
|
|
79
|
-
children: children,
|
|
80
|
-
}),
|
|
81
|
-
value: {
|
|
82
|
-
api: api,
|
|
83
|
-
canScrollNext,
|
|
84
|
-
canScrollPrev,
|
|
85
|
-
carouselRef,
|
|
86
|
-
opts,
|
|
87
|
-
orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),
|
|
88
|
-
scrollNext,
|
|
89
|
-
scrollPrev,
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
function CarouselContent({ className, ...props }) {
|
|
94
|
-
const { carouselRef, orientation } = useCarousel();
|
|
95
|
-
return _jsx('div', {
|
|
96
|
-
children: _jsx('div', {
|
|
97
|
-
className: cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className),
|
|
98
|
-
...props,
|
|
99
|
-
}),
|
|
100
|
-
className: 'overflow-hidden',
|
|
101
|
-
'data-slot': 'carousel-content',
|
|
102
|
-
ref: carouselRef,
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
function CarouselItem({ className, ...props }) {
|
|
106
|
-
const { orientation } = useCarousel();
|
|
107
|
-
return _jsx('div', {
|
|
108
|
-
className: cn(
|
|
109
|
-
'min-w-0 shrink-0 grow-0 basis-full',
|
|
110
|
-
orientation === 'horizontal' ? 'pl-4' : 'pt-4',
|
|
111
|
-
className,
|
|
112
|
-
),
|
|
113
|
-
'data-slot': 'carousel-item',
|
|
114
|
-
...props,
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
function CarouselPrevious({ className, variant = 'outline', size = 'icon', ...props }) {
|
|
118
|
-
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
119
|
-
return _jsxs(Button, {
|
|
120
|
-
className: cn(
|
|
121
|
-
'absolute size-8 rounded-full',
|
|
122
|
-
orientation === 'horizontal'
|
|
123
|
-
? 'top-1/2 -left-12 -translate-y-1/2'
|
|
124
|
-
: '-top-12 left-1/2 -translate-x-1/2 rotate-90',
|
|
125
|
-
className,
|
|
126
|
-
),
|
|
127
|
-
'data-slot': 'carousel-previous',
|
|
128
|
-
disabled: !canScrollPrev,
|
|
129
|
-
onClick: scrollPrev,
|
|
130
|
-
size: size,
|
|
131
|
-
variant: variant,
|
|
132
|
-
...props,
|
|
133
|
-
children: [
|
|
134
|
-
_jsx(ArrowLeft, {}),
|
|
135
|
-
_jsx('span', { children: 'Previous slide', className: 'sr-only' }),
|
|
136
|
-
],
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
function CarouselNext({ className, variant = 'outline', size = 'icon', ...props }) {
|
|
140
|
-
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
141
|
-
return _jsxs(Button, {
|
|
142
|
-
className: cn(
|
|
143
|
-
'absolute size-8 rounded-full',
|
|
144
|
-
orientation === 'horizontal'
|
|
145
|
-
? 'top-1/2 -right-12 -translate-y-1/2'
|
|
146
|
-
: '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',
|
|
147
|
-
className,
|
|
148
|
-
),
|
|
149
|
-
'data-slot': 'carousel-next',
|
|
150
|
-
disabled: !canScrollNext,
|
|
151
|
-
onClick: scrollNext,
|
|
152
|
-
size: size,
|
|
153
|
-
variant: variant,
|
|
154
|
-
...props,
|
|
155
|
-
children: [
|
|
156
|
-
_jsx(ArrowRight, {}),
|
|
157
|
-
_jsx('span', { children: 'Next slide', className: 'sr-only' }),
|
|
158
|
-
],
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext };
|
package/dist/shadcn/chart.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as RechartsPrimitive from 'recharts';
|
|
3
|
-
import type { LegendPayload } from 'recharts/types/component/DefaultLegendContent';
|
|
4
|
-
import type { NameType, Payload, ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
5
|
-
import type { Props as LegendProps } from 'recharts/types/component/Legend';
|
|
6
|
-
import type { TooltipContentProps } from 'recharts/types/component/Tooltip';
|
|
7
|
-
declare const THEMES: {
|
|
8
|
-
readonly dark: '.dark';
|
|
9
|
-
readonly light: '';
|
|
10
|
-
};
|
|
11
|
-
export type ChartConfig = {
|
|
12
|
-
[k in string]: {
|
|
13
|
-
label?: React.ReactNode;
|
|
14
|
-
icon?: React.ComponentType;
|
|
15
|
-
} & (
|
|
16
|
-
| {
|
|
17
|
-
color?: string;
|
|
18
|
-
theme?: never;
|
|
19
|
-
}
|
|
20
|
-
| {
|
|
21
|
-
color?: never;
|
|
22
|
-
theme: Record<keyof typeof THEMES, string>;
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
declare function ChartContainer({
|
|
27
|
-
id,
|
|
28
|
-
className,
|
|
29
|
-
children,
|
|
30
|
-
config,
|
|
31
|
-
...props
|
|
32
|
-
}: React.ComponentProps<'div'> & {
|
|
33
|
-
config: ChartConfig;
|
|
34
|
-
children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];
|
|
35
|
-
}): import('react/jsx-runtime').JSX.Element;
|
|
36
|
-
declare const ChartStyle: ({
|
|
37
|
-
id,
|
|
38
|
-
config,
|
|
39
|
-
}: {
|
|
40
|
-
id: string;
|
|
41
|
-
config: ChartConfig;
|
|
42
|
-
}) => import('react/jsx-runtime').JSX.Element | null;
|
|
43
|
-
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
44
|
-
type CustomTooltipProps = TooltipContentProps<ValueType, NameType> & {
|
|
45
|
-
className?: string;
|
|
46
|
-
hideLabel?: boolean;
|
|
47
|
-
hideIndicator?: boolean;
|
|
48
|
-
indicator?: 'line' | 'dot' | 'dashed';
|
|
49
|
-
nameKey?: string;
|
|
50
|
-
labelKey?: string;
|
|
51
|
-
labelFormatter?: (
|
|
52
|
-
label: TooltipContentProps<number, string>['label'],
|
|
53
|
-
payload: TooltipContentProps<number, string>['payload'],
|
|
54
|
-
) => React.ReactNode;
|
|
55
|
-
formatter?: (
|
|
56
|
-
value: number | string,
|
|
57
|
-
name: string,
|
|
58
|
-
item: Payload<number | string, string>,
|
|
59
|
-
index: number,
|
|
60
|
-
payload: ReadonlyArray<Payload<number | string, string>>,
|
|
61
|
-
) => React.ReactNode;
|
|
62
|
-
labelClassName?: string;
|
|
63
|
-
color?: string;
|
|
64
|
-
};
|
|
65
|
-
declare function ChartTooltipContent({
|
|
66
|
-
active,
|
|
67
|
-
payload,
|
|
68
|
-
label,
|
|
69
|
-
className,
|
|
70
|
-
indicator,
|
|
71
|
-
hideLabel,
|
|
72
|
-
hideIndicator,
|
|
73
|
-
labelFormatter,
|
|
74
|
-
formatter,
|
|
75
|
-
labelClassName,
|
|
76
|
-
color,
|
|
77
|
-
nameKey,
|
|
78
|
-
labelKey,
|
|
79
|
-
}: CustomTooltipProps): import('react/jsx-runtime').JSX.Element | null;
|
|
80
|
-
declare const ChartLegend: typeof RechartsPrimitive.Legend;
|
|
81
|
-
type ChartLegendContentProps = {
|
|
82
|
-
className?: string;
|
|
83
|
-
hideIcon?: boolean;
|
|
84
|
-
verticalAlign?: LegendProps['verticalAlign'];
|
|
85
|
-
payload?: LegendPayload[];
|
|
86
|
-
nameKey?: string;
|
|
87
|
-
};
|
|
88
|
-
declare function ChartLegendContent({
|
|
89
|
-
className,
|
|
90
|
-
hideIcon,
|
|
91
|
-
payload,
|
|
92
|
-
verticalAlign,
|
|
93
|
-
nameKey,
|
|
94
|
-
}: ChartLegendContentProps): import('react/jsx-runtime').JSX.Element | null;
|
|
95
|
-
export {
|
|
96
|
-
ChartContainer,
|
|
97
|
-
ChartTooltip,
|
|
98
|
-
ChartTooltipContent,
|
|
99
|
-
ChartLegend,
|
|
100
|
-
ChartLegendContent,
|
|
101
|
-
ChartStyle,
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=chart.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/shadcn/chart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AACnG,OAAO,KAAK,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,iCAAiC,C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