@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/chart.js
DELETED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
4
|
-
import * as RechartsPrimitive from 'recharts';
|
|
5
|
-
import { useNonce } from '../hooks/use-nonce';
|
|
6
|
-
import { cn } from '../utils/cn';
|
|
7
|
-
|
|
8
|
-
const THEMES = { dark: '.dark', light: '' };
|
|
9
|
-
const ChartContext = React.createContext(null);
|
|
10
|
-
function useChart() {
|
|
11
|
-
const context = React.useContext(ChartContext);
|
|
12
|
-
if (!context) {
|
|
13
|
-
throw new Error('useChart must be used within a <ChartContainer />');
|
|
14
|
-
}
|
|
15
|
-
return context;
|
|
16
|
-
}
|
|
17
|
-
function ChartContainer({ id, className, children, config, ...props }) {
|
|
18
|
-
const uniqueId = React.useId();
|
|
19
|
-
const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;
|
|
20
|
-
return _jsx(ChartContext.Provider, {
|
|
21
|
-
children: _jsxs('div', {
|
|
22
|
-
className: cn(
|
|
23
|
-
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
24
|
-
className,
|
|
25
|
-
),
|
|
26
|
-
'data-chart': chartId,
|
|
27
|
-
'data-slot': 'chart',
|
|
28
|
-
...props,
|
|
29
|
-
children: [
|
|
30
|
-
_jsx(ChartStyle, { config: config, id: chartId }),
|
|
31
|
-
_jsx(RechartsPrimitive.ResponsiveContainer, { children: children }),
|
|
32
|
-
],
|
|
33
|
-
}),
|
|
34
|
-
value: { config },
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
const ChartStyle = ({ id, config }) => {
|
|
38
|
-
const nonce = useNonce();
|
|
39
|
-
const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);
|
|
40
|
-
if (!colorConfig.length) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
return _jsx('style', {
|
|
44
|
-
dangerouslySetInnerHTML: {
|
|
45
|
-
__html: Object.entries(THEMES)
|
|
46
|
-
.map(
|
|
47
|
-
([theme, prefix]) => `
|
|
48
|
-
${prefix} [data-chart=${id}] {
|
|
49
|
-
${colorConfig
|
|
50
|
-
.map(([key, itemConfig]) => {
|
|
51
|
-
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
52
|
-
return color ? ` --color-${key}: ${color};` : null;
|
|
53
|
-
})
|
|
54
|
-
.join('\n')}
|
|
55
|
-
}
|
|
56
|
-
`,
|
|
57
|
-
)
|
|
58
|
-
.join('\n'),
|
|
59
|
-
},
|
|
60
|
-
nonce: nonce,
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
const ChartTooltip = RechartsPrimitive.Tooltip;
|
|
64
|
-
function ChartTooltipContent({
|
|
65
|
-
active,
|
|
66
|
-
payload,
|
|
67
|
-
label,
|
|
68
|
-
className,
|
|
69
|
-
indicator = 'dot',
|
|
70
|
-
hideLabel = false,
|
|
71
|
-
hideIndicator = false,
|
|
72
|
-
labelFormatter,
|
|
73
|
-
formatter,
|
|
74
|
-
labelClassName,
|
|
75
|
-
color,
|
|
76
|
-
nameKey,
|
|
77
|
-
labelKey,
|
|
78
|
-
}) {
|
|
79
|
-
const { config } = useChart();
|
|
80
|
-
const tooltipLabel = React.useMemo(() => {
|
|
81
|
-
if (hideLabel || !payload?.length) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
const [item] = payload;
|
|
85
|
-
const key = `${labelKey || item?.dataKey || item?.name || 'value'}`;
|
|
86
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
87
|
-
const value =
|
|
88
|
-
!labelKey && typeof label === 'string' ? config[label]?.label || label : itemConfig?.label;
|
|
89
|
-
if (labelFormatter) {
|
|
90
|
-
return _jsx('div', {
|
|
91
|
-
children: labelFormatter(value, payload),
|
|
92
|
-
className: cn('font-medium', labelClassName),
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
if (!value) {
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
return _jsx('div', { children: value, className: cn('font-medium', labelClassName) });
|
|
99
|
-
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
|
|
100
|
-
if (!active || !payload?.length) {
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
const nestLabel = payload.length === 1 && indicator !== 'dot';
|
|
104
|
-
return _jsxs('div', {
|
|
105
|
-
children: [
|
|
106
|
-
!nestLabel ? tooltipLabel : null,
|
|
107
|
-
_jsx('div', {
|
|
108
|
-
children: payload.map((item, index) => {
|
|
109
|
-
const key = `${nameKey || item.name || item.dataKey || 'value'}`;
|
|
110
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
111
|
-
const indicatorColor = color || item.payload.fill || item.color;
|
|
112
|
-
return _jsx(
|
|
113
|
-
'div',
|
|
114
|
-
{
|
|
115
|
-
children:
|
|
116
|
-
formatter && item?.value !== undefined && item.name
|
|
117
|
-
? formatter(item.value, item.name, item, index, item.payload)
|
|
118
|
-
: _jsxs(_Fragment, {
|
|
119
|
-
children: [
|
|
120
|
-
itemConfig?.icon
|
|
121
|
-
? _jsx(itemConfig.icon, {})
|
|
122
|
-
: !hideIndicator &&
|
|
123
|
-
_jsx('div', {
|
|
124
|
-
className: cn(
|
|
125
|
-
'shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)',
|
|
126
|
-
{
|
|
127
|
-
'h-2.5 w-2.5': indicator === 'dot',
|
|
128
|
-
'my-0.5': nestLabel && indicator === 'dashed',
|
|
129
|
-
'w-0 border-[1.5px] border-dashed bg-transparent':
|
|
130
|
-
indicator === 'dashed',
|
|
131
|
-
'w-1': indicator === 'line',
|
|
132
|
-
},
|
|
133
|
-
),
|
|
134
|
-
style: {
|
|
135
|
-
'--color-bg': indicatorColor,
|
|
136
|
-
'--color-border': indicatorColor,
|
|
137
|
-
},
|
|
138
|
-
}),
|
|
139
|
-
_jsxs('div', {
|
|
140
|
-
children: [
|
|
141
|
-
_jsxs('div', {
|
|
142
|
-
children: [
|
|
143
|
-
nestLabel ? tooltipLabel : null,
|
|
144
|
-
_jsx('span', {
|
|
145
|
-
children: itemConfig?.label || item.name,
|
|
146
|
-
className: 'text-muted-foreground',
|
|
147
|
-
}),
|
|
148
|
-
],
|
|
149
|
-
className: 'grid gap-1.5',
|
|
150
|
-
}),
|
|
151
|
-
item.value &&
|
|
152
|
-
_jsx('span', {
|
|
153
|
-
children: item.value.toLocaleString(),
|
|
154
|
-
className: 'text-foreground font-mono font-medium tabular-nums',
|
|
155
|
-
}),
|
|
156
|
-
],
|
|
157
|
-
className: cn(
|
|
158
|
-
'flex flex-1 justify-between leading-none',
|
|
159
|
-
nestLabel ? 'items-end' : 'items-center',
|
|
160
|
-
),
|
|
161
|
-
}),
|
|
162
|
-
],
|
|
163
|
-
}),
|
|
164
|
-
className: cn(
|
|
165
|
-
'[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',
|
|
166
|
-
indicator === 'dot' && 'items-center',
|
|
167
|
-
),
|
|
168
|
-
},
|
|
169
|
-
item.dataKey,
|
|
170
|
-
);
|
|
171
|
-
}),
|
|
172
|
-
className: 'grid gap-1.5',
|
|
173
|
-
}),
|
|
174
|
-
],
|
|
175
|
-
className: cn(
|
|
176
|
-
'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-sm',
|
|
177
|
-
className,
|
|
178
|
-
),
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
const ChartLegend = RechartsPrimitive.Legend;
|
|
182
|
-
function ChartLegendContent({
|
|
183
|
-
className,
|
|
184
|
-
hideIcon = false,
|
|
185
|
-
payload,
|
|
186
|
-
verticalAlign = 'bottom',
|
|
187
|
-
nameKey,
|
|
188
|
-
}) {
|
|
189
|
-
const { config } = useChart();
|
|
190
|
-
if (!payload?.length) {
|
|
191
|
-
return null;
|
|
192
|
-
}
|
|
193
|
-
return _jsx('div', {
|
|
194
|
-
children: payload.map((item) => {
|
|
195
|
-
const key = `${nameKey || item.dataKey || 'value'}`;
|
|
196
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
197
|
-
return _jsxs(
|
|
198
|
-
'div',
|
|
199
|
-
{
|
|
200
|
-
children: [
|
|
201
|
-
itemConfig?.icon && !hideIcon
|
|
202
|
-
? _jsx(itemConfig.icon, {})
|
|
203
|
-
: _jsx('div', {
|
|
204
|
-
className: 'h-2 w-2 shrink-0 rounded-[2px]',
|
|
205
|
-
style: {
|
|
206
|
-
backgroundColor: item.color,
|
|
207
|
-
},
|
|
208
|
-
}),
|
|
209
|
-
itemConfig?.label,
|
|
210
|
-
],
|
|
211
|
-
className: cn(
|
|
212
|
-
'[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3',
|
|
213
|
-
),
|
|
214
|
-
},
|
|
215
|
-
item.value,
|
|
216
|
-
);
|
|
217
|
-
}),
|
|
218
|
-
className: cn(
|
|
219
|
-
'flex items-center justify-center gap-4',
|
|
220
|
-
verticalAlign === 'top' ? 'pb-3' : 'pt-3',
|
|
221
|
-
className,
|
|
222
|
-
),
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
function getPayloadConfigFromPayload(config, payload, key) {
|
|
226
|
-
if (typeof payload !== 'object' || payload === null) {
|
|
227
|
-
return undefined;
|
|
228
|
-
}
|
|
229
|
-
const payloadPayload =
|
|
230
|
-
'payload' in payload && typeof payload.payload === 'object' && payload.payload !== null
|
|
231
|
-
? payload.payload
|
|
232
|
-
: undefined;
|
|
233
|
-
let configLabelKey = key;
|
|
234
|
-
if (key in payload && typeof payload[key] === 'string') {
|
|
235
|
-
configLabelKey = payload[key];
|
|
236
|
-
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === 'string') {
|
|
237
|
-
configLabelKey = payloadPayload[key];
|
|
238
|
-
}
|
|
239
|
-
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
240
|
-
}
|
|
241
|
-
export {
|
|
242
|
-
ChartContainer,
|
|
243
|
-
ChartTooltip,
|
|
244
|
-
ChartTooltipContent,
|
|
245
|
-
ChartLegend,
|
|
246
|
-
ChartLegendContent,
|
|
247
|
-
ChartStyle,
|
|
248
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
declare function Checkbox({
|
|
4
|
-
className,
|
|
5
|
-
...props
|
|
6
|
-
}: React.ComponentProps<typeof CheckboxPrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
7
|
-
export { Checkbox };
|
|
8
|
-
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/shadcn/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,2CAkB7F;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/shadcn/checkbox.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
-
import { CheckIcon } from 'lucide-react';
|
|
4
|
-
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
5
|
-
import { cn } from '../utils/cn';
|
|
6
|
-
|
|
7
|
-
function Checkbox({ className, ...props }) {
|
|
8
|
-
return _jsx(CheckboxPrimitive.Root, {
|
|
9
|
-
className: cn(
|
|
10
|
-
'peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
|
11
|
-
className,
|
|
12
|
-
),
|
|
13
|
-
'data-slot': 'checkbox',
|
|
14
|
-
...props,
|
|
15
|
-
children: _jsx(CheckboxPrimitive.Indicator, {
|
|
16
|
-
children: _jsx(CheckIcon, { className: 'size-3.5' }),
|
|
17
|
-
className: 'flex items-center justify-center text-current transition-none',
|
|
18
|
-
'data-slot': 'checkbox-indicator',
|
|
19
|
-
}),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export { Checkbox };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
-
declare function Collapsible({
|
|
3
|
-
...props
|
|
4
|
-
}: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
5
|
-
declare function CollapsibleTrigger({
|
|
6
|
-
...props
|
|
7
|
-
}: React.ComponentProps<
|
|
8
|
-
typeof CollapsiblePrimitive.CollapsibleTrigger
|
|
9
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
10
|
-
declare function CollapsibleContent({
|
|
11
|
-
...props
|
|
12
|
-
}: React.ComponentProps<
|
|
13
|
-
typeof CollapsiblePrimitive.CollapsibleContent
|
|
14
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
15
|
-
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
16
|
-
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../src/shadcn/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AAEpE,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAOxF;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,2CAOtE;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,2CAOtE;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
-
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
function Collapsible({ ...props }) {
|
|
5
|
-
return _jsx(CollapsiblePrimitive.Root, { 'data-slot': 'collapsible', ...props });
|
|
6
|
-
}
|
|
7
|
-
function CollapsibleTrigger({ ...props }) {
|
|
8
|
-
return _jsx(CollapsiblePrimitive.CollapsibleTrigger, {
|
|
9
|
-
'data-slot': 'collapsible-trigger',
|
|
10
|
-
...props,
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
function CollapsibleContent({ ...props }) {
|
|
14
|
-
return _jsx(CollapsiblePrimitive.CollapsibleContent, {
|
|
15
|
-
'data-slot': 'collapsible-content',
|
|
16
|
-
...props,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
package/dist/shadcn/command.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Command as CommandPrimitive } from 'cmdk';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
import { Dialog } from './dialog';
|
|
4
|
-
declare function Command({
|
|
5
|
-
className,
|
|
6
|
-
...props
|
|
7
|
-
}: React.ComponentProps<typeof CommandPrimitive>): import('react/jsx-runtime').JSX.Element;
|
|
8
|
-
declare function CommandDialog({
|
|
9
|
-
title,
|
|
10
|
-
description,
|
|
11
|
-
children,
|
|
12
|
-
className,
|
|
13
|
-
showCloseButton,
|
|
14
|
-
...props
|
|
15
|
-
}: React.ComponentProps<typeof Dialog> & {
|
|
16
|
-
title?: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
className?: string;
|
|
19
|
-
showCloseButton?: boolean;
|
|
20
|
-
}): import('react/jsx-runtime').JSX.Element;
|
|
21
|
-
declare function CommandInput({
|
|
22
|
-
className,
|
|
23
|
-
...props
|
|
24
|
-
}: React.ComponentProps<typeof CommandPrimitive.Input>): import('react/jsx-runtime').JSX.Element;
|
|
25
|
-
declare function CommandList({
|
|
26
|
-
className,
|
|
27
|
-
...props
|
|
28
|
-
}: React.ComponentProps<typeof CommandPrimitive.List>): import('react/jsx-runtime').JSX.Element;
|
|
29
|
-
declare function CommandEmpty({
|
|
30
|
-
...props
|
|
31
|
-
}: React.ComponentProps<typeof CommandPrimitive.Empty>): import('react/jsx-runtime').JSX.Element;
|
|
32
|
-
declare function CommandGroup({
|
|
33
|
-
className,
|
|
34
|
-
...props
|
|
35
|
-
}: React.ComponentProps<typeof CommandPrimitive.Group>): import('react/jsx-runtime').JSX.Element;
|
|
36
|
-
declare function CommandSeparator({
|
|
37
|
-
className,
|
|
38
|
-
...props
|
|
39
|
-
}: React.ComponentProps<
|
|
40
|
-
typeof CommandPrimitive.Separator
|
|
41
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
42
|
-
declare function CommandItem({
|
|
43
|
-
className,
|
|
44
|
-
...props
|
|
45
|
-
}: React.ComponentProps<typeof CommandPrimitive.Item>): import('react/jsx-runtime').JSX.Element;
|
|
46
|
-
declare function CommandShortcut({
|
|
47
|
-
className,
|
|
48
|
-
...props
|
|
49
|
-
}: React.ComponentProps<'span'>): import('react/jsx-runtime').JSX.Element;
|
|
50
|
-
export {
|
|
51
|
-
Command,
|
|
52
|
-
CommandDialog,
|
|
53
|
-
CommandInput,
|
|
54
|
-
CommandList,
|
|
55
|
-
CommandEmpty,
|
|
56
|
-
CommandGroup,
|
|
57
|
-
CommandItem,
|
|
58
|
-
CommandShortcut,
|
|
59
|
-
CommandSeparator,
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=command.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/shadcn/command.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAEnD,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,MAAM,EAA+D,MAAM,UAAU,CAAC;AAE/F,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,2CAWtF;A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,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GACjB,CAAC"}
|
package/dist/shadcn/command.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { Command as CommandPrimitive } from 'cmdk';
|
|
3
|
-
import { SearchIcon } from 'lucide-react';
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
5
|
-
import { cn } from '../utils/cn';
|
|
6
|
-
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';
|
|
7
|
-
|
|
8
|
-
function Command({ className, ...props }) {
|
|
9
|
-
return _jsx(CommandPrimitive, {
|
|
10
|
-
className: cn(
|
|
11
|
-
'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',
|
|
12
|
-
className,
|
|
13
|
-
),
|
|
14
|
-
'data-slot': 'command',
|
|
15
|
-
...props,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function CommandDialog({
|
|
19
|
-
title = 'Command Palette',
|
|
20
|
-
description = 'Search for a command to run...',
|
|
21
|
-
children,
|
|
22
|
-
className,
|
|
23
|
-
showCloseButton = true,
|
|
24
|
-
...props
|
|
25
|
-
}) {
|
|
26
|
-
return _jsxs(Dialog, {
|
|
27
|
-
...props,
|
|
28
|
-
children: [
|
|
29
|
-
_jsxs(DialogHeader, {
|
|
30
|
-
children: [
|
|
31
|
-
_jsx(DialogTitle, { children: title }),
|
|
32
|
-
_jsx(DialogDescription, { children: description }),
|
|
33
|
-
],
|
|
34
|
-
className: 'sr-only',
|
|
35
|
-
}),
|
|
36
|
-
_jsx(DialogContent, {
|
|
37
|
-
children: _jsx(Command, {
|
|
38
|
-
children: children,
|
|
39
|
-
className:
|
|
40
|
-
'[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5',
|
|
41
|
-
}),
|
|
42
|
-
className: cn('overflow-hidden p-0', className),
|
|
43
|
-
showCloseButton: showCloseButton,
|
|
44
|
-
}),
|
|
45
|
-
],
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function CommandInput({ className, ...props }) {
|
|
49
|
-
return _jsxs('div', {
|
|
50
|
-
children: [
|
|
51
|
-
_jsx(SearchIcon, { className: 'size-4 shrink-0 opacity-50' }),
|
|
52
|
-
_jsx(CommandPrimitive.Input, {
|
|
53
|
-
className: cn(
|
|
54
|
-
'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
|
|
55
|
-
className,
|
|
56
|
-
),
|
|
57
|
-
'data-slot': 'command-input',
|
|
58
|
-
...props,
|
|
59
|
-
}),
|
|
60
|
-
],
|
|
61
|
-
className: 'flex h-9 items-center gap-2 border-b px-3',
|
|
62
|
-
'data-slot': 'command-input-wrapper',
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
function CommandList({ className, ...props }) {
|
|
66
|
-
return _jsx(CommandPrimitive.List, {
|
|
67
|
-
className: cn('max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto', className),
|
|
68
|
-
'data-slot': 'command-list',
|
|
69
|
-
...props,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
function CommandEmpty({ ...props }) {
|
|
73
|
-
return _jsx(CommandPrimitive.Empty, {
|
|
74
|
-
className: 'py-6 text-center text-sm',
|
|
75
|
-
'data-slot': 'command-empty',
|
|
76
|
-
...props,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function CommandGroup({ className, ...props }) {
|
|
80
|
-
return _jsx(CommandPrimitive.Group, {
|
|
81
|
-
className: cn(
|
|
82
|
-
'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',
|
|
83
|
-
className,
|
|
84
|
-
),
|
|
85
|
-
'data-slot': 'command-group',
|
|
86
|
-
...props,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
function CommandSeparator({ className, ...props }) {
|
|
90
|
-
return _jsx(CommandPrimitive.Separator, {
|
|
91
|
-
className: cn('bg-border -mx-1 h-px', className),
|
|
92
|
-
'data-slot': 'command-separator',
|
|
93
|
-
...props,
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
function CommandItem({ className, ...props }) {
|
|
97
|
-
return _jsx(CommandPrimitive.Item, {
|
|
98
|
-
className: cn(
|
|
99
|
-
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
100
|
-
className,
|
|
101
|
-
),
|
|
102
|
-
'data-slot': 'command-item',
|
|
103
|
-
...props,
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
function CommandShortcut({ className, ...props }) {
|
|
107
|
-
return _jsx('span', {
|
|
108
|
-
className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className),
|
|
109
|
-
'data-slot': 'command-shortcut',
|
|
110
|
-
...props,
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
export {
|
|
114
|
-
Command,
|
|
115
|
-
CommandDialog,
|
|
116
|
-
CommandInput,
|
|
117
|
-
CommandList,
|
|
118
|
-
CommandEmpty,
|
|
119
|
-
CommandGroup,
|
|
120
|
-
CommandItem,
|
|
121
|
-
CommandShortcut,
|
|
122
|
-
CommandSeparator,
|
|
123
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
declare function ContextMenu({
|
|
4
|
-
...props
|
|
5
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Root>): import('react/jsx-runtime').JSX.Element;
|
|
6
|
-
declare function ContextMenuTrigger({
|
|
7
|
-
...props
|
|
8
|
-
}: React.ComponentProps<
|
|
9
|
-
typeof ContextMenuPrimitive.Trigger
|
|
10
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
11
|
-
declare function ContextMenuGroup({
|
|
12
|
-
...props
|
|
13
|
-
}: React.ComponentProps<
|
|
14
|
-
typeof ContextMenuPrimitive.Group
|
|
15
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
16
|
-
declare function ContextMenuPortal({
|
|
17
|
-
...props
|
|
18
|
-
}: React.ComponentProps<
|
|
19
|
-
typeof ContextMenuPrimitive.Portal
|
|
20
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
21
|
-
declare function ContextMenuSub({
|
|
22
|
-
...props
|
|
23
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Sub>): import('react/jsx-runtime').JSX.Element;
|
|
24
|
-
declare function ContextMenuRadioGroup({
|
|
25
|
-
...props
|
|
26
|
-
}: React.ComponentProps<
|
|
27
|
-
typeof ContextMenuPrimitive.RadioGroup
|
|
28
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
29
|
-
declare function ContextMenuSubTrigger({
|
|
30
|
-
className,
|
|
31
|
-
inset,
|
|
32
|
-
children,
|
|
33
|
-
...props
|
|
34
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
35
|
-
inset?: boolean;
|
|
36
|
-
}): import('react/jsx-runtime').JSX.Element;
|
|
37
|
-
declare function ContextMenuSubContent({
|
|
38
|
-
className,
|
|
39
|
-
...props
|
|
40
|
-
}: React.ComponentProps<
|
|
41
|
-
typeof ContextMenuPrimitive.SubContent
|
|
42
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
43
|
-
declare function ContextMenuContent({
|
|
44
|
-
className,
|
|
45
|
-
...props
|
|
46
|
-
}: React.ComponentProps<
|
|
47
|
-
typeof ContextMenuPrimitive.Content
|
|
48
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
49
|
-
declare function ContextMenuItem({
|
|
50
|
-
className,
|
|
51
|
-
inset,
|
|
52
|
-
variant,
|
|
53
|
-
...props
|
|
54
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
55
|
-
inset?: boolean;
|
|
56
|
-
variant?: 'default' | 'destructive';
|
|
57
|
-
}): import('react/jsx-runtime').JSX.Element;
|
|
58
|
-
declare function ContextMenuCheckboxItem({
|
|
59
|
-
className,
|
|
60
|
-
children,
|
|
61
|
-
checked,
|
|
62
|
-
...props
|
|
63
|
-
}: React.ComponentProps<
|
|
64
|
-
typeof ContextMenuPrimitive.CheckboxItem
|
|
65
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
66
|
-
declare function ContextMenuRadioItem({
|
|
67
|
-
className,
|
|
68
|
-
children,
|
|
69
|
-
...props
|
|
70
|
-
}: React.ComponentProps<
|
|
71
|
-
typeof ContextMenuPrimitive.RadioItem
|
|
72
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
73
|
-
declare function ContextMenuLabel({
|
|
74
|
-
className,
|
|
75
|
-
inset,
|
|
76
|
-
...props
|
|
77
|
-
}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
78
|
-
inset?: boolean;
|
|
79
|
-
}): import('react/jsx-runtime').JSX.Element;
|
|
80
|
-
declare function ContextMenuSeparator({
|
|
81
|
-
className,
|
|
82
|
-
...props
|
|
83
|
-
}: React.ComponentProps<
|
|
84
|
-
typeof ContextMenuPrimitive.Separator
|
|
85
|
-
>): import('react/jsx-runtime').JSX.Element;
|
|
86
|
-
declare function ContextMenuShortcut({
|
|
87
|
-
className,
|
|
88
|
-
...props
|
|
89
|
-
}: React.ComponentProps<'span'>): import('react/jsx-runtime').JSX.Element;
|
|
90
|
-
export {
|
|
91
|
-
ContextMenu,
|
|
92
|
-
ContextMenuTrigger,
|
|
93
|
-
ContextMenuContent,
|
|
94
|
-
ContextMenuItem,
|
|
95
|
-
ContextMenuCheckboxItem,
|
|
96
|
-
ContextMenuRadioItem,
|
|
97
|
-
ContextMenuLabel,
|
|
98
|
-
ContextMenuSeparator,
|
|
99
|
-
ContextMenuShortcut,
|
|
100
|
-
ContextMenuGroup,
|
|
101
|
-
ContextMenuPortal,
|
|
102
|
-
ContextMenuSub,
|
|
103
|
-
ContextMenuSubContent,
|
|
104
|
-
ContextMenuSubTrigger,
|
|
105
|
-
ContextMenuRadioGroup,
|
|
106
|
-
};
|
|
107
|
-
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../src/shadcn/context-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAErE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAOxF;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,2CAO3D;AAED,iBAAS,gBAAgB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,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