@rangka/client 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts.map +1 -1
- package/dist/App.js +7 -1
- package/dist/App.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +20 -0
- package/dist/main.js.map +1 -1
- package/dist/shell/assets/AttachmentWidget-BTTGroHP.js +1 -0
- package/dist/shell/assets/AttachmentsWidget-DZgvmO9P.js +1 -0
- package/dist/shell/assets/BadgeWidget-DN6GsAAG.js +1 -0
- package/dist/shell/assets/CardWidget-qX-UvqJh.js +1 -0
- package/dist/shell/assets/CheckboxWidget-CYPZ85ih.js +1 -0
- package/dist/shell/assets/CodeWidget-DnVtHG1d.js +1 -0
- package/dist/shell/assets/ColumnWidget-CYmFCVOf.js +1 -0
- package/dist/shell/assets/ComputedWidget-BQApkfir.js +1 -0
- package/dist/shell/assets/DatePickerWidget-pEusSy9D.js +1 -0
- package/dist/shell/assets/DatetimeWidget-M0fEGDTD.js +1 -0
- package/dist/shell/assets/DividerWidget-hXVGhIKC.js +1 -0
- package/dist/shell/assets/DrawerWidget-DynL7EIy.js +1 -0
- package/dist/shell/assets/DynamicLinkWidget-ChMJ5DAf.js +1 -0
- package/dist/shell/assets/IconWidget-Cgo9txq1.js +1 -0
- package/dist/shell/assets/ImageWidget-YUv1_OQK.js +1 -0
- package/dist/shell/assets/JsonWidget-RHUHhXHJ.js +1 -0
- package/dist/shell/assets/LinkWidget-CIu7qmb2.js +1 -0
- package/dist/shell/assets/ManyToManyWidget-DCQnygvZ.js +1 -0
- package/dist/shell/assets/ModalWidget-FggzYaS2.js +1 -0
- package/dist/shell/assets/MoneyWidget-CKjOSucD.js +1 -0
- package/dist/shell/assets/RepeatWidget-Dfp4zW4d.js +1 -0
- package/dist/shell/assets/ScrollAreaWidget-CdFdf4rv.js +1 -0
- package/dist/shell/assets/SequenceWidget-DIXHZslz.js +1 -0
- package/dist/shell/assets/SpacerWidget-BgM4dC6x.js +1 -0
- package/dist/shell/assets/SplitWidget-_mcQkjQk.js +1 -0
- package/dist/shell/assets/StackWidget-BI_VIreo.js +1 -0
- package/dist/shell/assets/TableWidget-DuIvd6qR.js +1 -0
- package/dist/shell/assets/TextareaWidget-CATua7Ls.js +1 -0
- package/dist/shell/assets/TreeWidget-BoHlhfza.js +1 -0
- package/dist/shell/assets/calendar-DqckiKt1.js +1 -0
- package/dist/shell/assets/index-63v1sBS3.css +1 -0
- package/dist/shell/assets/index-D1wStSrO.js +8635 -0
- package/dist/shell/assets/popover-DywIKFaQ.js +1 -0
- package/dist/shell/assets/textarea-BVCZevA6.js +1 -0
- package/dist/shell/assets/useSurfaceContext-kzu9770H.js +1 -0
- package/dist/shell/assets/vendor-query-dRdWN_eK.js +1 -0
- package/dist/shell/assets/vendor-radix-D-Trh8JA.js +69 -0
- package/dist/shell/assets/vendor-router-B1WM9yRc.js +17 -0
- package/dist/shell/index.html +5 -2
- package/dist/theme.css +82 -0
- package/dist/widgets/components/lazy-manifest.d.ts +11 -0
- package/dist/widgets/components/lazy-manifest.d.ts.map +1 -0
- package/dist/widgets/components/lazy-manifest.js +32 -0
- package/dist/widgets/components/lazy-manifest.js.map +1 -0
- package/dist/widgets/components/register.d.ts.map +1 -1
- package/dist/widgets/components/register.js +0 -58
- package/dist/widgets/components/register.js.map +1 -1
- package/dist/widgets/loader.d.ts +3 -0
- package/dist/widgets/loader.d.ts.map +1 -0
- package/dist/widgets/loader.js +99 -0
- package/dist/widgets/loader.js.map +1 -0
- package/dist/widgets/renderer/LazyWidget.d.ts +8 -0
- package/dist/widgets/renderer/LazyWidget.d.ts.map +1 -0
- package/dist/widgets/renderer/LazyWidget.js +31 -0
- package/dist/widgets/renderer/LazyWidget.js.map +1 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.d.ts +17 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.d.ts.map +1 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.js +18 -0
- package/dist/widgets/renderer/WidgetErrorBoundary.js.map +1 -0
- package/dist/widgets/renderer/WidgetRenderer.d.ts.map +1 -1
- package/dist/widgets/renderer/WidgetRenderer.js +8 -6
- package/dist/widgets/renderer/WidgetRenderer.js.map +1 -1
- package/package.json +7 -4
- package/.claude/skills/add-widget/SKILL.md +0 -101
- package/.turbo/turbo-build.log +0 -29
- package/CHANGELOG.md +0 -18
- package/CLAUDE.md +0 -236
- package/components.json +0 -25
- package/dist/components/ui/chart.d.ts +0 -45
- package/dist/components/ui/chart.d.ts.map +0 -1
- package/dist/components/ui/chart.js +0 -119
- package/dist/components/ui/chart.js.map +0 -1
- package/dist/shell/assets/index--35CAvcP.js +0 -8715
- package/dist/shell/assets/index-COLmoPYo.css +0 -1
- package/index.html +0 -12
- package/src/App.tsx +0 -44
- package/src/__tests__/setup.ts +0 -1
- package/src/api/auth.ts +0 -41
- package/src/api/boot.ts +0 -10
- package/src/api/client.ts +0 -26
- package/src/api/paths.ts +0 -3
- package/src/api/token.ts +0 -13
- package/src/auth/LoginForm.tsx +0 -67
- package/src/auth/SessionExpired.tsx +0 -24
- package/src/auth/SetupForm.tsx +0 -76
- package/src/boot/BootGate.tsx +0 -35
- package/src/boot/BootProvider.tsx +0 -28
- package/src/boot/types.ts +0 -9
- package/src/boot/useBoot.ts +0 -111
- package/src/components/Icon.tsx +0 -17
- package/src/components/ui/accordion.tsx +0 -82
- package/src/components/ui/alert-dialog.tsx +0 -180
- package/src/components/ui/alert.tsx +0 -76
- package/src/components/ui/aspect-ratio.tsx +0 -9
- package/src/components/ui/avatar.tsx +0 -94
- package/src/components/ui/badge.tsx +0 -45
- package/src/components/ui/breadcrumb.tsx +0 -104
- package/src/components/ui/button-group.tsx +0 -78
- package/src/components/ui/button.tsx +0 -65
- package/src/components/ui/calendar.tsx +0 -187
- package/src/components/ui/card.tsx +0 -85
- package/src/components/ui/carousel.tsx +0 -229
- package/src/components/ui/chart.tsx +0 -339
- package/src/components/ui/checkbox.tsx +0 -27
- package/src/components/ui/collapsible.tsx +0 -21
- package/src/components/ui/combobox.tsx +0 -275
- package/src/components/ui/command.tsx +0 -178
- package/src/components/ui/context-menu.tsx +0 -242
- package/src/components/ui/dialog.tsx +0 -146
- package/src/components/ui/direction.tsx +0 -20
- package/src/components/ui/drawer.tsx +0 -118
- package/src/components/ui/dropdown-menu.tsx +0 -247
- package/src/components/ui/empty.tsx +0 -94
- package/src/components/ui/field.tsx +0 -224
- package/src/components/ui/hover-card.tsx +0 -36
- package/src/components/ui/input-group.tsx +0 -142
- package/src/components/ui/input-otp.tsx +0 -86
- package/src/components/ui/input.tsx +0 -19
- package/src/components/ui/item.tsx +0 -182
- package/src/components/ui/kbd.tsx +0 -26
- package/src/components/ui/label.tsx +0 -19
- package/src/components/ui/menubar.tsx +0 -260
- package/src/components/ui/native-select.tsx +0 -55
- package/src/components/ui/navigation-menu.tsx +0 -160
- package/src/components/ui/pagination.tsx +0 -112
- package/src/components/ui/popover.tsx +0 -74
- package/src/components/ui/progress.tsx +0 -31
- package/src/components/ui/radio-group.tsx +0 -42
- package/src/components/ui/resizable.tsx +0 -42
- package/src/components/ui/scroll-area.tsx +0 -53
- package/src/components/ui/select.tsx +0 -185
- package/src/components/ui/separator.tsx +0 -26
- package/src/components/ui/sheet.tsx +0 -128
- package/src/components/ui/sidebar.tsx +0 -669
- package/src/components/ui/skeleton.tsx +0 -13
- package/src/components/ui/slider.tsx +0 -54
- package/src/components/ui/sonner.tsx +0 -43
- package/src/components/ui/spinner.tsx +0 -16
- package/src/components/ui/switch.tsx +0 -33
- package/src/components/ui/table.tsx +0 -87
- package/src/components/ui/tabs.tsx +0 -80
- package/src/components/ui/textarea.tsx +0 -18
- package/src/components/ui/toggle-group.tsx +0 -86
- package/src/components/ui/toggle.tsx +0 -44
- package/src/components/ui/tooltip.tsx +0 -53
- package/src/context/MetaContext.tsx +0 -22
- package/src/context/ModuleContext.tsx +0 -62
- package/src/context/PermissionsContext.tsx +0 -39
- package/src/context/ShellProviders.tsx +0 -33
- package/src/context/UserContext.tsx +0 -16
- package/src/data/QueryProvider.tsx +0 -7
- package/src/data/queryClient.ts +0 -18
- package/src/data/useModelMeta.ts +0 -17
- package/src/data/useMutation.ts +0 -60
- package/src/data/useRecord.ts +0 -29
- package/src/data/useSource.ts +0 -112
- package/src/hooks/use-mobile.ts +0 -19
- package/src/index.css +0 -260
- package/src/index.ts +0 -16
- package/src/lib/utils.ts +0 -6
- package/src/main.tsx +0 -17
- package/src/router/NotFound.tsx +0 -8
- package/src/router/RouterProvider.tsx +0 -7
- package/src/router/buildRouteTree.tsx +0 -63
- package/src/router/createShellRouter.ts +0 -9
- package/src/router/hooks.ts +0 -43
- package/src/shell/CommandPalette.tsx +0 -76
- package/src/shell/ConfirmDialog.tsx +0 -34
- package/src/shell/ConfirmProvider.tsx +0 -56
- package/src/shell/DrawerContext.tsx +0 -44
- package/src/shell/HeaderActions.tsx +0 -31
- package/src/shell/ModuleSelectorPage.tsx +0 -149
- package/src/shell/PageOutlet.tsx +0 -21
- package/src/shell/ShellContext.tsx +0 -45
- package/src/shell/ShellDevTools.tsx +0 -153
- package/src/shell/ShellLayout.tsx +0 -231
- package/src/shell/Toast.tsx +0 -58
- package/src/shell/ToastProvider.tsx +0 -60
- package/src/shell/app-sidebar/AppSidebar.tsx +0 -44
- package/src/shell/app-sidebar/ModuleSwitcher.tsx +0 -87
- package/src/shell/app-sidebar/NavMain.tsx +0 -64
- package/src/shell/app-sidebar/NavUser.tsx +0 -97
- package/src/shell/app-sidebar/SearchMenu.tsx +0 -22
- package/src/shell/app-sidebar/index.ts +0 -8
- package/src/shell/app-sidebar/types.ts +0 -38
- package/src/shell/types.ts +0 -6
- package/src/shell/useBreadcrumbs.ts +0 -42
- package/src/studio/bridge.ts +0 -125
- package/src/studio/index.ts +0 -3
- package/src/studio/overlay.ts +0 -47
- package/src/studio/types.ts +0 -32
- package/src/studio/walker.ts +0 -48
- package/src/vite-env.d.ts +0 -1
- package/src/widgets/__tests__/action-edge-cases.test.ts +0 -281
- package/src/widgets/__tests__/action.test.ts +0 -236
- package/src/widgets/__tests__/attachment-widget.test.tsx +0 -85
- package/src/widgets/__tests__/attachments-widget.test.tsx +0 -109
- package/src/widgets/__tests__/binding.test.ts +0 -76
- package/src/widgets/__tests__/button-widget.test.tsx +0 -145
- package/src/widgets/__tests__/checkbox-widget.test.tsx +0 -158
- package/src/widgets/__tests__/code-widget.test.tsx +0 -64
- package/src/widgets/__tests__/computed-widget.test.tsx +0 -62
- package/src/widgets/__tests__/condition-edge-cases.test.ts +0 -120
- package/src/widgets/__tests__/condition.test.ts +0 -221
- package/src/widgets/__tests__/context.test.ts +0 -99
- package/src/widgets/__tests__/data-widget.test.tsx +0 -204
- package/src/widgets/__tests__/datepicker-widget.test.tsx +0 -66
- package/src/widgets/__tests__/datetime-widget.test.tsx +0 -67
- package/src/widgets/__tests__/drawer-widget.test.tsx +0 -149
- package/src/widgets/__tests__/dynamic-link-widget.test.tsx +0 -52
- package/src/widgets/__tests__/edge-cases.test.ts +0 -232
- package/src/widgets/__tests__/evaluator.test.ts +0 -107
- package/src/widgets/__tests__/functions.test.ts +0 -147
- package/src/widgets/__tests__/grid-widget.test.tsx +0 -137
- package/src/widgets/__tests__/hooks.test.tsx +0 -249
- package/src/widgets/__tests__/icon-widget.test.tsx +0 -129
- package/src/widgets/__tests__/input-widget.test.tsx +0 -264
- package/src/widgets/__tests__/integration.test.ts +0 -116
- package/src/widgets/__tests__/json-widget.test.tsx +0 -70
- package/src/widgets/__tests__/link-widget.test.tsx +0 -92
- package/src/widgets/__tests__/many-to-many-widget.test.tsx +0 -93
- package/src/widgets/__tests__/modal-widget.test.tsx +0 -148
- package/src/widgets/__tests__/money-widget.test.tsx +0 -97
- package/src/widgets/__tests__/parser.test.ts +0 -171
- package/src/widgets/__tests__/reactive-variables.test.ts +0 -383
- package/src/widgets/__tests__/renderer.test.tsx +0 -300
- package/src/widgets/__tests__/repeat-widget.test.tsx +0 -229
- package/src/widgets/__tests__/select-widget.test.tsx +0 -231
- package/src/widgets/__tests__/sequence-widget.test.tsx +0 -58
- package/src/widgets/__tests__/shell-integration.test.tsx +0 -1343
- package/src/widgets/__tests__/split-widget.test.tsx +0 -133
- package/src/widgets/__tests__/state-edge-cases.test.ts +0 -118
- package/src/widgets/__tests__/state.test.ts +0 -106
- package/src/widgets/__tests__/table-data-binding.test.tsx +0 -482
- package/src/widgets/__tests__/table-filter-popover.test.tsx +0 -486
- package/src/widgets/__tests__/table-search.test.tsx +0 -305
- package/src/widgets/__tests__/table-widget.test.tsx +0 -509
- package/src/widgets/__tests__/textarea-widget.test.tsx +0 -105
- package/src/widgets/__tests__/tracker-validator-edge-cases.test.ts +0 -242
- package/src/widgets/__tests__/tracker.test.ts +0 -133
- package/src/widgets/__tests__/tree-widget.test.tsx +0 -97
- package/src/widgets/__tests__/use-model-source.test.ts +0 -67
- package/src/widgets/__tests__/validator.test.ts +0 -208
- package/src/widgets/action/dispatcher.ts +0 -334
- package/src/widgets/action/index.ts +0 -2
- package/src/widgets/binding/index.ts +0 -2
- package/src/widgets/binding/resolver.ts +0 -61
- package/src/widgets/components/AttachmentWidget.tsx +0 -111
- package/src/widgets/components/AttachmentsWidget.tsx +0 -121
- package/src/widgets/components/BadgeWidget.tsx +0 -35
- package/src/widgets/components/ButtonWidget.tsx +0 -43
- package/src/widgets/components/CardWidget.tsx +0 -68
- package/src/widgets/components/CheckboxWidget.tsx +0 -39
- package/src/widgets/components/CodeWidget.tsx +0 -44
- package/src/widgets/components/ColumnWidget.tsx +0 -22
- package/src/widgets/components/ComputedWidget.tsx +0 -49
- package/src/widgets/components/DataWidget.tsx +0 -189
- package/src/widgets/components/DatePickerWidget.tsx +0 -73
- package/src/widgets/components/DatetimeWidget.tsx +0 -160
- package/src/widgets/components/DividerWidget.tsx +0 -37
- package/src/widgets/components/DrawerWidget.tsx +0 -52
- package/src/widgets/components/DynamicLinkWidget.tsx +0 -130
- package/src/widgets/components/GridWidget.tsx +0 -134
- package/src/widgets/components/GroupWidget.tsx +0 -111
- package/src/widgets/components/IconWidget.tsx +0 -29
- package/src/widgets/components/ImageWidget.tsx +0 -28
- package/src/widgets/components/InputWidget.tsx +0 -70
- package/src/widgets/components/JsonWidget.tsx +0 -78
- package/src/widgets/components/LinkWidget.tsx +0 -99
- package/src/widgets/components/ManyToManyWidget.tsx +0 -125
- package/src/widgets/components/ModalWidget.tsx +0 -52
- package/src/widgets/components/MoneyWidget.tsx +0 -80
- package/src/widgets/components/RepeatWidget.tsx +0 -66
- package/src/widgets/components/ScrollAreaWidget.tsx +0 -40
- package/src/widgets/components/SectionWidget.tsx +0 -78
- package/src/widgets/components/SelectWidget.tsx +0 -63
- package/src/widgets/components/SequenceWidget.tsx +0 -32
- package/src/widgets/components/SpacerWidget.tsx +0 -29
- package/src/widgets/components/SplitWidget.tsx +0 -60
- package/src/widgets/components/StackWidget.tsx +0 -44
- package/src/widgets/components/TableWidget.tsx +0 -366
- package/src/widgets/components/TextWidget.tsx +0 -44
- package/src/widgets/components/TextareaWidget.tsx +0 -49
- package/src/widgets/components/TreeWidget.tsx +0 -109
- package/src/widgets/components/index.ts +0 -30
- package/src/widgets/components/register.ts +0 -93
- package/src/widgets/components/table/CellRenderers.tsx +0 -83
- package/src/widgets/components/table/TablePagination.tsx +0 -45
- package/src/widgets/components/table/TableToolbar.tsx +0 -285
- package/src/widgets/components/table/filter-operators.ts +0 -134
- package/src/widgets/components/table/index.ts +0 -11
- package/src/widgets/condition/evaluator.ts +0 -57
- package/src/widgets/condition/index.ts +0 -1
- package/src/widgets/context/builder.ts +0 -99
- package/src/widgets/context/index.ts +0 -8
- package/src/widgets/context/types.ts +0 -37
- package/src/widgets/data/index.ts +0 -5
- package/src/widgets/data/useModelQuery.ts +0 -116
- package/src/widgets/data/useModelRecord.ts +0 -37
- package/src/widgets/expression/evaluator.ts +0 -100
- package/src/widgets/expression/functions.ts +0 -131
- package/src/widgets/expression/index.ts +0 -13
- package/src/widgets/expression/parser.ts +0 -229
- package/src/widgets/expression/types.ts +0 -45
- package/src/widgets/form/FormContext.ts +0 -29
- package/src/widgets/form/FormProvider.tsx +0 -84
- package/src/widgets/form/FormWidget.tsx +0 -42
- package/src/widgets/form/index.ts +0 -4
- package/src/widgets/form/useFormState.ts +0 -127
- package/src/widgets/form/useFormSubmit.ts +0 -90
- package/src/widgets/form/useFormValidation.ts +0 -62
- package/src/widgets/hooks/index.ts +0 -8
- package/src/widgets/hooks/useAction.ts +0 -83
- package/src/widgets/hooks/useBind.ts +0 -34
- package/src/widgets/hooks/useCondition.ts +0 -21
- package/src/widgets/hooks/useDataQuery.ts +0 -48
- package/src/widgets/hooks/useExpression.ts +0 -14
- package/src/widgets/hooks/usePageState.ts +0 -21
- package/src/widgets/hooks/useSurfaceContext.ts +0 -11
- package/src/widgets/hooks/useWidgetContext.ts +0 -14
- package/src/widgets/index.ts +0 -80
- package/src/widgets/lib/layout-props.ts +0 -135
- package/src/widgets/reactivity/index.ts +0 -11
- package/src/widgets/reactivity/tracker.ts +0 -139
- package/src/widgets/reactivity/variables.ts +0 -213
- package/src/widgets/registry.ts +0 -41
- package/src/widgets/renderer/SlotRenderer.tsx +0 -47
- package/src/widgets/renderer/WidgetRenderer.tsx +0 -191
- package/src/widgets/renderer/index.ts +0 -4
- package/src/widgets/shell/WidgetSlotRenderer.tsx +0 -73
- package/src/widgets/shell/index.ts +0 -4
- package/src/widgets/shell/useActionHandlers.ts +0 -170
- package/src/widgets/state/index.ts +0 -2
- package/src/widgets/state/store.ts +0 -96
- package/src/widgets/types.ts +0 -28
- package/src/widgets/validation/index.ts +0 -2
- package/src/widgets/validation/validator.ts +0 -140
- package/tsconfig.json +0 -27
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -21
- package/vitest.config.ts +0 -16
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Dialog as DialogPrimitive } from 'radix-ui';
|
|
5
|
-
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
7
|
-
import { Button } from '@/components/ui/button';
|
|
8
|
-
import { XIcon } from 'lucide-react';
|
|
9
|
-
|
|
10
|
-
function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {
|
|
11
|
-
return <DialogPrimitive.Root data-slot="dialog" {...props} />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
|
|
15
|
-
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {
|
|
19
|
-
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {
|
|
23
|
-
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function DialogOverlay({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
|
|
30
|
-
return (
|
|
31
|
-
<DialogPrimitive.Overlay
|
|
32
|
-
data-slot="dialog-overlay"
|
|
33
|
-
className={cn(
|
|
34
|
-
'fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',
|
|
35
|
-
className,
|
|
36
|
-
)}
|
|
37
|
-
{...props}
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function DialogContent({
|
|
43
|
-
className,
|
|
44
|
-
children,
|
|
45
|
-
showCloseButton = true,
|
|
46
|
-
...props
|
|
47
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
48
|
-
showCloseButton?: boolean;
|
|
49
|
-
}) {
|
|
50
|
-
return (
|
|
51
|
-
<DialogPortal>
|
|
52
|
-
<DialogOverlay />
|
|
53
|
-
<DialogPrimitive.Content
|
|
54
|
-
data-slot="dialog-content"
|
|
55
|
-
className={cn(
|
|
56
|
-
'fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-none bg-popover p-4 text-xs/relaxed text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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',
|
|
57
|
-
className,
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
>
|
|
61
|
-
{children}
|
|
62
|
-
{showCloseButton && (
|
|
63
|
-
<DialogPrimitive.Close data-slot="dialog-close" asChild>
|
|
64
|
-
<Button variant="ghost" className="absolute top-2 right-2" size="icon-sm">
|
|
65
|
-
<XIcon />
|
|
66
|
-
<span className="sr-only">Close</span>
|
|
67
|
-
</Button>
|
|
68
|
-
</DialogPrimitive.Close>
|
|
69
|
-
)}
|
|
70
|
-
</DialogPrimitive.Content>
|
|
71
|
-
</DialogPortal>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
76
|
-
return (
|
|
77
|
-
<div
|
|
78
|
-
data-slot="dialog-header"
|
|
79
|
-
className={cn('flex flex-col gap-1 text-left', className)}
|
|
80
|
-
{...props}
|
|
81
|
-
/>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function DialogFooter({
|
|
86
|
-
className,
|
|
87
|
-
showCloseButton = false,
|
|
88
|
-
children,
|
|
89
|
-
...props
|
|
90
|
-
}: React.ComponentProps<'div'> & {
|
|
91
|
-
showCloseButton?: boolean;
|
|
92
|
-
}) {
|
|
93
|
-
return (
|
|
94
|
-
<div
|
|
95
|
-
data-slot="dialog-footer"
|
|
96
|
-
className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}
|
|
97
|
-
{...props}
|
|
98
|
-
>
|
|
99
|
-
{children}
|
|
100
|
-
{showCloseButton && (
|
|
101
|
-
<DialogPrimitive.Close asChild>
|
|
102
|
-
<Button variant="outline">Close</Button>
|
|
103
|
-
</DialogPrimitive.Close>
|
|
104
|
-
)}
|
|
105
|
-
</div>
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {
|
|
110
|
-
return (
|
|
111
|
-
<DialogPrimitive.Title
|
|
112
|
-
data-slot="dialog-title"
|
|
113
|
-
className={cn('font-heading text-sm font-medium', className)}
|
|
114
|
-
{...props}
|
|
115
|
-
/>
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function DialogDescription({
|
|
120
|
-
className,
|
|
121
|
-
...props
|
|
122
|
-
}: React.ComponentProps<typeof DialogPrimitive.Description>) {
|
|
123
|
-
return (
|
|
124
|
-
<DialogPrimitive.Description
|
|
125
|
-
data-slot="dialog-description"
|
|
126
|
-
className={cn(
|
|
127
|
-
'text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',
|
|
128
|
-
className,
|
|
129
|
-
)}
|
|
130
|
-
{...props}
|
|
131
|
-
/>
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export {
|
|
136
|
-
Dialog,
|
|
137
|
-
DialogClose,
|
|
138
|
-
DialogContent,
|
|
139
|
-
DialogDescription,
|
|
140
|
-
DialogFooter,
|
|
141
|
-
DialogHeader,
|
|
142
|
-
DialogOverlay,
|
|
143
|
-
DialogPortal,
|
|
144
|
-
DialogTitle,
|
|
145
|
-
DialogTrigger,
|
|
146
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Direction } from 'radix-ui';
|
|
5
|
-
|
|
6
|
-
function DirectionProvider({
|
|
7
|
-
dir,
|
|
8
|
-
direction,
|
|
9
|
-
children,
|
|
10
|
-
}: React.ComponentProps<typeof Direction.DirectionProvider> & {
|
|
11
|
-
direction?: React.ComponentProps<typeof Direction.DirectionProvider>['dir'];
|
|
12
|
-
}) {
|
|
13
|
-
return (
|
|
14
|
-
<Direction.DirectionProvider dir={direction ?? dir}>{children}</Direction.DirectionProvider>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const useDirection = Direction.useDirection;
|
|
19
|
-
|
|
20
|
-
export { DirectionProvider, useDirection };
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
3
|
-
|
|
4
|
-
import { cn } from '@/lib/utils';
|
|
5
|
-
|
|
6
|
-
function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
7
|
-
return <DrawerPrimitive.Root data-slot="drawer" {...props} />;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {
|
|
11
|
-
return <DrawerPrimitive.Trigger data-slot="drawer-trigger" {...props} />;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {
|
|
15
|
-
return <DrawerPrimitive.Portal data-slot="drawer-portal" {...props} />;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {
|
|
19
|
-
return <DrawerPrimitive.Close data-slot="drawer-close" {...props} />;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function DrawerOverlay({
|
|
23
|
-
className,
|
|
24
|
-
...props
|
|
25
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {
|
|
26
|
-
return (
|
|
27
|
-
<DrawerPrimitive.Overlay
|
|
28
|
-
data-slot="drawer-overlay"
|
|
29
|
-
className={cn(
|
|
30
|
-
'fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',
|
|
31
|
-
className,
|
|
32
|
-
)}
|
|
33
|
-
{...props}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function DrawerContent({
|
|
39
|
-
className,
|
|
40
|
-
children,
|
|
41
|
-
...props
|
|
42
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Content>) {
|
|
43
|
-
return (
|
|
44
|
-
<DrawerPortal data-slot="drawer-portal">
|
|
45
|
-
<DrawerOverlay />
|
|
46
|
-
<DrawerPrimitive.Content
|
|
47
|
-
data-slot="drawer-content"
|
|
48
|
-
className={cn(
|
|
49
|
-
'group/drawer-content fixed z-50 flex h-auto flex-col bg-popover text-xs/relaxed text-popover-foreground data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-none data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-none data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-none data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-none data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm',
|
|
50
|
-
className,
|
|
51
|
-
)}
|
|
52
|
-
{...props}
|
|
53
|
-
>
|
|
54
|
-
<div className="mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-none bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" />
|
|
55
|
-
{children}
|
|
56
|
-
</DrawerPrimitive.Content>
|
|
57
|
-
</DrawerPortal>
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
62
|
-
return (
|
|
63
|
-
<div
|
|
64
|
-
data-slot="drawer-header"
|
|
65
|
-
className={cn(
|
|
66
|
-
'flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-left',
|
|
67
|
-
className,
|
|
68
|
-
)}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
75
|
-
return (
|
|
76
|
-
<div
|
|
77
|
-
data-slot="drawer-footer"
|
|
78
|
-
className={cn('mt-auto flex flex-col gap-2 p-4', className)}
|
|
79
|
-
{...props}
|
|
80
|
-
/>
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {
|
|
85
|
-
return (
|
|
86
|
-
<DrawerPrimitive.Title
|
|
87
|
-
data-slot="drawer-title"
|
|
88
|
-
className={cn('font-heading text-sm font-medium text-foreground', className)}
|
|
89
|
-
{...props}
|
|
90
|
-
/>
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function DrawerDescription({
|
|
95
|
-
className,
|
|
96
|
-
...props
|
|
97
|
-
}: React.ComponentProps<typeof DrawerPrimitive.Description>) {
|
|
98
|
-
return (
|
|
99
|
-
<DrawerPrimitive.Description
|
|
100
|
-
data-slot="drawer-description"
|
|
101
|
-
className={cn('text-xs/relaxed text-muted-foreground', className)}
|
|
102
|
-
{...props}
|
|
103
|
-
/>
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export {
|
|
108
|
-
Drawer,
|
|
109
|
-
DrawerPortal,
|
|
110
|
-
DrawerOverlay,
|
|
111
|
-
DrawerTrigger,
|
|
112
|
-
DrawerClose,
|
|
113
|
-
DrawerContent,
|
|
114
|
-
DrawerHeader,
|
|
115
|
-
DrawerFooter,
|
|
116
|
-
DrawerTitle,
|
|
117
|
-
DrawerDescription,
|
|
118
|
-
};
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';
|
|
5
|
-
|
|
6
|
-
import { cn } from '@/lib/utils';
|
|
7
|
-
import { CheckIcon, ChevronRightIcon } from 'lucide-react';
|
|
8
|
-
|
|
9
|
-
function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
10
|
-
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function DropdownMenuPortal({
|
|
14
|
-
...props
|
|
15
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
16
|
-
return <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function DropdownMenuTrigger({
|
|
20
|
-
...props
|
|
21
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
22
|
-
return <DropdownMenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function DropdownMenuContent({
|
|
26
|
-
className,
|
|
27
|
-
align = 'start',
|
|
28
|
-
sideOffset = 4,
|
|
29
|
-
...props
|
|
30
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
|
31
|
-
return (
|
|
32
|
-
<DropdownMenuPrimitive.Portal>
|
|
33
|
-
<DropdownMenuPrimitive.Content
|
|
34
|
-
data-slot="dropdown-menu-content"
|
|
35
|
-
sideOffset={sideOffset}
|
|
36
|
-
align={align}
|
|
37
|
-
className={cn(
|
|
38
|
-
'z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-none bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-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-[state=closed]:overflow-hidden 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
|
-
</DropdownMenuPrimitive.Portal>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
48
|
-
return <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function DropdownMenuItem({
|
|
52
|
-
className,
|
|
53
|
-
inset,
|
|
54
|
-
variant = 'default',
|
|
55
|
-
...props
|
|
56
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
57
|
-
inset?: boolean;
|
|
58
|
-
variant?: 'default' | 'destructive';
|
|
59
|
-
}) {
|
|
60
|
-
return (
|
|
61
|
-
<DropdownMenuPrimitive.Item
|
|
62
|
-
data-slot="dropdown-menu-item"
|
|
63
|
-
data-inset={inset}
|
|
64
|
-
data-variant={variant}
|
|
65
|
-
className={cn(
|
|
66
|
-
"group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
67
|
-
className,
|
|
68
|
-
)}
|
|
69
|
-
{...props}
|
|
70
|
-
/>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function DropdownMenuCheckboxItem({
|
|
75
|
-
className,
|
|
76
|
-
children,
|
|
77
|
-
checked,
|
|
78
|
-
inset,
|
|
79
|
-
...props
|
|
80
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {
|
|
81
|
-
inset?: boolean;
|
|
82
|
-
}) {
|
|
83
|
-
return (
|
|
84
|
-
<DropdownMenuPrimitive.CheckboxItem
|
|
85
|
-
data-slot="dropdown-menu-checkbox-item"
|
|
86
|
-
data-inset={inset}
|
|
87
|
-
className={cn(
|
|
88
|
-
"relative flex cursor-default items-center gap-2 rounded-none py-2 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
89
|
-
className,
|
|
90
|
-
)}
|
|
91
|
-
checked={checked}
|
|
92
|
-
{...props}
|
|
93
|
-
>
|
|
94
|
-
<span
|
|
95
|
-
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
96
|
-
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
97
|
-
>
|
|
98
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
99
|
-
<CheckIcon />
|
|
100
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
101
|
-
</span>
|
|
102
|
-
{children}
|
|
103
|
-
</DropdownMenuPrimitive.CheckboxItem>
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function DropdownMenuRadioGroup({
|
|
108
|
-
...props
|
|
109
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
110
|
-
return <DropdownMenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function DropdownMenuRadioItem({
|
|
114
|
-
className,
|
|
115
|
-
children,
|
|
116
|
-
inset,
|
|
117
|
-
...props
|
|
118
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
|
|
119
|
-
inset?: boolean;
|
|
120
|
-
}) {
|
|
121
|
-
return (
|
|
122
|
-
<DropdownMenuPrimitive.RadioItem
|
|
123
|
-
data-slot="dropdown-menu-radio-item"
|
|
124
|
-
data-inset={inset}
|
|
125
|
-
className={cn(
|
|
126
|
-
"relative flex cursor-default items-center gap-2 rounded-none py-2 pr-8 pl-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
127
|
-
className,
|
|
128
|
-
)}
|
|
129
|
-
{...props}
|
|
130
|
-
>
|
|
131
|
-
<span
|
|
132
|
-
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
133
|
-
data-slot="dropdown-menu-radio-item-indicator"
|
|
134
|
-
>
|
|
135
|
-
<DropdownMenuPrimitive.ItemIndicator>
|
|
136
|
-
<CheckIcon />
|
|
137
|
-
</DropdownMenuPrimitive.ItemIndicator>
|
|
138
|
-
</span>
|
|
139
|
-
{children}
|
|
140
|
-
</DropdownMenuPrimitive.RadioItem>
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function DropdownMenuLabel({
|
|
145
|
-
className,
|
|
146
|
-
inset,
|
|
147
|
-
...props
|
|
148
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
149
|
-
inset?: boolean;
|
|
150
|
-
}) {
|
|
151
|
-
return (
|
|
152
|
-
<DropdownMenuPrimitive.Label
|
|
153
|
-
data-slot="dropdown-menu-label"
|
|
154
|
-
data-inset={inset}
|
|
155
|
-
className={cn('px-2 py-2 text-xs text-muted-foreground data-inset:pl-7', className)}
|
|
156
|
-
{...props}
|
|
157
|
-
/>
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function DropdownMenuSeparator({
|
|
162
|
-
className,
|
|
163
|
-
...props
|
|
164
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
165
|
-
return (
|
|
166
|
-
<DropdownMenuPrimitive.Separator
|
|
167
|
-
data-slot="dropdown-menu-separator"
|
|
168
|
-
className={cn('-mx-1 h-px bg-border', className)}
|
|
169
|
-
{...props}
|
|
170
|
-
/>
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {
|
|
175
|
-
return (
|
|
176
|
-
<span
|
|
177
|
-
data-slot="dropdown-menu-shortcut"
|
|
178
|
-
className={cn(
|
|
179
|
-
'ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground',
|
|
180
|
-
className,
|
|
181
|
-
)}
|
|
182
|
-
{...props}
|
|
183
|
-
/>
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
188
|
-
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function DropdownMenuSubTrigger({
|
|
192
|
-
className,
|
|
193
|
-
inset,
|
|
194
|
-
children,
|
|
195
|
-
...props
|
|
196
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
197
|
-
inset?: boolean;
|
|
198
|
-
}) {
|
|
199
|
-
return (
|
|
200
|
-
<DropdownMenuPrimitive.SubTrigger
|
|
201
|
-
data-slot="dropdown-menu-sub-trigger"
|
|
202
|
-
data-inset={inset}
|
|
203
|
-
className={cn(
|
|
204
|
-
"flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
205
|
-
className,
|
|
206
|
-
)}
|
|
207
|
-
{...props}
|
|
208
|
-
>
|
|
209
|
-
{children}
|
|
210
|
-
<ChevronRightIcon className="ml-auto" />
|
|
211
|
-
</DropdownMenuPrimitive.SubTrigger>
|
|
212
|
-
);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function DropdownMenuSubContent({
|
|
216
|
-
className,
|
|
217
|
-
...props
|
|
218
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
|
219
|
-
return (
|
|
220
|
-
<DropdownMenuPrimitive.SubContent
|
|
221
|
-
data-slot="dropdown-menu-sub-content"
|
|
222
|
-
className={cn(
|
|
223
|
-
'z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-none bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-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',
|
|
224
|
-
className,
|
|
225
|
-
)}
|
|
226
|
-
{...props}
|
|
227
|
-
/>
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export {
|
|
232
|
-
DropdownMenu,
|
|
233
|
-
DropdownMenuPortal,
|
|
234
|
-
DropdownMenuTrigger,
|
|
235
|
-
DropdownMenuContent,
|
|
236
|
-
DropdownMenuGroup,
|
|
237
|
-
DropdownMenuLabel,
|
|
238
|
-
DropdownMenuItem,
|
|
239
|
-
DropdownMenuCheckboxItem,
|
|
240
|
-
DropdownMenuRadioGroup,
|
|
241
|
-
DropdownMenuRadioItem,
|
|
242
|
-
DropdownMenuSeparator,
|
|
243
|
-
DropdownMenuShortcut,
|
|
244
|
-
DropdownMenuSub,
|
|
245
|
-
DropdownMenuSubTrigger,
|
|
246
|
-
DropdownMenuSubContent,
|
|
247
|
-
};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
-
|
|
3
|
-
import { cn } from '@/lib/utils';
|
|
4
|
-
|
|
5
|
-
function Empty({ className, ...props }: React.ComponentProps<'div'>) {
|
|
6
|
-
return (
|
|
7
|
-
<div
|
|
8
|
-
data-slot="empty"
|
|
9
|
-
className={cn(
|
|
10
|
-
'flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-none border-dashed p-6 text-center text-balance',
|
|
11
|
-
className,
|
|
12
|
-
)}
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function EmptyHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
19
|
-
return (
|
|
20
|
-
<div
|
|
21
|
-
data-slot="empty-header"
|
|
22
|
-
className={cn('flex max-w-sm flex-col items-center gap-2', className)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const emptyMediaVariants = cva(
|
|
29
|
-
'mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0',
|
|
30
|
-
{
|
|
31
|
-
variants: {
|
|
32
|
-
variant: {
|
|
33
|
-
default: 'bg-transparent',
|
|
34
|
-
icon: "flex size-8 shrink-0 items-center justify-center rounded-none bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
defaultVariants: {
|
|
38
|
-
variant: 'default',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
function EmptyMedia({
|
|
44
|
-
className,
|
|
45
|
-
variant = 'default',
|
|
46
|
-
...props
|
|
47
|
-
}: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>) {
|
|
48
|
-
return (
|
|
49
|
-
<div
|
|
50
|
-
data-slot="empty-icon"
|
|
51
|
-
data-variant={variant}
|
|
52
|
-
className={cn(emptyMediaVariants({ variant, className }))}
|
|
53
|
-
{...props}
|
|
54
|
-
/>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function EmptyTitle({ className, ...props }: React.ComponentProps<'div'>) {
|
|
59
|
-
return (
|
|
60
|
-
<div
|
|
61
|
-
data-slot="empty-title"
|
|
62
|
-
className={cn('font-heading text-sm font-medium', className)}
|
|
63
|
-
{...props}
|
|
64
|
-
/>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function EmptyDescription({ className, ...props }: React.ComponentProps<'p'>) {
|
|
69
|
-
return (
|
|
70
|
-
<div
|
|
71
|
-
data-slot="empty-description"
|
|
72
|
-
className={cn(
|
|
73
|
-
'text-xs/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',
|
|
74
|
-
className,
|
|
75
|
-
)}
|
|
76
|
-
{...props}
|
|
77
|
-
/>
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function EmptyContent({ className, ...props }: React.ComponentProps<'div'>) {
|
|
82
|
-
return (
|
|
83
|
-
<div
|
|
84
|
-
data-slot="empty-content"
|
|
85
|
-
className={cn(
|
|
86
|
-
'flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-xs text-balance',
|
|
87
|
-
className,
|
|
88
|
-
)}
|
|
89
|
-
{...props}
|
|
90
|
-
/>
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia };
|