@undefine-ui/design-system 3.4.1 → 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 +93 -99
- 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 +94 -100
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2180,8 +2180,7 @@ var MuiTabs = {
|
|
|
2180
2180
|
gap: "4px"
|
|
2181
2181
|
}
|
|
2182
2182
|
}
|
|
2183
|
-
})
|
|
2184
|
-
indicator: { backgroundColor: "currentColor" }
|
|
2183
|
+
})
|
|
2185
2184
|
}
|
|
2186
2185
|
};
|
|
2187
2186
|
var MuiTab = {
|
|
@@ -5916,7 +5915,7 @@ var MuiTextField = {
|
|
|
5916
5915
|
maxWidth: "100%",
|
|
5917
5916
|
lineHeight: 1.153,
|
|
5918
5917
|
position: "relative",
|
|
5919
|
-
fontSize: theme.typography.h8.fontSize
|
|
5918
|
+
fontSize: `${theme.typography.h8.fontSize} !important`,
|
|
5920
5919
|
fontWeight: `${theme.typography.fontWeightMedium} !important`,
|
|
5921
5920
|
marginBottom: theme.spacing(1),
|
|
5922
5921
|
color: `${theme.vars.palette.icon.black} !important`,
|
|
@@ -9342,105 +9341,100 @@ var baseStyles3 = {
|
|
|
9342
9341
|
borderColor: "border.mute",
|
|
9343
9342
|
borderBottomWidth: "1.5px"
|
|
9344
9343
|
};
|
|
9345
|
-
var ToolbarSearchField = (
|
|
9346
|
-
placeholder = "Search",
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
...props
|
|
9354
|
-
}) => {
|
|
9355
|
-
const [isFocused, setIsFocused] = (0, import_react18.useState)(false);
|
|
9356
|
-
const hasValue = Boolean(value && String(value).length > 0);
|
|
9357
|
-
const handleFocus = (0, import_react18.useCallback)(
|
|
9358
|
-
(event) => {
|
|
9359
|
-
setIsFocused(true);
|
|
9360
|
-
onFocus?.(event);
|
|
9361
|
-
},
|
|
9362
|
-
[onFocus]
|
|
9363
|
-
);
|
|
9364
|
-
const handleBlur = (0, import_react18.useCallback)(
|
|
9365
|
-
(event) => {
|
|
9366
|
-
setIsFocused(false);
|
|
9367
|
-
onBlur?.(event);
|
|
9368
|
-
},
|
|
9369
|
-
[onBlur]
|
|
9370
|
-
);
|
|
9371
|
-
const handleClear = (0, import_react18.useCallback)(() => {
|
|
9372
|
-
onClear?.();
|
|
9373
|
-
}, [onClear]);
|
|
9374
|
-
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
|
|
9375
|
-
import_Box17.default,
|
|
9376
|
-
{
|
|
9377
|
-
className: toolbarClasses.searchField.concat(
|
|
9378
|
-
isFocused ? ` ${toolbarClasses.searchFieldFocused}` : "",
|
|
9379
|
-
className ? ` ${className}` : ""
|
|
9380
|
-
),
|
|
9381
|
-
sx: {
|
|
9382
|
-
...baseStyles3,
|
|
9383
|
-
borderRadius: (theme) => theme.radius["radius-md"],
|
|
9384
|
-
...isFocused && {
|
|
9385
|
-
boxShadow: (theme) => `0px 0px 0px 1.6px white, 0px 0px 0px 3.2px ${varAlpha(theme.vars.palette.primary["300Channel"], 1)}`
|
|
9386
|
-
},
|
|
9387
|
-
...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);
|
|
9388
9352
|
},
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
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}` : ""
|
|
9397
9372
|
),
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
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
|
+
}
|
|
9418
9412
|
}
|
|
9419
|
-
}
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
}
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
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
|
+
);
|
|
9444
9438
|
|
|
9445
9439
|
// src/components/Toolbar/ToolbarViewSwitcher.tsx
|
|
9446
9440
|
var import_Box18 = __toESM(require("@mui/material/Box"), 1);
|