@codefast/ui 0.3.13-canary.3 → 0.3.13
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/CHANGELOG.md +44 -0
- package/dist/components/accordion.d.mts +37 -0
- package/dist/components/accordion.mjs +53 -0
- package/dist/components/alert-dialog.d.mts +74 -0
- package/dist/components/alert-dialog.mjs +92 -0
- package/dist/components/alert.d.mts +30 -0
- package/dist/components/alert.mjs +49 -0
- package/dist/components/aspect-ratio.d.mts +10 -0
- package/dist/components/aspect-ratio.mjs +12 -0
- package/dist/components/avatar.d.mts +21 -0
- package/dist/components/avatar.mjs +28 -0
- package/dist/components/badge.d.mts +24 -0
- package/dist/components/badge.mjs +56 -0
- package/dist/components/breadcrumb.d.mts +44 -0
- package/dist/components/breadcrumb.mjs +67 -0
- package/dist/components/button-group.d.mts +34 -0
- package/dist/components/button-group.mjs +53 -0
- package/dist/components/button.d.mts +38 -0
- package/dist/components/button.mjs +99 -0
- package/dist/components/calendar.d.mts +27 -0
- package/dist/components/calendar.mjs +114 -0
- package/dist/components/card.d.mts +41 -0
- package/dist/components/card.mjs +55 -0
- package/dist/components/carousel.d.mts +68 -0
- package/dist/components/carousel.mjs +135 -0
- package/dist/components/chart.d.mts +93 -0
- package/dist/components/chart.mjs +189 -0
- package/dist/components/checkbox-cards.d.mts +17 -0
- package/dist/components/checkbox-cards.mjs +30 -0
- package/dist/components/checkbox-group.d.mts +16 -0
- package/dist/components/checkbox-group.mjs +27 -0
- package/dist/components/checkbox.d.mts +11 -0
- package/dist/components/checkbox.mjs +20 -0
- package/dist/components/collapsible.d.mts +18 -0
- package/dist/components/collapsible.mjs +24 -0
- package/dist/components/command.d.mts +57 -0
- package/dist/components/command.mjs +92 -0
- package/dist/components/context-menu.d.mts +91 -0
- package/dist/components/context-menu.mjs +122 -0
- package/dist/components/dialog.d.mts +65 -0
- package/dist/components/dialog.mjs +93 -0
- package/dist/components/drawer.d.mts +65 -0
- package/dist/components/drawer.mjs +78 -0
- package/dist/components/dropdown-menu.d.mts +92 -0
- package/dist/components/dropdown-menu.mjs +129 -0
- package/dist/components/empty.d.mts +44 -0
- package/dist/components/empty.mjs +64 -0
- package/dist/components/field.d.mts +79 -0
- package/dist/components/field.mjs +132 -0
- package/dist/components/form.d.mts +48 -0
- package/dist/components/form.mjs +92 -0
- package/dist/components/hover-card.d.mts +26 -0
- package/dist/components/hover-card.mjs +35 -0
- package/dist/components/input-group.d.mts +61 -0
- package/dist/components/input-group.mjs +142 -0
- package/dist/components/input-number.d.mts +28 -0
- package/dist/components/input-number.mjs +61 -0
- package/dist/components/input-otp.d.mts +29 -0
- package/dist/components/input-otp.mjs +48 -0
- package/dist/components/input-password.d.mts +13 -0
- package/dist/components/input-password.mjs +38 -0
- package/dist/components/input-search.d.mts +20 -0
- package/dist/components/input-search.mjs +50 -0
- package/dist/components/input.d.mts +11 -0
- package/dist/components/input.mjs +14 -0
- package/dist/components/item.d.mts +82 -0
- package/dist/components/item.mjs +137 -0
- package/dist/components/kbd.d.mts +15 -0
- package/dist/components/kbd.mjs +19 -0
- package/dist/components/label.d.mts +11 -0
- package/dist/components/label.mjs +14 -0
- package/dist/components/menubar.d.mts +100 -0
- package/dist/components/menubar.mjs +133 -0
- package/dist/components/native-select.d.mts +19 -0
- package/dist/components/native-select.mjs +34 -0
- package/dist/components/navigation-menu.d.mts +44 -0
- package/dist/components/navigation-menu.mjs +79 -0
- package/dist/components/pagination.d.mts +46 -0
- package/dist/components/pagination.mjs +71 -0
- package/dist/components/popover.d.mts +30 -0
- package/dist/components/popover.mjs +41 -0
- package/dist/components/progress-circle.d.mts +124 -0
- package/dist/components/progress-circle.mjs +120 -0
- package/dist/components/progress.d.mts +12 -0
- package/dist/components/progress.mjs +19 -0
- package/dist/components/{radio-cards.d.ts → radio-cards.d.mts} +10 -5
- package/dist/components/radio-cards.mjs +29 -0
- package/dist/components/radio-group.d.mts +16 -0
- package/dist/components/radio-group.mjs +25 -0
- package/dist/components/radio.d.mts +14 -0
- package/dist/components/radio.mjs +16 -0
- package/dist/components/resizable.d.mts +23 -0
- package/dist/components/resizable.mjs +32 -0
- package/dist/components/scroll-area.d.mts +40 -0
- package/dist/components/scroll-area.mjs +101 -0
- package/dist/components/select.d.mts +62 -0
- package/dist/components/select.mjs +101 -0
- package/dist/components/separator.d.mts +32 -0
- package/dist/components/separator.mjs +45 -0
- package/dist/components/sheet.d.mts +75 -0
- package/dist/components/sheet.mjs +134 -0
- package/dist/components/sidebar.d.mts +195 -0
- package/dist/components/sidebar.mjs +375 -0
- package/dist/components/skeleton.d.mts +10 -0
- package/dist/components/skeleton.mjs +12 -0
- package/dist/components/slider.d.mts +15 -0
- package/dist/components/slider.mjs +40 -0
- package/dist/components/sonner.d.mts +10 -0
- package/dist/components/sonner.mjs +21 -0
- package/dist/components/spinner.d.mts +14 -0
- package/dist/components/spinner.mjs +40 -0
- package/dist/components/switch.d.mts +11 -0
- package/dist/components/switch.mjs +18 -0
- package/dist/components/table.d.mts +45 -0
- package/dist/components/table.mjs +65 -0
- package/dist/components/tabs.d.mts +26 -0
- package/dist/components/tabs.mjs +35 -0
- package/dist/components/textarea.d.mts +10 -0
- package/dist/components/textarea.mjs +12 -0
- package/dist/components/toggle-group.d.mts +30 -0
- package/dist/components/toggle-group.mjs +53 -0
- package/dist/components/toggle.d.mts +28 -0
- package/dist/components/toggle.mjs +53 -0
- package/dist/components/tooltip.d.mts +30 -0
- package/dist/components/tooltip.mjs +42 -0
- package/dist/hooks/{use-animated-value.d.ts → use-animated-value.d.mts} +4 -2
- package/dist/hooks/use-animated-value.mjs +62 -0
- package/dist/hooks/{use-copy-to-clipboard.d.ts → use-copy-to-clipboard.d.mts} +11 -6
- package/dist/hooks/use-copy-to-clipboard.mjs +43 -0
- package/dist/hooks/{use-is-mobile.d.ts → use-is-mobile.d.mts} +4 -2
- package/dist/hooks/use-is-mobile.mjs +26 -0
- package/dist/hooks/{use-media-query.d.ts → use-media-query.d.mts} +4 -2
- package/dist/hooks/use-media-query.mjs +50 -0
- package/dist/hooks/{use-mutation-observer.d.ts → use-mutation-observer.d.mts} +6 -3
- package/dist/hooks/use-mutation-observer.mjs +41 -0
- package/dist/hooks/use-pagination.d.mts +44 -0
- package/dist/hooks/use-pagination.mjs +107 -0
- package/dist/index.d.mts +69 -0
- package/dist/index.mjs +69 -0
- package/dist/lib/utils.d.mts +13 -0
- package/dist/lib/utils.mjs +10 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/clsx.d.mts +6 -0
- package/dist/primitives/checkbox-group.d.mts +144 -0
- package/dist/primitives/checkbox-group.mjs +126 -0
- package/dist/primitives/input-number.d.mts +73 -0
- package/dist/primitives/input-number.mjs +514 -0
- package/dist/primitives/input.d.mts +72 -0
- package/dist/primitives/input.mjs +75 -0
- package/dist/primitives/progress-circle.d.mts +146 -0
- package/dist/primitives/progress-circle.mjs +178 -0
- package/package.json +164 -170
- package/dist/components/accordion.d.ts +0 -19
- package/dist/components/accordion.d.ts.map +0 -1
- package/dist/components/accordion.js +0 -26
- package/dist/components/alert-dialog.d.ts +0 -39
- package/dist/components/alert-dialog.d.ts.map +0 -1
- package/dist/components/alert-dialog.js +0 -39
- package/dist/components/alert.d.ts +0 -19
- package/dist/components/alert.d.ts.map +0 -1
- package/dist/components/alert.js +0 -41
- package/dist/components/aspect-ratio.d.ts +0 -7
- package/dist/components/aspect-ratio.d.ts.map +0 -1
- package/dist/components/aspect-ratio.js +0 -10
- package/dist/components/avatar.d.ts +0 -11
- package/dist/components/avatar.d.ts.map +0 -1
- package/dist/components/avatar.js +0 -17
- package/dist/components/badge.d.ts +0 -18
- package/dist/components/badge.d.ts.map +0 -1
- package/dist/components/badge.js +0 -59
- package/dist/components/breadcrumb.d.ts +0 -22
- package/dist/components/breadcrumb.d.ts.map +0 -1
- package/dist/components/breadcrumb.js +0 -31
- package/dist/components/button-group.d.ts +0 -20
- package/dist/components/button-group.d.ts.map +0 -1
- package/dist/components/button-group.js +0 -48
- package/dist/components/button.d.ts +0 -29
- package/dist/components/button.d.ts.map +0 -1
- package/dist/components/button.js +0 -92
- package/dist/components/calendar.d.ts +0 -13
- package/dist/components/calendar.d.ts.map +0 -1
- package/dist/components/calendar.js +0 -104
- package/dist/components/card.d.ts +0 -18
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/card.js +0 -27
- package/dist/components/carousel.d.ts +0 -38
- package/dist/components/carousel.d.ts.map +0 -1
- package/dist/components/carousel.js +0 -103
- package/dist/components/chart.d.ts +0 -58
- package/dist/components/chart.d.ts.map +0 -1
- package/dist/components/chart.js +0 -198
- package/dist/components/checkbox-cards.d.ts +0 -11
- package/dist/components/checkbox-cards.d.ts.map +0 -1
- package/dist/components/checkbox-cards.js +0 -16
- package/dist/components/checkbox-group.d.ts +0 -9
- package/dist/components/checkbox-group.d.ts.map +0 -1
- package/dist/components/checkbox-group.js +0 -15
- package/dist/components/checkbox.d.ts +0 -7
- package/dist/components/checkbox.d.ts.map +0 -1
- package/dist/components/checkbox.js +0 -12
- package/dist/components/collapsible.d.ts +0 -11
- package/dist/components/collapsible.d.ts.map +0 -1
- package/dist/components/collapsible.js +0 -16
- package/dist/components/command.d.ts +0 -26
- package/dist/components/command.d.ts.map +0 -1
- package/dist/components/command.js +0 -41
- package/dist/components/context-menu.d.ts +0 -42
- package/dist/components/context-menu.d.ts.map +0 -1
- package/dist/components/context-menu.js +0 -54
- package/dist/components/dialog.d.ts +0 -35
- package/dist/components/dialog.d.ts.map +0 -1
- package/dist/components/dialog.js +0 -41
- package/dist/components/drawer.d.ts +0 -34
- package/dist/components/drawer.d.ts.map +0 -1
- package/dist/components/drawer.js +0 -36
- package/dist/components/dropdown-menu.d.ts +0 -42
- package/dist/components/dropdown-menu.d.ts.map +0 -1
- package/dist/components/dropdown-menu.js +0 -54
- package/dist/components/empty.d.ts +0 -23
- package/dist/components/empty.d.ts.map +0 -1
- package/dist/components/empty.js +0 -47
- package/dist/components/field.d.ts +0 -42
- package/dist/components/field.d.ts.map +0 -1
- package/dist/components/field.js +0 -85
- package/dist/components/form.d.ts +0 -27
- package/dist/components/form.d.ts.map +0 -1
- package/dist/components/form.js +0 -76
- package/dist/components/hover-card.d.ts +0 -13
- package/dist/components/hover-card.d.ts.map +0 -1
- package/dist/components/hover-card.js +0 -20
- package/dist/components/input-group.d.ts +0 -37
- package/dist/components/input-group.d.ts.map +0 -1
- package/dist/components/input-group.js +0 -127
- package/dist/components/input-number.d.ts +0 -8
- package/dist/components/input-number.d.ts.map +0 -1
- package/dist/components/input-number.js +0 -20
- package/dist/components/input-otp.d.ts +0 -16
- package/dist/components/input-otp.d.ts.map +0 -1
- package/dist/components/input-otp.js +0 -25
- package/dist/components/input-password.d.ts +0 -7
- package/dist/components/input-password.d.ts.map +0 -1
- package/dist/components/input-password.js +0 -17
- package/dist/components/input-search.d.ts +0 -11
- package/dist/components/input-search.d.ts.map +0 -1
- package/dist/components/input-search.js +0 -22
- package/dist/components/input.d.ts +0 -6
- package/dist/components/input.d.ts.map +0 -1
- package/dist/components/input.js +0 -10
- package/dist/components/item.d.ts +0 -46
- package/dist/components/item.d.ts.map +0 -1
- package/dist/components/item.js +0 -94
- package/dist/components/kbd.d.ts +0 -8
- package/dist/components/kbd.d.ts.map +0 -1
- package/dist/components/kbd.js +0 -12
- package/dist/components/label.d.ts +0 -7
- package/dist/components/label.d.ts.map +0 -1
- package/dist/components/label.js +0 -11
- package/dist/components/menubar.d.ts +0 -44
- package/dist/components/menubar.d.ts.map +0 -1
- package/dist/components/menubar.js +0 -57
- package/dist/components/native-select.d.ts +0 -10
- package/dist/components/native-select.d.ts.map +0 -1
- package/dist/components/native-select.js +0 -16
- package/dist/components/navigation-menu.d.ts +0 -21
- package/dist/components/navigation-menu.d.ts.map +0 -1
- package/dist/components/navigation-menu.js +0 -43
- package/dist/components/pagination.d.ts +0 -26
- package/dist/components/pagination.d.ts.map +0 -1
- package/dist/components/pagination.js +0 -29
- package/dist/components/popover.d.ts +0 -15
- package/dist/components/popover.d.ts.map +0 -1
- package/dist/components/popover.js +0 -23
- package/dist/components/progress-circle.d.ts +0 -107
- package/dist/components/progress-circle.d.ts.map +0 -1
- package/dist/components/progress-circle.js +0 -83
- package/dist/components/progress.d.ts +0 -7
- package/dist/components/progress.d.ts.map +0 -1
- package/dist/components/progress.js +0 -13
- package/dist/components/radio-cards.d.ts.map +0 -1
- package/dist/components/radio-cards.js +0 -15
- package/dist/components/radio-group.d.ts +0 -9
- package/dist/components/radio-group.d.ts.map +0 -1
- package/dist/components/radio-group.js +0 -14
- package/dist/components/radio.d.ts +0 -8
- package/dist/components/radio.d.ts.map +0 -1
- package/dist/components/radio.js +0 -11
- package/dist/components/resizable.d.ts +0 -13
- package/dist/components/resizable.d.ts.map +0 -1
- package/dist/components/resizable.js +0 -18
- package/dist/components/scroll-area.d.ts +0 -28
- package/dist/components/scroll-area.d.ts.map +0 -1
- package/dist/components/scroll-area.js +0 -77
- package/dist/components/select.d.ts +0 -29
- package/dist/components/select.d.ts.map +0 -1
- package/dist/components/select.js +0 -49
- package/dist/components/separator.d.ts +0 -23
- package/dist/components/separator.d.ts.map +0 -1
- package/dist/components/separator.js +0 -36
- package/dist/components/sheet.d.ts +0 -43
- package/dist/components/sheet.d.ts.map +0 -1
- package/dist/components/sheet.js +0 -90
- package/dist/components/sidebar.d.ts +0 -102
- package/dist/components/sidebar.d.ts.map +0 -1
- package/dist/components/sidebar.js +0 -241
- package/dist/components/skeleton.d.ts +0 -6
- package/dist/components/skeleton.d.ts.map +0 -1
- package/dist/components/skeleton.js +0 -9
- package/dist/components/slider.d.ts +0 -7
- package/dist/components/slider.d.ts.map +0 -1
- package/dist/components/slider.js +0 -18
- package/dist/components/sonner.d.ts +0 -8
- package/dist/components/sonner.d.ts.map +0 -1
- package/dist/components/sonner.js +0 -18
- package/dist/components/spinner.d.ts +0 -8
- package/dist/components/spinner.d.ts.map +0 -1
- package/dist/components/spinner.js +0 -27
- package/dist/components/switch.d.ts +0 -7
- package/dist/components/switch.d.ts.map +0 -1
- package/dist/components/switch.js +0 -11
- package/dist/components/table.d.ts +0 -20
- package/dist/components/table.d.ts.map +0 -1
- package/dist/components/table.js +0 -30
- package/dist/components/tabs.d.ts +0 -13
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/tabs.js +0 -20
- package/dist/components/textarea.d.ts +0 -6
- package/dist/components/textarea.d.ts.map +0 -1
- package/dist/components/textarea.js +0 -9
- package/dist/components/toggle-group.d.ts +0 -16
- package/dist/components/toggle-group.d.ts.map +0 -1
- package/dist/components/toggle-group.js +0 -35
- package/dist/components/toggle.d.ts +0 -21
- package/dist/components/toggle.d.ts.map +0 -1
- package/dist/components/toggle.js +0 -49
- package/dist/components/tooltip.d.ts +0 -15
- package/dist/components/tooltip.d.ts.map +0 -1
- package/dist/components/tooltip.js +0 -23
- package/dist/hooks/use-animated-value.d.ts.map +0 -1
- package/dist/hooks/use-animated-value.js +0 -71
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +0 -1
- package/dist/hooks/use-copy-to-clipboard.js +0 -46
- package/dist/hooks/use-is-mobile.d.ts.map +0 -1
- package/dist/hooks/use-is-mobile.js +0 -23
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-media-query.js +0 -53
- package/dist/hooks/use-mutation-observer.d.ts.map +0 -1
- package/dist/hooks/use-mutation-observer.js +0 -40
- package/dist/hooks/use-pagination.d.ts +0 -37
- package/dist/hooks/use-pagination.d.ts.map +0 -1
- package/dist/hooks/use-pagination.js +0 -107
- package/dist/index.d.ts +0 -131
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -68
- package/dist/lib/utils.d.ts +0 -10
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -10
- package/dist/primitives/checkbox-group.d.ts +0 -123
- package/dist/primitives/checkbox-group.d.ts.map +0 -1
- package/dist/primitives/checkbox-group.js +0 -112
- package/dist/primitives/input-number.d.ts +0 -63
- package/dist/primitives/input-number.d.ts.map +0 -1
- package/dist/primitives/input-number.js +0 -458
- package/dist/primitives/input.d.ts +0 -67
- package/dist/primitives/input.d.ts.map +0 -1
- package/dist/primitives/input.js +0 -76
- package/dist/primitives/progress-circle.d.ts +0 -116
- package/dist/primitives/progress-circle.d.ts.map +0 -1
- package/dist/primitives/progress-circle.js +0 -163
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
//#region src/hooks/use-copy-to-clipboard.ts
|
|
4
|
+
/**
|
|
5
|
+
* Provide clipboard copy capability with a transient copied state.
|
|
6
|
+
*
|
|
7
|
+
* Internally uses the Clipboard API when available and sets a temporary
|
|
8
|
+
* `isCopied` flag for UI feedback. A custom callback may be invoked upon copy.
|
|
9
|
+
*
|
|
10
|
+
* @param options - Configuration options.
|
|
11
|
+
* - onCopy: Callback invoked after a successful copy.
|
|
12
|
+
* - timeout: Duration in milliseconds to keep `isCopied` true. Defaults to 2000.
|
|
13
|
+
* @returns An object with a `copyToClipboard` function and an `isCopied` flag.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* const { copyToClipboard, isCopied } = useCopyToClipboard({ timeout: 1500 });
|
|
18
|
+
* <button onClick={() => copyToClipboard("Hello")}>{isCopied ? "Copied" : "Copy"}</button>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
function useCopyToClipboard({ onCopy, timeout = 2e3 } = {}) {
|
|
22
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
23
|
+
const copyToClipboard = async (value) => {
|
|
24
|
+
if (typeof window === "undefined" || !("clipboard" in navigator) || typeof navigator.clipboard.writeText !== "function") return;
|
|
25
|
+
if (!value) return;
|
|
26
|
+
try {
|
|
27
|
+
await navigator.clipboard.writeText(value);
|
|
28
|
+
setIsCopied(true);
|
|
29
|
+
if (onCopy) onCopy();
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
setIsCopied(false);
|
|
32
|
+
}, timeout);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
console.error(error);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return {
|
|
38
|
+
copyToClipboard,
|
|
39
|
+
isCopied
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { useCopyToClipboard };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/hooks/use-is-mobile.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Determine whether the current viewport should be treated as mobile.
|
|
3
4
|
*
|
|
@@ -16,5 +17,6 @@
|
|
|
16
17
|
* }
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
|
-
//#
|
|
20
|
+
declare function useIsMobile(mobileBreakpoint?: number): boolean;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { useIsMobile };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMediaQuery } from "./use-media-query.mjs";
|
|
3
|
+
//#region src/hooks/use-is-mobile.ts
|
|
4
|
+
/**
|
|
5
|
+
* Determine whether the current viewport should be treated as mobile.
|
|
6
|
+
*
|
|
7
|
+
* Uses {@link useMediaQuery} to evaluate a max-width media query derived from the
|
|
8
|
+
* provided breakpoint. By default, widths below 768px are considered mobile.
|
|
9
|
+
*
|
|
10
|
+
* @param mobileBreakpoint - Pixel width used as the mobile breakpoint. Values strictly
|
|
11
|
+
* less than this breakpoint are treated as mobile. Defaults to 768.
|
|
12
|
+
* @returns true when the viewport width is less than the given breakpoint; otherwise false.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const isMobile = useIsMobile();
|
|
17
|
+
* if (isMobile) {
|
|
18
|
+
* // Render compact layout
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function useIsMobile(mobileBreakpoint = 768) {
|
|
23
|
+
return useMediaQuery(`(max-width: ${(mobileBreakpoint - 1).toString()}px)`);
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { useIsMobile };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/hooks/use-media-query.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Subscribe to a CSS media query and receive its match state.
|
|
3
4
|
*
|
|
@@ -12,5 +13,6 @@
|
|
|
12
13
|
* const isNarrow = useMediaQuery("(max-width: 768px)");
|
|
13
14
|
* ```
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
-
//#
|
|
16
|
+
declare function useMediaQuery(query: string): boolean;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { useMediaQuery };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
//#region src/hooks/use-media-query.ts
|
|
4
|
+
/**
|
|
5
|
+
* Subscribe to a CSS media query and receive its match state.
|
|
6
|
+
*
|
|
7
|
+
* Evaluates the query immediately (when supported) and updates on changes
|
|
8
|
+
* via an event listener.
|
|
9
|
+
*
|
|
10
|
+
* @param query - A valid media query string (e.g., "(max-width: 768px)").
|
|
11
|
+
* @returns true when the media query currently matches; otherwise false.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const isNarrow = useMediaQuery("(max-width: 768px)");
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
function useMediaQuery(query) {
|
|
19
|
+
/**
|
|
20
|
+
* State to store whether the query matches.
|
|
21
|
+
* The initial value is calculated based on the current window state.
|
|
22
|
+
*/
|
|
23
|
+
const [matches, setMatches] = useState(() => {
|
|
24
|
+
if (typeof window !== "undefined" && typeof window.matchMedia === "function") return window.matchMedia(query).matches;
|
|
25
|
+
return false;
|
|
26
|
+
});
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (typeof window === "undefined") return;
|
|
29
|
+
/**
|
|
30
|
+
* MediaQueryList to evaluate and observe the provided query.
|
|
31
|
+
*/
|
|
32
|
+
const mediaQueryList = window.matchMedia(query);
|
|
33
|
+
/**
|
|
34
|
+
* Update state when the media query status changes.
|
|
35
|
+
*/
|
|
36
|
+
const onChange = (event) => {
|
|
37
|
+
setMatches(event.matches);
|
|
38
|
+
};
|
|
39
|
+
mediaQueryList.addEventListener("change", onChange);
|
|
40
|
+
/**
|
|
41
|
+
* Remove the event listener on unmount or when the query changes.
|
|
42
|
+
*/
|
|
43
|
+
return () => {
|
|
44
|
+
mediaQueryList.removeEventListener("change", onChange);
|
|
45
|
+
};
|
|
46
|
+
}, [query]);
|
|
47
|
+
return matches;
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { useMediaQuery };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/hooks/use-mutation-observer.d.ts
|
|
2
4
|
/**
|
|
3
5
|
* Observe DOM mutations on a referenced element and invoke a callback.
|
|
4
6
|
*
|
|
@@ -12,5 +14,6 @@ import type { RefObject } from "react";
|
|
|
12
14
|
*
|
|
13
15
|
* @see [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver)
|
|
14
16
|
*/
|
|
15
|
-
|
|
16
|
-
//#
|
|
17
|
+
declare function useMutationObserver(ref: RefObject<HTMLElement | null>, callback: MutationCallback, options?: MutationObserverInit): void;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { useMutationObserver };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
//#region src/hooks/use-mutation-observer.ts
|
|
4
|
+
/**
|
|
5
|
+
* Default options for MutationObserver observing common mutation types.
|
|
6
|
+
*/
|
|
7
|
+
const defaultOptions = {
|
|
8
|
+
attributes: true,
|
|
9
|
+
characterData: true,
|
|
10
|
+
childList: true,
|
|
11
|
+
subtree: true
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Observe DOM mutations on a referenced element and invoke a callback.
|
|
15
|
+
*
|
|
16
|
+
* Attaches a MutationObserver to the provided element reference with the given
|
|
17
|
+
* options and calls the callback whenever mutations occur.
|
|
18
|
+
*
|
|
19
|
+
* @param ref - Ref to the target HTMLElement to observe.
|
|
20
|
+
* @param callback - Mutation callback invoked with observed records.
|
|
21
|
+
* @param options - Observer configuration. Defaults watch attributes, characterData, childList, subtree.
|
|
22
|
+
* @returns void
|
|
23
|
+
*
|
|
24
|
+
* @see [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver)
|
|
25
|
+
*/
|
|
26
|
+
function useMutationObserver(ref, callback, options = defaultOptions) {
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (!ref.current) return;
|
|
29
|
+
const observer = new MutationObserver(callback);
|
|
30
|
+
observer.observe(ref.current, options);
|
|
31
|
+
return () => {
|
|
32
|
+
observer.disconnect();
|
|
33
|
+
};
|
|
34
|
+
}, [
|
|
35
|
+
ref,
|
|
36
|
+
callback,
|
|
37
|
+
options
|
|
38
|
+
]);
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { useMutationObserver };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region src/hooks/use-pagination.d.ts
|
|
2
|
+
interface UsePaginationProps {
|
|
3
|
+
/** Current active page number. */
|
|
4
|
+
currentPage: number;
|
|
5
|
+
/** Number of results displayed per page. */
|
|
6
|
+
resultsPerPage: number;
|
|
7
|
+
/**
|
|
8
|
+
* Number of sibling pages to show on each side of the current page.
|
|
9
|
+
* Defaults to 1.
|
|
10
|
+
*/
|
|
11
|
+
siblingPagesCount?: number;
|
|
12
|
+
/** Total number of results across all pages. */
|
|
13
|
+
totalResults: number;
|
|
14
|
+
}
|
|
15
|
+
/** Ellipsis marker used to collapse ranges in pagination output. */
|
|
16
|
+
declare const ELLIPSIS = "\u2022\u2022\u2022";
|
|
17
|
+
/**
|
|
18
|
+
* Compute a pagination structure for result sets.
|
|
19
|
+
*
|
|
20
|
+
* Returns a mixed array of page numbers and the `ELLIPSIS` marker representing
|
|
21
|
+
* collapsed ranges. The shape adapts to the total pages and the requested
|
|
22
|
+
* sibling window around the current page.
|
|
23
|
+
*
|
|
24
|
+
* @param props - Pagination options. See {@link UsePaginationProps}.
|
|
25
|
+
* @returns Array of page numbers and `ELLIPSIS` representing the pagination model.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const paginationRange = usePagination({
|
|
30
|
+
* currentPage: 3,
|
|
31
|
+
* resultsPerPage: 10,
|
|
32
|
+
* siblingPagesCount: 1,
|
|
33
|
+
* totalResults: 100
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
declare function usePagination({
|
|
38
|
+
currentPage,
|
|
39
|
+
resultsPerPage,
|
|
40
|
+
siblingPagesCount,
|
|
41
|
+
totalResults
|
|
42
|
+
}: UsePaginationProps): (number | string)[];
|
|
43
|
+
//#endregion
|
|
44
|
+
export { ELLIPSIS, UsePaginationProps, usePagination };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
//#region src/hooks/use-pagination.ts
|
|
4
|
+
/** Ellipsis marker used to collapse ranges in pagination output. */
|
|
5
|
+
const ELLIPSIS = "•••";
|
|
6
|
+
/**
|
|
7
|
+
* Generate a numeric range from start to end inclusive.
|
|
8
|
+
*
|
|
9
|
+
* @param start - Starting number (inclusive).
|
|
10
|
+
* @param end - Ending number (inclusive).
|
|
11
|
+
* @returns Array of numbers from start to end.
|
|
12
|
+
*/
|
|
13
|
+
const createRange = (start, end) => {
|
|
14
|
+
const length = end - start + 1;
|
|
15
|
+
return Array.from({ length }, (_, index) => start + index);
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Compute a pagination structure for result sets.
|
|
19
|
+
*
|
|
20
|
+
* Returns a mixed array of page numbers and the `ELLIPSIS` marker representing
|
|
21
|
+
* collapsed ranges. The shape adapts to the total pages and the requested
|
|
22
|
+
* sibling window around the current page.
|
|
23
|
+
*
|
|
24
|
+
* @param props - Pagination options. See {@link UsePaginationProps}.
|
|
25
|
+
* @returns Array of page numbers and `ELLIPSIS` representing the pagination model.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* const paginationRange = usePagination({
|
|
30
|
+
* currentPage: 3,
|
|
31
|
+
* resultsPerPage: 10,
|
|
32
|
+
* siblingPagesCount: 1,
|
|
33
|
+
* totalResults: 100
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
function usePagination({ currentPage, resultsPerPage, siblingPagesCount = 1, totalResults }) {
|
|
38
|
+
return useMemo(() => {
|
|
39
|
+
const totalPages = Math.ceil(totalResults / Math.floor(resultsPerPage));
|
|
40
|
+
if (totalPages <= 0) return [];
|
|
41
|
+
/**
|
|
42
|
+
* Case 1: If the number of pages is less than or equal to the visible page
|
|
43
|
+
* numbers, return an array of all page numbers.
|
|
44
|
+
*/
|
|
45
|
+
if (siblingPagesCount + 5 >= totalPages) return createRange(1, totalPages);
|
|
46
|
+
/**
|
|
47
|
+
* Left sibling boundary (min 1).
|
|
48
|
+
*/
|
|
49
|
+
const leftSiblingIndex = Math.max(currentPage - siblingPagesCount, 1);
|
|
50
|
+
/**
|
|
51
|
+
* Right sibling boundary (max totalPages).
|
|
52
|
+
*/
|
|
53
|
+
const rightSiblingIndex = Math.min(currentPage + siblingPagesCount, totalPages);
|
|
54
|
+
/**
|
|
55
|
+
* Whether a left-side ellipsis is needed.
|
|
56
|
+
*/
|
|
57
|
+
const shouldShowLeftEllipsis = leftSiblingIndex > 2;
|
|
58
|
+
/**
|
|
59
|
+
* Whether a right-side ellipsis is needed.
|
|
60
|
+
*/
|
|
61
|
+
const shouldShowRightEllipsis = rightSiblingIndex < totalPages - 2;
|
|
62
|
+
/** First page number (always 1). */
|
|
63
|
+
const firstPage = 1;
|
|
64
|
+
/** Last page number (equals totalPages). */
|
|
65
|
+
const lastPage = totalPages;
|
|
66
|
+
/**
|
|
67
|
+
* Case 2: No left ellipsis, but right ellipsis is necessary.
|
|
68
|
+
* This occurs when the current page is close to the start of the
|
|
69
|
+
* pagination range.
|
|
70
|
+
*/
|
|
71
|
+
if (!shouldShowLeftEllipsis && shouldShowRightEllipsis) return [
|
|
72
|
+
...createRange(1, 3 + 2 * siblingPagesCount),
|
|
73
|
+
ELLIPSIS,
|
|
74
|
+
lastPage
|
|
75
|
+
];
|
|
76
|
+
/**
|
|
77
|
+
* Case 3: No right ellipsis, but left ellipsis is necessary.
|
|
78
|
+
* This occurs when the current page is close to the end of the pagination
|
|
79
|
+
* range.
|
|
80
|
+
*/
|
|
81
|
+
if (shouldShowLeftEllipsis && !shouldShowRightEllipsis) return [
|
|
82
|
+
firstPage,
|
|
83
|
+
ELLIPSIS,
|
|
84
|
+
...createRange(totalPages - (3 + 2 * siblingPagesCount) + 1, totalPages)
|
|
85
|
+
];
|
|
86
|
+
/**
|
|
87
|
+
* Case 4: Both left and right ellipsis are necessary.
|
|
88
|
+
* This occurs when the current page is far enough from both the start and
|
|
89
|
+
* end of the pagination range.
|
|
90
|
+
*/
|
|
91
|
+
if (shouldShowLeftEllipsis && shouldShowRightEllipsis) return [
|
|
92
|
+
firstPage,
|
|
93
|
+
ELLIPSIS,
|
|
94
|
+
...createRange(leftSiblingIndex, rightSiblingIndex),
|
|
95
|
+
ELLIPSIS,
|
|
96
|
+
lastPage
|
|
97
|
+
];
|
|
98
|
+
return [];
|
|
99
|
+
}, [
|
|
100
|
+
totalResults,
|
|
101
|
+
resultsPerPage,
|
|
102
|
+
siblingPagesCount,
|
|
103
|
+
currentPage
|
|
104
|
+
]);
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { ELLIPSIS, usePagination };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Accordion, AccordionContent, AccordionContentProps, AccordionIcon, AccordionIconProps, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, AccordionTriggerProps } from "./components/accordion.mjs";
|
|
2
|
+
import { Button, ButtonProps, buttonVariants } from "./components/button.mjs";
|
|
3
|
+
import { AlertDialog, AlertDialogAction, AlertDialogActionProps, AlertDialogBody, AlertDialogBodyProps, AlertDialogCancel, AlertDialogCancelProps, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogFooterProps, AlertDialogHeader, AlertDialogHeaderProps, AlertDialogProps, AlertDialogTitle, AlertDialogTitleProps, AlertDialogTrigger, AlertDialogTriggerProps } from "./components/alert-dialog.mjs";
|
|
4
|
+
import { Alert, AlertDescription, AlertDescriptionProps, AlertProps, AlertTitle, AlertTitleProps, alertVariants } from "./components/alert.mjs";
|
|
5
|
+
import { AspectRatio, AspectRatioProps } from "./components/aspect-ratio.mjs";
|
|
6
|
+
import { Avatar, AvatarFallback, AvatarFallbackProps, AvatarImage, AvatarImageProps, AvatarProps } from "./components/avatar.mjs";
|
|
7
|
+
import { Badge, BadgeProps, badgeVariants } from "./components/badge.mjs";
|
|
8
|
+
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbEllipsisProps, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbLink, BreadcrumbLinkProps, BreadcrumbList, BreadcrumbListProps, BreadcrumbPage, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparator, BreadcrumbSeparatorProps } from "./components/breadcrumb.mjs";
|
|
9
|
+
import { Separator, SeparatorItem, SeparatorItemProps, SeparatorProps, separatorVariants } from "./components/separator.mjs";
|
|
10
|
+
import { ButtonGroup, ButtonGroupProps, ButtonGroupSeparator, ButtonGroupSeparatorProps, ButtonGroupText, ButtonGroupTextProps, buttonGroupVariants } from "./components/button-group.mjs";
|
|
11
|
+
import { Calendar, CalendarDayButton } from "./components/calendar.mjs";
|
|
12
|
+
import { Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps } from "./components/card.mjs";
|
|
13
|
+
import { Carousel, CarouselApi, CarouselContent, CarouselContentProps, CarouselItem, CarouselItemProps, CarouselNext, CarouselNextProps, CarouselPrevious, CarouselPreviousProps, CarouselProps, createCarouselScope } from "./components/carousel.mjs";
|
|
14
|
+
import { ChartConfig, ChartContainer, ChartContainerProps, ChartLegend, ChartLegendContent, ChartLegendContentProps, ChartLegendProps, ChartStyle, ChartStyleProps, ChartTooltip, ChartTooltipContent, ChartTooltipContentProps, ChartTooltipProps, createChartScope } from "./components/chart.mjs";
|
|
15
|
+
import { CheckboxCards, CheckboxCardsItem, CheckboxCardsItemProps, CheckboxCardsProps } from "./components/checkbox-cards.mjs";
|
|
16
|
+
import { CheckboxGroup, CheckboxGroupItem, CheckboxGroupItemProps, CheckboxGroupProps } from "./components/checkbox-group.mjs";
|
|
17
|
+
import { Checkbox, CheckboxProps } from "./components/checkbox.mjs";
|
|
18
|
+
import { Collapsible, CollapsibleContent, CollapsibleContentProps, CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerProps } from "./components/collapsible.mjs";
|
|
19
|
+
import { Dialog, DialogBody, DialogBodyProps, DialogClose, DialogCloseProps, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogProps, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps } from "./components/dialog.mjs";
|
|
20
|
+
import { Command, CommandDialog, CommandDialogProps, CommandEmpty, CommandEmptyProps, CommandGroup, CommandGroupProps, CommandInput, CommandInputProps, CommandItem, CommandItemProps, CommandList, CommandListProps, CommandLoading, CommandLoadingProps, CommandProps, CommandSeparator, CommandSeparatorProps, CommandShortcut, CommandShortcutProps } from "./components/command.mjs";
|
|
21
|
+
import { ContextMenu, ContextMenuArrow, ContextMenuArrowProps, ContextMenuCheckboxItem, ContextMenuCheckboxItemProps, ContextMenuContent, ContextMenuContentProps, ContextMenuGroup, ContextMenuGroupProps, ContextMenuItem, ContextMenuItemProps, ContextMenuLabel, ContextMenuLabelProps, ContextMenuProps, ContextMenuRadioGroup, ContextMenuRadioGroupProps, ContextMenuRadioItem, ContextMenuRadioItemProps, ContextMenuSeparator, ContextMenuSeparatorProps, ContextMenuShortcut, ContextMenuShortcutProps, ContextMenuSub, ContextMenuSubContent, ContextMenuSubContentProps, ContextMenuSubProps, ContextMenuSubTrigger, ContextMenuSubTriggerProps, ContextMenuTrigger, ContextMenuTriggerProps } from "./components/context-menu.mjs";
|
|
22
|
+
import { Drawer, DrawerBody, DrawerBodyProps, DrawerClose, DrawerCloseProps, DrawerContent, DrawerContentProps, DrawerDescription, DrawerDescriptionProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps, DrawerProps, DrawerTitle, DrawerTitleProps, DrawerTrigger, DrawerTriggerProps } from "./components/drawer.mjs";
|
|
23
|
+
import { DropdownMenu, DropdownMenuArrow, DropdownMenuArrowProps, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuGroupProps, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuLabelProps, DropdownMenuProps, DropdownMenuRadioGroup, DropdownMenuRadioGroupProps, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuSeparatorProps, DropdownMenuShortcut, DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubContentProps, DropdownMenuSubProps, DropdownMenuSubTrigger, DropdownMenuSubTriggerProps, DropdownMenuTrigger, DropdownMenuTriggerProps } from "./components/dropdown-menu.mjs";
|
|
24
|
+
import { Empty, EmptyContent, EmptyContentProps, EmptyDescription, EmptyDescriptionProps, EmptyHeader, EmptyHeaderProps, EmptyMedia, EmptyMediaProps, EmptyProps, EmptyTitle, EmptyTitleProps, emptyMediaVariants } from "./components/empty.mjs";
|
|
25
|
+
import { Label, LabelProps } from "./components/label.mjs";
|
|
26
|
+
import { Field, FieldContent, FieldContentProps, FieldDescription, FieldDescriptionProps, FieldError, FieldErrorProps, FieldGroup, FieldGroupProps, FieldLabel, FieldLabelProps, FieldLegend, FieldLegendProps, FieldProps, FieldSeparator, FieldSeparatorProps, FieldSet, FieldSetProps, FieldTitle, FieldTitleProps, fieldVariants } from "./components/field.mjs";
|
|
27
|
+
import { Form, FormControl, FormControlProps, FormDescription, FormDescriptionProps, FormField, FormFieldProps, FormItem, FormItemProps, FormLabel, FormLabelProps, FormMessage, FormMessageProps, FormProps, createFormFieldScope } from "./components/form.mjs";
|
|
28
|
+
import { HoverCard, HoverCardArrow, HoverCardArrowProps, HoverCardContent, HoverCardContentProps, HoverCardProps, HoverCardTrigger, HoverCardTriggerProps } from "./components/hover-card.mjs";
|
|
29
|
+
import { Input, InputProps } from "./components/input.mjs";
|
|
30
|
+
import { Textarea, TextareaProps } from "./components/textarea.mjs";
|
|
31
|
+
import { InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupButton, InputGroupButtonProps, InputGroupInput, InputGroupInputProps, InputGroupProps, InputGroupText, InputGroupTextProps, InputGroupTextarea, InputGroupTextareaProps, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupVariants } from "./components/input-group.mjs";
|
|
32
|
+
import { InputNumber, InputNumberProps } from "./components/input-number.mjs";
|
|
33
|
+
import { InputOTP, InputOTPGroup, InputOTPGroupProps, InputOTPProps, InputOTPSeparator, InputOTPSeparatorProps, InputOTPSlot, InputOTPSlotProps, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "./components/input-otp.mjs";
|
|
34
|
+
import { InputPassword, InputPasswordProps } from "./components/input-password.mjs";
|
|
35
|
+
import { InputSearch, InputSearchProps } from "./components/input-search.mjs";
|
|
36
|
+
import { Item, ItemActions, ItemActionsProps, ItemContent, ItemContentProps, ItemDescription, ItemDescriptionProps, ItemFooter, ItemFooterProps, ItemGroup, ItemGroupProps, ItemHeader, ItemHeaderProps, ItemMedia, ItemMediaProps, ItemProps, ItemSeparator, ItemSeparatorProps, ItemTitle, ItemTitleProps, itemMediaVariants, itemVariants } from "./components/item.mjs";
|
|
37
|
+
import { Kbd, KbdGroup, KbdGroupProps, KbdProps } from "./components/kbd.mjs";
|
|
38
|
+
import { Menubar, MenubarArrow, MenubarArrowProps, MenubarCheckboxItem, MenubarCheckboxItemProps, MenubarContent, MenubarContentProps, MenubarGroup, MenubarGroupProps, MenubarItem, MenubarItemProps, MenubarLabel, MenubarLabelProps, MenubarMenu, MenubarMenuProps, MenubarProps, MenubarRadioGroup, MenubarRadioGroupProps, MenubarRadioItem, MenubarRadioItemProps, MenubarSeparator, MenubarSeparatorProps, MenubarShortcut, MenubarShortcutProps, MenubarSub, MenubarSubContent, MenubarSubContentProps, MenubarSubProps, MenubarSubTrigger, MenubarSubTriggerProps, MenubarTrigger, MenubarTriggerProps } from "./components/menubar.mjs";
|
|
39
|
+
import { NativeSelect, NativeSelectOptGroup, NativeSelectOptGroupProps, NativeSelectOption, NativeSelectOptionProps, NativeSelectProps } from "./components/native-select.mjs";
|
|
40
|
+
import { NavigationMenu, NavigationMenuContent, NavigationMenuContentProps, NavigationMenuItem, NavigationMenuItemProps, NavigationMenuLink, NavigationMenuLinkProps, NavigationMenuList, NavigationMenuListProps, NavigationMenuProps, NavigationMenuTrigger, NavigationMenuTriggerProps, navigationMenuTriggerVariants } from "./components/navigation-menu.mjs";
|
|
41
|
+
import { Pagination, PaginationContent, PaginationContentProps, PaginationEllipsis, PaginationEllipsisProps, PaginationItem, PaginationItemProps, PaginationLink, PaginationLinkProps, PaginationNext, PaginationNextProps, PaginationPrevious, PaginationPreviousProps, PaginationProps } from "./components/pagination.mjs";
|
|
42
|
+
import { Popover, PopoverAnchor, PopoverAnchorProps, PopoverArrow, PopoverArrowProps, PopoverContent, PopoverContentProps, PopoverProps, PopoverTrigger, PopoverTriggerProps } from "./components/popover.mjs";
|
|
43
|
+
import { ProgressCircle, ProgressCircleProps, progressCircleVariants } from "./components/progress-circle.mjs";
|
|
44
|
+
import { Progress, ProgressProps } from "./components/progress.mjs";
|
|
45
|
+
import { RadioCards, RadioCardsItem, RadioCardsItemProps, RadioCardsProps } from "./components/radio-cards.mjs";
|
|
46
|
+
import { RadioGroup, RadioGroupItem, RadioGroupItemProps, RadioGroupProps } from "./components/radio-group.mjs";
|
|
47
|
+
import { Radio, RadioProps } from "./components/radio.mjs";
|
|
48
|
+
import { ResizableGroup, ResizableGroupProps, ResizablePanel, ResizablePanelProps, ResizableSeparator, ResizableSeparatorProps } from "./components/resizable.mjs";
|
|
49
|
+
import { ScrollArea, ScrollAreaProps, ScrollAreaScrollbar, ScrollAreaScrollbarProps, scrollAreaScrollbarVariants } from "./components/scroll-area.mjs";
|
|
50
|
+
import { Select, SelectContent, SelectContentProps, SelectGroup, SelectGroupProps, SelectItem, SelectItemProps, SelectLabel, SelectLabelProps, SelectProps, SelectScrollDownButton, SelectScrollDownButtonProps, SelectScrollUpButton, SelectScrollUpButtonProps, SelectSeparator, SelectSeparatorProps, SelectTrigger, SelectTriggerProps, SelectValue, SelectValueProps } from "./components/select.mjs";
|
|
51
|
+
import { Sheet, SheetBody, SheetBodyProps, SheetClose, SheetCloseProps, SheetContent, SheetContentProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetProps, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps, sheetContentVariants } from "./components/sheet.mjs";
|
|
52
|
+
import { Tooltip, TooltipArrow, TooltipArrowProps, TooltipContent, TooltipContentProps, TooltipProps, TooltipProvider, TooltipProviderProps, TooltipTrigger, TooltipTriggerProps } from "./components/tooltip.mjs";
|
|
53
|
+
import { Sidebar, SidebarContent, SidebarContentProps, SidebarFooter, SidebarFooterProps, SidebarGroup, SidebarGroupAction, SidebarGroupActionProps, SidebarGroupContent, SidebarGroupContentProps, SidebarGroupLabel, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeader, SidebarHeaderProps, SidebarInput, SidebarInputProps, SidebarInset, SidebarInsetProps, SidebarMenu, SidebarMenuAction, SidebarMenuActionProps, SidebarMenuBadge, SidebarMenuBadgeProps, SidebarMenuButton, SidebarMenuButtonProps, SidebarMenuItem, SidebarMenuItemProps, SidebarMenuProps, SidebarMenuSkeleton, SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubButtonProps, SidebarMenuSubItem, SidebarMenuSubItemProps, SidebarMenuSubProps, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarRail, SidebarRailProps, SidebarSeparator, SidebarSeparatorProps, SidebarTrigger, SidebarTriggerProps, sidebarMenuButtonVariants, useSidebar } from "./components/sidebar.mjs";
|
|
54
|
+
import { Skeleton, SkeletonProps } from "./components/skeleton.mjs";
|
|
55
|
+
import { Slider, SliderProps } from "./components/slider.mjs";
|
|
56
|
+
import { Toaster, ToasterProps, toast, useSonner } from "./components/sonner.mjs";
|
|
57
|
+
import { Spinner, SpinnerProps } from "./components/spinner.mjs";
|
|
58
|
+
import { Switch, SwitchProps } from "./components/switch.mjs";
|
|
59
|
+
import { Table, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableFooter, TableFooterProps, TableHead, TableHeadProps, TableHeader, TableHeaderProps, TableProps, TableRow, TableRowProps } from "./components/table.mjs";
|
|
60
|
+
import { Tabs, TabsContent, TabsContentProps, TabsList, TabsListProps, TabsProps, TabsTrigger, TabsTriggerProps } from "./components/tabs.mjs";
|
|
61
|
+
import { Toggle, ToggleProps, ToggleVariants, toggleVariants } from "./components/toggle.mjs";
|
|
62
|
+
import { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps } from "./components/toggle-group.mjs";
|
|
63
|
+
import { useAnimatedValue } from "./hooks/use-animated-value.mjs";
|
|
64
|
+
import { useCopyToClipboard } from "./hooks/use-copy-to-clipboard.mjs";
|
|
65
|
+
import { useIsMobile } from "./hooks/use-is-mobile.mjs";
|
|
66
|
+
import { useMediaQuery } from "./hooks/use-media-query.mjs";
|
|
67
|
+
import { useMutationObserver } from "./hooks/use-mutation-observer.mjs";
|
|
68
|
+
import { ELLIPSIS, UsePaginationProps, usePagination } from "./hooks/use-pagination.mjs";
|
|
69
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionIcon, type AccordionIconProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogBody, type AlertDialogBodyProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, type AlertDialogProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, type AlertProps, AlertTitle, type AlertTitleProps, AspectRatio, type AspectRatioProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps, Button, ButtonGroup, type ButtonGroupProps, ButtonGroupSeparator, type ButtonGroupSeparatorProps, ButtonGroupText, type ButtonGroupTextProps, type ButtonProps, Calendar, CalendarDayButton, Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Carousel, type CarouselApi, CarouselContent, type CarouselContentProps, CarouselItem, type CarouselItemProps, CarouselNext, type CarouselNextProps, CarouselPrevious, type CarouselPreviousProps, type CarouselProps, type ChartConfig, ChartContainer, type ChartContainerProps, ChartLegend, ChartLegendContent, type ChartLegendContentProps, type ChartLegendProps, ChartStyle, type ChartStyleProps, ChartTooltip, ChartTooltipContent, type ChartTooltipContentProps, type ChartTooltipProps, Checkbox, CheckboxCards, CheckboxCardsItem, type CheckboxCardsItemProps, type CheckboxCardsProps, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleContentProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, CommandLoading, type CommandLoadingProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, ContextMenu, ContextMenuArrow, type ContextMenuArrowProps, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, type ContextMenuGroupProps, ContextMenuItem, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, type ContextMenuSeparatorProps, ContextMenuShortcut, type ContextMenuShortcutProps, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubContentProps, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, Dialog, DialogBody, type DialogBodyProps, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, Drawer, DrawerBody, type DrawerBodyProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerProps, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuArrow, type DropdownMenuArrowProps, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, ELLIPSIS, Empty, EmptyContent, type EmptyContentProps, EmptyDescription, type EmptyDescriptionProps, EmptyHeader, type EmptyHeaderProps, EmptyMedia, type EmptyMediaProps, type EmptyProps, EmptyTitle, type EmptyTitleProps, Field, FieldContent, type FieldContentProps, FieldDescription, type FieldDescriptionProps, FieldError, type FieldErrorProps, FieldGroup, type FieldGroupProps, FieldLabel, type FieldLabelProps, FieldLegend, type FieldLegendProps, type FieldProps, FieldSeparator, type FieldSeparatorProps, FieldSet, type FieldSetProps, FieldTitle, type FieldTitleProps, Form, FormControl, type FormControlProps, FormDescription, type FormDescriptionProps, FormField, type FormFieldProps, FormItem, type FormItemProps, FormLabel, type FormLabelProps, FormMessage, type FormMessageProps, type FormProps, HoverCard, HoverCardArrow, type HoverCardArrowProps, HoverCardContent, type HoverCardContentProps, type HoverCardProps, HoverCardTrigger, type HoverCardTriggerProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, InputGroupInput, type InputGroupInputProps, type InputGroupProps, InputGroupText, type InputGroupTextProps, InputGroupTextarea, type InputGroupTextareaProps, InputNumber, type InputNumberProps, InputOTP, InputOTPGroup, type InputOTPGroupProps, type InputOTPProps, InputOTPSeparator, type InputOTPSeparatorProps, InputOTPSlot, type InputOTPSlotProps, InputPassword, type InputPasswordProps, type InputProps, InputSearch, type InputSearchProps, Item, ItemActions, type ItemActionsProps, ItemContent, type ItemContentProps, ItemDescription, type ItemDescriptionProps, ItemFooter, type ItemFooterProps, ItemGroup, type ItemGroupProps, ItemHeader, type ItemHeaderProps, ItemMedia, type ItemMediaProps, type ItemProps, ItemSeparator, type ItemSeparatorProps, ItemTitle, type ItemTitleProps, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, Label, type LabelProps, Menubar, MenubarArrow, type MenubarArrowProps, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarShortcut, type MenubarShortcutProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, NativeSelect, NativeSelectOptGroup, type NativeSelectOptGroupProps, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps, NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, NavigationMenuList, type NavigationMenuListProps, type NavigationMenuProps, NavigationMenuTrigger, type NavigationMenuTriggerProps, Pagination, PaginationContent, type PaginationContentProps, PaginationEllipsis, type PaginationEllipsisProps, PaginationItem, type PaginationItemProps, PaginationLink, type PaginationLinkProps, PaginationNext, type PaginationNextProps, PaginationPrevious, type PaginationPreviousProps, type PaginationProps, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverArrow, type PopoverArrowProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, ProgressCircle, type ProgressCircleProps, type ProgressProps, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, Radio, RadioCards, RadioCardsItem, type RadioCardsItemProps, type RadioCardsProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, ResizableGroup, type ResizableGroupProps, ResizablePanel, type ResizablePanelProps, ResizableSeparator, type ResizableSeparatorProps, ScrollArea, type ScrollAreaProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, Separator, SeparatorItem, type SeparatorItemProps, type SeparatorProps, Sheet, SheetBody, type SheetBodyProps, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetProps, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarGroup, SidebarGroupAction, type SidebarGroupActionProps, SidebarGroupContent, type SidebarGroupContentProps, SidebarGroupLabel, type SidebarGroupLabelProps, type SidebarGroupProps, SidebarHeader, type SidebarHeaderProps, SidebarInput, type SidebarInputProps, SidebarInset, type SidebarInsetProps, SidebarMenu, SidebarMenuAction, type SidebarMenuActionProps, SidebarMenuBadge, type SidebarMenuBadgeProps, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuItem, type SidebarMenuItemProps, type SidebarMenuProps, SidebarMenuSkeleton, type SidebarMenuSkeletonProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarMenuSubItemProps, type SidebarMenuSubProps, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, type SidebarRailProps, SidebarSeparator, type SidebarSeparatorProps, SidebarTrigger, type SidebarTriggerProps, Skeleton, type SkeletonProps, Slider, type SliderProps, Spinner, type SpinnerProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToggleVariants, Tooltip, TooltipArrow, type TooltipArrowProps, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, type UsePaginationProps, alertVariants, badgeVariants, buttonGroupVariants, buttonVariants, createCarouselScope, createChartScope, createFormFieldScope, emptyMediaVariants, fieldVariants, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupVariants, itemMediaVariants, itemVariants, navigationMenuTriggerVariants, progressCircleVariants, scrollAreaScrollbarVariants, separatorVariants, sheetContentVariants, sidebarMenuButtonVariants, toast, toggleVariants, useAnimatedValue, useCopyToClipboard, useIsMobile, useMediaQuery, useMutationObserver, usePagination, useSidebar, useSonner };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Accordion, AccordionContent, AccordionIcon, AccordionItem, AccordionTrigger } from "./components/accordion.mjs";
|
|
2
|
+
import { Alert, AlertDescription, AlertTitle, alertVariants } from "./components/alert.mjs";
|
|
3
|
+
import { Button, buttonVariants } from "./components/button.mjs";
|
|
4
|
+
import { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "./components/alert-dialog.mjs";
|
|
5
|
+
import { AspectRatio } from "./components/aspect-ratio.mjs";
|
|
6
|
+
import { Avatar, AvatarFallback, AvatarImage } from "./components/avatar.mjs";
|
|
7
|
+
import { Badge, badgeVariants } from "./components/badge.mjs";
|
|
8
|
+
import { Separator, SeparatorItem, separatorVariants } from "./components/separator.mjs";
|
|
9
|
+
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "./components/button-group.mjs";
|
|
10
|
+
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./components/breadcrumb.mjs";
|
|
11
|
+
import { Calendar, CalendarDayButton } from "./components/calendar.mjs";
|
|
12
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./components/card.mjs";
|
|
13
|
+
import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, createCarouselScope } from "./components/carousel.mjs";
|
|
14
|
+
import { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, createChartScope } from "./components/chart.mjs";
|
|
15
|
+
import { Checkbox } from "./components/checkbox.mjs";
|
|
16
|
+
import { Label } from "./components/label.mjs";
|
|
17
|
+
import { CheckboxCards, CheckboxCardsItem } from "./components/checkbox-cards.mjs";
|
|
18
|
+
import { CheckboxGroup, CheckboxGroupItem } from "./components/checkbox-group.mjs";
|
|
19
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./components/collapsible.mjs";
|
|
20
|
+
import { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./components/dialog.mjs";
|
|
21
|
+
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut } from "./components/command.mjs";
|
|
22
|
+
import { ContextMenu, ContextMenuArrow, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger } from "./components/context-menu.mjs";
|
|
23
|
+
import { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger } from "./components/drawer.mjs";
|
|
24
|
+
import { DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./components/dropdown-menu.mjs";
|
|
25
|
+
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, emptyMediaVariants } from "./components/empty.mjs";
|
|
26
|
+
import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, fieldVariants } from "./components/field.mjs";
|
|
27
|
+
import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, createFormFieldScope } from "./components/form.mjs";
|
|
28
|
+
import { HoverCard, HoverCardArrow, HoverCardContent, HoverCardTrigger } from "./components/hover-card.mjs";
|
|
29
|
+
import { Input } from "./components/input.mjs";
|
|
30
|
+
import { Textarea } from "./components/textarea.mjs";
|
|
31
|
+
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupVariants } from "./components/input-group.mjs";
|
|
32
|
+
import { Spinner } from "./components/spinner.mjs";
|
|
33
|
+
import { InputNumber } from "./components/input-number.mjs";
|
|
34
|
+
import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "./components/input-otp.mjs";
|
|
35
|
+
import { InputPassword } from "./components/input-password.mjs";
|
|
36
|
+
import { InputSearch } from "./components/input-search.mjs";
|
|
37
|
+
import { Kbd, KbdGroup } from "./components/kbd.mjs";
|
|
38
|
+
import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, itemMediaVariants, itemVariants } from "./components/item.mjs";
|
|
39
|
+
import { Menubar, MenubarArrow, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "./components/menubar.mjs";
|
|
40
|
+
import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerVariants } from "./components/navigation-menu.mjs";
|
|
41
|
+
import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "./components/native-select.mjs";
|
|
42
|
+
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./components/pagination.mjs";
|
|
43
|
+
import { Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger } from "./components/popover.mjs";
|
|
44
|
+
import { Progress } from "./components/progress.mjs";
|
|
45
|
+
import { useAnimatedValue } from "./hooks/use-animated-value.mjs";
|
|
46
|
+
import { ProgressCircle, progressCircleVariants } from "./components/progress-circle.mjs";
|
|
47
|
+
import { Radio } from "./components/radio.mjs";
|
|
48
|
+
import { RadioCards, RadioCardsItem } from "./components/radio-cards.mjs";
|
|
49
|
+
import { RadioGroup, RadioGroupItem } from "./components/radio-group.mjs";
|
|
50
|
+
import { ResizableGroup, ResizablePanel, ResizableSeparator } from "./components/resizable.mjs";
|
|
51
|
+
import { ScrollArea, ScrollAreaScrollbar, scrollAreaScrollbarVariants } from "./components/scroll-area.mjs";
|
|
52
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./components/select.mjs";
|
|
53
|
+
import { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, sheetContentVariants } from "./components/sheet.mjs";
|
|
54
|
+
import { Skeleton } from "./components/skeleton.mjs";
|
|
55
|
+
import { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger } from "./components/tooltip.mjs";
|
|
56
|
+
import { useMediaQuery } from "./hooks/use-media-query.mjs";
|
|
57
|
+
import { useIsMobile } from "./hooks/use-is-mobile.mjs";
|
|
58
|
+
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, sidebarMenuButtonVariants, useSidebar } from "./components/sidebar.mjs";
|
|
59
|
+
import { Slider } from "./components/slider.mjs";
|
|
60
|
+
import { Toaster, toast, useSonner } from "./components/sonner.mjs";
|
|
61
|
+
import { Switch } from "./components/switch.mjs";
|
|
62
|
+
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./components/table.mjs";
|
|
63
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/tabs.mjs";
|
|
64
|
+
import { Toggle, toggleVariants } from "./components/toggle.mjs";
|
|
65
|
+
import { ToggleGroup, ToggleGroupItem } from "./components/toggle-group.mjs";
|
|
66
|
+
import { useCopyToClipboard } from "./hooks/use-copy-to-clipboard.mjs";
|
|
67
|
+
import { useMutationObserver } from "./hooks/use-mutation-observer.mjs";
|
|
68
|
+
import { ELLIPSIS, usePagination } from "./hooks/use-pagination.mjs";
|
|
69
|
+
export { Accordion, AccordionContent, AccordionIcon, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CheckboxCards, CheckboxCardsItem, CheckboxGroup, CheckboxGroupItem, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuArrow, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELLIPSIS, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardArrow, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputNumber, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputPassword, InputSearch, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Menubar, MenubarArrow, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, Progress, ProgressCircle, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, Radio, RadioCards, RadioCardsItem, RadioGroup, RadioGroupItem, ResizableGroup, ResizablePanel, ResizableSeparator, ScrollArea, ScrollAreaScrollbar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeparatorItem, Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger, alertVariants, badgeVariants, buttonGroupVariants, buttonVariants, createCarouselScope, createChartScope, createFormFieldScope, emptyMediaVariants, fieldVariants, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupVariants, itemMediaVariants, itemVariants, navigationMenuTriggerVariants, progressCircleVariants, scrollAreaScrollbarVariants, separatorVariants, sheetContentVariants, sidebarMenuButtonVariants, toast, toggleVariants, useAnimatedValue, useCopyToClipboard, useIsMobile, useMediaQuery, useMutationObserver, usePagination, useSidebar, useSonner };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ClassValue } from "../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/clsx.mjs";
|
|
2
|
+
import * as _$_codefast_tailwind_variants0 from "@codefast/tailwind-variants";
|
|
3
|
+
import { VariantProps } from "@codefast/tailwind-variants";
|
|
4
|
+
|
|
5
|
+
//#region src/lib/utils.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Shared Tailwind Variants factory for `@codefast/ui`.
|
|
8
|
+
* Use these `cn` / `tv` helpers everywhere in this package so class merging stays consistent
|
|
9
|
+
* and optional `twMergeConfig` can be applied in one place later.
|
|
10
|
+
*/
|
|
11
|
+
declare const cn: (...classes: ClassValue[]) => string, tv: _$_codefast_tailwind_variants0.TailwindVariantsFactory;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { type VariantProps, cn, tv };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createTV } from "@codefast/tailwind-variants";
|
|
2
|
+
//#region src/lib/utils.ts
|
|
3
|
+
/**
|
|
4
|
+
* Shared Tailwind Variants factory for `@codefast/ui`.
|
|
5
|
+
* Use these `cn` / `tv` helpers everywhere in this package so class merging stays consistent
|
|
6
|
+
* and optional `twMergeConfig` can be applied in one place later.
|
|
7
|
+
*/
|
|
8
|
+
const { cn, tv } = createTV({ twMerge: true });
|
|
9
|
+
//#endregion
|
|
10
|
+
export { cn, tv };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/clsx.d.mts
|
|
2
|
+
type ClassValue = ClassArray | ClassDictionary | string | number | bigint | null | boolean | undefined;
|
|
3
|
+
type ClassDictionary = Record<string, any>;
|
|
4
|
+
type ClassArray = ClassValue[];
|
|
5
|
+
//#endregion
|
|
6
|
+
export { ClassValue };
|