@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.d.cts
CHANGED
|
@@ -1604,8 +1604,10 @@ interface ToolbarSearchFieldProps extends Omit<InputBaseProps, 'startAdornment'>
|
|
|
1604
1604
|
placeholder?: string;
|
|
1605
1605
|
/** Callback fired when the clear button is clicked */
|
|
1606
1606
|
onClear?: () => void;
|
|
1607
|
+
/** Reference to the input element (for integration with DataGrid QuickFilter) */
|
|
1608
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
1607
1609
|
}
|
|
1608
|
-
declare const ToolbarSearchField:
|
|
1610
|
+
declare const ToolbarSearchField: react.ForwardRefExoticComponent<Omit<ToolbarSearchFieldProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
1609
1611
|
|
|
1610
1612
|
type ViewOption = 'year' | 'month' | 'week' | 'day';
|
|
1611
1613
|
interface ToolbarViewSwitcherProps extends Omit<ButtonBaseProps, 'children'> {
|
package/dist/index.d.ts
CHANGED
|
@@ -1604,8 +1604,10 @@ interface ToolbarSearchFieldProps extends Omit<InputBaseProps, 'startAdornment'>
|
|
|
1604
1604
|
placeholder?: string;
|
|
1605
1605
|
/** Callback fired when the clear button is clicked */
|
|
1606
1606
|
onClear?: () => void;
|
|
1607
|
+
/** Reference to the input element (for integration with DataGrid QuickFilter) */
|
|
1608
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
1607
1609
|
}
|
|
1608
|
-
declare const ToolbarSearchField:
|
|
1610
|
+
declare const ToolbarSearchField: react.ForwardRefExoticComponent<Omit<ToolbarSearchFieldProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
1609
1611
|
|
|
1610
1612
|
type ViewOption = 'year' | 'month' | 'week' | 'day';
|
|
1611
1613
|
interface ToolbarViewSwitcherProps extends Omit<ButtonBaseProps, 'children'> {
|
package/dist/index.js
CHANGED
|
@@ -2167,8 +2167,7 @@ var MuiTabs = {
|
|
|
2167
2167
|
gap: "4px"
|
|
2168
2168
|
}
|
|
2169
2169
|
}
|
|
2170
|
-
})
|
|
2171
|
-
indicator: { backgroundColor: "currentColor" }
|
|
2170
|
+
})
|
|
2172
2171
|
}
|
|
2173
2172
|
};
|
|
2174
2173
|
var MuiTab = {
|
|
@@ -5903,7 +5902,7 @@ var MuiTextField = {
|
|
|
5903
5902
|
maxWidth: "100%",
|
|
5904
5903
|
lineHeight: 1.153,
|
|
5905
5904
|
position: "relative",
|
|
5906
|
-
fontSize: theme.typography.h8.fontSize
|
|
5905
|
+
fontSize: `${theme.typography.h8.fontSize} !important`,
|
|
5907
5906
|
fontWeight: `${theme.typography.fontWeightMedium} !important`,
|
|
5908
5907
|
marginBottom: theme.spacing(1),
|
|
5909
5908
|
color: `${theme.vars.palette.icon.black} !important`,
|
|
@@ -9329,7 +9328,7 @@ var ToolbarTodayButton = ({ label = "Today", sx, ...props }) => {
|
|
|
9329
9328
|
};
|
|
9330
9329
|
|
|
9331
9330
|
// src/components/Toolbar/ToolbarSearchField.tsx
|
|
9332
|
-
import { useState as useState14, useCallback as useCallback13 } from "react";
|
|
9331
|
+
import { useState as useState14, forwardRef as forwardRef5, useCallback as useCallback13 } from "react";
|
|
9333
9332
|
import Box17 from "@mui/material/Box";
|
|
9334
9333
|
import ButtonBase3 from "@mui/material/ButtonBase";
|
|
9335
9334
|
import InputBase from "@mui/material/InputBase";
|
|
@@ -9345,105 +9344,100 @@ var baseStyles3 = {
|
|
|
9345
9344
|
borderColor: "border.mute",
|
|
9346
9345
|
borderBottomWidth: "1.5px"
|
|
9347
9346
|
};
|
|
9348
|
-
var ToolbarSearchField = (
|
|
9349
|
-
placeholder = "Search",
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
...props
|
|
9357
|
-
}) => {
|
|
9358
|
-
const [isFocused, setIsFocused] = useState14(false);
|
|
9359
|
-
const hasValue = Boolean(value && String(value).length > 0);
|
|
9360
|
-
const handleFocus = useCallback13(
|
|
9361
|
-
(event) => {
|
|
9362
|
-
setIsFocused(true);
|
|
9363
|
-
onFocus?.(event);
|
|
9364
|
-
},
|
|
9365
|
-
[onFocus]
|
|
9366
|
-
);
|
|
9367
|
-
const handleBlur = useCallback13(
|
|
9368
|
-
(event) => {
|
|
9369
|
-
setIsFocused(false);
|
|
9370
|
-
onBlur?.(event);
|
|
9371
|
-
},
|
|
9372
|
-
[onBlur]
|
|
9373
|
-
);
|
|
9374
|
-
const handleClear = useCallback13(() => {
|
|
9375
|
-
onClear?.();
|
|
9376
|
-
}, [onClear]);
|
|
9377
|
-
return /* @__PURE__ */ jsxs53(
|
|
9378
|
-
Box17,
|
|
9379
|
-
{
|
|
9380
|
-
className: toolbarClasses.searchField.concat(
|
|
9381
|
-
isFocused ? ` ${toolbarClasses.searchFieldFocused}` : "",
|
|
9382
|
-
className ? ` ${className}` : ""
|
|
9383
|
-
),
|
|
9384
|
-
sx: {
|
|
9385
|
-
...baseStyles3,
|
|
9386
|
-
borderRadius: (theme) => theme.radius["radius-md"],
|
|
9387
|
-
...isFocused && {
|
|
9388
|
-
boxShadow: (theme) => `0px 0px 0px 1.6px white, 0px 0px 0px 3.2px ${varAlpha(theme.vars.palette.primary["300Channel"], 1)}`
|
|
9389
|
-
},
|
|
9390
|
-
...sx
|
|
9347
|
+
var ToolbarSearchField = forwardRef5(
|
|
9348
|
+
({ placeholder = "Search", className, sx, value, onFocus, onBlur, onClear, inputRef, ...props }, ref) => {
|
|
9349
|
+
const [isFocused, setIsFocused] = useState14(false);
|
|
9350
|
+
const hasValue = Boolean(value && String(value).length > 0);
|
|
9351
|
+
const handleFocus = useCallback13(
|
|
9352
|
+
(event) => {
|
|
9353
|
+
setIsFocused(true);
|
|
9354
|
+
onFocus?.(event);
|
|
9391
9355
|
},
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9356
|
+
[onFocus]
|
|
9357
|
+
);
|
|
9358
|
+
const handleBlur = useCallback13(
|
|
9359
|
+
(event) => {
|
|
9360
|
+
setIsFocused(false);
|
|
9361
|
+
onBlur?.(event);
|
|
9362
|
+
},
|
|
9363
|
+
[onBlur]
|
|
9364
|
+
);
|
|
9365
|
+
const handleClear = useCallback13(() => {
|
|
9366
|
+
onClear?.();
|
|
9367
|
+
}, [onClear]);
|
|
9368
|
+
return /* @__PURE__ */ jsxs53(
|
|
9369
|
+
Box17,
|
|
9370
|
+
{
|
|
9371
|
+
ref,
|
|
9372
|
+
className: toolbarClasses.searchField.concat(
|
|
9373
|
+
isFocused ? ` ${toolbarClasses.searchFieldFocused}` : "",
|
|
9374
|
+
className ? ` ${className}` : ""
|
|
9400
9375
|
),
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9376
|
+
sx: {
|
|
9377
|
+
...baseStyles3,
|
|
9378
|
+
borderRadius: (theme) => theme.radius["radius-md"],
|
|
9379
|
+
...isFocused && {
|
|
9380
|
+
boxShadow: (theme) => `0px 0px 0px 1.6px white, 0px 0px 0px 3.2px ${varAlpha(theme.vars.palette.primary["300Channel"], 1)}`
|
|
9381
|
+
},
|
|
9382
|
+
...sx
|
|
9383
|
+
},
|
|
9384
|
+
children: [
|
|
9385
|
+
/* @__PURE__ */ jsx83(
|
|
9386
|
+
Icon,
|
|
9387
|
+
{
|
|
9388
|
+
icon: "Search",
|
|
9389
|
+
className: toolbarClasses.searchIcon,
|
|
9390
|
+
sx: { width: 16, height: 16, color: "icon.black", flexShrink: 0 }
|
|
9391
|
+
}
|
|
9392
|
+
),
|
|
9393
|
+
/* @__PURE__ */ jsx83(
|
|
9394
|
+
InputBase,
|
|
9395
|
+
{
|
|
9396
|
+
inputRef,
|
|
9397
|
+
placeholder,
|
|
9398
|
+
className: toolbarClasses.searchInput,
|
|
9399
|
+
value,
|
|
9400
|
+
onFocus: handleFocus,
|
|
9401
|
+
onBlur: handleBlur,
|
|
9402
|
+
sx: {
|
|
9403
|
+
flex: 1,
|
|
9404
|
+
minWidth: 0,
|
|
9405
|
+
height: 22,
|
|
9406
|
+
"& .MuiInputBase-input": {
|
|
9407
|
+
p: 0,
|
|
9408
|
+
fontSize: 14,
|
|
9409
|
+
lineHeight: "22px",
|
|
9410
|
+
color: "text.header",
|
|
9411
|
+
"&::placeholder": {
|
|
9412
|
+
color: "text.body",
|
|
9413
|
+
opacity: 1
|
|
9414
|
+
}
|
|
9421
9415
|
}
|
|
9422
|
-
}
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
}
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
|
|
9416
|
+
},
|
|
9417
|
+
...props
|
|
9418
|
+
}
|
|
9419
|
+
),
|
|
9420
|
+
hasValue && onClear && /* @__PURE__ */ jsx83(
|
|
9421
|
+
ButtonBase3,
|
|
9422
|
+
{
|
|
9423
|
+
onClick: handleClear,
|
|
9424
|
+
className: toolbarClasses.searchClearButton,
|
|
9425
|
+
sx: {
|
|
9426
|
+
p: 0.25,
|
|
9427
|
+
borderRadius: "50%",
|
|
9428
|
+
flexShrink: 0,
|
|
9429
|
+
"&:hover": {
|
|
9430
|
+
bgcolor: "grey.100"
|
|
9431
|
+
}
|
|
9432
|
+
},
|
|
9433
|
+
children: /* @__PURE__ */ jsx83(Icon, { icon: "XMark", sx: { width: 14, height: 14, color: "icon.mute" } })
|
|
9434
|
+
}
|
|
9435
|
+
)
|
|
9436
|
+
]
|
|
9437
|
+
}
|
|
9438
|
+
);
|
|
9439
|
+
}
|
|
9440
|
+
);
|
|
9447
9441
|
|
|
9448
9442
|
// src/components/Toolbar/ToolbarViewSwitcher.tsx
|
|
9449
9443
|
import Box18 from "@mui/material/Box";
|