@undefine-ui/design-system 3.4.2 → 3.5.0
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 +92 -97
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +93 -98
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5915,7 +5915,7 @@ var MuiTextField = {
|
|
|
5915
5915
|
maxWidth: "100%",
|
|
5916
5916
|
lineHeight: 1.153,
|
|
5917
5917
|
position: "relative",
|
|
5918
|
-
fontSize: theme.typography.h8.fontSize
|
|
5918
|
+
fontSize: `${theme.typography.h8.fontSize} !important`,
|
|
5919
5919
|
fontWeight: `${theme.typography.fontWeightMedium} !important`,
|
|
5920
5920
|
marginBottom: theme.spacing(1),
|
|
5921
5921
|
color: `${theme.vars.palette.icon.black} !important`,
|
|
@@ -9341,105 +9341,100 @@ var baseStyles3 = {
|
|
|
9341
9341
|
borderColor: "border.mute",
|
|
9342
9342
|
borderBottomWidth: "1.5px"
|
|
9343
9343
|
};
|
|
9344
|
-
var ToolbarSearchField = (
|
|
9345
|
-
placeholder = "Search",
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
...props
|
|
9353
|
-
}) => {
|
|
9354
|
-
const [isFocused, setIsFocused] = (0, import_react18.useState)(false);
|
|
9355
|
-
const hasValue = Boolean(value && String(value).length > 0);
|
|
9356
|
-
const handleFocus = (0, import_react18.useCallback)(
|
|
9357
|
-
(event) => {
|
|
9358
|
-
setIsFocused(true);
|
|
9359
|
-
onFocus?.(event);
|
|
9360
|
-
},
|
|
9361
|
-
[onFocus]
|
|
9362
|
-
);
|
|
9363
|
-
const handleBlur = (0, import_react18.useCallback)(
|
|
9364
|
-
(event) => {
|
|
9365
|
-
setIsFocused(false);
|
|
9366
|
-
onBlur?.(event);
|
|
9367
|
-
},
|
|
9368
|
-
[onBlur]
|
|
9369
|
-
);
|
|
9370
|
-
const handleClear = (0, import_react18.useCallback)(() => {
|
|
9371
|
-
onClear?.();
|
|
9372
|
-
}, [onClear]);
|
|
9373
|
-
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9374
|
-
import_Box17.default,
|
|
9375
|
-
{
|
|
9376
|
-
className: toolbarClasses.searchField.concat(
|
|
9377
|
-
isFocused ? ` ${toolbarClasses.searchFieldFocused}` : "",
|
|
9378
|
-
className ? ` ${className}` : ""
|
|
9379
|
-
),
|
|
9380
|
-
sx: {
|
|
9381
|
-
...baseStyles3,
|
|
9382
|
-
borderRadius: (theme) => theme.radius["radius-md"],
|
|
9383
|
-
...isFocused && {
|
|
9384
|
-
boxShadow: (theme) => `0px 0px 0px 1.6px white, 0px 0px 0px 3.2px ${varAlpha(theme.vars.palette.primary["300Channel"], 1)}`
|
|
9385
|
-
},
|
|
9386
|
-
...sx
|
|
9344
|
+
var ToolbarSearchField = (0, import_react18.forwardRef)(
|
|
9345
|
+
({ placeholder = "Search", className, sx, value, onFocus, onBlur, onClear, inputRef, ...props }, ref) => {
|
|
9346
|
+
const [isFocused, setIsFocused] = (0, import_react18.useState)(false);
|
|
9347
|
+
const hasValue = Boolean(value && String(value).length > 0);
|
|
9348
|
+
const handleFocus = (0, import_react18.useCallback)(
|
|
9349
|
+
(event) => {
|
|
9350
|
+
setIsFocused(true);
|
|
9351
|
+
onFocus?.(event);
|
|
9387
9352
|
},
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9353
|
+
[onFocus]
|
|
9354
|
+
);
|
|
9355
|
+
const handleBlur = (0, import_react18.useCallback)(
|
|
9356
|
+
(event) => {
|
|
9357
|
+
setIsFocused(false);
|
|
9358
|
+
onBlur?.(event);
|
|
9359
|
+
},
|
|
9360
|
+
[onBlur]
|
|
9361
|
+
);
|
|
9362
|
+
const handleClear = (0, import_react18.useCallback)(() => {
|
|
9363
|
+
onClear?.();
|
|
9364
|
+
}, [onClear]);
|
|
9365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9366
|
+
import_Box17.default,
|
|
9367
|
+
{
|
|
9368
|
+
ref,
|
|
9369
|
+
className: toolbarClasses.searchField.concat(
|
|
9370
|
+
isFocused ? ` ${toolbarClasses.searchFieldFocused}` : "",
|
|
9371
|
+
className ? ` ${className}` : ""
|
|
9396
9372
|
),
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9373
|
+
sx: {
|
|
9374
|
+
...baseStyles3,
|
|
9375
|
+
borderRadius: (theme) => theme.radius["radius-md"],
|
|
9376
|
+
...isFocused && {
|
|
9377
|
+
boxShadow: (theme) => `0px 0px 0px 1.6px white, 0px 0px 0px 3.2px ${varAlpha(theme.vars.palette.primary["300Channel"], 1)}`
|
|
9378
|
+
},
|
|
9379
|
+
...sx
|
|
9380
|
+
},
|
|
9381
|
+
children: [
|
|
9382
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9383
|
+
Icon,
|
|
9384
|
+
{
|
|
9385
|
+
icon: "Search",
|
|
9386
|
+
className: toolbarClasses.searchIcon,
|
|
9387
|
+
sx: { width: 16, height: 16, color: "icon.black", flexShrink: 0 }
|
|
9388
|
+
}
|
|
9389
|
+
),
|
|
9390
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9391
|
+
import_InputBase3.default,
|
|
9392
|
+
{
|
|
9393
|
+
inputRef,
|
|
9394
|
+
placeholder,
|
|
9395
|
+
className: toolbarClasses.searchInput,
|
|
9396
|
+
value,
|
|
9397
|
+
onFocus: handleFocus,
|
|
9398
|
+
onBlur: handleBlur,
|
|
9399
|
+
sx: {
|
|
9400
|
+
flex: 1,
|
|
9401
|
+
minWidth: 0,
|
|
9402
|
+
height: 22,
|
|
9403
|
+
"& .MuiInputBase-input": {
|
|
9404
|
+
p: 0,
|
|
9405
|
+
fontSize: 14,
|
|
9406
|
+
lineHeight: "22px",
|
|
9407
|
+
color: "text.header",
|
|
9408
|
+
"&::placeholder": {
|
|
9409
|
+
color: "text.body",
|
|
9410
|
+
opacity: 1
|
|
9411
|
+
}
|
|
9417
9412
|
}
|
|
9418
|
-
}
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
}
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9413
|
+
},
|
|
9414
|
+
...props
|
|
9415
|
+
}
|
|
9416
|
+
),
|
|
9417
|
+
hasValue && onClear && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9418
|
+
import_ButtonBase3.default,
|
|
9419
|
+
{
|
|
9420
|
+
onClick: handleClear,
|
|
9421
|
+
className: toolbarClasses.searchClearButton,
|
|
9422
|
+
sx: {
|
|
9423
|
+
p: 0.25,
|
|
9424
|
+
borderRadius: "50%",
|
|
9425
|
+
flexShrink: 0,
|
|
9426
|
+
"&:hover": {
|
|
9427
|
+
bgcolor: "grey.100"
|
|
9428
|
+
}
|
|
9429
|
+
},
|
|
9430
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { icon: "XMark", sx: { width: 14, height: 14, color: "icon.mute" } })
|
|
9431
|
+
}
|
|
9432
|
+
)
|
|
9433
|
+
]
|
|
9434
|
+
}
|
|
9435
|
+
);
|
|
9436
|
+
}
|
|
9437
|
+
);
|
|
9443
9438
|
|
|
9444
9439
|
// src/components/Toolbar/ToolbarViewSwitcher.tsx
|
|
9445
9440
|
var import_Box18 = __toESM(require("@mui/material/Box"), 1);
|