@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.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: ({ placeholder, className, sx, value, onFocus, onBlur, onClear, ...props }: ToolbarSearchFieldProps) => react_jsx_runtime.JSX.Element;
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: ({ placeholder, className, sx, value, onFocus, onBlur, onClear, ...props }: ToolbarSearchFieldProps) => react_jsx_runtime.JSX.Element;
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
@@ -5902,7 +5902,7 @@ var MuiTextField = {
5902
5902
  maxWidth: "100%",
5903
5903
  lineHeight: 1.153,
5904
5904
  position: "relative",
5905
- fontSize: theme.typography.h8.fontSize,
5905
+ fontSize: `${theme.typography.h8.fontSize} !important`,
5906
5906
  fontWeight: `${theme.typography.fontWeightMedium} !important`,
5907
5907
  marginBottom: theme.spacing(1),
5908
5908
  color: `${theme.vars.palette.icon.black} !important`,
@@ -9328,7 +9328,7 @@ var ToolbarTodayButton = ({ label = "Today", sx, ...props }) => {
9328
9328
  };
9329
9329
 
9330
9330
  // src/components/Toolbar/ToolbarSearchField.tsx
9331
- import { useState as useState14, useCallback as useCallback13 } from "react";
9331
+ import { useState as useState14, forwardRef as forwardRef5, useCallback as useCallback13 } from "react";
9332
9332
  import Box17 from "@mui/material/Box";
9333
9333
  import ButtonBase3 from "@mui/material/ButtonBase";
9334
9334
  import InputBase from "@mui/material/InputBase";
@@ -9344,105 +9344,100 @@ var baseStyles3 = {
9344
9344
  borderColor: "border.mute",
9345
9345
  borderBottomWidth: "1.5px"
9346
9346
  };
9347
- var ToolbarSearchField = ({
9348
- placeholder = "Search",
9349
- className,
9350
- sx,
9351
- value,
9352
- onFocus,
9353
- onBlur,
9354
- onClear,
9355
- ...props
9356
- }) => {
9357
- const [isFocused, setIsFocused] = useState14(false);
9358
- const hasValue = Boolean(value && String(value).length > 0);
9359
- const handleFocus = useCallback13(
9360
- (event) => {
9361
- setIsFocused(true);
9362
- onFocus?.(event);
9363
- },
9364
- [onFocus]
9365
- );
9366
- const handleBlur = useCallback13(
9367
- (event) => {
9368
- setIsFocused(false);
9369
- onBlur?.(event);
9370
- },
9371
- [onBlur]
9372
- );
9373
- const handleClear = useCallback13(() => {
9374
- onClear?.();
9375
- }, [onClear]);
9376
- return /* @__PURE__ */ jsxs53(
9377
- Box17,
9378
- {
9379
- className: toolbarClasses.searchField.concat(
9380
- isFocused ? ` ${toolbarClasses.searchFieldFocused}` : "",
9381
- className ? ` ${className}` : ""
9382
- ),
9383
- sx: {
9384
- ...baseStyles3,
9385
- borderRadius: (theme) => theme.radius["radius-md"],
9386
- ...isFocused && {
9387
- boxShadow: (theme) => `0px 0px 0px 1.6px white, 0px 0px 0px 3.2px ${varAlpha(theme.vars.palette.primary["300Channel"], 1)}`
9388
- },
9389
- ...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);
9390
9355
  },
9391
- children: [
9392
- /* @__PURE__ */ jsx83(
9393
- Icon,
9394
- {
9395
- icon: "Search",
9396
- className: toolbarClasses.searchIcon,
9397
- sx: { width: 16, height: 16, color: "icon.black", flexShrink: 0 }
9398
- }
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}` : ""
9399
9375
  ),
9400
- /* @__PURE__ */ jsx83(
9401
- InputBase,
9402
- {
9403
- placeholder,
9404
- className: toolbarClasses.searchInput,
9405
- value,
9406
- onFocus: handleFocus,
9407
- onBlur: handleBlur,
9408
- sx: {
9409
- flex: 1,
9410
- minWidth: 0,
9411
- height: 22,
9412
- "& .MuiInputBase-input": {
9413
- p: 0,
9414
- fontSize: 14,
9415
- lineHeight: "22px",
9416
- color: "text.header",
9417
- "&::placeholder": {
9418
- color: "text.body",
9419
- opacity: 1
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
+ }
9420
9415
  }
9421
- }
9422
- },
9423
- ...props
9424
- }
9425
- ),
9426
- hasValue && onClear && /* @__PURE__ */ jsx83(
9427
- ButtonBase3,
9428
- {
9429
- onClick: handleClear,
9430
- className: toolbarClasses.searchClearButton,
9431
- sx: {
9432
- p: 0.25,
9433
- borderRadius: "50%",
9434
- flexShrink: 0,
9435
- "&:hover": {
9436
- bgcolor: "grey.100"
9437
- }
9438
- },
9439
- children: /* @__PURE__ */ jsx83(Icon, { icon: "XMark", sx: { width: 14, height: 14, color: "icon.mute" } })
9440
- }
9441
- )
9442
- ]
9443
- }
9444
- );
9445
- };
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
+ );
9446
9441
 
9447
9442
  // src/components/Toolbar/ToolbarViewSwitcher.tsx
9448
9443
  import Box18 from "@mui/material/Box";