@stagewise/ui 0.1.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/README.md +135 -0
- package/package.json +80 -0
- package/src/components/ui/accordion.tsx +66 -0
- package/src/components/ui/alert-dialog.tsx +185 -0
- package/src/components/ui/alert.tsx +76 -0
- package/src/components/ui/aspect-ratio.tsx +22 -0
- package/src/components/ui/avatar.tsx +107 -0
- package/src/components/ui/badge.tsx +52 -0
- package/src/components/ui/breadcrumb.tsx +125 -0
- package/src/components/ui/bubble.tsx +128 -0
- package/src/components/ui/button-group.tsx +87 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/calendar.tsx +221 -0
- package/src/components/ui/card.tsx +103 -0
- package/src/components/ui/carousel.tsx +240 -0
- package/src/components/ui/chart.tsx +371 -0
- package/src/components/ui/checkbox.tsx +30 -0
- package/src/components/ui/collapsible.tsx +19 -0
- package/src/components/ui/combobox.tsx +295 -0
- package/src/components/ui/command.tsx +348 -0
- package/src/components/ui/context-menu.tsx +271 -0
- package/src/components/ui/dialog.tsx +160 -0
- package/src/components/ui/direction.tsx +4 -0
- package/src/components/ui/drawer.tsx +228 -0
- package/src/components/ui/dropdown-menu.tsx +266 -0
- package/src/components/ui/empty.tsx +104 -0
- package/src/components/ui/field.tsx +236 -0
- package/src/components/ui/hover-card.tsx +51 -0
- package/src/components/ui/input-group.tsx +158 -0
- package/src/components/ui/input-otp.tsx +85 -0
- package/src/components/ui/input.tsx +20 -0
- package/src/components/ui/item.tsx +201 -0
- package/src/components/ui/kbd.tsx +26 -0
- package/src/components/ui/label.tsx +20 -0
- package/src/components/ui/marker.tsx +71 -0
- package/src/components/ui/menubar.tsx +280 -0
- package/src/components/ui/message.tsx +92 -0
- package/src/components/ui/native-select.tsx +61 -0
- package/src/components/ui/navigation-menu.tsx +168 -0
- package/src/components/ui/pagination.tsx +130 -0
- package/src/components/ui/popover.tsx +88 -0
- package/src/components/ui/progress.tsx +83 -0
- package/src/components/ui/questionnaire.tsx +324 -0
- package/src/components/ui/radio-group.tsx +36 -0
- package/src/components/ui/resizable.tsx +50 -0
- package/src/components/ui/scroll-area.tsx +53 -0
- package/src/components/ui/select.tsx +201 -0
- package/src/components/ui/separator.tsx +23 -0
- package/src/components/ui/sheet.tsx +136 -0
- package/src/components/ui/sidebar.tsx +723 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +52 -0
- package/src/components/ui/spinner.tsx +10 -0
- package/src/components/ui/switch.tsx +32 -0
- package/src/components/ui/table.tsx +114 -0
- package/src/components/ui/tabs.tsx +82 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/toast.tsx +234 -0
- package/src/components/ui/toggle-group.tsx +87 -0
- package/src/components/ui/toggle.tsx +43 -0
- package/src/components/ui/tooltip.tsx +66 -0
- package/src/fonts/OFL.txt +92 -0
- package/src/fonts/geist-variable-italic.woff2 +0 -0
- package/src/fonts/geist-variable.woff2 +0 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/icons/custom/index.ts +1 -0
- package/src/icons/custom/ui-outline-18/Icon.tsx +28 -0
- package/src/icons/custom/ui-outline-18/IconBrowserTab.tsx +40 -0
- package/src/icons/custom/ui-outline-18/IconNewTerminal.tsx +77 -0
- package/src/icons/custom/ui-outline-18/index.ts +3 -0
- package/src/icons/index.ts +52 -0
- package/src/icons/nucleo/LICENSE.md +29 -0
- package/src/icons/nucleo/core-outline-24/Icon.tsx +27 -0
- package/src/icons/nucleo/core-outline-24/IconArrowUpOutline24.tsx +36 -0
- package/src/icons/nucleo/core-outline-24/IconBluetoothOutline24.tsx +26 -0
- package/src/icons/nucleo/core-outline-24/IconTrash2Outline24.tsx +76 -0
- package/src/icons/nucleo/core-outline-24/IconUsbOutline24.tsx +64 -0
- package/src/icons/nucleo/core-outline-24/index.ts +5 -0
- package/src/icons/nucleo/index.ts +48 -0
- package/src/icons/nucleo/micro-bold/Icon.tsx +27 -0
- package/src/icons/nucleo/micro-bold/IconArrowLeft.tsx +28 -0
- package/src/icons/nucleo/micro-bold/IconArrowRight.tsx +28 -0
- package/src/icons/nucleo/micro-bold/IconArrowRotateAnticlockwise.tsx +27 -0
- package/src/icons/nucleo/micro-bold/IconChevronLeft.tsx +16 -0
- package/src/icons/nucleo/micro-bold/IconChevronRight.tsx +16 -0
- package/src/icons/nucleo/micro-bold/IconClipboardContent.tsx +59 -0
- package/src/icons/nucleo/micro-bold/IconMagicWandSparkle.tsx +44 -0
- package/src/icons/nucleo/micro-bold/IconTriangleWarning.tsx +30 -0
- package/src/icons/nucleo/micro-bold/IconXmark.tsx +31 -0
- package/src/icons/nucleo/micro-bold/index.ts +10 -0
- package/src/icons/nucleo/social-media/Icon.tsx +27 -0
- package/src/icons/nucleo/social-media/IconApple.tsx +12 -0
- package/src/icons/nucleo/social-media/IconGithub.tsx +11 -0
- package/src/icons/nucleo/social-media/IconGoogle.tsx +20 -0
- package/src/icons/nucleo/social-media/index.ts +4 -0
- package/src/icons/nucleo/ui-fill-18/Icon.tsx +27 -0
- package/src/icons/nucleo/ui-fill-18/IconArrowLeftFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconArrowRightFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconCheckFill18.tsx +12 -0
- package/src/icons/nucleo/ui-fill-18/IconChevronDownFill18.tsx +12 -0
- package/src/icons/nucleo/ui-fill-18/IconGlobe2Fill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconLinkFill18.tsx +21 -0
- package/src/icons/nucleo/ui-fill-18/IconMediaStopFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconPinTackFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconPlusFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconVolumeUpFill18.tsx +22 -0
- package/src/icons/nucleo/ui-fill-18/IconVolumeXmarkFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/IconXmarkFill18.tsx +17 -0
- package/src/icons/nucleo/ui-fill-18/index.ts +13 -0
- package/src/icons/nucleo/ui-fill-duo-18/Icon.tsx +27 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconBrainNodesFillDuo18.tsx +32 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconCloudeCodeFillDuo18.tsx +25 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconDatabaseFillDuo18.tsx +24 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconDownload4FillDuo18.tsx +18 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconEarthFillDuo18.tsx +20 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconFinderFillDuo18.tsx +36 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconFolderContent2FillDuo18.tsx +22 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconGear3FillDuo18.tsx +18 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconHistoryFillDuo18.tsx +20 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconLockKeyFillDuo18.tsx +24 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconNoteFillDuo18.tsx +34 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconPenDrawSparkleFillDuo18.tsx +34 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconServerFillDuo18.tsx +22 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconSpace3dFillDuo18.tsx +24 -0
- package/src/icons/nucleo/ui-fill-duo-18/IconTriangleWarningFillDuo18.tsx +24 -0
- package/src/icons/nucleo/ui-fill-duo-18/index.ts +16 -0
- package/src/icons/nucleo/ui-outline-18/Icon.tsx +27 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowDownOutline18.tsx +33 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowRightOutline18.tsx +34 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowUpRightOutline18.tsx +34 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowsOppositeDirectionXOutline18.tsx +54 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowsToCenterOutline18.tsx +101 -0
- package/src/icons/nucleo/ui-outline-18/IconBanOutline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconBellDotOutline18.tsx +43 -0
- package/src/icons/nucleo/ui-outline-18/IconBookOpen5Outline18.tsx +40 -0
- package/src/icons/nucleo/ui-outline-18/IconBookOpenOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconBooks2Outline18.tsx +100 -0
- package/src/icons/nucleo/ui-outline-18/IconBoxSparkleOutline18.tsx +75 -0
- package/src/icons/nucleo/ui-outline-18/IconBrainOutline18.tsx +57 -0
- package/src/icons/nucleo/ui-outline-18/IconBranchOutOutline18.tsx +52 -0
- package/src/icons/nucleo/ui-outline-18/IconBugOutline18.tsx +98 -0
- package/src/icons/nucleo/ui-outline-18/IconCameraOutline18.tsx +42 -0
- package/src/icons/nucleo/ui-outline-18/IconChartPieOutline18.tsx +30 -0
- package/src/icons/nucleo/ui-outline-18/IconCheck2Outline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconCheckOutline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronDownOutline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronExpandYOutline18.tsx +31 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronLeftOutline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronReduceYOutline18.tsx +31 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronRightOutline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronUpOutline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconCircleCheckOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconCircleInfoOutline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconCircleQuestionOutline18.tsx +39 -0
- package/src/icons/nucleo/ui-outline-18/IconClipboardContentOutline18.tsx +60 -0
- package/src/icons/nucleo/ui-outline-18/IconClipboardOutline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconClone2Outline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconCloneDashed2Outline18.tsx +49 -0
- package/src/icons/nucleo/ui-outline-18/IconCodeBranchOutline18.tsx +65 -0
- package/src/icons/nucleo/ui-outline-18/IconCodeCommitOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconColorPaletteOutline18.tsx +56 -0
- package/src/icons/nucleo/ui-outline-18/IconConnection2Outline18.tsx +43 -0
- package/src/icons/nucleo/ui-outline-18/IconCopyIdOutline18.tsx +52 -0
- package/src/icons/nucleo/ui-outline-18/IconCopyOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconCreditCardOutline18.tsx +61 -0
- package/src/icons/nucleo/ui-outline-18/IconDatabaseSearchOutline18.tsx +64 -0
- package/src/icons/nucleo/ui-outline-18/IconDotsOutline18.tsx +46 -0
- package/src/icons/nucleo/ui-outline-18/IconDownload4Outline18.tsx +43 -0
- package/src/icons/nucleo/ui-outline-18/IconEarthOutline18.tsx +47 -0
- package/src/icons/nucleo/ui-outline-18/IconEarthSearchOutline18.tsx +61 -0
- package/src/icons/nucleo/ui-outline-18/IconEnvelopeOutline18.tsx +38 -0
- package/src/icons/nucleo/ui-outline-18/IconEye2Outline18.tsx +34 -0
- package/src/icons/nucleo/ui-outline-18/IconEyeOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconFilePenOutline18.tsx +56 -0
- package/src/icons/nucleo/ui-outline-18/IconFileSearchOutline18.tsx +64 -0
- package/src/icons/nucleo/ui-outline-18/IconFloppyDiskOutline18.tsx +40 -0
- package/src/icons/nucleo/ui-outline-18/IconFolder5Outline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderCloudOutline18.tsx +39 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderOpenOutline18.tsx +31 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderPenOutline18.tsx +40 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderPlusOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconFolderSearchOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconGear2Outline18.tsx +193 -0
- package/src/icons/nucleo/ui-outline-18/IconGear3Outline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconGlobe3Outline18.tsx +61 -0
- package/src/icons/nucleo/ui-outline-18/IconGripDotsVerticalOutline18.tsx +74 -0
- package/src/icons/nucleo/ui-outline-18/IconHardDriveOutline18.tsx +40 -0
- package/src/icons/nucleo/ui-outline-18/IconHelpChatOutline18.tsx +47 -0
- package/src/icons/nucleo/ui-outline-18/IconHotDrinkOutline18.tsx +60 -0
- package/src/icons/nucleo/ui-outline-18/IconImageSparkle3Outline18.tsx +41 -0
- package/src/icons/nucleo/ui-outline-18/IconKey2Outline18.tsx +61 -0
- package/src/icons/nucleo/ui-outline-18/IconLoader6Outline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconLocation2Outline18.tsx +45 -0
- package/src/icons/nucleo/ui-outline-18/IconLockKeyOutline18.tsx +58 -0
- package/src/icons/nucleo/ui-outline-18/IconMagicWandOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconMagnifierMinusOutline18.tsx +39 -0
- package/src/icons/nucleo/ui-outline-18/IconMagnifierOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconMagnifierPlusOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconMicrophone3Outline18.tsx +57 -0
- package/src/icons/nucleo/ui-outline-18/IconMinusOutline18.tsx +25 -0
- package/src/icons/nucleo/ui-outline-18/IconMoonOutline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconMsgSleepOutline18.tsx +41 -0
- package/src/icons/nucleo/ui-outline-18/IconMsgWritingOutline18.tsx +42 -0
- package/src/icons/nucleo/ui-outline-18/IconMusicOutline18.tsx +67 -0
- package/src/icons/nucleo/ui-outline-18/IconOctagonWarningOutline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconOpenExternalOutline18.tsx +51 -0
- package/src/icons/nucleo/ui-outline-18/IconOpenRectArrowInOutline18.tsx +43 -0
- package/src/icons/nucleo/ui-outline-18/IconPanelLeftOutline18.tsx +39 -0
- package/src/icons/nucleo/ui-outline-18/IconPaperclip2Outline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconPen2Outline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconPenDrawSparkleOutline18.tsx +46 -0
- package/src/icons/nucleo/ui-outline-18/IconPenOutline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconPenPlusOutline18.tsx +47 -0
- package/src/icons/nucleo/ui-outline-18/IconPenWriting3Outline18.tsx +31 -0
- package/src/icons/nucleo/ui-outline-18/IconPhoneOutline18.tsx +23 -0
- package/src/icons/nucleo/ui-outline-18/IconPinTackOutline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconPinTackSlashOutline18.tsx +47 -0
- package/src/icons/nucleo/ui-outline-18/IconPlusOutline18.tsx +38 -0
- package/src/icons/nucleo/ui-outline-18/IconPowerOffOutline18.tsx +36 -0
- package/src/icons/nucleo/ui-outline-18/IconPresentationScreenVideoOutline18.tsx +55 -0
- package/src/icons/nucleo/ui-outline-18/IconPuzzlePieceOutline18.tsx +22 -0
- package/src/icons/nucleo/ui-outline-18/IconRedoOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconRefreshAnticlockwiseOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconReuseOutline18.tsx +50 -0
- package/src/icons/nucleo/ui-outline-18/IconSearchContentOutline18.tsx +81 -0
- package/src/icons/nucleo/ui-outline-18/IconServerOutline18.tsx +73 -0
- package/src/icons/nucleo/ui-outline-18/IconSideProfileSparkleOutline18.tsx +28 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarLeftHideOutline18.tsx +49 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarLeftShowOutline18.tsx +49 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarRightHideOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarRightShowOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconSparkleOutline18.tsx +43 -0
- package/src/icons/nucleo/ui-outline-18/IconSpeakerOutline18.tsx +47 -0
- package/src/icons/nucleo/ui-outline-18/IconSplitViewOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconSquareCodeOutline18.tsx +40 -0
- package/src/icons/nucleo/ui-outline-18/IconSquareDashedOutline18.tsx +94 -0
- package/src/icons/nucleo/ui-outline-18/IconSquareTerminalOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconSunOutline18.tsx +121 -0
- package/src/icons/nucleo/ui-outline-18/IconTerminalOutline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconTextAlignLeft2Outline18.tsx +60 -0
- package/src/icons/nucleo/ui-outline-18/IconTextBgColorOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconTextColorOutline18.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconThumbsDownOutline18.tsx +36 -0
- package/src/icons/nucleo/ui-outline-18/IconThumbsUpOutline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconTrashOutline18.tsx +41 -0
- package/src/icons/nucleo/ui-outline-18/IconTriangleWarningOutline18.tsx +37 -0
- package/src/icons/nucleo/ui-outline-18/IconUndoOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconVersionsOutline18.tsx +46 -0
- package/src/icons/nucleo/ui-outline-18/IconVideoOutline18.tsx +45 -0
- package/src/icons/nucleo/ui-outline-18/IconWaveformLinesOutline18.tsx +80 -0
- package/src/icons/nucleo/ui-outline-18/IconWindowCodeOutline18.tsx +62 -0
- package/src/icons/nucleo/ui-outline-18/IconWindowPointerOutline18.tsx +51 -0
- package/src/icons/nucleo/ui-outline-18/IconXmarkOutline18.tsx +38 -0
- package/src/icons/nucleo/ui-outline-18/index.ts +128 -0
- package/src/index.ts +66 -0
- package/src/lib/utils.ts +6 -0
- package/src/plugin/index.ts +611 -0
- package/src/styles/animations.css +59 -0
- package/src/styles/bridge.css +117 -0
- package/src/styles/derived-utilities.css +179 -0
- package/src/styles/fonts.css +23 -0
- package/src/styles/index.css +72 -0
- package/src/styles/palette.css +189 -0
- package/src/styles/tailwind-tokens.css +56 -0
- package/src/styles/theme.css +103 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../lib/utils"
|
|
4
|
+
import { Button } from "./button"
|
|
5
|
+
import { IconChevronLeftOutline18, IconChevronRightOutline18, IconDotsOutline18 } from "../../icons"
|
|
6
|
+
|
|
7
|
+
function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
|
|
8
|
+
return (
|
|
9
|
+
<nav
|
|
10
|
+
role="navigation"
|
|
11
|
+
aria-label="pagination"
|
|
12
|
+
data-slot="pagination"
|
|
13
|
+
className={cn("mx-auto flex w-full justify-center", className)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function PaginationContent({
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}: React.ComponentProps<"ul">) {
|
|
23
|
+
return (
|
|
24
|
+
<ul
|
|
25
|
+
data-slot="pagination-content"
|
|
26
|
+
className={cn("flex items-center gap-0.5", className)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function PaginationItem({ ...props }: React.ComponentProps<"li">) {
|
|
33
|
+
return <li data-slot="pagination-item" {...props} />
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
type PaginationLinkProps = {
|
|
37
|
+
isActive?: boolean
|
|
38
|
+
} & Pick<React.ComponentProps<typeof Button>, "size"> &
|
|
39
|
+
React.ComponentProps<"a">
|
|
40
|
+
|
|
41
|
+
function PaginationLink({
|
|
42
|
+
className,
|
|
43
|
+
isActive,
|
|
44
|
+
size = "icon",
|
|
45
|
+
...props
|
|
46
|
+
}: PaginationLinkProps) {
|
|
47
|
+
return (
|
|
48
|
+
<Button
|
|
49
|
+
variant={isActive ? "outline" : "ghost"}
|
|
50
|
+
size={size}
|
|
51
|
+
className={cn(className)}
|
|
52
|
+
nativeButton={false}
|
|
53
|
+
render={
|
|
54
|
+
<a
|
|
55
|
+
aria-current={isActive ? "page" : undefined}
|
|
56
|
+
data-slot="pagination-link"
|
|
57
|
+
data-active={isActive}
|
|
58
|
+
{...props}
|
|
59
|
+
/>
|
|
60
|
+
}
|
|
61
|
+
/>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function PaginationPrevious({
|
|
66
|
+
className,
|
|
67
|
+
text = "Previous",
|
|
68
|
+
...props
|
|
69
|
+
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
70
|
+
return (
|
|
71
|
+
<PaginationLink
|
|
72
|
+
aria-label="Go to previous page"
|
|
73
|
+
size="default"
|
|
74
|
+
className={cn("pl-1.5!", className)}
|
|
75
|
+
{...props}
|
|
76
|
+
>
|
|
77
|
+
<IconChevronLeftOutline18 data-icon="inline-start" />
|
|
78
|
+
<span className="hidden sm:block">{text}</span>
|
|
79
|
+
</PaginationLink>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function PaginationNext({
|
|
84
|
+
className,
|
|
85
|
+
text = "Next",
|
|
86
|
+
...props
|
|
87
|
+
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
88
|
+
return (
|
|
89
|
+
<PaginationLink
|
|
90
|
+
aria-label="Go to next page"
|
|
91
|
+
size="default"
|
|
92
|
+
className={cn("pr-1.5!", className)}
|
|
93
|
+
{...props}
|
|
94
|
+
>
|
|
95
|
+
<span className="hidden sm:block">{text}</span>
|
|
96
|
+
<IconChevronRightOutline18 data-icon="inline-end" />
|
|
97
|
+
</PaginationLink>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function PaginationEllipsis({
|
|
102
|
+
className,
|
|
103
|
+
...props
|
|
104
|
+
}: React.ComponentProps<"span">) {
|
|
105
|
+
return (
|
|
106
|
+
<span
|
|
107
|
+
aria-hidden
|
|
108
|
+
data-slot="pagination-ellipsis"
|
|
109
|
+
className={cn(
|
|
110
|
+
"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
111
|
+
className
|
|
112
|
+
)}
|
|
113
|
+
{...props}
|
|
114
|
+
>
|
|
115
|
+
<IconDotsOutline18
|
|
116
|
+
/>
|
|
117
|
+
<span className="sr-only">More pages</span>
|
|
118
|
+
</span>
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export {
|
|
123
|
+
Pagination,
|
|
124
|
+
PaginationContent,
|
|
125
|
+
PaginationEllipsis,
|
|
126
|
+
PaginationItem,
|
|
127
|
+
PaginationLink,
|
|
128
|
+
PaginationNext,
|
|
129
|
+
PaginationPrevious,
|
|
130
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover"
|
|
3
|
+
|
|
4
|
+
import { cn } from "../../lib/utils"
|
|
5
|
+
|
|
6
|
+
function Popover({ ...props }: PopoverPrimitive.Root.Props) {
|
|
7
|
+
return <PopoverPrimitive.Root data-slot="popover" {...props} />
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
|
|
11
|
+
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function PopoverContent({
|
|
15
|
+
className,
|
|
16
|
+
align = "center",
|
|
17
|
+
alignOffset = 0,
|
|
18
|
+
side = "bottom",
|
|
19
|
+
sideOffset = 4,
|
|
20
|
+
...props
|
|
21
|
+
}: PopoverPrimitive.Popup.Props &
|
|
22
|
+
Pick<
|
|
23
|
+
PopoverPrimitive.Positioner.Props,
|
|
24
|
+
"align" | "alignOffset" | "side" | "sideOffset"
|
|
25
|
+
>) {
|
|
26
|
+
return (
|
|
27
|
+
<PopoverPrimitive.Portal>
|
|
28
|
+
<PopoverPrimitive.Positioner
|
|
29
|
+
align={align}
|
|
30
|
+
alignOffset={alignOffset}
|
|
31
|
+
side={side}
|
|
32
|
+
sideOffset={sideOffset}
|
|
33
|
+
className="isolate z-50"
|
|
34
|
+
>
|
|
35
|
+
<PopoverPrimitive.Popup
|
|
36
|
+
data-slot="popover-content"
|
|
37
|
+
className={cn(
|
|
38
|
+
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
39
|
+
className
|
|
40
|
+
)}
|
|
41
|
+
{...props}
|
|
42
|
+
/>
|
|
43
|
+
</PopoverPrimitive.Positioner>
|
|
44
|
+
</PopoverPrimitive.Portal>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function PopoverHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
49
|
+
return (
|
|
50
|
+
<div
|
|
51
|
+
data-slot="popover-header"
|
|
52
|
+
className={cn("flex flex-col gap-0.5 text-sm", className)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
|
|
59
|
+
return (
|
|
60
|
+
<PopoverPrimitive.Title
|
|
61
|
+
data-slot="popover-title"
|
|
62
|
+
className={cn("font-medium", className)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function PopoverDescription({
|
|
69
|
+
className,
|
|
70
|
+
...props
|
|
71
|
+
}: PopoverPrimitive.Description.Props) {
|
|
72
|
+
return (
|
|
73
|
+
<PopoverPrimitive.Description
|
|
74
|
+
data-slot="popover-description"
|
|
75
|
+
className={cn("text-muted-foreground", className)}
|
|
76
|
+
{...props}
|
|
77
|
+
/>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export {
|
|
82
|
+
Popover,
|
|
83
|
+
PopoverContent,
|
|
84
|
+
PopoverDescription,
|
|
85
|
+
PopoverHeader,
|
|
86
|
+
PopoverTitle,
|
|
87
|
+
PopoverTrigger,
|
|
88
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress"
|
|
4
|
+
|
|
5
|
+
import { cn } from "../../lib/utils"
|
|
6
|
+
|
|
7
|
+
function Progress({
|
|
8
|
+
className,
|
|
9
|
+
children,
|
|
10
|
+
value,
|
|
11
|
+
...props
|
|
12
|
+
}: ProgressPrimitive.Root.Props) {
|
|
13
|
+
return (
|
|
14
|
+
<ProgressPrimitive.Root
|
|
15
|
+
value={value}
|
|
16
|
+
data-slot="progress"
|
|
17
|
+
className={cn("flex flex-wrap gap-3", className)}
|
|
18
|
+
{...props}
|
|
19
|
+
>
|
|
20
|
+
{children}
|
|
21
|
+
<ProgressTrack>
|
|
22
|
+
<ProgressIndicator />
|
|
23
|
+
</ProgressTrack>
|
|
24
|
+
</ProgressPrimitive.Root>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
29
|
+
return (
|
|
30
|
+
<ProgressPrimitive.Track
|
|
31
|
+
className={cn(
|
|
32
|
+
"relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
|
|
33
|
+
className
|
|
34
|
+
)}
|
|
35
|
+
data-slot="progress-track"
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function ProgressIndicator({
|
|
42
|
+
className,
|
|
43
|
+
...props
|
|
44
|
+
}: ProgressPrimitive.Indicator.Props) {
|
|
45
|
+
return (
|
|
46
|
+
<ProgressPrimitive.Indicator
|
|
47
|
+
data-slot="progress-indicator"
|
|
48
|
+
className={cn("h-full bg-primary transition-all", className)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
55
|
+
return (
|
|
56
|
+
<ProgressPrimitive.Label
|
|
57
|
+
className={cn("text-sm font-medium", className)}
|
|
58
|
+
data-slot="progress-label"
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
65
|
+
return (
|
|
66
|
+
<ProgressPrimitive.Value
|
|
67
|
+
className={cn(
|
|
68
|
+
"ml-auto text-sm text-muted-foreground tabular-nums",
|
|
69
|
+
className
|
|
70
|
+
)}
|
|
71
|
+
data-slot="progress-value"
|
|
72
|
+
{...props}
|
|
73
|
+
/>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export {
|
|
78
|
+
Progress,
|
|
79
|
+
ProgressTrack,
|
|
80
|
+
ProgressIndicator,
|
|
81
|
+
ProgressLabel,
|
|
82
|
+
ProgressValue,
|
|
83
|
+
}
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Questionnaire as QuestionnairePrimitive } from "@shadcn/react/questionnaire"
|
|
5
|
+
|
|
6
|
+
import { cn } from "../../lib/utils"
|
|
7
|
+
import { buttonVariants, type Button } from "./button"
|
|
8
|
+
import { IconCheckOutline18 } from "../../icons"
|
|
9
|
+
|
|
10
|
+
function Questionnaire({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Root>) {
|
|
14
|
+
return (
|
|
15
|
+
<QuestionnairePrimitive.Root
|
|
16
|
+
data-slot="questionnaire"
|
|
17
|
+
className={cn("flex w-full min-w-0 flex-col gap-4", className)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function QuestionnaireProgress({
|
|
24
|
+
className,
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Progress>) {
|
|
27
|
+
return (
|
|
28
|
+
<QuestionnairePrimitive.Progress
|
|
29
|
+
data-slot="questionnaire-progress"
|
|
30
|
+
className={cn(
|
|
31
|
+
"min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums",
|
|
32
|
+
className
|
|
33
|
+
)}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function QuestionnaireItem({
|
|
40
|
+
className,
|
|
41
|
+
...props
|
|
42
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Item>) {
|
|
43
|
+
return (
|
|
44
|
+
<QuestionnairePrimitive.Item
|
|
45
|
+
data-slot="questionnaire-item"
|
|
46
|
+
className={cn(
|
|
47
|
+
"flex min-w-0 flex-col gap-4 border-0 p-0 outline-none",
|
|
48
|
+
className
|
|
49
|
+
)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function QuestionnaireTitle({
|
|
56
|
+
className,
|
|
57
|
+
...props
|
|
58
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Title>) {
|
|
59
|
+
return (
|
|
60
|
+
<QuestionnairePrimitive.Title
|
|
61
|
+
data-slot="questionnaire-title"
|
|
62
|
+
className={cn(
|
|
63
|
+
"font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4",
|
|
64
|
+
className
|
|
65
|
+
)}
|
|
66
|
+
{...props}
|
|
67
|
+
/>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function QuestionnaireDescription({
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Description>) {
|
|
75
|
+
return (
|
|
76
|
+
<QuestionnairePrimitive.Description
|
|
77
|
+
data-slot="questionnaire-description"
|
|
78
|
+
className={cn("text-sm text-pretty text-muted-foreground", className)}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function QuestionnaireChoices({
|
|
85
|
+
className,
|
|
86
|
+
...props
|
|
87
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Choices>) {
|
|
88
|
+
return (
|
|
89
|
+
<QuestionnairePrimitive.Choices
|
|
90
|
+
data-slot="questionnaire-choices"
|
|
91
|
+
className={cn(
|
|
92
|
+
"group/questionnaire-choices grid min-w-0 gap-2",
|
|
93
|
+
className
|
|
94
|
+
)}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function QuestionnaireChoice({
|
|
101
|
+
children,
|
|
102
|
+
className,
|
|
103
|
+
...props
|
|
104
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Choice>) {
|
|
105
|
+
return (
|
|
106
|
+
<QuestionnairePrimitive.Choice
|
|
107
|
+
data-slot="questionnaire-choice"
|
|
108
|
+
className={cn(
|
|
109
|
+
"group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-derived bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted",
|
|
110
|
+
"data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
111
|
+
className
|
|
112
|
+
)}
|
|
113
|
+
{...props}
|
|
114
|
+
>
|
|
115
|
+
<QuestionnairePrimitive.ChoiceInput
|
|
116
|
+
data-slot="questionnaire-choice-input"
|
|
117
|
+
className="absolute inset-0 z-10 size-full cursor-pointer opacity-0"
|
|
118
|
+
/>
|
|
119
|
+
<span
|
|
120
|
+
aria-hidden="true"
|
|
121
|
+
data-slot="questionnaire-choice-indicator"
|
|
122
|
+
className="pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-derived-strong group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary"
|
|
123
|
+
>
|
|
124
|
+
<span
|
|
125
|
+
data-slot="questionnaire-choice-indicator-dot"
|
|
126
|
+
className="hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
|
|
127
|
+
/>
|
|
128
|
+
<IconCheckOutline18 data-slot="questionnaire-choice-indicator-check" className="hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block" />
|
|
129
|
+
</span>
|
|
130
|
+
<QuestionnairePrimitive.ChoiceLabel
|
|
131
|
+
data-slot="questionnaire-choice-label"
|
|
132
|
+
className="flex min-w-0 flex-1 flex-col gap-0.5 leading-snug"
|
|
133
|
+
>
|
|
134
|
+
{children}
|
|
135
|
+
</QuestionnairePrimitive.ChoiceLabel>
|
|
136
|
+
<QuestionnairePrimitive.ChoiceShortcut
|
|
137
|
+
data-slot="questionnaire-choice-shortcut"
|
|
138
|
+
className="pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-derived bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
|
|
139
|
+
/>
|
|
140
|
+
</QuestionnairePrimitive.Choice>
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function QuestionnaireChoiceDescription({
|
|
145
|
+
className,
|
|
146
|
+
...props
|
|
147
|
+
}: React.ComponentProps<"span">) {
|
|
148
|
+
return (
|
|
149
|
+
<span
|
|
150
|
+
data-slot="questionnaire-choice-description"
|
|
151
|
+
className={cn("text-muted-foreground", className)}
|
|
152
|
+
{...props}
|
|
153
|
+
/>
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function QuestionnaireInput({
|
|
158
|
+
className,
|
|
159
|
+
...props
|
|
160
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Input>) {
|
|
161
|
+
return (
|
|
162
|
+
<div
|
|
163
|
+
data-slot="questionnaire-input-wrapper"
|
|
164
|
+
className="group/questionnaire-input relative w-full min-w-0"
|
|
165
|
+
>
|
|
166
|
+
<QuestionnairePrimitive.Input
|
|
167
|
+
data-slot="questionnaire-input"
|
|
168
|
+
className={cn(
|
|
169
|
+
"h-8 min-h-11 w-full min-w-0 rounded-lg border border-derived bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 sm:min-h-0 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
170
|
+
"selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground",
|
|
171
|
+
className
|
|
172
|
+
)}
|
|
173
|
+
{...props}
|
|
174
|
+
/>
|
|
175
|
+
</div>
|
|
176
|
+
)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function QuestionnaireError({
|
|
180
|
+
className,
|
|
181
|
+
...props
|
|
182
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Error>) {
|
|
183
|
+
return (
|
|
184
|
+
<QuestionnairePrimitive.Error
|
|
185
|
+
data-slot="questionnaire-error"
|
|
186
|
+
className={cn("mt-2 text-sm text-destructive", className)}
|
|
187
|
+
{...props}
|
|
188
|
+
/>
|
|
189
|
+
)
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function QuestionnaireActions({
|
|
193
|
+
className,
|
|
194
|
+
...props
|
|
195
|
+
}: React.ComponentProps<"div">) {
|
|
196
|
+
return (
|
|
197
|
+
<div
|
|
198
|
+
data-slot="questionnaire-actions"
|
|
199
|
+
className={cn(
|
|
200
|
+
"grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8",
|
|
201
|
+
className
|
|
202
|
+
)}
|
|
203
|
+
{...props}
|
|
204
|
+
/>
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function QuestionnairePrevious({
|
|
209
|
+
children,
|
|
210
|
+
className,
|
|
211
|
+
size = "default",
|
|
212
|
+
variant = "outline",
|
|
213
|
+
...props
|
|
214
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Previous> &
|
|
215
|
+
Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
|
|
216
|
+
return (
|
|
217
|
+
<QuestionnairePrimitive.Previous
|
|
218
|
+
data-slot="questionnaire-previous"
|
|
219
|
+
data-size={size}
|
|
220
|
+
data-variant={variant}
|
|
221
|
+
className={cn(
|
|
222
|
+
buttonVariants({ size, variant }),
|
|
223
|
+
"col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0",
|
|
224
|
+
className
|
|
225
|
+
)}
|
|
226
|
+
{...props}
|
|
227
|
+
>
|
|
228
|
+
{children ?? "Previous"}
|
|
229
|
+
</QuestionnairePrimitive.Previous>
|
|
230
|
+
)
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function QuestionnaireSkip({
|
|
234
|
+
children,
|
|
235
|
+
className,
|
|
236
|
+
size = "default",
|
|
237
|
+
variant = "outline",
|
|
238
|
+
...props
|
|
239
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Skip> &
|
|
240
|
+
Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
|
|
241
|
+
return (
|
|
242
|
+
<QuestionnairePrimitive.Skip
|
|
243
|
+
data-slot="questionnaire-skip"
|
|
244
|
+
data-size={size}
|
|
245
|
+
data-variant={variant}
|
|
246
|
+
className={cn(
|
|
247
|
+
buttonVariants({ size, variant }),
|
|
248
|
+
"col-start-2 row-start-1 min-h-11 justify-self-end sm:min-h-0",
|
|
249
|
+
className
|
|
250
|
+
)}
|
|
251
|
+
{...props}
|
|
252
|
+
>
|
|
253
|
+
{children ?? "Skip"}
|
|
254
|
+
</QuestionnairePrimitive.Skip>
|
|
255
|
+
)
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function QuestionnaireNext({
|
|
259
|
+
children,
|
|
260
|
+
className,
|
|
261
|
+
size = "default",
|
|
262
|
+
variant = "default",
|
|
263
|
+
...props
|
|
264
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Next> &
|
|
265
|
+
Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
|
|
266
|
+
return (
|
|
267
|
+
<QuestionnairePrimitive.Next
|
|
268
|
+
data-slot="questionnaire-next"
|
|
269
|
+
data-size={size}
|
|
270
|
+
data-variant={variant}
|
|
271
|
+
className={cn(
|
|
272
|
+
buttonVariants({ size, variant }),
|
|
273
|
+
"col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0",
|
|
274
|
+
className
|
|
275
|
+
)}
|
|
276
|
+
{...props}
|
|
277
|
+
>
|
|
278
|
+
{children ?? "Next"}
|
|
279
|
+
</QuestionnairePrimitive.Next>
|
|
280
|
+
)
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function QuestionnaireSubmit({
|
|
284
|
+
children,
|
|
285
|
+
className,
|
|
286
|
+
size = "default",
|
|
287
|
+
variant = "default",
|
|
288
|
+
...props
|
|
289
|
+
}: React.ComponentProps<typeof QuestionnairePrimitive.Submit> &
|
|
290
|
+
Pick<React.ComponentProps<typeof Button>, "size" | "variant">) {
|
|
291
|
+
return (
|
|
292
|
+
<QuestionnairePrimitive.Submit
|
|
293
|
+
data-slot="questionnaire-submit"
|
|
294
|
+
data-size={size}
|
|
295
|
+
data-variant={variant}
|
|
296
|
+
className={cn(
|
|
297
|
+
buttonVariants({ size, variant }),
|
|
298
|
+
"col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0",
|
|
299
|
+
className
|
|
300
|
+
)}
|
|
301
|
+
{...props}
|
|
302
|
+
>
|
|
303
|
+
{children ?? "Submit"}
|
|
304
|
+
</QuestionnairePrimitive.Submit>
|
|
305
|
+
)
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export {
|
|
309
|
+
Questionnaire,
|
|
310
|
+
QuestionnaireActions,
|
|
311
|
+
QuestionnaireChoice,
|
|
312
|
+
QuestionnaireChoiceDescription,
|
|
313
|
+
QuestionnaireChoices,
|
|
314
|
+
QuestionnaireDescription,
|
|
315
|
+
QuestionnaireError,
|
|
316
|
+
QuestionnaireInput,
|
|
317
|
+
QuestionnaireItem,
|
|
318
|
+
QuestionnaireNext,
|
|
319
|
+
QuestionnairePrevious,
|
|
320
|
+
QuestionnaireProgress,
|
|
321
|
+
QuestionnaireSkip,
|
|
322
|
+
QuestionnaireSubmit,
|
|
323
|
+
QuestionnaireTitle,
|
|
324
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Radio as RadioPrimitive } from "@base-ui/react/radio"
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group"
|
|
3
|
+
|
|
4
|
+
import { cn } from "../../lib/utils"
|
|
5
|
+
|
|
6
|
+
function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {
|
|
7
|
+
return (
|
|
8
|
+
<RadioGroupPrimitive
|
|
9
|
+
data-slot="radio-group"
|
|
10
|
+
className={cn("grid w-full gap-2", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
17
|
+
return (
|
|
18
|
+
<RadioPrimitive.Root
|
|
19
|
+
data-slot="radio-group-item"
|
|
20
|
+
className={cn(
|
|
21
|
+
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-derived-strong transition-colors outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
22
|
+
className
|
|
23
|
+
)}
|
|
24
|
+
{...props}
|
|
25
|
+
>
|
|
26
|
+
<RadioPrimitive.Indicator
|
|
27
|
+
data-slot="radio-group-indicator"
|
|
28
|
+
className="flex size-4 items-center justify-center"
|
|
29
|
+
>
|
|
30
|
+
<span className="ui-radio-dot absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground transition-[transform,opacity] duration-200" />
|
|
31
|
+
</RadioPrimitive.Indicator>
|
|
32
|
+
</RadioPrimitive.Root>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { RadioGroup, RadioGroupItem }
|