@prototyperco/ui 0.5.0-alpha.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.cjs +154 -0
- package/dist/components/accordion.cjs.map +1 -0
- package/dist/components/accordion.d.cts +14 -0
- package/dist/components/accordion.d.ts +14 -0
- package/dist/components/accordion.js +127 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.cjs +324 -0
- package/dist/components/alert-dialog.cjs.map +1 -0
- package/dist/components/alert-dialog.d.cts +30 -0
- package/dist/components/alert-dialog.d.ts +30 -0
- package/dist/components/alert-dialog.js +289 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.cjs +105 -0
- package/dist/components/alert.cjs.map +1 -0
- package/dist/components/alert.d.cts +17 -0
- package/dist/components/alert.d.ts +17 -0
- package/dist/components/alert.js +78 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/autocomplete.cjs +512 -0
- package/dist/components/autocomplete.cjs.map +1 -0
- package/dist/components/autocomplete.d.cts +31 -0
- package/dist/components/autocomplete.d.ts +31 -0
- package/dist/components/autocomplete.js +472 -0
- package/dist/components/autocomplete.js.map +1 -0
- package/dist/components/avatar.cjs +144 -0
- package/dist/components/avatar.cjs.map +1 -0
- package/dist/components/avatar.d.cts +18 -0
- package/dist/components/avatar.d.ts +18 -0
- package/dist/components/avatar.js +115 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.cjs +81 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.d.cts +13 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/badge.js +56 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumb.cjs +142 -0
- package/dist/components/breadcrumb.cjs.map +1 -0
- package/dist/components/breadcrumb.d.cts +20 -0
- package/dist/components/breadcrumb.d.ts +20 -0
- package/dist/components/breadcrumb.js +112 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/button.cjs +145 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.d.cts +16 -0
- package/dist/components/button.d.ts +16 -0
- package/dist/components/button.js +120 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.cjs +141 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.d.cts +23 -0
- package/dist/components/card.d.ts +23 -0
- package/dist/components/card.js +111 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/checkbox-group.cjs +56 -0
- package/dist/components/checkbox-group.cjs.map +1 -0
- package/dist/components/checkbox-group.d.cts +8 -0
- package/dist/components/checkbox-group.d.ts +8 -0
- package/dist/components/checkbox-group.js +32 -0
- package/dist/components/checkbox-group.js.map +1 -0
- package/dist/components/checkbox.cjs +152 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.d.cts +12 -0
- package/dist/components/checkbox.d.ts +12 -0
- package/dist/components/checkbox.js +126 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.cjs +89 -0
- package/dist/components/collapsible.cjs.map +1 -0
- package/dist/components/collapsible.d.cts +12 -0
- package/dist/components/collapsible.d.ts +12 -0
- package/dist/components/collapsible.js +63 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/color-picker.cjs +983 -0
- package/dist/components/color-picker.cjs.map +1 -0
- package/dist/components/color-picker.d.cts +41 -0
- package/dist/components/color-picker.d.ts +41 -0
- package/dist/components/color-picker.js +939 -0
- package/dist/components/color-picker.js.map +1 -0
- package/dist/components/columns.cjs +163 -0
- package/dist/components/columns.cjs.map +1 -0
- package/dist/components/columns.d.cts +16 -0
- package/dist/components/columns.d.ts +16 -0
- package/dist/components/columns.js +136 -0
- package/dist/components/columns.js.map +1 -0
- package/dist/components/combobox.cjs +633 -0
- package/dist/components/combobox.cjs.map +1 -0
- package/dist/components/combobox.d.cts +40 -0
- package/dist/components/combobox.d.ts +40 -0
- package/dist/components/combobox.js +576 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/command-palette.cjs +370 -0
- package/dist/components/command-palette.cjs.map +1 -0
- package/dist/components/command-palette.d.cts +42 -0
- package/dist/components/command-palette.d.ts +42 -0
- package/dist/components/command-palette.js +329 -0
- package/dist/components/command-palette.js.map +1 -0
- package/dist/components/container.cjs +80 -0
- package/dist/components/container.cjs.map +1 -0
- package/dist/components/container.d.cts +27 -0
- package/dist/components/container.d.ts +27 -0
- package/dist/components/container.js +54 -0
- package/dist/components/container.js.map +1 -0
- package/dist/components/context-menu.cjs +309 -0
- package/dist/components/context-menu.cjs.map +1 -0
- package/dist/components/context-menu.d.cts +37 -0
- package/dist/components/context-menu.d.ts +37 -0
- package/dist/components/context-menu.js +271 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/dialog.cjs +319 -0
- package/dist/components/dialog.cjs.map +1 -0
- package/dist/components/dialog.d.cts +32 -0
- package/dist/components/dialog.d.ts +32 -0
- package/dist/components/dialog.js +285 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/drawer.cjs +185 -0
- package/dist/components/drawer.cjs.map +1 -0
- package/dist/components/drawer.d.cts +32 -0
- package/dist/components/drawer.d.ts +32 -0
- package/dist/components/drawer.js +151 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/field.cjs +334 -0
- package/dist/components/field.cjs.map +1 -0
- package/dist/components/field.d.cts +39 -0
- package/dist/components/field.d.ts +39 -0
- package/dist/components/field.js +299 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/fieldset.cjs +75 -0
- package/dist/components/fieldset.cjs.map +1 -0
- package/dist/components/fieldset.d.cts +12 -0
- package/dist/components/fieldset.d.ts +12 -0
- package/dist/components/fieldset.js +50 -0
- package/dist/components/fieldset.js.map +1 -0
- package/dist/components/form.cjs +52 -0
- package/dist/components/form.cjs.map +1 -0
- package/dist/components/form.d.cts +8 -0
- package/dist/components/form.d.ts +8 -0
- package/dist/components/form.js +28 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/input-group.cjs +338 -0
- package/dist/components/input-group.cjs.map +1 -0
- package/dist/components/input-group.d.cts +27 -0
- package/dist/components/input-group.d.ts +27 -0
- package/dist/components/input-group.js +307 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input.cjs +63 -0
- package/dist/components/input.cjs.map +1 -0
- package/dist/components/input.d.cts +8 -0
- package/dist/components/input.d.ts +8 -0
- package/dist/components/input.js +39 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.cjs +54 -0
- package/dist/components/label.cjs.map +1 -0
- package/dist/components/label.d.cts +8 -0
- package/dist/components/label.d.ts +8 -0
- package/dist/components/label.js +28 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/menu.cjs +305 -0
- package/dist/components/menu.cjs.map +1 -0
- package/dist/components/menu.d.cts +37 -0
- package/dist/components/menu.d.ts +37 -0
- package/dist/components/menu.js +267 -0
- package/dist/components/menu.js.map +1 -0
- package/dist/components/menubar.cjs +503 -0
- package/dist/components/menubar.cjs.map +1 -0
- package/dist/components/menubar.d.cts +37 -0
- package/dist/components/menubar.d.ts +37 -0
- package/dist/components/menubar.js +464 -0
- package/dist/components/menubar.js.map +1 -0
- package/dist/components/meter.cjs +152 -0
- package/dist/components/meter.cjs.map +1 -0
- package/dist/components/meter.d.cts +23 -0
- package/dist/components/meter.d.ts +23 -0
- package/dist/components/meter.js +122 -0
- package/dist/components/meter.js.map +1 -0
- package/dist/components/navigation-menu.cjs +315 -0
- package/dist/components/navigation-menu.cjs.map +1 -0
- package/dist/components/navigation-menu.d.cts +22 -0
- package/dist/components/navigation-menu.d.ts +22 -0
- package/dist/components/navigation-menu.js +283 -0
- package/dist/components/navigation-menu.js.map +1 -0
- package/dist/components/number-field.cjs +217 -0
- package/dist/components/number-field.cjs.map +1 -0
- package/dist/components/number-field.d.cts +23 -0
- package/dist/components/number-field.d.ts +23 -0
- package/dist/components/number-field.js +185 -0
- package/dist/components/number-field.js.map +1 -0
- package/dist/components/popover.cjs +125 -0
- package/dist/components/popover.cjs.map +1 -0
- package/dist/components/popover.d.cts +16 -0
- package/dist/components/popover.d.ts +16 -0
- package/dist/components/popover.js +96 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/preview-card.cjs +86 -0
- package/dist/components/preview-card.cjs.map +1 -0
- package/dist/components/preview-card.d.cts +12 -0
- package/dist/components/preview-card.d.ts +12 -0
- package/dist/components/preview-card.js +60 -0
- package/dist/components/preview-card.js.map +1 -0
- package/dist/components/progress.cjs +167 -0
- package/dist/components/progress.cjs.map +1 -0
- package/dist/components/progress.d.cts +23 -0
- package/dist/components/progress.d.ts +23 -0
- package/dist/components/progress.js +137 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.cjs +98 -0
- package/dist/components/radio-group.cjs.map +1 -0
- package/dist/components/radio-group.d.cts +11 -0
- package/dist/components/radio-group.d.ts +11 -0
- package/dist/components/radio-group.js +73 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/resizable-panel.cjs +91 -0
- package/dist/components/resizable-panel.cjs.map +1 -0
- package/dist/components/resizable-panel.d.cts +14 -0
- package/dist/components/resizable-panel.d.ts +14 -0
- package/dist/components/resizable-panel.js +69 -0
- package/dist/components/resizable-panel.js.map +1 -0
- package/dist/components/row.cjs +94 -0
- package/dist/components/row.cjs.map +1 -0
- package/dist/components/row.d.cts +27 -0
- package/dist/components/row.d.ts +27 -0
- package/dist/components/row.js +68 -0
- package/dist/components/row.js.map +1 -0
- package/dist/components/scroll-area.cjs +96 -0
- package/dist/components/scroll-area.cjs.map +1 -0
- package/dist/components/scroll-area.d.cts +10 -0
- package/dist/components/scroll-area.d.ts +10 -0
- package/dist/components/scroll-area.js +71 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/section.cjs +104 -0
- package/dist/components/section.cjs.map +1 -0
- package/dist/components/section.d.cts +26 -0
- package/dist/components/section.d.ts +26 -0
- package/dist/components/section.js +79 -0
- package/dist/components/section.js.map +1 -0
- package/dist/components/segmented-control.cjs +117 -0
- package/dist/components/segmented-control.cjs.map +1 -0
- package/dist/components/segmented-control.d.cts +16 -0
- package/dist/components/segmented-control.d.ts +16 -0
- package/dist/components/segmented-control.js +91 -0
- package/dist/components/segmented-control.js.map +1 -0
- package/dist/components/select.cjs +273 -0
- package/dist/components/select.cjs.map +1 -0
- package/dist/components/select.d.cts +26 -0
- package/dist/components/select.d.ts +26 -0
- package/dist/components/select.js +239 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.cjs +60 -0
- package/dist/components/separator.cjs.map +1 -0
- package/dist/components/separator.d.cts +8 -0
- package/dist/components/separator.d.ts +8 -0
- package/dist/components/separator.js +36 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/skeleton.cjs +54 -0
- package/dist/components/skeleton.cjs.map +1 -0
- package/dist/components/skeleton.d.cts +8 -0
- package/dist/components/skeleton.d.ts +8 -0
- package/dist/components/skeleton.js +28 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.cjs +221 -0
- package/dist/components/slider.cjs.map +1 -0
- package/dist/components/slider.d.cts +16 -0
- package/dist/components/slider.d.ts +16 -0
- package/dist/components/slider.js +182 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/spinner.cjs +97 -0
- package/dist/components/spinner.cjs.map +1 -0
- package/dist/components/spinner.d.cts +13 -0
- package/dist/components/spinner.d.ts +13 -0
- package/dist/components/spinner.js +72 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/switch.cjs +177 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.d.cts +22 -0
- package/dist/components/switch.d.ts +22 -0
- package/dist/components/switch.js +139 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/tabs.cjs +123 -0
- package/dist/components/tabs.cjs.map +1 -0
- package/dist/components/tabs.d.cts +19 -0
- package/dist/components/tabs.d.ts +19 -0
- package/dist/components/tabs.js +95 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/text-field.cjs +290 -0
- package/dist/components/text-field.cjs.map +1 -0
- package/dist/components/text-field.d.cts +27 -0
- package/dist/components/text-field.d.ts +27 -0
- package/dist/components/text-field.js +262 -0
- package/dist/components/text-field.js.map +1 -0
- package/dist/components/textarea.cjs +60 -0
- package/dist/components/textarea.cjs.map +1 -0
- package/dist/components/textarea.d.cts +8 -0
- package/dist/components/textarea.d.ts +8 -0
- package/dist/components/textarea.js +34 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/toast.cjs +167 -0
- package/dist/components/toast.cjs.map +1 -0
- package/dist/components/toast.d.cts +28 -0
- package/dist/components/toast.d.ts +28 -0
- package/dist/components/toast.js +147 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/toggle-group.cjs +171 -0
- package/dist/components/toggle-group.cjs.map +1 -0
- package/dist/components/toggle-group.d.cts +18 -0
- package/dist/components/toggle-group.d.ts +18 -0
- package/dist/components/toggle-group.js +136 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.cjs +92 -0
- package/dist/components/toggle.cjs.map +1 -0
- package/dist/components/toggle.d.cts +14 -0
- package/dist/components/toggle.d.ts +14 -0
- package/dist/components/toggle.js +67 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/toolbar.cjs +160 -0
- package/dist/components/toolbar.cjs.map +1 -0
- package/dist/components/toolbar.d.cts +14 -0
- package/dist/components/toolbar.d.ts +14 -0
- package/dist/components/toolbar.js +131 -0
- package/dist/components/toolbar.js.map +1 -0
- package/dist/components/tooltip.cjs +116 -0
- package/dist/components/tooltip.cjs.map +1 -0
- package/dist/components/tooltip.d.cts +13 -0
- package/dist/components/tooltip.d.ts +13 -0
- package/dist/components/tooltip.js +89 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/tree-view.cjs +472 -0
- package/dist/components/tree-view.cjs.map +1 -0
- package/dist/components/tree-view.d.cts +33 -0
- package/dist/components/tree-view.d.ts +33 -0
- package/dist/components/tree-view.js +435 -0
- package/dist/components/tree-view.js.map +1 -0
- package/dist/index.cjs +11 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +101 -903
- package/dist/index.d.ts +101 -903
- package/dist/index.js +4 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/color-utils.cjs +315 -0
- package/dist/lib/color-utils.cjs.map +1 -0
- package/dist/lib/color-utils.d.cts +24 -0
- package/dist/lib/color-utils.d.ts +24 -0
- package/dist/lib/color-utils.js +280 -0
- package/dist/lib/color-utils.js.map +1 -0
- package/dist/lib/utils.cjs +35 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.d.cts +5 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +10 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +24 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/radio-group.tsx","../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { Radio as RadioPrimitive } from \"@base-ui/react/radio\";\nimport { RadioGroup as RadioGroupPrimitive } from \"@base-ui/react/radio-group\";\nimport { cn } from \"../lib/utils\";\n\nfunction RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {\n return (\n <RadioGroupPrimitive\n data-slot=\"radio-group\"\n className={cn(\n \"flex flex-col gap-2\",\n \"data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:gap-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {\n return (\n <RadioPrimitive.Root\n data-slot=\"radio-group-item\"\n className={cn(\n \"group relative flex aspect-square size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border border-field-border bg-field-background text-primary shadow-field select-none no-highlight\",\n \"data-checked:bg-primary data-checked:text-primary-foreground data-checked:border-transparent\",\n /* Hover */\n \"hover-only:hover:border-field-border-hover\",\n /* Focus Visible */\n \"focus-visible:focus-ring\",\n /* Disabled */\n \"data-disabled:status-disabled\",\n /* Invalid */\n \"data-[invalid]:border-field-border-invalid\",\n \"data-[invalid]:data-checked:bg-destructive data-[invalid]:data-checked:border-transparent\",\n /* Press */\n \"motion-safe:active:scale-[0.95]\",\n /* Transition */\n \"transition-[color,background-color,border-color,box-shadow,opacity,transform] duration-150 ease-smooth\",\n /* Motion Reduce */\n \"motion-reduce:transition-none\",\n className,\n )}\n {...props}\n >\n <RadioPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n aria-hidden=\"true\"\n className=\"absolute inset-0 flex items-center justify-center\"\n keepMounted\n >\n <span className=\"size-2 scale-0 rounded-full bg-primary-foreground transition-transform duration-150 ease-out-fluid group-data-checked:scale-100 motion-reduce:transition-none\" />\n </RadioPrimitive.Indicator>\n </RadioPrimitive.Root>\n );\n}\n\nexport { RadioGroup, RadioGroupItem };\n\nexport type RadioGroupProps = React.ComponentProps<typeof RadioGroup>;\nexport type RadioGroupItemProps = React.ComponentProps<typeof RadioGroupItem>;\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAEA,SAAS,SAAS,sBAAsB;AACxC,SAAS,cAAc,2BAA2B;;;ACHlD,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADGI;AAFJ,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAA8B;AACtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,MAAM,GAA8B;AAC1E,SACE;AAAA,IAAC,eAAe;AAAA,IAAf;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA,QACA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,QAAC,eAAe;AAAA,QAAf;AAAA,UACC,aAAU;AAAA,UACV,eAAY;AAAA,UACZ,WAAU;AAAA,UACV,aAAW;AAAA,UAEX,8BAAC,UAAK,WAAU,iKAAgK;AAAA;AAAA,MAClL;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/components/resizable-panel.tsx
|
|
22
|
+
var resizable_panel_exports = {};
|
|
23
|
+
__export(resizable_panel_exports, {
|
|
24
|
+
ResizableHandle: () => ResizableHandle,
|
|
25
|
+
ResizablePanel: () => ResizablePanel,
|
|
26
|
+
ResizablePanelGroup: () => ResizablePanelGroup
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(resizable_panel_exports);
|
|
29
|
+
var import_lucide_react = require("lucide-react");
|
|
30
|
+
var import_react_resizable_panels = require("react-resizable-panels");
|
|
31
|
+
|
|
32
|
+
// src/lib/utils.ts
|
|
33
|
+
var import_clsx = require("clsx");
|
|
34
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
35
|
+
function cn(...inputs) {
|
|
36
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// src/components/resizable-panel.tsx
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
+
function ResizablePanelGroup({
|
|
42
|
+
className,
|
|
43
|
+
orientation = "horizontal",
|
|
44
|
+
...props
|
|
45
|
+
}) {
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
+
import_react_resizable_panels.Group,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "resizable-panel-group",
|
|
50
|
+
className: cn(
|
|
51
|
+
"flex size-full",
|
|
52
|
+
orientation === "vertical" && "flex-col",
|
|
53
|
+
className
|
|
54
|
+
),
|
|
55
|
+
orientation,
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function ResizablePanel({ className, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_resizable_panels.Panel, { "data-slot": "resizable-panel", className: cn(className), ...props });
|
|
62
|
+
}
|
|
63
|
+
function ResizableHandle({
|
|
64
|
+
withHandle,
|
|
65
|
+
className,
|
|
66
|
+
...props
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
+
import_react_resizable_panels.Separator,
|
|
70
|
+
{
|
|
71
|
+
"data-slot": "resizable-handle",
|
|
72
|
+
className: cn(
|
|
73
|
+
"bg-border relative flex w-px items-center justify-center",
|
|
74
|
+
"after:absolute after:inset-y-0 after:-left-1 after:-right-1",
|
|
75
|
+
"hover-only:hover:bg-primary/20",
|
|
76
|
+
"focus-visible:focus-ring focus-visible:outline-1",
|
|
77
|
+
"transition-colors duration-150 ease-smooth motion-reduce:transition-none",
|
|
78
|
+
className
|
|
79
|
+
),
|
|
80
|
+
...props,
|
|
81
|
+
children: withHandle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-border bg-surface-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GripVertical, { className: "size-2.5 text-muted-foreground" }) })
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
86
|
+
0 && (module.exports = {
|
|
87
|
+
ResizableHandle,
|
|
88
|
+
ResizablePanel,
|
|
89
|
+
ResizablePanelGroup
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=resizable-panel.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/resizable-panel.tsx","../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { GripVertical } from \"lucide-react\";\nimport {\n Group,\n Panel,\n Separator,\n type GroupProps,\n type PanelProps,\n type SeparatorProps,\n} from \"react-resizable-panels\";\n\nimport { cn } from \"../lib/utils\";\n\nfunction ResizablePanelGroup({\n className,\n orientation = \"horizontal\",\n ...props\n}: GroupProps) {\n return (\n <Group\n data-slot=\"resizable-panel-group\"\n className={cn(\n \"flex size-full\",\n orientation === \"vertical\" && \"flex-col\",\n className,\n )}\n orientation={orientation}\n {...props}\n />\n );\n}\n\nfunction ResizablePanel({ className, ...props }: PanelProps) {\n return (\n <Panel data-slot=\"resizable-panel\" className={cn(className)} {...props} />\n );\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: SeparatorProps & {\n withHandle?: boolean;\n}) {\n return (\n <Separator\n data-slot=\"resizable-handle\"\n className={cn(\n \"bg-border relative flex w-px items-center justify-center\",\n \"after:absolute after:inset-y-0 after:-left-1 after:-right-1\",\n \"hover-only:hover:bg-primary/20\",\n \"focus-visible:focus-ring focus-visible:outline-1\",\n \"transition-colors duration-150 ease-smooth motion-reduce:transition-none\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-border bg-surface-secondary\">\n <GripVertical className=\"size-2.5 text-muted-foreground\" />\n </div>\n )}\n </Separator>\n );\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n\nexport type ResizablePanelGroupProps = React.ComponentProps<\n typeof ResizablePanelGroup\n>;\nexport type ResizablePanelProps = React.ComponentProps<typeof ResizablePanel>;\nexport type ResizableHandleProps = React.ComponentProps<typeof ResizableHandle>;\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0BAA6B;AAC7B,oCAOO;;;ACVP,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADeI;AANJ,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA,cAAc;AAAA,EACd,GAAG;AACL,GAAe;AACb,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA,gBAAgB,cAAc;AAAA,QAC9B;AAAA,MACF;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,MAAM,GAAe;AAC3D,SACE,4CAAC,uCAAM,aAAU,mBAAkB,WAAW,GAAG,SAAS,GAAI,GAAG,OAAO;AAE5E;AAEA,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAEG;AACD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH,wBACC,4CAAC,SAAI,WAAU,sGACb,sDAAC,oCAAa,WAAU,kCAAiC,GAC3D;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { SeparatorProps, PanelProps, GroupProps } from 'react-resizable-panels';
|
|
3
|
+
|
|
4
|
+
declare function ResizablePanelGroup({ className, orientation, ...props }: GroupProps): react_jsx_runtime.JSX.Element;
|
|
5
|
+
declare function ResizablePanel({ className, ...props }: PanelProps): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function ResizableHandle({ withHandle, className, ...props }: SeparatorProps & {
|
|
7
|
+
withHandle?: boolean;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePanelGroup>;
|
|
11
|
+
type ResizablePanelProps = React.ComponentProps<typeof ResizablePanel>;
|
|
12
|
+
type ResizableHandleProps = React.ComponentProps<typeof ResizableHandle>;
|
|
13
|
+
|
|
14
|
+
export { ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, type ResizablePanelGroupProps, type ResizablePanelProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { SeparatorProps, PanelProps, GroupProps } from 'react-resizable-panels';
|
|
3
|
+
|
|
4
|
+
declare function ResizablePanelGroup({ className, orientation, ...props }: GroupProps): react_jsx_runtime.JSX.Element;
|
|
5
|
+
declare function ResizablePanel({ className, ...props }: PanelProps): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function ResizableHandle({ withHandle, className, ...props }: SeparatorProps & {
|
|
7
|
+
withHandle?: boolean;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePanelGroup>;
|
|
11
|
+
type ResizablePanelProps = React.ComponentProps<typeof ResizablePanel>;
|
|
12
|
+
type ResizableHandleProps = React.ComponentProps<typeof ResizableHandle>;
|
|
13
|
+
|
|
14
|
+
export { ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, type ResizablePanelGroupProps, type ResizablePanelProps };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/resizable-panel.tsx
|
|
4
|
+
import { GripVertical } from "lucide-react";
|
|
5
|
+
import {
|
|
6
|
+
Group,
|
|
7
|
+
Panel,
|
|
8
|
+
Separator
|
|
9
|
+
} from "react-resizable-panels";
|
|
10
|
+
|
|
11
|
+
// src/lib/utils.ts
|
|
12
|
+
import { clsx } from "clsx";
|
|
13
|
+
import { twMerge } from "tailwind-merge";
|
|
14
|
+
function cn(...inputs) {
|
|
15
|
+
return twMerge(clsx(inputs));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// src/components/resizable-panel.tsx
|
|
19
|
+
import { jsx } from "react/jsx-runtime";
|
|
20
|
+
function ResizablePanelGroup({
|
|
21
|
+
className,
|
|
22
|
+
orientation = "horizontal",
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
Group,
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "resizable-panel-group",
|
|
29
|
+
className: cn(
|
|
30
|
+
"flex size-full",
|
|
31
|
+
orientation === "vertical" && "flex-col",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
orientation,
|
|
35
|
+
...props
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
function ResizablePanel({ className, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx(Panel, { "data-slot": "resizable-panel", className: cn(className), ...props });
|
|
41
|
+
}
|
|
42
|
+
function ResizableHandle({
|
|
43
|
+
withHandle,
|
|
44
|
+
className,
|
|
45
|
+
...props
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
|
+
Separator,
|
|
49
|
+
{
|
|
50
|
+
"data-slot": "resizable-handle",
|
|
51
|
+
className: cn(
|
|
52
|
+
"bg-border relative flex w-px items-center justify-center",
|
|
53
|
+
"after:absolute after:inset-y-0 after:-left-1 after:-right-1",
|
|
54
|
+
"hover-only:hover:bg-primary/20",
|
|
55
|
+
"focus-visible:focus-ring focus-visible:outline-1",
|
|
56
|
+
"transition-colors duration-150 ease-smooth motion-reduce:transition-none",
|
|
57
|
+
className
|
|
58
|
+
),
|
|
59
|
+
...props,
|
|
60
|
+
children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-border bg-surface-secondary", children: /* @__PURE__ */ jsx(GripVertical, { className: "size-2.5 text-muted-foreground" }) })
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
ResizableHandle,
|
|
66
|
+
ResizablePanel,
|
|
67
|
+
ResizablePanelGroup
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=resizable-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/resizable-panel.tsx","../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { GripVertical } from \"lucide-react\";\nimport {\n Group,\n Panel,\n Separator,\n type GroupProps,\n type PanelProps,\n type SeparatorProps,\n} from \"react-resizable-panels\";\n\nimport { cn } from \"../lib/utils\";\n\nfunction ResizablePanelGroup({\n className,\n orientation = \"horizontal\",\n ...props\n}: GroupProps) {\n return (\n <Group\n data-slot=\"resizable-panel-group\"\n className={cn(\n \"flex size-full\",\n orientation === \"vertical\" && \"flex-col\",\n className,\n )}\n orientation={orientation}\n {...props}\n />\n );\n}\n\nfunction ResizablePanel({ className, ...props }: PanelProps) {\n return (\n <Panel data-slot=\"resizable-panel\" className={cn(className)} {...props} />\n );\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: SeparatorProps & {\n withHandle?: boolean;\n}) {\n return (\n <Separator\n data-slot=\"resizable-handle\"\n className={cn(\n \"bg-border relative flex w-px items-center justify-center\",\n \"after:absolute after:inset-y-0 after:-left-1 after:-right-1\",\n \"hover-only:hover:bg-primary/20\",\n \"focus-visible:focus-ring focus-visible:outline-1\",\n \"transition-colors duration-150 ease-smooth motion-reduce:transition-none\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-border bg-surface-secondary\">\n <GripVertical className=\"size-2.5 text-muted-foreground\" />\n </div>\n )}\n </Separator>\n );\n}\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n\nexport type ResizablePanelGroupProps = React.ComponentProps<\n typeof ResizablePanelGroup\n>;\nexport type ResizablePanelProps = React.ComponentProps<typeof ResizablePanel>;\nexport type ResizableHandleProps = React.ComponentProps<typeof ResizableHandle>;\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAEA,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;;;ACVP,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADeI;AANJ,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA,cAAc;AAAA,EACd,GAAG;AACL,GAAe;AACb,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA,gBAAgB,cAAc;AAAA,QAC9B;AAAA,MACF;AAAA,MACA;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,eAAe,EAAE,WAAW,GAAG,MAAM,GAAe;AAC3D,SACE,oBAAC,SAAM,aAAU,mBAAkB,WAAW,GAAG,SAAS,GAAI,GAAG,OAAO;AAE5E;AAEA,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAEG;AACD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH,wBACC,oBAAC,SAAI,WAAU,sGACb,8BAAC,gBAAa,WAAU,kCAAiC,GAC3D;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/components/row.tsx
|
|
22
|
+
var row_exports = {};
|
|
23
|
+
__export(row_exports, {
|
|
24
|
+
Row: () => Row
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(row_exports);
|
|
27
|
+
|
|
28
|
+
// src/lib/utils.ts
|
|
29
|
+
var import_clsx = require("clsx");
|
|
30
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
31
|
+
function cn(...inputs) {
|
|
32
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// src/components/row.tsx
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var gapMap = {
|
|
38
|
+
0: "gap-0",
|
|
39
|
+
1: "gap-1",
|
|
40
|
+
2: "gap-2",
|
|
41
|
+
3: "gap-3",
|
|
42
|
+
4: "gap-4",
|
|
43
|
+
5: "gap-5",
|
|
44
|
+
6: "gap-6",
|
|
45
|
+
8: "gap-8",
|
|
46
|
+
10: "gap-10",
|
|
47
|
+
12: "gap-12"
|
|
48
|
+
};
|
|
49
|
+
var alignMap = {
|
|
50
|
+
start: "items-start",
|
|
51
|
+
center: "items-center",
|
|
52
|
+
end: "items-end",
|
|
53
|
+
stretch: "items-stretch",
|
|
54
|
+
baseline: "items-baseline"
|
|
55
|
+
};
|
|
56
|
+
var justifyMap = {
|
|
57
|
+
start: "justify-start",
|
|
58
|
+
center: "justify-center",
|
|
59
|
+
end: "justify-end",
|
|
60
|
+
between: "justify-between",
|
|
61
|
+
around: "justify-around",
|
|
62
|
+
evenly: "justify-evenly"
|
|
63
|
+
};
|
|
64
|
+
function Row({
|
|
65
|
+
className,
|
|
66
|
+
gap = 3,
|
|
67
|
+
align = "center",
|
|
68
|
+
justify = "start",
|
|
69
|
+
wrap = false,
|
|
70
|
+
children,
|
|
71
|
+
...props
|
|
72
|
+
}) {
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
"data-slot": "row",
|
|
77
|
+
className: cn(
|
|
78
|
+
"flex flex-row",
|
|
79
|
+
gapMap[gap] ?? `gap-${gap}`,
|
|
80
|
+
alignMap[align],
|
|
81
|
+
justifyMap[justify],
|
|
82
|
+
wrap && "flex-wrap",
|
|
83
|
+
className
|
|
84
|
+
),
|
|
85
|
+
...props,
|
|
86
|
+
children
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
+
0 && (module.exports = {
|
|
92
|
+
Row
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=row.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/row.tsx","../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../lib/utils\";\n\nconst gapMap: Record<number, string> = {\n 0: \"gap-0\",\n 1: \"gap-1\",\n 2: \"gap-2\",\n 3: \"gap-3\",\n 4: \"gap-4\",\n 5: \"gap-5\",\n 6: \"gap-6\",\n 8: \"gap-8\",\n 10: \"gap-10\",\n 12: \"gap-12\",\n};\n\nconst alignMap = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n baseline: \"items-baseline\",\n} as const;\n\nconst justifyMap = {\n start: \"justify-start\",\n center: \"justify-center\",\n end: \"justify-end\",\n between: \"justify-between\",\n around: \"justify-around\",\n evenly: \"justify-evenly\",\n} as const;\n\nfunction Row({\n className,\n gap = 3,\n align = \"center\",\n justify = \"start\",\n wrap = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n gap?: number;\n align?: keyof typeof alignMap;\n justify?: keyof typeof justifyMap;\n wrap?: boolean;\n}) {\n return (\n <div\n data-slot=\"row\"\n className={cn(\n \"flex flex-row\",\n gapMap[gap] ?? `gap-${gap}`,\n alignMap[align],\n justifyMap[justify],\n wrap && \"flex-wrap\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nexport { Row };\n\nexport type RowProps = React.ComponentProps<typeof Row>;\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD4CI;AA7CJ,IAAM,SAAiC;AAAA,EACrC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,IAAM,WAAW;AAAA,EACf,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AAAA,EACT,UAAU;AACZ;AAEA,IAAM,aAAa;AAAA,EACjB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AACV;AAEA,SAAS,IAAI;AAAA,EACX;AAAA,EACA,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAKG;AACD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA,OAAO,GAAG,KAAK,OAAO,GAAG;AAAA,QACzB,SAAS,KAAK;AAAA,QACd,WAAW,OAAO;AAAA,QAClB,QAAQ;AAAA,QACR;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare const alignMap: {
|
|
4
|
+
readonly start: "items-start";
|
|
5
|
+
readonly center: "items-center";
|
|
6
|
+
readonly end: "items-end";
|
|
7
|
+
readonly stretch: "items-stretch";
|
|
8
|
+
readonly baseline: "items-baseline";
|
|
9
|
+
};
|
|
10
|
+
declare const justifyMap: {
|
|
11
|
+
readonly start: "justify-start";
|
|
12
|
+
readonly center: "justify-center";
|
|
13
|
+
readonly end: "justify-end";
|
|
14
|
+
readonly between: "justify-between";
|
|
15
|
+
readonly around: "justify-around";
|
|
16
|
+
readonly evenly: "justify-evenly";
|
|
17
|
+
};
|
|
18
|
+
declare function Row({ className, gap, align, justify, wrap, children, ...props }: React.ComponentProps<"div"> & {
|
|
19
|
+
gap?: number;
|
|
20
|
+
align?: keyof typeof alignMap;
|
|
21
|
+
justify?: keyof typeof justifyMap;
|
|
22
|
+
wrap?: boolean;
|
|
23
|
+
}): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
type RowProps = React.ComponentProps<typeof Row>;
|
|
26
|
+
|
|
27
|
+
export { Row, type RowProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare const alignMap: {
|
|
4
|
+
readonly start: "items-start";
|
|
5
|
+
readonly center: "items-center";
|
|
6
|
+
readonly end: "items-end";
|
|
7
|
+
readonly stretch: "items-stretch";
|
|
8
|
+
readonly baseline: "items-baseline";
|
|
9
|
+
};
|
|
10
|
+
declare const justifyMap: {
|
|
11
|
+
readonly start: "justify-start";
|
|
12
|
+
readonly center: "justify-center";
|
|
13
|
+
readonly end: "justify-end";
|
|
14
|
+
readonly between: "justify-between";
|
|
15
|
+
readonly around: "justify-around";
|
|
16
|
+
readonly evenly: "justify-evenly";
|
|
17
|
+
};
|
|
18
|
+
declare function Row({ className, gap, align, justify, wrap, children, ...props }: React.ComponentProps<"div"> & {
|
|
19
|
+
gap?: number;
|
|
20
|
+
align?: keyof typeof alignMap;
|
|
21
|
+
justify?: keyof typeof justifyMap;
|
|
22
|
+
wrap?: boolean;
|
|
23
|
+
}): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
type RowProps = React.ComponentProps<typeof Row>;
|
|
26
|
+
|
|
27
|
+
export { Row, type RowProps };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/lib/utils.ts
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
import { twMerge } from "tailwind-merge";
|
|
6
|
+
function cn(...inputs) {
|
|
7
|
+
return twMerge(clsx(inputs));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// src/components/row.tsx
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var gapMap = {
|
|
13
|
+
0: "gap-0",
|
|
14
|
+
1: "gap-1",
|
|
15
|
+
2: "gap-2",
|
|
16
|
+
3: "gap-3",
|
|
17
|
+
4: "gap-4",
|
|
18
|
+
5: "gap-5",
|
|
19
|
+
6: "gap-6",
|
|
20
|
+
8: "gap-8",
|
|
21
|
+
10: "gap-10",
|
|
22
|
+
12: "gap-12"
|
|
23
|
+
};
|
|
24
|
+
var alignMap = {
|
|
25
|
+
start: "items-start",
|
|
26
|
+
center: "items-center",
|
|
27
|
+
end: "items-end",
|
|
28
|
+
stretch: "items-stretch",
|
|
29
|
+
baseline: "items-baseline"
|
|
30
|
+
};
|
|
31
|
+
var justifyMap = {
|
|
32
|
+
start: "justify-start",
|
|
33
|
+
center: "justify-center",
|
|
34
|
+
end: "justify-end",
|
|
35
|
+
between: "justify-between",
|
|
36
|
+
around: "justify-around",
|
|
37
|
+
evenly: "justify-evenly"
|
|
38
|
+
};
|
|
39
|
+
function Row({
|
|
40
|
+
className,
|
|
41
|
+
gap = 3,
|
|
42
|
+
align = "center",
|
|
43
|
+
justify = "start",
|
|
44
|
+
wrap = false,
|
|
45
|
+
children,
|
|
46
|
+
...props
|
|
47
|
+
}) {
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "row",
|
|
52
|
+
className: cn(
|
|
53
|
+
"flex flex-row",
|
|
54
|
+
gapMap[gap] ?? `gap-${gap}`,
|
|
55
|
+
alignMap[align],
|
|
56
|
+
justifyMap[justify],
|
|
57
|
+
wrap && "flex-wrap",
|
|
58
|
+
className
|
|
59
|
+
),
|
|
60
|
+
...props,
|
|
61
|
+
children
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
Row
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/components/row.tsx"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","\"use client\";\n\nimport { cn } from \"../lib/utils\";\n\nconst gapMap: Record<number, string> = {\n 0: \"gap-0\",\n 1: \"gap-1\",\n 2: \"gap-2\",\n 3: \"gap-3\",\n 4: \"gap-4\",\n 5: \"gap-5\",\n 6: \"gap-6\",\n 8: \"gap-8\",\n 10: \"gap-10\",\n 12: \"gap-12\",\n};\n\nconst alignMap = {\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n baseline: \"items-baseline\",\n} as const;\n\nconst justifyMap = {\n start: \"justify-start\",\n center: \"justify-center\",\n end: \"justify-end\",\n between: \"justify-between\",\n around: \"justify-around\",\n evenly: \"justify-evenly\",\n} as const;\n\nfunction Row({\n className,\n gap = 3,\n align = \"center\",\n justify = \"start\",\n wrap = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n gap?: number;\n align?: keyof typeof alignMap;\n justify?: keyof typeof justifyMap;\n wrap?: boolean;\n}) {\n return (\n <div\n data-slot=\"row\"\n className={cn(\n \"flex flex-row\",\n gapMap[gap] ?? `gap-${gap}`,\n alignMap[align],\n justifyMap[justify],\n wrap && \"flex-wrap\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n}\n\nexport { Row };\n\nexport type RowProps = React.ComponentProps<typeof Row>;\n"],"mappings":";;;AAAA,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;AC4CI;AA7CJ,IAAM,SAAiC;AAAA,EACrC,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,IAAM,WAAW;AAAA,EACf,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AAAA,EACT,UAAU;AACZ;AAEA,IAAM,aAAa;AAAA,EACjB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AACV;AAEA,SAAS,IAAI;AAAA,EACX;AAAA,EACA,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAKG;AACD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA,OAAO,GAAG,KAAK,OAAO,GAAG;AAAA,QACzB,SAAS,KAAK;AAAA,QACd,WAAW,OAAO;AAAA,QAClB,QAAQ;AAAA,QACR;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/components/scroll-area.tsx
|
|
22
|
+
var scroll_area_exports = {};
|
|
23
|
+
__export(scroll_area_exports, {
|
|
24
|
+
ScrollArea: () => ScrollArea,
|
|
25
|
+
ScrollBar: () => ScrollBar
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(scroll_area_exports);
|
|
28
|
+
var import_scroll_area = require("@base-ui/react/scroll-area");
|
|
29
|
+
|
|
30
|
+
// src/lib/utils.ts
|
|
31
|
+
var import_clsx = require("clsx");
|
|
32
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
33
|
+
function cn(...inputs) {
|
|
34
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// src/components/scroll-area.tsx
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
+
function ScrollArea({
|
|
40
|
+
className,
|
|
41
|
+
children,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
44
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
45
|
+
import_scroll_area.ScrollArea.Root,
|
|
46
|
+
{
|
|
47
|
+
"data-slot": "scroll-area",
|
|
48
|
+
className: cn("relative", className),
|
|
49
|
+
...props,
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
|
+
import_scroll_area.ScrollArea.Viewport,
|
|
53
|
+
{
|
|
54
|
+
"data-slot": "scroll-area-viewport",
|
|
55
|
+
className: "size-full rounded-[inherit] outline-none focus-visible:focus-ring",
|
|
56
|
+
children
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollBar, {}),
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_scroll_area.ScrollArea.Corner, {})
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
function ScrollBar({
|
|
66
|
+
className,
|
|
67
|
+
orientation = "vertical",
|
|
68
|
+
...props
|
|
69
|
+
}) {
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
import_scroll_area.ScrollArea.Scrollbar,
|
|
72
|
+
{
|
|
73
|
+
"data-slot": "scroll-area-scrollbar",
|
|
74
|
+
"data-orientation": orientation,
|
|
75
|
+
orientation,
|
|
76
|
+
className: cn(
|
|
77
|
+
"data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors motion-reduce:transition-none select-none",
|
|
78
|
+
className
|
|
79
|
+
),
|
|
80
|
+
...props,
|
|
81
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
|
+
import_scroll_area.ScrollArea.Thumb,
|
|
83
|
+
{
|
|
84
|
+
"data-slot": "scroll-area-thumb",
|
|
85
|
+
className: "rounded-full bg-border-dark relative flex-1"
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
92
|
+
0 && (module.exports = {
|
|
93
|
+
ScrollArea,
|
|
94
|
+
ScrollBar
|
|
95
|
+
});
|
|
96
|
+
//# sourceMappingURL=scroll-area.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/scroll-area.tsx","../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { ScrollArea as ScrollAreaPrimitive } from \"@base-ui/react/scroll-area\";\n\nimport { cn } from \"../lib/utils\";\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: ScrollAreaPrimitive.Root.Props) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] outline-none focus-visible:focus-ring\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: ScrollAreaPrimitive.Scrollbar.Props) {\n return (\n <ScrollAreaPrimitive.Scrollbar\n data-slot=\"scroll-area-scrollbar\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n \"data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors motion-reduce:transition-none select-none\",\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.Thumb\n data-slot=\"scroll-area-thumb\"\n className=\"rounded-full bg-border-dark relative flex-1\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n\nexport type ScrollAreaProps = React.ComponentProps<typeof ScrollArea>;\nexport type ScrollBarProps = React.ComponentProps<typeof ScrollBar>;\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,yBAAkD;;;ACFlD,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADOI;AANJ,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAmC;AACjC,SACE;AAAA,IAAC,mBAAAA,WAAoB;AAAA,IAApB;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,YAAY,SAAS;AAAA,MAClC,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC,mBAAAA,WAAoB;AAAA,UAApB;AAAA,YACC,aAAU;AAAA,YACV,WAAU;AAAA,YAET;AAAA;AAAA,QACH;AAAA,QACA,4CAAC,aAAU;AAAA,QACX,4CAAC,mBAAAA,WAAoB,QAApB,EAA2B;AAAA;AAAA;AAAA,EAC9B;AAEJ;AAEA,SAAS,UAAU;AAAA,EACjB;AAAA,EACA,cAAc;AAAA,EACd,GAAG;AACL,GAAwC;AACtC,SACE;AAAA,IAAC,mBAAAA,WAAoB;AAAA,IAApB;AAAA,MACC,aAAU;AAAA,MACV,oBAAkB;AAAA,MAClB;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,QAAC,mBAAAA,WAAoB;AAAA,QAApB;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA;AAAA,MACZ;AAAA;AAAA,EACF;AAEJ;","names":["ScrollAreaPrimitive"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
|
|
3
|
+
|
|
4
|
+
declare function ScrollArea({ className, children, ...props }: ScrollArea$1.Root.Props): react_jsx_runtime.JSX.Element;
|
|
5
|
+
declare function ScrollBar({ className, orientation, ...props }: ScrollArea$1.Scrollbar.Props): react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
type ScrollAreaProps = React.ComponentProps<typeof ScrollArea>;
|
|
8
|
+
type ScrollBarProps = React.ComponentProps<typeof ScrollBar>;
|
|
9
|
+
|
|
10
|
+
export { ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
|
|
3
|
+
|
|
4
|
+
declare function ScrollArea({ className, children, ...props }: ScrollArea$1.Root.Props): react_jsx_runtime.JSX.Element;
|
|
5
|
+
declare function ScrollBar({ className, orientation, ...props }: ScrollArea$1.Scrollbar.Props): react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
type ScrollAreaProps = React.ComponentProps<typeof ScrollArea>;
|
|
8
|
+
type ScrollBarProps = React.ComponentProps<typeof ScrollBar>;
|
|
9
|
+
|
|
10
|
+
export { ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollBarProps };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/scroll-area.tsx
|
|
4
|
+
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
5
|
+
|
|
6
|
+
// src/lib/utils.ts
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { twMerge } from "tailwind-merge";
|
|
9
|
+
function cn(...inputs) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// src/components/scroll-area.tsx
|
|
14
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
function ScrollArea({
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(
|
|
21
|
+
ScrollAreaPrimitive.Root,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "scroll-area",
|
|
24
|
+
className: cn("relative", className),
|
|
25
|
+
...props,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
ScrollAreaPrimitive.Viewport,
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "scroll-area-viewport",
|
|
31
|
+
className: "size-full rounded-[inherit] outline-none focus-visible:focus-ring",
|
|
32
|
+
children
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
36
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function ScrollBar({
|
|
42
|
+
className,
|
|
43
|
+
orientation = "vertical",
|
|
44
|
+
...props
|
|
45
|
+
}) {
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
ScrollAreaPrimitive.Scrollbar,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "scroll-area-scrollbar",
|
|
50
|
+
"data-orientation": orientation,
|
|
51
|
+
orientation,
|
|
52
|
+
className: cn(
|
|
53
|
+
"data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors motion-reduce:transition-none select-none",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...props,
|
|
57
|
+
children: /* @__PURE__ */ jsx(
|
|
58
|
+
ScrollAreaPrimitive.Thumb,
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "scroll-area-thumb",
|
|
61
|
+
className: "rounded-full bg-border-dark relative flex-1"
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
ScrollArea,
|
|
69
|
+
ScrollBar
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=scroll-area.js.map
|