@vention/machine-ui 3.37.0 → 3.38.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/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { Typography, Button, Stack, Box as Box$1, Grid, IconButton, ClickAwayListener, Modal, linearProgressClasses, LinearProgress, InputAdornment, TextField, Radio, FormControlLabel, FormControl, Select, MenuItem, FormHelperText, ButtonGroup, Paper, Card, CardMedia, CardContent, ListItemIcon, ListItemText, Popover, MenuList, useTheme as useTheme$1, Drawer, Tooltip, Checkbox } from '@mui/material';
3
3
  import { IconCheck, IconAlertTriangleFilled, IconAlertTriangle, IconExclamationMark, IconExternalLink, IconX, IconInfoCircleFilled, IconCircleCheckFilled, IconChevronUp, IconChevronDown, IconInfoCircle, IconInfoSmall, IconMinus, IconPlus, IconLoader2, IconCaretRightFilled, IconChevronsRight, IconChevronsLeft, IconChevronRight } from '@tabler/icons-react';
4
- import { forwardRef, useState, cloneElement, useRef, useCallback, lazy, memo, Suspense, useMemo, useEffect, createContext, useContext, useImperativeHandle, Children, Fragment as Fragment$1, useReducer } from 'react';
4
+ import { forwardRef, useState, cloneElement, useRef, useEffect, useCallback, lazy, memo, Suspense, useMemo, createContext, useContext, useImperativeHandle, Children, Fragment as Fragment$1, useReducer } from 'react';
5
5
  import { tss } from 'tss-react/mui';
6
6
  import Box from '@mui/material/Box';
7
7
  import CircularProgress from '@mui/material/CircularProgress';
@@ -3376,6 +3376,7 @@ const VentionDropdownButton = _a => {
3376
3376
  disabled = false,
3377
3377
  onClose,
3378
3378
  onOpen,
3379
+ isOpen = false,
3379
3380
  icon,
3380
3381
  badgeText,
3381
3382
  label,
@@ -3386,7 +3387,7 @@ const VentionDropdownButton = _a => {
3386
3387
  menuAlignment = "start",
3387
3388
  onClick
3388
3389
  } = _a,
3389
- other = __rest(_a, ["variant", "size", "className", "disabled", "onClose", "onOpen", "icon", "badgeText", "label", "stroke", "contentColor", "children", "menuPlacement", "menuAlignment", "onClick"]);
3390
+ other = __rest(_a, ["variant", "size", "className", "disabled", "onClose", "onOpen", "isOpen", "icon", "badgeText", "label", "stroke", "contentColor", "children", "menuPlacement", "menuAlignment", "onClick"]);
3390
3391
  const {
3391
3392
  classes,
3392
3393
  cx
@@ -3400,6 +3401,9 @@ const VentionDropdownButton = _a => {
3400
3401
  const ref = useRef(null);
3401
3402
  const [showDropdown, setShowDropdownInternal] = useState(false);
3402
3403
  const Chevron = showDropdown ? IconChevronUp : IconChevronDown;
3404
+ useEffect(() => {
3405
+ setShowDropdownInternal(isOpen);
3406
+ }, [isOpen]);
3403
3407
  const handleClick = useCallback(event => {
3404
3408
  if (!showDropdown) {
3405
3409
  setShowDropdownInternal(true);
@@ -3466,9 +3470,8 @@ const useStyles$A = tss.withParams().create(({
3466
3470
  height: getButtonHeight(size, theme),
3467
3471
  padding: BUTTON_PADDINGS[size],
3468
3472
  backgroundColor: stylingProperties.backgroundColor,
3469
- borderColor: theme.palette.border.main,
3470
3473
  borderRadius: stylingProperties.borderRadius,
3471
- outline: stylingProperties.border,
3474
+ border: stylingProperties.border,
3472
3475
  color,
3473
3476
  "&:hover": {
3474
3477
  backgroundColor: stylingProperties.backgroundColorOnHover
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vention/machine-ui",
3
- "version": "3.37.0",
3
+ "version": "3.38.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/VentionCo/machine-cloud.git"
@@ -21,9 +21,11 @@ export interface VentionDropdownButtonProps extends Omit<ButtonProps, "size" | "
21
21
  onClose?: (() => void) | undefined;
22
22
  /** Callback function called when the dropdown is opened. */
23
23
  onOpen?: (() => void) | undefined;
24
+ /** Is it initially open? Default is false */
25
+ isOpen?: boolean;
24
26
  /** Placement of the menu relative to the button. */
25
27
  menuPlacement?: PositionedMenuPlacement | undefined;
26
28
  /** Alignment of the menu relative to the button. */
27
29
  menuAlignment?: PositionedMenuAlignment | undefined;
28
30
  }
29
- export declare const VentionDropdownButton: ({ variant, size, className, disabled, onClose, onOpen, icon, badgeText, label, stroke, contentColor, children, menuPlacement, menuAlignment, onClick, ...other }: VentionDropdownButtonProps) => import("react/jsx-runtime").JSX.Element;
31
+ export declare const VentionDropdownButton: ({ variant, size, className, disabled, onClose, onOpen, isOpen, icon, badgeText, label, stroke, contentColor, children, menuPlacement, menuAlignment, onClick, ...other }: VentionDropdownButtonProps) => import("react/jsx-runtime").JSX.Element;