@jsenv/navi 0.26.17 → 0.26.19
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/jsenv_navi.js +35 -32
- package/dist/jsenv_navi.js.map +4 -4
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -29293,6 +29293,7 @@ const InputTextualUI = props => {
|
|
|
29293
29293
|
autoFocusVisible,
|
|
29294
29294
|
autoSelect,
|
|
29295
29295
|
basePseudoState,
|
|
29296
|
+
icon,
|
|
29296
29297
|
children,
|
|
29297
29298
|
...rest
|
|
29298
29299
|
} = props;
|
|
@@ -29361,44 +29362,46 @@ const InputTextualUI = props => {
|
|
|
29361
29362
|
};
|
|
29362
29363
|
const renderInputMemoized = useCallback(renderInput, [type, uiState, innerValue, innerId, autoFocus]);
|
|
29363
29364
|
let innerChildren;
|
|
29364
|
-
if (children) {
|
|
29365
|
-
|
|
29366
|
-
|
|
29367
|
-
|
|
29368
|
-
|
|
29365
|
+
if (children === undefined) {
|
|
29366
|
+
if (type === "search") {
|
|
29367
|
+
innerChildren = jsxs(Fragment, {
|
|
29368
|
+
children: [icon === undefined && jsx(InputLeftSlot, {
|
|
29369
|
+
children: jsx(Icon, {
|
|
29370
|
+
color: "rgba(28, 43, 52, 0.5)",
|
|
29371
|
+
children: jsx(SearchSvg, {})
|
|
29372
|
+
})
|
|
29373
|
+
}), jsx(InputRightSlot, {
|
|
29374
|
+
hideWhileEmpty: true,
|
|
29375
|
+
onClick: () => {
|
|
29376
|
+
uiStateController.setUIState("", {
|
|
29377
|
+
trigger: "cancel_button"
|
|
29378
|
+
});
|
|
29379
|
+
ref.current.value = "";
|
|
29380
|
+
ref.current.dispatchEvent(new Event("navi_delete_content"));
|
|
29381
|
+
},
|
|
29382
|
+
children: jsx(Icon, {
|
|
29383
|
+
color: "rgba(28, 43, 52, 0.5)",
|
|
29384
|
+
children: jsx(CloseSvg, {})
|
|
29385
|
+
})
|
|
29386
|
+
})]
|
|
29387
|
+
});
|
|
29388
|
+
} else if (type === "email") {
|
|
29389
|
+
innerChildren = icon === undefined && jsx(InputLeftSlot, {
|
|
29369
29390
|
children: jsx(Icon, {
|
|
29370
29391
|
color: "rgba(28, 43, 52, 0.5)",
|
|
29371
|
-
children: jsx(
|
|
29392
|
+
children: jsx(EmailSvg, {})
|
|
29372
29393
|
})
|
|
29373
|
-
})
|
|
29374
|
-
|
|
29375
|
-
|
|
29376
|
-
uiStateController.setUIState("", {
|
|
29377
|
-
trigger: "cancel_button"
|
|
29378
|
-
});
|
|
29379
|
-
ref.current.value = "";
|
|
29380
|
-
ref.current.dispatchEvent(new Event("navi_delete_content"));
|
|
29381
|
-
},
|
|
29394
|
+
});
|
|
29395
|
+
} else if (type === "tel") {
|
|
29396
|
+
innerChildren = icon === undefined && jsx(InputLeftSlot, {
|
|
29382
29397
|
children: jsx(Icon, {
|
|
29383
29398
|
color: "rgba(28, 43, 52, 0.5)",
|
|
29384
|
-
children: jsx(
|
|
29399
|
+
children: jsx(PhoneSvg, {})
|
|
29385
29400
|
})
|
|
29386
|
-
})
|
|
29387
|
-
}
|
|
29388
|
-
} else
|
|
29389
|
-
innerChildren =
|
|
29390
|
-
children: jsx(Icon, {
|
|
29391
|
-
color: "rgba(28, 43, 52, 0.5)",
|
|
29392
|
-
children: jsx(EmailSvg, {})
|
|
29393
|
-
})
|
|
29394
|
-
});
|
|
29395
|
-
} else if (type === "tel") {
|
|
29396
|
-
innerChildren = jsx(InputLeftSlot, {
|
|
29397
|
-
children: jsx(Icon, {
|
|
29398
|
-
color: "rgba(28, 43, 52, 0.5)",
|
|
29399
|
-
children: jsx(PhoneSvg, {})
|
|
29400
|
-
})
|
|
29401
|
-
});
|
|
29401
|
+
});
|
|
29402
|
+
}
|
|
29403
|
+
} else {
|
|
29404
|
+
innerChildren = children;
|
|
29402
29405
|
}
|
|
29403
29406
|
return jsxs(Box, {
|
|
29404
29407
|
as: "span",
|