shadcn-zod-formkit 3.9.6 → 3.10.1
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/index.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +1 -1
- package/dist/shadcn-zod-formkit-3.10.1.tgz +0 -0
- package/package.json +1 -1
- package/dist/shadcn-zod-formkit-3.9.6.tgz +0 -0
package/dist/index.cjs
CHANGED
|
@@ -12124,7 +12124,8 @@ var useKeyboardStore = zustand.create((set, get) => ({
|
|
|
12124
12124
|
children: void 0,
|
|
12125
12125
|
value: "",
|
|
12126
12126
|
currentInputField: null,
|
|
12127
|
-
isInputRequired: false
|
|
12127
|
+
isInputRequired: false,
|
|
12128
|
+
onEnter: void 0
|
|
12128
12129
|
});
|
|
12129
12130
|
}
|
|
12130
12131
|
},
|
|
@@ -13005,7 +13006,7 @@ var KeyboardQwerty = ({ onKeyPress, onEnter, keyFontSize = "text-2xl", onDelete,
|
|
|
13005
13006
|
const [mode, setMode] = React3.useState("letters");
|
|
13006
13007
|
const lastShiftPress = React3.useRef(0);
|
|
13007
13008
|
const { currentInputField, write, setIsOpen, backspace, isInputRequired, value } = useKeyboardStore();
|
|
13008
|
-
const
|
|
13009
|
+
const storeOnEnter = useKeyboardStore((state) => state.onEnter);
|
|
13009
13010
|
const isUpper = shiftMode !== "off";
|
|
13010
13011
|
React3.useEffect(() => {
|
|
13011
13012
|
const handleKeyDown = (e) => {
|
|
@@ -13016,9 +13017,9 @@ var KeyboardQwerty = ({ onKeyPress, onEnter, keyFontSize = "text-2xl", onDelete,
|
|
|
13016
13017
|
if (isInputRequired && !currentInputField) return;
|
|
13017
13018
|
const key = e.key;
|
|
13018
13019
|
if (key === "Enter") {
|
|
13019
|
-
|
|
13020
|
+
storeOnEnter?.();
|
|
13020
13021
|
onEnter?.();
|
|
13021
|
-
|
|
13022
|
+
e.preventDefault();
|
|
13022
13023
|
return;
|
|
13023
13024
|
}
|
|
13024
13025
|
if (key === "Backspace") {
|
|
@@ -13871,7 +13872,7 @@ var FieldTimeInput = ({ form, input, isSubmitting }) => {
|
|
|
13871
13872
|
}
|
|
13872
13873
|
)
|
|
13873
13874
|
] }) }) }),
|
|
13874
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13875
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: !input.disableCalendarPop && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13875
13876
|
Calendar,
|
|
13876
13877
|
{
|
|
13877
13878
|
mode: "single",
|
|
@@ -14269,6 +14270,7 @@ var CustomInputGroup = ({
|
|
|
14269
14270
|
autoCapitalize = "none"
|
|
14270
14271
|
}) => {
|
|
14271
14272
|
const withKeyboard = input.withKeyboard;
|
|
14273
|
+
const withKeyboardFocus = input.withKeyboardFocus;
|
|
14272
14274
|
const groupConfig = input.inputGroupConfig;
|
|
14273
14275
|
const infoTooltip = input?.infoTooltip;
|
|
14274
14276
|
const autoValidate = groupConfig?.autoValidIcons ?? input.zodType ? true : false;
|
|
@@ -14344,7 +14346,7 @@ var CustomInputGroup = ({
|
|
|
14344
14346
|
disabled: input.disabled || isSubmitting,
|
|
14345
14347
|
onBlur: field?.onBlur,
|
|
14346
14348
|
onFocus: () => {
|
|
14347
|
-
if (withKeyboard) setCurrentInputField({ input, field });
|
|
14349
|
+
if (withKeyboard || withKeyboardFocus) setCurrentInputField({ input, field });
|
|
14348
14350
|
},
|
|
14349
14351
|
name: field?.name,
|
|
14350
14352
|
ref: field?.ref,
|