@kubetail/ui 2.0.3 → 2.0.4-rc1
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/_virtual/rolldown:runtime.cjs +1 -0
- package/dist/elements/button.cjs +2 -2
- package/dist/elements/button.cjs.map +1 -1
- package/dist/elements/button.js +39 -42
- package/dist/elements/button.js.map +1 -1
- package/dist/elements/calendar.cjs +2 -2
- package/dist/elements/calendar.cjs.map +1 -1
- package/dist/elements/calendar.js +23 -27
- package/dist/elements/calendar.js.map +1 -1
- package/dist/elements/card.cjs +2 -2
- package/dist/elements/card.cjs.map +1 -1
- package/dist/elements/card.js +47 -50
- package/dist/elements/card.js.map +1 -1
- package/dist/elements/checkbox.cjs +2 -2
- package/dist/elements/checkbox.cjs.map +1 -1
- package/dist/elements/checkbox.js +19 -28
- package/dist/elements/checkbox.js.map +1 -1
- package/dist/elements/dialog.cjs +2 -2
- package/dist/elements/dialog.cjs.map +1 -1
- package/dist/elements/dialog.js +75 -107
- package/dist/elements/dialog.js.map +1 -1
- package/dist/elements/dropdown-menu.cjs +2 -2
- package/dist/elements/dropdown-menu.cjs.map +1 -1
- package/dist/elements/dropdown-menu.js +107 -181
- package/dist/elements/dropdown-menu.js.map +1 -1
- package/dist/elements/form.cjs +2 -2
- package/dist/elements/form.cjs.map +1 -1
- package/dist/elements/form.js +73 -76
- package/dist/elements/form.js.map +1 -1
- package/dist/elements/input.cjs +2 -2
- package/dist/elements/input.cjs.map +1 -1
- package/dist/elements/input.js +12 -21
- package/dist/elements/input.js.map +1 -1
- package/dist/elements/label.cjs +2 -2
- package/dist/elements/label.cjs.map +1 -1
- package/dist/elements/label.js +13 -19
- package/dist/elements/label.js.map +1 -1
- package/dist/elements/pagination.cjs +2 -2
- package/dist/elements/pagination.cjs.map +1 -1
- package/dist/elements/pagination.js +71 -89
- package/dist/elements/pagination.js.map +1 -1
- package/dist/elements/popover.cjs +2 -2
- package/dist/elements/popover.cjs.map +1 -1
- package/dist/elements/popover.js +31 -37
- package/dist/elements/popover.js.map +1 -1
- package/dist/elements/search-box.cjs +2 -2
- package/dist/elements/search-box.cjs.map +1 -1
- package/dist/elements/search-box.js +25 -28
- package/dist/elements/search-box.js.map +1 -1
- package/dist/elements/select.cjs +2 -2
- package/dist/elements/select.cjs.map +1 -1
- package/dist/elements/select.js +89 -136
- package/dist/elements/select.js.map +1 -1
- package/dist/elements/separator.cjs +2 -2
- package/dist/elements/separator.cjs.map +1 -1
- package/dist/elements/separator.js +15 -26
- package/dist/elements/separator.js.map +1 -1
- package/dist/elements/sheet.cjs +2 -2
- package/dist/elements/sheet.cjs.map +1 -1
- package/dist/elements/sheet.js +71 -88
- package/dist/elements/sheet.js.map +1 -1
- package/dist/elements/sidebar.cjs +2 -2
- package/dist/elements/sidebar.cjs.map +1 -1
- package/dist/elements/sidebar.js +323 -535
- package/dist/elements/sidebar.js.map +1 -1
- package/dist/elements/skeleton.cjs +2 -2
- package/dist/elements/skeleton.cjs.map +1 -1
- package/dist/elements/skeleton.js +11 -8
- package/dist/elements/skeleton.js.map +1 -1
- package/dist/elements/spinner.cjs +2 -2
- package/dist/elements/spinner.cjs.map +1 -1
- package/dist/elements/spinner.js +30 -39
- package/dist/elements/spinner.js.map +1 -1
- package/dist/elements/table.cjs +2 -2
- package/dist/elements/table.cjs.map +1 -1
- package/dist/elements/table.js +58 -63
- package/dist/elements/table.js.map +1 -1
- package/dist/elements/tabs.cjs +2 -2
- package/dist/elements/tabs.cjs.map +1 -1
- package/dist/elements/tabs.js +31 -38
- package/dist/elements/tabs.js.map +1 -1
- package/dist/elements/tooltip.cjs +2 -2
- package/dist/elements/tooltip.cjs.map +1 -1
- package/dist/elements/tooltip.js +31 -38
- package/dist/elements/tooltip.js.map +1 -1
- package/dist/hooks/use-mobile.cjs +2 -2
- package/dist/hooks/use-mobile.cjs.map +1 -1
- package/dist/hooks/use-mobile.js +13 -14
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/index.cjs +0 -2
- package/dist/index.js +0 -2
- package/dist/lib/utils.cjs +2 -2
- package/dist/lib/utils.cjs.map +1 -1
- package/dist/lib/utils.js +7 -8
- package/dist/lib/utils.js.map +1 -1
- package/package.json +42 -42
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.js","sources":["../../src/elements/form.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext, useId, useMemo } from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form';\n\nimport { cn } from '@/lib/utils';\nimport { Label } from '@/elements/label';\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nconst FormFieldContext = createContext<FormFieldContextValue>({} as FormFieldContextValue);\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = createContext<FormItemContextValue>({} as FormItemContextValue);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n const value = useMemo(() => ({ name: props.name }), [props.name]);\n\n return (\n <FormFieldContext.Provider value={value}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = useContext(FormFieldContext);\n const itemContext = useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = useId();\n const value = useMemo(() => ({ id }), [id]);\n\n return (\n <FormItemContext.Provider value={value}>\n <div data-slot=\"form-item\" className={cn('grid gap-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn('data-[error=true]:text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p data-slot=\"form-message\" id={formMessageId} className={cn('text-destructive text-sm', className)} {...props}>\n {body}\n </p>\n );\n}\n\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };\n"],"
|
|
1
|
+
{"version":3,"file":"form.js","names":[],"sources":["../../src/elements/form.tsx"],"sourcesContent":["'use client';\n\nimport { createContext, useContext, useId, useMemo } from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form';\n\nimport { cn } from '@/lib/utils';\nimport { Label } from '@/elements/label';\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nconst FormFieldContext = createContext<FormFieldContextValue>({} as FormFieldContextValue);\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = createContext<FormItemContextValue>({} as FormItemContextValue);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n const value = useMemo(() => ({ name: props.name }), [props.name]);\n\n return (\n <FormFieldContext.Provider value={value}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = useContext(FormFieldContext);\n const itemContext = useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = useId();\n const value = useMemo(() => ({ id }), [id]);\n\n return (\n <FormItemContext.Provider value={value}>\n <div data-slot=\"form-item\" className={cn('grid gap-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn('data-[error=true]:text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p data-slot=\"form-message\" id={formMessageId} className={cn('text-destructive text-sm', className)} {...props}>\n {body}\n </p>\n );\n}\n\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };\n"],"mappings":";;;;;;;;AAkBA,IAAM,OAAO,cASP,mBAAmB,cAAqC,EAAE,CAA0B,EAMpF,kBAAkB,cAAoC,EAAE,CAAyB,EAEjF,aAGJ,EACA,GAAG,QACuC;CAC1C,IAAM,IAAQ,eAAe,EAAE,MAAM,EAAM,MAAM,GAAG,CAAC,EAAM,KAAK,CAAC;AAEjE,QACE,oBAAC,iBAAiB,UAAA;EAAgB;YAChC,oBAAC,YAAA,EAAW,GAAI,GAAA,CAAS;GACC;GAI1B,qBAAqB;CACzB,IAAM,IAAe,WAAW,iBAAiB,EAC3C,IAAc,WAAW,gBAAgB,EACzC,EAAE,qBAAkB,gBAAgB,EACpC,IAAY,aAAa,EAAE,MAAM,EAAa,MAAM,CAAC,EACrD,IAAa,EAAc,EAAa,MAAM,EAAU;AAE9D,KAAI,CAAC,EACH,OAAU,MAAM,iDAAiD;CAGnE,IAAM,EAAE,UAAO;AAEf,QAAO;EACL;EACA,MAAM,EAAa;EACnB,YAAY,GAAG,EAAG;EAClB,mBAAmB,GAAG,EAAG;EACzB,eAAe,GAAG,EAAG;EACrB,GAAG;EACJ;;AAGH,SAAS,SAAS,EAAE,cAAW,GAAG,KAAsC;CACtE,IAAM,IAAK,OAAO,EACZ,IAAQ,eAAe,EAAE,OAAI,GAAG,CAAC,EAAG,CAAC;AAE3C,QACE,oBAAC,gBAAgB,UAAA;EAAgB;YAC/B,oBAAC,OAAA;GAAI,aAAU;GAAY,WAAW,GAAG,cAAc,EAAU;GAAE,GAAI;IAAS;GACvD;;AAI/B,SAAS,UAAU,EAAE,cAAW,GAAG,KAA2D;CAC5F,IAAM,EAAE,UAAO,kBAAe,cAAc;AAE5C,QACE,oBAAC,OAAA;EACC,aAAU;EACV,cAAY,CAAC,CAAC;EACd,WAAW,GAAG,sCAAsC,EAAU;EAC9D,SAAS;EACT,GAAI;GACJ;;AAIN,SAAS,YAAY,EAAE,GAAG,KAA4C;CACpE,IAAM,EAAE,UAAO,eAAY,sBAAmB,qBAAkB,cAAc;AAE9E,QACE,oBAAC,MAAA;EACC,aAAU;EACV,IAAI;EACJ,oBAAmB,IAA4B,GAAG,EAAkB,GAAG,MAA5C;EAC3B,gBAAc,CAAC,CAAC;EAChB,GAAI;GACJ;;AAIN,SAAS,gBAAgB,EAAE,cAAW,GAAG,KAAoC;CAC3E,IAAM,EAAE,yBAAsB,cAAc;AAE5C,QACE,oBAAC,KAAA;EACC,aAAU;EACV,IAAI;EACJ,WAAW,GAAG,iCAAiC,EAAU;EACzD,GAAI;GACJ;;AAIN,SAAS,YAAY,EAAE,cAAW,GAAG,KAAoC;CACvE,IAAM,EAAE,UAAO,qBAAkB,cAAc,EACzC,IAAO,IAAQ,OAAO,GAAO,WAAW,GAAG,GAAG,EAAM;AAM1D,QAJK,IAKH,oBAAC,KAAA;EAAE,aAAU;EAAe,IAAI;EAAe,WAAW,GAAG,4BAA4B,EAAU;EAAE,GAAI;YACtG;GACC,GANG"}
|
package/dist/elements/input.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=input.cjs.map
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`);function r({className:e,type:r,...i}){return(0,n.jsx)(`input`,{type:r,"data-slot":`input`,className:t.cn(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,e),...i})}exports.Input=r;
|
|
2
|
+
//# sourceMappingURL=input.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.cjs","sources":["../../src/elements/input.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"
|
|
1
|
+
{"version":3,"file":"input.cjs","names":[],"sources":["../../src/elements/input.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":"wLAEA,SAAS,EAAM,CAAE,YAAW,OAAM,GAAG,GAAwC,CAC3E,OACE,EAAA,EAAA,KAAC,QAAA,CACO,OACN,YAAU,QACV,UAAW,EAAA,GACT,kcACA,gFACA,yGACA,EACD,CACD,GAAI,GACJ"}
|
package/dist/elements/input.js
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
11
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
12
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
13
|
-
e
|
|
14
|
-
),
|
|
15
|
-
...r
|
|
16
|
-
}
|
|
17
|
-
);
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
function Input({ className: n, type: r, ...i }) {
|
|
4
|
+
return /* @__PURE__ */ jsx("input", {
|
|
5
|
+
type: r,
|
|
6
|
+
"data-slot": "input",
|
|
7
|
+
className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", n),
|
|
8
|
+
...i
|
|
9
|
+
});
|
|
18
10
|
}
|
|
19
|
-
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=input.js.map
|
|
11
|
+
export { Input };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../src/elements/input.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"
|
|
1
|
+
{"version":3,"file":"input.js","names":[],"sources":["../../src/elements/input.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":";;AAEA,SAAS,MAAM,EAAE,cAAW,SAAM,GAAG,KAAwC;AAC3E,QACE,oBAAC,SAAA;EACO;EACN,aAAU;EACV,WAAW,GACT,mcACA,iFACA,0GACA,EACD;EACD,GAAI;GACJ"}
|
package/dist/elements/label.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use
|
|
2
|
-
//# sourceMappingURL=label.cjs.map
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-label`);r=e.__toESM(r);function i({className:e,...i}){return(0,n.jsx)(r.Root,{"data-slot":`label`,className:t.cn(`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`,e),...i})}exports.Label=i;
|
|
2
|
+
//# sourceMappingURL=label.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.cjs","sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n '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 className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"
|
|
1
|
+
{"version":3,"file":"label.cjs","names":[],"sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n '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 className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":"uPAMA,SAAS,EAAM,CAAE,YAAW,GAAG,GAA2D,CACxF,OACE,EAAA,EAAA,KAAC,EAAe,KAAA,CACd,YAAU,QACV,UAAW,EAAA,GACT,sNACA,EACD,CACD,GAAI,GACJ"}
|
package/dist/elements/label.js
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
e
|
|
12
|
-
),
|
|
13
|
-
...t
|
|
14
|
-
}
|
|
15
|
-
);
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
|
+
function Label({ className: r, ...i }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
|
|
7
|
+
"data-slot": "label",
|
|
8
|
+
className: cn("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", r),
|
|
9
|
+
...i
|
|
10
|
+
});
|
|
16
11
|
}
|
|
17
|
-
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=label.js.map
|
|
12
|
+
export { Label };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n '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 className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"
|
|
1
|
+
{"version":3,"file":"label.js","names":[],"sources":["../../src/elements/label.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\n\nimport { cn } from '@/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n '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 className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":";;;;AAMA,SAAS,MAAM,EAAE,cAAW,GAAG,KAA2D;AACxF,QACE,oBAAC,eAAe,MAAA;EACd,aAAU;EACV,WAAW,GACT,uNACA,EACD;EACD,GAAI;GACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=pagination.cjs.map
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`),n=require(`./button.cjs`);let r=require(`react/jsx-runtime`),i=require(`lucide-react`),a=require(`react`);a=e.__toESM(a);function o({className:e,...n}){return(0,r.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,"data-slot":`pagination`,className:t.cn(`mx-auto flex w-full justify-center`,e),...n})}function s({className:e,...n}){return(0,r.jsx)(`ul`,{"data-slot":`pagination-content`,className:t.cn(`flex flex-row items-center gap-1`,e),...n})}function c({...e}){return(0,r.jsx)(`li`,{"data-slot":`pagination-item`,...e})}function l({className:e,isActive:i,size:a=`icon`,children:o,...s}){return(0,r.jsx)(`a`,{"aria-current":i?`page`:void 0,"data-slot":`pagination-link`,"data-active":i,className:t.cn(n.buttonVariants({variant:i?`outline`:`ghost`,size:a}),e),...s,children:o})}function u({className:e,...n}){return(0,r.jsxs)(l,{"aria-label":`Go to previous page`,size:`default`,className:t.cn(`gap-1 px-2.5 sm:pl-2.5`,e),...n,children:[(0,r.jsx)(i.ChevronLeftIcon,{}),(0,r.jsx)(`span`,{className:`hidden sm:block`,children:`Previous`})]})}function d({className:e,...n}){return(0,r.jsxs)(l,{"aria-label":`Go to next page`,size:`default`,className:t.cn(`gap-1 px-2.5 sm:pr-2.5`,e),...n,children:[(0,r.jsx)(`span`,{className:`hidden sm:block`,children:`Next`}),(0,r.jsx)(i.ChevronRightIcon,{})]})}function f({className:e,...n}){return(0,r.jsxs)(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:t.cn(`flex size-9 items-center justify-center`,e),...n,children:[(0,r.jsx)(i.MoreHorizontalIcon,{className:`size-4`}),(0,r.jsx)(`span`,{className:`sr-only`,children:`More pages`})]})}exports.Pagination=o,exports.PaginationContent=s,exports.PaginationEllipsis=f,exports.PaginationItem=c,exports.PaginationLink=l,exports.PaginationNext=d,exports.PaginationPrevious=u;
|
|
2
|
+
//# sourceMappingURL=pagination.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.cjs","sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"
|
|
1
|
+
{"version":3,"file":"pagination.cjs","names":[],"sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"mappings":"8QAMA,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAA,CACC,KAAK,aACL,aAAW,aACX,YAAU,aACV,UAAW,EAAA,GAAG,qCAAsC,EAAU,CAC9D,GAAI,GACJ,CAIN,SAAS,EAAkB,CAAE,YAAW,GAAG,GAAqC,CAC9E,OAAO,EAAA,EAAA,KAAC,KAAA,CAAG,YAAU,qBAAqB,UAAW,EAAA,GAAG,mCAAoC,EAAU,CAAE,GAAI,GAAS,CAGvH,SAAS,EAAe,CAAE,GAAG,GAAqC,CAChE,OAAO,EAAA,EAAA,KAAC,KAAA,CAAG,YAAU,kBAAkB,GAAI,GAAS,CAQtD,SAAS,EAAe,CAAE,YAAW,WAAU,OAAO,OAAQ,WAAU,GAAG,GAA8B,CACvG,OACE,EAAA,EAAA,KAAC,IAAA,CACC,eAAc,EAAW,OAAS,IAAA,GAClC,YAAU,kBACV,cAAa,EACb,UAAW,EAAA,GACT,EAAA,eAAe,CACb,QAAS,EAAW,UAAY,QAChC,OACD,CAAC,CACF,EACD,CACD,GAAI,EAEH,YACC,CAIR,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAsD,CAChG,OACE,EAAA,EAAA,MAAC,EAAA,CACC,aAAW,sBACX,KAAK,UACL,UAAW,EAAA,GAAG,yBAA0B,EAAU,CAClD,GAAI,aAEJ,EAAA,EAAA,KAAC,EAAA,gBAAA,EAAA,CAAkB,EACnB,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,2BAAkB,YAAe,CAAA,EAClC,CAIrB,SAAS,EAAe,CAAE,YAAW,GAAG,GAAsD,CAC5F,OACE,EAAA,EAAA,MAAC,EAAA,CACC,aAAW,kBACX,KAAK,UACL,UAAW,EAAA,GAAG,yBAA0B,EAAU,CAClD,GAAI,aAEJ,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,2BAAkB,QAAW,EAC7C,EAAA,EAAA,KAAC,EAAA,iBAAA,EAAA,CAAmB,CAAA,EACL,CAIrB,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAuC,CACjF,OACE,EAAA,EAAA,MAAC,OAAA,CACC,cAAA,GACA,YAAU,sBACV,UAAW,EAAA,GAAG,0CAA2C,EAAU,CACnE,GAAI,aAEJ,EAAA,EAAA,KAAC,EAAA,mBAAA,CAAmB,UAAU,SAAA,CAAW,EACzC,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,mBAAU,cAAiB,CAAA,EACtC"}
|
|
@@ -1,97 +1,79 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { buttonVariants } from "./button.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
2
5
|
import "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"aria-label": "pagination",
|
|
12
|
-
"data-slot": "pagination",
|
|
13
|
-
className: t("mx-auto flex w-full justify-center", a),
|
|
14
|
-
...n
|
|
15
|
-
}
|
|
16
|
-
);
|
|
6
|
+
function Pagination({ className: c, ...l }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
8
|
+
role: "navigation",
|
|
9
|
+
"aria-label": "pagination",
|
|
10
|
+
"data-slot": "pagination",
|
|
11
|
+
className: cn("mx-auto flex w-full justify-center", c),
|
|
12
|
+
...l
|
|
13
|
+
});
|
|
17
14
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
15
|
+
function PaginationContent({ className: c, ...l }) {
|
|
16
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
17
|
+
"data-slot": "pagination-content",
|
|
18
|
+
className: cn("flex flex-row items-center gap-1", c),
|
|
19
|
+
...l
|
|
20
|
+
});
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
22
|
+
function PaginationItem({ ...e }) {
|
|
23
|
+
return /* @__PURE__ */ jsx("li", {
|
|
24
|
+
"data-slot": "pagination-item",
|
|
25
|
+
...e
|
|
26
|
+
});
|
|
23
27
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
a
|
|
37
|
-
),
|
|
38
|
-
...l,
|
|
39
|
-
children: s
|
|
40
|
-
}
|
|
41
|
-
);
|
|
28
|
+
function PaginationLink({ className: l, isActive: u, size: d = "icon", children: f, ...p }) {
|
|
29
|
+
return /* @__PURE__ */ jsx("a", {
|
|
30
|
+
"aria-current": u ? "page" : void 0,
|
|
31
|
+
"data-slot": "pagination-link",
|
|
32
|
+
"data-active": u,
|
|
33
|
+
className: cn(buttonVariants({
|
|
34
|
+
variant: u ? "outline" : "ghost",
|
|
35
|
+
size: d
|
|
36
|
+
}), l),
|
|
37
|
+
...p,
|
|
38
|
+
children: f
|
|
39
|
+
});
|
|
42
40
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
);
|
|
41
|
+
function PaginationPrevious({ className: c, ...d }) {
|
|
42
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
43
|
+
"aria-label": "Go to previous page",
|
|
44
|
+
size: "default",
|
|
45
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", c),
|
|
46
|
+
...d,
|
|
47
|
+
children: [/* @__PURE__ */ jsx(ChevronLeftIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
48
|
+
className: "hidden sm:block",
|
|
49
|
+
children: "Previous"
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
57
52
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
);
|
|
53
|
+
function PaginationNext({ className: c, ...u }) {
|
|
54
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
55
|
+
"aria-label": "Go to next page",
|
|
56
|
+
size: "default",
|
|
57
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", c),
|
|
58
|
+
...u,
|
|
59
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
60
|
+
className: "hidden sm:block",
|
|
61
|
+
children: "Next"
|
|
62
|
+
}), /* @__PURE__ */ jsx(ChevronRightIcon, {})]
|
|
63
|
+
});
|
|
72
64
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
]
|
|
85
|
-
}
|
|
86
|
-
);
|
|
65
|
+
function PaginationEllipsis({ className: c, ...u }) {
|
|
66
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
67
|
+
"aria-hidden": !0,
|
|
68
|
+
"data-slot": "pagination-ellipsis",
|
|
69
|
+
className: cn("flex size-9 items-center justify-center", c),
|
|
70
|
+
...u,
|
|
71
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: "sr-only",
|
|
73
|
+
children: "More pages"
|
|
74
|
+
})]
|
|
75
|
+
});
|
|
87
76
|
}
|
|
88
|
-
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
j as PaginationEllipsis,
|
|
92
|
-
v as PaginationItem,
|
|
93
|
-
o as PaginationLink,
|
|
94
|
-
z as PaginationNext,
|
|
95
|
-
b as PaginationPrevious
|
|
96
|
-
};
|
|
97
|
-
//# sourceMappingURL=pagination.js.map
|
|
77
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"
|
|
1
|
+
{"version":3,"file":"pagination.js","names":[],"sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"mappings":";;;;;AAMA,SAAS,WAAW,EAAE,cAAW,GAAG,KAAsC;AACxE,QACE,oBAAC,OAAA;EACC,MAAK;EACL,cAAW;EACX,aAAU;EACV,WAAW,GAAG,sCAAsC,EAAU;EAC9D,GAAI;GACJ;;AAIN,SAAS,kBAAkB,EAAE,cAAW,GAAG,KAAqC;AAC9E,QAAO,oBAAC,MAAA;EAAG,aAAU;EAAqB,WAAW,GAAG,oCAAoC,EAAU;EAAE,GAAI;GAAS;;AAGvH,SAAS,eAAe,EAAE,GAAG,KAAqC;AAChE,QAAO,oBAAC,MAAA;EAAG,aAAU;EAAkB,GAAI;GAAS;;AAQtD,SAAS,eAAe,EAAE,cAAW,aAAU,UAAO,QAAQ,aAAU,GAAG,KAA8B;AACvG,QACE,oBAAC,KAAA;EACC,gBAAc,IAAW,SAAS,KAAA;EAClC,aAAU;EACV,eAAa;EACb,WAAW,GACT,eAAe;GACb,SAAS,IAAW,YAAY;GAChC;GACD,CAAC,EACF,EACD;EACD,GAAI;EAEH;GACC;;AAIR,SAAS,mBAAmB,EAAE,cAAW,GAAG,KAAsD;AAChG,QACE,qBAAC,gBAAA;EACC,cAAW;EACX,MAAK;EACL,WAAW,GAAG,0BAA0B,EAAU;EAClD,GAAI;aAEJ,oBAAC,iBAAA,EAAA,CAAkB,EACnB,oBAAC,QAAA;GAAK,WAAU;aAAkB;IAAe,CAAA;GAClC;;AAIrB,SAAS,eAAe,EAAE,cAAW,GAAG,KAAsD;AAC5F,QACE,qBAAC,gBAAA;EACC,cAAW;EACX,MAAK;EACL,WAAW,GAAG,0BAA0B,EAAU;EAClD,GAAI;aAEJ,oBAAC,QAAA;GAAK,WAAU;aAAkB;IAAW,EAC7C,oBAAC,kBAAA,EAAA,CAAmB,CAAA;GACL;;AAIrB,SAAS,mBAAmB,EAAE,cAAW,GAAG,KAAuC;AACjF,QACE,qBAAC,QAAA;EACC,eAAA;EACA,aAAU;EACV,WAAW,GAAG,2CAA2C,EAAU;EACnE,GAAI;aAEJ,oBAAC,oBAAA,EAAmB,WAAU,UAAA,CAAW,EACzC,oBAAC,QAAA;GAAK,WAAU;aAAU;IAAiB,CAAA;GACtC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use
|
|
2
|
-
//# sourceMappingURL=popover.cjs.map
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-popover`);r=e.__toESM(r);function i({...e}){return(0,n.jsx)(r.Root,{"data-slot":`popover`,...e})}function a({...e}){return(0,n.jsx)(r.Trigger,{"data-slot":`popover-trigger`,...e})}function o({className:e,align:i=`center`,sideOffset:a=4,...o}){return(0,n.jsx)(r.Portal,{children:(0,n.jsx)(r.Content,{"data-slot":`popover-content`,align:i,sideOffset:a,className:t.cn(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...o})})}function s({...e}){return(0,n.jsx)(r.Anchor,{"data-slot":`popover-anchor`,...e})}var c=r.Close;exports.Popover=i,exports.PopoverAnchor=s,exports.PopoverClose=c,exports.PopoverContent=o,exports.PopoverTrigger=a;
|
|
2
|
+
//# sourceMappingURL=popover.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.cjs","sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"
|
|
1
|
+
{"version":3,"file":"popover.cjs","names":[],"sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"mappings":"yPAMA,SAAS,EAAQ,CAAE,GAAG,GAA6D,CACjF,OAAO,EAAA,EAAA,KAAC,EAAiB,KAAA,CAAK,YAAU,UAAU,GAAI,GAAS,CAGjE,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAAA,EAAA,KAAC,EAAiB,QAAA,CAAQ,YAAU,kBAAkB,GAAI,GAAS,CAG5E,SAAS,EAAe,CACtB,YACA,QAAQ,SACR,aAAa,EACb,GAAG,GACqD,CACxD,OACE,EAAA,EAAA,KAAC,EAAiB,OAAA,CAAA,UAChB,EAAA,EAAA,KAAC,EAAiB,QAAA,CAChB,YAAU,kBACH,QACK,aACZ,UAAW,EAAA,GACT,ieACA,EACD,CACD,GAAI,GACJ,CAAA,CACsB,CAI9B,SAAS,EAAc,CAAE,GAAG,GAA+D,CACzF,OAAO,EAAA,EAAA,KAAC,EAAiB,OAAA,CAAO,YAAU,iBAAiB,GAAI,GAAS,CAG1E,IAAM,EAAe,EAAiB"}
|
package/dist/elements/popover.js
CHANGED
|
@@ -1,41 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
+
function Popover({ ...e }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, {
|
|
7
|
+
"data-slot": "popover",
|
|
8
|
+
...e
|
|
9
|
+
});
|
|
6
10
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
11
|
+
function PopoverTrigger({ ...e }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
|
|
13
|
+
"data-slot": "popover-trigger",
|
|
14
|
+
...e
|
|
15
|
+
});
|
|
9
16
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
"data-slot": "popover-content",
|
|
20
|
-
align: r,
|
|
21
|
-
sideOffset: a,
|
|
22
|
-
className: i(
|
|
23
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
24
|
-
o
|
|
25
|
-
),
|
|
26
|
-
...n
|
|
27
|
-
}
|
|
28
|
-
) });
|
|
17
|
+
function PopoverContent({ className: i, align: a = "center", sideOffset: o = 4, ...s }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
|
|
19
|
+
"data-slot": "popover-content",
|
|
20
|
+
align: a,
|
|
21
|
+
sideOffset: o,
|
|
22
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", i),
|
|
23
|
+
...s
|
|
24
|
+
}) });
|
|
29
25
|
}
|
|
30
|
-
function
|
|
31
|
-
|
|
26
|
+
function PopoverAnchor({ ...e }) {
|
|
27
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, {
|
|
28
|
+
"data-slot": "popover-anchor",
|
|
29
|
+
...e
|
|
30
|
+
});
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
f as PopoverClose,
|
|
38
|
-
l as PopoverContent,
|
|
39
|
-
m as PopoverTrigger
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=popover.js.map
|
|
32
|
+
var PopoverClose = PopoverPrimitive.Close;
|
|
33
|
+
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"
|
|
1
|
+
{"version":3,"file":"popover.js","names":[],"sources":["../../src/elements/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/lib/utils';\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nconst PopoverClose = PopoverPrimitive.Close;\n\nexport { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };\n"],"mappings":";;;;AAMA,SAAS,QAAQ,EAAE,GAAG,KAA6D;AACjF,QAAO,oBAAC,iBAAiB,MAAA;EAAK,aAAU;EAAU,GAAI;GAAS;;AAGjE,SAAS,eAAe,EAAE,GAAG,KAAgE;AAC3F,QAAO,oBAAC,iBAAiB,SAAA;EAAQ,aAAU;EAAkB,GAAI;GAAS;;AAG5E,SAAS,eAAe,EACtB,cACA,WAAQ,UACR,gBAAa,GACb,GAAG,KACqD;AACxD,QACE,oBAAC,iBAAiB,QAAA,EAAA,UAChB,oBAAC,iBAAiB,SAAA;EAChB,aAAU;EACH;EACK;EACZ,WAAW,GACT,keACA,EACD;EACD,GAAI;GACJ,EAAA,CACsB;;AAI9B,SAAS,cAAc,EAAE,GAAG,KAA+D;AACzF,QAAO,oBAAC,iBAAiB,QAAA;EAAO,aAAU;EAAiB,GAAI;GAAS;;AAG1E,IAAM,eAAe,iBAAiB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=search-box.cjs.map
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`),n=require(`./input.cjs`);let r=require(`react/jsx-runtime`),i=require(`lucide-react`),a=require(`react`);var o=(0,a.forwardRef)(({className:e,containerClassName:a,placeholder:o=``,...s},c)=>{let{disabled:l}=s;return(0,r.jsxs)(`div`,{className:t.cn(`relative w-full max-w-sm`,a),children:[(0,r.jsx)(i.Search,{"aria-hidden":!0,className:t.cn(`pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`,l&&`opacity-50`)}),(0,r.jsx)(n.Input,{ref:c,type:`search`,placeholder:o,className:t.cn(`pl-9`,e),...s})]})});o.displayName=`SearchBox`,exports.SearchBox=o;
|
|
2
|
+
//# sourceMappingURL=search-box.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-box.cjs","sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"
|
|
1
|
+
{"version":3,"file":"search-box.cjs","names":[],"sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"mappings":"8PAeA,IAAM,GAAA,EAAA,EAAA,aACH,CAAE,YAAW,qBAAoB,cAAc,GAAI,GAAG,GAAS,IAAQ,CACtE,GAAM,CAAE,YAAa,EAErB,OACE,EAAA,EAAA,MAAC,MAAA,CAAI,UAAW,EAAA,GAAG,2BAA4B,EAAmB,YAChE,EAAA,EAAA,KAAC,EAAA,OAAA,CACC,cAAA,GACA,UAAW,EAAA,GACT,6FACA,GAAY,aACb,EACD,EACF,EAAA,EAAA,KAAC,EAAA,MAAA,CAAW,MAAK,KAAK,SAAsB,cAAa,UAAW,EAAA,GAAG,OAAQ,EAAU,CAAE,GAAI,GAAS,CAAA,EACpG,EAGX,CAED,EAAU,YAAc"}
|