@strapi/design-system 2.0.0-rc.19 → 2.0.0-rc.20
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.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6006,7 +6006,7 @@ const SearchbarInput = styledComponents.styled(Input$2)`
|
|
|
6006
6006
|
${inputFocusStyle()}
|
|
6007
6007
|
`;
|
|
6008
6008
|
const Searchbar = React__namespace.forwardRef(
|
|
6009
|
-
({ name, children, value = "", onClear, clearLabel, ...props }, ref) => {
|
|
6009
|
+
({ name, children, value = "", onClear, clearLabel = "Clear", ...props }, ref) => {
|
|
6010
6010
|
const inputRef = React__namespace.useRef(null);
|
|
6011
6011
|
const isCompleting = value.length > 0;
|
|
6012
6012
|
const handleClear = (e) => {
|
|
@@ -6024,14 +6024,16 @@ const Searchbar = React__namespace.forwardRef(
|
|
|
6024
6024
|
value,
|
|
6025
6025
|
startAction: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { "aria-hidden": true }),
|
|
6026
6026
|
endAction: isCompleting ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6027
|
-
|
|
6027
|
+
IconButton,
|
|
6028
6028
|
{
|
|
6029
|
-
label: clearLabel,
|
|
6030
6029
|
onClick: handleClear,
|
|
6031
6030
|
onMouseDown: (e) => {
|
|
6032
6031
|
e.preventDefault();
|
|
6033
6032
|
},
|
|
6034
|
-
|
|
6033
|
+
label: clearLabel,
|
|
6034
|
+
size: "XS",
|
|
6035
|
+
variant: "ghost",
|
|
6036
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {})
|
|
6035
6037
|
}
|
|
6036
6038
|
) : void 0,
|
|
6037
6039
|
...props
|