@ringcentral/spring-ui 1.8.0 → 1.9.1

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.
Files changed (100) hide show
  1. package/Autocomplete.js +46 -11
  2. package/Avatar.js +12 -3
  3. package/CircularProgressIndicator.js +1 -0
  4. package/Dialog.js +16 -4
  5. package/LinearProgressIndicator.js +6 -5
  6. package/Link.js +2 -2
  7. package/Modal.js +1 -1
  8. package/Radio.js +6 -3
  9. package/StepButton.js +2 -3
  10. package/StepContent.js +3 -8
  11. package/SwipeableDrawer.js +30 -17
  12. package/Switch.js +2 -2
  13. package/Tab.js +1 -1
  14. package/TableRow.js +2 -3
  15. package/Tabs.js +2 -3
  16. package/Tooltip.js +1 -1
  17. package/VirtualizedList.js +5 -10
  18. package/VirtualizedMenu.js +1 -1
  19. package/chunks/Button.js +1 -1
  20. package/chunks/CircularProgressIndicator.js +3 -1
  21. package/chunks/IconButtonLabel.js +2 -3
  22. package/chunks/Menu.js +3 -2
  23. package/chunks/MenuList.js +3 -3
  24. package/chunks/Modal.js +5 -9
  25. package/chunks/Tooltip.js +1 -1
  26. package/chunks/VirtualizedMenu.js +44 -22
  27. package/chunks/getFade.js +3 -1
  28. package/chunks/useListNavigation.js +3 -0
  29. package/chunks/useMenuItemSelect.js +3 -3
  30. package/chunks/useNestedParentMenu.js +5 -16
  31. package/chunks/usePrefersReducedMotion.js +6 -2
  32. package/index.css +49 -37
  33. package/package.json +4 -4
  34. package/src/Accordion/Accordion.d.ts +1 -1
  35. package/src/AccordionHeader/AccordionHeader.d.ts +1 -1
  36. package/src/Alert/Alert.d.ts +1 -1
  37. package/src/Autocomplete/SuggestionList/utils/useHighlightScroll.d.ts +4 -3
  38. package/src/Autocomplete/useAutocomplete.d.ts +4 -4
  39. package/src/Autocomplete/useAutocompleteTag.d.ts +3 -3
  40. package/src/Checkbox/Checkbox.classes.d.ts +1 -1
  41. package/src/Checkbox/Checkbox.d.ts +2 -2
  42. package/src/Checkbox/Checkbox.type.d.ts +4 -4
  43. package/src/CircularProgressIndicator/CircularProgressIndicator.d.ts +1 -1
  44. package/src/CircularProgressIndicator/CircularProgressIndicator.type.d.ts +2 -2
  45. package/src/DatePicker/Day.d.ts +1 -1
  46. package/src/DatePicker/Year.d.ts +1 -1
  47. package/src/Dialog/Dialog.classes.d.ts +1 -1
  48. package/src/Dialog/Dialog.d.ts +1 -1
  49. package/src/Dialog/Dialog.type.d.ts +3 -0
  50. package/src/Drawer/Drawer.d.ts +1 -1
  51. package/src/Dropdown/Dropdown.type.d.ts +4 -4
  52. package/src/EmptyState/EmptyState.d.ts +1 -1
  53. package/src/FormField/FormField.type.d.ts +2 -2
  54. package/src/FormLabel/FormLabel.d.ts +1 -1
  55. package/src/Icon/Icon.d.ts +1 -1
  56. package/src/IconButton/IconButtonLabel.d.ts +1 -1
  57. package/src/LinearProgressIndicator/LinearProgressIndicator.type.d.ts +2 -2
  58. package/src/ListItemText/ListItemText.d.ts +1 -1
  59. package/src/Menu/Menu.d.ts +1 -1
  60. package/src/MenuItem/MenuItem.d.ts +1 -1
  61. package/src/MenuItemText/MenuItemText.d.ts +1 -1
  62. package/src/Modal/InnerModal.d.ts +2 -2
  63. package/src/Modal/Modal.classes.d.ts +1 -1
  64. package/src/Modal/Modal.d.ts +3 -3
  65. package/src/NestedMenuContext/NestedMenuContext.d.ts +1 -1
  66. package/src/Option/Option.d.ts +1 -1
  67. package/src/Popover/Popover.d.ts +1 -1
  68. package/src/Popper/Popper.d.ts +1 -1
  69. package/src/PopperPaper/PopperPaper.d.ts +1 -1
  70. package/src/Radio/Radio.d.ts +2 -2
  71. package/src/Radio/Radio.type.d.ts +4 -4
  72. package/src/RadioGroup/RadioGroup.d.ts +1 -1
  73. package/src/Rating/Rating.d.ts +1 -1
  74. package/src/Rating/RatingItem.d.ts +1 -1
  75. package/src/SingleFilter/FilterButton/FilterButton.d.ts +1 -1
  76. package/src/SingleFilter/SingleFilter.d.ts +1 -1
  77. package/src/Slider/Slider.d.ts +2 -2
  78. package/src/SortableListItem/SortableListItemOverlay.d.ts +1 -1
  79. package/src/SplitButton/SplitButton.d.ts +1 -1
  80. package/src/StepContent/StepContent.d.ts +1 -1
  81. package/src/StepLabel/StepLabel.d.ts +1 -1
  82. package/src/SubMenu/PopperMenu.d.ts +1 -1
  83. package/src/SubMenu/SubMenu.d.ts +1 -1
  84. package/src/SwipeableDrawer/SwipeableDrawer.d.ts +1 -1
  85. package/src/Switch/Switch.d.ts +2 -2
  86. package/src/Switch/Switch.type.d.ts +4 -4
  87. package/src/Tab/Tab.d.ts +1 -1
  88. package/src/TabPanel/TabPanel.d.ts +1 -1
  89. package/src/Tabs/TabScrollButton.d.ts +1 -1
  90. package/src/Tabs/Tabs.d.ts +1 -1
  91. package/src/Tag/Tag.d.ts +1 -1
  92. package/src/Textarea/Textarea.d.ts +1 -1
  93. package/src/TimePicker/NumberPicker.d.ts +1 -1
  94. package/src/TimePicker/TimeButton.d.ts +1 -1
  95. package/src/TimePicker/ToggleText.d.ts +1 -1
  96. package/src/Tooltip/TooltipView.classes.d.ts +1 -1
  97. package/src/Tray/Tray.d.ts +1 -1
  98. package/src/TrayMenu/TrayMenu.d.ts +1 -1
  99. package/src/TrayMenu/TrayMenuItem.d.ts +1 -1
  100. package/src/VirtualizedMenu/VirtualizedMenu.classes.d.ts +1 -1
