najm-kit 2.11.1 → 2.11.2
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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.11.2 - 2026-08-11
|
|
4
|
+
|
|
5
|
+
- Fixed `PasswordInput` forwarding native input attributes such as generated
|
|
6
|
+
form IDs and ARIA metadata to the actual `<input>`, restoring programmatic
|
|
7
|
+
label association for assistive technology and browser automation.
|
|
8
|
+
|
|
3
9
|
## 2.11.1 - 2026-08-11
|
|
4
10
|
|
|
5
11
|
- Fixed `NajmThemeProvider` precedence so an explicit runtime `mode` overrides
|
package/dist/index.d.ts
CHANGED
|
@@ -2203,7 +2203,7 @@ interface NumberInputProps extends BaseProps {
|
|
|
2203
2203
|
icon?: InputIcon;
|
|
2204
2204
|
showIcon?: boolean;
|
|
2205
2205
|
}
|
|
2206
|
-
interface PasswordInputProps extends BaseProps {
|
|
2206
|
+
interface PasswordInputProps extends BaseProps, Omit<InputHTMLAttributes<HTMLInputElement>, "className" | "onChange" | "placeholder" | "type" | "value"> {
|
|
2207
2207
|
value: string;
|
|
2208
2208
|
onChange: (value: string) => void;
|
|
2209
2209
|
placeholder?: string;
|
package/dist/index.mjs
CHANGED
|
@@ -4349,13 +4349,13 @@ var NumberInput = ({ value, onChange, placeholder = "", icon, showIcon = true, i
|
|
|
4349
4349
|
/* @__PURE__ */ jsx(Input, { type: "number", placeholder, value: value ?? "", onChange: (ev) => onChange(Number(ev.target.value)), className: "p-0 border-0 shadow-none bg-transparent dark:bg-transparent focus-visible:ring-0 focus-visible:ring-transparent focus-visible:ring-offset-0 text-foreground placeholder:text-muted-foreground" })
|
|
4350
4350
|
] });
|
|
4351
4351
|
};
|
|
4352
|
-
var PasswordInput = ({ value, onChange, placeholder = "", icon, showIcon = true, iconColor, className = "", variant = "default", status = "default", bordered, borderColor }) => {
|
|
4352
|
+
var PasswordInput = ({ value, onChange, placeholder = "", icon, showIcon = true, iconColor, className = "", variant = "default", status = "default", bordered, borderColor, disabled = false, ...props }) => {
|
|
4353
4353
|
const [showPassword, setShowPassword] = useState(false);
|
|
4354
4354
|
const shouldDisplayIcon = Boolean(icon) && showIcon;
|
|
4355
4355
|
const iconProps = getIconColorProps(iconColor, "h-4 w-4");
|
|
4356
|
-
return /* @__PURE__ */ jsxs(BaseInput, { variant, status, bordered, borderColor, className: cn("gap-2", className), children: [
|
|
4356
|
+
return /* @__PURE__ */ jsxs(BaseInput, { variant, status, bordered, borderColor, className: cn("gap-2", className), disabled, children: [
|
|
4357
4357
|
shouldDisplayIcon && /* @__PURE__ */ jsx("span", { className: iconProps.className, style: iconProps.style, children: resolveIcon(icon) }),
|
|
4358
|
-
/* @__PURE__ */ jsx(Input, { type: showPassword ? "text" : "password", placeholder, value, onChange: (ev) => onChange(ev.target.value), className: "p-0 border-0 shadow-none bg-transparent dark:bg-transparent focus-visible:ring-0 focus-visible:ring-transparent focus-visible:ring-offset-0 text-foreground placeholder:text-muted-foreground" }),
|
|
4358
|
+
/* @__PURE__ */ jsx(Input, { type: showPassword ? "text" : "password", placeholder, value, onChange: (ev) => onChange(ev.target.value), className: "p-0 border-0 shadow-none bg-transparent dark:bg-transparent focus-visible:ring-0 focus-visible:ring-transparent focus-visible:ring-offset-0 text-foreground placeholder:text-muted-foreground", disabled, ...props }),
|
|
4359
4359
|
showPassword ? /* @__PURE__ */ jsx(Eye, { className: "absolute right-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground cursor-pointer", onClick: () => setShowPassword(false) }) : /* @__PURE__ */ jsx(EyeOff, { className: "absolute right-2 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground cursor-pointer", onClick: () => setShowPassword(true) })
|
|
4360
4360
|
] });
|
|
4361
4361
|
};
|