@gv-tech/design-system 2.23.2 → 2.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/design-system.css +1 -1
- package/dist/form.cjs.map +1 -1
- package/dist/form.mjs.map +1 -1
- package/dist/packages/ui-core/src/contracts/accordion.d.ts +1 -1
- package/dist/packages/ui-core/src/contracts/alert-dialog.d.ts +3 -3
- package/dist/packages/ui-core/src/contracts/alert.d.ts +1 -1
- package/dist/packages/ui-core/src/contracts/button.d.ts +1 -1
- package/dist/packages/ui-core/src/contracts/carousel.d.ts +6 -4
- package/dist/packages/ui-core/src/contracts/collapsible.d.ts +1 -1
- package/dist/packages/ui-core/src/contracts/context-menu.d.ts +26 -21
- package/dist/packages/ui-core/src/contracts/drawer.d.ts +4 -2
- package/dist/packages/ui-core/src/contracts/dropdown-menu.d.ts +4 -2
- package/dist/packages/ui-core/src/contracts/hover-card.d.ts +2 -1
- package/dist/packages/ui-core/src/contracts/menubar.d.ts +1 -1
- package/dist/packages/ui-core/src/contracts/pagination.d.ts +1 -1
- package/dist/packages/ui-core/src/contracts/popover.d.ts +1 -1
- package/dist/packages/ui-core/src/contracts/resizable.d.ts +5 -5
- package/dist/packages/ui-core/src/contracts/select.d.ts +3 -3
- package/dist/packages/ui-core/src/contracts/sheet.d.ts +2 -2
- package/dist/packages/ui-core/src/contracts/tooltip.d.ts +1 -1
- package/dist/packages/ui-web/src/__contracts.d.ts +1 -0
- package/dist/packages/ui-web/src/button.d.ts +1 -1
- package/dist/packages/ui-web/src/form.d.ts +1 -1
- package/dist/packages/ui-web/src/input-group.d.ts +1 -1
- package/dist/packages/ui-web/src/item.d.ts +1 -1
- package/dist/toast.cjs.map +1 -1
- package/dist/toast.mjs.map +1 -1
- package/dist/vendor-B6CFfDyk.mjs.map +1 -1
- package/package.json +3 -1
package/dist/form.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.cjs","names":[],"sources":["../packages/ui-web/src/form.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport * as React from 'react';\nimport {\n Controller,\n FormProvider,\n useFormContext,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form';\n\nimport {\n FormControlBaseProps,\n FormDescriptionBaseProps,\n FormItemBaseProps,\n FormLabelBaseProps,\n FormMessageBaseProps,\n} from '@gv-tech/ui-core';\nimport { Label } from './label';\nimport { cn } from './lib/utils';\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 = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n if (!itemContext) {\n throw new Error('useFormField should be used within <FormItem>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\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\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & FormItemBaseProps>(\n ({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n },\n);\nFormItem.displayName = 'FormItem';\n\nconst FormLabel = React.forwardRef<\n React.
|
|
1
|
+
{"version":3,"file":"form.cjs","names":[],"sources":["../packages/ui-web/src/form.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport * as React from 'react';\nimport {\n Controller,\n FormProvider,\n useFormContext,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form';\n\nimport {\n FormControlBaseProps,\n FormDescriptionBaseProps,\n FormItemBaseProps,\n FormLabelBaseProps,\n FormMessageBaseProps,\n} from '@gv-tech/ui-core';\nimport { Label } from './label';\nimport { cn } from './lib/utils';\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 = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n if (!itemContext) {\n throw new Error('useFormField should be used within <FormItem>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\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\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & FormItemBaseProps>(\n ({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n },\n);\nFormItem.displayName = 'FormItem';\n\nconst FormLabel = React.forwardRef<\n React.ComponentRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & FormLabelBaseProps\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && 'text-destructive', className)} htmlFor={formItemId} {...props} />;\n});\nFormLabel.displayName = 'FormLabel';\n\nconst FormControl = React.forwardRef<\n React.ComponentRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot> & FormControlBaseProps\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n );\n});\nFormControl.displayName = 'FormControl';\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement> & FormDescriptionBaseProps\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p ref={ref} id={formDescriptionId} className={cn('text-muted-foreground text-[0.8rem]', className)} {...props} />\n );\n});\nFormDescription.displayName = 'FormDescription';\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement> & FormMessageBaseProps\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn('text-destructive text-[0.8rem] font-medium', className)} {...props}>\n {body}\n </p>\n );\n});\nFormMessage.displayName = 'FormMessage';\n\nexport { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };\nexport type {\n FormControlBaseProps as FormControlProps,\n FormDescriptionBaseProps as FormDescriptionProps,\n FormItemBaseProps as FormItemProps,\n FormLabelBaseProps as FormLabelProps,\n FormMessageBaseProps as FormMessageProps,\n};\n"],"mappings":"wRAwBM,EAAO,EAAA,EASP,EAAmB,EAAM,cAA4C,IAAI,EAEzE,GAGJ,CACA,GAAG,MAGD,EAAA,EAAA,KAAC,EAAiB,SAAlB,CAA2B,MAAO,CAAE,KAAM,EAAM,IAAK,YACnD,EAAA,EAAA,KAAC,EAAA,EAAD,CAAY,GAAI,CAAQ,CAAA,CACC,CAAA,EAIzB,MAAqB,CACzB,IAAM,EAAe,EAAM,WAAW,CAAgB,EAChD,EAAc,EAAM,WAAW,CAAe,EAC9C,CAAE,gBAAe,aAAc,EAAA,EAAe,EAEpD,GAAI,CAAC,EACH,MAAU,MAAM,gDAAgD,EAGlE,GAAI,CAAC,EACH,MAAU,MAAM,+CAA+C,EAGjE,IAAM,EAAa,EAAc,EAAa,KAAM,CAAS,EAEvD,CAAE,MAAO,EAEf,MAAO,CACL,KACA,KAAM,EAAa,KACnB,WAAY,GAAG,EAAG,YAClB,kBAAmB,GAAG,EAAG,wBACzB,cAAe,GAAG,EAAG,oBACrB,GAAG,CACL,CACF,EAMM,EAAkB,EAAM,cAA2C,IAAI,EAEvE,EAAW,EAAM,YACpB,CAAE,YAAW,GAAG,GAAS,IAAQ,CAChC,IAAM,EAAK,EAAM,MAAM,EAEvB,OACE,EAAA,EAAA,KAAC,EAAgB,SAAjB,CAA0B,MAAO,CAAE,IAAG,YACpC,EAAA,EAAA,KAAC,MAAD,CAAU,MAAK,UAAW,EAAA,EAAG,YAAa,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC1C,CAAA,CAE9B,CACF,EACA,EAAS,YAAc,WAEvB,IAAM,EAAY,EAAM,YAGrB,CAAE,YAAW,GAAG,GAAS,IAAQ,CAClC,GAAM,CAAE,QAAO,cAAe,EAAa,EAE3C,OAAO,EAAA,EAAA,KAAC,EAAA,MAAD,CAAY,MAAK,UAAW,EAAA,EAAG,GAAS,mBAAoB,CAAS,EAAG,QAAS,EAAY,GAAI,CAAQ,CAAA,CAClH,CAAC,EACD,EAAU,YAAc,YAExB,IAAM,EAAc,EAAM,YAGvB,CAAE,GAAG,GAAS,IAAQ,CACvB,GAAM,CAAE,QAAO,aAAY,oBAAmB,iBAAkB,EAAa,EAE7E,OACE,EAAA,EAAA,KAAC,EAAA,EAAD,CACO,MACL,GAAI,EACJ,mBAAmB,EAAiC,GAAG,EAAkB,GAAG,IAAjD,GAAG,IAC9B,eAAc,CAAC,CAAC,EAChB,GAAI,CACL,CAAA,CAEL,CAAC,EACD,EAAY,YAAc,cAE1B,IAAM,EAAkB,EAAM,YAG3B,CAAE,YAAW,GAAG,GAAS,IAAQ,CAClC,GAAM,CAAE,qBAAsB,EAAa,EAE3C,OACE,EAAA,EAAA,KAAC,IAAD,CAAQ,MAAK,GAAI,EAAmB,UAAW,EAAA,EAAG,sCAAuC,CAAS,EAAG,GAAI,CAAQ,CAAA,CAErH,CAAC,EACD,EAAgB,YAAc,kBAE9B,IAAM,EAAc,EAAM,YAGvB,CAAE,YAAW,WAAU,GAAG,GAAS,IAAQ,CAC5C,GAAM,CAAE,QAAO,iBAAkB,EAAa,EACxC,EAAO,EAAQ,OAAO,GAAO,SAAW,EAAE,EAAI,EAMpD,OAJK,GAKH,EAAA,EAAA,KAAC,IAAD,CAAQ,MAAK,GAAI,EAAe,UAAW,EAAA,EAAG,6CAA8C,CAAS,EAAG,GAAI,WACzG,CACA,CAAA,EANI,IAQX,CAAC,EACD,EAAY,YAAc"}
|
package/dist/form.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.mjs","names":[],"sources":["../packages/ui-web/src/form.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport * as React from 'react';\nimport {\n Controller,\n FormProvider,\n useFormContext,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form';\n\nimport {\n FormControlBaseProps,\n FormDescriptionBaseProps,\n FormItemBaseProps,\n FormLabelBaseProps,\n FormMessageBaseProps,\n} from '@gv-tech/ui-core';\nimport { Label } from './label';\nimport { cn } from './lib/utils';\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 = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n if (!itemContext) {\n throw new Error('useFormField should be used within <FormItem>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\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\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & FormItemBaseProps>(\n ({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n },\n);\nFormItem.displayName = 'FormItem';\n\nconst FormLabel = React.forwardRef<\n React.
|
|
1
|
+
{"version":3,"file":"form.mjs","names":[],"sources":["../packages/ui-web/src/form.tsx"],"sourcesContent":["'use client';\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport * as React from 'react';\nimport {\n Controller,\n FormProvider,\n useFormContext,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form';\n\nimport {\n FormControlBaseProps,\n FormDescriptionBaseProps,\n FormItemBaseProps,\n FormLabelBaseProps,\n FormMessageBaseProps,\n} from '@gv-tech/ui-core';\nimport { Label } from './label';\nimport { cn } from './lib/utils';\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 = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n if (!itemContext) {\n throw new Error('useFormField should be used within <FormItem>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\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\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & FormItemBaseProps>(\n ({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n },\n);\nFormItem.displayName = 'FormItem';\n\nconst FormLabel = React.forwardRef<\n React.ComponentRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & FormLabelBaseProps\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && 'text-destructive', className)} htmlFor={formItemId} {...props} />;\n});\nFormLabel.displayName = 'FormLabel';\n\nconst FormControl = React.forwardRef<\n React.ComponentRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot> & FormControlBaseProps\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n );\n});\nFormControl.displayName = 'FormControl';\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement> & FormDescriptionBaseProps\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p ref={ref} id={formDescriptionId} className={cn('text-muted-foreground text-[0.8rem]', className)} {...props} />\n );\n});\nFormDescription.displayName = 'FormDescription';\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement> & FormMessageBaseProps\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} id={formMessageId} className={cn('text-destructive text-[0.8rem] font-medium', className)} {...props}>\n {body}\n </p>\n );\n});\nFormMessage.displayName = 'FormMessage';\n\nexport { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };\nexport type {\n FormControlBaseProps as FormControlProps,\n FormDescriptionBaseProps as FormDescriptionProps,\n FormItemBaseProps as FormItemProps,\n FormLabelBaseProps as FormLabelProps,\n FormMessageBaseProps as FormMessageProps,\n};\n"],"mappings":";;;;;;;aAwBM,IAAO,GASP,IAAmB,EAAM,cAA4C,IAAI,GAEzE,KAGJ,EACA,GAAG,QAGD,iBAAA,GAAA,EAAA,KAAC,EAAiB,UAAlB;CAA2B,OAAO,EAAE,MAAM,EAAM,KAAK;WACnD,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAY,GAAI,EAAQ,CAAA;AACC,CAAA,GAIzB,UAAqB;CACzB,IAAM,IAAe,EAAM,WAAW,CAAgB,GAChD,IAAc,EAAM,WAAW,CAAe,GAC9C,EAAE,kBAAe,iBAAc,EAAe;CAEpD,IAAI,CAAC,GACH,MAAU,MAAM,gDAAgD;CAGlE,IAAI,CAAC,GACH,MAAU,MAAM,+CAA+C;CAGjE,IAAM,IAAa,EAAc,EAAa,MAAM,CAAS,GAEvD,EAAE,UAAO;CAEf,OAAO;EACL;EACA,MAAM,EAAa;EACnB,YAAY,GAAG,EAAG;EAClB,mBAAmB,GAAG,EAAG;EACzB,eAAe,GAAG,EAAG;EACrB,GAAG;CACL;AACF,GAMM,IAAkB,EAAM,cAA2C,IAAI,GAEvE,IAAW,EAAM,YACpB,EAAE,cAAW,GAAG,KAAS,MAAQ;CAChC,IAAM,IAAK,EAAM,MAAM;CAEvB,OACE,iBAAA,GAAA,EAAA,KAAC,EAAgB,UAAjB;EAA0B,OAAO,EAAE,MAAG;YACpC,iBAAA,GAAA,EAAA,KAAC,OAAD;GAAU;GAAK,WAAW,EAAG,aAAa,CAAS;GAAG,GAAI;EAAQ,CAAA;CAC1C,CAAA;AAE9B,CACF;AACA,EAAS,cAAc;AAEvB,IAAM,IAAY,EAAM,YAGrB,EAAE,cAAW,GAAG,KAAS,MAAQ;CAClC,IAAM,EAAE,UAAO,kBAAe,EAAa;CAE3C,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAY;EAAK,WAAW,EAAG,KAAS,oBAAoB,CAAS;EAAG,SAAS;EAAY,GAAI;CAAQ,CAAA;AAClH,CAAC;AACD,EAAU,cAAc;AAExB,IAAM,IAAc,EAAM,YAGvB,EAAE,GAAG,KAAS,MAAQ;CACvB,IAAM,EAAE,UAAO,eAAY,sBAAmB,qBAAkB,EAAa;CAE7E,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACO;EACL,IAAI;EACJ,oBAAmB,IAAiC,GAAG,EAAkB,GAAG,MAAjD,GAAG;EAC9B,gBAAc,CAAC,CAAC;EAChB,GAAI;CACL,CAAA;AAEL,CAAC;AACD,EAAY,cAAc;AAE1B,IAAM,IAAkB,EAAM,YAG3B,EAAE,cAAW,GAAG,KAAS,MAAQ;CAClC,IAAM,EAAE,yBAAsB,EAAa;CAE3C,OACE,iBAAA,GAAA,EAAA,KAAC,KAAD;EAAQ;EAAK,IAAI;EAAmB,WAAW,EAAG,uCAAuC,CAAS;EAAG,GAAI;CAAQ,CAAA;AAErH,CAAC;AACD,EAAgB,cAAc;AAE9B,IAAM,IAAc,EAAM,YAGvB,EAAE,cAAW,aAAU,GAAG,KAAS,MAAQ;CAC5C,IAAM,EAAE,UAAO,qBAAkB,EAAa,GACxC,IAAO,IAAQ,OAAO,GAAO,WAAW,EAAE,IAAI;CAMpD,OAJK,IAKH,iBAAA,GAAA,EAAA,KAAC,KAAD;EAAQ;EAAK,IAAI;EAAe,WAAW,EAAG,8CAA8C,CAAS;EAAG,GAAI;YACzG;CACA,CAAA,IANI;AAQX,CAAC;AACD,EAAY,cAAc"}
|
|
@@ -11,7 +11,7 @@ export interface AccordionItemBaseProps {
|
|
|
11
11
|
}
|
|
12
12
|
export interface AccordionTriggerBaseProps {
|
|
13
13
|
className?: string;
|
|
14
|
-
children?: React.ReactNode;
|
|
14
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
15
15
|
}
|
|
16
16
|
export interface AccordionContentBaseProps {
|
|
17
17
|
className?: string;
|
|
@@ -26,14 +26,14 @@ export interface AlertDialogDescriptionBaseProps {
|
|
|
26
26
|
}
|
|
27
27
|
export interface AlertDialogActionBaseProps {
|
|
28
28
|
className?: string;
|
|
29
|
-
children?: React.ReactNode;
|
|
29
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
30
30
|
}
|
|
31
31
|
export interface AlertDialogCancelBaseProps {
|
|
32
32
|
className?: string;
|
|
33
|
-
children?: React.ReactNode;
|
|
33
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
34
34
|
}
|
|
35
35
|
export interface AlertDialogTriggerBaseProps {
|
|
36
36
|
className?: string;
|
|
37
|
-
children?: React.ReactNode;
|
|
37
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
38
38
|
asChild?: boolean;
|
|
39
39
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const alertVariantValues: readonly ["default", "destructive"];
|
|
2
|
+
export declare const alertVariantValues: readonly ["default", "destructive", "warning", "info"];
|
|
3
3
|
export type AlertVariant = (typeof alertVariantValues)[number] | null;
|
|
4
4
|
export interface AlertBaseProps {
|
|
5
5
|
variant?: AlertVariant;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const buttonVariantValues: readonly ["default", "destructive", "outline", "secondary", "ghost", "link"];
|
|
2
2
|
export type ButtonVariant = (typeof buttonVariantValues)[number];
|
|
3
|
-
export declare const buttonSizeValues: readonly ["default", "sm", "lg", "icon"];
|
|
3
|
+
export declare const buttonSizeValues: readonly ["default", "xs", "sm", "lg", "icon", "icon-xs", "icon-sm", "icon-lg"];
|
|
4
4
|
export type ButtonSize = (typeof buttonSizeValues)[number];
|
|
5
5
|
export interface ButtonBaseProps {
|
|
6
6
|
disabled?: boolean;
|
|
@@ -14,11 +14,13 @@ export interface CarouselItemBaseProps {
|
|
|
14
14
|
}
|
|
15
15
|
export interface CarouselPreviousBaseProps {
|
|
16
16
|
className?: string;
|
|
17
|
-
variant?: string;
|
|
18
|
-
size?: string;
|
|
17
|
+
variant?: string | null;
|
|
18
|
+
size?: string | null;
|
|
19
|
+
children?: React.ReactNode;
|
|
19
20
|
}
|
|
20
21
|
export interface CarouselNextBaseProps {
|
|
21
22
|
className?: string;
|
|
22
|
-
variant?: string;
|
|
23
|
-
size?: string;
|
|
23
|
+
variant?: string | null;
|
|
24
|
+
size?: string | null;
|
|
25
|
+
children?: React.ReactNode;
|
|
24
26
|
}
|
|
@@ -8,7 +8,7 @@ export interface CollapsibleBaseProps {
|
|
|
8
8
|
}
|
|
9
9
|
export interface CollapsibleTriggerBaseProps {
|
|
10
10
|
asChild?: boolean;
|
|
11
|
-
children?: React.ReactNode;
|
|
11
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
14
|
export interface CollapsibleContentBaseProps {
|
|
@@ -2,38 +2,45 @@ import * as React from 'react';
|
|
|
2
2
|
export interface ContextMenuBaseProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
6
|
-
|
|
5
|
+
export interface ContextMenuCheckboxItemBaseProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
checked?: boolean | 'indeterminate';
|
|
9
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
7
10
|
disabled?: boolean;
|
|
8
11
|
}
|
|
9
12
|
export interface ContextMenuContentBaseProps {
|
|
10
13
|
className?: string;
|
|
11
14
|
children?: React.ReactNode;
|
|
15
|
+
align?: 'start' | 'center' | 'end';
|
|
16
|
+
}
|
|
17
|
+
export interface ContextMenuGroupBaseProps {
|
|
18
|
+
className?: string;
|
|
19
|
+
children?: React.ReactNode;
|
|
12
20
|
}
|
|
13
21
|
export interface ContextMenuItemBaseProps {
|
|
14
22
|
className?: string;
|
|
15
23
|
children?: React.ReactNode;
|
|
16
|
-
inset?: boolean;
|
|
17
24
|
disabled?: boolean;
|
|
25
|
+
inset?: boolean;
|
|
18
26
|
onSelect?: (event: Event) => void;
|
|
19
27
|
}
|
|
20
|
-
export interface
|
|
28
|
+
export interface ContextMenuLabelBaseProps {
|
|
21
29
|
className?: string;
|
|
22
30
|
children?: React.ReactNode;
|
|
23
|
-
|
|
24
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
25
|
-
disabled?: boolean;
|
|
31
|
+
inset?: boolean;
|
|
26
32
|
}
|
|
27
|
-
export interface
|
|
33
|
+
export interface ContextMenuRadioGroupBaseProps {
|
|
28
34
|
className?: string;
|
|
29
35
|
children?: React.ReactNode;
|
|
30
|
-
value
|
|
31
|
-
|
|
36
|
+
value?: string;
|
|
37
|
+
onValueChange?: (value: string) => void;
|
|
32
38
|
}
|
|
33
|
-
export interface
|
|
39
|
+
export interface ContextMenuRadioItemBaseProps {
|
|
34
40
|
className?: string;
|
|
35
41
|
children?: React.ReactNode;
|
|
36
|
-
|
|
42
|
+
value: string;
|
|
43
|
+
disabled?: boolean;
|
|
37
44
|
}
|
|
38
45
|
export interface ContextMenuSeparatorBaseProps {
|
|
39
46
|
className?: string;
|
|
@@ -45,20 +52,18 @@ export interface ContextMenuShortcutBaseProps {
|
|
|
45
52
|
export interface ContextMenuSubBaseProps {
|
|
46
53
|
children?: React.ReactNode;
|
|
47
54
|
}
|
|
48
|
-
export interface
|
|
55
|
+
export interface ContextMenuTriggerBaseProps {
|
|
49
56
|
className?: string;
|
|
50
|
-
children?: React.ReactNode;
|
|
51
|
-
|
|
57
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
58
|
+
disabled?: boolean | null;
|
|
52
59
|
}
|
|
53
60
|
export interface ContextMenuSubContentBaseProps {
|
|
54
61
|
className?: string;
|
|
55
62
|
children?: React.ReactNode;
|
|
56
63
|
}
|
|
57
|
-
export interface
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
export interface ContextMenuRadioGroupBaseProps {
|
|
64
|
+
export interface ContextMenuSubTriggerBaseProps {
|
|
65
|
+
className?: string;
|
|
61
66
|
children?: React.ReactNode;
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
inset?: boolean;
|
|
64
69
|
}
|
|
@@ -4,7 +4,8 @@ export interface DrawerBaseProps {
|
|
|
4
4
|
shouldScaleBackground?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export interface DrawerTriggerBaseProps {
|
|
7
|
-
children: React.ReactNode;
|
|
7
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
8
|
+
asChild?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export interface DrawerContentBaseProps {
|
|
10
11
|
className?: string;
|
|
@@ -27,5 +28,6 @@ export interface DrawerDescriptionBaseProps {
|
|
|
27
28
|
children?: React.ReactNode;
|
|
28
29
|
}
|
|
29
30
|
export interface DrawerCloseBaseProps {
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
32
|
+
asChild?: boolean;
|
|
31
33
|
}
|
|
@@ -6,7 +6,8 @@ export interface DropdownMenuBaseProps {
|
|
|
6
6
|
modal?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export interface DropdownMenuTriggerBaseProps {
|
|
9
|
-
|
|
9
|
+
className?: string;
|
|
10
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
10
11
|
asChild?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export interface DropdownMenuContentBaseProps {
|
|
@@ -56,7 +57,8 @@ export interface DropdownMenuSubBaseProps {
|
|
|
56
57
|
}
|
|
57
58
|
export interface DropdownMenuSubTriggerBaseProps {
|
|
58
59
|
className?: string;
|
|
59
|
-
children?: React.ReactNode;
|
|
60
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
61
|
+
asChild?: boolean;
|
|
60
62
|
inset?: boolean;
|
|
61
63
|
}
|
|
62
64
|
export interface DropdownMenuSubContentBaseProps {
|
|
@@ -7,8 +7,9 @@ export interface HoverCardBaseProps {
|
|
|
7
7
|
closeDelay?: number;
|
|
8
8
|
}
|
|
9
9
|
export interface HoverCardTriggerBaseProps {
|
|
10
|
-
children: React.ReactNode;
|
|
10
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
11
11
|
asChild?: boolean;
|
|
12
|
+
className?: string;
|
|
12
13
|
}
|
|
13
14
|
export interface HoverCardContentBaseProps {
|
|
14
15
|
className?: string;
|
|
@@ -9,11 +9,11 @@ export interface ResizablePanelGroupBaseProps {
|
|
|
9
9
|
export interface ResizablePanelBaseProps {
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
className?: string;
|
|
12
|
-
defaultSize?: number;
|
|
13
|
-
minSize?: number;
|
|
14
|
-
maxSize?: number;
|
|
12
|
+
defaultSize?: number | string;
|
|
13
|
+
minSize?: number | string;
|
|
14
|
+
maxSize?: number | string;
|
|
15
15
|
collapsible?: boolean;
|
|
16
|
-
collapsedSize?: number;
|
|
16
|
+
collapsedSize?: number | string;
|
|
17
17
|
minPixelSize?: number;
|
|
18
18
|
maxPixelSize?: number;
|
|
19
19
|
order?: number;
|
|
@@ -21,7 +21,7 @@ export interface ResizablePanelBaseProps {
|
|
|
21
21
|
id?: string;
|
|
22
22
|
onCollapse?: () => void;
|
|
23
23
|
onExpand?: () => void;
|
|
24
|
-
onResize?: (size:
|
|
24
|
+
onResize?: (size: any, id: string | number | undefined, prevSize: any) => void;
|
|
25
25
|
}
|
|
26
26
|
export interface ResizableHandleBaseProps {
|
|
27
27
|
className?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export interface SelectBaseProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
|
-
value?:
|
|
5
|
-
defaultValue?:
|
|
6
|
-
onValueChange?: (value:
|
|
4
|
+
value?: any;
|
|
5
|
+
defaultValue?: any;
|
|
6
|
+
onValueChange?: (value: any) => void;
|
|
7
7
|
open?: boolean;
|
|
8
8
|
defaultOpen?: boolean;
|
|
9
9
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -7,12 +7,12 @@ export interface SheetBaseProps {
|
|
|
7
7
|
modal?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export interface SheetTriggerBaseProps {
|
|
10
|
-
children: React.ReactNode;
|
|
10
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
11
11
|
className?: string;
|
|
12
12
|
asChild?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface SheetCloseBaseProps {
|
|
15
|
-
children?: React.ReactNode;
|
|
15
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
16
16
|
className?: string;
|
|
17
17
|
asChild?: boolean;
|
|
18
18
|
}
|
|
@@ -12,7 +12,7 @@ export interface TooltipContentBaseProps {
|
|
|
12
12
|
avoidCollisions?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export interface TooltipTriggerBaseProps {
|
|
15
|
-
children?: React.ReactNode;
|
|
15
|
+
children?: React.ReactNode | ((state: any) => React.ReactNode);
|
|
16
16
|
asChild?: boolean;
|
|
17
17
|
className?: string;
|
|
18
18
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import { ClassProp } from 'class-variance-authority/types';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
6
|
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
7
|
-
size?: "default" | "
|
|
7
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
8
8
|
} & ClassProp) | undefined) => string;
|
|
9
9
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
10
10
|
asChild?: boolean;
|
|
@@ -19,7 +19,7 @@ declare const useFormField: () => {
|
|
|
19
19
|
};
|
|
20
20
|
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & FormItemBaseProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
21
|
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & FormLabelBaseProps & React.RefAttributes<HTMLLabelElement>>;
|
|
22
|
-
declare const FormControl: React.ForwardRefExoticComponent<Omit< SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
22
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit< SlotProps & React.RefAttributes<HTMLElement>, "ref"> & FormControlBaseProps & React.RefAttributes<HTMLElement>>;
|
|
23
23
|
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & FormDescriptionBaseProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
24
24
|
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & FormMessageBaseProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
25
25
|
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
@@ -9,7 +9,7 @@ declare const inputGroupAddonVariants: (props?: ({
|
|
|
9
9
|
} & ClassProp) | undefined) => string;
|
|
10
10
|
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants> & InputGroupAddonBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare const inputGroupButtonVariants: (props?: ({
|
|
12
|
-
size?: "
|
|
12
|
+
size?: "xs" | "sm" | "icon-xs" | "icon-sm" | null | undefined;
|
|
13
13
|
} & ClassProp) | undefined) => string;
|
|
14
14
|
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, 'size'> & VariantProps<typeof inputGroupButtonVariants> & InputGroupButtonBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
declare function InputGroupText({ className, ...props }: React.ComponentProps<'span'> & InputGroupTextBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,7 @@ declare function ItemGroup({ className, ...props }: React.ComponentProps<'div'>
|
|
|
7
7
|
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator> & ItemSeparatorBaseProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
declare const itemVariants: (props?: ({
|
|
9
9
|
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
10
|
-
size?: "default" | "
|
|
10
|
+
size?: "default" | "xs" | "sm" | null | undefined;
|
|
11
11
|
} & ClassProp) | undefined) => string;
|
|
12
12
|
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<'div'> & VariantProps<typeof itemVariants> & {
|
|
13
13
|
asChild?: boolean;
|
package/dist/toast.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.cjs","names":[],"sources":["../packages/ui-web/src/toast.tsx"],"sourcesContent":["'use client';\nimport * as ToastPrimitives from '@radix-ui/react-toast';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { X } from 'lucide-react';\nimport * as React from 'react';\n\nimport { cn } from './lib/utils';\n\nimport type { ToastBaseProps } from '@gv-tech/ui-core';\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = React.forwardRef<\n React.
|
|
1
|
+
{"version":3,"file":"toast.cjs","names":[],"sources":["../packages/ui-web/src/toast.tsx"],"sourcesContent":["'use client';\nimport * as ToastPrimitives from '@radix-ui/react-toast';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { X } from 'lucide-react';\nimport * as React from 'react';\n\nimport { cn } from './lib/utils';\n\nimport type { ToastBaseProps } from '@gv-tech/ui-core';\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n 'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]',\n className,\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport?.displayName || 'ToastViewport';\n\nconst toastVariants = cva(\n 'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full',\n {\n variants: {\n variant: {\n default: 'border bg-background text-foreground',\n destructive: 'destructive group border-destructive bg-destructive text-destructive-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nconst Toast = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> & VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return <ToastPrimitives.Root ref={ref} className={cn(toastVariants({ variant }), className)} {...props} />;\n});\nToast.displayName = ToastPrimitives.Root?.displayName || 'Toast';\n\nconst ToastAction = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n 'hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:ring-1 focus:outline-none disabled:pointer-events-none disabled:opacity-50',\n className,\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action?.displayName || 'ToastAction';\n\nconst ToastClose = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n 'text-foreground/50 hover:text-foreground absolute top-1 right-1 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-1 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',\n className,\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close?.displayName || 'ToastClose';\n\nconst ToastTitle = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title ref={ref} className={cn('text-sm font-semibold [&+div]:text-xs', className)} {...props} />\n));\nToastTitle.displayName = ToastPrimitives.Title?.displayName || 'ToastTitle';\n\nconst ToastDescription = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description ref={ref} className={cn('text-sm opacity-90', className)} {...props} />\n));\nToastDescription.displayName = ToastPrimitives.Description?.displayName || 'ToastDescription';\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\n\nexport {\n Toast,\n ToastAction,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n type ToastActionElement,\n type ToastProps,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyToastContract = React.ComponentProps<typeof Toast> extends ToastBaseProps ? true : false;\n"],"mappings":"+PAUM,EAAA,EAAA,GAEA,EAAgB,EAAM,YAGzB,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,oIACA,CACF,EACA,GAAI,CACL,CAAA,CACF,EACD,EAAc,YAAA,EAAA,IAAwC,aAAe,gBAErE,IAAM,EAAgB,EAAA,EACpB,4lBACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,uCACT,YAAa,iFACf,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CACF,EAEM,EAAQ,EAAM,YAGjB,CAAE,YAAW,UAAS,GAAG,GAAS,KAC5B,EAAA,EAAA,KAAA,EAAA,GAAA,CAA2B,MAAK,UAAW,EAAA,EAAG,EAAc,CAAE,SAAQ,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CAC1G,EACD,EAAM,YAAA,EAAA,IAAoC,aAAe,QAEzD,IAAM,EAAc,EAAM,YAGvB,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,0dACA,CACF,EACA,GAAI,CACL,CAAA,CACF,EACD,EAAY,YAAA,EAAA,IAAsC,aAAe,cAEjE,IAAM,EAAa,EAAM,YAGtB,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAA,EAAA,GAAA,CACO,MACL,UAAW,EAAA,EACT,wVACA,CACF,EACA,cAAY,GACZ,GAAI,YAEJ,EAAA,EAAA,KAAC,EAAA,EAAD,CAAG,UAAU,SAAW,CAAA,CACH,CAAA,CACxB,EACD,EAAW,YAAA,EAAA,IAAqC,aAAe,aAE/D,IAAM,EAAa,EAAM,YAGtB,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAA,EAAA,GAAA,CAA4B,MAAK,UAAW,EAAA,EAAG,wCAAyC,CAAS,EAAG,GAAI,CAAQ,CAAA,CACjH,EACD,EAAW,YAAA,EAAA,IAAqC,aAAe,aAE/D,IAAM,EAAmB,EAAM,YAG5B,CAAE,YAAW,GAAG,GAAS,KAC1B,EAAA,EAAA,KAAA,EAAA,GAAA,CAAkC,MAAK,UAAW,EAAA,EAAG,qBAAsB,CAAS,EAAG,GAAI,CAAQ,CAAA,CACpG,EACD,EAAiB,YAAA,EAAA,IAA2C,aAAe"}
|
package/dist/toast.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.mjs","names":[],"sources":["../packages/ui-web/src/toast.tsx"],"sourcesContent":["'use client';\nimport * as ToastPrimitives from '@radix-ui/react-toast';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { X } from 'lucide-react';\nimport * as React from 'react';\n\nimport { cn } from './lib/utils';\n\nimport type { ToastBaseProps } from '@gv-tech/ui-core';\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = React.forwardRef<\n React.
|
|
1
|
+
{"version":3,"file":"toast.mjs","names":[],"sources":["../packages/ui-web/src/toast.tsx"],"sourcesContent":["'use client';\nimport * as ToastPrimitives from '@radix-ui/react-toast';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { X } from 'lucide-react';\nimport * as React from 'react';\n\nimport { cn } from './lib/utils';\n\nimport type { ToastBaseProps } from '@gv-tech/ui-core';\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n 'fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:top-auto sm:right-0 sm:bottom-0 sm:flex-col md:max-w-[420px]',\n className,\n )}\n {...props}\n />\n));\nToastViewport.displayName = ToastPrimitives.Viewport?.displayName || 'ToastViewport';\n\nconst toastVariants = cva(\n 'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full',\n {\n variants: {\n variant: {\n default: 'border bg-background text-foreground',\n destructive: 'destructive group border-destructive bg-destructive text-destructive-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nconst Toast = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> & VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return <ToastPrimitives.Root ref={ref} className={cn(toastVariants({ variant }), className)} {...props} />;\n});\nToast.displayName = ToastPrimitives.Root?.displayName || 'Toast';\n\nconst ToastAction = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n 'hover:bg-secondary focus:ring-ring group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors focus:ring-1 focus:outline-none disabled:pointer-events-none disabled:opacity-50',\n className,\n )}\n {...props}\n />\n));\nToastAction.displayName = ToastPrimitives.Action?.displayName || 'ToastAction';\n\nconst ToastClose = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n 'text-foreground/50 hover:text-foreground absolute top-1 right-1 rounded-md p-1 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:ring-1 focus:outline-none group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600',\n className,\n )}\n toast-close=\"\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close?.displayName || 'ToastClose';\n\nconst ToastTitle = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title ref={ref} className={cn('text-sm font-semibold [&+div]:text-xs', className)} {...props} />\n));\nToastTitle.displayName = ToastPrimitives.Title?.displayName || 'ToastTitle';\n\nconst ToastDescription = React.forwardRef<\n React.ComponentRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description ref={ref} className={cn('text-sm opacity-90', className)} {...props} />\n));\nToastDescription.displayName = ToastPrimitives.Description?.displayName || 'ToastDescription';\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\n\nexport {\n Toast,\n ToastAction,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport,\n type ToastActionElement,\n type ToastProps,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyToastContract = React.ComponentProps<typeof Toast> extends ToastBaseProps ? true : false;\n"],"mappings":";;;;;;aAUM,IAAgB,GAEhB,IAAgB,EAAM,YAGzB,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,qIACA,CACF;CACA,GAAI;AACL,CAAA,CACF;AACD,EAAc,cAAA,GAAwC,eAAe;AAErE,IAAM,IAAgB,EACpB,6lBACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,aAAa;CACf,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF,GAEM,IAAQ,EAAM,YAGjB,EAAE,cAAW,YAAS,GAAG,KAAS,MAC5B,iBAAA,GAAA,EAAA,KAAC,GAAD;CAA2B;CAAK,WAAW,EAAG,EAAc,EAAE,WAAQ,CAAC,GAAG,CAAS;CAAG,GAAI;AAAQ,CAAA,CAC1G;AACD,EAAM,cAAA,GAAoC,eAAe;AAEzD,IAAM,IAAc,EAAM,YAGvB,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,2dACA,CACF;CACA,GAAI;AACL,CAAA,CACF;AACD,EAAY,cAAA,GAAsC,eAAe;AAEjE,IAAM,IAAa,EAAM,YAGtB,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,GAAD;CACO;CACL,WAAW,EACT,yVACA,CACF;CACA,eAAY;CACZ,GAAI;WAEJ,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAG,WAAU,UAAW,CAAA;AACH,CAAA,CACxB;AACD,EAAW,cAAA,GAAqC,eAAe;AAE/D,IAAM,IAAa,EAAM,YAGtB,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,GAAD;CAA4B;CAAK,WAAW,EAAG,yCAAyC,CAAS;CAAG,GAAI;AAAQ,CAAA,CACjH;AACD,EAAW,cAAA,GAAqC,eAAe;AAE/D,IAAM,IAAmB,EAAM,YAG5B,EAAE,cAAW,GAAG,KAAS,MAC1B,iBAAA,GAAA,EAAA,KAAC,GAAD;CAAkC;CAAK,WAAW,EAAG,sBAAsB,CAAS;CAAG,GAAI;AAAQ,CAAA,CACpG;AACD,EAAiB,cAAA,GAA2C,eAAe"}
|