@fremtind/jkl-text-input-react
Advanced tools
Comparing version 14.1.11 to 14.2.0
import { Density } from "@fremtind/jkl-core"; | ||
import type { IconProps } from "@fremtind/jkl-icons-react"; | ||
import React, { type MouseEventHandler, type ReactNode, InputHTMLAttributes, HTMLProps } from "react"; | ||
export interface Action extends Exclude<HTMLProps<HTMLButtonElement>, "disabled"> { | ||
interface ActionBaseProps extends Exclude<HTMLProps<HTMLButtonElement>, "disabled"> { | ||
icon: React.ReactElement<IconProps>; | ||
label: string; | ||
onClick: MouseEventHandler<HTMLButtonElement>; | ||
buttonRef?: React.Ref<HTMLButtonElement>; | ||
} | ||
export interface ActionButton extends ActionBaseProps { | ||
type?: HTMLButtonElement["type"]; | ||
onClick: MouseEventHandler<HTMLButtonElement>; | ||
} | ||
export interface ActionSubmit extends ActionBaseProps { | ||
type: "submit"; | ||
onClick?: MouseEventHandler<HTMLButtonElement>; | ||
} | ||
export type Action = ActionButton | ActionSubmit; | ||
export interface BaseTextInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "children"> { | ||
@@ -26,1 +34,2 @@ /** | ||
export declare const BaseTextInput: React.ForwardRefExoticComponent<BaseTextInputProps & React.RefAttributes<HTMLInputElement>>; | ||
export {}; |
@@ -92,3 +92,4 @@ "use strict"; | ||
onBlur: action.onBlur, | ||
ref: action.buttonRef | ||
ref: action.buttonRef, | ||
type: action.type | ||
}, | ||
@@ -95,0 +96,0 @@ action.icon |
@@ -61,3 +61,4 @@ import { IconButton } from "@fremtind/jkl-icon-button-react"; | ||
onBlur: action.onBlur, | ||
ref: action.buttonRef | ||
ref: action.buttonRef, | ||
type: action.type | ||
}, | ||
@@ -64,0 +65,0 @@ action.icon |
{ | ||
"name": "@fremtind/jkl-text-input-react", | ||
"version": "14.1.11", | ||
"version": "14.2.0", | ||
"publishConfig": { | ||
@@ -69,3 +69,3 @@ "access": "public" | ||
}, | ||
"gitHead": "eb8f4db72914c10d77103650c74b28c2e1d606c3" | ||
"gitHead": "f16a80ddc9fbd81024c4b909df8635bd2eaa6fd8" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129409
1575