@@ -1,5 +1,6 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
+ import clsx from 'clsx';
3
4
  import { MotionConfig, motion } from 'framer-motion';
4
5
  import { useClasses } from '@ringcentral/spring-base';
5
6
  import { useThemeProps } from '@ringcentral/spring-theme';
@@ -55,7 +56,8 @@ const CircularProgressIndicator = forwardRef((inProps, ref) => {
55
56
  const offset = circumference - (value / 100) * circumference;
56
57
  content = (jsx("svg", { width: '100%', height: '100%', viewBox: "0 0 56 56", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: jsx("circle", { className: cls('progress-circle', `${variant}-progress-circle`), cx: "28", cy: "28", r: radius, fill: "none", strokeWidth: 18, strokeDasharray: circumference, strokeDashoffset: offset, transform: "rotate(-90 28 28)" }) }));
57
58
  }
58
- return (jsx("span", { className: cls('root', variant, size, color, `${variant}-${size}`, `${variant}-${color}`), ...rest, ...progressBarProps, role: "progressbar", ref: ref, children: content }));
59
+ const { className: progressBarClassName, ...restProgressBarProps } = progressBarProps;
60
+ return (jsx("span", { className: clsx(cls('root', variant, size, color, `${variant}-${size}`, `${variant}-${color}`), progressBarClassName), ...rest, ...restProgressBarProps, role: "progressbar", ref: ref, children: content }));
59
61
  });
60
62
  CircularProgressIndicator.displayName = 'SuiProgressIndicator';
61
63
 
