@stoa-dev/kit 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +80 -2
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useOnlineStatus/index.js +14 -0
- package/dist/hooks/useOnlineStatus/index.js.map +1 -0
- package/dist/hooks/useRouting/index.js +17 -0
- package/dist/hooks/useRouting/index.js.map +1 -0
- package/dist/i18n/index.js +30 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/locales/at.json.js +16 -0
- package/dist/i18n/locales/at.json.js.map +1 -0
- package/dist/i18n/locales/de.json.js +16 -0
- package/dist/i18n/locales/de.json.js.map +1 -0
- package/dist/i18n/locales/en.json.js +16 -0
- package/dist/i18n/locales/en.json.js.map +1 -0
- package/dist/i18n/locales/it.json.js +16 -0
- package/dist/i18n/locales/it.json.js.map +1 -0
- package/dist/i18n/namespace.js +5 -0
- package/dist/i18n/namespace.js.map +1 -0
- package/dist/kit.css +1 -0
- package/dist/licensing/LicenseActivation/index.js +101 -0
- package/dist/licensing/LicenseActivation/index.js.map +1 -0
- package/dist/licensing/LicenseCard/index.js +149 -0
- package/dist/licensing/LicenseCard/index.js.map +1 -0
- package/dist/licensing/LicenseGate/index.js +72 -0
- package/dist/licensing/LicenseGate/index.js.map +1 -0
- package/dist/licensing/LicenseProvider/index.js +137 -0
- package/dist/licensing/LicenseProvider/index.js.map +1 -0
- package/dist/licensing/LicenseStatusBanner/index.js +135 -0
- package/dist/licensing/LicenseStatusBanner/index.js.map +1 -0
- package/dist/licensing/api.js +57 -0
- package/dist/licensing/api.js.map +1 -0
- package/dist/licensing/index.js +23 -0
- package/dist/licensing/index.js.map +1 -0
- package/dist/shell/AppNavigation/AppNavigation.module.scss.js +16 -0
- package/dist/shell/AppNavigation/AppNavigation.module.scss.js.map +1 -0
- package/dist/shell/AppNavigation/index.js +136 -0
- package/dist/shell/AppNavigation/index.js.map +1 -0
- package/dist/shell/BackHomeButton/index.js +23 -0
- package/dist/shell/BackHomeButton/index.js.map +1 -0
- package/dist/shell/BrandLines/BrandLines.module.scss.js +10 -0
- package/dist/shell/BrandLines/BrandLines.module.scss.js.map +1 -0
- package/dist/shell/BrandLines/index.js +25 -0
- package/dist/shell/BrandLines/index.js.map +1 -0
- package/dist/shell/ConfirmDialog/index.js +53 -0
- package/dist/shell/ConfirmDialog/index.js.map +1 -0
- package/dist/shell/DatePicker/index.js +219 -0
- package/dist/shell/DatePicker/index.js.map +1 -0
- package/dist/shell/ErrorBoundary/index.js +29 -0
- package/dist/shell/ErrorBoundary/index.js.map +1 -0
- package/dist/shell/NativeSelect/index.js +24 -0
- package/dist/shell/NativeSelect/index.js.map +1 -0
- package/dist/shell/PageHeading/PageHeading.module.scss.js +8 -0
- package/dist/shell/PageHeading/PageHeading.module.scss.js.map +1 -0
- package/dist/shell/PageHeading/index.js +14 -0
- package/dist/shell/PageHeading/index.js.map +1 -0
- package/dist/shell/SectionNavigation/index.js +116 -0
- package/dist/shell/SectionNavigation/index.js.map +1 -0
- package/dist/shell/Spinner/index.js +16 -0
- package/dist/shell/Spinner/index.js.map +1 -0
- package/dist/shell/UploadButton/index.js +44 -0
- package/dist/shell/UploadButton/index.js.map +1 -0
- package/dist/shell/index.js +29 -0
- package/dist/shell/index.js.map +1 -0
- package/dist/types/hooks/index.d.ts +3 -0
- package/dist/types/hooks/index.d.ts.map +1 -0
- package/dist/types/hooks/useOnlineStatus/index.d.ts +2 -0
- package/dist/types/hooks/useOnlineStatus/index.d.ts.map +1 -0
- package/dist/types/hooks/useRouting/index.d.ts +14 -0
- package/dist/types/hooks/useRouting/index.d.ts.map +1 -0
- package/dist/types/i18n/index.d.ts +582 -0
- package/dist/types/i18n/index.d.ts.map +1 -0
- package/dist/types/i18n/namespace.d.ts +3 -0
- package/dist/types/i18n/namespace.d.ts.map +1 -0
- package/dist/types/licensing/LicenseActivation/index.d.ts +8 -0
- package/dist/types/licensing/LicenseActivation/index.d.ts.map +1 -0
- package/dist/types/licensing/LicenseCard/index.d.ts +2 -0
- package/dist/types/licensing/LicenseCard/index.d.ts.map +1 -0
- package/dist/types/licensing/LicenseGate/index.d.ts +11 -0
- package/dist/types/licensing/LicenseGate/index.d.ts.map +1 -0
- package/dist/types/licensing/LicenseProvider/index.d.ts +20 -0
- package/dist/types/licensing/LicenseProvider/index.d.ts.map +1 -0
- package/dist/types/licensing/LicenseStatusBanner/index.d.ts +4 -0
- package/dist/types/licensing/LicenseStatusBanner/index.d.ts.map +1 -0
- package/dist/types/licensing/api.d.ts +28 -0
- package/dist/types/licensing/api.d.ts.map +1 -0
- package/dist/types/licensing/index.d.ts +7 -0
- package/dist/types/licensing/index.d.ts.map +1 -0
- package/dist/types/shell/AppNavigation/index.d.ts +45 -0
- package/dist/types/shell/AppNavigation/index.d.ts.map +1 -0
- package/dist/types/shell/BackHomeButton/index.d.ts +7 -0
- package/dist/types/shell/BackHomeButton/index.d.ts.map +1 -0
- package/dist/types/shell/BrandLines/index.d.ts +6 -0
- package/dist/types/shell/BrandLines/index.d.ts.map +1 -0
- package/dist/types/shell/ConfirmDialog/index.d.ts +21 -0
- package/dist/types/shell/ConfirmDialog/index.d.ts.map +1 -0
- package/dist/types/shell/DatePicker/index.d.ts +14 -0
- package/dist/types/shell/DatePicker/index.d.ts.map +1 -0
- package/dist/types/shell/ErrorBoundary/index.d.ts +20 -0
- package/dist/types/shell/ErrorBoundary/index.d.ts.map +1 -0
- package/dist/types/shell/NativeSelect/index.d.ts +3 -0
- package/dist/types/shell/NativeSelect/index.d.ts.map +1 -0
- package/dist/types/shell/PageHeading/index.d.ts +9 -0
- package/dist/types/shell/PageHeading/index.d.ts.map +1 -0
- package/dist/types/shell/SectionNavigation/index.d.ts +12 -0
- package/dist/types/shell/SectionNavigation/index.d.ts.map +1 -0
- package/dist/types/shell/Spinner/index.d.ts +6 -0
- package/dist/types/shell/Spinner/index.d.ts.map +1 -0
- package/dist/types/shell/UploadButton/index.d.ts +6 -0
- package/dist/types/shell/UploadButton/index.d.ts.map +1 -0
- package/dist/types/shell/index.d.ts +12 -0
- package/dist/types/shell/index.d.ts.map +1 -0
- package/dist/types/ui/accordion/index.d.ts +8 -0
- package/dist/types/ui/accordion/index.d.ts.map +1 -0
- package/dist/types/ui/button/index.d.ts +11 -0
- package/dist/types/ui/button/index.d.ts.map +1 -0
- package/dist/types/ui/calendar/index.d.ts +11 -0
- package/dist/types/ui/calendar/index.d.ts.map +1 -0
- package/dist/types/ui/card/index.d.ts +12 -0
- package/dist/types/ui/card/index.d.ts.map +1 -0
- package/dist/types/ui/dialog/index.d.ts +18 -0
- package/dist/types/ui/dialog/index.d.ts.map +1 -0
- package/dist/types/ui/dropdown-menu/index.d.ts +30 -0
- package/dist/types/ui/dropdown-menu/index.d.ts.map +1 -0
- package/dist/types/ui/field/index.d.ts +25 -0
- package/dist/types/ui/field/index.d.ts.map +1 -0
- package/dist/types/ui/index.d.ts +21 -0
- package/dist/types/ui/index.d.ts.map +1 -0
- package/dist/types/ui/input/index.d.ts +4 -0
- package/dist/types/ui/input/index.d.ts.map +1 -0
- package/dist/types/ui/input-group/index.d.ts +17 -0
- package/dist/types/ui/input-group/index.d.ts.map +1 -0
- package/dist/types/ui/label/index.d.ts +5 -0
- package/dist/types/ui/label/index.d.ts.map +1 -0
- package/dist/types/ui/popover/index.d.ts +11 -0
- package/dist/types/ui/popover/index.d.ts.map +1 -0
- package/dist/types/ui/radio-group/index.d.ts +6 -0
- package/dist/types/ui/radio-group/index.d.ts.map +1 -0
- package/dist/types/ui/scroll-area/index.d.ts +6 -0
- package/dist/types/ui/scroll-area/index.d.ts.map +1 -0
- package/dist/types/ui/select/index.d.ts +16 -0
- package/dist/types/ui/select/index.d.ts.map +1 -0
- package/dist/types/ui/separator/index.d.ts +5 -0
- package/dist/types/ui/separator/index.d.ts.map +1 -0
- package/dist/types/ui/sonner/index.d.ts +4 -0
- package/dist/types/ui/sonner/index.d.ts.map +1 -0
- package/dist/types/ui/switch/index.d.ts +7 -0
- package/dist/types/ui/switch/index.d.ts.map +1 -0
- package/dist/types/ui/textarea/index.d.ts +4 -0
- package/dist/types/ui/textarea/index.d.ts.map +1 -0
- package/dist/types/ui/toggle/index.d.ts +10 -0
- package/dist/types/ui/toggle/index.d.ts.map +1 -0
- package/dist/types/ui/tooltip/index.d.ts +8 -0
- package/dist/types/ui/tooltip/index.d.ts.map +1 -0
- package/dist/types/utils/cn.d.ts +3 -0
- package/dist/types/utils/cn.d.ts.map +1 -0
- package/dist/types/utils/colors.d.ts +3 -0
- package/dist/types/utils/colors.d.ts.map +1 -0
- package/dist/types/utils/dates.d.ts +9 -0
- package/dist/types/utils/dates.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +4 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/ui/accordion/index.js +65 -0
- package/dist/ui/accordion/index.js.map +1 -0
- package/dist/ui/button/index.js +57 -0
- package/dist/ui/button/index.js.map +1 -0
- package/dist/ui/calendar/index.js +179 -0
- package/dist/ui/calendar/index.js.map +1 -0
- package/dist/ui/card/index.js +102 -0
- package/dist/ui/card/index.js.map +1 -0
- package/dist/ui/dialog/index.js +158 -0
- package/dist/ui/dialog/index.js.map +1 -0
- package/dist/ui/dropdown-menu/index.js +252 -0
- package/dist/ui/dropdown-menu/index.js.map +1 -0
- package/dist/ui/field/index.js +209 -0
- package/dist/ui/field/index.js.map +1 -0
- package/dist/ui/index.js +112 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input/index.js +20 -0
- package/dist/ui/input/index.js.map +1 -0
- package/dist/ui/input-group/index.js +143 -0
- package/dist/ui/input-group/index.js.map +1 -0
- package/dist/ui/label/index.js +23 -0
- package/dist/ui/label/index.js.map +1 -0
- package/dist/ui/popover/index.js +81 -0
- package/dist/ui/popover/index.js.map +1 -0
- package/dist/ui/radio-group/index.js +45 -0
- package/dist/ui/radio-group/index.js.map +1 -0
- package/dist/ui/scroll-area/index.js +60 -0
- package/dist/ui/scroll-area/index.js.map +1 -0
- package/dist/ui/select/index.js +182 -0
- package/dist/ui/select/index.js.map +1 -0
- package/dist/ui/separator/index.js +27 -0
- package/dist/ui/separator/index.js.map +1 -0
- package/dist/ui/sonner/index.js +37 -0
- package/dist/ui/sonner/index.js.map +1 -0
- package/dist/ui/switch/index.js +32 -0
- package/dist/ui/switch/index.js.map +1 -0
- package/dist/ui/textarea/index.js +19 -0
- package/dist/ui/textarea/index.js.map +1 -0
- package/dist/ui/toggle/index.js +44 -0
- package/dist/ui/toggle/index.js.map +1 -0
- package/dist/ui/tooltip/index.js +56 -0
- package/dist/ui/tooltip/index.js.map +1 -0
- package/dist/utils/cn.js +9 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/colors.js +8 -0
- package/dist/utils/colors.js.map +1 -0
- package/dist/utils/dates.js +28 -0
- package/dist/utils/dates.js.map +1 -0
- package/dist/utils/index.js +12 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +112 -4
- package/scss/_index.scss +4 -0
- package/scss/_tools.scss +21 -0
- package/styles/theme.css +192 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/field/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport { useMemo } from 'react'\nimport { cn } from '../../utils/cn'\nimport { Label } from '../label'\nimport { Separator } from '../separator'\n\nfunction FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {\n\treturn (\n\t\t<fieldset\n\t\t\tdata-slot='field-set'\n\t\t\tclassName={cn(\n\t\t\t\t'flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction FieldLegend({\n\tclassName,\n\tvariant = 'legend',\n\t...props\n}: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {\n\treturn (\n\t\t<legend\n\t\t\tdata-slot='field-legend'\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(\n\t\t\t\t'mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction FieldGroup({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='field-group'\n\t\t\tclassName={cn(\n\t\t\t\t'group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nconst fieldVariants = cva(\n\t'group/field flex w-full gap-2 data-[invalid=true]:text-destructive',\n\t{\n\t\tvariants: {\n\t\t\torientation: {\n\t\t\t\tvertical: 'flex-col *:w-full [&>.sr-only]:w-auto',\n\t\t\t\thorizontal:\n\t\t\t\t\t'flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n\t\t\t\tresponsive:\n\t\t\t\t\t'flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\torientation: 'vertical',\n\t\t},\n\t},\n)\n\nfunction Field({\n\tclassName,\n\torientation = 'vertical',\n\t...props\n}: React.ComponentProps<'fieldset'> & VariantProps<typeof fieldVariants>) {\n\treturn (\n\t\t<fieldset\n\t\t\tdata-slot='field'\n\t\t\tdata-orientation={orientation}\n\t\t\tclassName={cn(fieldVariants({ orientation }), className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction FieldContent({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='field-content'\n\t\t\tclassName={cn(\n\t\t\t\t'group/field-content flex flex-1 flex-col gap-0.5 leading-snug',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction FieldLabel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof Label>) {\n\treturn (\n\t\t<Label\n\t\t\tdata-slot='field-label'\n\t\t\tclassName={cn(\n\t\t\t\t'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10',\n\t\t\t\t'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction FieldTitle({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='field-label'\n\t\t\tclassName={cn(\n\t\t\t\t'flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction FieldDescription({ className, ...props }: React.ComponentProps<'p'>) {\n\treturn (\n\t\t<p\n\t\t\tdata-slot='field-description'\n\t\t\tclassName={cn(\n\t\t\t\t'text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5',\n\t\t\t\t'last:mt-0 nth-last-2:-mt-1',\n\t\t\t\t'[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction FieldSeparator({\n\tchildren,\n\tclassName,\n\t...props\n}: React.ComponentProps<'div'> & {\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='field-separator'\n\t\t\tdata-content={!!children}\n\t\t\tclassName={cn(\n\t\t\t\t'relative -my-1 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<Separator className='absolute inset-0 top-1/2 data-horizontal:my-0' />\n\t\t\t{children && (\n\t\t\t\t<span\n\t\t\t\t\tclassName='relative mx-auto block w-fit bg-background px-2 text-muted-foreground'\n\t\t\t\t\tdata-slot='field-separator-content'\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</span>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nfunction FieldError({\n\tclassName,\n\tchildren,\n\terrors,\n\t...props\n}: React.ComponentProps<'div'> & {\n\terrors?: Array<{ message?: string } | undefined>\n}) {\n\tconst content = useMemo(() => {\n\t\tif (children) {\n\t\t\treturn children\n\t\t}\n\n\t\tif (!errors?.length) {\n\t\t\treturn null\n\t\t}\n\n\t\tconst uniqueErrors = [\n\t\t\t...new Map(errors.map((error) => [error?.message, error])).values(),\n\t\t]\n\n\t\tif (uniqueErrors?.length === 1) {\n\t\t\treturn uniqueErrors[0]?.message\n\t\t}\n\n\t\treturn (\n\t\t\t<ul className='ml-4 flex list-disc flex-col gap-1'>\n\t\t\t\t{uniqueErrors.map(\n\t\t\t\t\t(error) =>\n\t\t\t\t\t\terror?.message && <li key={error.message}>{error.message}</li>,\n\t\t\t\t)}\n\t\t\t</ul>\n\t\t)\n\t}, [children, errors])\n\n\tif (!content) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<div\n\t\t\trole='alert'\n\t\t\tdata-slot='field-error'\n\t\t\tclassName={cn('text-sm font-normal text-destructive', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{content}\n\t\t</div>\n\t)\n}\n\nexport {\n\tField,\n\tFieldContent,\n\tFieldDescription,\n\tFieldError,\n\tFieldGroup,\n\tFieldLabel,\n\tFieldLegend,\n\tFieldSeparator,\n\tFieldSet,\n\tFieldTitle,\n}\n"],"names":["FieldSet","className","props","jsx","cn","FieldLegend","variant","FieldGroup","fieldVariants","cva","Field","orientation","FieldContent","FieldLabel","Label","FieldTitle","FieldDescription","FieldSeparator","children","jsxs","Separator","FieldError","errors","content","useMemo","uniqueErrors","error"],"mappings":"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"}
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as p } from "./accordion/index.js";
|
|
2
|
+
import { Button as a, buttonVariants as i } from "./button/index.js";
|
|
3
|
+
import { Calendar as u, CalendarDayButton as c } from "./calendar/index.js";
|
|
4
|
+
import { Card as g, CardAction as m, CardContent as x, CardDescription as S, CardFooter as f, CardHeader as C, CardTitle as T } from "./card/index.js";
|
|
5
|
+
import { Dialog as M, DialogClose as I, DialogContent as F, DialogDescription as G, DialogFooter as P, DialogHeader as b, DialogOverlay as v, DialogPortal as s, DialogTitle as A, DialogTrigger as B } from "./dialog/index.js";
|
|
6
|
+
import { DropdownMenu as h, DropdownMenuCheckboxItem as R, DropdownMenuContent as H, DropdownMenuGroup as V, DropdownMenuItem as y, DropdownMenuLabel as k, DropdownMenuPortal as E, DropdownMenuRadioGroup as O, DropdownMenuRadioItem as U, DropdownMenuSeparator as j, DropdownMenuShortcut as q, DropdownMenuSub as z, DropdownMenuSubContent as J, DropdownMenuSubTrigger as K, DropdownMenuTrigger as N } from "./dropdown-menu/index.js";
|
|
7
|
+
import { Field as W, FieldContent as X, FieldDescription as Y, FieldError as Z, FieldGroup as _, FieldLabel as $, FieldLegend as oo, FieldSeparator as ro, FieldSet as eo, FieldTitle as to } from "./field/index.js";
|
|
8
|
+
import { Input as po } from "./input/index.js";
|
|
9
|
+
import { InputGroup as ao, InputGroupAddon as io, InputGroupButton as uo, InputGroupInput as co, InputGroupText as Do, InputGroupTextarea as go } from "./input-group/index.js";
|
|
10
|
+
import { Label as xo } from "./label/index.js";
|
|
11
|
+
import { Popover as fo, PopoverAnchor as Co, PopoverContent as To, PopoverDescription as wo, PopoverHeader as Mo, PopoverTitle as Io, PopoverTrigger as Fo } from "./popover/index.js";
|
|
12
|
+
import { RadioGroup as Po, RadioGroupItem as bo } from "./radio-group/index.js";
|
|
13
|
+
import { ScrollArea as so, ScrollBar as Ao } from "./scroll-area/index.js";
|
|
14
|
+
import { Select as Lo, SelectContent as ho, SelectGroup as Ro, SelectItem as Ho, SelectLabel as Vo, SelectScrollDownButton as yo, SelectScrollUpButton as ko, SelectSeparator as Eo, SelectTrigger as Oo, SelectValue as Uo } from "./select/index.js";
|
|
15
|
+
import { Separator as qo } from "./separator/index.js";
|
|
16
|
+
import { Toaster as Jo } from "./sonner/index.js";
|
|
17
|
+
import { Switch as No } from "./switch/index.js";
|
|
18
|
+
import { Textarea as Wo } from "./textarea/index.js";
|
|
19
|
+
import { Toggle as Yo, toggleVariants as Zo } from "./toggle/index.js";
|
|
20
|
+
import { Tooltip as $o, TooltipContent as or, TooltipProvider as rr, TooltipTrigger as er } from "./tooltip/index.js";
|
|
21
|
+
export {
|
|
22
|
+
e as Accordion,
|
|
23
|
+
t as AccordionContent,
|
|
24
|
+
n as AccordionItem,
|
|
25
|
+
p as AccordionTrigger,
|
|
26
|
+
a as Button,
|
|
27
|
+
u as Calendar,
|
|
28
|
+
c as CalendarDayButton,
|
|
29
|
+
g as Card,
|
|
30
|
+
m as CardAction,
|
|
31
|
+
x as CardContent,
|
|
32
|
+
S as CardDescription,
|
|
33
|
+
f as CardFooter,
|
|
34
|
+
C as CardHeader,
|
|
35
|
+
T as CardTitle,
|
|
36
|
+
M as Dialog,
|
|
37
|
+
I as DialogClose,
|
|
38
|
+
F as DialogContent,
|
|
39
|
+
G as DialogDescription,
|
|
40
|
+
P as DialogFooter,
|
|
41
|
+
b as DialogHeader,
|
|
42
|
+
v as DialogOverlay,
|
|
43
|
+
s as DialogPortal,
|
|
44
|
+
A as DialogTitle,
|
|
45
|
+
B as DialogTrigger,
|
|
46
|
+
h as DropdownMenu,
|
|
47
|
+
R as DropdownMenuCheckboxItem,
|
|
48
|
+
H as DropdownMenuContent,
|
|
49
|
+
V as DropdownMenuGroup,
|
|
50
|
+
y as DropdownMenuItem,
|
|
51
|
+
k as DropdownMenuLabel,
|
|
52
|
+
E as DropdownMenuPortal,
|
|
53
|
+
O as DropdownMenuRadioGroup,
|
|
54
|
+
U as DropdownMenuRadioItem,
|
|
55
|
+
j as DropdownMenuSeparator,
|
|
56
|
+
q as DropdownMenuShortcut,
|
|
57
|
+
z as DropdownMenuSub,
|
|
58
|
+
J as DropdownMenuSubContent,
|
|
59
|
+
K as DropdownMenuSubTrigger,
|
|
60
|
+
N as DropdownMenuTrigger,
|
|
61
|
+
W as Field,
|
|
62
|
+
X as FieldContent,
|
|
63
|
+
Y as FieldDescription,
|
|
64
|
+
Z as FieldError,
|
|
65
|
+
_ as FieldGroup,
|
|
66
|
+
$ as FieldLabel,
|
|
67
|
+
oo as FieldLegend,
|
|
68
|
+
ro as FieldSeparator,
|
|
69
|
+
eo as FieldSet,
|
|
70
|
+
to as FieldTitle,
|
|
71
|
+
po as Input,
|
|
72
|
+
ao as InputGroup,
|
|
73
|
+
io as InputGroupAddon,
|
|
74
|
+
uo as InputGroupButton,
|
|
75
|
+
co as InputGroupInput,
|
|
76
|
+
Do as InputGroupText,
|
|
77
|
+
go as InputGroupTextarea,
|
|
78
|
+
xo as Label,
|
|
79
|
+
fo as Popover,
|
|
80
|
+
Co as PopoverAnchor,
|
|
81
|
+
To as PopoverContent,
|
|
82
|
+
wo as PopoverDescription,
|
|
83
|
+
Mo as PopoverHeader,
|
|
84
|
+
Io as PopoverTitle,
|
|
85
|
+
Fo as PopoverTrigger,
|
|
86
|
+
Po as RadioGroup,
|
|
87
|
+
bo as RadioGroupItem,
|
|
88
|
+
so as ScrollArea,
|
|
89
|
+
Ao as ScrollBar,
|
|
90
|
+
Lo as Select,
|
|
91
|
+
ho as SelectContent,
|
|
92
|
+
Ro as SelectGroup,
|
|
93
|
+
Ho as SelectItem,
|
|
94
|
+
Vo as SelectLabel,
|
|
95
|
+
yo as SelectScrollDownButton,
|
|
96
|
+
ko as SelectScrollUpButton,
|
|
97
|
+
Eo as SelectSeparator,
|
|
98
|
+
Oo as SelectTrigger,
|
|
99
|
+
Uo as SelectValue,
|
|
100
|
+
qo as Separator,
|
|
101
|
+
No as Switch,
|
|
102
|
+
Wo as Textarea,
|
|
103
|
+
Jo as Toaster,
|
|
104
|
+
Yo as Toggle,
|
|
105
|
+
$o as Tooltip,
|
|
106
|
+
or as TooltipContent,
|
|
107
|
+
rr as TooltipProvider,
|
|
108
|
+
er as TooltipTrigger,
|
|
109
|
+
i as buttonVariants,
|
|
110
|
+
Zo as toggleVariants
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cn as d } from "../../utils/cn.js";
|
|
3
|
+
function o({ className: i, type: r, ...e }) {
|
|
4
|
+
return /* @__PURE__ */ n(
|
|
5
|
+
"input",
|
|
6
|
+
{
|
|
7
|
+
type: r,
|
|
8
|
+
"data-slot": "input",
|
|
9
|
+
className: d(
|
|
10
|
+
"h-12 w-full min-w-0 rounded-lg border border-input bg-background/70 px-3 py-1 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-background/40 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
11
|
+
i
|
|
12
|
+
),
|
|
13
|
+
...e
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
o as Input
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/input/index.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n\treturn (\n\t\t<input\n\t\t\ttype={type}\n\t\t\tdata-slot='input'\n\t\t\tclassName={cn(\n\t\t\t\t'h-12 w-full min-w-0 rounded-lg border border-input bg-background/70 px-3 py-1 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-background/40 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Input }\n"],"names":["Input","className","type","props","jsx","cn"],"mappings":";;AAIA,SAASA,EAAM,EAAE,WAAAC,GAAW,MAAAC,GAAM,GAAGC,KAAwC;AAC5E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,MAAAF;AAAA,MACA,aAAU;AAAA,MACV,WAAWG;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cva as i } from "class-variance-authority";
|
|
3
|
+
import { cn as n } from "../../utils/cn.js";
|
|
4
|
+
import { Button as u } from "../button/index.js";
|
|
5
|
+
import { Input as d } from "../input/index.js";
|
|
6
|
+
import { Textarea as l } from "../textarea/index.js";
|
|
7
|
+
function v({ className: a, ...t }) {
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
9
|
+
"fieldset",
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "input-group",
|
|
12
|
+
className: n(
|
|
13
|
+
"group/input-group relative flex h-12 w-full min-w-0 items-center rounded-lg border border-input bg-background/70 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-background/40 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
14
|
+
a
|
|
15
|
+
),
|
|
16
|
+
...t
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
const p = i(
|
|
21
|
+
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
22
|
+
{
|
|
23
|
+
variants: {
|
|
24
|
+
align: {
|
|
25
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
26
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
27
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-3",
|
|
28
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-3"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
align: "inline-start"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
function k({
|
|
37
|
+
className: a,
|
|
38
|
+
align: t = "inline-start",
|
|
39
|
+
...s
|
|
40
|
+
}) {
|
|
41
|
+
return (
|
|
42
|
+
// biome-ignore lint/a11y/useKeyWithClickEvents: Clicking the addon focuses the input; keyboard users focus the input directly.
|
|
43
|
+
/* @__PURE__ */ r(
|
|
44
|
+
"fieldset",
|
|
45
|
+
{
|
|
46
|
+
"data-slot": "input-group-addon",
|
|
47
|
+
"data-align": t,
|
|
48
|
+
className: n(p({ align: t }), a),
|
|
49
|
+
onClick: (e) => {
|
|
50
|
+
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
51
|
+
},
|
|
52
|
+
...s
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
const c = i(
|
|
58
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
59
|
+
{
|
|
60
|
+
variants: {
|
|
61
|
+
size: {
|
|
62
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
63
|
+
sm: "",
|
|
64
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
65
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
defaultVariants: {
|
|
69
|
+
size: "xs"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
function z({
|
|
74
|
+
className: a,
|
|
75
|
+
type: t = "button",
|
|
76
|
+
variant: s = "ghost",
|
|
77
|
+
size: e = "xs",
|
|
78
|
+
...o
|
|
79
|
+
}) {
|
|
80
|
+
return /* @__PURE__ */ r(
|
|
81
|
+
u,
|
|
82
|
+
{
|
|
83
|
+
type: t,
|
|
84
|
+
"data-size": e,
|
|
85
|
+
variant: s,
|
|
86
|
+
className: n(c({ size: e }), a),
|
|
87
|
+
...o
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function w({ className: a, ...t }) {
|
|
92
|
+
return /* @__PURE__ */ r(
|
|
93
|
+
"span",
|
|
94
|
+
{
|
|
95
|
+
className: n(
|
|
96
|
+
"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
97
|
+
a
|
|
98
|
+
),
|
|
99
|
+
...t
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
function y({
|
|
104
|
+
className: a,
|
|
105
|
+
...t
|
|
106
|
+
}) {
|
|
107
|
+
return /* @__PURE__ */ r(
|
|
108
|
+
d,
|
|
109
|
+
{
|
|
110
|
+
"data-slot": "input-group-control",
|
|
111
|
+
className: n(
|
|
112
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
113
|
+
a
|
|
114
|
+
),
|
|
115
|
+
...t
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function G({
|
|
120
|
+
className: a,
|
|
121
|
+
...t
|
|
122
|
+
}) {
|
|
123
|
+
return /* @__PURE__ */ r(
|
|
124
|
+
l,
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "input-group-control",
|
|
127
|
+
className: n(
|
|
128
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
129
|
+
a
|
|
130
|
+
),
|
|
131
|
+
...t
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
export {
|
|
136
|
+
v as InputGroup,
|
|
137
|
+
k as InputGroupAddon,
|
|
138
|
+
z as InputGroupButton,
|
|
139
|
+
y as InputGroupInput,
|
|
140
|
+
w as InputGroupText,
|
|
141
|
+
G as InputGroupTextarea
|
|
142
|
+
};
|
|
143
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/input-group/index.tsx"],"sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport type * as React from 'react'\nimport { cn } from '../../utils/cn'\nimport { Button } from '../button'\nimport { Input } from '../input'\nimport { Textarea } from '../textarea'\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<'fieldset'>) {\n\treturn (\n\t\t<fieldset\n\t\t\tdata-slot='input-group'\n\t\t\tclassName={cn(\n\t\t\t\t'group/input-group relative flex h-12 w-full min-w-0 items-center rounded-lg border border-input bg-background/70 transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-background/40 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nconst inputGroupAddonVariants = cva(\n\t\"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4\",\n\t{\n\t\tvariants: {\n\t\t\talign: {\n\t\t\t\t'inline-start':\n\t\t\t\t\t'order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]',\n\t\t\t\t'inline-end':\n\t\t\t\t\t'order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]',\n\t\t\t\t'block-start':\n\t\t\t\t\t'order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-3',\n\t\t\t\t'block-end':\n\t\t\t\t\t'order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-3',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\talign: 'inline-start',\n\t\t},\n\t},\n)\n\nfunction InputGroupAddon({\n\tclassName,\n\talign = 'inline-start',\n\t...props\n}: React.ComponentProps<'fieldset'> &\n\tVariantProps<typeof inputGroupAddonVariants>) {\n\treturn (\n\t\t// biome-ignore lint/a11y/useKeyWithClickEvents: Clicking the addon focuses the input; keyboard users focus the input directly.\n\t\t<fieldset\n\t\t\tdata-slot='input-group-addon'\n\t\t\tdata-align={align}\n\t\t\tclassName={cn(inputGroupAddonVariants({ align }), className)}\n\t\t\tonClick={(e) => {\n\t\t\t\tif ((e.target as HTMLElement).closest('button')) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\te.currentTarget.parentElement?.querySelector('input')?.focus()\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nconst inputGroupButtonVariants = cva(\n\t'flex items-center gap-2 text-sm shadow-none',\n\t{\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\txs: \"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\tsm: '',\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0',\n\t\t\t\t'icon-sm': 'size-8 p-0 has-[>svg]:p-0',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tsize: 'xs',\n\t\t},\n\t},\n)\n\nfunction InputGroupButton({\n\tclassName,\n\ttype = 'button',\n\tvariant = 'ghost',\n\tsize = 'xs',\n\t...props\n}: Omit<React.ComponentProps<typeof Button>, 'size'> &\n\tVariantProps<typeof inputGroupButtonVariants>) {\n\treturn (\n\t\t<Button\n\t\t\ttype={type}\n\t\t\tdata-size={size}\n\t\t\tvariant={variant}\n\t\t\tclassName={cn(inputGroupButtonVariants({ size }), className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<'span'>) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction InputGroupInput({\n\tclassName,\n\t...props\n}: React.ComponentProps<'input'>) {\n\treturn (\n\t\t<Input\n\t\t\tdata-slot='input-group-control'\n\t\t\tclassName={cn(\n\t\t\t\t'flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction InputGroupTextarea({\n\tclassName,\n\t...props\n}: React.ComponentProps<'textarea'>) {\n\treturn (\n\t\t<Textarea\n\t\t\tdata-slot='input-group-control'\n\t\t\tclassName={cn(\n\t\t\t\t'flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport {\n\tInputGroup,\n\tInputGroupAddon,\n\tInputGroupButton,\n\tInputGroupInput,\n\tInputGroupText,\n\tInputGroupTextarea,\n}\n"],"names":["InputGroup","className","props","jsx","cn","inputGroupAddonVariants","cva","InputGroupAddon","align","inputGroupButtonVariants","InputGroupButton","type","variant","size","Button","InputGroupText","InputGroupInput","Input","InputGroupTextarea","Textarea"],"mappings":";;;;;;AASA,SAASA,EAAW,EAAE,WAAAC,GAAW,GAAGC,KAA2C;AAC9E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAH;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,MAAMG,IAA0BC;AAAA,EAC/B;AAAA,EACA;AAAA,IACC,UAAU;AAAA,MACT,OAAO;AAAA,QACN,gBACC;AAAA,QACD,cACC;AAAA,QACD,eACC;AAAA,QACD,aACC;AAAA,MAAA;AAAA,IACF;AAAA,IAED,iBAAiB;AAAA,MAChB,OAAO;AAAA,IAAA;AAAA,EACR;AAEF;AAEA,SAASC,EAAgB;AAAA,EACxB,WAAAN;AAAA,EACA,OAAAO,IAAQ;AAAA,EACR,GAAGN;AACJ,GAC+C;AAC9C;AAAA;AAAA,IAEC,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,aAAU;AAAA,QACV,cAAYK;AAAA,QACZ,WAAWJ,EAAGC,EAAwB,EAAE,OAAAG,EAAA,CAAO,GAAGP,CAAS;AAAA,QAC3D,SAAS,CAAC,MAAM;AACf,UAAK,EAAE,OAAuB,QAAQ,QAAQ,KAG9C,EAAE,cAAc,eAAe,cAAc,OAAO,GAAG,MAAA;AAAA,QACxD;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA;AAGP;AAEA,MAAMO,IAA2BH;AAAA,EAChC;AAAA,EACA;AAAA,IACC,UAAU;AAAA,MACT,MAAM;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,WACC;AAAA,QACD,WAAW;AAAA,MAAA;AAAA,IACZ;AAAA,IAED,iBAAiB;AAAA,MAChB,MAAM;AAAA,IAAA;AAAA,EACP;AAEF;AAEA,SAASI,EAAiB;AAAA,EACzB,WAAAT;AAAA,EACA,MAAAU,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,GAAGX;AACJ,GACgD;AAC/C,SACC,gBAAAC;AAAA,IAACW;AAAA,IAAA;AAAA,MACA,MAAAH;AAAA,MACA,aAAWE;AAAA,MACX,SAAAD;AAAA,MACA,WAAWR,EAAGK,EAAyB,EAAE,MAAAI,EAAA,CAAM,GAAGZ,CAAS;AAAA,MAC1D,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASa,EAAe,EAAE,WAAAd,GAAW,GAAGC,KAAuC;AAC9E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACV;AAAA,QACAH;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASc,EAAgB;AAAA,EACxB,WAAAf;AAAA,EACA,GAAGC;AACJ,GAAkC;AACjC,SACC,gBAAAC;AAAA,IAACc;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWb;AAAA,QACV;AAAA,QACAH;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASgB,EAAmB;AAAA,EAC3B,WAAAjB;AAAA,EACA,GAAGC;AACJ,GAAqC;AACpC,SACC,gBAAAC;AAAA,IAACgB;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWf;AAAA,QACV;AAAA,QACAH;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Label as a } from "radix-ui";
|
|
3
|
+
import { cn as r } from "../../utils/cn.js";
|
|
4
|
+
function i({
|
|
5
|
+
className: e,
|
|
6
|
+
...t
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ o(
|
|
9
|
+
a.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "label",
|
|
12
|
+
className: r(
|
|
13
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
14
|
+
e
|
|
15
|
+
),
|
|
16
|
+
...t
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
i as Label
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/label/index.tsx"],"sourcesContent":["import { Label as LabelPrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Label({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n\treturn (\n\t\t<LabelPrimitive.Root\n\t\t\tdata-slot='label'\n\t\t\tclassName={cn(\n\t\t\t\t'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Label }\n"],"names":["Label","className","props","jsx","LabelPrimitive","cn"],"mappings":";;;AAKA,SAASA,EAAM;AAAA,EACd,WAAAC;AAAA,EACA,GAAGC;AACJ,GAAqD;AACpD,SACC,gBAAAC;AAAA,IAACC,EAAe;AAAA,IAAf;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Popover as r } from "radix-ui";
|
|
3
|
+
import { cn as n } from "../../utils/cn.js";
|
|
4
|
+
function l({
|
|
5
|
+
...o
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ t(r.Root, { "data-slot": "popover", ...o });
|
|
8
|
+
}
|
|
9
|
+
function f({
|
|
10
|
+
...o
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ t(r.Trigger, { "data-slot": "popover-trigger", ...o });
|
|
13
|
+
}
|
|
14
|
+
function m({
|
|
15
|
+
className: o,
|
|
16
|
+
align: e = "center",
|
|
17
|
+
sideOffset: a = 4,
|
|
18
|
+
...i
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ t(r.Portal, { children: /* @__PURE__ */ t(
|
|
21
|
+
r.Content,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "popover-content",
|
|
24
|
+
align: e,
|
|
25
|
+
sideOffset: a,
|
|
26
|
+
className: n(
|
|
27
|
+
"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=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",
|
|
28
|
+
o
|
|
29
|
+
),
|
|
30
|
+
...i
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
33
|
+
}
|
|
34
|
+
function c({
|
|
35
|
+
...o
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ t(r.Anchor, { "data-slot": "popover-anchor", ...o });
|
|
38
|
+
}
|
|
39
|
+
function u({ className: o, ...e }) {
|
|
40
|
+
return /* @__PURE__ */ t(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "popover-header",
|
|
44
|
+
className: n("flex flex-col gap-0.5 text-sm", o),
|
|
45
|
+
...e
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
function v({ className: o, ...e }) {
|
|
50
|
+
return /* @__PURE__ */ t(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
"data-slot": "popover-title",
|
|
54
|
+
className: n("font-medium", o),
|
|
55
|
+
...e
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function g({
|
|
60
|
+
className: o,
|
|
61
|
+
...e
|
|
62
|
+
}) {
|
|
63
|
+
return /* @__PURE__ */ t(
|
|
64
|
+
"p",
|
|
65
|
+
{
|
|
66
|
+
"data-slot": "popover-description",
|
|
67
|
+
className: n("text-muted-foreground", o),
|
|
68
|
+
...e
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
l as Popover,
|
|
74
|
+
c as PopoverAnchor,
|
|
75
|
+
m as PopoverContent,
|
|
76
|
+
g as PopoverDescription,
|
|
77
|
+
u as PopoverHeader,
|
|
78
|
+
v as PopoverTitle,
|
|
79
|
+
f as PopoverTrigger
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/popover/index.tsx"],"sourcesContent":["import { Popover as PopoverPrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Popover({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n\treturn <PopoverPrimitive.Root data-slot='popover' {...props} />\n}\n\nfunction PopoverTrigger({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n\treturn <PopoverPrimitive.Trigger data-slot='popover-trigger' {...props} />\n}\n\nfunction PopoverContent({\n\tclassName,\n\talign = 'center',\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n\treturn (\n\t\t<PopoverPrimitive.Portal>\n\t\t\t<PopoverPrimitive.Content\n\t\t\t\tdata-slot='popover-content'\n\t\t\t\talign={align}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=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',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</PopoverPrimitive.Portal>\n\t)\n}\n\nfunction PopoverAnchor({\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n\treturn <PopoverPrimitive.Anchor data-slot='popover-anchor' {...props} />\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='popover-header'\n\t\t\tclassName={cn('flex flex-col gap-0.5 text-sm', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction PopoverTitle({ className, ...props }: React.ComponentProps<'h2'>) {\n\treturn (\n\t\t<div\n\t\t\tdata-slot='popover-title'\n\t\t\tclassName={cn('font-medium', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction PopoverDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<'p'>) {\n\treturn (\n\t\t<p\n\t\t\tdata-slot='popover-description'\n\t\t\tclassName={cn('text-muted-foreground', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport {\n\tPopover,\n\tPopoverAnchor,\n\tPopoverContent,\n\tPopoverDescription,\n\tPopoverHeader,\n\tPopoverTitle,\n\tPopoverTrigger,\n}\n"],"names":["Popover","props","PopoverPrimitive","PopoverTrigger","PopoverContent","className","align","sideOffset","jsx","cn","PopoverAnchor","PopoverHeader","PopoverTitle","PopoverDescription"],"mappings":";;;AAKA,SAASA,EAAQ;AAAA,EAChB,GAAGC;AACJ,GAAuD;AACtD,2BAAQC,EAAiB,MAAjB,EAAsB,aAAU,WAAW,GAAGD,GAAO;AAC9D;AAEA,SAASE,EAAe;AAAA,EACvB,GAAGF;AACJ,GAA0D;AACzD,2BAAQC,EAAiB,SAAjB,EAAyB,aAAU,mBAAmB,GAAGD,GAAO;AACzE;AAEA,SAASG,EAAe;AAAA,EACvB,WAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,YAAAC,IAAa;AAAA,EACb,GAAGN;AACJ,GAA0D;AACzD,SACC,gBAAAO,EAACN,EAAiB,QAAjB,EACA,UAAA,gBAAAM;AAAA,IAACN,EAAiB;AAAA,IAAjB;AAAA,MACA,aAAU;AAAA,MACV,OAAAI;AAAA,MACA,YAAAC;AAAA,MACA,WAAWE;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGJ;AAAA,IAAA;AAAA,EAAA,GAEN;AAEF;AAEA,SAASS,EAAc;AAAA,EACtB,GAAGT;AACJ,GAAyD;AACxD,2BAAQC,EAAiB,QAAjB,EAAwB,aAAU,kBAAkB,GAAGD,GAAO;AACvE;AAEA,SAASU,EAAc,EAAE,WAAAN,GAAW,GAAGJ,KAAsC;AAC5E,SACC,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,iCAAiCJ,CAAS;AAAA,MACvD,GAAGJ;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASW,EAAa,EAAE,WAAAP,GAAW,GAAGJ,KAAqC;AAC1E,SACC,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,eAAeJ,CAAS;AAAA,MACrC,GAAGJ;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASY,EAAmB;AAAA,EAC3B,WAAAR;AAAA,EACA,GAAGJ;AACJ,GAA8B;AAC7B,SACC,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,yBAAyBJ,CAAS;AAAA,MAC/C,GAAGJ;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { RadioGroup as e } from "radix-ui";
|
|
3
|
+
import { cn as t } from "../../utils/cn.js";
|
|
4
|
+
function s({
|
|
5
|
+
className: a,
|
|
6
|
+
...i
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
9
|
+
e.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "radio-group",
|
|
12
|
+
className: t("grid w-full gap-2", a),
|
|
13
|
+
...i
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function l({
|
|
18
|
+
className: a,
|
|
19
|
+
...i
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ r(
|
|
22
|
+
e.Item,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "radio-group-item",
|
|
25
|
+
className: t(
|
|
26
|
+
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
27
|
+
a
|
|
28
|
+
),
|
|
29
|
+
...i,
|
|
30
|
+
children: /* @__PURE__ */ r(
|
|
31
|
+
e.Indicator,
|
|
32
|
+
{
|
|
33
|
+
"data-slot": "radio-group-indicator",
|
|
34
|
+
className: "flex size-4 items-center justify-center",
|
|
35
|
+
children: /* @__PURE__ */ r("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
s as RadioGroup,
|
|
43
|
+
l as RadioGroupItem
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/radio-group/index.tsx"],"sourcesContent":["import { RadioGroup as RadioGroupPrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction RadioGroup({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n\treturn (\n\t\t<RadioGroupPrimitive.Root\n\t\t\tdata-slot='radio-group'\n\t\t\tclassName={cn('grid w-full gap-2', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction RadioGroupItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n\treturn (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tdata-slot='radio-group-item'\n\t\t\tclassName={cn(\n\t\t\t\t'group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator\n\t\t\t\tdata-slot='radio-group-indicator'\n\t\t\t\tclassName='flex size-4 items-center justify-center'\n\t\t\t>\n\t\t\t\t<span className='absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground' />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t)\n}\n\nexport { RadioGroup, RadioGroupItem }\n"],"names":["RadioGroup","className","props","jsx","RadioGroupPrimitive","cn","RadioGroupItem"],"mappings":";;;AAKA,SAASA,EAAW;AAAA,EACnB,WAAAC;AAAA,EACA,GAAGC;AACJ,GAA0D;AACzD,SACC,gBAAAC;AAAA,IAACC,EAAoB;AAAA,IAApB;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,qBAAqBJ,CAAS;AAAA,MAC3C,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASI,EAAe;AAAA,EACvB,WAAAL;AAAA,EACA,GAAGC;AACJ,GAA0D;AACzD,SACC,gBAAAC;AAAA,IAACC,EAAoB;AAAA,IAApB;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,MAEJ,UAAA,gBAAAC;AAAA,QAACC,EAAoB;AAAA,QAApB;AAAA,UACA,aAAU;AAAA,UACV,WAAU;AAAA,UAEV,UAAA,gBAAAD,EAAC,QAAA,EAAK,WAAU,wGAAA,CAAwG;AAAA,QAAA;AAAA,MAAA;AAAA,IACzH;AAAA,EAAA;AAGH;"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { ScrollArea as a } from "radix-ui";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
function u({
|
|
5
|
+
className: o,
|
|
6
|
+
children: l,
|
|
7
|
+
...t
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ i(
|
|
10
|
+
a.Root,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "scroll-area",
|
|
13
|
+
className: e("relative", o),
|
|
14
|
+
...t,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ r(
|
|
17
|
+
a.Viewport,
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "scroll-area-viewport",
|
|
20
|
+
className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
|
|
21
|
+
children: l
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ r(n, {}),
|
|
25
|
+
/* @__PURE__ */ r(a.Corner, {})
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function n({
|
|
31
|
+
className: o,
|
|
32
|
+
orientation: l = "vertical",
|
|
33
|
+
...t
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ r(
|
|
36
|
+
a.ScrollAreaScrollbar,
|
|
37
|
+
{
|
|
38
|
+
"data-slot": "scroll-area-scrollbar",
|
|
39
|
+
"data-orientation": l,
|
|
40
|
+
orientation: l,
|
|
41
|
+
className: e(
|
|
42
|
+
"flex touch-none p-px transition-colors select-none 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",
|
|
43
|
+
o
|
|
44
|
+
),
|
|
45
|
+
...t,
|
|
46
|
+
children: /* @__PURE__ */ r(
|
|
47
|
+
a.ScrollAreaThumb,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "scroll-area-thumb",
|
|
50
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
u as ScrollArea,
|
|
58
|
+
n as ScrollBar
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/scroll-area/index.tsx"],"sourcesContent":["import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction ScrollArea({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n\treturn (\n\t\t<ScrollAreaPrimitive.Root\n\t\t\tdata-slot='scroll-area'\n\t\t\tclassName={cn('relative', className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ScrollAreaPrimitive.Viewport\n\t\t\t\tdata-slot='scroll-area-viewport'\n\t\t\t\tclassName='size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1'\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</ScrollAreaPrimitive.Viewport>\n\t\t\t<ScrollBar />\n\t\t\t<ScrollAreaPrimitive.Corner />\n\t\t</ScrollAreaPrimitive.Root>\n\t)\n}\n\nfunction ScrollBar({\n\tclassName,\n\torientation = 'vertical',\n\t...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n\treturn (\n\t\t<ScrollAreaPrimitive.ScrollAreaScrollbar\n\t\t\tdata-slot='scroll-area-scrollbar'\n\t\t\tdata-orientation={orientation}\n\t\t\torientation={orientation}\n\t\t\tclassName={cn(\n\t\t\t\t'flex touch-none p-px transition-colors select-none 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',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ScrollAreaPrimitive.ScrollAreaThumb\n\t\t\t\tdata-slot='scroll-area-thumb'\n\t\t\t\tclassName='relative flex-1 rounded-full bg-border'\n\t\t\t/>\n\t\t</ScrollAreaPrimitive.ScrollAreaScrollbar>\n\t)\n}\n\nexport { ScrollArea, ScrollBar }\n"],"names":["ScrollArea","className","children","props","jsxs","ScrollAreaPrimitive","cn","jsx","ScrollBar","orientation"],"mappings":";;;AAKA,SAASA,EAAW;AAAA,EACnB,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACJ,GAA0D;AACzD,SACC,gBAAAC;AAAA,IAACC,EAAoB;AAAA,IAApB;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAG,YAAYL,CAAS;AAAA,MAClC,GAAGE;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAI;AAAA,UAACF,EAAoB;AAAA,UAApB;AAAA,YACA,aAAU;AAAA,YACV,WAAU;AAAA,YAET,UAAAH;AAAA,UAAA;AAAA,QAAA;AAAA,0BAEDM,GAAA,EAAU;AAAA,QACX,gBAAAD,EAACF,EAAoB,QAApB,CAAA,CAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG/B;AAEA,SAASG,EAAU;AAAA,EAClB,WAAAP;AAAA,EACA,aAAAQ,IAAc;AAAA,EACd,GAAGN;AACJ,GAAyE;AACxE,SACC,gBAAAI;AAAA,IAACF,EAAoB;AAAA,IAApB;AAAA,MACA,aAAU;AAAA,MACV,oBAAkBI;AAAA,MAClB,aAAAA;AAAA,MACA,WAAWH;AAAA,QACV;AAAA,QACAL;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAACF,EAAoB;AAAA,QAApB;AAAA,UACA,aAAU;AAAA,UACV,WAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACX;AAAA,EAAA;AAGH;"}
|