@@ -33,7 +33,7 @@ const IconButton = withTooltip(forwardRef((inProps, ref) => {
33
33
  ...props,
34
34
  rootRef: ref,
35
35
  });
36
- const rootProps = {
36
+ const rootProps = getRootProps({
37
37
  className: cls('root', size, variant, color, shape, `${size}-${shape}`, `${size}-${variant}`, `${variant}-${color}`, `${variant}-${shape}`, ...(!background
38
38
  ? [
39
39
  'hide-background',
@@ -45,9 +45,8 @@ const IconButton = withTooltip(forwardRef((inProps, ref) => {
45
45
  focusVisible,
46
46
  }),
47
47
  'aria-label': label,
48
- ...getRootProps(),
49
48
  ...rest,
50
- };
49
+ });
51
50
  const content = (jsxs(Fragment, { children: [children || (jsx(Icon, { symbol: symbol, size: iconSize ?? IconSizeMap[size] })), sizeSupportsLabel(size) && label && (jsx("span", { className: cls('label', `${size}-label`, shape === 'squircle' && `${shape}-label`, `${size}-${shape}-label`), children: label }))] }));
52
51
  if (shape === 'squircle') {
53
52
  return (jsx(Squircle, { ...rootProps, component: component, interactive: !disabled, focusVisible: focusVisible, children: content }));
package/chunks/Menu.js CHANGED
@@ -30,8 +30,9 @@ const Menu = forwardRef((inProps, ref) => {
30
30
  onClose?.(undefined, 'Other');
31
31
  });
32
32
  const menuContextValue = useMemo(() => {
33
- return { close: closeHandler, autoFocus };
34
- }, [autoFocus, closeHandler]);
33
+ const effectiveAutoFocus = open ? autoFocus : false;
34
+ return { close: closeHandler, autoFocus: effectiveAutoFocus };
35
+ }, [autoFocus, closeHandler, open]);
35
36
  return (jsx(Popover, { bordered: true, className: cls('root'), PopperProps: { ...PopperProps, padding: popperPadding }, ...rest, open: open, onClose: (e, reason) => {
36
37
  onClose?.(e, reason);
37
38
  }, ref: ref, children: jsx("div", { className: cls('paper'), children: jsx(MenuContext.Provider, { value: menuContextValue, children: jsx(NestedMenuContext.Provider, { value: contextValue, children: children }) }) }) }));
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { forwardRef, useMemo, useRef, useEffect } from 'react';
2
+ import { forwardRef, useMemo, useRef, useLayoutEffect } from 'react';
3
3
  import { useClasses, useForkRef, useWindowContext } from '@ringcentral/spring-base';
4
4
  import { useThemeProps } from '@ringcentral/spring-theme';
5
5
  import { L as List } from './List.js';
@@ -29,12 +29,12 @@ const MenuList = forwardRef((inProps, ref) => {
29
29
  const listRef = useRef(null);
30
30
  const handleListRef = useForkRef(listRef, ref);
31
31
  const { document } = useWindowContext();
32
- useEffect(() => {
32
+ useLayoutEffect(() => {
33
33
  if (autoFocus &&
34
34
  !listRef.current?.contains(document?.activeElement ?? null)) {
35
35
  actions.current?.focus();
36
36
  }
37
- }, []);
37
+ }, [autoFocus]);
38
38
  const listRole = widget === 'select' ? 'listbox' : 'menu';
39
39
  const listboxProps = widget === 'select'
40
40
  ? { 'aria-multiselectable': selectMode === 'multiple' }
package/chunks/Modal.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { createContext, useContext, forwardRef, useState, useRef, useEffect } from 'react';
2
+ import { createContext, useContext, forwardRef, useState, useEffect } from 'react';
3
3
  import { useAriaHideOutside, useForkRef, useClasses, useEventCallback, useBodyScrollLock, useWindowContext } from '@ringcentral/spring-base';
4
4
  import { useThemeProps, useTheme } from '@ringcentral/spring-theme';
5
5
  import { FocusTrap, Portal } from '@mui/base';
@@ -31,7 +31,7 @@ const InnerModal = forwardRef((props, ref) => {
31
31
  onBackdropClick?.(event);
32
32
  onClose?.(event, 'backdropClick');
33
33
  });
34
- return (jsx(ModalContext.Provider, { value: { ariaHideEnabled }, children: jsxs(motion.div, { ...rest, ...motionProps, role: "presentation", className: cls('root'), onKeyDown: (e) => {
34
+ return (jsx(ModalContext.Provider, { value: { ariaHideEnabled }, children: jsxs(motion.div, { ...rest, ...motionProps, role: "presentation", className: cls('root', { 'non-blocking': !blocking }), onKeyDown: (e) => {
35
35
  onKeyDown?.(e);
36
36
  if (!disableEscapeKeyDown &&
37
37
  e.key === 'Escape' &&
@@ -47,16 +47,12 @@ const Modal = forwardRef((inProps, ref) => {
47
47
  const props = useThemeProps({ props: inProps, name: 'Modal' });
48
48
  const { children, open, container: containerProp, disablePortal, onExitComplete, disableBackdropAnimation, motionProps, disableScrollLock = false, ...rest } = props;
49
49
  const [shouldRender, setShouldRender] = useState(open);
50
- const modalRef = useRef(null);
51
- const handleRef = useForkRef(modalRef, ref);
50
+ const [modalElement, setModalElement] = useState(null);
51
+ const handleRef = useForkRef(setModalElement, ref);
52
52
  const prefersReducedMotion = usePrefersReducedMotion();
53
53
  const { isEnabled } = useFocusTrapStack({ open });
54
- useBodyScrollLock(open, modalRef.current, {
54
+ useBodyScrollLock(open, modalElement, {
55
55
  disabled: disableScrollLock,
56
- reserveScrollBarGap: true,
57
- allowTouchMove: (el) => {
58
- return modalRef.current?.contains(el) ?? false;
59
- },
60
56
  });
61
57
  useEffect(() => {
62
58
  if (open) {
package/chunks/Tooltip.js CHANGED
@@ -196,7 +196,7 @@ const TooltipView = forwardRef((props, ref) => {
196
196
  arrowStyle,
197
197
  classes: {
198
198
  root: cls('paper', color),
199
- content: cls('paper-content', size),
199
+ content: cls('paper-content', `paper-content-${size}`),
200
200
  },
201
201
  }, popperPaperPropsProp), children: [icon && jsx(Icon, { symbol: icon, size: "small", className: cls('icon') }), jsx("div", { className: cls('content', `content-${size}`), children: children })] })) }));
202
202
  });
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { createContext, useContext, useRef, useEffect, forwardRef, useState, useMemo } from 'react';
2
+ import { createContext, useContext, useRef, useLayoutEffect, forwardRef, useState, useMemo, useEffect } from 'react';
3
3
  import { useForkRef, combineProps, useClasses, useEventCallback } from '@ringcentral/spring-base';
4
4
  import { useThemeProps } from '@ringcentral/spring-theme';
5
5
  import clsx from 'clsx';
@@ -14,7 +14,11 @@ const VirtualizedMenuList = (props) => {
14
14
  const actions = useRef(null);
15
15
  const handleListActions = useForkRef(actions, actionsProp);
16
16
  const listRef = useRef(null);
17
- useEffect(() => {
17
+ const virtualizedMenuContext = useVirtualizedMenuContext();
18
+ useLayoutEffect(() => {
19
+ if (!virtualizedMenuContext?.open) {
20
+ return;
21
+ }
18
22
  const initialFocus = typeof initialFocusProps === 'function'
19
23
  ? initialFocusProps()
20
24
  : initialFocusProps;
@@ -24,20 +28,21 @@ const VirtualizedMenuList = (props) => {
24
28
  else if (typeof initialFocus === 'number') {
25
29
  actions.current?.focusByIndex(initialFocus);
26
30
  }
27
- }, []);
31
+ }, [virtualizedMenuContext?.open]);
28
32
  return (jsx(VirtualizedList, { actions: handleListActions, ...rest, ListProps: combineProps({
29
33
  role: 'menu',
30
34
  }, rest.ListProps), ref: listRef, totalListHeightChanged: totalListHeightChangedProp, children: children }));
31
35
  };
32
36
 
37
+ const MENU_VERTICAL_PADDING = 8;
33
38
  const VirtualizedMenu = forwardRef((inProps, ref) => {
34
39
  const props = useThemeProps({ props: inProps, name: 'VirtualizedMenu' });
35
40
  const { classes, className, children, open, onClose, data, totalCount, isItemDisabled, VirtualizedListProps, popperActions: popperActionsProp, initialFocus = true, maxHeight, PopperProps, ...rest } = props;
36
41
  const popperPaperContentRef = useRef(null);
37
42
  const paperContentContainerRef = useRef(null);
38
- const waitForListHeightComputeCallsCount = useRef(0);
43
+ const hasItemsRenderedRef = useRef(false);
39
44
  const [waitForHeightCompute, setWaitForHeightCompute] = useState(true);
40
- const [menuHeight, setMenuHeight] = useState(0);
45
+ const [menuHeight, setMenuHeight] = useState(MENU_VERTICAL_PADDING * 2);
41
46
  const [deferPendingVirtualizedListActions, setDeferPendingVirtualizedListActions,] = useState(true);
42
47
  const computedListHeight = useRef(-1);
43
48
  const availableHeight = useRef(-1);
@@ -75,13 +80,14 @@ const VirtualizedMenu = forwardRef((inProps, ref) => {
75
80
  }
76
81
  });
77
82
  const handleTotalListHeightChanged = useEventCallback((listHeight) => {
78
- if (waitForListHeightComputeCallsCount.current < 2) {
79
- waitForListHeightComputeCallsCount.current += 1;
83
+ if (!hasItemsRenderedRef.current) {
80
84
  return;
81
85
  }
82
- computedListHeight.current = listHeight;
86
+ const adjustedHeight = listHeight + MENU_VERTICAL_PADDING * 2
87
+ ;
88
+ computedListHeight.current = adjustedHeight;
83
89
  if (paperContentContainerRef.current) {
84
- paperContentContainerRef.current.style.height = `${listHeight}px`;
90
+ paperContentContainerRef.current.style.height = `${adjustedHeight}px`;
85
91
  }
86
92
  updateMenuHeight();
87
93
  popperActions.current?.update();
@@ -95,7 +101,7 @@ const VirtualizedMenu = forwardRef((inProps, ref) => {
95
101
  }
96
102
  });
97
103
  const handleAvailableHeightChange = useEventCallback((value) => {
98
- if (computedListHeight.current === -1) {
104
+ if (computedListHeight.current === -1 || !hasItemsRenderedRef.current) {
99
105
  return;
100
106
  }
101
107
  availableHeight.current = value;
@@ -104,13 +110,20 @@ const VirtualizedMenu = forwardRef((inProps, ref) => {
104
110
  });
105
111
  useEffect(() => {
106
112
  if (!open) {
107
- waitForListHeightComputeCallsCount.current = 0;
108
- computedListHeight.current = -1;
109
- availableHeight.current = -1;
113
+ hasItemsRenderedRef.current = false;
110
114
  }
111
115
  if (open) {
112
- setWaitForHeightCompute(true);
113
- setDeferPendingVirtualizedListActions(true);
116
+ if (computedListHeight.current !== -1) {
117
+ updateMenuHeight();
118
+ setWaitForHeightCompute(false);
119
+ setDeferPendingVirtualizedListActions(false);
120
+ popperActions.current?.update();
121
+ }
122
+ else {
123
+ setMenuHeight(MENU_VERTICAL_PADDING * 2);
124
+ setWaitForHeightCompute(true);
125
+ setDeferPendingVirtualizedListActions(true);
126
+ }
114
127
  if (popperPaperContentRef.current) {
115
128
  popperPaperContentRef.current.style.maxHeight = 'none';
116
129
  }
@@ -119,11 +132,23 @@ const VirtualizedMenu = forwardRef((inProps, ref) => {
119
132
  return (jsx(Popover, { bordered: true, PopperProps: { ...PopperProps, padding: popperPadding }, ...rest, open: open, className: clsx(cls('root'), waitForHeightCompute && 'opacity-0'), PopperPaperProps: {
120
133
  contentRef: popperPaperContentRef,
121
134
  }, onClose: onClose, onAvailableHeightChange: handleAvailableHeightChange, ref: ref, motionProps: { variants: undefined }, actions: handlePopperActions, children: jsx("div", { className: cls('paper'), children: jsx("div", { ref: paperContentContainerRef, className: cls('paper-content-container'), children: jsx(VirtualizedMenuContext.Provider, { value: menuContextValue, children: jsx(VirtualizedMenuList, { data: data, totalCount: totalCount, isReady: !deferPendingVirtualizedListActions, isItemDisabled: isItemDisabled, initialFocus: initialFocus, style: { height: menuHeight }, ...combineProps(VirtualizedListProps, {
122
- components: {
123
- Header: VirtualizedListVerticalPadding,
124
- Footer: VirtualizedListVerticalPadding,
125
- },
135
+ ListProps: combineProps(VirtualizedListProps?.ListProps, {
136
+ className: cls('list'),
137
+ style: {
138
+ ['--sui-virtualized-menu-vertical-padding']: `${MENU_VERTICAL_PADDING}px`,
139
+ },
140
+ }),
126
141
  totalListHeightChanged: handleTotalListHeightChanged,
142
+ itemsRendered: (items) => {
143
+ if (totalCount === 0 ||
144
+ (totalCount === undefined &&
145
+ data !== undefined &&
146
+ data.length === 0) ||
147
+ (items && items.length > 0)) {
148
+ hasItemsRenderedRef.current = true;
149
+ }
150
+ VirtualizedListProps?.itemsRendered?.(items);
151
+ },
127
152
  onKeyDown: (e) => {
128
153
  if (e.key === 'Tab') {
129
154
  e.preventDefault();
@@ -132,9 +157,6 @@ const VirtualizedMenu = forwardRef((inProps, ref) => {
132
157
  },
133
158
  }), children: children }) }) }) }) }));
134
159
  });
135
- function VirtualizedListVerticalPadding() {
136
- return jsx("div", { className: "h-2" });
137
- }
138
160
  VirtualizedMenu.displayName = 'SuiVirtualizedMenu';
139
161
 
140
162
  export { VirtualizedMenuContext as V, VirtualizedMenu as a, VirtualizedMenuList as b, useVirtualizedMenuContext as u };
package/chunks/getFade.js CHANGED
@@ -10,7 +10,6 @@ const getFade = ({ toggle = true, prefersReducedMotion = false, toggleOnTransiti
10
10
  transition: prefersReducedMotion
11
11
  ? motionTransition.instant
12
12
  : toggleOnTransition || motionTransition['haste-01-fast'],
13
- pointerEvents: 'auto',
14
13
  },
15
14
  hidden: {
16
15
  opacity: 0,
@@ -18,6 +17,9 @@ const getFade = ({ toggle = true, prefersReducedMotion = false, toggleOnTransiti
18
17
  ? motionTransition.instant
19
18
  : toggleOffTransition || motionTransition['haste-01-slow'],
20
19
  pointerEvents: 'none',
20
+ transitionEnd: {
21
+ pointerEvents: undefined,
22
+ },
21
23
  },
22
24
  },
23
25
  });
@@ -120,6 +120,9 @@ const useListNavigation = (props) => {
120
120
  const isUnfocusable = (el) => el.matches('.sui-disabled, :disabled, hr, [role="separator"], [disabled]');
121
121
  const defaultSearchAndFocusItem = (searchElementOption, helperElements) => {
122
122
  const { list, sentinelEnd } = helperElements;
123
+ if (list.firstElementChild === sentinelEnd) {
124
+ return { focused: false };
125
+ }
123
126
  const getFirstItem = () => {
124
127
  const firstItem = list.firstElementChild;
125
128
  if (firstItem === sentinelEnd) {
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { createContext, useContext, forwardRef, useRef, useEffect, useCallback, useMemo } from 'react';
2
+ import { createContext, useContext, forwardRef, useRef, useLayoutEffect, useCallback, useMemo } from 'react';
3
3
  import { useFocusVisible, useActive, useForkRef, useId, useHover, useEventCallback } from '@ringcentral/spring-base';
4
4
  import { CheckBoldMd } from '@ringcentral/spring-icon';
5
5
  import { useThemeProps, useClassesWithMode } from '@ringcentral/spring-theme';
@@ -131,7 +131,7 @@ const MenuItem = forwardRef((inProps, ref) => {
131
131
  const id = useId();
132
132
  const { hover, hoverHandlers } = useHover({ onMouseEnter, onMouseLeave });
133
133
  useNestedMenuItem({ hovered: hover, id });
134
- useEffect(() => {
134
+ useLayoutEffect(() => {
135
135
  if (autoFocus) {
136
136
  itemRef.current?.focus();
137
137
  requestAnimationFrame(() => {
@@ -145,7 +145,7 @@ const MenuItem = forwardRef((inProps, ref) => {
145
145
  });
146
146
  });
147
147
  }
148
- }, []);
148
+ }, [autoFocus]);
149
149
  return (jsx("div", { className: cls('root', {
150
150
  selectable,
151
151
  selected,
@@ -1,4 +1,4 @@
1
- import { createContext, useContext, useRef, useState, useMemo, useEffect, useLayoutEffect } from 'react';
1
+ import { createContext, useContext, useRef, useMemo, useLayoutEffect } from 'react';
2
2
 
3
3
  const NestedMenuContext = createContext(null);
4
4
  const useNestedMenuContext = () => {
@@ -7,19 +7,14 @@ const useNestedMenuContext = () => {
7
7
 
8
8
  const useNestedParentMenu = (props) => {
9
9
  const openedSubMenuSymbolRef = useRef(null);
10
- const [hoveredItemId, setHoveredItemId] = useState();
11
10
  const { open } = props;
12
11
  const contextValue = useMemo(() => {
13
12
  return {
14
13
  registHoveredItem: (id) => {
15
- setHoveredItemId(id);
16
- return () => {
17
- setHoveredItemId((pre) => {
18
- if (pre === id)
19
- return undefined;
20
- return pre;
21
- });
22
- };
14
+ const symbol = openedSubMenuSymbolRef.current;
15
+ if (symbol && id !== symbol.anchorId) {
16
+ symbol.closeSubMenu();
17
+ }
23
18
  },
24
19
  registOpenedSubMenu: (menuItemSymbol) => {
25
20
  openedSubMenuSymbolRef.current?.closeSubMenu();
@@ -32,12 +27,6 @@ const useNestedParentMenu = (props) => {
32
27
  },
33
28
  };
34
29
  }, []);
35
- useEffect(() => {
36
- const symbol = openedSubMenuSymbolRef.current;
37
- if (symbol && hoveredItemId && hoveredItemId !== symbol.anchorId) {
38
- symbol.closeSubMenu();
39
- }
40
- }, [hoveredItemId]);
41
30
  useLayoutEffect(() => {
42
31
  if (!open) {
43
32
  openedSubMenuSymbolRef.current?.closeSubMenu();
@@ -20,10 +20,14 @@ const usePrefersReducedMotion = () => {
20
20
  target: mediaQuery,
21
21
  customKey: 'prefers-reduced-motion',
22
22
  });
23
- if (context.reducedMotion === 'always') {
23
+ if (context.reducedMotion === 'user') {
24
+ return shouldReduceMotion;
25
+ }
26
+ if (context.reducedMotion === 'always' ||
27
+ process.env.NODE_ENV === 'test') {
24
28
  return true;
25
29
  }
26
- else if (context.reducedMotion === 'never') {
30
+ if (context.reducedMotion === 'never') {
27
31
  return false;
28
32
  }
29
33
  return shouldReduceMotion;
package/index.css CHANGED
@@ -534,13 +534,28 @@
534
534
  }
535
535
 
536
536
  .sui-modal-root {
537
+
537
538
  position: fixed;
539
+
538
540
  inset: var(--sui-spacing-0);
541
+
539
542
  z-index: 1300;
543
+
540
544
  outline: 2px solid transparent;
545
+
541
546
  outline-offset: 2px
542
547
  }
543
548
 
549
+ .sui-modal-non-blocking {
550
+
551
+ pointer-events: none
552
+ }
553
+
554
+ .sui-modal-non-blocking > :not(.sui-backdrop-root) {
555
+
556
+ pointer-events: auto
557
+ }
558
+
544
559
  .sui-popper-paper-root {
545
560
  --sui-popper-paper-arrow-radius: 2px;
546
561
  }
@@ -677,21 +692,6 @@
677
692
  overflow-wrap: break-word;
678
693
  }
679
694
 
680
- .sui-tooltip-view-content-medium {
681
-
682
- font-size: var(--sui-typography-descriptor-font-size);
683
-
684
- font-weight: var(--sui-typography-descriptor-font-weight);
685
-
686
- line-height: var(--sui-typography-descriptor-line-height);
687
-
688
- text-decoration: var(--sui-typography-descriptor-text-decoration);
689
-
690
- text-transform: var(--sui-typography-descriptor-text-transform);
691
-
692
- font-family: var(--sui-font-family);
693
- }
694
-
695
695
  .sui-tooltip-view-neutral {
696
696
 
697
697
  --tw-border-opacity: 1;
@@ -1592,6 +1592,8 @@
1592
1592
 
1593
1593
  justify-content: center;
1594
1594
 
1595
+ flex-shrink: 0;
1596
+
1595
1597
  border-style: none;
1596
1598
 
1597
1599
  text-decoration-line: none;
@@ -2788,19 +2790,29 @@
2788
2790
  }
2789
2791
 
2790
2792
  .sui-virtualized-menu-paper {
2791
-
2792
2793
  min-width: var(--sui-spacing-50);
2793
-
2794
2794
  max-width: var(--sui-spacing-112);
2795
-
2796
- overflow: hidden
2795
+ overflow: hidden;
2797
2796
  }
2798
2797
 
2799
2798
  .sui-virtualized-menu-paper-content-container {
2800
-
2801
- width: 100%
2799
+ width: 100%;
2802
2800
  }
2803
2801
 
2802
+ .sui-virtualized-menu-list::before {
2803
+ content: '';
2804
+ display: block;
2805
+ height: var(--sui-virtualized-menu-vertical-padding, 0px);
2806
+ width: 0;
2807
+ }
2808
+
2809
+ .sui-virtualized-menu-list::after {
2810
+ content: '';
2811
+ display: block;
2812
+ height: var(--sui-virtualized-menu-vertical-padding, 0px);
2813
+ width: 0;
2814
+ }
2815
+
2804
2816
  .sui-select-chevron {
2805
2817
 
2806
2818
  height: var(--sui-spacing-6);
@@ -5057,14 +5069,13 @@ display: none
5057
5069
 
5058
5070
  /* Compact Mode */
5059
5071
  .sui-alert-title-root:where(.sui-compact) {
5060
- font-size: var(--sui-typography-subtitle-mini-font-size);
5061
- font-weight: var(--sui-typography-subtitle-mini-font-weight);
5062
- line-height: var(--sui-typography-subtitle-mini-line-height);
5063
- text-decoration: var(--sui-typography-subtitle-mini-text-decoration);
5064
- text-transform: var(--sui-typography-subtitle-mini-text-transform);
5072
+ font-size: var(--sui-typography-subtitle-mini-semi-bold-font-size);
5073
+ font-weight: var(--sui-typography-subtitle-mini-semi-bold-font-weight);
5074
+ line-height: var(--sui-typography-subtitle-mini-semi-bold-line-height);
5075
+ text-decoration: var(--sui-typography-subtitle-mini-semi-bold-text-decoration);
5076
+ text-transform: var(--sui-typography-subtitle-mini-semi-bold-text-transform);
5065
5077
  font-family: var(--sui-font-family);
5066
- margin-bottom: var(--sui-spacing-0);
5067
- font-weight: var(--sui-font-weight-semi-bold)
5078
+ margin-bottom: var(--sui-spacing-0)
5068
5079
  }
5069
5080
 
5070
5081
  .sui-announcement-icon,
@@ -9766,11 +9777,15 @@ height: var(--sui-spacing-25);
9766
9777
  position: fixed;
9767
9778
  max-height: 80vh;
9768
9779
  max-width: calc(100% - var(--sui-spacing-12));
9780
+ pointer-events: auto;
9769
9781
  }
9770
9782
  .sui-dialog-root {
9771
9783
  display: flex;
9772
9784
  align-items: center;
9773
9785
  justify-content: center;
9786
+ }
9787
+ .sui-dialog-non-blocking {
9788
+ pointer-events: none;
9774
9789
  }
9775
9790
  .sui-dialog-small {
9776
9791
  width: var(--sui-spacing-71);
@@ -10722,12 +10737,13 @@ height: var(--sui-spacing-25);
10722
10737
  color: rgb(var(--s-neutral-w0), calc(var(--s-neutral-w0-opacity, 1) * var(--tw-text-opacity)));
10723
10738
  }
10724
10739
  }
10725
- .sui-tab-root.sui-active,
10726
- .sui-tab-root:active {
10740
+ /* Use :active pseudo-class for pressed state.
10741
+ .sui-active class is still applied by JS for backward compatibility. */
10742
+ .sui-tab-root:active {
10727
10743
  --tw-text-opacity: 1;
10728
10744
  color: rgb(var(--s-neutral-b0), calc(var(--s-neutral-b0-opacity, 1) * var(--tw-text-opacity)));
10729
10745
  }
10730
- .sui-tab-root.sui-active .sui-tab-badge, .sui-tab-root:active .sui-tab-badge {
10746
+ .sui-tab-root:active .sui-tab-badge {
10731
10747
  --tw-bg-opacity: 1;
10732
10748
  background-color: rgb(var(--s-neutral-b0), calc(var(--s-neutral-b0-opacity, 1) * var(--tw-bg-opacity)));
10733
10749
  }
@@ -10845,8 +10861,7 @@ height: var(--sui-spacing-25);
10845
10861
  color: rgb(var(--s-neutral-b0), calc(var(--s-neutral-b0-opacity, 1) * var(--tw-text-opacity)));
10846
10862
  }
10847
10863
  }
10848
- .sui-tab-pill.sui-active,
10849
- .sui-tab-pill:active {
10864
+ .sui-tab-pill:active {
10850
10865
  --tw-border-opacity: 1;
10851
10866
  border-color: rgb(var(--s-neutral-b3), calc(var(--s-neutral-b3-opacity, 1) * var(--tw-border-opacity)));
10852
10867
  --tw-bg-opacity: 1;
@@ -10889,10 +10904,7 @@ height: var(--sui-spacing-25);
10889
10904
  color: rgb(var(--s-neutral-high-contrast-b0), calc(var(--s-neutral-high-contrast-b0-opacity, 1) * var(--tw-text-opacity)));
10890
10905
  }
10891
10906
  }
10892
- .sui-tab-label-pill-cobranding.sui-selected.sui-active,
10893
- .sui-tab-label-pill-cobranding.sui-selected:active,
10894
- .sui-tab-icon-pill-cobranding.sui-selected.sui-active,
10895
- .sui-tab-icon-pill-cobranding.sui-selected:active {
10907
+ .sui-tab-label-pill-cobranding.sui-selected:active, .sui-tab-icon-pill-cobranding.sui-selected:active {
10896
10908
  --tw-border-opacity: 1;
10897
10909
  border-color: rgb(var(--s-neutral-high-contrast-w0), calc(var(--s-neutral-high-contrast-w0-opacity, 1) * var(--tw-border-opacity)));
10898
10910
  --tw-bg-opacity: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ringcentral/spring-ui",
3
- "version": "1.8.0",
3
+ "version": "1.9.1",
4
4
  "author": "RingCentral",
5
5
  "description": "A comprehensive React component library built with Tailwind CSS, featuring production-ready components",
6
6
  "main": "./index.js",
@@ -14,9 +14,9 @@
14
14
  "@floating-ui/react-dom": "2.1.1",
15
15
  "@juggle/resize-observer": "3.4.0",
16
16
  "@mui/base": "5.0.0-beta.40",
17
- "@ringcentral/spring-base": "^1.8.0",
18
- "@ringcentral/spring-icon": "^1.8.0",
19
- "@ringcentral/spring-theme": "^1.8.0",
17
+ "@ringcentral/spring-base": "^1.9.1",
18
+ "@ringcentral/spring-icon": "^1.9.1",
19
+ "@ringcentral/spring-theme": "^1.9.1",
20
20
  "@types/lodash": "^4.14.182",
21
21
  "@use-gesture/react": "10.3.1",
22
22
  "clsx": "^1.2.1",
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { AccordionProps } from './Accordion.type';
3
3
  import accordionStyles from './styles/Accordion.css';
4
- declare const Accordion: import("react").ForwardRefExoticComponent<Pick<AccordionProps, "children" | "onKeyDown" | "onKeyUp" | "onClick" | "aria-hidden" | "dir" | "header" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "classes" | "expanded" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "placeholder" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | `data-${string}` | "keepMounted" | "defaultExpanded"> & import("react").RefAttributes<HTMLDivElement>>;
4
+ declare const Accordion: import("react").ForwardRefExoticComponent<Pick<AccordionProps, "children" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onClick" | "aria-hidden" | "dir" | "header" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "classes" | "expanded" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "placeholder" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | `data-${string}` | "keepMounted" | "defaultExpanded"> & import("react").RefAttributes<HTMLDivElement>>;
5
5
  export { Accordion, accordionStyles };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { AccordionHeaderProps } from './AccordionHeader.type';
3
3
  import accordionHeaderStyles from './styles/AccordionHeader.css';
4
- declare const AccordionHeader: import("react").ForwardRefExoticComponent<Pick<AccordionHeaderProps, "value" | "children" | "onKeyDown" | "onKeyUp" | "onClick" | "disabled" | "aria-hidden" | "dir" | "form" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "classes" | "name" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "placeholder" | "type" | "onFocusVisible" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | `data-${string}` | "autoFocus" | "formEncType" | "secondarySlot" | "expandIcon" | "ExpandCollapseCaretProps"> & import("react").RefAttributes<HTMLButtonElement>>;
4
+ declare const AccordionHeader: import("react").ForwardRefExoticComponent<Pick<AccordionHeaderProps, "value" | "children" | "onKeyDown" | "onKeyUp" | "onMouseDown" | "onClick" | "disabled" | "aria-hidden" | "dir" | "form" | "slot" | "style" | "title" | "aria-live" | "aria-atomic" | "role" | "classes" | "name" | "className" | "accessKey" | "draggable" | "hidden" | "lang" | "translate" | "id" | "prefix" | "contentEditable" | "inputMode" | "tabIndex" | "key" | "defaultChecked" | "defaultValue" | "formAction" | "formMethod" | "formNoValidate" | "formTarget" | "placeholder" | "type" | "onFocusVisible" | "onFocus" | "onBlur" | "onMouseEnter" | "onMouseLeave" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | `data-${string}` | "autoFocus" | "formEncType" | "secondarySlot" | "expandIcon" | "ExpandCollapseCaretProps"> & import("react").RefAttributes<HTMLButtonElement>>;
5
5
  export { AccordionHeader, accordionHeaderStyles };